aclocal.m4 revision 9e7bcd65
19e7bcd65Smrg# generated automatically by aclocal 1.13.2 -*- Autoconf -*-
29e7bcd65Smrg
39e7bcd65Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc.
4444c061aSmrg
5444c061aSmrg# This file is free software; the Free Software Foundation
6444c061aSmrg# gives unlimited permission to copy and/or distribute it,
7444c061aSmrg# with or without modifications, as long as this notice is preserved.
8444c061aSmrg
9444c061aSmrg# This program is distributed in the hope that it will be useful,
10444c061aSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11444c061aSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12444c061aSmrg# PARTICULAR PURPOSE.
13444c061aSmrg
149e7bcd65Smrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
152265a131Smrgm4_ifndef([AC_AUTOCONF_VERSION],
162265a131Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
179e7bcd65Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
189e7bcd65Smrg[m4_warning([this file was generated for autoconf 2.68.
192265a131SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
202265a131SmrgIf you have problems, you may need to regenerate the build system entirely.
219e7bcd65SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22444c061aSmrg
239e7bcd65Smrg# Copyright (C) 2002-2013 Free Software Foundation, Inc.
24bdf0f55dSmrg#
259e7bcd65Smrg# This file is free software; the Free Software Foundation
269e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
279e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
28249c3046Smrg
299e7bcd65Smrg# AM_AUTOMAKE_VERSION(VERSION)
309e7bcd65Smrg# ----------------------------
319e7bcd65Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
329e7bcd65Smrg# generated from the m4 files accompanying Automake X.Y.
339e7bcd65Smrg# (This private macro should not be called outside this file.)
349e7bcd65SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
359e7bcd65Smrg[am__api_version='1.13'
369e7bcd65Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
379e7bcd65Smrgdnl require some minimum version.  Point them to the right macro.
389e7bcd65Smrgm4_if([$1], [1.13.2], [],
399e7bcd65Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
409e7bcd65Smrg])
41249c3046Smrg
429e7bcd65Smrg# _AM_AUTOCONF_VERSION(VERSION)
439e7bcd65Smrg# -----------------------------
449e7bcd65Smrg# aclocal traces this macro to find the Autoconf version.
459e7bcd65Smrg# This is a private macro too.  Using m4_define simplifies
469e7bcd65Smrg# the logic in aclocal, which can simply ignore this definition.
479e7bcd65Smrgm4_define([_AM_AUTOCONF_VERSION], [])
48249c3046Smrg
499e7bcd65Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
509e7bcd65Smrg# -------------------------------
519e7bcd65Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
529e7bcd65Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
539e7bcd65SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
549e7bcd65Smrg[AM_AUTOMAKE_VERSION([1.13.2])dnl
559e7bcd65Smrgm4_ifndef([AC_AUTOCONF_VERSION],
569e7bcd65Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
579e7bcd65Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58249c3046Smrg
599e7bcd65Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
601477040fSmrg
619e7bcd65Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
629e7bcd65Smrg#
639e7bcd65Smrg# This file is free software; the Free Software Foundation
649e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
659e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
66bdf0f55dSmrg
679e7bcd65Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
689e7bcd65Smrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
699e7bcd65Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70444c061aSmrg#
719e7bcd65Smrg# Of course, Automake must honor this variable whenever it calls a
729e7bcd65Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
739e7bcd65Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
749e7bcd65Smrg# depending on how configure is run.  This is pretty annoying, since
759e7bcd65Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
769e7bcd65Smrg# source directory, any form will work fine, but in subdirectories a
779e7bcd65Smrg# relative path needs to be adjusted first.
78444c061aSmrg#
799e7bcd65Smrg# $ac_aux_dir/missing
809e7bcd65Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
819e7bcd65Smrg# $top_srcdir/$ac_aux_dir/missing
829e7bcd65Smrg#    fails if $ac_aux_dir is absolute,
839e7bcd65Smrg#    fails when called from a subdirectory in a VPATH build with
849e7bcd65Smrg#          a relative $ac_aux_dir
85444c061aSmrg#
869e7bcd65Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
879e7bcd65Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
889e7bcd65Smrg# harmless because $srcdir is '.', but things will broke when you
899e7bcd65Smrg# start a VPATH build or use an absolute $srcdir.
902265a131Smrg#
919e7bcd65Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
929e7bcd65Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
939e7bcd65Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
949e7bcd65Smrg# and then we would define $MISSING as
959e7bcd65Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
969e7bcd65Smrg# This will work as long as MISSING is not called from configure, because
979e7bcd65Smrg# unfortunately $(top_srcdir) has no meaning in configure.
989e7bcd65Smrg# However there are other variables, like CC, which are often used in
999e7bcd65Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
1009e7bcd65Smrg#
1019e7bcd65Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
1029e7bcd65Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
1039e7bcd65Smrg# configured tree to be moved without reconfiguration.
1041477040fSmrg
1059e7bcd65SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1069e7bcd65Smrg[dnl Rely on autoconf to set up CDPATH properly.
1079e7bcd65SmrgAC_PREREQ([2.50])dnl
1089e7bcd65Smrg# expand $ac_aux_dir to an absolute path
1099e7bcd65Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
1109e7bcd65Smrg])
111444c061aSmrg
1129e7bcd65Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
113444c061aSmrg
1149e7bcd65Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc.
1159e7bcd65Smrg#
1169e7bcd65Smrg# This file is free software; the Free Software Foundation
1179e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
1189e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
119444c061aSmrg
1209e7bcd65Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1219e7bcd65Smrg# -------------------------------------
1229e7bcd65Smrg# Define a conditional.
1239e7bcd65SmrgAC_DEFUN([AM_CONDITIONAL],
1249e7bcd65Smrg[AC_PREREQ([2.52])dnl
1259e7bcd65Smrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1269e7bcd65Smrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1279e7bcd65SmrgAC_SUBST([$1_TRUE])dnl
1289e7bcd65SmrgAC_SUBST([$1_FALSE])dnl
1299e7bcd65Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1309e7bcd65Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1319e7bcd65Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1329e7bcd65Smrgif $2; then
1339e7bcd65Smrg  $1_TRUE=
1349e7bcd65Smrg  $1_FALSE='#'
1359e7bcd65Smrgelse
1369e7bcd65Smrg  $1_TRUE='#'
1379e7bcd65Smrg  $1_FALSE=
1389e7bcd65Smrgfi
1399e7bcd65SmrgAC_CONFIG_COMMANDS_PRE(
1409e7bcd65Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1419e7bcd65Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1429e7bcd65SmrgUsually this means the macro was only invoked conditionally.]])
1439e7bcd65Smrgfi])])
144444c061aSmrg
1459e7bcd65Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc.
1469e7bcd65Smrg#
1479e7bcd65Smrg# This file is free software; the Free Software Foundation
1489e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
1499e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
150444c061aSmrg
151444c061aSmrg
1529e7bcd65Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1539e7bcd65Smrg# written in clear, in which case automake, when reading aclocal.m4,
1549e7bcd65Smrg# will think it sees a *use*, and therefore will trigger all it's
1559e7bcd65Smrg# C support machinery.  Also note that it means that autoscan, seeing
1569e7bcd65Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1572265a131Smrg
1581477040fSmrg
1599e7bcd65Smrg# _AM_DEPENDENCIES(NAME)
1609e7bcd65Smrg# ----------------------
1619e7bcd65Smrg# See how the compiler implements dependency checking.
1629e7bcd65Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1639e7bcd65Smrg# We try a few techniques and use that to set a single cache variable.
1649e7bcd65Smrg#
1659e7bcd65Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1669e7bcd65Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1679e7bcd65Smrg# dependency, and given that the user is not expected to run this macro,
1689e7bcd65Smrg# just rely on AC_PROG_CC.
1699e7bcd65SmrgAC_DEFUN([_AM_DEPENDENCIES],
1709e7bcd65Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1719e7bcd65SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1729e7bcd65SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1739e7bcd65SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1741477040fSmrg
1759e7bcd65Smrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1769e7bcd65Smrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1779e7bcd65Smrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1789e7bcd65Smrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1799e7bcd65Smrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1809e7bcd65Smrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1819e7bcd65Smrg                    [depcc="$$1"   am_compiler_list=])
1821477040fSmrg
1839e7bcd65SmrgAC_CACHE_CHECK([dependency style of $depcc],
1849e7bcd65Smrg               [am_cv_$1_dependencies_compiler_type],
1859e7bcd65Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1869e7bcd65Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
1879e7bcd65Smrg  # making bogus files that we don't know about and never remove.  For
1889e7bcd65Smrg  # instance it was reported that on HP-UX the gcc test will end up
1899e7bcd65Smrg  # making a dummy file named 'D' -- because '-MD' means "put the output
1909e7bcd65Smrg  # in D".
1919e7bcd65Smrg  rm -rf conftest.dir
1929e7bcd65Smrg  mkdir conftest.dir
1939e7bcd65Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1949e7bcd65Smrg  # using a relative directory.
1959e7bcd65Smrg  cp "$am_depcomp" conftest.dir
1969e7bcd65Smrg  cd conftest.dir
1979e7bcd65Smrg  # We will build objects and dependencies in a subdirectory because
1989e7bcd65Smrg  # it helps to detect inapplicable dependency modes.  For instance
1999e7bcd65Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
2009e7bcd65Smrg  # side effect of compilation, but ICC will put the dependencies in
2019e7bcd65Smrg  # the current directory while Tru64 will put them in the object
2029e7bcd65Smrg  # directory.
2039e7bcd65Smrg  mkdir sub
2041477040fSmrg
2059e7bcd65Smrg  am_cv_$1_dependencies_compiler_type=none
2069e7bcd65Smrg  if test "$am_compiler_list" = ""; then
2079e7bcd65Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2089e7bcd65Smrg  fi
2099e7bcd65Smrg  am__universal=false
2109e7bcd65Smrg  m4_case([$1], [CC],
2119e7bcd65Smrg    [case " $depcc " in #(
2129e7bcd65Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2139e7bcd65Smrg     esac],
2149e7bcd65Smrg    [CXX],
2159e7bcd65Smrg    [case " $depcc " in #(
2169e7bcd65Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2179e7bcd65Smrg     esac])
2181477040fSmrg
2199e7bcd65Smrg  for depmode in $am_compiler_list; do
2209e7bcd65Smrg    # Setup a source with many dependencies, because some compilers
2219e7bcd65Smrg    # like to wrap large dependency lists on column 80 (with \), and
2229e7bcd65Smrg    # we should not choose a depcomp mode which is confused by this.
2239e7bcd65Smrg    #
2249e7bcd65Smrg    # We need to recreate these files for each test, as the compiler may
2259e7bcd65Smrg    # overwrite some of them when testing with obscure command lines.
2269e7bcd65Smrg    # This happens at least with the AIX C compiler.
2279e7bcd65Smrg    : > sub/conftest.c
2289e7bcd65Smrg    for i in 1 2 3 4 5 6; do
2299e7bcd65Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2309e7bcd65Smrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
2319e7bcd65Smrg      # Solaris 10 /bin/sh.
2329e7bcd65Smrg      echo '/* dummy */' > sub/conftst$i.h
2339e7bcd65Smrg    done
2349e7bcd65Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2351477040fSmrg
2369e7bcd65Smrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
2379e7bcd65Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2389e7bcd65Smrg    # handle '-M -o', and we need to detect this.  Also, some Intel
2399e7bcd65Smrg    # versions had trouble with output in subdirs.
2409e7bcd65Smrg    am__obj=sub/conftest.${OBJEXT-o}
2419e7bcd65Smrg    am__minus_obj="-o $am__obj"
2429e7bcd65Smrg    case $depmode in
2439e7bcd65Smrg    gcc)
2449e7bcd65Smrg      # This depmode causes a compiler race in universal mode.
2459e7bcd65Smrg      test "$am__universal" = false || continue
2469e7bcd65Smrg      ;;
2479e7bcd65Smrg    nosideeffect)
2489e7bcd65Smrg      # After this tag, mechanisms are not by side-effect, so they'll
2499e7bcd65Smrg      # only be used when explicitly requested.
2509e7bcd65Smrg      if test "x$enable_dependency_tracking" = xyes; then
2519e7bcd65Smrg	continue
2529e7bcd65Smrg      else
2539e7bcd65Smrg	break
2549e7bcd65Smrg      fi
2559e7bcd65Smrg      ;;
2569e7bcd65Smrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
2579e7bcd65Smrg      # This compiler won't grok '-c -o', but also, the minuso test has
2589e7bcd65Smrg      # not run yet.  These depmodes are late enough in the game, and
2599e7bcd65Smrg      # so weak that their functioning should not be impacted.
2609e7bcd65Smrg      am__obj=conftest.${OBJEXT-o}
2619e7bcd65Smrg      am__minus_obj=
2629e7bcd65Smrg      ;;
2639e7bcd65Smrg    none) break ;;
2649e7bcd65Smrg    esac
2659e7bcd65Smrg    if depmode=$depmode \
2669e7bcd65Smrg       source=sub/conftest.c object=$am__obj \
2679e7bcd65Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2689e7bcd65Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2699e7bcd65Smrg         >/dev/null 2>conftest.err &&
2709e7bcd65Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2719e7bcd65Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2729e7bcd65Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2739e7bcd65Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2749e7bcd65Smrg      # icc doesn't choke on unknown options, it will just issue warnings
2759e7bcd65Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
2769e7bcd65Smrg      # that says an option was ignored or not supported.
2779e7bcd65Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2789e7bcd65Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2799e7bcd65Smrg      # The diagnosis changed in icc 8.0:
2809e7bcd65Smrg      #   icc: Command line remark: option '-MP' not supported
2819e7bcd65Smrg      if (grep 'ignoring option' conftest.err ||
2829e7bcd65Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2839e7bcd65Smrg        am_cv_$1_dependencies_compiler_type=$depmode
2849e7bcd65Smrg        break
2859e7bcd65Smrg      fi
2869e7bcd65Smrg    fi
2879e7bcd65Smrg  done
2881477040fSmrg
2899e7bcd65Smrg  cd ..
2909e7bcd65Smrg  rm -rf conftest.dir
291bdf0f55dSmrgelse
2929e7bcd65Smrg  am_cv_$1_dependencies_compiler_type=none
293bdf0f55dSmrgfi
2949e7bcd65Smrg])
2959e7bcd65SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2969e7bcd65SmrgAM_CONDITIONAL([am__fastdep$1], [
2979e7bcd65Smrg  test "x$enable_dependency_tracking" != xno \
2989e7bcd65Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2999e7bcd65Smrg])
3001477040fSmrg
3011477040fSmrg
3029e7bcd65Smrg# AM_SET_DEPDIR
3039e7bcd65Smrg# -------------
3049e7bcd65Smrg# Choose a directory name for dependency files.
3059e7bcd65Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3069e7bcd65SmrgAC_DEFUN([AM_SET_DEPDIR],
3079e7bcd65Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3089e7bcd65SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3099e7bcd65Smrg])
3101477040fSmrg
3111477040fSmrg
3129e7bcd65Smrg# AM_DEP_TRACK
3139e7bcd65Smrg# ------------
3149e7bcd65SmrgAC_DEFUN([AM_DEP_TRACK],
3159e7bcd65Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl
3169e7bcd65SmrgAS_HELP_STRING(
3179e7bcd65Smrg  [--enable-dependency-tracking],
3189e7bcd65Smrg  [do not reject slow dependency extractors])
3199e7bcd65SmrgAS_HELP_STRING(
3209e7bcd65Smrg  [--disable-dependency-tracking],
3219e7bcd65Smrg  [speeds up one-time build])])
3229e7bcd65Smrgif test "x$enable_dependency_tracking" != xno; then
3239e7bcd65Smrg  am_depcomp="$ac_aux_dir/depcomp"
3249e7bcd65Smrg  AMDEPBACKSLASH='\'
3259e7bcd65Smrg  am__nodep='_no'
326bdf0f55dSmrgfi
3279e7bcd65SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3289e7bcd65SmrgAC_SUBST([AMDEPBACKSLASH])dnl
3299e7bcd65Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3309e7bcd65SmrgAC_SUBST([am__nodep])dnl
3319e7bcd65Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl
3329e7bcd65Smrg])
3331477040fSmrg
3349e7bcd65Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
3351477040fSmrg
3369e7bcd65Smrg# Copyright (C) 1999-2013 Free Software Foundation, Inc.
3379e7bcd65Smrg#
3389e7bcd65Smrg# This file is free software; the Free Software Foundation
3399e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
3409e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
3411477040fSmrg
3421477040fSmrg
3439e7bcd65Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3449e7bcd65Smrg# ------------------------------
3459e7bcd65SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3469e7bcd65Smrg[{
3479e7bcd65Smrg  # Older Autoconf quotes --file arguments for eval, but not when files
3489e7bcd65Smrg  # are listed without --file.  Let's play safe and only enable the eval
3499e7bcd65Smrg  # if we detect the quoting.
3509e7bcd65Smrg  case $CONFIG_FILES in
3519e7bcd65Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
3529e7bcd65Smrg  *)   set x $CONFIG_FILES ;;
3539e7bcd65Smrg  esac
3549e7bcd65Smrg  shift
3559e7bcd65Smrg  for mf
3569e7bcd65Smrg  do
3579e7bcd65Smrg    # Strip MF so we end up with the name of the file.
3589e7bcd65Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
3599e7bcd65Smrg    # Check whether this is an Automake generated Makefile or not.
3609e7bcd65Smrg    # We used to match only the files named 'Makefile.in', but
3619e7bcd65Smrg    # some people rename them; so instead we look at the file content.
3629e7bcd65Smrg    # Grep'ing the first line is not enough: some people post-process
3639e7bcd65Smrg    # each Makefile.in and add a new line on top of each file to say so.
3649e7bcd65Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
3659e7bcd65Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
3669e7bcd65Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3679e7bcd65Smrg      dirpart=`AS_DIRNAME("$mf")`
3689e7bcd65Smrg    else
3699e7bcd65Smrg      continue
3709e7bcd65Smrg    fi
3719e7bcd65Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
3729e7bcd65Smrg    # from the Makefile without running 'make'.
3739e7bcd65Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3749e7bcd65Smrg    test -z "$DEPDIR" && continue
3759e7bcd65Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
3769e7bcd65Smrg    test -z "$am__include" && continue
3779e7bcd65Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3789e7bcd65Smrg    # Find all dependency output files, they are included files with
3799e7bcd65Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
3809e7bcd65Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
3819e7bcd65Smrg    # expansion.
3829e7bcd65Smrg    for file in `sed -n "
3839e7bcd65Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3849e7bcd65Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
3859e7bcd65Smrg      # Make sure the directory exists.
3869e7bcd65Smrg      test -f "$dirpart/$file" && continue
3879e7bcd65Smrg      fdir=`AS_DIRNAME(["$file"])`
3889e7bcd65Smrg      AS_MKDIR_P([$dirpart/$fdir])
3899e7bcd65Smrg      # echo "creating $dirpart/$file"
3909e7bcd65Smrg      echo '# dummy' > "$dirpart/$file"
3919e7bcd65Smrg    done
3929e7bcd65Smrg  done
3939e7bcd65Smrg}
3949e7bcd65Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3951477040fSmrg
3961477040fSmrg
3979e7bcd65Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3989e7bcd65Smrg# -----------------------------
3999e7bcd65Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
400bdf0f55dSmrg#
4019e7bcd65Smrg# This code is only required when automatic dependency tracking
4029e7bcd65Smrg# is enabled.  FIXME.  This creates each '.P' file that we will
4039e7bcd65Smrg# need in order to bootstrap the dependency handling code.
4049e7bcd65SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4059e7bcd65Smrg[AC_CONFIG_COMMANDS([depfiles],
4069e7bcd65Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4079e7bcd65Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
4089e7bcd65Smrg])
4091477040fSmrg
4109e7bcd65Smrg# Do all the work for Automake.                             -*- Autoconf -*-
411bdf0f55dSmrg
4129e7bcd65Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc.
413249c3046Smrg#
4149e7bcd65Smrg# This file is free software; the Free Software Foundation
4159e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
4169e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
4172265a131Smrg
4189e7bcd65Smrg# This macro actually does too much.  Some checks are only needed if
4199e7bcd65Smrg# your package does certain things.  But this isn't really a big deal.
4202265a131Smrg
4219e7bcd65Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4229e7bcd65Smrg# AM_INIT_AUTOMAKE([OPTIONS])
4239e7bcd65Smrg# -----------------------------------------------
4249e7bcd65Smrg# The call with PACKAGE and VERSION arguments is the old style
4259e7bcd65Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4269e7bcd65Smrg# and VERSION should now be passed to AC_INIT and removed from
4279e7bcd65Smrg# the call to AM_INIT_AUTOMAKE.
4289e7bcd65Smrg# We support both call styles for the transition.  After
4299e7bcd65Smrg# the next Automake release, Autoconf can make the AC_INIT
4309e7bcd65Smrg# arguments mandatory, and then we can depend on a new Autoconf
4319e7bcd65Smrg# release and drop the old call support.
4329e7bcd65SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4339e7bcd65Smrg[AC_PREREQ([2.65])dnl
4349e7bcd65Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4359e7bcd65Smrgdnl the ones we care about.
4369e7bcd65Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4379e7bcd65SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4389e7bcd65SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4399e7bcd65Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4409e7bcd65Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4419e7bcd65Smrg  # is not polluted with repeated "-I."
4429e7bcd65Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4439e7bcd65Smrg  # test to see if srcdir already configured
4449e7bcd65Smrg  if test -f $srcdir/config.status; then
4459e7bcd65Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4469e7bcd65Smrg  fi
447249c3046Smrgfi
4481477040fSmrg
4499e7bcd65Smrg# test whether we have cygpath
4509e7bcd65Smrgif test -z "$CYGPATH_W"; then
4519e7bcd65Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4529e7bcd65Smrg    CYGPATH_W='cygpath -w'
4539e7bcd65Smrg  else
4549e7bcd65Smrg    CYGPATH_W=echo
4559e7bcd65Smrg  fi
4569e7bcd65Smrgfi
4579e7bcd65SmrgAC_SUBST([CYGPATH_W])
458bdf0f55dSmrg
4599e7bcd65Smrg# Define the identity of the package.
4609e7bcd65Smrgdnl Distinguish between old-style and new-style calls.
4619e7bcd65Smrgm4_ifval([$2],
4629e7bcd65Smrg[AC_DIAGNOSE([obsolete],
4639e7bcd65Smrg             [$0: two- and three-arguments forms are deprecated.])
4649e7bcd65Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4659e7bcd65Smrg AC_SUBST([PACKAGE], [$1])dnl
4669e7bcd65Smrg AC_SUBST([VERSION], [$2])],
4679e7bcd65Smrg[_AM_SET_OPTIONS([$1])dnl
4689e7bcd65Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4699e7bcd65Smrgm4_if(
4709e7bcd65Smrg  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
4719e7bcd65Smrg  [ok:ok],,
4729e7bcd65Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4739e7bcd65Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4749e7bcd65Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
475bdf0f55dSmrg
4769e7bcd65Smrg_AM_IF_OPTION([no-define],,
4779e7bcd65Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
4789e7bcd65Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
479bdf0f55dSmrg
4809e7bcd65Smrg# Some tools Automake needs.
4819e7bcd65SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4829e7bcd65SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
4839e7bcd65SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
4849e7bcd65SmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
4859e7bcd65SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
4869e7bcd65SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
4879e7bcd65SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
4889e7bcd65SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4899e7bcd65SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
4909e7bcd65SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
4919e7bcd65Smrg# For better backward compatibility.  To be removed once Automake 1.9.x
4929e7bcd65Smrg# dies out for good.  For more background, see:
4939e7bcd65Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4949e7bcd65Smrg# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4959e7bcd65SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
4969e7bcd65Smrg# We need awk for the "check" target.  The system "awk" is bad on
4979e7bcd65Smrg# some platforms.
4989e7bcd65SmrgAC_REQUIRE([AC_PROG_AWK])dnl
4999e7bcd65SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5009e7bcd65SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5019e7bcd65Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5029e7bcd65Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5039e7bcd65Smrg			     [_AM_PROG_TAR([v7])])])
5049e7bcd65Smrg_AM_IF_OPTION([no-dependencies],,
5059e7bcd65Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
5069e7bcd65Smrg		  [_AM_DEPENDENCIES([CC])],
5079e7bcd65Smrg		  [m4_define([AC_PROG_CC],
5089e7bcd65Smrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
5099e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5109e7bcd65Smrg		  [_AM_DEPENDENCIES([CXX])],
5119e7bcd65Smrg		  [m4_define([AC_PROG_CXX],
5129e7bcd65Smrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
5139e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5149e7bcd65Smrg		  [_AM_DEPENDENCIES([OBJC])],
5159e7bcd65Smrg		  [m4_define([AC_PROG_OBJC],
5169e7bcd65Smrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
5179e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
5189e7bcd65Smrg		  [_AM_DEPENDENCIES([OBJCXX])],
5199e7bcd65Smrg		  [m4_define([AC_PROG_OBJCXX],
5209e7bcd65Smrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
5219e7bcd65Smrg])
5229e7bcd65SmrgAC_REQUIRE([AM_SILENT_RULES])dnl
5239e7bcd65Smrgdnl The testsuite driver may need to know about EXEEXT, so add the
5249e7bcd65Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
5259e7bcd65Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
5269e7bcd65SmrgAC_CONFIG_COMMANDS_PRE(dnl
5279e7bcd65Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5289e7bcd65Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5299e7bcd65Smrg])
5301477040fSmrg
5319e7bcd65Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5329e7bcd65Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5339e7bcd65Smrgdnl mangled by Autoconf and run in a shell conditional statement.
5349e7bcd65Smrgm4_define([_AC_COMPILER_EXEEXT],
5359e7bcd65Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5361477040fSmrg
5371477040fSmrg
5389e7bcd65Smrg# When config.status generates a header, we must update the stamp-h file.
5399e7bcd65Smrg# This file resides in the same directory as the config header
5409e7bcd65Smrg# that is generated.  The stamp files are numbered to have different names.
5411477040fSmrg
5429e7bcd65Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
5439e7bcd65Smrg# loop where config.status creates the headers, so we can generate
5449e7bcd65Smrg# our stamp files there.
5459e7bcd65SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
5469e7bcd65Smrg[# Compute $1's index in $config_headers.
5479e7bcd65Smrg_am_arg=$1
5489e7bcd65Smrg_am_stamp_count=1
5499e7bcd65Smrgfor _am_header in $config_headers :; do
5509e7bcd65Smrg  case $_am_header in
5519e7bcd65Smrg    $_am_arg | $_am_arg:* )
5529e7bcd65Smrg      break ;;
5539e7bcd65Smrg    * )
5549e7bcd65Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
5559e7bcd65Smrg  esac
5569e7bcd65Smrgdone
5579e7bcd65Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
5581477040fSmrg
5599e7bcd65Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
560249c3046Smrg#
5619e7bcd65Smrg# This file is free software; the Free Software Foundation
5629e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
5639e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
5641477040fSmrg
5659e7bcd65Smrg# AM_PROG_INSTALL_SH
5669e7bcd65Smrg# ------------------
5679e7bcd65Smrg# Define $install_sh.
5689e7bcd65SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
5699e7bcd65Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5709e7bcd65Smrgif test x"${install_sh}" != xset; then
5719e7bcd65Smrg  case $am_aux_dir in
5729e7bcd65Smrg  *\ * | *\	*)
5739e7bcd65Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5749e7bcd65Smrg  *)
5759e7bcd65Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
5769e7bcd65Smrg  esac
5779e7bcd65Smrgfi
5789e7bcd65SmrgAC_SUBST([install_sh])])
5792265a131Smrg
5809e7bcd65Smrg# Copyright (C) 2003-2013 Free Software Foundation, Inc.
5819e7bcd65Smrg#
5829e7bcd65Smrg# This file is free software; the Free Software Foundation
5839e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
5849e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
5852265a131Smrg
5869e7bcd65Smrg# Check whether the underlying file-system supports filenames
5879e7bcd65Smrg# with a leading dot.  For instance MS-DOS doesn't.
5889e7bcd65SmrgAC_DEFUN([AM_SET_LEADING_DOT],
5899e7bcd65Smrg[rm -rf .tst 2>/dev/null
5909e7bcd65Smrgmkdir .tst 2>/dev/null
5919e7bcd65Smrgif test -d .tst; then
5929e7bcd65Smrg  am__leading_dot=.
5939e7bcd65Smrgelse
5949e7bcd65Smrg  am__leading_dot=_
595249c3046Smrgfi
5969e7bcd65Smrgrmdir .tst 2>/dev/null
5979e7bcd65SmrgAC_SUBST([am__leading_dot])])
5982265a131Smrg
5999e7bcd65Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6002265a131Smrg
6019e7bcd65Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
6029e7bcd65Smrg#
6039e7bcd65Smrg# This file is free software; the Free Software Foundation
6049e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
6059e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
6062265a131Smrg
6079e7bcd65Smrg# AM_MAKE_INCLUDE()
6089e7bcd65Smrg# -----------------
6099e7bcd65Smrg# Check to see how make treats includes.
6109e7bcd65SmrgAC_DEFUN([AM_MAKE_INCLUDE],
6119e7bcd65Smrg[am_make=${MAKE-make}
6129e7bcd65Smrgcat > confinc << 'END'
6139e7bcd65Smrgam__doit:
6149e7bcd65Smrg	@echo this is the am__doit target
6159e7bcd65Smrg.PHONY: am__doit
6169e7bcd65SmrgEND
6179e7bcd65Smrg# If we don't find an include directive, just comment out the code.
6189e7bcd65SmrgAC_MSG_CHECKING([for style of include used by $am_make])
6199e7bcd65Smrgam__include="#"
6209e7bcd65Smrgam__quote=
6219e7bcd65Smrg_am_result=none
6229e7bcd65Smrg# First try GNU make style include.
6239e7bcd65Smrgecho "include confinc" > confmf
6249e7bcd65Smrg# Ignore all kinds of additional output from 'make'.
6259e7bcd65Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
6269e7bcd65Smrg*the\ am__doit\ target*)
6279e7bcd65Smrg  am__include=include
6289e7bcd65Smrg  am__quote=
6299e7bcd65Smrg  _am_result=GNU
6309e7bcd65Smrg  ;;
6319e7bcd65Smrgesac
6329e7bcd65Smrg# Now try BSD make style include.
6339e7bcd65Smrgif test "$am__include" = "#"; then
6349e7bcd65Smrg   echo '.include "confinc"' > confmf
6359e7bcd65Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
6369e7bcd65Smrg   *the\ am__doit\ target*)
6379e7bcd65Smrg     am__include=.include
6389e7bcd65Smrg     am__quote="\""
6399e7bcd65Smrg     _am_result=BSD
6409e7bcd65Smrg     ;;
6419e7bcd65Smrg   esac
642bdf0f55dSmrgfi
6439e7bcd65SmrgAC_SUBST([am__include])
6449e7bcd65SmrgAC_SUBST([am__quote])
6459e7bcd65SmrgAC_MSG_RESULT([$_am_result])
6469e7bcd65Smrgrm -f confinc confmf
6479e7bcd65Smrg])
6481477040fSmrg
6499e7bcd65Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
650444c061aSmrg
6519e7bcd65Smrg# Copyright (C) 1997-2013 Free Software Foundation, Inc.
652bdf0f55dSmrg#
6539e7bcd65Smrg# This file is free software; the Free Software Foundation
6549e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
6559e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
656444c061aSmrg
6579e7bcd65Smrg# AM_MISSING_PROG(NAME, PROGRAM)
6589e7bcd65Smrg# ------------------------------
6599e7bcd65SmrgAC_DEFUN([AM_MISSING_PROG],
6609e7bcd65Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
6619e7bcd65Smrg$1=${$1-"${am_missing_run}$2"}
6629e7bcd65SmrgAC_SUBST($1)])
6639e7bcd65Smrg
6649e7bcd65Smrg# AM_MISSING_HAS_RUN
6659e7bcd65Smrg# ------------------
6669e7bcd65Smrg# Define MISSING if not defined so far and test if it is modern enough.
6679e7bcd65Smrg# If it is, set am_missing_run to use it, otherwise, to nothing.
6689e7bcd65SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
6699e7bcd65Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6709e7bcd65SmrgAC_REQUIRE_AUX_FILE([missing])dnl
6719e7bcd65Smrgif test x"${MISSING+set}" != xset; then
6729e7bcd65Smrg  case $am_aux_dir in
6739e7bcd65Smrg  *\ * | *\	*)
6749e7bcd65Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
6759e7bcd65Smrg  *)
6769e7bcd65Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
6779e7bcd65Smrg  esac
6789e7bcd65Smrgfi
6799e7bcd65Smrg# Use eval to expand $SHELL
6809e7bcd65Smrgif eval "$MISSING --is-lightweight"; then
6819e7bcd65Smrg  am_missing_run="$MISSING "
682bdf0f55dSmrgelse
6839e7bcd65Smrg  am_missing_run=
6849e7bcd65Smrg  AC_MSG_WARN(['missing' script is too old or missing])
685249c3046Smrgfi
6869e7bcd65Smrg])
687444c061aSmrg
6889e7bcd65Smrg# Helper functions for option handling.                     -*- Autoconf -*-
689444c061aSmrg
6909e7bcd65Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
691bdf0f55dSmrg#
6929e7bcd65Smrg# This file is free software; the Free Software Foundation
6939e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
6949e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
6951477040fSmrg
6969e7bcd65Smrg# _AM_MANGLE_OPTION(NAME)
6979e7bcd65Smrg# -----------------------
6989e7bcd65SmrgAC_DEFUN([_AM_MANGLE_OPTION],
6999e7bcd65Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7009e7bcd65Smrg
7019e7bcd65Smrg# _AM_SET_OPTION(NAME)
7029e7bcd65Smrg# --------------------
7039e7bcd65Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7049e7bcd65SmrgAC_DEFUN([_AM_SET_OPTION],
7059e7bcd65Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
7069e7bcd65Smrg
7079e7bcd65Smrg# _AM_SET_OPTIONS(OPTIONS)
7089e7bcd65Smrg# ------------------------
7099e7bcd65Smrg# OPTIONS is a space-separated list of Automake options.
7109e7bcd65SmrgAC_DEFUN([_AM_SET_OPTIONS],
7119e7bcd65Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7129e7bcd65Smrg
7139e7bcd65Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7149e7bcd65Smrg# -------------------------------------------
7159e7bcd65Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7169e7bcd65SmrgAC_DEFUN([_AM_IF_OPTION],
7179e7bcd65Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7189e7bcd65Smrg
7199e7bcd65Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7209e7bcd65Smrg
7219e7bcd65Smrg# Copyright (C) 1996-2013 Free Software Foundation, Inc.
7229e7bcd65Smrg#
7239e7bcd65Smrg# This file is free software; the Free Software Foundation
7249e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
7259e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
7269e7bcd65Smrg
7279e7bcd65Smrg# AM_SANITY_CHECK
7289e7bcd65Smrg# ---------------
7299e7bcd65SmrgAC_DEFUN([AM_SANITY_CHECK],
7309e7bcd65Smrg[AC_MSG_CHECKING([whether build environment is sane])
7319e7bcd65Smrg# Reject unsafe characters in $srcdir or the absolute working directory
7329e7bcd65Smrg# name.  Accept space and tab only in the latter.
7339e7bcd65Smrgam_lf='
7349e7bcd65Smrg'
7359e7bcd65Smrgcase `pwd` in
7369e7bcd65Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
7379e7bcd65Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
7389e7bcd65Smrgesac
7399e7bcd65Smrgcase $srcdir in
7409e7bcd65Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
7419e7bcd65Smrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
7429e7bcd65Smrgesac
7439e7bcd65Smrg
7449e7bcd65Smrg# Do 'set' in a subshell so we don't clobber the current shell's
7459e7bcd65Smrg# arguments.  Must try -L first in case configure is actually a
7469e7bcd65Smrg# symlink; some systems play weird games with the mod time of symlinks
7479e7bcd65Smrg# (eg FreeBSD returns the mod time of the symlink's containing
7489e7bcd65Smrg# directory).
7499e7bcd65Smrgif (
7509e7bcd65Smrg   am_has_slept=no
7519e7bcd65Smrg   for am_try in 1 2; do
7529e7bcd65Smrg     echo "timestamp, slept: $am_has_slept" > conftest.file
7539e7bcd65Smrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
7549e7bcd65Smrg     if test "$[*]" = "X"; then
7559e7bcd65Smrg	# -L didn't work.
7569e7bcd65Smrg	set X `ls -t "$srcdir/configure" conftest.file`
7579e7bcd65Smrg     fi
7589e7bcd65Smrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
7599e7bcd65Smrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
7609e7bcd65Smrg
7619e7bcd65Smrg	# If neither matched, then we have a broken ls.  This can happen
7629e7bcd65Smrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
7639e7bcd65Smrg	# broken ls alias from the environment.  This has actually
7649e7bcd65Smrg	# happened.  Such a system could not be considered "sane".
7659e7bcd65Smrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7669e7bcd65Smrg  alias in your environment])
7679e7bcd65Smrg     fi
7689e7bcd65Smrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
7699e7bcd65Smrg       break
7709e7bcd65Smrg     fi
7719e7bcd65Smrg     # Just in case.
7729e7bcd65Smrg     sleep 1
7739e7bcd65Smrg     am_has_slept=yes
7749e7bcd65Smrg   done
7759e7bcd65Smrg   test "$[2]" = conftest.file
7769e7bcd65Smrg   )
7779e7bcd65Smrgthen
7789e7bcd65Smrg   # Ok.
7799e7bcd65Smrg   :
780249c3046Smrgelse
7819e7bcd65Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
7829e7bcd65SmrgCheck your system clock])
783249c3046Smrgfi
7849e7bcd65SmrgAC_MSG_RESULT([yes])
7859e7bcd65Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and
7869e7bcd65Smrg# generated files are strictly newer.
7879e7bcd65Smrgam_sleep_pid=
7889e7bcd65Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
7899e7bcd65Smrg  ( sleep 1 ) &
7909e7bcd65Smrg  am_sleep_pid=$!
7919e7bcd65Smrgfi
7929e7bcd65SmrgAC_CONFIG_COMMANDS_PRE(
7939e7bcd65Smrg  [AC_MSG_CHECKING([that generated files are newer than configure])
7949e7bcd65Smrg   if test -n "$am_sleep_pid"; then
7959e7bcd65Smrg     # Hide warnings about reused PIDs.
7969e7bcd65Smrg     wait $am_sleep_pid 2>/dev/null
7979e7bcd65Smrg   fi
7989e7bcd65Smrg   AC_MSG_RESULT([done])])
7999e7bcd65Smrgrm -f conftest.file
8009e7bcd65Smrg])
8019e7bcd65Smrg
8029e7bcd65Smrg# Copyright (C) 2009-2013 Free Software Foundation, Inc.
8039e7bcd65Smrg#
8049e7bcd65Smrg# This file is free software; the Free Software Foundation
8059e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
8069e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
8079e7bcd65Smrg
8089e7bcd65Smrg# AM_SILENT_RULES([DEFAULT])
8099e7bcd65Smrg# --------------------------
8109e7bcd65Smrg# Enable less verbose build rules; with the default set to DEFAULT
8119e7bcd65Smrg# ("yes" being less verbose, "no" or empty being verbose).
8129e7bcd65SmrgAC_DEFUN([AM_SILENT_RULES],
8139e7bcd65Smrg[AC_ARG_ENABLE([silent-rules], [dnl
8149e7bcd65SmrgAS_HELP_STRING(
8159e7bcd65Smrg  [--enable-silent-rules],
8169e7bcd65Smrg  [less verbose build output (undo: "make V=1")])
8179e7bcd65SmrgAS_HELP_STRING(
8189e7bcd65Smrg  [--disable-silent-rules],
8199e7bcd65Smrg  [verbose build output (undo: "make V=0")])dnl
8209e7bcd65Smrg])
8219e7bcd65Smrgcase $enable_silent_rules in @%:@ (((
8229e7bcd65Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
8239e7bcd65Smrg   no) AM_DEFAULT_VERBOSITY=1;;
8249e7bcd65Smrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8259e7bcd65Smrgesac
8269e7bcd65Smrgdnl
8279e7bcd65Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
8289e7bcd65Smrgdnl do not support nested variable expansions.
8299e7bcd65Smrgdnl See automake bug#9928 and bug#10237.
8309e7bcd65Smrgam_make=${MAKE-make}
8319e7bcd65SmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
8329e7bcd65Smrg   [am_cv_make_support_nested_variables],
8339e7bcd65Smrg   [if AS_ECHO([['TRUE=$(BAR$(V))
8349e7bcd65SmrgBAR0=false
8359e7bcd65SmrgBAR1=true
8369e7bcd65SmrgV=1
8379e7bcd65Smrgam__doit:
8389e7bcd65Smrg	@$(TRUE)
8399e7bcd65Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
8409e7bcd65Smrg  am_cv_make_support_nested_variables=yes
8419e7bcd65Smrgelse
8429e7bcd65Smrg  am_cv_make_support_nested_variables=no
843bdf0f55dSmrgfi])
8449e7bcd65Smrgif test $am_cv_make_support_nested_variables = yes; then
8459e7bcd65Smrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
8469e7bcd65Smrg  AM_V='$(V)'
8479e7bcd65Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
8489e7bcd65Smrgelse
8499e7bcd65Smrg  AM_V=$AM_DEFAULT_VERBOSITY
8509e7bcd65Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
8519e7bcd65Smrgfi
8529e7bcd65SmrgAC_SUBST([AM_V])dnl
8539e7bcd65SmrgAM_SUBST_NOTMAKE([AM_V])dnl
8549e7bcd65SmrgAC_SUBST([AM_DEFAULT_V])dnl
8559e7bcd65SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
8569e7bcd65SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8579e7bcd65SmrgAM_BACKSLASH='\'
8589e7bcd65SmrgAC_SUBST([AM_BACKSLASH])dnl
8599e7bcd65Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8609e7bcd65Smrg])
8612265a131Smrg
8629e7bcd65Smrg# Copyright (C) 2001-2013 Free Software Foundation, Inc.
863249c3046Smrg#
8649e7bcd65Smrg# This file is free software; the Free Software Foundation
8659e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
8669e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
8679e7bcd65Smrg
8689e7bcd65Smrg# AM_PROG_INSTALL_STRIP
8699e7bcd65Smrg# ---------------------
8709e7bcd65Smrg# One issue with vendor 'install' (even GNU) is that you can't
8719e7bcd65Smrg# specify the program used to strip binaries.  This is especially
8729e7bcd65Smrg# annoying in cross-compiling environments, where the build's strip
8739e7bcd65Smrg# is unlikely to handle the host's binaries.
8749e7bcd65Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
8759e7bcd65Smrg# always use install-sh in "make install-strip", and initialize
8769e7bcd65Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
8779e7bcd65SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
8789e7bcd65Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8799e7bcd65Smrg# Installed binaries are usually stripped using 'strip' when the user
8809e7bcd65Smrg# run "make install-strip".  However 'strip' might not be the right
8819e7bcd65Smrg# tool to use in cross-compilation environments, therefore Automake
8829e7bcd65Smrg# will honor the 'STRIP' environment variable to overrule this program.
8839e7bcd65Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
8849e7bcd65Smrgif test "$cross_compiling" != no; then
8859e7bcd65Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
8869e7bcd65Smrgfi
8879e7bcd65SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
8889e7bcd65SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
8899e7bcd65Smrg
8909e7bcd65Smrg# Copyright (C) 2006-2013 Free Software Foundation, Inc.
891249c3046Smrg#
8929e7bcd65Smrg# This file is free software; the Free Software Foundation
8939e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
8949e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
8959e7bcd65Smrg
8969e7bcd65Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
8979e7bcd65Smrg# ---------------------------
8989e7bcd65Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
8999e7bcd65Smrg# This macro is traced by Automake.
9009e7bcd65SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9019e7bcd65Smrg
9029e7bcd65Smrg# AM_SUBST_NOTMAKE(VARIABLE)
9039e7bcd65Smrg# --------------------------
9049e7bcd65Smrg# Public sister of _AM_SUBST_NOTMAKE.
9059e7bcd65SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9069e7bcd65Smrg
9079e7bcd65Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9089e7bcd65Smrg
9099e7bcd65Smrg# Copyright (C) 2004-2013 Free Software Foundation, Inc.
910249c3046Smrg#
9119e7bcd65Smrg# This file is free software; the Free Software Foundation
9129e7bcd65Smrg# gives unlimited permission to copy and/or distribute it,
9139e7bcd65Smrg# with or without modifications, as long as this notice is preserved.
9149e7bcd65Smrg
9159e7bcd65Smrg# _AM_PROG_TAR(FORMAT)
9169e7bcd65Smrg# --------------------
9179e7bcd65Smrg# Check how to create a tarball in format FORMAT.
9189e7bcd65Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
919bdf0f55dSmrg#
9209e7bcd65Smrg# Substitute a variable $(am__tar) that is a command
9219e7bcd65Smrg# writing to stdout a FORMAT-tarball containing the directory
9229e7bcd65Smrg# $tardir.
9239e7bcd65Smrg#     tardir=directory && $(am__tar) > result.tar
9249e7bcd65Smrg#
9259e7bcd65Smrg# Substitute a variable $(am__untar) that extract such
9269e7bcd65Smrg# a tarball read from stdin.
9279e7bcd65Smrg#     $(am__untar) < result.tar
9289e7bcd65Smrg#
9299e7bcd65SmrgAC_DEFUN([_AM_PROG_TAR],
9309e7bcd65Smrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
9319e7bcd65Smrg# in the wild :-(  We should find a proper way to deprecate it ...
9329e7bcd65SmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
9331477040fSmrg
9349e7bcd65Smrg# We'll loop over all known methods to create a tar archive until one works.
9359e7bcd65Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9361477040fSmrg
9379e7bcd65Smrgm4_if([$1], [v7],
9389e7bcd65Smrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
9399e7bcd65Smrg
9409e7bcd65Smrg  [m4_case([$1],
9419e7bcd65Smrg    [ustar],
9429e7bcd65Smrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
9439e7bcd65Smrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
9449e7bcd65Smrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
9459e7bcd65Smrg      # and bug#13588).
9469e7bcd65Smrg      am_max_uid=2097151 # 2^21 - 1
9479e7bcd65Smrg      am_max_gid=$am_max_uid
9489e7bcd65Smrg      # The $UID and $GID variables are not portable, so we need to resort
9499e7bcd65Smrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
9509e7bcd65Smrg      # below are definitely unexpected, so allow the users to see them
9519e7bcd65Smrg      # (that is, avoid stderr redirection).
9529e7bcd65Smrg      am_uid=`id -u || echo unknown`
9539e7bcd65Smrg      am_gid=`id -g || echo unknown`
9549e7bcd65Smrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
9559e7bcd65Smrg      if test $am_uid -le $am_max_uid; then
9569e7bcd65Smrg         AC_MSG_RESULT([yes])
9579e7bcd65Smrg      else
9589e7bcd65Smrg         AC_MSG_RESULT([no])
9599e7bcd65Smrg         _am_tools=none
9609e7bcd65Smrg      fi
9619e7bcd65Smrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
9629e7bcd65Smrg      if test $am_gid -le $am_max_gid; then
9639e7bcd65Smrg         AC_MSG_RESULT([yes])
9649e7bcd65Smrg      else
9659e7bcd65Smrg        AC_MSG_RESULT([no])
9669e7bcd65Smrg        _am_tools=none
9679e7bcd65Smrg      fi],
9689e7bcd65Smrg
9699e7bcd65Smrg  [pax],
9709e7bcd65Smrg    [],
9719e7bcd65Smrg
9729e7bcd65Smrg  [m4_fatal([Unknown tar format])])
9739e7bcd65Smrg
9749e7bcd65Smrg  AC_MSG_CHECKING([how to create a $1 tar archive])
9759e7bcd65Smrg
9769e7bcd65Smrg  # Go ahead even if we have the value already cached.  We do so because we
9779e7bcd65Smrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
9789e7bcd65Smrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
9799e7bcd65Smrg
9809e7bcd65Smrg  for _am_tool in $_am_tools; do
9819e7bcd65Smrg    case $_am_tool in
9829e7bcd65Smrg    gnutar)
9839e7bcd65Smrg      for _am_tar in tar gnutar gtar; do
9849e7bcd65Smrg        AM_RUN_LOG([$_am_tar --version]) && break
9859e7bcd65Smrg      done
9869e7bcd65Smrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9879e7bcd65Smrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9889e7bcd65Smrg      am__untar="$_am_tar -xf -"
9899e7bcd65Smrg      ;;
9909e7bcd65Smrg    plaintar)
9919e7bcd65Smrg      # Must skip GNU tar: if it does not support --format= it doesn't create
9929e7bcd65Smrg      # ustar tarball either.
9939e7bcd65Smrg      (tar --version) >/dev/null 2>&1 && continue
9949e7bcd65Smrg      am__tar='tar chf - "$$tardir"'
9959e7bcd65Smrg      am__tar_='tar chf - "$tardir"'
9969e7bcd65Smrg      am__untar='tar xf -'
9979e7bcd65Smrg      ;;
9989e7bcd65Smrg    pax)
9999e7bcd65Smrg      am__tar='pax -L -x $1 -w "$$tardir"'
10009e7bcd65Smrg      am__tar_='pax -L -x $1 -w "$tardir"'
10019e7bcd65Smrg      am__untar='pax -r'
10029e7bcd65Smrg      ;;
10039e7bcd65Smrg    cpio)
10049e7bcd65Smrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10059e7bcd65Smrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10069e7bcd65Smrg      am__untar='cpio -i -H $1 -d'
10079e7bcd65Smrg      ;;
10089e7bcd65Smrg    none)
10099e7bcd65Smrg      am__tar=false
10109e7bcd65Smrg      am__tar_=false
10119e7bcd65Smrg      am__untar=false
10129e7bcd65Smrg      ;;
10139e7bcd65Smrg    esac
10149e7bcd65Smrg
10159e7bcd65Smrg    # If the value was cached, stop now.  We just wanted to have am__tar
10169e7bcd65Smrg    # and am__untar set.
10179e7bcd65Smrg    test -n "${am_cv_prog_tar_$1}" && break
10189e7bcd65Smrg
10199e7bcd65Smrg    # tar/untar a dummy directory, and stop if the command works.
10209e7bcd65Smrg    rm -rf conftest.dir
10219e7bcd65Smrg    mkdir conftest.dir
10229e7bcd65Smrg    echo GrepMe > conftest.dir/file
10239e7bcd65Smrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10249e7bcd65Smrg    rm -rf conftest.dir
10259e7bcd65Smrg    if test -s conftest.tar; then
10269e7bcd65Smrg      AM_RUN_LOG([$am__untar <conftest.tar])
10279e7bcd65Smrg      AM_RUN_LOG([cat conftest.dir/file])
10289e7bcd65Smrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10299e7bcd65Smrg    fi
10309e7bcd65Smrg  done
10319e7bcd65Smrg  rm -rf conftest.dir
10329e7bcd65Smrg
10339e7bcd65Smrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10349e7bcd65Smrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
10359e7bcd65Smrg
10369e7bcd65SmrgAC_SUBST([am__tar])
10379e7bcd65SmrgAC_SUBST([am__untar])
10389e7bcd65Smrg]) # _AM_PROG_TAR
10399e7bcd65Smrg
10409e7bcd65Smrgm4_include([m4/ax_define_dir.m4])
10419e7bcd65Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1042249c3046Smrg#
10439e7bcd65Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
10449e7bcd65Smrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
10459e7bcd65Smrg#                 Foundation, Inc.
10469e7bcd65Smrg#   Written by Gordon Matzigkeit, 1996
1047249c3046Smrg#
10489e7bcd65Smrg# This file is free software; the Free Software Foundation gives
10499e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without
10509e7bcd65Smrg# modifications, as long as this notice is preserved.
10519e7bcd65Smrg
10529e7bcd65Smrgm4_define([_LT_COPYING], [dnl
10539e7bcd65Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
10549e7bcd65Smrg#                 2006, 2007, 2008, 2009, 2010, 2011 Free Software
10559e7bcd65Smrg#                 Foundation, Inc.
10569e7bcd65Smrg#   Written by Gordon Matzigkeit, 1996
1057249c3046Smrg#
10589e7bcd65Smrg#   This file is part of GNU Libtool.
1059bdf0f55dSmrg#
10609e7bcd65Smrg# GNU Libtool is free software; you can redistribute it and/or
10619e7bcd65Smrg# modify it under the terms of the GNU General Public License as
10629e7bcd65Smrg# published by the Free Software Foundation; either version 2 of
10639e7bcd65Smrg# the License, or (at your option) any later version.
1064bdf0f55dSmrg#
10659e7bcd65Smrg# As a special exception to the GNU General Public License,
10669e7bcd65Smrg# if you distribute this file as part of a program or library that
10679e7bcd65Smrg# is built using GNU Libtool, you may include this file under the
10689e7bcd65Smrg# same distribution terms that you use for the rest of that program.
1069bdf0f55dSmrg#
10709e7bcd65Smrg# GNU Libtool is distributed in the hope that it will be useful,
10719e7bcd65Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
10729e7bcd65Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
10739e7bcd65Smrg# GNU General Public License for more details.
1074bdf0f55dSmrg#
10759e7bcd65Smrg# You should have received a copy of the GNU General Public License
10769e7bcd65Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
10779e7bcd65Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
10789e7bcd65Smrg# obtained by writing to the Free Software Foundation, Inc.,
10799e7bcd65Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
10809e7bcd65Smrg])
10811477040fSmrg
10829e7bcd65Smrg# serial 57 LT_INIT
10831477040fSmrg
10841477040fSmrg
10859e7bcd65Smrg# LT_PREREQ(VERSION)
10869e7bcd65Smrg# ------------------
10879e7bcd65Smrg# Complain and exit if this libtool version is less that VERSION.
10889e7bcd65Smrgm4_defun([LT_PREREQ],
10899e7bcd65Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
10909e7bcd65Smrg       [m4_default([$3],
10919e7bcd65Smrg		   [m4_fatal([Libtool version $1 or higher is required],
10929e7bcd65Smrg		             63)])],
10939e7bcd65Smrg       [$2])])
10941477040fSmrg
1095444c061aSmrg
10969e7bcd65Smrg# _LT_CHECK_BUILDDIR
10979e7bcd65Smrg# ------------------
10989e7bcd65Smrg# Complain if the absolute build directory name contains unusual characters
10999e7bcd65Smrgm4_defun([_LT_CHECK_BUILDDIR],
11009e7bcd65Smrg[case `pwd` in
11019e7bcd65Smrg  *\ * | *\	*)
11029e7bcd65Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
11039e7bcd65Smrgesac
11049e7bcd65Smrg])
11052265a131Smrg
11069e7bcd65Smrg
11079e7bcd65Smrg# LT_INIT([OPTIONS])
11089e7bcd65Smrg# ------------------
11099e7bcd65SmrgAC_DEFUN([LT_INIT],
11109e7bcd65Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
11119e7bcd65SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
11129e7bcd65SmrgAC_BEFORE([$0], [LT_LANG])dnl
11139e7bcd65SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
11149e7bcd65SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
11159e7bcd65Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
11169e7bcd65Smrg
11179e7bcd65Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
11189e7bcd65Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
11199e7bcd65Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
11209e7bcd65Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
11219e7bcd65Smrgdnl unless we require an AC_DEFUNed macro:
11229e7bcd65SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
11239e7bcd65SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
11249e7bcd65SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
11259e7bcd65SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
11269e7bcd65Smrgm4_require([_LT_PROG_LTMAIN])dnl
11279e7bcd65Smrg
11289e7bcd65Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
11299e7bcd65Smrg
11309e7bcd65Smrgdnl Parse OPTIONS
11319e7bcd65Smrg_LT_SET_OPTIONS([$0], [$1])
11329e7bcd65Smrg
11339e7bcd65Smrg# This can be used to rebuild libtool when needed
11349e7bcd65SmrgLIBTOOL_DEPS="$ltmain"
11359e7bcd65Smrg
11369e7bcd65Smrg# Always use our own libtool.
11379e7bcd65SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
11389e7bcd65SmrgAC_SUBST(LIBTOOL)dnl
11399e7bcd65Smrg
11409e7bcd65Smrg_LT_SETUP
11419e7bcd65Smrg
11429e7bcd65Smrg# Only expand once:
11439e7bcd65Smrgm4_define([LT_INIT])
11449e7bcd65Smrg])# LT_INIT
11459e7bcd65Smrg
11469e7bcd65Smrg# Old names:
11479e7bcd65SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
11489e7bcd65SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
11499e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
11509e7bcd65Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
11519e7bcd65Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
11529e7bcd65Smrg
11539e7bcd65Smrg
11549e7bcd65Smrg# _LT_CC_BASENAME(CC)
11559e7bcd65Smrg# -------------------
11569e7bcd65Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
11579e7bcd65Smrgm4_defun([_LT_CC_BASENAME],
11589e7bcd65Smrg[for cc_temp in $1""; do
11599e7bcd65Smrg  case $cc_temp in
11609e7bcd65Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
11619e7bcd65Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
11629e7bcd65Smrg    \-*) ;;
11639e7bcd65Smrg    *) break;;
11649e7bcd65Smrg  esac
11659e7bcd65Smrgdone
11669e7bcd65Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
11679e7bcd65Smrg])
11689e7bcd65Smrg
11699e7bcd65Smrg
11709e7bcd65Smrg# _LT_FILEUTILS_DEFAULTS
11719e7bcd65Smrg# ----------------------
11729e7bcd65Smrg# It is okay to use these file commands and assume they have been set
11739e7bcd65Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
11749e7bcd65Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
11759e7bcd65Smrg[: ${CP="cp -f"}
11769e7bcd65Smrg: ${MV="mv -f"}
11779e7bcd65Smrg: ${RM="rm -f"}
11789e7bcd65Smrg])# _LT_FILEUTILS_DEFAULTS
11799e7bcd65Smrg
11809e7bcd65Smrg
11819e7bcd65Smrg# _LT_SETUP
11829e7bcd65Smrg# ---------
11839e7bcd65Smrgm4_defun([_LT_SETUP],
11849e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
11859e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
11869e7bcd65SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
11879e7bcd65SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
11889e7bcd65Smrg
11899e7bcd65Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
11909e7bcd65Smrgdnl
11919e7bcd65Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
11929e7bcd65Smrg_LT_DECL([], [host], [0])dnl
11939e7bcd65Smrg_LT_DECL([], [host_os], [0])dnl
11949e7bcd65Smrgdnl
11959e7bcd65Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
11969e7bcd65Smrg_LT_DECL([], [build], [0])dnl
11979e7bcd65Smrg_LT_DECL([], [build_os], [0])dnl
11989e7bcd65Smrgdnl
11999e7bcd65SmrgAC_REQUIRE([AC_PROG_CC])dnl
12009e7bcd65SmrgAC_REQUIRE([LT_PATH_LD])dnl
12019e7bcd65SmrgAC_REQUIRE([LT_PATH_NM])dnl
12029e7bcd65Smrgdnl
12039e7bcd65SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
12049e7bcd65Smrgtest -z "$LN_S" && LN_S="ln -s"
12059e7bcd65Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
12069e7bcd65Smrgdnl
12079e7bcd65SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
12089e7bcd65Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
12099e7bcd65Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
12109e7bcd65Smrgdnl
12119e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
12129e7bcd65Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
12139e7bcd65Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
12149e7bcd65Smrgm4_require([_LT_CMD_RELOAD])dnl
12159e7bcd65Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
12169e7bcd65Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
12179e7bcd65Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
12189e7bcd65Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
12199e7bcd65Smrgm4_require([_LT_WITH_SYSROOT])dnl
12209e7bcd65Smrg
12219e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([
12229e7bcd65Smrg# See if we are running on zsh, and set the options which allow our
12239e7bcd65Smrg# commands through without removal of \ escapes INIT.
12249e7bcd65Smrgif test -n "\${ZSH_VERSION+set}" ; then
12259e7bcd65Smrg   setopt NO_GLOB_SUBST
12269e7bcd65Smrgfi
12279e7bcd65Smrg])
12289e7bcd65Smrgif test -n "${ZSH_VERSION+set}" ; then
12299e7bcd65Smrg   setopt NO_GLOB_SUBST
1230249c3046Smrgfi
1231444c061aSmrg
12329e7bcd65Smrg_LT_CHECK_OBJDIR
12339e7bcd65Smrg
12349e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl
12359e7bcd65Smrg
12369e7bcd65Smrgcase $host_os in
12379e7bcd65Smrgaix3*)
12389e7bcd65Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
12399e7bcd65Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
12409e7bcd65Smrg  # vanish in a puff of smoke.
12419e7bcd65Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
12429e7bcd65Smrg    COLLECT_NAMES=
12439e7bcd65Smrg    export COLLECT_NAMES
12449e7bcd65Smrg  fi
12459e7bcd65Smrg  ;;
12469e7bcd65Smrgesac
12479e7bcd65Smrg
12489e7bcd65Smrg# Global variables:
12499e7bcd65Smrgofile=libtool
12509e7bcd65Smrgcan_build_shared=yes
12519e7bcd65Smrg
12529e7bcd65Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
12539e7bcd65Smrg# which needs '.lib').
12549e7bcd65Smrglibext=a
12559e7bcd65Smrg
12569e7bcd65Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
12579e7bcd65Smrg
12589e7bcd65Smrgold_CC="$CC"
12599e7bcd65Smrgold_CFLAGS="$CFLAGS"
12609e7bcd65Smrg
12619e7bcd65Smrg# Set sane defaults for various variables
12629e7bcd65Smrgtest -z "$CC" && CC=cc
12639e7bcd65Smrgtest -z "$LTCC" && LTCC=$CC
12649e7bcd65Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
12659e7bcd65Smrgtest -z "$LD" && LD=ld
12669e7bcd65Smrgtest -z "$ac_objext" && ac_objext=o
12679e7bcd65Smrg
12689e7bcd65Smrg_LT_CC_BASENAME([$compiler])
12699e7bcd65Smrg
12709e7bcd65Smrg# Only perform the check for file, if the check method requires it
12719e7bcd65Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
12729e7bcd65Smrgcase $deplibs_check_method in
12739e7bcd65Smrgfile_magic*)
12749e7bcd65Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
12759e7bcd65Smrg    _LT_PATH_MAGIC
12769e7bcd65Smrg  fi
12779e7bcd65Smrg  ;;
12789e7bcd65Smrgesac
12799e7bcd65Smrg
12809e7bcd65Smrg# Use C for the default configuration in the libtool script
12819e7bcd65SmrgLT_SUPPORTED_TAG([CC])
12829e7bcd65Smrg_LT_LANG_C_CONFIG
12839e7bcd65Smrg_LT_LANG_DEFAULT_CONFIG
12849e7bcd65Smrg_LT_CONFIG_COMMANDS
12859e7bcd65Smrg])# _LT_SETUP
12869e7bcd65Smrg
12879e7bcd65Smrg
12889e7bcd65Smrg# _LT_PREPARE_SED_QUOTE_VARS
12899e7bcd65Smrg# --------------------------
12909e7bcd65Smrg# Define a few sed substitution that help us do robust quoting.
12919e7bcd65Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
12929e7bcd65Smrg[# Backslashify metacharacters that are still active within
12939e7bcd65Smrg# double-quoted strings.
12949e7bcd65Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
12959e7bcd65Smrg
12969e7bcd65Smrg# Same as above, but do not quote variable references.
12979e7bcd65Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
12989e7bcd65Smrg
12999e7bcd65Smrg# Sed substitution to delay expansion of an escaped shell variable in a
13009e7bcd65Smrg# double_quote_subst'ed string.
13019e7bcd65Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
13029e7bcd65Smrg
13039e7bcd65Smrg# Sed substitution to delay expansion of an escaped single quote.
13049e7bcd65Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
13059e7bcd65Smrg
13069e7bcd65Smrg# Sed substitution to avoid accidental globbing in evaled expressions
13079e7bcd65Smrgno_glob_subst='s/\*/\\\*/g'
13089e7bcd65Smrg])
13099e7bcd65Smrg
13109e7bcd65Smrg# _LT_PROG_LTMAIN
13119e7bcd65Smrg# ---------------
13129e7bcd65Smrg# Note that this code is called both from `configure', and `config.status'
13139e7bcd65Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
13149e7bcd65Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
13159e7bcd65Smrg# so we pass a copy along to make sure it has a sensible value anyway.
13169e7bcd65Smrgm4_defun([_LT_PROG_LTMAIN],
13179e7bcd65Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
13189e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
13199e7bcd65Smrgltmain="$ac_aux_dir/ltmain.sh"
13209e7bcd65Smrg])# _LT_PROG_LTMAIN
13219e7bcd65Smrg
13229e7bcd65Smrg
13239e7bcd65Smrg
13249e7bcd65Smrg# So that we can recreate a full libtool script including additional
13259e7bcd65Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
13269e7bcd65Smrg# in macros and then make a single call at the end using the `libtool'
13279e7bcd65Smrg# label.
13289e7bcd65Smrg
13299e7bcd65Smrg
13309e7bcd65Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
13319e7bcd65Smrg# ----------------------------------------
13329e7bcd65Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
13339e7bcd65Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
13349e7bcd65Smrg[m4_ifval([$1],
13359e7bcd65Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
13369e7bcd65Smrg                     [$1
13379e7bcd65Smrg])])])
13389e7bcd65Smrg
13399e7bcd65Smrg# Initialize.
13409e7bcd65Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
13419e7bcd65Smrg
13429e7bcd65Smrg
13439e7bcd65Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
13449e7bcd65Smrg# ------------------------------
13459e7bcd65Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
13469e7bcd65Smrgm4_define([_LT_CONFIG_LIBTOOL],
13479e7bcd65Smrg[m4_ifval([$1],
13489e7bcd65Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
13499e7bcd65Smrg                     [$1
13509e7bcd65Smrg])])])
13519e7bcd65Smrg
13529e7bcd65Smrg# Initialize.
13539e7bcd65Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
13549e7bcd65Smrg
13559e7bcd65Smrg
13569e7bcd65Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
13579e7bcd65Smrg# -----------------------------------------------------
13589e7bcd65Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
13599e7bcd65Smrg[_LT_CONFIG_LIBTOOL([$1])
13609e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
13619e7bcd65Smrg])
13629e7bcd65Smrg
13639e7bcd65Smrg
13649e7bcd65Smrg# _LT_FORMAT_COMMENT([COMMENT])
13659e7bcd65Smrg# -----------------------------
13669e7bcd65Smrg# Add leading comment marks to the start of each line, and a trailing
13679e7bcd65Smrg# full-stop to the whole comment if one is not present already.
13689e7bcd65Smrgm4_define([_LT_FORMAT_COMMENT],
13699e7bcd65Smrg[m4_ifval([$1], [
13709e7bcd65Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
13719e7bcd65Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
13729e7bcd65Smrg)])
13739e7bcd65Smrg
13749e7bcd65Smrg
13759e7bcd65Smrg
13769e7bcd65Smrg
13779e7bcd65Smrg
13789e7bcd65Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
13799e7bcd65Smrg# -------------------------------------------------------------------
13809e7bcd65Smrg# CONFIGNAME is the name given to the value in the libtool script.
13819e7bcd65Smrg# VARNAME is the (base) name used in the configure script.
13829e7bcd65Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
13839e7bcd65Smrg# VARNAME.  Any other value will be used directly.
13849e7bcd65Smrgm4_define([_LT_DECL],
13859e7bcd65Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
13869e7bcd65Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
13879e7bcd65Smrg	[m4_ifval([$1], [$1], [$2])])
13889e7bcd65Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
13899e7bcd65Smrg    m4_ifval([$4],
13909e7bcd65Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
13919e7bcd65Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
13929e7bcd65Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
13939e7bcd65Smrg])
13949e7bcd65Smrg
13959e7bcd65Smrg
13969e7bcd65Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
13979e7bcd65Smrg# --------------------------------------------------------
13989e7bcd65Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
13999e7bcd65Smrg
14009e7bcd65Smrg
14019e7bcd65Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
14029e7bcd65Smrg# ------------------------------------------------
14039e7bcd65Smrgm4_define([lt_decl_tag_varnames],
14049e7bcd65Smrg[_lt_decl_filter([tagged?], [yes], $@)])
14059e7bcd65Smrg
14069e7bcd65Smrg
14079e7bcd65Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
14089e7bcd65Smrg# ---------------------------------------------------------
14099e7bcd65Smrgm4_define([_lt_decl_filter],
14109e7bcd65Smrg[m4_case([$#],
14119e7bcd65Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
14129e7bcd65Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
14139e7bcd65Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
14149e7bcd65Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
14159e7bcd65Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
14169e7bcd65Smrg])
14179e7bcd65Smrg
14189e7bcd65Smrg
14199e7bcd65Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
14209e7bcd65Smrg# --------------------------------------------------
14219e7bcd65Smrgm4_define([lt_decl_quote_varnames],
14229e7bcd65Smrg[_lt_decl_filter([value], [1], $@)])
14239e7bcd65Smrg
14249e7bcd65Smrg
14259e7bcd65Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
14269e7bcd65Smrg# ---------------------------------------------------
14279e7bcd65Smrgm4_define([lt_decl_dquote_varnames],
14289e7bcd65Smrg[_lt_decl_filter([value], [2], $@)])
14299e7bcd65Smrg
14309e7bcd65Smrg
14319e7bcd65Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
14329e7bcd65Smrg# ---------------------------------------------------
14339e7bcd65Smrgm4_define([lt_decl_varnames_tagged],
14349e7bcd65Smrg[m4_assert([$# <= 2])dnl
14359e7bcd65Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
14369e7bcd65Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
14379e7bcd65Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
14389e7bcd65Smrgm4_define([_lt_decl_varnames_tagged],
14399e7bcd65Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
14409e7bcd65Smrg
14419e7bcd65Smrg
14429e7bcd65Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
14439e7bcd65Smrg# ------------------------------------------------
14449e7bcd65Smrgm4_define([lt_decl_all_varnames],
14459e7bcd65Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
14469e7bcd65Smrg     m4_if([$2], [],
14479e7bcd65Smrg	   m4_quote(lt_decl_varnames),
14489e7bcd65Smrg	m4_quote(m4_shift($@))))[]dnl
14499e7bcd65Smrg])
14509e7bcd65Smrgm4_define([_lt_decl_all_varnames],
14519e7bcd65Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
14529e7bcd65Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
14539e7bcd65Smrg])
14549e7bcd65Smrg
14559e7bcd65Smrg
14569e7bcd65Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
14579e7bcd65Smrg# ------------------------------------
14589e7bcd65Smrg# Quote a variable value, and forward it to `config.status' so that its
14599e7bcd65Smrg# declaration there will have the same value as in `configure'.  VARNAME
14609e7bcd65Smrg# must have a single quote delimited value for this to work.
14619e7bcd65Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
14629e7bcd65Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
14639e7bcd65Smrg
14649e7bcd65Smrg
14659e7bcd65Smrg# _LT_CONFIG_STATUS_DECLARATIONS
14669e7bcd65Smrg# ------------------------------
14679e7bcd65Smrg# We delimit libtool config variables with single quotes, so when
14689e7bcd65Smrg# we write them to config.status, we have to be sure to quote all
14699e7bcd65Smrg# embedded single quotes properly.  In configure, this macro expands
14709e7bcd65Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
1471bdf0f55dSmrg#
14729e7bcd65Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
14739e7bcd65Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
14749e7bcd65Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
14759e7bcd65Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
14761477040fSmrg
14771477040fSmrg
14789e7bcd65Smrg# _LT_LIBTOOL_TAGS
1479bdf0f55dSmrg# ----------------
14809e7bcd65Smrg# Output comment and list of tags supported by the script
14819e7bcd65Smrgm4_defun([_LT_LIBTOOL_TAGS],
14829e7bcd65Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
14839e7bcd65Smrgavailable_tags="_LT_TAGS"dnl
14849e7bcd65Smrg])
14859e7bcd65Smrg
14869e7bcd65Smrg
14879e7bcd65Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
14889e7bcd65Smrg# -----------------------------------
14899e7bcd65Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
14909e7bcd65Smrg# expand to a commented shell variable setting:
1491bdf0f55dSmrg#
14929e7bcd65Smrg#    # Some comment about what VAR is for.
14939e7bcd65Smrg#    visible_name=$lt_internal_name
14949e7bcd65Smrgm4_define([_LT_LIBTOOL_DECLARE],
14959e7bcd65Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
14969e7bcd65Smrg					   [description])))[]dnl
14979e7bcd65Smrgm4_pushdef([_libtool_name],
14989e7bcd65Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
14999e7bcd65Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
15009e7bcd65Smrg    [0], [_libtool_name=[$]$1],
15019e7bcd65Smrg    [1], [_libtool_name=$lt_[]$1],
15029e7bcd65Smrg    [2], [_libtool_name=$lt_[]$1],
15039e7bcd65Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
15049e7bcd65Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
15059e7bcd65Smrg])
15061477040fSmrg
15071477040fSmrg
15089e7bcd65Smrg# _LT_LIBTOOL_CONFIG_VARS
15099e7bcd65Smrg# -----------------------
15109e7bcd65Smrg# Produce commented declarations of non-tagged libtool config variables
15119e7bcd65Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
15129e7bcd65Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
15139e7bcd65Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
15149e7bcd65Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
15159e7bcd65Smrg[m4_foreach([_lt_var],
15169e7bcd65Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
15179e7bcd65Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
15182265a131Smrg
15192265a131Smrg
15209e7bcd65Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
15219e7bcd65Smrg# -------------------------
15229e7bcd65Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
15239e7bcd65Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
15249e7bcd65Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
15251477040fSmrg
15262265a131Smrg
15279e7bcd65Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
15289e7bcd65Smrg# ------------------------------
15299e7bcd65Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
15302265a131Smrg
15311477040fSmrg
15329e7bcd65Smrg# _LT_CONFIG_COMMANDS
15339e7bcd65Smrg# -------------------
15349e7bcd65Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
15359e7bcd65Smrg# variables for single and double quote escaping we saved from calls
15369e7bcd65Smrg# to _LT_DECL, we can put quote escaped variables declarations
15379e7bcd65Smrg# into `config.status', and then the shell code to quote escape them in
15389e7bcd65Smrg# for loops in `config.status'.  Finally, any additional code accumulated
15399e7bcd65Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
15409e7bcd65Smrgm4_defun([_LT_CONFIG_COMMANDS],
15419e7bcd65Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
15429e7bcd65Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
15439e7bcd65Smrg	dnl instead of duplicating it all over again into config.status,
15449e7bcd65Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
15459e7bcd65Smrg	dnl needs to know what name is stored there:
15469e7bcd65Smrg        [AC_CONFIG_COMMANDS([libtool],
15479e7bcd65Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
15489e7bcd65Smrg    dnl If the libtool generation code is destined for config.status,
15499e7bcd65Smrg    dnl expand the accumulated commands and init code now:
15509e7bcd65Smrg    [AC_CONFIG_COMMANDS([libtool],
15519e7bcd65Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
15529e7bcd65Smrg])#_LT_CONFIG_COMMANDS
15539e7bcd65Smrg
15549e7bcd65Smrg
15559e7bcd65Smrg# Initialize.
15569e7bcd65Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
15579e7bcd65Smrg[
15589e7bcd65Smrg
15599e7bcd65Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
15609e7bcd65Smrg# if CDPATH is set.
15619e7bcd65Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
15629e7bcd65Smrg
15639e7bcd65Smrgsed_quote_subst='$sed_quote_subst'
15649e7bcd65Smrgdouble_quote_subst='$double_quote_subst'
15659e7bcd65Smrgdelay_variable_subst='$delay_variable_subst'
15669e7bcd65Smrg_LT_CONFIG_STATUS_DECLARATIONS
15679e7bcd65SmrgLTCC='$LTCC'
15689e7bcd65SmrgLTCFLAGS='$LTCFLAGS'
15699e7bcd65Smrgcompiler='$compiler_DEFAULT'
15709e7bcd65Smrg
15719e7bcd65Smrg# A function that is used when there is no print builtin or printf.
15729e7bcd65Smrgfunc_fallback_echo ()
15739e7bcd65Smrg{
15749e7bcd65Smrg  eval 'cat <<_LTECHO_EOF
15759e7bcd65Smrg\$[]1
15769e7bcd65Smrg_LTECHO_EOF'
15779e7bcd65Smrg}
15781477040fSmrg
15799e7bcd65Smrg# Quote evaled strings.
15809e7bcd65Smrgfor var in lt_decl_all_varnames([[ \
15819e7bcd65Smrg]], lt_decl_quote_varnames); do
15829e7bcd65Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
15839e7bcd65Smrg    *[[\\\\\\\`\\"\\\$]]*)
15849e7bcd65Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
15859e7bcd65Smrg      ;;
15869e7bcd65Smrg    *)
15879e7bcd65Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
15889e7bcd65Smrg      ;;
15899e7bcd65Smrg    esac
15909e7bcd65Smrgdone
15911477040fSmrg
15929e7bcd65Smrg# Double-quote double-evaled strings.
15939e7bcd65Smrgfor var in lt_decl_all_varnames([[ \
15949e7bcd65Smrg]], lt_decl_dquote_varnames); do
15959e7bcd65Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
15969e7bcd65Smrg    *[[\\\\\\\`\\"\\\$]]*)
15979e7bcd65Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
15989e7bcd65Smrg      ;;
15999e7bcd65Smrg    *)
16009e7bcd65Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
16019e7bcd65Smrg      ;;
16029e7bcd65Smrg    esac
16039e7bcd65Smrgdone
16041477040fSmrg
16059e7bcd65Smrg_LT_OUTPUT_LIBTOOL_INIT
16069e7bcd65Smrg])
16079e7bcd65Smrg
16089e7bcd65Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
16099e7bcd65Smrg# ------------------------------------
16109e7bcd65Smrg# Generate a child script FILE with all initialization necessary to
16119e7bcd65Smrg# reuse the environment learned by the parent script, and make the
16129e7bcd65Smrg# file executable.  If COMMENT is supplied, it is inserted after the
16139e7bcd65Smrg# `#!' sequence but before initialization text begins.  After this
16149e7bcd65Smrg# macro, additional text can be appended to FILE to form the body of
16159e7bcd65Smrg# the child script.  The macro ends with non-zero status if the
16169e7bcd65Smrg# file could not be fully written (such as if the disk is full).
16179e7bcd65Smrgm4_ifdef([AS_INIT_GENERATED],
16189e7bcd65Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
16199e7bcd65Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
16209e7bcd65Smrg[m4_require([AS_PREPARE])]dnl
16219e7bcd65Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
16229e7bcd65Smrg[lt_write_fail=0
16239e7bcd65Smrgcat >$1 <<_ASEOF || lt_write_fail=1
16249e7bcd65Smrg#! $SHELL
16259e7bcd65Smrg# Generated by $as_me.
16269e7bcd65Smrg$2
16279e7bcd65SmrgSHELL=\${CONFIG_SHELL-$SHELL}
16289e7bcd65Smrgexport SHELL
16299e7bcd65Smrg_ASEOF
16309e7bcd65Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
16319e7bcd65SmrgAS_SHELL_SANITIZE
16329e7bcd65Smrg_AS_PREPARE
16339e7bcd65Smrgexec AS_MESSAGE_FD>&1
16349e7bcd65Smrg_ASEOF
16359e7bcd65Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
16369e7bcd65Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
16379e7bcd65Smrg
16389e7bcd65Smrg# LT_OUTPUT
16399e7bcd65Smrg# ---------
16409e7bcd65Smrg# This macro allows early generation of the libtool script (before
16419e7bcd65Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
16429e7bcd65Smrg# tests.
16439e7bcd65SmrgAC_DEFUN([LT_OUTPUT],
16449e7bcd65Smrg[: ${CONFIG_LT=./config.lt}
16459e7bcd65SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
16469e7bcd65Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
16479e7bcd65Smrg[# Run this file to recreate a libtool stub with the current configuration.])
16489e7bcd65Smrg
16499e7bcd65Smrgcat >>"$CONFIG_LT" <<\_LTEOF
16509e7bcd65Smrglt_cl_silent=false
16519e7bcd65Smrgexec AS_MESSAGE_LOG_FD>>config.log
16529e7bcd65Smrg{
16539e7bcd65Smrg  echo
16549e7bcd65Smrg  AS_BOX([Running $as_me.])
16559e7bcd65Smrg} >&AS_MESSAGE_LOG_FD
16569e7bcd65Smrg
16579e7bcd65Smrglt_cl_help="\
16589e7bcd65Smrg\`$as_me' creates a local libtool stub from the current configuration,
16599e7bcd65Smrgfor use in further configure time tests before the real libtool is
16609e7bcd65Smrggenerated.
16619e7bcd65Smrg
16629e7bcd65SmrgUsage: $[0] [[OPTIONS]]
16639e7bcd65Smrg
16649e7bcd65Smrg  -h, --help      print this help, then exit
16659e7bcd65Smrg  -V, --version   print version number, then exit
16669e7bcd65Smrg  -q, --quiet     do not print progress messages
16679e7bcd65Smrg  -d, --debug     don't remove temporary files
16689e7bcd65Smrg
16699e7bcd65SmrgReport bugs to <bug-libtool@gnu.org>."
16709e7bcd65Smrg
16719e7bcd65Smrglt_cl_version="\
16729e7bcd65Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
16739e7bcd65Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
16749e7bcd65Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
16759e7bcd65Smrg
16769e7bcd65SmrgCopyright (C) 2011 Free Software Foundation, Inc.
16779e7bcd65SmrgThis config.lt script is free software; the Free Software Foundation
16789e7bcd65Smrggives unlimited permision to copy, distribute and modify it."
16799e7bcd65Smrg
16809e7bcd65Smrgwhile test $[#] != 0
16819e7bcd65Smrgdo
16829e7bcd65Smrg  case $[1] in
16839e7bcd65Smrg    --version | --v* | -V )
16849e7bcd65Smrg      echo "$lt_cl_version"; exit 0 ;;
16859e7bcd65Smrg    --help | --h* | -h )
16869e7bcd65Smrg      echo "$lt_cl_help"; exit 0 ;;
16879e7bcd65Smrg    --debug | --d* | -d )
16889e7bcd65Smrg      debug=: ;;
16899e7bcd65Smrg    --quiet | --q* | --silent | --s* | -q )
16909e7bcd65Smrg      lt_cl_silent=: ;;
16919e7bcd65Smrg
16929e7bcd65Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
16939e7bcd65SmrgTry \`$[0] --help' for more information.]) ;;
16949e7bcd65Smrg
16959e7bcd65Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
16969e7bcd65SmrgTry \`$[0] --help' for more information.]) ;;
16979e7bcd65Smrg  esac
16989e7bcd65Smrg  shift
16999e7bcd65Smrgdone
17009e7bcd65Smrg
17019e7bcd65Smrgif $lt_cl_silent; then
17029e7bcd65Smrg  exec AS_MESSAGE_FD>/dev/null
1703bdf0f55dSmrgfi
17049e7bcd65Smrg_LTEOF
17059e7bcd65Smrg
17069e7bcd65Smrgcat >>"$CONFIG_LT" <<_LTEOF
17079e7bcd65Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
17089e7bcd65Smrg_LTEOF
17099e7bcd65Smrg
17109e7bcd65Smrgcat >>"$CONFIG_LT" <<\_LTEOF
17119e7bcd65SmrgAC_MSG_NOTICE([creating $ofile])
17129e7bcd65Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
17139e7bcd65SmrgAS_EXIT(0)
17149e7bcd65Smrg_LTEOF
17159e7bcd65Smrgchmod +x "$CONFIG_LT"
17169e7bcd65Smrg
17179e7bcd65Smrg# configure is writing to config.log, but config.lt does its own redirection,
17189e7bcd65Smrg# appending to config.log, which fails on DOS, as config.log is still kept
17199e7bcd65Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
17209e7bcd65Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
17219e7bcd65Smrglt_cl_success=:
17229e7bcd65Smrgtest "$silent" = yes &&
17239e7bcd65Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
17249e7bcd65Smrgexec AS_MESSAGE_LOG_FD>/dev/null
17259e7bcd65Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
17269e7bcd65Smrgexec AS_MESSAGE_LOG_FD>>config.log
17279e7bcd65Smrg$lt_cl_success || AS_EXIT(1)
17289e7bcd65Smrg])# LT_OUTPUT
17299e7bcd65Smrg
17309e7bcd65Smrg
17319e7bcd65Smrg# _LT_CONFIG(TAG)
17329e7bcd65Smrg# ---------------
17339e7bcd65Smrg# If TAG is the built-in tag, create an initial libtool script with a
17349e7bcd65Smrg# default configuration from the untagged config vars.  Otherwise add code
17359e7bcd65Smrg# to config.status for appending the configuration named by TAG from the
17369e7bcd65Smrg# matching tagged config vars.
17379e7bcd65Smrgm4_defun([_LT_CONFIG],
17389e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
17399e7bcd65Smrg_LT_CONFIG_SAVE_COMMANDS([
17409e7bcd65Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
17419e7bcd65Smrg  m4_if(_LT_TAG, [C], [
17429e7bcd65Smrg    # See if we are running on zsh, and set the options which allow our
17439e7bcd65Smrg    # commands through without removal of \ escapes.
17449e7bcd65Smrg    if test -n "${ZSH_VERSION+set}" ; then
17459e7bcd65Smrg      setopt NO_GLOB_SUBST
17469e7bcd65Smrg    fi
17471477040fSmrg
17489e7bcd65Smrg    cfgfile="${ofile}T"
17499e7bcd65Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
17509e7bcd65Smrg    $RM "$cfgfile"
17511477040fSmrg
17529e7bcd65Smrg    cat <<_LT_EOF >> "$cfgfile"
17539e7bcd65Smrg#! $SHELL
17541477040fSmrg
17559e7bcd65Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
17569e7bcd65Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
17579e7bcd65Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
17589e7bcd65Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
1759bdf0f55dSmrg#
17609e7bcd65Smrg_LT_COPYING
17619e7bcd65Smrg_LT_LIBTOOL_TAGS
17629e7bcd65Smrg
17639e7bcd65Smrg# ### BEGIN LIBTOOL CONFIG
17649e7bcd65Smrg_LT_LIBTOOL_CONFIG_VARS
17659e7bcd65Smrg_LT_LIBTOOL_TAG_VARS
17669e7bcd65Smrg# ### END LIBTOOL CONFIG
17679e7bcd65Smrg
17689e7bcd65Smrg_LT_EOF
17699e7bcd65Smrg
17709e7bcd65Smrg  case $host_os in
17719e7bcd65Smrg  aix3*)
17729e7bcd65Smrg    cat <<\_LT_EOF >> "$cfgfile"
17739e7bcd65Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
17749e7bcd65Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
17759e7bcd65Smrg# vanish in a puff of smoke.
17769e7bcd65Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
17779e7bcd65Smrg  COLLECT_NAMES=
17789e7bcd65Smrg  export COLLECT_NAMES
17799e7bcd65Smrgfi
17809e7bcd65Smrg_LT_EOF
17819e7bcd65Smrg    ;;
17829e7bcd65Smrg  esac
17831477040fSmrg
17849e7bcd65Smrg  _LT_PROG_LTMAIN
17859e7bcd65Smrg
17869e7bcd65Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
17879e7bcd65Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
17889e7bcd65Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
17899e7bcd65Smrg  # is reportedly fixed, but why not run on old versions too?
17909e7bcd65Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
17919e7bcd65Smrg     || (rm -f "$cfgfile"; exit 1)
17929e7bcd65Smrg
17939e7bcd65Smrg  _LT_PROG_REPLACE_SHELLFNS
17949e7bcd65Smrg
17959e7bcd65Smrg   mv -f "$cfgfile" "$ofile" ||
17969e7bcd65Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
17979e7bcd65Smrg  chmod +x "$ofile"
17989e7bcd65Smrg],
17999e7bcd65Smrg[cat <<_LT_EOF >> "$ofile"
18009e7bcd65Smrg
18019e7bcd65Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
18029e7bcd65Smrgdnl in a comment (ie after a #).
18039e7bcd65Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
18049e7bcd65Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
18059e7bcd65Smrg# ### END LIBTOOL TAG CONFIG: $1
18069e7bcd65Smrg_LT_EOF
18079e7bcd65Smrg])dnl /m4_if
18089e7bcd65Smrg],
18099e7bcd65Smrg[m4_if([$1], [], [
18109e7bcd65Smrg    PACKAGE='$PACKAGE'
18119e7bcd65Smrg    VERSION='$VERSION'
18129e7bcd65Smrg    TIMESTAMP='$TIMESTAMP'
18139e7bcd65Smrg    RM='$RM'
18149e7bcd65Smrg    ofile='$ofile'], [])
18159e7bcd65Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
18169e7bcd65Smrg])# _LT_CONFIG
18179e7bcd65Smrg
18189e7bcd65Smrg
18199e7bcd65Smrg# LT_SUPPORTED_TAG(TAG)
18209e7bcd65Smrg# ---------------------
18219e7bcd65Smrg# Trace this macro to discover what tags are supported by the libtool
18229e7bcd65Smrg# --tag option, using:
18239e7bcd65Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
18249e7bcd65SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
18252265a131Smrg
18261477040fSmrg
18279e7bcd65Smrg# C support is built-in for now
18289e7bcd65Smrgm4_define([_LT_LANG_C_enabled], [])
18299e7bcd65Smrgm4_define([_LT_TAGS], [])
1830444c061aSmrg
18311477040fSmrg
18329e7bcd65Smrg# LT_LANG(LANG)
18339e7bcd65Smrg# -------------
18349e7bcd65Smrg# Enable libtool support for the given language if not already enabled.
18359e7bcd65SmrgAC_DEFUN([LT_LANG],
18369e7bcd65Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
18379e7bcd65Smrgm4_case([$1],
18389e7bcd65Smrg  [C],			[_LT_LANG(C)],
18399e7bcd65Smrg  [C++],		[_LT_LANG(CXX)],
18409e7bcd65Smrg  [Go],			[_LT_LANG(GO)],
18419e7bcd65Smrg  [Java],		[_LT_LANG(GCJ)],
18429e7bcd65Smrg  [Fortran 77],		[_LT_LANG(F77)],
18439e7bcd65Smrg  [Fortran],		[_LT_LANG(FC)],
18449e7bcd65Smrg  [Windows Resource],	[_LT_LANG(RC)],
18459e7bcd65Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
18469e7bcd65Smrg    [_LT_LANG($1)],
18479e7bcd65Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
18489e7bcd65Smrg])# LT_LANG
18499e7bcd65Smrg
18509e7bcd65Smrg
18519e7bcd65Smrg# _LT_LANG(LANGNAME)
18529e7bcd65Smrg# ------------------
18539e7bcd65Smrgm4_defun([_LT_LANG],
18549e7bcd65Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
18559e7bcd65Smrg  [LT_SUPPORTED_TAG([$1])dnl
18569e7bcd65Smrg  m4_append([_LT_TAGS], [$1 ])dnl
18579e7bcd65Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
18589e7bcd65Smrg  _LT_LANG_$1_CONFIG($1)])dnl
18599e7bcd65Smrg])# _LT_LANG
18609e7bcd65Smrg
18619e7bcd65Smrg
18629e7bcd65Smrgm4_ifndef([AC_PROG_GO], [
18639e7bcd65Smrg# NOTE: This macro has been submitted for inclusion into   #
18649e7bcd65Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
18659e7bcd65Smrg#  a released version of Autoconf we should remove this    #
18669e7bcd65Smrg#  macro and use it instead.                               #
18679e7bcd65Smrgm4_defun([AC_PROG_GO],
18689e7bcd65Smrg[AC_LANG_PUSH(Go)dnl
18699e7bcd65SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
18709e7bcd65SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
18719e7bcd65Smrg_AC_ARG_VAR_LDFLAGS()dnl
18729e7bcd65SmrgAC_CHECK_TOOL(GOC, gccgo)
18739e7bcd65Smrgif test -z "$GOC"; then
18749e7bcd65Smrg  if test -n "$ac_tool_prefix"; then
18759e7bcd65Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
18769e7bcd65Smrg  fi
1877bdf0f55dSmrgfi
18789e7bcd65Smrgif test -z "$GOC"; then
18799e7bcd65Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
18809e7bcd65Smrgfi
18819e7bcd65Smrg])#m4_defun
18829e7bcd65Smrg])#m4_ifndef
18831477040fSmrg
18849e7bcd65Smrg
18859e7bcd65Smrg# _LT_LANG_DEFAULT_CONFIG
1886bdf0f55dSmrg# -----------------------
18879e7bcd65Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
18889e7bcd65Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
18899e7bcd65Smrg  [LT_LANG(CXX)],
18909e7bcd65Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
18919e7bcd65Smrg
18929e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
18939e7bcd65Smrg  [LT_LANG(F77)],
18949e7bcd65Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
18959e7bcd65Smrg
18969e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
18979e7bcd65Smrg  [LT_LANG(FC)],
18989e7bcd65Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
18999e7bcd65Smrg
19009e7bcd65Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
19019e7bcd65Smrgdnl pulling things in needlessly.
19029e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
19039e7bcd65Smrg  [LT_LANG(GCJ)],
19049e7bcd65Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
19059e7bcd65Smrg    [LT_LANG(GCJ)],
19069e7bcd65Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
19079e7bcd65Smrg      [LT_LANG(GCJ)],
19089e7bcd65Smrg      [m4_ifdef([AC_PROG_GCJ],
19099e7bcd65Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
19109e7bcd65Smrg       m4_ifdef([A][M_PROG_GCJ],
19119e7bcd65Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
19129e7bcd65Smrg       m4_ifdef([LT_PROG_GCJ],
19139e7bcd65Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
19149e7bcd65Smrg
19159e7bcd65SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
19169e7bcd65Smrg  [LT_LANG(GO)],
19179e7bcd65Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
19189e7bcd65Smrg
19199e7bcd65SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
19209e7bcd65Smrg  [LT_LANG(RC)],
19219e7bcd65Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
19229e7bcd65Smrg])# _LT_LANG_DEFAULT_CONFIG
19239e7bcd65Smrg
19249e7bcd65Smrg# Obsolete macros:
19259e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
19269e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
19279e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
19289e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
19299e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
19309e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
19319e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
19329e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
19339e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
19349e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
19359e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
19369e7bcd65Smrg
19379e7bcd65Smrg
19389e7bcd65Smrg# _LT_TAG_COMPILER
19399e7bcd65Smrg# ----------------
19409e7bcd65Smrgm4_defun([_LT_TAG_COMPILER],
19419e7bcd65Smrg[AC_REQUIRE([AC_PROG_CC])dnl
19421477040fSmrg
19439e7bcd65Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
19449e7bcd65Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
19459e7bcd65Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
19469e7bcd65Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
19471477040fSmrg
19489e7bcd65Smrg# If no C compiler was specified, use CC.
19499e7bcd65SmrgLTCC=${LTCC-"$CC"}
19501477040fSmrg
19519e7bcd65Smrg# If no C compiler flags were specified, use CFLAGS.
19529e7bcd65SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
19531477040fSmrg
19549e7bcd65Smrg# Allow CC to be a program name with arguments.
19559e7bcd65Smrgcompiler=$CC
19569e7bcd65Smrg])# _LT_TAG_COMPILER
19571477040fSmrg
19581477040fSmrg
19599e7bcd65Smrg# _LT_COMPILER_BOILERPLATE
19609e7bcd65Smrg# ------------------------
19619e7bcd65Smrg# Check for compiler boilerplate output or warnings with
19629e7bcd65Smrg# the simple compiler test code.
19639e7bcd65Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
19649e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl
19659e7bcd65Smrgac_outfile=conftest.$ac_objext
19669e7bcd65Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
19679e7bcd65Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19689e7bcd65Smrg_lt_compiler_boilerplate=`cat conftest.err`
19699e7bcd65Smrg$RM conftest*
19709e7bcd65Smrg])# _LT_COMPILER_BOILERPLATE
19719e7bcd65Smrg
19729e7bcd65Smrg
19739e7bcd65Smrg# _LT_LINKER_BOILERPLATE
19749e7bcd65Smrg# ----------------------
19759e7bcd65Smrg# Check for linker boilerplate output or warnings with
19769e7bcd65Smrg# the simple link test code.
19779e7bcd65Smrgm4_defun([_LT_LINKER_BOILERPLATE],
19789e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl
19799e7bcd65Smrgac_outfile=conftest.$ac_objext
19809e7bcd65Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
19819e7bcd65Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
19829e7bcd65Smrg_lt_linker_boilerplate=`cat conftest.err`
19839e7bcd65Smrg$RM -r conftest*
19849e7bcd65Smrg])# _LT_LINKER_BOILERPLATE
19859e7bcd65Smrg
19869e7bcd65Smrg# _LT_REQUIRED_DARWIN_CHECKS
19879e7bcd65Smrg# -------------------------
19889e7bcd65Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
19899e7bcd65Smrg  case $host_os in
19909e7bcd65Smrg    rhapsody* | darwin*)
19919e7bcd65Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
19929e7bcd65Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
19939e7bcd65Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
19949e7bcd65Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
19959e7bcd65Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
19969e7bcd65Smrg    _LT_DECL([], [DSYMUTIL], [1],
19979e7bcd65Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
19989e7bcd65Smrg    _LT_DECL([], [NMEDIT], [1],
19999e7bcd65Smrg      [Tool to change global to local symbols on Mac OS X])
20009e7bcd65Smrg    _LT_DECL([], [LIPO], [1],
20019e7bcd65Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
20029e7bcd65Smrg    _LT_DECL([], [OTOOL], [1],
20039e7bcd65Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
20049e7bcd65Smrg    _LT_DECL([], [OTOOL64], [1],
20059e7bcd65Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
20069e7bcd65Smrg
20079e7bcd65Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
20089e7bcd65Smrg      [lt_cv_apple_cc_single_mod=no
20099e7bcd65Smrg      if test -z "${LT_MULTI_MODULE}"; then
20109e7bcd65Smrg	# By default we will add the -single_module flag. You can override
20119e7bcd65Smrg	# by either setting the environment variable LT_MULTI_MODULE
20129e7bcd65Smrg	# non-empty at configure time, or by adding -multi_module to the
20139e7bcd65Smrg	# link flags.
20149e7bcd65Smrg	rm -rf libconftest.dylib*
20159e7bcd65Smrg	echo "int foo(void){return 1;}" > conftest.c
20169e7bcd65Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
20179e7bcd65Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
20189e7bcd65Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
20199e7bcd65Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
20209e7bcd65Smrg        _lt_result=$?
20219e7bcd65Smrg	# If there is a non-empty error log, and "single_module"
20229e7bcd65Smrg	# appears in it, assume the flag caused a linker warning
20239e7bcd65Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
20249e7bcd65Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
20259e7bcd65Smrg	# Otherwise, if the output was created with a 0 exit code from
20269e7bcd65Smrg	# the compiler, it worked.
20279e7bcd65Smrg	elif test -f libconftest.dylib && test $_lt_result -eq 0; then
20289e7bcd65Smrg	  lt_cv_apple_cc_single_mod=yes
20299e7bcd65Smrg	else
20309e7bcd65Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
20319e7bcd65Smrg	fi
20329e7bcd65Smrg	rm -rf libconftest.dylib*
20339e7bcd65Smrg	rm -f conftest.*
20349e7bcd65Smrg      fi])
20359e7bcd65Smrg
20369e7bcd65Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
20379e7bcd65Smrg      [lt_cv_ld_exported_symbols_list],
20389e7bcd65Smrg      [lt_cv_ld_exported_symbols_list=no
20399e7bcd65Smrg      save_LDFLAGS=$LDFLAGS
20409e7bcd65Smrg      echo "_main" > conftest.sym
20419e7bcd65Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
20429e7bcd65Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
20439e7bcd65Smrg	[lt_cv_ld_exported_symbols_list=yes],
20449e7bcd65Smrg	[lt_cv_ld_exported_symbols_list=no])
20459e7bcd65Smrg	LDFLAGS="$save_LDFLAGS"
20469e7bcd65Smrg    ])
20471477040fSmrg
20489e7bcd65Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
20499e7bcd65Smrg      [lt_cv_ld_force_load=no
20509e7bcd65Smrg      cat > conftest.c << _LT_EOF
20519e7bcd65Smrgint forced_loaded() { return 2;}
20529e7bcd65Smrg_LT_EOF
20539e7bcd65Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
20549e7bcd65Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
20559e7bcd65Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
20569e7bcd65Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
20579e7bcd65Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
20589e7bcd65Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
20599e7bcd65Smrg      cat > conftest.c << _LT_EOF
20609e7bcd65Smrgint main() { return 0;}
20619e7bcd65Smrg_LT_EOF
20629e7bcd65Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
20639e7bcd65Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
20649e7bcd65Smrg      _lt_result=$?
20659e7bcd65Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
20669e7bcd65Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
20679e7bcd65Smrg      elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then
20689e7bcd65Smrg	lt_cv_ld_force_load=yes
20699e7bcd65Smrg      else
20709e7bcd65Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
20719e7bcd65Smrg      fi
20729e7bcd65Smrg        rm -f conftest.err libconftest.a conftest conftest.c
20739e7bcd65Smrg        rm -rf conftest.dSYM
20749e7bcd65Smrg    ])
20759e7bcd65Smrg    case $host_os in
20769e7bcd65Smrg    rhapsody* | darwin1.[[012]])
20779e7bcd65Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
20789e7bcd65Smrg    darwin1.*)
20799e7bcd65Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
20809e7bcd65Smrg    darwin*) # darwin 5.x on
20819e7bcd65Smrg      # if running on 10.5 or later, the deployment target defaults
20829e7bcd65Smrg      # to the OS version, if on x86, and 10.4, the deployment
20839e7bcd65Smrg      # target defaults to 10.4. Don't you love it?
20849e7bcd65Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
20859e7bcd65Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
20869e7bcd65Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
20879e7bcd65Smrg	10.[[012]]*)
20889e7bcd65Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
20899e7bcd65Smrg	10.*)
20909e7bcd65Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
20919e7bcd65Smrg      esac
20929e7bcd65Smrg    ;;
20939e7bcd65Smrg  esac
20949e7bcd65Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
20959e7bcd65Smrg      _lt_dar_single_mod='$single_module'
20969e7bcd65Smrg    fi
20979e7bcd65Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
20989e7bcd65Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
20999e7bcd65Smrg    else
21009e7bcd65Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
21019e7bcd65Smrg    fi
21029e7bcd65Smrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
21039e7bcd65Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
21049e7bcd65Smrg    else
21059e7bcd65Smrg      _lt_dsymutil=
21069e7bcd65Smrg    fi
21079e7bcd65Smrg    ;;
21089e7bcd65Smrg  esac
2109249c3046Smrg])
21101477040fSmrg
21112265a131Smrg
21129e7bcd65Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
21139e7bcd65Smrg# ---------------------------------
21149e7bcd65Smrg# Checks for linker and compiler features on darwin
21159e7bcd65Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
21169e7bcd65Smrg[
21179e7bcd65Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
21189e7bcd65Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
21199e7bcd65Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
21209e7bcd65Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
21219e7bcd65Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
21229e7bcd65Smrg  if test "$lt_cv_ld_force_load" = "yes"; then
21239e7bcd65Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`'
21249e7bcd65Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
21259e7bcd65Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
21269e7bcd65Smrg  else
21279e7bcd65Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
21289e7bcd65Smrg  fi
21299e7bcd65Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
21309e7bcd65Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
21319e7bcd65Smrg  case $cc_basename in
21329e7bcd65Smrg     ifort*) _lt_dar_can_shared=yes ;;
21339e7bcd65Smrg     *) _lt_dar_can_shared=$GCC ;;
21349e7bcd65Smrg  esac
21359e7bcd65Smrg  if test "$_lt_dar_can_shared" = "yes"; then
21369e7bcd65Smrg    output_verbose_link_cmd=func_echo_all
21379e7bcd65Smrg    _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
21389e7bcd65Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
21399e7bcd65Smrg    _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
21409e7bcd65Smrg    _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
21419e7bcd65Smrg    m4_if([$1], [CXX],
21429e7bcd65Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
21439e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
21449e7bcd65Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
21459e7bcd65Smrg    fi
21469e7bcd65Smrg],[])
21479e7bcd65Smrg  else
21489e7bcd65Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
21499e7bcd65Smrg  fi
21509e7bcd65Smrg])
21512265a131Smrg
21529e7bcd65Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
21539e7bcd65Smrg# ----------------------------------
21549e7bcd65Smrg# Links a minimal program and checks the executable
21559e7bcd65Smrg# for the system default hardcoded library path. In most cases,
21569e7bcd65Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
21579e7bcd65Smrg# the location of the communication and MPI libs are included too.
21589e7bcd65Smrg# If we don't find anything, use the default library path according
21599e7bcd65Smrg# to the aix ld manual.
21609e7bcd65Smrg# Store the results from the different compilers for each TAGNAME.
21619e7bcd65Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
21629e7bcd65Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
21639e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl
21649e7bcd65Smrgif test "${lt_cv_aix_libpath+set}" = set; then
21659e7bcd65Smrg  aix_libpath=$lt_cv_aix_libpath
21669e7bcd65Smrgelse
21679e7bcd65Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
21689e7bcd65Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
21699e7bcd65Smrg  lt_aix_libpath_sed='[
21709e7bcd65Smrg      /Import File Strings/,/^$/ {
21719e7bcd65Smrg	  /^0/ {
21729e7bcd65Smrg	      s/^0  *\([^ ]*\) *$/\1/
21739e7bcd65Smrg	      p
21749e7bcd65Smrg	  }
21759e7bcd65Smrg      }]'
21769e7bcd65Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
21779e7bcd65Smrg  # Check for a 64-bit object if we didn't find anything.
21789e7bcd65Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
21799e7bcd65Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
21809e7bcd65Smrg  fi],[])
21819e7bcd65Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
21829e7bcd65Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
21839e7bcd65Smrg  fi
21849e7bcd65Smrg  ])
21859e7bcd65Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
21869e7bcd65Smrgfi
21879e7bcd65Smrg])# _LT_SYS_MODULE_PATH_AIX
21881477040fSmrg
21891477040fSmrg
21909e7bcd65Smrg# _LT_SHELL_INIT(ARG)
21919e7bcd65Smrg# -------------------
21929e7bcd65Smrgm4_define([_LT_SHELL_INIT],
21939e7bcd65Smrg[m4_divert_text([M4SH-INIT], [$1
21949e7bcd65Smrg])])# _LT_SHELL_INIT
21951477040fSmrg
21961477040fSmrg
21971477040fSmrg
21989e7bcd65Smrg# _LT_PROG_ECHO_BACKSLASH
21999e7bcd65Smrg# -----------------------
22009e7bcd65Smrg# Find how we can fake an echo command that does not interpret backslash.
22019e7bcd65Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
22029e7bcd65Smrg# of the generated configure script which will find a shell with a builtin
22039e7bcd65Smrg# printf (which we can use as an echo command).
22049e7bcd65Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
22059e7bcd65Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22069e7bcd65SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
22079e7bcd65SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
22089e7bcd65Smrg
22099e7bcd65SmrgAC_MSG_CHECKING([how to print strings])
22109e7bcd65Smrg# Test print first, because it will be a builtin if present.
22119e7bcd65Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
22129e7bcd65Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
22139e7bcd65Smrg  ECHO='print -r --'
22149e7bcd65Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
22159e7bcd65Smrg  ECHO='printf %s\n'
2216bdf0f55dSmrgelse
22179e7bcd65Smrg  # Use this function as a fallback that always works.
22189e7bcd65Smrg  func_fallback_echo ()
22199e7bcd65Smrg  {
22209e7bcd65Smrg    eval 'cat <<_LTECHO_EOF
22219e7bcd65Smrg$[]1
22229e7bcd65Smrg_LTECHO_EOF'
22239e7bcd65Smrg  }
22249e7bcd65Smrg  ECHO='func_fallback_echo'
22251477040fSmrgfi
22261477040fSmrg
22279e7bcd65Smrg# func_echo_all arg...
22289e7bcd65Smrg# Invoke $ECHO with all args, space-separated.
22299e7bcd65Smrgfunc_echo_all ()
22309e7bcd65Smrg{
22319e7bcd65Smrg    $ECHO "$*" 
22329e7bcd65Smrg}
22331477040fSmrg
22349e7bcd65Smrgcase "$ECHO" in
22359e7bcd65Smrg  printf*) AC_MSG_RESULT([printf]) ;;
22369e7bcd65Smrg  print*) AC_MSG_RESULT([print -r]) ;;
22379e7bcd65Smrg  *) AC_MSG_RESULT([cat]) ;;
22389e7bcd65Smrgesac
22391477040fSmrg
22409e7bcd65Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
22419e7bcd65Smrg[_AS_DETECT_SUGGESTED([
22429e7bcd65Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
22439e7bcd65Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22449e7bcd65Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
22459e7bcd65Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
22469e7bcd65Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
22479e7bcd65Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
22489e7bcd65Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
22491477040fSmrg
22509e7bcd65Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
22519e7bcd65Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
22529e7bcd65Smrg])# _LT_PROG_ECHO_BACKSLASH
22531477040fSmrg
22541477040fSmrg
22559e7bcd65Smrg# _LT_WITH_SYSROOT
22569e7bcd65Smrg# ----------------
22579e7bcd65SmrgAC_DEFUN([_LT_WITH_SYSROOT],
22589e7bcd65Smrg[AC_MSG_CHECKING([for sysroot])
22599e7bcd65SmrgAC_ARG_WITH([sysroot],
22609e7bcd65Smrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
22619e7bcd65Smrg                        (or the compiler's sysroot if not specified).],
22629e7bcd65Smrg[], [with_sysroot=no])
22639e7bcd65Smrg
22649e7bcd65Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
22659e7bcd65Smrgdnl in case the user passed a directory name.
22669e7bcd65Smrglt_sysroot=
22679e7bcd65Smrgcase ${with_sysroot} in #(
22689e7bcd65Smrg yes)
22699e7bcd65Smrg   if test "$GCC" = yes; then
22709e7bcd65Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
22719e7bcd65Smrg   fi
22729e7bcd65Smrg   ;; #(
22739e7bcd65Smrg /*)
22749e7bcd65Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
22759e7bcd65Smrg   ;; #(
22769e7bcd65Smrg no|'')
22779e7bcd65Smrg   ;; #(
22789e7bcd65Smrg *)
22799e7bcd65Smrg   AC_MSG_RESULT([${with_sysroot}])
22809e7bcd65Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
22819e7bcd65Smrg   ;;
22829e7bcd65Smrgesac
22831477040fSmrg
22849e7bcd65Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
22859e7bcd65Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
22869e7bcd65Smrg[dependent libraries, and in which our libraries should be installed.])])
22871477040fSmrg
22889e7bcd65Smrg# _LT_ENABLE_LOCK
22899e7bcd65Smrg# ---------------
22909e7bcd65Smrgm4_defun([_LT_ENABLE_LOCK],
22919e7bcd65Smrg[AC_ARG_ENABLE([libtool-lock],
22929e7bcd65Smrg  [AS_HELP_STRING([--disable-libtool-lock],
22939e7bcd65Smrg    [avoid locking (might break parallel builds)])])
22949e7bcd65Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
22959e7bcd65Smrg
22969e7bcd65Smrg# Some flags need to be propagated to the compiler or linker for good
22979e7bcd65Smrg# libtool support.
22989e7bcd65Smrgcase $host in
22999e7bcd65Smrgia64-*-hpux*)
23009e7bcd65Smrg  # Find out which ABI we are using.
23019e7bcd65Smrg  echo 'int i;' > conftest.$ac_ext
23029e7bcd65Smrg  if AC_TRY_EVAL(ac_compile); then
23039e7bcd65Smrg    case `/usr/bin/file conftest.$ac_objext` in
23049e7bcd65Smrg      *ELF-32*)
23059e7bcd65Smrg	HPUX_IA64_MODE="32"
23069e7bcd65Smrg	;;
23079e7bcd65Smrg      *ELF-64*)
23089e7bcd65Smrg	HPUX_IA64_MODE="64"
23099e7bcd65Smrg	;;
23109e7bcd65Smrg    esac
2311bdf0f55dSmrg  fi
23129e7bcd65Smrg  rm -rf conftest*
23139e7bcd65Smrg  ;;
23149e7bcd65Smrg*-*-irix6*)
23159e7bcd65Smrg  # Find out which ABI we are using.
23169e7bcd65Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
23179e7bcd65Smrg  if AC_TRY_EVAL(ac_compile); then
23189e7bcd65Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
23199e7bcd65Smrg      case `/usr/bin/file conftest.$ac_objext` in
23209e7bcd65Smrg	*32-bit*)
23219e7bcd65Smrg	  LD="${LD-ld} -melf32bsmip"
23229e7bcd65Smrg	  ;;
23239e7bcd65Smrg	*N32*)
23249e7bcd65Smrg	  LD="${LD-ld} -melf32bmipn32"
23259e7bcd65Smrg	  ;;
23269e7bcd65Smrg	*64-bit*)
23279e7bcd65Smrg	  LD="${LD-ld} -melf64bmip"
23289e7bcd65Smrg	;;
23299e7bcd65Smrg      esac
23309e7bcd65Smrg    else
23319e7bcd65Smrg      case `/usr/bin/file conftest.$ac_objext` in
23329e7bcd65Smrg	*32-bit*)
23339e7bcd65Smrg	  LD="${LD-ld} -32"
23349e7bcd65Smrg	  ;;
23359e7bcd65Smrg	*N32*)
23369e7bcd65Smrg	  LD="${LD-ld} -n32"
23379e7bcd65Smrg	  ;;
23389e7bcd65Smrg	*64-bit*)
23399e7bcd65Smrg	  LD="${LD-ld} -64"
23409e7bcd65Smrg	  ;;
23419e7bcd65Smrg      esac
23429e7bcd65Smrg    fi
23439e7bcd65Smrg  fi
23449e7bcd65Smrg  rm -rf conftest*
23459e7bcd65Smrg  ;;
2346444c061aSmrg
23479e7bcd65Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
23489e7bcd65Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
23499e7bcd65Smrg  # Find out which ABI we are using.
23509e7bcd65Smrg  echo 'int i;' > conftest.$ac_ext
23519e7bcd65Smrg  if AC_TRY_EVAL(ac_compile); then
23529e7bcd65Smrg    case `/usr/bin/file conftest.o` in
23539e7bcd65Smrg      *32-bit*)
23549e7bcd65Smrg	case $host in
23559e7bcd65Smrg	  x86_64-*kfreebsd*-gnu)
23569e7bcd65Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
23579e7bcd65Smrg	    ;;
23589e7bcd65Smrg	  x86_64-*linux*)
23599e7bcd65Smrg	    LD="${LD-ld} -m elf_i386"
23609e7bcd65Smrg	    ;;
23619e7bcd65Smrg	  ppc64-*linux*|powerpc64-*linux*)
23629e7bcd65Smrg	    LD="${LD-ld} -m elf32ppclinux"
23639e7bcd65Smrg	    ;;
23649e7bcd65Smrg	  s390x-*linux*)
23659e7bcd65Smrg	    LD="${LD-ld} -m elf_s390"
23669e7bcd65Smrg	    ;;
23679e7bcd65Smrg	  sparc64-*linux*)
23689e7bcd65Smrg	    LD="${LD-ld} -m elf32_sparc"
23699e7bcd65Smrg	    ;;
23709e7bcd65Smrg	esac
23719e7bcd65Smrg	;;
23729e7bcd65Smrg      *64-bit*)
23739e7bcd65Smrg	case $host in
23749e7bcd65Smrg	  x86_64-*kfreebsd*-gnu)
23759e7bcd65Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
23769e7bcd65Smrg	    ;;
23779e7bcd65Smrg	  x86_64-*linux*)
23789e7bcd65Smrg	    LD="${LD-ld} -m elf_x86_64"
23799e7bcd65Smrg	    ;;
23809e7bcd65Smrg	  ppc*-*linux*|powerpc*-*linux*)
23819e7bcd65Smrg	    LD="${LD-ld} -m elf64ppc"
23829e7bcd65Smrg	    ;;
23839e7bcd65Smrg	  s390*-*linux*|s390*-*tpf*)
23849e7bcd65Smrg	    LD="${LD-ld} -m elf64_s390"
23859e7bcd65Smrg	    ;;
23869e7bcd65Smrg	  sparc*-*linux*)
23879e7bcd65Smrg	    LD="${LD-ld} -m elf64_sparc"
23889e7bcd65Smrg	    ;;
23899e7bcd65Smrg	esac
23909e7bcd65Smrg	;;
23919e7bcd65Smrg    esac
23929e7bcd65Smrg  fi
23939e7bcd65Smrg  rm -rf conftest*
23949e7bcd65Smrg  ;;
23951477040fSmrg
23969e7bcd65Smrg*-*-sco3.2v5*)
23979e7bcd65Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
23989e7bcd65Smrg  SAVE_CFLAGS="$CFLAGS"
23999e7bcd65Smrg  CFLAGS="$CFLAGS -belf"
24009e7bcd65Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
24019e7bcd65Smrg    [AC_LANG_PUSH(C)
24029e7bcd65Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
24039e7bcd65Smrg     AC_LANG_POP])
24049e7bcd65Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
24059e7bcd65Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
24069e7bcd65Smrg    CFLAGS="$SAVE_CFLAGS"
24079e7bcd65Smrg  fi
24089e7bcd65Smrg  ;;
24099e7bcd65Smrg*-*solaris*)
24109e7bcd65Smrg  # Find out which ABI we are using.
24119e7bcd65Smrg  echo 'int i;' > conftest.$ac_ext
24129e7bcd65Smrg  if AC_TRY_EVAL(ac_compile); then
24139e7bcd65Smrg    case `/usr/bin/file conftest.o` in
24149e7bcd65Smrg    *64-bit*)
24159e7bcd65Smrg      case $lt_cv_prog_gnu_ld in
24169e7bcd65Smrg      yes*)
24179e7bcd65Smrg        case $host in
24189e7bcd65Smrg        i?86-*-solaris*)
24199e7bcd65Smrg          LD="${LD-ld} -m elf_x86_64"
24209e7bcd65Smrg          ;;
24219e7bcd65Smrg        sparc*-*-solaris*)
24229e7bcd65Smrg          LD="${LD-ld} -m elf64_sparc"
24239e7bcd65Smrg          ;;
24249e7bcd65Smrg        esac
24259e7bcd65Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
24269e7bcd65Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
24279e7bcd65Smrg          LD="${LD-ld}_sol2"
24289e7bcd65Smrg        fi
24299e7bcd65Smrg        ;;
24309e7bcd65Smrg      *)
24319e7bcd65Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
24329e7bcd65Smrg	  LD="${LD-ld} -64"
24339e7bcd65Smrg	fi
24349e7bcd65Smrg	;;
24359e7bcd65Smrg      esac
2436bdf0f55dSmrg      ;;
2437bdf0f55dSmrg    esac
24389e7bcd65Smrg  fi
24399e7bcd65Smrg  rm -rf conftest*
24409e7bcd65Smrg  ;;
24419e7bcd65Smrgesac
24429e7bcd65Smrg
24439e7bcd65Smrgneed_locks="$enable_libtool_lock"
24449e7bcd65Smrg])# _LT_ENABLE_LOCK
24459e7bcd65Smrg
24469e7bcd65Smrg
24479e7bcd65Smrg# _LT_PROG_AR
24489e7bcd65Smrg# -----------
24499e7bcd65Smrgm4_defun([_LT_PROG_AR],
24509e7bcd65Smrg[AC_CHECK_TOOLS(AR, [ar], false)
24519e7bcd65Smrg: ${AR=ar}
24529e7bcd65Smrg: ${AR_FLAGS=cru}
24539e7bcd65Smrg_LT_DECL([], [AR], [1], [The archiver])
24549e7bcd65Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
24559e7bcd65Smrg
24569e7bcd65SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
24579e7bcd65Smrg  [lt_cv_ar_at_file=no
24589e7bcd65Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
24599e7bcd65Smrg     [echo conftest.$ac_objext > conftest.lst
24609e7bcd65Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
24619e7bcd65Smrg      AC_TRY_EVAL([lt_ar_try])
24629e7bcd65Smrg      if test "$ac_status" -eq 0; then
24639e7bcd65Smrg	# Ensure the archiver fails upon bogus file names.
24649e7bcd65Smrg	rm -f conftest.$ac_objext libconftest.a
24659e7bcd65Smrg	AC_TRY_EVAL([lt_ar_try])
24669e7bcd65Smrg	if test "$ac_status" -ne 0; then
24679e7bcd65Smrg          lt_cv_ar_at_file=@
24689e7bcd65Smrg        fi
2469bdf0f55dSmrg      fi
24709e7bcd65Smrg      rm -f conftest.* libconftest.a
24719e7bcd65Smrg     ])
24729e7bcd65Smrg  ])
2473249c3046Smrg
24749e7bcd65Smrgif test "x$lt_cv_ar_at_file" = xno; then
24759e7bcd65Smrg  archiver_list_spec=
2476bdf0f55dSmrgelse
24779e7bcd65Smrg  archiver_list_spec=$lt_cv_ar_at_file
24781477040fSmrgfi
24799e7bcd65Smrg_LT_DECL([], [archiver_list_spec], [1],
24809e7bcd65Smrg  [How to feed a file listing to the archiver])
24819e7bcd65Smrg])# _LT_PROG_AR
2482249c3046Smrg
2483444c061aSmrg
24849e7bcd65Smrg# _LT_CMD_OLD_ARCHIVE
24859e7bcd65Smrg# -------------------
24869e7bcd65Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
24879e7bcd65Smrg[_LT_PROG_AR
24889e7bcd65Smrg
24899e7bcd65SmrgAC_CHECK_TOOL(STRIP, strip, :)
24909e7bcd65Smrgtest -z "$STRIP" && STRIP=:
24919e7bcd65Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
24929e7bcd65Smrg
24939e7bcd65SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
24949e7bcd65Smrgtest -z "$RANLIB" && RANLIB=:
24959e7bcd65Smrg_LT_DECL([], [RANLIB], [1],
24969e7bcd65Smrg    [Commands used to install an old-style archive])
24979e7bcd65Smrg
24989e7bcd65Smrg# Determine commands to create old-style static archives.
24999e7bcd65Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
25009e7bcd65Smrgold_postinstall_cmds='chmod 644 $oldlib'
25019e7bcd65Smrgold_postuninstall_cmds=
25029e7bcd65Smrg
25039e7bcd65Smrgif test -n "$RANLIB"; then
25049e7bcd65Smrg  case $host_os in
25059e7bcd65Smrg  openbsd*)
25069e7bcd65Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
25079e7bcd65Smrg    ;;
25089e7bcd65Smrg  *)
25099e7bcd65Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
25109e7bcd65Smrg    ;;
25119e7bcd65Smrg  esac
25129e7bcd65Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
25139e7bcd65Smrgfi
25141477040fSmrg
25159e7bcd65Smrgcase $host_os in
25169e7bcd65Smrg  darwin*)
25179e7bcd65Smrg    lock_old_archive_extraction=yes ;;
25189e7bcd65Smrg  *)
25199e7bcd65Smrg    lock_old_archive_extraction=no ;;
25209e7bcd65Smrgesac
25219e7bcd65Smrg_LT_DECL([], [old_postinstall_cmds], [2])
25229e7bcd65Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
25239e7bcd65Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
25249e7bcd65Smrg    [Commands used to build an old-style archive])
25259e7bcd65Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
25269e7bcd65Smrg    [Whether to use a lock for old archive extraction])
25279e7bcd65Smrg])# _LT_CMD_OLD_ARCHIVE
25289e7bcd65Smrg
25299e7bcd65Smrg
25309e7bcd65Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
25319e7bcd65Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
25329e7bcd65Smrg# ----------------------------------------------------------------
25339e7bcd65Smrg# Check whether the given compiler option works
25349e7bcd65SmrgAC_DEFUN([_LT_COMPILER_OPTION],
25359e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
25369e7bcd65Smrgm4_require([_LT_DECL_SED])dnl
25379e7bcd65SmrgAC_CACHE_CHECK([$1], [$2],
25389e7bcd65Smrg  [$2=no
25399e7bcd65Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
25409e7bcd65Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
25419e7bcd65Smrg   lt_compiler_flag="$3"
25429e7bcd65Smrg   # Insert the option either (1) after the last *FLAGS variable, or
25439e7bcd65Smrg   # (2) before a word containing "conftest.", or (3) at the end.
25449e7bcd65Smrg   # Note that $ac_compile itself does not contain backslashes and begins
25459e7bcd65Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
25469e7bcd65Smrg   # The option is referenced via a variable to avoid confusing sed.
25479e7bcd65Smrg   lt_compile=`echo "$ac_compile" | $SED \
25489e7bcd65Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
25499e7bcd65Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
25509e7bcd65Smrg   -e 's:$: $lt_compiler_flag:'`
25519e7bcd65Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
25529e7bcd65Smrg   (eval "$lt_compile" 2>conftest.err)
25539e7bcd65Smrg   ac_status=$?
25549e7bcd65Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
25559e7bcd65Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
25569e7bcd65Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
25579e7bcd65Smrg     # The compiler can only warn and ignore the option if not recognized
25589e7bcd65Smrg     # So say no if there are warnings other than the usual output.
25599e7bcd65Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
25609e7bcd65Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
25619e7bcd65Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
25629e7bcd65Smrg       $2=yes
25639e7bcd65Smrg     fi
25649e7bcd65Smrg   fi
25659e7bcd65Smrg   $RM conftest*
25669e7bcd65Smrg])
25671477040fSmrg
25689e7bcd65Smrgif test x"[$]$2" = xyes; then
25699e7bcd65Smrg    m4_if([$5], , :, [$5])
25709e7bcd65Smrgelse
25719e7bcd65Smrg    m4_if([$6], , :, [$6])
2572bdf0f55dSmrgfi
25739e7bcd65Smrg])# _LT_COMPILER_OPTION
25749e7bcd65Smrg
25759e7bcd65Smrg# Old name:
25769e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
25779e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
25789e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
25799e7bcd65Smrg
25809e7bcd65Smrg
25819e7bcd65Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
25829e7bcd65Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
25839e7bcd65Smrg# ----------------------------------------------------
25849e7bcd65Smrg# Check whether the given linker option works
25859e7bcd65SmrgAC_DEFUN([_LT_LINKER_OPTION],
25869e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
25879e7bcd65Smrgm4_require([_LT_DECL_SED])dnl
25889e7bcd65SmrgAC_CACHE_CHECK([$1], [$2],
25899e7bcd65Smrg  [$2=no
25909e7bcd65Smrg   save_LDFLAGS="$LDFLAGS"
25919e7bcd65Smrg   LDFLAGS="$LDFLAGS $3"
25929e7bcd65Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
25939e7bcd65Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
25949e7bcd65Smrg     # The linker can only warn and ignore the option if not recognized
25959e7bcd65Smrg     # So say no if there are warnings
25969e7bcd65Smrg     if test -s conftest.err; then
25979e7bcd65Smrg       # Append any errors to the config.log.
25989e7bcd65Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
25999e7bcd65Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
26009e7bcd65Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
26019e7bcd65Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
26029e7bcd65Smrg         $2=yes
26039e7bcd65Smrg       fi
26049e7bcd65Smrg     else
26059e7bcd65Smrg       $2=yes
26069e7bcd65Smrg     fi
26079e7bcd65Smrg   fi
26089e7bcd65Smrg   $RM -r conftest*
26099e7bcd65Smrg   LDFLAGS="$save_LDFLAGS"
2610249c3046Smrg])
2611444c061aSmrg
26129e7bcd65Smrgif test x"[$]$2" = xyes; then
26139e7bcd65Smrg    m4_if([$4], , :, [$4])
26149e7bcd65Smrgelse
26159e7bcd65Smrg    m4_if([$5], , :, [$5])
26169e7bcd65Smrgfi
26179e7bcd65Smrg])# _LT_LINKER_OPTION
26189e7bcd65Smrg
26199e7bcd65Smrg# Old name:
26209e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
26219e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
26229e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
26239e7bcd65Smrg
26249e7bcd65Smrg
26259e7bcd65Smrg# LT_CMD_MAX_LEN
26269e7bcd65Smrg#---------------
26279e7bcd65SmrgAC_DEFUN([LT_CMD_MAX_LEN],
26289e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
26299e7bcd65Smrg# find the maximum length of command line arguments
26309e7bcd65SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
26319e7bcd65SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
26329e7bcd65Smrg  i=0
26339e7bcd65Smrg  teststring="ABCD"
26349e7bcd65Smrg
26359e7bcd65Smrg  case $build_os in
26369e7bcd65Smrg  msdosdjgpp*)
26379e7bcd65Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
26389e7bcd65Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
26399e7bcd65Smrg    # during glob expansion).  Even if it were fixed, the result of this
26409e7bcd65Smrg    # check would be larger than it should be.
26419e7bcd65Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
26429e7bcd65Smrg    ;;
26432265a131Smrg
26449e7bcd65Smrg  gnu*)
26459e7bcd65Smrg    # Under GNU Hurd, this test is not required because there is
26469e7bcd65Smrg    # no limit to the length of command line arguments.
26479e7bcd65Smrg    # Libtool will interpret -1 as no limit whatsoever
26489e7bcd65Smrg    lt_cv_sys_max_cmd_len=-1;
26499e7bcd65Smrg    ;;
2650444c061aSmrg
26519e7bcd65Smrg  cygwin* | mingw* | cegcc*)
26529e7bcd65Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
26539e7bcd65Smrg    # about 5 minutes as the teststring grows exponentially.
26549e7bcd65Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
26559e7bcd65Smrg    # you end up with a "frozen" computer, even though with patience
26569e7bcd65Smrg    # the test eventually succeeds (with a max line length of 256k).
26579e7bcd65Smrg    # Instead, let's just punt: use the minimum linelength reported by
26589e7bcd65Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
26599e7bcd65Smrg    lt_cv_sys_max_cmd_len=8192;
26609e7bcd65Smrg    ;;
2661444c061aSmrg
26629e7bcd65Smrg  mint*)
26639e7bcd65Smrg    # On MiNT this can take a long time and run out of memory.
26649e7bcd65Smrg    lt_cv_sys_max_cmd_len=8192;
26659e7bcd65Smrg    ;;
26669e7bcd65Smrg
26679e7bcd65Smrg  amigaos*)
26689e7bcd65Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
26699e7bcd65Smrg    # So we just punt and use a minimum line length of 8192.
26709e7bcd65Smrg    lt_cv_sys_max_cmd_len=8192;
26719e7bcd65Smrg    ;;
26729e7bcd65Smrg
26739e7bcd65Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
26749e7bcd65Smrg    # This has been around since 386BSD, at least.  Likely further.
26759e7bcd65Smrg    if test -x /sbin/sysctl; then
26769e7bcd65Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
26779e7bcd65Smrg    elif test -x /usr/sbin/sysctl; then
26789e7bcd65Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
2679bdf0f55dSmrg    else
26809e7bcd65Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
2681bdf0f55dSmrg    fi
26829e7bcd65Smrg    # And add a safety zone
26839e7bcd65Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
26849e7bcd65Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
26859e7bcd65Smrg    ;;
2686444c061aSmrg
26879e7bcd65Smrg  interix*)
26889e7bcd65Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
26899e7bcd65Smrg    lt_cv_sys_max_cmd_len=196608
26909e7bcd65Smrg    ;;
2691444c061aSmrg
26929e7bcd65Smrg  os2*)
26939e7bcd65Smrg    # The test takes a long time on OS/2.
26949e7bcd65Smrg    lt_cv_sys_max_cmd_len=8192
26959e7bcd65Smrg    ;;
26969e7bcd65Smrg
26979e7bcd65Smrg  osf*)
26989e7bcd65Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
26999e7bcd65Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
27009e7bcd65Smrg    # nice to cause kernel panics so lets avoid the loop below.
27019e7bcd65Smrg    # First set a reasonable default.
27029e7bcd65Smrg    lt_cv_sys_max_cmd_len=16384
27039e7bcd65Smrg    #
27049e7bcd65Smrg    if test -x /sbin/sysconfig; then
27059e7bcd65Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
27069e7bcd65Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
27079e7bcd65Smrg      esac
27089e7bcd65Smrg    fi
27099e7bcd65Smrg    ;;
27109e7bcd65Smrg  sco3.2v5*)
27119e7bcd65Smrg    lt_cv_sys_max_cmd_len=102400
27129e7bcd65Smrg    ;;
27139e7bcd65Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
27149e7bcd65Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
27159e7bcd65Smrg    if test -n "$kargmax"; then
27169e7bcd65Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
27179e7bcd65Smrg    else
27189e7bcd65Smrg      lt_cv_sys_max_cmd_len=32768
27199e7bcd65Smrg    fi
27209e7bcd65Smrg    ;;
27219e7bcd65Smrg  *)
27229e7bcd65Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
27239e7bcd65Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
27249e7bcd65Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
27259e7bcd65Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
27269e7bcd65Smrg    else
27279e7bcd65Smrg      # Make teststring a little bigger before we do anything with it.
27289e7bcd65Smrg      # a 1K string should be a reasonable start.
27299e7bcd65Smrg      for i in 1 2 3 4 5 6 7 8 ; do
27309e7bcd65Smrg        teststring=$teststring$teststring
27319e7bcd65Smrg      done
27329e7bcd65Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
27339e7bcd65Smrg      # If test is not a shell built-in, we'll probably end up computing a
27349e7bcd65Smrg      # maximum length that is only half of the actual maximum length, but
27359e7bcd65Smrg      # we can't tell.
27369e7bcd65Smrg      while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \
27379e7bcd65Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
27389e7bcd65Smrg	      test $i != 17 # 1/2 MB should be enough
27399e7bcd65Smrg      do
27409e7bcd65Smrg        i=`expr $i + 1`
27419e7bcd65Smrg        teststring=$teststring$teststring
27429e7bcd65Smrg      done
27439e7bcd65Smrg      # Only check the string length outside the loop.
27449e7bcd65Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
27459e7bcd65Smrg      teststring=
27469e7bcd65Smrg      # Add a significant safety factor because C++ compilers can tack on
27479e7bcd65Smrg      # massive amounts of additional arguments before passing them to the
27489e7bcd65Smrg      # linker.  It appears as though 1/2 is a usable value.
27499e7bcd65Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
27509e7bcd65Smrg    fi
27519e7bcd65Smrg    ;;
27529e7bcd65Smrg  esac
2753bdf0f55dSmrg])
27549e7bcd65Smrgif test -n $lt_cv_sys_max_cmd_len ; then
27559e7bcd65Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
27569e7bcd65Smrgelse
27579e7bcd65Smrg  AC_MSG_RESULT(none)
27589e7bcd65Smrgfi
27599e7bcd65Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
27609e7bcd65Smrg_LT_DECL([], [max_cmd_len], [0],
27619e7bcd65Smrg    [What is the maximum length of a command?])
27629e7bcd65Smrg])# LT_CMD_MAX_LEN
27639e7bcd65Smrg
27649e7bcd65Smrg# Old name:
27659e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
27669e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
27679e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
27689e7bcd65Smrg
27699e7bcd65Smrg
27709e7bcd65Smrg# _LT_HEADER_DLFCN
27719e7bcd65Smrg# ----------------
27729e7bcd65Smrgm4_defun([_LT_HEADER_DLFCN],
27739e7bcd65Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
27749e7bcd65Smrg])# _LT_HEADER_DLFCN
27759e7bcd65Smrg
27769e7bcd65Smrg
27779e7bcd65Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
27789e7bcd65Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
27799e7bcd65Smrg# ----------------------------------------------------------------
27809e7bcd65Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
27819e7bcd65Smrg[m4_require([_LT_HEADER_DLFCN])dnl
27829e7bcd65Smrgif test "$cross_compiling" = yes; then :
27839e7bcd65Smrg  [$4]
27849e7bcd65Smrgelse
27859e7bcd65Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
27869e7bcd65Smrg  lt_status=$lt_dlunknown
27879e7bcd65Smrg  cat > conftest.$ac_ext <<_LT_EOF
27889e7bcd65Smrg[#line $LINENO "configure"
27899e7bcd65Smrg#include "confdefs.h"
27909e7bcd65Smrg
27919e7bcd65Smrg#if HAVE_DLFCN_H
27929e7bcd65Smrg#include <dlfcn.h>
27939e7bcd65Smrg#endif
27949e7bcd65Smrg
27959e7bcd65Smrg#include <stdio.h>
27969e7bcd65Smrg
27979e7bcd65Smrg#ifdef RTLD_GLOBAL
27989e7bcd65Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
27999e7bcd65Smrg#else
28009e7bcd65Smrg#  ifdef DL_GLOBAL
28019e7bcd65Smrg#    define LT_DLGLOBAL		DL_GLOBAL
28029e7bcd65Smrg#  else
28039e7bcd65Smrg#    define LT_DLGLOBAL		0
28049e7bcd65Smrg#  endif
28059e7bcd65Smrg#endif
28069e7bcd65Smrg
28079e7bcd65Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
28089e7bcd65Smrg   find out it does not work in some platform. */
28099e7bcd65Smrg#ifndef LT_DLLAZY_OR_NOW
28109e7bcd65Smrg#  ifdef RTLD_LAZY
28119e7bcd65Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
28129e7bcd65Smrg#  else
28139e7bcd65Smrg#    ifdef DL_LAZY
28149e7bcd65Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
28159e7bcd65Smrg#    else
28169e7bcd65Smrg#      ifdef RTLD_NOW
28179e7bcd65Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
28189e7bcd65Smrg#      else
28199e7bcd65Smrg#        ifdef DL_NOW
28209e7bcd65Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
28219e7bcd65Smrg#        else
28229e7bcd65Smrg#          define LT_DLLAZY_OR_NOW	0
28239e7bcd65Smrg#        endif
28249e7bcd65Smrg#      endif
28259e7bcd65Smrg#    endif
28269e7bcd65Smrg#  endif
28279e7bcd65Smrg#endif
28289e7bcd65Smrg
28299e7bcd65Smrg/* When -fvisbility=hidden is used, assume the code has been annotated
28309e7bcd65Smrg   correspondingly for the symbols needed.  */
28319e7bcd65Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
28329e7bcd65Smrgint fnord () __attribute__((visibility("default")));
28339e7bcd65Smrg#endif
28349e7bcd65Smrg
28359e7bcd65Smrgint fnord () { return 42; }
28369e7bcd65Smrgint main ()
28379e7bcd65Smrg{
28389e7bcd65Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
28399e7bcd65Smrg  int status = $lt_dlunknown;
28409e7bcd65Smrg
28419e7bcd65Smrg  if (self)
28429e7bcd65Smrg    {
28439e7bcd65Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
28449e7bcd65Smrg      else
28459e7bcd65Smrg        {
28469e7bcd65Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
28479e7bcd65Smrg          else puts (dlerror ());
28489e7bcd65Smrg	}
28499e7bcd65Smrg      /* dlclose (self); */
28509e7bcd65Smrg    }
28519e7bcd65Smrg  else
28529e7bcd65Smrg    puts (dlerror ());
28539e7bcd65Smrg
28549e7bcd65Smrg  return status;
28559e7bcd65Smrg}]
28569e7bcd65Smrg_LT_EOF
28579e7bcd65Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
28589e7bcd65Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
28599e7bcd65Smrg    lt_status=$?
28609e7bcd65Smrg    case x$lt_status in
28619e7bcd65Smrg      x$lt_dlno_uscore) $1 ;;
28629e7bcd65Smrg      x$lt_dlneed_uscore) $2 ;;
28639e7bcd65Smrg      x$lt_dlunknown|x*) $3 ;;
28649e7bcd65Smrg    esac
28659e7bcd65Smrg  else :
28669e7bcd65Smrg    # compilation failed
28679e7bcd65Smrg    $3
28689e7bcd65Smrg  fi
28699e7bcd65Smrgfi
28709e7bcd65Smrgrm -fr conftest*
28719e7bcd65Smrg])# _LT_TRY_DLOPEN_SELF
28729e7bcd65Smrg
28739e7bcd65Smrg
28749e7bcd65Smrg# LT_SYS_DLOPEN_SELF
28759e7bcd65Smrg# ------------------
28769e7bcd65SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
28779e7bcd65Smrg[m4_require([_LT_HEADER_DLFCN])dnl
28789e7bcd65Smrgif test "x$enable_dlopen" != xyes; then
28799e7bcd65Smrg  enable_dlopen=unknown
28809e7bcd65Smrg  enable_dlopen_self=unknown
28819e7bcd65Smrg  enable_dlopen_self_static=unknown
28829e7bcd65Smrgelse
28839e7bcd65Smrg  lt_cv_dlopen=no
28849e7bcd65Smrg  lt_cv_dlopen_libs=
28859e7bcd65Smrg
28869e7bcd65Smrg  case $host_os in
28879e7bcd65Smrg  beos*)
28889e7bcd65Smrg    lt_cv_dlopen="load_add_on"
28899e7bcd65Smrg    lt_cv_dlopen_libs=
28909e7bcd65Smrg    lt_cv_dlopen_self=yes
28919e7bcd65Smrg    ;;
28929e7bcd65Smrg
28939e7bcd65Smrg  mingw* | pw32* | cegcc*)
28949e7bcd65Smrg    lt_cv_dlopen="LoadLibrary"
28959e7bcd65Smrg    lt_cv_dlopen_libs=
28969e7bcd65Smrg    ;;
28979e7bcd65Smrg
28989e7bcd65Smrg  cygwin*)
28999e7bcd65Smrg    lt_cv_dlopen="dlopen"
29009e7bcd65Smrg    lt_cv_dlopen_libs=
29019e7bcd65Smrg    ;;
29029e7bcd65Smrg
29039e7bcd65Smrg  darwin*)
29049e7bcd65Smrg  # if libdl is installed we need to link against it
29059e7bcd65Smrg    AC_CHECK_LIB([dl], [dlopen],
29069e7bcd65Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
29079e7bcd65Smrg    lt_cv_dlopen="dyld"
29089e7bcd65Smrg    lt_cv_dlopen_libs=
29099e7bcd65Smrg    lt_cv_dlopen_self=yes
29109e7bcd65Smrg    ])
29119e7bcd65Smrg    ;;
29129e7bcd65Smrg
29139e7bcd65Smrg  *)
29149e7bcd65Smrg    AC_CHECK_FUNC([shl_load],
29159e7bcd65Smrg	  [lt_cv_dlopen="shl_load"],
29169e7bcd65Smrg      [AC_CHECK_LIB([dld], [shl_load],
29179e7bcd65Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
29189e7bcd65Smrg	[AC_CHECK_FUNC([dlopen],
29199e7bcd65Smrg	      [lt_cv_dlopen="dlopen"],
29209e7bcd65Smrg	  [AC_CHECK_LIB([dl], [dlopen],
29219e7bcd65Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
29229e7bcd65Smrg	    [AC_CHECK_LIB([svld], [dlopen],
29239e7bcd65Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
29249e7bcd65Smrg	      [AC_CHECK_LIB([dld], [dld_link],
29259e7bcd65Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
29269e7bcd65Smrg	      ])
29279e7bcd65Smrg	    ])
29289e7bcd65Smrg	  ])
29299e7bcd65Smrg	])
29309e7bcd65Smrg      ])
29319e7bcd65Smrg    ;;
29329e7bcd65Smrg  esac
29339e7bcd65Smrg
29349e7bcd65Smrg  if test "x$lt_cv_dlopen" != xno; then
29359e7bcd65Smrg    enable_dlopen=yes
29369e7bcd65Smrg  else
29379e7bcd65Smrg    enable_dlopen=no
29389e7bcd65Smrg  fi
29399e7bcd65Smrg
29409e7bcd65Smrg  case $lt_cv_dlopen in
29419e7bcd65Smrg  dlopen)
29429e7bcd65Smrg    save_CPPFLAGS="$CPPFLAGS"
29439e7bcd65Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
29449e7bcd65Smrg
29459e7bcd65Smrg    save_LDFLAGS="$LDFLAGS"
29469e7bcd65Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
29479e7bcd65Smrg
29489e7bcd65Smrg    save_LIBS="$LIBS"
29499e7bcd65Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
29509e7bcd65Smrg
29519e7bcd65Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
29529e7bcd65Smrg	  lt_cv_dlopen_self, [dnl
29539e7bcd65Smrg	  _LT_TRY_DLOPEN_SELF(
29549e7bcd65Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
29559e7bcd65Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
29569e7bcd65Smrg    ])
29579e7bcd65Smrg
29589e7bcd65Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
29599e7bcd65Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
29609e7bcd65Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
29619e7bcd65Smrg	  lt_cv_dlopen_self_static, [dnl
29629e7bcd65Smrg	  _LT_TRY_DLOPEN_SELF(
29639e7bcd65Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
29649e7bcd65Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
29659e7bcd65Smrg      ])
29669e7bcd65Smrg    fi
29679e7bcd65Smrg
29689e7bcd65Smrg    CPPFLAGS="$save_CPPFLAGS"
29699e7bcd65Smrg    LDFLAGS="$save_LDFLAGS"
29709e7bcd65Smrg    LIBS="$save_LIBS"
29719e7bcd65Smrg    ;;
29729e7bcd65Smrg  esac
29739e7bcd65Smrg
29749e7bcd65Smrg  case $lt_cv_dlopen_self in
29759e7bcd65Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
29769e7bcd65Smrg  *) enable_dlopen_self=unknown ;;
29779e7bcd65Smrg  esac
29789e7bcd65Smrg
29799e7bcd65Smrg  case $lt_cv_dlopen_self_static in
29809e7bcd65Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
29819e7bcd65Smrg  *) enable_dlopen_self_static=unknown ;;
29829e7bcd65Smrg  esac
29839e7bcd65Smrgfi
29849e7bcd65Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
29859e7bcd65Smrg	 [Whether dlopen is supported])
29869e7bcd65Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
29879e7bcd65Smrg	 [Whether dlopen of programs is supported])
29889e7bcd65Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
29899e7bcd65Smrg	 [Whether dlopen of statically linked programs is supported])
29909e7bcd65Smrg])# LT_SYS_DLOPEN_SELF
29919e7bcd65Smrg
29929e7bcd65Smrg# Old name:
29939e7bcd65SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
29949e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
29959e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
29969e7bcd65Smrg
29979e7bcd65Smrg
29989e7bcd65Smrg# _LT_COMPILER_C_O([TAGNAME])
29999e7bcd65Smrg# ---------------------------
30009e7bcd65Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
30019e7bcd65Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
30029e7bcd65Smrgm4_defun([_LT_COMPILER_C_O],
30039e7bcd65Smrg[m4_require([_LT_DECL_SED])dnl
30049e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
30059e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl
30069e7bcd65SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
30079e7bcd65Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
30089e7bcd65Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
30099e7bcd65Smrg   $RM -r conftest 2>/dev/null
30109e7bcd65Smrg   mkdir conftest
30119e7bcd65Smrg   cd conftest
30129e7bcd65Smrg   mkdir out
30139e7bcd65Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
30149e7bcd65Smrg
30159e7bcd65Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
30169e7bcd65Smrg   # Insert the option either (1) after the last *FLAGS variable, or
30179e7bcd65Smrg   # (2) before a word containing "conftest.", or (3) at the end.
30189e7bcd65Smrg   # Note that $ac_compile itself does not contain backslashes and begins
30199e7bcd65Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
30209e7bcd65Smrg   lt_compile=`echo "$ac_compile" | $SED \
30219e7bcd65Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
30229e7bcd65Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
30239e7bcd65Smrg   -e 's:$: $lt_compiler_flag:'`
30249e7bcd65Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
30259e7bcd65Smrg   (eval "$lt_compile" 2>out/conftest.err)
30269e7bcd65Smrg   ac_status=$?
30279e7bcd65Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
30289e7bcd65Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
30299e7bcd65Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
30309e7bcd65Smrg   then
30319e7bcd65Smrg     # The compiler can only warn and ignore the option if not recognized
30329e7bcd65Smrg     # So say no if there are warnings
30339e7bcd65Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
30349e7bcd65Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
30359e7bcd65Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
30369e7bcd65Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
30379e7bcd65Smrg     fi
30389e7bcd65Smrg   fi
30399e7bcd65Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
30409e7bcd65Smrg   $RM conftest*
30419e7bcd65Smrg   # SGI C++ compiler will create directory out/ii_files/ for
30429e7bcd65Smrg   # template instantiation
30439e7bcd65Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
30449e7bcd65Smrg   $RM out/* && rmdir out
30459e7bcd65Smrg   cd ..
30469e7bcd65Smrg   $RM -r conftest
30479e7bcd65Smrg   $RM conftest*
30489e7bcd65Smrg])
30499e7bcd65Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
30509e7bcd65Smrg	[Does compiler simultaneously support -c and -o options?])
30519e7bcd65Smrg])# _LT_COMPILER_C_O
30529e7bcd65Smrg
30539e7bcd65Smrg
30549e7bcd65Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
30559e7bcd65Smrg# ----------------------------------
30569e7bcd65Smrg# Check to see if we can do hard links to lock some files if needed
30579e7bcd65Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
30589e7bcd65Smrg[m4_require([_LT_ENABLE_LOCK])dnl
30599e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
30609e7bcd65Smrg_LT_COMPILER_C_O([$1])
30619e7bcd65Smrg
30629e7bcd65Smrghard_links="nottested"
30639e7bcd65Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
30649e7bcd65Smrg  # do not overwrite the value of need_locks provided by the user
30659e7bcd65Smrg  AC_MSG_CHECKING([if we can lock with hard links])
30669e7bcd65Smrg  hard_links=yes
30679e7bcd65Smrg  $RM conftest*
30689e7bcd65Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
30699e7bcd65Smrg  touch conftest.a
30709e7bcd65Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
30719e7bcd65Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
30729e7bcd65Smrg  AC_MSG_RESULT([$hard_links])
30739e7bcd65Smrg  if test "$hard_links" = no; then
30749e7bcd65Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
30759e7bcd65Smrg    need_locks=warn
30769e7bcd65Smrg  fi
30779e7bcd65Smrgelse
30789e7bcd65Smrg  need_locks=no
30799e7bcd65Smrgfi
30809e7bcd65Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
30819e7bcd65Smrg])# _LT_COMPILER_FILE_LOCKS
30829e7bcd65Smrg
30839e7bcd65Smrg
30849e7bcd65Smrg# _LT_CHECK_OBJDIR
30859e7bcd65Smrg# ----------------
30869e7bcd65Smrgm4_defun([_LT_CHECK_OBJDIR],
30879e7bcd65Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
30889e7bcd65Smrg[rm -f .libs 2>/dev/null
30899e7bcd65Smrgmkdir .libs 2>/dev/null
30909e7bcd65Smrgif test -d .libs; then
30919e7bcd65Smrg  lt_cv_objdir=.libs
30929e7bcd65Smrgelse
30939e7bcd65Smrg  # MS-DOS does not allow filenames that begin with a dot.
30949e7bcd65Smrg  lt_cv_objdir=_libs
30959e7bcd65Smrgfi
30969e7bcd65Smrgrmdir .libs 2>/dev/null])
30979e7bcd65Smrgobjdir=$lt_cv_objdir
30989e7bcd65Smrg_LT_DECL([], [objdir], [0],
30999e7bcd65Smrg         [The name of the directory that contains temporary libtool files])dnl
31009e7bcd65Smrgm4_pattern_allow([LT_OBJDIR])dnl
31019e7bcd65SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
31029e7bcd65Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
31039e7bcd65Smrg])# _LT_CHECK_OBJDIR
31049e7bcd65Smrg
31059e7bcd65Smrg
31069e7bcd65Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
31079e7bcd65Smrg# --------------------------------------
31089e7bcd65Smrg# Check hardcoding attributes.
31099e7bcd65Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
31109e7bcd65Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
31119e7bcd65Smrg_LT_TAGVAR(hardcode_action, $1)=
31129e7bcd65Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
31139e7bcd65Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
31149e7bcd65Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
31159e7bcd65Smrg
31169e7bcd65Smrg  # We can hardcode non-existent directories.
31179e7bcd65Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
31189e7bcd65Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
31199e7bcd65Smrg     # have to relink, otherwise we might link with an installed library
31209e7bcd65Smrg     # when we should be linking with a yet-to-be-installed one
31219e7bcd65Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
31229e7bcd65Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
31239e7bcd65Smrg    # Linking always hardcodes the temporary library directory.
31249e7bcd65Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
31259e7bcd65Smrg  else
31269e7bcd65Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
31279e7bcd65Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
31289e7bcd65Smrg  fi
31299e7bcd65Smrgelse
31309e7bcd65Smrg  # We cannot hardcode anything, or else we can only hardcode existing
31319e7bcd65Smrg  # directories.
31329e7bcd65Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
31339e7bcd65Smrgfi
31349e7bcd65SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
31359e7bcd65Smrg
31369e7bcd65Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
31379e7bcd65Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
31389e7bcd65Smrg  # Fast installation is not supported
31399e7bcd65Smrg  enable_fast_install=no
31409e7bcd65Smrgelif test "$shlibpath_overrides_runpath" = yes ||
31419e7bcd65Smrg     test "$enable_shared" = no; then
31429e7bcd65Smrg  # Fast installation is not necessary
31439e7bcd65Smrg  enable_fast_install=needless
31449e7bcd65Smrgfi
31459e7bcd65Smrg_LT_TAGDECL([], [hardcode_action], [0],
31469e7bcd65Smrg    [How to hardcode a shared library path into an executable])
31479e7bcd65Smrg])# _LT_LINKER_HARDCODE_LIBPATH
31489e7bcd65Smrg
31499e7bcd65Smrg
31509e7bcd65Smrg# _LT_CMD_STRIPLIB
31519e7bcd65Smrg# ----------------
31529e7bcd65Smrgm4_defun([_LT_CMD_STRIPLIB],
31539e7bcd65Smrg[m4_require([_LT_DECL_EGREP])
31549e7bcd65Smrgstriplib=
31559e7bcd65Smrgold_striplib=
31569e7bcd65SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
31579e7bcd65Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
31589e7bcd65Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
31599e7bcd65Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
31609e7bcd65Smrg  AC_MSG_RESULT([yes])
31619e7bcd65Smrgelse
31629e7bcd65Smrg# FIXME - insert some real tests, host_os isn't really good enough
31639e7bcd65Smrg  case $host_os in
31649e7bcd65Smrg  darwin*)
31659e7bcd65Smrg    if test -n "$STRIP" ; then
31669e7bcd65Smrg      striplib="$STRIP -x"
31679e7bcd65Smrg      old_striplib="$STRIP -S"
31689e7bcd65Smrg      AC_MSG_RESULT([yes])
31699e7bcd65Smrg    else
31709e7bcd65Smrg      AC_MSG_RESULT([no])
31719e7bcd65Smrg    fi
31729e7bcd65Smrg    ;;
31739e7bcd65Smrg  *)
31749e7bcd65Smrg    AC_MSG_RESULT([no])
31759e7bcd65Smrg    ;;
31769e7bcd65Smrg  esac
31779e7bcd65Smrgfi
31789e7bcd65Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
31799e7bcd65Smrg_LT_DECL([], [striplib], [1])
31809e7bcd65Smrg])# _LT_CMD_STRIPLIB
31819e7bcd65Smrg
31829e7bcd65Smrg
31839e7bcd65Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
31849e7bcd65Smrg# -----------------------------
31859e7bcd65Smrg# PORTME Fill in your ld.so characteristics
31869e7bcd65Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
31879e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
31889e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl
31899e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
31909e7bcd65Smrgm4_require([_LT_DECL_OBJDUMP])dnl
31919e7bcd65Smrgm4_require([_LT_DECL_SED])dnl
31929e7bcd65Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
31939e7bcd65SmrgAC_MSG_CHECKING([dynamic linker characteristics])
31949e7bcd65Smrgm4_if([$1],
31959e7bcd65Smrg	[], [
31969e7bcd65Smrgif test "$GCC" = yes; then
31979e7bcd65Smrg  case $host_os in
31989e7bcd65Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
31999e7bcd65Smrg    *) lt_awk_arg="/^libraries:/" ;;
32009e7bcd65Smrg  esac
32019e7bcd65Smrg  case $host_os in
32029e7bcd65Smrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
32039e7bcd65Smrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
32049e7bcd65Smrg  esac
32059e7bcd65Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
32069e7bcd65Smrg  case $lt_search_path_spec in
32079e7bcd65Smrg  *\;*)
32089e7bcd65Smrg    # if the path contains ";" then we assume it to be the separator
32099e7bcd65Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
32109e7bcd65Smrg    # assumed that no part of a normal pathname contains ";" but that should
32119e7bcd65Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
32129e7bcd65Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
32139e7bcd65Smrg    ;;
32149e7bcd65Smrg  *)
32159e7bcd65Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
32169e7bcd65Smrg    ;;
32179e7bcd65Smrg  esac
32189e7bcd65Smrg  # Ok, now we have the path, separated by spaces, we can step through it
32199e7bcd65Smrg  # and add multilib dir if necessary.
32209e7bcd65Smrg  lt_tmp_lt_search_path_spec=
32219e7bcd65Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
32229e7bcd65Smrg  for lt_sys_path in $lt_search_path_spec; do
32239e7bcd65Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
32249e7bcd65Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
32259e7bcd65Smrg    else
32269e7bcd65Smrg      test -d "$lt_sys_path" && \
32279e7bcd65Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
32289e7bcd65Smrg    fi
32299e7bcd65Smrg  done
32309e7bcd65Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
32319e7bcd65SmrgBEGIN {RS=" "; FS="/|\n";} {
32329e7bcd65Smrg  lt_foo="";
32339e7bcd65Smrg  lt_count=0;
32349e7bcd65Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
32359e7bcd65Smrg    if ($lt_i != "" && $lt_i != ".") {
32369e7bcd65Smrg      if ($lt_i == "..") {
32379e7bcd65Smrg        lt_count++;
32389e7bcd65Smrg      } else {
32399e7bcd65Smrg        if (lt_count == 0) {
32409e7bcd65Smrg          lt_foo="/" $lt_i lt_foo;
32419e7bcd65Smrg        } else {
32429e7bcd65Smrg          lt_count--;
32439e7bcd65Smrg        }
32449e7bcd65Smrg      }
32459e7bcd65Smrg    }
32469e7bcd65Smrg  }
32479e7bcd65Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
32489e7bcd65Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
32499e7bcd65Smrg}'`
32509e7bcd65Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
32519e7bcd65Smrg  # for these hosts.
32529e7bcd65Smrg  case $host_os in
32539e7bcd65Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
32549e7bcd65Smrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
32559e7bcd65Smrg  esac
32569e7bcd65Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
32579e7bcd65Smrgelse
32589e7bcd65Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
32599e7bcd65Smrgfi])
32609e7bcd65Smrglibrary_names_spec=
32619e7bcd65Smrglibname_spec='lib$name'
32629e7bcd65Smrgsoname_spec=
32639e7bcd65Smrgshrext_cmds=".so"
32649e7bcd65Smrgpostinstall_cmds=
32659e7bcd65Smrgpostuninstall_cmds=
32669e7bcd65Smrgfinish_cmds=
32679e7bcd65Smrgfinish_eval=
32689e7bcd65Smrgshlibpath_var=
32699e7bcd65Smrgshlibpath_overrides_runpath=unknown
32709e7bcd65Smrgversion_type=none
32719e7bcd65Smrgdynamic_linker="$host_os ld.so"
32729e7bcd65Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
32739e7bcd65Smrgneed_lib_prefix=unknown
32749e7bcd65Smrghardcode_into_libs=no
32759e7bcd65Smrg
32769e7bcd65Smrg# when you set need_version to no, make sure it does not cause -set_version
32779e7bcd65Smrg# flags to be left without arguments
32789e7bcd65Smrgneed_version=unknown
32799e7bcd65Smrg
32809e7bcd65Smrgcase $host_os in
32819e7bcd65Smrgaix3*)
32829e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
32839e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
32849e7bcd65Smrg  shlibpath_var=LIBPATH
32859e7bcd65Smrg
32869e7bcd65Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
32879e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
32889e7bcd65Smrg  ;;
32899e7bcd65Smrg
32909e7bcd65Smrgaix[[4-9]]*)
32919e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
32929e7bcd65Smrg  need_lib_prefix=no
32939e7bcd65Smrg  need_version=no
32949e7bcd65Smrg  hardcode_into_libs=yes
32959e7bcd65Smrg  if test "$host_cpu" = ia64; then
32969e7bcd65Smrg    # AIX 5 supports IA64
32979e7bcd65Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
32989e7bcd65Smrg    shlibpath_var=LD_LIBRARY_PATH
32999e7bcd65Smrg  else
33009e7bcd65Smrg    # With GCC up to 2.95.x, collect2 would create an import file
33019e7bcd65Smrg    # for dependence libraries.  The import file would start with
33029e7bcd65Smrg    # the line `#! .'.  This would cause the generated library to
33039e7bcd65Smrg    # depend on `.', always an invalid library.  This was fixed in
33049e7bcd65Smrg    # development snapshots of GCC prior to 3.0.
33059e7bcd65Smrg    case $host_os in
33069e7bcd65Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
33079e7bcd65Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
33089e7bcd65Smrg	   echo ' yes '
33099e7bcd65Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
33109e7bcd65Smrg	:
33119e7bcd65Smrg      else
33129e7bcd65Smrg	can_build_shared=no
33139e7bcd65Smrg      fi
33149e7bcd65Smrg      ;;
33159e7bcd65Smrg    esac
33169e7bcd65Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
33179e7bcd65Smrg    # soname into executable. Probably we can add versioning support to
33189e7bcd65Smrg    # collect2, so additional links can be useful in future.
33199e7bcd65Smrg    if test "$aix_use_runtimelinking" = yes; then
33209e7bcd65Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
33219e7bcd65Smrg      # instead of lib<name>.a to let people know that these are not
33229e7bcd65Smrg      # typical AIX shared libraries.
33239e7bcd65Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33249e7bcd65Smrg    else
33259e7bcd65Smrg      # We preserve .a as extension for shared libraries through AIX4.2
33269e7bcd65Smrg      # and later when we are not doing run time linking.
33279e7bcd65Smrg      library_names_spec='${libname}${release}.a $libname.a'
33289e7bcd65Smrg      soname_spec='${libname}${release}${shared_ext}$major'
33299e7bcd65Smrg    fi
33309e7bcd65Smrg    shlibpath_var=LIBPATH
33319e7bcd65Smrg  fi
33329e7bcd65Smrg  ;;
33339e7bcd65Smrg
33349e7bcd65Smrgamigaos*)
33359e7bcd65Smrg  case $host_cpu in
33369e7bcd65Smrg  powerpc)
33379e7bcd65Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
33389e7bcd65Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
33399e7bcd65Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33409e7bcd65Smrg    ;;
33419e7bcd65Smrg  m68k)
33429e7bcd65Smrg    library_names_spec='$libname.ixlibrary $libname.a'
33439e7bcd65Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
33449e7bcd65Smrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''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'
33459e7bcd65Smrg    ;;
33469e7bcd65Smrg  esac
33479e7bcd65Smrg  ;;
33489e7bcd65Smrg
33499e7bcd65Smrgbeos*)
33509e7bcd65Smrg  library_names_spec='${libname}${shared_ext}'
33519e7bcd65Smrg  dynamic_linker="$host_os ld.so"
33529e7bcd65Smrg  shlibpath_var=LIBRARY_PATH
33539e7bcd65Smrg  ;;
33549e7bcd65Smrg
33559e7bcd65Smrgbsdi[[45]]*)
33569e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
33579e7bcd65Smrg  need_version=no
33589e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33599e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
33609e7bcd65Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
33619e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
33629e7bcd65Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
33639e7bcd65Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
33649e7bcd65Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
33659e7bcd65Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
33669e7bcd65Smrg  # libtool to hard-code these into programs
33679e7bcd65Smrg  ;;
33689e7bcd65Smrg
33699e7bcd65Smrgcygwin* | mingw* | pw32* | cegcc*)
33709e7bcd65Smrg  version_type=windows
33719e7bcd65Smrg  shrext_cmds=".dll"
33729e7bcd65Smrg  need_version=no
33739e7bcd65Smrg  need_lib_prefix=no
33749e7bcd65Smrg
33759e7bcd65Smrg  case $GCC,$cc_basename in
33769e7bcd65Smrg  yes,*)
33779e7bcd65Smrg    # gcc
33789e7bcd65Smrg    library_names_spec='$libname.dll.a'
33799e7bcd65Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
33809e7bcd65Smrg    postinstall_cmds='base_file=`basename \${file}`~
33819e7bcd65Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
33829e7bcd65Smrg      dldir=$destdir/`dirname \$dlpath`~
33839e7bcd65Smrg      test -d \$dldir || mkdir -p \$dldir~
33849e7bcd65Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
33859e7bcd65Smrg      chmod a+x \$dldir/$dlname~
33869e7bcd65Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
33879e7bcd65Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
33889e7bcd65Smrg      fi'
33899e7bcd65Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
33909e7bcd65Smrg      dlpath=$dir/\$dldll~
33919e7bcd65Smrg       $RM \$dlpath'
33929e7bcd65Smrg    shlibpath_overrides_runpath=yes
33939e7bcd65Smrg
33949e7bcd65Smrg    case $host_os in
33959e7bcd65Smrg    cygwin*)
33969e7bcd65Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
33979e7bcd65Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
33989e7bcd65Smrgm4_if([$1], [],[
33999e7bcd65Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
34009e7bcd65Smrg      ;;
34019e7bcd65Smrg    mingw* | cegcc*)
34029e7bcd65Smrg      # MinGW DLLs use traditional 'lib' prefix
34039e7bcd65Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34049e7bcd65Smrg      ;;
34059e7bcd65Smrg    pw32*)
34069e7bcd65Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
34079e7bcd65Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34089e7bcd65Smrg      ;;
34099e7bcd65Smrg    esac
34109e7bcd65Smrg    dynamic_linker='Win32 ld.exe'
34119e7bcd65Smrg    ;;
34129e7bcd65Smrg
34139e7bcd65Smrg  *,cl*)
34149e7bcd65Smrg    # Native MSVC
34159e7bcd65Smrg    libname_spec='$name'
34169e7bcd65Smrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34179e7bcd65Smrg    library_names_spec='${libname}.dll.lib'
34189e7bcd65Smrg
34199e7bcd65Smrg    case $build_os in
34209e7bcd65Smrg    mingw*)
34219e7bcd65Smrg      sys_lib_search_path_spec=
34229e7bcd65Smrg      lt_save_ifs=$IFS
34239e7bcd65Smrg      IFS=';'
34249e7bcd65Smrg      for lt_path in $LIB
34259e7bcd65Smrg      do
34269e7bcd65Smrg        IFS=$lt_save_ifs
34279e7bcd65Smrg        # Let DOS variable expansion print the short 8.3 style file name.
34289e7bcd65Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
34299e7bcd65Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
34309e7bcd65Smrg      done
34319e7bcd65Smrg      IFS=$lt_save_ifs
34329e7bcd65Smrg      # Convert to MSYS style.
34339e7bcd65Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
34349e7bcd65Smrg      ;;
34359e7bcd65Smrg    cygwin*)
34369e7bcd65Smrg      # Convert to unix form, then to dos form, then back to unix form
34379e7bcd65Smrg      # but this time dos style (no spaces!) so that the unix form looks
34389e7bcd65Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
34399e7bcd65Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
34409e7bcd65Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
34419e7bcd65Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
34429e7bcd65Smrg      ;;
34439e7bcd65Smrg    *)
34449e7bcd65Smrg      sys_lib_search_path_spec="$LIB"
34459e7bcd65Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
34469e7bcd65Smrg        # It is most probably a Windows format PATH.
34479e7bcd65Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
34489e7bcd65Smrg      else
34499e7bcd65Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
34509e7bcd65Smrg      fi
34519e7bcd65Smrg      # FIXME: find the short name or the path components, as spaces are
34529e7bcd65Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
34539e7bcd65Smrg      ;;
34549e7bcd65Smrg    esac
34559e7bcd65Smrg
34569e7bcd65Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
34579e7bcd65Smrg    postinstall_cmds='base_file=`basename \${file}`~
34589e7bcd65Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
34599e7bcd65Smrg      dldir=$destdir/`dirname \$dlpath`~
34609e7bcd65Smrg      test -d \$dldir || mkdir -p \$dldir~
34619e7bcd65Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
34629e7bcd65Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
34639e7bcd65Smrg      dlpath=$dir/\$dldll~
34649e7bcd65Smrg       $RM \$dlpath'
34659e7bcd65Smrg    shlibpath_overrides_runpath=yes
34669e7bcd65Smrg    dynamic_linker='Win32 link.exe'
34679e7bcd65Smrg    ;;
34689e7bcd65Smrg
34699e7bcd65Smrg  *)
34709e7bcd65Smrg    # Assume MSVC wrapper
34719e7bcd65Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
34729e7bcd65Smrg    dynamic_linker='Win32 ld.exe'
34739e7bcd65Smrg    ;;
34749e7bcd65Smrg  esac
34759e7bcd65Smrg  # FIXME: first we should search . and the directory the executable is in
34769e7bcd65Smrg  shlibpath_var=PATH
34779e7bcd65Smrg  ;;
34789e7bcd65Smrg
34799e7bcd65Smrgdarwin* | rhapsody*)
34809e7bcd65Smrg  dynamic_linker="$host_os dyld"
34819e7bcd65Smrg  version_type=darwin
34829e7bcd65Smrg  need_lib_prefix=no
34839e7bcd65Smrg  need_version=no
34849e7bcd65Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
34859e7bcd65Smrg  soname_spec='${libname}${release}${major}$shared_ext'
34869e7bcd65Smrg  shlibpath_overrides_runpath=yes
34879e7bcd65Smrg  shlibpath_var=DYLD_LIBRARY_PATH
34889e7bcd65Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
34899e7bcd65Smrgm4_if([$1], [],[
34909e7bcd65Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
34919e7bcd65Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
34929e7bcd65Smrg  ;;
34939e7bcd65Smrg
34949e7bcd65Smrgdgux*)
34959e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
34969e7bcd65Smrg  need_lib_prefix=no
34979e7bcd65Smrg  need_version=no
34989e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
34999e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
35009e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
35019e7bcd65Smrg  ;;
35029e7bcd65Smrg
35039e7bcd65Smrgfreebsd* | dragonfly*)
35049e7bcd65Smrg  # DragonFly does not have aout.  When/if they implement a new
35059e7bcd65Smrg  # versioning mechanism, adjust this.
35069e7bcd65Smrg  if test -x /usr/bin/objformat; then
35079e7bcd65Smrg    objformat=`/usr/bin/objformat`
35089e7bcd65Smrg  else
35099e7bcd65Smrg    case $host_os in
35109e7bcd65Smrg    freebsd[[23]].*) objformat=aout ;;
35119e7bcd65Smrg    *) objformat=elf ;;
35129e7bcd65Smrg    esac
35139e7bcd65Smrg  fi
35149e7bcd65Smrg  version_type=freebsd-$objformat
35159e7bcd65Smrg  case $version_type in
35169e7bcd65Smrg    freebsd-elf*)
35179e7bcd65Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
35189e7bcd65Smrg      need_version=no
35199e7bcd65Smrg      need_lib_prefix=no
35209e7bcd65Smrg      ;;
35219e7bcd65Smrg    freebsd-*)
35229e7bcd65Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
35239e7bcd65Smrg      need_version=yes
35249e7bcd65Smrg      ;;
35259e7bcd65Smrg  esac
35269e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
35279e7bcd65Smrg  case $host_os in
35289e7bcd65Smrg  freebsd2.*)
35299e7bcd65Smrg    shlibpath_overrides_runpath=yes
35309e7bcd65Smrg    ;;
35319e7bcd65Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
35329e7bcd65Smrg    shlibpath_overrides_runpath=yes
35339e7bcd65Smrg    hardcode_into_libs=yes
35349e7bcd65Smrg    ;;
35359e7bcd65Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
35369e7bcd65Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
35379e7bcd65Smrg    shlibpath_overrides_runpath=no
35389e7bcd65Smrg    hardcode_into_libs=yes
35399e7bcd65Smrg    ;;
35409e7bcd65Smrg  *) # from 4.6 on, and DragonFly
35419e7bcd65Smrg    shlibpath_overrides_runpath=yes
35429e7bcd65Smrg    hardcode_into_libs=yes
35439e7bcd65Smrg    ;;
35449e7bcd65Smrg  esac
35459e7bcd65Smrg  ;;
35469e7bcd65Smrg
35479e7bcd65Smrggnu*)
35489e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
35499e7bcd65Smrg  need_lib_prefix=no
35509e7bcd65Smrg  need_version=no
35519e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
35529e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
35539e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
35549e7bcd65Smrg  shlibpath_overrides_runpath=no
35559e7bcd65Smrg  hardcode_into_libs=yes
35569e7bcd65Smrg  ;;
35579e7bcd65Smrg
35589e7bcd65Smrghaiku*)
35599e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
35609e7bcd65Smrg  need_lib_prefix=no
35619e7bcd65Smrg  need_version=no
35629e7bcd65Smrg  dynamic_linker="$host_os runtime_loader"
35639e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
35649e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
35659e7bcd65Smrg  shlibpath_var=LIBRARY_PATH
35669e7bcd65Smrg  shlibpath_overrides_runpath=yes
35679e7bcd65Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
35689e7bcd65Smrg  hardcode_into_libs=yes
35699e7bcd65Smrg  ;;
35709e7bcd65Smrg
35719e7bcd65Smrghpux9* | hpux10* | hpux11*)
35729e7bcd65Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
35739e7bcd65Smrg  # link against other versions.
35749e7bcd65Smrg  version_type=sunos
35759e7bcd65Smrg  need_lib_prefix=no
35769e7bcd65Smrg  need_version=no
35779e7bcd65Smrg  case $host_cpu in
35789e7bcd65Smrg  ia64*)
35799e7bcd65Smrg    shrext_cmds='.so'
35809e7bcd65Smrg    hardcode_into_libs=yes
35819e7bcd65Smrg    dynamic_linker="$host_os dld.so"
35829e7bcd65Smrg    shlibpath_var=LD_LIBRARY_PATH
35839e7bcd65Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
35849e7bcd65Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
35859e7bcd65Smrg    soname_spec='${libname}${release}${shared_ext}$major'
35869e7bcd65Smrg    if test "X$HPUX_IA64_MODE" = X32; then
35879e7bcd65Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
35889e7bcd65Smrg    else
35899e7bcd65Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
35909e7bcd65Smrg    fi
35919e7bcd65Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
35929e7bcd65Smrg    ;;
35939e7bcd65Smrg  hppa*64*)
35949e7bcd65Smrg    shrext_cmds='.sl'
35959e7bcd65Smrg    hardcode_into_libs=yes
35969e7bcd65Smrg    dynamic_linker="$host_os dld.sl"
35979e7bcd65Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
35989e7bcd65Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
35999e7bcd65Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36009e7bcd65Smrg    soname_spec='${libname}${release}${shared_ext}$major'
36019e7bcd65Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
36029e7bcd65Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
36039e7bcd65Smrg    ;;
36049e7bcd65Smrg  *)
36059e7bcd65Smrg    shrext_cmds='.sl'
36069e7bcd65Smrg    dynamic_linker="$host_os dld.sl"
36079e7bcd65Smrg    shlibpath_var=SHLIB_PATH
36089e7bcd65Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
36099e7bcd65Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36109e7bcd65Smrg    soname_spec='${libname}${release}${shared_ext}$major'
36119e7bcd65Smrg    ;;
36129e7bcd65Smrg  esac
36139e7bcd65Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
36149e7bcd65Smrg  postinstall_cmds='chmod 555 $lib'
36159e7bcd65Smrg  # or fails outright, so override atomically:
36169e7bcd65Smrg  install_override_mode=555
36179e7bcd65Smrg  ;;
36189e7bcd65Smrg
36199e7bcd65Smrginterix[[3-9]]*)
36209e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
36219e7bcd65Smrg  need_lib_prefix=no
36229e7bcd65Smrg  need_version=no
36239e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
36249e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
36259e7bcd65Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
36269e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
36279e7bcd65Smrg  shlibpath_overrides_runpath=no
36289e7bcd65Smrg  hardcode_into_libs=yes
36299e7bcd65Smrg  ;;
36309e7bcd65Smrg
36319e7bcd65Smrgirix5* | irix6* | nonstopux*)
36329e7bcd65Smrg  case $host_os in
36339e7bcd65Smrg    nonstopux*) version_type=nonstopux ;;
36349e7bcd65Smrg    *)
36359e7bcd65Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
36369e7bcd65Smrg		version_type=linux # correct to gnu/linux during the next big refactor
36379e7bcd65Smrg	else
36389e7bcd65Smrg		version_type=irix
36399e7bcd65Smrg	fi ;;
36409e7bcd65Smrg  esac
36419e7bcd65Smrg  need_lib_prefix=no
36429e7bcd65Smrg  need_version=no
36439e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
36449e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
36459e7bcd65Smrg  case $host_os in
36469e7bcd65Smrg  irix5* | nonstopux*)
36479e7bcd65Smrg    libsuff= shlibsuff=
36489e7bcd65Smrg    ;;
36499e7bcd65Smrg  *)
36509e7bcd65Smrg    case $LD in # libtool.m4 will add one of these switches to LD
36519e7bcd65Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
36529e7bcd65Smrg      libsuff= shlibsuff= libmagic=32-bit;;
36539e7bcd65Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
36549e7bcd65Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
36559e7bcd65Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
36569e7bcd65Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
36579e7bcd65Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
36589e7bcd65Smrg    esac
36599e7bcd65Smrg    ;;
36609e7bcd65Smrg  esac
36619e7bcd65Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
36629e7bcd65Smrg  shlibpath_overrides_runpath=no
36639e7bcd65Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
36649e7bcd65Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
36659e7bcd65Smrg  hardcode_into_libs=yes
36669e7bcd65Smrg  ;;
36679e7bcd65Smrg
36689e7bcd65Smrg# No shared lib support for Linux oldld, aout, or coff.
36699e7bcd65Smrglinux*oldld* | linux*aout* | linux*coff*)
36709e7bcd65Smrg  dynamic_linker=no
36719e7bcd65Smrg  ;;
36729e7bcd65Smrg
36739e7bcd65Smrg# This must be glibc/ELF.
36749e7bcd65Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
36759e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
36769e7bcd65Smrg  need_lib_prefix=no
36779e7bcd65Smrg  need_version=no
36789e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36799e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
36809e7bcd65Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
36819e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
36829e7bcd65Smrg  shlibpath_overrides_runpath=no
36839e7bcd65Smrg
36849e7bcd65Smrg  # Some binutils ld are patched to set DT_RUNPATH
36859e7bcd65Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
36869e7bcd65Smrg    [lt_cv_shlibpath_overrides_runpath=no
36879e7bcd65Smrg    save_LDFLAGS=$LDFLAGS
36889e7bcd65Smrg    save_libdir=$libdir
36899e7bcd65Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
36909e7bcd65Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
36919e7bcd65Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
36929e7bcd65Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
36939e7bcd65Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
36949e7bcd65Smrg    LDFLAGS=$save_LDFLAGS
36959e7bcd65Smrg    libdir=$save_libdir
36969e7bcd65Smrg    ])
36979e7bcd65Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
36989e7bcd65Smrg
36999e7bcd65Smrg  # This implies no fast_install, which is unacceptable.
37009e7bcd65Smrg  # Some rework will be needed to allow for fast_install
37019e7bcd65Smrg  # before this can be enabled.
37029e7bcd65Smrg  hardcode_into_libs=yes
37039e7bcd65Smrg
37049e7bcd65Smrg  # Append ld.so.conf contents to the search path
37059e7bcd65Smrg  if test -f /etc/ld.so.conf; then
37069e7bcd65Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[	 ]*hwcap[	 ]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '`
37079e7bcd65Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
37089e7bcd65Smrg  fi
37099e7bcd65Smrg
37109e7bcd65Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
37119e7bcd65Smrg  # powerpc, because MkLinux only supported shared libraries with the
37129e7bcd65Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
37139e7bcd65Smrg  # most powerpc-linux boxes support dynamic linking these days and
37149e7bcd65Smrg  # people can always --disable-shared, the test was removed, and we
37159e7bcd65Smrg  # assume the GNU/Linux dynamic linker is in use.
37169e7bcd65Smrg  dynamic_linker='GNU/Linux ld.so'
37179e7bcd65Smrg  ;;
37189e7bcd65Smrg
37199e7bcd65Smrgnetbsd*)
37209e7bcd65Smrg  version_type=sunos
37219e7bcd65Smrg  need_lib_prefix=no
37229e7bcd65Smrg  need_version=no
37239e7bcd65Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
37249e7bcd65Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
37259e7bcd65Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
37269e7bcd65Smrg    dynamic_linker='NetBSD (a.out) ld.so'
37279e7bcd65Smrg  else
37289e7bcd65Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
37299e7bcd65Smrg    soname_spec='${libname}${release}${shared_ext}$major'
37309e7bcd65Smrg    dynamic_linker='NetBSD ld.elf_so'
37319e7bcd65Smrg  fi
37329e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
37339e7bcd65Smrg  shlibpath_overrides_runpath=yes
37349e7bcd65Smrg  hardcode_into_libs=yes
37359e7bcd65Smrg  ;;
37369e7bcd65Smrg
37379e7bcd65Smrgnewsos6)
37389e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
37399e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37409e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
37419e7bcd65Smrg  shlibpath_overrides_runpath=yes
37429e7bcd65Smrg  ;;
37439e7bcd65Smrg
37449e7bcd65Smrg*nto* | *qnx*)
37459e7bcd65Smrg  version_type=qnx
37469e7bcd65Smrg  need_lib_prefix=no
37479e7bcd65Smrg  need_version=no
37489e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37499e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
37509e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
37519e7bcd65Smrg  shlibpath_overrides_runpath=no
37529e7bcd65Smrg  hardcode_into_libs=yes
37539e7bcd65Smrg  dynamic_linker='ldqnx.so'
37549e7bcd65Smrg  ;;
37559e7bcd65Smrg
37569e7bcd65Smrgopenbsd*)
37579e7bcd65Smrg  version_type=sunos
37589e7bcd65Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
37599e7bcd65Smrg  need_lib_prefix=no
37609e7bcd65Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
37619e7bcd65Smrg  case $host_os in
37629e7bcd65Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
37639e7bcd65Smrg    *)				need_version=no  ;;
37649e7bcd65Smrg  esac
37659e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
37669e7bcd65Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
37679e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
37689e7bcd65Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
37699e7bcd65Smrg    case $host_os in
37709e7bcd65Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
37719e7bcd65Smrg	shlibpath_overrides_runpath=no
37729e7bcd65Smrg	;;
37739e7bcd65Smrg      *)
37749e7bcd65Smrg	shlibpath_overrides_runpath=yes
37759e7bcd65Smrg	;;
37769e7bcd65Smrg      esac
37779e7bcd65Smrg  else
37789e7bcd65Smrg    shlibpath_overrides_runpath=yes
37799e7bcd65Smrg  fi
37809e7bcd65Smrg  ;;
37819e7bcd65Smrg
37829e7bcd65Smrgos2*)
37839e7bcd65Smrg  libname_spec='$name'
37849e7bcd65Smrg  shrext_cmds=".dll"
37859e7bcd65Smrg  need_lib_prefix=no
37869e7bcd65Smrg  library_names_spec='$libname${shared_ext} $libname.a'
37879e7bcd65Smrg  dynamic_linker='OS/2 ld.exe'
37889e7bcd65Smrg  shlibpath_var=LIBPATH
37899e7bcd65Smrg  ;;
37909e7bcd65Smrg
37919e7bcd65Smrgosf3* | osf4* | osf5*)
37929e7bcd65Smrg  version_type=osf
37939e7bcd65Smrg  need_lib_prefix=no
37949e7bcd65Smrg  need_version=no
37959e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
37969e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37979e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
37989e7bcd65Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
37999e7bcd65Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
38009e7bcd65Smrg  ;;
38019e7bcd65Smrg
38029e7bcd65Smrgrdos*)
38039e7bcd65Smrg  dynamic_linker=no
38049e7bcd65Smrg  ;;
38059e7bcd65Smrg
38069e7bcd65Smrgsolaris*)
38079e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
38089e7bcd65Smrg  need_lib_prefix=no
38099e7bcd65Smrg  need_version=no
38109e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38119e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38129e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
38139e7bcd65Smrg  shlibpath_overrides_runpath=yes
38149e7bcd65Smrg  hardcode_into_libs=yes
38159e7bcd65Smrg  # ldd complains unless libraries are executable
38169e7bcd65Smrg  postinstall_cmds='chmod +x $lib'
38179e7bcd65Smrg  ;;
38189e7bcd65Smrg
38199e7bcd65Smrgsunos4*)
38209e7bcd65Smrg  version_type=sunos
38219e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38229e7bcd65Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
38239e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
38249e7bcd65Smrg  shlibpath_overrides_runpath=yes
38259e7bcd65Smrg  if test "$with_gnu_ld" = yes; then
38269e7bcd65Smrg    need_lib_prefix=no
38279e7bcd65Smrg  fi
38289e7bcd65Smrg  need_version=yes
38299e7bcd65Smrg  ;;
38309e7bcd65Smrg
38319e7bcd65Smrgsysv4 | sysv4.3*)
38329e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
38339e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38349e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38359e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
38369e7bcd65Smrg  case $host_vendor in
38379e7bcd65Smrg    sni)
38389e7bcd65Smrg      shlibpath_overrides_runpath=no
38399e7bcd65Smrg      need_lib_prefix=no
38409e7bcd65Smrg      runpath_var=LD_RUN_PATH
38419e7bcd65Smrg      ;;
38429e7bcd65Smrg    siemens)
38439e7bcd65Smrg      need_lib_prefix=no
38449e7bcd65Smrg      ;;
38459e7bcd65Smrg    motorola)
38469e7bcd65Smrg      need_lib_prefix=no
38479e7bcd65Smrg      need_version=no
38489e7bcd65Smrg      shlibpath_overrides_runpath=no
38499e7bcd65Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
38509e7bcd65Smrg      ;;
38519e7bcd65Smrg  esac
38529e7bcd65Smrg  ;;
38539e7bcd65Smrg
38549e7bcd65Smrgsysv4*MP*)
38559e7bcd65Smrg  if test -d /usr/nec ;then
38569e7bcd65Smrg    version_type=linux # correct to gnu/linux during the next big refactor
38579e7bcd65Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
38589e7bcd65Smrg    soname_spec='$libname${shared_ext}.$major'
38599e7bcd65Smrg    shlibpath_var=LD_LIBRARY_PATH
38609e7bcd65Smrg  fi
38619e7bcd65Smrg  ;;
38629e7bcd65Smrg
38639e7bcd65Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
38649e7bcd65Smrg  version_type=freebsd-elf
38659e7bcd65Smrg  need_lib_prefix=no
38669e7bcd65Smrg  need_version=no
38679e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
38689e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38699e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
38709e7bcd65Smrg  shlibpath_overrides_runpath=yes
38719e7bcd65Smrg  hardcode_into_libs=yes
38729e7bcd65Smrg  if test "$with_gnu_ld" = yes; then
38739e7bcd65Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
38749e7bcd65Smrg  else
38759e7bcd65Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
38769e7bcd65Smrg    case $host_os in
38779e7bcd65Smrg      sco3.2v5*)
38789e7bcd65Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
38799e7bcd65Smrg	;;
38809e7bcd65Smrg    esac
38819e7bcd65Smrg  fi
38829e7bcd65Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
38839e7bcd65Smrg  ;;
38849e7bcd65Smrg
38859e7bcd65Smrgtpf*)
38869e7bcd65Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
38879e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
38889e7bcd65Smrg  need_lib_prefix=no
38899e7bcd65Smrg  need_version=no
38909e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38919e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
38929e7bcd65Smrg  shlibpath_overrides_runpath=no
38939e7bcd65Smrg  hardcode_into_libs=yes
38949e7bcd65Smrg  ;;
38959e7bcd65Smrg
38969e7bcd65Smrguts4*)
38979e7bcd65Smrg  version_type=linux # correct to gnu/linux during the next big refactor
38989e7bcd65Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38999e7bcd65Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39009e7bcd65Smrg  shlibpath_var=LD_LIBRARY_PATH
39019e7bcd65Smrg  ;;
39029e7bcd65Smrg
39039e7bcd65Smrg*)
39049e7bcd65Smrg  dynamic_linker=no
39059e7bcd65Smrg  ;;
39069e7bcd65Smrgesac
39079e7bcd65SmrgAC_MSG_RESULT([$dynamic_linker])
39089e7bcd65Smrgtest "$dynamic_linker" = no && can_build_shared=no
39099e7bcd65Smrg
39109e7bcd65Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
39119e7bcd65Smrgif test "$GCC" = yes; then
39129e7bcd65Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
39139e7bcd65Smrgfi
39149e7bcd65Smrg
39159e7bcd65Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
39169e7bcd65Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
39179e7bcd65Smrgfi
39189e7bcd65Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
39199e7bcd65Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
39209e7bcd65Smrgfi
39219e7bcd65Smrg
39229e7bcd65Smrg_LT_DECL([], [variables_saved_for_relink], [1],
39239e7bcd65Smrg    [Variables whose values should be saved in libtool wrapper scripts and
39249e7bcd65Smrg    restored at link time])
39259e7bcd65Smrg_LT_DECL([], [need_lib_prefix], [0],
39269e7bcd65Smrg    [Do we need the "lib" prefix for modules?])
39279e7bcd65Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
39289e7bcd65Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
39299e7bcd65Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
39309e7bcd65Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
39319e7bcd65Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
39329e7bcd65Smrg    [Is shlibpath searched before the hard-coded library search path?])
39339e7bcd65Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
39349e7bcd65Smrg_LT_DECL([], [library_names_spec], [1],
39359e7bcd65Smrg    [[List of archive names.  First name is the real one, the rest are links.
39369e7bcd65Smrg    The last name is the one that the linker finds with -lNAME]])
39379e7bcd65Smrg_LT_DECL([], [soname_spec], [1],
39389e7bcd65Smrg    [[The coded name of the library, if different from the real name]])
39399e7bcd65Smrg_LT_DECL([], [install_override_mode], [1],
39409e7bcd65Smrg    [Permission mode override for installation of shared libraries])
39419e7bcd65Smrg_LT_DECL([], [postinstall_cmds], [2],
39429e7bcd65Smrg    [Command to use after installation of a shared archive])
39439e7bcd65Smrg_LT_DECL([], [postuninstall_cmds], [2],
39449e7bcd65Smrg    [Command to use after uninstallation of a shared archive])
39459e7bcd65Smrg_LT_DECL([], [finish_cmds], [2],
39469e7bcd65Smrg    [Commands used to finish a libtool library installation in a directory])
39479e7bcd65Smrg_LT_DECL([], [finish_eval], [1],
39489e7bcd65Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
39499e7bcd65Smrg    not shown]])
39509e7bcd65Smrg_LT_DECL([], [hardcode_into_libs], [0],
39519e7bcd65Smrg    [Whether we should hardcode library paths into libraries])
39529e7bcd65Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
39539e7bcd65Smrg    [Compile-time system search path for libraries])
39549e7bcd65Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
39559e7bcd65Smrg    [Run-time system search path for libraries])
39569e7bcd65Smrg])# _LT_SYS_DYNAMIC_LINKER
39579e7bcd65Smrg
39589e7bcd65Smrg
39599e7bcd65Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
39609e7bcd65Smrg# --------------------------
39619e7bcd65Smrg# find a file program which can recognize shared library
39629e7bcd65SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
39639e7bcd65Smrg[m4_require([_LT_DECL_EGREP])dnl
39649e7bcd65SmrgAC_MSG_CHECKING([for $1])
39659e7bcd65SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
39669e7bcd65Smrg[case $MAGIC_CMD in
39679e7bcd65Smrg[[\\/*] |  ?:[\\/]*])
39689e7bcd65Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
39699e7bcd65Smrg  ;;
39709e7bcd65Smrg*)
39719e7bcd65Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
39729e7bcd65Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
39739e7bcd65Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
39749e7bcd65Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
39759e7bcd65Smrgdnl not every word.  This closes a longstanding sh security hole.
39769e7bcd65Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
39779e7bcd65Smrg  for ac_dir in $ac_dummy; do
39789e7bcd65Smrg    IFS="$lt_save_ifs"
39799e7bcd65Smrg    test -z "$ac_dir" && ac_dir=.
39809e7bcd65Smrg    if test -f $ac_dir/$1; then
39819e7bcd65Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
39829e7bcd65Smrg      if test -n "$file_magic_test_file"; then
39839e7bcd65Smrg	case $deplibs_check_method in
39849e7bcd65Smrg	"file_magic "*)
39859e7bcd65Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
39869e7bcd65Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
39879e7bcd65Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
39889e7bcd65Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
39899e7bcd65Smrg	    :
39909e7bcd65Smrg	  else
39919e7bcd65Smrg	    cat <<_LT_EOF 1>&2
39929e7bcd65Smrg
39939e7bcd65Smrg*** Warning: the command libtool uses to detect shared libraries,
39949e7bcd65Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
39959e7bcd65Smrg*** The result is that libtool may fail to recognize shared libraries
39969e7bcd65Smrg*** as such.  This will affect the creation of libtool libraries that
39979e7bcd65Smrg*** depend on shared libraries, but programs linked with such libtool
39989e7bcd65Smrg*** libraries will work regardless of this problem.  Nevertheless, you
39999e7bcd65Smrg*** may want to report the problem to your system manager and/or to
40009e7bcd65Smrg*** bug-libtool@gnu.org
40019e7bcd65Smrg
40029e7bcd65Smrg_LT_EOF
40039e7bcd65Smrg	  fi ;;
40049e7bcd65Smrg	esac
40059e7bcd65Smrg      fi
40069e7bcd65Smrg      break
40079e7bcd65Smrg    fi
40089e7bcd65Smrg  done
40099e7bcd65Smrg  IFS="$lt_save_ifs"
40109e7bcd65Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
40119e7bcd65Smrg  ;;
40129e7bcd65Smrgesac])
40139e7bcd65SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
40149e7bcd65Smrgif test -n "$MAGIC_CMD"; then
40159e7bcd65Smrg  AC_MSG_RESULT($MAGIC_CMD)
40169e7bcd65Smrgelse
40179e7bcd65Smrg  AC_MSG_RESULT(no)
40189e7bcd65Smrgfi
40199e7bcd65Smrg_LT_DECL([], [MAGIC_CMD], [0],
40209e7bcd65Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
40219e7bcd65Smrg])# _LT_PATH_TOOL_PREFIX
40229e7bcd65Smrg
40239e7bcd65Smrg# Old name:
40249e7bcd65SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
40259e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
40269e7bcd65Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
40279e7bcd65Smrg
40289e7bcd65Smrg
40299e7bcd65Smrg# _LT_PATH_MAGIC
40309e7bcd65Smrg# --------------
40319e7bcd65Smrg# find a file program which can recognize a shared library
40329e7bcd65Smrgm4_defun([_LT_PATH_MAGIC],
40339e7bcd65Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
40349e7bcd65Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
40359e7bcd65Smrg  if test -n "$ac_tool_prefix"; then
40369e7bcd65Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
40379e7bcd65Smrg  else
40389e7bcd65Smrg    MAGIC_CMD=:
40399e7bcd65Smrg  fi
40409e7bcd65Smrgfi
40419e7bcd65Smrg])# _LT_PATH_MAGIC
40429e7bcd65Smrg
40439e7bcd65Smrg
40449e7bcd65Smrg# LT_PATH_LD
40459e7bcd65Smrg# ----------
40469e7bcd65Smrg# find the pathname to the GNU or non-GNU linker
40479e7bcd65SmrgAC_DEFUN([LT_PATH_LD],
40489e7bcd65Smrg[AC_REQUIRE([AC_PROG_CC])dnl
40499e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
40509e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
40519e7bcd65Smrgm4_require([_LT_DECL_SED])dnl
40529e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl
40539e7bcd65Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
40549e7bcd65Smrg
40559e7bcd65SmrgAC_ARG_WITH([gnu-ld],
40569e7bcd65Smrg    [AS_HELP_STRING([--with-gnu-ld],
40579e7bcd65Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
40589e7bcd65Smrg    [test "$withval" = no || with_gnu_ld=yes],
40599e7bcd65Smrg    [with_gnu_ld=no])dnl
40609e7bcd65Smrg
40619e7bcd65Smrgac_prog=ld
40629e7bcd65Smrgif test "$GCC" = yes; then
40639e7bcd65Smrg  # Check if gcc -print-prog-name=ld gives a path.
40649e7bcd65Smrg  AC_MSG_CHECKING([for ld used by $CC])
40659e7bcd65Smrg  case $host in
40669e7bcd65Smrg  *-*-mingw*)
40679e7bcd65Smrg    # gcc leaves a trailing carriage return which upsets mingw
40689e7bcd65Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
40699e7bcd65Smrg  *)
40709e7bcd65Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
40719e7bcd65Smrg  esac
40729e7bcd65Smrg  case $ac_prog in
40739e7bcd65Smrg    # Accept absolute paths.
40749e7bcd65Smrg    [[\\/]]* | ?:[[\\/]]*)
40759e7bcd65Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
40769e7bcd65Smrg      # Canonicalize the pathname of ld
40779e7bcd65Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
40789e7bcd65Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
40799e7bcd65Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
40809e7bcd65Smrg      done
40819e7bcd65Smrg      test -z "$LD" && LD="$ac_prog"
40829e7bcd65Smrg      ;;
40839e7bcd65Smrg  "")
40849e7bcd65Smrg    # If it fails, then pretend we aren't using GCC.
40859e7bcd65Smrg    ac_prog=ld
40869e7bcd65Smrg    ;;
40879e7bcd65Smrg  *)
40889e7bcd65Smrg    # If it is relative, then search for the first ld in PATH.
40899e7bcd65Smrg    with_gnu_ld=unknown
40909e7bcd65Smrg    ;;
40919e7bcd65Smrg  esac
40929e7bcd65Smrgelif test "$with_gnu_ld" = yes; then
40939e7bcd65Smrg  AC_MSG_CHECKING([for GNU ld])
40949e7bcd65Smrgelse
40959e7bcd65Smrg  AC_MSG_CHECKING([for non-GNU ld])
40969e7bcd65Smrgfi
40979e7bcd65SmrgAC_CACHE_VAL(lt_cv_path_LD,
40989e7bcd65Smrg[if test -z "$LD"; then
40999e7bcd65Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
41009e7bcd65Smrg  for ac_dir in $PATH; do
41019e7bcd65Smrg    IFS="$lt_save_ifs"
41029e7bcd65Smrg    test -z "$ac_dir" && ac_dir=.
41039e7bcd65Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
41049e7bcd65Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
41059e7bcd65Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
41069e7bcd65Smrg      # but apparently some variants of GNU ld only accept -v.
41079e7bcd65Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
41089e7bcd65Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
41099e7bcd65Smrg      *GNU* | *'with BFD'*)
41109e7bcd65Smrg	test "$with_gnu_ld" != no && break
41119e7bcd65Smrg	;;
41129e7bcd65Smrg      *)
41139e7bcd65Smrg	test "$with_gnu_ld" != yes && break
41149e7bcd65Smrg	;;
41159e7bcd65Smrg      esac
41169e7bcd65Smrg    fi
41179e7bcd65Smrg  done
41189e7bcd65Smrg  IFS="$lt_save_ifs"
41199e7bcd65Smrgelse
41209e7bcd65Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
41219e7bcd65Smrgfi])
41229e7bcd65SmrgLD="$lt_cv_path_LD"
41239e7bcd65Smrgif test -n "$LD"; then
41249e7bcd65Smrg  AC_MSG_RESULT($LD)
41259e7bcd65Smrgelse
41269e7bcd65Smrg  AC_MSG_RESULT(no)
41279e7bcd65Smrgfi
41289e7bcd65Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
41299e7bcd65Smrg_LT_PATH_LD_GNU
41309e7bcd65SmrgAC_SUBST([LD])
41319e7bcd65Smrg
41329e7bcd65Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
41339e7bcd65Smrg])# LT_PATH_LD
41349e7bcd65Smrg
41359e7bcd65Smrg# Old names:
41369e7bcd65SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
41379e7bcd65SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
41389e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
41399e7bcd65Smrgdnl AC_DEFUN([AM_PROG_LD], [])
41409e7bcd65Smrgdnl AC_DEFUN([AC_PROG_LD], [])
41419e7bcd65Smrg
41429e7bcd65Smrg
41439e7bcd65Smrg# _LT_PATH_LD_GNU
41449e7bcd65Smrg#- --------------
41459e7bcd65Smrgm4_defun([_LT_PATH_LD_GNU],
41469e7bcd65Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
41479e7bcd65Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
41489e7bcd65Smrgcase `$LD -v 2>&1 </dev/null` in
41499e7bcd65Smrg*GNU* | *'with BFD'*)
41509e7bcd65Smrg  lt_cv_prog_gnu_ld=yes
41519e7bcd65Smrg  ;;
41529e7bcd65Smrg*)
41539e7bcd65Smrg  lt_cv_prog_gnu_ld=no
41549e7bcd65Smrg  ;;
41559e7bcd65Smrgesac])
41569e7bcd65Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
41579e7bcd65Smrg])# _LT_PATH_LD_GNU
41589e7bcd65Smrg
41599e7bcd65Smrg
41609e7bcd65Smrg# _LT_CMD_RELOAD
41619e7bcd65Smrg# --------------
41629e7bcd65Smrg# find reload flag for linker
41639e7bcd65Smrg#   -- PORTME Some linkers may need a different reload flag.
41649e7bcd65Smrgm4_defun([_LT_CMD_RELOAD],
41659e7bcd65Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
41669e7bcd65Smrg  lt_cv_ld_reload_flag,
41679e7bcd65Smrg  [lt_cv_ld_reload_flag='-r'])
41689e7bcd65Smrgreload_flag=$lt_cv_ld_reload_flag
41699e7bcd65Smrgcase $reload_flag in
41709e7bcd65Smrg"" | " "*) ;;
41719e7bcd65Smrg*) reload_flag=" $reload_flag" ;;
41729e7bcd65Smrgesac
41739e7bcd65Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
41749e7bcd65Smrgcase $host_os in
41759e7bcd65Smrg  cygwin* | mingw* | pw32* | cegcc*)
41769e7bcd65Smrg    if test "$GCC" != yes; then
41779e7bcd65Smrg      reload_cmds=false
41789e7bcd65Smrg    fi
41799e7bcd65Smrg    ;;
41809e7bcd65Smrg  darwin*)
41819e7bcd65Smrg    if test "$GCC" = yes; then
41829e7bcd65Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
41839e7bcd65Smrg    else
41849e7bcd65Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
41859e7bcd65Smrg    fi
41869e7bcd65Smrg    ;;
41879e7bcd65Smrgesac
41889e7bcd65Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
41899e7bcd65Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
41909e7bcd65Smrg])# _LT_CMD_RELOAD
41919e7bcd65Smrg
41929e7bcd65Smrg
41939e7bcd65Smrg# _LT_CHECK_MAGIC_METHOD
41949e7bcd65Smrg# ----------------------
41959e7bcd65Smrg# how to check for library dependencies
41969e7bcd65Smrg#  -- PORTME fill in with the dynamic library characteristics
41979e7bcd65Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
41989e7bcd65Smrg[m4_require([_LT_DECL_EGREP])
41999e7bcd65Smrgm4_require([_LT_DECL_OBJDUMP])
42009e7bcd65SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
42019e7bcd65Smrglt_cv_deplibs_check_method,
42029e7bcd65Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
42039e7bcd65Smrglt_cv_file_magic_test_file=
42049e7bcd65Smrglt_cv_deplibs_check_method='unknown'
42059e7bcd65Smrg# Need to set the preceding variable on all platforms that support
42069e7bcd65Smrg# interlibrary dependencies.
42079e7bcd65Smrg# 'none' -- dependencies not supported.
42089e7bcd65Smrg# `unknown' -- same as none, but documents that we really don't know.
42099e7bcd65Smrg# 'pass_all' -- all dependencies passed with no checks.
42109e7bcd65Smrg# 'test_compile' -- check by making test program.
42119e7bcd65Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
42129e7bcd65Smrg# which responds to the $file_magic_cmd with a given extended regex.
42139e7bcd65Smrg# If you have `file' or equivalent on your system and you're not sure
42149e7bcd65Smrg# whether `pass_all' will *always* work, you probably want this one.
42159e7bcd65Smrg
42169e7bcd65Smrgcase $host_os in
42179e7bcd65Smrgaix[[4-9]]*)
42189e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
42199e7bcd65Smrg  ;;
42209e7bcd65Smrg
42219e7bcd65Smrgbeos*)
42229e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
42239e7bcd65Smrg  ;;
42249e7bcd65Smrg
42259e7bcd65Smrgbsdi[[45]]*)
42269e7bcd65Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
42279e7bcd65Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
42289e7bcd65Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
42299e7bcd65Smrg  ;;
42309e7bcd65Smrg
42319e7bcd65Smrgcygwin*)
42329e7bcd65Smrg  # func_win32_libid is a shell function defined in ltmain.sh
42339e7bcd65Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
42349e7bcd65Smrg  lt_cv_file_magic_cmd='func_win32_libid'
42359e7bcd65Smrg  ;;
42369e7bcd65Smrg
42379e7bcd65Smrgmingw* | pw32*)
42389e7bcd65Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
42399e7bcd65Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
42409e7bcd65Smrg  # unless we find 'file', for example because we are cross-compiling.
42419e7bcd65Smrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
42429e7bcd65Smrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
42439e7bcd65Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
42449e7bcd65Smrg    lt_cv_file_magic_cmd='func_win32_libid'
42459e7bcd65Smrg  else
42469e7bcd65Smrg    # Keep this pattern in sync with the one in func_win32_libid.
42479e7bcd65Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
42489e7bcd65Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
42499e7bcd65Smrg  fi
42509e7bcd65Smrg  ;;
42519e7bcd65Smrg
42529e7bcd65Smrgcegcc*)
42539e7bcd65Smrg  # use the weaker test based on 'objdump'. See mingw*.
42549e7bcd65Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
42559e7bcd65Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
42569e7bcd65Smrg  ;;
42579e7bcd65Smrg
42589e7bcd65Smrgdarwin* | rhapsody*)
42599e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
42609e7bcd65Smrg  ;;
42619e7bcd65Smrg
42629e7bcd65Smrgfreebsd* | dragonfly*)
42639e7bcd65Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
42649e7bcd65Smrg    case $host_cpu in
42659e7bcd65Smrg    i*86 )
42669e7bcd65Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
42679e7bcd65Smrg      # Let's accept both of them until this is cleared up.
42689e7bcd65Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
42699e7bcd65Smrg      lt_cv_file_magic_cmd=/usr/bin/file
42709e7bcd65Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
42719e7bcd65Smrg      ;;
42729e7bcd65Smrg    esac
42739e7bcd65Smrg  else
42749e7bcd65Smrg    lt_cv_deplibs_check_method=pass_all
42759e7bcd65Smrg  fi
42769e7bcd65Smrg  ;;
42779e7bcd65Smrg
42789e7bcd65Smrggnu*)
42799e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
42809e7bcd65Smrg  ;;
42819e7bcd65Smrg
42829e7bcd65Smrghaiku*)
42839e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
42849e7bcd65Smrg  ;;
42859e7bcd65Smrg
42869e7bcd65Smrghpux10.20* | hpux11*)
42879e7bcd65Smrg  lt_cv_file_magic_cmd=/usr/bin/file
42889e7bcd65Smrg  case $host_cpu in
42899e7bcd65Smrg  ia64*)
42909e7bcd65Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
42919e7bcd65Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
42929e7bcd65Smrg    ;;
42939e7bcd65Smrg  hppa*64*)
42949e7bcd65Smrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]']
42959e7bcd65Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
42969e7bcd65Smrg    ;;
42979e7bcd65Smrg  *)
42989e7bcd65Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
42999e7bcd65Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
43009e7bcd65Smrg    ;;
43019e7bcd65Smrg  esac
43029e7bcd65Smrg  ;;
43039e7bcd65Smrg
43049e7bcd65Smrginterix[[3-9]]*)
43059e7bcd65Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
43069e7bcd65Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
43079e7bcd65Smrg  ;;
43089e7bcd65Smrg
43099e7bcd65Smrgirix5* | irix6* | nonstopux*)
43109e7bcd65Smrg  case $LD in
43119e7bcd65Smrg  *-32|*"-32 ") libmagic=32-bit;;
43129e7bcd65Smrg  *-n32|*"-n32 ") libmagic=N32;;
43139e7bcd65Smrg  *-64|*"-64 ") libmagic=64-bit;;
43149e7bcd65Smrg  *) libmagic=never-match;;
43159e7bcd65Smrg  esac
43169e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43179e7bcd65Smrg  ;;
43189e7bcd65Smrg
43199e7bcd65Smrg# This must be glibc/ELF.
43209e7bcd65Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
43219e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43229e7bcd65Smrg  ;;
43239e7bcd65Smrg
43249e7bcd65Smrgnetbsd*)
43259e7bcd65Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
43269e7bcd65Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
43279e7bcd65Smrg  else
43289e7bcd65Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
43299e7bcd65Smrg  fi
43309e7bcd65Smrg  ;;
43319e7bcd65Smrg
43329e7bcd65Smrgnewos6*)
43339e7bcd65Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
43349e7bcd65Smrg  lt_cv_file_magic_cmd=/usr/bin/file
43359e7bcd65Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
43369e7bcd65Smrg  ;;
43379e7bcd65Smrg
43389e7bcd65Smrg*nto* | *qnx*)
43399e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43409e7bcd65Smrg  ;;
43419e7bcd65Smrg
43429e7bcd65Smrgopenbsd*)
43439e7bcd65Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
43449e7bcd65Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
43459e7bcd65Smrg  else
43469e7bcd65Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
43479e7bcd65Smrg  fi
43489e7bcd65Smrg  ;;
43499e7bcd65Smrg
43509e7bcd65Smrgosf3* | osf4* | osf5*)
43519e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43529e7bcd65Smrg  ;;
43539e7bcd65Smrg
43549e7bcd65Smrgrdos*)
43559e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43569e7bcd65Smrg  ;;
43579e7bcd65Smrg
43589e7bcd65Smrgsolaris*)
43599e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43609e7bcd65Smrg  ;;
43619e7bcd65Smrg
43629e7bcd65Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
43639e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43649e7bcd65Smrg  ;;
43659e7bcd65Smrg
43669e7bcd65Smrgsysv4 | sysv4.3*)
43679e7bcd65Smrg  case $host_vendor in
43689e7bcd65Smrg  motorola)
43699e7bcd65Smrg    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]]'
43709e7bcd65Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
43719e7bcd65Smrg    ;;
43729e7bcd65Smrg  ncr)
43739e7bcd65Smrg    lt_cv_deplibs_check_method=pass_all
43749e7bcd65Smrg    ;;
43759e7bcd65Smrg  sequent)
43769e7bcd65Smrg    lt_cv_file_magic_cmd='/bin/file'
43779e7bcd65Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
43789e7bcd65Smrg    ;;
43799e7bcd65Smrg  sni)
43809e7bcd65Smrg    lt_cv_file_magic_cmd='/bin/file'
43819e7bcd65Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
43829e7bcd65Smrg    lt_cv_file_magic_test_file=/lib/libc.so
43839e7bcd65Smrg    ;;
43849e7bcd65Smrg  siemens)
43859e7bcd65Smrg    lt_cv_deplibs_check_method=pass_all
43869e7bcd65Smrg    ;;
43879e7bcd65Smrg  pc)
43889e7bcd65Smrg    lt_cv_deplibs_check_method=pass_all
43899e7bcd65Smrg    ;;
43909e7bcd65Smrg  esac
43919e7bcd65Smrg  ;;
43929e7bcd65Smrg
43939e7bcd65Smrgtpf*)
43949e7bcd65Smrg  lt_cv_deplibs_check_method=pass_all
43959e7bcd65Smrg  ;;
43969e7bcd65Smrgesac
43979e7bcd65Smrg])
43989e7bcd65Smrg
43999e7bcd65Smrgfile_magic_glob=
44009e7bcd65Smrgwant_nocaseglob=no
44019e7bcd65Smrgif test "$build" = "$host"; then
44029e7bcd65Smrg  case $host_os in
44039e7bcd65Smrg  mingw* | pw32*)
44049e7bcd65Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
44059e7bcd65Smrg      want_nocaseglob=yes
44069e7bcd65Smrg    else
44079e7bcd65Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
44089e7bcd65Smrg    fi
44099e7bcd65Smrg    ;;
44109e7bcd65Smrg  esac
44119e7bcd65Smrgfi
44129e7bcd65Smrg
44139e7bcd65Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
44149e7bcd65Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
44159e7bcd65Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
44169e7bcd65Smrg
44179e7bcd65Smrg_LT_DECL([], [deplibs_check_method], [1],
44189e7bcd65Smrg    [Method to check whether dependent libraries are shared objects])
44199e7bcd65Smrg_LT_DECL([], [file_magic_cmd], [1],
44209e7bcd65Smrg    [Command to use when deplibs_check_method = "file_magic"])
44219e7bcd65Smrg_LT_DECL([], [file_magic_glob], [1],
44229e7bcd65Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
44239e7bcd65Smrg_LT_DECL([], [want_nocaseglob], [1],
44249e7bcd65Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
44259e7bcd65Smrg])# _LT_CHECK_MAGIC_METHOD
44269e7bcd65Smrg
44279e7bcd65Smrg
44289e7bcd65Smrg# LT_PATH_NM
44299e7bcd65Smrg# ----------
44309e7bcd65Smrg# find the pathname to a BSD- or MS-compatible name lister
44319e7bcd65SmrgAC_DEFUN([LT_PATH_NM],
44329e7bcd65Smrg[AC_REQUIRE([AC_PROG_CC])dnl
44339e7bcd65SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
44349e7bcd65Smrg[if test -n "$NM"; then
44359e7bcd65Smrg  # Let the user override the test.
44369e7bcd65Smrg  lt_cv_path_NM="$NM"
44379e7bcd65Smrgelse
44389e7bcd65Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
44399e7bcd65Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
44409e7bcd65Smrg    lt_nm_to_check="$lt_nm_to_check nm"
44419e7bcd65Smrg  fi
44429e7bcd65Smrg  for lt_tmp_nm in $lt_nm_to_check; do
44439e7bcd65Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
44449e7bcd65Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
44459e7bcd65Smrg      IFS="$lt_save_ifs"
44469e7bcd65Smrg      test -z "$ac_dir" && ac_dir=.
44479e7bcd65Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
44489e7bcd65Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
44499e7bcd65Smrg	# Check to see if the nm accepts a BSD-compat flag.
44509e7bcd65Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
44519e7bcd65Smrg	#   nm: unknown option "B" ignored
44529e7bcd65Smrg	# Tru64's nm complains that /dev/null is an invalid object file
44539e7bcd65Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
44549e7bcd65Smrg	*/dev/null* | *'Invalid file or object type'*)
44559e7bcd65Smrg	  lt_cv_path_NM="$tmp_nm -B"
44569e7bcd65Smrg	  break
44579e7bcd65Smrg	  ;;
44589e7bcd65Smrg	*)
44599e7bcd65Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
44609e7bcd65Smrg	  */dev/null*)
44619e7bcd65Smrg	    lt_cv_path_NM="$tmp_nm -p"
44629e7bcd65Smrg	    break
44639e7bcd65Smrg	    ;;
44649e7bcd65Smrg	  *)
44659e7bcd65Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
44669e7bcd65Smrg	    continue # so that we can try to find one that supports BSD flags
44679e7bcd65Smrg	    ;;
44689e7bcd65Smrg	  esac
44699e7bcd65Smrg	  ;;
44709e7bcd65Smrg	esac
44719e7bcd65Smrg      fi
44729e7bcd65Smrg    done
44739e7bcd65Smrg    IFS="$lt_save_ifs"
44749e7bcd65Smrg  done
44759e7bcd65Smrg  : ${lt_cv_path_NM=no}
44769e7bcd65Smrgfi])
44779e7bcd65Smrgif test "$lt_cv_path_NM" != "no"; then
44789e7bcd65Smrg  NM="$lt_cv_path_NM"
44799e7bcd65Smrgelse
44809e7bcd65Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
44819e7bcd65Smrg  if test -n "$DUMPBIN"; then :
44829e7bcd65Smrg    # Let the user override the test.
44839e7bcd65Smrg  else
44849e7bcd65Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
44859e7bcd65Smrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
44869e7bcd65Smrg    *COFF*)
44879e7bcd65Smrg      DUMPBIN="$DUMPBIN -symbols"
44889e7bcd65Smrg      ;;
44899e7bcd65Smrg    *)
44909e7bcd65Smrg      DUMPBIN=:
44919e7bcd65Smrg      ;;
44929e7bcd65Smrg    esac
44939e7bcd65Smrg  fi
44949e7bcd65Smrg  AC_SUBST([DUMPBIN])
44959e7bcd65Smrg  if test "$DUMPBIN" != ":"; then
44969e7bcd65Smrg    NM="$DUMPBIN"
44979e7bcd65Smrg  fi
44989e7bcd65Smrgfi
44999e7bcd65Smrgtest -z "$NM" && NM=nm
45009e7bcd65SmrgAC_SUBST([NM])
45019e7bcd65Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
45029e7bcd65Smrg
45039e7bcd65SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
45049e7bcd65Smrg  [lt_cv_nm_interface="BSD nm"
45059e7bcd65Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
45069e7bcd65Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
45079e7bcd65Smrg  (eval "$ac_compile" 2>conftest.err)
45089e7bcd65Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
45099e7bcd65Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
45109e7bcd65Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
45119e7bcd65Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
45129e7bcd65Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
45139e7bcd65Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
45149e7bcd65Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
45159e7bcd65Smrg    lt_cv_nm_interface="MS dumpbin"
45169e7bcd65Smrg  fi
45179e7bcd65Smrg  rm -f conftest*])
45189e7bcd65Smrg])# LT_PATH_NM
45199e7bcd65Smrg
45209e7bcd65Smrg# Old names:
45219e7bcd65SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
45229e7bcd65SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
45239e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
45249e7bcd65Smrgdnl AC_DEFUN([AM_PROG_NM], [])
45259e7bcd65Smrgdnl AC_DEFUN([AC_PROG_NM], [])
45269e7bcd65Smrg
45279e7bcd65Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
45289e7bcd65Smrg# --------------------------------
45299e7bcd65Smrg# how to determine the name of the shared library
45309e7bcd65Smrg# associated with a specific link library.
45319e7bcd65Smrg#  -- PORTME fill in with the dynamic library characteristics
45329e7bcd65Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
45339e7bcd65Smrg[m4_require([_LT_DECL_EGREP])
45349e7bcd65Smrgm4_require([_LT_DECL_OBJDUMP])
45359e7bcd65Smrgm4_require([_LT_DECL_DLLTOOL])
45369e7bcd65SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
45379e7bcd65Smrglt_cv_sharedlib_from_linklib_cmd,
45389e7bcd65Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
45399e7bcd65Smrg
45409e7bcd65Smrgcase $host_os in
45419e7bcd65Smrgcygwin* | mingw* | pw32* | cegcc*)
45429e7bcd65Smrg  # two different shell functions defined in ltmain.sh
45439e7bcd65Smrg  # decide which to use based on capabilities of $DLLTOOL
45449e7bcd65Smrg  case `$DLLTOOL --help 2>&1` in
45459e7bcd65Smrg  *--identify-strict*)
45469e7bcd65Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
45479e7bcd65Smrg    ;;
45489e7bcd65Smrg  *)
45499e7bcd65Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
45509e7bcd65Smrg    ;;
45519e7bcd65Smrg  esac
45529e7bcd65Smrg  ;;
45539e7bcd65Smrg*)
45549e7bcd65Smrg  # fallback: assume linklib IS sharedlib
45559e7bcd65Smrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
45569e7bcd65Smrg  ;;
45579e7bcd65Smrgesac
45589e7bcd65Smrg])
45599e7bcd65Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
45609e7bcd65Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
45619e7bcd65Smrg
45629e7bcd65Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
45639e7bcd65Smrg    [Command to associate shared and link libraries])
45649e7bcd65Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
45659e7bcd65Smrg
45669e7bcd65Smrg
45679e7bcd65Smrg# _LT_PATH_MANIFEST_TOOL
45689e7bcd65Smrg# ----------------------
45699e7bcd65Smrg# locate the manifest tool
45709e7bcd65Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
45719e7bcd65Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
45729e7bcd65Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
45739e7bcd65SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
45749e7bcd65Smrg  [lt_cv_path_mainfest_tool=no
45759e7bcd65Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
45769e7bcd65Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
45779e7bcd65Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
45789e7bcd65Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
45799e7bcd65Smrg    lt_cv_path_mainfest_tool=yes
45809e7bcd65Smrg  fi
45819e7bcd65Smrg  rm -f conftest*])
45829e7bcd65Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
45839e7bcd65Smrg  MANIFEST_TOOL=:
45849e7bcd65Smrgfi
45859e7bcd65Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
45869e7bcd65Smrg])# _LT_PATH_MANIFEST_TOOL
45879e7bcd65Smrg
45889e7bcd65Smrg
45899e7bcd65Smrg# LT_LIB_M
45909e7bcd65Smrg# --------
45919e7bcd65Smrg# check for math library
45929e7bcd65SmrgAC_DEFUN([LT_LIB_M],
45939e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
45949e7bcd65SmrgLIBM=
45959e7bcd65Smrgcase $host in
45969e7bcd65Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
45979e7bcd65Smrg  # These system don't have libm, or don't need it
45989e7bcd65Smrg  ;;
45999e7bcd65Smrg*-ncr-sysv4.3*)
46009e7bcd65Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
46019e7bcd65Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
46029e7bcd65Smrg  ;;
46039e7bcd65Smrg*)
46049e7bcd65Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
46059e7bcd65Smrg  ;;
46069e7bcd65Smrgesac
46079e7bcd65SmrgAC_SUBST([LIBM])
46089e7bcd65Smrg])# LT_LIB_M
46099e7bcd65Smrg
46109e7bcd65Smrg# Old name:
46119e7bcd65SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
46129e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
46139e7bcd65Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
46149e7bcd65Smrg
46159e7bcd65Smrg
46169e7bcd65Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
46179e7bcd65Smrg# -------------------------------
46189e7bcd65Smrgm4_defun([_LT_COMPILER_NO_RTTI],
46199e7bcd65Smrg[m4_require([_LT_TAG_COMPILER])dnl
46209e7bcd65Smrg
46219e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
46229e7bcd65Smrg
46239e7bcd65Smrgif test "$GCC" = yes; then
46249e7bcd65Smrg  case $cc_basename in
46259e7bcd65Smrg  nvcc*)
46269e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
46279e7bcd65Smrg  *)
46289e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
46299e7bcd65Smrg  esac
46309e7bcd65Smrg
46319e7bcd65Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
46329e7bcd65Smrg    lt_cv_prog_compiler_rtti_exceptions,
46339e7bcd65Smrg    [-fno-rtti -fno-exceptions], [],
46349e7bcd65Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
46359e7bcd65Smrgfi
46369e7bcd65Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
46379e7bcd65Smrg	[Compiler flag to turn off builtin functions])
46389e7bcd65Smrg])# _LT_COMPILER_NO_RTTI
46399e7bcd65Smrg
46409e7bcd65Smrg
46419e7bcd65Smrg# _LT_CMD_GLOBAL_SYMBOLS
46429e7bcd65Smrg# ----------------------
46439e7bcd65Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
46449e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
46459e7bcd65SmrgAC_REQUIRE([AC_PROG_CC])dnl
46469e7bcd65SmrgAC_REQUIRE([AC_PROG_AWK])dnl
46479e7bcd65SmrgAC_REQUIRE([LT_PATH_NM])dnl
46489e7bcd65SmrgAC_REQUIRE([LT_PATH_LD])dnl
46499e7bcd65Smrgm4_require([_LT_DECL_SED])dnl
46509e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl
46519e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl
46529e7bcd65Smrg
46539e7bcd65Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
46549e7bcd65SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
46559e7bcd65SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
46569e7bcd65Smrg[
46579e7bcd65Smrg# These are sane defaults that work on at least a few old systems.
46589e7bcd65Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
46599e7bcd65Smrg
46609e7bcd65Smrg# Character class describing NM global symbol codes.
46619e7bcd65Smrgsymcode='[[BCDEGRST]]'
46629e7bcd65Smrg
46639e7bcd65Smrg# Regexp to match symbols that can be accessed directly from C.
46649e7bcd65Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
46659e7bcd65Smrg
46669e7bcd65Smrg# Define system-specific variables.
46679e7bcd65Smrgcase $host_os in
46689e7bcd65Smrgaix*)
46699e7bcd65Smrg  symcode='[[BCDT]]'
46709e7bcd65Smrg  ;;
46719e7bcd65Smrgcygwin* | mingw* | pw32* | cegcc*)
46729e7bcd65Smrg  symcode='[[ABCDGISTW]]'
46739e7bcd65Smrg  ;;
46749e7bcd65Smrghpux*)
46759e7bcd65Smrg  if test "$host_cpu" = ia64; then
46769e7bcd65Smrg    symcode='[[ABCDEGRST]]'
46779e7bcd65Smrg  fi
46789e7bcd65Smrg  ;;
46799e7bcd65Smrgirix* | nonstopux*)
46809e7bcd65Smrg  symcode='[[BCDEGRST]]'
46819e7bcd65Smrg  ;;
46829e7bcd65Smrgosf*)
46839e7bcd65Smrg  symcode='[[BCDEGQRST]]'
46849e7bcd65Smrg  ;;
46859e7bcd65Smrgsolaris*)
46869e7bcd65Smrg  symcode='[[BDRT]]'
46879e7bcd65Smrg  ;;
46889e7bcd65Smrgsco3.2v5*)
46899e7bcd65Smrg  symcode='[[DT]]'
46909e7bcd65Smrg  ;;
46919e7bcd65Smrgsysv4.2uw2*)
46929e7bcd65Smrg  symcode='[[DT]]'
46939e7bcd65Smrg  ;;
46949e7bcd65Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
46959e7bcd65Smrg  symcode='[[ABDT]]'
46969e7bcd65Smrg  ;;
46979e7bcd65Smrgsysv4)
46989e7bcd65Smrg  symcode='[[DFNSTU]]'
46999e7bcd65Smrg  ;;
47009e7bcd65Smrgesac
47019e7bcd65Smrg
47029e7bcd65Smrg# If we're using GNU nm, then use its standard symbol codes.
47039e7bcd65Smrgcase `$NM -V 2>&1` in
47049e7bcd65Smrg*GNU* | *'with BFD'*)
47059e7bcd65Smrg  symcode='[[ABCDGIRSTW]]' ;;
47069e7bcd65Smrgesac
47079e7bcd65Smrg
47089e7bcd65Smrg# Transform an extracted symbol line into a proper C declaration.
47099e7bcd65Smrg# Some systems (esp. on ia64) link data and code symbols differently,
47109e7bcd65Smrg# so use this general approach.
47119e7bcd65Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
47129e7bcd65Smrg
47139e7bcd65Smrg# Transform an extracted symbol line into symbol name and symbol address
47149e7bcd65Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
47159e7bcd65Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
47169e7bcd65Smrg
47179e7bcd65Smrg# Handle CRLF in mingw tool chain
47189e7bcd65Smrgopt_cr=
47199e7bcd65Smrgcase $build_os in
47209e7bcd65Smrgmingw*)
47219e7bcd65Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
47229e7bcd65Smrg  ;;
47239e7bcd65Smrgesac
47249e7bcd65Smrg
47259e7bcd65Smrg# Try without a prefix underscore, then with it.
47269e7bcd65Smrgfor ac_symprfx in "" "_"; do
47279e7bcd65Smrg
47289e7bcd65Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
47299e7bcd65Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
47309e7bcd65Smrg
47319e7bcd65Smrg  # Write the raw and C identifiers.
47329e7bcd65Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
47339e7bcd65Smrg    # Fake it for dumpbin and say T for any non-static function
47349e7bcd65Smrg    # and D for any global variable.
47359e7bcd65Smrg    # Also find C++ and __fastcall symbols from MSVC++,
47369e7bcd65Smrg    # which start with @ or ?.
47379e7bcd65Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
47389e7bcd65Smrg"     {last_section=section; section=\$ 3};"\
47399e7bcd65Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
47409e7bcd65Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
47419e7bcd65Smrg"     \$ 0!~/External *\|/{next};"\
47429e7bcd65Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
47439e7bcd65Smrg"     {if(hide[section]) next};"\
47449e7bcd65Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
47459e7bcd65Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
47469e7bcd65Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
47479e7bcd65Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
47489e7bcd65Smrg"     ' prfx=^$ac_symprfx]"
47499e7bcd65Smrg  else
47509e7bcd65Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
47519e7bcd65Smrg  fi
47529e7bcd65Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
47539e7bcd65Smrg
47549e7bcd65Smrg  # Check to see that the pipe works correctly.
47559e7bcd65Smrg  pipe_works=no
47569e7bcd65Smrg
47579e7bcd65Smrg  rm -f conftest*
47589e7bcd65Smrg  cat > conftest.$ac_ext <<_LT_EOF
47599e7bcd65Smrg#ifdef __cplusplus
47609e7bcd65Smrgextern "C" {
47619e7bcd65Smrg#endif
47629e7bcd65Smrgchar nm_test_var;
47639e7bcd65Smrgvoid nm_test_func(void);
47649e7bcd65Smrgvoid nm_test_func(void){}
47659e7bcd65Smrg#ifdef __cplusplus
47669e7bcd65Smrg}
47679e7bcd65Smrg#endif
47689e7bcd65Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
47699e7bcd65Smrg_LT_EOF
47709e7bcd65Smrg
47719e7bcd65Smrg  if AC_TRY_EVAL(ac_compile); then
47729e7bcd65Smrg    # Now try to grab the symbols.
47739e7bcd65Smrg    nlist=conftest.nm
47749e7bcd65Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
47759e7bcd65Smrg      # Try sorting and uniquifying the output.
47769e7bcd65Smrg      if sort "$nlist" | uniq > "$nlist"T; then
47779e7bcd65Smrg	mv -f "$nlist"T "$nlist"
47789e7bcd65Smrg      else
47799e7bcd65Smrg	rm -f "$nlist"T
47809e7bcd65Smrg      fi
47819e7bcd65Smrg
47829e7bcd65Smrg      # Make sure that we snagged all the symbols we need.
47839e7bcd65Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
47849e7bcd65Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
47859e7bcd65Smrg	  cat <<_LT_EOF > conftest.$ac_ext
47869e7bcd65Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
47879e7bcd65Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
47889e7bcd65Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
47899e7bcd65Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
47909e7bcd65Smrg# define LT@&t@_DLSYM_CONST
47919e7bcd65Smrg#elif defined(__osf__)
47929e7bcd65Smrg/* This system does not cope well with relocations in const data.  */
47939e7bcd65Smrg# define LT@&t@_DLSYM_CONST
47949e7bcd65Smrg#else
47959e7bcd65Smrg# define LT@&t@_DLSYM_CONST const
47969e7bcd65Smrg#endif
47979e7bcd65Smrg
47989e7bcd65Smrg#ifdef __cplusplus
47999e7bcd65Smrgextern "C" {
48009e7bcd65Smrg#endif
48019e7bcd65Smrg
48029e7bcd65Smrg_LT_EOF
48039e7bcd65Smrg	  # Now generate the symbol file.
48049e7bcd65Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
48059e7bcd65Smrg
48069e7bcd65Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
48079e7bcd65Smrg
48089e7bcd65Smrg/* The mapping between symbol names and symbols.  */
48099e7bcd65SmrgLT@&t@_DLSYM_CONST struct {
48109e7bcd65Smrg  const char *name;
48119e7bcd65Smrg  void       *address;
48129e7bcd65Smrg}
48139e7bcd65Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
48149e7bcd65Smrg{
48159e7bcd65Smrg  { "@PROGRAM@", (void *) 0 },
48169e7bcd65Smrg_LT_EOF
48179e7bcd65Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
48189e7bcd65Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
48199e7bcd65Smrg  {0, (void *) 0}
48209e7bcd65Smrg};
48219e7bcd65Smrg
48229e7bcd65Smrg/* This works around a problem in FreeBSD linker */
48239e7bcd65Smrg#ifdef FREEBSD_WORKAROUND
48249e7bcd65Smrgstatic const void *lt_preloaded_setup() {
48259e7bcd65Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
48269e7bcd65Smrg}
48279e7bcd65Smrg#endif
48289e7bcd65Smrg
48299e7bcd65Smrg#ifdef __cplusplus
48309e7bcd65Smrg}
48319e7bcd65Smrg#endif
48329e7bcd65Smrg_LT_EOF
48339e7bcd65Smrg	  # Now try linking the two files.
48349e7bcd65Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
48359e7bcd65Smrg	  lt_globsym_save_LIBS=$LIBS
48369e7bcd65Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
48379e7bcd65Smrg	  LIBS="conftstm.$ac_objext"
48389e7bcd65Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
48399e7bcd65Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
48409e7bcd65Smrg	    pipe_works=yes
48419e7bcd65Smrg	  fi
48429e7bcd65Smrg	  LIBS=$lt_globsym_save_LIBS
48439e7bcd65Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
48449e7bcd65Smrg	else
48459e7bcd65Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
48469e7bcd65Smrg	fi
48479e7bcd65Smrg      else
48489e7bcd65Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
48499e7bcd65Smrg      fi
48509e7bcd65Smrg    else
48519e7bcd65Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
48529e7bcd65Smrg    fi
48539e7bcd65Smrg  else
48549e7bcd65Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
48559e7bcd65Smrg    cat conftest.$ac_ext >&5
48569e7bcd65Smrg  fi
48579e7bcd65Smrg  rm -rf conftest* conftst*
48589e7bcd65Smrg
48599e7bcd65Smrg  # Do not use the global_symbol_pipe unless it works.
48609e7bcd65Smrg  if test "$pipe_works" = yes; then
48619e7bcd65Smrg    break
48629e7bcd65Smrg  else
48639e7bcd65Smrg    lt_cv_sys_global_symbol_pipe=
48649e7bcd65Smrg  fi
48659e7bcd65Smrgdone
48669e7bcd65Smrg])
48679e7bcd65Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
48689e7bcd65Smrg  lt_cv_sys_global_symbol_to_cdecl=
48699e7bcd65Smrgfi
48709e7bcd65Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
48719e7bcd65Smrg  AC_MSG_RESULT(failed)
48729e7bcd65Smrgelse
48739e7bcd65Smrg  AC_MSG_RESULT(ok)
48749e7bcd65Smrgfi
48759e7bcd65Smrg
48769e7bcd65Smrg# Response file support.
48779e7bcd65Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
48789e7bcd65Smrg  nm_file_list_spec='@'
48799e7bcd65Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
48809e7bcd65Smrg  nm_file_list_spec='@'
48819e7bcd65Smrgfi
48829e7bcd65Smrg
48839e7bcd65Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
48849e7bcd65Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
48859e7bcd65Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
48869e7bcd65Smrg    [Transform the output of nm in a proper C declaration])
48879e7bcd65Smrg_LT_DECL([global_symbol_to_c_name_address],
48889e7bcd65Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
48899e7bcd65Smrg    [Transform the output of nm in a C name address pair])
48909e7bcd65Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
48919e7bcd65Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
48929e7bcd65Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
48939e7bcd65Smrg_LT_DECL([], [nm_file_list_spec], [1],
48949e7bcd65Smrg    [Specify filename containing input files for $NM])
48959e7bcd65Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
48969e7bcd65Smrg
48979e7bcd65Smrg
48989e7bcd65Smrg# _LT_COMPILER_PIC([TAGNAME])
48999e7bcd65Smrg# ---------------------------
49009e7bcd65Smrgm4_defun([_LT_COMPILER_PIC],
49019e7bcd65Smrg[m4_require([_LT_TAG_COMPILER])dnl
49029e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
49039e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
49049e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
49059e7bcd65Smrg
49069e7bcd65Smrgm4_if([$1], [CXX], [
49079e7bcd65Smrg  # C++ specific cases for pic, static, wl, etc.
49089e7bcd65Smrg  if test "$GXX" = yes; then
49099e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49109e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
49119e7bcd65Smrg
49129e7bcd65Smrg    case $host_os in
49139e7bcd65Smrg    aix*)
49149e7bcd65Smrg      # All AIX code is PIC.
49159e7bcd65Smrg      if test "$host_cpu" = ia64; then
49169e7bcd65Smrg	# AIX 5 now supports IA64 processor
49179e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
49189e7bcd65Smrg      fi
49199e7bcd65Smrg      ;;
49209e7bcd65Smrg
49219e7bcd65Smrg    amigaos*)
49229e7bcd65Smrg      case $host_cpu in
49239e7bcd65Smrg      powerpc)
49249e7bcd65Smrg            # see comment about AmigaOS4 .so support
49259e7bcd65Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
49269e7bcd65Smrg        ;;
49279e7bcd65Smrg      m68k)
49289e7bcd65Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
49299e7bcd65Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
49309e7bcd65Smrg            # like `-m68040'.
49319e7bcd65Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
49329e7bcd65Smrg        ;;
49339e7bcd65Smrg      esac
49349e7bcd65Smrg      ;;
49359e7bcd65Smrg
49369e7bcd65Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
49379e7bcd65Smrg      # PIC is the default for these OSes.
49389e7bcd65Smrg      ;;
49399e7bcd65Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
49409e7bcd65Smrg      # This hack is so that the source file can tell whether it is being
49419e7bcd65Smrg      # built for inclusion in a dll (and should export symbols for example).
49429e7bcd65Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
49439e7bcd65Smrg      # (--disable-auto-import) libraries
49449e7bcd65Smrg      m4_if([$1], [GCJ], [],
49459e7bcd65Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
49469e7bcd65Smrg      ;;
49479e7bcd65Smrg    darwin* | rhapsody*)
49489e7bcd65Smrg      # PIC is the default on this platform
49499e7bcd65Smrg      # Common symbols not allowed in MH_DYLIB files
49509e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
49519e7bcd65Smrg      ;;
49529e7bcd65Smrg    *djgpp*)
49539e7bcd65Smrg      # DJGPP does not support shared libraries at all
49549e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
49559e7bcd65Smrg      ;;
49569e7bcd65Smrg    haiku*)
49579e7bcd65Smrg      # PIC is the default for Haiku.
49589e7bcd65Smrg      # The "-static" flag exists, but is broken.
49599e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
49609e7bcd65Smrg      ;;
49619e7bcd65Smrg    interix[[3-9]]*)
49629e7bcd65Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
49639e7bcd65Smrg      # Instead, we relocate shared libraries at runtime.
49649e7bcd65Smrg      ;;
49659e7bcd65Smrg    sysv4*MP*)
49669e7bcd65Smrg      if test -d /usr/nec; then
49679e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
49689e7bcd65Smrg      fi
49699e7bcd65Smrg      ;;
49709e7bcd65Smrg    hpux*)
49719e7bcd65Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
49729e7bcd65Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
49739e7bcd65Smrg      # sets the default TLS model and affects inlining.
49749e7bcd65Smrg      case $host_cpu in
49759e7bcd65Smrg      hppa*64*)
49769e7bcd65Smrg	;;
49779e7bcd65Smrg      *)
49789e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
49799e7bcd65Smrg	;;
49809e7bcd65Smrg      esac
49819e7bcd65Smrg      ;;
49829e7bcd65Smrg    *qnx* | *nto*)
49839e7bcd65Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
49849e7bcd65Smrg      # it will coredump.
49859e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
49869e7bcd65Smrg      ;;
49879e7bcd65Smrg    *)
49889e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
49899e7bcd65Smrg      ;;
49909e7bcd65Smrg    esac
49919e7bcd65Smrg  else
49929e7bcd65Smrg    case $host_os in
49939e7bcd65Smrg      aix[[4-9]]*)
49949e7bcd65Smrg	# All AIX code is PIC.
49959e7bcd65Smrg	if test "$host_cpu" = ia64; then
49969e7bcd65Smrg	  # AIX 5 now supports IA64 processor
49979e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
49989e7bcd65Smrg	else
49999e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
50009e7bcd65Smrg	fi
50019e7bcd65Smrg	;;
50029e7bcd65Smrg      chorus*)
50039e7bcd65Smrg	case $cc_basename in
50049e7bcd65Smrg	cxch68*)
50059e7bcd65Smrg	  # Green Hills C++ Compiler
50069e7bcd65Smrg	  # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
50079e7bcd65Smrg	  ;;
50089e7bcd65Smrg	esac
50099e7bcd65Smrg	;;
50109e7bcd65Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
50119e7bcd65Smrg	# This hack is so that the source file can tell whether it is being
50129e7bcd65Smrg	# built for inclusion in a dll (and should export symbols for example).
50139e7bcd65Smrg	m4_if([$1], [GCJ], [],
50149e7bcd65Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
50159e7bcd65Smrg	;;
50169e7bcd65Smrg      dgux*)
50179e7bcd65Smrg	case $cc_basename in
50189e7bcd65Smrg	  ec++*)
50199e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50209e7bcd65Smrg	    ;;
50219e7bcd65Smrg	  ghcx*)
50229e7bcd65Smrg	    # Green Hills C++ Compiler
50239e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
50249e7bcd65Smrg	    ;;
50259e7bcd65Smrg	  *)
50269e7bcd65Smrg	    ;;
50279e7bcd65Smrg	esac
50289e7bcd65Smrg	;;
50299e7bcd65Smrg      freebsd* | dragonfly*)
50309e7bcd65Smrg	# FreeBSD uses GNU C++
50319e7bcd65Smrg	;;
50329e7bcd65Smrg      hpux9* | hpux10* | hpux11*)
50339e7bcd65Smrg	case $cc_basename in
50349e7bcd65Smrg	  CC*)
50359e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50369e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
50379e7bcd65Smrg	    if test "$host_cpu" != ia64; then
50389e7bcd65Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
50399e7bcd65Smrg	    fi
50409e7bcd65Smrg	    ;;
50419e7bcd65Smrg	  aCC*)
50429e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50439e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
50449e7bcd65Smrg	    case $host_cpu in
50459e7bcd65Smrg	    hppa*64*|ia64*)
50469e7bcd65Smrg	      # +Z the default
50479e7bcd65Smrg	      ;;
50489e7bcd65Smrg	    *)
50499e7bcd65Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
50509e7bcd65Smrg	      ;;
50519e7bcd65Smrg	    esac
50529e7bcd65Smrg	    ;;
50539e7bcd65Smrg	  *)
50549e7bcd65Smrg	    ;;
50559e7bcd65Smrg	esac
50569e7bcd65Smrg	;;
50579e7bcd65Smrg      interix*)
50589e7bcd65Smrg	# This is c89, which is MS Visual C++ (no shared libs)
50599e7bcd65Smrg	# Anyone wants to do a port?
50609e7bcd65Smrg	;;
50619e7bcd65Smrg      irix5* | irix6* | nonstopux*)
50629e7bcd65Smrg	case $cc_basename in
50639e7bcd65Smrg	  CC*)
50649e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50659e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
50669e7bcd65Smrg	    # CC pic flag -KPIC is the default.
50679e7bcd65Smrg	    ;;
50689e7bcd65Smrg	  *)
50699e7bcd65Smrg	    ;;
50709e7bcd65Smrg	esac
50719e7bcd65Smrg	;;
50729e7bcd65Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
50739e7bcd65Smrg	case $cc_basename in
50749e7bcd65Smrg	  KCC*)
50759e7bcd65Smrg	    # KAI C++ Compiler
50769e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
50779e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50789e7bcd65Smrg	    ;;
50799e7bcd65Smrg	  ecpc* )
50809e7bcd65Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
50819e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50829e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50839e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
50849e7bcd65Smrg	    ;;
50859e7bcd65Smrg	  icpc* )
50869e7bcd65Smrg	    # Intel C++, used to be incompatible with GCC.
50879e7bcd65Smrg	    # ICC 10 doesn't accept -KPIC any more.
50889e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50899e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50909e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
50919e7bcd65Smrg	    ;;
50929e7bcd65Smrg	  pgCC* | pgcpp*)
50939e7bcd65Smrg	    # Portland Group C++ compiler
50949e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
50959e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
50969e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50979e7bcd65Smrg	    ;;
50989e7bcd65Smrg	  cxx*)
50999e7bcd65Smrg	    # Compaq C++
51009e7bcd65Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
51019e7bcd65Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
51029e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
51039e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51049e7bcd65Smrg	    ;;
51059e7bcd65Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
51069e7bcd65Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
51079e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51089e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
51099e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
51109e7bcd65Smrg	    ;;
51119e7bcd65Smrg	  *)
51129e7bcd65Smrg	    case `$CC -V 2>&1 | sed 5q` in
51139e7bcd65Smrg	    *Sun\ C*)
51149e7bcd65Smrg	      # Sun C++ 5.9
51159e7bcd65Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51169e7bcd65Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51179e7bcd65Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
51189e7bcd65Smrg	      ;;
51199e7bcd65Smrg	    esac
51209e7bcd65Smrg	    ;;
51219e7bcd65Smrg	esac
51229e7bcd65Smrg	;;
51239e7bcd65Smrg      lynxos*)
51249e7bcd65Smrg	;;
51259e7bcd65Smrg      m88k*)
51269e7bcd65Smrg	;;
51279e7bcd65Smrg      mvs*)
51289e7bcd65Smrg	case $cc_basename in
51299e7bcd65Smrg	  cxx*)
51309e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
51319e7bcd65Smrg	    ;;
51329e7bcd65Smrg	  *)
51339e7bcd65Smrg	    ;;
51349e7bcd65Smrg	esac
51359e7bcd65Smrg	;;
51369e7bcd65Smrg      netbsd*)
51379e7bcd65Smrg	;;
51389e7bcd65Smrg      *qnx* | *nto*)
51399e7bcd65Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
51409e7bcd65Smrg        # it will coredump.
51419e7bcd65Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
51429e7bcd65Smrg        ;;
51439e7bcd65Smrg      osf3* | osf4* | osf5*)
51449e7bcd65Smrg	case $cc_basename in
51459e7bcd65Smrg	  KCC*)
51469e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
51479e7bcd65Smrg	    ;;
51489e7bcd65Smrg	  RCC*)
51499e7bcd65Smrg	    # Rational C++ 2.4.1
51509e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
51519e7bcd65Smrg	    ;;
51529e7bcd65Smrg	  cxx*)
51539e7bcd65Smrg	    # Digital/Compaq C++
51549e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51559e7bcd65Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
51569e7bcd65Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
51579e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
51589e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51599e7bcd65Smrg	    ;;
51609e7bcd65Smrg	  *)
51619e7bcd65Smrg	    ;;
51629e7bcd65Smrg	esac
51639e7bcd65Smrg	;;
51649e7bcd65Smrg      psos*)
51659e7bcd65Smrg	;;
51669e7bcd65Smrg      solaris*)
51679e7bcd65Smrg	case $cc_basename in
51689e7bcd65Smrg	  CC* | sunCC*)
51699e7bcd65Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
51709e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51719e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51729e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
51739e7bcd65Smrg	    ;;
51749e7bcd65Smrg	  gcx*)
51759e7bcd65Smrg	    # Green Hills C++ Compiler
51769e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
51779e7bcd65Smrg	    ;;
51789e7bcd65Smrg	  *)
51799e7bcd65Smrg	    ;;
51809e7bcd65Smrg	esac
51819e7bcd65Smrg	;;
51829e7bcd65Smrg      sunos4*)
51839e7bcd65Smrg	case $cc_basename in
51849e7bcd65Smrg	  CC*)
51859e7bcd65Smrg	    # Sun C++ 4.x
51869e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
51879e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51889e7bcd65Smrg	    ;;
51899e7bcd65Smrg	  lcc*)
51909e7bcd65Smrg	    # Lucid
51919e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
51929e7bcd65Smrg	    ;;
51939e7bcd65Smrg	  *)
51949e7bcd65Smrg	    ;;
51959e7bcd65Smrg	esac
51969e7bcd65Smrg	;;
51979e7bcd65Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
51989e7bcd65Smrg	case $cc_basename in
51999e7bcd65Smrg	  CC*)
52009e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52019e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52029e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52039e7bcd65Smrg	    ;;
52049e7bcd65Smrg	esac
52059e7bcd65Smrg	;;
52069e7bcd65Smrg      tandem*)
52079e7bcd65Smrg	case $cc_basename in
52089e7bcd65Smrg	  NCC*)
52099e7bcd65Smrg	    # NonStop-UX NCC 3.20
52109e7bcd65Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52119e7bcd65Smrg	    ;;
52129e7bcd65Smrg	  *)
52139e7bcd65Smrg	    ;;
52149e7bcd65Smrg	esac
52159e7bcd65Smrg	;;
52169e7bcd65Smrg      vxworks*)
52179e7bcd65Smrg	;;
52189e7bcd65Smrg      *)
52199e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52209e7bcd65Smrg	;;
52219e7bcd65Smrg    esac
52229e7bcd65Smrg  fi
52239e7bcd65Smrg],
52249e7bcd65Smrg[
52259e7bcd65Smrg  if test "$GCC" = yes; then
52269e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52279e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
52289e7bcd65Smrg
52299e7bcd65Smrg    case $host_os in
52309e7bcd65Smrg      aix*)
52319e7bcd65Smrg      # All AIX code is PIC.
52329e7bcd65Smrg      if test "$host_cpu" = ia64; then
52339e7bcd65Smrg	# AIX 5 now supports IA64 processor
52349e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52359e7bcd65Smrg      fi
52369e7bcd65Smrg      ;;
52379e7bcd65Smrg
52389e7bcd65Smrg    amigaos*)
52399e7bcd65Smrg      case $host_cpu in
52409e7bcd65Smrg      powerpc)
52419e7bcd65Smrg            # see comment about AmigaOS4 .so support
52429e7bcd65Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
52439e7bcd65Smrg        ;;
52449e7bcd65Smrg      m68k)
52459e7bcd65Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
52469e7bcd65Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
52479e7bcd65Smrg            # like `-m68040'.
52489e7bcd65Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
52499e7bcd65Smrg        ;;
52509e7bcd65Smrg      esac
52519e7bcd65Smrg      ;;
52529e7bcd65Smrg
52539e7bcd65Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
52549e7bcd65Smrg      # PIC is the default for these OSes.
52559e7bcd65Smrg      ;;
52569e7bcd65Smrg
52579e7bcd65Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
52589e7bcd65Smrg      # This hack is so that the source file can tell whether it is being
52599e7bcd65Smrg      # built for inclusion in a dll (and should export symbols for example).
52609e7bcd65Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
52619e7bcd65Smrg      # (--disable-auto-import) libraries
52629e7bcd65Smrg      m4_if([$1], [GCJ], [],
52639e7bcd65Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
52649e7bcd65Smrg      ;;
52659e7bcd65Smrg
52669e7bcd65Smrg    darwin* | rhapsody*)
52679e7bcd65Smrg      # PIC is the default on this platform
52689e7bcd65Smrg      # Common symbols not allowed in MH_DYLIB files
52699e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
52709e7bcd65Smrg      ;;
52719e7bcd65Smrg
52729e7bcd65Smrg    haiku*)
52739e7bcd65Smrg      # PIC is the default for Haiku.
52749e7bcd65Smrg      # The "-static" flag exists, but is broken.
52759e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
52769e7bcd65Smrg      ;;
52779e7bcd65Smrg
52789e7bcd65Smrg    hpux*)
52799e7bcd65Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
52809e7bcd65Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
52819e7bcd65Smrg      # sets the default TLS model and affects inlining.
52829e7bcd65Smrg      case $host_cpu in
52839e7bcd65Smrg      hppa*64*)
52849e7bcd65Smrg	# +Z the default
52859e7bcd65Smrg	;;
52869e7bcd65Smrg      *)
52879e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
52889e7bcd65Smrg	;;
52899e7bcd65Smrg      esac
52909e7bcd65Smrg      ;;
52919e7bcd65Smrg
52929e7bcd65Smrg    interix[[3-9]]*)
52939e7bcd65Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
52949e7bcd65Smrg      # Instead, we relocate shared libraries at runtime.
52959e7bcd65Smrg      ;;
52969e7bcd65Smrg
52979e7bcd65Smrg    msdosdjgpp*)
52989e7bcd65Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
52999e7bcd65Smrg      # on systems that don't support them.
53009e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
53019e7bcd65Smrg      enable_shared=no
53029e7bcd65Smrg      ;;
53039e7bcd65Smrg
53049e7bcd65Smrg    *nto* | *qnx*)
53059e7bcd65Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
53069e7bcd65Smrg      # it will coredump.
53079e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
53089e7bcd65Smrg      ;;
53099e7bcd65Smrg
53109e7bcd65Smrg    sysv4*MP*)
53119e7bcd65Smrg      if test -d /usr/nec; then
53129e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
53139e7bcd65Smrg      fi
53149e7bcd65Smrg      ;;
53159e7bcd65Smrg
53169e7bcd65Smrg    *)
53179e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53189e7bcd65Smrg      ;;
53199e7bcd65Smrg    esac
53209e7bcd65Smrg
53219e7bcd65Smrg    case $cc_basename in
53229e7bcd65Smrg    nvcc*) # Cuda Compiler Driver 2.2
53239e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
53249e7bcd65Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
53259e7bcd65Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
53269e7bcd65Smrg      fi
53279e7bcd65Smrg      ;;
53289e7bcd65Smrg    esac
53299e7bcd65Smrg  else
53309e7bcd65Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
53319e7bcd65Smrg    case $host_os in
53329e7bcd65Smrg    aix*)
53339e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53349e7bcd65Smrg      if test "$host_cpu" = ia64; then
53359e7bcd65Smrg	# AIX 5 now supports IA64 processor
53369e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53379e7bcd65Smrg      else
53389e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
53399e7bcd65Smrg      fi
53409e7bcd65Smrg      ;;
53419e7bcd65Smrg
53429e7bcd65Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
53439e7bcd65Smrg      # This hack is so that the source file can tell whether it is being
53449e7bcd65Smrg      # built for inclusion in a dll (and should export symbols for example).
53459e7bcd65Smrg      m4_if([$1], [GCJ], [],
53469e7bcd65Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
53479e7bcd65Smrg      ;;
53489e7bcd65Smrg
53499e7bcd65Smrg    hpux9* | hpux10* | hpux11*)
53509e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53519e7bcd65Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
53529e7bcd65Smrg      # not for PA HP-UX.
53539e7bcd65Smrg      case $host_cpu in
53549e7bcd65Smrg      hppa*64*|ia64*)
53559e7bcd65Smrg	# +Z the default
53569e7bcd65Smrg	;;
53579e7bcd65Smrg      *)
53589e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
53599e7bcd65Smrg	;;
53609e7bcd65Smrg      esac
53619e7bcd65Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
53629e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
53639e7bcd65Smrg      ;;
53649e7bcd65Smrg
53659e7bcd65Smrg    irix5* | irix6* | nonstopux*)
53669e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53679e7bcd65Smrg      # PIC (with -KPIC) is the default.
53689e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
53699e7bcd65Smrg      ;;
53709e7bcd65Smrg
53719e7bcd65Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
53729e7bcd65Smrg      case $cc_basename in
53739e7bcd65Smrg      # old Intel for x86_64 which still supported -KPIC.
53749e7bcd65Smrg      ecc*)
53759e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53769e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
53779e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
53789e7bcd65Smrg        ;;
53799e7bcd65Smrg      # icc used to be incompatible with GCC.
53809e7bcd65Smrg      # ICC 10 doesn't accept -KPIC any more.
53819e7bcd65Smrg      icc* | ifort*)
53829e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53839e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53849e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
53859e7bcd65Smrg        ;;
53869e7bcd65Smrg      # Lahey Fortran 8.1.
53879e7bcd65Smrg      lf95*)
53889e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53899e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
53909e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
53919e7bcd65Smrg	;;
53929e7bcd65Smrg      nagfor*)
53939e7bcd65Smrg	# NAG Fortran compiler
53949e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
53959e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
53969e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53979e7bcd65Smrg	;;
53989e7bcd65Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
53999e7bcd65Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
54009e7bcd65Smrg	# which looks to be a dead project)
54019e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54029e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
54039e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54049e7bcd65Smrg        ;;
54059e7bcd65Smrg      ccc*)
54069e7bcd65Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54079e7bcd65Smrg        # All Alpha code is PIC.
54089e7bcd65Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54099e7bcd65Smrg        ;;
54109e7bcd65Smrg      xl* | bgxl* | bgf* | mpixl*)
54119e7bcd65Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
54129e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54139e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
54149e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
54159e7bcd65Smrg	;;
54169e7bcd65Smrg      *)
54179e7bcd65Smrg	case `$CC -V 2>&1 | sed 5q` in
54189e7bcd65Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
54199e7bcd65Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
54209e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54219e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54229e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
54239e7bcd65Smrg	  ;;
54249e7bcd65Smrg	*Sun\ F* | *Sun*Fortran*)
54259e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54269e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54279e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
54289e7bcd65Smrg	  ;;
54299e7bcd65Smrg	*Sun\ C*)
54309e7bcd65Smrg	  # Sun C 5.9
54319e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54329e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54339e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54349e7bcd65Smrg	  ;;
54359e7bcd65Smrg        *Intel*\ [[CF]]*Compiler*)
54369e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54379e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
54389e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
54399e7bcd65Smrg	  ;;
54409e7bcd65Smrg	*Portland\ Group*)
54419e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54429e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
54439e7bcd65Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54449e7bcd65Smrg	  ;;
54459e7bcd65Smrg	esac
54469e7bcd65Smrg	;;
54479e7bcd65Smrg      esac
54489e7bcd65Smrg      ;;
54499e7bcd65Smrg
54509e7bcd65Smrg    newsos6)
54519e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54529e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54539e7bcd65Smrg      ;;
54549e7bcd65Smrg
54559e7bcd65Smrg    *nto* | *qnx*)
54569e7bcd65Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
54579e7bcd65Smrg      # it will coredump.
54589e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
54599e7bcd65Smrg      ;;
54609e7bcd65Smrg
54619e7bcd65Smrg    osf3* | osf4* | osf5*)
54629e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54639e7bcd65Smrg      # All OSF/1 code is PIC.
54649e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54659e7bcd65Smrg      ;;
54669e7bcd65Smrg
54679e7bcd65Smrg    rdos*)
54689e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54699e7bcd65Smrg      ;;
54709e7bcd65Smrg
54719e7bcd65Smrg    solaris*)
54729e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54739e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54749e7bcd65Smrg      case $cc_basename in
54759e7bcd65Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
54769e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
54779e7bcd65Smrg      *)
54789e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
54799e7bcd65Smrg      esac
54809e7bcd65Smrg      ;;
54819e7bcd65Smrg
54829e7bcd65Smrg    sunos4*)
54839e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
54849e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
54859e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54869e7bcd65Smrg      ;;
54879e7bcd65Smrg
54889e7bcd65Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
54899e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54909e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54919e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54929e7bcd65Smrg      ;;
54939e7bcd65Smrg
54949e7bcd65Smrg    sysv4*MP*)
54959e7bcd65Smrg      if test -d /usr/nec ;then
54969e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
54979e7bcd65Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54989e7bcd65Smrg      fi
54999e7bcd65Smrg      ;;
55009e7bcd65Smrg
55019e7bcd65Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
55029e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55039e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55049e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55059e7bcd65Smrg      ;;
55069e7bcd65Smrg
55079e7bcd65Smrg    unicos*)
55089e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55099e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55109e7bcd65Smrg      ;;
55119e7bcd65Smrg
55129e7bcd65Smrg    uts4*)
55139e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
55149e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55159e7bcd65Smrg      ;;
55169e7bcd65Smrg
55179e7bcd65Smrg    *)
55189e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55199e7bcd65Smrg      ;;
55209e7bcd65Smrg    esac
55219e7bcd65Smrg  fi
55229e7bcd65Smrg])
55239e7bcd65Smrgcase $host_os in
55249e7bcd65Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
55259e7bcd65Smrg  *djgpp*)
55269e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
55279e7bcd65Smrg    ;;
55289e7bcd65Smrg  *)
55299e7bcd65Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
55309e7bcd65Smrg    ;;
55319e7bcd65Smrgesac
55329e7bcd65Smrg
55339e7bcd65SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
55349e7bcd65Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
55359e7bcd65Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
55369e7bcd65Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
55379e7bcd65Smrg
55389e7bcd65Smrg#
55399e7bcd65Smrg# Check to make sure the PIC flag actually works.
55409e7bcd65Smrg#
55419e7bcd65Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
55429e7bcd65Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
55439e7bcd65Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
55449e7bcd65Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
55459e7bcd65Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
55469e7bcd65Smrg     "" | " "*) ;;
55479e7bcd65Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
55489e7bcd65Smrg     esac],
55499e7bcd65Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
55509e7bcd65Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
55519e7bcd65Smrgfi
55529e7bcd65Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
55539e7bcd65Smrg	[Additional compiler flags for building library objects])
55549e7bcd65Smrg
55559e7bcd65Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
55569e7bcd65Smrg	[How to pass a linker flag through the compiler])
55579e7bcd65Smrg#
55589e7bcd65Smrg# Check to make sure the static flag actually works.
55599e7bcd65Smrg#
55609e7bcd65Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
55619e7bcd65Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
55629e7bcd65Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
55639e7bcd65Smrg  $lt_tmp_static_flag,
55649e7bcd65Smrg  [],
55659e7bcd65Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
55669e7bcd65Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
55679e7bcd65Smrg	[Compiler flag to prevent dynamic linking])
55689e7bcd65Smrg])# _LT_COMPILER_PIC
55699e7bcd65Smrg
55709e7bcd65Smrg
55719e7bcd65Smrg# _LT_LINKER_SHLIBS([TAGNAME])
55729e7bcd65Smrg# ----------------------------
55739e7bcd65Smrg# See if the linker supports building shared libraries.
55749e7bcd65Smrgm4_defun([_LT_LINKER_SHLIBS],
55759e7bcd65Smrg[AC_REQUIRE([LT_PATH_LD])dnl
55769e7bcd65SmrgAC_REQUIRE([LT_PATH_NM])dnl
55779e7bcd65Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
55789e7bcd65Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
55799e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl
55809e7bcd65Smrgm4_require([_LT_DECL_SED])dnl
55819e7bcd65Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
55829e7bcd65Smrgm4_require([_LT_TAG_COMPILER])dnl
55839e7bcd65SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
55849e7bcd65Smrgm4_if([$1], [CXX], [
55859e7bcd65Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
55869e7bcd65Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
55879e7bcd65Smrg  case $host_os in
55889e7bcd65Smrg  aix[[4-9]]*)
55899e7bcd65Smrg    # If we're using GNU nm, then we don't want the "-C" option.
55909e7bcd65Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
55919e7bcd65Smrg    # Also, AIX nm treats weak defined symbols like other global defined
55929e7bcd65Smrg    # symbols, whereas GNU nm marks them as "W".
55939e7bcd65Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
55949e7bcd65Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
55959e7bcd65Smrg    else
55969e7bcd65Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
55979e7bcd65Smrg    fi
55989e7bcd65Smrg    ;;
55999e7bcd65Smrg  pw32*)
56009e7bcd65Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
56019e7bcd65Smrg    ;;
56029e7bcd65Smrg  cygwin* | mingw* | cegcc*)
56039e7bcd65Smrg    case $cc_basename in
56049e7bcd65Smrg    cl*)
56059e7bcd65Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
56069e7bcd65Smrg      ;;
56079e7bcd65Smrg    *)
56089e7bcd65Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
56099e7bcd65Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
56109e7bcd65Smrg      ;;
56119e7bcd65Smrg    esac
56129e7bcd65Smrg    ;;
56139e7bcd65Smrg  *)
56149e7bcd65Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56159e7bcd65Smrg    ;;
56169e7bcd65Smrg  esac
56179e7bcd65Smrg], [
56189e7bcd65Smrg  runpath_var=
56199e7bcd65Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
56209e7bcd65Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
56219e7bcd65Smrg  _LT_TAGVAR(archive_cmds, $1)=
56229e7bcd65Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
56239e7bcd65Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
56249e7bcd65Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
56259e7bcd65Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
56269e7bcd65Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56279e7bcd65Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
56289e7bcd65Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
56299e7bcd65Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
56309e7bcd65Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
56319e7bcd65Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
56329e7bcd65Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
56339e7bcd65Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
56349e7bcd65Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
56359e7bcd65Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
56369e7bcd65Smrg  _LT_TAGVAR(module_cmds, $1)=
56379e7bcd65Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
56389e7bcd65Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
56399e7bcd65Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
56409e7bcd65Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
56419e7bcd65Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
56429e7bcd65Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
56439e7bcd65Smrg  # included in the symbol list
56449e7bcd65Smrg  _LT_TAGVAR(include_expsyms, $1)=
56459e7bcd65Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
56469e7bcd65Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
56479e7bcd65Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
56489e7bcd65Smrg  # as well as any symbol that contains `d'.
56499e7bcd65Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
56509e7bcd65Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
56519e7bcd65Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
56529e7bcd65Smrg  # the symbol is explicitly referenced.  Since portable code cannot
56539e7bcd65Smrg  # rely on this symbol name, it's probably fine to never include it in
56549e7bcd65Smrg  # preloaded symbol tables.
56559e7bcd65Smrg  # Exclude shared library initialization/finalization symbols.
56569e7bcd65Smrgdnl Note also adjust exclude_expsyms for C++ above.
56579e7bcd65Smrg  extract_expsyms_cmds=
56589e7bcd65Smrg
56599e7bcd65Smrg  case $host_os in
56609e7bcd65Smrg  cygwin* | mingw* | pw32* | cegcc*)
56619e7bcd65Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
56629e7bcd65Smrg    # When not using gcc, we currently assume that we are using
56639e7bcd65Smrg    # Microsoft Visual C++.
56649e7bcd65Smrg    if test "$GCC" != yes; then
56659e7bcd65Smrg      with_gnu_ld=no
56669e7bcd65Smrg    fi
56679e7bcd65Smrg    ;;
56689e7bcd65Smrg  interix*)
56699e7bcd65Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
56709e7bcd65Smrg    with_gnu_ld=yes
56719e7bcd65Smrg    ;;
56729e7bcd65Smrg  openbsd*)
56739e7bcd65Smrg    with_gnu_ld=no
56749e7bcd65Smrg    ;;
56759e7bcd65Smrg  esac
56769e7bcd65Smrg
56779e7bcd65Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
56789e7bcd65Smrg
56799e7bcd65Smrg  # On some targets, GNU ld is compatible enough with the native linker
56809e7bcd65Smrg  # that we're better off using the native interface for both.
56819e7bcd65Smrg  lt_use_gnu_ld_interface=no
56829e7bcd65Smrg  if test "$with_gnu_ld" = yes; then
56839e7bcd65Smrg    case $host_os in
56849e7bcd65Smrg      aix*)
56859e7bcd65Smrg	# The AIX port of GNU ld has always aspired to compatibility
56869e7bcd65Smrg	# with the native linker.  However, as the warning in the GNU ld
56879e7bcd65Smrg	# block says, versions before 2.19.5* couldn't really create working
56889e7bcd65Smrg	# shared libraries, regardless of the interface used.
56899e7bcd65Smrg	case `$LD -v 2>&1` in
56909e7bcd65Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
56919e7bcd65Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
56929e7bcd65Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
56939e7bcd65Smrg	  *)
56949e7bcd65Smrg	    lt_use_gnu_ld_interface=yes
56959e7bcd65Smrg	    ;;
56969e7bcd65Smrg	esac
56979e7bcd65Smrg	;;
56989e7bcd65Smrg      *)
56999e7bcd65Smrg	lt_use_gnu_ld_interface=yes
57009e7bcd65Smrg	;;
57019e7bcd65Smrg    esac
57029e7bcd65Smrg  fi
57039e7bcd65Smrg
57049e7bcd65Smrg  if test "$lt_use_gnu_ld_interface" = yes; then
57059e7bcd65Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
57069e7bcd65Smrg    wlarc='${wl}'
57079e7bcd65Smrg
57089e7bcd65Smrg    # Set some defaults for GNU ld with shared library support. These
57099e7bcd65Smrg    # are reset later if shared libraries are not supported. Putting them
57109e7bcd65Smrg    # here allows them to be overridden if necessary.
57119e7bcd65Smrg    runpath_var=LD_RUN_PATH
57129e7bcd65Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
57139e7bcd65Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
57149e7bcd65Smrg    # ancient GNU ld didn't support --whole-archive et. al.
57159e7bcd65Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
57169e7bcd65Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
57179e7bcd65Smrg    else
57189e7bcd65Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
57199e7bcd65Smrg    fi
57209e7bcd65Smrg    supports_anon_versioning=no
57219e7bcd65Smrg    case `$LD -v 2>&1` in
57229e7bcd65Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
57239e7bcd65Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
57249e7bcd65Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
57259e7bcd65Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
57269e7bcd65Smrg      *\ 2.11.*) ;; # other 2.11 versions
57279e7bcd65Smrg      *) supports_anon_versioning=yes ;;
57289e7bcd65Smrg    esac
57299e7bcd65Smrg
57309e7bcd65Smrg    # See if GNU ld supports shared libraries.
57319e7bcd65Smrg    case $host_os in
57329e7bcd65Smrg    aix[[3-9]]*)
57339e7bcd65Smrg      # On AIX/PPC, the GNU linker is very broken
57349e7bcd65Smrg      if test "$host_cpu" != ia64; then
57359e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
57369e7bcd65Smrg	cat <<_LT_EOF 1>&2
57379e7bcd65Smrg
57389e7bcd65Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
57399e7bcd65Smrg*** to be unable to reliably create shared libraries on AIX.
57409e7bcd65Smrg*** Therefore, libtool is disabling shared libraries support.  If you
57419e7bcd65Smrg*** really care for shared libraries, you may want to install binutils
57429e7bcd65Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
57439e7bcd65Smrg*** You will then need to restart the configuration process.
57449e7bcd65Smrg
57459e7bcd65Smrg_LT_EOF
57469e7bcd65Smrg      fi
57479e7bcd65Smrg      ;;
57489e7bcd65Smrg
57499e7bcd65Smrg    amigaos*)
57509e7bcd65Smrg      case $host_cpu in
57519e7bcd65Smrg      powerpc)
57529e7bcd65Smrg            # see comment about AmigaOS4 .so support
57539e7bcd65Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
57549e7bcd65Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
57559e7bcd65Smrg        ;;
57569e7bcd65Smrg      m68k)
57579e7bcd65Smrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
57589e7bcd65Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
57599e7bcd65Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
57609e7bcd65Smrg        ;;
57619e7bcd65Smrg      esac
57629e7bcd65Smrg      ;;
57639e7bcd65Smrg
57649e7bcd65Smrg    beos*)
57659e7bcd65Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
57669e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
57679e7bcd65Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
57689e7bcd65Smrg	# support --undefined.  This deserves some investigation.  FIXME
57699e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
57709e7bcd65Smrg      else
57719e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
57729e7bcd65Smrg      fi
57739e7bcd65Smrg      ;;
57749e7bcd65Smrg
57759e7bcd65Smrg    cygwin* | mingw* | pw32* | cegcc*)
57769e7bcd65Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
57779e7bcd65Smrg      # as there is no search path for DLLs.
57789e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
57799e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
57809e7bcd65Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
57819e7bcd65Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
57829e7bcd65Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
57839e7bcd65Smrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
57849e7bcd65Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
57859e7bcd65Smrg
57869e7bcd65Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
57879e7bcd65Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
57889e7bcd65Smrg	# If the export-symbols file already is a .def file (1st line
57899e7bcd65Smrg	# is EXPORTS), use it as is; otherwise, prepend...
57909e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
57919e7bcd65Smrg	  cp $export_symbols $output_objdir/$soname.def;
57929e7bcd65Smrg	else
57939e7bcd65Smrg	  echo EXPORTS > $output_objdir/$soname.def;
57949e7bcd65Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
57959e7bcd65Smrg	fi~
57969e7bcd65Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
57979e7bcd65Smrg      else
57989e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
57999e7bcd65Smrg      fi
58009e7bcd65Smrg      ;;
58019e7bcd65Smrg
58029e7bcd65Smrg    haiku*)
58039e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58049e7bcd65Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58059e7bcd65Smrg      ;;
58069e7bcd65Smrg
58079e7bcd65Smrg    interix[[3-9]]*)
58089e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
58099e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58109e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58119e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
58129e7bcd65Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
58139e7bcd65Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
58149e7bcd65Smrg      # default) and relocated if they conflict, which is a slow very memory
58159e7bcd65Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
58169e7bcd65Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
58179e7bcd65Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
58189e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
58199e7bcd65Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
58209e7bcd65Smrg      ;;
58219e7bcd65Smrg
58229e7bcd65Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
58239e7bcd65Smrg      tmp_diet=no
58249e7bcd65Smrg      if test "$host_os" = linux-dietlibc; then
58259e7bcd65Smrg	case $cc_basename in
58269e7bcd65Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
58279e7bcd65Smrg	esac
58289e7bcd65Smrg      fi
58299e7bcd65Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
58309e7bcd65Smrg	 && test "$tmp_diet" = no
58319e7bcd65Smrg      then
58329e7bcd65Smrg	tmp_addflag=' $pic_flag'
58339e7bcd65Smrg	tmp_sharedflag='-shared'
58349e7bcd65Smrg	case $cc_basename,$host_cpu in
58359e7bcd65Smrg        pgcc*)				# Portland Group C compiler
58369e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
58379e7bcd65Smrg	  tmp_addflag=' $pic_flag'
58389e7bcd65Smrg	  ;;
58399e7bcd65Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
58409e7bcd65Smrg					# Portland Group f77 and f90 compilers
58419e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
58429e7bcd65Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
58439e7bcd65Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
58449e7bcd65Smrg	  tmp_addflag=' -i_dynamic' ;;
58459e7bcd65Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
58469e7bcd65Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
58479e7bcd65Smrg	ifc* | ifort*)			# Intel Fortran compiler
58489e7bcd65Smrg	  tmp_addflag=' -nofor_main' ;;
58499e7bcd65Smrg	lf95*)				# Lahey Fortran 8.1
58509e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
58519e7bcd65Smrg	  tmp_sharedflag='--shared' ;;
58529e7bcd65Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
58539e7bcd65Smrg	  tmp_sharedflag='-qmkshrobj'
58549e7bcd65Smrg	  tmp_addflag= ;;
58559e7bcd65Smrg	nvcc*)	# Cuda Compiler Driver 2.2
58569e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
58579e7bcd65Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
58589e7bcd65Smrg	  ;;
58599e7bcd65Smrg	esac
58609e7bcd65Smrg	case `$CC -V 2>&1 | sed 5q` in
58619e7bcd65Smrg	*Sun\ C*)			# Sun C 5.9
58629e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
58639e7bcd65Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
58649e7bcd65Smrg	  tmp_sharedflag='-G' ;;
58659e7bcd65Smrg	*Sun\ F*)			# Sun Fortran 8.3
58669e7bcd65Smrg	  tmp_sharedflag='-G' ;;
58679e7bcd65Smrg	esac
58689e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58699e7bcd65Smrg
58709e7bcd65Smrg        if test "x$supports_anon_versioning" = xyes; then
58719e7bcd65Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
58729e7bcd65Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
58739e7bcd65Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
58749e7bcd65Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
58759e7bcd65Smrg        fi
58769e7bcd65Smrg
58779e7bcd65Smrg	case $cc_basename in
58789e7bcd65Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
58799e7bcd65Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
58809e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
58819e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
58829e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
58839e7bcd65Smrg	  if test "x$supports_anon_versioning" = xyes; then
58849e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
58859e7bcd65Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
58869e7bcd65Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
58879e7bcd65Smrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
58889e7bcd65Smrg	  fi
58899e7bcd65Smrg	  ;;
58909e7bcd65Smrg	esac
58919e7bcd65Smrg      else
58929e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
58939e7bcd65Smrg      fi
58949e7bcd65Smrg      ;;
58959e7bcd65Smrg
58969e7bcd65Smrg    netbsd*)
58979e7bcd65Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
58989e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
58999e7bcd65Smrg	wlarc=
59009e7bcd65Smrg      else
59019e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59029e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
59039e7bcd65Smrg      fi
59049e7bcd65Smrg      ;;
59059e7bcd65Smrg
59069e7bcd65Smrg    solaris*)
59079e7bcd65Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
59089e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
59099e7bcd65Smrg	cat <<_LT_EOF 1>&2
59109e7bcd65Smrg
59119e7bcd65Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
59129e7bcd65Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
59139e7bcd65Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
59149e7bcd65Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
59159e7bcd65Smrg*** your PATH or compiler configuration so that the native linker is
59169e7bcd65Smrg*** used, and then restart.
59179e7bcd65Smrg
59189e7bcd65Smrg_LT_EOF
59199e7bcd65Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
59209e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59219e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
59229e7bcd65Smrg      else
59239e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
59249e7bcd65Smrg      fi
59259e7bcd65Smrg      ;;
59269e7bcd65Smrg
59279e7bcd65Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
59289e7bcd65Smrg      case `$LD -v 2>&1` in
59299e7bcd65Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
59309e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
59319e7bcd65Smrg	cat <<_LT_EOF 1>&2
59329e7bcd65Smrg
59339e7bcd65Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
59349e7bcd65Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
59359e7bcd65Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
59369e7bcd65Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
59379e7bcd65Smrg*** your PATH or compiler configuration so that the native linker is
59389e7bcd65Smrg*** used, and then restart.
59399e7bcd65Smrg
59409e7bcd65Smrg_LT_EOF
59419e7bcd65Smrg	;;
59429e7bcd65Smrg	*)
59439e7bcd65Smrg	  # For security reasons, it is highly recommended that you always
59449e7bcd65Smrg	  # use absolute paths for naming shared libraries, and exclude the
59459e7bcd65Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
59469e7bcd65Smrg	  # requires that you compile everything twice, which is a pain.
59479e7bcd65Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
59489e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
59499e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59509e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
59519e7bcd65Smrg	  else
59529e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
59539e7bcd65Smrg	  fi
59549e7bcd65Smrg	;;
59559e7bcd65Smrg      esac
59569e7bcd65Smrg      ;;
59579e7bcd65Smrg
59589e7bcd65Smrg    sunos4*)
59599e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
59609e7bcd65Smrg      wlarc=
59619e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
59629e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
59639e7bcd65Smrg      ;;
59649e7bcd65Smrg
59659e7bcd65Smrg    *)
59669e7bcd65Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
59679e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59689e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
59699e7bcd65Smrg      else
59709e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
59719e7bcd65Smrg      fi
59729e7bcd65Smrg      ;;
59739e7bcd65Smrg    esac
59749e7bcd65Smrg
59759e7bcd65Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
59769e7bcd65Smrg      runpath_var=
59779e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
59789e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
59799e7bcd65Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
59809e7bcd65Smrg    fi
59819e7bcd65Smrg  else
59829e7bcd65Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
59839e7bcd65Smrg    case $host_os in
59849e7bcd65Smrg    aix3*)
59859e7bcd65Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
59869e7bcd65Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
59879e7bcd65Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
59889e7bcd65Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
59899e7bcd65Smrg      # are no directories specified by -L.
59909e7bcd65Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
59919e7bcd65Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
59929e7bcd65Smrg	# Neither direct hardcoding nor static linking is supported with a
59939e7bcd65Smrg	# broken collect2.
59949e7bcd65Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
59959e7bcd65Smrg      fi
59969e7bcd65Smrg      ;;
59979e7bcd65Smrg
59989e7bcd65Smrg    aix[[4-9]]*)
59999e7bcd65Smrg      if test "$host_cpu" = ia64; then
60009e7bcd65Smrg	# On IA64, the linker does run time linking by default, so we don't
60019e7bcd65Smrg	# have to do anything special.
60029e7bcd65Smrg	aix_use_runtimelinking=no
60039e7bcd65Smrg	exp_sym_flag='-Bexport'
60049e7bcd65Smrg	no_entry_flag=""
60059e7bcd65Smrg      else
60069e7bcd65Smrg	# If we're using GNU nm, then we don't want the "-C" option.
60079e7bcd65Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
60089e7bcd65Smrg	# Also, AIX nm treats weak defined symbols like other global
60099e7bcd65Smrg	# defined symbols, whereas GNU nm marks them as "W".
60109e7bcd65Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
60119e7bcd65Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
60129e7bcd65Smrg	else
60139e7bcd65Smrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
60149e7bcd65Smrg	fi
60159e7bcd65Smrg	aix_use_runtimelinking=no
60169e7bcd65Smrg
60179e7bcd65Smrg	# Test if we are trying to use run time linking or normal
60189e7bcd65Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
60199e7bcd65Smrg	# need to do runtime linking.
60209e7bcd65Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
60219e7bcd65Smrg	  for ld_flag in $LDFLAGS; do
60229e7bcd65Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
60239e7bcd65Smrg	    aix_use_runtimelinking=yes
60249e7bcd65Smrg	    break
60259e7bcd65Smrg	  fi
60269e7bcd65Smrg	  done
60279e7bcd65Smrg	  ;;
60289e7bcd65Smrg	esac
60299e7bcd65Smrg
60309e7bcd65Smrg	exp_sym_flag='-bexport'
60319e7bcd65Smrg	no_entry_flag='-bnoentry'
60329e7bcd65Smrg      fi
60339e7bcd65Smrg
60349e7bcd65Smrg      # When large executables or shared objects are built, AIX ld can
60359e7bcd65Smrg      # have problems creating the table of contents.  If linking a library
60369e7bcd65Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
60379e7bcd65Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
60389e7bcd65Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
60399e7bcd65Smrg
60409e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)=''
60419e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
60429e7bcd65Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
60439e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
60449e7bcd65Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60459e7bcd65Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
60469e7bcd65Smrg
60479e7bcd65Smrg      if test "$GCC" = yes; then
60489e7bcd65Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
60499e7bcd65Smrg	# We only want to do this on AIX 4.2 and lower, the check
60509e7bcd65Smrg	# below for broken collect2 doesn't work under 4.3+
60519e7bcd65Smrg	  collect2name=`${CC} -print-prog-name=collect2`
60529e7bcd65Smrg	  if test -f "$collect2name" &&
60539e7bcd65Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
60549e7bcd65Smrg	  then
60559e7bcd65Smrg	  # We have reworked collect2
60569e7bcd65Smrg	  :
60579e7bcd65Smrg	  else
60589e7bcd65Smrg	  # We have old collect2
60599e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
60609e7bcd65Smrg	  # It fails to find uninstalled libraries when the uninstalled
60619e7bcd65Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
60629e7bcd65Smrg	  # to unsupported forces relinking
60639e7bcd65Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
60649e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60659e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
60669e7bcd65Smrg	  fi
60679e7bcd65Smrg	  ;;
60689e7bcd65Smrg	esac
60699e7bcd65Smrg	shared_flag='-shared'
60709e7bcd65Smrg	if test "$aix_use_runtimelinking" = yes; then
60719e7bcd65Smrg	  shared_flag="$shared_flag "'${wl}-G'
60729e7bcd65Smrg	fi
60739e7bcd65Smrg      else
60749e7bcd65Smrg	# not using gcc
60759e7bcd65Smrg	if test "$host_cpu" = ia64; then
60769e7bcd65Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
60779e7bcd65Smrg	# chokes on -Wl,-G. The following line is correct:
60789e7bcd65Smrg	  shared_flag='-G'
60799e7bcd65Smrg	else
60809e7bcd65Smrg	  if test "$aix_use_runtimelinking" = yes; then
60819e7bcd65Smrg	    shared_flag='${wl}-G'
60829e7bcd65Smrg	  else
60839e7bcd65Smrg	    shared_flag='${wl}-bM:SRE'
60849e7bcd65Smrg	  fi
60859e7bcd65Smrg	fi
60869e7bcd65Smrg      fi
60879e7bcd65Smrg
60889e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
60899e7bcd65Smrg      # It seems that -bexpall does not export symbols beginning with
60909e7bcd65Smrg      # underscore (_), so it is better to generate a list of symbols to export.
60919e7bcd65Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
60929e7bcd65Smrg      if test "$aix_use_runtimelinking" = yes; then
60939e7bcd65Smrg	# Warning - without using the other runtime loading flags (-brtl),
60949e7bcd65Smrg	# -berok will link without error, but may produce a broken library.
60959e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
60969e7bcd65Smrg        # Determine the default libpath from the value encoded in an
60979e7bcd65Smrg        # empty executable.
60989e7bcd65Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
60999e7bcd65Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
61009e7bcd65Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
61019e7bcd65Smrg      else
61029e7bcd65Smrg	if test "$host_cpu" = ia64; then
61039e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
61049e7bcd65Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
61059e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
61069e7bcd65Smrg	else
61079e7bcd65Smrg	 # Determine the default libpath from the value encoded in an
61089e7bcd65Smrg	 # empty executable.
61099e7bcd65Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
61109e7bcd65Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
61119e7bcd65Smrg	  # Warning - without using the other run time loading flags,
61129e7bcd65Smrg	  # -berok will link without error, but may produce a broken library.
61139e7bcd65Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
61149e7bcd65Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
61159e7bcd65Smrg	  if test "$with_gnu_ld" = yes; then
61169e7bcd65Smrg	    # We only use this code for GNU lds that support --whole-archive.
61179e7bcd65Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
61189e7bcd65Smrg	  else
61199e7bcd65Smrg	    # Exported symbols can be pulled into shared objects from archives
61209e7bcd65Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
61219e7bcd65Smrg	  fi
61229e7bcd65Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61239e7bcd65Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
61249e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
61259e7bcd65Smrg	fi
61269e7bcd65Smrg      fi
61279e7bcd65Smrg      ;;
61289e7bcd65Smrg
61299e7bcd65Smrg    amigaos*)
61309e7bcd65Smrg      case $host_cpu in
61319e7bcd65Smrg      powerpc)
61329e7bcd65Smrg            # see comment about AmigaOS4 .so support
61339e7bcd65Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
61349e7bcd65Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
61359e7bcd65Smrg        ;;
61369e7bcd65Smrg      m68k)
61379e7bcd65Smrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
61389e7bcd65Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61399e7bcd65Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
61409e7bcd65Smrg        ;;
61419e7bcd65Smrg      esac
61429e7bcd65Smrg      ;;
61439e7bcd65Smrg
61449e7bcd65Smrg    bsdi[[45]]*)
61459e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
61469e7bcd65Smrg      ;;
61479e7bcd65Smrg
61489e7bcd65Smrg    cygwin* | mingw* | pw32* | cegcc*)
61499e7bcd65Smrg      # When not using gcc, we currently assume that we are using
61509e7bcd65Smrg      # Microsoft Visual C++.
61519e7bcd65Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
61529e7bcd65Smrg      # no search path for DLLs.
61539e7bcd65Smrg      case $cc_basename in
61549e7bcd65Smrg      cl*)
61559e7bcd65Smrg	# Native MSVC
61569e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
61579e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61589e7bcd65Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
61599e7bcd65Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
61609e7bcd65Smrg	# Tell ltmain to make .lib files, not .a files.
61619e7bcd65Smrg	libext=lib
61629e7bcd65Smrg	# Tell ltmain to make .dll files, not .so files.
61639e7bcd65Smrg	shrext_cmds=".dll"
61649e7bcd65Smrg	# FIXME: Setting linknames here is a bad hack.
61659e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
61669e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
61679e7bcd65Smrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
61689e7bcd65Smrg	  else
61699e7bcd65Smrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
61709e7bcd65Smrg	  fi~
61719e7bcd65Smrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
61729e7bcd65Smrg	  linknames='
61739e7bcd65Smrg	# The linker will not automatically build a static lib if we build a DLL.
61749e7bcd65Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
61759e7bcd65Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
61769e7bcd65Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
61779e7bcd65Smrg	_LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
61789e7bcd65Smrg	# Don't use ranlib
61799e7bcd65Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
61809e7bcd65Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
61819e7bcd65Smrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
61829e7bcd65Smrg	  case $lt_outputfile in
61839e7bcd65Smrg	    *.exe|*.EXE) ;;
61849e7bcd65Smrg	    *)
61859e7bcd65Smrg	      lt_outputfile="$lt_outputfile.exe"
61869e7bcd65Smrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
61879e7bcd65Smrg	      ;;
61889e7bcd65Smrg	  esac~
61899e7bcd65Smrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
61909e7bcd65Smrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
61919e7bcd65Smrg	    $RM "$lt_outputfile.manifest";
61929e7bcd65Smrg	  fi'
61939e7bcd65Smrg	;;
61949e7bcd65Smrg      *)
61959e7bcd65Smrg	# Assume MSVC wrapper
61969e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
61979e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
61989e7bcd65Smrg	# Tell ltmain to make .lib files, not .a files.
61999e7bcd65Smrg	libext=lib
62009e7bcd65Smrg	# Tell ltmain to make .dll files, not .so files.
62019e7bcd65Smrg	shrext_cmds=".dll"
62029e7bcd65Smrg	# FIXME: Setting linknames here is a bad hack.
62039e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
62049e7bcd65Smrg	# The linker will automatically build a .lib file if we build a DLL.
62059e7bcd65Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
62069e7bcd65Smrg	# FIXME: Should let the user specify the lib program.
62079e7bcd65Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
62089e7bcd65Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
62099e7bcd65Smrg	;;
62109e7bcd65Smrg      esac
62119e7bcd65Smrg      ;;
62129e7bcd65Smrg
62139e7bcd65Smrg    darwin* | rhapsody*)
62149e7bcd65Smrg      _LT_DARWIN_LINKER_FEATURES($1)
62159e7bcd65Smrg      ;;
62169e7bcd65Smrg
62179e7bcd65Smrg    dgux*)
62189e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
62199e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
62209e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62219e7bcd65Smrg      ;;
62229e7bcd65Smrg
62239e7bcd65Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
62249e7bcd65Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
62259e7bcd65Smrg    # does not break anything, and helps significantly (at the cost of a little
62269e7bcd65Smrg    # extra space).
62279e7bcd65Smrg    freebsd2.2*)
62289e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
62299e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
62309e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
62319e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62329e7bcd65Smrg      ;;
62339e7bcd65Smrg
62349e7bcd65Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
62359e7bcd65Smrg    freebsd2.*)
62369e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
62379e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
62389e7bcd65Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
62399e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62409e7bcd65Smrg      ;;
62419e7bcd65Smrg
62429e7bcd65Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
62439e7bcd65Smrg    freebsd* | dragonfly*)
62449e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
62459e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
62469e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
62479e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62489e7bcd65Smrg      ;;
62499e7bcd65Smrg
62509e7bcd65Smrg    hpux9*)
62519e7bcd65Smrg      if test "$GCC" = yes; then
62529e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
62539e7bcd65Smrg      else
62549e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
62559e7bcd65Smrg      fi
62569e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
62579e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
62589e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
62599e7bcd65Smrg
62609e7bcd65Smrg      # hardcode_minus_L: Not really in the search PATH,
62619e7bcd65Smrg      # but as the default location of the library.
62629e7bcd65Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
62639e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
62649e7bcd65Smrg      ;;
62659e7bcd65Smrg
62669e7bcd65Smrg    hpux10*)
62679e7bcd65Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
62689e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
62699e7bcd65Smrg      else
62709e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
62719e7bcd65Smrg      fi
62729e7bcd65Smrg      if test "$with_gnu_ld" = no; then
62739e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
62749e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
62759e7bcd65Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
62769e7bcd65Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
62779e7bcd65Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
62789e7bcd65Smrg	# hardcode_minus_L: Not really in the search PATH,
62799e7bcd65Smrg	# but as the default location of the library.
62809e7bcd65Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
62819e7bcd65Smrg      fi
62829e7bcd65Smrg      ;;
62839e7bcd65Smrg
62849e7bcd65Smrg    hpux11*)
62859e7bcd65Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
62869e7bcd65Smrg	case $host_cpu in
62879e7bcd65Smrg	hppa*64*)
62889e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
62899e7bcd65Smrg	  ;;
62909e7bcd65Smrg	ia64*)
62919e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
62929e7bcd65Smrg	  ;;
62939e7bcd65Smrg	*)
62949e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
62959e7bcd65Smrg	  ;;
62969e7bcd65Smrg	esac
62979e7bcd65Smrg      else
62989e7bcd65Smrg	case $host_cpu in
62999e7bcd65Smrg	hppa*64*)
63009e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
63019e7bcd65Smrg	  ;;
63029e7bcd65Smrg	ia64*)
63039e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
63049e7bcd65Smrg	  ;;
63059e7bcd65Smrg	*)
63069e7bcd65Smrg	m4_if($1, [], [
63079e7bcd65Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
63089e7bcd65Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
63099e7bcd65Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
63109e7bcd65Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
63119e7bcd65Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
63129e7bcd65Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
63139e7bcd65Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
63149e7bcd65Smrg	  ;;
63159e7bcd65Smrg	esac
63169e7bcd65Smrg      fi
63179e7bcd65Smrg      if test "$with_gnu_ld" = no; then
63189e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63199e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
63209e7bcd65Smrg
63219e7bcd65Smrg	case $host_cpu in
63229e7bcd65Smrg	hppa*64*|ia64*)
63239e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
63249e7bcd65Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63259e7bcd65Smrg	  ;;
63269e7bcd65Smrg	*)
63279e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
63289e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63299e7bcd65Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63309e7bcd65Smrg
63319e7bcd65Smrg	  # hardcode_minus_L: Not really in the search PATH,
63329e7bcd65Smrg	  # but as the default location of the library.
63339e7bcd65Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
63349e7bcd65Smrg	  ;;
63359e7bcd65Smrg	esac
63369e7bcd65Smrg      fi
63379e7bcd65Smrg      ;;
63389e7bcd65Smrg
63399e7bcd65Smrg    irix5* | irix6* | nonstopux*)
63409e7bcd65Smrg      if test "$GCC" = yes; then
63419e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
63429e7bcd65Smrg	# Try to use the -exported_symbol ld option, if it does not
63439e7bcd65Smrg	# work, assume that -exports_file does not work either and
63449e7bcd65Smrg	# implicitly export all symbols.
63459e7bcd65Smrg	# This should be the same for all languages, so no per-tag cache variable.
63469e7bcd65Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
63479e7bcd65Smrg	  [lt_cv_irix_exported_symbol],
63489e7bcd65Smrg	  [save_LDFLAGS="$LDFLAGS"
63499e7bcd65Smrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
63509e7bcd65Smrg	   AC_LINK_IFELSE(
63519e7bcd65Smrg	     [AC_LANG_SOURCE(
63529e7bcd65Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
63539e7bcd65Smrg			      [C++], [[int foo (void) { return 0; }]],
63549e7bcd65Smrg			      [Fortran 77], [[
63559e7bcd65Smrg      subroutine foo
63569e7bcd65Smrg      end]],
63579e7bcd65Smrg			      [Fortran], [[
63589e7bcd65Smrg      subroutine foo
63599e7bcd65Smrg      end]])])],
63609e7bcd65Smrg	      [lt_cv_irix_exported_symbol=yes],
63619e7bcd65Smrg	      [lt_cv_irix_exported_symbol=no])
63629e7bcd65Smrg           LDFLAGS="$save_LDFLAGS"])
63639e7bcd65Smrg	if test "$lt_cv_irix_exported_symbol" = yes; then
63649e7bcd65Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
63659e7bcd65Smrg	fi
63669e7bcd65Smrg      else
63679e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
63689e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
63699e7bcd65Smrg      fi
63709e7bcd65Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
63719e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
63729e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
63739e7bcd65Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
63749e7bcd65Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
63759e7bcd65Smrg      ;;
63769e7bcd65Smrg
63779e7bcd65Smrg    netbsd*)
63789e7bcd65Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
63799e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
63809e7bcd65Smrg      else
63819e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
63829e7bcd65Smrg      fi
63839e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
63849e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63859e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63869e7bcd65Smrg      ;;
63879e7bcd65Smrg
63889e7bcd65Smrg    newsos6)
63899e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
63909e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63919e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
63929e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
63939e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63949e7bcd65Smrg      ;;
63959e7bcd65Smrg
63969e7bcd65Smrg    *nto* | *qnx*)
63979e7bcd65Smrg      ;;
63989e7bcd65Smrg
63999e7bcd65Smrg    openbsd*)
64009e7bcd65Smrg      if test -f /usr/libexec/ld.so; then
64019e7bcd65Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
64029e7bcd65Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64039e7bcd65Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
64049e7bcd65Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
64059e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
64069e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
64079e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64089e7bcd65Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
64099e7bcd65Smrg	else
64109e7bcd65Smrg	  case $host_os in
64119e7bcd65Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
64129e7bcd65Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
64139e7bcd65Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
64149e7bcd65Smrg	     ;;
64159e7bcd65Smrg	   *)
64169e7bcd65Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
64179e7bcd65Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64189e7bcd65Smrg	     ;;
64199e7bcd65Smrg	  esac
64209e7bcd65Smrg	fi
64219e7bcd65Smrg      else
64229e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
64239e7bcd65Smrg      fi
64249e7bcd65Smrg      ;;
64259e7bcd65Smrg
64269e7bcd65Smrg    os2*)
64279e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
64289e7bcd65Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
64299e7bcd65Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
64309e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
64319e7bcd65Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
64329e7bcd65Smrg      ;;
64339e7bcd65Smrg
64349e7bcd65Smrg    osf3*)
64359e7bcd65Smrg      if test "$GCC" = yes; then
64369e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
64379e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
64389e7bcd65Smrg      else
64399e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
64409e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
64419e7bcd65Smrg      fi
64429e7bcd65Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
64439e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
64449e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64459e7bcd65Smrg      ;;
64469e7bcd65Smrg
64479e7bcd65Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
64489e7bcd65Smrg      if test "$GCC" = yes; then
64499e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
64509e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
64519e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
64529e7bcd65Smrg      else
64539e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
64549e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
64559e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
64569e7bcd65Smrg	$CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
64579e7bcd65Smrg
64589e7bcd65Smrg	# Both c and cxx compiler support -rpath directly
64599e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
64609e7bcd65Smrg      fi
64619e7bcd65Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
64629e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64639e7bcd65Smrg      ;;
64649e7bcd65Smrg
64659e7bcd65Smrg    solaris*)
64669e7bcd65Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
64679e7bcd65Smrg      if test "$GCC" = yes; then
64689e7bcd65Smrg	wlarc='${wl}'
64699e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
64709e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
64719e7bcd65Smrg	  $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
64729e7bcd65Smrg      else
64739e7bcd65Smrg	case `$CC -V 2>&1` in
64749e7bcd65Smrg	*"Compilers 5.0"*)
64759e7bcd65Smrg	  wlarc=''
64769e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
64779e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
64789e7bcd65Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
64799e7bcd65Smrg	  ;;
64809e7bcd65Smrg	*)
64819e7bcd65Smrg	  wlarc='${wl}'
64829e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
64839e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
64849e7bcd65Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
64859e7bcd65Smrg	  ;;
64869e7bcd65Smrg	esac
64879e7bcd65Smrg      fi
64889e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
64899e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64909e7bcd65Smrg      case $host_os in
64919e7bcd65Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
64929e7bcd65Smrg      *)
64939e7bcd65Smrg	# The compiler driver will combine and reorder linker options,
64949e7bcd65Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
64959e7bcd65Smrg	# but is careful enough not to reorder.
64969e7bcd65Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
64979e7bcd65Smrg	if test "$GCC" = yes; then
64989e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
64999e7bcd65Smrg	else
65009e7bcd65Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
65019e7bcd65Smrg	fi
65029e7bcd65Smrg	;;
65039e7bcd65Smrg      esac
65049e7bcd65Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
65059e7bcd65Smrg      ;;
65069e7bcd65Smrg
65079e7bcd65Smrg    sunos4*)
65089e7bcd65Smrg      if test "x$host_vendor" = xsequent; then
65099e7bcd65Smrg	# Use $CC to link under sequent, because it throws in some extra .o
65109e7bcd65Smrg	# files that make .init and .fini sections work.
65119e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
65129e7bcd65Smrg      else
65139e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
65149e7bcd65Smrg      fi
65159e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65169e7bcd65Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65179e7bcd65Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
65189e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65199e7bcd65Smrg      ;;
65209e7bcd65Smrg
65219e7bcd65Smrg    sysv4)
65229e7bcd65Smrg      case $host_vendor in
65239e7bcd65Smrg	sni)
65249e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65259e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
65269e7bcd65Smrg	;;
65279e7bcd65Smrg	siemens)
65289e7bcd65Smrg	  ## LD is ld it makes a PLAMLIB
65299e7bcd65Smrg	  ## CC just makes a GrossModule.
65309e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
65319e7bcd65Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
65329e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
65339e7bcd65Smrg        ;;
65349e7bcd65Smrg	motorola)
65359e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65369e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
65379e7bcd65Smrg	;;
65389e7bcd65Smrg      esac
65399e7bcd65Smrg      runpath_var='LD_RUN_PATH'
65409e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65419e7bcd65Smrg      ;;
65429e7bcd65Smrg
65439e7bcd65Smrg    sysv4.3*)
65449e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65459e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65469e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
65479e7bcd65Smrg      ;;
65489e7bcd65Smrg
65499e7bcd65Smrg    sysv4*MP*)
65509e7bcd65Smrg      if test -d /usr/nec; then
65519e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65529e7bcd65Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65539e7bcd65Smrg	runpath_var=LD_RUN_PATH
65549e7bcd65Smrg	hardcode_runpath_var=yes
65559e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
65569e7bcd65Smrg      fi
65579e7bcd65Smrg      ;;
65589e7bcd65Smrg
65599e7bcd65Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
65609e7bcd65Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
65619e7bcd65Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
65629e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65639e7bcd65Smrg      runpath_var='LD_RUN_PATH'
65649e7bcd65Smrg
65659e7bcd65Smrg      if test "$GCC" = yes; then
65669e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65679e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65689e7bcd65Smrg      else
65699e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65709e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65719e7bcd65Smrg      fi
65729e7bcd65Smrg      ;;
65739e7bcd65Smrg
65749e7bcd65Smrg    sysv5* | sco3.2v5* | sco5v6*)
65759e7bcd65Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
65769e7bcd65Smrg      # link with -lc, and that would cause any symbols used from libc to
65779e7bcd65Smrg      # always be unresolved, which means just about no library would
65789e7bcd65Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
65799e7bcd65Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
65809e7bcd65Smrg      # as -z defs.
65819e7bcd65Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
65829e7bcd65Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
65839e7bcd65Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
65849e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65859e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
65869e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
65879e7bcd65Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
65889e7bcd65Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
65899e7bcd65Smrg      runpath_var='LD_RUN_PATH'
65909e7bcd65Smrg
65919e7bcd65Smrg      if test "$GCC" = yes; then
65929e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65939e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65949e7bcd65Smrg      else
65959e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65969e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
65979e7bcd65Smrg      fi
65989e7bcd65Smrg      ;;
65999e7bcd65Smrg
66009e7bcd65Smrg    uts4*)
66019e7bcd65Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66029e7bcd65Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66039e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66049e7bcd65Smrg      ;;
66059e7bcd65Smrg
66069e7bcd65Smrg    *)
66079e7bcd65Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
66089e7bcd65Smrg      ;;
66099e7bcd65Smrg    esac
66109e7bcd65Smrg
66119e7bcd65Smrg    if test x$host_vendor = xsni; then
66129e7bcd65Smrg      case $host in
66139e7bcd65Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
66149e7bcd65Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
66159e7bcd65Smrg	;;
66169e7bcd65Smrg      esac
66179e7bcd65Smrg    fi
66189e7bcd65Smrg  fi
66199e7bcd65Smrg])
66209e7bcd65SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
66219e7bcd65Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
66229e7bcd65Smrg
66239e7bcd65Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
66249e7bcd65Smrg
66259e7bcd65Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
66269e7bcd65Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
66279e7bcd65Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
66289e7bcd65Smrg    [The commands to extract the exported symbol list from a shared archive])
66299e7bcd65Smrg
66309e7bcd65Smrg#
66319e7bcd65Smrg# Do we need to explicitly link libc?
66329e7bcd65Smrg#
66339e7bcd65Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
66349e7bcd65Smrgx|xyes)
66359e7bcd65Smrg  # Assume -lc should be added
66369e7bcd65Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66379e7bcd65Smrg
66389e7bcd65Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
66399e7bcd65Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
66409e7bcd65Smrg    *'~'*)
66419e7bcd65Smrg      # FIXME: we may have to deal with multi-command sequences.
66429e7bcd65Smrg      ;;
66439e7bcd65Smrg    '$CC '*)
66449e7bcd65Smrg      # Test whether the compiler implicitly links with -lc since on some
66459e7bcd65Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
66469e7bcd65Smrg      # to ld, don't add -lc before -lgcc.
66479e7bcd65Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
66489e7bcd65Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
66499e7bcd65Smrg	[$RM conftest*
66509e7bcd65Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
66519e7bcd65Smrg
66529e7bcd65Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
66539e7bcd65Smrg	  soname=conftest
66549e7bcd65Smrg	  lib=conftest
66559e7bcd65Smrg	  libobjs=conftest.$ac_objext
66569e7bcd65Smrg	  deplibs=
66579e7bcd65Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
66589e7bcd65Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
66599e7bcd65Smrg	  compiler_flags=-v
66609e7bcd65Smrg	  linker_flags=-v
66619e7bcd65Smrg	  verstring=
66629e7bcd65Smrg	  output_objdir=.
66639e7bcd65Smrg	  libname=conftest
66649e7bcd65Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
66659e7bcd65Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
66669e7bcd65Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
66679e7bcd65Smrg	  then
66689e7bcd65Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
66699e7bcd65Smrg	  else
66709e7bcd65Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
66719e7bcd65Smrg	  fi
66729e7bcd65Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
66739e7bcd65Smrg	else
66749e7bcd65Smrg	  cat conftest.err 1>&5
66759e7bcd65Smrg	fi
66769e7bcd65Smrg	$RM conftest*
66779e7bcd65Smrg	])
66789e7bcd65Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
66799e7bcd65Smrg      ;;
66809e7bcd65Smrg    esac
66819e7bcd65Smrg  fi
66829e7bcd65Smrg  ;;
66839e7bcd65Smrgesac
66849e7bcd65Smrg
66859e7bcd65Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
66869e7bcd65Smrg    [Whether or not to add -lc for building shared libraries])
66879e7bcd65Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
66889e7bcd65Smrg    [enable_shared_with_static_runtimes], [0],
66899e7bcd65Smrg    [Whether or not to disallow shared libs when runtime libs are static])
66909e7bcd65Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
66919e7bcd65Smrg    [Compiler flag to allow reflexive dlopens])
66929e7bcd65Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
66939e7bcd65Smrg    [Compiler flag to generate shared objects directly from archives])
66949e7bcd65Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
66959e7bcd65Smrg    [Whether the compiler copes with passing no objects directly])
66969e7bcd65Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
66979e7bcd65Smrg    [Create an old-style archive from a shared archive])
66989e7bcd65Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
66999e7bcd65Smrg    [Create a temporary old-style archive to link instead of a shared archive])
67009e7bcd65Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
67019e7bcd65Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
67029e7bcd65Smrg_LT_TAGDECL([], [module_cmds], [2],
67039e7bcd65Smrg    [Commands used to build a loadable module if different from building
67049e7bcd65Smrg    a shared archive.])
67059e7bcd65Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
67069e7bcd65Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
67079e7bcd65Smrg    [Whether we are building with GNU ld or not])
67089e7bcd65Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
67099e7bcd65Smrg    [Flag that allows shared libraries with undefined symbols to be built])
67109e7bcd65Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
67119e7bcd65Smrg    [Flag that enforces no undefined symbols])
67129e7bcd65Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
67139e7bcd65Smrg    [Flag to hardcode $libdir into a binary during linking.
67149e7bcd65Smrg    This must work even if $libdir does not exist])
67159e7bcd65Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
67169e7bcd65Smrg    [Whether we need a single "-rpath" flag with a separated argument])
67179e7bcd65Smrg_LT_TAGDECL([], [hardcode_direct], [0],
67189e7bcd65Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
67199e7bcd65Smrg    DIR into the resulting binary])
67209e7bcd65Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
67219e7bcd65Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
67229e7bcd65Smrg    DIR into the resulting binary and the resulting library dependency is
67239e7bcd65Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
67249e7bcd65Smrg    library is relocated])
67259e7bcd65Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
67269e7bcd65Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
67279e7bcd65Smrg    into the resulting binary])
67289e7bcd65Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
67299e7bcd65Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
67309e7bcd65Smrg    into the resulting binary])
67319e7bcd65Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
67329e7bcd65Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
67339e7bcd65Smrg    into the library and all subsequent libraries and executables linked
67349e7bcd65Smrg    against it])
67359e7bcd65Smrg_LT_TAGDECL([], [inherit_rpath], [0],
67369e7bcd65Smrg    [Set to yes if linker adds runtime paths of dependent libraries
67379e7bcd65Smrg    to runtime path list])
67389e7bcd65Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
67399e7bcd65Smrg    [Whether libtool must link a program against all its dependency libraries])
67409e7bcd65Smrg_LT_TAGDECL([], [always_export_symbols], [0],
67419e7bcd65Smrg    [Set to "yes" if exported symbols are required])
67429e7bcd65Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
67439e7bcd65Smrg    [The commands to list exported symbols])
67449e7bcd65Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
67459e7bcd65Smrg    [Symbols that should not be listed in the preloaded symbols])
67469e7bcd65Smrg_LT_TAGDECL([], [include_expsyms], [1],
67479e7bcd65Smrg    [Symbols that must always be exported])
67489e7bcd65Smrg_LT_TAGDECL([], [prelink_cmds], [2],
67499e7bcd65Smrg    [Commands necessary for linking programs (against libraries) with templates])
67509e7bcd65Smrg_LT_TAGDECL([], [postlink_cmds], [2],
67519e7bcd65Smrg    [Commands necessary for finishing linking programs])
67529e7bcd65Smrg_LT_TAGDECL([], [file_list_spec], [1],
67539e7bcd65Smrg    [Specify filename containing input files])
67549e7bcd65Smrgdnl FIXME: Not yet implemented
67559e7bcd65Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
67569e7bcd65Smrgdnl    [Compiler flag to generate thread safe objects])
67579e7bcd65Smrg])# _LT_LINKER_SHLIBS
67589e7bcd65Smrg
67599e7bcd65Smrg
67609e7bcd65Smrg# _LT_LANG_C_CONFIG([TAG])
67619e7bcd65Smrg# ------------------------
67629e7bcd65Smrg# Ensure that the configuration variables for a C compiler are suitably
67639e7bcd65Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
67649e7bcd65Smrg# the compiler configuration to `libtool'.
67659e7bcd65Smrgm4_defun([_LT_LANG_C_CONFIG],
67669e7bcd65Smrg[m4_require([_LT_DECL_EGREP])dnl
67679e7bcd65Smrglt_save_CC="$CC"
67689e7bcd65SmrgAC_LANG_PUSH(C)
67699e7bcd65Smrg
67709e7bcd65Smrg# Source file extension for C test sources.
67719e7bcd65Smrgac_ext=c
67729e7bcd65Smrg
67739e7bcd65Smrg# Object file extension for compiled C test sources.
67749e7bcd65Smrgobjext=o
67759e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext
67769e7bcd65Smrg
67779e7bcd65Smrg# Code to be used in simple compile tests
67789e7bcd65Smrglt_simple_compile_test_code="int some_variable = 0;"
67799e7bcd65Smrg
67809e7bcd65Smrg# Code to be used in simple link tests
67819e7bcd65Smrglt_simple_link_test_code='int main(){return(0);}'
67829e7bcd65Smrg
67839e7bcd65Smrg_LT_TAG_COMPILER
67849e7bcd65Smrg# Save the default compiler, since it gets overwritten when the other
67859e7bcd65Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
67869e7bcd65Smrgcompiler_DEFAULT=$CC
67879e7bcd65Smrg
67889e7bcd65Smrg# save warnings/boilerplate of simple test code
67899e7bcd65Smrg_LT_COMPILER_BOILERPLATE
67909e7bcd65Smrg_LT_LINKER_BOILERPLATE
67919e7bcd65Smrg
67929e7bcd65Smrgif test -n "$compiler"; then
67939e7bcd65Smrg  _LT_COMPILER_NO_RTTI($1)
67949e7bcd65Smrg  _LT_COMPILER_PIC($1)
67959e7bcd65Smrg  _LT_COMPILER_C_O($1)
67969e7bcd65Smrg  _LT_COMPILER_FILE_LOCKS($1)
67979e7bcd65Smrg  _LT_LINKER_SHLIBS($1)
67989e7bcd65Smrg  _LT_SYS_DYNAMIC_LINKER($1)
67999e7bcd65Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
68009e7bcd65Smrg  LT_SYS_DLOPEN_SELF
68019e7bcd65Smrg  _LT_CMD_STRIPLIB
68029e7bcd65Smrg
68039e7bcd65Smrg  # Report which library types will actually be built
68049e7bcd65Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
68059e7bcd65Smrg  AC_MSG_RESULT([$can_build_shared])
68069e7bcd65Smrg
68079e7bcd65Smrg  AC_MSG_CHECKING([whether to build shared libraries])
68089e7bcd65Smrg  test "$can_build_shared" = "no" && enable_shared=no
68099e7bcd65Smrg
68109e7bcd65Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
68119e7bcd65Smrg  # are all built from PIC.
68129e7bcd65Smrg  case $host_os in
68139e7bcd65Smrg  aix3*)
68149e7bcd65Smrg    test "$enable_shared" = yes && enable_static=no
68159e7bcd65Smrg    if test -n "$RANLIB"; then
68169e7bcd65Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
68179e7bcd65Smrg      postinstall_cmds='$RANLIB $lib'
68189e7bcd65Smrg    fi
68199e7bcd65Smrg    ;;
68209e7bcd65Smrg
68219e7bcd65Smrg  aix[[4-9]]*)
68229e7bcd65Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
68239e7bcd65Smrg      test "$enable_shared" = yes && enable_static=no
68249e7bcd65Smrg    fi
68259e7bcd65Smrg    ;;
68269e7bcd65Smrg  esac
68279e7bcd65Smrg  AC_MSG_RESULT([$enable_shared])
68289e7bcd65Smrg
68299e7bcd65Smrg  AC_MSG_CHECKING([whether to build static libraries])
68309e7bcd65Smrg  # Make sure either enable_shared or enable_static is yes.
68319e7bcd65Smrg  test "$enable_shared" = yes || enable_static=yes
68329e7bcd65Smrg  AC_MSG_RESULT([$enable_static])
68339e7bcd65Smrg
68349e7bcd65Smrg  _LT_CONFIG($1)
68359e7bcd65Smrgfi
68369e7bcd65SmrgAC_LANG_POP
68379e7bcd65SmrgCC="$lt_save_CC"
68389e7bcd65Smrg])# _LT_LANG_C_CONFIG
68399e7bcd65Smrg
68409e7bcd65Smrg
68419e7bcd65Smrg# _LT_LANG_CXX_CONFIG([TAG])
68429e7bcd65Smrg# --------------------------
68439e7bcd65Smrg# Ensure that the configuration variables for a C++ compiler are suitably
68449e7bcd65Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
68459e7bcd65Smrg# the compiler configuration to `libtool'.
68469e7bcd65Smrgm4_defun([_LT_LANG_CXX_CONFIG],
68479e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
68489e7bcd65Smrgm4_require([_LT_DECL_EGREP])dnl
68499e7bcd65Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
68509e7bcd65Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
68519e7bcd65Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
68529e7bcd65Smrg    (test "X$CXX" != "Xg++"))) ; then
68539e7bcd65Smrg  AC_PROG_CXXCPP
68549e7bcd65Smrgelse
68559e7bcd65Smrg  _lt_caught_CXX_error=yes
68569e7bcd65Smrgfi
68579e7bcd65Smrg
68589e7bcd65SmrgAC_LANG_PUSH(C++)
68599e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
68609e7bcd65Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
68619e7bcd65Smrg_LT_TAGVAR(always_export_symbols, $1)=no
68629e7bcd65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
68639e7bcd65Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
68649e7bcd65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
68659e7bcd65Smrg_LT_TAGVAR(hardcode_direct, $1)=no
68669e7bcd65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
68679e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
68689e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
68699e7bcd65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
68709e7bcd65Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
68719e7bcd65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
68729e7bcd65Smrg_LT_TAGVAR(inherit_rpath, $1)=no
68739e7bcd65Smrg_LT_TAGVAR(module_cmds, $1)=
68749e7bcd65Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
68759e7bcd65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
68769e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
68779e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
68789e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
68799e7bcd65Smrg_LT_TAGVAR(no_undefined_flag, $1)=
68809e7bcd65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
68819e7bcd65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
68829e7bcd65Smrg
68839e7bcd65Smrg# Source file extension for C++ test sources.
68849e7bcd65Smrgac_ext=cpp
68859e7bcd65Smrg
68869e7bcd65Smrg# Object file extension for compiled C++ test sources.
68879e7bcd65Smrgobjext=o
68889e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext
68899e7bcd65Smrg
68909e7bcd65Smrg# No sense in running all these tests if we already determined that
68919e7bcd65Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
68929e7bcd65Smrg# are currently assumed to apply to all compilers on this platform,
68939e7bcd65Smrg# and will be corrupted by setting them based on a non-working compiler.
68949e7bcd65Smrgif test "$_lt_caught_CXX_error" != yes; then
68959e7bcd65Smrg  # Code to be used in simple compile tests
68969e7bcd65Smrg  lt_simple_compile_test_code="int some_variable = 0;"
68979e7bcd65Smrg
68989e7bcd65Smrg  # Code to be used in simple link tests
68999e7bcd65Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
69009e7bcd65Smrg
69019e7bcd65Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
69029e7bcd65Smrg  _LT_TAG_COMPILER
69039e7bcd65Smrg
69049e7bcd65Smrg  # save warnings/boilerplate of simple test code
69059e7bcd65Smrg  _LT_COMPILER_BOILERPLATE
69069e7bcd65Smrg  _LT_LINKER_BOILERPLATE
69079e7bcd65Smrg
69089e7bcd65Smrg  # Allow CC to be a program name with arguments.
69099e7bcd65Smrg  lt_save_CC=$CC
69109e7bcd65Smrg  lt_save_CFLAGS=$CFLAGS
69119e7bcd65Smrg  lt_save_LD=$LD
69129e7bcd65Smrg  lt_save_GCC=$GCC
69139e7bcd65Smrg  GCC=$GXX
69149e7bcd65Smrg  lt_save_with_gnu_ld=$with_gnu_ld
69159e7bcd65Smrg  lt_save_path_LD=$lt_cv_path_LD
69169e7bcd65Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
69179e7bcd65Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
69189e7bcd65Smrg  else
69199e7bcd65Smrg    $as_unset lt_cv_prog_gnu_ld
69209e7bcd65Smrg  fi
69219e7bcd65Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
69229e7bcd65Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
69239e7bcd65Smrg  else
69249e7bcd65Smrg    $as_unset lt_cv_path_LD
69259e7bcd65Smrg  fi
69269e7bcd65Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
69279e7bcd65Smrg  CC=${CXX-"c++"}
69289e7bcd65Smrg  CFLAGS=$CXXFLAGS
69299e7bcd65Smrg  compiler=$CC
69309e7bcd65Smrg  _LT_TAGVAR(compiler, $1)=$CC
69319e7bcd65Smrg  _LT_CC_BASENAME([$compiler])
69329e7bcd65Smrg
69339e7bcd65Smrg  if test -n "$compiler"; then
69349e7bcd65Smrg    # We don't want -fno-exception when compiling C++ code, so set the
69359e7bcd65Smrg    # no_builtin_flag separately
69369e7bcd65Smrg    if test "$GXX" = yes; then
69379e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
69389e7bcd65Smrg    else
69399e7bcd65Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
69409e7bcd65Smrg    fi
69419e7bcd65Smrg
69429e7bcd65Smrg    if test "$GXX" = yes; then
69439e7bcd65Smrg      # Set up default GNU C++ configuration
69449e7bcd65Smrg
69459e7bcd65Smrg      LT_PATH_LD
69469e7bcd65Smrg
69479e7bcd65Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
69489e7bcd65Smrg      # archiving commands below assume that GNU ld is being used.
69499e7bcd65Smrg      if test "$with_gnu_ld" = yes; then
69509e7bcd65Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
69519e7bcd65Smrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
69529e7bcd65Smrg
69539e7bcd65Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
69549e7bcd65Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
69559e7bcd65Smrg
69569e7bcd65Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
69579e7bcd65Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
69589e7bcd65Smrg        #     investigate it a little bit more. (MM)
69599e7bcd65Smrg        wlarc='${wl}'
69609e7bcd65Smrg
69619e7bcd65Smrg        # ancient GNU ld didn't support --whole-archive et. al.
69629e7bcd65Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
69639e7bcd65Smrg	  $GREP 'no-whole-archive' > /dev/null; then
69649e7bcd65Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
69659e7bcd65Smrg        else
69669e7bcd65Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
69679e7bcd65Smrg        fi
69689e7bcd65Smrg      else
69699e7bcd65Smrg        with_gnu_ld=no
69709e7bcd65Smrg        wlarc=
69719e7bcd65Smrg
69729e7bcd65Smrg        # A generic and very simple default shared library creation
69739e7bcd65Smrg        # command for GNU C++ for the case where it uses the native
69749e7bcd65Smrg        # linker, instead of GNU ld.  If possible, this setting should
69759e7bcd65Smrg        # overridden to take advantage of the native linker features on
69769e7bcd65Smrg        # the platform it is being used on.
69779e7bcd65Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
69789e7bcd65Smrg      fi
69799e7bcd65Smrg
69809e7bcd65Smrg      # Commands to make compiler produce verbose output that lists
69819e7bcd65Smrg      # what "hidden" libraries, object files and flags are used when
69829e7bcd65Smrg      # linking a shared library.
69839e7bcd65Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
69849e7bcd65Smrg
69859e7bcd65Smrg    else
69869e7bcd65Smrg      GXX=no
69879e7bcd65Smrg      with_gnu_ld=no
69889e7bcd65Smrg      wlarc=
69899e7bcd65Smrg    fi
69909e7bcd65Smrg
69919e7bcd65Smrg    # PORTME: fill in a description of your system's C++ link characteristics
69929e7bcd65Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
69939e7bcd65Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
69949e7bcd65Smrg    case $host_os in
69959e7bcd65Smrg      aix3*)
69969e7bcd65Smrg        # FIXME: insert proper C++ library support
69979e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
69989e7bcd65Smrg        ;;
69999e7bcd65Smrg      aix[[4-9]]*)
70009e7bcd65Smrg        if test "$host_cpu" = ia64; then
70019e7bcd65Smrg          # On IA64, the linker does run time linking by default, so we don't
70029e7bcd65Smrg          # have to do anything special.
70039e7bcd65Smrg          aix_use_runtimelinking=no
70049e7bcd65Smrg          exp_sym_flag='-Bexport'
70059e7bcd65Smrg          no_entry_flag=""
70069e7bcd65Smrg        else
70079e7bcd65Smrg          aix_use_runtimelinking=no
70089e7bcd65Smrg
70099e7bcd65Smrg          # Test if we are trying to use run time linking or normal
70109e7bcd65Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
70119e7bcd65Smrg          # need to do runtime linking.
70129e7bcd65Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
70139e7bcd65Smrg	    for ld_flag in $LDFLAGS; do
70149e7bcd65Smrg	      case $ld_flag in
70159e7bcd65Smrg	      *-brtl*)
70169e7bcd65Smrg	        aix_use_runtimelinking=yes
70179e7bcd65Smrg	        break
70189e7bcd65Smrg	        ;;
70199e7bcd65Smrg	      esac
70209e7bcd65Smrg	    done
70219e7bcd65Smrg	    ;;
70229e7bcd65Smrg          esac
70239e7bcd65Smrg
70249e7bcd65Smrg          exp_sym_flag='-bexport'
70259e7bcd65Smrg          no_entry_flag='-bnoentry'
70269e7bcd65Smrg        fi
70279e7bcd65Smrg
70289e7bcd65Smrg        # When large executables or shared objects are built, AIX ld can
70299e7bcd65Smrg        # have problems creating the table of contents.  If linking a library
70309e7bcd65Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
70319e7bcd65Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
70329e7bcd65Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
70339e7bcd65Smrg
70349e7bcd65Smrg        _LT_TAGVAR(archive_cmds, $1)=''
70359e7bcd65Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
70369e7bcd65Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
70379e7bcd65Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
70389e7bcd65Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
70399e7bcd65Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
70409e7bcd65Smrg
70419e7bcd65Smrg        if test "$GXX" = yes; then
70429e7bcd65Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
70439e7bcd65Smrg          # We only want to do this on AIX 4.2 and lower, the check
70449e7bcd65Smrg          # below for broken collect2 doesn't work under 4.3+
70459e7bcd65Smrg	  collect2name=`${CC} -print-prog-name=collect2`
70469e7bcd65Smrg	  if test -f "$collect2name" &&
70479e7bcd65Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
70489e7bcd65Smrg	  then
70499e7bcd65Smrg	    # We have reworked collect2
70509e7bcd65Smrg	    :
70519e7bcd65Smrg	  else
70529e7bcd65Smrg	    # We have old collect2
70539e7bcd65Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
70549e7bcd65Smrg	    # It fails to find uninstalled libraries when the uninstalled
70559e7bcd65Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
70569e7bcd65Smrg	    # to unsupported forces relinking
70579e7bcd65Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
70589e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
70599e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
70609e7bcd65Smrg	  fi
70619e7bcd65Smrg          esac
70629e7bcd65Smrg          shared_flag='-shared'
70639e7bcd65Smrg	  if test "$aix_use_runtimelinking" = yes; then
70649e7bcd65Smrg	    shared_flag="$shared_flag "'${wl}-G'
70659e7bcd65Smrg	  fi
70669e7bcd65Smrg        else
70679e7bcd65Smrg          # not using gcc
70689e7bcd65Smrg          if test "$host_cpu" = ia64; then
70699e7bcd65Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
70709e7bcd65Smrg	  # chokes on -Wl,-G. The following line is correct:
70719e7bcd65Smrg	  shared_flag='-G'
70729e7bcd65Smrg          else
70739e7bcd65Smrg	    if test "$aix_use_runtimelinking" = yes; then
70749e7bcd65Smrg	      shared_flag='${wl}-G'
70759e7bcd65Smrg	    else
70769e7bcd65Smrg	      shared_flag='${wl}-bM:SRE'
70779e7bcd65Smrg	    fi
70789e7bcd65Smrg          fi
70799e7bcd65Smrg        fi
70809e7bcd65Smrg
70819e7bcd65Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
70829e7bcd65Smrg        # It seems that -bexpall does not export symbols beginning with
70839e7bcd65Smrg        # underscore (_), so it is better to generate a list of symbols to
70849e7bcd65Smrg	# export.
70859e7bcd65Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
70869e7bcd65Smrg        if test "$aix_use_runtimelinking" = yes; then
70879e7bcd65Smrg          # Warning - without using the other runtime loading flags (-brtl),
70889e7bcd65Smrg          # -berok will link without error, but may produce a broken library.
70899e7bcd65Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
70909e7bcd65Smrg          # Determine the default libpath from the value encoded in an empty
70919e7bcd65Smrg          # executable.
70929e7bcd65Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
70939e7bcd65Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
70949e7bcd65Smrg
70959e7bcd65Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
70969e7bcd65Smrg        else
70979e7bcd65Smrg          if test "$host_cpu" = ia64; then
70989e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
70999e7bcd65Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
71009e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
71019e7bcd65Smrg          else
71029e7bcd65Smrg	    # Determine the default libpath from the value encoded in an
71039e7bcd65Smrg	    # empty executable.
71049e7bcd65Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
71059e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
71069e7bcd65Smrg	    # Warning - without using the other run time loading flags,
71079e7bcd65Smrg	    # -berok will link without error, but may produce a broken library.
71089e7bcd65Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
71099e7bcd65Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
71109e7bcd65Smrg	    if test "$with_gnu_ld" = yes; then
71119e7bcd65Smrg	      # We only use this code for GNU lds that support --whole-archive.
71129e7bcd65Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
71139e7bcd65Smrg	    else
71149e7bcd65Smrg	      # Exported symbols can be pulled into shared objects from archives
71159e7bcd65Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
71169e7bcd65Smrg	    fi
71179e7bcd65Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
71189e7bcd65Smrg	    # This is similar to how AIX traditionally builds its shared
71199e7bcd65Smrg	    # libraries.
71209e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
71219e7bcd65Smrg          fi
71229e7bcd65Smrg        fi
71239e7bcd65Smrg        ;;
71249e7bcd65Smrg
71259e7bcd65Smrg      beos*)
71269e7bcd65Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
71279e7bcd65Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
71289e7bcd65Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
71299e7bcd65Smrg	  # support --undefined.  This deserves some investigation.  FIXME
71309e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
71319e7bcd65Smrg	else
71329e7bcd65Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71339e7bcd65Smrg	fi
71349e7bcd65Smrg	;;
71359e7bcd65Smrg
71369e7bcd65Smrg      chorus*)
71379e7bcd65Smrg        case $cc_basename in
71389e7bcd65Smrg          *)
71399e7bcd65Smrg	  # FIXME: insert proper C++ library support
71409e7bcd65Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
71419e7bcd65Smrg	  ;;
71429e7bcd65Smrg        esac
71439e7bcd65Smrg        ;;
71449e7bcd65Smrg
71459e7bcd65Smrg      cygwin* | mingw* | pw32* | cegcc*)
71469e7bcd65Smrg	case $GXX,$cc_basename in
71479e7bcd65Smrg	,cl* | no,cl*)
71489e7bcd65Smrg	  # Native MSVC
71499e7bcd65Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
71509e7bcd65Smrg	  # no search path for DLLs.
71519e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
71529e7bcd65Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
71539e7bcd65Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
71549e7bcd65Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
71559e7bcd65Smrg	  # Tell ltmain to make .lib files, not .a files.
71569e7bcd65Smrg	  libext=lib
71579e7bcd65Smrg	  # Tell ltmain to make .dll files, not .so files.
71589e7bcd65Smrg	  shrext_cmds=".dll"
71599e7bcd65Smrg	  # FIXME: Setting linknames here is a bad hack.
71609e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
71619e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
71629e7bcd65Smrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
71639e7bcd65Smrg	    else
71649e7bcd65Smrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
71659e7bcd65Smrg	    fi~
71669e7bcd65Smrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
71679e7bcd65Smrg	    linknames='
71689e7bcd65Smrg	  # The linker will not automatically build a static lib if we build a DLL.
71699e7bcd65Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
71709e7bcd65Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
71719e7bcd65Smrg	  # Don't use ranlib
71729e7bcd65Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
71739e7bcd65Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
71749e7bcd65Smrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
71759e7bcd65Smrg	    case $lt_outputfile in
71769e7bcd65Smrg	      *.exe|*.EXE) ;;
71779e7bcd65Smrg	      *)
71789e7bcd65Smrg		lt_outputfile="$lt_outputfile.exe"
71799e7bcd65Smrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
71809e7bcd65Smrg		;;
71819e7bcd65Smrg	    esac~
71829e7bcd65Smrg	    func_to_tool_file "$lt_outputfile"~
71839e7bcd65Smrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
71849e7bcd65Smrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
71859e7bcd65Smrg	      $RM "$lt_outputfile.manifest";
71869e7bcd65Smrg	    fi'
71879e7bcd65Smrg	  ;;
71889e7bcd65Smrg	*)
71899e7bcd65Smrg	  # g++
71909e7bcd65Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
71919e7bcd65Smrg	  # as there is no search path for DLLs.
71929e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
71939e7bcd65Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
71949e7bcd65Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
71959e7bcd65Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
71969e7bcd65Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
71979e7bcd65Smrg
71989e7bcd65Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
71999e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
72009e7bcd65Smrg	    # If the export-symbols file already is a .def file (1st line
72019e7bcd65Smrg	    # is EXPORTS), use it as is; otherwise, prepend...
72029e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
72039e7bcd65Smrg	      cp $export_symbols $output_objdir/$soname.def;
72049e7bcd65Smrg	    else
72059e7bcd65Smrg	      echo EXPORTS > $output_objdir/$soname.def;
72069e7bcd65Smrg	      cat $export_symbols >> $output_objdir/$soname.def;
72079e7bcd65Smrg	    fi~
72089e7bcd65Smrg	    $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'
72099e7bcd65Smrg	  else
72109e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72119e7bcd65Smrg	  fi
72129e7bcd65Smrg	  ;;
72139e7bcd65Smrg	esac
72149e7bcd65Smrg	;;
72159e7bcd65Smrg      darwin* | rhapsody*)
72169e7bcd65Smrg        _LT_DARWIN_LINKER_FEATURES($1)
72179e7bcd65Smrg	;;
72189e7bcd65Smrg
72199e7bcd65Smrg      dgux*)
72209e7bcd65Smrg        case $cc_basename in
72219e7bcd65Smrg          ec++*)
72229e7bcd65Smrg	    # FIXME: insert proper C++ library support
72239e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72249e7bcd65Smrg	    ;;
72259e7bcd65Smrg          ghcx*)
72269e7bcd65Smrg	    # Green Hills C++ Compiler
72279e7bcd65Smrg	    # FIXME: insert proper C++ library support
72289e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72299e7bcd65Smrg	    ;;
72309e7bcd65Smrg          *)
72319e7bcd65Smrg	    # FIXME: insert proper C++ library support
72329e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72339e7bcd65Smrg	    ;;
72349e7bcd65Smrg        esac
72359e7bcd65Smrg        ;;
72369e7bcd65Smrg
72379e7bcd65Smrg      freebsd2.*)
72389e7bcd65Smrg        # C++ shared libraries reported to be fairly broken before
72399e7bcd65Smrg	# switch to ELF
72409e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
72419e7bcd65Smrg        ;;
72429e7bcd65Smrg
72439e7bcd65Smrg      freebsd-elf*)
72449e7bcd65Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
72459e7bcd65Smrg        ;;
72469e7bcd65Smrg
72479e7bcd65Smrg      freebsd* | dragonfly*)
72489e7bcd65Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
72499e7bcd65Smrg        # conventions
72509e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
72519e7bcd65Smrg        ;;
72529e7bcd65Smrg
72539e7bcd65Smrg      gnu*)
72549e7bcd65Smrg        ;;
72559e7bcd65Smrg
72569e7bcd65Smrg      haiku*)
72579e7bcd65Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
72589e7bcd65Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
72599e7bcd65Smrg        ;;
72609e7bcd65Smrg
72619e7bcd65Smrg      hpux9*)
72629e7bcd65Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
72639e7bcd65Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
72649e7bcd65Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
72659e7bcd65Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
72669e7bcd65Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
72679e7bcd65Smrg				             # but as the default
72689e7bcd65Smrg				             # location of the library.
72699e7bcd65Smrg
72709e7bcd65Smrg        case $cc_basename in
72719e7bcd65Smrg          CC*)
72729e7bcd65Smrg            # FIXME: insert proper C++ library support
72739e7bcd65Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
72749e7bcd65Smrg            ;;
72759e7bcd65Smrg          aCC*)
72769e7bcd65Smrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
72779e7bcd65Smrg            # Commands to make compiler produce verbose output that lists
72789e7bcd65Smrg            # what "hidden" libraries, object files and flags are used when
72799e7bcd65Smrg            # linking a shared library.
72809e7bcd65Smrg            #
72819e7bcd65Smrg            # There doesn't appear to be a way to prevent this compiler from
72829e7bcd65Smrg            # explicitly linking system object files so we need to strip them
72839e7bcd65Smrg            # from the output so that they don't get included in the library
72849e7bcd65Smrg            # dependencies.
72859e7bcd65Smrg            output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
72869e7bcd65Smrg            ;;
72879e7bcd65Smrg          *)
72889e7bcd65Smrg            if test "$GXX" = yes; then
72899e7bcd65Smrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
72909e7bcd65Smrg            else
72919e7bcd65Smrg              # FIXME: insert proper C++ library support
72929e7bcd65Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
72939e7bcd65Smrg            fi
72949e7bcd65Smrg            ;;
72959e7bcd65Smrg        esac
72969e7bcd65Smrg        ;;
72979e7bcd65Smrg
72989e7bcd65Smrg      hpux10*|hpux11*)
72999e7bcd65Smrg        if test $with_gnu_ld = no; then
73009e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
73019e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
73029e7bcd65Smrg
73039e7bcd65Smrg          case $host_cpu in
73049e7bcd65Smrg            hppa*64*|ia64*)
73059e7bcd65Smrg              ;;
73069e7bcd65Smrg            *)
73079e7bcd65Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73089e7bcd65Smrg              ;;
73099e7bcd65Smrg          esac
73109e7bcd65Smrg        fi
73119e7bcd65Smrg        case $host_cpu in
73129e7bcd65Smrg          hppa*64*|ia64*)
73139e7bcd65Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
73149e7bcd65Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73159e7bcd65Smrg            ;;
73169e7bcd65Smrg          *)
73179e7bcd65Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
73189e7bcd65Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
73199e7bcd65Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
73209e7bcd65Smrg					         # but as the default
73219e7bcd65Smrg					         # location of the library.
73229e7bcd65Smrg            ;;
73239e7bcd65Smrg        esac
73249e7bcd65Smrg
73259e7bcd65Smrg        case $cc_basename in
73269e7bcd65Smrg          CC*)
73279e7bcd65Smrg	    # FIXME: insert proper C++ library support
73289e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73299e7bcd65Smrg	    ;;
73309e7bcd65Smrg          aCC*)
73319e7bcd65Smrg	    case $host_cpu in
73329e7bcd65Smrg	      hppa*64*)
73339e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
73349e7bcd65Smrg	        ;;
73359e7bcd65Smrg	      ia64*)
73369e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
73379e7bcd65Smrg	        ;;
73389e7bcd65Smrg	      *)
73399e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
73409e7bcd65Smrg	        ;;
73419e7bcd65Smrg	    esac
73429e7bcd65Smrg	    # Commands to make compiler produce verbose output that lists
73439e7bcd65Smrg	    # what "hidden" libraries, object files and flags are used when
73449e7bcd65Smrg	    # linking a shared library.
73459e7bcd65Smrg	    #
73469e7bcd65Smrg	    # There doesn't appear to be a way to prevent this compiler from
73479e7bcd65Smrg	    # explicitly linking system object files so we need to strip them
73489e7bcd65Smrg	    # from the output so that they don't get included in the library
73499e7bcd65Smrg	    # dependencies.
73509e7bcd65Smrg	    output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
73519e7bcd65Smrg	    ;;
73529e7bcd65Smrg          *)
73539e7bcd65Smrg	    if test "$GXX" = yes; then
73549e7bcd65Smrg	      if test $with_gnu_ld = no; then
73559e7bcd65Smrg	        case $host_cpu in
73569e7bcd65Smrg	          hppa*64*)
73579e7bcd65Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
73589e7bcd65Smrg	            ;;
73599e7bcd65Smrg	          ia64*)
73609e7bcd65Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
73619e7bcd65Smrg	            ;;
73629e7bcd65Smrg	          *)
73639e7bcd65Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
73649e7bcd65Smrg	            ;;
73659e7bcd65Smrg	        esac
73669e7bcd65Smrg	      fi
73679e7bcd65Smrg	    else
73689e7bcd65Smrg	      # FIXME: insert proper C++ library support
73699e7bcd65Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
73709e7bcd65Smrg	    fi
73719e7bcd65Smrg	    ;;
73729e7bcd65Smrg        esac
73739e7bcd65Smrg        ;;
73749e7bcd65Smrg
73759e7bcd65Smrg      interix[[3-9]]*)
73769e7bcd65Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
73779e7bcd65Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73789e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
73799e7bcd65Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73809e7bcd65Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
73819e7bcd65Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
73829e7bcd65Smrg	# default) and relocated if they conflict, which is a slow very memory
73839e7bcd65Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
73849e7bcd65Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
73859e7bcd65Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
73869e7bcd65Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
73879e7bcd65Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
73889e7bcd65Smrg	;;
73899e7bcd65Smrg      irix5* | irix6*)
73909e7bcd65Smrg        case $cc_basename in
73919e7bcd65Smrg          CC*)
73929e7bcd65Smrg	    # SGI C++
73939e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
73949e7bcd65Smrg
73959e7bcd65Smrg	    # Archives containing C++ object files must be created using
73969e7bcd65Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
73979e7bcd65Smrg	    # necessary to make sure instantiated templates are included
73989e7bcd65Smrg	    # in the archive.
73999e7bcd65Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
74009e7bcd65Smrg	    ;;
74019e7bcd65Smrg          *)
74029e7bcd65Smrg	    if test "$GXX" = yes; then
74039e7bcd65Smrg	      if test "$with_gnu_ld" = no; then
74049e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
74059e7bcd65Smrg	      else
74069e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib'
74079e7bcd65Smrg	      fi
74089e7bcd65Smrg	    fi
74099e7bcd65Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
74109e7bcd65Smrg	    ;;
74119e7bcd65Smrg        esac
74129e7bcd65Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
74139e7bcd65Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
74149e7bcd65Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
74159e7bcd65Smrg        ;;
74169e7bcd65Smrg
74179e7bcd65Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
74189e7bcd65Smrg        case $cc_basename in
74199e7bcd65Smrg          KCC*)
74209e7bcd65Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
74219e7bcd65Smrg
74229e7bcd65Smrg	    # KCC will only create a shared library if the output file
74239e7bcd65Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
74249e7bcd65Smrg	    # to its proper name (with version) after linking.
74259e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
74269e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
74279e7bcd65Smrg	    # Commands to make compiler produce verbose output that lists
74289e7bcd65Smrg	    # what "hidden" libraries, object files and flags are used when
74299e7bcd65Smrg	    # linking a shared library.
74309e7bcd65Smrg	    #
74319e7bcd65Smrg	    # There doesn't appear to be a way to prevent this compiler from
74329e7bcd65Smrg	    # explicitly linking system object files so we need to strip them
74339e7bcd65Smrg	    # from the output so that they don't get included in the library
74349e7bcd65Smrg	    # dependencies.
74359e7bcd65Smrg	    output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
74369e7bcd65Smrg
74379e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
74389e7bcd65Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
74399e7bcd65Smrg
74409e7bcd65Smrg	    # Archives containing C++ object files must be created using
74419e7bcd65Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
74429e7bcd65Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
74439e7bcd65Smrg	    ;;
74449e7bcd65Smrg	  icpc* | ecpc* )
74459e7bcd65Smrg	    # Intel C++
74469e7bcd65Smrg	    with_gnu_ld=yes
74479e7bcd65Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
74489e7bcd65Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
74499e7bcd65Smrg	    # earlier do not add the objects themselves.
74509e7bcd65Smrg	    case `$CC -V 2>&1` in
74519e7bcd65Smrg	      *"Version 7."*)
74529e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
74539e7bcd65Smrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
74549e7bcd65Smrg		;;
74559e7bcd65Smrg	      *)  # Version 8.0 or newer
74569e7bcd65Smrg	        tmp_idyn=
74579e7bcd65Smrg	        case $host_cpu in
74589e7bcd65Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
74599e7bcd65Smrg		esac
74609e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
74619e7bcd65Smrg		_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
74629e7bcd65Smrg		;;
74639e7bcd65Smrg	    esac
74649e7bcd65Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
74659e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
74669e7bcd65Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
74679e7bcd65Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
74689e7bcd65Smrg	    ;;
74699e7bcd65Smrg          pgCC* | pgcpp*)
74709e7bcd65Smrg            # Portland Group C++ compiler
74719e7bcd65Smrg	    case `$CC -V` in
74729e7bcd65Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
74739e7bcd65Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
74749e7bcd65Smrg		rm -rf $tpldir~
74759e7bcd65Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
74769e7bcd65Smrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
74779e7bcd65Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
74789e7bcd65Smrg		rm -rf $tpldir~
74799e7bcd65Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
74809e7bcd65Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
74819e7bcd65Smrg		$RANLIB $oldlib'
74829e7bcd65Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
74839e7bcd65Smrg		rm -rf $tpldir~
74849e7bcd65Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
74859e7bcd65Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
74869e7bcd65Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
74879e7bcd65Smrg		rm -rf $tpldir~
74889e7bcd65Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
74899e7bcd65Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
74909e7bcd65Smrg	      ;;
74919e7bcd65Smrg	    *) # Version 6 and above use weak symbols
74929e7bcd65Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
74939e7bcd65Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
74949e7bcd65Smrg	      ;;
74959e7bcd65Smrg	    esac
74969e7bcd65Smrg
74979e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
74989e7bcd65Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
74999e7bcd65Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
75009e7bcd65Smrg            ;;
75019e7bcd65Smrg	  cxx*)
75029e7bcd65Smrg	    # Compaq C++
75039e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
75049e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname  -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
75059e7bcd65Smrg
75069e7bcd65Smrg	    runpath_var=LD_RUN_PATH
75079e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
75089e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
75099e7bcd65Smrg
75109e7bcd65Smrg	    # Commands to make compiler produce verbose output that lists
75119e7bcd65Smrg	    # what "hidden" libraries, object files and flags are used when
75129e7bcd65Smrg	    # linking a shared library.
75139e7bcd65Smrg	    #
75149e7bcd65Smrg	    # There doesn't appear to be a way to prevent this compiler from
75159e7bcd65Smrg	    # explicitly linking system object files so we need to strip them
75169e7bcd65Smrg	    # from the output so that they don't get included in the library
75179e7bcd65Smrg	    # dependencies.
75189e7bcd65Smrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed'
75199e7bcd65Smrg	    ;;
75209e7bcd65Smrg	  xl* | mpixl* | bgxl*)
75219e7bcd65Smrg	    # IBM XL 8.0 on PPC, with GNU ld
75229e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
75239e7bcd65Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75249e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
75259e7bcd65Smrg	    if test "x$supports_anon_versioning" = xyes; then
75269e7bcd65Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
75279e7bcd65Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
75289e7bcd65Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
75299e7bcd65Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
75309e7bcd65Smrg	    fi
75319e7bcd65Smrg	    ;;
75329e7bcd65Smrg	  *)
75339e7bcd65Smrg	    case `$CC -V 2>&1 | sed 5q` in
75349e7bcd65Smrg	    *Sun\ C*)
75359e7bcd65Smrg	      # Sun C++ 5.9
75369e7bcd65Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
75379e7bcd65Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
75389e7bcd65Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
75399e7bcd65Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
75409e7bcd65Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive'
75419e7bcd65Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
75429e7bcd65Smrg
75439e7bcd65Smrg	      # Not sure whether something based on
75449e7bcd65Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
75459e7bcd65Smrg	      # would be better.
75469e7bcd65Smrg	      output_verbose_link_cmd='func_echo_all'
75479e7bcd65Smrg
75489e7bcd65Smrg	      # Archives containing C++ object files must be created using
75499e7bcd65Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
75509e7bcd65Smrg	      # necessary to make sure instantiated templates are included
75519e7bcd65Smrg	      # in the archive.
75529e7bcd65Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
75539e7bcd65Smrg	      ;;
75549e7bcd65Smrg	    esac
75559e7bcd65Smrg	    ;;
75569e7bcd65Smrg	esac
75579e7bcd65Smrg	;;
75589e7bcd65Smrg
75599e7bcd65Smrg      lynxos*)
75609e7bcd65Smrg        # FIXME: insert proper C++ library support
75619e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
75629e7bcd65Smrg	;;
75639e7bcd65Smrg
75649e7bcd65Smrg      m88k*)
75659e7bcd65Smrg        # FIXME: insert proper C++ library support
75669e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
75679e7bcd65Smrg	;;
75689e7bcd65Smrg
75699e7bcd65Smrg      mvs*)
75709e7bcd65Smrg        case $cc_basename in
75719e7bcd65Smrg          cxx*)
75729e7bcd65Smrg	    # FIXME: insert proper C++ library support
75739e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75749e7bcd65Smrg	    ;;
75759e7bcd65Smrg	  *)
75769e7bcd65Smrg	    # FIXME: insert proper C++ library support
75779e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75789e7bcd65Smrg	    ;;
75799e7bcd65Smrg	esac
75809e7bcd65Smrg	;;
75819e7bcd65Smrg
75829e7bcd65Smrg      netbsd*)
75839e7bcd65Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
75849e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
75859e7bcd65Smrg	  wlarc=
75869e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
75879e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
75889e7bcd65Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
75899e7bcd65Smrg	fi
75909e7bcd65Smrg	# Workaround some broken pre-1.5 toolchains
75919e7bcd65Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
75929e7bcd65Smrg	;;
75939e7bcd65Smrg
75949e7bcd65Smrg      *nto* | *qnx*)
75959e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
75969e7bcd65Smrg	;;
75979e7bcd65Smrg
75989e7bcd65Smrg      openbsd2*)
75999e7bcd65Smrg        # C++ shared libraries are fairly broken
76009e7bcd65Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
76019e7bcd65Smrg	;;
76029e7bcd65Smrg
76039e7bcd65Smrg      openbsd*)
76049e7bcd65Smrg	if test -f /usr/libexec/ld.so; then
76059e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
76069e7bcd65Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
76079e7bcd65Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
76089e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
76099e7bcd65Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
76109e7bcd65Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
76119e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
76129e7bcd65Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
76139e7bcd65Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
76149e7bcd65Smrg	  fi
76159e7bcd65Smrg	  output_verbose_link_cmd=func_echo_all
76169e7bcd65Smrg	else
76179e7bcd65Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
76189e7bcd65Smrg	fi
76199e7bcd65Smrg	;;
76209e7bcd65Smrg
76219e7bcd65Smrg      osf3* | osf4* | osf5*)
76229e7bcd65Smrg        case $cc_basename in
76239e7bcd65Smrg          KCC*)
76249e7bcd65Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
76259e7bcd65Smrg
76269e7bcd65Smrg	    # KCC will only create a shared library if the output file
76279e7bcd65Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
76289e7bcd65Smrg	    # to its proper name (with version) after linking.
76299e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
76309e7bcd65Smrg
76319e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
76329e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
76339e7bcd65Smrg
76349e7bcd65Smrg	    # Archives containing C++ object files must be created using
76359e7bcd65Smrg	    # the KAI C++ compiler.
76369e7bcd65Smrg	    case $host in
76379e7bcd65Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
76389e7bcd65Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
76399e7bcd65Smrg	    esac
76409e7bcd65Smrg	    ;;
76419e7bcd65Smrg          RCC*)
76429e7bcd65Smrg	    # Rational C++ 2.4.1
76439e7bcd65Smrg	    # FIXME: insert proper C++ library support
76449e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76459e7bcd65Smrg	    ;;
76469e7bcd65Smrg          cxx*)
76479e7bcd65Smrg	    case $host in
76489e7bcd65Smrg	      osf3*)
76499e7bcd65Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
76509e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
76519e7bcd65Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
76529e7bcd65Smrg		;;
76539e7bcd65Smrg	      *)
76549e7bcd65Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
76559e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib'
76569e7bcd65Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
76579e7bcd65Smrg	          echo "-hidden">> $lib.exp~
76589e7bcd65Smrg	          $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~
76599e7bcd65Smrg	          $RM $lib.exp'
76609e7bcd65Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
76619e7bcd65Smrg		;;
76629e7bcd65Smrg	    esac
76639e7bcd65Smrg
76649e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
76659e7bcd65Smrg
76669e7bcd65Smrg	    # Commands to make compiler produce verbose output that lists
76679e7bcd65Smrg	    # what "hidden" libraries, object files and flags are used when
76689e7bcd65Smrg	    # linking a shared library.
76699e7bcd65Smrg	    #
76709e7bcd65Smrg	    # There doesn't appear to be a way to prevent this compiler from
76719e7bcd65Smrg	    # explicitly linking system object files so we need to strip them
76729e7bcd65Smrg	    # from the output so that they don't get included in the library
76739e7bcd65Smrg	    # dependencies.
76749e7bcd65Smrg	    output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"'
76759e7bcd65Smrg	    ;;
76769e7bcd65Smrg	  *)
76779e7bcd65Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
76789e7bcd65Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
76799e7bcd65Smrg	      case $host in
76809e7bcd65Smrg	        osf3*)
76819e7bcd65Smrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
76829e7bcd65Smrg		  ;;
76839e7bcd65Smrg	        *)
76849e7bcd65Smrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
76859e7bcd65Smrg		  ;;
76869e7bcd65Smrg	      esac
76879e7bcd65Smrg
76889e7bcd65Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
76899e7bcd65Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
76909e7bcd65Smrg
76919e7bcd65Smrg	      # Commands to make compiler produce verbose output that lists
76929e7bcd65Smrg	      # what "hidden" libraries, object files and flags are used when
76939e7bcd65Smrg	      # linking a shared library.
76949e7bcd65Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
76959e7bcd65Smrg
76969e7bcd65Smrg	    else
76979e7bcd65Smrg	      # FIXME: insert proper C++ library support
76989e7bcd65Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
76999e7bcd65Smrg	    fi
77009e7bcd65Smrg	    ;;
77019e7bcd65Smrg        esac
77029e7bcd65Smrg        ;;
77039e7bcd65Smrg
77049e7bcd65Smrg      psos*)
77059e7bcd65Smrg        # FIXME: insert proper C++ library support
77069e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
77079e7bcd65Smrg        ;;
77089e7bcd65Smrg
77099e7bcd65Smrg      sunos4*)
77109e7bcd65Smrg        case $cc_basename in
77119e7bcd65Smrg          CC*)
77129e7bcd65Smrg	    # Sun C++ 4.x
77139e7bcd65Smrg	    # FIXME: insert proper C++ library support
77149e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77159e7bcd65Smrg	    ;;
77169e7bcd65Smrg          lcc*)
77179e7bcd65Smrg	    # Lucid
77189e7bcd65Smrg	    # FIXME: insert proper C++ library support
77199e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77209e7bcd65Smrg	    ;;
77219e7bcd65Smrg          *)
77229e7bcd65Smrg	    # FIXME: insert proper C++ library support
77239e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77249e7bcd65Smrg	    ;;
77259e7bcd65Smrg        esac
77269e7bcd65Smrg        ;;
77279e7bcd65Smrg
77289e7bcd65Smrg      solaris*)
77299e7bcd65Smrg        case $cc_basename in
77309e7bcd65Smrg          CC* | sunCC*)
77319e7bcd65Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
77329e7bcd65Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
77339e7bcd65Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
77349e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
77359e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
77369e7bcd65Smrg	      $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'
77379e7bcd65Smrg
77389e7bcd65Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
77399e7bcd65Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
77409e7bcd65Smrg	    case $host_os in
77419e7bcd65Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
77429e7bcd65Smrg	      *)
77439e7bcd65Smrg		# The compiler driver will combine and reorder linker options,
77449e7bcd65Smrg		# but understands `-z linker_flag'.
77459e7bcd65Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
77469e7bcd65Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
77479e7bcd65Smrg	        ;;
77489e7bcd65Smrg	    esac
77499e7bcd65Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
77509e7bcd65Smrg
77519e7bcd65Smrg	    output_verbose_link_cmd='func_echo_all'
77529e7bcd65Smrg
77539e7bcd65Smrg	    # Archives containing C++ object files must be created using
77549e7bcd65Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
77559e7bcd65Smrg	    # necessary to make sure instantiated templates are included
77569e7bcd65Smrg	    # in the archive.
77579e7bcd65Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
77589e7bcd65Smrg	    ;;
77599e7bcd65Smrg          gcx*)
77609e7bcd65Smrg	    # Green Hills C++ Compiler
77619e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
77629e7bcd65Smrg
77639e7bcd65Smrg	    # The C++ compiler must be used to create the archive.
77649e7bcd65Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
77659e7bcd65Smrg	    ;;
77669e7bcd65Smrg          *)
77679e7bcd65Smrg	    # GNU C++ compiler with Solaris linker
77689e7bcd65Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
77699e7bcd65Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
77709e7bcd65Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
77719e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
77729e7bcd65Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
77739e7bcd65Smrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
77749e7bcd65Smrg
77759e7bcd65Smrg	        # Commands to make compiler produce verbose output that lists
77769e7bcd65Smrg	        # what "hidden" libraries, object files and flags are used when
77779e7bcd65Smrg	        # linking a shared library.
77789e7bcd65Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
77799e7bcd65Smrg	      else
77809e7bcd65Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
77819e7bcd65Smrg	        # platform.
77829e7bcd65Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
77839e7bcd65Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
77849e7bcd65Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
77859e7bcd65Smrg
77869e7bcd65Smrg	        # Commands to make compiler produce verbose output that lists
77879e7bcd65Smrg	        # what "hidden" libraries, object files and flags are used when
77889e7bcd65Smrg	        # linking a shared library.
77899e7bcd65Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
77909e7bcd65Smrg	      fi
77919e7bcd65Smrg
77929e7bcd65Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
77939e7bcd65Smrg	      case $host_os in
77949e7bcd65Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
77959e7bcd65Smrg		*)
77969e7bcd65Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
77979e7bcd65Smrg		  ;;
77989e7bcd65Smrg	      esac
77999e7bcd65Smrg	    fi
78009e7bcd65Smrg	    ;;
78019e7bcd65Smrg        esac
78029e7bcd65Smrg        ;;
78039e7bcd65Smrg
78049e7bcd65Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
78059e7bcd65Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
78069e7bcd65Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
78079e7bcd65Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78089e7bcd65Smrg      runpath_var='LD_RUN_PATH'
78099e7bcd65Smrg
78109e7bcd65Smrg      case $cc_basename in
78119e7bcd65Smrg        CC*)
78129e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78139e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78149e7bcd65Smrg	  ;;
78159e7bcd65Smrg	*)
78169e7bcd65Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78179e7bcd65Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78189e7bcd65Smrg	  ;;
78199e7bcd65Smrg      esac
78209e7bcd65Smrg      ;;
78219e7bcd65Smrg
78229e7bcd65Smrg      sysv5* | sco3.2v5* | sco5v6*)
78239e7bcd65Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
78249e7bcd65Smrg	# link with -lc, and that would cause any symbols used from libc to
78259e7bcd65Smrg	# always be unresolved, which means just about no library would
78269e7bcd65Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
78279e7bcd65Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
78289e7bcd65Smrg	# as -z defs.
78299e7bcd65Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
78309e7bcd65Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
78319e7bcd65Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78329e7bcd65Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78339e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
78349e7bcd65Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
78359e7bcd65Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
78369e7bcd65Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
78379e7bcd65Smrg	runpath_var='LD_RUN_PATH'
78389e7bcd65Smrg
78399e7bcd65Smrg	case $cc_basename in
78409e7bcd65Smrg          CC*)
78419e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78429e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78439e7bcd65Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
78449e7bcd65Smrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
78459e7bcd65Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
78469e7bcd65Smrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
78479e7bcd65Smrg	    ;;
78489e7bcd65Smrg	  *)
78499e7bcd65Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78509e7bcd65Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78519e7bcd65Smrg	    ;;
78529e7bcd65Smrg	esac
78539e7bcd65Smrg      ;;
78549e7bcd65Smrg
78559e7bcd65Smrg      tandem*)
78569e7bcd65Smrg        case $cc_basename in
78579e7bcd65Smrg          NCC*)
78589e7bcd65Smrg	    # NonStop-UX NCC 3.20
78599e7bcd65Smrg	    # FIXME: insert proper C++ library support
78609e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
78619e7bcd65Smrg	    ;;
78629e7bcd65Smrg          *)
78639e7bcd65Smrg	    # FIXME: insert proper C++ library support
78649e7bcd65Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
78659e7bcd65Smrg	    ;;
78669e7bcd65Smrg        esac
78679e7bcd65Smrg        ;;
78689e7bcd65Smrg
78699e7bcd65Smrg      vxworks*)
78709e7bcd65Smrg        # FIXME: insert proper C++ library support
78719e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
78729e7bcd65Smrg        ;;
78739e7bcd65Smrg
78749e7bcd65Smrg      *)
78759e7bcd65Smrg        # FIXME: insert proper C++ library support
78769e7bcd65Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
78779e7bcd65Smrg        ;;
78789e7bcd65Smrg    esac
78799e7bcd65Smrg
78809e7bcd65Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
78819e7bcd65Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
78829e7bcd65Smrg
78839e7bcd65Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
78849e7bcd65Smrg    _LT_TAGVAR(LD, $1)="$LD"
78859e7bcd65Smrg
78869e7bcd65Smrg    ## CAVEAT EMPTOR:
78879e7bcd65Smrg    ## There is no encapsulation within the following macros, do not change
78889e7bcd65Smrg    ## the running order or otherwise move them around unless you know exactly
78899e7bcd65Smrg    ## what you are doing...
78909e7bcd65Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
78919e7bcd65Smrg    _LT_COMPILER_PIC($1)
78929e7bcd65Smrg    _LT_COMPILER_C_O($1)
78939e7bcd65Smrg    _LT_COMPILER_FILE_LOCKS($1)
78949e7bcd65Smrg    _LT_LINKER_SHLIBS($1)
78959e7bcd65Smrg    _LT_SYS_DYNAMIC_LINKER($1)
78969e7bcd65Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
78979e7bcd65Smrg
78989e7bcd65Smrg    _LT_CONFIG($1)
78999e7bcd65Smrg  fi # test -n "$compiler"
79009e7bcd65Smrg
79019e7bcd65Smrg  CC=$lt_save_CC
79029e7bcd65Smrg  CFLAGS=$lt_save_CFLAGS
79039e7bcd65Smrg  LDCXX=$LD
79049e7bcd65Smrg  LD=$lt_save_LD
79059e7bcd65Smrg  GCC=$lt_save_GCC
79069e7bcd65Smrg  with_gnu_ld=$lt_save_with_gnu_ld
79079e7bcd65Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
79089e7bcd65Smrg  lt_cv_path_LD=$lt_save_path_LD
79099e7bcd65Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
79109e7bcd65Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
79119e7bcd65Smrgfi # test "$_lt_caught_CXX_error" != yes
79129e7bcd65Smrg
79139e7bcd65SmrgAC_LANG_POP
79149e7bcd65Smrg])# _LT_LANG_CXX_CONFIG
79159e7bcd65Smrg
79169e7bcd65Smrg
79179e7bcd65Smrg# _LT_FUNC_STRIPNAME_CNF
79189e7bcd65Smrg# ----------------------
79199e7bcd65Smrg# func_stripname_cnf prefix suffix name
79209e7bcd65Smrg# strip PREFIX and SUFFIX off of NAME.
79219e7bcd65Smrg# PREFIX and SUFFIX must not contain globbing or regex special
79229e7bcd65Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
79239e7bcd65Smrg# dot (in which case that matches only a dot).
79249e7bcd65Smrg#
79259e7bcd65Smrg# This function is identical to the (non-XSI) version of func_stripname,
79269e7bcd65Smrg# except this one can be used by m4 code that may be executed by configure,
79279e7bcd65Smrg# rather than the libtool script.
79289e7bcd65Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
79299e7bcd65SmrgAC_REQUIRE([_LT_DECL_SED])
79309e7bcd65SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
79319e7bcd65Smrgfunc_stripname_cnf ()
79329e7bcd65Smrg{
79339e7bcd65Smrg  case ${2} in
79349e7bcd65Smrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
79359e7bcd65Smrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
79369e7bcd65Smrg  esac
79379e7bcd65Smrg} # func_stripname_cnf
79389e7bcd65Smrg])# _LT_FUNC_STRIPNAME_CNF
79399e7bcd65Smrg
79409e7bcd65Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
79419e7bcd65Smrg# ---------------------------------
79429e7bcd65Smrg# Figure out "hidden" library dependencies from verbose
79439e7bcd65Smrg# compiler output when linking a shared library.
79449e7bcd65Smrg# Parse the compiler output and extract the necessary
79459e7bcd65Smrg# objects, libraries and library flags.
79469e7bcd65Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
79479e7bcd65Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
79489e7bcd65SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
79499e7bcd65Smrg# Dependencies to place before and after the object being linked:
79509e7bcd65Smrg_LT_TAGVAR(predep_objects, $1)=
79519e7bcd65Smrg_LT_TAGVAR(postdep_objects, $1)=
79529e7bcd65Smrg_LT_TAGVAR(predeps, $1)=
79539e7bcd65Smrg_LT_TAGVAR(postdeps, $1)=
79549e7bcd65Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
79559e7bcd65Smrg
79569e7bcd65Smrgdnl we can't use the lt_simple_compile_test_code here,
79579e7bcd65Smrgdnl because it contains code intended for an executable,
79589e7bcd65Smrgdnl not a library.  It's possible we should let each
79599e7bcd65Smrgdnl tag define a new lt_????_link_test_code variable,
79609e7bcd65Smrgdnl but it's only used here...
79619e7bcd65Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
79629e7bcd65Smrgint a;
79639e7bcd65Smrgvoid foo (void) { a = 0; }
79649e7bcd65Smrg_LT_EOF
79659e7bcd65Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
79669e7bcd65Smrgclass Foo
79679e7bcd65Smrg{
79689e7bcd65Smrgpublic:
79699e7bcd65Smrg  Foo (void) { a = 0; }
79709e7bcd65Smrgprivate:
79719e7bcd65Smrg  int a;
79729e7bcd65Smrg};
79739e7bcd65Smrg_LT_EOF
79749e7bcd65Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
79759e7bcd65Smrg      subroutine foo
79769e7bcd65Smrg      implicit none
79779e7bcd65Smrg      integer*4 a
79789e7bcd65Smrg      a=0
79799e7bcd65Smrg      return
79809e7bcd65Smrg      end
79819e7bcd65Smrg_LT_EOF
79829e7bcd65Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
79839e7bcd65Smrg      subroutine foo
79849e7bcd65Smrg      implicit none
79859e7bcd65Smrg      integer a
79869e7bcd65Smrg      a=0
79879e7bcd65Smrg      return
79889e7bcd65Smrg      end
79899e7bcd65Smrg_LT_EOF
79909e7bcd65Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
79919e7bcd65Smrgpublic class foo {
79929e7bcd65Smrg  private int a;
79939e7bcd65Smrg  public void bar (void) {
79949e7bcd65Smrg    a = 0;
79959e7bcd65Smrg  }
79969e7bcd65Smrg};
79979e7bcd65Smrg_LT_EOF
79989e7bcd65Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
79999e7bcd65Smrgpackage foo
80009e7bcd65Smrgfunc foo() {
80019e7bcd65Smrg}
80029e7bcd65Smrg_LT_EOF
80039e7bcd65Smrg])
80049e7bcd65Smrg
80059e7bcd65Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
80069e7bcd65Smrgcase "$CC $CFLAGS " in #(
80079e7bcd65Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
80089e7bcd65Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
80099e7bcd65Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
80109e7bcd65Smrgesac
80119e7bcd65Smrg
80129e7bcd65Smrgdnl Parse the compiler output and extract the necessary
80139e7bcd65Smrgdnl objects, libraries and library flags.
80149e7bcd65Smrgif AC_TRY_EVAL(ac_compile); then
80159e7bcd65Smrg  # Parse the compiler output and extract the necessary
80169e7bcd65Smrg  # objects, libraries and library flags.
80179e7bcd65Smrg
80189e7bcd65Smrg  # Sentinel used to keep track of whether or not we are before
80199e7bcd65Smrg  # the conftest object file.
80209e7bcd65Smrg  pre_test_object_deps_done=no
80219e7bcd65Smrg
80229e7bcd65Smrg  for p in `eval "$output_verbose_link_cmd"`; do
80239e7bcd65Smrg    case ${prev}${p} in
80249e7bcd65Smrg
80259e7bcd65Smrg    -L* | -R* | -l*)
80269e7bcd65Smrg       # Some compilers place space between "-{L,R}" and the path.
80279e7bcd65Smrg       # Remove the space.
80289e7bcd65Smrg       if test $p = "-L" ||
80299e7bcd65Smrg          test $p = "-R"; then
80309e7bcd65Smrg	 prev=$p
80319e7bcd65Smrg	 continue
80329e7bcd65Smrg       fi
80339e7bcd65Smrg
80349e7bcd65Smrg       # Expand the sysroot to ease extracting the directories later.
80359e7bcd65Smrg       if test -z "$prev"; then
80369e7bcd65Smrg         case $p in
80379e7bcd65Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
80389e7bcd65Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
80399e7bcd65Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
80409e7bcd65Smrg         esac
80419e7bcd65Smrg       fi
80429e7bcd65Smrg       case $p in
80439e7bcd65Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
80449e7bcd65Smrg       esac
80459e7bcd65Smrg       if test "$pre_test_object_deps_done" = no; then
80469e7bcd65Smrg	 case ${prev} in
80479e7bcd65Smrg	 -L | -R)
80489e7bcd65Smrg	   # Internal compiler library paths should come after those
80499e7bcd65Smrg	   # provided the user.  The postdeps already come after the
80509e7bcd65Smrg	   # user supplied libs so there is no need to process them.
80519e7bcd65Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
80529e7bcd65Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
80539e7bcd65Smrg	   else
80549e7bcd65Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
80559e7bcd65Smrg	   fi
80569e7bcd65Smrg	   ;;
80579e7bcd65Smrg	 # The "-l" case would never come before the object being
80589e7bcd65Smrg	 # linked, so don't bother handling this case.
80599e7bcd65Smrg	 esac
80609e7bcd65Smrg       else
80619e7bcd65Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
80629e7bcd65Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
80639e7bcd65Smrg	 else
80649e7bcd65Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
80659e7bcd65Smrg	 fi
80669e7bcd65Smrg       fi
80679e7bcd65Smrg       prev=
80689e7bcd65Smrg       ;;
80699e7bcd65Smrg
80709e7bcd65Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
80719e7bcd65Smrg    *.$objext)
80729e7bcd65Smrg       # This assumes that the test object file only shows up
80739e7bcd65Smrg       # once in the compiler output.
80749e7bcd65Smrg       if test "$p" = "conftest.$objext"; then
80759e7bcd65Smrg	 pre_test_object_deps_done=yes
80769e7bcd65Smrg	 continue
80779e7bcd65Smrg       fi
80789e7bcd65Smrg
80799e7bcd65Smrg       if test "$pre_test_object_deps_done" = no; then
80809e7bcd65Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
80819e7bcd65Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
80829e7bcd65Smrg	 else
80839e7bcd65Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
80849e7bcd65Smrg	 fi
80859e7bcd65Smrg       else
80869e7bcd65Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
80879e7bcd65Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
80889e7bcd65Smrg	 else
80899e7bcd65Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
80909e7bcd65Smrg	 fi
80919e7bcd65Smrg       fi
80929e7bcd65Smrg       ;;
80939e7bcd65Smrg
80949e7bcd65Smrg    *) ;; # Ignore the rest.
80959e7bcd65Smrg
80969e7bcd65Smrg    esac
80979e7bcd65Smrg  done
80989e7bcd65Smrg
80999e7bcd65Smrg  # Clean up.
81009e7bcd65Smrg  rm -f a.out a.exe
81019e7bcd65Smrgelse
81029e7bcd65Smrg  echo "libtool.m4: error: problem compiling $1 test program"
81039e7bcd65Smrgfi
81049e7bcd65Smrg
81059e7bcd65Smrg$RM -f confest.$objext
81069e7bcd65SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
81079e7bcd65Smrg
81089e7bcd65Smrg# PORTME: override above test on systems where it is broken
81099e7bcd65Smrgm4_if([$1], [CXX],
81109e7bcd65Smrg[case $host_os in
81119e7bcd65Smrginterix[[3-9]]*)
81129e7bcd65Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
81139e7bcd65Smrg  # hack all around it, let's just trust "g++" to DTRT.
81149e7bcd65Smrg  _LT_TAGVAR(predep_objects,$1)=
81159e7bcd65Smrg  _LT_TAGVAR(postdep_objects,$1)=
81169e7bcd65Smrg  _LT_TAGVAR(postdeps,$1)=
81179e7bcd65Smrg  ;;
81189e7bcd65Smrg
81199e7bcd65Smrglinux*)
81209e7bcd65Smrg  case `$CC -V 2>&1 | sed 5q` in
81219e7bcd65Smrg  *Sun\ C*)
81229e7bcd65Smrg    # Sun C++ 5.9
81239e7bcd65Smrg
81249e7bcd65Smrg    # The more standards-conforming stlport4 library is
81259e7bcd65Smrg    # incompatible with the Cstd library. Avoid specifying
81269e7bcd65Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
81279e7bcd65Smrg    # -library=stlport4 depends on it.
81289e7bcd65Smrg    case " $CXX $CXXFLAGS " in
81299e7bcd65Smrg    *" -library=stlport4 "*)
81309e7bcd65Smrg      solaris_use_stlport4=yes
81319e7bcd65Smrg      ;;
81329e7bcd65Smrg    esac
81339e7bcd65Smrg
81349e7bcd65Smrg    if test "$solaris_use_stlport4" != yes; then
81359e7bcd65Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
81369e7bcd65Smrg    fi
81379e7bcd65Smrg    ;;
81389e7bcd65Smrg  esac
81399e7bcd65Smrg  ;;
81409e7bcd65Smrg
81419e7bcd65Smrgsolaris*)
81429e7bcd65Smrg  case $cc_basename in
81439e7bcd65Smrg  CC* | sunCC*)
81449e7bcd65Smrg    # The more standards-conforming stlport4 library is
81459e7bcd65Smrg    # incompatible with the Cstd library. Avoid specifying
81469e7bcd65Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
81479e7bcd65Smrg    # -library=stlport4 depends on it.
81489e7bcd65Smrg    case " $CXX $CXXFLAGS " in
81499e7bcd65Smrg    *" -library=stlport4 "*)
81509e7bcd65Smrg      solaris_use_stlport4=yes
81519e7bcd65Smrg      ;;
81529e7bcd65Smrg    esac
81539e7bcd65Smrg
81549e7bcd65Smrg    # Adding this requires a known-good setup of shared libraries for
81559e7bcd65Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
81569e7bcd65Smrg    # archive will be linked into the output, leading to subtle bugs.
81579e7bcd65Smrg    if test "$solaris_use_stlport4" != yes; then
81589e7bcd65Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
81599e7bcd65Smrg    fi
81609e7bcd65Smrg    ;;
81619e7bcd65Smrg  esac
81629e7bcd65Smrg  ;;
81639e7bcd65Smrgesac
81649e7bcd65Smrg])
81659e7bcd65Smrg
81669e7bcd65Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
81679e7bcd65Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
81689e7bcd65Smrgesac
81699e7bcd65Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
81709e7bcd65Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
81719e7bcd65Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
81729e7bcd65Smrgfi
81739e7bcd65Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
81749e7bcd65Smrg    [The directories searched by this compiler when creating a shared library])
81759e7bcd65Smrg_LT_TAGDECL([], [predep_objects], [1],
81769e7bcd65Smrg    [Dependencies to place before and after the objects being linked to
81779e7bcd65Smrg    create a shared library])
81789e7bcd65Smrg_LT_TAGDECL([], [postdep_objects], [1])
81799e7bcd65Smrg_LT_TAGDECL([], [predeps], [1])
81809e7bcd65Smrg_LT_TAGDECL([], [postdeps], [1])
81819e7bcd65Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
81829e7bcd65Smrg    [The library search path used internally by the compiler when linking
81839e7bcd65Smrg    a shared library])
81849e7bcd65Smrg])# _LT_SYS_HIDDEN_LIBDEPS
81859e7bcd65Smrg
81869e7bcd65Smrg
81879e7bcd65Smrg# _LT_LANG_F77_CONFIG([TAG])
81889e7bcd65Smrg# --------------------------
81899e7bcd65Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
81909e7bcd65Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
81919e7bcd65Smrg# to write the compiler configuration to `libtool'.
81929e7bcd65Smrgm4_defun([_LT_LANG_F77_CONFIG],
81939e7bcd65Smrg[AC_LANG_PUSH(Fortran 77)
81949e7bcd65Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
81959e7bcd65Smrg  _lt_disable_F77=yes
81969e7bcd65Smrgfi
81979e7bcd65Smrg
81989e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
81999e7bcd65Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
82009e7bcd65Smrg_LT_TAGVAR(always_export_symbols, $1)=no
82019e7bcd65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
82029e7bcd65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
82039e7bcd65Smrg_LT_TAGVAR(hardcode_direct, $1)=no
82049e7bcd65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
82059e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
82069e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
82079e7bcd65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
82089e7bcd65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
82099e7bcd65Smrg_LT_TAGVAR(inherit_rpath, $1)=no
82109e7bcd65Smrg_LT_TAGVAR(module_cmds, $1)=
82119e7bcd65Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
82129e7bcd65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
82139e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
82149e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
82159e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
82169e7bcd65Smrg_LT_TAGVAR(no_undefined_flag, $1)=
82179e7bcd65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
82189e7bcd65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
82199e7bcd65Smrg
82209e7bcd65Smrg# Source file extension for f77 test sources.
82219e7bcd65Smrgac_ext=f
82229e7bcd65Smrg
82239e7bcd65Smrg# Object file extension for compiled f77 test sources.
82249e7bcd65Smrgobjext=o
82259e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext
82269e7bcd65Smrg
82279e7bcd65Smrg# No sense in running all these tests if we already determined that
82289e7bcd65Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
82299e7bcd65Smrg# are currently assumed to apply to all compilers on this platform,
82309e7bcd65Smrg# and will be corrupted by setting them based on a non-working compiler.
82319e7bcd65Smrgif test "$_lt_disable_F77" != yes; then
82329e7bcd65Smrg  # Code to be used in simple compile tests
82339e7bcd65Smrg  lt_simple_compile_test_code="\
82349e7bcd65Smrg      subroutine t
82359e7bcd65Smrg      return
82369e7bcd65Smrg      end
82379e7bcd65Smrg"
82389e7bcd65Smrg
82399e7bcd65Smrg  # Code to be used in simple link tests
82409e7bcd65Smrg  lt_simple_link_test_code="\
82419e7bcd65Smrg      program t
82429e7bcd65Smrg      end
82439e7bcd65Smrg"
82449e7bcd65Smrg
82459e7bcd65Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
82469e7bcd65Smrg  _LT_TAG_COMPILER
82479e7bcd65Smrg
82489e7bcd65Smrg  # save warnings/boilerplate of simple test code
82499e7bcd65Smrg  _LT_COMPILER_BOILERPLATE
82509e7bcd65Smrg  _LT_LINKER_BOILERPLATE
82519e7bcd65Smrg
82529e7bcd65Smrg  # Allow CC to be a program name with arguments.
82539e7bcd65Smrg  lt_save_CC="$CC"
82549e7bcd65Smrg  lt_save_GCC=$GCC
82559e7bcd65Smrg  lt_save_CFLAGS=$CFLAGS
82569e7bcd65Smrg  CC=${F77-"f77"}
82579e7bcd65Smrg  CFLAGS=$FFLAGS
82589e7bcd65Smrg  compiler=$CC
82599e7bcd65Smrg  _LT_TAGVAR(compiler, $1)=$CC
82609e7bcd65Smrg  _LT_CC_BASENAME([$compiler])
82619e7bcd65Smrg  GCC=$G77
82629e7bcd65Smrg  if test -n "$compiler"; then
82639e7bcd65Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
82649e7bcd65Smrg    AC_MSG_RESULT([$can_build_shared])
82659e7bcd65Smrg
82669e7bcd65Smrg    AC_MSG_CHECKING([whether to build shared libraries])
82679e7bcd65Smrg    test "$can_build_shared" = "no" && enable_shared=no
82689e7bcd65Smrg
82699e7bcd65Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
82709e7bcd65Smrg    # are all built from PIC.
82719e7bcd65Smrg    case $host_os in
82729e7bcd65Smrg      aix3*)
82739e7bcd65Smrg        test "$enable_shared" = yes && enable_static=no
82749e7bcd65Smrg        if test -n "$RANLIB"; then
82759e7bcd65Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
82769e7bcd65Smrg          postinstall_cmds='$RANLIB $lib'
82779e7bcd65Smrg        fi
82789e7bcd65Smrg        ;;
82799e7bcd65Smrg      aix[[4-9]]*)
82809e7bcd65Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
82819e7bcd65Smrg	  test "$enable_shared" = yes && enable_static=no
82829e7bcd65Smrg	fi
82839e7bcd65Smrg        ;;
82849e7bcd65Smrg    esac
82859e7bcd65Smrg    AC_MSG_RESULT([$enable_shared])
82869e7bcd65Smrg
82879e7bcd65Smrg    AC_MSG_CHECKING([whether to build static libraries])
82889e7bcd65Smrg    # Make sure either enable_shared or enable_static is yes.
82899e7bcd65Smrg    test "$enable_shared" = yes || enable_static=yes
82909e7bcd65Smrg    AC_MSG_RESULT([$enable_static])
82919e7bcd65Smrg
82929e7bcd65Smrg    _LT_TAGVAR(GCC, $1)="$G77"
82939e7bcd65Smrg    _LT_TAGVAR(LD, $1)="$LD"
82949e7bcd65Smrg
82959e7bcd65Smrg    ## CAVEAT EMPTOR:
82969e7bcd65Smrg    ## There is no encapsulation within the following macros, do not change
82979e7bcd65Smrg    ## the running order or otherwise move them around unless you know exactly
82989e7bcd65Smrg    ## what you are doing...
82999e7bcd65Smrg    _LT_COMPILER_PIC($1)
83009e7bcd65Smrg    _LT_COMPILER_C_O($1)
83019e7bcd65Smrg    _LT_COMPILER_FILE_LOCKS($1)
83029e7bcd65Smrg    _LT_LINKER_SHLIBS($1)
83039e7bcd65Smrg    _LT_SYS_DYNAMIC_LINKER($1)
83049e7bcd65Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
83059e7bcd65Smrg
83069e7bcd65Smrg    _LT_CONFIG($1)
83079e7bcd65Smrg  fi # test -n "$compiler"
83089e7bcd65Smrg
83099e7bcd65Smrg  GCC=$lt_save_GCC
83109e7bcd65Smrg  CC="$lt_save_CC"
83119e7bcd65Smrg  CFLAGS="$lt_save_CFLAGS"
83129e7bcd65Smrgfi # test "$_lt_disable_F77" != yes
83139e7bcd65Smrg
83149e7bcd65SmrgAC_LANG_POP
83159e7bcd65Smrg])# _LT_LANG_F77_CONFIG
83169e7bcd65Smrg
83179e7bcd65Smrg
83189e7bcd65Smrg# _LT_LANG_FC_CONFIG([TAG])
83199e7bcd65Smrg# -------------------------
83209e7bcd65Smrg# Ensure that the configuration variables for a Fortran compiler are
83219e7bcd65Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
83229e7bcd65Smrg# to write the compiler configuration to `libtool'.
83239e7bcd65Smrgm4_defun([_LT_LANG_FC_CONFIG],
83249e7bcd65Smrg[AC_LANG_PUSH(Fortran)
83259e7bcd65Smrg
83269e7bcd65Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
83279e7bcd65Smrg  _lt_disable_FC=yes
83289e7bcd65Smrgfi
83299e7bcd65Smrg
83309e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
83319e7bcd65Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
83329e7bcd65Smrg_LT_TAGVAR(always_export_symbols, $1)=no
83339e7bcd65Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
83349e7bcd65Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
83359e7bcd65Smrg_LT_TAGVAR(hardcode_direct, $1)=no
83369e7bcd65Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
83379e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
83389e7bcd65Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
83399e7bcd65Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
83409e7bcd65Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
83419e7bcd65Smrg_LT_TAGVAR(inherit_rpath, $1)=no
83429e7bcd65Smrg_LT_TAGVAR(module_cmds, $1)=
83439e7bcd65Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
83449e7bcd65Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
83459e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
83469e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
83479e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
83489e7bcd65Smrg_LT_TAGVAR(no_undefined_flag, $1)=
83499e7bcd65Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
83509e7bcd65Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
83519e7bcd65Smrg
83529e7bcd65Smrg# Source file extension for fc test sources.
83539e7bcd65Smrgac_ext=${ac_fc_srcext-f}
83549e7bcd65Smrg
83559e7bcd65Smrg# Object file extension for compiled fc test sources.
83569e7bcd65Smrgobjext=o
83579e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext
83589e7bcd65Smrg
83599e7bcd65Smrg# No sense in running all these tests if we already determined that
83609e7bcd65Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
83619e7bcd65Smrg# are currently assumed to apply to all compilers on this platform,
83629e7bcd65Smrg# and will be corrupted by setting them based on a non-working compiler.
83639e7bcd65Smrgif test "$_lt_disable_FC" != yes; then
83649e7bcd65Smrg  # Code to be used in simple compile tests
83659e7bcd65Smrg  lt_simple_compile_test_code="\
83669e7bcd65Smrg      subroutine t
83679e7bcd65Smrg      return
83689e7bcd65Smrg      end
83699e7bcd65Smrg"
83709e7bcd65Smrg
83719e7bcd65Smrg  # Code to be used in simple link tests
83729e7bcd65Smrg  lt_simple_link_test_code="\
83739e7bcd65Smrg      program t
83749e7bcd65Smrg      end
83759e7bcd65Smrg"
83769e7bcd65Smrg
83779e7bcd65Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
83789e7bcd65Smrg  _LT_TAG_COMPILER
83799e7bcd65Smrg
83809e7bcd65Smrg  # save warnings/boilerplate of simple test code
83819e7bcd65Smrg  _LT_COMPILER_BOILERPLATE
83829e7bcd65Smrg  _LT_LINKER_BOILERPLATE
83839e7bcd65Smrg
83849e7bcd65Smrg  # Allow CC to be a program name with arguments.
83859e7bcd65Smrg  lt_save_CC="$CC"
83869e7bcd65Smrg  lt_save_GCC=$GCC
83879e7bcd65Smrg  lt_save_CFLAGS=$CFLAGS
83889e7bcd65Smrg  CC=${FC-"f95"}
83899e7bcd65Smrg  CFLAGS=$FCFLAGS
83909e7bcd65Smrg  compiler=$CC
83919e7bcd65Smrg  GCC=$ac_cv_fc_compiler_gnu
83929e7bcd65Smrg
83939e7bcd65Smrg  _LT_TAGVAR(compiler, $1)=$CC
83949e7bcd65Smrg  _LT_CC_BASENAME([$compiler])
83959e7bcd65Smrg
83969e7bcd65Smrg  if test -n "$compiler"; then
83979e7bcd65Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
83989e7bcd65Smrg    AC_MSG_RESULT([$can_build_shared])
83999e7bcd65Smrg
84009e7bcd65Smrg    AC_MSG_CHECKING([whether to build shared libraries])
84019e7bcd65Smrg    test "$can_build_shared" = "no" && enable_shared=no
84029e7bcd65Smrg
84039e7bcd65Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
84049e7bcd65Smrg    # are all built from PIC.
84059e7bcd65Smrg    case $host_os in
84069e7bcd65Smrg      aix3*)
84079e7bcd65Smrg        test "$enable_shared" = yes && enable_static=no
84089e7bcd65Smrg        if test -n "$RANLIB"; then
84099e7bcd65Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
84109e7bcd65Smrg          postinstall_cmds='$RANLIB $lib'
84119e7bcd65Smrg        fi
84129e7bcd65Smrg        ;;
84139e7bcd65Smrg      aix[[4-9]]*)
84149e7bcd65Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
84159e7bcd65Smrg	  test "$enable_shared" = yes && enable_static=no
84169e7bcd65Smrg	fi
84179e7bcd65Smrg        ;;
84189e7bcd65Smrg    esac
84199e7bcd65Smrg    AC_MSG_RESULT([$enable_shared])
84209e7bcd65Smrg
84219e7bcd65Smrg    AC_MSG_CHECKING([whether to build static libraries])
84229e7bcd65Smrg    # Make sure either enable_shared or enable_static is yes.
84239e7bcd65Smrg    test "$enable_shared" = yes || enable_static=yes
84249e7bcd65Smrg    AC_MSG_RESULT([$enable_static])
84259e7bcd65Smrg
84269e7bcd65Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
84279e7bcd65Smrg    _LT_TAGVAR(LD, $1)="$LD"
84289e7bcd65Smrg
84299e7bcd65Smrg    ## CAVEAT EMPTOR:
84309e7bcd65Smrg    ## There is no encapsulation within the following macros, do not change
84319e7bcd65Smrg    ## the running order or otherwise move them around unless you know exactly
84329e7bcd65Smrg    ## what you are doing...
84339e7bcd65Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
84349e7bcd65Smrg    _LT_COMPILER_PIC($1)
84359e7bcd65Smrg    _LT_COMPILER_C_O($1)
84369e7bcd65Smrg    _LT_COMPILER_FILE_LOCKS($1)
84379e7bcd65Smrg    _LT_LINKER_SHLIBS($1)
84389e7bcd65Smrg    _LT_SYS_DYNAMIC_LINKER($1)
84399e7bcd65Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
84409e7bcd65Smrg
84419e7bcd65Smrg    _LT_CONFIG($1)
84429e7bcd65Smrg  fi # test -n "$compiler"
84439e7bcd65Smrg
84449e7bcd65Smrg  GCC=$lt_save_GCC
84459e7bcd65Smrg  CC=$lt_save_CC
84469e7bcd65Smrg  CFLAGS=$lt_save_CFLAGS
84479e7bcd65Smrgfi # test "$_lt_disable_FC" != yes
84489e7bcd65Smrg
84499e7bcd65SmrgAC_LANG_POP
84509e7bcd65Smrg])# _LT_LANG_FC_CONFIG
84519e7bcd65Smrg
84529e7bcd65Smrg
84539e7bcd65Smrg# _LT_LANG_GCJ_CONFIG([TAG])
84549e7bcd65Smrg# --------------------------
84559e7bcd65Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
84569e7bcd65Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
84579e7bcd65Smrg# to write the compiler configuration to `libtool'.
84589e7bcd65Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
84599e7bcd65Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
84609e7bcd65SmrgAC_LANG_SAVE
84619e7bcd65Smrg
84629e7bcd65Smrg# Source file extension for Java test sources.
84639e7bcd65Smrgac_ext=java
84649e7bcd65Smrg
84659e7bcd65Smrg# Object file extension for compiled Java test sources.
84669e7bcd65Smrgobjext=o
84679e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext
84689e7bcd65Smrg
84699e7bcd65Smrg# Code to be used in simple compile tests
84709e7bcd65Smrglt_simple_compile_test_code="class foo {}"
84719e7bcd65Smrg
84729e7bcd65Smrg# Code to be used in simple link tests
84739e7bcd65Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
84749e7bcd65Smrg
84759e7bcd65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
84769e7bcd65Smrg_LT_TAG_COMPILER
84779e7bcd65Smrg
84789e7bcd65Smrg# save warnings/boilerplate of simple test code
84799e7bcd65Smrg_LT_COMPILER_BOILERPLATE
84809e7bcd65Smrg_LT_LINKER_BOILERPLATE
84819e7bcd65Smrg
84829e7bcd65Smrg# Allow CC to be a program name with arguments.
84839e7bcd65Smrglt_save_CC=$CC
84849e7bcd65Smrglt_save_CFLAGS=$CFLAGS
84859e7bcd65Smrglt_save_GCC=$GCC
84869e7bcd65SmrgGCC=yes
84879e7bcd65SmrgCC=${GCJ-"gcj"}
84889e7bcd65SmrgCFLAGS=$GCJFLAGS
84899e7bcd65Smrgcompiler=$CC
84909e7bcd65Smrg_LT_TAGVAR(compiler, $1)=$CC
84919e7bcd65Smrg_LT_TAGVAR(LD, $1)="$LD"
84929e7bcd65Smrg_LT_CC_BASENAME([$compiler])
84939e7bcd65Smrg
84949e7bcd65Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
84959e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
84969e7bcd65Smrg
84979e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
84989e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
84999e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
85009e7bcd65Smrg
85019e7bcd65Smrgif test -n "$compiler"; then
85029e7bcd65Smrg  _LT_COMPILER_NO_RTTI($1)
85039e7bcd65Smrg  _LT_COMPILER_PIC($1)
85049e7bcd65Smrg  _LT_COMPILER_C_O($1)
85059e7bcd65Smrg  _LT_COMPILER_FILE_LOCKS($1)
85069e7bcd65Smrg  _LT_LINKER_SHLIBS($1)
85079e7bcd65Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
85089e7bcd65Smrg
85099e7bcd65Smrg  _LT_CONFIG($1)
85109e7bcd65Smrgfi
85119e7bcd65Smrg
85129e7bcd65SmrgAC_LANG_RESTORE
85139e7bcd65Smrg
85149e7bcd65SmrgGCC=$lt_save_GCC
85159e7bcd65SmrgCC=$lt_save_CC
85169e7bcd65SmrgCFLAGS=$lt_save_CFLAGS
85179e7bcd65Smrg])# _LT_LANG_GCJ_CONFIG
85189e7bcd65Smrg
85199e7bcd65Smrg
85209e7bcd65Smrg# _LT_LANG_GO_CONFIG([TAG])
85219e7bcd65Smrg# --------------------------
85229e7bcd65Smrg# Ensure that the configuration variables for the GNU Go compiler
85239e7bcd65Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
85249e7bcd65Smrg# to write the compiler configuration to `libtool'.
85259e7bcd65Smrgm4_defun([_LT_LANG_GO_CONFIG],
85269e7bcd65Smrg[AC_REQUIRE([LT_PROG_GO])dnl
85279e7bcd65SmrgAC_LANG_SAVE
85289e7bcd65Smrg
85299e7bcd65Smrg# Source file extension for Go test sources.
85309e7bcd65Smrgac_ext=go
85319e7bcd65Smrg
85329e7bcd65Smrg# Object file extension for compiled Go test sources.
85339e7bcd65Smrgobjext=o
85349e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext
85359e7bcd65Smrg
85369e7bcd65Smrg# Code to be used in simple compile tests
85379e7bcd65Smrglt_simple_compile_test_code="package main; func main() { }"
85389e7bcd65Smrg
85399e7bcd65Smrg# Code to be used in simple link tests
85409e7bcd65Smrglt_simple_link_test_code='package main; func main() { }'
85419e7bcd65Smrg
85429e7bcd65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
85439e7bcd65Smrg_LT_TAG_COMPILER
85449e7bcd65Smrg
85459e7bcd65Smrg# save warnings/boilerplate of simple test code
85469e7bcd65Smrg_LT_COMPILER_BOILERPLATE
85479e7bcd65Smrg_LT_LINKER_BOILERPLATE
85489e7bcd65Smrg
85499e7bcd65Smrg# Allow CC to be a program name with arguments.
85509e7bcd65Smrglt_save_CC=$CC
85519e7bcd65Smrglt_save_CFLAGS=$CFLAGS
85529e7bcd65Smrglt_save_GCC=$GCC
85539e7bcd65SmrgGCC=yes
85549e7bcd65SmrgCC=${GOC-"gccgo"}
85559e7bcd65SmrgCFLAGS=$GOFLAGS
85569e7bcd65Smrgcompiler=$CC
85579e7bcd65Smrg_LT_TAGVAR(compiler, $1)=$CC
85589e7bcd65Smrg_LT_TAGVAR(LD, $1)="$LD"
85599e7bcd65Smrg_LT_CC_BASENAME([$compiler])
85609e7bcd65Smrg
85619e7bcd65Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
85629e7bcd65Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
85639e7bcd65Smrg
85649e7bcd65Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
85659e7bcd65Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
85669e7bcd65Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
85679e7bcd65Smrg
85689e7bcd65Smrgif test -n "$compiler"; then
85699e7bcd65Smrg  _LT_COMPILER_NO_RTTI($1)
85709e7bcd65Smrg  _LT_COMPILER_PIC($1)
85719e7bcd65Smrg  _LT_COMPILER_C_O($1)
85729e7bcd65Smrg  _LT_COMPILER_FILE_LOCKS($1)
85739e7bcd65Smrg  _LT_LINKER_SHLIBS($1)
85749e7bcd65Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
85759e7bcd65Smrg
85769e7bcd65Smrg  _LT_CONFIG($1)
85779e7bcd65Smrgfi
85789e7bcd65Smrg
85799e7bcd65SmrgAC_LANG_RESTORE
85809e7bcd65Smrg
85819e7bcd65SmrgGCC=$lt_save_GCC
85829e7bcd65SmrgCC=$lt_save_CC
85839e7bcd65SmrgCFLAGS=$lt_save_CFLAGS
85849e7bcd65Smrg])# _LT_LANG_GO_CONFIG
85859e7bcd65Smrg
85869e7bcd65Smrg
85879e7bcd65Smrg# _LT_LANG_RC_CONFIG([TAG])
85889e7bcd65Smrg# -------------------------
85899e7bcd65Smrg# Ensure that the configuration variables for the Windows resource compiler
85909e7bcd65Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
85919e7bcd65Smrg# to write the compiler configuration to `libtool'.
85929e7bcd65Smrgm4_defun([_LT_LANG_RC_CONFIG],
85939e7bcd65Smrg[AC_REQUIRE([LT_PROG_RC])dnl
85949e7bcd65SmrgAC_LANG_SAVE
85959e7bcd65Smrg
85969e7bcd65Smrg# Source file extension for RC test sources.
85979e7bcd65Smrgac_ext=rc
85989e7bcd65Smrg
85999e7bcd65Smrg# Object file extension for compiled RC test sources.
86009e7bcd65Smrgobjext=o
86019e7bcd65Smrg_LT_TAGVAR(objext, $1)=$objext
86029e7bcd65Smrg
86039e7bcd65Smrg# Code to be used in simple compile tests
86049e7bcd65Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
86059e7bcd65Smrg
86069e7bcd65Smrg# Code to be used in simple link tests
86079e7bcd65Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
86089e7bcd65Smrg
86099e7bcd65Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
86109e7bcd65Smrg_LT_TAG_COMPILER
86119e7bcd65Smrg
86129e7bcd65Smrg# save warnings/boilerplate of simple test code
86139e7bcd65Smrg_LT_COMPILER_BOILERPLATE
86149e7bcd65Smrg_LT_LINKER_BOILERPLATE
86159e7bcd65Smrg
86169e7bcd65Smrg# Allow CC to be a program name with arguments.
86179e7bcd65Smrglt_save_CC="$CC"
86189e7bcd65Smrglt_save_CFLAGS=$CFLAGS
86199e7bcd65Smrglt_save_GCC=$GCC
86209e7bcd65SmrgGCC=
86219e7bcd65SmrgCC=${RC-"windres"}
86229e7bcd65SmrgCFLAGS=
86239e7bcd65Smrgcompiler=$CC
86249e7bcd65Smrg_LT_TAGVAR(compiler, $1)=$CC
86259e7bcd65Smrg_LT_CC_BASENAME([$compiler])
86269e7bcd65Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
86279e7bcd65Smrg
86289e7bcd65Smrgif test -n "$compiler"; then
86299e7bcd65Smrg  :
86309e7bcd65Smrg  _LT_CONFIG($1)
86319e7bcd65Smrgfi
86329e7bcd65Smrg
86339e7bcd65SmrgGCC=$lt_save_GCC
86349e7bcd65SmrgAC_LANG_RESTORE
86359e7bcd65SmrgCC=$lt_save_CC
86369e7bcd65SmrgCFLAGS=$lt_save_CFLAGS
86379e7bcd65Smrg])# _LT_LANG_RC_CONFIG
86389e7bcd65Smrg
86399e7bcd65Smrg
86409e7bcd65Smrg# LT_PROG_GCJ
86419e7bcd65Smrg# -----------
86429e7bcd65SmrgAC_DEFUN([LT_PROG_GCJ],
86439e7bcd65Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
86449e7bcd65Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
86459e7bcd65Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
86469e7bcd65Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
86479e7bcd65Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
86489e7bcd65Smrg])
86499e7bcd65Smrg
86509e7bcd65Smrg# Old name:
86519e7bcd65SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
86529e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
86539e7bcd65Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
86549e7bcd65Smrg
86559e7bcd65Smrg
86569e7bcd65Smrg# LT_PROG_GO
86579e7bcd65Smrg# ----------
86589e7bcd65SmrgAC_DEFUN([LT_PROG_GO],
86599e7bcd65Smrg[AC_CHECK_TOOL(GOC, gccgo,)
86609e7bcd65Smrg])
86619e7bcd65Smrg
86629e7bcd65Smrg
86639e7bcd65Smrg# LT_PROG_RC
86649e7bcd65Smrg# ----------
86659e7bcd65SmrgAC_DEFUN([LT_PROG_RC],
86669e7bcd65Smrg[AC_CHECK_TOOL(RC, windres,)
86679e7bcd65Smrg])
86689e7bcd65Smrg
86699e7bcd65Smrg# Old name:
86709e7bcd65SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
86719e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
86729e7bcd65Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
86739e7bcd65Smrg
86749e7bcd65Smrg
86759e7bcd65Smrg# _LT_DECL_EGREP
86769e7bcd65Smrg# --------------
86779e7bcd65Smrg# If we don't have a new enough Autoconf to choose the best grep
86789e7bcd65Smrg# available, choose the one first in the user's PATH.
86799e7bcd65Smrgm4_defun([_LT_DECL_EGREP],
86809e7bcd65Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
86819e7bcd65SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
86829e7bcd65Smrgtest -z "$GREP" && GREP=grep
86839e7bcd65Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
86849e7bcd65Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
86859e7bcd65Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
86869e7bcd65Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
86879e7bcd65SmrgAC_SUBST([GREP])
86889e7bcd65Smrg])
86899e7bcd65Smrg
86909e7bcd65Smrg
86919e7bcd65Smrg# _LT_DECL_OBJDUMP
86929e7bcd65Smrg# --------------
86939e7bcd65Smrg# If we don't have a new enough Autoconf to choose the best objdump
86949e7bcd65Smrg# available, choose the one first in the user's PATH.
86959e7bcd65Smrgm4_defun([_LT_DECL_OBJDUMP],
86969e7bcd65Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
86979e7bcd65Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
86989e7bcd65Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
86999e7bcd65SmrgAC_SUBST([OBJDUMP])
87009e7bcd65Smrg])
87019e7bcd65Smrg
87029e7bcd65Smrg# _LT_DECL_DLLTOOL
87039e7bcd65Smrg# ----------------
87049e7bcd65Smrg# Ensure DLLTOOL variable is set.
87059e7bcd65Smrgm4_defun([_LT_DECL_DLLTOOL],
87069e7bcd65Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
87079e7bcd65Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
87089e7bcd65Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
87099e7bcd65SmrgAC_SUBST([DLLTOOL])
87109e7bcd65Smrg])
87119e7bcd65Smrg
87129e7bcd65Smrg# _LT_DECL_SED
87139e7bcd65Smrg# ------------
87149e7bcd65Smrg# Check for a fully-functional sed program, that truncates
87159e7bcd65Smrg# as few characters as possible.  Prefer GNU sed if found.
87169e7bcd65Smrgm4_defun([_LT_DECL_SED],
87179e7bcd65Smrg[AC_PROG_SED
87189e7bcd65Smrgtest -z "$SED" && SED=sed
87199e7bcd65SmrgXsed="$SED -e 1s/^X//"
87209e7bcd65Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
87219e7bcd65Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
87229e7bcd65Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
87239e7bcd65Smrg])# _LT_DECL_SED
87249e7bcd65Smrg
87259e7bcd65Smrgm4_ifndef([AC_PROG_SED], [
87269e7bcd65Smrg# NOTE: This macro has been submitted for inclusion into   #
87279e7bcd65Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
87289e7bcd65Smrg#  a released version of Autoconf we should remove this    #
87299e7bcd65Smrg#  macro and use it instead.                               #
87309e7bcd65Smrg
87319e7bcd65Smrgm4_defun([AC_PROG_SED],
87329e7bcd65Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
87339e7bcd65SmrgAC_CACHE_VAL(lt_cv_path_SED,
87349e7bcd65Smrg[# Loop through the user's path and test for sed and gsed.
87359e7bcd65Smrg# Then use that list of sed's as ones to test for truncation.
87369e7bcd65Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
87379e7bcd65Smrgfor as_dir in $PATH
87389e7bcd65Smrgdo
87399e7bcd65Smrg  IFS=$as_save_IFS
87409e7bcd65Smrg  test -z "$as_dir" && as_dir=.
87419e7bcd65Smrg  for lt_ac_prog in sed gsed; do
87429e7bcd65Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
87439e7bcd65Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
87449e7bcd65Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
87459e7bcd65Smrg      fi
87469e7bcd65Smrg    done
87479e7bcd65Smrg  done
87489e7bcd65Smrgdone
87499e7bcd65SmrgIFS=$as_save_IFS
87509e7bcd65Smrglt_ac_max=0
87519e7bcd65Smrglt_ac_count=0
87529e7bcd65Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
87539e7bcd65Smrg# along with /bin/sed that truncates output.
87549e7bcd65Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
87559e7bcd65Smrg  test ! -f $lt_ac_sed && continue
87569e7bcd65Smrg  cat /dev/null > conftest.in
87579e7bcd65Smrg  lt_ac_count=0
87589e7bcd65Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
87599e7bcd65Smrg  # Check for GNU sed and select it if it is found.
87609e7bcd65Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
87619e7bcd65Smrg    lt_cv_path_SED=$lt_ac_sed
87629e7bcd65Smrg    break
87639e7bcd65Smrg  fi
87649e7bcd65Smrg  while true; do
87659e7bcd65Smrg    cat conftest.in conftest.in >conftest.tmp
87669e7bcd65Smrg    mv conftest.tmp conftest.in
87679e7bcd65Smrg    cp conftest.in conftest.nl
87689e7bcd65Smrg    echo >>conftest.nl
87699e7bcd65Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
87709e7bcd65Smrg    cmp -s conftest.out conftest.nl || break
87719e7bcd65Smrg    # 10000 chars as input seems more than enough
87729e7bcd65Smrg    test $lt_ac_count -gt 10 && break
87739e7bcd65Smrg    lt_ac_count=`expr $lt_ac_count + 1`
87749e7bcd65Smrg    if test $lt_ac_count -gt $lt_ac_max; then
87759e7bcd65Smrg      lt_ac_max=$lt_ac_count
87769e7bcd65Smrg      lt_cv_path_SED=$lt_ac_sed
87779e7bcd65Smrg    fi
87789e7bcd65Smrg  done
87799e7bcd65Smrgdone
87809e7bcd65Smrg])
87819e7bcd65SmrgSED=$lt_cv_path_SED
87829e7bcd65SmrgAC_SUBST([SED])
87839e7bcd65SmrgAC_MSG_RESULT([$SED])
87849e7bcd65Smrg])#AC_PROG_SED
87859e7bcd65Smrg])#m4_ifndef
87869e7bcd65Smrg
87879e7bcd65Smrg# Old name:
87889e7bcd65SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
87899e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
87909e7bcd65Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
87919e7bcd65Smrg
87929e7bcd65Smrg
87939e7bcd65Smrg# _LT_CHECK_SHELL_FEATURES
87949e7bcd65Smrg# ------------------------
87959e7bcd65Smrg# Find out whether the shell is Bourne or XSI compatible,
87969e7bcd65Smrg# or has some other useful features.
87979e7bcd65Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
87989e7bcd65Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
87999e7bcd65Smrg# Try some XSI features
88009e7bcd65Smrgxsi_shell=no
88019e7bcd65Smrg( _lt_dummy="a/b/c"
88029e7bcd65Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
88039e7bcd65Smrg      = c,a/b,b/c, \
88049e7bcd65Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
88059e7bcd65Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
88069e7bcd65Smrg  && xsi_shell=yes
88079e7bcd65SmrgAC_MSG_RESULT([$xsi_shell])
88089e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
88099e7bcd65Smrg
88109e7bcd65SmrgAC_MSG_CHECKING([whether the shell understands "+="])
88119e7bcd65Smrglt_shell_append=no
88129e7bcd65Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
88139e7bcd65Smrg    >/dev/null 2>&1 \
88149e7bcd65Smrg  && lt_shell_append=yes
88159e7bcd65SmrgAC_MSG_RESULT([$lt_shell_append])
88169e7bcd65Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
88179e7bcd65Smrg
88189e7bcd65Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
88199e7bcd65Smrg  lt_unset=unset
88209e7bcd65Smrgelse
88219e7bcd65Smrg  lt_unset=false
88229e7bcd65Smrgfi
88239e7bcd65Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
88249e7bcd65Smrg
88259e7bcd65Smrg# test EBCDIC or ASCII
88269e7bcd65Smrgcase `echo X|tr X '\101'` in
88279e7bcd65Smrg A) # ASCII based system
88289e7bcd65Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
88299e7bcd65Smrg  lt_SP2NL='tr \040 \012'
88309e7bcd65Smrg  lt_NL2SP='tr \015\012 \040\040'
88319e7bcd65Smrg  ;;
88329e7bcd65Smrg *) # EBCDIC based system
88339e7bcd65Smrg  lt_SP2NL='tr \100 \n'
88349e7bcd65Smrg  lt_NL2SP='tr \r\n \100\100'
88359e7bcd65Smrg  ;;
88369e7bcd65Smrgesac
88379e7bcd65Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
88389e7bcd65Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
88399e7bcd65Smrg])# _LT_CHECK_SHELL_FEATURES
88409e7bcd65Smrg
88419e7bcd65Smrg
88429e7bcd65Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
88439e7bcd65Smrg# ------------------------------------------------------
88449e7bcd65Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
88459e7bcd65Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
88469e7bcd65Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
88479e7bcd65Smrg[dnl {
88489e7bcd65Smrgsed -e '/^$1 ()$/,/^} # $1 /c\
88499e7bcd65Smrg$1 ()\
88509e7bcd65Smrg{\
88519e7bcd65Smrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
88529e7bcd65Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
88539e7bcd65Smrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
88549e7bcd65Smrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
88559e7bcd65Smrgtest 0 -eq $? || _lt_function_replace_fail=:
88569e7bcd65Smrg])
88579e7bcd65Smrg
88589e7bcd65Smrg
88599e7bcd65Smrg# _LT_PROG_REPLACE_SHELLFNS
88609e7bcd65Smrg# -------------------------
88619e7bcd65Smrg# Replace existing portable implementations of several shell functions with
88629e7bcd65Smrg# equivalent extended shell implementations where those features are available..
88639e7bcd65Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
88649e7bcd65Smrg[if test x"$xsi_shell" = xyes; then
88659e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
88669e7bcd65Smrg    case ${1} in
88679e7bcd65Smrg      */*) func_dirname_result="${1%/*}${2}" ;;
88689e7bcd65Smrg      *  ) func_dirname_result="${3}" ;;
88699e7bcd65Smrg    esac])
88709e7bcd65Smrg
88719e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
88729e7bcd65Smrg    func_basename_result="${1##*/}"])
88739e7bcd65Smrg
88749e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
88759e7bcd65Smrg    case ${1} in
88769e7bcd65Smrg      */*) func_dirname_result="${1%/*}${2}" ;;
88779e7bcd65Smrg      *  ) func_dirname_result="${3}" ;;
88789e7bcd65Smrg    esac
88799e7bcd65Smrg    func_basename_result="${1##*/}"])
88809e7bcd65Smrg
88819e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
88829e7bcd65Smrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
88839e7bcd65Smrg    # positional parameters, so assign one to ordinary parameter first.
88849e7bcd65Smrg    func_stripname_result=${3}
88859e7bcd65Smrg    func_stripname_result=${func_stripname_result#"${1}"}
88869e7bcd65Smrg    func_stripname_result=${func_stripname_result%"${2}"}])
88879e7bcd65Smrg
88889e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
88899e7bcd65Smrg    func_split_long_opt_name=${1%%=*}
88909e7bcd65Smrg    func_split_long_opt_arg=${1#*=}])
88919e7bcd65Smrg
88929e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
88939e7bcd65Smrg    func_split_short_opt_arg=${1#??}
88949e7bcd65Smrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
88959e7bcd65Smrg
88969e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
88979e7bcd65Smrg    case ${1} in
88989e7bcd65Smrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
88999e7bcd65Smrg      *)    func_lo2o_result=${1} ;;
89009e7bcd65Smrg    esac])
89019e7bcd65Smrg
89029e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
89039e7bcd65Smrg
89049e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
89059e7bcd65Smrg
89069e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
89079e7bcd65Smrgfi
89089e7bcd65Smrg
89099e7bcd65Smrgif test x"$lt_shell_append" = xyes; then
89109e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
89119e7bcd65Smrg
89129e7bcd65Smrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
89139e7bcd65Smrg    func_quote_for_eval "${2}"
89149e7bcd65Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
89159e7bcd65Smrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
89169e7bcd65Smrg
89179e7bcd65Smrg  # Save a `func_append' function call where possible by direct use of '+='
89189e7bcd65Smrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
89199e7bcd65Smrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
89209e7bcd65Smrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
89219e7bcd65Smrg  test 0 -eq $? || _lt_function_replace_fail=:
89229e7bcd65Smrgelse
89239e7bcd65Smrg  # Save a `func_append' function call even when '+=' is not available
89249e7bcd65Smrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
89259e7bcd65Smrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
89269e7bcd65Smrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
89279e7bcd65Smrg  test 0 -eq $? || _lt_function_replace_fail=:
89289e7bcd65Smrgfi
89299e7bcd65Smrg
89309e7bcd65Smrgif test x"$_lt_function_replace_fail" = x":"; then
89319e7bcd65Smrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
89329e7bcd65Smrgfi
89339e7bcd65Smrg])
89349e7bcd65Smrg
89359e7bcd65Smrg# _LT_PATH_CONVERSION_FUNCTIONS
89369e7bcd65Smrg# -----------------------------
89379e7bcd65Smrg# Determine which file name conversion functions should be used by
89389e7bcd65Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
89399e7bcd65Smrg# for certain cross-compile configurations and native mingw.
89409e7bcd65Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
89419e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
89429e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
89439e7bcd65SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
89449e7bcd65SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
89459e7bcd65Smrg[case $host in
89469e7bcd65Smrg  *-*-mingw* )
89479e7bcd65Smrg    case $build in
89489e7bcd65Smrg      *-*-mingw* ) # actually msys
89499e7bcd65Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
89509e7bcd65Smrg        ;;
89519e7bcd65Smrg      *-*-cygwin* )
89529e7bcd65Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
89539e7bcd65Smrg        ;;
89549e7bcd65Smrg      * ) # otherwise, assume *nix
89559e7bcd65Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
89569e7bcd65Smrg        ;;
89579e7bcd65Smrg    esac
89589e7bcd65Smrg    ;;
89599e7bcd65Smrg  *-*-cygwin* )
89609e7bcd65Smrg    case $build in
89619e7bcd65Smrg      *-*-mingw* ) # actually msys
89629e7bcd65Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
89639e7bcd65Smrg        ;;
89649e7bcd65Smrg      *-*-cygwin* )
89659e7bcd65Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
89669e7bcd65Smrg        ;;
89679e7bcd65Smrg      * ) # otherwise, assume *nix
89689e7bcd65Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
89699e7bcd65Smrg        ;;
89709e7bcd65Smrg    esac
89719e7bcd65Smrg    ;;
89729e7bcd65Smrg  * ) # unhandled hosts (and "normal" native builds)
89739e7bcd65Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
89749e7bcd65Smrg    ;;
89759e7bcd65Smrgesac
89769e7bcd65Smrg])
89779e7bcd65Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
89789e7bcd65SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
89799e7bcd65Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
89809e7bcd65Smrg         [0], [convert $build file names to $host format])dnl
89819e7bcd65Smrg
89829e7bcd65SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
89839e7bcd65SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
89849e7bcd65Smrg[#assume ordinary cross tools, or native build.
89859e7bcd65Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
89869e7bcd65Smrgcase $host in
89879e7bcd65Smrg  *-*-mingw* )
89889e7bcd65Smrg    case $build in
89899e7bcd65Smrg      *-*-mingw* ) # actually msys
89909e7bcd65Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
89919e7bcd65Smrg        ;;
89929e7bcd65Smrg    esac
89939e7bcd65Smrg    ;;
89949e7bcd65Smrgesac
89959e7bcd65Smrg])
89969e7bcd65Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
89979e7bcd65SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
89989e7bcd65Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
89999e7bcd65Smrg         [0], [convert $build files to toolchain format])dnl
90009e7bcd65Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
90019e7bcd65Smrg
90029e7bcd65Smrg# Helper functions for option handling.                    -*- Autoconf -*-
90039e7bcd65Smrg#
90049e7bcd65Smrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
90059e7bcd65Smrg#   Inc.
90069e7bcd65Smrg#   Written by Gary V. Vaughan, 2004
90079e7bcd65Smrg#
90089e7bcd65Smrg# This file is free software; the Free Software Foundation gives
90099e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without
90109e7bcd65Smrg# modifications, as long as this notice is preserved.
90119e7bcd65Smrg
90129e7bcd65Smrg# serial 7 ltoptions.m4
90139e7bcd65Smrg
90149e7bcd65Smrg# This is to help aclocal find these macros, as it can't see m4_define.
90159e7bcd65SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
90169e7bcd65Smrg
90179e7bcd65Smrg
90189e7bcd65Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
90199e7bcd65Smrg# ------------------------------------------
90209e7bcd65Smrgm4_define([_LT_MANGLE_OPTION],
90219e7bcd65Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
90229e7bcd65Smrg
90239e7bcd65Smrg
90249e7bcd65Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
90259e7bcd65Smrg# ---------------------------------------
90269e7bcd65Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
90279e7bcd65Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
90289e7bcd65Smrg# saved as a flag.
90299e7bcd65Smrgm4_define([_LT_SET_OPTION],
90309e7bcd65Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
90319e7bcd65Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
90329e7bcd65Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
90339e7bcd65Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
90349e7bcd65Smrg])
90359e7bcd65Smrg
90369e7bcd65Smrg
90379e7bcd65Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
90389e7bcd65Smrg# ------------------------------------------------------------
90399e7bcd65Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
90409e7bcd65Smrgm4_define([_LT_IF_OPTION],
90419e7bcd65Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
90429e7bcd65Smrg
90439e7bcd65Smrg
90449e7bcd65Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
90459e7bcd65Smrg# -------------------------------------------------------
90469e7bcd65Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
90479e7bcd65Smrg# are set.
90489e7bcd65Smrgm4_define([_LT_UNLESS_OPTIONS],
90499e7bcd65Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
90509e7bcd65Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
90519e7bcd65Smrg		      [m4_define([$0_found])])])[]dnl
90529e7bcd65Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
90539e7bcd65Smrg])[]dnl
90549e7bcd65Smrg])
90559e7bcd65Smrg
90569e7bcd65Smrg
90579e7bcd65Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
90589e7bcd65Smrg# ----------------------------------------
90599e7bcd65Smrg# OPTION-LIST is a space-separated list of Libtool options associated
90609e7bcd65Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
90619e7bcd65Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
90629e7bcd65Smrg# the unknown option and exit.
90639e7bcd65Smrgm4_defun([_LT_SET_OPTIONS],
90649e7bcd65Smrg[# Set options
90659e7bcd65Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
90669e7bcd65Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
90679e7bcd65Smrg
90689e7bcd65Smrgm4_if([$1],[LT_INIT],[
90699e7bcd65Smrg  dnl
90709e7bcd65Smrg  dnl Simply set some default values (i.e off) if boolean options were not
90719e7bcd65Smrg  dnl specified:
90729e7bcd65Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
90739e7bcd65Smrg  ])
90749e7bcd65Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
90759e7bcd65Smrg  ])
90769e7bcd65Smrg  dnl
90779e7bcd65Smrg  dnl If no reference was made to various pairs of opposing options, then
90789e7bcd65Smrg  dnl we run the default mode handler for the pair.  For example, if neither
90799e7bcd65Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
90809e7bcd65Smrg  dnl archives by default:
90819e7bcd65Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
90829e7bcd65Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
90839e7bcd65Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
90849e7bcd65Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
90859e7bcd65Smrg  		   [_LT_ENABLE_FAST_INSTALL])
90869e7bcd65Smrg  ])
90879e7bcd65Smrg])# _LT_SET_OPTIONS
90889e7bcd65Smrg
90899e7bcd65Smrg
90909e7bcd65Smrg
90919e7bcd65Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
90929e7bcd65Smrg# -----------------------------------------
90939e7bcd65Smrgm4_define([_LT_MANGLE_DEFUN],
90949e7bcd65Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
90959e7bcd65Smrg
90969e7bcd65Smrg
90979e7bcd65Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
90989e7bcd65Smrg# -----------------------------------------------
90999e7bcd65Smrgm4_define([LT_OPTION_DEFINE],
91009e7bcd65Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
91019e7bcd65Smrg])# LT_OPTION_DEFINE
91029e7bcd65Smrg
91039e7bcd65Smrg
91049e7bcd65Smrg# dlopen
91059e7bcd65Smrg# ------
91069e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
91079e7bcd65Smrg])
91089e7bcd65Smrg
91099e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
91109e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
91119e7bcd65SmrgAC_DIAGNOSE([obsolete],
91129e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
91139e7bcd65Smrgput the `dlopen' option into LT_INIT's first parameter.])
91149e7bcd65Smrg])
91159e7bcd65Smrg
91169e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
91179e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
91189e7bcd65Smrg
91199e7bcd65Smrg
91209e7bcd65Smrg# win32-dll
91219e7bcd65Smrg# ---------
91229e7bcd65Smrg# Declare package support for building win32 dll's.
91239e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
91249e7bcd65Smrg[enable_win32_dll=yes
91259e7bcd65Smrg
91269e7bcd65Smrgcase $host in
91279e7bcd65Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
91289e7bcd65Smrg  AC_CHECK_TOOL(AS, as, false)
91299e7bcd65Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
91309e7bcd65Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
91319e7bcd65Smrg  ;;
91329e7bcd65Smrgesac
91339e7bcd65Smrg
91349e7bcd65Smrgtest -z "$AS" && AS=as
91359e7bcd65Smrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
91369e7bcd65Smrg
91379e7bcd65Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
91389e7bcd65Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
91399e7bcd65Smrg
91409e7bcd65Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
91419e7bcd65Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
91429e7bcd65Smrg])# win32-dll
91439e7bcd65Smrg
91449e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
91459e7bcd65Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
91469e7bcd65Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
91479e7bcd65SmrgAC_DIAGNOSE([obsolete],
91489e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
91499e7bcd65Smrgput the `win32-dll' option into LT_INIT's first parameter.])
91509e7bcd65Smrg])
91519e7bcd65Smrg
91529e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
91539e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
91549e7bcd65Smrg
91559e7bcd65Smrg
91569e7bcd65Smrg# _LT_ENABLE_SHARED([DEFAULT])
91579e7bcd65Smrg# ----------------------------
91589e7bcd65Smrg# implement the --enable-shared flag, and supports the `shared' and
91599e7bcd65Smrg# `disable-shared' LT_INIT options.
91609e7bcd65Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
91619e7bcd65Smrgm4_define([_LT_ENABLE_SHARED],
91629e7bcd65Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
91639e7bcd65SmrgAC_ARG_ENABLE([shared],
91649e7bcd65Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
91659e7bcd65Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
91669e7bcd65Smrg    [p=${PACKAGE-default}
91679e7bcd65Smrg    case $enableval in
91689e7bcd65Smrg    yes) enable_shared=yes ;;
91699e7bcd65Smrg    no) enable_shared=no ;;
91709e7bcd65Smrg    *)
91719e7bcd65Smrg      enable_shared=no
91729e7bcd65Smrg      # Look at the argument we got.  We use all the common list separators.
91739e7bcd65Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
91749e7bcd65Smrg      for pkg in $enableval; do
91759e7bcd65Smrg	IFS="$lt_save_ifs"
91769e7bcd65Smrg	if test "X$pkg" = "X$p"; then
91779e7bcd65Smrg	  enable_shared=yes
91789e7bcd65Smrg	fi
91799e7bcd65Smrg      done
91809e7bcd65Smrg      IFS="$lt_save_ifs"
91819e7bcd65Smrg      ;;
91829e7bcd65Smrg    esac],
91839e7bcd65Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
91849e7bcd65Smrg
91859e7bcd65Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
91869e7bcd65Smrg	[Whether or not to build shared libraries])
91879e7bcd65Smrg])# _LT_ENABLE_SHARED
91889e7bcd65Smrg
91899e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
91909e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
91919e7bcd65Smrg
91929e7bcd65Smrg# Old names:
91939e7bcd65SmrgAC_DEFUN([AC_ENABLE_SHARED],
91949e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
91959e7bcd65Smrg])
91969e7bcd65Smrg
91979e7bcd65SmrgAC_DEFUN([AC_DISABLE_SHARED],
91989e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
91999e7bcd65Smrg])
92009e7bcd65Smrg
92019e7bcd65SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
92029e7bcd65SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
92039e7bcd65Smrg
92049e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
92059e7bcd65Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
92069e7bcd65Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
92079e7bcd65Smrg
92089e7bcd65Smrg
92099e7bcd65Smrg
92109e7bcd65Smrg# _LT_ENABLE_STATIC([DEFAULT])
92119e7bcd65Smrg# ----------------------------
92129e7bcd65Smrg# implement the --enable-static flag, and support the `static' and
92139e7bcd65Smrg# `disable-static' LT_INIT options.
92149e7bcd65Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
92159e7bcd65Smrgm4_define([_LT_ENABLE_STATIC],
92169e7bcd65Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
92179e7bcd65SmrgAC_ARG_ENABLE([static],
92189e7bcd65Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
92199e7bcd65Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
92209e7bcd65Smrg    [p=${PACKAGE-default}
92219e7bcd65Smrg    case $enableval in
92229e7bcd65Smrg    yes) enable_static=yes ;;
92239e7bcd65Smrg    no) enable_static=no ;;
92249e7bcd65Smrg    *)
92259e7bcd65Smrg     enable_static=no
92269e7bcd65Smrg      # Look at the argument we got.  We use all the common list separators.
92279e7bcd65Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
92289e7bcd65Smrg      for pkg in $enableval; do
92299e7bcd65Smrg	IFS="$lt_save_ifs"
92309e7bcd65Smrg	if test "X$pkg" = "X$p"; then
92319e7bcd65Smrg	  enable_static=yes
92329e7bcd65Smrg	fi
92339e7bcd65Smrg      done
92349e7bcd65Smrg      IFS="$lt_save_ifs"
92359e7bcd65Smrg      ;;
92369e7bcd65Smrg    esac],
92379e7bcd65Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
92389e7bcd65Smrg
92399e7bcd65Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
92409e7bcd65Smrg	[Whether or not to build static libraries])
92419e7bcd65Smrg])# _LT_ENABLE_STATIC
92429e7bcd65Smrg
92439e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
92449e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
92459e7bcd65Smrg
92469e7bcd65Smrg# Old names:
92479e7bcd65SmrgAC_DEFUN([AC_ENABLE_STATIC],
92489e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
92499e7bcd65Smrg])
92509e7bcd65Smrg
92519e7bcd65SmrgAC_DEFUN([AC_DISABLE_STATIC],
92529e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
92539e7bcd65Smrg])
92549e7bcd65Smrg
92559e7bcd65SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
92569e7bcd65SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
92579e7bcd65Smrg
92589e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
92599e7bcd65Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
92609e7bcd65Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
92619e7bcd65Smrg
92629e7bcd65Smrg
92639e7bcd65Smrg
92649e7bcd65Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
92659e7bcd65Smrg# ----------------------------------
92669e7bcd65Smrg# implement the --enable-fast-install flag, and support the `fast-install'
92679e7bcd65Smrg# and `disable-fast-install' LT_INIT options.
92689e7bcd65Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
92699e7bcd65Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
92709e7bcd65Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
92719e7bcd65SmrgAC_ARG_ENABLE([fast-install],
92729e7bcd65Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
92739e7bcd65Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
92749e7bcd65Smrg    [p=${PACKAGE-default}
92759e7bcd65Smrg    case $enableval in
92769e7bcd65Smrg    yes) enable_fast_install=yes ;;
92779e7bcd65Smrg    no) enable_fast_install=no ;;
92789e7bcd65Smrg    *)
92799e7bcd65Smrg      enable_fast_install=no
92809e7bcd65Smrg      # Look at the argument we got.  We use all the common list separators.
92819e7bcd65Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
92829e7bcd65Smrg      for pkg in $enableval; do
92839e7bcd65Smrg	IFS="$lt_save_ifs"
92849e7bcd65Smrg	if test "X$pkg" = "X$p"; then
92859e7bcd65Smrg	  enable_fast_install=yes
92869e7bcd65Smrg	fi
92879e7bcd65Smrg      done
92889e7bcd65Smrg      IFS="$lt_save_ifs"
92899e7bcd65Smrg      ;;
92909e7bcd65Smrg    esac],
92919e7bcd65Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
92929e7bcd65Smrg
92939e7bcd65Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
92949e7bcd65Smrg	 [Whether or not to optimize for fast installation])dnl
92959e7bcd65Smrg])# _LT_ENABLE_FAST_INSTALL
92969e7bcd65Smrg
92979e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
92989e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
92999e7bcd65Smrg
93009e7bcd65Smrg# Old names:
93019e7bcd65SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
93029e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
93039e7bcd65SmrgAC_DIAGNOSE([obsolete],
93049e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
93059e7bcd65Smrgthe `fast-install' option into LT_INIT's first parameter.])
93069e7bcd65Smrg])
93079e7bcd65Smrg
93089e7bcd65SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
93099e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
93109e7bcd65SmrgAC_DIAGNOSE([obsolete],
93119e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
93129e7bcd65Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
93139e7bcd65Smrg])
93149e7bcd65Smrg
93159e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
93169e7bcd65Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
93179e7bcd65Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
93189e7bcd65Smrg
93199e7bcd65Smrg
93209e7bcd65Smrg# _LT_WITH_PIC([MODE])
93219e7bcd65Smrg# --------------------
93229e7bcd65Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
93239e7bcd65Smrg# LT_INIT options.
93249e7bcd65Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
93259e7bcd65Smrgm4_define([_LT_WITH_PIC],
93269e7bcd65Smrg[AC_ARG_WITH([pic],
93279e7bcd65Smrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
93289e7bcd65Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
93299e7bcd65Smrg    [lt_p=${PACKAGE-default}
93309e7bcd65Smrg    case $withval in
93319e7bcd65Smrg    yes|no) pic_mode=$withval ;;
93329e7bcd65Smrg    *)
93339e7bcd65Smrg      pic_mode=default
93349e7bcd65Smrg      # Look at the argument we got.  We use all the common list separators.
93359e7bcd65Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
93369e7bcd65Smrg      for lt_pkg in $withval; do
93379e7bcd65Smrg	IFS="$lt_save_ifs"
93389e7bcd65Smrg	if test "X$lt_pkg" = "X$lt_p"; then
93399e7bcd65Smrg	  pic_mode=yes
93409e7bcd65Smrg	fi
93419e7bcd65Smrg      done
93429e7bcd65Smrg      IFS="$lt_save_ifs"
93439e7bcd65Smrg      ;;
93449e7bcd65Smrg    esac],
93459e7bcd65Smrg    [pic_mode=default])
93469e7bcd65Smrg
93479e7bcd65Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
93489e7bcd65Smrg
93499e7bcd65Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
93509e7bcd65Smrg])# _LT_WITH_PIC
93519e7bcd65Smrg
93529e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
93539e7bcd65SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
93549e7bcd65Smrg
93559e7bcd65Smrg# Old name:
93569e7bcd65SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
93579e7bcd65Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
93589e7bcd65SmrgAC_DIAGNOSE([obsolete],
93599e7bcd65Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
93609e7bcd65Smrgput the `pic-only' option into LT_INIT's first parameter.])
93619e7bcd65Smrg])
93629e7bcd65Smrg
93639e7bcd65Smrgdnl aclocal-1.4 backwards compatibility:
93649e7bcd65Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
93659e7bcd65Smrg
93669e7bcd65Smrg
93679e7bcd65Smrgm4_define([_LTDL_MODE], [])
93689e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
93699e7bcd65Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
93709e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
93719e7bcd65Smrg		 [m4_define([_LTDL_MODE], [recursive])])
93729e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
93739e7bcd65Smrg		 [m4_define([_LTDL_MODE], [subproject])])
93749e7bcd65Smrg
93759e7bcd65Smrgm4_define([_LTDL_TYPE], [])
93769e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
93779e7bcd65Smrg		 [m4_define([_LTDL_TYPE], [installable])])
93789e7bcd65SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
93799e7bcd65Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
93809e7bcd65Smrg
93819e7bcd65Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
93829e7bcd65Smrg#
93839e7bcd65Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
93849e7bcd65Smrg# Written by Gary V. Vaughan, 2004
93859e7bcd65Smrg#
93869e7bcd65Smrg# This file is free software; the Free Software Foundation gives
93879e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without
93889e7bcd65Smrg# modifications, as long as this notice is preserved.
93899e7bcd65Smrg
93909e7bcd65Smrg# serial 6 ltsugar.m4
93919e7bcd65Smrg
93929e7bcd65Smrg# This is to help aclocal find these macros, as it can't see m4_define.
93939e7bcd65SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
93949e7bcd65Smrg
93959e7bcd65Smrg
93969e7bcd65Smrg# lt_join(SEP, ARG1, [ARG2...])
93979e7bcd65Smrg# -----------------------------
93989e7bcd65Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
93999e7bcd65Smrg# associated separator.
94009e7bcd65Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
94019e7bcd65Smrg# versions in m4sugar had bugs.
94029e7bcd65Smrgm4_define([lt_join],
94039e7bcd65Smrg[m4_if([$#], [1], [],
94049e7bcd65Smrg       [$#], [2], [[$2]],
94059e7bcd65Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
94069e7bcd65Smrgm4_define([_lt_join],
94079e7bcd65Smrg[m4_if([$#$2], [2], [],
94089e7bcd65Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
94099e7bcd65Smrg
94109e7bcd65Smrg
94119e7bcd65Smrg# lt_car(LIST)
94129e7bcd65Smrg# lt_cdr(LIST)
94139e7bcd65Smrg# ------------
94149e7bcd65Smrg# Manipulate m4 lists.
94159e7bcd65Smrg# These macros are necessary as long as will still need to support
94169e7bcd65Smrg# Autoconf-2.59 which quotes differently.
94179e7bcd65Smrgm4_define([lt_car], [[$1]])
94189e7bcd65Smrgm4_define([lt_cdr],
94199e7bcd65Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
94209e7bcd65Smrg       [$#], 1, [],
94219e7bcd65Smrg       [m4_dquote(m4_shift($@))])])
94229e7bcd65Smrgm4_define([lt_unquote], $1)
94239e7bcd65Smrg
94249e7bcd65Smrg
94259e7bcd65Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
94269e7bcd65Smrg# ------------------------------------------
94279e7bcd65Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
94289e7bcd65Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
94299e7bcd65Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
94309e7bcd65Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
94319e7bcd65Smrg# than defined and empty).
94329e7bcd65Smrg#
94339e7bcd65Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
94349e7bcd65Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
94359e7bcd65Smrgm4_define([lt_append],
94369e7bcd65Smrg[m4_define([$1],
94379e7bcd65Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
94389e7bcd65Smrg
94399e7bcd65Smrg
94409e7bcd65Smrg
94419e7bcd65Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
94429e7bcd65Smrg# ----------------------------------------------------------
94439e7bcd65Smrg# Produce a SEP delimited list of all paired combinations of elements of
94449e7bcd65Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
94459e7bcd65Smrg# has the form PREFIXmINFIXSUFFIXn.
94469e7bcd65Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
94479e7bcd65Smrgm4_define([lt_combine],
94489e7bcd65Smrg[m4_if(m4_eval([$# > 3]), [1],
94499e7bcd65Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
94509e7bcd65Smrg[[m4_foreach([_Lt_prefix], [$2],
94519e7bcd65Smrg	     [m4_foreach([_Lt_suffix],
94529e7bcd65Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
94539e7bcd65Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
94549e7bcd65Smrg
94559e7bcd65Smrg
94569e7bcd65Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
94579e7bcd65Smrg# -----------------------------------------------------------------------
94589e7bcd65Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
94599e7bcd65Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
94609e7bcd65Smrgm4_define([lt_if_append_uniq],
94619e7bcd65Smrg[m4_ifdef([$1],
94629e7bcd65Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
94639e7bcd65Smrg		 [lt_append([$1], [$2], [$3])$4],
94649e7bcd65Smrg		 [$5])],
94659e7bcd65Smrg	  [lt_append([$1], [$2], [$3])$4])])
94669e7bcd65Smrg
94679e7bcd65Smrg
94689e7bcd65Smrg# lt_dict_add(DICT, KEY, VALUE)
94699e7bcd65Smrg# -----------------------------
94709e7bcd65Smrgm4_define([lt_dict_add],
94719e7bcd65Smrg[m4_define([$1($2)], [$3])])
94729e7bcd65Smrg
94739e7bcd65Smrg
94749e7bcd65Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94759e7bcd65Smrg# --------------------------------------------
94769e7bcd65Smrgm4_define([lt_dict_add_subkey],
94779e7bcd65Smrg[m4_define([$1($2:$3)], [$4])])
94789e7bcd65Smrg
94799e7bcd65Smrg
94809e7bcd65Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
94819e7bcd65Smrg# ----------------------------------
94829e7bcd65Smrgm4_define([lt_dict_fetch],
94839e7bcd65Smrg[m4_ifval([$3],
94849e7bcd65Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
94859e7bcd65Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
94869e7bcd65Smrg
94879e7bcd65Smrg
94889e7bcd65Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
94899e7bcd65Smrg# -----------------------------------------------------------------
94909e7bcd65Smrgm4_define([lt_if_dict_fetch],
94919e7bcd65Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
94929e7bcd65Smrg	[$5],
94939e7bcd65Smrg    [$6])])
94949e7bcd65Smrg
94959e7bcd65Smrg
94969e7bcd65Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
94979e7bcd65Smrg# --------------------------------------------------------------
94989e7bcd65Smrgm4_define([lt_dict_filter],
94999e7bcd65Smrg[m4_if([$5], [], [],
95009e7bcd65Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
95019e7bcd65Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
95029e7bcd65Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
95039e7bcd65Smrg])
95049e7bcd65Smrg
95059e7bcd65Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
95069e7bcd65Smrg#
95079e7bcd65Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
95089e7bcd65Smrg#   Written by Scott James Remnant, 2004
95099e7bcd65Smrg#
95109e7bcd65Smrg# This file is free software; the Free Software Foundation gives
95119e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without
95129e7bcd65Smrg# modifications, as long as this notice is preserved.
95139e7bcd65Smrg
95149e7bcd65Smrg# @configure_input@
95159e7bcd65Smrg
95169e7bcd65Smrg# serial 3337 ltversion.m4
95179e7bcd65Smrg# This file is part of GNU Libtool
95189e7bcd65Smrg
95199e7bcd65Smrgm4_define([LT_PACKAGE_VERSION], [2.4.2])
95209e7bcd65Smrgm4_define([LT_PACKAGE_REVISION], [1.3337])
95219e7bcd65Smrg
95229e7bcd65SmrgAC_DEFUN([LTVERSION_VERSION],
95239e7bcd65Smrg[macro_version='2.4.2'
95249e7bcd65Smrgmacro_revision='1.3337'
95259e7bcd65Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
95269e7bcd65Smrg_LT_DECL(, macro_revision, 0)
95279e7bcd65Smrg])
95289e7bcd65Smrg
95299e7bcd65Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
95309e7bcd65Smrg#
95319e7bcd65Smrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
95329e7bcd65Smrg#   Written by Scott James Remnant, 2004.
95339e7bcd65Smrg#
95349e7bcd65Smrg# This file is free software; the Free Software Foundation gives
95359e7bcd65Smrg# unlimited permission to copy and/or distribute it, with or without
95369e7bcd65Smrg# modifications, as long as this notice is preserved.
95379e7bcd65Smrg
95389e7bcd65Smrg# serial 5 lt~obsolete.m4
95399e7bcd65Smrg
95409e7bcd65Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
95419e7bcd65Smrg#
95429e7bcd65Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
95439e7bcd65Smrg# which have later been changed to m4_define as they aren't part of the
95449e7bcd65Smrg# exported API, or moved to Autoconf or Automake where they belong.
95459e7bcd65Smrg#
95469e7bcd65Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
95479e7bcd65Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
95489e7bcd65Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
95499e7bcd65Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
95509e7bcd65Smrg# and doesn't know about Autoconf macros at all.)
95519e7bcd65Smrg#
95529e7bcd65Smrg# So we provide this file, which has a silly filename so it's always
95539e7bcd65Smrg# included after everything else.  This provides aclocal with the
95549e7bcd65Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
95559e7bcd65Smrg# because those macros already exist, or will be overwritten later.
95569e7bcd65Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
95579e7bcd65Smrg#
95589e7bcd65Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
95599e7bcd65Smrg# Yes, that means every name once taken will need to remain here until
95609e7bcd65Smrg# we give up compatibility with versions before 1.7, at which point
95619e7bcd65Smrg# we need to keep only those names which we still refer to.
95629e7bcd65Smrg
95639e7bcd65Smrg# This is to help aclocal find these macros, as it can't see m4_define.
95649e7bcd65SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
95659e7bcd65Smrg
95669e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
95679e7bcd65Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
95689e7bcd65Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
95699e7bcd65Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
95709e7bcd65Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
95719e7bcd65Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
95729e7bcd65Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
95739e7bcd65Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
95749e7bcd65Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
95759e7bcd65Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
95769e7bcd65Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
95779e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
95789e7bcd65Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
95799e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
95809e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
95819e7bcd65Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
95829e7bcd65Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
95839e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
95849e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
95859e7bcd65Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
95869e7bcd65Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
95879e7bcd65Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
95889e7bcd65Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
95899e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
95909e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
95919e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
95929e7bcd65Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
95939e7bcd65Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
95949e7bcd65Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
95959e7bcd65Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
95969e7bcd65Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
95979e7bcd65Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
95989e7bcd65Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
95999e7bcd65Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
96009e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
96019e7bcd65Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
96029e7bcd65Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
96039e7bcd65Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
96049e7bcd65Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
96059e7bcd65Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
96069e7bcd65Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
96079e7bcd65Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
96089e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
96099e7bcd65Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
96109e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
96119e7bcd65Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
96129e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
96139e7bcd65Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
96149e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
96159e7bcd65Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
96169e7bcd65Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
96179e7bcd65Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
96189e7bcd65Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
96199e7bcd65Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
96209e7bcd65Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
96219e7bcd65Smrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
96229e7bcd65Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
96239e7bcd65Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
96249e7bcd65Smrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
96259e7bcd65Smrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
96269e7bcd65Smrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
96279e7bcd65Smrg
96289e7bcd65Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
96299e7bcd65Smrg# 
96309e7bcd65Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
96319e7bcd65Smrg#
96329e7bcd65Smrg# This program is free software; you can redistribute it and/or modify
96339e7bcd65Smrg# it under the terms of the GNU General Public License as published by
96349e7bcd65Smrg# the Free Software Foundation; either version 2 of the License, or
96359e7bcd65Smrg# (at your option) any later version.
96369e7bcd65Smrg#
96379e7bcd65Smrg# This program is distributed in the hope that it will be useful, but
96389e7bcd65Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
96399e7bcd65Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
96409e7bcd65Smrg# General Public License for more details.
96419e7bcd65Smrg#
96429e7bcd65Smrg# You should have received a copy of the GNU General Public License
96439e7bcd65Smrg# along with this program; if not, write to the Free Software
96449e7bcd65Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
96459e7bcd65Smrg#
96469e7bcd65Smrg# As a special exception to the GNU General Public License, if you
96479e7bcd65Smrg# distribute this file as part of a program that contains a
96489e7bcd65Smrg# configuration script generated by Autoconf, you may include it under
96499e7bcd65Smrg# the same distribution terms that you use for the rest of that program.
96509e7bcd65Smrg
96519e7bcd65Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
96529e7bcd65Smrg# ----------------------------------
96539e7bcd65SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
96549e7bcd65Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
96559e7bcd65Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
96569e7bcd65SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
96579e7bcd65Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
96589e7bcd65Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
96599e7bcd65Smrgfi
96609e7bcd65Smrgif test -n "$PKG_CONFIG"; then
96619e7bcd65Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
96629e7bcd65Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
96639e7bcd65Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
96649e7bcd65Smrg		AC_MSG_RESULT([yes])
96659e7bcd65Smrg	else
96669e7bcd65Smrg		AC_MSG_RESULT([no])
96679e7bcd65Smrg		PKG_CONFIG=""
96689e7bcd65Smrg	fi
96699e7bcd65Smrg		
96709e7bcd65Smrgfi[]dnl
96719e7bcd65Smrg])# PKG_PROG_PKG_CONFIG
96729e7bcd65Smrg
96739e7bcd65Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
96749e7bcd65Smrg#
96759e7bcd65Smrg# Check to see whether a particular set of modules exists.  Similar
96769e7bcd65Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
96779e7bcd65Smrg#
96789e7bcd65Smrg#
96799e7bcd65Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
96809e7bcd65Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
96819e7bcd65Smrg# PKG_CHECK_EXISTS manually
96829e7bcd65Smrg# --------------------------------------------------------------
96839e7bcd65SmrgAC_DEFUN([PKG_CHECK_EXISTS],
96849e7bcd65Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
96859e7bcd65Smrgif test -n "$PKG_CONFIG" && \
96869e7bcd65Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
96879e7bcd65Smrg  m4_ifval([$2], [$2], [:])
96889e7bcd65Smrgm4_ifvaln([$3], [else
96899e7bcd65Smrg  $3])dnl
96909e7bcd65Smrgfi])
96919e7bcd65Smrg
96929e7bcd65Smrg
96939e7bcd65Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
96949e7bcd65Smrg# ---------------------------------------------
96959e7bcd65Smrgm4_define([_PKG_CONFIG],
96969e7bcd65Smrg[if test -n "$$1"; then
96979e7bcd65Smrg    pkg_cv_[]$1="$$1"
96989e7bcd65Smrg elif test -n "$PKG_CONFIG"; then
96999e7bcd65Smrg    PKG_CHECK_EXISTS([$3],
97009e7bcd65Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
97019e7bcd65Smrg		     [pkg_failed=yes])
97029e7bcd65Smrg else
97039e7bcd65Smrg    pkg_failed=untried
97049e7bcd65Smrgfi[]dnl
97059e7bcd65Smrg])# _PKG_CONFIG
97069e7bcd65Smrg
97079e7bcd65Smrg# _PKG_SHORT_ERRORS_SUPPORTED
97089e7bcd65Smrg# -----------------------------
97099e7bcd65SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
97109e7bcd65Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
97119e7bcd65Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
97129e7bcd65Smrg        _pkg_short_errors_supported=yes
97139e7bcd65Smrgelse
97149e7bcd65Smrg        _pkg_short_errors_supported=no
97159e7bcd65Smrgfi[]dnl
97169e7bcd65Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
97179e7bcd65Smrg
97189e7bcd65Smrg
97199e7bcd65Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
97209e7bcd65Smrg# [ACTION-IF-NOT-FOUND])
97219e7bcd65Smrg#
97229e7bcd65Smrg#
97239e7bcd65Smrg# Note that if there is a possibility the first call to
97249e7bcd65Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
97259e7bcd65Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
97269e7bcd65Smrg#
97279e7bcd65Smrg#
97289e7bcd65Smrg# --------------------------------------------------------------
97299e7bcd65SmrgAC_DEFUN([PKG_CHECK_MODULES],
97309e7bcd65Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
97319e7bcd65SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
97329e7bcd65SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
97339e7bcd65Smrg
97349e7bcd65Smrgpkg_failed=no
97359e7bcd65SmrgAC_MSG_CHECKING([for $1])
97369e7bcd65Smrg
97379e7bcd65Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
97389e7bcd65Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
97399e7bcd65Smrg
97409e7bcd65Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
97419e7bcd65Smrgand $1[]_LIBS to avoid the need to call pkg-config.
97429e7bcd65SmrgSee the pkg-config man page for more details.])
97439e7bcd65Smrg
97449e7bcd65Smrgif test $pkg_failed = yes; then
97459e7bcd65Smrg        _PKG_SHORT_ERRORS_SUPPORTED
97469e7bcd65Smrg        if test $_pkg_short_errors_supported = yes; then
97479e7bcd65Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
97489e7bcd65Smrg        else 
97499e7bcd65Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
97509e7bcd65Smrg        fi
97519e7bcd65Smrg	# Put the nasty error message in config.log where it belongs
97529e7bcd65Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
97539e7bcd65Smrg
97549e7bcd65Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
97559e7bcd65Smrg[Package requirements ($2) were not met:
97569e7bcd65Smrg
97579e7bcd65Smrg$$1_PKG_ERRORS
97589e7bcd65Smrg
97599e7bcd65SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
97609e7bcd65Smrginstalled software in a non-standard prefix.
97619e7bcd65Smrg
97629e7bcd65Smrg_PKG_TEXT
97639e7bcd65Smrg])],
97649e7bcd65Smrg		[AC_MSG_RESULT([no])
97659e7bcd65Smrg                $4])
97669e7bcd65Smrgelif test $pkg_failed = untried; then
97679e7bcd65Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
97689e7bcd65Smrg[The pkg-config script could not be found or is too old.  Make sure it
97699e7bcd65Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
97709e7bcd65Smrgpath to pkg-config.
97719e7bcd65Smrg
97729e7bcd65Smrg_PKG_TEXT
97739e7bcd65Smrg
97749e7bcd65SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
97759e7bcd65Smrg		[$4])
97769e7bcd65Smrgelse
97779e7bcd65Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
97789e7bcd65Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
97799e7bcd65Smrg        AC_MSG_RESULT([yes])
97809e7bcd65Smrg	ifelse([$3], , :, [$3])
97819e7bcd65Smrgfi[]dnl
97829e7bcd65Smrg])# PKG_CHECK_MODULES
97839e7bcd65Smrg
97849e7bcd65Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
97859e7bcd65Smrgdnl
97869e7bcd65Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
97879e7bcd65Smrgdnl 
97889e7bcd65Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
97899e7bcd65Smrgdnl copy of this software and associated documentation files (the "Software"),
97909e7bcd65Smrgdnl to deal in the Software without restriction, including without limitation
97919e7bcd65Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
97929e7bcd65Smrgdnl and/or sell copies of the Software, and to permit persons to whom the
97939e7bcd65Smrgdnl Software is furnished to do so, subject to the following conditions:
97949e7bcd65Smrgdnl
97959e7bcd65Smrgdnl The above copyright notice and this permission notice (including the next
97969e7bcd65Smrgdnl paragraph) shall be included in all copies or substantial portions of the
97979e7bcd65Smrgdnl Software.
97989e7bcd65Smrgdnl
97999e7bcd65Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
98009e7bcd65Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
98019e7bcd65Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
98029e7bcd65Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
98039e7bcd65Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
98049e7bcd65Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
98059e7bcd65Smrgdnl DEALINGS IN THE SOFTWARE.
98069e7bcd65Smrg
98079e7bcd65Smrg# XORG_MACROS_VERSION(required-version)
98089e7bcd65Smrg# -------------------------------------
98099e7bcd65Smrg# Minimum version: 1.1.0
98109e7bcd65Smrg#
98119e7bcd65Smrg# If you're using a macro added in Version 1.1 or newer, include this in
98129e7bcd65Smrg# your configure.ac with the minimum required version, such as:
98139e7bcd65Smrg# XORG_MACROS_VERSION(1.1)
98149e7bcd65Smrg#
98159e7bcd65Smrg# To ensure that this macro is defined, also add:
98169e7bcd65Smrg# m4_ifndef([XORG_MACROS_VERSION],
98179e7bcd65Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
98189e7bcd65Smrg#
98199e7bcd65Smrg#
98209e7bcd65Smrg# See the "minimum version" comment for each macro you use to see what 
98219e7bcd65Smrg# version you require.
98229e7bcd65Smrgm4_defun([XORG_MACROS_VERSION],[
98239e7bcd65Smrgm4_define([vers_have], [1.17])
98249e7bcd65Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
98259e7bcd65Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
98269e7bcd65Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
98279e7bcd65Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
98289e7bcd65Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
98299e7bcd65Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
98309e7bcd65Smrgm4_undefine([vers_have])
98319e7bcd65Smrgm4_undefine([maj_have])
98329e7bcd65Smrgm4_undefine([maj_needed])
98339e7bcd65Smrg]) # XORG_MACROS_VERSION
98349e7bcd65Smrg
98359e7bcd65Smrg# XORG_PROG_RAWCPP()
98369e7bcd65Smrg# ------------------
98379e7bcd65Smrg# Minimum version: 1.0.0
98389e7bcd65Smrg#
98399e7bcd65Smrg# Find cpp program and necessary flags for use in pre-processing text files
98409e7bcd65Smrg# such as man pages and config files
98419e7bcd65SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
98429e7bcd65SmrgAC_REQUIRE([AC_PROG_CPP])
98439e7bcd65SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
98449e7bcd65Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
98459e7bcd65Smrg
98469e7bcd65Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
98479e7bcd65Smrg# which is not the best choice for supporting other OS'es, but covers most
98489e7bcd65Smrg# of the ones we need for now.
98499e7bcd65SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
98509e7bcd65SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
98519e7bcd65Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
98529e7bcd65Smrg	AC_MSG_RESULT([no])
98539e7bcd65Smrgelse
98549e7bcd65Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
98559e7bcd65Smrg		RAWCPPFLAGS=-undef
98569e7bcd65Smrg		AC_MSG_RESULT([yes])
98579e7bcd65Smrg	# under Cygwin unix is still defined even with -undef
98589e7bcd65Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
98599e7bcd65Smrg		RAWCPPFLAGS="-undef -ansi"
98609e7bcd65Smrg		AC_MSG_RESULT([yes, with -ansi])
98619e7bcd65Smrg	else
98629e7bcd65Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
98639e7bcd65Smrg	fi
98649e7bcd65Smrgfi
98659e7bcd65Smrgrm -f conftest.$ac_ext
98669e7bcd65Smrg
98679e7bcd65SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
98689e7bcd65SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
98699e7bcd65Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
98709e7bcd65Smrg	AC_MSG_RESULT([no])
98719e7bcd65Smrgelse
98729e7bcd65Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
98739e7bcd65Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
98749e7bcd65Smrg		AC_MSG_RESULT([yes])
98759e7bcd65Smrg	else
98769e7bcd65Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
98779e7bcd65Smrg	fi
98789e7bcd65Smrgfi
98799e7bcd65Smrgrm -f conftest.$ac_ext
98809e7bcd65SmrgAC_SUBST(RAWCPPFLAGS)
98819e7bcd65Smrg]) # XORG_PROG_RAWCPP
98829e7bcd65Smrg
98839e7bcd65Smrg# XORG_MANPAGE_SECTIONS()
98849e7bcd65Smrg# -----------------------
98859e7bcd65Smrg# Minimum version: 1.0.0
98869e7bcd65Smrg#
98879e7bcd65Smrg# Determine which sections man pages go in for the different man page types
98889e7bcd65Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
98899e7bcd65Smrg# Not sure if there's any better way than just hardcoding by OS name.
98909e7bcd65Smrg# Override default settings by setting environment variables
98919e7bcd65Smrg# Added MAN_SUBSTS in version 1.8
98929e7bcd65Smrg# Added AC_PROG_SED in version 1.8
98939e7bcd65Smrg
98949e7bcd65SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
98959e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_HOST])
98969e7bcd65SmrgAC_REQUIRE([AC_PROG_SED])
98979e7bcd65Smrg
98989e7bcd65Smrgif test x$APP_MAN_SUFFIX = x    ; then
98999e7bcd65Smrg    APP_MAN_SUFFIX=1
99009e7bcd65Smrgfi
99019e7bcd65Smrgif test x$APP_MAN_DIR = x    ; then
99029e7bcd65Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
99039e7bcd65Smrgfi
99049e7bcd65Smrg
99059e7bcd65Smrgif test x$LIB_MAN_SUFFIX = x    ; then
99069e7bcd65Smrg    LIB_MAN_SUFFIX=3
99079e7bcd65Smrgfi
99089e7bcd65Smrgif test x$LIB_MAN_DIR = x    ; then
99099e7bcd65Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
99109e7bcd65Smrgfi
99119e7bcd65Smrg
99129e7bcd65Smrgif test x$FILE_MAN_SUFFIX = x    ; then
99139e7bcd65Smrg    case $host_os in
99149e7bcd65Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
99159e7bcd65Smrg	*)		FILE_MAN_SUFFIX=5  ;;
99169e7bcd65Smrg    esac
99179e7bcd65Smrgfi
99189e7bcd65Smrgif test x$FILE_MAN_DIR = x    ; then
99199e7bcd65Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
99209e7bcd65Smrgfi
99219e7bcd65Smrg
99229e7bcd65Smrgif test x$MISC_MAN_SUFFIX = x    ; then
99239e7bcd65Smrg    case $host_os in
99249e7bcd65Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
99259e7bcd65Smrg	*)		MISC_MAN_SUFFIX=7  ;;
99269e7bcd65Smrg    esac
99279e7bcd65Smrgfi
99289e7bcd65Smrgif test x$MISC_MAN_DIR = x    ; then
99299e7bcd65Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
99309e7bcd65Smrgfi
99319e7bcd65Smrg
99329e7bcd65Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
99339e7bcd65Smrg    case $host_os in
99349e7bcd65Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
99359e7bcd65Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
99369e7bcd65Smrg    esac
99379e7bcd65Smrgfi
99389e7bcd65Smrgif test x$DRIVER_MAN_DIR = x    ; then
99399e7bcd65Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
99409e7bcd65Smrgfi
99419e7bcd65Smrg
99429e7bcd65Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
99439e7bcd65Smrg    case $host_os in
99449e7bcd65Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
99459e7bcd65Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
99469e7bcd65Smrg    esac
99479e7bcd65Smrgfi
99489e7bcd65Smrgif test x$ADMIN_MAN_DIR = x    ; then
99499e7bcd65Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
99509e7bcd65Smrgfi
99519e7bcd65Smrg
99529e7bcd65Smrg
99539e7bcd65SmrgAC_SUBST([APP_MAN_SUFFIX])
99549e7bcd65SmrgAC_SUBST([LIB_MAN_SUFFIX])
99559e7bcd65SmrgAC_SUBST([FILE_MAN_SUFFIX])
99569e7bcd65SmrgAC_SUBST([MISC_MAN_SUFFIX])
99579e7bcd65SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
99589e7bcd65SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
99599e7bcd65SmrgAC_SUBST([APP_MAN_DIR])
99609e7bcd65SmrgAC_SUBST([LIB_MAN_DIR])
99619e7bcd65SmrgAC_SUBST([FILE_MAN_DIR])
99629e7bcd65SmrgAC_SUBST([MISC_MAN_DIR])
99639e7bcd65SmrgAC_SUBST([DRIVER_MAN_DIR])
99649e7bcd65SmrgAC_SUBST([ADMIN_MAN_DIR])
99659e7bcd65Smrg
99669e7bcd65SmrgXORG_MAN_PAGE="X Version 11"
99679e7bcd65SmrgAC_SUBST([XORG_MAN_PAGE])
99689e7bcd65SmrgMAN_SUBSTS="\
99699e7bcd65Smrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
99709e7bcd65Smrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
99719e7bcd65Smrg	-e 's|__xservername__|Xorg|g' \
99729e7bcd65Smrg	-e 's|__xconfigfile__|xorg.conf|g' \
99739e7bcd65Smrg	-e 's|__projectroot__|\$(prefix)|g' \
99749e7bcd65Smrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
99759e7bcd65Smrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
99769e7bcd65Smrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
99779e7bcd65Smrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
99789e7bcd65Smrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
99799e7bcd65Smrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
99809e7bcd65Smrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
99819e7bcd65SmrgAC_SUBST([MAN_SUBSTS])
99829e7bcd65Smrg
99839e7bcd65Smrg]) # XORG_MANPAGE_SECTIONS
99849e7bcd65Smrg
99859e7bcd65Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
99869e7bcd65Smrg# ------------------------
99879e7bcd65Smrg# Minimum version: 1.7.0
99889e7bcd65Smrg#
99899e7bcd65Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
99909e7bcd65Smrg# provided by xorg-sgml-doctools, if installed.
99919e7bcd65SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
99929e7bcd65SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
99939e7bcd65SmrgXORG_SGML_PATH=
99949e7bcd65SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
99959e7bcd65Smrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
99969e7bcd65Smrg    [m4_ifval([$1],[:],
99979e7bcd65Smrg        [if test x"$cross_compiling" != x"yes" ; then
99989e7bcd65Smrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
99999e7bcd65Smrg                          [XORG_SGML_PATH=$prefix/share/sgml])
100009e7bcd65Smrg         fi])
100019e7bcd65Smrg    ])
100029e7bcd65Smrg
100039e7bcd65Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
100049e7bcd65Smrg# the path and the name of the doc stylesheet
100059e7bcd65Smrgif test "x$XORG_SGML_PATH" != "x" ; then
100069e7bcd65Smrg   AC_MSG_RESULT([$XORG_SGML_PATH])
100079e7bcd65Smrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
100089e7bcd65Smrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
100099e7bcd65Smrgelse
100109e7bcd65Smrg   AC_MSG_RESULT([no])
100119e7bcd65Smrgfi
100129e7bcd65Smrg
100139e7bcd65SmrgAC_SUBST(XORG_SGML_PATH)
100149e7bcd65SmrgAC_SUBST(STYLESHEET_SRCDIR)
100159e7bcd65SmrgAC_SUBST(XSL_STYLESHEET)
100169e7bcd65SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
100179e7bcd65Smrg]) # XORG_CHECK_SGML_DOCTOOLS
100189e7bcd65Smrg
100199e7bcd65Smrg# XORG_CHECK_LINUXDOC
100209e7bcd65Smrg# -------------------
100219e7bcd65Smrg# Minimum version: 1.0.0
100229e7bcd65Smrg#
100239e7bcd65Smrg# Defines the variable MAKE_TEXT if the necessary tools and
100249e7bcd65Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
100259e7bcd65Smrg# Whether or not the necessary tools and files are found can be checked
100269e7bcd65Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
100279e7bcd65SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
100289e7bcd65SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
100299e7bcd65SmrgAC_REQUIRE([XORG_WITH_PS2PDF])
100309e7bcd65Smrg
100319e7bcd65SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
100329e7bcd65Smrg
100339e7bcd65SmrgAC_MSG_CHECKING([whether to build documentation])
100349e7bcd65Smrg
100359e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
100369e7bcd65Smrg   BUILDDOC=yes
100379e7bcd65Smrgelse
100389e7bcd65Smrg   BUILDDOC=no
100399e7bcd65Smrgfi
100409e7bcd65Smrg
100419e7bcd65SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
100429e7bcd65Smrg
100439e7bcd65SmrgAC_MSG_RESULT([$BUILDDOC])
100449e7bcd65Smrg
100459e7bcd65SmrgAC_MSG_CHECKING([whether to build pdf documentation])
100469e7bcd65Smrg
100479e7bcd65Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
100489e7bcd65Smrg   BUILDPDFDOC=yes
100499e7bcd65Smrgelse
100509e7bcd65Smrg   BUILDPDFDOC=no
100519e7bcd65Smrgfi
100529e7bcd65Smrg
100539e7bcd65SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
100549e7bcd65Smrg
100559e7bcd65SmrgAC_MSG_RESULT([$BUILDPDFDOC])
100569e7bcd65Smrg
100579e7bcd65SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
100589e7bcd65SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
100599e7bcd65SmrgMAKE_PDF="$PS2PDF"
100609e7bcd65SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
100619e7bcd65Smrg
100629e7bcd65SmrgAC_SUBST(MAKE_TEXT)
100639e7bcd65SmrgAC_SUBST(MAKE_PS)
100649e7bcd65SmrgAC_SUBST(MAKE_PDF)
100659e7bcd65SmrgAC_SUBST(MAKE_HTML)
100669e7bcd65Smrg]) # XORG_CHECK_LINUXDOC
100679e7bcd65Smrg
100689e7bcd65Smrg# XORG_CHECK_DOCBOOK
100699e7bcd65Smrg# -------------------
100709e7bcd65Smrg# Minimum version: 1.0.0
100719e7bcd65Smrg#
100729e7bcd65Smrg# Checks for the ability to build output formats from SGML DocBook source.
100739e7bcd65Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
100749e7bcd65Smrg# indicates whether the necessary tools and files are found and, if set,
100759e7bcd65Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
100769e7bcd65SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
100779e7bcd65SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
100789e7bcd65Smrg
100799e7bcd65SmrgBUILDTXTDOC=no
100809e7bcd65SmrgBUILDPDFDOC=no
100819e7bcd65SmrgBUILDPSDOC=no
100829e7bcd65SmrgBUILDHTMLDOC=no
100839e7bcd65Smrg
100849e7bcd65SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
100859e7bcd65SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
100869e7bcd65SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
100879e7bcd65SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
100889e7bcd65Smrg
100899e7bcd65SmrgAC_MSG_CHECKING([whether to build text documentation])
100909e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
100919e7bcd65Smrg   test x$BUILD_TXTDOC != xno; then
100929e7bcd65Smrg	BUILDTXTDOC=yes
100939e7bcd65Smrgfi
100949e7bcd65SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
100959e7bcd65SmrgAC_MSG_RESULT([$BUILDTXTDOC])
100969e7bcd65Smrg
100979e7bcd65SmrgAC_MSG_CHECKING([whether to build PDF documentation])
100989e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
100999e7bcd65Smrg   test x$BUILD_PDFDOC != xno; then
101009e7bcd65Smrg	BUILDPDFDOC=yes
101019e7bcd65Smrgfi
101029e7bcd65SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
101039e7bcd65SmrgAC_MSG_RESULT([$BUILDPDFDOC])
101049e7bcd65Smrg
101059e7bcd65SmrgAC_MSG_CHECKING([whether to build PostScript documentation])
101069e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
101079e7bcd65Smrg   test x$BUILD_PSDOC != xno; then
101089e7bcd65Smrg	BUILDPSDOC=yes
101099e7bcd65Smrgfi
101109e7bcd65SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
101119e7bcd65SmrgAC_MSG_RESULT([$BUILDPSDOC])
101129e7bcd65Smrg
101139e7bcd65SmrgAC_MSG_CHECKING([whether to build HTML documentation])
101149e7bcd65Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
101159e7bcd65Smrg   test x$BUILD_HTMLDOC != xno; then
101169e7bcd65Smrg	BUILDHTMLDOC=yes
101179e7bcd65Smrgfi
101189e7bcd65SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
101199e7bcd65SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
101209e7bcd65Smrg
101219e7bcd65SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
101229e7bcd65SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
101239e7bcd65SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
101249e7bcd65SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
101259e7bcd65Smrg
101269e7bcd65SmrgAC_SUBST(MAKE_TEXT)
101279e7bcd65SmrgAC_SUBST(MAKE_PS)
101289e7bcd65SmrgAC_SUBST(MAKE_PDF)
101299e7bcd65SmrgAC_SUBST(MAKE_HTML)
101309e7bcd65Smrg]) # XORG_CHECK_DOCBOOK
101319e7bcd65Smrg
101329e7bcd65Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
101339e7bcd65Smrg# ----------------
101349e7bcd65Smrg# Minimum version: 1.5.0
101359e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0
101369e7bcd65Smrg#
101379e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes
101389e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the
101399e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
101409e7bcd65Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
101419e7bcd65Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
101429e7bcd65Smrg# --with-xmlto assumes 'auto'.
101439e7bcd65Smrg#
101449e7bcd65Smrg# Interface to module:
101459e7bcd65Smrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
101469e7bcd65Smrg# XMLTO:	returns the path of the xmlto program found
101479e7bcd65Smrg#		returns the path set by the user in the environment
101489e7bcd65Smrg# --with-xmlto:	'yes' user instructs the module to use xmlto
101499e7bcd65Smrg#		'no' user instructs the module not to use xmlto
101509e7bcd65Smrg#
101519e7bcd65Smrg# Added in version 1.10.0
101529e7bcd65Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
101539e7bcd65Smrg#                  xmlto for text output requires either lynx, links, or w3m browsers
101549e7bcd65Smrg#
101559e7bcd65Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
101569e7bcd65Smrg#
101579e7bcd65SmrgAC_DEFUN([XORG_WITH_XMLTO],[
101589e7bcd65SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
101599e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto]))
101609e7bcd65SmrgAC_ARG_WITH(xmlto,
101619e7bcd65Smrg	AS_HELP_STRING([--with-xmlto],
101629e7bcd65Smrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
101639e7bcd65Smrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
101649e7bcd65Smrgm4_undefine([_defopt])
101659e7bcd65Smrg
101669e7bcd65Smrgif test "x$use_xmlto" = x"auto"; then
101679e7bcd65Smrg   AC_PATH_PROG([XMLTO], [xmlto])
101689e7bcd65Smrg   if test "x$XMLTO" = "x"; then
101699e7bcd65Smrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
101709e7bcd65Smrg	have_xmlto=no
101719e7bcd65Smrg   else
101729e7bcd65Smrg        have_xmlto=yes
101739e7bcd65Smrg   fi
101749e7bcd65Smrgelif test "x$use_xmlto" = x"yes" ; then
101759e7bcd65Smrg   AC_PATH_PROG([XMLTO], [xmlto])
101769e7bcd65Smrg   if test "x$XMLTO" = "x"; then
101779e7bcd65Smrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
101789e7bcd65Smrg   fi
101799e7bcd65Smrg   have_xmlto=yes
101809e7bcd65Smrgelif test "x$use_xmlto" = x"no" ; then
101819e7bcd65Smrg   if test "x$XMLTO" != "x"; then
101829e7bcd65Smrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
101839e7bcd65Smrg   fi
101849e7bcd65Smrg   have_xmlto=no
101859e7bcd65Smrgelse
101869e7bcd65Smrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
101879e7bcd65Smrgfi
101889e7bcd65Smrg
101899e7bcd65Smrg# Test for a minimum version of xmlto, if provided.
101909e7bcd65Smrgm4_ifval([$1],
101919e7bcd65Smrg[if test "$have_xmlto" = yes; then
101929e7bcd65Smrg    # scrape the xmlto version
101939e7bcd65Smrg    AC_MSG_CHECKING([the xmlto version])
101949e7bcd65Smrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
101959e7bcd65Smrg    AC_MSG_RESULT([$xmlto_version])
101969e7bcd65Smrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
101979e7bcd65Smrg        [if test "x$use_xmlto" = xauto; then
101989e7bcd65Smrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
101999e7bcd65Smrg            have_xmlto=no
102009e7bcd65Smrg        else
102019e7bcd65Smrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
102029e7bcd65Smrg        fi])
102039e7bcd65Smrgfi])
102049e7bcd65Smrg
102059e7bcd65Smrg# Test for the ability of xmlto to generate a text target
102069e7bcd65Smrghave_xmlto_text=no
102079e7bcd65Smrgcat > conftest.xml << "EOF"
102089e7bcd65SmrgEOF
102099e7bcd65SmrgAS_IF([test "$have_xmlto" = yes],
102109e7bcd65Smrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
102119e7bcd65Smrg             [have_xmlto_text=yes],
102129e7bcd65Smrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
102139e7bcd65Smrgrm -f conftest.xml
102149e7bcd65SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
102159e7bcd65SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
102169e7bcd65Smrg]) # XORG_WITH_XMLTO
102179e7bcd65Smrg
102189e7bcd65Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
102199e7bcd65Smrg# --------------------------------------------
102209e7bcd65Smrg# Minimum version: 1.12.0
102219e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.12.0
102229e7bcd65Smrg#
102239e7bcd65Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
102249e7bcd65Smrg# XML-based language used for the transformation of XML documents.
102259e7bcd65Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
102269e7bcd65Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
102279e7bcd65Smrg# The XSLT processor is often used as a standalone tool for transformations.
102289e7bcd65Smrg# It should not be assumed that this tool is used only to work with documnetation.
102299e7bcd65Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
102309e7bcd65Smrg#
102319e7bcd65Smrg# Interface to module:
102329e7bcd65Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
102339e7bcd65Smrg# XSLTPROC:	 returns the path of the xsltproc program found
102349e7bcd65Smrg#		 returns the path set by the user in the environment
102359e7bcd65Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
102369e7bcd65Smrg#		  'no' user instructs the module not to use xsltproc
102379e7bcd65Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no
102389e7bcd65Smrg#
102399e7bcd65Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
102409e7bcd65Smrg#
102419e7bcd65SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
102429e7bcd65SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
102439e7bcd65Smrg# Preserves the interface, should it be implemented later
102449e7bcd65Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
102459e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto]))
102469e7bcd65SmrgAC_ARG_WITH(xsltproc,
102479e7bcd65Smrg	AS_HELP_STRING([--with-xsltproc],
102489e7bcd65Smrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
102499e7bcd65Smrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
102509e7bcd65Smrgm4_undefine([_defopt])
102519e7bcd65Smrg
102529e7bcd65Smrgif test "x$use_xsltproc" = x"auto"; then
102539e7bcd65Smrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
102549e7bcd65Smrg   if test "x$XSLTPROC" = "x"; then
102559e7bcd65Smrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
102569e7bcd65Smrg	have_xsltproc=no
102579e7bcd65Smrg   else
102589e7bcd65Smrg        have_xsltproc=yes
102599e7bcd65Smrg   fi
102609e7bcd65Smrgelif test "x$use_xsltproc" = x"yes" ; then
102619e7bcd65Smrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
102629e7bcd65Smrg   if test "x$XSLTPROC" = "x"; then
102639e7bcd65Smrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
102649e7bcd65Smrg   fi
102659e7bcd65Smrg   have_xsltproc=yes
102669e7bcd65Smrgelif test "x$use_xsltproc" = x"no" ; then
102679e7bcd65Smrg   if test "x$XSLTPROC" != "x"; then
102689e7bcd65Smrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
102699e7bcd65Smrg   fi
102709e7bcd65Smrg   have_xsltproc=no
102719e7bcd65Smrgelse
102729e7bcd65Smrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
102739e7bcd65Smrgfi
102749e7bcd65Smrg
102759e7bcd65SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
102769e7bcd65Smrg]) # XORG_WITH_XSLTPROC
102779e7bcd65Smrg
102789e7bcd65Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
102799e7bcd65Smrg# ----------------------------------------
102809e7bcd65Smrg# Minimum version: 1.15.0
102819e7bcd65Smrg#
102829e7bcd65Smrg# PERL (Practical Extraction and Report Language) is a language optimized for
102839e7bcd65Smrg# scanning arbitrary text files, extracting information from those text files,
102849e7bcd65Smrg# and printing reports based on that information.
102859e7bcd65Smrg#
102869e7bcd65Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
102879e7bcd65Smrg#
102889e7bcd65Smrg# Interface to module:
102899e7bcd65Smrg# HAVE_PERL: used in makefiles to conditionally scan text files
102909e7bcd65Smrg# PERL:	     returns the path of the perl program found
102919e7bcd65Smrg#	     returns the path set by the user in the environment
102929e7bcd65Smrg# --with-perl: 'yes' user instructs the module to use perl
102939e7bcd65Smrg#	       'no' user instructs the module not to use perl
102949e7bcd65Smrg# have_perl: returns yes if perl found in PATH or no
102959e7bcd65Smrg#
102969e7bcd65Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
102979e7bcd65Smrg#
102989e7bcd65SmrgAC_DEFUN([XORG_WITH_PERL],[
102999e7bcd65SmrgAC_ARG_VAR([PERL], [Path to perl command])
103009e7bcd65Smrg# Preserves the interface, should it be implemented later
103019e7bcd65Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
103029e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto]))
103039e7bcd65SmrgAC_ARG_WITH(perl,
103049e7bcd65Smrg	AS_HELP_STRING([--with-perl],
103059e7bcd65Smrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
103069e7bcd65Smrg	   [use_perl=$withval], [use_perl=]_defopt)
103079e7bcd65Smrgm4_undefine([_defopt])
103089e7bcd65Smrg
103099e7bcd65Smrgif test "x$use_perl" = x"auto"; then
103109e7bcd65Smrg   AC_PATH_PROG([PERL], [perl])
103119e7bcd65Smrg   if test "x$PERL" = "x"; then
103129e7bcd65Smrg        AC_MSG_WARN([perl not found - cannot extract information and report])
103139e7bcd65Smrg	have_perl=no
103149e7bcd65Smrg   else
103159e7bcd65Smrg        have_perl=yes
103169e7bcd65Smrg   fi
103179e7bcd65Smrgelif test "x$use_perl" = x"yes" ; then
103189e7bcd65Smrg   AC_PATH_PROG([PERL], [perl])
103199e7bcd65Smrg   if test "x$PERL" = "x"; then
103209e7bcd65Smrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
103219e7bcd65Smrg   fi
103229e7bcd65Smrg   have_perl=yes
103239e7bcd65Smrgelif test "x$use_perl" = x"no" ; then
103249e7bcd65Smrg   if test "x$PERL" != "x"; then
103259e7bcd65Smrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
103269e7bcd65Smrg   fi
103279e7bcd65Smrg   have_perl=no
103289e7bcd65Smrgelse
103299e7bcd65Smrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
103309e7bcd65Smrgfi
103319e7bcd65Smrg
103329e7bcd65SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
103339e7bcd65Smrg]) # XORG_WITH_PERL
103349e7bcd65Smrg
103359e7bcd65Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
103369e7bcd65Smrg# ----------------
103379e7bcd65Smrg# Minimum version: 1.5.0
103389e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0
103399e7bcd65Smrg#
103409e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes
103419e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the
103429e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
103439e7bcd65Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
103449e7bcd65Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
103459e7bcd65Smrg# --with-asciidoc assumes 'auto'.
103469e7bcd65Smrg#
103479e7bcd65Smrg# Interface to module:
103489e7bcd65Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
103499e7bcd65Smrg# ASCIIDOC:	 returns the path of the asciidoc program found
103509e7bcd65Smrg#		 returns the path set by the user in the environment
103519e7bcd65Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
103529e7bcd65Smrg#		  'no' user instructs the module not to use asciidoc
103539e7bcd65Smrg#
103549e7bcd65Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
103559e7bcd65Smrg#
103569e7bcd65SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
103579e7bcd65SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
103589e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto]))
103599e7bcd65SmrgAC_ARG_WITH(asciidoc,
103609e7bcd65Smrg	AS_HELP_STRING([--with-asciidoc],
103619e7bcd65Smrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
103629e7bcd65Smrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
103639e7bcd65Smrgm4_undefine([_defopt])
103649e7bcd65Smrg
103659e7bcd65Smrgif test "x$use_asciidoc" = x"auto"; then
103669e7bcd65Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
103679e7bcd65Smrg   if test "x$ASCIIDOC" = "x"; then
103689e7bcd65Smrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
103699e7bcd65Smrg	have_asciidoc=no
103709e7bcd65Smrg   else
103719e7bcd65Smrg        have_asciidoc=yes
103729e7bcd65Smrg   fi
103739e7bcd65Smrgelif test "x$use_asciidoc" = x"yes" ; then
103749e7bcd65Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
103759e7bcd65Smrg   if test "x$ASCIIDOC" = "x"; then
103769e7bcd65Smrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
103779e7bcd65Smrg   fi
103789e7bcd65Smrg   have_asciidoc=yes
103799e7bcd65Smrgelif test "x$use_asciidoc" = x"no" ; then
103809e7bcd65Smrg   if test "x$ASCIIDOC" != "x"; then
103819e7bcd65Smrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
103829e7bcd65Smrg   fi
103839e7bcd65Smrg   have_asciidoc=no
103849e7bcd65Smrgelse
103859e7bcd65Smrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
103869e7bcd65Smrgfi
103879e7bcd65Smrgm4_ifval([$1],
103889e7bcd65Smrg[if test "$have_asciidoc" = yes; then
103899e7bcd65Smrg    # scrape the asciidoc version
103909e7bcd65Smrg    AC_MSG_CHECKING([the asciidoc version])
103919e7bcd65Smrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
103929e7bcd65Smrg    AC_MSG_RESULT([$asciidoc_version])
103939e7bcd65Smrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
103949e7bcd65Smrg        [if test "x$use_asciidoc" = xauto; then
103959e7bcd65Smrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
103969e7bcd65Smrg            have_asciidoc=no
103979e7bcd65Smrg        else
103989e7bcd65Smrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
103999e7bcd65Smrg        fi])
104009e7bcd65Smrgfi])
104019e7bcd65SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
104029e7bcd65Smrg]) # XORG_WITH_ASCIIDOC
104039e7bcd65Smrg
104049e7bcd65Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
104059e7bcd65Smrg# --------------------------------
104069e7bcd65Smrg# Minimum version: 1.5.0
104079e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0
104089e7bcd65Smrg#
104099e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes
104109e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the
104119e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
104129e7bcd65Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
104139e7bcd65Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
104149e7bcd65Smrg# --with-doxygen assumes 'auto'.
104159e7bcd65Smrg#
104169e7bcd65Smrg# Interface to module:
104179e7bcd65Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
104189e7bcd65Smrg# DOXYGEN:	 returns the path of the doxygen program found
104199e7bcd65Smrg#		 returns the path set by the user in the environment
104209e7bcd65Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen
104219e7bcd65Smrg#		  'no' user instructs the module not to use doxygen
104229e7bcd65Smrg#
104239e7bcd65Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
104249e7bcd65Smrg#
104259e7bcd65SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
104269e7bcd65SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
104279e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto]))
104289e7bcd65SmrgAC_ARG_WITH(doxygen,
104299e7bcd65Smrg	AS_HELP_STRING([--with-doxygen],
104309e7bcd65Smrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
104319e7bcd65Smrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
104329e7bcd65Smrgm4_undefine([_defopt])
104339e7bcd65Smrg
104349e7bcd65Smrgif test "x$use_doxygen" = x"auto"; then
104359e7bcd65Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
104369e7bcd65Smrg   if test "x$DOXYGEN" = "x"; then
104379e7bcd65Smrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
104389e7bcd65Smrg	have_doxygen=no
104399e7bcd65Smrg   else
104409e7bcd65Smrg        have_doxygen=yes
104419e7bcd65Smrg   fi
104429e7bcd65Smrgelif test "x$use_doxygen" = x"yes" ; then
104439e7bcd65Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
104449e7bcd65Smrg   if test "x$DOXYGEN" = "x"; then
104459e7bcd65Smrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
104469e7bcd65Smrg   fi
104479e7bcd65Smrg   have_doxygen=yes
104489e7bcd65Smrgelif test "x$use_doxygen" = x"no" ; then
104499e7bcd65Smrg   if test "x$DOXYGEN" != "x"; then
104509e7bcd65Smrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
104519e7bcd65Smrg   fi
104529e7bcd65Smrg   have_doxygen=no
104539e7bcd65Smrgelse
104549e7bcd65Smrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
104559e7bcd65Smrgfi
104569e7bcd65Smrgm4_ifval([$1],
104579e7bcd65Smrg[if test "$have_doxygen" = yes; then
104589e7bcd65Smrg    # scrape the doxygen version
104599e7bcd65Smrg    AC_MSG_CHECKING([the doxygen version])
104609e7bcd65Smrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
104619e7bcd65Smrg    AC_MSG_RESULT([$doxygen_version])
104629e7bcd65Smrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
104639e7bcd65Smrg        [if test "x$use_doxygen" = xauto; then
104649e7bcd65Smrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
104659e7bcd65Smrg            have_doxygen=no
104669e7bcd65Smrg        else
104679e7bcd65Smrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
104689e7bcd65Smrg        fi])
104699e7bcd65Smrgfi])
104709e7bcd65SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
104719e7bcd65Smrg]) # XORG_WITH_DOXYGEN
104729e7bcd65Smrg
104739e7bcd65Smrg# XORG_WITH_GROFF([DEFAULT])
104749e7bcd65Smrg# ----------------
104759e7bcd65Smrg# Minimum version: 1.6.0
104769e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0
104779e7bcd65Smrg#
104789e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes
104799e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the
104809e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
104819e7bcd65Smrg# the --with-groff option, it allows maximum flexibilty in making decisions
104829e7bcd65Smrg# as whether or not to use the groff package. When DEFAULT is not specified,
104839e7bcd65Smrg# --with-groff assumes 'auto'.
104849e7bcd65Smrg#
104859e7bcd65Smrg# Interface to module:
104869e7bcd65Smrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
104879e7bcd65Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
104889e7bcd65Smrg# HAVE_GROFF_MS: the -ms macros package
104899e7bcd65Smrg# GROFF:	 returns the path of the groff program found
104909e7bcd65Smrg#		 returns the path set by the user in the environment
104919e7bcd65Smrg# --with-groff:	 'yes' user instructs the module to use groff
104929e7bcd65Smrg#		 'no' user instructs the module not to use groff
104939e7bcd65Smrg#
104949e7bcd65Smrg# Added in version 1.9.0:
104959e7bcd65Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
104969e7bcd65Smrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
104979e7bcd65Smrg#		   psselect from the psutils package.
104989e7bcd65Smrg#		   the ghostcript package. Refer to the grohtml man pages
104999e7bcd65Smrg#
105009e7bcd65Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
105019e7bcd65Smrg#
105029e7bcd65Smrg# OS and distros often splits groff in a basic and full package, the former
105039e7bcd65Smrg# having the groff program and the later having devices, fonts and macros
105049e7bcd65Smrg# Checking for the groff executable is not enough.
105059e7bcd65Smrg#
105069e7bcd65Smrg# If macros are missing, we cannot assume that groff is useless, so we don't
105079e7bcd65Smrg# unset HAVE_GROFF or GROFF env variables.
105089e7bcd65Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
105099e7bcd65Smrg#
105109e7bcd65SmrgAC_DEFUN([XORG_WITH_GROFF],[
105119e7bcd65SmrgAC_ARG_VAR([GROFF], [Path to groff command])
105129e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto]))
105139e7bcd65SmrgAC_ARG_WITH(groff,
105149e7bcd65Smrg	AS_HELP_STRING([--with-groff],
105159e7bcd65Smrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
105169e7bcd65Smrg	   [use_groff=$withval], [use_groff=]_defopt)
105179e7bcd65Smrgm4_undefine([_defopt])
105189e7bcd65Smrg
105199e7bcd65Smrgif test "x$use_groff" = x"auto"; then
105209e7bcd65Smrg   AC_PATH_PROG([GROFF], [groff])
105219e7bcd65Smrg   if test "x$GROFF" = "x"; then
105229e7bcd65Smrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
105239e7bcd65Smrg	have_groff=no
105249e7bcd65Smrg   else
105259e7bcd65Smrg        have_groff=yes
105269e7bcd65Smrg   fi
105279e7bcd65Smrgelif test "x$use_groff" = x"yes" ; then
105289e7bcd65Smrg   AC_PATH_PROG([GROFF], [groff])
105299e7bcd65Smrg   if test "x$GROFF" = "x"; then
105309e7bcd65Smrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
105319e7bcd65Smrg   fi
105329e7bcd65Smrg   have_groff=yes
105339e7bcd65Smrgelif test "x$use_groff" = x"no" ; then
105349e7bcd65Smrg   if test "x$GROFF" != "x"; then
105359e7bcd65Smrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
105369e7bcd65Smrg   fi
105379e7bcd65Smrg   have_groff=no
105389e7bcd65Smrgelse
105399e7bcd65Smrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
105409e7bcd65Smrgfi
105419e7bcd65Smrg
105429e7bcd65Smrg# We have groff, test for the presence of the macro packages
105439e7bcd65Smrgif test "x$have_groff" = x"yes"; then
105449e7bcd65Smrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
105459e7bcd65Smrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
105469e7bcd65Smrg        groff_ms_works=yes
105479e7bcd65Smrg    else
105489e7bcd65Smrg        groff_ms_works=no
105499e7bcd65Smrg    fi
105509e7bcd65Smrg    AC_MSG_RESULT([$groff_ms_works])
105519e7bcd65Smrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
105529e7bcd65Smrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
105539e7bcd65Smrg        groff_mm_works=yes
105549e7bcd65Smrg    else
105559e7bcd65Smrg        groff_mm_works=no
105569e7bcd65Smrg    fi
105579e7bcd65Smrg    AC_MSG_RESULT([$groff_mm_works])
105589e7bcd65Smrgfi
105599e7bcd65Smrg
105609e7bcd65Smrg# We have groff, test for HTML dependencies, one command per package
105619e7bcd65Smrgif test "x$have_groff" = x"yes"; then
105629e7bcd65Smrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
105639e7bcd65Smrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
105649e7bcd65Smrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
105659e7bcd65Smrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
105669e7bcd65Smrg      have_groff_html=yes
105679e7bcd65Smrg   else
105689e7bcd65Smrg      have_groff_html=no
105699e7bcd65Smrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
105709e7bcd65Smrg   fi
105719e7bcd65Smrgfi
105729e7bcd65Smrg
105739e7bcd65Smrg# Set Automake conditionals for Makefiles
105749e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
105759e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
105769e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
105779e7bcd65SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
105789e7bcd65Smrg]) # XORG_WITH_GROFF
105799e7bcd65Smrg
105809e7bcd65Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
105819e7bcd65Smrg# ---------------------------------------
105829e7bcd65Smrg# Minimum version: 1.6.0
105839e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0
105849e7bcd65Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0
105859e7bcd65Smrg#
105869e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes
105879e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the
105889e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
105899e7bcd65Smrg# the --with-fop option, it allows maximum flexibilty in making decisions
105909e7bcd65Smrg# as whether or not to use the fop package. When DEFAULT is not specified,
105919e7bcd65Smrg# --with-fop assumes 'auto'.
105929e7bcd65Smrg#
105939e7bcd65Smrg# Interface to module:
105949e7bcd65Smrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
105959e7bcd65Smrg# FOP:	 	returns the path of the fop program found
105969e7bcd65Smrg#		returns the path set by the user in the environment
105979e7bcd65Smrg# --with-fop: 	'yes' user instructs the module to use fop
105989e7bcd65Smrg#		'no' user instructs the module not to use fop
105999e7bcd65Smrg#
106009e7bcd65Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
106019e7bcd65Smrg#
106029e7bcd65SmrgAC_DEFUN([XORG_WITH_FOP],[
106039e7bcd65SmrgAC_ARG_VAR([FOP], [Path to fop command])
106049e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto]))
106059e7bcd65SmrgAC_ARG_WITH(fop,
106069e7bcd65Smrg	AS_HELP_STRING([--with-fop],
106079e7bcd65Smrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
106089e7bcd65Smrg	   [use_fop=$withval], [use_fop=]_defopt)
106099e7bcd65Smrgm4_undefine([_defopt])
106109e7bcd65Smrg
106119e7bcd65Smrgif test "x$use_fop" = x"auto"; then
106129e7bcd65Smrg   AC_PATH_PROG([FOP], [fop])
106139e7bcd65Smrg   if test "x$FOP" = "x"; then
106149e7bcd65Smrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
106159e7bcd65Smrg	have_fop=no
106169e7bcd65Smrg   else
106179e7bcd65Smrg        have_fop=yes
106189e7bcd65Smrg   fi
106199e7bcd65Smrgelif test "x$use_fop" = x"yes" ; then
106209e7bcd65Smrg   AC_PATH_PROG([FOP], [fop])
106219e7bcd65Smrg   if test "x$FOP" = "x"; then
106229e7bcd65Smrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
106239e7bcd65Smrg   fi
106249e7bcd65Smrg   have_fop=yes
106259e7bcd65Smrgelif test "x$use_fop" = x"no" ; then
106269e7bcd65Smrg   if test "x$FOP" != "x"; then
106279e7bcd65Smrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
106289e7bcd65Smrg   fi
106299e7bcd65Smrg   have_fop=no
106309e7bcd65Smrgelse
106319e7bcd65Smrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
106329e7bcd65Smrgfi
106339e7bcd65Smrg
106349e7bcd65Smrg# Test for a minimum version of fop, if provided.
106359e7bcd65Smrgm4_ifval([$1],
106369e7bcd65Smrg[if test "$have_fop" = yes; then
106379e7bcd65Smrg    # scrape the fop version
106389e7bcd65Smrg    AC_MSG_CHECKING([for fop minimum version])
106399e7bcd65Smrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
106409e7bcd65Smrg    AC_MSG_RESULT([$fop_version])
106419e7bcd65Smrg    AS_VERSION_COMPARE([$fop_version], [$1],
106429e7bcd65Smrg        [if test "x$use_fop" = xauto; then
106439e7bcd65Smrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
106449e7bcd65Smrg            have_fop=no
106459e7bcd65Smrg        else
106469e7bcd65Smrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
106479e7bcd65Smrg        fi])
106489e7bcd65Smrgfi])
106499e7bcd65SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
106509e7bcd65Smrg]) # XORG_WITH_FOP
106519e7bcd65Smrg
106529e7bcd65Smrg# XORG_WITH_PS2PDF([DEFAULT])
106539e7bcd65Smrg# ----------------
106549e7bcd65Smrg# Minimum version: 1.6.0
106559e7bcd65Smrg# Minimum version for optional DEFAULT argument: 1.11.0
106569e7bcd65Smrg#
106579e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes
106589e7bcd65Smrg# not at the appropriate level. This macro enables a module to test for the
106599e7bcd65Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
106609e7bcd65Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
106619e7bcd65Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
106629e7bcd65Smrg# --with-ps2pdf assumes 'auto'.
106639e7bcd65Smrg#
106649e7bcd65Smrg# Interface to module:
106659e7bcd65Smrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
106669e7bcd65Smrg# PS2PDF:	returns the path of the ps2pdf program found
106679e7bcd65Smrg#		returns the path set by the user in the environment
106689e7bcd65Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
106699e7bcd65Smrg#		 'no' user instructs the module not to use ps2pdf
106709e7bcd65Smrg#
106719e7bcd65Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
106729e7bcd65Smrg#
106739e7bcd65SmrgAC_DEFUN([XORG_WITH_PS2PDF],[
106749e7bcd65SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
106759e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto]))
106769e7bcd65SmrgAC_ARG_WITH(ps2pdf,
106779e7bcd65Smrg	AS_HELP_STRING([--with-ps2pdf],
106789e7bcd65Smrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
106799e7bcd65Smrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
106809e7bcd65Smrgm4_undefine([_defopt])
10681444c061aSmrg
106829e7bcd65Smrgif test "x$use_ps2pdf" = x"auto"; then
106839e7bcd65Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
106849e7bcd65Smrg   if test "x$PS2PDF" = "x"; then
106859e7bcd65Smrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
106869e7bcd65Smrg	have_ps2pdf=no
106879e7bcd65Smrg   else
106889e7bcd65Smrg        have_ps2pdf=yes
106899e7bcd65Smrg   fi
106909e7bcd65Smrgelif test "x$use_ps2pdf" = x"yes" ; then
106919e7bcd65Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
106929e7bcd65Smrg   if test "x$PS2PDF" = "x"; then
106939e7bcd65Smrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
106949e7bcd65Smrg   fi
106959e7bcd65Smrg   have_ps2pdf=yes
106969e7bcd65Smrgelif test "x$use_ps2pdf" = x"no" ; then
106979e7bcd65Smrg   if test "x$PS2PDF" != "x"; then
106989e7bcd65Smrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
106999e7bcd65Smrg   fi
107009e7bcd65Smrg   have_ps2pdf=no
107019e7bcd65Smrgelse
107029e7bcd65Smrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
107039e7bcd65Smrgfi
107049e7bcd65SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
107059e7bcd65Smrg]) # XORG_WITH_PS2PDF
10706444c061aSmrg
107079e7bcd65Smrg# XORG_ENABLE_DOCS (enable_docs=yes)
107089e7bcd65Smrg# ----------------
107099e7bcd65Smrg# Minimum version: 1.6.0
10710bdf0f55dSmrg#
107119e7bcd65Smrg# Documentation tools are not always available on all platforms and sometimes
107129e7bcd65Smrg# not at the appropriate level. This macro enables a builder to skip all
107139e7bcd65Smrg# documentation targets except traditional man pages.
107149e7bcd65Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
107159e7bcd65Smrg# maximum flexibilty in controlling documentation building.
107169e7bcd65Smrg# Refer to:
107179e7bcd65Smrg# XORG_WITH_XMLTO         --with-xmlto
107189e7bcd65Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
107199e7bcd65Smrg# XORG_WITH_DOXYGEN       --with-doxygen
107209e7bcd65Smrg# XORG_WITH_FOP           --with-fop
107219e7bcd65Smrg# XORG_WITH_GROFF         --with-groff
107229e7bcd65Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
107239e7bcd65Smrg#
107249e7bcd65Smrg# Interface to module:
107259e7bcd65Smrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
107269e7bcd65Smrg# --enable-docs: 'yes' user instructs the module to generate docs
107279e7bcd65Smrg#		 'no' user instructs the module not to generate docs
107289e7bcd65Smrg# parm1:	specify the default value, yes or no.
107299e7bcd65Smrg#
107309e7bcd65SmrgAC_DEFUN([XORG_ENABLE_DOCS],[
107319e7bcd65Smrgm4_define([docs_default], m4_default([$1], [yes]))
107329e7bcd65SmrgAC_ARG_ENABLE(docs,
107339e7bcd65Smrg	AS_HELP_STRING([--enable-docs],
107349e7bcd65Smrg	   [Enable building the documentation (default: ]docs_default[)]),
107359e7bcd65Smrg	   [build_docs=$enableval], [build_docs=]docs_default)
107369e7bcd65Smrgm4_undefine([docs_default])
107379e7bcd65SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
107389e7bcd65SmrgAC_MSG_CHECKING([whether to build documentation])
107399e7bcd65SmrgAC_MSG_RESULT([$build_docs])
107409e7bcd65Smrg]) # XORG_ENABLE_DOCS
107411477040fSmrg
107429e7bcd65Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
107439e7bcd65Smrg# ----------------
107449e7bcd65Smrg# Minimum version: 1.6.0
107459e7bcd65Smrg#
107469e7bcd65Smrg# This macro enables a builder to skip all developer documentation.
107479e7bcd65Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
107489e7bcd65Smrg# maximum flexibilty in controlling documentation building.
107499e7bcd65Smrg# Refer to:
107509e7bcd65Smrg# XORG_WITH_XMLTO         --with-xmlto
107519e7bcd65Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
107529e7bcd65Smrg# XORG_WITH_DOXYGEN       --with-doxygen
107539e7bcd65Smrg# XORG_WITH_FOP           --with-fop
107549e7bcd65Smrg# XORG_WITH_GROFF         --with-groff
107559e7bcd65Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
107569e7bcd65Smrg#
107579e7bcd65Smrg# Interface to module:
107589e7bcd65Smrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
107599e7bcd65Smrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
107609e7bcd65Smrg#			'no' user instructs the module not to generate developer docs
107619e7bcd65Smrg# parm1:		specify the default value, yes or no.
107629e7bcd65Smrg#
107639e7bcd65SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
107649e7bcd65Smrgm4_define([devel_default], m4_default([$1], [yes]))
107659e7bcd65SmrgAC_ARG_ENABLE(devel-docs,
107669e7bcd65Smrg	AS_HELP_STRING([--enable-devel-docs],
107679e7bcd65Smrg	   [Enable building the developer documentation (default: ]devel_default[)]),
107689e7bcd65Smrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
107699e7bcd65Smrgm4_undefine([devel_default])
107709e7bcd65SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
107719e7bcd65SmrgAC_MSG_CHECKING([whether to build developer documentation])
107729e7bcd65SmrgAC_MSG_RESULT([$build_devel_docs])
107739e7bcd65Smrg]) # XORG_ENABLE_DEVEL_DOCS
10774444c061aSmrg
107759e7bcd65Smrg# XORG_ENABLE_SPECS (enable_specs=yes)
107769e7bcd65Smrg# ----------------
107779e7bcd65Smrg# Minimum version: 1.6.0
107789e7bcd65Smrg#
107799e7bcd65Smrg# This macro enables a builder to skip all functional specification targets.
107809e7bcd65Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
107819e7bcd65Smrg# maximum flexibilty in controlling documentation building.
107829e7bcd65Smrg# Refer to:
107839e7bcd65Smrg# XORG_WITH_XMLTO         --with-xmlto
107849e7bcd65Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
107859e7bcd65Smrg# XORG_WITH_DOXYGEN       --with-doxygen
107869e7bcd65Smrg# XORG_WITH_FOP           --with-fop
107879e7bcd65Smrg# XORG_WITH_GROFF         --with-groff
107889e7bcd65Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
107899e7bcd65Smrg#
107909e7bcd65Smrg# Interface to module:
107919e7bcd65Smrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
107929e7bcd65Smrg# --enable-specs:	'yes' user instructs the module to generate specs
107939e7bcd65Smrg#			'no' user instructs the module not to generate specs
107949e7bcd65Smrg# parm1:		specify the default value, yes or no.
107959e7bcd65Smrg#
107969e7bcd65SmrgAC_DEFUN([XORG_ENABLE_SPECS],[
107979e7bcd65Smrgm4_define([spec_default], m4_default([$1], [yes]))
107989e7bcd65SmrgAC_ARG_ENABLE(specs,
107999e7bcd65Smrg	AS_HELP_STRING([--enable-specs],
108009e7bcd65Smrg	   [Enable building the specs (default: ]spec_default[)]),
108019e7bcd65Smrg	   [build_specs=$enableval], [build_specs=]spec_default)
108029e7bcd65Smrgm4_undefine([spec_default])
108039e7bcd65SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
108049e7bcd65SmrgAC_MSG_CHECKING([whether to build functional specifications])
108059e7bcd65SmrgAC_MSG_RESULT([$build_specs])
108069e7bcd65Smrg]) # XORG_ENABLE_SPECS
10807444c061aSmrg
108089e7bcd65Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
108099e7bcd65Smrg# ----------------------------------------------
108109e7bcd65Smrg# Minimum version: 1.13.0
108119e7bcd65Smrg#
108129e7bcd65Smrg# This macro enables a builder to enable/disable unit testing
108139e7bcd65Smrg# It makes no assumption about the test cases implementation
108149e7bcd65Smrg# Test cases may or may not use Automake "Support for test suites"
108159e7bcd65Smrg# They may or may not use the software utility library GLib
108169e7bcd65Smrg#
108179e7bcd65Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
108189e7bcd65Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
108199e7bcd65Smrg# The variable enable_unit_tests is used by other macros in this file.
108209e7bcd65Smrg#
108219e7bcd65Smrg# Interface to module:
108229e7bcd65Smrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
108239e7bcd65Smrg# enable_unit_tests:    used in configure.ac for additional configuration
108249e7bcd65Smrg# --enable-unit-tests:	'yes' user instructs the module to build tests
108259e7bcd65Smrg#			'no' user instructs the module not to build tests
108269e7bcd65Smrg# parm1:		specify the default value, yes or no.
108279e7bcd65Smrg#
108289e7bcd65SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
108299e7bcd65SmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
108309e7bcd65SmrgAC_BEFORE([$0], [XORG_LD_WRAP])
108319e7bcd65SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
108329e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto]))
108339e7bcd65SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
108349e7bcd65Smrg	[Enable building unit test cases (default: ]_defopt[)]),
108359e7bcd65Smrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
108369e7bcd65Smrgm4_undefine([_defopt])
108379e7bcd65SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
108389e7bcd65SmrgAC_MSG_CHECKING([whether to build unit test cases])
108399e7bcd65SmrgAC_MSG_RESULT([$enable_unit_tests])
108409e7bcd65Smrg]) # XORG_ENABLE_UNIT_TESTS
108419e7bcd65Smrg
108429e7bcd65Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
108439e7bcd65Smrg# ------------------------------------------------------
108449e7bcd65Smrg# Minimum version: 1.17.0
108459e7bcd65Smrg#
108469e7bcd65Smrg# This macro enables a builder to enable/disable integration testing
108479e7bcd65Smrg# It makes no assumption about the test cases' implementation
108489e7bcd65Smrg# Test cases may or may not use Automake "Support for test suites"
108499e7bcd65Smrg#
108509e7bcd65Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
108519e7bcd65Smrg# usually requires less dependencies and may be built and run under less
108529e7bcd65Smrg# stringent environments than integration tests.
108539e7bcd65Smrg#
108549e7bcd65Smrg# Interface to module:
108559e7bcd65Smrg# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
108569e7bcd65Smrg# enable_integration_tests:   used in configure.ac for additional configuration
108579e7bcd65Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests
108589e7bcd65Smrg#                             'no' user instructs the module not to build tests
108599e7bcd65Smrg# parm1:                      specify the default value, yes or no.
108609e7bcd65Smrg#
108619e7bcd65SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
108629e7bcd65SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
108639e7bcd65Smrgm4_define([_defopt], m4_default([$1], [auto]))
108649e7bcd65SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
108659e7bcd65Smrg	[Enable building integration test cases (default: ]_defopt[)]),
108669e7bcd65Smrg	[enable_integration_tests=$enableval],
108679e7bcd65Smrg	[enable_integration_tests=]_defopt)
108689e7bcd65Smrgm4_undefine([_defopt])
108699e7bcd65SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
108709e7bcd65Smrg	[test "x$enable_integration_tests" != xno])
108719e7bcd65SmrgAC_MSG_CHECKING([whether to build unit test cases])
108729e7bcd65SmrgAC_MSG_RESULT([$enable_integration_tests])
108739e7bcd65Smrg]) # XORG_ENABLE_INTEGRATION_TESTS
108749e7bcd65Smrg
108759e7bcd65Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
108769e7bcd65Smrg# ----------------------------------------
108779e7bcd65Smrg# Minimum version: 1.13.0
108789e7bcd65Smrg#
108799e7bcd65Smrg# GLib is a library which provides advanced data structures and functions.
108809e7bcd65Smrg# This macro enables a module to test for the presence of Glib.
108819e7bcd65Smrg#
108829e7bcd65Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
108839e7bcd65Smrg# Otherwise the value of $enable_unit_tests is blank.
108849e7bcd65Smrg#
108859e7bcd65Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
108869e7bcd65Smrg# test support usually requires less dependencies and may be built and run under
108879e7bcd65Smrg# less stringent environments than integration tests.
108889e7bcd65Smrg#
108899e7bcd65Smrg# Interface to module:
108909e7bcd65Smrg# HAVE_GLIB: used in makefiles to conditionally build targets
108919e7bcd65Smrg# with_glib: used in configure.ac to know if GLib has been found
108929e7bcd65Smrg# --with-glib:	'yes' user instructs the module to use glib
108939e7bcd65Smrg#		'no' user instructs the module not to use glib
108949e7bcd65Smrg#
108959e7bcd65SmrgAC_DEFUN([XORG_WITH_GLIB],[
108969e7bcd65SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
108979e7bcd65Smrgm4_define([_defopt], m4_default([$2], [auto]))
108989e7bcd65SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
108999e7bcd65Smrg	[Use GLib library for unit testing (default: ]_defopt[)]),
109009e7bcd65Smrg	[with_glib=$withval], [with_glib=]_defopt)
109019e7bcd65Smrgm4_undefine([_defopt])
109029e7bcd65Smrg
109039e7bcd65Smrghave_glib=no
109049e7bcd65Smrg# Do not probe GLib if user explicitly disabled unit testing
109059e7bcd65Smrgif test "x$enable_unit_tests" != x"no"; then
109069e7bcd65Smrg  # Do not probe GLib if user explicitly disabled it
109079e7bcd65Smrg  if test "x$with_glib" != x"no"; then
109089e7bcd65Smrg    m4_ifval(
109099e7bcd65Smrg      [$1],
109109e7bcd65Smrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
109119e7bcd65Smrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
109129e7bcd65Smrg    )
10913bdf0f55dSmrg  fi
10914bdf0f55dSmrgfi
10915444c061aSmrg
109169e7bcd65Smrg# Not having GLib when unit testing has been explicitly requested is an error
109179e7bcd65Smrgif test "x$enable_unit_tests" = x"yes"; then
109189e7bcd65Smrg  if test "x$have_glib" = x"no"; then
109199e7bcd65Smrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
10920249c3046Smrg  fi
10921bdf0f55dSmrgfi
109222ae83157Smrg
109239e7bcd65Smrg# Having unit testing disabled when GLib has been explicitly requested is an error
109249e7bcd65Smrgif test "x$enable_unit_tests" = x"no"; then
109259e7bcd65Smrg  if test "x$with_glib" = x"yes"; then
109269e7bcd65Smrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
109279e7bcd65Smrg  fi
109289e7bcd65Smrgfi
109292ae83157Smrg
109309e7bcd65Smrg# Not having GLib when it has been explicitly requested is an error
109319e7bcd65Smrgif test "x$with_glib" = x"yes"; then
109329e7bcd65Smrg  if test "x$have_glib" = x"no"; then
109339e7bcd65Smrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
109349e7bcd65Smrg  fi
109359e7bcd65Smrgfi
109362ae83157Smrg
109379e7bcd65SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
109389e7bcd65Smrg]) # XORG_WITH_GLIB
10939444c061aSmrg
109409e7bcd65Smrg# XORG_LD_WRAP([required|optional])
109419e7bcd65Smrg# ---------------------------------
109429e7bcd65Smrg# Minimum version: 1.13.0
10943bdf0f55dSmrg#
109449e7bcd65Smrg# Check if linker supports -wrap, passed via compiler flags
10945249c3046Smrg#
109469e7bcd65Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
109479e7bcd65Smrg# Otherwise the value of $enable_unit_tests is blank.
109489e7bcd65Smrg#
109499e7bcd65Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior
109509e7bcd65Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
109519e7bcd65Smrg# available, an argument of "optional" allows use when some unit tests require
109529e7bcd65Smrg# ld -wrap and others do not.
109539e7bcd65Smrg#
109549e7bcd65SmrgAC_DEFUN([XORG_LD_WRAP],[
109559e7bcd65SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
109569e7bcd65Smrg    [AC_LANG_PROGRAM([#include <stdlib.h>
109579e7bcd65Smrg                      void __wrap_exit(int status) { return; }],
109589e7bcd65Smrg                     [exit(0);])])
109599e7bcd65Smrg# Not having ld wrap when unit testing has been explicitly requested is an error
109609e7bcd65Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
109619e7bcd65Smrg  if test "x$have_ld_wrap" = x"no"; then
109629e7bcd65Smrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
109639e7bcd65Smrg  fi
109649e7bcd65Smrgfi
109659e7bcd65SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
109669e7bcd65Smrg#
109679e7bcd65Smrg]) # XORG_LD_WRAP
10968444c061aSmrg
109699e7bcd65Smrg# XORG_CHECK_LINKER_FLAGS
109709e7bcd65Smrg# -----------------------
109719e7bcd65Smrg# SYNOPSIS
109729e7bcd65Smrg#
109739e7bcd65Smrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
109749e7bcd65Smrg#
109759e7bcd65Smrg# DESCRIPTION
109769e7bcd65Smrg#
109779e7bcd65Smrg#   Check whether the given linker FLAGS work with the current language's
109789e7bcd65Smrg#   linker, or whether they give an error.
109799e7bcd65Smrg#
109809e7bcd65Smrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
109819e7bcd65Smrg#   success/failure.
109829e7bcd65Smrg#
109839e7bcd65Smrg#   PROGRAM-SOURCE is the program source to link with, if needed
109849e7bcd65Smrg#
109859e7bcd65Smrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
109869e7bcd65Smrg#
109879e7bcd65Smrg# LICENSE
109889e7bcd65Smrg#
109899e7bcd65Smrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
109909e7bcd65Smrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
109919e7bcd65Smrg#   Copyright (c) 2009 Matteo Frigo
109929e7bcd65Smrg#
109939e7bcd65Smrg#   This program is free software: you can redistribute it and/or modify it
109949e7bcd65Smrg#   under the terms of the GNU General Public License as published by the
109959e7bcd65Smrg#   Free Software Foundation, either version 3 of the License, or (at your
109969e7bcd65Smrg#   option) any later version.
109979e7bcd65Smrg#
109989e7bcd65Smrg#   This program is distributed in the hope that it will be useful, but
109999e7bcd65Smrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
110009e7bcd65Smrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
110019e7bcd65Smrg#   Public License for more details.
110029e7bcd65Smrg#
110039e7bcd65Smrg#   You should have received a copy of the GNU General Public License along
110049e7bcd65Smrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
110059e7bcd65Smrg#
110069e7bcd65Smrg#   As a special exception, the respective Autoconf Macro's copyright owner
110079e7bcd65Smrg#   gives unlimited permission to copy, distribute and modify the configure
110089e7bcd65Smrg#   scripts that are the output of Autoconf when processing the Macro. You
110099e7bcd65Smrg#   need not follow the terms of the GNU General Public License when using
110109e7bcd65Smrg#   or distributing such scripts, even though portions of the text of the
110119e7bcd65Smrg#   Macro appear in them. The GNU General Public License (GPL) does govern
110129e7bcd65Smrg#   all other use of the material that constitutes the Autoconf Macro.
110139e7bcd65Smrg#
110149e7bcd65Smrg#   This special exception to the GPL applies to versions of the Autoconf
110159e7bcd65Smrg#   Macro released by the Autoconf Archive. When you make and distribute a
110169e7bcd65Smrg#   modified version of the Autoconf Macro, you may extend this special
110179e7bcd65Smrg#   exception to the GPL to apply to your modified version as well.#
110189e7bcd65SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
110199e7bcd65Smrg[AC_MSG_CHECKING([whether the linker accepts $1])
110209e7bcd65Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
110219e7bcd65SmrgAS_LITERAL_IF([$1],
110229e7bcd65Smrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
110239e7bcd65Smrg      ax_save_FLAGS=$LDFLAGS
110249e7bcd65Smrg      LDFLAGS="$1"
110259e7bcd65Smrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
110269e7bcd65Smrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
110279e7bcd65Smrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
110289e7bcd65Smrg      LDFLAGS=$ax_save_FLAGS])],
110299e7bcd65Smrg  [ax_save_FLAGS=$LDFLAGS
110309e7bcd65Smrg   LDFLAGS="$1"
110319e7bcd65Smrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
110329e7bcd65Smrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
110339e7bcd65Smrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
110349e7bcd65Smrg   LDFLAGS=$ax_save_FLAGS])
110359e7bcd65Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
110369e7bcd65SmrgAC_MSG_RESULT($xorg_check_linker_flags)
110379e7bcd65Smrgif test "x$xorg_check_linker_flags" = xyes; then
110389e7bcd65Smrg	m4_default([$2], :)
11039bdf0f55dSmrgelse
110409e7bcd65Smrg	m4_default([$3], :)
11041bdf0f55dSmrgfi
110429e7bcd65Smrg]) # XORG_CHECK_LINKER_FLAGS
11043444c061aSmrg
110449e7bcd65Smrg# XORG_MEMORY_CHECK_FLAGS
110459e7bcd65Smrg# -----------------------
110469e7bcd65Smrg# Minimum version: 1.16.0
11047bdf0f55dSmrg#
110489e7bcd65Smrg# This macro attempts to find appropriate memory checking functionality
110499e7bcd65Smrg# for various platforms which unit testing code may use to catch various
110509e7bcd65Smrg# forms of memory allocation and access errors in testing.
110519e7bcd65Smrg#
110529e7bcd65Smrg# Interface to module:
110539e7bcd65Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
110549e7bcd65Smrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
110559e7bcd65Smrg#
110569e7bcd65Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
110579e7bcd65Smrg#
110589e7bcd65SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
11059444c061aSmrg
110609e7bcd65SmrgAC_REQUIRE([AC_CANONICAL_HOST])
110619e7bcd65SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
110629e7bcd65Smrg           [Environment variables to enable memory checking in tests])
11063444c061aSmrg
110649e7bcd65Smrg# Check for different types of support on different platforms
110659e7bcd65Smrgcase $host_os in
110669e7bcd65Smrg    solaris*)
110679e7bcd65Smrg        AC_CHECK_LIB([umem], [umem_alloc],
110689e7bcd65Smrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
110699e7bcd65Smrg        ;;
110709e7bcd65Smrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
110719e7bcd65Smrg        # both directly and inverted, so should not be 0 or 255.
110729e7bcd65Smrg        malloc_debug_env='MALLOC_PERTURB_=15'
110739e7bcd65Smrg        ;;
110749e7bcd65Smrg    darwin*)
110759e7bcd65Smrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
110769e7bcd65Smrg        ;;
110779e7bcd65Smrg    *bsd*)
110789e7bcd65Smrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
110799e7bcd65Smrg        ;;
110809e7bcd65Smrgesac
11081444c061aSmrg
110829e7bcd65Smrg# User supplied flags override default flags
110839e7bcd65Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
110849e7bcd65Smrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
110859e7bcd65Smrgfi
11086444c061aSmrg
110879e7bcd65SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
110889e7bcd65Smrg]) # XORG_WITH_LINT
110892ae83157Smrg
110909e7bcd65Smrg# XORG_CHECK_MALLOC_ZERO
110919e7bcd65Smrg# ----------------------
110929e7bcd65Smrg# Minimum version: 1.0.0
11093bdf0f55dSmrg#
110949e7bcd65Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
110959e7bcd65Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
110969e7bcd65Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
110979e7bcd65SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
110989e7bcd65SmrgAC_ARG_ENABLE(malloc0returnsnull,
110999e7bcd65Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
111009e7bcd65Smrg		       [malloc(0) returns NULL (default: auto)]),
111019e7bcd65Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
111029e7bcd65Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
111032ae83157Smrg
111049e7bcd65SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
111059e7bcd65Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
111069e7bcd65Smrg	AC_RUN_IFELSE([AC_LANG_PROGRAM([
111079e7bcd65Smrg#include <stdlib.h>
111089e7bcd65Smrg],[
111099e7bcd65Smrg    char *m0, *r0, *c0, *p;
111109e7bcd65Smrg    m0 = malloc(0);
111119e7bcd65Smrg    p = malloc(10);
111129e7bcd65Smrg    r0 = realloc(p,0);
111139e7bcd65Smrg    c0 = calloc(0,10);
111149e7bcd65Smrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
111159e7bcd65Smrg])],
111169e7bcd65Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
111179e7bcd65Smrg		[MALLOC_ZERO_RETURNS_NULL=no],
111189e7bcd65Smrg		[MALLOC_ZERO_RETURNS_NULL=yes])
111199e7bcd65Smrgfi
111209e7bcd65SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
11121444c061aSmrg
111229e7bcd65Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
111239e7bcd65Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
111249e7bcd65Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
111259e7bcd65Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
111269e7bcd65Smrgelse
111279e7bcd65Smrg	MALLOC_ZERO_CFLAGS=""
111289e7bcd65Smrg	XMALLOC_ZERO_CFLAGS=""
111299e7bcd65Smrg	XTMALLOC_ZERO_CFLAGS=""
11130bdf0f55dSmrgfi
111312ae83157Smrg
111329e7bcd65SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
111339e7bcd65SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
111349e7bcd65SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
111359e7bcd65Smrg]) # XORG_CHECK_MALLOC_ZERO
11136444c061aSmrg
111379e7bcd65Smrg# XORG_WITH_LINT()
111389e7bcd65Smrg# ----------------
111399e7bcd65Smrg# Minimum version: 1.1.0
11140bdf0f55dSmrg#
111419e7bcd65Smrg# This macro enables the use of a tool that flags some suspicious and
111429e7bcd65Smrg# non-portable constructs (likely to be bugs) in C language source code.
111439e7bcd65Smrg# It will attempt to locate the tool and use appropriate options.
111449e7bcd65Smrg# There are various lint type tools on different platforms.
111459e7bcd65Smrg#
111469e7bcd65Smrg# Interface to module:
111479e7bcd65Smrg# LINT:		returns the path to the tool found on the platform
111489e7bcd65Smrg#		or the value set to LINT on the configure cmd line
111499e7bcd65Smrg#		also an Automake conditional
111509e7bcd65Smrg# LINT_FLAGS:	an Automake variable with appropriate flags
111519e7bcd65Smrg#
111529e7bcd65Smrg# --with-lint:	'yes' user instructs the module to use lint
111539e7bcd65Smrg#		'no' user instructs the module not to use lint (default)
111549e7bcd65Smrg#
111559e7bcd65Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
111569e7bcd65Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
111579e7bcd65Smrg#
111589e7bcd65SmrgAC_DEFUN([XORG_WITH_LINT],[
11159249c3046Smrg
111609e7bcd65SmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
111619e7bcd65SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
111629e7bcd65SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
111639e7bcd65Smrg		[Use a lint-style source code checker (default: disabled)])],
111649e7bcd65Smrg		[use_lint=$withval], [use_lint=no])
11165249c3046Smrg
111669e7bcd65Smrg# Obtain platform specific info like program name and options
111679e7bcd65Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
111689e7bcd65Smrgcase $host_os in
111699e7bcd65Smrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
111709e7bcd65Smrg	lint_name=splint
111719e7bcd65Smrg	lint_options="-badflag"
111729e7bcd65Smrg	;;
111739e7bcd65Smrg  *freebsd* | *netbsd*)
111749e7bcd65Smrg	lint_name=lint
111759e7bcd65Smrg	lint_options="-u -b"
111769e7bcd65Smrg	;;
111779e7bcd65Smrg  *solaris*)
111789e7bcd65Smrg	lint_name=lint
111799e7bcd65Smrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
111809e7bcd65Smrg	;;
111819e7bcd65Smrgesac
11182444c061aSmrg
111839e7bcd65Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
111849e7bcd65Smrgif test "x$use_lint" = x"yes" ; then
111859e7bcd65Smrg   AC_PATH_PROG([LINT], [$lint_name])
111869e7bcd65Smrg   if test "x$LINT" = "x"; then
111879e7bcd65Smrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
111889e7bcd65Smrg   fi
111899e7bcd65Smrgelif test "x$use_lint" = x"no" ; then
111909e7bcd65Smrg   if test "x$LINT" != "x"; then
111919e7bcd65Smrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
111929e7bcd65Smrg   fi
11193bdf0f55dSmrgelse
111949e7bcd65Smrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
11195bdf0f55dSmrgfi
11196444c061aSmrg
111979e7bcd65Smrg# User supplied flags override default flags
111989e7bcd65Smrgif test "x$LINT_FLAGS" != "x"; then
111999e7bcd65Smrg   lint_options=$LINT_FLAGS
112009e7bcd65Smrgfi
11201249c3046Smrg
112029e7bcd65SmrgAC_SUBST([LINT_FLAGS],[$lint_options])
112039e7bcd65SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
11204444c061aSmrg
112059e7bcd65Smrg]) # XORG_WITH_LINT
112062ae83157Smrg
112079e7bcd65Smrg# XORG_LINT_LIBRARY(LIBNAME)
112089e7bcd65Smrg# --------------------------
112099e7bcd65Smrg# Minimum version: 1.1.0
11210bdf0f55dSmrg#
112119e7bcd65Smrg# Sets up flags for building lint libraries for checking programs that call
112129e7bcd65Smrg# functions in the library.
112139e7bcd65Smrg#
112149e7bcd65Smrg# Interface to module:
112159e7bcd65Smrg# LINTLIB		- Automake variable with the name of lint library file to make
112169e7bcd65Smrg# MAKE_LINT_LIB		- Automake conditional
112179e7bcd65Smrg#
112189e7bcd65Smrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
112199e7bcd65Smrg#			  - 'no' user instructs the module not to create a lint library (default)
11220249c3046Smrg
112219e7bcd65SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
112229e7bcd65SmrgAC_REQUIRE([XORG_WITH_LINT])
112239e7bcd65SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
112249e7bcd65Smrg	[Create lint library (default: disabled)])],
112259e7bcd65Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
112262265a131Smrg
112279e7bcd65Smrgif test "x$make_lint_lib" = x"yes" ; then
112289e7bcd65Smrg   LINTLIB=llib-l$1.ln
112299e7bcd65Smrg   if test "x$LINT" = "x"; then
112309e7bcd65Smrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
112319e7bcd65Smrg   fi
112329e7bcd65Smrgelif test "x$make_lint_lib" != x"no" ; then
112339e7bcd65Smrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
112349e7bcd65Smrgfi
11235444c061aSmrg
112369e7bcd65SmrgAC_SUBST(LINTLIB)
112379e7bcd65SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
11238444c061aSmrg
112399e7bcd65Smrg]) # XORG_LINT_LIBRARY
112402265a131Smrg
112419e7bcd65Smrg# XORG_COMPILER_BRAND
112429e7bcd65Smrg# -------------------
112439e7bcd65Smrg# Minimum version: 1.14.0
112441477040fSmrg#
112459e7bcd65Smrg# Checks for various brands of compilers and sets flags as appropriate:
112469e7bcd65Smrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
112479e7bcd65Smrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
112489e7bcd65Smrg#   clang compiler - sets CLANGCC to "yes"
112499e7bcd65Smrg#   Intel compiler - sets INTELCC to "yes"
112509e7bcd65Smrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
112519e7bcd65Smrg#
112529e7bcd65SmrgAC_DEFUN([XORG_COMPILER_BRAND], [
112539e7bcd65SmrgAC_LANG_CASE(
112549e7bcd65Smrg	[C], [
112559e7bcd65Smrg		AC_REQUIRE([AC_PROG_CC_C99])
112569e7bcd65Smrg	],
112579e7bcd65Smrg	[C++], [
112589e7bcd65Smrg		AC_REQUIRE([AC_PROG_CXX])
112599e7bcd65Smrg	]
112609e7bcd65Smrg)
112619e7bcd65SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
112629e7bcd65SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
112639e7bcd65SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
112649e7bcd65Smrg]) # XORG_COMPILER_BRAND
11265249c3046Smrg
112669e7bcd65Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
11267bdf0f55dSmrg# ---------------
112689e7bcd65Smrg# Minimum version: 1.16.0
112699e7bcd65Smrg#
112709e7bcd65Smrg# Test if the compiler works when passed the given flag as a command line argument.
112719e7bcd65Smrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
112729e7bcd65Smrg# next flag in the list until there are no more options.
112739e7bcd65Smrg#
112749e7bcd65Smrg# Note that this does not guarantee that the compiler supports the flag as some
112759e7bcd65Smrg# compilers will simply ignore arguments that they do not understand, but we do
112769e7bcd65Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
112779e7bcd65Smrg# -Werror=unused-command-line-argument
112789e7bcd65Smrg#
112799e7bcd65SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
112809e7bcd65Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
112819e7bcd65Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
112829e7bcd65Smrg
112839e7bcd65SmrgAC_LANG_COMPILER_REQUIRE
112849e7bcd65Smrg
112859e7bcd65SmrgAC_LANG_CASE(
112869e7bcd65Smrg	[C], [
112879e7bcd65Smrg		AC_REQUIRE([AC_PROG_CC_C99])
112889e7bcd65Smrg		define([PREFIX], [C])
112899e7bcd65Smrg		define([CACHE_PREFIX], [cc])
112909e7bcd65Smrg		define([COMPILER], [$CC])
112919e7bcd65Smrg	],
112929e7bcd65Smrg	[C++], [
112939e7bcd65Smrg		define([PREFIX], [CXX])
112949e7bcd65Smrg		define([CACHE_PREFIX], [cxx])
112959e7bcd65Smrg		define([COMPILER], [$CXX])
112969e7bcd65Smrg	]
112979e7bcd65Smrg)
11298249c3046Smrg
112999e7bcd65Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
113009e7bcd65Smrg
113019e7bcd65Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
113029e7bcd65Smrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
113039e7bcd65Smrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
113049e7bcd65Smrg			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
113059e7bcd65Smrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
113069e7bcd65Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
113079e7bcd65Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
113089e7bcd65Smrg	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
113099e7bcd65Smrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
11310bdf0f55dSmrgfi
113112265a131Smrg
113129e7bcd65Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
113139e7bcd65Smrg	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
113149e7bcd65Smrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
113159e7bcd65Smrg	fi
113169e7bcd65Smrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
113179e7bcd65Smrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
113189e7bcd65Smrg			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
113199e7bcd65Smrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
113209e7bcd65Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
113219e7bcd65Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
113229e7bcd65Smrg	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
113239e7bcd65Smrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
113249e7bcd65Smrgfi
11325444c061aSmrg
113269e7bcd65Smrgfound="no"
113279e7bcd65Smrgm4_foreach([flag], m4_cdr($@), [
113289e7bcd65Smrg	if test $found = "no" ; then
113299e7bcd65Smrg		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
113309e7bcd65Smrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
113319e7bcd65Smrg		fi
113329e7bcd65Smrg
113339e7bcd65Smrg		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
113349e7bcd65Smrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
113359e7bcd65Smrg		fi
113369e7bcd65Smrg
113379e7bcd65Smrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
113389e7bcd65Smrg
113399e7bcd65Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
113409e7bcd65Smrg		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
113419e7bcd65Smrg		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
113429e7bcd65Smrg		AC_CACHE_VAL($cacheid,
113439e7bcd65Smrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
113449e7bcd65Smrg					     [eval $cacheid=yes],
113459e7bcd65Smrg					     [eval $cacheid=no])])
113469e7bcd65Smrg
113479e7bcd65Smrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
113489e7bcd65Smrg
113499e7bcd65Smrg		eval supported=\$$cacheid
113509e7bcd65Smrg		AC_MSG_RESULT([$supported])
113519e7bcd65Smrg		if test "$supported" = "yes" ; then
113529e7bcd65Smrg			$1="$$1 ]flag["
113539e7bcd65Smrg			found="yes"
113549e7bcd65Smrg		fi
113559e7bcd65Smrg	fi
11356249c3046Smrg])
113579e7bcd65Smrg]) # XORG_TESTSET_CFLAG
113582ae83157Smrg
113599e7bcd65Smrg# XORG_COMPILER_FLAGS
113609e7bcd65Smrg# ---------------
113619e7bcd65Smrg# Minimum version: 1.16.0
113622ae83157Smrg#
113639e7bcd65Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
113649e7bcd65Smrg# arguments supported by the selected compiler which do NOT alter the generated
113659e7bcd65Smrg# code.  These arguments will cause the compiler to print various warnings
113669e7bcd65Smrg# during compilation AND turn a conservative set of warnings into errors.
113679e7bcd65Smrg#
113689e7bcd65Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
113699e7bcd65Smrg# future versions of util-macros as options are added to new compilers.
113709e7bcd65Smrg#
113719e7bcd65SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
113729e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_BRAND])
113739e7bcd65Smrg
113749e7bcd65SmrgAC_ARG_ENABLE(selective-werror,
113759e7bcd65Smrg              AS_HELP_STRING([--disable-selective-werror],
113769e7bcd65Smrg                             [Turn off selective compiler errors. (default: enabled)]),
113779e7bcd65Smrg              [SELECTIVE_WERROR=$enableval],
113789e7bcd65Smrg              [SELECTIVE_WERROR=yes])
113799e7bcd65Smrg
113809e7bcd65SmrgAC_LANG_CASE(
113819e7bcd65Smrg        [C], [
113829e7bcd65Smrg                define([PREFIX], [C])
113839e7bcd65Smrg        ],
113849e7bcd65Smrg        [C++], [
113859e7bcd65Smrg                define([PREFIX], [CXX])
113869e7bcd65Smrg        ]
113879e7bcd65Smrg)
113889e7bcd65Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
113899e7bcd65Smrgif test "x$SUNCC" = "xyes"; then
113909e7bcd65Smrg    [BASE_]PREFIX[FLAGS]="-v"
113919e7bcd65Smrgelse
113929e7bcd65Smrg    [BASE_]PREFIX[FLAGS]=""
113939e7bcd65Smrgfi
11394bdf0f55dSmrg
113959e7bcd65Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
113969e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
113979e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
113989e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
113999e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
114009e7bcd65Smrg
114019e7bcd65SmrgAC_LANG_CASE(
114029e7bcd65Smrg	[C], [
114039e7bcd65Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
114049e7bcd65Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
114059e7bcd65Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
114069e7bcd65Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
114079e7bcd65Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
114089e7bcd65Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
114099e7bcd65Smrg	]
114109e7bcd65Smrg)
114119e7bcd65Smrg
114129e7bcd65Smrg# This chunk adds additional warnings that could catch undesired effects.
114139e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
114149e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
114159e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
114169e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
114179e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
114189e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
114199e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
114209e7bcd65Smrg
114219e7bcd65Smrg# These are currently disabled because they are noisy.  They will be enabled
114229e7bcd65Smrg# in the future once the codebase is sufficiently modernized to silence
114239e7bcd65Smrg# them.  For now, I don't want them to drown out the other warnings.
114249e7bcd65Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
114259e7bcd65Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
114269e7bcd65Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
114279e7bcd65Smrg
114289e7bcd65Smrg# Turn some warnings into errors, so we don't accidently get successful builds
114299e7bcd65Smrg# when there are problems that should be fixed.
114309e7bcd65Smrg
114319e7bcd65Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
114329e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
114339e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
114349e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
114359e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
114369e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
114379e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
114389e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
114399e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
114409e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
114419e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
114429e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
114439e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
114449e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
114459e7bcd65Smrgelse
114469e7bcd65SmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
114479e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
114489e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
114499e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
114509e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
114519e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
114529e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
114539e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
114549e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
114559e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
114569e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
114579e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
114589e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
114599e7bcd65SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
11460bdf0f55dSmrgfi
11461bdf0f55dSmrg
114629e7bcd65SmrgAC_SUBST([BASE_]PREFIX[FLAGS])
114639e7bcd65Smrg]) # XORG_COMPILER_FLAGS
114649e7bcd65Smrg
114659e7bcd65Smrg# XORG_CWARNFLAGS
114669e7bcd65Smrg# ---------------
114679e7bcd65Smrg# Minimum version: 1.2.0
114689e7bcd65Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
11469249c3046Smrg#
114709e7bcd65Smrg# Defines CWARNFLAGS to enable C compiler warnings.
114719e7bcd65Smrg#
114729e7bcd65Smrg# This function is deprecated because it defines -fno-strict-aliasing
114739e7bcd65Smrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
114749e7bcd65Smrg# is needed, then it should be added explicitly in the module when
114759e7bcd65Smrg# it is updated to use BASE_CFLAGS.
114769e7bcd65Smrg#
114779e7bcd65SmrgAC_DEFUN([XORG_CWARNFLAGS], [
114789e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
114799e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_BRAND])
114809e7bcd65SmrgAC_LANG_CASE(
114819e7bcd65Smrg	[C], [
114829e7bcd65Smrg		CWARNFLAGS="$BASE_CFLAGS"
114839e7bcd65Smrg		if  test "x$GCC" = xyes ; then
114849e7bcd65Smrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
114859e7bcd65Smrg		fi
114869e7bcd65Smrg		AC_SUBST(CWARNFLAGS)
114879e7bcd65Smrg	]
114889e7bcd65Smrg)
114899e7bcd65Smrg]) # XORG_CWARNFLAGS
114902265a131Smrg
114919e7bcd65Smrg# XORG_STRICT_OPTION
114929e7bcd65Smrg# -----------------------
114939e7bcd65Smrg# Minimum version: 1.3.0
114949e7bcd65Smrg#
114959e7bcd65Smrg# Add configure option to enable strict compilation flags, such as treating
114969e7bcd65Smrg# warnings as fatal errors.
114979e7bcd65Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to
114989e7bcd65Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
114999e7bcd65Smrg#
115009e7bcd65Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
115019e7bcd65Smrg# when strict compilation is unconditionally desired.
115029e7bcd65SmrgAC_DEFUN([XORG_STRICT_OPTION], [
115039e7bcd65SmrgAC_REQUIRE([XORG_CWARNFLAGS])
115049e7bcd65SmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
115052265a131Smrg
115069e7bcd65SmrgAC_ARG_ENABLE(strict-compilation,
115079e7bcd65Smrg			  AS_HELP_STRING([--enable-strict-compilation],
115089e7bcd65Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
115099e7bcd65Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11510444c061aSmrg
115119e7bcd65SmrgAC_LANG_CASE(
115129e7bcd65Smrg        [C], [
115139e7bcd65Smrg                define([PREFIX], [C])
115149e7bcd65Smrg        ],
115159e7bcd65Smrg        [C++], [
115169e7bcd65Smrg                define([PREFIX], [CXX])
115179e7bcd65Smrg        ]
115189e7bcd65Smrg)
11519444c061aSmrg
115209e7bcd65Smrg[STRICT_]PREFIX[FLAGS]=""
115219e7bcd65SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
115229e7bcd65SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
11523444c061aSmrg
115249e7bcd65Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
115259e7bcd65Smrg# activate it with -Werror, so we add it here explicitly.
115269e7bcd65SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
11527444c061aSmrg
115289e7bcd65Smrgif test "x$STRICT_COMPILE" = "xyes"; then
115299e7bcd65Smrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
115309e7bcd65Smrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
115319e7bcd65Smrgfi
115329e7bcd65SmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
115339e7bcd65SmrgAC_SUBST([BASE_]PREFIX[FLAGS])
115349e7bcd65SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
115359e7bcd65Smrg]) # XORG_STRICT_OPTION
11536444c061aSmrg
115379e7bcd65Smrg# XORG_DEFAULT_OPTIONS
11538bdf0f55dSmrg# --------------------
115399e7bcd65Smrg# Minimum version: 1.3.0
11540249c3046Smrg#
115419e7bcd65Smrg# Defines default options for X.Org modules.
11542249c3046Smrg#
115439e7bcd65SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
115449e7bcd65SmrgAC_REQUIRE([AC_PROG_INSTALL])
115459e7bcd65SmrgXORG_COMPILER_FLAGS
115469e7bcd65SmrgXORG_CWARNFLAGS
115479e7bcd65SmrgXORG_STRICT_OPTION
115489e7bcd65SmrgXORG_RELEASE_VERSION
115499e7bcd65SmrgXORG_CHANGELOG
115509e7bcd65SmrgXORG_INSTALL
115519e7bcd65SmrgXORG_MANPAGE_SECTIONS
115529e7bcd65Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
115539e7bcd65Smrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
115549e7bcd65Smrg]) # XORG_DEFAULT_OPTIONS
11555bdf0f55dSmrg
115569e7bcd65Smrg# XORG_INSTALL()
115579e7bcd65Smrg# ----------------
115589e7bcd65Smrg# Minimum version: 1.4.0
115599e7bcd65Smrg#
115609e7bcd65Smrg# Defines the variable INSTALL_CMD as the command to copy
115619e7bcd65Smrg# INSTALL from $prefix/share/util-macros.
115629e7bcd65Smrg#
115639e7bcd65SmrgAC_DEFUN([XORG_INSTALL], [
115649e7bcd65SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
115659e7bcd65Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
115669e7bcd65SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
115679e7bcd65Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
115689e7bcd65Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
115699e7bcd65Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
115709e7bcd65SmrgAC_SUBST([INSTALL_CMD])
115719e7bcd65Smrg]) # XORG_INSTALL
115729e7bcd65Smrgdnl Copyright 2005 Red Hat, Inc
115739e7bcd65Smrgdnl
115749e7bcd65Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
115759e7bcd65Smrgdnl documentation for any purpose is hereby granted without fee, provided that
115769e7bcd65Smrgdnl the above copyright notice appear in all copies and that both that
115779e7bcd65Smrgdnl copyright notice and this permission notice appear in supporting
115789e7bcd65Smrgdnl documentation.
115799e7bcd65Smrgdnl
115809e7bcd65Smrgdnl The above copyright notice and this permission notice shall be included
115819e7bcd65Smrgdnl in all copies or substantial portions of the Software.
115829e7bcd65Smrgdnl
115839e7bcd65Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
115849e7bcd65Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
115859e7bcd65Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
115869e7bcd65Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
115879e7bcd65Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
115889e7bcd65Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
115899e7bcd65Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
115909e7bcd65Smrgdnl
115919e7bcd65Smrgdnl Except as contained in this notice, the name of the copyright holders shall
115929e7bcd65Smrgdnl not be used in advertising or otherwise to promote the sale, use or
115939e7bcd65Smrgdnl other dealings in this Software without prior written authorization
115949e7bcd65Smrgdnl from the copyright holders.
115959e7bcd65Smrgdnl
11596bdf0f55dSmrg
115979e7bcd65Smrg# XORG_RELEASE_VERSION
115989e7bcd65Smrg# --------------------
115999e7bcd65Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
116009e7bcd65Smrg 
116019e7bcd65SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
116029e7bcd65Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
116039e7bcd65Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
116049e7bcd65Smrg		[Major version of this package])
116059e7bcd65Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
116069e7bcd65Smrg	if test "x$PVM" = "x"; then
116079e7bcd65Smrg		PVM="0"
116089e7bcd65Smrg	fi
116099e7bcd65Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
116109e7bcd65Smrg		[$PVM],
116119e7bcd65Smrg		[Minor version of this package])
116129e7bcd65Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
116139e7bcd65Smrg	if test "x$PVP" = "x"; then
116149e7bcd65Smrg		PVP="0"
116159e7bcd65Smrg	fi
116169e7bcd65Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
116179e7bcd65Smrg		[$PVP],
116189e7bcd65Smrg		[Patch version of this package])
116199e7bcd65Smrg])
11620bdf0f55dSmrg
116219e7bcd65Smrg# XORG_CHANGELOG()
116229e7bcd65Smrg# ----------------
116239e7bcd65Smrg# Minimum version: 1.2.0
116249e7bcd65Smrg#
116259e7bcd65Smrg# Defines the variable CHANGELOG_CMD as the command to generate
116269e7bcd65Smrg# ChangeLog from git.
116279e7bcd65Smrg#
116289e7bcd65Smrg#
116299e7bcd65SmrgAC_DEFUN([XORG_CHANGELOG], [
116309e7bcd65SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
116319e7bcd65Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
116329e7bcd65Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
116339e7bcd65Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
116349e7bcd65SmrgAC_SUBST([CHANGELOG_CMD])
116359e7bcd65Smrg]) # XORG_CHANGELOG
11636444c061aSmrg
11637