15c30ecadSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
2dc99b369Smrg
35c30ecadSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
45eefee25Smacallan
55eefee25Smacallan# This file is free software; the Free Software Foundation
65eefee25Smacallan# gives unlimited permission to copy and/or distribute it,
75eefee25Smacallan# with or without modifications, as long as this notice is preserved.
85eefee25Smacallan
95eefee25Smacallan# This program is distributed in the hope that it will be useful,
105eefee25Smacallan# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
115eefee25Smacallan# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
125eefee25Smacallan# PARTICULAR PURPOSE.
135eefee25Smacallan
145c30ecadSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1562ab96baSmrgm4_ifndef([AC_AUTOCONF_VERSION],
1662ab96baSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
175c30ecadSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
185c30ecadSmrg[m4_warning([this file was generated for autoconf 2.71.
1962ab96baSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
2062ab96baSmrgIf you have problems, you may need to regenerate the build system entirely.
21dc99b369SmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
2262ab96baSmrg
235c30ecadSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc.
24dc99b369Smrg#
255c30ecadSmrg# This file is free software; the Free Software Foundation
265c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
275c30ecadSmrg# with or without modifications, as long as this notice is preserved.
285c30ecadSmrg
295c30ecadSmrg# AM_AUTOMAKE_VERSION(VERSION)
305c30ecadSmrg# ----------------------------
315c30ecadSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
325c30ecadSmrg# generated from the m4 files accompanying Automake X.Y.
335c30ecadSmrg# (This private macro should not be called outside this file.)
345c30ecadSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
355c30ecadSmrg[am__api_version='1.16'
365c30ecadSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
375c30ecadSmrgdnl require some minimum version.  Point them to the right macro.
385c30ecadSmrgm4_if([$1], [1.16.5], [],
395c30ecadSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
405c30ecadSmrg])
415c30ecadSmrg
425c30ecadSmrg# _AM_AUTOCONF_VERSION(VERSION)
435c30ecadSmrg# -----------------------------
445c30ecadSmrg# aclocal traces this macro to find the Autoconf version.
455c30ecadSmrg# This is a private macro too.  Using m4_define simplifies
465c30ecadSmrg# the logic in aclocal, which can simply ignore this definition.
475c30ecadSmrgm4_define([_AM_AUTOCONF_VERSION], [])
485c30ecadSmrg
495c30ecadSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
505c30ecadSmrg# -------------------------------
515c30ecadSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
525c30ecadSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
535c30ecadSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
545c30ecadSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl
555c30ecadSmrgm4_ifndef([AC_AUTOCONF_VERSION],
565c30ecadSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
575c30ecadSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
585c30ecadSmrg
595c30ecadSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
605c30ecadSmrg
615c30ecadSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
62dc99b369Smrg#
635c30ecadSmrg# This file is free software; the Free Software Foundation
645c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
655c30ecadSmrg# with or without modifications, as long as this notice is preserved.
66dc99b369Smrg
675c30ecadSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
685c30ecadSmrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
695c30ecadSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
70dc99b369Smrg#
715c30ecadSmrg# Of course, Automake must honor this variable whenever it calls a
725c30ecadSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
735c30ecadSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
745c30ecadSmrg# depending on how configure is run.  This is pretty annoying, since
755c30ecadSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
765c30ecadSmrg# source directory, any form will work fine, but in subdirectories a
775c30ecadSmrg# relative path needs to be adjusted first.
78dc99b369Smrg#
795c30ecadSmrg# $ac_aux_dir/missing
805c30ecadSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
815c30ecadSmrg# $top_srcdir/$ac_aux_dir/missing
825c30ecadSmrg#    fails if $ac_aux_dir is absolute,
835c30ecadSmrg#    fails when called from a subdirectory in a VPATH build with
845c30ecadSmrg#          a relative $ac_aux_dir
85dc99b369Smrg#
865c30ecadSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
875c30ecadSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
885c30ecadSmrg# harmless because $srcdir is '.', but things will broke when you
895c30ecadSmrg# start a VPATH build or use an absolute $srcdir.
90dc99b369Smrg#
915c30ecadSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
925c30ecadSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
935c30ecadSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
945c30ecadSmrg# and then we would define $MISSING as
955c30ecadSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
965c30ecadSmrg# This will work as long as MISSING is not called from configure, because
975c30ecadSmrg# unfortunately $(top_srcdir) has no meaning in configure.
985c30ecadSmrg# However there are other variables, like CC, which are often used in
995c30ecadSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
100dc99b369Smrg#
1015c30ecadSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
1025c30ecadSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
1035c30ecadSmrg# configured tree to be moved without reconfiguration.
1045eefee25Smacallan
1055c30ecadSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1065c30ecadSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1075c30ecadSmrg# Expand $ac_aux_dir to an absolute path.
1085c30ecadSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
109dc99b369Smrg])
110dc99b369Smrg
1115c30ecadSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
112dc99b369Smrg
1135c30ecadSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
1145c30ecadSmrg#
1155c30ecadSmrg# This file is free software; the Free Software Foundation
1165c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
1175c30ecadSmrg# with or without modifications, as long as this notice is preserved.
118dc99b369Smrg
1195c30ecadSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1205c30ecadSmrg# -------------------------------------
1215c30ecadSmrg# Define a conditional.
1225c30ecadSmrgAC_DEFUN([AM_CONDITIONAL],
1235c30ecadSmrg[AC_PREREQ([2.52])dnl
1245c30ecadSmrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1255c30ecadSmrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1265c30ecadSmrgAC_SUBST([$1_TRUE])dnl
1275c30ecadSmrgAC_SUBST([$1_FALSE])dnl
1285c30ecadSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1295c30ecadSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1305c30ecadSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1315c30ecadSmrgif $2; then
1325c30ecadSmrg  $1_TRUE=
1335c30ecadSmrg  $1_FALSE='#'
1345c30ecadSmrgelse
1355c30ecadSmrg  $1_TRUE='#'
1365c30ecadSmrg  $1_FALSE=
1375c30ecadSmrgfi
1385c30ecadSmrgAC_CONFIG_COMMANDS_PRE(
1395c30ecadSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1405c30ecadSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1415c30ecadSmrgUsually this means the macro was only invoked conditionally.]])
1425c30ecadSmrgfi])])
143dc99b369Smrg
1445c30ecadSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1455c30ecadSmrg#
1465c30ecadSmrg# This file is free software; the Free Software Foundation
1475c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
1485c30ecadSmrg# with or without modifications, as long as this notice is preserved.
1495eefee25Smacallan
1505eefee25Smacallan
1515c30ecadSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1525c30ecadSmrg# written in clear, in which case automake, when reading aclocal.m4,
1535c30ecadSmrg# will think it sees a *use*, and therefore will trigger all it's
1545c30ecadSmrg# C support machinery.  Also note that it means that autoscan, seeing
1555c30ecadSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1565eefee25Smacallan
1575eefee25Smacallan
1585c30ecadSmrg# _AM_DEPENDENCIES(NAME)
1595c30ecadSmrg# ----------------------
1605c30ecadSmrg# See how the compiler implements dependency checking.
1615c30ecadSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1625c30ecadSmrg# We try a few techniques and use that to set a single cache variable.
1635c30ecadSmrg#
1645c30ecadSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1655c30ecadSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1665c30ecadSmrg# dependency, and given that the user is not expected to run this macro,
1675c30ecadSmrg# just rely on AC_PROG_CC.
1685c30ecadSmrgAC_DEFUN([_AM_DEPENDENCIES],
1695c30ecadSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1705c30ecadSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1715c30ecadSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1725c30ecadSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1735eefee25Smacallan
1745c30ecadSmrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1755c30ecadSmrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1765c30ecadSmrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1775c30ecadSmrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1785c30ecadSmrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1795c30ecadSmrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1805c30ecadSmrg                    [depcc="$$1"   am_compiler_list=])
181dc99b369Smrg
1825c30ecadSmrgAC_CACHE_CHECK([dependency style of $depcc],
1835c30ecadSmrg               [am_cv_$1_dependencies_compiler_type],
1845c30ecadSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1855c30ecadSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
1865c30ecadSmrg  # making bogus files that we don't know about and never remove.  For
1875c30ecadSmrg  # instance it was reported that on HP-UX the gcc test will end up
1885c30ecadSmrg  # making a dummy file named 'D' -- because '-MD' means "put the output
1895c30ecadSmrg  # in D".
1905c30ecadSmrg  rm -rf conftest.dir
1915c30ecadSmrg  mkdir conftest.dir
1925c30ecadSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1935c30ecadSmrg  # using a relative directory.
1945c30ecadSmrg  cp "$am_depcomp" conftest.dir
1955c30ecadSmrg  cd conftest.dir
1965c30ecadSmrg  # We will build objects and dependencies in a subdirectory because
1975c30ecadSmrg  # it helps to detect inapplicable dependency modes.  For instance
1985c30ecadSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
1995c30ecadSmrg  # side effect of compilation, but ICC will put the dependencies in
2005c30ecadSmrg  # the current directory while Tru64 will put them in the object
2015c30ecadSmrg  # directory.
2025c30ecadSmrg  mkdir sub
203dc99b369Smrg
2045c30ecadSmrg  am_cv_$1_dependencies_compiler_type=none
2055c30ecadSmrg  if test "$am_compiler_list" = ""; then
2065c30ecadSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2075c30ecadSmrg  fi
2085c30ecadSmrg  am__universal=false
2095c30ecadSmrg  m4_case([$1], [CC],
2105c30ecadSmrg    [case " $depcc " in #(
2115c30ecadSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2125c30ecadSmrg     esac],
2135c30ecadSmrg    [CXX],
2145c30ecadSmrg    [case " $depcc " in #(
2155c30ecadSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2165c30ecadSmrg     esac])
217dc99b369Smrg
2185c30ecadSmrg  for depmode in $am_compiler_list; do
2195c30ecadSmrg    # Setup a source with many dependencies, because some compilers
2205c30ecadSmrg    # like to wrap large dependency lists on column 80 (with \), and
2215c30ecadSmrg    # we should not choose a depcomp mode which is confused by this.
2225c30ecadSmrg    #
2235c30ecadSmrg    # We need to recreate these files for each test, as the compiler may
2245c30ecadSmrg    # overwrite some of them when testing with obscure command lines.
2255c30ecadSmrg    # This happens at least with the AIX C compiler.
2265c30ecadSmrg    : > sub/conftest.c
2275c30ecadSmrg    for i in 1 2 3 4 5 6; do
2285c30ecadSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2295c30ecadSmrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
2305c30ecadSmrg      # Solaris 10 /bin/sh.
2315c30ecadSmrg      echo '/* dummy */' > sub/conftst$i.h
2325c30ecadSmrg    done
2335c30ecadSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234dc99b369Smrg
2355c30ecadSmrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
2365c30ecadSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2375c30ecadSmrg    # handle '-M -o', and we need to detect this.  Also, some Intel
2385c30ecadSmrg    # versions had trouble with output in subdirs.
2395c30ecadSmrg    am__obj=sub/conftest.${OBJEXT-o}
2405c30ecadSmrg    am__minus_obj="-o $am__obj"
2415c30ecadSmrg    case $depmode in
2425c30ecadSmrg    gcc)
2435c30ecadSmrg      # This depmode causes a compiler race in universal mode.
2445c30ecadSmrg      test "$am__universal" = false || continue
2455c30ecadSmrg      ;;
2465c30ecadSmrg    nosideeffect)
2475c30ecadSmrg      # After this tag, mechanisms are not by side-effect, so they'll
2485c30ecadSmrg      # only be used when explicitly requested.
2495c30ecadSmrg      if test "x$enable_dependency_tracking" = xyes; then
2505c30ecadSmrg	continue
2515c30ecadSmrg      else
2525c30ecadSmrg	break
2535c30ecadSmrg      fi
2545c30ecadSmrg      ;;
2555c30ecadSmrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
2565c30ecadSmrg      # This compiler won't grok '-c -o', but also, the minuso test has
2575c30ecadSmrg      # not run yet.  These depmodes are late enough in the game, and
2585c30ecadSmrg      # so weak that their functioning should not be impacted.
2595c30ecadSmrg      am__obj=conftest.${OBJEXT-o}
2605c30ecadSmrg      am__minus_obj=
2615c30ecadSmrg      ;;
2625c30ecadSmrg    none) break ;;
2635c30ecadSmrg    esac
2645c30ecadSmrg    if depmode=$depmode \
2655c30ecadSmrg       source=sub/conftest.c object=$am__obj \
2665c30ecadSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2675c30ecadSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2685c30ecadSmrg         >/dev/null 2>conftest.err &&
2695c30ecadSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2705c30ecadSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2715c30ecadSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2725c30ecadSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2735c30ecadSmrg      # icc doesn't choke on unknown options, it will just issue warnings
2745c30ecadSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
2755c30ecadSmrg      # that says an option was ignored or not supported.
2765c30ecadSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2775c30ecadSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2785c30ecadSmrg      # The diagnosis changed in icc 8.0:
2795c30ecadSmrg      #   icc: Command line remark: option '-MP' not supported
2805c30ecadSmrg      if (grep 'ignoring option' conftest.err ||
2815c30ecadSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2825c30ecadSmrg        am_cv_$1_dependencies_compiler_type=$depmode
2835c30ecadSmrg        break
2845c30ecadSmrg      fi
2855c30ecadSmrg    fi
2865c30ecadSmrg  done
2875c30ecadSmrg
2885c30ecadSmrg  cd ..
2895c30ecadSmrg  rm -rf conftest.dir
2905c30ecadSmrgelse
2915c30ecadSmrg  am_cv_$1_dependencies_compiler_type=none
2925c30ecadSmrgfi
2935c30ecadSmrg])
2945c30ecadSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2955c30ecadSmrgAM_CONDITIONAL([am__fastdep$1], [
2965c30ecadSmrg  test "x$enable_dependency_tracking" != xno \
2975c30ecadSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2985c30ecadSmrg])
299dc99b369Smrg
300dc99b369Smrg
3015c30ecadSmrg# AM_SET_DEPDIR
3025c30ecadSmrg# -------------
3035c30ecadSmrg# Choose a directory name for dependency files.
3045c30ecadSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3055c30ecadSmrgAC_DEFUN([AM_SET_DEPDIR],
3065c30ecadSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3075c30ecadSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3085c30ecadSmrg])
3095eefee25Smacallan
310dc99b369Smrg
3115c30ecadSmrg# AM_DEP_TRACK
3125c30ecadSmrg# ------------
3135c30ecadSmrgAC_DEFUN([AM_DEP_TRACK],
3145c30ecadSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl
3155c30ecadSmrgAS_HELP_STRING(
3165c30ecadSmrg  [--enable-dependency-tracking],
3175c30ecadSmrg  [do not reject slow dependency extractors])
3185c30ecadSmrgAS_HELP_STRING(
3195c30ecadSmrg  [--disable-dependency-tracking],
3205c30ecadSmrg  [speeds up one-time build])])
3215c30ecadSmrgif test "x$enable_dependency_tracking" != xno; then
3225c30ecadSmrg  am_depcomp="$ac_aux_dir/depcomp"
3235c30ecadSmrg  AMDEPBACKSLASH='\'
3245c30ecadSmrg  am__nodep='_no'
325dc99b369Smrgfi
3265c30ecadSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3275c30ecadSmrgAC_SUBST([AMDEPBACKSLASH])dnl
3285c30ecadSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3295c30ecadSmrgAC_SUBST([am__nodep])dnl
3305c30ecadSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl
331dc99b369Smrg])
332dc99b369Smrg
3335c30ecadSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
3345eefee25Smacallan
3355c30ecadSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
3365c30ecadSmrg#
3375c30ecadSmrg# This file is free software; the Free Software Foundation
3385c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
3395c30ecadSmrg# with or without modifications, as long as this notice is preserved.
3405eefee25Smacallan
3415c30ecadSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3425c30ecadSmrg# ------------------------------
3435c30ecadSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3445c30ecadSmrg[{
3455c30ecadSmrg  # Older Autoconf quotes --file arguments for eval, but not when files
3465c30ecadSmrg  # are listed without --file.  Let's play safe and only enable the eval
3475c30ecadSmrg  # if we detect the quoting.
3485c30ecadSmrg  # TODO: see whether this extra hack can be removed once we start
3495c30ecadSmrg  # requiring Autoconf 2.70 or later.
3505c30ecadSmrg  AS_CASE([$CONFIG_FILES],
3515c30ecadSmrg          [*\'*], [eval set x "$CONFIG_FILES"],
3525c30ecadSmrg          [*], [set x $CONFIG_FILES])
3535c30ecadSmrg  shift
3545c30ecadSmrg  # Used to flag and report bootstrapping failures.
3555c30ecadSmrg  am_rc=0
3565c30ecadSmrg  for am_mf
3575c30ecadSmrg  do
3585c30ecadSmrg    # Strip MF so we end up with the name of the file.
3595c30ecadSmrg    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
3605c30ecadSmrg    # Check whether this is an Automake generated Makefile which includes
3615c30ecadSmrg    # dependency-tracking related rules and includes.
3625c30ecadSmrg    # Grep'ing the whole file directly is not great: AIX grep has a line
3635c30ecadSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
3645c30ecadSmrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
3655c30ecadSmrg      || continue
3665c30ecadSmrg    am_dirpart=`AS_DIRNAME(["$am_mf"])`
3675c30ecadSmrg    am_filepart=`AS_BASENAME(["$am_mf"])`
3685c30ecadSmrg    AM_RUN_LOG([cd "$am_dirpart" \
3695c30ecadSmrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
3705c30ecadSmrg        | $MAKE -f - am--depfiles]) || am_rc=$?
3715c30ecadSmrg  done
3725c30ecadSmrg  if test $am_rc -ne 0; then
3735c30ecadSmrg    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
3745c30ecadSmrg    for automatic dependency tracking.  If GNU make was not used, consider
3755c30ecadSmrg    re-running the configure script with MAKE="gmake" (or whatever is
3765c30ecadSmrg    necessary).  You can also try re-running configure with the
3775c30ecadSmrg    '--disable-dependency-tracking' option to at least be able to build
3785c30ecadSmrg    the package (albeit without support for automatic dependency tracking).])
3795eefee25Smacallan  fi
3805c30ecadSmrg  AS_UNSET([am_dirpart])
3815c30ecadSmrg  AS_UNSET([am_filepart])
3825c30ecadSmrg  AS_UNSET([am_mf])
3835c30ecadSmrg  AS_UNSET([am_rc])
3845c30ecadSmrg  rm -f conftest-deps.mk
3855c30ecadSmrg}
3865c30ecadSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3875eefee25Smacallan
3885eefee25Smacallan
3895c30ecadSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3905c30ecadSmrg# -----------------------------
3915c30ecadSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
3925c30ecadSmrg#
3935c30ecadSmrg# This code is only required when automatic dependency tracking is enabled.
3945c30ecadSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
3955c30ecadSmrg# order to bootstrap the dependency handling code.
3965c30ecadSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3975c30ecadSmrg[AC_CONFIG_COMMANDS([depfiles],
3985c30ecadSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3995c30ecadSmrg     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
4005eefee25Smacallan
4015c30ecadSmrg# Do all the work for Automake.                             -*- Autoconf -*-
4025eefee25Smacallan
4035c30ecadSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4045c30ecadSmrg#
4055c30ecadSmrg# This file is free software; the Free Software Foundation
4065c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
4075c30ecadSmrg# with or without modifications, as long as this notice is preserved.
4085eefee25Smacallan
4095c30ecadSmrg# This macro actually does too much.  Some checks are only needed if
4105c30ecadSmrg# your package does certain things.  But this isn't really a big deal.
4115eefee25Smacallan
4125c30ecadSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
4135c30ecadSmrgm4_define([AC_PROG_CC],
4145c30ecadSmrgm4_defn([AC_PROG_CC])
4155c30ecadSmrg[_AM_PROG_CC_C_O
4165c30ecadSmrg])
4175eefee25Smacallan
4185c30ecadSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4195c30ecadSmrg# AM_INIT_AUTOMAKE([OPTIONS])
4205c30ecadSmrg# -----------------------------------------------
4215c30ecadSmrg# The call with PACKAGE and VERSION arguments is the old style
4225c30ecadSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4235c30ecadSmrg# and VERSION should now be passed to AC_INIT and removed from
4245c30ecadSmrg# the call to AM_INIT_AUTOMAKE.
4255c30ecadSmrg# We support both call styles for the transition.  After
4265c30ecadSmrg# the next Automake release, Autoconf can make the AC_INIT
4275c30ecadSmrg# arguments mandatory, and then we can depend on a new Autoconf
4285c30ecadSmrg# release and drop the old call support.
4295c30ecadSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4305c30ecadSmrg[AC_PREREQ([2.65])dnl
4315c30ecadSmrgm4_ifdef([_$0_ALREADY_INIT],
4325c30ecadSmrg  [m4_fatal([$0 expanded multiple times
4335c30ecadSmrg]m4_defn([_$0_ALREADY_INIT]))],
4345c30ecadSmrg  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
4355c30ecadSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4365c30ecadSmrgdnl the ones we care about.
4375c30ecadSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4385c30ecadSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4395c30ecadSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4405c30ecadSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4415c30ecadSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4425c30ecadSmrg  # is not polluted with repeated "-I."
4435c30ecadSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4445c30ecadSmrg  # test to see if srcdir already configured
4455c30ecadSmrg  if test -f $srcdir/config.status; then
4465c30ecadSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4475eefee25Smacallan  fi
4485c30ecadSmrgfi
4495eefee25Smacallan
4505c30ecadSmrg# test whether we have cygpath
4515c30ecadSmrgif test -z "$CYGPATH_W"; then
4525c30ecadSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4535c30ecadSmrg    CYGPATH_W='cygpath -w'
4545c30ecadSmrg  else
4555c30ecadSmrg    CYGPATH_W=echo
4565c30ecadSmrg  fi
4575c30ecadSmrgfi
4585c30ecadSmrgAC_SUBST([CYGPATH_W])
45962ab96baSmrg
4605c30ecadSmrg# Define the identity of the package.
4615c30ecadSmrgdnl Distinguish between old-style and new-style calls.
4625c30ecadSmrgm4_ifval([$2],
4635c30ecadSmrg[AC_DIAGNOSE([obsolete],
4645c30ecadSmrg             [$0: two- and three-arguments forms are deprecated.])
4655c30ecadSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4665c30ecadSmrg AC_SUBST([PACKAGE], [$1])dnl
4675c30ecadSmrg AC_SUBST([VERSION], [$2])],
4685c30ecadSmrg[_AM_SET_OPTIONS([$1])dnl
4695c30ecadSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4705c30ecadSmrgm4_if(
4715c30ecadSmrg  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
4725c30ecadSmrg  [ok:ok],,
4735c30ecadSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4745c30ecadSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4755c30ecadSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4765eefee25Smacallan
4775c30ecadSmrg_AM_IF_OPTION([no-define],,
4785c30ecadSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
4795c30ecadSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
4805eefee25Smacallan
4815c30ecadSmrg# Some tools Automake needs.
4825c30ecadSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4835c30ecadSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
4845c30ecadSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
4855c30ecadSmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
4865c30ecadSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
4875c30ecadSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
4885c30ecadSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
4895c30ecadSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4905c30ecadSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
4915c30ecadSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
4925c30ecadSmrg# For better backward compatibility.  To be removed once Automake 1.9.x
4935c30ecadSmrg# dies out for good.  For more background, see:
4945c30ecadSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4955c30ecadSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4965c30ecadSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
4975c30ecadSmrg# We need awk for the "check" target (and possibly the TAP driver).  The
4985c30ecadSmrg# system "awk" is bad on some platforms.
4995c30ecadSmrgAC_REQUIRE([AC_PROG_AWK])dnl
5005c30ecadSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5015c30ecadSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5025c30ecadSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5035c30ecadSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5045c30ecadSmrg			     [_AM_PROG_TAR([v7])])])
5055c30ecadSmrg_AM_IF_OPTION([no-dependencies],,
5065c30ecadSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
5075c30ecadSmrg		  [_AM_DEPENDENCIES([CC])],
5085c30ecadSmrg		  [m4_define([AC_PROG_CC],
5095c30ecadSmrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
5105c30ecadSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5115c30ecadSmrg		  [_AM_DEPENDENCIES([CXX])],
5125c30ecadSmrg		  [m4_define([AC_PROG_CXX],
5135c30ecadSmrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
5145c30ecadSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5155c30ecadSmrg		  [_AM_DEPENDENCIES([OBJC])],
5165c30ecadSmrg		  [m4_define([AC_PROG_OBJC],
5175c30ecadSmrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
5185c30ecadSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
5195c30ecadSmrg		  [_AM_DEPENDENCIES([OBJCXX])],
5205c30ecadSmrg		  [m4_define([AC_PROG_OBJCXX],
5215c30ecadSmrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
522dc99b369Smrg])
5235c30ecadSmrg# Variables for tags utilities; see am/tags.am
5245c30ecadSmrgif test -z "$CTAGS"; then
5255c30ecadSmrg  CTAGS=ctags
5265c30ecadSmrgfi
5275c30ecadSmrgAC_SUBST([CTAGS])
5285c30ecadSmrgif test -z "$ETAGS"; then
5295c30ecadSmrg  ETAGS=etags
5305c30ecadSmrgfi
5315c30ecadSmrgAC_SUBST([ETAGS])
5325c30ecadSmrgif test -z "$CSCOPE"; then
5335c30ecadSmrg  CSCOPE=cscope
5345c30ecadSmrgfi
5355c30ecadSmrgAC_SUBST([CSCOPE])
5365eefee25Smacallan
5375c30ecadSmrgAC_REQUIRE([AM_SILENT_RULES])dnl
5385c30ecadSmrgdnl The testsuite driver may need to know about EXEEXT, so add the
5395c30ecadSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
5405c30ecadSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
5415c30ecadSmrgAC_CONFIG_COMMANDS_PRE(dnl
5425c30ecadSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5435c30ecadSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5445eefee25Smacallan
5455c30ecadSmrg# POSIX will say in a future version that running "rm -f" with no argument
5465c30ecadSmrg# is OK; and we want to be able to make that assumption in our Makefile
5475c30ecadSmrg# recipes.  So use an aggressive probe to check that the usage we want is
5485c30ecadSmrg# actually supported "in the wild" to an acceptable degree.
5495c30ecadSmrg# See automake bug#10828.
5505c30ecadSmrg# To make any issue more visible, cause the running configure to be aborted
5515c30ecadSmrg# by default if the 'rm' program in use doesn't match our expectations; the
5525c30ecadSmrg# user can still override this though.
5535c30ecadSmrgif rm -f && rm -fr && rm -rf; then : OK; else
5545c30ecadSmrg  cat >&2 <<'END'
5555c30ecadSmrgOops!
5565c30ecadSmrg
5575c30ecadSmrgYour 'rm' program seems unable to run without file operands specified
5585c30ecadSmrgon the command line, even when the '-f' option is present.  This is contrary
5595c30ecadSmrgto the behaviour of most rm programs out there, and not conforming with
5605c30ecadSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
5615c30ecadSmrg
5625c30ecadSmrgPlease tell bug-automake@gnu.org about your system, including the value
5635c30ecadSmrgof your $PATH and any error possibly output before this message.  This
5645c30ecadSmrgcan help us improve future automake versions.
5655eefee25Smacallan
5665c30ecadSmrgEND
5675c30ecadSmrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5685c30ecadSmrg    echo 'Configuration will proceed anyway, since you have set the' >&2
5695c30ecadSmrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5705c30ecadSmrg    echo >&2
5715c30ecadSmrg  else
5725c30ecadSmrg    cat >&2 <<'END'
5735c30ecadSmrgAborting the configuration process, to ensure you take notice of the issue.
5745eefee25Smacallan
5755c30ecadSmrgYou can download and install GNU coreutils to get an 'rm' implementation
5765c30ecadSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
5775eefee25Smacallan
5785c30ecadSmrgIf you want to complete the configuration process using your problematic
5795c30ecadSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5805c30ecadSmrgto "yes", and re-run configure.
5815eefee25Smacallan
5825c30ecadSmrgEND
5835c30ecadSmrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
5845c30ecadSmrg  fi
5855c30ecadSmrgfi
5865c30ecadSmrgdnl The trailing newline in this macro's definition is deliberate, for
5875c30ecadSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments
5885c30ecadSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
5895c30ecadSmrg])
5905eefee25Smacallan
5915c30ecadSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5925c30ecadSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5935c30ecadSmrgdnl mangled by Autoconf and run in a shell conditional statement.
5945c30ecadSmrgm4_define([_AC_COMPILER_EXEEXT],
5955c30ecadSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
596dc99b369Smrg
5975c30ecadSmrg# When config.status generates a header, we must update the stamp-h file.
5985c30ecadSmrg# This file resides in the same directory as the config header
5995c30ecadSmrg# that is generated.  The stamp files are numbered to have different names.
600dc99b369Smrg
6015c30ecadSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6025c30ecadSmrg# loop where config.status creates the headers, so we can generate
6035c30ecadSmrg# our stamp files there.
6045c30ecadSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6055c30ecadSmrg[# Compute $1's index in $config_headers.
6065c30ecadSmrg_am_arg=$1
6075c30ecadSmrg_am_stamp_count=1
6085c30ecadSmrgfor _am_header in $config_headers :; do
6095c30ecadSmrg  case $_am_header in
6105c30ecadSmrg    $_am_arg | $_am_arg:* )
6115c30ecadSmrg      break ;;
6125c30ecadSmrg    * )
6135c30ecadSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6145c30ecadSmrg  esac
6155c30ecadSmrgdone
6165c30ecadSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
617dc99b369Smrg
6185c30ecadSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6195c30ecadSmrg#
6205c30ecadSmrg# This file is free software; the Free Software Foundation
6215c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
6225c30ecadSmrg# with or without modifications, as long as this notice is preserved.
6235eefee25Smacallan
6245c30ecadSmrg# AM_PROG_INSTALL_SH
6255c30ecadSmrg# ------------------
6265c30ecadSmrg# Define $install_sh.
6275c30ecadSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
6285c30ecadSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6295c30ecadSmrgif test x"${install_sh+set}" != xset; then
6305c30ecadSmrg  case $am_aux_dir in
6315c30ecadSmrg  *\ * | *\	*)
6325c30ecadSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6335c30ecadSmrg  *)
6345c30ecadSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
6355c30ecadSmrg  esac
6365c30ecadSmrgfi
6375c30ecadSmrgAC_SUBST([install_sh])])
63862ab96baSmrg
6395c30ecadSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc.
6405c30ecadSmrg#
6415c30ecadSmrg# This file is free software; the Free Software Foundation
6425c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
6435c30ecadSmrg# with or without modifications, as long as this notice is preserved.
644dc99b369Smrg
6455c30ecadSmrg# Check whether the underlying file-system supports filenames
6465c30ecadSmrg# with a leading dot.  For instance MS-DOS doesn't.
6475c30ecadSmrgAC_DEFUN([AM_SET_LEADING_DOT],
6485c30ecadSmrg[rm -rf .tst 2>/dev/null
6495c30ecadSmrgmkdir .tst 2>/dev/null
6505c30ecadSmrgif test -d .tst; then
6515c30ecadSmrg  am__leading_dot=.
6525c30ecadSmrgelse
6535c30ecadSmrg  am__leading_dot=_
6545c30ecadSmrgfi
6555c30ecadSmrgrmdir .tst 2>/dev/null
6565c30ecadSmrgAC_SUBST([am__leading_dot])])
657dc99b369Smrg
6585c30ecadSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
6595c30ecadSmrg# From Jim Meyering
660dc99b369Smrg
6615c30ecadSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
6625c30ecadSmrg#
6635c30ecadSmrg# This file is free software; the Free Software Foundation
6645c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
6655c30ecadSmrg# with or without modifications, as long as this notice is preserved.
666dc99b369Smrg
6675c30ecadSmrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
6685c30ecadSmrg# ----------------------------------
6695c30ecadSmrg# Control maintainer-specific portions of Makefiles.
6705c30ecadSmrg# Default is to disable them, unless 'enable' is passed literally.
6715c30ecadSmrg# For symmetry, 'disable' may be passed as well.  Anyway, the user
6725c30ecadSmrg# can override the default with the --enable/--disable switch.
6735c30ecadSmrgAC_DEFUN([AM_MAINTAINER_MODE],
6745c30ecadSmrg[m4_case(m4_default([$1], [disable]),
6755c30ecadSmrg       [enable], [m4_define([am_maintainer_other], [disable])],
6765c30ecadSmrg       [disable], [m4_define([am_maintainer_other], [enable])],
6775c30ecadSmrg       [m4_define([am_maintainer_other], [enable])
6785c30ecadSmrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
6795c30ecadSmrgAC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
6805c30ecadSmrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
6815c30ecadSmrg  AC_ARG_ENABLE([maintainer-mode],
6825c30ecadSmrg    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
6835c30ecadSmrg      am_maintainer_other[ make rules and dependencies not useful
6845c30ecadSmrg      (and sometimes confusing) to the casual installer])],
6855c30ecadSmrg    [USE_MAINTAINER_MODE=$enableval],
6865c30ecadSmrg    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
6875c30ecadSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6885c30ecadSmrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
6895c30ecadSmrg  MAINT=$MAINTAINER_MODE_TRUE
6905c30ecadSmrg  AC_SUBST([MAINT])dnl
6915c30ecadSmrg]
6925c30ecadSmrg)
693dc99b369Smrg
6945c30ecadSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6955eefee25Smacallan
6965c30ecadSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6975c30ecadSmrg#
6985c30ecadSmrg# This file is free software; the Free Software Foundation
6995c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
7005c30ecadSmrg# with or without modifications, as long as this notice is preserved.
7015eefee25Smacallan
7025c30ecadSmrg# AM_MAKE_INCLUDE()
7035c30ecadSmrg# -----------------
7045c30ecadSmrg# Check whether make has an 'include' directive that can support all
7055c30ecadSmrg# the idioms we need for our automatic dependency tracking code.
7065c30ecadSmrgAC_DEFUN([AM_MAKE_INCLUDE],
7075c30ecadSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
7085c30ecadSmrgcat > confinc.mk << 'END'
7095c30ecadSmrgam__doit:
7105c30ecadSmrg	@echo this is the am__doit target >confinc.out
7115c30ecadSmrg.PHONY: am__doit
7125c30ecadSmrgEND
7135c30ecadSmrgam__include="#"
7145c30ecadSmrgam__quote=
7155c30ecadSmrg# BSD make does it like this.
7165c30ecadSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD
7175c30ecadSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
7185c30ecadSmrgecho 'include confinc.mk # ignored' > confmf.GNU
7195c30ecadSmrg_am_result=no
7205c30ecadSmrgfor s in GNU BSD; do
7215c30ecadSmrg  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
7225c30ecadSmrg  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
7235c30ecadSmrg      ['0:this is the am__doit target'],
7245c30ecadSmrg      [AS_CASE([$s],
7255c30ecadSmrg          [BSD], [am__include='.include' am__quote='"'],
7265c30ecadSmrg          [am__include='include' am__quote=''])])
7275c30ecadSmrg  if test "$am__include" != "#"; then
7285c30ecadSmrg    _am_result="yes ($s style)"
7295c30ecadSmrg    break
7305c30ecadSmrg  fi
7315c30ecadSmrgdone
7325c30ecadSmrgrm -f confinc.* confmf.*
7335c30ecadSmrgAC_MSG_RESULT([${_am_result}])
7345c30ecadSmrgAC_SUBST([am__include])])
7355c30ecadSmrgAC_SUBST([am__quote])])
7365eefee25Smacallan
7375c30ecadSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7385eefee25Smacallan
7395c30ecadSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
7405c30ecadSmrg#
7415c30ecadSmrg# This file is free software; the Free Software Foundation
7425c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
7435c30ecadSmrg# with or without modifications, as long as this notice is preserved.
7445eefee25Smacallan
7455c30ecadSmrg# AM_MISSING_PROG(NAME, PROGRAM)
7465c30ecadSmrg# ------------------------------
7475c30ecadSmrgAC_DEFUN([AM_MISSING_PROG],
7485c30ecadSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7495c30ecadSmrg$1=${$1-"${am_missing_run}$2"}
7505c30ecadSmrgAC_SUBST($1)])
7515eefee25Smacallan
7525c30ecadSmrg# AM_MISSING_HAS_RUN
7535c30ecadSmrg# ------------------
7545c30ecadSmrg# Define MISSING if not defined so far and test if it is modern enough.
7555c30ecadSmrg# If it is, set am_missing_run to use it, otherwise, to nothing.
7565c30ecadSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7575c30ecadSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7585c30ecadSmrgAC_REQUIRE_AUX_FILE([missing])dnl
7595c30ecadSmrgif test x"${MISSING+set}" != xset; then
7605c30ecadSmrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
7615c30ecadSmrgfi
7625c30ecadSmrg# Use eval to expand $SHELL
7635c30ecadSmrgif eval "$MISSING --is-lightweight"; then
7645c30ecadSmrg  am_missing_run="$MISSING "
7655c30ecadSmrgelse
7665c30ecadSmrg  am_missing_run=
7675c30ecadSmrg  AC_MSG_WARN(['missing' script is too old or missing])
7685c30ecadSmrgfi
769dc99b369Smrg])
7705eefee25Smacallan
7715c30ecadSmrg# Helper functions for option handling.                     -*- Autoconf -*-
7725eefee25Smacallan
7735c30ecadSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
7745c30ecadSmrg#
7755c30ecadSmrg# This file is free software; the Free Software Foundation
7765c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
7775c30ecadSmrg# with or without modifications, as long as this notice is preserved.
7785eefee25Smacallan
7795c30ecadSmrg# _AM_MANGLE_OPTION(NAME)
7805c30ecadSmrg# -----------------------
7815c30ecadSmrgAC_DEFUN([_AM_MANGLE_OPTION],
7825c30ecadSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7835eefee25Smacallan
7845c30ecadSmrg# _AM_SET_OPTION(NAME)
7855c30ecadSmrg# --------------------
7865c30ecadSmrg# Set option NAME.  Presently that only means defining a flag for this option.
7875c30ecadSmrgAC_DEFUN([_AM_SET_OPTION],
7885c30ecadSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
7895eefee25Smacallan
7905c30ecadSmrg# _AM_SET_OPTIONS(OPTIONS)
7915c30ecadSmrg# ------------------------
7925c30ecadSmrg# OPTIONS is a space-separated list of Automake options.
7935c30ecadSmrgAC_DEFUN([_AM_SET_OPTIONS],
7945c30ecadSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7955eefee25Smacallan
7965c30ecadSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7975c30ecadSmrg# -------------------------------------------
7985c30ecadSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7995c30ecadSmrgAC_DEFUN([_AM_IF_OPTION],
8005c30ecadSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8015eefee25Smacallan
8025c30ecadSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
803dc99b369Smrg#
8045c30ecadSmrg# This file is free software; the Free Software Foundation
8055c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
8065c30ecadSmrg# with or without modifications, as long as this notice is preserved.
807dc99b369Smrg
8085c30ecadSmrg# _AM_PROG_CC_C_O
8095c30ecadSmrg# ---------------
8105c30ecadSmrg# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
8115c30ecadSmrg# to automatically call this.
8125c30ecadSmrgAC_DEFUN([_AM_PROG_CC_C_O],
8135c30ecadSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
8145c30ecadSmrgAC_REQUIRE_AUX_FILE([compile])dnl
8155c30ecadSmrgAC_LANG_PUSH([C])dnl
8165c30ecadSmrgAC_CACHE_CHECK(
8175c30ecadSmrg  [whether $CC understands -c and -o together],
8185c30ecadSmrg  [am_cv_prog_cc_c_o],
8195c30ecadSmrg  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
8205c30ecadSmrg  # Make sure it works both with $CC and with simple cc.
8215c30ecadSmrg  # Following AC_PROG_CC_C_O, we do the test twice because some
8225c30ecadSmrg  # compilers refuse to overwrite an existing .o file with -o,
8235c30ecadSmrg  # though they will create one.
8245c30ecadSmrg  am_cv_prog_cc_c_o=yes
8255c30ecadSmrg  for am_i in 1 2; do
8265c30ecadSmrg    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
8275c30ecadSmrg         && test -f conftest2.$ac_objext; then
8285c30ecadSmrg      : OK
8295c30ecadSmrg    else
8305c30ecadSmrg      am_cv_prog_cc_c_o=no
8315c30ecadSmrg      break
8325c30ecadSmrg    fi
8335c30ecadSmrg  done
8345c30ecadSmrg  rm -f core conftest*
8355c30ecadSmrg  unset am_i])
8365c30ecadSmrgif test "$am_cv_prog_cc_c_o" != yes; then
8375c30ecadSmrg   # Losing compiler, so override with the script.
8385c30ecadSmrg   # FIXME: It is wrong to rewrite CC.
8395c30ecadSmrg   # But if we don't then we get into trouble of one sort or another.
8405c30ecadSmrg   # A longer-term fix would be to have automake use am__CC in this case,
8415c30ecadSmrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8425c30ecadSmrg   CC="$am_aux_dir/compile $CC"
8435c30ecadSmrgfi
8445c30ecadSmrgAC_LANG_POP([C])])
845dc99b369Smrg
8465c30ecadSmrg# For backward compatibility.
8475c30ecadSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
848dc99b369Smrg
8495c30ecadSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
850dc99b369Smrg#
8515c30ecadSmrg# This file is free software; the Free Software Foundation
8525c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
8535c30ecadSmrg# with or without modifications, as long as this notice is preserved.
854dc99b369Smrg
8555c30ecadSmrg# AM_RUN_LOG(COMMAND)
8565c30ecadSmrg# -------------------
8575c30ecadSmrg# Run COMMAND, save the exit status in ac_status, and log it.
8585c30ecadSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
8595c30ecadSmrgAC_DEFUN([AM_RUN_LOG],
8605c30ecadSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
8615c30ecadSmrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
8625c30ecadSmrg   ac_status=$?
8635c30ecadSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8645c30ecadSmrg   (exit $ac_status); }])
865dc99b369Smrg
8665c30ecadSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
867dc99b369Smrg
8685c30ecadSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
8695c30ecadSmrg#
8705c30ecadSmrg# This file is free software; the Free Software Foundation
8715c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
8725c30ecadSmrg# with or without modifications, as long as this notice is preserved.
873dc99b369Smrg
8745c30ecadSmrg# AM_SANITY_CHECK
8755c30ecadSmrg# ---------------
8765c30ecadSmrgAC_DEFUN([AM_SANITY_CHECK],
8775c30ecadSmrg[AC_MSG_CHECKING([whether build environment is sane])
8785c30ecadSmrg# Reject unsafe characters in $srcdir or the absolute working directory
8795c30ecadSmrg# name.  Accept space and tab only in the latter.
8805c30ecadSmrgam_lf='
8815c30ecadSmrg'
8825c30ecadSmrgcase `pwd` in
8835c30ecadSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8845c30ecadSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8855c30ecadSmrgesac
8865c30ecadSmrgcase $srcdir in
8875c30ecadSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8885c30ecadSmrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
8895c30ecadSmrgesac
890dc99b369Smrg
8915c30ecadSmrg# Do 'set' in a subshell so we don't clobber the current shell's
8925c30ecadSmrg# arguments.  Must try -L first in case configure is actually a
8935c30ecadSmrg# symlink; some systems play weird games with the mod time of symlinks
8945c30ecadSmrg# (eg FreeBSD returns the mod time of the symlink's containing
8955c30ecadSmrg# directory).
8965c30ecadSmrgif (
8975c30ecadSmrg   am_has_slept=no
8985c30ecadSmrg   for am_try in 1 2; do
8995c30ecadSmrg     echo "timestamp, slept: $am_has_slept" > conftest.file
9005c30ecadSmrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
9015c30ecadSmrg     if test "$[*]" = "X"; then
9025c30ecadSmrg	# -L didn't work.
9035c30ecadSmrg	set X `ls -t "$srcdir/configure" conftest.file`
9045c30ecadSmrg     fi
9055c30ecadSmrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
9065c30ecadSmrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
907dc99b369Smrg
9085c30ecadSmrg	# If neither matched, then we have a broken ls.  This can happen
9095c30ecadSmrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
9105c30ecadSmrg	# broken ls alias from the environment.  This has actually
9115c30ecadSmrg	# happened.  Such a system could not be considered "sane".
9125c30ecadSmrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
9135c30ecadSmrg  alias in your environment])
9145c30ecadSmrg     fi
9155c30ecadSmrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
9165c30ecadSmrg       break
9175c30ecadSmrg     fi
9185c30ecadSmrg     # Just in case.
9195c30ecadSmrg     sleep 1
9205c30ecadSmrg     am_has_slept=yes
9215c30ecadSmrg   done
9225c30ecadSmrg   test "$[2]" = conftest.file
9235c30ecadSmrg   )
9245c30ecadSmrgthen
9255c30ecadSmrg   # Ok.
9265c30ecadSmrg   :
9275c30ecadSmrgelse
9285c30ecadSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
9295c30ecadSmrgCheck your system clock])
9305c30ecadSmrgfi
9315c30ecadSmrgAC_MSG_RESULT([yes])
9325c30ecadSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and
9335c30ecadSmrg# generated files are strictly newer.
9345c30ecadSmrgam_sleep_pid=
9355c30ecadSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
9365c30ecadSmrg  ( sleep 1 ) &
9375c30ecadSmrg  am_sleep_pid=$!
9385c30ecadSmrgfi
9395c30ecadSmrgAC_CONFIG_COMMANDS_PRE(
9405c30ecadSmrg  [AC_MSG_CHECKING([that generated files are newer than configure])
9415c30ecadSmrg   if test -n "$am_sleep_pid"; then
9425c30ecadSmrg     # Hide warnings about reused PIDs.
9435c30ecadSmrg     wait $am_sleep_pid 2>/dev/null
9445c30ecadSmrg   fi
9455c30ecadSmrg   AC_MSG_RESULT([done])])
9465c30ecadSmrgrm -f conftest.file
9475c30ecadSmrg])
948dc99b369Smrg
9495c30ecadSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc.
9505c30ecadSmrg#
9515c30ecadSmrg# This file is free software; the Free Software Foundation
9525c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
9535c30ecadSmrg# with or without modifications, as long as this notice is preserved.
954dc99b369Smrg
9555c30ecadSmrg# AM_SILENT_RULES([DEFAULT])
9565c30ecadSmrg# --------------------------
9575c30ecadSmrg# Enable less verbose build rules; with the default set to DEFAULT
9585c30ecadSmrg# ("yes" being less verbose, "no" or empty being verbose).
9595c30ecadSmrgAC_DEFUN([AM_SILENT_RULES],
9605c30ecadSmrg[AC_ARG_ENABLE([silent-rules], [dnl
9615c30ecadSmrgAS_HELP_STRING(
9625c30ecadSmrg  [--enable-silent-rules],
9635c30ecadSmrg  [less verbose build output (undo: "make V=1")])
9645c30ecadSmrgAS_HELP_STRING(
9655c30ecadSmrg  [--disable-silent-rules],
9665c30ecadSmrg  [verbose build output (undo: "make V=0")])dnl
9675c30ecadSmrg])
9685c30ecadSmrgcase $enable_silent_rules in @%:@ (((
9695c30ecadSmrg  yes) AM_DEFAULT_VERBOSITY=0;;
9705c30ecadSmrg   no) AM_DEFAULT_VERBOSITY=1;;
9715c30ecadSmrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9725c30ecadSmrgesac
9735c30ecadSmrgdnl
9745c30ecadSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
9755c30ecadSmrgdnl do not support nested variable expansions.
9765c30ecadSmrgdnl See automake bug#9928 and bug#10237.
9775c30ecadSmrgam_make=${MAKE-make}
9785c30ecadSmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
9795c30ecadSmrg   [am_cv_make_support_nested_variables],
9805c30ecadSmrg   [if AS_ECHO([['TRUE=$(BAR$(V))
9815c30ecadSmrgBAR0=false
9825c30ecadSmrgBAR1=true
9835c30ecadSmrgV=1
9845c30ecadSmrgam__doit:
9855c30ecadSmrg	@$(TRUE)
9865c30ecadSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
9875c30ecadSmrg  am_cv_make_support_nested_variables=yes
9885c30ecadSmrgelse
9895c30ecadSmrg  am_cv_make_support_nested_variables=no
9905c30ecadSmrgfi])
9915c30ecadSmrgif test $am_cv_make_support_nested_variables = yes; then
9925c30ecadSmrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
9935c30ecadSmrg  AM_V='$(V)'
9945c30ecadSmrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
9955c30ecadSmrgelse
9965c30ecadSmrg  AM_V=$AM_DEFAULT_VERBOSITY
9975c30ecadSmrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
9985c30ecadSmrgfi
9995c30ecadSmrgAC_SUBST([AM_V])dnl
10005c30ecadSmrgAM_SUBST_NOTMAKE([AM_V])dnl
10015c30ecadSmrgAC_SUBST([AM_DEFAULT_V])dnl
10025c30ecadSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
10035c30ecadSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
10045c30ecadSmrgAM_BACKSLASH='\'
10055c30ecadSmrgAC_SUBST([AM_BACKSLASH])dnl
10065c30ecadSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
10075c30ecadSmrg])
1008dc99b369Smrg
10095c30ecadSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
10105c30ecadSmrg#
10115c30ecadSmrg# This file is free software; the Free Software Foundation
10125c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
10135c30ecadSmrg# with or without modifications, as long as this notice is preserved.
1014dc99b369Smrg
10155c30ecadSmrg# AM_PROG_INSTALL_STRIP
10165c30ecadSmrg# ---------------------
10175c30ecadSmrg# One issue with vendor 'install' (even GNU) is that you can't
10185c30ecadSmrg# specify the program used to strip binaries.  This is especially
10195c30ecadSmrg# annoying in cross-compiling environments, where the build's strip
10205c30ecadSmrg# is unlikely to handle the host's binaries.
10215c30ecadSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
10225c30ecadSmrg# always use install-sh in "make install-strip", and initialize
10235c30ecadSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
10245c30ecadSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
10255c30ecadSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
10265c30ecadSmrg# Installed binaries are usually stripped using 'strip' when the user
10275c30ecadSmrg# run "make install-strip".  However 'strip' might not be the right
10285c30ecadSmrg# tool to use in cross-compilation environments, therefore Automake
10295c30ecadSmrg# will honor the 'STRIP' environment variable to overrule this program.
10305c30ecadSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
10315c30ecadSmrgif test "$cross_compiling" != no; then
10325c30ecadSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
10335c30ecadSmrgfi
10345c30ecadSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
10355c30ecadSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
10365eefee25Smacallan
10375c30ecadSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc.
10385c30ecadSmrg#
10395c30ecadSmrg# This file is free software; the Free Software Foundation
10405c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
10415c30ecadSmrg# with or without modifications, as long as this notice is preserved.
10425eefee25Smacallan
10435c30ecadSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
10445c30ecadSmrg# ---------------------------
10455c30ecadSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10465c30ecadSmrg# This macro is traced by Automake.
10475c30ecadSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
10485eefee25Smacallan
10495c30ecadSmrg# AM_SUBST_NOTMAKE(VARIABLE)
10505c30ecadSmrg# --------------------------
10515c30ecadSmrg# Public sister of _AM_SUBST_NOTMAKE.
10525c30ecadSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
1053dc99b369Smrg
10545c30ecadSmrg# Check how to create a tarball.                            -*- Autoconf -*-
1055dc99b369Smrg
10565c30ecadSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc.
10575c30ecadSmrg#
10585c30ecadSmrg# This file is free software; the Free Software Foundation
10595c30ecadSmrg# gives unlimited permission to copy and/or distribute it,
10605c30ecadSmrg# with or without modifications, as long as this notice is preserved.
10615eefee25Smacallan
10625c30ecadSmrg# _AM_PROG_TAR(FORMAT)
10635c30ecadSmrg# --------------------
10645c30ecadSmrg# Check how to create a tarball in format FORMAT.
10655c30ecadSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
10665c30ecadSmrg#
10675c30ecadSmrg# Substitute a variable $(am__tar) that is a command
10685c30ecadSmrg# writing to stdout a FORMAT-tarball containing the directory
10695c30ecadSmrg# $tardir.
10705c30ecadSmrg#     tardir=directory && $(am__tar) > result.tar
10715c30ecadSmrg#
10725c30ecadSmrg# Substitute a variable $(am__untar) that extract such
10735c30ecadSmrg# a tarball read from stdin.
10745c30ecadSmrg#     $(am__untar) < result.tar
10755c30ecadSmrg#
10765c30ecadSmrgAC_DEFUN([_AM_PROG_TAR],
10775c30ecadSmrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
10785c30ecadSmrg# in the wild :-(  We should find a proper way to deprecate it ...
10795c30ecadSmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
10805eefee25Smacallan
10815c30ecadSmrg# We'll loop over all known methods to create a tar archive until one works.
10825c30ecadSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
10835eefee25Smacallan
10845c30ecadSmrgm4_if([$1], [v7],
10855c30ecadSmrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
10865c30ecadSmrg
10875c30ecadSmrg  [m4_case([$1],
10885c30ecadSmrg    [ustar],
10895c30ecadSmrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10905c30ecadSmrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
10915c30ecadSmrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10925c30ecadSmrg      # and bug#13588).
10935c30ecadSmrg      am_max_uid=2097151 # 2^21 - 1
10945c30ecadSmrg      am_max_gid=$am_max_uid
10955c30ecadSmrg      # The $UID and $GID variables are not portable, so we need to resort
10965c30ecadSmrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
10975c30ecadSmrg      # below are definitely unexpected, so allow the users to see them
10985c30ecadSmrg      # (that is, avoid stderr redirection).
10995c30ecadSmrg      am_uid=`id -u || echo unknown`
11005c30ecadSmrg      am_gid=`id -g || echo unknown`
11015c30ecadSmrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
11025c30ecadSmrg      if test $am_uid -le $am_max_uid; then
11035c30ecadSmrg         AC_MSG_RESULT([yes])
11045c30ecadSmrg      else
11055c30ecadSmrg         AC_MSG_RESULT([no])
11065c30ecadSmrg         _am_tools=none
11075c30ecadSmrg      fi
11085c30ecadSmrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
11095c30ecadSmrg      if test $am_gid -le $am_max_gid; then
11105c30ecadSmrg         AC_MSG_RESULT([yes])
11115c30ecadSmrg      else
11125c30ecadSmrg        AC_MSG_RESULT([no])
11135c30ecadSmrg        _am_tools=none
11145c30ecadSmrg      fi],
11155eefee25Smacallan
11165c30ecadSmrg  [pax],
11175c30ecadSmrg    [],
11185eefee25Smacallan
11195c30ecadSmrg  [m4_fatal([Unknown tar format])])
11205eefee25Smacallan
11215c30ecadSmrg  AC_MSG_CHECKING([how to create a $1 tar archive])
11225eefee25Smacallan
11235c30ecadSmrg  # Go ahead even if we have the value already cached.  We do so because we
11245c30ecadSmrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
11255c30ecadSmrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1126dc99b369Smrg
11275c30ecadSmrg  for _am_tool in $_am_tools; do
11285c30ecadSmrg    case $_am_tool in
11295c30ecadSmrg    gnutar)
11305c30ecadSmrg      for _am_tar in tar gnutar gtar; do
11315c30ecadSmrg        AM_RUN_LOG([$_am_tar --version]) && break
11325c30ecadSmrg      done
11335c30ecadSmrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
11345c30ecadSmrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
11355c30ecadSmrg      am__untar="$_am_tar -xf -"
11365c30ecadSmrg      ;;
11375c30ecadSmrg    plaintar)
11385c30ecadSmrg      # Must skip GNU tar: if it does not support --format= it doesn't create
11395c30ecadSmrg      # ustar tarball either.
11405c30ecadSmrg      (tar --version) >/dev/null 2>&1 && continue
11415c30ecadSmrg      am__tar='tar chf - "$$tardir"'
11425c30ecadSmrg      am__tar_='tar chf - "$tardir"'
11435c30ecadSmrg      am__untar='tar xf -'
11445c30ecadSmrg      ;;
11455c30ecadSmrg    pax)
11465c30ecadSmrg      am__tar='pax -L -x $1 -w "$$tardir"'
11475c30ecadSmrg      am__tar_='pax -L -x $1 -w "$tardir"'
11485c30ecadSmrg      am__untar='pax -r'
11495c30ecadSmrg      ;;
11505c30ecadSmrg    cpio)
11515c30ecadSmrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11525c30ecadSmrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11535c30ecadSmrg      am__untar='cpio -i -H $1 -d'
11545c30ecadSmrg      ;;
11555c30ecadSmrg    none)
11565c30ecadSmrg      am__tar=false
11575c30ecadSmrg      am__tar_=false
11585c30ecadSmrg      am__untar=false
11595c30ecadSmrg      ;;
11605c30ecadSmrg    esac
1161dc99b369Smrg
11625c30ecadSmrg    # If the value was cached, stop now.  We just wanted to have am__tar
11635c30ecadSmrg    # and am__untar set.
11645c30ecadSmrg    test -n "${am_cv_prog_tar_$1}" && break
11655c30ecadSmrg
11665c30ecadSmrg    # tar/untar a dummy directory, and stop if the command works.
11675c30ecadSmrg    rm -rf conftest.dir
11685c30ecadSmrg    mkdir conftest.dir
11695c30ecadSmrg    echo GrepMe > conftest.dir/file
11705c30ecadSmrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11715c30ecadSmrg    rm -rf conftest.dir
11725c30ecadSmrg    if test -s conftest.tar; then
11735c30ecadSmrg      AM_RUN_LOG([$am__untar <conftest.tar])
11745c30ecadSmrg      AM_RUN_LOG([cat conftest.dir/file])
11755c30ecadSmrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11765c30ecadSmrg    fi
11775c30ecadSmrg  done
11785c30ecadSmrg  rm -rf conftest.dir
11795eefee25Smacallan
11805c30ecadSmrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11815c30ecadSmrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1182dc99b369Smrg
11835c30ecadSmrgAC_SUBST([am__tar])
11845c30ecadSmrgAC_SUBST([am__untar])
11855c30ecadSmrg]) # _AM_PROG_TAR
1186dc99b369Smrg
11875c30ecadSmrgdnl Copyright 2005 Red Hat, Inc
11885c30ecadSmrgdnl 
11895c30ecadSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
11905c30ecadSmrgdnl documentation for any purpose is hereby granted without fee, provided that
11915c30ecadSmrgdnl the above copyright notice appear in all copies and that both that
11925c30ecadSmrgdnl copyright notice and this permission notice appear in supporting
11935c30ecadSmrgdnl documentation.
11945c30ecadSmrgdnl 
11955c30ecadSmrgdnl The above copyright notice and this permission notice shall be included
11965c30ecadSmrgdnl in all copies or substantial portions of the Software.
11975c30ecadSmrgdnl 
11985c30ecadSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11995c30ecadSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
12005c30ecadSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
12015c30ecadSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
12025c30ecadSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
12035c30ecadSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
12045c30ecadSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
12055c30ecadSmrgdnl 
12065c30ecadSmrgdnl Except as contained in this notice, the name of the copyright holders shall
12075c30ecadSmrgdnl not be used in advertising or otherwise to promote the sale, use or
12085c30ecadSmrgdnl other dealings in this Software without prior written authorization
12095c30ecadSmrgdnl from the copyright holders.
12105c30ecadSmrgdnl 
1211dc99b369Smrg
12125c30ecadSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO)
12135c30ecadSmrg# --------------------------
12145c30ecadSmrg# Checks for the MACRO define in xorg-server.h (from the sdk).  If it
12155c30ecadSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES.
1216dc99b369Smrg
12175c30ecadSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
12185c30ecadSmrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
12195c30ecadSmrg	SAVE_CFLAGS="$CFLAGS"
12205c30ecadSmrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
12215c30ecadSmrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
12225c30ecadSmrg#include "xorg-server.h"
12235c30ecadSmrg#if !defined $1
12245c30ecadSmrg#error $1 not defined
12255c30ecadSmrg#endif
12265c30ecadSmrg		]])],
12275c30ecadSmrg		[_EXT_CHECK=yes],
12285c30ecadSmrg		[_EXT_CHECK=no])
12295c30ecadSmrg	CFLAGS="$SAVE_CFLAGS"
12305c30ecadSmrg	AC_MSG_CHECKING([if $1 is defined])
12315c30ecadSmrg	AC_MSG_RESULT([$_EXT_CHECK])
12325c30ecadSmrg	if test "$_EXT_CHECK" != no; then
12335c30ecadSmrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
12345c30ecadSmrg	fi
12355c30ecadSmrg])
1236dc99b369Smrg
12375c30ecadSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
12385c30ecadSmrgdnl serial 11 (pkg-config-0.29)
12395c30ecadSmrgdnl
12405c30ecadSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
12415c30ecadSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
12425c30ecadSmrgdnl
12435c30ecadSmrgdnl This program is free software; you can redistribute it and/or modify
12445c30ecadSmrgdnl it under the terms of the GNU General Public License as published by
12455c30ecadSmrgdnl the Free Software Foundation; either version 2 of the License, or
12465c30ecadSmrgdnl (at your option) any later version.
12475c30ecadSmrgdnl
12485c30ecadSmrgdnl This program is distributed in the hope that it will be useful, but
12495c30ecadSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of
12505c30ecadSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12515c30ecadSmrgdnl General Public License for more details.
12525c30ecadSmrgdnl
12535c30ecadSmrgdnl You should have received a copy of the GNU General Public License
12545c30ecadSmrgdnl along with this program; if not, write to the Free Software
12555c30ecadSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12565c30ecadSmrgdnl 02111-1307, USA.
12575c30ecadSmrgdnl
12585c30ecadSmrgdnl As a special exception to the GNU General Public License, if you
12595c30ecadSmrgdnl distribute this file as part of a program that contains a
12605c30ecadSmrgdnl configuration script generated by Autoconf, you may include it under
12615c30ecadSmrgdnl the same distribution terms that you use for the rest of that
12625c30ecadSmrgdnl program.
12635c30ecadSmrg
12645c30ecadSmrgdnl PKG_PREREQ(MIN-VERSION)
12655c30ecadSmrgdnl -----------------------
12665c30ecadSmrgdnl Since: 0.29
12675c30ecadSmrgdnl
12685c30ecadSmrgdnl Verify that the version of the pkg-config macros are at least
12695c30ecadSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
12705c30ecadSmrgdnl installed version of pkg-config, this checks the developer's version
12715c30ecadSmrgdnl of pkg.m4 when generating configure.
12725c30ecadSmrgdnl
12735c30ecadSmrgdnl To ensure that this macro is defined, also add:
12745c30ecadSmrgdnl m4_ifndef([PKG_PREREQ],
12755c30ecadSmrgdnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
12765c30ecadSmrgdnl
12775c30ecadSmrgdnl See the "Since" comment for each macro you use to see what version
12785c30ecadSmrgdnl of the macros you require.
12795c30ecadSmrgm4_defun([PKG_PREREQ],
12805c30ecadSmrg[m4_define([PKG_MACROS_VERSION], [0.29])
12815c30ecadSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
12825c30ecadSmrg    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
12835c30ecadSmrg])dnl PKG_PREREQ
12845c30ecadSmrg
12855c30ecadSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
12865c30ecadSmrgdnl ----------------------------------
12875c30ecadSmrgdnl Since: 0.16
12885c30ecadSmrgdnl
12895c30ecadSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to
12905c30ecadSmrgdnl first found in the path. Checks that the version of pkg-config found
12915c30ecadSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
12925c30ecadSmrgdnl used since that's the first version where most current features of
12935c30ecadSmrgdnl pkg-config existed.
12945c30ecadSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
12955c30ecadSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
12965c30ecadSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
12975c30ecadSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
12985c30ecadSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
12995c30ecadSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
13005c30ecadSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
13015eefee25Smacallan
13025c30ecadSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
13035c30ecadSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
13045c30ecadSmrgfi
13055c30ecadSmrgif test -n "$PKG_CONFIG"; then
13065c30ecadSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
13075c30ecadSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
13085c30ecadSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
13095c30ecadSmrg		AC_MSG_RESULT([yes])
13105c30ecadSmrg	else
13115c30ecadSmrg		AC_MSG_RESULT([no])
13125c30ecadSmrg		PKG_CONFIG=""
13135c30ecadSmrg	fi
13145c30ecadSmrgfi[]dnl
13155c30ecadSmrg])dnl PKG_PROG_PKG_CONFIG
13165eefee25Smacallan
13175c30ecadSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
13185c30ecadSmrgdnl -------------------------------------------------------------------
13195c30ecadSmrgdnl Since: 0.18
13205c30ecadSmrgdnl
13215c30ecadSmrgdnl Check to see whether a particular set of modules exists. Similar to
13225c30ecadSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors.
13235c30ecadSmrgdnl
13245c30ecadSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
13255c30ecadSmrgdnl only at the first occurence in configure.ac, so if the first place
13265c30ecadSmrgdnl it's called might be skipped (such as if it is within an "if", you
13275c30ecadSmrgdnl have to call PKG_CHECK_EXISTS manually
13285c30ecadSmrgAC_DEFUN([PKG_CHECK_EXISTS],
13295c30ecadSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
13305c30ecadSmrgif test -n "$PKG_CONFIG" && \
13315c30ecadSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
13325c30ecadSmrg  m4_default([$2], [:])
13335c30ecadSmrgm4_ifvaln([$3], [else
13345c30ecadSmrg  $3])dnl
13355c30ecadSmrgfi])
13365eefee25Smacallan
13375c30ecadSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
13385c30ecadSmrgdnl ---------------------------------------------
13395c30ecadSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
13405c30ecadSmrgdnl pkg_failed based on the result.
13415c30ecadSmrgm4_define([_PKG_CONFIG],
13425c30ecadSmrg[if test -n "$$1"; then
13435c30ecadSmrg    pkg_cv_[]$1="$$1"
13445c30ecadSmrg elif test -n "$PKG_CONFIG"; then
13455c30ecadSmrg    PKG_CHECK_EXISTS([$3],
13465c30ecadSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
13475c30ecadSmrg		      test "x$?" != "x0" && pkg_failed=yes ],
13485c30ecadSmrg		     [pkg_failed=yes])
13495c30ecadSmrg else
13505c30ecadSmrg    pkg_failed=untried
13515c30ecadSmrgfi[]dnl
13525c30ecadSmrg])dnl _PKG_CONFIG
13535eefee25Smacallan
13545c30ecadSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED
13555c30ecadSmrgdnl ---------------------------
13565c30ecadSmrgdnl Internal check to see if pkg-config supports short errors.
13575c30ecadSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
13585c30ecadSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
13595c30ecadSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13605c30ecadSmrg        _pkg_short_errors_supported=yes
13615c30ecadSmrgelse
13625c30ecadSmrg        _pkg_short_errors_supported=no
13635c30ecadSmrgfi[]dnl
13645c30ecadSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED
13655eefee25Smacallan
13665eefee25Smacallan
13675c30ecadSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
13685c30ecadSmrgdnl   [ACTION-IF-NOT-FOUND])
13695c30ecadSmrgdnl --------------------------------------------------------------
13705c30ecadSmrgdnl Since: 0.4.0
13715c30ecadSmrgdnl
13725c30ecadSmrgdnl Note that if there is a possibility the first call to
13735c30ecadSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an
13745c30ecadSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
13755c30ecadSmrgAC_DEFUN([PKG_CHECK_MODULES],
13765c30ecadSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
13775c30ecadSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
13785c30ecadSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
13795eefee25Smacallan
13805c30ecadSmrgpkg_failed=no
13815c30ecadSmrgAC_MSG_CHECKING([for $1])
13825eefee25Smacallan
13835c30ecadSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
13845c30ecadSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
13855eefee25Smacallan
13865c30ecadSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
13875c30ecadSmrgand $1[]_LIBS to avoid the need to call pkg-config.
13885c30ecadSmrgSee the pkg-config man page for more details.])
1389dc99b369Smrg
13905c30ecadSmrgif test $pkg_failed = yes; then
13915c30ecadSmrg   	AC_MSG_RESULT([no])
13925c30ecadSmrg        _PKG_SHORT_ERRORS_SUPPORTED
13935c30ecadSmrg        if test $_pkg_short_errors_supported = yes; then
13945c30ecadSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
13955c30ecadSmrg        else 
13965c30ecadSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
13975c30ecadSmrg        fi
13985c30ecadSmrg	# Put the nasty error message in config.log where it belongs
13995c30ecadSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1400dc99b369Smrg
14015c30ecadSmrg	m4_default([$4], [AC_MSG_ERROR(
14025c30ecadSmrg[Package requirements ($2) were not met:
1403dc99b369Smrg
14045c30ecadSmrg$$1_PKG_ERRORS
1405dc99b369Smrg
14065c30ecadSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
14075c30ecadSmrginstalled software in a non-standard prefix.
1408dc99b369Smrg
14095c30ecadSmrg_PKG_TEXT])[]dnl
14105c30ecadSmrg        ])
14115c30ecadSmrgelif test $pkg_failed = untried; then
14125c30ecadSmrg     	AC_MSG_RESULT([no])
14135c30ecadSmrg	m4_default([$4], [AC_MSG_FAILURE(
14145c30ecadSmrg[The pkg-config script could not be found or is too old.  Make sure it
14155c30ecadSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
14165c30ecadSmrgpath to pkg-config.
1417dc99b369Smrg
14185c30ecadSmrg_PKG_TEXT
1419dc99b369Smrg
14205c30ecadSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
14215c30ecadSmrg        ])
14225c30ecadSmrgelse
14235c30ecadSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
14245c30ecadSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
14255c30ecadSmrg        AC_MSG_RESULT([yes])
14265c30ecadSmrg	$3
14275c30ecadSmrgfi[]dnl
14285c30ecadSmrg])dnl PKG_CHECK_MODULES
1429dc99b369Smrg
1430dc99b369Smrg
14315c30ecadSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
14325c30ecadSmrgdnl   [ACTION-IF-NOT-FOUND])
14335c30ecadSmrgdnl ---------------------------------------------------------------------
14345c30ecadSmrgdnl Since: 0.29
14355c30ecadSmrgdnl
14365c30ecadSmrgdnl Checks for existence of MODULES and gathers its build flags with
14375c30ecadSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
14385c30ecadSmrgdnl and VARIABLE-PREFIX_LIBS from --libs.
14395c30ecadSmrgdnl
14405c30ecadSmrgdnl Note that if there is a possibility the first call to
14415c30ecadSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
14425c30ecadSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your
14435c30ecadSmrgdnl configure.ac.
14445c30ecadSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC],
14455c30ecadSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
14465c30ecadSmrg_save_PKG_CONFIG=$PKG_CONFIG
14475c30ecadSmrgPKG_CONFIG="$PKG_CONFIG --static"
14485c30ecadSmrgPKG_CHECK_MODULES($@)
14495c30ecadSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl
14505c30ecadSmrg])dnl PKG_CHECK_MODULES_STATIC
1451dc99b369Smrg
1452dc99b369Smrg
14535c30ecadSmrgdnl PKG_INSTALLDIR([DIRECTORY])
14545c30ecadSmrgdnl -------------------------
14555c30ecadSmrgdnl Since: 0.27
14565c30ecadSmrgdnl
14575c30ecadSmrgdnl Substitutes the variable pkgconfigdir as the location where a module
14585c30ecadSmrgdnl should install pkg-config .pc files. By default the directory is
14595c30ecadSmrgdnl $libdir/pkgconfig, but the default can be changed by passing
14605c30ecadSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir
14615c30ecadSmrgdnl parameter.
14625c30ecadSmrgAC_DEFUN([PKG_INSTALLDIR],
14635c30ecadSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
14645c30ecadSmrgm4_pushdef([pkg_description],
14655c30ecadSmrg    [pkg-config installation directory @<:@]pkg_default[@:>@])
14665c30ecadSmrgAC_ARG_WITH([pkgconfigdir],
14675c30ecadSmrg    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
14685c30ecadSmrg    [with_pkgconfigdir=]pkg_default)
14695c30ecadSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
14705c30ecadSmrgm4_popdef([pkg_default])
14715c30ecadSmrgm4_popdef([pkg_description])
14725c30ecadSmrg])dnl PKG_INSTALLDIR
1473dc99b369Smrg
1474dc99b369Smrg
14755c30ecadSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
14765c30ecadSmrgdnl --------------------------------
14775c30ecadSmrgdnl Since: 0.27
14785c30ecadSmrgdnl
14795c30ecadSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a
14805c30ecadSmrgdnl module should install arch-independent pkg-config .pc files. By
14815c30ecadSmrgdnl default the directory is $datadir/pkgconfig, but the default can be
14825c30ecadSmrgdnl changed by passing DIRECTORY. The user can override through the
14835c30ecadSmrgdnl --with-noarch-pkgconfigdir parameter.
14845c30ecadSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR],
14855c30ecadSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
14865c30ecadSmrgm4_pushdef([pkg_description],
14875c30ecadSmrg    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
14885c30ecadSmrgAC_ARG_WITH([noarch-pkgconfigdir],
14895c30ecadSmrg    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
14905c30ecadSmrg    [with_noarch_pkgconfigdir=]pkg_default)
14915c30ecadSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
14925c30ecadSmrgm4_popdef([pkg_default])
14935c30ecadSmrgm4_popdef([pkg_description])
14945c30ecadSmrg])dnl PKG_NOARCH_INSTALLDIR
1495dc99b369Smrg
1496dc99b369Smrg
14975c30ecadSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
14985c30ecadSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
14995c30ecadSmrgdnl -------------------------------------------
15005c30ecadSmrgdnl Since: 0.28
15015c30ecadSmrgdnl
15025c30ecadSmrgdnl Retrieves the value of the pkg-config variable for the given module.
15035c30ecadSmrgAC_DEFUN([PKG_CHECK_VAR],
15045c30ecadSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
15055c30ecadSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1506dc99b369Smrg
15075c30ecadSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2])
15085c30ecadSmrgAS_VAR_COPY([$1], [pkg_cv_][$1])
1509dc99b369Smrg
15105c30ecadSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl
15115c30ecadSmrg])dnl PKG_CHECK_VAR
1512dc99b369Smrg
15135c30ecadSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
15145c30ecadSmrgdnl
15155c30ecadSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
15165c30ecadSmrgdnl
15175c30ecadSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
15185c30ecadSmrgdnl copy of this software and associated documentation files (the "Software"),
15195c30ecadSmrgdnl to deal in the Software without restriction, including without limitation
15205c30ecadSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
15215c30ecadSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
15225c30ecadSmrgdnl Software is furnished to do so, subject to the following conditions:
15235c30ecadSmrgdnl
15245c30ecadSmrgdnl The above copyright notice and this permission notice (including the next
15255c30ecadSmrgdnl paragraph) shall be included in all copies or substantial portions of the
15265c30ecadSmrgdnl Software.
15275c30ecadSmrgdnl
15285c30ecadSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15295c30ecadSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15305c30ecadSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
15315c30ecadSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
15325c30ecadSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
15335c30ecadSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
15345c30ecadSmrgdnl DEALINGS IN THE SOFTWARE.
1535dc99b369Smrg
15365c30ecadSmrg# XORG_MACROS_VERSION(required-version)
15375c30ecadSmrg# -------------------------------------
15385c30ecadSmrg# Minimum version: 1.1.0
15395c30ecadSmrg#
15405c30ecadSmrg# If you're using a macro added in Version 1.1 or newer, include this in
15415c30ecadSmrg# your configure.ac with the minimum required version, such as:
15425c30ecadSmrg# XORG_MACROS_VERSION(1.1)
15435c30ecadSmrg#
15445c30ecadSmrg# To ensure that this macro is defined, also add:
15455c30ecadSmrg# m4_ifndef([XORG_MACROS_VERSION],
15465c30ecadSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
15475c30ecadSmrg#
15485c30ecadSmrg#
15495c30ecadSmrg# See the "minimum version" comment for each macro you use to see what
15505c30ecadSmrg# version you require.
15515c30ecadSmrgm4_defun([XORG_MACROS_VERSION],[
15525c30ecadSmrgm4_define([vers_have], [1.19.3])
15535c30ecadSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
15545c30ecadSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
15555c30ecadSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
15565c30ecadSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
15575c30ecadSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
15585c30ecadSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
15595c30ecadSmrgm4_undefine([vers_have])
15605c30ecadSmrgm4_undefine([maj_have])
15615c30ecadSmrgm4_undefine([maj_needed])
15625c30ecadSmrg]) # XORG_MACROS_VERSION
1563dc99b369Smrg
15645c30ecadSmrg# XORG_PROG_RAWCPP()
15655c30ecadSmrg# ------------------
15665c30ecadSmrg# Minimum version: 1.0.0
15675c30ecadSmrg#
15685c30ecadSmrg# Find cpp program and necessary flags for use in pre-processing text files
15695c30ecadSmrg# such as man pages and config files
15705c30ecadSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
15715c30ecadSmrgAC_REQUIRE([AC_PROG_CPP])
15725c30ecadSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
15735c30ecadSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1574dc99b369Smrg
15755c30ecadSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
15765c30ecadSmrg# which is not the best choice for supporting other OS'es, but covers most
15775c30ecadSmrg# of the ones we need for now.
15785c30ecadSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
15795c30ecadSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
15805c30ecadSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
15815c30ecadSmrg	AC_MSG_RESULT([no])
15825c30ecadSmrgelse
15835c30ecadSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
15845c30ecadSmrg		RAWCPPFLAGS=-undef
15855c30ecadSmrg		AC_MSG_RESULT([yes])
15865c30ecadSmrg	# under Cygwin unix is still defined even with -undef
15875c30ecadSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
15885c30ecadSmrg		RAWCPPFLAGS="-undef -ansi"
15895c30ecadSmrg		AC_MSG_RESULT([yes, with -ansi])
15905c30ecadSmrg	else
15915c30ecadSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
15925c30ecadSmrg	fi
15935c30ecadSmrgfi
15945c30ecadSmrgrm -f conftest.$ac_ext
1595dc99b369Smrg
15965c30ecadSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
15975c30ecadSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
15985c30ecadSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
15995c30ecadSmrg	AC_MSG_RESULT([no])
16005c30ecadSmrgelse
16015c30ecadSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
16025c30ecadSmrg		TRADITIONALCPPFLAGS="-traditional"
16035c30ecadSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
16045c30ecadSmrg		AC_MSG_RESULT([yes])
16055c30ecadSmrg	else
16065c30ecadSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
16075c30ecadSmrg	fi
16085c30ecadSmrgfi
16095c30ecadSmrgrm -f conftest.$ac_ext
16105c30ecadSmrgAC_SUBST(RAWCPPFLAGS)
16115c30ecadSmrgAC_SUBST(TRADITIONALCPPFLAGS)
16125c30ecadSmrg]) # XORG_PROG_RAWCPP
1613dc99b369Smrg
16145c30ecadSmrg# XORG_MANPAGE_SECTIONS()
16155c30ecadSmrg# -----------------------
16165c30ecadSmrg# Minimum version: 1.0.0
16175c30ecadSmrg#
16185c30ecadSmrg# Determine which sections man pages go in for the different man page types
16195c30ecadSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
16205c30ecadSmrg# Not sure if there's any better way than just hardcoding by OS name.
16215c30ecadSmrg# Override default settings by setting environment variables
16225c30ecadSmrg# Added MAN_SUBSTS in version 1.8
16235c30ecadSmrg# Added AC_PROG_SED in version 1.8
1624dc99b369Smrg
16255c30ecadSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
16265c30ecadSmrgAC_REQUIRE([AC_CANONICAL_HOST])
16275c30ecadSmrgAC_REQUIRE([AC_PROG_SED])
1628dc99b369Smrg
16295c30ecadSmrgcase $host_os in
16305c30ecadSmrg    solaris*)
16315c30ecadSmrg        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
16325c30ecadSmrg        # check for a man page file found in later versions that use
16335c30ecadSmrg        # traditional section numbers instead
16345c30ecadSmrg        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
16355c30ecadSmrg                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
16365c30ecadSmrg        ;;
16375c30ecadSmrg    *) SYSV_MAN_SECTIONS=false ;;
16385c30ecadSmrgesac
1639dc99b369Smrg
16405c30ecadSmrgif test x$APP_MAN_SUFFIX = x    ; then
16415c30ecadSmrg    APP_MAN_SUFFIX=1
16425c30ecadSmrgfi
16435c30ecadSmrgif test x$APP_MAN_DIR = x    ; then
16445c30ecadSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
16455c30ecadSmrgfi
1646dc99b369Smrg
16475c30ecadSmrgif test x$LIB_MAN_SUFFIX = x    ; then
16485c30ecadSmrg    LIB_MAN_SUFFIX=3
16495c30ecadSmrgfi
16505c30ecadSmrgif test x$LIB_MAN_DIR = x    ; then
16515c30ecadSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
16525c30ecadSmrgfi
1653dc99b369Smrg
16545c30ecadSmrgif test x$FILE_MAN_SUFFIX = x    ; then
16555c30ecadSmrg    case $SYSV_MAN_SECTIONS in
16565c30ecadSmrg	true)				FILE_MAN_SUFFIX=4  ;;
16575c30ecadSmrg	*)				FILE_MAN_SUFFIX=5  ;;
16585c30ecadSmrg    esac
16595c30ecadSmrgfi
16605c30ecadSmrgif test x$FILE_MAN_DIR = x    ; then
16615c30ecadSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
16625c30ecadSmrgfi
16635eefee25Smacallan
16645c30ecadSmrgif test x$MISC_MAN_SUFFIX = x    ; then
16655c30ecadSmrg    case $SYSV_MAN_SECTIONS in
16665c30ecadSmrg	true)				MISC_MAN_SUFFIX=5  ;;
16675c30ecadSmrg	*)				MISC_MAN_SUFFIX=7  ;;
16685c30ecadSmrg    esac
16695c30ecadSmrgfi
16705c30ecadSmrgif test x$MISC_MAN_DIR = x    ; then
16715c30ecadSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
16725c30ecadSmrgfi
16735eefee25Smacallan
16745c30ecadSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
16755c30ecadSmrg    case $SYSV_MAN_SECTIONS in
16765c30ecadSmrg	true)				DRIVER_MAN_SUFFIX=7  ;;
16775c30ecadSmrg	*)				DRIVER_MAN_SUFFIX=4  ;;
16785c30ecadSmrg    esac
16795c30ecadSmrgfi
16805c30ecadSmrgif test x$DRIVER_MAN_DIR = x    ; then
16815c30ecadSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
16825c30ecadSmrgfi
16835eefee25Smacallan
16845c30ecadSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
16855c30ecadSmrg    case $SYSV_MAN_SECTIONS in
16865c30ecadSmrg	true)				ADMIN_MAN_SUFFIX=1m ;;
16875c30ecadSmrg	*)				ADMIN_MAN_SUFFIX=8  ;;
16885c30ecadSmrg    esac
16895c30ecadSmrgfi
16905c30ecadSmrgif test x$ADMIN_MAN_DIR = x    ; then
16915c30ecadSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
1692dc99b369Smrgfi
16935eefee25Smacallan
16945eefee25Smacallan
16955c30ecadSmrgAC_SUBST([APP_MAN_SUFFIX])
16965c30ecadSmrgAC_SUBST([LIB_MAN_SUFFIX])
16975c30ecadSmrgAC_SUBST([FILE_MAN_SUFFIX])
16985c30ecadSmrgAC_SUBST([MISC_MAN_SUFFIX])
16995c30ecadSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
17005c30ecadSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
17015c30ecadSmrgAC_SUBST([APP_MAN_DIR])
17025c30ecadSmrgAC_SUBST([LIB_MAN_DIR])
17035c30ecadSmrgAC_SUBST([FILE_MAN_DIR])
17045c30ecadSmrgAC_SUBST([MISC_MAN_DIR])
17055c30ecadSmrgAC_SUBST([DRIVER_MAN_DIR])
17065c30ecadSmrgAC_SUBST([ADMIN_MAN_DIR])
17075eefee25Smacallan
17085c30ecadSmrgXORG_MAN_PAGE="X Version 11"
17095c30ecadSmrgAC_SUBST([XORG_MAN_PAGE])
17105c30ecadSmrgMAN_SUBSTS="\
17115c30ecadSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
17125c30ecadSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
17135c30ecadSmrg	-e 's|__xservername__|Xorg|g' \
17145c30ecadSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
17155c30ecadSmrg	-e 's|__projectroot__|\$(prefix)|g' \
17165c30ecadSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
17175c30ecadSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
17185c30ecadSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
17195c30ecadSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
17205c30ecadSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
17215c30ecadSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
17225c30ecadSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
17235c30ecadSmrgAC_SUBST([MAN_SUBSTS])
17245eefee25Smacallan
17255c30ecadSmrg]) # XORG_MANPAGE_SECTIONS
17265eefee25Smacallan
17275c30ecadSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
17285c30ecadSmrg# ------------------------
17295c30ecadSmrg# Minimum version: 1.7.0
17305c30ecadSmrg#
17315c30ecadSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
17325c30ecadSmrg# provided by xorg-sgml-doctools, if installed.
17335c30ecadSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
17345c30ecadSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
17355c30ecadSmrgXORG_SGML_PATH=
17365c30ecadSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
17375c30ecadSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
17385c30ecadSmrg    [m4_ifval([$1],[:],
17395c30ecadSmrg        [if test x"$cross_compiling" != x"yes" ; then
17405c30ecadSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
17415c30ecadSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
17425c30ecadSmrg         fi])
17435c30ecadSmrg    ])
1744dc99b369Smrg
17455c30ecadSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
17465c30ecadSmrg# the path and the name of the doc stylesheet
17475c30ecadSmrgif test "x$XORG_SGML_PATH" != "x" ; then
17485c30ecadSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
17495c30ecadSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
17505c30ecadSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
1751dc99b369Smrgelse
17525c30ecadSmrg   AC_MSG_RESULT([no])
1753dc99b369Smrgfi
17545eefee25Smacallan
17555c30ecadSmrgAC_SUBST(XORG_SGML_PATH)
17565c30ecadSmrgAC_SUBST(STYLESHEET_SRCDIR)
17575c30ecadSmrgAC_SUBST(XSL_STYLESHEET)
17585c30ecadSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
17595c30ecadSmrg]) # XORG_CHECK_SGML_DOCTOOLS
17605eefee25Smacallan
17615c30ecadSmrg# XORG_CHECK_LINUXDOC
17625c30ecadSmrg# -------------------
17635c30ecadSmrg# Minimum version: 1.0.0
17645c30ecadSmrg#
17655c30ecadSmrg# Defines the variable MAKE_TEXT if the necessary tools and
17665c30ecadSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
17675c30ecadSmrg# Whether or not the necessary tools and files are found can be checked
17685c30ecadSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
17695c30ecadSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
17705c30ecadSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
17715c30ecadSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
17725eefee25Smacallan
17735c30ecadSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
17745eefee25Smacallan
17755c30ecadSmrgAC_MSG_CHECKING([whether to build documentation])
17765eefee25Smacallan
17775c30ecadSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
17785c30ecadSmrg   BUILDDOC=yes
17795c30ecadSmrgelse
17805c30ecadSmrg   BUILDDOC=no
17815c30ecadSmrgfi
17825eefee25Smacallan
17835c30ecadSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1784dc99b369Smrg
17855c30ecadSmrgAC_MSG_RESULT([$BUILDDOC])
17865eefee25Smacallan
17875c30ecadSmrgAC_MSG_CHECKING([whether to build pdf documentation])
17885eefee25Smacallan
17895c30ecadSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
17905c30ecadSmrg   BUILDPDFDOC=yes
17915c30ecadSmrgelse
17925c30ecadSmrg   BUILDPDFDOC=no
17935c30ecadSmrgfi
17945eefee25Smacallan
17955c30ecadSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
17965eefee25Smacallan
17975c30ecadSmrgAC_MSG_RESULT([$BUILDPDFDOC])
17985eefee25Smacallan
17995c30ecadSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
18005c30ecadSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
18015c30ecadSmrgMAKE_PDF="$PS2PDF"
18025c30ecadSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
18035eefee25Smacallan
18045c30ecadSmrgAC_SUBST(MAKE_TEXT)
18055c30ecadSmrgAC_SUBST(MAKE_PS)
18065c30ecadSmrgAC_SUBST(MAKE_PDF)
18075c30ecadSmrgAC_SUBST(MAKE_HTML)
18085c30ecadSmrg]) # XORG_CHECK_LINUXDOC
18095eefee25Smacallan
18105c30ecadSmrg# XORG_CHECK_DOCBOOK
18115c30ecadSmrg# -------------------
18125c30ecadSmrg# Minimum version: 1.0.0
18135c30ecadSmrg#
18145c30ecadSmrg# Checks for the ability to build output formats from SGML DocBook source.
18155c30ecadSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
18165c30ecadSmrg# indicates whether the necessary tools and files are found and, if set,
18175c30ecadSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
18185c30ecadSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
18195c30ecadSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
18205eefee25Smacallan
18215c30ecadSmrgBUILDTXTDOC=no
18225c30ecadSmrgBUILDPDFDOC=no
18235c30ecadSmrgBUILDPSDOC=no
18245c30ecadSmrgBUILDHTMLDOC=no
1825dc99b369Smrg
18265c30ecadSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
18275c30ecadSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
18285c30ecadSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
18295c30ecadSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
18305eefee25Smacallan
18315c30ecadSmrgAC_MSG_CHECKING([whether to build text documentation])
18325c30ecadSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
18335c30ecadSmrg   test x$BUILD_TXTDOC != xno; then
18345c30ecadSmrg	BUILDTXTDOC=yes
1835dc99b369Smrgfi
18365c30ecadSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
18375c30ecadSmrgAC_MSG_RESULT([$BUILDTXTDOC])
18385eefee25Smacallan
18395c30ecadSmrgAC_MSG_CHECKING([whether to build PDF documentation])
18405c30ecadSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
18415c30ecadSmrg   test x$BUILD_PDFDOC != xno; then
18425c30ecadSmrg	BUILDPDFDOC=yes
18435c30ecadSmrgfi
18445c30ecadSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
18455c30ecadSmrgAC_MSG_RESULT([$BUILDPDFDOC])
18465eefee25Smacallan
18475c30ecadSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
18485c30ecadSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
18495c30ecadSmrg   test x$BUILD_PSDOC != xno; then
18505c30ecadSmrg	BUILDPSDOC=yes
18515c30ecadSmrgfi
18525c30ecadSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
18535c30ecadSmrgAC_MSG_RESULT([$BUILDPSDOC])
18545eefee25Smacallan
18555c30ecadSmrgAC_MSG_CHECKING([whether to build HTML documentation])
18565c30ecadSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
18575c30ecadSmrg   test x$BUILD_HTMLDOC != xno; then
18585c30ecadSmrg	BUILDHTMLDOC=yes
18595c30ecadSmrgfi
18605c30ecadSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
18615c30ecadSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
1862dc99b369Smrg
18635c30ecadSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
18645c30ecadSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
18655c30ecadSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
18665c30ecadSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
18675eefee25Smacallan
18685c30ecadSmrgAC_SUBST(MAKE_TEXT)
18695c30ecadSmrgAC_SUBST(MAKE_PS)
18705c30ecadSmrgAC_SUBST(MAKE_PDF)
18715c30ecadSmrgAC_SUBST(MAKE_HTML)
18725c30ecadSmrg]) # XORG_CHECK_DOCBOOK
18735eefee25Smacallan
18745c30ecadSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
18755c30ecadSmrg# ----------------
18765c30ecadSmrg# Minimum version: 1.5.0
18775c30ecadSmrg# Minimum version for optional DEFAULT argument: 1.11.0
18785c30ecadSmrg#
18795c30ecadSmrg# Documentation tools are not always available on all platforms and sometimes
18805c30ecadSmrg# not at the appropriate level. This macro enables a module to test for the
18815c30ecadSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
18825c30ecadSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
18835c30ecadSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
18845c30ecadSmrg# --with-xmlto assumes 'auto'.
18855c30ecadSmrg#
18865c30ecadSmrg# Interface to module:
18875c30ecadSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
18885c30ecadSmrg# XMLTO:	returns the path of the xmlto program found
18895c30ecadSmrg#		returns the path set by the user in the environment
18905c30ecadSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
18915c30ecadSmrg#		'no' user instructs the module not to use xmlto
18925c30ecadSmrg#
18935c30ecadSmrg# Added in version 1.10.0
18945c30ecadSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
18955c30ecadSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
18965c30ecadSmrg#
18975c30ecadSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
18985c30ecadSmrg#
18995c30ecadSmrgAC_DEFUN([XORG_WITH_XMLTO],[
19005c30ecadSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
19015c30ecadSmrgm4_define([_defopt], m4_default([$2], [auto]))
19025c30ecadSmrgAC_ARG_WITH(xmlto,
19035c30ecadSmrg	AS_HELP_STRING([--with-xmlto],
19045c30ecadSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
19055c30ecadSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
19065c30ecadSmrgm4_undefine([_defopt])
19075eefee25Smacallan
19085c30ecadSmrgif test "x$use_xmlto" = x"auto"; then
19095c30ecadSmrg   AC_PATH_PROG([XMLTO], [xmlto])
19105c30ecadSmrg   if test "x$XMLTO" = "x"; then
19115c30ecadSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
19125c30ecadSmrg	have_xmlto=no
19135c30ecadSmrg   else
19145c30ecadSmrg        have_xmlto=yes
19155eefee25Smacallan   fi
19165c30ecadSmrgelif test "x$use_xmlto" = x"yes" ; then
19175c30ecadSmrg   AC_PATH_PROG([XMLTO], [xmlto])
19185c30ecadSmrg   if test "x$XMLTO" = "x"; then
19195c30ecadSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
19205c30ecadSmrg   fi
19215c30ecadSmrg   have_xmlto=yes
19225c30ecadSmrgelif test "x$use_xmlto" = x"no" ; then
19235c30ecadSmrg   if test "x$XMLTO" != "x"; then
19245c30ecadSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
19255c30ecadSmrg   fi
19265c30ecadSmrg   have_xmlto=no
19275eefee25Smacallanelse
19285c30ecadSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
19295eefee25Smacallanfi
19305eefee25Smacallan
19315c30ecadSmrg# Test for a minimum version of xmlto, if provided.
19325c30ecadSmrgm4_ifval([$1],
19335c30ecadSmrg[if test "$have_xmlto" = yes; then
19345c30ecadSmrg    # scrape the xmlto version
19355c30ecadSmrg    AC_MSG_CHECKING([the xmlto version])
19365c30ecadSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
19375c30ecadSmrg    AC_MSG_RESULT([$xmlto_version])
19385c30ecadSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
19395c30ecadSmrg        [if test "x$use_xmlto" = xauto; then
19405c30ecadSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
19415c30ecadSmrg            have_xmlto=no
19425c30ecadSmrg        else
19435c30ecadSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
19445c30ecadSmrg        fi])
19455c30ecadSmrgfi])
19465eefee25Smacallan
19475c30ecadSmrg# Test for the ability of xmlto to generate a text target
19485c30ecadSmrg#
19495c30ecadSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
19505c30ecadSmrg# following test for empty XML docbook files.
19515c30ecadSmrg# For compatibility reasons use the following empty XML docbook file and if
19525c30ecadSmrg# it fails try it again with a non-empty XML file.
19535c30ecadSmrghave_xmlto_text=no
19545c30ecadSmrgcat > conftest.xml << "EOF"
19555c30ecadSmrgEOF
19565c30ecadSmrgAS_IF([test "$have_xmlto" = yes],
19575c30ecadSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
19585c30ecadSmrg             [have_xmlto_text=yes],
19595c30ecadSmrg             [# Try it again with a non-empty XML file.
19605c30ecadSmrg              cat > conftest.xml << "EOF"
19615c30ecadSmrg<x></x>
19625c30ecadSmrgEOF
19635c30ecadSmrg              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
19645c30ecadSmrg                    [have_xmlto_text=yes],
19655c30ecadSmrg                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
19665c30ecadSmrgrm -f conftest.xml
19675c30ecadSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
19685c30ecadSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
19695c30ecadSmrg]) # XORG_WITH_XMLTO
1970dc99b369Smrg
19715c30ecadSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
19725c30ecadSmrg# --------------------------------------------
19735c30ecadSmrg# Minimum version: 1.12.0
19745c30ecadSmrg# Minimum version for optional DEFAULT argument: 1.12.0
19755c30ecadSmrg#
19765c30ecadSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
19775c30ecadSmrg# XML-based language used for the transformation of XML documents.
19785c30ecadSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
19795c30ecadSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
19805c30ecadSmrg# The XSLT processor is often used as a standalone tool for transformations.
19815c30ecadSmrg# It should not be assumed that this tool is used only to work with documnetation.
19825c30ecadSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
19835c30ecadSmrg#
19845c30ecadSmrg# Interface to module:
19855c30ecadSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
19865c30ecadSmrg# XSLTPROC:	 returns the path of the xsltproc program found
19875c30ecadSmrg#		 returns the path set by the user in the environment
19885c30ecadSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
19895c30ecadSmrg#		  'no' user instructs the module not to use xsltproc
19905c30ecadSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
19915c30ecadSmrg#
19925c30ecadSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
19935c30ecadSmrg#
19945c30ecadSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
19955c30ecadSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
19965c30ecadSmrg# Preserves the interface, should it be implemented later
19975c30ecadSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
19985c30ecadSmrgm4_define([_defopt], m4_default([$2], [auto]))
19995c30ecadSmrgAC_ARG_WITH(xsltproc,
20005c30ecadSmrg	AS_HELP_STRING([--with-xsltproc],
20015c30ecadSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
20025c30ecadSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
20035c30ecadSmrgm4_undefine([_defopt])
2004dc99b369Smrg
20055c30ecadSmrgif test "x$use_xsltproc" = x"auto"; then
20065c30ecadSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
20075c30ecadSmrg   if test "x$XSLTPROC" = "x"; then
20085c30ecadSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
20095c30ecadSmrg	have_xsltproc=no
20105c30ecadSmrg   else
20115c30ecadSmrg        have_xsltproc=yes
20125c30ecadSmrg   fi
20135c30ecadSmrgelif test "x$use_xsltproc" = x"yes" ; then
20145c30ecadSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
20155c30ecadSmrg   if test "x$XSLTPROC" = "x"; then
20165c30ecadSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
20175c30ecadSmrg   fi
20185c30ecadSmrg   have_xsltproc=yes
20195c30ecadSmrgelif test "x$use_xsltproc" = x"no" ; then
20205c30ecadSmrg   if test "x$XSLTPROC" != "x"; then
20215c30ecadSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
20225c30ecadSmrg   fi
20235c30ecadSmrg   have_xsltproc=no
20245eefee25Smacallanelse
20255c30ecadSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
20265eefee25Smacallanfi
20275eefee25Smacallan
20285c30ecadSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
20295c30ecadSmrg]) # XORG_WITH_XSLTPROC
20305eefee25Smacallan
20315c30ecadSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
20325c30ecadSmrg# ----------------------------------------
20335c30ecadSmrg# Minimum version: 1.15.0
20345c30ecadSmrg#
20355c30ecadSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
20365c30ecadSmrg# scanning arbitrary text files, extracting information from those text files,
20375c30ecadSmrg# and printing reports based on that information.
20385c30ecadSmrg#
20395c30ecadSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
20405c30ecadSmrg#
20415c30ecadSmrg# Interface to module:
20425c30ecadSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
20435c30ecadSmrg# PERL:	     returns the path of the perl program found
20445c30ecadSmrg#	     returns the path set by the user in the environment
20455c30ecadSmrg# --with-perl: 'yes' user instructs the module to use perl
20465c30ecadSmrg#	       'no' user instructs the module not to use perl
20475c30ecadSmrg# have_perl: returns yes if perl found in PATH or no
20485c30ecadSmrg#
20495c30ecadSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
20505c30ecadSmrg#
20515c30ecadSmrgAC_DEFUN([XORG_WITH_PERL],[
20525c30ecadSmrgAC_ARG_VAR([PERL], [Path to perl command])
20535c30ecadSmrg# Preserves the interface, should it be implemented later
20545c30ecadSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
20555c30ecadSmrgm4_define([_defopt], m4_default([$2], [auto]))
20565c30ecadSmrgAC_ARG_WITH(perl,
20575c30ecadSmrg	AS_HELP_STRING([--with-perl],
20585c30ecadSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
20595c30ecadSmrg	   [use_perl=$withval], [use_perl=]_defopt)
20605c30ecadSmrgm4_undefine([_defopt])
20615eefee25Smacallan
20625c30ecadSmrgif test "x$use_perl" = x"auto"; then
20635c30ecadSmrg   AC_PATH_PROG([PERL], [perl])
20645c30ecadSmrg   if test "x$PERL" = "x"; then
20655c30ecadSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
20665c30ecadSmrg	have_perl=no
20675c30ecadSmrg   else
20685c30ecadSmrg        have_perl=yes
20695c30ecadSmrg   fi
20705c30ecadSmrgelif test "x$use_perl" = x"yes" ; then
20715c30ecadSmrg   AC_PATH_PROG([PERL], [perl])
20725c30ecadSmrg   if test "x$PERL" = "x"; then
20735c30ecadSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
20745c30ecadSmrg   fi
20755c30ecadSmrg   have_perl=yes
20765c30ecadSmrgelif test "x$use_perl" = x"no" ; then
20775c30ecadSmrg   if test "x$PERL" != "x"; then
20785c30ecadSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
20795c30ecadSmrg   fi
20805c30ecadSmrg   have_perl=no
2081dc99b369Smrgelse
20825c30ecadSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
2083dc99b369Smrgfi
20845eefee25Smacallan
20855c30ecadSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
20865c30ecadSmrg]) # XORG_WITH_PERL
20875eefee25Smacallan
20885c30ecadSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
2089dc99b369Smrg# ----------------
20905c30ecadSmrg# Minimum version: 1.5.0
20915c30ecadSmrg# Minimum version for optional DEFAULT argument: 1.11.0
20925c30ecadSmrg#
20935c30ecadSmrg# Documentation tools are not always available on all platforms and sometimes
20945c30ecadSmrg# not at the appropriate level. This macro enables a module to test for the
20955c30ecadSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
20965c30ecadSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
20975c30ecadSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
20985c30ecadSmrg# --with-asciidoc assumes 'auto'.
20995c30ecadSmrg#
21005c30ecadSmrg# Interface to module:
21015c30ecadSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
21025c30ecadSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
21035c30ecadSmrg#		 returns the path set by the user in the environment
21045c30ecadSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
21055c30ecadSmrg#		  'no' user instructs the module not to use asciidoc
21065c30ecadSmrg#
21075c30ecadSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
21085c30ecadSmrg#
21095c30ecadSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
21105c30ecadSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
21115c30ecadSmrgm4_define([_defopt], m4_default([$2], [auto]))
21125c30ecadSmrgAC_ARG_WITH(asciidoc,
21135c30ecadSmrg	AS_HELP_STRING([--with-asciidoc],
21145c30ecadSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
21155c30ecadSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
21165c30ecadSmrgm4_undefine([_defopt])
21175eefee25Smacallan
21185c30ecadSmrgif test "x$use_asciidoc" = x"auto"; then
21195c30ecadSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
21205c30ecadSmrg   if test "x$ASCIIDOC" = "x"; then
21215c30ecadSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
21225c30ecadSmrg	have_asciidoc=no
21235c30ecadSmrg   else
21245c30ecadSmrg        have_asciidoc=yes
21255c30ecadSmrg   fi
21265c30ecadSmrgelif test "x$use_asciidoc" = x"yes" ; then
21275c30ecadSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
21285c30ecadSmrg   if test "x$ASCIIDOC" = "x"; then
21295c30ecadSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
21305c30ecadSmrg   fi
21315c30ecadSmrg   have_asciidoc=yes
21325c30ecadSmrgelif test "x$use_asciidoc" = x"no" ; then
21335c30ecadSmrg   if test "x$ASCIIDOC" != "x"; then
21345c30ecadSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
21355c30ecadSmrg   fi
21365c30ecadSmrg   have_asciidoc=no
2137dc99b369Smrgelse
21385c30ecadSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
21395c30ecadSmrgfi
21405c30ecadSmrgm4_ifval([$1],
21415c30ecadSmrg[if test "$have_asciidoc" = yes; then
21425c30ecadSmrg    # scrape the asciidoc version
21435c30ecadSmrg    AC_MSG_CHECKING([the asciidoc version])
21445c30ecadSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
21455c30ecadSmrg    AC_MSG_RESULT([$asciidoc_version])
21465c30ecadSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
21475c30ecadSmrg        [if test "x$use_asciidoc" = xauto; then
21485c30ecadSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
21495c30ecadSmrg            have_asciidoc=no
21505c30ecadSmrg        else
21515c30ecadSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
21525c30ecadSmrg        fi])
21535c30ecadSmrgfi])
21545c30ecadSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
21555c30ecadSmrg]) # XORG_WITH_ASCIIDOC
21565eefee25Smacallan
21575c30ecadSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
21585c30ecadSmrg# -------------------------------------------
21595c30ecadSmrg# Minimum version: 1.5.0
21605c30ecadSmrg# Minimum version for optional DEFAULT argument: 1.11.0
21615c30ecadSmrg# Minimum version for optional DOT checking: 1.18.0
21625c30ecadSmrg#
21635c30ecadSmrg# Documentation tools are not always available on all platforms and sometimes
21645c30ecadSmrg# not at the appropriate level. This macro enables a module to test for the
21655c30ecadSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
21665c30ecadSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
21675c30ecadSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
21685c30ecadSmrg# --with-doxygen assumes 'auto'.
21695c30ecadSmrg#
21705c30ecadSmrg# Interface to module:
21715c30ecadSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
21725c30ecadSmrg# DOXYGEN:	 returns the path of the doxygen program found
21735c30ecadSmrg#		 returns the path set by the user in the environment
21745c30ecadSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
21755c30ecadSmrg#		  'no' user instructs the module not to use doxygen
21765c30ecadSmrg#
21775c30ecadSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
21785c30ecadSmrg#
21795c30ecadSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
21805c30ecadSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
21815c30ecadSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility])
21825c30ecadSmrgm4_define([_defopt], m4_default([$2], [auto]))
21835c30ecadSmrgAC_ARG_WITH(doxygen,
21845c30ecadSmrg	AS_HELP_STRING([--with-doxygen],
21855c30ecadSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
21865c30ecadSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
21875c30ecadSmrgm4_undefine([_defopt])
21885eefee25Smacallan
21895c30ecadSmrgif test "x$use_doxygen" = x"auto"; then
21905c30ecadSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
21915c30ecadSmrg   if test "x$DOXYGEN" = "x"; then
21925c30ecadSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
21935c30ecadSmrg	have_doxygen=no
21945c30ecadSmrg   else
21955c30ecadSmrg        have_doxygen=yes
21965c30ecadSmrg   fi
21975c30ecadSmrgelif test "x$use_doxygen" = x"yes" ; then
21985c30ecadSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
21995c30ecadSmrg   if test "x$DOXYGEN" = "x"; then
22005c30ecadSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
22015c30ecadSmrg   fi
22025c30ecadSmrg   have_doxygen=yes
22035c30ecadSmrgelif test "x$use_doxygen" = x"no" ; then
22045c30ecadSmrg   if test "x$DOXYGEN" != "x"; then
22055c30ecadSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
22065c30ecadSmrg   fi
22075c30ecadSmrg   have_doxygen=no
22085c30ecadSmrgelse
22095c30ecadSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
22105c30ecadSmrgfi
22115c30ecadSmrgm4_ifval([$1],
22125c30ecadSmrg[if test "$have_doxygen" = yes; then
22135c30ecadSmrg    # scrape the doxygen version
22145c30ecadSmrg    AC_MSG_CHECKING([the doxygen version])
22155c30ecadSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
22165c30ecadSmrg    AC_MSG_RESULT([$doxygen_version])
22175c30ecadSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
22185c30ecadSmrg        [if test "x$use_doxygen" = xauto; then
22195c30ecadSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
22205c30ecadSmrg            have_doxygen=no
22215c30ecadSmrg        else
22225c30ecadSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
22235c30ecadSmrg        fi])
22245c30ecadSmrgfi])
22255eefee25Smacallan
22265c30ecadSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory
22275c30ecadSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
22285c30ecadSmrgdnl 	HAVE_DOT = @HAVE_DOT@
22295c30ecadSmrgHAVE_DOT=no
22305c30ecadSmrgif test "x$have_doxygen" = "xyes"; then
22315c30ecadSmrg  AC_PATH_PROG([DOT], [dot])
22325c30ecadSmrg    if test "x$DOT" != "x"; then
22335c30ecadSmrg      HAVE_DOT=yes
22345c30ecadSmrg    fi
22355c30ecadSmrgfi
22365eefee25Smacallan
22375c30ecadSmrgAC_SUBST([HAVE_DOT])
22385c30ecadSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
22395c30ecadSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
22405c30ecadSmrg]) # XORG_WITH_DOXYGEN
2241dc99b369Smrg
22425c30ecadSmrg# XORG_WITH_GROFF([DEFAULT])
22435c30ecadSmrg# ----------------
22445c30ecadSmrg# Minimum version: 1.6.0
22455c30ecadSmrg# Minimum version for optional DEFAULT argument: 1.11.0
22465c30ecadSmrg#
22475c30ecadSmrg# Documentation tools are not always available on all platforms and sometimes
22485c30ecadSmrg# not at the appropriate level. This macro enables a module to test for the
22495c30ecadSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
22505c30ecadSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
22515c30ecadSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
22525c30ecadSmrg# --with-groff assumes 'auto'.
22535c30ecadSmrg#
22545c30ecadSmrg# Interface to module:
22555c30ecadSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
22565c30ecadSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
22575c30ecadSmrg# HAVE_GROFF_MS: the -ms macros package
22585c30ecadSmrg# GROFF:	 returns the path of the groff program found
22595c30ecadSmrg#		 returns the path set by the user in the environment
22605c30ecadSmrg# --with-groff:	 'yes' user instructs the module to use groff
22615c30ecadSmrg#		 'no' user instructs the module not to use groff
22625c30ecadSmrg#
22635c30ecadSmrg# Added in version 1.9.0:
22645c30ecadSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
22655c30ecadSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
22665c30ecadSmrg#		   psselect from the psutils package.
22675c30ecadSmrg#		   the ghostcript package. Refer to the grohtml man pages
22685c30ecadSmrg#
22695c30ecadSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
22705c30ecadSmrg#
22715c30ecadSmrg# OS and distros often splits groff in a basic and full package, the former
22725c30ecadSmrg# having the groff program and the later having devices, fonts and macros
22735c30ecadSmrg# Checking for the groff executable is not enough.
22745c30ecadSmrg#
22755c30ecadSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
22765c30ecadSmrg# unset HAVE_GROFF or GROFF env variables.
22775c30ecadSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
22785c30ecadSmrg#
22795c30ecadSmrgAC_DEFUN([XORG_WITH_GROFF],[
22805c30ecadSmrgAC_ARG_VAR([GROFF], [Path to groff command])
22815c30ecadSmrgm4_define([_defopt], m4_default([$1], [auto]))
22825c30ecadSmrgAC_ARG_WITH(groff,
22835c30ecadSmrg	AS_HELP_STRING([--with-groff],
22845c30ecadSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
22855c30ecadSmrg	   [use_groff=$withval], [use_groff=]_defopt)
22865c30ecadSmrgm4_undefine([_defopt])
2287dc99b369Smrg
22885c30ecadSmrgif test "x$use_groff" = x"auto"; then
22895c30ecadSmrg   AC_PATH_PROG([GROFF], [groff])
22905c30ecadSmrg   if test "x$GROFF" = "x"; then
22915c30ecadSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
22925c30ecadSmrg	have_groff=no
22935c30ecadSmrg   else
22945c30ecadSmrg        have_groff=yes
22955c30ecadSmrg   fi
22965c30ecadSmrgelif test "x$use_groff" = x"yes" ; then
22975c30ecadSmrg   AC_PATH_PROG([GROFF], [groff])
22985c30ecadSmrg   if test "x$GROFF" = "x"; then
22995c30ecadSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
23005c30ecadSmrg   fi
23015c30ecadSmrg   have_groff=yes
23025c30ecadSmrgelif test "x$use_groff" = x"no" ; then
23035c30ecadSmrg   if test "x$GROFF" != "x"; then
23045c30ecadSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
23055c30ecadSmrg   fi
23065c30ecadSmrg   have_groff=no
23075c30ecadSmrgelse
23085c30ecadSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
2309dc99b369Smrgfi
2310dc99b369Smrg
23115c30ecadSmrg# We have groff, test for the presence of the macro packages
23125c30ecadSmrgif test "x$have_groff" = x"yes"; then
23135c30ecadSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
23145c30ecadSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
23155c30ecadSmrg        groff_ms_works=yes
23165c30ecadSmrg    else
23175c30ecadSmrg        groff_ms_works=no
23185c30ecadSmrg    fi
23195c30ecadSmrg    AC_MSG_RESULT([$groff_ms_works])
23205c30ecadSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
23215c30ecadSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
23225c30ecadSmrg        groff_mm_works=yes
23235c30ecadSmrg    else
23245c30ecadSmrg        groff_mm_works=no
23255c30ecadSmrg    fi
23265c30ecadSmrg    AC_MSG_RESULT([$groff_mm_works])
23275c30ecadSmrgfi
2328dc99b369Smrg
23295c30ecadSmrg# We have groff, test for HTML dependencies, one command per package
23305c30ecadSmrgif test "x$have_groff" = x"yes"; then
23315c30ecadSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
23325c30ecadSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
23335c30ecadSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
23345c30ecadSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
23355c30ecadSmrg      have_groff_html=yes
23365c30ecadSmrg   else
23375c30ecadSmrg      have_groff_html=no
23385c30ecadSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
23395c30ecadSmrg   fi
23405c30ecadSmrgfi
2341dc99b369Smrg
23425c30ecadSmrg# Set Automake conditionals for Makefiles
23435c30ecadSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
23445c30ecadSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
23455c30ecadSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
23465c30ecadSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
23475c30ecadSmrg]) # XORG_WITH_GROFF
2348dc99b369Smrg
23495c30ecadSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
23505c30ecadSmrg# ---------------------------------------
23515c30ecadSmrg# Minimum version: 1.6.0
23525c30ecadSmrg# Minimum version for optional DEFAULT argument: 1.11.0
23535c30ecadSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
23545c30ecadSmrg#
23555c30ecadSmrg# Documentation tools are not always available on all platforms and sometimes
23565c30ecadSmrg# not at the appropriate level. This macro enables a module to test for the
23575c30ecadSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
23585c30ecadSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
23595c30ecadSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
23605c30ecadSmrg# --with-fop assumes 'auto'.
23615c30ecadSmrg#
23625c30ecadSmrg# Interface to module:
23635c30ecadSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
23645c30ecadSmrg# FOP:	 	returns the path of the fop program found
23655c30ecadSmrg#		returns the path set by the user in the environment
23665c30ecadSmrg# --with-fop: 	'yes' user instructs the module to use fop
23675c30ecadSmrg#		'no' user instructs the module not to use fop
23685c30ecadSmrg#
23695c30ecadSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
23705c30ecadSmrg#
23715c30ecadSmrgAC_DEFUN([XORG_WITH_FOP],[
23725c30ecadSmrgAC_ARG_VAR([FOP], [Path to fop command])
23735c30ecadSmrgm4_define([_defopt], m4_default([$2], [auto]))
23745c30ecadSmrgAC_ARG_WITH(fop,
23755c30ecadSmrg	AS_HELP_STRING([--with-fop],
23765c30ecadSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
23775c30ecadSmrg	   [use_fop=$withval], [use_fop=]_defopt)
23785c30ecadSmrgm4_undefine([_defopt])
2379dc99b369Smrg
23805c30ecadSmrgif test "x$use_fop" = x"auto"; then
23815c30ecadSmrg   AC_PATH_PROG([FOP], [fop])
23825c30ecadSmrg   if test "x$FOP" = "x"; then
23835c30ecadSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
23845c30ecadSmrg	have_fop=no
23855c30ecadSmrg   else
23865c30ecadSmrg        have_fop=yes
23875c30ecadSmrg   fi
23885c30ecadSmrgelif test "x$use_fop" = x"yes" ; then
23895c30ecadSmrg   AC_PATH_PROG([FOP], [fop])
23905c30ecadSmrg   if test "x$FOP" = "x"; then
23915c30ecadSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
23925c30ecadSmrg   fi
23935c30ecadSmrg   have_fop=yes
23945c30ecadSmrgelif test "x$use_fop" = x"no" ; then
23955c30ecadSmrg   if test "x$FOP" != "x"; then
23965c30ecadSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
23975c30ecadSmrg   fi
23985c30ecadSmrg   have_fop=no
23995c30ecadSmrgelse
24005c30ecadSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
24015c30ecadSmrgfi
2402dc99b369Smrg
24035c30ecadSmrg# Test for a minimum version of fop, if provided.
24045c30ecadSmrgm4_ifval([$1],
24055c30ecadSmrg[if test "$have_fop" = yes; then
24065c30ecadSmrg    # scrape the fop version
24075c30ecadSmrg    AC_MSG_CHECKING([for fop minimum version])
24085c30ecadSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
24095c30ecadSmrg    AC_MSG_RESULT([$fop_version])
24105c30ecadSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
24115c30ecadSmrg        [if test "x$use_fop" = xauto; then
24125c30ecadSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
24135c30ecadSmrg            have_fop=no
24145c30ecadSmrg        else
24155c30ecadSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
24165c30ecadSmrg        fi])
24175c30ecadSmrgfi])
24185c30ecadSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
24195c30ecadSmrg]) # XORG_WITH_FOP
2420dc99b369Smrg
24215c30ecadSmrg# XORG_WITH_M4([MIN-VERSION])
24225c30ecadSmrg# ---------------------------
24235c30ecadSmrg# Minimum version: 1.19.0
24245c30ecadSmrg#
24255c30ecadSmrg# This macro attempts to locate an m4 macro processor which supports
24265c30ecadSmrg# -I option and is only useful for modules relying on M4 in order to
24275c30ecadSmrg# expand macros in source code files.
24285c30ecadSmrg#
24295c30ecadSmrg# Interface to module:
24305c30ecadSmrg# M4:	 	returns the path of the m4 program found
24315c30ecadSmrg#		returns the path set by the user in the environment
24325c30ecadSmrg#
24335c30ecadSmrgAC_DEFUN([XORG_WITH_M4], [
24345c30ecadSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
24355c30ecadSmrg   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
24365c30ecadSmrg       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
24375c30ecadSmrg         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
24385c30ecadSmrg   [AC_MSG_ERROR([could not find m4 that supports -I option])],
24395c30ecadSmrg   [$PATH:/usr/gnu/bin])])
2440dc99b369Smrg
24415c30ecadSmrgAC_SUBST([M4], [$ac_cv_path_M4])
24425c30ecadSmrg]) # XORG_WITH_M4
24435eefee25Smacallan
24445c30ecadSmrg# XORG_WITH_PS2PDF([DEFAULT])
24455c30ecadSmrg# ----------------
24465c30ecadSmrg# Minimum version: 1.6.0
24475c30ecadSmrg# Minimum version for optional DEFAULT argument: 1.11.0
24485c30ecadSmrg#
24495c30ecadSmrg# Documentation tools are not always available on all platforms and sometimes
24505c30ecadSmrg# not at the appropriate level. This macro enables a module to test for the
24515c30ecadSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
24525c30ecadSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
24535c30ecadSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
24545c30ecadSmrg# --with-ps2pdf assumes 'auto'.
24555c30ecadSmrg#
24565c30ecadSmrg# Interface to module:
24575c30ecadSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
24585c30ecadSmrg# PS2PDF:	returns the path of the ps2pdf program found
24595c30ecadSmrg#		returns the path set by the user in the environment
24605c30ecadSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
24615c30ecadSmrg#		 'no' user instructs the module not to use ps2pdf
24625c30ecadSmrg#
24635c30ecadSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
24645c30ecadSmrg#
24655c30ecadSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
24665c30ecadSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
24675c30ecadSmrgm4_define([_defopt], m4_default([$1], [auto]))
24685c30ecadSmrgAC_ARG_WITH(ps2pdf,
24695c30ecadSmrg	AS_HELP_STRING([--with-ps2pdf],
24705c30ecadSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
24715c30ecadSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
24725c30ecadSmrgm4_undefine([_defopt])
2473dc99b369Smrg
24745c30ecadSmrgif test "x$use_ps2pdf" = x"auto"; then
24755c30ecadSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
24765c30ecadSmrg   if test "x$PS2PDF" = "x"; then
24775c30ecadSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
24785c30ecadSmrg	have_ps2pdf=no
24795c30ecadSmrg   else
24805c30ecadSmrg        have_ps2pdf=yes
24815c30ecadSmrg   fi
24825c30ecadSmrgelif test "x$use_ps2pdf" = x"yes" ; then
24835c30ecadSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
24845c30ecadSmrg   if test "x$PS2PDF" = "x"; then
24855c30ecadSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
24865c30ecadSmrg   fi
24875c30ecadSmrg   have_ps2pdf=yes
24885c30ecadSmrgelif test "x$use_ps2pdf" = x"no" ; then
24895c30ecadSmrg   if test "x$PS2PDF" != "x"; then
24905c30ecadSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
24915c30ecadSmrg   fi
24925c30ecadSmrg   have_ps2pdf=no
24935c30ecadSmrgelse
24945c30ecadSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
2495dc99b369Smrgfi
24965c30ecadSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
24975c30ecadSmrg]) # XORG_WITH_PS2PDF
24985eefee25Smacallan
24995c30ecadSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
25005c30ecadSmrg# ----------------
25015c30ecadSmrg# Minimum version: 1.6.0
25025c30ecadSmrg#
25035c30ecadSmrg# Documentation tools are not always available on all platforms and sometimes
25045c30ecadSmrg# not at the appropriate level. This macro enables a builder to skip all
25055c30ecadSmrg# documentation targets except traditional man pages.
25065c30ecadSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
25075c30ecadSmrg# maximum flexibilty in controlling documentation building.
25085c30ecadSmrg# Refer to:
25095c30ecadSmrg# XORG_WITH_XMLTO         --with-xmlto
25105c30ecadSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
25115c30ecadSmrg# XORG_WITH_DOXYGEN       --with-doxygen
25125c30ecadSmrg# XORG_WITH_FOP           --with-fop
25135c30ecadSmrg# XORG_WITH_GROFF         --with-groff
25145c30ecadSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
25155c30ecadSmrg#
25165c30ecadSmrg# Interface to module:
25175c30ecadSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
25185c30ecadSmrg# --enable-docs: 'yes' user instructs the module to generate docs
25195c30ecadSmrg#		 'no' user instructs the module not to generate docs
25205c30ecadSmrg# parm1:	specify the default value, yes or no.
25215c30ecadSmrg#
25225c30ecadSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
25235c30ecadSmrgm4_define([docs_default], m4_default([$1], [yes]))
25245c30ecadSmrgAC_ARG_ENABLE(docs,
25255c30ecadSmrg	AS_HELP_STRING([--enable-docs],
25265c30ecadSmrg	   [Enable building the documentation (default: ]docs_default[)]),
25275c30ecadSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
25285c30ecadSmrgm4_undefine([docs_default])
25295c30ecadSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
25305c30ecadSmrgAC_MSG_CHECKING([whether to build documentation])
25315c30ecadSmrgAC_MSG_RESULT([$build_docs])
25325c30ecadSmrg]) # XORG_ENABLE_DOCS
25335eefee25Smacallan
25345c30ecadSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
25355c30ecadSmrg# ----------------
25365c30ecadSmrg# Minimum version: 1.6.0
25375c30ecadSmrg#
25385c30ecadSmrg# This macro enables a builder to skip all developer documentation.
25395c30ecadSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
25405c30ecadSmrg# maximum flexibilty in controlling documentation building.
25415c30ecadSmrg# Refer to:
25425c30ecadSmrg# XORG_WITH_XMLTO         --with-xmlto
25435c30ecadSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
25445c30ecadSmrg# XORG_WITH_DOXYGEN       --with-doxygen
25455c30ecadSmrg# XORG_WITH_FOP           --with-fop
25465c30ecadSmrg# XORG_WITH_GROFF         --with-groff
25475c30ecadSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
25485c30ecadSmrg#
25495c30ecadSmrg# Interface to module:
25505c30ecadSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
25515c30ecadSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
25525c30ecadSmrg#			'no' user instructs the module not to generate developer docs
25535c30ecadSmrg# parm1:		specify the default value, yes or no.
25545c30ecadSmrg#
25555c30ecadSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
25565c30ecadSmrgm4_define([devel_default], m4_default([$1], [yes]))
25575c30ecadSmrgAC_ARG_ENABLE(devel-docs,
25585c30ecadSmrg	AS_HELP_STRING([--enable-devel-docs],
25595c30ecadSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
25605c30ecadSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
25615c30ecadSmrgm4_undefine([devel_default])
25625c30ecadSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
25635c30ecadSmrgAC_MSG_CHECKING([whether to build developer documentation])
25645c30ecadSmrgAC_MSG_RESULT([$build_devel_docs])
25655c30ecadSmrg]) # XORG_ENABLE_DEVEL_DOCS
25665eefee25Smacallan
25675c30ecadSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
25685c30ecadSmrg# ----------------
25695c30ecadSmrg# Minimum version: 1.6.0
25705c30ecadSmrg#
25715c30ecadSmrg# This macro enables a builder to skip all functional specification targets.
25725c30ecadSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
25735c30ecadSmrg# maximum flexibilty in controlling documentation building.
25745c30ecadSmrg# Refer to:
25755c30ecadSmrg# XORG_WITH_XMLTO         --with-xmlto
25765c30ecadSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
25775c30ecadSmrg# XORG_WITH_DOXYGEN       --with-doxygen
25785c30ecadSmrg# XORG_WITH_FOP           --with-fop
25795c30ecadSmrg# XORG_WITH_GROFF         --with-groff
25805c30ecadSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
25815c30ecadSmrg#
25825c30ecadSmrg# Interface to module:
25835c30ecadSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
25845c30ecadSmrg# --enable-specs:	'yes' user instructs the module to generate specs
25855c30ecadSmrg#			'no' user instructs the module not to generate specs
25865c30ecadSmrg# parm1:		specify the default value, yes or no.
25875c30ecadSmrg#
25885c30ecadSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
25895c30ecadSmrgm4_define([spec_default], m4_default([$1], [yes]))
25905c30ecadSmrgAC_ARG_ENABLE(specs,
25915c30ecadSmrg	AS_HELP_STRING([--enable-specs],
25925c30ecadSmrg	   [Enable building the specs (default: ]spec_default[)]),
25935c30ecadSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
25945c30ecadSmrgm4_undefine([spec_default])
25955c30ecadSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
25965c30ecadSmrgAC_MSG_CHECKING([whether to build functional specifications])
25975c30ecadSmrgAC_MSG_RESULT([$build_specs])
25985c30ecadSmrg]) # XORG_ENABLE_SPECS
25995eefee25Smacallan
26005c30ecadSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
26015c30ecadSmrg# ----------------------------------------------
26025c30ecadSmrg# Minimum version: 1.13.0
26035c30ecadSmrg#
26045c30ecadSmrg# This macro enables a builder to enable/disable unit testing
26055c30ecadSmrg# It makes no assumption about the test cases implementation
26065c30ecadSmrg# Test cases may or may not use Automake "Support for test suites"
26075c30ecadSmrg# They may or may not use the software utility library GLib
26085c30ecadSmrg#
26095c30ecadSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
26105c30ecadSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
26115c30ecadSmrg# The variable enable_unit_tests is used by other macros in this file.
26125c30ecadSmrg#
26135c30ecadSmrg# Interface to module:
26145c30ecadSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
26155c30ecadSmrg# enable_unit_tests:    used in configure.ac for additional configuration
26165c30ecadSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
26175c30ecadSmrg#			'no' user instructs the module not to build tests
26185c30ecadSmrg# parm1:		specify the default value, yes or no.
26195c30ecadSmrg#
26205c30ecadSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
26215c30ecadSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
26225c30ecadSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
26235c30ecadSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
26245c30ecadSmrgm4_define([_defopt], m4_default([$1], [auto]))
26255c30ecadSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
26265c30ecadSmrg	[Enable building unit test cases (default: ]_defopt[)]),
26275c30ecadSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
26285c30ecadSmrgm4_undefine([_defopt])
26295c30ecadSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
26305c30ecadSmrgAC_MSG_CHECKING([whether to build unit test cases])
26315c30ecadSmrgAC_MSG_RESULT([$enable_unit_tests])
26325c30ecadSmrg]) # XORG_ENABLE_UNIT_TESTS
2633dc99b369Smrg
26345c30ecadSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
26355c30ecadSmrg# ------------------------------------------------------
26365c30ecadSmrg# Minimum version: 1.17.0
26375c30ecadSmrg#
26385c30ecadSmrg# This macro enables a builder to enable/disable integration testing
26395c30ecadSmrg# It makes no assumption about the test cases' implementation
26405c30ecadSmrg# Test cases may or may not use Automake "Support for test suites"
26415c30ecadSmrg#
26425c30ecadSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
26435c30ecadSmrg# usually requires less dependencies and may be built and run under less
26445c30ecadSmrg# stringent environments than integration tests.
26455c30ecadSmrg#
26465c30ecadSmrg# Interface to module:
26475c30ecadSmrg# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
26485c30ecadSmrg# enable_integration_tests:   used in configure.ac for additional configuration
26495c30ecadSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests
26505c30ecadSmrg#                             'no' user instructs the module not to build tests
26515c30ecadSmrg# parm1:                      specify the default value, yes or no.
26525c30ecadSmrg#
26535c30ecadSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
26545c30ecadSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
26555c30ecadSmrgm4_define([_defopt], m4_default([$1], [auto]))
26565c30ecadSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
26575c30ecadSmrg	[Enable building integration test cases (default: ]_defopt[)]),
26585c30ecadSmrg	[enable_integration_tests=$enableval],
26595c30ecadSmrg	[enable_integration_tests=]_defopt)
26605c30ecadSmrgm4_undefine([_defopt])
26615c30ecadSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
26625c30ecadSmrg	[test "x$enable_integration_tests" != xno])
26635c30ecadSmrgAC_MSG_CHECKING([whether to build unit test cases])
26645c30ecadSmrgAC_MSG_RESULT([$enable_integration_tests])
26655c30ecadSmrg]) # XORG_ENABLE_INTEGRATION_TESTS
26665c30ecadSmrg
26675c30ecadSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
26685c30ecadSmrg# ----------------------------------------
26695c30ecadSmrg# Minimum version: 1.13.0
26705c30ecadSmrg#
26715c30ecadSmrg# GLib is a library which provides advanced data structures and functions.
26725c30ecadSmrg# This macro enables a module to test for the presence of Glib.
26735c30ecadSmrg#
26745c30ecadSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
26755c30ecadSmrg# Otherwise the value of $enable_unit_tests is blank.
26765c30ecadSmrg#
26775c30ecadSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
26785c30ecadSmrg# test support usually requires less dependencies and may be built and run under
26795c30ecadSmrg# less stringent environments than integration tests.
26805c30ecadSmrg#
26815c30ecadSmrg# Interface to module:
26825c30ecadSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
26835c30ecadSmrg# with_glib: used in configure.ac to know if GLib has been found
26845c30ecadSmrg# --with-glib:	'yes' user instructs the module to use glib
26855c30ecadSmrg#		'no' user instructs the module not to use glib
26865c30ecadSmrg#
26875c30ecadSmrgAC_DEFUN([XORG_WITH_GLIB],[
26885c30ecadSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
26895c30ecadSmrgm4_define([_defopt], m4_default([$2], [auto]))
26905c30ecadSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
26915c30ecadSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
26925c30ecadSmrg	[with_glib=$withval], [with_glib=]_defopt)
26935c30ecadSmrgm4_undefine([_defopt])
26945c30ecadSmrg
26955c30ecadSmrghave_glib=no
26965c30ecadSmrg# Do not probe GLib if user explicitly disabled unit testing
26975c30ecadSmrgif test "x$enable_unit_tests" != x"no"; then
26985c30ecadSmrg  # Do not probe GLib if user explicitly disabled it
26995c30ecadSmrg  if test "x$with_glib" != x"no"; then
27005c30ecadSmrg    m4_ifval(
27015c30ecadSmrg      [$1],
27025c30ecadSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
27035c30ecadSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
27045c30ecadSmrg    )
27055eefee25Smacallan  fi
2706dc99b369Smrgfi
27075eefee25Smacallan
27085c30ecadSmrg# Not having GLib when unit testing has been explicitly requested is an error
27095c30ecadSmrgif test "x$enable_unit_tests" = x"yes"; then
27105c30ecadSmrg  if test "x$have_glib" = x"no"; then
27115c30ecadSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
27125c30ecadSmrg  fi
2713dc99b369Smrgfi
27145eefee25Smacallan
27155c30ecadSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
27165c30ecadSmrgif test "x$enable_unit_tests" = x"no"; then
27175c30ecadSmrg  if test "x$with_glib" = x"yes"; then
27185c30ecadSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
27195c30ecadSmrg  fi
27205c30ecadSmrgfi
2721dc99b369Smrg
27225c30ecadSmrg# Not having GLib when it has been explicitly requested is an error
27235c30ecadSmrgif test "x$with_glib" = x"yes"; then
27245c30ecadSmrg  if test "x$have_glib" = x"no"; then
27255c30ecadSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
27265c30ecadSmrg  fi
27275c30ecadSmrgfi
2728dc99b369Smrg
27295c30ecadSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
27305c30ecadSmrg]) # XORG_WITH_GLIB
27315c30ecadSmrg
27325c30ecadSmrg# XORG_LD_WRAP([required|optional])
27335c30ecadSmrg# ---------------------------------
27345c30ecadSmrg# Minimum version: 1.13.0
27355c30ecadSmrg#
27365c30ecadSmrg# Check if linker supports -wrap, passed via compiler flags
27375c30ecadSmrg#
27385c30ecadSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
27395c30ecadSmrg# Otherwise the value of $enable_unit_tests is blank.
27405c30ecadSmrg#
27415c30ecadSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior
27425c30ecadSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
27435c30ecadSmrg# available, an argument of "optional" allows use when some unit tests require
27445c30ecadSmrg# ld -wrap and others do not.
27455c30ecadSmrg#
27465c30ecadSmrgAC_DEFUN([XORG_LD_WRAP],[
27475c30ecadSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
27485c30ecadSmrg    [AC_LANG_PROGRAM([#include <stdlib.h>
27495c30ecadSmrg                      void __wrap_exit(int status) { return; }],
27505c30ecadSmrg                     [exit(0);])])
27515c30ecadSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
27525c30ecadSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
27535c30ecadSmrg  if test "x$have_ld_wrap" = x"no"; then
27545c30ecadSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
27555eefee25Smacallan  fi
27565c30ecadSmrgfi
27575c30ecadSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
27585c30ecadSmrg#
27595c30ecadSmrg]) # XORG_LD_WRAP
27605c30ecadSmrg
27615c30ecadSmrg# XORG_CHECK_LINKER_FLAGS
27625c30ecadSmrg# -----------------------
27635c30ecadSmrg# SYNOPSIS
27645c30ecadSmrg#
27655c30ecadSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
27665c30ecadSmrg#
27675c30ecadSmrg# DESCRIPTION
27685c30ecadSmrg#
27695c30ecadSmrg#   Check whether the given linker FLAGS work with the current language's
27705c30ecadSmrg#   linker, or whether they give an error.
27715c30ecadSmrg#
27725c30ecadSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
27735c30ecadSmrg#   success/failure.
27745c30ecadSmrg#
27755c30ecadSmrg#   PROGRAM-SOURCE is the program source to link with, if needed
27765c30ecadSmrg#
27775c30ecadSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
27785c30ecadSmrg#
27795c30ecadSmrg# LICENSE
27805c30ecadSmrg#
27815c30ecadSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
27825c30ecadSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
27835c30ecadSmrg#   Copyright (c) 2009 Matteo Frigo
27845c30ecadSmrg#
27855c30ecadSmrg#   This program is free software: you can redistribute it and/or modify it
27865c30ecadSmrg#   under the terms of the GNU General Public License as published by the
27875c30ecadSmrg#   Free Software Foundation, either version 3 of the License, or (at your
27885c30ecadSmrg#   option) any later version.
27895c30ecadSmrg#
27905c30ecadSmrg#   This program is distributed in the hope that it will be useful, but
27915c30ecadSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
27925c30ecadSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
27935c30ecadSmrg#   Public License for more details.
27945c30ecadSmrg#
27955c30ecadSmrg#   You should have received a copy of the GNU General Public License along
27965c30ecadSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
27975c30ecadSmrg#
27985c30ecadSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
27995c30ecadSmrg#   gives unlimited permission to copy, distribute and modify the configure
28005c30ecadSmrg#   scripts that are the output of Autoconf when processing the Macro. You
28015c30ecadSmrg#   need not follow the terms of the GNU General Public License when using
28025c30ecadSmrg#   or distributing such scripts, even though portions of the text of the
28035c30ecadSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
28045c30ecadSmrg#   all other use of the material that constitutes the Autoconf Macro.
28055c30ecadSmrg#
28065c30ecadSmrg#   This special exception to the GPL applies to versions of the Autoconf
28075c30ecadSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
28085c30ecadSmrg#   modified version of the Autoconf Macro, you may extend this special
28095c30ecadSmrg#   exception to the GPL to apply to your modified version as well.#
28105c30ecadSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
28115c30ecadSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
28125c30ecadSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
28135c30ecadSmrgAS_LITERAL_IF([$1],
28145c30ecadSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
28155c30ecadSmrg      ax_save_FLAGS=$LDFLAGS
28165c30ecadSmrg      LDFLAGS="$1"
28175c30ecadSmrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
28185c30ecadSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
28195c30ecadSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
28205c30ecadSmrg      LDFLAGS=$ax_save_FLAGS])],
28215c30ecadSmrg  [ax_save_FLAGS=$LDFLAGS
28225c30ecadSmrg   LDFLAGS="$1"
28235c30ecadSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
28245c30ecadSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
28255c30ecadSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
28265c30ecadSmrg   LDFLAGS=$ax_save_FLAGS])
28275c30ecadSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
28285c30ecadSmrgAC_MSG_RESULT($xorg_check_linker_flags)
28295c30ecadSmrgif test "x$xorg_check_linker_flags" = xyes; then
28305c30ecadSmrg	m4_default([$2], :)
2831dc99b369Smrgelse
28325c30ecadSmrg	m4_default([$3], :)
2833dc99b369Smrgfi
28345c30ecadSmrg]) # XORG_CHECK_LINKER_FLAGS
28355eefee25Smacallan
28365c30ecadSmrg# XORG_MEMORY_CHECK_FLAGS
28375c30ecadSmrg# -----------------------
28385c30ecadSmrg# Minimum version: 1.16.0
28395c30ecadSmrg#
28405c30ecadSmrg# This macro attempts to find appropriate memory checking functionality
28415c30ecadSmrg# for various platforms which unit testing code may use to catch various
28425c30ecadSmrg# forms of memory allocation and access errors in testing.
28435c30ecadSmrg#
28445c30ecadSmrg# Interface to module:
28455c30ecadSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
28465c30ecadSmrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
28475c30ecadSmrg#
28485c30ecadSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
28495c30ecadSmrg#
28505c30ecadSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
28515c30ecadSmrg
28525c30ecadSmrgAC_REQUIRE([AC_CANONICAL_HOST])
28535c30ecadSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
28545c30ecadSmrg           [Environment variables to enable memory checking in tests])
28555c30ecadSmrg
28565c30ecadSmrg# Check for different types of support on different platforms
28575c30ecadSmrgcase $host_os in
28585c30ecadSmrg    solaris*)
28595c30ecadSmrg        AC_CHECK_LIB([umem], [umem_alloc],
28605c30ecadSmrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
28615c30ecadSmrg        ;;
28625c30ecadSmrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
28635c30ecadSmrg        # both directly and inverted, so should not be 0 or 255.
28645c30ecadSmrg        malloc_debug_env='MALLOC_PERTURB_=15'
28655c30ecadSmrg        ;;
28665c30ecadSmrg    darwin*)
28675c30ecadSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
28685c30ecadSmrg        ;;
28695c30ecadSmrg    *bsd*)
28705c30ecadSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
28715c30ecadSmrg        ;;
28725c30ecadSmrgesac
28735c30ecadSmrg
28745c30ecadSmrg# User supplied flags override default flags
28755c30ecadSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
28765c30ecadSmrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
2877dc99b369Smrgfi
28785eefee25Smacallan
28795c30ecadSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
28805c30ecadSmrg]) # XORG_WITH_LINT
28815eefee25Smacallan
28825c30ecadSmrg# XORG_CHECK_MALLOC_ZERO
28835c30ecadSmrg# ----------------------
28845c30ecadSmrg# Minimum version: 1.0.0
28855c30ecadSmrg#
28865c30ecadSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
28875c30ecadSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
28885c30ecadSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
28895c30ecadSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
28905c30ecadSmrgAC_ARG_ENABLE(malloc0returnsnull,
28915c30ecadSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
28925c30ecadSmrg		       [malloc(0) returns NULL (default: auto)]),
28935c30ecadSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
28945c30ecadSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
28955c30ecadSmrg
28965c30ecadSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
28975c30ecadSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
28985c30ecadSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null],
28995c30ecadSmrg	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
29005c30ecadSmrg#include <stdlib.h>
29015c30ecadSmrg],[
29025c30ecadSmrg    char *m0, *r0, *c0, *p;
29035c30ecadSmrg    m0 = malloc(0);
29045c30ecadSmrg    p = malloc(10);
29055c30ecadSmrg    r0 = realloc(p,0);
29065c30ecadSmrg    c0 = calloc(0,10);
29075c30ecadSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
29085c30ecadSmrg])],
29095c30ecadSmrg		[xorg_cv_malloc0_returns_null=yes],
29105c30ecadSmrg		[xorg_cv_malloc0_returns_null=no])])
29115c30ecadSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
29125c30ecadSmrgfi
29135c30ecadSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
29145c30ecadSmrg
29155c30ecadSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
29165c30ecadSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
29175c30ecadSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
29185c30ecadSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
2919dc99b369Smrgelse
29205c30ecadSmrg	MALLOC_ZERO_CFLAGS=""
29215c30ecadSmrg	XMALLOC_ZERO_CFLAGS=""
29225c30ecadSmrg	XTMALLOC_ZERO_CFLAGS=""
2923dc99b369Smrgfi
292462ab96baSmrg
29255c30ecadSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
29265c30ecadSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
29275c30ecadSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
29285c30ecadSmrg]) # XORG_CHECK_MALLOC_ZERO
29295eefee25Smacallan
29305c30ecadSmrg# XORG_WITH_LINT()
29315c30ecadSmrg# ----------------
29325c30ecadSmrg# Minimum version: 1.1.0
29335c30ecadSmrg#
29345c30ecadSmrg# This macro enables the use of a tool that flags some suspicious and
29355c30ecadSmrg# non-portable constructs (likely to be bugs) in C language source code.
29365c30ecadSmrg# It will attempt to locate the tool and use appropriate options.
29375c30ecadSmrg# There are various lint type tools on different platforms.
29385c30ecadSmrg#
29395c30ecadSmrg# Interface to module:
29405c30ecadSmrg# LINT:		returns the path to the tool found on the platform
29415c30ecadSmrg#		or the value set to LINT on the configure cmd line
29425c30ecadSmrg#		also an Automake conditional
29435c30ecadSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
29445c30ecadSmrg#
29455c30ecadSmrg# --with-lint:	'yes' user instructs the module to use lint
29465c30ecadSmrg#		'no' user instructs the module not to use lint (default)
29475c30ecadSmrg#
29485c30ecadSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
29495c30ecadSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
29505c30ecadSmrg#
29515c30ecadSmrgAC_DEFUN([XORG_WITH_LINT],[
29525eefee25Smacallan
29535c30ecadSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
29545c30ecadSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
29555c30ecadSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
29565c30ecadSmrg		[Use a lint-style source code checker (default: disabled)])],
29575c30ecadSmrg		[use_lint=$withval], [use_lint=no])
2958dc99b369Smrg
29595c30ecadSmrg# Obtain platform specific info like program name and options
29605c30ecadSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
2961dc99b369Smrgcase $host_os in
29625c30ecadSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
29635c30ecadSmrg	lint_name=splint
29645c30ecadSmrg	lint_options="-badflag"
29655c30ecadSmrg	;;
29665c30ecadSmrg  *freebsd* | *netbsd*)
29675c30ecadSmrg	lint_name=lint
29685c30ecadSmrg	lint_options="-u -b"
29695c30ecadSmrg	;;
29705c30ecadSmrg  *solaris*)
29715c30ecadSmrg	lint_name=lint
29725c30ecadSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
29735c30ecadSmrg	;;
29745c30ecadSmrgesac
29755eefee25Smacallan
29765c30ecadSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
29775c30ecadSmrgif test "x$use_lint" = x"yes" ; then
29785c30ecadSmrg   AC_PATH_PROG([LINT], [$lint_name])
29795c30ecadSmrg   if test "x$LINT" = "x"; then
29805c30ecadSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
29815c30ecadSmrg   fi
29825c30ecadSmrgelif test "x$use_lint" = x"no" ; then
29835c30ecadSmrg   if test "x$LINT" != "x"; then
29845c30ecadSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
29855c30ecadSmrg   fi
29865c30ecadSmrgelse
29875c30ecadSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
29885c30ecadSmrgfi
29895eefee25Smacallan
29905c30ecadSmrg# User supplied flags override default flags
29915c30ecadSmrgif test "x$LINT_FLAGS" != "x"; then
29925c30ecadSmrg   lint_options=$LINT_FLAGS
29935c30ecadSmrgfi
29945eefee25Smacallan
29955c30ecadSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
29965c30ecadSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
2997dc99b369Smrg
29985c30ecadSmrg]) # XORG_WITH_LINT
2999dc99b369Smrg
30005c30ecadSmrg# XORG_LINT_LIBRARY(LIBNAME)
30015c30ecadSmrg# --------------------------
30025c30ecadSmrg# Minimum version: 1.1.0
30035c30ecadSmrg#
30045c30ecadSmrg# Sets up flags for building lint libraries for checking programs that call
30055c30ecadSmrg# functions in the library.
30065c30ecadSmrg#
30075c30ecadSmrg# Interface to module:
30085c30ecadSmrg# LINTLIB		- Automake variable with the name of lint library file to make
30095c30ecadSmrg# MAKE_LINT_LIB		- Automake conditional
30105c30ecadSmrg#
30115c30ecadSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
30125c30ecadSmrg#			  - 'no' user instructs the module not to create a lint library (default)
30135eefee25Smacallan
30145c30ecadSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
30155c30ecadSmrgAC_REQUIRE([XORG_WITH_LINT])
30165c30ecadSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
30175c30ecadSmrg	[Create lint library (default: disabled)])],
30185c30ecadSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
301962ab96baSmrg
30205c30ecadSmrgif test "x$make_lint_lib" = x"yes" ; then
30215c30ecadSmrg   LINTLIB=llib-l$1.ln
30225c30ecadSmrg   if test "x$LINT" = "x"; then
30235c30ecadSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
30245c30ecadSmrg   fi
30255c30ecadSmrgelif test "x$make_lint_lib" != x"no" ; then
30265c30ecadSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
30275c30ecadSmrgfi
30285eefee25Smacallan
30295c30ecadSmrgAC_SUBST(LINTLIB)
30305c30ecadSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
30315eefee25Smacallan
30325c30ecadSmrg]) # XORG_LINT_LIBRARY
30335eefee25Smacallan
30345c30ecadSmrg# XORG_COMPILER_BRAND
30355c30ecadSmrg# -------------------
30365c30ecadSmrg# Minimum version: 1.14.0
30375c30ecadSmrg#
30385c30ecadSmrg# Checks for various brands of compilers and sets flags as appropriate:
30395c30ecadSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
30405c30ecadSmrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
30415c30ecadSmrg#   clang compiler - sets CLANGCC to "yes"
30425c30ecadSmrg#   Intel compiler - sets INTELCC to "yes"
30435c30ecadSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
30445c30ecadSmrg#
30455c30ecadSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
30465c30ecadSmrgAC_LANG_CASE(
30475c30ecadSmrg	[C], [
30485c30ecadSmrg		AC_REQUIRE([AC_PROG_CC_C99])
30495c30ecadSmrg	],
30505c30ecadSmrg	[C++], [
30515c30ecadSmrg		AC_REQUIRE([AC_PROG_CXX])
30525c30ecadSmrg	]
30535c30ecadSmrg)
30545c30ecadSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
30555c30ecadSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
30565c30ecadSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
30575c30ecadSmrg]) # XORG_COMPILER_BRAND
30585eefee25Smacallan
30595c30ecadSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
30605c30ecadSmrg# ---------------
30615c30ecadSmrg# Minimum version: 1.16.0
30625c30ecadSmrg#
30635c30ecadSmrg# Test if the compiler works when passed the given flag as a command line argument.
30645c30ecadSmrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
30655c30ecadSmrg# next flag in the list until there are no more options.
30665c30ecadSmrg#
30675c30ecadSmrg# Note that this does not guarantee that the compiler supports the flag as some
30685c30ecadSmrg# compilers will simply ignore arguments that they do not understand, but we do
30695c30ecadSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
30705c30ecadSmrg# -Werror=unused-command-line-argument
30715c30ecadSmrg#
30725c30ecadSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
30735c30ecadSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
30745c30ecadSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
30755eefee25Smacallan
30765c30ecadSmrgAC_LANG_COMPILER_REQUIRE
30775eefee25Smacallan
30785c30ecadSmrgAC_LANG_CASE(
30795c30ecadSmrg	[C], [
30805c30ecadSmrg		AC_REQUIRE([AC_PROG_CC_C99])
30815c30ecadSmrg		define([PREFIX], [C])
30825c30ecadSmrg		define([CACHE_PREFIX], [cc])
30835c30ecadSmrg		define([COMPILER], [$CC])
30845c30ecadSmrg	],
30855c30ecadSmrg	[C++], [
30865c30ecadSmrg		define([PREFIX], [CXX])
30875c30ecadSmrg		define([CACHE_PREFIX], [cxx])
30885c30ecadSmrg		define([COMPILER], [$CXX])
30895c30ecadSmrg	]
30905c30ecadSmrg)
30915eefee25Smacallan
30925c30ecadSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
30935eefee25Smacallan
30945c30ecadSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
30955c30ecadSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
30965c30ecadSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
30975c30ecadSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
30985c30ecadSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
30995c30ecadSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
31005c30ecadSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
31015c30ecadSmrg	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
31025c30ecadSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
31035c30ecadSmrgfi
31045eefee25Smacallan
31055c30ecadSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
31065c30ecadSmrg	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
31075c30ecadSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
31085c30ecadSmrg	fi
31095c30ecadSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
31105c30ecadSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
31115c30ecadSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
31125c30ecadSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
31135c30ecadSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
31145c30ecadSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
31155c30ecadSmrg	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
31165c30ecadSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
31175c30ecadSmrgfi
31185eefee25Smacallan
31195c30ecadSmrgfound="no"
31205c30ecadSmrgm4_foreach([flag], m4_cdr($@), [
31215c30ecadSmrg	if test $found = "no" ; then
31225c30ecadSmrg		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
31235c30ecadSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
31245c30ecadSmrg		fi
31255eefee25Smacallan
31265c30ecadSmrg		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
31275c30ecadSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
31285c30ecadSmrg		fi
31295eefee25Smacallan
31305c30ecadSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
31315eefee25Smacallan
31325c30ecadSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
31335c30ecadSmrg		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
31345c30ecadSmrg		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
31355c30ecadSmrg		AC_CACHE_VAL($cacheid,
31365c30ecadSmrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
31375c30ecadSmrg					     [eval $cacheid=yes],
31385c30ecadSmrg					     [eval $cacheid=no])])
31395eefee25Smacallan
31405c30ecadSmrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
31415eefee25Smacallan
31425c30ecadSmrg		eval supported=\$$cacheid
31435c30ecadSmrg		AC_MSG_RESULT([$supported])
31445c30ecadSmrg		if test "$supported" = "yes" ; then
31455c30ecadSmrg			$1="$$1 ]flag["
31465c30ecadSmrg			found="yes"
31475c30ecadSmrg		fi
31485c30ecadSmrg	fi
31495c30ecadSmrg])
31505c30ecadSmrg]) # XORG_TESTSET_CFLAG
31515eefee25Smacallan
31525c30ecadSmrg# XORG_COMPILER_FLAGS
31535c30ecadSmrg# ---------------
31545c30ecadSmrg# Minimum version: 1.16.0
31555c30ecadSmrg#
31565c30ecadSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
31575c30ecadSmrg# arguments supported by the selected compiler which do NOT alter the generated
31585c30ecadSmrg# code.  These arguments will cause the compiler to print various warnings
31595c30ecadSmrg# during compilation AND turn a conservative set of warnings into errors.
31605c30ecadSmrg#
31615c30ecadSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
31625c30ecadSmrg# future versions of util-macros as options are added to new compilers.
31635c30ecadSmrg#
31645c30ecadSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
31655c30ecadSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
31665eefee25Smacallan
31675c30ecadSmrgAC_ARG_ENABLE(selective-werror,
31685c30ecadSmrg              AS_HELP_STRING([--disable-selective-werror],
31695c30ecadSmrg                             [Turn off selective compiler errors. (default: enabled)]),
31705c30ecadSmrg              [SELECTIVE_WERROR=$enableval],
31715c30ecadSmrg              [SELECTIVE_WERROR=yes])
31725eefee25Smacallan
31735c30ecadSmrgAC_LANG_CASE(
31745c30ecadSmrg        [C], [
31755c30ecadSmrg                define([PREFIX], [C])
31765c30ecadSmrg        ],
31775c30ecadSmrg        [C++], [
31785c30ecadSmrg                define([PREFIX], [CXX])
31795c30ecadSmrg        ]
31805c30ecadSmrg)
31815c30ecadSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
31825c30ecadSmrgif test "x$SUNCC" = "xyes"; then
31835c30ecadSmrg    [BASE_]PREFIX[FLAGS]="-v"
31845c30ecadSmrgelse
31855c30ecadSmrg    [BASE_]PREFIX[FLAGS]=""
31865c30ecadSmrgfi
31875eefee25Smacallan
31885c30ecadSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
31895c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
31905c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
31915c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
31925c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
31935eefee25Smacallan
31945c30ecadSmrgAC_LANG_CASE(
31955c30ecadSmrg	[C], [
31965c30ecadSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
31975c30ecadSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
31985c30ecadSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
31995c30ecadSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
32005c30ecadSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
32015c30ecadSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
32025c30ecadSmrg	]
32035c30ecadSmrg)
3204dc99b369Smrg
32055c30ecadSmrg# This chunk adds additional warnings that could catch undesired effects.
32065c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
32075c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
32085c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
32095c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
32105c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
32115c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
32125c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
32135eefee25Smacallan
32145c30ecadSmrg# These are currently disabled because they are noisy.  They will be enabled
32155c30ecadSmrg# in the future once the codebase is sufficiently modernized to silence
32165c30ecadSmrg# them.  For now, I don't want them to drown out the other warnings.
32175c30ecadSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
32185c30ecadSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
32195c30ecadSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
32205eefee25Smacallan
32215c30ecadSmrg# Turn some warnings into errors, so we don't accidently get successful builds
32225c30ecadSmrg# when there are problems that should be fixed.
32235eefee25Smacallan
32245c30ecadSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
32255c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
32265c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
32275c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
32285c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
32295c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
32305c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
32315c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
32325c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
32335c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
32345c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
32355c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
32365c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
32375c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
32385c30ecadSmrgelse
32395c30ecadSmrgAC_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])
32405c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
32415c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
32425c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
32435c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
32445c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
32455c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
32465c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
32475c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
32485c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
32495c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
32505c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
32515c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
32525c30ecadSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
32535c30ecadSmrgfi
32545eefee25Smacallan
32555c30ecadSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
32565c30ecadSmrg]) # XORG_COMPILER_FLAGS
32575eefee25Smacallan
32585c30ecadSmrg# XORG_CWARNFLAGS
32595c30ecadSmrg# ---------------
32605c30ecadSmrg# Minimum version: 1.2.0
32615c30ecadSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
32625c30ecadSmrg#
32635c30ecadSmrg# Defines CWARNFLAGS to enable C compiler warnings.
32645c30ecadSmrg#
32655c30ecadSmrg# This function is deprecated because it defines -fno-strict-aliasing
32665c30ecadSmrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
32675c30ecadSmrg# is needed, then it should be added explicitly in the module when
32685c30ecadSmrg# it is updated to use BASE_CFLAGS.
32695c30ecadSmrg#
32705c30ecadSmrgAC_DEFUN([XORG_CWARNFLAGS], [
32715c30ecadSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
32725c30ecadSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
32735c30ecadSmrgAC_LANG_CASE(
32745c30ecadSmrg	[C], [
32755c30ecadSmrg		CWARNFLAGS="$BASE_CFLAGS"
32765c30ecadSmrg		if  test "x$GCC" = xyes ; then
32775c30ecadSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
32785c30ecadSmrg		fi
32795c30ecadSmrg		AC_SUBST(CWARNFLAGS)
32805c30ecadSmrg	]
32815c30ecadSmrg)
32825c30ecadSmrg]) # XORG_CWARNFLAGS
32835eefee25Smacallan
32845c30ecadSmrg# XORG_STRICT_OPTION
32855c30ecadSmrg# -----------------------
32865c30ecadSmrg# Minimum version: 1.3.0
32875c30ecadSmrg#
32885c30ecadSmrg# Add configure option to enable strict compilation flags, such as treating
32895c30ecadSmrg# warnings as fatal errors.
32905c30ecadSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
32915c30ecadSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
32925c30ecadSmrg#
32935c30ecadSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
32945c30ecadSmrg# when strict compilation is unconditionally desired.
32955c30ecadSmrgAC_DEFUN([XORG_STRICT_OPTION], [
32965c30ecadSmrgAC_REQUIRE([XORG_CWARNFLAGS])
32975c30ecadSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
32985eefee25Smacallan
32995c30ecadSmrgAC_ARG_ENABLE(strict-compilation,
33005c30ecadSmrg			  AS_HELP_STRING([--enable-strict-compilation],
33015c30ecadSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
33025c30ecadSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
33035eefee25Smacallan
33045c30ecadSmrgAC_LANG_CASE(
33055c30ecadSmrg        [C], [
33065c30ecadSmrg                define([PREFIX], [C])
33075c30ecadSmrg        ],
33085c30ecadSmrg        [C++], [
33095c30ecadSmrg                define([PREFIX], [CXX])
33105c30ecadSmrg        ]
33115c30ecadSmrg)
33125eefee25Smacallan
33135c30ecadSmrg[STRICT_]PREFIX[FLAGS]=""
33145c30ecadSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
33155c30ecadSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
33165eefee25Smacallan
33175c30ecadSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
33185c30ecadSmrg# activate it with -Werror, so we add it here explicitly.
33195c30ecadSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
33205eefee25Smacallan
33215c30ecadSmrgif test "x$STRICT_COMPILE" = "xyes"; then
33225c30ecadSmrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
33235c30ecadSmrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
33245c30ecadSmrgfi
33255c30ecadSmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
33265c30ecadSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
33275c30ecadSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
33285c30ecadSmrg]) # XORG_STRICT_OPTION
33295eefee25Smacallan
33305c30ecadSmrg# XORG_DEFAULT_OPTIONS
33315c30ecadSmrg# --------------------
33325c30ecadSmrg# Minimum version: 1.3.0
33335c30ecadSmrg#
33345c30ecadSmrg# Defines default options for X.Org modules.
33355c30ecadSmrg#
33365c30ecadSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
33375c30ecadSmrgAC_REQUIRE([AC_PROG_INSTALL])
33385c30ecadSmrgXORG_COMPILER_FLAGS
33395c30ecadSmrgXORG_CWARNFLAGS
33405c30ecadSmrgXORG_STRICT_OPTION
33415c30ecadSmrgXORG_RELEASE_VERSION
33425c30ecadSmrgXORG_CHANGELOG
33435c30ecadSmrgXORG_INSTALL
33445c30ecadSmrgXORG_MANPAGE_SECTIONS
33455c30ecadSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
33465c30ecadSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
33475c30ecadSmrg]) # XORG_DEFAULT_OPTIONS
33485eefee25Smacallan
33495c30ecadSmrg# XORG_INSTALL()
33505c30ecadSmrg# ----------------
33515c30ecadSmrg# Minimum version: 1.4.0
33525c30ecadSmrg#
33535c30ecadSmrg# Defines the variable INSTALL_CMD as the command to copy
33545c30ecadSmrg# INSTALL from $prefix/share/util-macros.
33555c30ecadSmrg#
33565c30ecadSmrgAC_DEFUN([XORG_INSTALL], [
33575c30ecadSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
33585c30ecadSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
33595c30ecadSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
33605c30ecadSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
33615c30ecadSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
33625c30ecadSmrgtouch \$(top_srcdir)/INSTALL; \
33635c30ecadSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
33645c30ecadSmrgAC_SUBST([INSTALL_CMD])
33655c30ecadSmrg]) # XORG_INSTALL
33665c30ecadSmrgdnl Copyright 2005 Red Hat, Inc
33675c30ecadSmrgdnl
33685c30ecadSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
33695c30ecadSmrgdnl documentation for any purpose is hereby granted without fee, provided that
33705c30ecadSmrgdnl the above copyright notice appear in all copies and that both that
33715c30ecadSmrgdnl copyright notice and this permission notice appear in supporting
33725c30ecadSmrgdnl documentation.
33735c30ecadSmrgdnl
33745c30ecadSmrgdnl The above copyright notice and this permission notice shall be included
33755c30ecadSmrgdnl in all copies or substantial portions of the Software.
33765c30ecadSmrgdnl
33775c30ecadSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
33785c30ecadSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33795c30ecadSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33805c30ecadSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
33815c30ecadSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
33825c30ecadSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
33835c30ecadSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
33845c30ecadSmrgdnl
33855c30ecadSmrgdnl Except as contained in this notice, the name of the copyright holders shall
33865c30ecadSmrgdnl not be used in advertising or otherwise to promote the sale, use or
33875c30ecadSmrgdnl other dealings in this Software without prior written authorization
33885c30ecadSmrgdnl from the copyright holders.
33895c30ecadSmrgdnl
33905eefee25Smacallan
33915c30ecadSmrg# XORG_RELEASE_VERSION
33925c30ecadSmrg# --------------------
33935c30ecadSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
33945eefee25Smacallan
33955c30ecadSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
33965c30ecadSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
33975c30ecadSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
33985c30ecadSmrg		[Major version of this package])
33995c30ecadSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
34005c30ecadSmrg	if test "x$PVM" = "x"; then
34015c30ecadSmrg		PVM="0"
34025c30ecadSmrg	fi
34035c30ecadSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
34045c30ecadSmrg		[$PVM],
34055c30ecadSmrg		[Minor version of this package])
34065c30ecadSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
34075c30ecadSmrg	if test "x$PVP" = "x"; then
34085c30ecadSmrg		PVP="0"
34095c30ecadSmrg	fi
34105c30ecadSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
34115c30ecadSmrg		[$PVP],
34125c30ecadSmrg		[Patch version of this package])
34135c30ecadSmrg])
34145eefee25Smacallan
34155c30ecadSmrg# XORG_CHANGELOG()
34165c30ecadSmrg# ----------------
34175c30ecadSmrg# Minimum version: 1.2.0
34185c30ecadSmrg#
34195c30ecadSmrg# Defines the variable CHANGELOG_CMD as the command to generate
34205c30ecadSmrg# ChangeLog from git.
34215c30ecadSmrg#
34225c30ecadSmrg#
34235c30ecadSmrgAC_DEFUN([XORG_CHANGELOG], [
34245c30ecadSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
34255c30ecadSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
34265c30ecadSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
34275c30ecadSmrgtouch \$(top_srcdir)/ChangeLog; \
34285c30ecadSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
34295c30ecadSmrgAC_SUBST([CHANGELOG_CMD])
34305c30ecadSmrg]) # XORG_CHANGELOG
34315eefee25Smacallan
34325c30ecadSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
34335c30ecadSmrg#
34345c30ecadSmrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
34355c30ecadSmrg#   Foundation, Inc.
34365c30ecadSmrg#   Written by Gordon Matzigkeit, 1996
34375c30ecadSmrg#
34385c30ecadSmrg# This file is free software; the Free Software Foundation gives
34395c30ecadSmrg# unlimited permission to copy and/or distribute it, with or without
34405c30ecadSmrg# modifications, as long as this notice is preserved.
3441dc99b369Smrg
34425c30ecadSmrgm4_define([_LT_COPYING], [dnl
34435c30ecadSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
34445c30ecadSmrg# This is free software; see the source for copying conditions.  There is NO
34455c30ecadSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3446dc99b369Smrg
34475c30ecadSmrg# GNU Libtool is free software; you can redistribute it and/or modify
34485c30ecadSmrg# it under the terms of the GNU General Public License as published by
34495c30ecadSmrg# the Free Software Foundation; either version 2 of of the License, or
34505c30ecadSmrg# (at your option) any later version.
34515c30ecadSmrg#
34525c30ecadSmrg# As a special exception to the GNU General Public License, if you
34535c30ecadSmrg# distribute this file as part of a program or library that is built
34545c30ecadSmrg# using GNU Libtool, you may include this file under the  same
34555c30ecadSmrg# distribution terms that you use for the rest of that program.
34565c30ecadSmrg#
34575c30ecadSmrg# GNU Libtool is distributed in the hope that it will be useful, but
34585c30ecadSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
34595c30ecadSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
34605c30ecadSmrg# GNU General Public License for more details.
34615c30ecadSmrg#
34625c30ecadSmrg# You should have received a copy of the GNU General Public License
34635c30ecadSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
34645c30ecadSmrg])
34655eefee25Smacallan
34665c30ecadSmrg# serial 59 LT_INIT
34675eefee25Smacallan
34685eefee25Smacallan
34695c30ecadSmrg# LT_PREREQ(VERSION)
34705c30ecadSmrg# ------------------
34715c30ecadSmrg# Complain and exit if this libtool version is less that VERSION.
34725c30ecadSmrgm4_defun([LT_PREREQ],
34735c30ecadSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
34745c30ecadSmrg       [m4_default([$3],
34755c30ecadSmrg		   [m4_fatal([Libtool version $1 or higher is required],
34765c30ecadSmrg		             63)])],
34775c30ecadSmrg       [$2])])
34785eefee25Smacallan
34795eefee25Smacallan
34805c30ecadSmrg# _LT_CHECK_BUILDDIR
34815c30ecadSmrg# ------------------
34825c30ecadSmrg# Complain if the absolute build directory name contains unusual characters
34835c30ecadSmrgm4_defun([_LT_CHECK_BUILDDIR],
34845c30ecadSmrg[case `pwd` in
34855c30ecadSmrg  *\ * | *\	*)
34865c30ecadSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
34875c30ecadSmrgesac
34885c30ecadSmrg])
34895eefee25Smacallan
34905eefee25Smacallan
34915c30ecadSmrg# LT_INIT([OPTIONS])
34925c30ecadSmrg# ------------------
34935c30ecadSmrgAC_DEFUN([LT_INIT],
34945c30ecadSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
34955c30ecadSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
34965c30ecadSmrgAC_BEFORE([$0], [LT_LANG])dnl
34975c30ecadSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
34985c30ecadSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
34995c30ecadSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
35005eefee25Smacallan
35015c30ecadSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
35025c30ecadSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
35035c30ecadSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
35045c30ecadSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
35055c30ecadSmrgdnl unless we require an AC_DEFUNed macro:
35065c30ecadSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
35075c30ecadSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
35085c30ecadSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
35095c30ecadSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
35105c30ecadSmrgm4_require([_LT_PROG_LTMAIN])dnl
35115eefee25Smacallan
35125c30ecadSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
35135eefee25Smacallan
35145c30ecadSmrgdnl Parse OPTIONS
35155c30ecadSmrg_LT_SET_OPTIONS([$0], [$1])
35165eefee25Smacallan
35175c30ecadSmrg# This can be used to rebuild libtool when needed
35185c30ecadSmrgLIBTOOL_DEPS=$ltmain
35195eefee25Smacallan
35205c30ecadSmrg# Always use our own libtool.
35215c30ecadSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
35225c30ecadSmrgAC_SUBST(LIBTOOL)dnl
35235eefee25Smacallan
35245c30ecadSmrg_LT_SETUP
35255eefee25Smacallan
35265c30ecadSmrg# Only expand once:
35275c30ecadSmrgm4_define([LT_INIT])
35285c30ecadSmrg])# LT_INIT
35295eefee25Smacallan
35305c30ecadSmrg# Old names:
35315c30ecadSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
35325c30ecadSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
35335c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
35345c30ecadSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
35355c30ecadSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
35365eefee25Smacallan
35375eefee25Smacallan
35385c30ecadSmrg# _LT_PREPARE_CC_BASENAME
35395c30ecadSmrg# -----------------------
35405c30ecadSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
35415c30ecadSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
35425c30ecadSmrgfunc_cc_basename ()
35435c30ecadSmrg{
35445c30ecadSmrg    for cc_temp in @S|@*""; do
35455c30ecadSmrg      case $cc_temp in
35465c30ecadSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
35475c30ecadSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
35485c30ecadSmrg        \-*) ;;
35495c30ecadSmrg        *) break;;
35505c30ecadSmrg      esac
35515c30ecadSmrg    done
35525c30ecadSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
35535c30ecadSmrg}
35545c30ecadSmrg])# _LT_PREPARE_CC_BASENAME
3555dc99b369Smrg
35565eefee25Smacallan
35575c30ecadSmrg# _LT_CC_BASENAME(CC)
35585c30ecadSmrg# -------------------
35595c30ecadSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
35605c30ecadSmrg# but that macro is also expanded into generated libtool script, which
35615c30ecadSmrg# arranges for $SED and $ECHO to be set by different means.
35625c30ecadSmrgm4_defun([_LT_CC_BASENAME],
35635c30ecadSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
35645c30ecadSmrgAC_REQUIRE([_LT_DECL_SED])dnl
35655c30ecadSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
35665c30ecadSmrgfunc_cc_basename $1
35675c30ecadSmrgcc_basename=$func_cc_basename_result
35685c30ecadSmrg])
35695eefee25Smacallan
35705eefee25Smacallan
35715c30ecadSmrg# _LT_FILEUTILS_DEFAULTS
35725c30ecadSmrg# ----------------------
35735c30ecadSmrg# It is okay to use these file commands and assume they have been set
35745c30ecadSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
35755c30ecadSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
35765c30ecadSmrg[: ${CP="cp -f"}
35775c30ecadSmrg: ${MV="mv -f"}
35785c30ecadSmrg: ${RM="rm -f"}
35795c30ecadSmrg])# _LT_FILEUTILS_DEFAULTS
35805eefee25Smacallan
35815eefee25Smacallan
35825c30ecadSmrg# _LT_SETUP
35835c30ecadSmrg# ---------
35845c30ecadSmrgm4_defun([_LT_SETUP],
35855c30ecadSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
35865c30ecadSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
35875c30ecadSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
35885c30ecadSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
35895eefee25Smacallan
35905c30ecadSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
35915c30ecadSmrgdnl
35925c30ecadSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
35935c30ecadSmrg_LT_DECL([], [host], [0])dnl
35945c30ecadSmrg_LT_DECL([], [host_os], [0])dnl
35955c30ecadSmrgdnl
35965c30ecadSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
35975c30ecadSmrg_LT_DECL([], [build], [0])dnl
35985c30ecadSmrg_LT_DECL([], [build_os], [0])dnl
35995c30ecadSmrgdnl
36005c30ecadSmrgAC_REQUIRE([AC_PROG_CC])dnl
36015c30ecadSmrgAC_REQUIRE([LT_PATH_LD])dnl
36025c30ecadSmrgAC_REQUIRE([LT_PATH_NM])dnl
36035c30ecadSmrgdnl
36045c30ecadSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
36055c30ecadSmrgtest -z "$LN_S" && LN_S="ln -s"
36065c30ecadSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
36075c30ecadSmrgdnl
36085c30ecadSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
36095c30ecadSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
36105c30ecadSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
36115c30ecadSmrgdnl
36125c30ecadSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
36135c30ecadSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
36145c30ecadSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
36155c30ecadSmrgm4_require([_LT_CMD_RELOAD])dnl
36165c30ecadSmrgm4_require([_LT_DECL_FILECMD])dnl
36175c30ecadSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
36185c30ecadSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
36195c30ecadSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
36205c30ecadSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
36215c30ecadSmrgm4_require([_LT_WITH_SYSROOT])dnl
36225c30ecadSmrgm4_require([_LT_CMD_TRUNCATE])dnl
36235eefee25Smacallan
36245c30ecadSmrg_LT_CONFIG_LIBTOOL_INIT([
36255c30ecadSmrg# See if we are running on zsh, and set the options that allow our
36265c30ecadSmrg# commands through without removal of \ escapes INIT.
36275c30ecadSmrgif test -n "\${ZSH_VERSION+set}"; then
36285c30ecadSmrg   setopt NO_GLOB_SUBST
36295c30ecadSmrgfi
36305c30ecadSmrg])
36315c30ecadSmrgif test -n "${ZSH_VERSION+set}"; then
36325c30ecadSmrg   setopt NO_GLOB_SUBST
36335c30ecadSmrgfi
36345c30ecadSmrg
36355c30ecadSmrg_LT_CHECK_OBJDIR
36365c30ecadSmrg
36375c30ecadSmrgm4_require([_LT_TAG_COMPILER])dnl
36385c30ecadSmrg
36395c30ecadSmrgcase $host_os in
36405c30ecadSmrgaix3*)
36415c30ecadSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
36425c30ecadSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
36435c30ecadSmrg  # vanish in a puff of smoke.
36445c30ecadSmrg  if test set != "${COLLECT_NAMES+set}"; then
36455c30ecadSmrg    COLLECT_NAMES=
36465c30ecadSmrg    export COLLECT_NAMES
3647dc99b369Smrg  fi
3648dc99b369Smrg  ;;
36495c30ecadSmrgesac
36505eefee25Smacallan
36515c30ecadSmrg# Global variables:
36525c30ecadSmrgofile=libtool
36535c30ecadSmrgcan_build_shared=yes
36545eefee25Smacallan
36555c30ecadSmrg# All known linkers require a '.a' archive for static linking (except MSVC and
36565c30ecadSmrg# ICC, which need '.lib').
36575c30ecadSmrglibext=a
36585eefee25Smacallan
36595c30ecadSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
36605eefee25Smacallan
36615c30ecadSmrgold_CC=$CC
36625c30ecadSmrgold_CFLAGS=$CFLAGS
36635eefee25Smacallan
36645c30ecadSmrg# Set sane defaults for various variables
36655c30ecadSmrgtest -z "$CC" && CC=cc
36665c30ecadSmrgtest -z "$LTCC" && LTCC=$CC
36675c30ecadSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
36685c30ecadSmrgtest -z "$LD" && LD=ld
36695c30ecadSmrgtest -z "$ac_objext" && ac_objext=o
36705eefee25Smacallan
36715c30ecadSmrg_LT_CC_BASENAME([$compiler])
36725eefee25Smacallan
36735c30ecadSmrg# Only perform the check for file, if the check method requires it
36745c30ecadSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
36755c30ecadSmrgcase $deplibs_check_method in
36765c30ecadSmrgfile_magic*)
36775c30ecadSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
36785c30ecadSmrg    _LT_PATH_MAGIC
3679dc99b369Smrg  fi
3680dc99b369Smrg  ;;
36815c30ecadSmrgesac
36825eefee25Smacallan
36835c30ecadSmrg# Use C for the default configuration in the libtool script
36845c30ecadSmrgLT_SUPPORTED_TAG([CC])
36855c30ecadSmrg_LT_LANG_C_CONFIG
36865c30ecadSmrg_LT_LANG_DEFAULT_CONFIG
36875c30ecadSmrg_LT_CONFIG_COMMANDS
36885c30ecadSmrg])# _LT_SETUP
36895eefee25Smacallan
36905eefee25Smacallan
36915c30ecadSmrg# _LT_PREPARE_SED_QUOTE_VARS
36925c30ecadSmrg# --------------------------
36935c30ecadSmrg# Define a few sed substitution that help us do robust quoting.
36945c30ecadSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
36955c30ecadSmrg[# Backslashify metacharacters that are still active within
36965c30ecadSmrg# double-quoted strings.
36975c30ecadSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
36985eefee25Smacallan
36995c30ecadSmrg# Same as above, but do not quote variable references.
37005c30ecadSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
37015eefee25Smacallan
37025c30ecadSmrg# Sed substitution to delay expansion of an escaped shell variable in a
37035c30ecadSmrg# double_quote_subst'ed string.
37045c30ecadSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
37055eefee25Smacallan
37065c30ecadSmrg# Sed substitution to delay expansion of an escaped single quote.
37075c30ecadSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
37085eefee25Smacallan
37095c30ecadSmrg# Sed substitution to avoid accidental globbing in evaled expressions
37105c30ecadSmrgno_glob_subst='s/\*/\\\*/g'
37115c30ecadSmrg])
37125eefee25Smacallan
37135c30ecadSmrg# _LT_PROG_LTMAIN
37145c30ecadSmrg# ---------------
37155c30ecadSmrg# Note that this code is called both from 'configure', and 'config.status'
37165c30ecadSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
37175c30ecadSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
37185c30ecadSmrg# so we pass a copy along to make sure it has a sensible value anyway.
37195c30ecadSmrgm4_defun([_LT_PROG_LTMAIN],
37205c30ecadSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
37215c30ecadSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
37225c30ecadSmrgltmain=$ac_aux_dir/ltmain.sh
37235c30ecadSmrg])# _LT_PROG_LTMAIN
37245eefee25Smacallan
37255eefee25Smacallan
37265eefee25Smacallan
37275c30ecadSmrg# So that we can recreate a full libtool script including additional
37285c30ecadSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
37295c30ecadSmrg# in macros and then make a single call at the end using the 'libtool'
37305c30ecadSmrg# label.
3731dc99b369Smrg
3732dc99b369Smrg
37335c30ecadSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
37345c30ecadSmrg# ----------------------------------------
37355c30ecadSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
37365c30ecadSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
37375c30ecadSmrg[m4_ifval([$1],
37385c30ecadSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
37395c30ecadSmrg                     [$1
37405c30ecadSmrg])])])
3741dc99b369Smrg
37425c30ecadSmrg# Initialize.
37435c30ecadSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
3744dc99b369Smrg
37455eefee25Smacallan
37465c30ecadSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
37475c30ecadSmrg# ------------------------------
37485c30ecadSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
37495c30ecadSmrgm4_define([_LT_CONFIG_LIBTOOL],
37505c30ecadSmrg[m4_ifval([$1],
37515c30ecadSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
37525c30ecadSmrg                     [$1
37535c30ecadSmrg])])])
37545eefee25Smacallan
37555c30ecadSmrg# Initialize.
37565c30ecadSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
37575eefee25Smacallan
37585eefee25Smacallan
37595c30ecadSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
37605c30ecadSmrg# -----------------------------------------------------
37615c30ecadSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
37625c30ecadSmrg[_LT_CONFIG_LIBTOOL([$1])
37635c30ecadSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
37645c30ecadSmrg])
37655eefee25Smacallan
37665eefee25Smacallan
37675c30ecadSmrg# _LT_FORMAT_COMMENT([COMMENT])
37685c30ecadSmrg# -----------------------------
37695c30ecadSmrg# Add leading comment marks to the start of each line, and a trailing
37705c30ecadSmrg# full-stop to the whole comment if one is not present already.
37715c30ecadSmrgm4_define([_LT_FORMAT_COMMENT],
37725c30ecadSmrg[m4_ifval([$1], [
37735c30ecadSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
37745c30ecadSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
37755c30ecadSmrg)])
37765eefee25Smacallan
37775eefee25Smacallan
37785eefee25Smacallan
37795eefee25Smacallan
37805eefee25Smacallan
37815c30ecadSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
37825c30ecadSmrg# -------------------------------------------------------------------
37835c30ecadSmrg# CONFIGNAME is the name given to the value in the libtool script.
37845c30ecadSmrg# VARNAME is the (base) name used in the configure script.
37855c30ecadSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
37865c30ecadSmrg# VARNAME.  Any other value will be used directly.
37875c30ecadSmrgm4_define([_LT_DECL],
37885c30ecadSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
37895c30ecadSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
37905c30ecadSmrg	[m4_ifval([$1], [$1], [$2])])
37915c30ecadSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
37925c30ecadSmrg    m4_ifval([$4],
37935c30ecadSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
37945c30ecadSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
37955c30ecadSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
37965c30ecadSmrg])
37975eefee25Smacallan
37985eefee25Smacallan
37995c30ecadSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
38005c30ecadSmrg# --------------------------------------------------------
38015c30ecadSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
38025eefee25Smacallan
38035eefee25Smacallan
38045c30ecadSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
38055c30ecadSmrg# ------------------------------------------------
38065c30ecadSmrgm4_define([lt_decl_tag_varnames],
38075c30ecadSmrg[_lt_decl_filter([tagged?], [yes], $@)])
38085eefee25Smacallan
38095eefee25Smacallan
38105c30ecadSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
38115c30ecadSmrg# ---------------------------------------------------------
38125c30ecadSmrgm4_define([_lt_decl_filter],
38135c30ecadSmrg[m4_case([$#],
38145c30ecadSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
38155c30ecadSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
38165c30ecadSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
38175c30ecadSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
38185c30ecadSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
38195c30ecadSmrg])
38205eefee25Smacallan
38215eefee25Smacallan
38225c30ecadSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
38235c30ecadSmrg# --------------------------------------------------
38245c30ecadSmrgm4_define([lt_decl_quote_varnames],
38255c30ecadSmrg[_lt_decl_filter([value], [1], $@)])
38265eefee25Smacallan
38275eefee25Smacallan
38285c30ecadSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
38295c30ecadSmrg# ---------------------------------------------------
38305c30ecadSmrgm4_define([lt_decl_dquote_varnames],
38315c30ecadSmrg[_lt_decl_filter([value], [2], $@)])
38325eefee25Smacallan
38335eefee25Smacallan
38345c30ecadSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
38355c30ecadSmrg# ---------------------------------------------------
38365c30ecadSmrgm4_define([lt_decl_varnames_tagged],
38375c30ecadSmrg[m4_assert([$# <= 2])dnl
38385c30ecadSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
38395c30ecadSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
38405c30ecadSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
38415c30ecadSmrgm4_define([_lt_decl_varnames_tagged],
38425c30ecadSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
38435eefee25Smacallan
38445eefee25Smacallan
38455c30ecadSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
38465c30ecadSmrg# ------------------------------------------------
38475c30ecadSmrgm4_define([lt_decl_all_varnames],
38485c30ecadSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
38495c30ecadSmrg     m4_if([$2], [],
38505c30ecadSmrg	   m4_quote(lt_decl_varnames),
38515c30ecadSmrg	m4_quote(m4_shift($@))))[]dnl
38525c30ecadSmrg])
38535c30ecadSmrgm4_define([_lt_decl_all_varnames],
38545c30ecadSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
38555c30ecadSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
38565c30ecadSmrg])
38575eefee25Smacallan
38585eefee25Smacallan
38595c30ecadSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
38605c30ecadSmrg# ------------------------------------
38615c30ecadSmrg# Quote a variable value, and forward it to 'config.status' so that its
38625c30ecadSmrg# declaration there will have the same value as in 'configure'.  VARNAME
38635c30ecadSmrg# must have a single quote delimited value for this to work.
38645c30ecadSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
38655c30ecadSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
38665eefee25Smacallan
38675eefee25Smacallan
38685c30ecadSmrg# _LT_CONFIG_STATUS_DECLARATIONS
38695c30ecadSmrg# ------------------------------
38705c30ecadSmrg# We delimit libtool config variables with single quotes, so when
38715c30ecadSmrg# we write them to config.status, we have to be sure to quote all
38725c30ecadSmrg# embedded single quotes properly.  In configure, this macro expands
38735c30ecadSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
38745c30ecadSmrg#
38755c30ecadSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
38765c30ecadSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
38775c30ecadSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
38785c30ecadSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
38795eefee25Smacallan
38805eefee25Smacallan
38815c30ecadSmrg# _LT_LIBTOOL_TAGS
38825c30ecadSmrg# ----------------
38835c30ecadSmrg# Output comment and list of tags supported by the script
38845c30ecadSmrgm4_defun([_LT_LIBTOOL_TAGS],
38855c30ecadSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
38865c30ecadSmrgavailable_tags='_LT_TAGS'dnl
38875c30ecadSmrg])
38885eefee25Smacallan
38895eefee25Smacallan
38905c30ecadSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
38915c30ecadSmrg# -----------------------------------
38925c30ecadSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
38935c30ecadSmrg# expand to a commented shell variable setting:
38945c30ecadSmrg#
38955c30ecadSmrg#    # Some comment about what VAR is for.
38965c30ecadSmrg#    visible_name=$lt_internal_name
38975c30ecadSmrgm4_define([_LT_LIBTOOL_DECLARE],
38985c30ecadSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
38995c30ecadSmrg					   [description])))[]dnl
39005c30ecadSmrgm4_pushdef([_libtool_name],
39015c30ecadSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
39025c30ecadSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
39035c30ecadSmrg    [0], [_libtool_name=[$]$1],
39045c30ecadSmrg    [1], [_libtool_name=$lt_[]$1],
39055c30ecadSmrg    [2], [_libtool_name=$lt_[]$1],
39065c30ecadSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
39075c30ecadSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
39085c30ecadSmrg])
39095eefee25Smacallan
39105eefee25Smacallan
39115c30ecadSmrg# _LT_LIBTOOL_CONFIG_VARS
39125c30ecadSmrg# -----------------------
39135c30ecadSmrg# Produce commented declarations of non-tagged libtool config variables
39145c30ecadSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
39155c30ecadSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
39165c30ecadSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
39175c30ecadSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
39185c30ecadSmrg[m4_foreach([_lt_var],
39195c30ecadSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
39205c30ecadSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
39215eefee25Smacallan
39225eefee25Smacallan
39235c30ecadSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
39245c30ecadSmrg# -------------------------
39255c30ecadSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
39265c30ecadSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
39275c30ecadSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
392862ab96baSmrg
3929dc99b369Smrg
39305c30ecadSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
39315c30ecadSmrg# ------------------------------
39325c30ecadSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
3933dc99b369Smrg
39345eefee25Smacallan
39355c30ecadSmrg# _LT_CONFIG_COMMANDS
39365c30ecadSmrg# -------------------
39375c30ecadSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
39385c30ecadSmrg# variables for single and double quote escaping we saved from calls
39395c30ecadSmrg# to _LT_DECL, we can put quote escaped variables declarations
39405c30ecadSmrg# into 'config.status', and then the shell code to quote escape them in
39415c30ecadSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
39425c30ecadSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
39435c30ecadSmrgm4_defun([_LT_CONFIG_COMMANDS],
39445c30ecadSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
39455c30ecadSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
39465c30ecadSmrg	dnl instead of duplicating it all over again into config.status,
39475c30ecadSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
39485c30ecadSmrg	dnl needs to know what name is stored there:
39495c30ecadSmrg        [AC_CONFIG_COMMANDS([libtool],
39505c30ecadSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
39515c30ecadSmrg    dnl If the libtool generation code is destined for config.status,
39525c30ecadSmrg    dnl expand the accumulated commands and init code now:
39535c30ecadSmrg    [AC_CONFIG_COMMANDS([libtool],
39545c30ecadSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
39555c30ecadSmrg])#_LT_CONFIG_COMMANDS
395662ab96baSmrg
39575eefee25Smacallan
39585c30ecadSmrg# Initialize.
39595c30ecadSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
39605c30ecadSmrg[
39615eefee25Smacallan
39625c30ecadSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
39635c30ecadSmrg# if CDPATH is set.
39645c30ecadSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
39655c30ecadSmrg
39665c30ecadSmrgsed_quote_subst='$sed_quote_subst'
39675c30ecadSmrgdouble_quote_subst='$double_quote_subst'
39685c30ecadSmrgdelay_variable_subst='$delay_variable_subst'
39695c30ecadSmrg_LT_CONFIG_STATUS_DECLARATIONS
39705c30ecadSmrgLTCC='$LTCC'
39715c30ecadSmrgLTCFLAGS='$LTCFLAGS'
39725c30ecadSmrgcompiler='$compiler_DEFAULT'
39735c30ecadSmrg
39745c30ecadSmrg# A function that is used when there is no print builtin or printf.
39755c30ecadSmrgfunc_fallback_echo ()
39765c30ecadSmrg{
39775c30ecadSmrg  eval 'cat <<_LTECHO_EOF
39785c30ecadSmrg\$[]1
39795c30ecadSmrg_LTECHO_EOF'
39805c30ecadSmrg}
39815c30ecadSmrg
39825c30ecadSmrg# Quote evaled strings.
39835c30ecadSmrgfor var in lt_decl_all_varnames([[ \
39845c30ecadSmrg]], lt_decl_quote_varnames); do
39855c30ecadSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
39865c30ecadSmrg    *[[\\\\\\\`\\"\\\$]]*)
39875c30ecadSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
3988dc99b369Smrg      ;;
39895c30ecadSmrg    *)
39905c30ecadSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
3991dc99b369Smrg      ;;
39925c30ecadSmrg    esac
39935c30ecadSmrgdone
39945c30ecadSmrg
39955c30ecadSmrg# Double-quote double-evaled strings.
39965c30ecadSmrgfor var in lt_decl_all_varnames([[ \
39975c30ecadSmrg]], lt_decl_dquote_varnames); do
39985c30ecadSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
39995c30ecadSmrg    *[[\\\\\\\`\\"\\\$]]*)
40005c30ecadSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
40015eefee25Smacallan      ;;
40025eefee25Smacallan    *)
40035c30ecadSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
40045eefee25Smacallan      ;;
40055eefee25Smacallan    esac
40065c30ecadSmrgdone
40075eefee25Smacallan
40085c30ecadSmrg_LT_OUTPUT_LIBTOOL_INIT
40095c30ecadSmrg])
40105eefee25Smacallan
40115c30ecadSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
40125c30ecadSmrg# ------------------------------------
40135c30ecadSmrg# Generate a child script FILE with all initialization necessary to
40145c30ecadSmrg# reuse the environment learned by the parent script, and make the
40155c30ecadSmrg# file executable.  If COMMENT is supplied, it is inserted after the
40165c30ecadSmrg# '#!' sequence but before initialization text begins.  After this
40175c30ecadSmrg# macro, additional text can be appended to FILE to form the body of
40185c30ecadSmrg# the child script.  The macro ends with non-zero status if the
40195c30ecadSmrg# file could not be fully written (such as if the disk is full).
40205c30ecadSmrgm4_ifdef([AS_INIT_GENERATED],
40215c30ecadSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
40225c30ecadSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
40235c30ecadSmrg[m4_require([AS_PREPARE])]dnl
40245c30ecadSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
40255c30ecadSmrg[lt_write_fail=0
40265c30ecadSmrgcat >$1 <<_ASEOF || lt_write_fail=1
40275c30ecadSmrg#! $SHELL
40285c30ecadSmrg# Generated by $as_me.
40295c30ecadSmrg$2
40305c30ecadSmrgSHELL=\${CONFIG_SHELL-$SHELL}
40315c30ecadSmrgexport SHELL
40325c30ecadSmrg_ASEOF
40335c30ecadSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
40345c30ecadSmrgAS_SHELL_SANITIZE
40355c30ecadSmrg_AS_PREPARE
40365c30ecadSmrgexec AS_MESSAGE_FD>&1
40375c30ecadSmrg_ASEOF
40385c30ecadSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
40395c30ecadSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
40405eefee25Smacallan
40415c30ecadSmrg# LT_OUTPUT
40425c30ecadSmrg# ---------
40435c30ecadSmrg# This macro allows early generation of the libtool script (before
40445c30ecadSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
40455c30ecadSmrg# tests.
40465c30ecadSmrgAC_DEFUN([LT_OUTPUT],
40475c30ecadSmrg[: ${CONFIG_LT=./config.lt}
40485c30ecadSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
40495c30ecadSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
40505c30ecadSmrg[# Run this file to recreate a libtool stub with the current configuration.])
40515eefee25Smacallan
40525c30ecadSmrgcat >>"$CONFIG_LT" <<\_LTEOF
40535c30ecadSmrglt_cl_silent=false
40545c30ecadSmrgexec AS_MESSAGE_LOG_FD>>config.log
40555c30ecadSmrg{
40565c30ecadSmrg  echo
40575c30ecadSmrg  AS_BOX([Running $as_me.])
40585c30ecadSmrg} >&AS_MESSAGE_LOG_FD
40595eefee25Smacallan
40605c30ecadSmrglt_cl_help="\
40615c30ecadSmrg'$as_me' creates a local libtool stub from the current configuration,
40625c30ecadSmrgfor use in further configure time tests before the real libtool is
40635c30ecadSmrggenerated.
40645eefee25Smacallan
40655c30ecadSmrgUsage: $[0] [[OPTIONS]]
40665eefee25Smacallan
40675c30ecadSmrg  -h, --help      print this help, then exit
40685c30ecadSmrg  -V, --version   print version number, then exit
40695c30ecadSmrg  -q, --quiet     do not print progress messages
40705c30ecadSmrg  -d, --debug     don't remove temporary files
40715eefee25Smacallan
40725c30ecadSmrgReport bugs to <bug-libtool@gnu.org>."
40735eefee25Smacallan
40745c30ecadSmrglt_cl_version="\
40755c30ecadSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
40765c30ecadSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
40775c30ecadSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
40785eefee25Smacallan
40795c30ecadSmrgCopyright (C) 2011 Free Software Foundation, Inc.
40805c30ecadSmrgThis config.lt script is free software; the Free Software Foundation
40815c30ecadSmrggives unlimited permision to copy, distribute and modify it."
40825eefee25Smacallan
40835c30ecadSmrgwhile test 0 != $[#]
40845c30ecadSmrgdo
40855c30ecadSmrg  case $[1] in
40865c30ecadSmrg    --version | --v* | -V )
40875c30ecadSmrg      echo "$lt_cl_version"; exit 0 ;;
40885c30ecadSmrg    --help | --h* | -h )
40895c30ecadSmrg      echo "$lt_cl_help"; exit 0 ;;
40905c30ecadSmrg    --debug | --d* | -d )
40915c30ecadSmrg      debug=: ;;
40925c30ecadSmrg    --quiet | --q* | --silent | --s* | -q )
40935c30ecadSmrg      lt_cl_silent=: ;;
40945eefee25Smacallan
40955c30ecadSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
40965c30ecadSmrgTry '$[0] --help' for more information.]) ;;
40975c30ecadSmrg
40985c30ecadSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
40995c30ecadSmrgTry '$[0] --help' for more information.]) ;;
41005c30ecadSmrg  esac
41015c30ecadSmrg  shift
41025c30ecadSmrgdone
41035c30ecadSmrg
41045c30ecadSmrgif $lt_cl_silent; then
41055c30ecadSmrg  exec AS_MESSAGE_FD>/dev/null
41065c30ecadSmrgfi
41075c30ecadSmrg_LTEOF
41085c30ecadSmrg
41095c30ecadSmrgcat >>"$CONFIG_LT" <<_LTEOF
41105c30ecadSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
41115c30ecadSmrg_LTEOF
41125c30ecadSmrg
41135c30ecadSmrgcat >>"$CONFIG_LT" <<\_LTEOF
41145c30ecadSmrgAC_MSG_NOTICE([creating $ofile])
41155c30ecadSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
41165c30ecadSmrgAS_EXIT(0)
41175c30ecadSmrg_LTEOF
41185c30ecadSmrgchmod +x "$CONFIG_LT"
41195c30ecadSmrg
41205c30ecadSmrg# configure is writing to config.log, but config.lt does its own redirection,
41215c30ecadSmrg# appending to config.log, which fails on DOS, as config.log is still kept
41225c30ecadSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
41235c30ecadSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
41245c30ecadSmrglt_cl_success=:
41255c30ecadSmrgtest yes = "$silent" &&
41265c30ecadSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
41275c30ecadSmrgexec AS_MESSAGE_LOG_FD>/dev/null
41285c30ecadSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
41295c30ecadSmrgexec AS_MESSAGE_LOG_FD>>config.log
41305c30ecadSmrg$lt_cl_success || AS_EXIT(1)
41315c30ecadSmrg])# LT_OUTPUT
41325c30ecadSmrg
41335c30ecadSmrg
41345c30ecadSmrg# _LT_CONFIG(TAG)
41355c30ecadSmrg# ---------------
41365c30ecadSmrg# If TAG is the built-in tag, create an initial libtool script with a
41375c30ecadSmrg# default configuration from the untagged config vars.  Otherwise add code
41385c30ecadSmrg# to config.status for appending the configuration named by TAG from the
41395c30ecadSmrg# matching tagged config vars.
41405c30ecadSmrgm4_defun([_LT_CONFIG],
41415c30ecadSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
41425c30ecadSmrg_LT_CONFIG_SAVE_COMMANDS([
41435c30ecadSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
41445c30ecadSmrg  m4_if(_LT_TAG, [C], [
41455c30ecadSmrg    # See if we are running on zsh, and set the options that allow our
41465c30ecadSmrg    # commands through without removal of \ escapes.
41475c30ecadSmrg    if test -n "${ZSH_VERSION+set}"; then
41485c30ecadSmrg      setopt NO_GLOB_SUBST
41495c30ecadSmrg    fi
41505c30ecadSmrg
41515c30ecadSmrg    cfgfile=${ofile}T
41525c30ecadSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
41535c30ecadSmrg    $RM "$cfgfile"
41545c30ecadSmrg
41555c30ecadSmrg    cat <<_LT_EOF >> "$cfgfile"
41565c30ecadSmrg#! $SHELL
41575c30ecadSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
41585c30ecadSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
41595c30ecadSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
41605c30ecadSmrg
41615c30ecadSmrg# Provide generalized library-building support services.
41625c30ecadSmrg# Written by Gordon Matzigkeit, 1996
41635c30ecadSmrg
41645c30ecadSmrg_LT_COPYING
41655c30ecadSmrg_LT_LIBTOOL_TAGS
41665c30ecadSmrg
41675c30ecadSmrg# Configured defaults for sys_lib_dlsearch_path munging.
41685c30ecadSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
41695c30ecadSmrg
41705c30ecadSmrg# ### BEGIN LIBTOOL CONFIG
41715c30ecadSmrg_LT_LIBTOOL_CONFIG_VARS
41725c30ecadSmrg_LT_LIBTOOL_TAG_VARS
41735c30ecadSmrg# ### END LIBTOOL CONFIG
41745c30ecadSmrg
41755c30ecadSmrg_LT_EOF
41765c30ecadSmrg
41775c30ecadSmrg    cat <<'_LT_EOF' >> "$cfgfile"
41785c30ecadSmrg
41795c30ecadSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
41805c30ecadSmrg
41815c30ecadSmrg_LT_PREPARE_MUNGE_PATH_LIST
41825c30ecadSmrg_LT_PREPARE_CC_BASENAME
41835c30ecadSmrg
41845c30ecadSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
41855c30ecadSmrg
41865c30ecadSmrg_LT_EOF
41875c30ecadSmrg
41885c30ecadSmrg  case $host_os in
41895c30ecadSmrg  aix3*)
41905c30ecadSmrg    cat <<\_LT_EOF >> "$cfgfile"
41915c30ecadSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
41925c30ecadSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
41935c30ecadSmrg# vanish in a puff of smoke.
41945c30ecadSmrgif test set != "${COLLECT_NAMES+set}"; then
41955c30ecadSmrg  COLLECT_NAMES=
41965c30ecadSmrg  export COLLECT_NAMES
41975c30ecadSmrgfi
41985c30ecadSmrg_LT_EOF
41995c30ecadSmrg    ;;
42005c30ecadSmrg  esac
42015c30ecadSmrg
42025c30ecadSmrg  _LT_PROG_LTMAIN
42035c30ecadSmrg
42045c30ecadSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
42055c30ecadSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
42065c30ecadSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
42075c30ecadSmrg  # is reportedly fixed, but why not run on old versions too?
42085c30ecadSmrg  $SED '$q' "$ltmain" >> "$cfgfile" \
42095c30ecadSmrg     || (rm -f "$cfgfile"; exit 1)
42105c30ecadSmrg
42115c30ecadSmrg   mv -f "$cfgfile" "$ofile" ||
42125c30ecadSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
42135c30ecadSmrg  chmod +x "$ofile"
42145c30ecadSmrg],
42155c30ecadSmrg[cat <<_LT_EOF >> "$ofile"
42165c30ecadSmrg
42175c30ecadSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
42185c30ecadSmrgdnl in a comment (ie after a #).
42195c30ecadSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
42205c30ecadSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
42215c30ecadSmrg# ### END LIBTOOL TAG CONFIG: $1
42225c30ecadSmrg_LT_EOF
42235c30ecadSmrg])dnl /m4_if
42245c30ecadSmrg],
42255c30ecadSmrg[m4_if([$1], [], [
42265c30ecadSmrg    PACKAGE='$PACKAGE'
42275c30ecadSmrg    VERSION='$VERSION'
42285c30ecadSmrg    RM='$RM'
42295c30ecadSmrg    ofile='$ofile'], [])
42305c30ecadSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
42315c30ecadSmrg])# _LT_CONFIG
42325c30ecadSmrg
42335c30ecadSmrg
42345c30ecadSmrg# LT_SUPPORTED_TAG(TAG)
42355c30ecadSmrg# ---------------------
42365c30ecadSmrg# Trace this macro to discover what tags are supported by the libtool
42375c30ecadSmrg# --tag option, using:
42385c30ecadSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
42395c30ecadSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
42405c30ecadSmrg
42415c30ecadSmrg
42425c30ecadSmrg# C support is built-in for now
42435c30ecadSmrgm4_define([_LT_LANG_C_enabled], [])
42445c30ecadSmrgm4_define([_LT_TAGS], [])
42455c30ecadSmrg
42465c30ecadSmrg
42475c30ecadSmrg# LT_LANG(LANG)
42485c30ecadSmrg# -------------
42495c30ecadSmrg# Enable libtool support for the given language if not already enabled.
42505c30ecadSmrgAC_DEFUN([LT_LANG],
42515c30ecadSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
42525c30ecadSmrgm4_case([$1],
42535c30ecadSmrg  [C],			[_LT_LANG(C)],
42545c30ecadSmrg  [C++],		[_LT_LANG(CXX)],
42555c30ecadSmrg  [Go],			[_LT_LANG(GO)],
42565c30ecadSmrg  [Java],		[_LT_LANG(GCJ)],
42575c30ecadSmrg  [Fortran 77],		[_LT_LANG(F77)],
42585c30ecadSmrg  [Fortran],		[_LT_LANG(FC)],
42595c30ecadSmrg  [Windows Resource],	[_LT_LANG(RC)],
42605c30ecadSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
42615c30ecadSmrg    [_LT_LANG($1)],
42625c30ecadSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
42635c30ecadSmrg])# LT_LANG
42645eefee25Smacallan
42655eefee25Smacallan
42665c30ecadSmrg# _LT_LANG(LANGNAME)
42675c30ecadSmrg# ------------------
42685c30ecadSmrgm4_defun([_LT_LANG],
42695c30ecadSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
42705c30ecadSmrg  [LT_SUPPORTED_TAG([$1])dnl
42715c30ecadSmrg  m4_append([_LT_TAGS], [$1 ])dnl
42725c30ecadSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
42735c30ecadSmrg  _LT_LANG_$1_CONFIG($1)])dnl
42745c30ecadSmrg])# _LT_LANG
42755eefee25Smacallan
42765eefee25Smacallan
42775c30ecadSmrgm4_ifndef([AC_PROG_GO], [
42785c30ecadSmrg# NOTE: This macro has been submitted for inclusion into   #
42795c30ecadSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
42805c30ecadSmrg#  a released version of Autoconf we should remove this    #
42815c30ecadSmrg#  macro and use it instead.                               #
42825c30ecadSmrgm4_defun([AC_PROG_GO],
42835c30ecadSmrg[AC_LANG_PUSH(Go)dnl
42845c30ecadSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
42855c30ecadSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
42865c30ecadSmrg_AC_ARG_VAR_LDFLAGS()dnl
42875c30ecadSmrgAC_CHECK_TOOL(GOC, gccgo)
42885c30ecadSmrgif test -z "$GOC"; then
42895c30ecadSmrg  if test -n "$ac_tool_prefix"; then
42905c30ecadSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
42915c30ecadSmrg  fi
42925c30ecadSmrgfi
42935c30ecadSmrgif test -z "$GOC"; then
42945c30ecadSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
42955c30ecadSmrgfi
42965c30ecadSmrg])#m4_defun
42975c30ecadSmrg])#m4_ifndef
42985eefee25Smacallan
42995eefee25Smacallan
43005c30ecadSmrg# _LT_LANG_DEFAULT_CONFIG
43015c30ecadSmrg# -----------------------
43025c30ecadSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
43035c30ecadSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
43045c30ecadSmrg  [LT_LANG(CXX)],
43055c30ecadSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
43065eefee25Smacallan
43075c30ecadSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
43085c30ecadSmrg  [LT_LANG(F77)],
43095c30ecadSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
43105eefee25Smacallan
43115c30ecadSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
43125c30ecadSmrg  [LT_LANG(FC)],
43135c30ecadSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
43145eefee25Smacallan
43155c30ecadSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
43165c30ecadSmrgdnl pulling things in needlessly.
43175c30ecadSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
43185c30ecadSmrg  [LT_LANG(GCJ)],
43195c30ecadSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
43205c30ecadSmrg    [LT_LANG(GCJ)],
43215c30ecadSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
43225c30ecadSmrg      [LT_LANG(GCJ)],
43235c30ecadSmrg      [m4_ifdef([AC_PROG_GCJ],
43245c30ecadSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
43255c30ecadSmrg       m4_ifdef([A][M_PROG_GCJ],
43265c30ecadSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
43275c30ecadSmrg       m4_ifdef([LT_PROG_GCJ],
43285c30ecadSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
43295eefee25Smacallan
43305c30ecadSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
43315c30ecadSmrg  [LT_LANG(GO)],
43325c30ecadSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
43335eefee25Smacallan
43345c30ecadSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
43355c30ecadSmrg  [LT_LANG(RC)],
43365c30ecadSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
43375c30ecadSmrg])# _LT_LANG_DEFAULT_CONFIG
43385eefee25Smacallan
43395c30ecadSmrg# Obsolete macros:
43405c30ecadSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
43415c30ecadSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
43425c30ecadSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
43435c30ecadSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
43445c30ecadSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
43455c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
43465c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
43475c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
43485c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
43495c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
43505c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
43515eefee25Smacallan
43525eefee25Smacallan
43535c30ecadSmrg# _LT_TAG_COMPILER
43545c30ecadSmrg# ----------------
43555c30ecadSmrgm4_defun([_LT_TAG_COMPILER],
43565c30ecadSmrg[AC_REQUIRE([AC_PROG_CC])dnl
43575eefee25Smacallan
43585c30ecadSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
43595c30ecadSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
43605c30ecadSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
43615c30ecadSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
43625eefee25Smacallan
43635c30ecadSmrg# If no C compiler was specified, use CC.
43645c30ecadSmrgLTCC=${LTCC-"$CC"}
43655eefee25Smacallan
43665c30ecadSmrg# If no C compiler flags were specified, use CFLAGS.
43675c30ecadSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
43685eefee25Smacallan
43695c30ecadSmrg# Allow CC to be a program name with arguments.
43705c30ecadSmrgcompiler=$CC
43715c30ecadSmrg])# _LT_TAG_COMPILER
43725eefee25Smacallan
43735eefee25Smacallan
43745c30ecadSmrg# _LT_COMPILER_BOILERPLATE
43755c30ecadSmrg# ------------------------
43765c30ecadSmrg# Check for compiler boilerplate output or warnings with
43775c30ecadSmrg# the simple compiler test code.
43785c30ecadSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
43795c30ecadSmrg[m4_require([_LT_DECL_SED])dnl
43805c30ecadSmrgac_outfile=conftest.$ac_objext
43815c30ecadSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
43825c30ecadSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
43835c30ecadSmrg_lt_compiler_boilerplate=`cat conftest.err`
43845c30ecadSmrg$RM conftest*
43855c30ecadSmrg])# _LT_COMPILER_BOILERPLATE
43865eefee25Smacallan
43875eefee25Smacallan
43885c30ecadSmrg# _LT_LINKER_BOILERPLATE
43895c30ecadSmrg# ----------------------
43905c30ecadSmrg# Check for linker boilerplate output or warnings with
43915c30ecadSmrg# the simple link test code.
43925c30ecadSmrgm4_defun([_LT_LINKER_BOILERPLATE],
43935c30ecadSmrg[m4_require([_LT_DECL_SED])dnl
43945c30ecadSmrgac_outfile=conftest.$ac_objext
43955c30ecadSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
43965c30ecadSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
43975c30ecadSmrg_lt_linker_boilerplate=`cat conftest.err`
43985c30ecadSmrg$RM -r conftest*
43995c30ecadSmrg])# _LT_LINKER_BOILERPLATE
44005eefee25Smacallan
44015c30ecadSmrg# _LT_REQUIRED_DARWIN_CHECKS
44025c30ecadSmrg# -------------------------
44035c30ecadSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
4404dc99b369Smrg  case $host_os in
44055c30ecadSmrg    rhapsody* | darwin*)
44065c30ecadSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
44075c30ecadSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
44085c30ecadSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
44095c30ecadSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
44105c30ecadSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
44115c30ecadSmrg    _LT_DECL([], [DSYMUTIL], [1],
44125c30ecadSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
44135c30ecadSmrg    _LT_DECL([], [NMEDIT], [1],
44145c30ecadSmrg      [Tool to change global to local symbols on Mac OS X])
44155c30ecadSmrg    _LT_DECL([], [LIPO], [1],
44165c30ecadSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
44175c30ecadSmrg    _LT_DECL([], [OTOOL], [1],
44185c30ecadSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
44195c30ecadSmrg    _LT_DECL([], [OTOOL64], [1],
44205c30ecadSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
44215eefee25Smacallan
44225c30ecadSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
44235c30ecadSmrg      [lt_cv_apple_cc_single_mod=no
44245c30ecadSmrg      if test -z "$LT_MULTI_MODULE"; then
44255c30ecadSmrg	# By default we will add the -single_module flag. You can override
44265c30ecadSmrg	# by either setting the environment variable LT_MULTI_MODULE
44275c30ecadSmrg	# non-empty at configure time, or by adding -multi_module to the
44285c30ecadSmrg	# link flags.
44295c30ecadSmrg	rm -rf libconftest.dylib*
44305c30ecadSmrg	echo "int foo(void){return 1;}" > conftest.c
44315c30ecadSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
44325c30ecadSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
44335c30ecadSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
44345c30ecadSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
44355c30ecadSmrg        _lt_result=$?
44365c30ecadSmrg	# If there is a non-empty error log, and "single_module"
44375c30ecadSmrg	# appears in it, assume the flag caused a linker warning
44385c30ecadSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
44395c30ecadSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
44405c30ecadSmrg	# Otherwise, if the output was created with a 0 exit code from
44415c30ecadSmrg	# the compiler, it worked.
44425c30ecadSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
44435c30ecadSmrg	  lt_cv_apple_cc_single_mod=yes
44445c30ecadSmrg	else
44455c30ecadSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
44465c30ecadSmrg	fi
44475c30ecadSmrg	rm -rf libconftest.dylib*
44485c30ecadSmrg	rm -f conftest.*
44495c30ecadSmrg      fi])
44505eefee25Smacallan
44515c30ecadSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
44525c30ecadSmrg      [lt_cv_ld_exported_symbols_list],
44535c30ecadSmrg      [lt_cv_ld_exported_symbols_list=no
44545c30ecadSmrg      save_LDFLAGS=$LDFLAGS
44555c30ecadSmrg      echo "_main" > conftest.sym
44565c30ecadSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
44575c30ecadSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
44585c30ecadSmrg	[lt_cv_ld_exported_symbols_list=yes],
44595c30ecadSmrg	[lt_cv_ld_exported_symbols_list=no])
44605c30ecadSmrg	LDFLAGS=$save_LDFLAGS
44615c30ecadSmrg    ])
44625eefee25Smacallan
44635c30ecadSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
44645c30ecadSmrg      [lt_cv_ld_force_load=no
44655c30ecadSmrg      cat > conftest.c << _LT_EOF
44665c30ecadSmrgint forced_loaded() { return 2;}
44675c30ecadSmrg_LT_EOF
44685c30ecadSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
44695c30ecadSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
44705c30ecadSmrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
44715c30ecadSmrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
44725c30ecadSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
44735c30ecadSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
44745c30ecadSmrg      cat > conftest.c << _LT_EOF
44755c30ecadSmrgint main() { return 0;}
44765c30ecadSmrg_LT_EOF
44775c30ecadSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
44785c30ecadSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
44795c30ecadSmrg      _lt_result=$?
44805c30ecadSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
44815c30ecadSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
44825c30ecadSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
44835c30ecadSmrg	lt_cv_ld_force_load=yes
44845c30ecadSmrg      else
44855c30ecadSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
44865c30ecadSmrg      fi
44875c30ecadSmrg        rm -f conftest.err libconftest.a conftest conftest.c
44885c30ecadSmrg        rm -rf conftest.dSYM
44895c30ecadSmrg    ])
44905c30ecadSmrg    case $host_os in
44915c30ecadSmrg    rhapsody* | darwin1.[[012]])
44925c30ecadSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
44935c30ecadSmrg    darwin1.*)
44945c30ecadSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
44955c30ecadSmrg    darwin*)
44965c30ecadSmrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
44975c30ecadSmrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
44985c30ecadSmrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
44995c30ecadSmrg        *)
45005c30ecadSmrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
45015c30ecadSmrg      esac
45025c30ecadSmrg    ;;
45035c30ecadSmrg  esac
45045c30ecadSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
45055c30ecadSmrg      _lt_dar_single_mod='$single_module'
45065c30ecadSmrg    fi
45075c30ecadSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
45085c30ecadSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
4509dc99b369Smrg    else
45105c30ecadSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
4511dc99b369Smrg    fi
45125c30ecadSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
45135c30ecadSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
45145c30ecadSmrg    else
45155c30ecadSmrg      _lt_dsymutil=
45165c30ecadSmrg    fi
45175c30ecadSmrg    ;;
45185c30ecadSmrg  esac
45195c30ecadSmrg])
45205eefee25Smacallan
45215eefee25Smacallan
45225c30ecadSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
45235c30ecadSmrg# ---------------------------------
45245c30ecadSmrg# Checks for linker and compiler features on darwin
45255c30ecadSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
45265c30ecadSmrg[
45275c30ecadSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
45285c30ecadSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
45295c30ecadSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
45305c30ecadSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
45315c30ecadSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
45325c30ecadSmrg  if test yes = "$lt_cv_ld_force_load"; then
45335c30ecadSmrg    _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\"`'
45345c30ecadSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
45355c30ecadSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
45365c30ecadSmrg  else
45375c30ecadSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
45385c30ecadSmrg  fi
45395c30ecadSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
45405c30ecadSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
45415c30ecadSmrg  case $cc_basename in
45425c30ecadSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
45435c30ecadSmrg     *) _lt_dar_can_shared=$GCC ;;
45445c30ecadSmrg  esac
45455c30ecadSmrg  if test yes = "$_lt_dar_can_shared"; then
45465c30ecadSmrg    output_verbose_link_cmd=func_echo_all
45475c30ecadSmrg    _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"
45485c30ecadSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
45495c30ecadSmrg    _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"
45505c30ecadSmrg    _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"
45515c30ecadSmrg    m4_if([$1], [CXX],
45525c30ecadSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
45535c30ecadSmrg      _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"
45545c30ecadSmrg      _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"
45555c30ecadSmrg    fi
45565c30ecadSmrg],[])
45575c30ecadSmrg  else
45585c30ecadSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
45595c30ecadSmrg  fi
45605c30ecadSmrg])
45615eefee25Smacallan
45625c30ecadSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
45635c30ecadSmrg# ----------------------------------
45645c30ecadSmrg# Links a minimal program and checks the executable
45655c30ecadSmrg# for the system default hardcoded library path. In most cases,
45665c30ecadSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
45675c30ecadSmrg# the location of the communication and MPI libs are included too.
45685c30ecadSmrg# If we don't find anything, use the default library path according
45695c30ecadSmrg# to the aix ld manual.
45705c30ecadSmrg# Store the results from the different compilers for each TAGNAME.
45715c30ecadSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
45725c30ecadSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
45735c30ecadSmrg[m4_require([_LT_DECL_SED])dnl
45745c30ecadSmrgif test set = "${lt_cv_aix_libpath+set}"; then
45755c30ecadSmrg  aix_libpath=$lt_cv_aix_libpath
45765c30ecadSmrgelse
45775c30ecadSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
45785c30ecadSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
45795c30ecadSmrg  lt_aix_libpath_sed='[
45805c30ecadSmrg      /Import File Strings/,/^$/ {
45815c30ecadSmrg	  /^0/ {
45825c30ecadSmrg	      s/^0  *\([^ ]*\) *$/\1/
45835c30ecadSmrg	      p
45845c30ecadSmrg	  }
45855c30ecadSmrg      }]'
45865c30ecadSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
45875c30ecadSmrg  # Check for a 64-bit object if we didn't find anything.
45885c30ecadSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
45895c30ecadSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
45905c30ecadSmrg  fi],[])
45915c30ecadSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
45925c30ecadSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
45935c30ecadSmrg  fi
45945c30ecadSmrg  ])
45955c30ecadSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
45965c30ecadSmrgfi
45975c30ecadSmrg])# _LT_SYS_MODULE_PATH_AIX
45985eefee25Smacallan
45995eefee25Smacallan
46005c30ecadSmrg# _LT_SHELL_INIT(ARG)
46015c30ecadSmrg# -------------------
46025c30ecadSmrgm4_define([_LT_SHELL_INIT],
46035c30ecadSmrg[m4_divert_text([M4SH-INIT], [$1
46045c30ecadSmrg])])# _LT_SHELL_INIT
4605dc99b369Smrg
46065eefee25Smacallan
46075eefee25Smacallan
46085c30ecadSmrg# _LT_PROG_ECHO_BACKSLASH
46095c30ecadSmrg# -----------------------
46105c30ecadSmrg# Find how we can fake an echo command that does not interpret backslash.
46115c30ecadSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
46125c30ecadSmrg# of the generated configure script that will find a shell with a builtin
46135c30ecadSmrg# printf (that we can use as an echo command).
46145c30ecadSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
46155c30ecadSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
46165c30ecadSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
46175c30ecadSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
46185eefee25Smacallan
46195c30ecadSmrgAC_MSG_CHECKING([how to print strings])
46205c30ecadSmrg# Test print first, because it will be a builtin if present.
46215c30ecadSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
46225c30ecadSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
46235c30ecadSmrg  ECHO='print -r --'
46245c30ecadSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
46255c30ecadSmrg  ECHO='printf %s\n'
46265c30ecadSmrgelse
46275c30ecadSmrg  # Use this function as a fallback that always works.
46285c30ecadSmrg  func_fallback_echo ()
46295c30ecadSmrg  {
46305c30ecadSmrg    eval 'cat <<_LTECHO_EOF
46315c30ecadSmrg$[]1
46325c30ecadSmrg_LTECHO_EOF'
46335c30ecadSmrg  }
46345c30ecadSmrg  ECHO='func_fallback_echo'
46355c30ecadSmrgfi
46365eefee25Smacallan
46375c30ecadSmrg# func_echo_all arg...
46385c30ecadSmrg# Invoke $ECHO with all args, space-separated.
46395c30ecadSmrgfunc_echo_all ()
46405c30ecadSmrg{
46415c30ecadSmrg    $ECHO "$*"
46425c30ecadSmrg}
46435eefee25Smacallan
46445c30ecadSmrgcase $ECHO in
46455c30ecadSmrg  printf*) AC_MSG_RESULT([printf]) ;;
46465c30ecadSmrg  print*) AC_MSG_RESULT([print -r]) ;;
46475c30ecadSmrg  *) AC_MSG_RESULT([cat]) ;;
46485c30ecadSmrgesac
46495eefee25Smacallan
46505c30ecadSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
46515c30ecadSmrg[_AS_DETECT_SUGGESTED([
46525c30ecadSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
46535c30ecadSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
46545c30ecadSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
46555c30ecadSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
46565c30ecadSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
46575c30ecadSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
46585c30ecadSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
46595eefee25Smacallan
46605c30ecadSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
46615c30ecadSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
46625c30ecadSmrg])# _LT_PROG_ECHO_BACKSLASH
46635eefee25Smacallan
46645eefee25Smacallan
46655c30ecadSmrg# _LT_WITH_SYSROOT
46665c30ecadSmrg# ----------------
46675c30ecadSmrgAC_DEFUN([_LT_WITH_SYSROOT],
46685c30ecadSmrg[m4_require([_LT_DECL_SED])dnl
46695c30ecadSmrgAC_MSG_CHECKING([for sysroot])
46705c30ecadSmrgAC_ARG_WITH([sysroot],
46715c30ecadSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
46725c30ecadSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
46735c30ecadSmrg   if not specified).])],
46745c30ecadSmrg[], [with_sysroot=no])
46755eefee25Smacallan
46765c30ecadSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
46775c30ecadSmrgdnl in case the user passed a directory name.
46785c30ecadSmrglt_sysroot=
46795c30ecadSmrgcase $with_sysroot in #(
46805c30ecadSmrg yes)
46815c30ecadSmrg   if test yes = "$GCC"; then
46825c30ecadSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
46835c30ecadSmrg   fi
46845c30ecadSmrg   ;; #(
46855c30ecadSmrg /*)
46865c30ecadSmrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
46875c30ecadSmrg   ;; #(
46885c30ecadSmrg no|'')
46895c30ecadSmrg   ;; #(
46905c30ecadSmrg *)
46915c30ecadSmrg   AC_MSG_RESULT([$with_sysroot])
46925c30ecadSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
46935c30ecadSmrg   ;;
46945c30ecadSmrgesac
46955eefee25Smacallan
46965c30ecadSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
46975c30ecadSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
46985c30ecadSmrg[dependent libraries, and where our libraries should be installed.])])
46995eefee25Smacallan
47005c30ecadSmrg# _LT_ENABLE_LOCK
47015c30ecadSmrg# ---------------
47025c30ecadSmrgm4_defun([_LT_ENABLE_LOCK],
47035c30ecadSmrg[AC_ARG_ENABLE([libtool-lock],
47045c30ecadSmrg  [AS_HELP_STRING([--disable-libtool-lock],
47055c30ecadSmrg    [avoid locking (might break parallel builds)])])
47065c30ecadSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
47075c30ecadSmrg
47085c30ecadSmrg# Some flags need to be propagated to the compiler or linker for good
47095c30ecadSmrg# libtool support.
47105c30ecadSmrgcase $host in
47115c30ecadSmrgia64-*-hpux*)
47125c30ecadSmrg  # Find out what ABI is being produced by ac_compile, and set mode
47135c30ecadSmrg  # options accordingly.
47145c30ecadSmrg  echo 'int i;' > conftest.$ac_ext
47155c30ecadSmrg  if AC_TRY_EVAL(ac_compile); then
47165c30ecadSmrg    case `$FILECMD conftest.$ac_objext` in
47175c30ecadSmrg      *ELF-32*)
47185c30ecadSmrg	HPUX_IA64_MODE=32
4719dc99b369Smrg	;;
47205c30ecadSmrg      *ELF-64*)
47215c30ecadSmrg	HPUX_IA64_MODE=64
47225c30ecadSmrg	;;
47235c30ecadSmrg    esac
47245c30ecadSmrg  fi
47255c30ecadSmrg  rm -rf conftest*
47265c30ecadSmrg  ;;
47275c30ecadSmrg*-*-irix6*)
47285c30ecadSmrg  # Find out what ABI is being produced by ac_compile, and set linker
47295c30ecadSmrg  # options accordingly.
47305c30ecadSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
47315c30ecadSmrg  if AC_TRY_EVAL(ac_compile); then
47325c30ecadSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
47335c30ecadSmrg      case `$FILECMD conftest.$ac_objext` in
47345c30ecadSmrg	*32-bit*)
47355c30ecadSmrg	  LD="${LD-ld} -melf32bsmip"
47365c30ecadSmrg	  ;;
47375c30ecadSmrg	*N32*)
47385c30ecadSmrg	  LD="${LD-ld} -melf32bmipn32"
47395c30ecadSmrg	  ;;
47405c30ecadSmrg	*64-bit*)
47415c30ecadSmrg	  LD="${LD-ld} -melf64bmip"
4742dc99b369Smrg	;;
4743dc99b369Smrg      esac
47445c30ecadSmrg    else
47455c30ecadSmrg      case `$FILECMD conftest.$ac_objext` in
47465c30ecadSmrg	*32-bit*)
47475c30ecadSmrg	  LD="${LD-ld} -32"
47485c30ecadSmrg	  ;;
47495c30ecadSmrg	*N32*)
47505c30ecadSmrg	  LD="${LD-ld} -n32"
47515c30ecadSmrg	  ;;
47525c30ecadSmrg	*64-bit*)
47535c30ecadSmrg	  LD="${LD-ld} -64"
47545c30ecadSmrg	  ;;
47555c30ecadSmrg      esac
47565c30ecadSmrg    fi
47575c30ecadSmrg  fi
47585c30ecadSmrg  rm -rf conftest*
47595c30ecadSmrg  ;;
47605eefee25Smacallan
47615c30ecadSmrgmips64*-*linux*)
47625c30ecadSmrg  # Find out what ABI is being produced by ac_compile, and set linker
47635c30ecadSmrg  # options accordingly.
47645c30ecadSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
47655c30ecadSmrg  if AC_TRY_EVAL(ac_compile); then
47665c30ecadSmrg    emul=elf
47675c30ecadSmrg    case `$FILECMD conftest.$ac_objext` in
47685c30ecadSmrg      *32-bit*)
47695c30ecadSmrg	emul="${emul}32"
47705c30ecadSmrg	;;
47715c30ecadSmrg      *64-bit*)
47725c30ecadSmrg	emul="${emul}64"
47735c30ecadSmrg	;;
47745c30ecadSmrg    esac
47755c30ecadSmrg    case `$FILECMD conftest.$ac_objext` in
47765c30ecadSmrg      *MSB*)
47775c30ecadSmrg	emul="${emul}btsmip"
47785c30ecadSmrg	;;
47795c30ecadSmrg      *LSB*)
47805c30ecadSmrg	emul="${emul}ltsmip"
47815c30ecadSmrg	;;
47825c30ecadSmrg    esac
47835c30ecadSmrg    case `$FILECMD conftest.$ac_objext` in
47845c30ecadSmrg      *N32*)
47855c30ecadSmrg	emul="${emul}n32"
47865c30ecadSmrg	;;
47875c30ecadSmrg    esac
47885c30ecadSmrg    LD="${LD-ld} -m $emul"
47895c30ecadSmrg  fi
47905c30ecadSmrg  rm -rf conftest*
47915c30ecadSmrg  ;;
47925eefee25Smacallan
47935c30ecadSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
47945c30ecadSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
47955c30ecadSmrg  # Find out what ABI is being produced by ac_compile, and set linker
47965c30ecadSmrg  # options accordingly.  Note that the listed cases only cover the
47975c30ecadSmrg  # situations where additional linker options are needed (such as when
47985c30ecadSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
47995c30ecadSmrg  # vice versa); the common cases where no linker options are needed do
48005c30ecadSmrg  # not appear in the list.
48015c30ecadSmrg  echo 'int i;' > conftest.$ac_ext
48025c30ecadSmrg  if AC_TRY_EVAL(ac_compile); then
48035c30ecadSmrg    case `$FILECMD conftest.o` in
48045c30ecadSmrg      *32-bit*)
48055c30ecadSmrg	case $host in
48065c30ecadSmrg	  x86_64-*kfreebsd*-gnu)
48075c30ecadSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
48085c30ecadSmrg	    ;;
48095c30ecadSmrg	  x86_64-*linux*)
48105c30ecadSmrg	    case `$FILECMD conftest.o` in
48115c30ecadSmrg	      *x86-64*)
48125c30ecadSmrg		LD="${LD-ld} -m elf32_x86_64"
48135c30ecadSmrg		;;
48145c30ecadSmrg	      *)
48155c30ecadSmrg		LD="${LD-ld} -m elf_i386"
48165c30ecadSmrg		;;
48175c30ecadSmrg	    esac
48185c30ecadSmrg	    ;;
48195c30ecadSmrg	  powerpc64le-*linux*)
48205c30ecadSmrg	    LD="${LD-ld} -m elf32lppclinux"
48215c30ecadSmrg	    ;;
48225c30ecadSmrg	  powerpc64-*linux*)
48235c30ecadSmrg	    LD="${LD-ld} -m elf32ppclinux"
48245c30ecadSmrg	    ;;
48255c30ecadSmrg	  s390x-*linux*)
48265c30ecadSmrg	    LD="${LD-ld} -m elf_s390"
48275c30ecadSmrg	    ;;
48285c30ecadSmrg	  sparc64-*linux*)
48295c30ecadSmrg	    LD="${LD-ld} -m elf32_sparc"
48305c30ecadSmrg	    ;;
48315c30ecadSmrg	esac
48325c30ecadSmrg	;;
48335c30ecadSmrg      *64-bit*)
48345c30ecadSmrg	case $host in
48355c30ecadSmrg	  x86_64-*kfreebsd*-gnu)
48365c30ecadSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
48375c30ecadSmrg	    ;;
48385c30ecadSmrg	  x86_64-*linux*)
48395c30ecadSmrg	    LD="${LD-ld} -m elf_x86_64"
48405c30ecadSmrg	    ;;
48415c30ecadSmrg	  powerpcle-*linux*)
48425c30ecadSmrg	    LD="${LD-ld} -m elf64lppc"
48435c30ecadSmrg	    ;;
48445c30ecadSmrg	  powerpc-*linux*)
48455c30ecadSmrg	    LD="${LD-ld} -m elf64ppc"
48465c30ecadSmrg	    ;;
48475c30ecadSmrg	  s390*-*linux*|s390*-*tpf*)
48485c30ecadSmrg	    LD="${LD-ld} -m elf64_s390"
48495c30ecadSmrg	    ;;
48505c30ecadSmrg	  sparc*-*linux*)
48515c30ecadSmrg	    LD="${LD-ld} -m elf64_sparc"
48525c30ecadSmrg	    ;;
48535c30ecadSmrg	esac
48545c30ecadSmrg	;;
4855dc99b369Smrg    esac
48565c30ecadSmrg  fi
48575c30ecadSmrg  rm -rf conftest*
48585c30ecadSmrg  ;;
48595eefee25Smacallan
48605c30ecadSmrg*-*-sco3.2v5*)
48615c30ecadSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
48625c30ecadSmrg  SAVE_CFLAGS=$CFLAGS
48635c30ecadSmrg  CFLAGS="$CFLAGS -belf"
48645c30ecadSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
48655c30ecadSmrg    [AC_LANG_PUSH(C)
48665c30ecadSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
48675c30ecadSmrg     AC_LANG_POP])
48685c30ecadSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
48695c30ecadSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
48705c30ecadSmrg    CFLAGS=$SAVE_CFLAGS
48715c30ecadSmrg  fi
48725c30ecadSmrg  ;;
48735c30ecadSmrg*-*solaris*)
48745c30ecadSmrg  # Find out what ABI is being produced by ac_compile, and set linker
48755c30ecadSmrg  # options accordingly.
48765c30ecadSmrg  echo 'int i;' > conftest.$ac_ext
48775c30ecadSmrg  if AC_TRY_EVAL(ac_compile); then
48785c30ecadSmrg    case `$FILECMD conftest.o` in
48795c30ecadSmrg    *64-bit*)
48805c30ecadSmrg      case $lt_cv_prog_gnu_ld in
48815c30ecadSmrg      yes*)
48825c30ecadSmrg        case $host in
48835c30ecadSmrg        i?86-*-solaris*|x86_64-*-solaris*)
48845c30ecadSmrg          LD="${LD-ld} -m elf_x86_64"
48855c30ecadSmrg          ;;
48865c30ecadSmrg        sparc*-*-solaris*)
48875c30ecadSmrg          LD="${LD-ld} -m elf64_sparc"
48885c30ecadSmrg          ;;
48895c30ecadSmrg        esac
48905c30ecadSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
48915c30ecadSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
48925c30ecadSmrg          LD=${LD-ld}_sol2
48935c30ecadSmrg        fi
48945c30ecadSmrg        ;;
48955c30ecadSmrg      *)
48965c30ecadSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
48975c30ecadSmrg	  LD="${LD-ld} -64"
48985c30ecadSmrg	fi
48995c30ecadSmrg	;;
49005c30ecadSmrg      esac
4901dc99b369Smrg      ;;
49025c30ecadSmrg    esac
49035c30ecadSmrg  fi
49045c30ecadSmrg  rm -rf conftest*
49055c30ecadSmrg  ;;
49065c30ecadSmrgesac
49075eefee25Smacallan
49085c30ecadSmrgneed_locks=$enable_libtool_lock
49095c30ecadSmrg])# _LT_ENABLE_LOCK
49105eefee25Smacallan
49115eefee25Smacallan
49125c30ecadSmrg# _LT_PROG_AR
49135c30ecadSmrg# -----------
49145c30ecadSmrgm4_defun([_LT_PROG_AR],
49155c30ecadSmrg[AC_CHECK_TOOLS(AR, [ar], false)
49165c30ecadSmrg: ${AR=ar}
49175c30ecadSmrg_LT_DECL([], [AR], [1], [The archiver])
49185c30ecadSmrg
49195c30ecadSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
49205c30ecadSmrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
49215c30ecadSmrg# higher priority because thats what people were doing historically (setting
49225c30ecadSmrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
49235c30ecadSmrg# variable obsoleted/removed.
49245c30ecadSmrg
49255c30ecadSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
49265c30ecadSmrglt_ar_flags=$AR_FLAGS
49275c30ecadSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
49285c30ecadSmrg
49295c30ecadSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
49305c30ecadSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
49315c30ecadSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
49325c30ecadSmrg         [Flags to create an archive])
49335c30ecadSmrg
49345c30ecadSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
49355c30ecadSmrg  [lt_cv_ar_at_file=no
49365c30ecadSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
49375c30ecadSmrg     [echo conftest.$ac_objext > conftest.lst
49385c30ecadSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
49395c30ecadSmrg      AC_TRY_EVAL([lt_ar_try])
49405c30ecadSmrg      if test 0 -eq "$ac_status"; then
49415c30ecadSmrg	# Ensure the archiver fails upon bogus file names.
49425c30ecadSmrg	rm -f conftest.$ac_objext libconftest.a
49435c30ecadSmrg	AC_TRY_EVAL([lt_ar_try])
49445c30ecadSmrg	if test 0 -ne "$ac_status"; then
49455c30ecadSmrg          lt_cv_ar_at_file=@
49465c30ecadSmrg        fi
4947dc99b369Smrg      fi
49485c30ecadSmrg      rm -f conftest.* libconftest.a
49495c30ecadSmrg     ])
49505c30ecadSmrg  ])
49515eefee25Smacallan
49525c30ecadSmrgif test no = "$lt_cv_ar_at_file"; then
49535c30ecadSmrg  archiver_list_spec=
49545c30ecadSmrgelse
49555c30ecadSmrg  archiver_list_spec=$lt_cv_ar_at_file
49565c30ecadSmrgfi
49575c30ecadSmrg_LT_DECL([], [archiver_list_spec], [1],
49585c30ecadSmrg  [How to feed a file listing to the archiver])
49595c30ecadSmrg])# _LT_PROG_AR
49605eefee25Smacallan
496162ab96baSmrg
49625c30ecadSmrg# _LT_CMD_OLD_ARCHIVE
49635c30ecadSmrg# -------------------
49645c30ecadSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
49655c30ecadSmrg[_LT_PROG_AR
49665eefee25Smacallan
49675c30ecadSmrgAC_CHECK_TOOL(STRIP, strip, :)
49685c30ecadSmrgtest -z "$STRIP" && STRIP=:
49695c30ecadSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
49705eefee25Smacallan
49715c30ecadSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
49725c30ecadSmrgtest -z "$RANLIB" && RANLIB=:
49735c30ecadSmrg_LT_DECL([], [RANLIB], [1],
49745c30ecadSmrg    [Commands used to install an old-style archive])
49755eefee25Smacallan
49765c30ecadSmrg# Determine commands to create old-style static archives.
49775c30ecadSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
49785c30ecadSmrgold_postinstall_cmds='chmod 644 $oldlib'
49795c30ecadSmrgold_postuninstall_cmds=
49805eefee25Smacallan
49815c30ecadSmrgif test -n "$RANLIB"; then
49825c30ecadSmrg  case $host_os in
49835c30ecadSmrg  bitrig* | openbsd*)
49845c30ecadSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
49855c30ecadSmrg    ;;
49865c30ecadSmrg  *)
49875c30ecadSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
49885c30ecadSmrg    ;;
49895c30ecadSmrg  esac
49905c30ecadSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
49915c30ecadSmrgfi
49925eefee25Smacallan
49935c30ecadSmrgcase $host_os in
49945c30ecadSmrg  darwin*)
49955c30ecadSmrg    lock_old_archive_extraction=yes ;;
49965c30ecadSmrg  *)
49975c30ecadSmrg    lock_old_archive_extraction=no ;;
49985c30ecadSmrgesac
49995c30ecadSmrg_LT_DECL([], [old_postinstall_cmds], [2])
50005c30ecadSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
50015c30ecadSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
50025c30ecadSmrg    [Commands used to build an old-style archive])
50035c30ecadSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
50045c30ecadSmrg    [Whether to use a lock for old archive extraction])
50055c30ecadSmrg])# _LT_CMD_OLD_ARCHIVE
50065eefee25Smacallan
50075eefee25Smacallan
50085c30ecadSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
50095c30ecadSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
50105c30ecadSmrg# ----------------------------------------------------------------
50115c30ecadSmrg# Check whether the given compiler option works
50125c30ecadSmrgAC_DEFUN([_LT_COMPILER_OPTION],
50135c30ecadSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
50145c30ecadSmrgm4_require([_LT_DECL_SED])dnl
50155c30ecadSmrgAC_CACHE_CHECK([$1], [$2],
50165c30ecadSmrg  [$2=no
50175c30ecadSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
50185c30ecadSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
50195c30ecadSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
50205c30ecadSmrg   # Insert the option either (1) after the last *FLAGS variable, or
50215c30ecadSmrg   # (2) before a word containing "conftest.", or (3) at the end.
50225c30ecadSmrg   # Note that $ac_compile itself does not contain backslashes and begins
50235c30ecadSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
50245c30ecadSmrg   # The option is referenced via a variable to avoid confusing sed.
50255c30ecadSmrg   lt_compile=`echo "$ac_compile" | $SED \
50265c30ecadSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
50275c30ecadSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
50285c30ecadSmrg   -e 's:$: $lt_compiler_flag:'`
50295c30ecadSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
50305c30ecadSmrg   (eval "$lt_compile" 2>conftest.err)
50315c30ecadSmrg   ac_status=$?
50325c30ecadSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
50335c30ecadSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
50345c30ecadSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
50355c30ecadSmrg     # The compiler can only warn and ignore the option if not recognized
50365c30ecadSmrg     # So say no if there are warnings other than the usual output.
50375c30ecadSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
50385c30ecadSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
50395c30ecadSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
50405c30ecadSmrg       $2=yes
50415c30ecadSmrg     fi
50425c30ecadSmrg   fi
50435c30ecadSmrg   $RM conftest*
50445c30ecadSmrg])
50455eefee25Smacallan
50465c30ecadSmrgif test yes = "[$]$2"; then
50475c30ecadSmrg    m4_if([$5], , :, [$5])
50485c30ecadSmrgelse
50495c30ecadSmrg    m4_if([$6], , :, [$6])
50505c30ecadSmrgfi
50515c30ecadSmrg])# _LT_COMPILER_OPTION
50525eefee25Smacallan
50535c30ecadSmrg# Old name:
50545c30ecadSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
50555c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
50565c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
50575c30ecadSmrg
50585c30ecadSmrg
50595c30ecadSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
50605c30ecadSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
50615c30ecadSmrg# ----------------------------------------------------
50625c30ecadSmrg# Check whether the given linker option works
50635c30ecadSmrgAC_DEFUN([_LT_LINKER_OPTION],
50645c30ecadSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
50655c30ecadSmrgm4_require([_LT_DECL_SED])dnl
50665c30ecadSmrgAC_CACHE_CHECK([$1], [$2],
50675c30ecadSmrg  [$2=no
50685c30ecadSmrg   save_LDFLAGS=$LDFLAGS
50695c30ecadSmrg   LDFLAGS="$LDFLAGS $3"
50705c30ecadSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
50715c30ecadSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
50725c30ecadSmrg     # The linker can only warn and ignore the option if not recognized
50735c30ecadSmrg     # So say no if there are warnings
50745c30ecadSmrg     if test -s conftest.err; then
50755c30ecadSmrg       # Append any errors to the config.log.
50765c30ecadSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
50775c30ecadSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
50785c30ecadSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
50795c30ecadSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
50805c30ecadSmrg         $2=yes
50815c30ecadSmrg       fi
50825c30ecadSmrg     else
50835c30ecadSmrg       $2=yes
50845c30ecadSmrg     fi
50855c30ecadSmrg   fi
50865c30ecadSmrg   $RM -r conftest*
50875c30ecadSmrg   LDFLAGS=$save_LDFLAGS
50885c30ecadSmrg])
50895eefee25Smacallan
50905c30ecadSmrgif test yes = "[$]$2"; then
50915c30ecadSmrg    m4_if([$4], , :, [$4])
50925c30ecadSmrgelse
50935c30ecadSmrg    m4_if([$5], , :, [$5])
50945c30ecadSmrgfi
50955c30ecadSmrg])# _LT_LINKER_OPTION
50965eefee25Smacallan
50975c30ecadSmrg# Old name:
50985c30ecadSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
50995c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
51005c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
51015eefee25Smacallan
51025eefee25Smacallan
51035c30ecadSmrg# LT_CMD_MAX_LEN
51045c30ecadSmrg#---------------
51055c30ecadSmrgAC_DEFUN([LT_CMD_MAX_LEN],
51065c30ecadSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
51075c30ecadSmrg# find the maximum length of command line arguments
51085c30ecadSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
51095c30ecadSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
51105c30ecadSmrg  i=0
51115c30ecadSmrg  teststring=ABCD
51125eefee25Smacallan
51135c30ecadSmrg  case $build_os in
51145c30ecadSmrg  msdosdjgpp*)
51155c30ecadSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
51165c30ecadSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
51175c30ecadSmrg    # during glob expansion).  Even if it were fixed, the result of this
51185c30ecadSmrg    # check would be larger than it should be.
51195c30ecadSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
51205c30ecadSmrg    ;;
51215eefee25Smacallan
51225c30ecadSmrg  gnu*)
51235c30ecadSmrg    # Under GNU Hurd, this test is not required because there is
51245c30ecadSmrg    # no limit to the length of command line arguments.
51255c30ecadSmrg    # Libtool will interpret -1 as no limit whatsoever
51265c30ecadSmrg    lt_cv_sys_max_cmd_len=-1;
51275c30ecadSmrg    ;;
51285eefee25Smacallan
51295c30ecadSmrg  cygwin* | mingw* | cegcc*)
51305c30ecadSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
51315c30ecadSmrg    # about 5 minutes as the teststring grows exponentially.
51325c30ecadSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
51335c30ecadSmrg    # you end up with a "frozen" computer, even though with patience
51345c30ecadSmrg    # the test eventually succeeds (with a max line length of 256k).
51355c30ecadSmrg    # Instead, let's just punt: use the minimum linelength reported by
51365c30ecadSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
51375c30ecadSmrg    lt_cv_sys_max_cmd_len=8192;
51385c30ecadSmrg    ;;
51395eefee25Smacallan
51405c30ecadSmrg  mint*)
51415c30ecadSmrg    # On MiNT this can take a long time and run out of memory.
51425c30ecadSmrg    lt_cv_sys_max_cmd_len=8192;
51435c30ecadSmrg    ;;
51445eefee25Smacallan
51455c30ecadSmrg  amigaos*)
51465c30ecadSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
51475c30ecadSmrg    # So we just punt and use a minimum line length of 8192.
51485c30ecadSmrg    lt_cv_sys_max_cmd_len=8192;
51495c30ecadSmrg    ;;
51505eefee25Smacallan
51515c30ecadSmrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
51525c30ecadSmrg    # This has been around since 386BSD, at least.  Likely further.
51535c30ecadSmrg    if test -x /sbin/sysctl; then
51545c30ecadSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
51555c30ecadSmrg    elif test -x /usr/sbin/sysctl; then
51565c30ecadSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
51575c30ecadSmrg    else
51585c30ecadSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
51595c30ecadSmrg    fi
51605c30ecadSmrg    # And add a safety zone
51615c30ecadSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
51625c30ecadSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
51635c30ecadSmrg    ;;
51645eefee25Smacallan
51655c30ecadSmrg  interix*)
51665c30ecadSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
51675c30ecadSmrg    lt_cv_sys_max_cmd_len=196608
51685c30ecadSmrg    ;;
51695eefee25Smacallan
51705c30ecadSmrg  os2*)
51715c30ecadSmrg    # The test takes a long time on OS/2.
51725c30ecadSmrg    lt_cv_sys_max_cmd_len=8192
51735c30ecadSmrg    ;;
51745eefee25Smacallan
51755c30ecadSmrg  osf*)
51765c30ecadSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
51775c30ecadSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
51785c30ecadSmrg    # nice to cause kernel panics so lets avoid the loop below.
51795c30ecadSmrg    # First set a reasonable default.
51805c30ecadSmrg    lt_cv_sys_max_cmd_len=16384
51815c30ecadSmrg    #
51825c30ecadSmrg    if test -x /sbin/sysconfig; then
51835c30ecadSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
51845c30ecadSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
51855c30ecadSmrg      esac
51865c30ecadSmrg    fi
51875c30ecadSmrg    ;;
51885c30ecadSmrg  sco3.2v5*)
51895c30ecadSmrg    lt_cv_sys_max_cmd_len=102400
51905c30ecadSmrg    ;;
51915c30ecadSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
51925c30ecadSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
51935c30ecadSmrg    if test -n "$kargmax"; then
51945c30ecadSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
51955c30ecadSmrg    else
51965c30ecadSmrg      lt_cv_sys_max_cmd_len=32768
51975c30ecadSmrg    fi
51985c30ecadSmrg    ;;
51995c30ecadSmrg  *)
52005c30ecadSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
52015c30ecadSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
52025c30ecadSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
52035c30ecadSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
52045c30ecadSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
52055c30ecadSmrg    else
52065c30ecadSmrg      # Make teststring a little bigger before we do anything with it.
52075c30ecadSmrg      # a 1K string should be a reasonable start.
52085c30ecadSmrg      for i in 1 2 3 4 5 6 7 8; do
52095c30ecadSmrg        teststring=$teststring$teststring
52105c30ecadSmrg      done
52115c30ecadSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
52125c30ecadSmrg      # If test is not a shell built-in, we'll probably end up computing a
52135c30ecadSmrg      # maximum length that is only half of the actual maximum length, but
52145c30ecadSmrg      # we can't tell.
52155c30ecadSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
52165c30ecadSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
52175c30ecadSmrg	      test 17 != "$i" # 1/2 MB should be enough
52185c30ecadSmrg      do
52195c30ecadSmrg        i=`expr $i + 1`
52205c30ecadSmrg        teststring=$teststring$teststring
52215c30ecadSmrg      done
52225c30ecadSmrg      # Only check the string length outside the loop.
52235c30ecadSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
52245c30ecadSmrg      teststring=
52255c30ecadSmrg      # Add a significant safety factor because C++ compilers can tack on
52265c30ecadSmrg      # massive amounts of additional arguments before passing them to the
52275c30ecadSmrg      # linker.  It appears as though 1/2 is a usable value.
52285c30ecadSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
52295c30ecadSmrg    fi
52305c30ecadSmrg    ;;
52315c30ecadSmrg  esac
52325c30ecadSmrg])
52335c30ecadSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
52345c30ecadSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
52355c30ecadSmrgelse
52365c30ecadSmrg  AC_MSG_RESULT(none)
52375c30ecadSmrgfi
52385c30ecadSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
52395c30ecadSmrg_LT_DECL([], [max_cmd_len], [0],
52405c30ecadSmrg    [What is the maximum length of a command?])
52415c30ecadSmrg])# LT_CMD_MAX_LEN
52425eefee25Smacallan
52435c30ecadSmrg# Old name:
52445c30ecadSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
52455c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
52465c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
52475eefee25Smacallan
52485eefee25Smacallan
52495c30ecadSmrg# _LT_HEADER_DLFCN
52505c30ecadSmrg# ----------------
52515c30ecadSmrgm4_defun([_LT_HEADER_DLFCN],
52525c30ecadSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
52535c30ecadSmrg])# _LT_HEADER_DLFCN
52545eefee25Smacallan
52555eefee25Smacallan
52565c30ecadSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
52575c30ecadSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
52585c30ecadSmrg# ----------------------------------------------------------------
52595c30ecadSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
52605c30ecadSmrg[m4_require([_LT_HEADER_DLFCN])dnl
52615c30ecadSmrgif test yes = "$cross_compiling"; then :
52625c30ecadSmrg  [$4]
52635c30ecadSmrgelse
52645c30ecadSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
52655c30ecadSmrg  lt_status=$lt_dlunknown
52665c30ecadSmrg  cat > conftest.$ac_ext <<_LT_EOF
52675c30ecadSmrg[#line $LINENO "configure"
52685c30ecadSmrg#include "confdefs.h"
52695eefee25Smacallan
52705c30ecadSmrg#if HAVE_DLFCN_H
52715c30ecadSmrg#include <dlfcn.h>
52725c30ecadSmrg#endif
52735eefee25Smacallan
52745c30ecadSmrg#include <stdio.h>
52755eefee25Smacallan
52765c30ecadSmrg#ifdef RTLD_GLOBAL
52775c30ecadSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
52785c30ecadSmrg#else
52795c30ecadSmrg#  ifdef DL_GLOBAL
52805c30ecadSmrg#    define LT_DLGLOBAL		DL_GLOBAL
52815c30ecadSmrg#  else
52825c30ecadSmrg#    define LT_DLGLOBAL		0
52835c30ecadSmrg#  endif
52845c30ecadSmrg#endif
52855eefee25Smacallan
52865c30ecadSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
52875c30ecadSmrg   find out it does not work in some platform. */
52885c30ecadSmrg#ifndef LT_DLLAZY_OR_NOW
52895c30ecadSmrg#  ifdef RTLD_LAZY
52905c30ecadSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
52915c30ecadSmrg#  else
52925c30ecadSmrg#    ifdef DL_LAZY
52935c30ecadSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
52945c30ecadSmrg#    else
52955c30ecadSmrg#      ifdef RTLD_NOW
52965c30ecadSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
52975c30ecadSmrg#      else
52985c30ecadSmrg#        ifdef DL_NOW
52995c30ecadSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
53005c30ecadSmrg#        else
53015c30ecadSmrg#          define LT_DLLAZY_OR_NOW	0
53025c30ecadSmrg#        endif
53035c30ecadSmrg#      endif
53045c30ecadSmrg#    endif
53055c30ecadSmrg#  endif
53065c30ecadSmrg#endif
53075eefee25Smacallan
53085c30ecadSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
53095c30ecadSmrg   correspondingly for the symbols needed.  */
53105c30ecadSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
53115c30ecadSmrgint fnord () __attribute__((visibility("default")));
53125c30ecadSmrg#endif
53135eefee25Smacallan
53145c30ecadSmrgint fnord () { return 42; }
53155c30ecadSmrgint main ()
53165c30ecadSmrg{
53175c30ecadSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
53185c30ecadSmrg  int status = $lt_dlunknown;
53195eefee25Smacallan
53205c30ecadSmrg  if (self)
53215c30ecadSmrg    {
53225c30ecadSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
5323dc99b369Smrg      else
53245c30ecadSmrg        {
53255c30ecadSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
53265c30ecadSmrg          else puts (dlerror ());
53275c30ecadSmrg	}
53285c30ecadSmrg      /* dlclose (self); */
53295c30ecadSmrg    }
53305c30ecadSmrg  else
53315c30ecadSmrg    puts (dlerror ());
53325eefee25Smacallan
53335c30ecadSmrg  return status;
53345c30ecadSmrg}]
53355c30ecadSmrg_LT_EOF
53365c30ecadSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
53375c30ecadSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
53385c30ecadSmrg    lt_status=$?
53395c30ecadSmrg    case x$lt_status in
53405c30ecadSmrg      x$lt_dlno_uscore) $1 ;;
53415c30ecadSmrg      x$lt_dlneed_uscore) $2 ;;
53425c30ecadSmrg      x$lt_dlunknown|x*) $3 ;;
5343dc99b369Smrg    esac
53445c30ecadSmrg  else :
53455c30ecadSmrg    # compilation failed
53465c30ecadSmrg    $3
53475eefee25Smacallan  fi
53485c30ecadSmrgfi
53495c30ecadSmrgrm -fr conftest*
53505c30ecadSmrg])# _LT_TRY_DLOPEN_SELF
53515c30ecadSmrg
53525c30ecadSmrg
53535c30ecadSmrg# LT_SYS_DLOPEN_SELF
53545c30ecadSmrg# ------------------
53555c30ecadSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
53565c30ecadSmrg[m4_require([_LT_HEADER_DLFCN])dnl
53575c30ecadSmrgif test yes != "$enable_dlopen"; then
53585c30ecadSmrg  enable_dlopen=unknown
53595c30ecadSmrg  enable_dlopen_self=unknown
53605c30ecadSmrg  enable_dlopen_self_static=unknown
53615c30ecadSmrgelse
53625c30ecadSmrg  lt_cv_dlopen=no
53635c30ecadSmrg  lt_cv_dlopen_libs=
53645eefee25Smacallan
53655c30ecadSmrg  case $host_os in
53665c30ecadSmrg  beos*)
53675c30ecadSmrg    lt_cv_dlopen=load_add_on
53685c30ecadSmrg    lt_cv_dlopen_libs=
53695c30ecadSmrg    lt_cv_dlopen_self=yes
53705c30ecadSmrg    ;;
53715eefee25Smacallan
53725c30ecadSmrg  mingw* | pw32* | cegcc*)
53735c30ecadSmrg    lt_cv_dlopen=LoadLibrary
53745c30ecadSmrg    lt_cv_dlopen_libs=
53755c30ecadSmrg    ;;
53765eefee25Smacallan
53775c30ecadSmrg  cygwin*)
53785c30ecadSmrg    lt_cv_dlopen=dlopen
53795c30ecadSmrg    lt_cv_dlopen_libs=
53805c30ecadSmrg    ;;
53815eefee25Smacallan
53825c30ecadSmrg  darwin*)
53835c30ecadSmrg    # if libdl is installed we need to link against it
53845c30ecadSmrg    AC_CHECK_LIB([dl], [dlopen],
53855c30ecadSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
53865c30ecadSmrg    lt_cv_dlopen=dyld
53875c30ecadSmrg    lt_cv_dlopen_libs=
53885c30ecadSmrg    lt_cv_dlopen_self=yes
53895c30ecadSmrg    ])
53905c30ecadSmrg    ;;
5391dc99b369Smrg
53925c30ecadSmrg  tpf*)
53935c30ecadSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
53945c30ecadSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
53955c30ecadSmrg    lt_cv_dlopen=dlopen
53965c30ecadSmrg    lt_cv_dlopen_libs=
53975c30ecadSmrg    lt_cv_dlopen_self=no
53985c30ecadSmrg    ;;
53995c30ecadSmrg
54005c30ecadSmrg  *)
54015c30ecadSmrg    AC_CHECK_FUNC([shl_load],
54025c30ecadSmrg	  [lt_cv_dlopen=shl_load],
54035c30ecadSmrg      [AC_CHECK_LIB([dld], [shl_load],
54045c30ecadSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
54055c30ecadSmrg	[AC_CHECK_FUNC([dlopen],
54065c30ecadSmrg	      [lt_cv_dlopen=dlopen],
54075c30ecadSmrg	  [AC_CHECK_LIB([dl], [dlopen],
54085c30ecadSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
54095c30ecadSmrg	    [AC_CHECK_LIB([svld], [dlopen],
54105c30ecadSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
54115c30ecadSmrg	      [AC_CHECK_LIB([dld], [dld_link],
54125c30ecadSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
54135c30ecadSmrg	      ])
54145c30ecadSmrg	    ])
54155c30ecadSmrg	  ])
5416dc99b369Smrg	])
54175c30ecadSmrg      ])
54185c30ecadSmrg    ;;
54195c30ecadSmrg  esac
54205eefee25Smacallan
54215c30ecadSmrg  if test no = "$lt_cv_dlopen"; then
54225c30ecadSmrg    enable_dlopen=no
54235c30ecadSmrg  else
54245c30ecadSmrg    enable_dlopen=yes
54255c30ecadSmrg  fi
5426dc99b369Smrg
54275c30ecadSmrg  case $lt_cv_dlopen in
54285c30ecadSmrg  dlopen)
54295c30ecadSmrg    save_CPPFLAGS=$CPPFLAGS
54305c30ecadSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
5431dc99b369Smrg
54325c30ecadSmrg    save_LDFLAGS=$LDFLAGS
54335c30ecadSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5434dc99b369Smrg
54355c30ecadSmrg    save_LIBS=$LIBS
54365c30ecadSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
5437dc99b369Smrg
54385c30ecadSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
54395c30ecadSmrg	  lt_cv_dlopen_self, [dnl
54405c30ecadSmrg	  _LT_TRY_DLOPEN_SELF(
54415c30ecadSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
54425c30ecadSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
54435c30ecadSmrg    ])
54445eefee25Smacallan
54455c30ecadSmrg    if test yes = "$lt_cv_dlopen_self"; then
54465c30ecadSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
54475c30ecadSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
54485c30ecadSmrg	  lt_cv_dlopen_self_static, [dnl
54495c30ecadSmrg	  _LT_TRY_DLOPEN_SELF(
54505c30ecadSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
54515c30ecadSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
54525c30ecadSmrg      ])
54535c30ecadSmrg    fi
54545eefee25Smacallan
54555c30ecadSmrg    CPPFLAGS=$save_CPPFLAGS
54565c30ecadSmrg    LDFLAGS=$save_LDFLAGS
54575c30ecadSmrg    LIBS=$save_LIBS
54585c30ecadSmrg    ;;
54595c30ecadSmrg  esac
54605eefee25Smacallan
54615c30ecadSmrg  case $lt_cv_dlopen_self in
54625c30ecadSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
54635c30ecadSmrg  *) enable_dlopen_self=unknown ;;
54645c30ecadSmrg  esac
54655eefee25Smacallan
54665c30ecadSmrg  case $lt_cv_dlopen_self_static in
54675c30ecadSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
54685c30ecadSmrg  *) enable_dlopen_self_static=unknown ;;
54695c30ecadSmrg  esac
54705c30ecadSmrgfi
54715c30ecadSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
54725c30ecadSmrg	 [Whether dlopen is supported])
54735c30ecadSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
54745c30ecadSmrg	 [Whether dlopen of programs is supported])
54755c30ecadSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
54765c30ecadSmrg	 [Whether dlopen of statically linked programs is supported])
54775c30ecadSmrg])# LT_SYS_DLOPEN_SELF
54785eefee25Smacallan
54795c30ecadSmrg# Old name:
54805c30ecadSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
54815c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
54825c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
5483dc99b369Smrg
5484dc99b369Smrg
54855c30ecadSmrg# _LT_COMPILER_C_O([TAGNAME])
54865c30ecadSmrg# ---------------------------
54875c30ecadSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
54885c30ecadSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
54895c30ecadSmrgm4_defun([_LT_COMPILER_C_O],
54905c30ecadSmrg[m4_require([_LT_DECL_SED])dnl
54915c30ecadSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
54925c30ecadSmrgm4_require([_LT_TAG_COMPILER])dnl
54935c30ecadSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
54945c30ecadSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
54955c30ecadSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
54965c30ecadSmrg   $RM -r conftest 2>/dev/null
54975c30ecadSmrg   mkdir conftest
54985c30ecadSmrg   cd conftest
54995c30ecadSmrg   mkdir out
55005c30ecadSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5501dc99b369Smrg
55025c30ecadSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
55035c30ecadSmrg   # Insert the option either (1) after the last *FLAGS variable, or
55045c30ecadSmrg   # (2) before a word containing "conftest.", or (3) at the end.
55055c30ecadSmrg   # Note that $ac_compile itself does not contain backslashes and begins
55065c30ecadSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
55075c30ecadSmrg   lt_compile=`echo "$ac_compile" | $SED \
55085c30ecadSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
55095c30ecadSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
55105c30ecadSmrg   -e 's:$: $lt_compiler_flag:'`
55115c30ecadSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
55125c30ecadSmrg   (eval "$lt_compile" 2>out/conftest.err)
55135c30ecadSmrg   ac_status=$?
55145c30ecadSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
55155c30ecadSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
55165c30ecadSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
55175c30ecadSmrg   then
55185c30ecadSmrg     # The compiler can only warn and ignore the option if not recognized
55195c30ecadSmrg     # So say no if there are warnings
55205c30ecadSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
55215c30ecadSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
55225c30ecadSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
55235c30ecadSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
55245c30ecadSmrg     fi
55255c30ecadSmrg   fi
55265c30ecadSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
55275c30ecadSmrg   $RM conftest*
55285c30ecadSmrg   # SGI C++ compiler will create directory out/ii_files/ for
55295c30ecadSmrg   # template instantiation
55305c30ecadSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
55315c30ecadSmrg   $RM out/* && rmdir out
55325c30ecadSmrg   cd ..
55335c30ecadSmrg   $RM -r conftest
55345c30ecadSmrg   $RM conftest*
55355c30ecadSmrg])
55365c30ecadSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
55375c30ecadSmrg	[Does compiler simultaneously support -c and -o options?])
55385c30ecadSmrg])# _LT_COMPILER_C_O
55395eefee25Smacallan
55405eefee25Smacallan
55415c30ecadSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
55425c30ecadSmrg# ----------------------------------
55435c30ecadSmrg# Check to see if we can do hard links to lock some files if needed
55445c30ecadSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
55455c30ecadSmrg[m4_require([_LT_ENABLE_LOCK])dnl
55465c30ecadSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
55475c30ecadSmrg_LT_COMPILER_C_O([$1])
55485eefee25Smacallan
55495c30ecadSmrghard_links=nottested
55505c30ecadSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
55515c30ecadSmrg  # do not overwrite the value of need_locks provided by the user
55525c30ecadSmrg  AC_MSG_CHECKING([if we can lock with hard links])
55535c30ecadSmrg  hard_links=yes
55545c30ecadSmrg  $RM conftest*
55555c30ecadSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
55565c30ecadSmrg  touch conftest.a
55575c30ecadSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
55585c30ecadSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
55595c30ecadSmrg  AC_MSG_RESULT([$hard_links])
55605c30ecadSmrg  if test no = "$hard_links"; then
55615c30ecadSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
55625c30ecadSmrg    need_locks=warn
55635c30ecadSmrg  fi
55645c30ecadSmrgelse
55655c30ecadSmrg  need_locks=no
5566dc99b369Smrgfi
55675c30ecadSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
55685c30ecadSmrg])# _LT_COMPILER_FILE_LOCKS
55695eefee25Smacallan
55705eefee25Smacallan
55715c30ecadSmrg# _LT_CHECK_OBJDIR
55725c30ecadSmrg# ----------------
55735c30ecadSmrgm4_defun([_LT_CHECK_OBJDIR],
55745c30ecadSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
55755c30ecadSmrg[rm -f .libs 2>/dev/null
55765c30ecadSmrgmkdir .libs 2>/dev/null
55775c30ecadSmrgif test -d .libs; then
55785c30ecadSmrg  lt_cv_objdir=.libs
5579dc99b369Smrgelse
55805c30ecadSmrg  # MS-DOS does not allow filenames that begin with a dot.
55815c30ecadSmrg  lt_cv_objdir=_libs
5582dc99b369Smrgfi
55835c30ecadSmrgrmdir .libs 2>/dev/null])
55845c30ecadSmrgobjdir=$lt_cv_objdir
55855c30ecadSmrg_LT_DECL([], [objdir], [0],
55865c30ecadSmrg         [The name of the directory that contains temporary libtool files])dnl
55875c30ecadSmrgm4_pattern_allow([LT_OBJDIR])dnl
55885c30ecadSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
55895c30ecadSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
55905c30ecadSmrg])# _LT_CHECK_OBJDIR
55915eefee25Smacallan
5592dc99b369Smrg
55935c30ecadSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
55945c30ecadSmrg# --------------------------------------
55955c30ecadSmrg# Check hardcoding attributes.
55965c30ecadSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
55975c30ecadSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
55985c30ecadSmrg_LT_TAGVAR(hardcode_action, $1)=
55995c30ecadSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
56005c30ecadSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
56015c30ecadSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
5602dc99b369Smrg
56035c30ecadSmrg  # We can hardcode non-existent directories.
56045c30ecadSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
56055c30ecadSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
56065c30ecadSmrg     # have to relink, otherwise we might link with an installed library
56075c30ecadSmrg     # when we should be linking with a yet-to-be-installed one
56085c30ecadSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
56095c30ecadSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
56105c30ecadSmrg    # Linking always hardcodes the temporary library directory.
56115c30ecadSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
56125c30ecadSmrg  else
56135c30ecadSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
56145c30ecadSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
56155c30ecadSmrg  fi
56165c30ecadSmrgelse
56175c30ecadSmrg  # We cannot hardcode anything, or else we can only hardcode existing
56185c30ecadSmrg  # directories.
56195c30ecadSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
56205c30ecadSmrgfi
56215c30ecadSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
5622dc99b369Smrg
56235c30ecadSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
56245c30ecadSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
56255c30ecadSmrg  # Fast installation is not supported
56265c30ecadSmrg  enable_fast_install=no
56275c30ecadSmrgelif test yes = "$shlibpath_overrides_runpath" ||
56285c30ecadSmrg     test no = "$enable_shared"; then
56295c30ecadSmrg  # Fast installation is not necessary
56305c30ecadSmrg  enable_fast_install=needless
56315c30ecadSmrgfi
56325c30ecadSmrg_LT_TAGDECL([], [hardcode_action], [0],
56335c30ecadSmrg    [How to hardcode a shared library path into an executable])
56345c30ecadSmrg])# _LT_LINKER_HARDCODE_LIBPATH
5635dc99b369Smrg
5636dc99b369Smrg
56375c30ecadSmrg# _LT_CMD_STRIPLIB
56385c30ecadSmrg# ----------------
56395c30ecadSmrgm4_defun([_LT_CMD_STRIPLIB],
56405c30ecadSmrg[m4_require([_LT_DECL_EGREP])
56415c30ecadSmrgstriplib=
56425c30ecadSmrgold_striplib=
56435c30ecadSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
56445c30ecadSmrgif test -z "$STRIP"; then
56455c30ecadSmrg  AC_MSG_RESULT([no])
56465c30ecadSmrgelse
56475c30ecadSmrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
56485c30ecadSmrg    old_striplib="$STRIP --strip-debug"
56495c30ecadSmrg    striplib="$STRIP --strip-unneeded"
56505c30ecadSmrg    AC_MSG_RESULT([yes])
56515eefee25Smacallan  else
56525c30ecadSmrg    case $host_os in
56535c30ecadSmrg    darwin*)
56545c30ecadSmrg      # FIXME - insert some real tests, host_os isn't really good enough
56555c30ecadSmrg      striplib="$STRIP -x"
56565c30ecadSmrg      old_striplib="$STRIP -S"
56575c30ecadSmrg      AC_MSG_RESULT([yes])
56585c30ecadSmrg      ;;
56595c30ecadSmrg    freebsd*)
56605c30ecadSmrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
56615c30ecadSmrg        old_striplib="$STRIP --strip-debug"
56625c30ecadSmrg        striplib="$STRIP --strip-unneeded"
56635c30ecadSmrg        AC_MSG_RESULT([yes])
56645c30ecadSmrg      else
56655c30ecadSmrg        AC_MSG_RESULT([no])
56665c30ecadSmrg      fi
56675c30ecadSmrg      ;;
56685c30ecadSmrg    *)
56695c30ecadSmrg      AC_MSG_RESULT([no])
56705c30ecadSmrg      ;;
56715c30ecadSmrg    esac
56725eefee25Smacallan  fi
56735c30ecadSmrgfi
56745c30ecadSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
56755c30ecadSmrg_LT_DECL([], [striplib], [1])
56765c30ecadSmrg])# _LT_CMD_STRIPLIB
56775eefee25Smacallan
56785eefee25Smacallan
56795c30ecadSmrg# _LT_PREPARE_MUNGE_PATH_LIST
56805c30ecadSmrg# ---------------------------
56815c30ecadSmrg# Make sure func_munge_path_list() is defined correctly.
56825c30ecadSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
56835c30ecadSmrg[[# func_munge_path_list VARIABLE PATH
56845c30ecadSmrg# -----------------------------------
56855c30ecadSmrg# VARIABLE is name of variable containing _space_ separated list of
56865c30ecadSmrg# directories to be munged by the contents of PATH, which is string
56875c30ecadSmrg# having a format:
56885c30ecadSmrg# "DIR[:DIR]:"
56895c30ecadSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
56905c30ecadSmrg# ":DIR[:DIR]"
56915c30ecadSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
56925c30ecadSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
56935c30ecadSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
56945c30ecadSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
56955c30ecadSmrg# "DIR[:DIR]"
56965c30ecadSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
56975c30ecadSmrgfunc_munge_path_list ()
56985c30ecadSmrg{
56995c30ecadSmrg    case x@S|@2 in
57005c30ecadSmrg    x)
57015c30ecadSmrg        ;;
57025c30ecadSmrg    *:)
57035c30ecadSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
57045c30ecadSmrg        ;;
57055c30ecadSmrg    x:*)
57065c30ecadSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
57075c30ecadSmrg        ;;
57085c30ecadSmrg    *::*)
57095c30ecadSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
57105c30ecadSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
57115c30ecadSmrg        ;;
57125c30ecadSmrg    *)
57135c30ecadSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
57145c30ecadSmrg        ;;
57155c30ecadSmrg    esac
57165c30ecadSmrg}
57175c30ecadSmrg]])# _LT_PREPARE_PATH_LIST
5718dc99b369Smrg
5719dc99b369Smrg
57205c30ecadSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
57215c30ecadSmrg# -----------------------------
57225c30ecadSmrg# PORTME Fill in your ld.so characteristics
57235c30ecadSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
57245c30ecadSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
57255c30ecadSmrgm4_require([_LT_DECL_EGREP])dnl
57265c30ecadSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
57275c30ecadSmrgm4_require([_LT_DECL_OBJDUMP])dnl
57285c30ecadSmrgm4_require([_LT_DECL_SED])dnl
57295c30ecadSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
57305c30ecadSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
57315c30ecadSmrgAC_MSG_CHECKING([dynamic linker characteristics])
57325c30ecadSmrgm4_if([$1],
57335c30ecadSmrg	[], [
57345c30ecadSmrgif test yes = "$GCC"; then
57355c30ecadSmrg  case $host_os in
57365c30ecadSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
57375c30ecadSmrg    *) lt_awk_arg='/^libraries:/' ;;
57385c30ecadSmrg  esac
57395c30ecadSmrg  case $host_os in
57405c30ecadSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
57415c30ecadSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
57425c30ecadSmrg  esac
57435c30ecadSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
57445c30ecadSmrg  case $lt_search_path_spec in
57455c30ecadSmrg  *\;*)
57465c30ecadSmrg    # if the path contains ";" then we assume it to be the separator
57475c30ecadSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
57485c30ecadSmrg    # assumed that no part of a normal pathname contains ";" but that should
57495c30ecadSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
57505c30ecadSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
57515c30ecadSmrg    ;;
57525c30ecadSmrg  *)
57535c30ecadSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
57545c30ecadSmrg    ;;
57555c30ecadSmrg  esac
57565c30ecadSmrg  # Ok, now we have the path, separated by spaces, we can step through it
57575c30ecadSmrg  # and add multilib dir if necessary...
57585c30ecadSmrg  lt_tmp_lt_search_path_spec=
57595c30ecadSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
57605c30ecadSmrg  # ...but if some path component already ends with the multilib dir we assume
57615c30ecadSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
57625c30ecadSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
57635c30ecadSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
57645c30ecadSmrg    lt_multi_os_dir=
57655c30ecadSmrg    ;;
57665c30ecadSmrg  esac
57675c30ecadSmrg  for lt_sys_path in $lt_search_path_spec; do
57685c30ecadSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
57695c30ecadSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
57705c30ecadSmrg    elif test -n "$lt_multi_os_dir"; then
57715c30ecadSmrg      test -d "$lt_sys_path" && \
57725c30ecadSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
57735c30ecadSmrg    fi
57745c30ecadSmrg  done
57755c30ecadSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
57765c30ecadSmrgBEGIN {RS = " "; FS = "/|\n";} {
57775c30ecadSmrg  lt_foo = "";
57785c30ecadSmrg  lt_count = 0;
57795c30ecadSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
57805c30ecadSmrg    if ($lt_i != "" && $lt_i != ".") {
57815c30ecadSmrg      if ($lt_i == "..") {
57825c30ecadSmrg        lt_count++;
57835c30ecadSmrg      } else {
57845c30ecadSmrg        if (lt_count == 0) {
57855c30ecadSmrg          lt_foo = "/" $lt_i lt_foo;
57865c30ecadSmrg        } else {
57875c30ecadSmrg          lt_count--;
57885c30ecadSmrg        }
57895c30ecadSmrg      }
57905c30ecadSmrg    }
57915c30ecadSmrg  }
57925c30ecadSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
57935c30ecadSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
57945c30ecadSmrg}'`
57955c30ecadSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
57965c30ecadSmrg  # for these hosts.
57975c30ecadSmrg  case $host_os in
57985c30ecadSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
57995c30ecadSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
58005c30ecadSmrg  esac
58015c30ecadSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
58025c30ecadSmrgelse
58035c30ecadSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
58045c30ecadSmrgfi])
58055c30ecadSmrglibrary_names_spec=
58065c30ecadSmrglibname_spec='lib$name'
58075c30ecadSmrgsoname_spec=
58085c30ecadSmrgshrext_cmds=.so
58095c30ecadSmrgpostinstall_cmds=
58105c30ecadSmrgpostuninstall_cmds=
58115c30ecadSmrgfinish_cmds=
58125c30ecadSmrgfinish_eval=
58135c30ecadSmrgshlibpath_var=
58145c30ecadSmrgshlibpath_overrides_runpath=unknown
58155c30ecadSmrgversion_type=none
58165c30ecadSmrgdynamic_linker="$host_os ld.so"
58175c30ecadSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
58185c30ecadSmrgneed_lib_prefix=unknown
58195c30ecadSmrghardcode_into_libs=no
5820dc99b369Smrg
58215c30ecadSmrg# when you set need_version to no, make sure it does not cause -set_version
58225c30ecadSmrg# flags to be left without arguments
58235c30ecadSmrgneed_version=unknown
5824dc99b369Smrg
58255c30ecadSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
58265c30ecadSmrg[User-defined run-time library search path.])
5827dc99b369Smrg
58285c30ecadSmrgcase $host_os in
58295c30ecadSmrgaix3*)
58305c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
58315c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
58325c30ecadSmrg  shlibpath_var=LIBPATH
5833dc99b369Smrg
58345c30ecadSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
58355c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
58365c30ecadSmrg  ;;
5837dc99b369Smrg
58385c30ecadSmrgaix[[4-9]]*)
58395c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
58405c30ecadSmrg  need_lib_prefix=no
58415c30ecadSmrg  need_version=no
58425c30ecadSmrg  hardcode_into_libs=yes
58435c30ecadSmrg  if test ia64 = "$host_cpu"; then
58445c30ecadSmrg    # AIX 5 supports IA64
58455c30ecadSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
58465c30ecadSmrg    shlibpath_var=LD_LIBRARY_PATH
58475c30ecadSmrg  else
58485c30ecadSmrg    # With GCC up to 2.95.x, collect2 would create an import file
58495c30ecadSmrg    # for dependence libraries.  The import file would start with
58505c30ecadSmrg    # the line '#! .'.  This would cause the generated library to
58515c30ecadSmrg    # depend on '.', always an invalid library.  This was fixed in
58525c30ecadSmrg    # development snapshots of GCC prior to 3.0.
58535eefee25Smacallan    case $host_os in
58545c30ecadSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
58555c30ecadSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
58565c30ecadSmrg	   echo ' yes '
58575c30ecadSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
58585c30ecadSmrg	:
58595c30ecadSmrg      else
58605c30ecadSmrg	can_build_shared=no
58615c30ecadSmrg      fi
58625c30ecadSmrg      ;;
58635c30ecadSmrg    esac
58645c30ecadSmrg    # Using Import Files as archive members, it is possible to support
58655c30ecadSmrg    # filename-based versioning of shared library archives on AIX. While
58665c30ecadSmrg    # this would work for both with and without runtime linking, it will
58675c30ecadSmrg    # prevent static linking of such archives. So we do filename-based
58685c30ecadSmrg    # shared library versioning with .so extension only, which is used
58695c30ecadSmrg    # when both runtime linking and shared linking is enabled.
58705c30ecadSmrg    # Unfortunately, runtime linking may impact performance, so we do
58715c30ecadSmrg    # not want this to be the default eventually. Also, we use the
58725c30ecadSmrg    # versioned .so libs for executables only if there is the -brtl
58735c30ecadSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
58745c30ecadSmrg    # To allow for filename-based versioning support, we need to create
58755c30ecadSmrg    # libNAME.so.V as an archive file, containing:
58765c30ecadSmrg    # *) an Import File, referring to the versioned filename of the
58775c30ecadSmrg    #    archive as well as the shared archive member, telling the
58785c30ecadSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
58795c30ecadSmrg    #    list of exported symbols of that shared object, eventually
58805c30ecadSmrg    #    decorated with the 'weak' keyword
58815c30ecadSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
58825c30ecadSmrg    #    it being seen by the linker.
58835c30ecadSmrg    # At run time we better use the real file rather than another symlink,
58845c30ecadSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
58855c30ecadSmrg
58865c30ecadSmrg    case $with_aix_soname,$aix_use_runtimelinking in
58875c30ecadSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
58885c30ecadSmrg    # soname into executable. Probably we can add versioning support to
58895c30ecadSmrg    # collect2, so additional links can be useful in future.
58905c30ecadSmrg    aix,yes) # traditional libtool
58915c30ecadSmrg      dynamic_linker='AIX unversionable lib.so'
58925c30ecadSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
58935c30ecadSmrg      # instead of lib<name>.a to let people know that these are not
58945c30ecadSmrg      # typical AIX shared libraries.
58955c30ecadSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
58965c30ecadSmrg      ;;
58975c30ecadSmrg    aix,no) # traditional AIX only
58985c30ecadSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
58995c30ecadSmrg      # We preserve .a as extension for shared libraries through AIX4.2
59005c30ecadSmrg      # and later when we are not doing run time linking.
59015c30ecadSmrg      library_names_spec='$libname$release.a $libname.a'
59025c30ecadSmrg      soname_spec='$libname$release$shared_ext$major'
59035c30ecadSmrg      ;;
59045c30ecadSmrg    svr4,*) # full svr4 only
59055c30ecadSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
59065c30ecadSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
59075c30ecadSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
59085c30ecadSmrg      shlibpath_overrides_runpath=yes
59095c30ecadSmrg      ;;
59105c30ecadSmrg    *,yes) # both, prefer svr4
59115c30ecadSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
59125c30ecadSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
59135c30ecadSmrg      # unpreferred sharedlib libNAME.a needs extra handling
59145c30ecadSmrg      postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"'
59155c30ecadSmrg      postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"'
59165c30ecadSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
59175c30ecadSmrg      shlibpath_overrides_runpath=yes
59185c30ecadSmrg      ;;
59195c30ecadSmrg    *,no) # both, prefer aix
59205c30ecadSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
59215c30ecadSmrg      library_names_spec='$libname$release.a $libname.a'
59225c30ecadSmrg      soname_spec='$libname$release$shared_ext$major'
59235c30ecadSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
59245c30ecadSmrg      postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)'
59255c30ecadSmrg      postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"'
59265c30ecadSmrg      ;;
59275c30ecadSmrg    esac
59285c30ecadSmrg    shlibpath_var=LIBPATH
59295c30ecadSmrg  fi
59305c30ecadSmrg  ;;
5931dc99b369Smrg
59325c30ecadSmrgamigaos*)
59335c30ecadSmrg  case $host_cpu in
59345c30ecadSmrg  powerpc)
59355c30ecadSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
59365c30ecadSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
59375c30ecadSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
59385c30ecadSmrg    ;;
59395c30ecadSmrg  m68k)
59405c30ecadSmrg    library_names_spec='$libname.ixlibrary $libname.a'
59415c30ecadSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
59425c30ecadSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
59435c30ecadSmrg    ;;
59445c30ecadSmrg  esac
59455c30ecadSmrg  ;;
5946dc99b369Smrg
59475c30ecadSmrgbeos*)
59485c30ecadSmrg  library_names_spec='$libname$shared_ext'
59495c30ecadSmrg  dynamic_linker="$host_os ld.so"
59505c30ecadSmrg  shlibpath_var=LIBRARY_PATH
59515c30ecadSmrg  ;;
5952dc99b369Smrg
59535c30ecadSmrgbsdi[[45]]*)
59545c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
59555c30ecadSmrg  need_version=no
59565c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
59575c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
59585c30ecadSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
59595c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
59605c30ecadSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
59615c30ecadSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
59625c30ecadSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
59635c30ecadSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
59645c30ecadSmrg  # libtool to hard-code these into programs
59655c30ecadSmrg  ;;
5966dc99b369Smrg
59675c30ecadSmrgcygwin* | mingw* | pw32* | cegcc*)
59685c30ecadSmrg  version_type=windows
59695c30ecadSmrg  shrext_cmds=.dll
59705c30ecadSmrg  need_version=no
59715c30ecadSmrg  need_lib_prefix=no
5972dc99b369Smrg
59735c30ecadSmrg  case $GCC,$cc_basename in
59745c30ecadSmrg  yes,*)
59755c30ecadSmrg    # gcc
59765c30ecadSmrg    library_names_spec='$libname.dll.a'
59775c30ecadSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
59785c30ecadSmrg    postinstall_cmds='base_file=`basename \$file`~
59795c30ecadSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
59805c30ecadSmrg      dldir=$destdir/`dirname \$dlpath`~
59815c30ecadSmrg      test -d \$dldir || mkdir -p \$dldir~
59825c30ecadSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
59835c30ecadSmrg      chmod a+x \$dldir/$dlname~
59845c30ecadSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
59855c30ecadSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
59865c30ecadSmrg      fi'
59875c30ecadSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
59885c30ecadSmrg      dlpath=$dir/\$dldll~
59895c30ecadSmrg       $RM \$dlpath'
59905c30ecadSmrg    shlibpath_overrides_runpath=yes
5991dc99b369Smrg
59925c30ecadSmrg    case $host_os in
59935c30ecadSmrg    cygwin*)
59945c30ecadSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
59955c30ecadSmrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59965c30ecadSmrgm4_if([$1], [],[
59975c30ecadSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
59985c30ecadSmrg      ;;
59995c30ecadSmrg    mingw* | cegcc*)
60005c30ecadSmrg      # MinGW DLLs use traditional 'lib' prefix
60015c30ecadSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
60025c30ecadSmrg      ;;
60035c30ecadSmrg    pw32*)
60045c30ecadSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
60055c30ecadSmrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
60065c30ecadSmrg      ;;
60075c30ecadSmrg    esac
60085c30ecadSmrg    dynamic_linker='Win32 ld.exe'
60095c30ecadSmrg    ;;
6010dc99b369Smrg
60115c30ecadSmrg  *,cl* | *,icl*)
60125c30ecadSmrg    # Native MSVC or ICC
60135c30ecadSmrg    libname_spec='$name'
60145c30ecadSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
60155c30ecadSmrg    library_names_spec='$libname.dll.lib'
6016dc99b369Smrg
60175c30ecadSmrg    case $build_os in
60185c30ecadSmrg    mingw*)
60195c30ecadSmrg      sys_lib_search_path_spec=
60205c30ecadSmrg      lt_save_ifs=$IFS
60215c30ecadSmrg      IFS=';'
60225c30ecadSmrg      for lt_path in $LIB
60235c30ecadSmrg      do
60245c30ecadSmrg        IFS=$lt_save_ifs
60255c30ecadSmrg        # Let DOS variable expansion print the short 8.3 style file name.
60265c30ecadSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
60275c30ecadSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
60285c30ecadSmrg      done
60295c30ecadSmrg      IFS=$lt_save_ifs
60305c30ecadSmrg      # Convert to MSYS style.
60315c30ecadSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
60325c30ecadSmrg      ;;
60335c30ecadSmrg    cygwin*)
60345c30ecadSmrg      # Convert to unix form, then to dos form, then back to unix form
60355c30ecadSmrg      # but this time dos style (no spaces!) so that the unix form looks
60365c30ecadSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
60375c30ecadSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
60385c30ecadSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
60395c30ecadSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
60405c30ecadSmrg      ;;
60415c30ecadSmrg    *)
60425c30ecadSmrg      sys_lib_search_path_spec=$LIB
60435c30ecadSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
60445c30ecadSmrg        # It is most probably a Windows format PATH.
60455c30ecadSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
60465c30ecadSmrg      else
60475c30ecadSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
60485c30ecadSmrg      fi
60495c30ecadSmrg      # FIXME: find the short name or the path components, as spaces are
60505c30ecadSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
60515c30ecadSmrg      ;;
60525c30ecadSmrg    esac
6053dc99b369Smrg
60545c30ecadSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
60555c30ecadSmrg    postinstall_cmds='base_file=`basename \$file`~
60565c30ecadSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
60575c30ecadSmrg      dldir=$destdir/`dirname \$dlpath`~
60585c30ecadSmrg      test -d \$dldir || mkdir -p \$dldir~
60595c30ecadSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
60605c30ecadSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
60615c30ecadSmrg      dlpath=$dir/\$dldll~
60625c30ecadSmrg       $RM \$dlpath'
60635c30ecadSmrg    shlibpath_overrides_runpath=yes
60645c30ecadSmrg    dynamic_linker='Win32 link.exe'
60655c30ecadSmrg    ;;
6066dc99b369Smrg
60675c30ecadSmrg  *)
60685c30ecadSmrg    # Assume MSVC and ICC wrapper
60695c30ecadSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
60705c30ecadSmrg    dynamic_linker='Win32 ld.exe'
60715c30ecadSmrg    ;;
60725c30ecadSmrg  esac
60735c30ecadSmrg  # FIXME: first we should search . and the directory the executable is in
60745c30ecadSmrg  shlibpath_var=PATH
60755c30ecadSmrg  ;;
6076dc99b369Smrg
60775c30ecadSmrgdarwin* | rhapsody*)
60785c30ecadSmrg  dynamic_linker="$host_os dyld"
60795c30ecadSmrg  version_type=darwin
60805c30ecadSmrg  need_lib_prefix=no
60815c30ecadSmrg  need_version=no
60825c30ecadSmrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
60835c30ecadSmrg  soname_spec='$libname$release$major$shared_ext'
60845c30ecadSmrg  shlibpath_overrides_runpath=yes
60855c30ecadSmrg  shlibpath_var=DYLD_LIBRARY_PATH
60865c30ecadSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
60875c30ecadSmrgm4_if([$1], [],[
60885c30ecadSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
60895c30ecadSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
60905c30ecadSmrg  ;;
6091dc99b369Smrg
60925c30ecadSmrgdgux*)
60935c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
60945c30ecadSmrg  need_lib_prefix=no
60955c30ecadSmrg  need_version=no
60965c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
60975c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
60985c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
60995c30ecadSmrg  ;;
61005c30ecadSmrg
61015c30ecadSmrgfreebsd* | dragonfly* | midnightbsd*)
61025c30ecadSmrg  # DragonFly does not have aout.  When/if they implement a new
61035c30ecadSmrg  # versioning mechanism, adjust this.
61045c30ecadSmrg  if test -x /usr/bin/objformat; then
61055c30ecadSmrg    objformat=`/usr/bin/objformat`
61065c30ecadSmrg  else
61075c30ecadSmrg    case $host_os in
61085c30ecadSmrg    freebsd[[23]].*) objformat=aout ;;
61095c30ecadSmrg    *) objformat=elf ;;
61105c30ecadSmrg    esac
61115c30ecadSmrg  fi
61125c30ecadSmrg  version_type=freebsd-$objformat
61135c30ecadSmrg  case $version_type in
61145c30ecadSmrg    freebsd-elf*)
61155c30ecadSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61165c30ecadSmrg      soname_spec='$libname$release$shared_ext$major'
61175c30ecadSmrg      need_version=no
61185c30ecadSmrg      need_lib_prefix=no
61195c30ecadSmrg      ;;
61205c30ecadSmrg    freebsd-*)
61215c30ecadSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
61225c30ecadSmrg      need_version=yes
61235c30ecadSmrg      ;;
61245c30ecadSmrg  esac
61255c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
61265c30ecadSmrg  case $host_os in
61275c30ecadSmrg  freebsd2.*)
61285c30ecadSmrg    shlibpath_overrides_runpath=yes
61295c30ecadSmrg    ;;
61305c30ecadSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
61315c30ecadSmrg    shlibpath_overrides_runpath=yes
61325c30ecadSmrg    hardcode_into_libs=yes
61335c30ecadSmrg    ;;
61345c30ecadSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
61355c30ecadSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
61365c30ecadSmrg    shlibpath_overrides_runpath=no
61375c30ecadSmrg    hardcode_into_libs=yes
61385c30ecadSmrg    ;;
61395c30ecadSmrg  *) # from 4.6 on, and DragonFly
61405c30ecadSmrg    shlibpath_overrides_runpath=yes
61415c30ecadSmrg    hardcode_into_libs=yes
61425c30ecadSmrg    ;;
61435c30ecadSmrg  esac
61445c30ecadSmrg  ;;
61455c30ecadSmrg
61465c30ecadSmrghaiku*)
61475c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
61485c30ecadSmrg  need_lib_prefix=no
61495c30ecadSmrg  need_version=no
61505c30ecadSmrg  dynamic_linker="$host_os runtime_loader"
61515c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61525c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
61535c30ecadSmrg  shlibpath_var=LIBRARY_PATH
61545c30ecadSmrg  shlibpath_overrides_runpath=no
61555c30ecadSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
61565c30ecadSmrg  hardcode_into_libs=yes
61575c30ecadSmrg  ;;
61585c30ecadSmrg
61595c30ecadSmrghpux9* | hpux10* | hpux11*)
61605c30ecadSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
61615c30ecadSmrg  # link against other versions.
61625c30ecadSmrg  version_type=sunos
61635c30ecadSmrg  need_lib_prefix=no
61645c30ecadSmrg  need_version=no
61655c30ecadSmrg  case $host_cpu in
61665c30ecadSmrg  ia64*)
61675c30ecadSmrg    shrext_cmds='.so'
61685c30ecadSmrg    hardcode_into_libs=yes
61695c30ecadSmrg    dynamic_linker="$host_os dld.so"
61705c30ecadSmrg    shlibpath_var=LD_LIBRARY_PATH
61715c30ecadSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
61725c30ecadSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61735c30ecadSmrg    soname_spec='$libname$release$shared_ext$major'
61745c30ecadSmrg    if test 32 = "$HPUX_IA64_MODE"; then
61755c30ecadSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
61765c30ecadSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
61775c30ecadSmrg    else
61785c30ecadSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
61795c30ecadSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
61805c30ecadSmrg    fi
61815c30ecadSmrg    ;;
61825c30ecadSmrg  hppa*64*)
61835c30ecadSmrg    shrext_cmds='.sl'
61845c30ecadSmrg    hardcode_into_libs=yes
61855c30ecadSmrg    dynamic_linker="$host_os dld.sl"
61865c30ecadSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
61875c30ecadSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
61885c30ecadSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61895c30ecadSmrg    soname_spec='$libname$release$shared_ext$major'
61905c30ecadSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
61915c30ecadSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
61925c30ecadSmrg    ;;
61935c30ecadSmrg  *)
61945c30ecadSmrg    shrext_cmds='.sl'
61955c30ecadSmrg    dynamic_linker="$host_os dld.sl"
61965c30ecadSmrg    shlibpath_var=SHLIB_PATH
61975c30ecadSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
61985c30ecadSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61995c30ecadSmrg    soname_spec='$libname$release$shared_ext$major'
62005c30ecadSmrg    ;;
62015c30ecadSmrg  esac
62025c30ecadSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
62035c30ecadSmrg  postinstall_cmds='chmod 555 $lib'
62045c30ecadSmrg  # or fails outright, so override atomically:
62055c30ecadSmrg  install_override_mode=555
62065c30ecadSmrg  ;;
6207dc99b369Smrg
62085c30ecadSmrginterix[[3-9]]*)
62095c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
62105c30ecadSmrg  need_lib_prefix=no
62115c30ecadSmrg  need_version=no
62125c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
62135c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
62145c30ecadSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
62155c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
62165c30ecadSmrg  shlibpath_overrides_runpath=no
62175c30ecadSmrg  hardcode_into_libs=yes
62185c30ecadSmrg  ;;
6219dc99b369Smrg
62205c30ecadSmrgirix5* | irix6* | nonstopux*)
62215c30ecadSmrg  case $host_os in
62225c30ecadSmrg    nonstopux*) version_type=nonstopux ;;
62235c30ecadSmrg    *)
62245c30ecadSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
62255c30ecadSmrg		version_type=linux # correct to gnu/linux during the next big refactor
62265c30ecadSmrg	else
62275c30ecadSmrg		version_type=irix
62285c30ecadSmrg	fi ;;
62295c30ecadSmrg  esac
62305c30ecadSmrg  need_lib_prefix=no
62315c30ecadSmrg  need_version=no
62325c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
62335c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
62345c30ecadSmrg  case $host_os in
62355c30ecadSmrg  irix5* | nonstopux*)
62365c30ecadSmrg    libsuff= shlibsuff=
62375c30ecadSmrg    ;;
62385c30ecadSmrg  *)
62395c30ecadSmrg    case $LD in # libtool.m4 will add one of these switches to LD
62405c30ecadSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
62415c30ecadSmrg      libsuff= shlibsuff= libmagic=32-bit;;
62425c30ecadSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
62435c30ecadSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
62445c30ecadSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
62455c30ecadSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
62465c30ecadSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
62475c30ecadSmrg    esac
62485c30ecadSmrg    ;;
62495c30ecadSmrg  esac
62505c30ecadSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
62515c30ecadSmrg  shlibpath_overrides_runpath=no
62525c30ecadSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
62535c30ecadSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
62545c30ecadSmrg  hardcode_into_libs=yes
62555c30ecadSmrg  ;;
6256dc99b369Smrg
62575c30ecadSmrg# No shared lib support for Linux oldld, aout, or coff.
62585c30ecadSmrglinux*oldld* | linux*aout* | linux*coff*)
62595c30ecadSmrg  dynamic_linker=no
62605c30ecadSmrg  ;;
6261dc99b369Smrg
62625c30ecadSmrglinux*android*)
62635c30ecadSmrg  version_type=none # Android doesn't support versioned libraries.
62645c30ecadSmrg  need_lib_prefix=no
62655c30ecadSmrg  need_version=no
62665c30ecadSmrg  library_names_spec='$libname$release$shared_ext'
62675c30ecadSmrg  soname_spec='$libname$release$shared_ext'
62685c30ecadSmrg  finish_cmds=
62695c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
62705c30ecadSmrg  shlibpath_overrides_runpath=yes
6271dc99b369Smrg
62725c30ecadSmrg  # This implies no fast_install, which is unacceptable.
62735c30ecadSmrg  # Some rework will be needed to allow for fast_install
62745c30ecadSmrg  # before this can be enabled.
62755c30ecadSmrg  hardcode_into_libs=yes
6276dc99b369Smrg
62775c30ecadSmrg  dynamic_linker='Android linker'
62785c30ecadSmrg  # Don't embed -rpath directories since the linker doesn't support them.
62795c30ecadSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
62805c30ecadSmrg  ;;
6281dc99b369Smrg
62825c30ecadSmrg# This must be glibc/ELF.
62835c30ecadSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
62845c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
62855c30ecadSmrg  need_lib_prefix=no
62865c30ecadSmrg  need_version=no
62875c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
62885c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
62895c30ecadSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
62905c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
62915c30ecadSmrg  shlibpath_overrides_runpath=no
6292dc99b369Smrg
62935c30ecadSmrg  # Some binutils ld are patched to set DT_RUNPATH
62945c30ecadSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
62955c30ecadSmrg    [lt_cv_shlibpath_overrides_runpath=no
62965c30ecadSmrg    save_LDFLAGS=$LDFLAGS
62975c30ecadSmrg    save_libdir=$libdir
62985c30ecadSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
62995c30ecadSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
63005c30ecadSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
63015c30ecadSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
63025c30ecadSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
63035c30ecadSmrg    LDFLAGS=$save_LDFLAGS
63045c30ecadSmrg    libdir=$save_libdir
63055c30ecadSmrg    ])
63065c30ecadSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
6307dc99b369Smrg
63085c30ecadSmrg  # This implies no fast_install, which is unacceptable.
63095c30ecadSmrg  # Some rework will be needed to allow for fast_install
63105c30ecadSmrg  # before this can be enabled.
63115c30ecadSmrg  hardcode_into_libs=yes
6312dc99b369Smrg
63135c30ecadSmrg  # Ideally, we could use ldconfig to report *all* directores which are
63145c30ecadSmrg  # searched for libraries, however this is still not possible.  Aside from not
63155c30ecadSmrg  # being certain /sbin/ldconfig is available, command
63165c30ecadSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
63175c30ecadSmrg  # even though it is searched at run-time.  Try to do the best guess by
63185c30ecadSmrg  # appending ld.so.conf contents (and includes) to the search path.
63195c30ecadSmrg  if test -f /etc/ld.so.conf; then
63205c30ecadSmrg    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' ' '`
63215c30ecadSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
63225c30ecadSmrg  fi
6323dc99b369Smrg
63245c30ecadSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
63255c30ecadSmrg  # powerpc, because MkLinux only supported shared libraries with the
63265c30ecadSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
63275c30ecadSmrg  # most powerpc-linux boxes support dynamic linking these days and
63285c30ecadSmrg  # people can always --disable-shared, the test was removed, and we
63295c30ecadSmrg  # assume the GNU/Linux dynamic linker is in use.
63305c30ecadSmrg  dynamic_linker='GNU/Linux ld.so'
63315c30ecadSmrg  ;;
6332dc99b369Smrg
63335c30ecadSmrgnetbsd*)
63345c30ecadSmrg  version_type=sunos
63355c30ecadSmrg  need_lib_prefix=no
63365c30ecadSmrg  need_version=no
63375c30ecadSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
63385c30ecadSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
63395c30ecadSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
63405c30ecadSmrg    dynamic_linker='NetBSD (a.out) ld.so'
63415c30ecadSmrg  else
63425c30ecadSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63435c30ecadSmrg    soname_spec='$libname$release$shared_ext$major'
63445c30ecadSmrg    dynamic_linker='NetBSD ld.elf_so'
63455c30ecadSmrg  fi
63465c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
63475c30ecadSmrg  shlibpath_overrides_runpath=yes
63485c30ecadSmrg  hardcode_into_libs=yes
63495c30ecadSmrg  ;;
6350dc99b369Smrg
63515c30ecadSmrgnewsos6)
63525c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
63535c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63545c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
63555c30ecadSmrg  shlibpath_overrides_runpath=yes
63565c30ecadSmrg  ;;
6357dc99b369Smrg
63585c30ecadSmrg*nto* | *qnx*)
63595c30ecadSmrg  version_type=qnx
63605c30ecadSmrg  need_lib_prefix=no
63615c30ecadSmrg  need_version=no
63625c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63635c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
63645c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
63655c30ecadSmrg  shlibpath_overrides_runpath=no
63665c30ecadSmrg  hardcode_into_libs=yes
63675c30ecadSmrg  dynamic_linker='ldqnx.so'
63685c30ecadSmrg  ;;
6369dc99b369Smrg
63705c30ecadSmrgopenbsd* | bitrig*)
63715c30ecadSmrg  version_type=sunos
63725c30ecadSmrg  sys_lib_dlsearch_path_spec=/usr/lib
63735c30ecadSmrg  need_lib_prefix=no
63745c30ecadSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
63755c30ecadSmrg    need_version=no
63765c30ecadSmrg  else
63775c30ecadSmrg    need_version=yes
63785c30ecadSmrg  fi
63795c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
63805c30ecadSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
63815c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
63825c30ecadSmrg  shlibpath_overrides_runpath=yes
63835c30ecadSmrg  ;;
6384dc99b369Smrg
63855c30ecadSmrgos2*)
63865c30ecadSmrg  libname_spec='$name'
63875c30ecadSmrg  version_type=windows
63885c30ecadSmrg  shrext_cmds=.dll
63895c30ecadSmrg  need_version=no
63905c30ecadSmrg  need_lib_prefix=no
63915c30ecadSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
63925c30ecadSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
63935c30ecadSmrg    v=$($ECHO $release$versuffix | tr -d .-);
63945c30ecadSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
63955c30ecadSmrg    $ECHO $n$v`$shared_ext'
63965c30ecadSmrg  library_names_spec='${libname}_dll.$libext'
63975c30ecadSmrg  dynamic_linker='OS/2 ld.exe'
63985c30ecadSmrg  shlibpath_var=BEGINLIBPATH
63995c30ecadSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
64005c30ecadSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
64015c30ecadSmrg  postinstall_cmds='base_file=`basename \$file`~
64025c30ecadSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
64035c30ecadSmrg    dldir=$destdir/`dirname \$dlpath`~
64045c30ecadSmrg    test -d \$dldir || mkdir -p \$dldir~
64055c30ecadSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
64065c30ecadSmrg    chmod a+x \$dldir/$dlname~
64075c30ecadSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
64085c30ecadSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
64095c30ecadSmrg    fi'
64105c30ecadSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
64115c30ecadSmrg    dlpath=$dir/\$dldll~
64125c30ecadSmrg    $RM \$dlpath'
64135c30ecadSmrg  ;;
6414dc99b369Smrg
64155c30ecadSmrgosf3* | osf4* | osf5*)
64165c30ecadSmrg  version_type=osf
64175c30ecadSmrg  need_lib_prefix=no
64185c30ecadSmrg  need_version=no
64195c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
64205c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64215c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
64225c30ecadSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
64235c30ecadSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
64245c30ecadSmrg  ;;
6425dc99b369Smrg
64265c30ecadSmrgrdos*)
64275c30ecadSmrg  dynamic_linker=no
64285c30ecadSmrg  ;;
6429dc99b369Smrg
64305c30ecadSmrgsolaris*)
64315c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
64325c30ecadSmrg  need_lib_prefix=no
64335c30ecadSmrg  need_version=no
64345c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64355c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
64365c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
64375c30ecadSmrg  shlibpath_overrides_runpath=yes
64385c30ecadSmrg  hardcode_into_libs=yes
64395c30ecadSmrg  # ldd complains unless libraries are executable
64405c30ecadSmrg  postinstall_cmds='chmod +x $lib'
64415c30ecadSmrg  ;;
6442dc99b369Smrg
64435c30ecadSmrgsunos4*)
64445c30ecadSmrg  version_type=sunos
64455c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
64465c30ecadSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
64475c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
64485c30ecadSmrg  shlibpath_overrides_runpath=yes
64495c30ecadSmrg  if test yes = "$with_gnu_ld"; then
64505c30ecadSmrg    need_lib_prefix=no
64515c30ecadSmrg  fi
64525c30ecadSmrg  need_version=yes
64535c30ecadSmrg  ;;
6454dc99b369Smrg
64555c30ecadSmrgsysv4 | sysv4.3*)
64565c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
64575c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64585c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
64595c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
64605c30ecadSmrg  case $host_vendor in
64615c30ecadSmrg    sni)
64625c30ecadSmrg      shlibpath_overrides_runpath=no
64635c30ecadSmrg      need_lib_prefix=no
64645c30ecadSmrg      runpath_var=LD_RUN_PATH
64655c30ecadSmrg      ;;
64665c30ecadSmrg    siemens)
64675c30ecadSmrg      need_lib_prefix=no
64685c30ecadSmrg      ;;
64695c30ecadSmrg    motorola)
64705c30ecadSmrg      need_lib_prefix=no
64715c30ecadSmrg      need_version=no
64725c30ecadSmrg      shlibpath_overrides_runpath=no
64735c30ecadSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
64745c30ecadSmrg      ;;
64755c30ecadSmrg  esac
64765c30ecadSmrg  ;;
6477dc99b369Smrg
64785c30ecadSmrgsysv4*MP*)
64795c30ecadSmrg  if test -d /usr/nec; then
64805c30ecadSmrg    version_type=linux # correct to gnu/linux during the next big refactor
64815c30ecadSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
64825c30ecadSmrg    soname_spec='$libname$shared_ext.$major'
64835c30ecadSmrg    shlibpath_var=LD_LIBRARY_PATH
64845c30ecadSmrg  fi
64855c30ecadSmrg  ;;
6486dc99b369Smrg
64875c30ecadSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
64885c30ecadSmrg  version_type=sco
64895c30ecadSmrg  need_lib_prefix=no
64905c30ecadSmrg  need_version=no
64915c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
64925c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
64935c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
64945c30ecadSmrg  shlibpath_overrides_runpath=yes
64955c30ecadSmrg  hardcode_into_libs=yes
64965c30ecadSmrg  if test yes = "$with_gnu_ld"; then
64975c30ecadSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
64985c30ecadSmrg  else
64995c30ecadSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
65005c30ecadSmrg    case $host_os in
65015c30ecadSmrg      sco3.2v5*)
65025c30ecadSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
65035eefee25Smacallan	;;
65045c30ecadSmrg    esac
65055c30ecadSmrg  fi
65065c30ecadSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
65075c30ecadSmrg  ;;
6508dc99b369Smrg
65095c30ecadSmrgtpf*)
65105c30ecadSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
65115c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
65125c30ecadSmrg  need_lib_prefix=no
65135c30ecadSmrg  need_version=no
65145c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
65155c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
65165c30ecadSmrg  shlibpath_overrides_runpath=no
65175c30ecadSmrg  hardcode_into_libs=yes
65185c30ecadSmrg  ;;
6519dc99b369Smrg
65205c30ecadSmrguts4*)
65215c30ecadSmrg  version_type=linux # correct to gnu/linux during the next big refactor
65225c30ecadSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
65235c30ecadSmrg  soname_spec='$libname$release$shared_ext$major'
65245c30ecadSmrg  shlibpath_var=LD_LIBRARY_PATH
65255c30ecadSmrg  ;;
6526dc99b369Smrg
65275c30ecadSmrg*)
65285c30ecadSmrg  dynamic_linker=no
65295c30ecadSmrg  ;;
65305c30ecadSmrgesac
65315c30ecadSmrgAC_MSG_RESULT([$dynamic_linker])
65325c30ecadSmrgtest no = "$dynamic_linker" && can_build_shared=no
6533dc99b369Smrg
65345c30ecadSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
65355c30ecadSmrgif test yes = "$GCC"; then
65365c30ecadSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
65375c30ecadSmrgfi
6538dc99b369Smrg
65395c30ecadSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
65405c30ecadSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
65415c30ecadSmrgfi
6542dc99b369Smrg
65435c30ecadSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
65445c30ecadSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
65455c30ecadSmrgfi
6546dc99b369Smrg
65475c30ecadSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
65485c30ecadSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
6549dc99b369Smrg
65505c30ecadSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
65515c30ecadSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
6552dc99b369Smrg
65535c30ecadSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
65545c30ecadSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
6555dc99b369Smrg
65565c30ecadSmrg_LT_DECL([], [variables_saved_for_relink], [1],
65575c30ecadSmrg    [Variables whose values should be saved in libtool wrapper scripts and
65585c30ecadSmrg    restored at link time])
65595c30ecadSmrg_LT_DECL([], [need_lib_prefix], [0],
65605c30ecadSmrg    [Do we need the "lib" prefix for modules?])
65615c30ecadSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
65625c30ecadSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
65635c30ecadSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
65645c30ecadSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
65655c30ecadSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
65665c30ecadSmrg    [Is shlibpath searched before the hard-coded library search path?])
65675c30ecadSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
65685c30ecadSmrg_LT_DECL([], [library_names_spec], [1],
65695c30ecadSmrg    [[List of archive names.  First name is the real one, the rest are links.
65705c30ecadSmrg    The last name is the one that the linker finds with -lNAME]])
65715c30ecadSmrg_LT_DECL([], [soname_spec], [1],
65725c30ecadSmrg    [[The coded name of the library, if different from the real name]])
65735c30ecadSmrg_LT_DECL([], [install_override_mode], [1],
65745c30ecadSmrg    [Permission mode override for installation of shared libraries])
65755c30ecadSmrg_LT_DECL([], [postinstall_cmds], [2],
65765c30ecadSmrg    [Command to use after installation of a shared archive])
65775c30ecadSmrg_LT_DECL([], [postuninstall_cmds], [2],
65785c30ecadSmrg    [Command to use after uninstallation of a shared archive])
65795c30ecadSmrg_LT_DECL([], [finish_cmds], [2],
65805c30ecadSmrg    [Commands used to finish a libtool library installation in a directory])
65815c30ecadSmrg_LT_DECL([], [finish_eval], [1],
65825c30ecadSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
65835c30ecadSmrg    not shown]])
65845c30ecadSmrg_LT_DECL([], [hardcode_into_libs], [0],
65855c30ecadSmrg    [Whether we should hardcode library paths into libraries])
65865c30ecadSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
65875c30ecadSmrg    [Compile-time system search path for libraries])
65885c30ecadSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
65895c30ecadSmrg    [Detected run-time system search path for libraries])
65905c30ecadSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
65915c30ecadSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
65925c30ecadSmrg])# _LT_SYS_DYNAMIC_LINKER
6593dc99b369Smrg
6594dc99b369Smrg
65955c30ecadSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
65965c30ecadSmrg# --------------------------
65975c30ecadSmrg# find a file program that can recognize shared library
65985c30ecadSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
65995c30ecadSmrg[m4_require([_LT_DECL_EGREP])dnl
66005c30ecadSmrgAC_MSG_CHECKING([for $1])
66015c30ecadSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
66025c30ecadSmrg[case $MAGIC_CMD in
66035c30ecadSmrg[[\\/*] |  ?:[\\/]*])
66045c30ecadSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
66055c30ecadSmrg  ;;
66065c30ecadSmrg*)
66075c30ecadSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
66085c30ecadSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
66095c30ecadSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
66105c30ecadSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
66115c30ecadSmrgdnl not every word.  This closes a longstanding sh security hole.
66125c30ecadSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
66135c30ecadSmrg  for ac_dir in $ac_dummy; do
66145c30ecadSmrg    IFS=$lt_save_ifs
66155c30ecadSmrg    test -z "$ac_dir" && ac_dir=.
66165c30ecadSmrg    if test -f "$ac_dir/$1"; then
66175c30ecadSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
66185c30ecadSmrg      if test -n "$file_magic_test_file"; then
66195c30ecadSmrg	case $deplibs_check_method in
66205c30ecadSmrg	"file_magic "*)
66215c30ecadSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
66225c30ecadSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
66235c30ecadSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
66245c30ecadSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
66255c30ecadSmrg	    :
66265c30ecadSmrg	  else
66275c30ecadSmrg	    cat <<_LT_EOF 1>&2
6628dc99b369Smrg
66295c30ecadSmrg*** Warning: the command libtool uses to detect shared libraries,
66305c30ecadSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
66315c30ecadSmrg*** The result is that libtool may fail to recognize shared libraries
66325c30ecadSmrg*** as such.  This will affect the creation of libtool libraries that
66335c30ecadSmrg*** depend on shared libraries, but programs linked with such libtool
66345c30ecadSmrg*** libraries will work regardless of this problem.  Nevertheless, you
66355c30ecadSmrg*** may want to report the problem to your system manager and/or to
66365c30ecadSmrg*** bug-libtool@gnu.org
6637dc99b369Smrg
66385c30ecadSmrg_LT_EOF
66395c30ecadSmrg	  fi ;;
66405c30ecadSmrg	esac
66415c30ecadSmrg      fi
66425c30ecadSmrg      break
66435c30ecadSmrg    fi
66445c30ecadSmrg  done
66455c30ecadSmrg  IFS=$lt_save_ifs
66465c30ecadSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
66475c30ecadSmrg  ;;
66485c30ecadSmrgesac])
66495c30ecadSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
66505c30ecadSmrgif test -n "$MAGIC_CMD"; then
66515c30ecadSmrg  AC_MSG_RESULT($MAGIC_CMD)
66525c30ecadSmrgelse
66535c30ecadSmrg  AC_MSG_RESULT(no)
66545c30ecadSmrgfi
66555c30ecadSmrg_LT_DECL([], [MAGIC_CMD], [0],
66565c30ecadSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
66575c30ecadSmrg])# _LT_PATH_TOOL_PREFIX
6658dc99b369Smrg
66595c30ecadSmrg# Old name:
66605c30ecadSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
66615c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
66625c30ecadSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
6663dc99b369Smrg
66645eefee25Smacallan
66655c30ecadSmrg# _LT_PATH_MAGIC
66665c30ecadSmrg# --------------
66675c30ecadSmrg# find a file program that can recognize a shared library
66685c30ecadSmrgm4_defun([_LT_PATH_MAGIC],
66695c30ecadSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
66705c30ecadSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
66715c30ecadSmrg  if test -n "$ac_tool_prefix"; then
66725c30ecadSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
66735c30ecadSmrg  else
66745c30ecadSmrg    MAGIC_CMD=:
66755c30ecadSmrg  fi
66765c30ecadSmrgfi
66775c30ecadSmrg])# _LT_PATH_MAGIC
66785c30ecadSmrg
66795c30ecadSmrg
66805c30ecadSmrg# LT_PATH_LD
66815c30ecadSmrg# ----------
66825c30ecadSmrg# find the pathname to the GNU or non-GNU linker
66835c30ecadSmrgAC_DEFUN([LT_PATH_LD],
66845c30ecadSmrg[AC_REQUIRE([AC_PROG_CC])dnl
66855c30ecadSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
66865c30ecadSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
66875c30ecadSmrgm4_require([_LT_DECL_SED])dnl
66885c30ecadSmrgm4_require([_LT_DECL_EGREP])dnl
66895c30ecadSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
66905c30ecadSmrg
66915c30ecadSmrgAC_ARG_WITH([gnu-ld],
66925c30ecadSmrg    [AS_HELP_STRING([--with-gnu-ld],
66935c30ecadSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
66945c30ecadSmrg    [test no = "$withval" || with_gnu_ld=yes],
66955c30ecadSmrg    [with_gnu_ld=no])dnl
66965c30ecadSmrg
66975c30ecadSmrgac_prog=ld
66985c30ecadSmrgif test yes = "$GCC"; then
66995c30ecadSmrg  # Check if gcc -print-prog-name=ld gives a path.
67005c30ecadSmrg  AC_MSG_CHECKING([for ld used by $CC])
67015c30ecadSmrg  case $host in
67025c30ecadSmrg  *-*-mingw*)
67035c30ecadSmrg    # gcc leaves a trailing carriage return, which upsets mingw
67045c30ecadSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
67055c30ecadSmrg  *)
67065c30ecadSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
67075c30ecadSmrg  esac
67085c30ecadSmrg  case $ac_prog in
67095c30ecadSmrg    # Accept absolute paths.
67105c30ecadSmrg    [[\\/]]* | ?:[[\\/]]*)
67115c30ecadSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
67125c30ecadSmrg      # Canonicalize the pathname of ld
67135c30ecadSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
67145c30ecadSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
67155c30ecadSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
67165c30ecadSmrg      done
67175c30ecadSmrg      test -z "$LD" && LD=$ac_prog
67185c30ecadSmrg      ;;
67195c30ecadSmrg  "")
67205c30ecadSmrg    # If it fails, then pretend we aren't using GCC.
67215c30ecadSmrg    ac_prog=ld
67225c30ecadSmrg    ;;
67235c30ecadSmrg  *)
67245c30ecadSmrg    # If it is relative, then search for the first ld in PATH.
67255c30ecadSmrg    with_gnu_ld=unknown
67265c30ecadSmrg    ;;
67275c30ecadSmrg  esac
67285c30ecadSmrgelif test yes = "$with_gnu_ld"; then
67295c30ecadSmrg  AC_MSG_CHECKING([for GNU ld])
67305c30ecadSmrgelse
67315c30ecadSmrg  AC_MSG_CHECKING([for non-GNU ld])
67325c30ecadSmrgfi
67335c30ecadSmrgAC_CACHE_VAL(lt_cv_path_LD,
67345c30ecadSmrg[if test -z "$LD"; then
67355c30ecadSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
67365c30ecadSmrg  for ac_dir in $PATH; do
67375c30ecadSmrg    IFS=$lt_save_ifs
67385c30ecadSmrg    test -z "$ac_dir" && ac_dir=.
67395c30ecadSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
67405c30ecadSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
67415c30ecadSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
67425c30ecadSmrg      # but apparently some variants of GNU ld only accept -v.
67435c30ecadSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
67445c30ecadSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
67455c30ecadSmrg      *GNU* | *'with BFD'*)
67465c30ecadSmrg	test no != "$with_gnu_ld" && break
67475c30ecadSmrg	;;
67485c30ecadSmrg      *)
67495c30ecadSmrg	test yes != "$with_gnu_ld" && break
67505c30ecadSmrg	;;
67515c30ecadSmrg      esac
67525c30ecadSmrg    fi
67535c30ecadSmrg  done
67545c30ecadSmrg  IFS=$lt_save_ifs
67555c30ecadSmrgelse
67565c30ecadSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
67575c30ecadSmrgfi])
67585c30ecadSmrgLD=$lt_cv_path_LD
67595c30ecadSmrgif test -n "$LD"; then
67605c30ecadSmrg  AC_MSG_RESULT($LD)
67615c30ecadSmrgelse
67625c30ecadSmrg  AC_MSG_RESULT(no)
67635c30ecadSmrgfi
67645c30ecadSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
67655c30ecadSmrg_LT_PATH_LD_GNU
67665c30ecadSmrgAC_SUBST([LD])
6767dc99b369Smrg
67685c30ecadSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
67695c30ecadSmrg])# LT_PATH_LD
6770dc99b369Smrg
67715c30ecadSmrg# Old names:
67725c30ecadSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
67735c30ecadSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
67745c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
67755c30ecadSmrgdnl AC_DEFUN([AM_PROG_LD], [])
67765c30ecadSmrgdnl AC_DEFUN([AC_PROG_LD], [])
67775eefee25Smacallan
677862ab96baSmrg
67795c30ecadSmrg# _LT_PATH_LD_GNU
67805c30ecadSmrg#- --------------
67815c30ecadSmrgm4_defun([_LT_PATH_LD_GNU],
67825c30ecadSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
67835c30ecadSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
67845c30ecadSmrgcase `$LD -v 2>&1 </dev/null` in
67855c30ecadSmrg*GNU* | *'with BFD'*)
67865c30ecadSmrg  lt_cv_prog_gnu_ld=yes
67875c30ecadSmrg  ;;
67885c30ecadSmrg*)
67895c30ecadSmrg  lt_cv_prog_gnu_ld=no
67905c30ecadSmrg  ;;
67915c30ecadSmrgesac])
67925c30ecadSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
67935c30ecadSmrg])# _LT_PATH_LD_GNU
6794dc99b369Smrg
6795dc99b369Smrg
67965c30ecadSmrg# _LT_CMD_RELOAD
67975c30ecadSmrg# --------------
67985c30ecadSmrg# find reload flag for linker
67995c30ecadSmrg#   -- PORTME Some linkers may need a different reload flag.
68005c30ecadSmrgm4_defun([_LT_CMD_RELOAD],
68015c30ecadSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
68025c30ecadSmrg  lt_cv_ld_reload_flag,
68035c30ecadSmrg  [lt_cv_ld_reload_flag='-r'])
68045c30ecadSmrgreload_flag=$lt_cv_ld_reload_flag
68055c30ecadSmrgcase $reload_flag in
68065c30ecadSmrg"" | " "*) ;;
68075c30ecadSmrg*) reload_flag=" $reload_flag" ;;
68085c30ecadSmrgesac
68095c30ecadSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
68105c30ecadSmrgcase $host_os in
68115c30ecadSmrg  cygwin* | mingw* | pw32* | cegcc*)
68125c30ecadSmrg    if test yes != "$GCC"; then
68135c30ecadSmrg      reload_cmds=false
68145c30ecadSmrg    fi
68155c30ecadSmrg    ;;
68165c30ecadSmrg  darwin*)
68175c30ecadSmrg    if test yes = "$GCC"; then
68185c30ecadSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
68195c30ecadSmrg    else
68205c30ecadSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
68215c30ecadSmrg    fi
68225c30ecadSmrg    ;;
68235c30ecadSmrgesac
68245c30ecadSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
68255c30ecadSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
68265c30ecadSmrg])# _LT_CMD_RELOAD
6827dc99b369Smrg
68285eefee25Smacallan
68295c30ecadSmrg# _LT_PATH_DD
68305c30ecadSmrg# -----------
68315c30ecadSmrg# find a working dd
68325c30ecadSmrgm4_defun([_LT_PATH_DD],
68335c30ecadSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
68345c30ecadSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
68355c30ecadSmrgcat conftest.i conftest.i >conftest2.i
68365c30ecadSmrg: ${lt_DD:=$DD}
68375c30ecadSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
68385c30ecadSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
68395c30ecadSmrg  cmp -s conftest.i conftest.out \
68405c30ecadSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
68415c30ecadSmrgfi])
68425c30ecadSmrgrm -f conftest.i conftest2.i conftest.out])
68435c30ecadSmrg])# _LT_PATH_DD
68445eefee25Smacallan
68455eefee25Smacallan
68465c30ecadSmrg# _LT_CMD_TRUNCATE
68475c30ecadSmrg# ----------------
68485c30ecadSmrg# find command to truncate a binary pipe
68495c30ecadSmrgm4_defun([_LT_CMD_TRUNCATE],
68505c30ecadSmrg[m4_require([_LT_PATH_DD])
68515c30ecadSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
68525c30ecadSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
68535c30ecadSmrgcat conftest.i conftest.i >conftest2.i
68545c30ecadSmrglt_cv_truncate_bin=
68555c30ecadSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
68565c30ecadSmrg  cmp -s conftest.i conftest.out \
68575c30ecadSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
68585c30ecadSmrgfi
68595c30ecadSmrgrm -f conftest.i conftest2.i conftest.out
68605c30ecadSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
68615c30ecadSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
68625c30ecadSmrg  [Command to truncate a binary pipe])
68635c30ecadSmrg])# _LT_CMD_TRUNCATE
68645eefee25Smacallan
68655eefee25Smacallan
68665c30ecadSmrg# _LT_CHECK_MAGIC_METHOD
68675c30ecadSmrg# ----------------------
68685c30ecadSmrg# how to check for library dependencies
68695c30ecadSmrg#  -- PORTME fill in with the dynamic library characteristics
68705c30ecadSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
68715c30ecadSmrg[m4_require([_LT_DECL_EGREP])
68725c30ecadSmrgm4_require([_LT_DECL_OBJDUMP])
68735c30ecadSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
68745c30ecadSmrglt_cv_deplibs_check_method,
68755c30ecadSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
68765c30ecadSmrglt_cv_file_magic_test_file=
68775c30ecadSmrglt_cv_deplibs_check_method='unknown'
68785c30ecadSmrg# Need to set the preceding variable on all platforms that support
68795c30ecadSmrg# interlibrary dependencies.
68805c30ecadSmrg# 'none' -- dependencies not supported.
68815c30ecadSmrg# 'unknown' -- same as none, but documents that we really don't know.
68825c30ecadSmrg# 'pass_all' -- all dependencies passed with no checks.
68835c30ecadSmrg# 'test_compile' -- check by making test program.
68845c30ecadSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
68855c30ecadSmrg# that responds to the $file_magic_cmd with a given extended regex.
68865c30ecadSmrg# If you have 'file' or equivalent on your system and you're not sure
68875c30ecadSmrg# whether 'pass_all' will *always* work, you probably want this one.
68885eefee25Smacallan
68895c30ecadSmrgcase $host_os in
68905c30ecadSmrgaix[[4-9]]*)
68915c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
68925c30ecadSmrg  ;;
68935eefee25Smacallan
68945c30ecadSmrgbeos*)
68955c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
68965c30ecadSmrg  ;;
68975eefee25Smacallan
68985c30ecadSmrgbsdi[[45]]*)
68995c30ecadSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
69005c30ecadSmrg  lt_cv_file_magic_cmd='$FILECMD -L'
69015c30ecadSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
69025c30ecadSmrg  ;;
6903dc99b369Smrg
69045c30ecadSmrgcygwin*)
69055c30ecadSmrg  # func_win32_libid is a shell function defined in ltmain.sh
69065c30ecadSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
69075c30ecadSmrg  lt_cv_file_magic_cmd='func_win32_libid'
69085c30ecadSmrg  ;;
6909dc99b369Smrg
69105c30ecadSmrgmingw* | pw32*)
69115c30ecadSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
69125c30ecadSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
69135c30ecadSmrg  # unless we find 'file', for example because we are cross-compiling.
69145c30ecadSmrg  if ( file / ) >/dev/null 2>&1; then
69155c30ecadSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
69165c30ecadSmrg    lt_cv_file_magic_cmd='func_win32_libid'
69175c30ecadSmrg  else
69185c30ecadSmrg    # Keep this pattern in sync with the one in func_win32_libid.
69195c30ecadSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
69205c30ecadSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
69215c30ecadSmrg  fi
69225c30ecadSmrg  ;;
6923dc99b369Smrg
69245c30ecadSmrgcegcc*)
69255c30ecadSmrg  # use the weaker test based on 'objdump'. See mingw*.
69265c30ecadSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
69275c30ecadSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
69285c30ecadSmrg  ;;
6929dc99b369Smrg
69305c30ecadSmrgdarwin* | rhapsody*)
69315c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
69325c30ecadSmrg  ;;
69335eefee25Smacallan
69345c30ecadSmrgfreebsd* | dragonfly* | midnightbsd*)
69355c30ecadSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
69365c30ecadSmrg    case $host_cpu in
69375c30ecadSmrg    i*86 )
69385c30ecadSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
69395c30ecadSmrg      # Let's accept both of them until this is cleared up.
69405c30ecadSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
69415c30ecadSmrg      lt_cv_file_magic_cmd=$FILECMD
69425c30ecadSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
69435c30ecadSmrg      ;;
69445c30ecadSmrg    esac
69455c30ecadSmrg  else
69465c30ecadSmrg    lt_cv_deplibs_check_method=pass_all
69475c30ecadSmrg  fi
69485c30ecadSmrg  ;;
69495eefee25Smacallan
69505c30ecadSmrghaiku*)
69515c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
69525c30ecadSmrg  ;;
69535eefee25Smacallan
69545c30ecadSmrghpux10.20* | hpux11*)
69555c30ecadSmrg  lt_cv_file_magic_cmd=$FILECMD
69565c30ecadSmrg  case $host_cpu in
69575c30ecadSmrg  ia64*)
69585c30ecadSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
69595c30ecadSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
69605c30ecadSmrg    ;;
69615c30ecadSmrg  hppa*64*)
69625c30ecadSmrg    [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]']
69635c30ecadSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
69645c30ecadSmrg    ;;
69655c30ecadSmrg  *)
69665c30ecadSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
69675c30ecadSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
69685c30ecadSmrg    ;;
69695eefee25Smacallan  esac
69705c30ecadSmrg  ;;
69715eefee25Smacallan
69725c30ecadSmrginterix[[3-9]]*)
69735c30ecadSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
69745c30ecadSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
69755c30ecadSmrg  ;;
69765eefee25Smacallan
69775c30ecadSmrgirix5* | irix6* | nonstopux*)
69785c30ecadSmrg  case $LD in
69795c30ecadSmrg  *-32|*"-32 ") libmagic=32-bit;;
69805c30ecadSmrg  *-n32|*"-n32 ") libmagic=N32;;
69815c30ecadSmrg  *-64|*"-64 ") libmagic=64-bit;;
69825c30ecadSmrg  *) libmagic=never-match;;
69835c30ecadSmrg  esac
69845c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
69855c30ecadSmrg  ;;
69865eefee25Smacallan
69875c30ecadSmrg# This must be glibc/ELF.
69885c30ecadSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69895c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
69905c30ecadSmrg  ;;
69915eefee25Smacallan
69925c30ecadSmrgnetbsd*)
69935c30ecadSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
69945c30ecadSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
69955c30ecadSmrg  else
69965c30ecadSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
69975c30ecadSmrg  fi
69985c30ecadSmrg  ;;
69995eefee25Smacallan
70005c30ecadSmrgnewos6*)
70015c30ecadSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
70025c30ecadSmrg  lt_cv_file_magic_cmd=$FILECMD
70035c30ecadSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
70045c30ecadSmrg  ;;
70055eefee25Smacallan
70065c30ecadSmrg*nto* | *qnx*)
70075c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
70085c30ecadSmrg  ;;
70095eefee25Smacallan
70105c30ecadSmrgopenbsd* | bitrig*)
70115c30ecadSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
70125c30ecadSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
70135c30ecadSmrg  else
70145c30ecadSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
70155c30ecadSmrg  fi
70165c30ecadSmrg  ;;
70175eefee25Smacallan
70185c30ecadSmrgosf3* | osf4* | osf5*)
70195c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
70205c30ecadSmrg  ;;
70215eefee25Smacallan
70225c30ecadSmrgrdos*)
70235c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
70245c30ecadSmrg  ;;
70255eefee25Smacallan
70265c30ecadSmrgsolaris*)
70275c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
70285c30ecadSmrg  ;;
70295eefee25Smacallan
70305c30ecadSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
70315c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
70325c30ecadSmrg  ;;
70335eefee25Smacallan
70345c30ecadSmrgsysv4 | sysv4.3*)
70355c30ecadSmrg  case $host_vendor in
70365c30ecadSmrg  motorola)
70375c30ecadSmrg    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]]'
70385c30ecadSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
70395c30ecadSmrg    ;;
70405c30ecadSmrg  ncr)
70415c30ecadSmrg    lt_cv_deplibs_check_method=pass_all
70425c30ecadSmrg    ;;
70435c30ecadSmrg  sequent)
70445c30ecadSmrg    lt_cv_file_magic_cmd='/bin/file'
70455c30ecadSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
70465c30ecadSmrg    ;;
70475c30ecadSmrg  sni)
70485c30ecadSmrg    lt_cv_file_magic_cmd='/bin/file'
70495c30ecadSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
70505c30ecadSmrg    lt_cv_file_magic_test_file=/lib/libc.so
70515c30ecadSmrg    ;;
70525c30ecadSmrg  siemens)
70535c30ecadSmrg    lt_cv_deplibs_check_method=pass_all
70545c30ecadSmrg    ;;
70555c30ecadSmrg  pc)
70565c30ecadSmrg    lt_cv_deplibs_check_method=pass_all
70575c30ecadSmrg    ;;
70585c30ecadSmrg  esac
70595c30ecadSmrg  ;;
70605eefee25Smacallan
70615c30ecadSmrgtpf*)
70625c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
70635c30ecadSmrg  ;;
70645c30ecadSmrgos2*)
70655c30ecadSmrg  lt_cv_deplibs_check_method=pass_all
70665c30ecadSmrg  ;;
70675c30ecadSmrgesac
70685c30ecadSmrg])
70695c30ecadSmrg
70705c30ecadSmrgfile_magic_glob=
70715c30ecadSmrgwant_nocaseglob=no
70725c30ecadSmrgif test "$build" = "$host"; then
70735c30ecadSmrg  case $host_os in
70745c30ecadSmrg  mingw* | pw32*)
70755c30ecadSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
70765c30ecadSmrg      want_nocaseglob=yes
70775c30ecadSmrg    else
70785c30ecadSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
70795c30ecadSmrg    fi
70805c30ecadSmrg    ;;
70815c30ecadSmrg  esac
7082dc99b369Smrgfi
70835eefee25Smacallan
70845c30ecadSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
70855c30ecadSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
70865c30ecadSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
70875eefee25Smacallan
70885c30ecadSmrg_LT_DECL([], [deplibs_check_method], [1],
70895c30ecadSmrg    [Method to check whether dependent libraries are shared objects])
70905c30ecadSmrg_LT_DECL([], [file_magic_cmd], [1],
70915c30ecadSmrg    [Command to use when deplibs_check_method = "file_magic"])
70925c30ecadSmrg_LT_DECL([], [file_magic_glob], [1],
70935c30ecadSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
70945c30ecadSmrg_LT_DECL([], [want_nocaseglob], [1],
70955c30ecadSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
70965c30ecadSmrg])# _LT_CHECK_MAGIC_METHOD
7097dc99b369Smrg
7098dc99b369Smrg
70995c30ecadSmrg# LT_PATH_NM
71005c30ecadSmrg# ----------
71015c30ecadSmrg# find the pathname to a BSD- or MS-compatible name lister
71025c30ecadSmrgAC_DEFUN([LT_PATH_NM],
71035c30ecadSmrg[AC_REQUIRE([AC_PROG_CC])dnl
71045c30ecadSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
71055c30ecadSmrg[if test -n "$NM"; then
71065c30ecadSmrg  # Let the user override the test.
71075c30ecadSmrg  lt_cv_path_NM=$NM
71085c30ecadSmrgelse
71095c30ecadSmrg  lt_nm_to_check=${ac_tool_prefix}nm
71105c30ecadSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
71115c30ecadSmrg    lt_nm_to_check="$lt_nm_to_check nm"
71125c30ecadSmrg  fi
71135c30ecadSmrg  for lt_tmp_nm in $lt_nm_to_check; do
71145c30ecadSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
71155c30ecadSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
71165c30ecadSmrg      IFS=$lt_save_ifs
71175c30ecadSmrg      test -z "$ac_dir" && ac_dir=.
71185c30ecadSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
71195c30ecadSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
71205c30ecadSmrg	# Check to see if the nm accepts a BSD-compat flag.
71215c30ecadSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
71225c30ecadSmrg	#   nm: unknown option "B" ignored
71235c30ecadSmrg	# Tru64's nm complains that /dev/null is an invalid object file
71245c30ecadSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
71255c30ecadSmrg	case $build_os in
71265c30ecadSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
71275c30ecadSmrg	*) lt_bad_file=/dev/null ;;
71285c30ecadSmrg	esac
71295c30ecadSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
71305c30ecadSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
71315c30ecadSmrg	  lt_cv_path_NM="$tmp_nm -B"
71325c30ecadSmrg	  break 2
71335c30ecadSmrg	  ;;
71345c30ecadSmrg	*)
71355c30ecadSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
71365c30ecadSmrg	  */dev/null*)
71375c30ecadSmrg	    lt_cv_path_NM="$tmp_nm -p"
71385c30ecadSmrg	    break 2
71395c30ecadSmrg	    ;;
71405c30ecadSmrg	  *)
71415c30ecadSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
71425c30ecadSmrg	    continue # so that we can try to find one that supports BSD flags
71435c30ecadSmrg	    ;;
71445c30ecadSmrg	  esac
71455c30ecadSmrg	  ;;
71465c30ecadSmrg	esac
71475c30ecadSmrg      fi
71485c30ecadSmrg    done
71495c30ecadSmrg    IFS=$lt_save_ifs
71505c30ecadSmrg  done
71515c30ecadSmrg  : ${lt_cv_path_NM=no}
71525c30ecadSmrgfi])
71535c30ecadSmrgif test no != "$lt_cv_path_NM"; then
71545c30ecadSmrg  NM=$lt_cv_path_NM
71555c30ecadSmrgelse
71565c30ecadSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
71575c30ecadSmrg  if test -n "$DUMPBIN"; then :
71585c30ecadSmrg    # Let the user override the test.
71595c30ecadSmrg  else
71605c30ecadSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
71615c30ecadSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
71625c30ecadSmrg    *COFF*)
71635c30ecadSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
71645c30ecadSmrg      ;;
71655c30ecadSmrg    *)
71665c30ecadSmrg      DUMPBIN=:
71675eefee25Smacallan      ;;
71685eefee25Smacallan    esac
71695c30ecadSmrg  fi
71705c30ecadSmrg  AC_SUBST([DUMPBIN])
71715c30ecadSmrg  if test : != "$DUMPBIN"; then
71725c30ecadSmrg    NM=$DUMPBIN
71735c30ecadSmrg  fi
71745c30ecadSmrgfi
71755c30ecadSmrgtest -z "$NM" && NM=nm
71765c30ecadSmrgAC_SUBST([NM])
71775c30ecadSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
71785eefee25Smacallan
71795c30ecadSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
71805c30ecadSmrg  [lt_cv_nm_interface="BSD nm"
71815c30ecadSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
71825c30ecadSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
71835c30ecadSmrg  (eval "$ac_compile" 2>conftest.err)
71845c30ecadSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
71855c30ecadSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
71865c30ecadSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
71875c30ecadSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
71885c30ecadSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
71895c30ecadSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
71905c30ecadSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
71915c30ecadSmrg    lt_cv_nm_interface="MS dumpbin"
71925c30ecadSmrg  fi
71935c30ecadSmrg  rm -f conftest*])
71945c30ecadSmrg])# LT_PATH_NM
71955eefee25Smacallan
71965c30ecadSmrg# Old names:
71975c30ecadSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
71985c30ecadSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
71995c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
72005c30ecadSmrgdnl AC_DEFUN([AM_PROG_NM], [])
72015c30ecadSmrgdnl AC_DEFUN([AC_PROG_NM], [])
72025eefee25Smacallan
72035c30ecadSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
72045c30ecadSmrg# --------------------------------
72055c30ecadSmrg# how to determine the name of the shared library
72065c30ecadSmrg# associated with a specific link library.
72075c30ecadSmrg#  -- PORTME fill in with the dynamic library characteristics
72085c30ecadSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
72095c30ecadSmrg[m4_require([_LT_DECL_EGREP])
72105c30ecadSmrgm4_require([_LT_DECL_OBJDUMP])
72115c30ecadSmrgm4_require([_LT_DECL_DLLTOOL])
72125c30ecadSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
72135c30ecadSmrglt_cv_sharedlib_from_linklib_cmd,
72145c30ecadSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
72155c30ecadSmrg
72165c30ecadSmrgcase $host_os in
72175c30ecadSmrgcygwin* | mingw* | pw32* | cegcc*)
72185c30ecadSmrg  # two different shell functions defined in ltmain.sh;
72195c30ecadSmrg  # decide which one to use based on capabilities of $DLLTOOL
72205c30ecadSmrg  case `$DLLTOOL --help 2>&1` in
72215c30ecadSmrg  *--identify-strict*)
72225c30ecadSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
72235c30ecadSmrg    ;;
72245c30ecadSmrg  *)
72255c30ecadSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
7226dc99b369Smrg    ;;
7227dc99b369Smrg  esac
7228dc99b369Smrg  ;;
72295c30ecadSmrg*)
72305c30ecadSmrg  # fallback: assume linklib IS sharedlib
72315c30ecadSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
72325c30ecadSmrg  ;;
7233dc99b369Smrgesac
7234dc99b369Smrg])
72355c30ecadSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
72365c30ecadSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
72375eefee25Smacallan
72385c30ecadSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
72395c30ecadSmrg    [Command to associate shared and link libraries])
72405c30ecadSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7241dc99b369Smrg
7242dc99b369Smrg
72435c30ecadSmrg# _LT_PATH_MANIFEST_TOOL
72445c30ecadSmrg# ----------------------
72455c30ecadSmrg# locate the manifest tool
72465c30ecadSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
72475c30ecadSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
72485c30ecadSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
72495c30ecadSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
72505c30ecadSmrg  [lt_cv_path_mainfest_tool=no
72515c30ecadSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
72525c30ecadSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
72535c30ecadSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
72545c30ecadSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
72555c30ecadSmrg    lt_cv_path_mainfest_tool=yes
72565c30ecadSmrg  fi
72575c30ecadSmrg  rm -f conftest*])
72585c30ecadSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
72595c30ecadSmrg  MANIFEST_TOOL=:
7260dc99b369Smrgfi
72615c30ecadSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
72625c30ecadSmrg])# _LT_PATH_MANIFEST_TOOL
72635eefee25Smacallan
72645eefee25Smacallan
72655c30ecadSmrg# _LT_DLL_DEF_P([FILE])
72665c30ecadSmrg# ---------------------
72675c30ecadSmrg# True iff FILE is a Windows DLL '.def' file.
72685c30ecadSmrg# Keep in sync with func_dll_def_p in the libtool script
72695c30ecadSmrgAC_DEFUN([_LT_DLL_DEF_P],
72705c30ecadSmrg[dnl
72715c30ecadSmrg  test DEF = "`$SED -n dnl
72725c30ecadSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
72735c30ecadSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
72745c30ecadSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
72755c30ecadSmrg    -e q dnl                          Only consider the first "real" line
72765c30ecadSmrg    $1`" dnl
72775c30ecadSmrg])# _LT_DLL_DEF_P
72785c30ecadSmrg
72795c30ecadSmrg
72805c30ecadSmrg# LT_LIB_M
72815c30ecadSmrg# --------
72825c30ecadSmrg# check for math library
72835c30ecadSmrgAC_DEFUN([LT_LIB_M],
72845c30ecadSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
72855c30ecadSmrgLIBM=
72865c30ecadSmrgcase $host in
72875c30ecadSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
72885c30ecadSmrg  # These system don't have libm, or don't need it
72895c30ecadSmrg  ;;
72905c30ecadSmrg*-ncr-sysv4.3*)
72915c30ecadSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
72925c30ecadSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
72935c30ecadSmrg  ;;
72945c30ecadSmrg*)
72955c30ecadSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
72965c30ecadSmrg  ;;
72975c30ecadSmrgesac
72985c30ecadSmrgAC_SUBST([LIBM])
72995c30ecadSmrg])# LT_LIB_M
73005c30ecadSmrg
73015c30ecadSmrg# Old name:
73025c30ecadSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
73035c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
73045c30ecadSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
73055c30ecadSmrg
73065c30ecadSmrg
73075c30ecadSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
73085c30ecadSmrg# -------------------------------
73095c30ecadSmrgm4_defun([_LT_COMPILER_NO_RTTI],
73105c30ecadSmrg[m4_require([_LT_TAG_COMPILER])dnl
73115c30ecadSmrg
73125c30ecadSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
73135c30ecadSmrg
73145c30ecadSmrgif test yes = "$GCC"; then
73155c30ecadSmrg  case $cc_basename in
73165c30ecadSmrg  nvcc*)
73175c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
73185c30ecadSmrg  *)
73195c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
73205c30ecadSmrg  esac
73215c30ecadSmrg
73225c30ecadSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
73235c30ecadSmrg    lt_cv_prog_compiler_rtti_exceptions,
73245c30ecadSmrg    [-fno-rtti -fno-exceptions], [],
73255c30ecadSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
73265c30ecadSmrgfi
73275c30ecadSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
73285c30ecadSmrg	[Compiler flag to turn off builtin functions])
73295c30ecadSmrg])# _LT_COMPILER_NO_RTTI
73305c30ecadSmrg
73315eefee25Smacallan
73325c30ecadSmrg# _LT_CMD_GLOBAL_SYMBOLS
73335c30ecadSmrg# ----------------------
73345c30ecadSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
73355c30ecadSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
73365c30ecadSmrgAC_REQUIRE([AC_PROG_CC])dnl
73375c30ecadSmrgAC_REQUIRE([AC_PROG_AWK])dnl
73385c30ecadSmrgAC_REQUIRE([LT_PATH_NM])dnl
73395c30ecadSmrgAC_REQUIRE([LT_PATH_LD])dnl
73405c30ecadSmrgm4_require([_LT_DECL_SED])dnl
73415c30ecadSmrgm4_require([_LT_DECL_EGREP])dnl
73425c30ecadSmrgm4_require([_LT_TAG_COMPILER])dnl
7343dc99b369Smrg
73445c30ecadSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
73455c30ecadSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
73465c30ecadSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
73475c30ecadSmrg[
73485c30ecadSmrg# These are sane defaults that work on at least a few old systems.
73495c30ecadSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
73505eefee25Smacallan
73515c30ecadSmrg# Character class describing NM global symbol codes.
73525c30ecadSmrgsymcode='[[BCDEGRST]]'
73535eefee25Smacallan
73545c30ecadSmrg# Regexp to match symbols that can be accessed directly from C.
73555c30ecadSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7356dc99b369Smrg
73575c30ecadSmrg# Define system-specific variables.
73585c30ecadSmrgcase $host_os in
73595c30ecadSmrgaix*)
73605c30ecadSmrg  symcode='[[BCDT]]'
73615c30ecadSmrg  ;;
73625c30ecadSmrgcygwin* | mingw* | pw32* | cegcc*)
73635c30ecadSmrg  symcode='[[ABCDGISTW]]'
73645c30ecadSmrg  ;;
73655c30ecadSmrghpux*)
73665c30ecadSmrg  if test ia64 = "$host_cpu"; then
73675c30ecadSmrg    symcode='[[ABCDEGRST]]'
73685c30ecadSmrg  fi
73695c30ecadSmrg  ;;
73705c30ecadSmrgirix* | nonstopux*)
73715c30ecadSmrg  symcode='[[BCDEGRST]]'
73725c30ecadSmrg  ;;
73735c30ecadSmrgosf*)
73745c30ecadSmrg  symcode='[[BCDEGQRST]]'
73755c30ecadSmrg  ;;
73765c30ecadSmrgsolaris*)
73775c30ecadSmrg  symcode='[[BDRT]]'
73785c30ecadSmrg  ;;
73795c30ecadSmrgsco3.2v5*)
73805c30ecadSmrg  symcode='[[DT]]'
73815c30ecadSmrg  ;;
73825c30ecadSmrgsysv4.2uw2*)
73835c30ecadSmrg  symcode='[[DT]]'
73845c30ecadSmrg  ;;
73855c30ecadSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
73865c30ecadSmrg  symcode='[[ABDT]]'
73875c30ecadSmrg  ;;
73885c30ecadSmrgsysv4)
73895c30ecadSmrg  symcode='[[DFNSTU]]'
73905c30ecadSmrg  ;;
73915c30ecadSmrgesac
7392dc99b369Smrg
73935c30ecadSmrg# If we're using GNU nm, then use its standard symbol codes.
73945c30ecadSmrgcase `$NM -V 2>&1` in
73955c30ecadSmrg*GNU* | *'with BFD'*)
73965c30ecadSmrg  symcode='[[ABCDGIRSTW]]' ;;
73975c30ecadSmrgesac
73985eefee25Smacallan
73995c30ecadSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
74005c30ecadSmrg  # Gets list of data symbols to import.
74015c30ecadSmrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
74025c30ecadSmrg  # Adjust the below global symbol transforms to fixup imported variables.
74035c30ecadSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
74045c30ecadSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
74055c30ecadSmrg  lt_c_name_lib_hook="\
74065c30ecadSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
74075c30ecadSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
74085c30ecadSmrgelse
74095c30ecadSmrg  # Disable hooks by default.
74105c30ecadSmrg  lt_cv_sys_global_symbol_to_import=
74115c30ecadSmrg  lt_cdecl_hook=
74125c30ecadSmrg  lt_c_name_hook=
74135c30ecadSmrg  lt_c_name_lib_hook=
74145c30ecadSmrgfi
74155eefee25Smacallan
74165c30ecadSmrg# Transform an extracted symbol line into a proper C declaration.
74175c30ecadSmrg# Some systems (esp. on ia64) link data and code symbols differently,
74185c30ecadSmrg# so use this general approach.
74195c30ecadSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
74205c30ecadSmrg$lt_cdecl_hook\
74215c30ecadSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
74225c30ecadSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
7423dc99b369Smrg
74245c30ecadSmrg# Transform an extracted symbol line into symbol name and symbol address
74255c30ecadSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
74265c30ecadSmrg$lt_c_name_hook\
74275c30ecadSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
74285c30ecadSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
74295c30ecadSmrg
74305c30ecadSmrg# Transform an extracted symbol line into symbol name with lib prefix and
74315c30ecadSmrg# symbol address.
74325c30ecadSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
74335c30ecadSmrg$lt_c_name_lib_hook\
74345c30ecadSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
74355c30ecadSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
74365c30ecadSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
7437dc99b369Smrg
74385c30ecadSmrg# Handle CRLF in mingw tool chain
74395c30ecadSmrgopt_cr=
74405c30ecadSmrgcase $build_os in
74415c30ecadSmrgmingw*)
74425c30ecadSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
74435c30ecadSmrg  ;;
74445c30ecadSmrgesac
7445dc99b369Smrg
74465c30ecadSmrg# Try without a prefix underscore, then with it.
74475c30ecadSmrgfor ac_symprfx in "" "_"; do
7448dc99b369Smrg
74495c30ecadSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
74505c30ecadSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
7451dc99b369Smrg
74525c30ecadSmrg  # Write the raw and C identifiers.
74535c30ecadSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
74545c30ecadSmrg    # Fake it for dumpbin and say T for any non-static function,
74555c30ecadSmrg    # D for any global variable and I for any imported variable.
74565c30ecadSmrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
74575c30ecadSmrg    # which start with @ or ?.
74585c30ecadSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
74595c30ecadSmrg"     {last_section=section; section=\$ 3};"\
74605c30ecadSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
74615c30ecadSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
74625c30ecadSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
74635c30ecadSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
74645c30ecadSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
74655c30ecadSmrg"     \$ 0!~/External *\|/{next};"\
74665c30ecadSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
74675c30ecadSmrg"     {if(hide[section]) next};"\
74685c30ecadSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
74695c30ecadSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
74705c30ecadSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
74715c30ecadSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
74725c30ecadSmrg"     ' prfx=^$ac_symprfx]"
74735c30ecadSmrg  else
74745c30ecadSmrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
74755c30ecadSmrg  fi
74765c30ecadSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
74775eefee25Smacallan
74785c30ecadSmrg  # Check to see that the pipe works correctly.
74795c30ecadSmrg  pipe_works=no
74805eefee25Smacallan
74815c30ecadSmrg  rm -f conftest*
74825c30ecadSmrg  cat > conftest.$ac_ext <<_LT_EOF
74835c30ecadSmrg#ifdef __cplusplus
74845c30ecadSmrgextern "C" {
74855c30ecadSmrg#endif
74865c30ecadSmrgchar nm_test_var;
74875c30ecadSmrgvoid nm_test_func(void);
74885c30ecadSmrgvoid nm_test_func(void){}
74895c30ecadSmrg#ifdef __cplusplus
74905c30ecadSmrg}
74915c30ecadSmrg#endif
74925c30ecadSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
74935c30ecadSmrg_LT_EOF
74945eefee25Smacallan
74955c30ecadSmrg  if AC_TRY_EVAL(ac_compile); then
74965c30ecadSmrg    # Now try to grab the symbols.
74975c30ecadSmrg    nlist=conftest.nm
74985c30ecadSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
74995c30ecadSmrg      # Try sorting and uniquifying the output.
75005c30ecadSmrg      if sort "$nlist" | uniq > "$nlist"T; then
75015c30ecadSmrg	mv -f "$nlist"T "$nlist"
75025c30ecadSmrg      else
75035c30ecadSmrg	rm -f "$nlist"T
75045c30ecadSmrg      fi
7505dc99b369Smrg
75065c30ecadSmrg      # Make sure that we snagged all the symbols we need.
75075c30ecadSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
75085c30ecadSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
75095c30ecadSmrg	  cat <<_LT_EOF > conftest.$ac_ext
75105c30ecadSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
75115c30ecadSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
75125c30ecadSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
75135c30ecadSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
75145c30ecadSmrg# define LT@&t@_DLSYM_CONST
75155c30ecadSmrg#elif defined __osf__
75165c30ecadSmrg/* This system does not cope well with relocations in const data.  */
75175c30ecadSmrg# define LT@&t@_DLSYM_CONST
75185c30ecadSmrg#else
75195c30ecadSmrg# define LT@&t@_DLSYM_CONST const
75205c30ecadSmrg#endif
75215eefee25Smacallan
75225c30ecadSmrg#ifdef __cplusplus
75235c30ecadSmrgextern "C" {
75245c30ecadSmrg#endif
7525dc99b369Smrg
75265c30ecadSmrg_LT_EOF
75275c30ecadSmrg	  # Now generate the symbol file.
75285c30ecadSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
7529dc99b369Smrg
75305c30ecadSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
75315c30ecadSmrg
75325c30ecadSmrg/* The mapping between symbol names and symbols.  */
75335c30ecadSmrgLT@&t@_DLSYM_CONST struct {
75345c30ecadSmrg  const char *name;
75355c30ecadSmrg  void       *address;
75365c30ecadSmrg}
75375c30ecadSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
75385c30ecadSmrg{
75395c30ecadSmrg  { "@PROGRAM@", (void *) 0 },
75405c30ecadSmrg_LT_EOF
75415c30ecadSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
75425c30ecadSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
75435c30ecadSmrg  {0, (void *) 0}
75445c30ecadSmrg};
7545dc99b369Smrg
75465c30ecadSmrg/* This works around a problem in FreeBSD linker */
75475c30ecadSmrg#ifdef FREEBSD_WORKAROUND
75485c30ecadSmrgstatic const void *lt_preloaded_setup() {
75495c30ecadSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
75505c30ecadSmrg}
75515c30ecadSmrg#endif
75525eefee25Smacallan
75535c30ecadSmrg#ifdef __cplusplus
75545c30ecadSmrg}
75555c30ecadSmrg#endif
75565c30ecadSmrg_LT_EOF
75575c30ecadSmrg	  # Now try linking the two files.
75585c30ecadSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
75595c30ecadSmrg	  lt_globsym_save_LIBS=$LIBS
75605c30ecadSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
75615c30ecadSmrg	  LIBS=conftstm.$ac_objext
75625c30ecadSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
75635c30ecadSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
75645c30ecadSmrg	    pipe_works=yes
75655c30ecadSmrg	  fi
75665c30ecadSmrg	  LIBS=$lt_globsym_save_LIBS
75675c30ecadSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
75685c30ecadSmrg	else
75695c30ecadSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
75705c30ecadSmrg	fi
75715c30ecadSmrg      else
75725c30ecadSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
75735c30ecadSmrg      fi
75745c30ecadSmrg    else
75755c30ecadSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
75765c30ecadSmrg    fi
75775c30ecadSmrg  else
75785c30ecadSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
75795c30ecadSmrg    cat conftest.$ac_ext >&5
75805c30ecadSmrg  fi
75815c30ecadSmrg  rm -rf conftest* conftst*
75825eefee25Smacallan
75835c30ecadSmrg  # Do not use the global_symbol_pipe unless it works.
75845c30ecadSmrg  if test yes = "$pipe_works"; then
75855c30ecadSmrg    break
75865c30ecadSmrg  else
75875c30ecadSmrg    lt_cv_sys_global_symbol_pipe=
75885c30ecadSmrg  fi
75895c30ecadSmrgdone
75905c30ecadSmrg])
75915c30ecadSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
75925c30ecadSmrg  lt_cv_sys_global_symbol_to_cdecl=
75935c30ecadSmrgfi
75945c30ecadSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
75955c30ecadSmrg  AC_MSG_RESULT(failed)
75965c30ecadSmrgelse
75975c30ecadSmrg  AC_MSG_RESULT(ok)
75985c30ecadSmrgfi
75995eefee25Smacallan
76005c30ecadSmrg# Response file support.
76015c30ecadSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
76025c30ecadSmrg  nm_file_list_spec='@'
76035c30ecadSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
76045c30ecadSmrg  nm_file_list_spec='@'
76055c30ecadSmrgfi
76065eefee25Smacallan
76075c30ecadSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
76085c30ecadSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
76095c30ecadSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
76105c30ecadSmrg    [Transform the output of nm in a proper C declaration])
76115c30ecadSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
76125c30ecadSmrg    [Transform the output of nm into a list of symbols to manually relocate])
76135c30ecadSmrg_LT_DECL([global_symbol_to_c_name_address],
76145c30ecadSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
76155c30ecadSmrg    [Transform the output of nm in a C name address pair])
76165c30ecadSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
76175c30ecadSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
76185c30ecadSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
76195c30ecadSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
76205c30ecadSmrg    [The name lister interface])
76215c30ecadSmrg_LT_DECL([], [nm_file_list_spec], [1],
76225c30ecadSmrg    [Specify filename containing input files for $NM])
76235c30ecadSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
76245eefee25Smacallan
76255eefee25Smacallan
76265c30ecadSmrg# _LT_COMPILER_PIC([TAGNAME])
76275c30ecadSmrg# ---------------------------
76285c30ecadSmrgm4_defun([_LT_COMPILER_PIC],
76295c30ecadSmrg[m4_require([_LT_TAG_COMPILER])dnl
76305c30ecadSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
76315c30ecadSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
76325c30ecadSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
76335eefee25Smacallan
76345c30ecadSmrgm4_if([$1], [CXX], [
76355c30ecadSmrg  # C++ specific cases for pic, static, wl, etc.
76365c30ecadSmrg  if test yes = "$GXX"; then
76375c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
76385c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
76395eefee25Smacallan
7640dc99b369Smrg    case $host_os in
76415c30ecadSmrg    aix*)
76425c30ecadSmrg      # All AIX code is PIC.
76435c30ecadSmrg      if test ia64 = "$host_cpu"; then
76445c30ecadSmrg	# AIX 5 now supports IA64 processor
76455c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
76465c30ecadSmrg      fi
76475c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76485c30ecadSmrg      ;;
76495c30ecadSmrg
76505c30ecadSmrg    amigaos*)
76515c30ecadSmrg      case $host_cpu in
76525c30ecadSmrg      powerpc)
76535c30ecadSmrg            # see comment about AmigaOS4 .so support
76545c30ecadSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76555c30ecadSmrg        ;;
76565c30ecadSmrg      m68k)
76575c30ecadSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
76585c30ecadSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
76595c30ecadSmrg            # like '-m68040'.
76605c30ecadSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7661dc99b369Smrg        ;;
76625c30ecadSmrg      esac
76635c30ecadSmrg      ;;
76645c30ecadSmrg
76655c30ecadSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
76665c30ecadSmrg      # PIC is the default for these OSes.
76675c30ecadSmrg      ;;
76685c30ecadSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
76695c30ecadSmrg      # This hack is so that the source file can tell whether it is being
76705c30ecadSmrg      # built for inclusion in a dll (and should export symbols for example).
76715c30ecadSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
76725c30ecadSmrg      # (--disable-auto-import) libraries
76735c30ecadSmrg      m4_if([$1], [GCJ], [],
76745c30ecadSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
76755c30ecadSmrg      case $host_os in
76765c30ecadSmrg      os2*)
76775c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
76785c30ecadSmrg	;;
76795c30ecadSmrg      esac
76805c30ecadSmrg      ;;
76815c30ecadSmrg    darwin* | rhapsody*)
76825c30ecadSmrg      # PIC is the default on this platform
76835c30ecadSmrg      # Common symbols not allowed in MH_DYLIB files
76845c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
76855c30ecadSmrg      ;;
76865c30ecadSmrg    *djgpp*)
76875c30ecadSmrg      # DJGPP does not support shared libraries at all
76885c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
76895c30ecadSmrg      ;;
76905c30ecadSmrg    haiku*)
76915c30ecadSmrg      # PIC is the default for Haiku.
76925c30ecadSmrg      # The "-static" flag exists, but is broken.
76935c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
76945c30ecadSmrg      ;;
76955c30ecadSmrg    interix[[3-9]]*)
76965c30ecadSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
76975c30ecadSmrg      # Instead, we relocate shared libraries at runtime.
76985c30ecadSmrg      ;;
76995c30ecadSmrg    sysv4*MP*)
77005c30ecadSmrg      if test -d /usr/nec; then
77015c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
77025c30ecadSmrg      fi
77035c30ecadSmrg      ;;
77045c30ecadSmrg    hpux*)
77055c30ecadSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
77065c30ecadSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
77075c30ecadSmrg      # sets the default TLS model and affects inlining.
77085c30ecadSmrg      case $host_cpu in
77095c30ecadSmrg      hppa*64*)
77105c30ecadSmrg	;;
77115c30ecadSmrg      *)
77125c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
77135c30ecadSmrg	;;
77145c30ecadSmrg      esac
77155c30ecadSmrg      ;;
77165c30ecadSmrg    *qnx* | *nto*)
77175c30ecadSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
77185c30ecadSmrg      # it will coredump.
77195c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
77205c30ecadSmrg      ;;
77215c30ecadSmrg    *)
77225c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
77235c30ecadSmrg      ;;
77245c30ecadSmrg    esac
77255c30ecadSmrg  else
77265c30ecadSmrg    case $host_os in
7727dc99b369Smrg      aix[[4-9]]*)
77285c30ecadSmrg	# All AIX code is PIC.
77295c30ecadSmrg	if test ia64 = "$host_cpu"; then
77305c30ecadSmrg	  # AIX 5 now supports IA64 processor
77315c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
77325c30ecadSmrg	else
77335c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
7734dc99b369Smrg	fi
77355c30ecadSmrg	;;
77365c30ecadSmrg      chorus*)
77375c30ecadSmrg	case $cc_basename in
77385c30ecadSmrg	cxch68*)
77395c30ecadSmrg	  # Green Hills C++ Compiler
77405c30ecadSmrg	  # _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"
77415c30ecadSmrg	  ;;
77425c30ecadSmrg	esac
77435c30ecadSmrg	;;
77445c30ecadSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
77455c30ecadSmrg	# This hack is so that the source file can tell whether it is being
77465c30ecadSmrg	# built for inclusion in a dll (and should export symbols for example).
77475c30ecadSmrg	m4_if([$1], [GCJ], [],
77485c30ecadSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
77495c30ecadSmrg	;;
77505c30ecadSmrg      dgux*)
77515c30ecadSmrg	case $cc_basename in
77525c30ecadSmrg	  ec++*)
77535c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
77545c30ecadSmrg	    ;;
77555c30ecadSmrg	  ghcx*)
77565c30ecadSmrg	    # Green Hills C++ Compiler
77575c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
77585c30ecadSmrg	    ;;
77595c30ecadSmrg	  *)
77605c30ecadSmrg	    ;;
77615c30ecadSmrg	esac
77625c30ecadSmrg	;;
77635c30ecadSmrg      freebsd* | dragonfly* | midnightbsd*)
77645c30ecadSmrg	# FreeBSD uses GNU C++
77655c30ecadSmrg	;;
77665c30ecadSmrg      hpux9* | hpux10* | hpux11*)
77675c30ecadSmrg	case $cc_basename in
77685c30ecadSmrg	  CC*)
77695c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77705c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
77715c30ecadSmrg	    if test ia64 != "$host_cpu"; then
77725c30ecadSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
77735c30ecadSmrg	    fi
77745c30ecadSmrg	    ;;
77755c30ecadSmrg	  aCC*)
77765c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77775c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
77785c30ecadSmrg	    case $host_cpu in
77795c30ecadSmrg	    hppa*64*|ia64*)
77805c30ecadSmrg	      # +Z the default
77815c30ecadSmrg	      ;;
77825c30ecadSmrg	    *)
77835c30ecadSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
77845c30ecadSmrg	      ;;
77855c30ecadSmrg	    esac
77865c30ecadSmrg	    ;;
77875c30ecadSmrg	  *)
77885c30ecadSmrg	    ;;
77895c30ecadSmrg	esac
77905c30ecadSmrg	;;
77915c30ecadSmrg      interix*)
77925c30ecadSmrg	# This is c89, which is MS Visual C++ (no shared libs)
77935c30ecadSmrg	# Anyone wants to do a port?
77945c30ecadSmrg	;;
77955c30ecadSmrg      irix5* | irix6* | nonstopux*)
77965c30ecadSmrg	case $cc_basename in
77975c30ecadSmrg	  CC*)
77985c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77995c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
78005c30ecadSmrg	    # CC pic flag -KPIC is the default.
78015c30ecadSmrg	    ;;
78025c30ecadSmrg	  *)
78035c30ecadSmrg	    ;;
78045c30ecadSmrg	esac
78055c30ecadSmrg	;;
78065c30ecadSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
78075c30ecadSmrg	case $cc_basename in
78085c30ecadSmrg	  KCC*)
78095c30ecadSmrg	    # KAI C++ Compiler
78105c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
78115c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
78125c30ecadSmrg	    ;;
78135c30ecadSmrg	  ecpc* )
78145c30ecadSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
78155c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78165c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
78175c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
78185c30ecadSmrg	    ;;
78195c30ecadSmrg	  icpc* )
78205c30ecadSmrg	    # Intel C++, used to be incompatible with GCC.
78215c30ecadSmrg	    # ICC 10 doesn't accept -KPIC any more.
78225c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78235c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
78245c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
78255c30ecadSmrg	    ;;
78265c30ecadSmrg	  pgCC* | pgcpp*)
78275c30ecadSmrg	    # Portland Group C++ compiler
78285c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78295c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
78305c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78315c30ecadSmrg	    ;;
78325c30ecadSmrg	  cxx*)
78335c30ecadSmrg	    # Compaq C++
78345c30ecadSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
78355c30ecadSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
78365c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
78375c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
78385c30ecadSmrg	    ;;
78395c30ecadSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
78405c30ecadSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
78415c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78425c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
78435c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
78445c30ecadSmrg	    ;;
78455c30ecadSmrg	  *)
78465c30ecadSmrg	    case `$CC -V 2>&1 | $SED 5q` in
78475c30ecadSmrg	    *Sun\ C*)
78485c30ecadSmrg	      # Sun C++ 5.9
78495c30ecadSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
78505c30ecadSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78515c30ecadSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
78525c30ecadSmrg	      ;;
78535c30ecadSmrg	    esac
78545c30ecadSmrg	    ;;
78555c30ecadSmrg	esac
78565c30ecadSmrg	;;
78575c30ecadSmrg      lynxos*)
78585c30ecadSmrg	;;
78595c30ecadSmrg      m88k*)
78605c30ecadSmrg	;;
78615c30ecadSmrg      mvs*)
78625c30ecadSmrg	case $cc_basename in
78635c30ecadSmrg	  cxx*)
78645c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
78655c30ecadSmrg	    ;;
78665c30ecadSmrg	  *)
78675c30ecadSmrg	    ;;
78685c30ecadSmrg	esac
78695c30ecadSmrg	;;
78705c30ecadSmrg      netbsd*)
78715c30ecadSmrg	;;
78725c30ecadSmrg      *qnx* | *nto*)
78735c30ecadSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
78745c30ecadSmrg        # it will coredump.
78755c30ecadSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
7876dc99b369Smrg        ;;
78775c30ecadSmrg      osf3* | osf4* | osf5*)
78785c30ecadSmrg	case $cc_basename in
78795c30ecadSmrg	  KCC*)
78805c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
78815c30ecadSmrg	    ;;
78825c30ecadSmrg	  RCC*)
78835c30ecadSmrg	    # Rational C++ 2.4.1
78845c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
78855c30ecadSmrg	    ;;
78865c30ecadSmrg	  cxx*)
78875c30ecadSmrg	    # Digital/Compaq C++
78885c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78895c30ecadSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
78905c30ecadSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
78915c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
78925c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
78935c30ecadSmrg	    ;;
78945c30ecadSmrg	  *)
78955c30ecadSmrg	    ;;
78965c30ecadSmrg	esac
78975c30ecadSmrg	;;
78985c30ecadSmrg      psos*)
78995c30ecadSmrg	;;
79005c30ecadSmrg      solaris*)
79015c30ecadSmrg	case $cc_basename in
79025c30ecadSmrg	  CC* | sunCC*)
79035c30ecadSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
79045c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
79055c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
79065c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
79075c30ecadSmrg	    ;;
79085c30ecadSmrg	  gcx*)
79095c30ecadSmrg	    # Green Hills C++ Compiler
79105c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
79115c30ecadSmrg	    ;;
79125c30ecadSmrg	  *)
79135c30ecadSmrg	    ;;
79145c30ecadSmrg	esac
79155c30ecadSmrg	;;
79165c30ecadSmrg      sunos4*)
79175c30ecadSmrg	case $cc_basename in
79185c30ecadSmrg	  CC*)
79195c30ecadSmrg	    # Sun C++ 4.x
79205c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
79215c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
79225c30ecadSmrg	    ;;
79235c30ecadSmrg	  lcc*)
79245c30ecadSmrg	    # Lucid
79255c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
79265c30ecadSmrg	    ;;
79275c30ecadSmrg	  *)
79285c30ecadSmrg	    ;;
79295c30ecadSmrg	esac
79305c30ecadSmrg	;;
79315c30ecadSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
79325c30ecadSmrg	case $cc_basename in
79335c30ecadSmrg	  CC*)
79345c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
79355c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
79365c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
79375c30ecadSmrg	    ;;
79385c30ecadSmrg	esac
79395c30ecadSmrg	;;
79405c30ecadSmrg      tandem*)
79415c30ecadSmrg	case $cc_basename in
79425c30ecadSmrg	  NCC*)
79435c30ecadSmrg	    # NonStop-UX NCC 3.20
79445c30ecadSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
79455c30ecadSmrg	    ;;
79465c30ecadSmrg	  *)
79475c30ecadSmrg	    ;;
79485c30ecadSmrg	esac
79495c30ecadSmrg	;;
79505c30ecadSmrg      vxworks*)
79515c30ecadSmrg	;;
79525c30ecadSmrg      *)
79535c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
79545c30ecadSmrg	;;
7955dc99b369Smrg    esac
79565c30ecadSmrg  fi
79575c30ecadSmrg],
79585c30ecadSmrg[
79595c30ecadSmrg  if test yes = "$GCC"; then
79605c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
79615c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
79625eefee25Smacallan
79635c30ecadSmrg    case $host_os in
79645c30ecadSmrg      aix*)
79655c30ecadSmrg      # All AIX code is PIC.
79665c30ecadSmrg      if test ia64 = "$host_cpu"; then
79675c30ecadSmrg	# AIX 5 now supports IA64 processor
79685c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
79695c30ecadSmrg      fi
79705c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
79715c30ecadSmrg      ;;
79725eefee25Smacallan
79735c30ecadSmrg    amigaos*)
79745c30ecadSmrg      case $host_cpu in
79755c30ecadSmrg      powerpc)
79765c30ecadSmrg            # see comment about AmigaOS4 .so support
79775c30ecadSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
79785c30ecadSmrg        ;;
79795c30ecadSmrg      m68k)
79805c30ecadSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
79815c30ecadSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
79825c30ecadSmrg            # like '-m68040'.
79835c30ecadSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
79845c30ecadSmrg        ;;
79855c30ecadSmrg      esac
79865c30ecadSmrg      ;;
79875eefee25Smacallan
79885c30ecadSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
79895c30ecadSmrg      # PIC is the default for these OSes.
79905c30ecadSmrg      ;;
79915eefee25Smacallan
79925c30ecadSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
79935c30ecadSmrg      # This hack is so that the source file can tell whether it is being
79945c30ecadSmrg      # built for inclusion in a dll (and should export symbols for example).
79955c30ecadSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
79965c30ecadSmrg      # (--disable-auto-import) libraries
79975c30ecadSmrg      m4_if([$1], [GCJ], [],
79985c30ecadSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
79995c30ecadSmrg      case $host_os in
80005c30ecadSmrg      os2*)
80015c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
80025c30ecadSmrg	;;
80035c30ecadSmrg      esac
80045c30ecadSmrg      ;;
80055eefee25Smacallan
80065c30ecadSmrg    darwin* | rhapsody*)
80075c30ecadSmrg      # PIC is the default on this platform
80085c30ecadSmrg      # Common symbols not allowed in MH_DYLIB files
80095c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
80105c30ecadSmrg      ;;
80115eefee25Smacallan
80125c30ecadSmrg    haiku*)
80135c30ecadSmrg      # PIC is the default for Haiku.
80145c30ecadSmrg      # The "-static" flag exists, but is broken.
80155c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
80165c30ecadSmrg      ;;
80175eefee25Smacallan
80185c30ecadSmrg    hpux*)
80195c30ecadSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
80205c30ecadSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
80215c30ecadSmrg      # sets the default TLS model and affects inlining.
80225c30ecadSmrg      case $host_cpu in
80235c30ecadSmrg      hppa*64*)
80245c30ecadSmrg	# +Z the default
80255c30ecadSmrg	;;
80265c30ecadSmrg      *)
80275c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
80285c30ecadSmrg	;;
80295c30ecadSmrg      esac
80305c30ecadSmrg      ;;
80315eefee25Smacallan
80325c30ecadSmrg    interix[[3-9]]*)
80335c30ecadSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
80345c30ecadSmrg      # Instead, we relocate shared libraries at runtime.
80355c30ecadSmrg      ;;
80365eefee25Smacallan
80375c30ecadSmrg    msdosdjgpp*)
80385c30ecadSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
80395c30ecadSmrg      # on systems that don't support them.
80405c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
80415c30ecadSmrg      enable_shared=no
80425c30ecadSmrg      ;;
80435eefee25Smacallan
80445c30ecadSmrg    *nto* | *qnx*)
80455c30ecadSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
80465c30ecadSmrg      # it will coredump.
80475c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
80485c30ecadSmrg      ;;
80495eefee25Smacallan
80505c30ecadSmrg    sysv4*MP*)
80515c30ecadSmrg      if test -d /usr/nec; then
80525c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
80535c30ecadSmrg      fi
80545c30ecadSmrg      ;;
8055dc99b369Smrg
80565c30ecadSmrg    *)
80575c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
80585c30ecadSmrg      ;;
80595c30ecadSmrg    esac
8060dc99b369Smrg
80615c30ecadSmrg    case $cc_basename in
80625c30ecadSmrg    nvcc*) # Cuda Compiler Driver 2.2
80635c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
80645c30ecadSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
80655c30ecadSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
80665c30ecadSmrg      fi
80675c30ecadSmrg      ;;
80685c30ecadSmrg    esac
80695c30ecadSmrg  else
80705c30ecadSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
80715c30ecadSmrg    case $host_os in
80725c30ecadSmrg    aix*)
80735c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80745c30ecadSmrg      if test ia64 = "$host_cpu"; then
80755c30ecadSmrg	# AIX 5 now supports IA64 processor
80765c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
80775c30ecadSmrg      else
80785c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
80795c30ecadSmrg      fi
80805c30ecadSmrg      ;;
8081dc99b369Smrg
80825c30ecadSmrg    darwin* | rhapsody*)
80835c30ecadSmrg      # PIC is the default on this platform
80845c30ecadSmrg      # Common symbols not allowed in MH_DYLIB files
80855c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
80865c30ecadSmrg      case $cc_basename in
80875c30ecadSmrg      nagfor*)
80885c30ecadSmrg        # NAG Fortran compiler
80895c30ecadSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
80905c30ecadSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
80915c30ecadSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
80925c30ecadSmrg        ;;
80935c30ecadSmrg      esac
80945c30ecadSmrg      ;;
80955eefee25Smacallan
80965c30ecadSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
80975c30ecadSmrg      # This hack is so that the source file can tell whether it is being
80985c30ecadSmrg      # built for inclusion in a dll (and should export symbols for example).
80995c30ecadSmrg      m4_if([$1], [GCJ], [],
81005c30ecadSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
81015c30ecadSmrg      case $host_os in
81025c30ecadSmrg      os2*)
81035c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
81045c30ecadSmrg	;;
81055c30ecadSmrg      esac
81065c30ecadSmrg      ;;
81075eefee25Smacallan
81085c30ecadSmrg    hpux9* | hpux10* | hpux11*)
81095c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81105c30ecadSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
81115c30ecadSmrg      # not for PA HP-UX.
81125c30ecadSmrg      case $host_cpu in
81135c30ecadSmrg      hppa*64*|ia64*)
81145c30ecadSmrg	# +Z the default
81155c30ecadSmrg	;;
81165c30ecadSmrg      *)
81175c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
81185c30ecadSmrg	;;
81195c30ecadSmrg      esac
81205c30ecadSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
81215c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
81225c30ecadSmrg      ;;
81235eefee25Smacallan
81245c30ecadSmrg    irix5* | irix6* | nonstopux*)
81255c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81265c30ecadSmrg      # PIC (with -KPIC) is the default.
81275c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
81285c30ecadSmrg      ;;
81295eefee25Smacallan
81305c30ecadSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
81315c30ecadSmrg      case $cc_basename in
81325c30ecadSmrg      # old Intel for x86_64, which still supported -KPIC.
81335c30ecadSmrg      ecc*)
81345c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81355c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81365c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
81375c30ecadSmrg        ;;
81385c30ecadSmrg      # icc used to be incompatible with GCC.
81395c30ecadSmrg      # ICC 10 doesn't accept -KPIC any more.
81405c30ecadSmrg      icc* | ifort*)
81415c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81425c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
81435c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
81445c30ecadSmrg        ;;
81455c30ecadSmrg      # Lahey Fortran 8.1.
81465c30ecadSmrg      lf95*)
81475c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81485c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
81495c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
81505c30ecadSmrg	;;
81515c30ecadSmrg      nagfor*)
81525c30ecadSmrg	# NAG Fortran compiler
81535c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
81545c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
81555c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81565c30ecadSmrg	;;
81575c30ecadSmrg      tcc*)
81585c30ecadSmrg	# Fabrice Bellard et al's Tiny C Compiler
81595c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81605c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
81615c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
81625c30ecadSmrg	;;
81635c30ecadSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
81645c30ecadSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
81655c30ecadSmrg	# which looks to be a dead project)
81665c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81675c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
81685c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81695c30ecadSmrg        ;;
81705c30ecadSmrg      ccc*)
81715c30ecadSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81725c30ecadSmrg        # All Alpha code is PIC.
81735c30ecadSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
81745c30ecadSmrg        ;;
81755c30ecadSmrg      xl* | bgxl* | bgf* | mpixl*)
81765c30ecadSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
81775c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81785c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
81795c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
81805c30ecadSmrg	;;
81815c30ecadSmrg      *)
81825c30ecadSmrg	case `$CC -V 2>&1 | $SED 5q` in
81835c30ecadSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
81845c30ecadSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
81855c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81865c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81875c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
81885c30ecadSmrg	  ;;
81895c30ecadSmrg	*Sun\ F* | *Sun*Fortran*)
81905c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81915c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81925c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
81935c30ecadSmrg	  ;;
81945c30ecadSmrg	*Sun\ C*)
81955c30ecadSmrg	  # Sun C 5.9
81965c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81975c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81985c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81995c30ecadSmrg	  ;;
82005c30ecadSmrg        *Intel*\ [[CF]]*Compiler*)
82015c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82025c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
82035c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
82045c30ecadSmrg	  ;;
82055c30ecadSmrg	*Portland\ Group*)
82065c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82075c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
82085c30ecadSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82095c30ecadSmrg	  ;;
82105c30ecadSmrg	esac
82115c30ecadSmrg	;;
82125c30ecadSmrg      esac
82135c30ecadSmrg      ;;
82145eefee25Smacallan
82155c30ecadSmrg    newsos6)
82165c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
82175c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82185c30ecadSmrg      ;;
82195eefee25Smacallan
82205c30ecadSmrg    *nto* | *qnx*)
82215c30ecadSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
82225c30ecadSmrg      # it will coredump.
82235c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
82245c30ecadSmrg      ;;
8225dc99b369Smrg
82265c30ecadSmrg    osf3* | osf4* | osf5*)
82275c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82285c30ecadSmrg      # All OSF/1 code is PIC.
82295c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
82305c30ecadSmrg      ;;
82315eefee25Smacallan
82325c30ecadSmrg    rdos*)
82335c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
82345c30ecadSmrg      ;;
8235dc99b369Smrg
82365c30ecadSmrg    solaris*)
82375c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
82385c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82395c30ecadSmrg      case $cc_basename in
82405c30ecadSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
82415c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
82425c30ecadSmrg      *)
82435c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
82445c30ecadSmrg      esac
82455c30ecadSmrg      ;;
8246dc99b369Smrg
82475c30ecadSmrg    sunos4*)
82485c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
82495c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
82505c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82515c30ecadSmrg      ;;
82525eefee25Smacallan
82535c30ecadSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
82545c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82555c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
82565c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82575c30ecadSmrg      ;;
825862ab96baSmrg
82595c30ecadSmrg    sysv4*MP*)
82605c30ecadSmrg      if test -d /usr/nec; then
82615c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
82625c30ecadSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82635c30ecadSmrg      fi
82645c30ecadSmrg      ;;
826562ab96baSmrg
82665c30ecadSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
82675c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82685c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
82695c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82705c30ecadSmrg      ;;
827162ab96baSmrg
82725c30ecadSmrg    unicos*)
82735c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82745c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
82755c30ecadSmrg      ;;
827662ab96baSmrg
82775c30ecadSmrg    uts4*)
82785c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
82795c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82805c30ecadSmrg      ;;
8281dc99b369Smrg
82825c30ecadSmrg    *)
82835c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
82845c30ecadSmrg      ;;
82855c30ecadSmrg    esac
82865eefee25Smacallan  fi
82875eefee25Smacallan])
82885c30ecadSmrgcase $host_os in
82895c30ecadSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
82905c30ecadSmrg  *djgpp*)
82915c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
82925c30ecadSmrg    ;;
82935c30ecadSmrg  *)
82945c30ecadSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
82955c30ecadSmrg    ;;
82965c30ecadSmrgesac
8297dc99b369Smrg
82985c30ecadSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
82995c30ecadSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
83005c30ecadSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
83015c30ecadSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
8302dc99b369Smrg
83035c30ecadSmrg#
83045c30ecadSmrg# Check to make sure the PIC flag actually works.
83055c30ecadSmrg#
83065c30ecadSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
83075c30ecadSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
83085c30ecadSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
83095c30ecadSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
83105c30ecadSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
83115c30ecadSmrg     "" | " "*) ;;
83125c30ecadSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
83135c30ecadSmrg     esac],
83145c30ecadSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
83155c30ecadSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
8316dc99b369Smrgfi
83175c30ecadSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
83185c30ecadSmrg	[Additional compiler flags for building library objects])
8319dc99b369Smrg
83205c30ecadSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
83215c30ecadSmrg	[How to pass a linker flag through the compiler])
83225c30ecadSmrg#
83235c30ecadSmrg# Check to make sure the static flag actually works.
83245c30ecadSmrg#
83255c30ecadSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
83265c30ecadSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
83275c30ecadSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
83285c30ecadSmrg  $lt_tmp_static_flag,
83295c30ecadSmrg  [],
83305c30ecadSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
83315c30ecadSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
83325c30ecadSmrg	[Compiler flag to prevent dynamic linking])
83335c30ecadSmrg])# _LT_COMPILER_PIC
8334dc99b369Smrg
8335dc99b369Smrg
83365c30ecadSmrg# _LT_LINKER_SHLIBS([TAGNAME])
83375c30ecadSmrg# ----------------------------
83385c30ecadSmrg# See if the linker supports building shared libraries.
83395c30ecadSmrgm4_defun([_LT_LINKER_SHLIBS],
83405c30ecadSmrg[AC_REQUIRE([LT_PATH_LD])dnl
83415c30ecadSmrgAC_REQUIRE([LT_PATH_NM])dnl
83425c30ecadSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
83435c30ecadSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
83445c30ecadSmrgm4_require([_LT_DECL_EGREP])dnl
83455c30ecadSmrgm4_require([_LT_DECL_SED])dnl
83465c30ecadSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
83475c30ecadSmrgm4_require([_LT_TAG_COMPILER])dnl
83485c30ecadSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
83495c30ecadSmrgm4_if([$1], [CXX], [
83505c30ecadSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
83515c30ecadSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
83525c30ecadSmrg  case $host_os in
83535c30ecadSmrg  aix[[4-9]]*)
83545c30ecadSmrg    # If we're using GNU nm, then we don't want the "-C" option.
83555c30ecadSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
83565c30ecadSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
83575c30ecadSmrg    # weak defined symbols like other global defined symbols, whereas
83585c30ecadSmrg    # GNU nm marks them as "W".
83595c30ecadSmrg    # While the 'weak' keyword is ignored in the Export File, we need
83605c30ecadSmrg    # it in the Import File for the 'aix-soname' feature, so we have
83615c30ecadSmrg    # to replace the "-B" option with "-P" for AIX nm.
83625c30ecadSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
83635c30ecadSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
83645c30ecadSmrg    else
83655c30ecadSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
83665c30ecadSmrg    fi
83675c30ecadSmrg    ;;
83685c30ecadSmrg  pw32*)
83695c30ecadSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
83705c30ecadSmrg    ;;
83715c30ecadSmrg  cygwin* | mingw* | cegcc*)
83725c30ecadSmrg    case $cc_basename in
83735c30ecadSmrg    cl* | icl*)
83745c30ecadSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
83755c30ecadSmrg      ;;
83765c30ecadSmrg    *)
83775c30ecadSmrg      _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'
83785c30ecadSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
83795c30ecadSmrg      ;;
8380dc99b369Smrg    esac
83815c30ecadSmrg    ;;
83825c30ecadSmrg  *)
83835c30ecadSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
83845c30ecadSmrg    ;;
83855c30ecadSmrg  esac
83865c30ecadSmrg], [
83875c30ecadSmrg  runpath_var=
83885c30ecadSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
83895c30ecadSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
83905c30ecadSmrg  _LT_TAGVAR(archive_cmds, $1)=
83915c30ecadSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
83925c30ecadSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
83935c30ecadSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
83945c30ecadSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
83955c30ecadSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
83965c30ecadSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
83975c30ecadSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
83985c30ecadSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
83995c30ecadSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
84005c30ecadSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
84015c30ecadSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
84025c30ecadSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
84035c30ecadSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
84045c30ecadSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
84055c30ecadSmrg  _LT_TAGVAR(module_cmds, $1)=
84065c30ecadSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
84075c30ecadSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
84085c30ecadSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
84095c30ecadSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
84105c30ecadSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
84115c30ecadSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
84125c30ecadSmrg  # included in the symbol list
84135c30ecadSmrg  _LT_TAGVAR(include_expsyms, $1)=
84145c30ecadSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
84155c30ecadSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
84165c30ecadSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
84175c30ecadSmrg  # as well as any symbol that contains 'd'.
84185c30ecadSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
84195c30ecadSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
84205c30ecadSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
84215c30ecadSmrg  # the symbol is explicitly referenced.  Since portable code cannot
84225c30ecadSmrg  # rely on this symbol name, it's probably fine to never include it in
84235c30ecadSmrg  # preloaded symbol tables.
84245c30ecadSmrg  # Exclude shared library initialization/finalization symbols.
84255c30ecadSmrgdnl Note also adjust exclude_expsyms for C++ above.
84265c30ecadSmrg  extract_expsyms_cmds=
8427dc99b369Smrg
84285c30ecadSmrg  case $host_os in
84295c30ecadSmrg  cygwin* | mingw* | pw32* | cegcc*)
84305c30ecadSmrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
84315c30ecadSmrg    # When not using gcc, we currently assume that we are using
84325c30ecadSmrg    # Microsoft Visual C++ or Intel C++ Compiler.
84335c30ecadSmrg    if test yes != "$GCC"; then
84345c30ecadSmrg      with_gnu_ld=no
84355c30ecadSmrg    fi
84365c30ecadSmrg    ;;
84375c30ecadSmrg  interix*)
84385c30ecadSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
84395c30ecadSmrg    with_gnu_ld=yes
84405c30ecadSmrg    ;;
84415c30ecadSmrg  openbsd* | bitrig*)
84425c30ecadSmrg    with_gnu_ld=no
84435c30ecadSmrg    ;;
84445c30ecadSmrg  esac
8445dc99b369Smrg
84465c30ecadSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
8447dc99b369Smrg
84485c30ecadSmrg  # On some targets, GNU ld is compatible enough with the native linker
84495c30ecadSmrg  # that we're better off using the native interface for both.
84505c30ecadSmrg  lt_use_gnu_ld_interface=no
84515c30ecadSmrg  if test yes = "$with_gnu_ld"; then
84525c30ecadSmrg    case $host_os in
84535c30ecadSmrg      aix*)
84545c30ecadSmrg	# The AIX port of GNU ld has always aspired to compatibility
84555c30ecadSmrg	# with the native linker.  However, as the warning in the GNU ld
84565c30ecadSmrg	# block says, versions before 2.19.5* couldn't really create working
84575c30ecadSmrg	# shared libraries, regardless of the interface used.
84585c30ecadSmrg	case `$LD -v 2>&1` in
84595c30ecadSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
84605c30ecadSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
84615c30ecadSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
84625c30ecadSmrg	  *)
84635c30ecadSmrg	    lt_use_gnu_ld_interface=yes
84645c30ecadSmrg	    ;;
84655c30ecadSmrg	esac
84665c30ecadSmrg	;;
84675c30ecadSmrg      *)
84685c30ecadSmrg	lt_use_gnu_ld_interface=yes
84695c30ecadSmrg	;;
84705c30ecadSmrg    esac
84715c30ecadSmrg  fi
8472dc99b369Smrg
84735c30ecadSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
84745c30ecadSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
84755c30ecadSmrg    wlarc='$wl'
8476dc99b369Smrg
84775c30ecadSmrg    # Set some defaults for GNU ld with shared library support. These
84785c30ecadSmrg    # are reset later if shared libraries are not supported. Putting them
84795c30ecadSmrg    # here allows them to be overridden if necessary.
84805c30ecadSmrg    runpath_var=LD_RUN_PATH
84815c30ecadSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
84825c30ecadSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
84835c30ecadSmrg    # ancient GNU ld didn't support --whole-archive et. al.
84845c30ecadSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
84855c30ecadSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
84865c30ecadSmrg    else
84875c30ecadSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
84885c30ecadSmrg    fi
84895c30ecadSmrg    supports_anon_versioning=no
84905c30ecadSmrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
84915c30ecadSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
84925c30ecadSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
84935c30ecadSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
84945c30ecadSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
84955c30ecadSmrg      *\ 2.11.*) ;; # other 2.11 versions
84965c30ecadSmrg      *) supports_anon_versioning=yes ;;
84975c30ecadSmrg    esac
8498dc99b369Smrg
84995c30ecadSmrg    # See if GNU ld supports shared libraries.
85005c30ecadSmrg    case $host_os in
85015c30ecadSmrg    aix[[3-9]]*)
85025c30ecadSmrg      # On AIX/PPC, the GNU linker is very broken
85035c30ecadSmrg      if test ia64 != "$host_cpu"; then
85045c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
85055c30ecadSmrg	cat <<_LT_EOF 1>&2
8506dc99b369Smrg
85075c30ecadSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
85085c30ecadSmrg*** to be unable to reliably create shared libraries on AIX.
85095c30ecadSmrg*** Therefore, libtool is disabling shared libraries support.  If you
85105c30ecadSmrg*** really care for shared libraries, you may want to install binutils
85115c30ecadSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
85125c30ecadSmrg*** You will then need to restart the configuration process.
8513dc99b369Smrg
85145c30ecadSmrg_LT_EOF
85155c30ecadSmrg      fi
85165c30ecadSmrg      ;;
8517dc99b369Smrg
85185c30ecadSmrg    amigaos*)
85195c30ecadSmrg      case $host_cpu in
85205c30ecadSmrg      powerpc)
85215c30ecadSmrg            # see comment about AmigaOS4 .so support
85225c30ecadSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85235c30ecadSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
8524dc99b369Smrg        ;;
85255c30ecadSmrg      m68k)
85265c30ecadSmrg            _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)'
85275c30ecadSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
85285c30ecadSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
8529dc99b369Smrg        ;;
85305c30ecadSmrg      esac
85315c30ecadSmrg      ;;
8532dc99b369Smrg
85335c30ecadSmrg    beos*)
85345c30ecadSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
85355c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
85365c30ecadSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
85375c30ecadSmrg	# support --undefined.  This deserves some investigation.  FIXME
85385c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85395c30ecadSmrg      else
85405c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
85415c30ecadSmrg      fi
85425c30ecadSmrg      ;;
8543dc99b369Smrg
85445c30ecadSmrg    cygwin* | mingw* | pw32* | cegcc*)
85455c30ecadSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
85465c30ecadSmrg      # as there is no search path for DLLs.
85475c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
85485c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
85495c30ecadSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
85505c30ecadSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
85515c30ecadSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
85525c30ecadSmrg      _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'
85535c30ecadSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8554dc99b369Smrg
85555c30ecadSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
85565c30ecadSmrg        _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'
85575c30ecadSmrg	# If the export-symbols file already is a .def file, use it as
85585c30ecadSmrg	# is; otherwise, prepend EXPORTS...
85595c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
85605c30ecadSmrg          cp $export_symbols $output_objdir/$soname.def;
85615c30ecadSmrg        else
85625c30ecadSmrg          echo EXPORTS > $output_objdir/$soname.def;
85635c30ecadSmrg          cat $export_symbols >> $output_objdir/$soname.def;
85645c30ecadSmrg        fi~
85655c30ecadSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
85665c30ecadSmrg      else
85675c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
85685c30ecadSmrg      fi
85695c30ecadSmrg      ;;
8570dc99b369Smrg
85715c30ecadSmrg    haiku*)
85725c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85735c30ecadSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
85745c30ecadSmrg      ;;
8575dc99b369Smrg
85765c30ecadSmrg    os2*)
85775c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
85785c30ecadSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
85795c30ecadSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
85805c30ecadSmrg      shrext_cmds=.dll
85815c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
85825c30ecadSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
85835c30ecadSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
85845c30ecadSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
85855c30ecadSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
85865c30ecadSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85875c30ecadSmrg	emximp -o $lib $output_objdir/$libname.def'
85885c30ecadSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
85895c30ecadSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
85905c30ecadSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
85915c30ecadSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
85925c30ecadSmrg	prefix_cmds="$SED"~
85935c30ecadSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
85945c30ecadSmrg	  prefix_cmds="$prefix_cmds -e 1d";
85955c30ecadSmrg	fi~
85965c30ecadSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
85975c30ecadSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
85985c30ecadSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85995c30ecadSmrg	emximp -o $lib $output_objdir/$libname.def'
86005c30ecadSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
86015c30ecadSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
86025c30ecadSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
86035c30ecadSmrg      ;;
8604dc99b369Smrg
86055c30ecadSmrg    interix[[3-9]]*)
86065c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
86075c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
86085c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
86095c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
86105c30ecadSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
86115c30ecadSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
86125c30ecadSmrg      # default) and relocated if they conflict, which is a slow very memory
86135c30ecadSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
86145c30ecadSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
86155c30ecadSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
86165c30ecadSmrg      _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'
86175c30ecadSmrg      _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'
86185c30ecadSmrg      ;;
8619dc99b369Smrg
86205c30ecadSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
86215c30ecadSmrg      tmp_diet=no
86225c30ecadSmrg      if test linux-dietlibc = "$host_os"; then
86235c30ecadSmrg	case $cc_basename in
86245c30ecadSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
86255c30ecadSmrg	esac
86265c30ecadSmrg      fi
86275c30ecadSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
86285c30ecadSmrg	 && test no = "$tmp_diet"
86295c30ecadSmrg      then
86305c30ecadSmrg	tmp_addflag=' $pic_flag'
86315c30ecadSmrg	tmp_sharedflag='-shared'
86325c30ecadSmrg	case $cc_basename,$host_cpu in
86335c30ecadSmrg        pgcc*)				# Portland Group C compiler
86345c30ecadSmrg	  _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'
86355c30ecadSmrg	  tmp_addflag=' $pic_flag'
86365c30ecadSmrg	  ;;
86375c30ecadSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
86385c30ecadSmrg					# Portland Group f77 and f90 compilers
86395c30ecadSmrg	  _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'
86405c30ecadSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
86415c30ecadSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
86425c30ecadSmrg	  tmp_addflag=' -i_dynamic' ;;
86435c30ecadSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
86445c30ecadSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
86455c30ecadSmrg	ifc* | ifort*)			# Intel Fortran compiler
86465c30ecadSmrg	  tmp_addflag=' -nofor_main' ;;
86475c30ecadSmrg	lf95*)				# Lahey Fortran 8.1
86485c30ecadSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
86495c30ecadSmrg	  tmp_sharedflag='--shared' ;;
86505c30ecadSmrg        nagfor*)                        # NAGFOR 5.3
86515c30ecadSmrg          tmp_sharedflag='-Wl,-shared' ;;
86525c30ecadSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
86535c30ecadSmrg	  tmp_sharedflag='-qmkshrobj'
86545c30ecadSmrg	  tmp_addflag= ;;
86555c30ecadSmrg	nvcc*)	# Cuda Compiler Driver 2.2
86565c30ecadSmrg	  _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'
86575c30ecadSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
86585c30ecadSmrg	  ;;
86595c30ecadSmrg	esac
86605c30ecadSmrg	case `$CC -V 2>&1 | $SED 5q` in
86615c30ecadSmrg	*Sun\ C*)			# Sun C 5.9
86625c30ecadSmrg	  _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'
86635c30ecadSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
86645c30ecadSmrg	  tmp_sharedflag='-G' ;;
86655c30ecadSmrg	*Sun\ F*)			# Sun Fortran 8.3
86665c30ecadSmrg	  tmp_sharedflag='-G' ;;
86675c30ecadSmrg	esac
86685c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
8669dc99b369Smrg
86705c30ecadSmrg        if test yes = "$supports_anon_versioning"; then
86715c30ecadSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
86725c30ecadSmrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
86735c30ecadSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
86745c30ecadSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
86755c30ecadSmrg        fi
8676dc99b369Smrg
86775c30ecadSmrg	case $cc_basename in
86785c30ecadSmrg	tcc*)
86795c30ecadSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
86805c30ecadSmrg	  ;;
86815c30ecadSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
86825c30ecadSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
86835c30ecadSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
86845c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
86855c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
86865c30ecadSmrg	  if test yes = "$supports_anon_versioning"; then
86875c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
86885c30ecadSmrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
86895c30ecadSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
86905c30ecadSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
86915c30ecadSmrg	  fi
86925c30ecadSmrg	  ;;
86935c30ecadSmrg	esac
86945c30ecadSmrg      else
86955c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
86965c30ecadSmrg      fi
86975c30ecadSmrg      ;;
8698dc99b369Smrg
86995c30ecadSmrg    netbsd*)
87005c30ecadSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
87015c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
87025c30ecadSmrg	wlarc=
87035c30ecadSmrg      else
87045c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
87055c30ecadSmrg	_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'
87065c30ecadSmrg      fi
87075c30ecadSmrg      ;;
8708dc99b369Smrg
87095c30ecadSmrg    solaris*)
87105c30ecadSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
87115c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
87125c30ecadSmrg	cat <<_LT_EOF 1>&2
8713dc99b369Smrg
87145c30ecadSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
87155c30ecadSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
87165c30ecadSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
87175c30ecadSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
87185c30ecadSmrg*** your PATH or compiler configuration so that the native linker is
87195c30ecadSmrg*** used, and then restart.
8720dc99b369Smrg
87215c30ecadSmrg_LT_EOF
87225c30ecadSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
87235c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
87245c30ecadSmrg	_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'
87255c30ecadSmrg      else
87265c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
87275c30ecadSmrg      fi
87285c30ecadSmrg      ;;
8729dc99b369Smrg
87305c30ecadSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
87315c30ecadSmrg      case `$LD -v 2>&1` in
87325c30ecadSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
87335c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
87345c30ecadSmrg	cat <<_LT_EOF 1>&2
8735dc99b369Smrg
87365c30ecadSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
87375c30ecadSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
87385c30ecadSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
87395c30ecadSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
87405c30ecadSmrg*** your PATH or compiler configuration so that the native linker is
87415c30ecadSmrg*** used, and then restart.
8742dc99b369Smrg
87435c30ecadSmrg_LT_EOF
87445c30ecadSmrg	;;
87455c30ecadSmrg	*)
87465c30ecadSmrg	  # For security reasons, it is highly recommended that you always
87475c30ecadSmrg	  # use absolute paths for naming shared libraries, and exclude the
87485c30ecadSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
87495c30ecadSmrg	  # requires that you compile everything twice, which is a pain.
87505c30ecadSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
87515c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
87525c30ecadSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
87535c30ecadSmrg	    _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'
87545c30ecadSmrg	  else
87555c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
87565c30ecadSmrg	  fi
87575c30ecadSmrg	;;
87585c30ecadSmrg      esac
87595c30ecadSmrg      ;;
8760dc99b369Smrg
87615c30ecadSmrg    sunos4*)
87625c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
87635c30ecadSmrg      wlarc=
87645c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
87655c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
87665c30ecadSmrg      ;;
8767dc99b369Smrg
87685c30ecadSmrg    *)
87695c30ecadSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
87705c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
87715c30ecadSmrg	_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'
87725c30ecadSmrg      else
87735c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
87745c30ecadSmrg      fi
87755c30ecadSmrg      ;;
87765c30ecadSmrg    esac
8777dc99b369Smrg
87785c30ecadSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
87795c30ecadSmrg      runpath_var=
87805c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
87815c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
87825c30ecadSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
87835c30ecadSmrg    fi
87845c30ecadSmrg  else
87855c30ecadSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
87865c30ecadSmrg    case $host_os in
87875c30ecadSmrg    aix3*)
87885c30ecadSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
87895c30ecadSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
87905c30ecadSmrg      _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'
87915c30ecadSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
87925c30ecadSmrg      # are no directories specified by -L.
87935c30ecadSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
87945c30ecadSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
87955c30ecadSmrg	# Neither direct hardcoding nor static linking is supported with a
87965c30ecadSmrg	# broken collect2.
87975c30ecadSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
87985c30ecadSmrg      fi
87995c30ecadSmrg      ;;
8800dc99b369Smrg
88015c30ecadSmrg    aix[[4-9]]*)
88025c30ecadSmrg      if test ia64 = "$host_cpu"; then
88035c30ecadSmrg	# On IA64, the linker does run time linking by default, so we don't
88045c30ecadSmrg	# have to do anything special.
88055c30ecadSmrg	aix_use_runtimelinking=no
88065c30ecadSmrg	exp_sym_flag='-Bexport'
88075c30ecadSmrg	no_entry_flag=
88085c30ecadSmrg      else
88095c30ecadSmrg	# If we're using GNU nm, then we don't want the "-C" option.
88105c30ecadSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
88115c30ecadSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
88125c30ecadSmrg	# weak defined symbols like other global defined symbols, whereas
88135c30ecadSmrg	# GNU nm marks them as "W".
88145c30ecadSmrg	# While the 'weak' keyword is ignored in the Export File, we need
88155c30ecadSmrg	# it in the Import File for the 'aix-soname' feature, so we have
88165c30ecadSmrg	# to replace the "-B" option with "-P" for AIX nm.
88175c30ecadSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
88185c30ecadSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols'
88195c30ecadSmrg	else
88205c30ecadSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "L") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols'
88215c30ecadSmrg	fi
88225c30ecadSmrg	aix_use_runtimelinking=no
8823dc99b369Smrg
88245c30ecadSmrg	# Test if we are trying to use run time linking or normal
88255c30ecadSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
88265c30ecadSmrg	# have runtime linking enabled, and use it for executables.
88275c30ecadSmrg	# For shared libraries, we enable/disable runtime linking
88285c30ecadSmrg	# depending on the kind of the shared library created -
88295c30ecadSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
88305c30ecadSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
88315c30ecadSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
88325c30ecadSmrg	#            lib.a           static archive
88335c30ecadSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
88345c30ecadSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
88355c30ecadSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
88365c30ecadSmrg	#            lib.a(lib.so.V) shared, rtl:no
88375c30ecadSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
88385c30ecadSmrg	#            lib.a           static archive
88395c30ecadSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
88405c30ecadSmrg	  for ld_flag in $LDFLAGS; do
88415c30ecadSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
88425c30ecadSmrg	    aix_use_runtimelinking=yes
88435c30ecadSmrg	    break
88445c30ecadSmrg	  fi
88455c30ecadSmrg	  done
88465c30ecadSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
88475c30ecadSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
88485c30ecadSmrg	    # so we don't have lib.a shared libs to link our executables.
88495c30ecadSmrg	    # We have to force runtime linking in this case.
88505c30ecadSmrg	    aix_use_runtimelinking=yes
88515c30ecadSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
88525c30ecadSmrg	  fi
88535c30ecadSmrg	  ;;
88545c30ecadSmrg	esac
8855dc99b369Smrg
88565c30ecadSmrg	exp_sym_flag='-bexport'
88575c30ecadSmrg	no_entry_flag='-bnoentry'
88585c30ecadSmrg      fi
8859dc99b369Smrg
88605c30ecadSmrg      # When large executables or shared objects are built, AIX ld can
88615c30ecadSmrg      # have problems creating the table of contents.  If linking a library
88625c30ecadSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
88635c30ecadSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
88645c30ecadSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
8865dc99b369Smrg
88665c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)=''
88675c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
88685c30ecadSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
88695c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
88705c30ecadSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
88715c30ecadSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
88725c30ecadSmrg      case $with_aix_soname,$aix_use_runtimelinking in
88735c30ecadSmrg      aix,*) ;; # traditional, no import file
88745c30ecadSmrg      svr4,* | *,yes) # use import file
88755c30ecadSmrg	# The Import File defines what to hardcode.
88765c30ecadSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
88775c30ecadSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
88785c30ecadSmrg	;;
88795c30ecadSmrg      esac
8880dc99b369Smrg
88815c30ecadSmrg      if test yes = "$GCC"; then
88825c30ecadSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
88835c30ecadSmrg	# We only want to do this on AIX 4.2 and lower, the check
88845c30ecadSmrg	# below for broken collect2 doesn't work under 4.3+
88855c30ecadSmrg	  collect2name=`$CC -print-prog-name=collect2`
88865c30ecadSmrg	  if test -f "$collect2name" &&
88875c30ecadSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
88885c30ecadSmrg	  then
88895c30ecadSmrg	  # We have reworked collect2
88905c30ecadSmrg	  :
88915c30ecadSmrg	  else
88925c30ecadSmrg	  # We have old collect2
88935c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
88945c30ecadSmrg	  # It fails to find uninstalled libraries when the uninstalled
88955c30ecadSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
88965c30ecadSmrg	  # to unsupported forces relinking
88975c30ecadSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
88985c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
88995c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
89005c30ecadSmrg	  fi
89015c30ecadSmrg	  ;;
89025c30ecadSmrg	esac
89035c30ecadSmrg	shared_flag='-shared'
89045c30ecadSmrg	if test yes = "$aix_use_runtimelinking"; then
89055c30ecadSmrg	  shared_flag="$shared_flag "'$wl-G'
89065c30ecadSmrg	fi
89075c30ecadSmrg	# Need to ensure runtime linking is disabled for the traditional
89085c30ecadSmrg	# shared library, or the linker may eventually find shared libraries
89095c30ecadSmrg	# /with/ Import File - we do not want to mix them.
89105c30ecadSmrg	shared_flag_aix='-shared'
89115c30ecadSmrg	shared_flag_svr4='-shared $wl-G'
89125c30ecadSmrg      else
89135c30ecadSmrg	# not using gcc
89145c30ecadSmrg	if test ia64 = "$host_cpu"; then
89155c30ecadSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
89165c30ecadSmrg	# chokes on -Wl,-G. The following line is correct:
89175c30ecadSmrg	  shared_flag='-G'
89185c30ecadSmrg	else
89195c30ecadSmrg	  if test yes = "$aix_use_runtimelinking"; then
89205c30ecadSmrg	    shared_flag='$wl-G'
89215c30ecadSmrg	  else
89225c30ecadSmrg	    shared_flag='$wl-bM:SRE'
89235c30ecadSmrg	  fi
89245c30ecadSmrg	  shared_flag_aix='$wl-bM:SRE'
89255c30ecadSmrg	  shared_flag_svr4='$wl-G'
89265c30ecadSmrg	fi
89275c30ecadSmrg      fi
8928dc99b369Smrg
89295c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
89305c30ecadSmrg      # It seems that -bexpall does not export symbols beginning with
89315c30ecadSmrg      # underscore (_), so it is better to generate a list of symbols to export.
89325c30ecadSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
89335c30ecadSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
89345c30ecadSmrg	# Warning - without using the other runtime loading flags (-brtl),
89355c30ecadSmrg	# -berok will link without error, but may produce a broken library.
89365c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
89375c30ecadSmrg        # Determine the default libpath from the value encoded in an
89385c30ecadSmrg        # empty executable.
89395c30ecadSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
89405c30ecadSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
89415c30ecadSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
89425c30ecadSmrg      else
89435c30ecadSmrg	if test ia64 = "$host_cpu"; then
89445c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
89455c30ecadSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
89465c30ecadSmrg	  _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"
89475c30ecadSmrg	else
89485c30ecadSmrg	 # Determine the default libpath from the value encoded in an
89495c30ecadSmrg	 # empty executable.
89505c30ecadSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
89515c30ecadSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
89525c30ecadSmrg	  # Warning - without using the other run time loading flags,
89535c30ecadSmrg	  # -berok will link without error, but may produce a broken library.
89545c30ecadSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
89555c30ecadSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
89565c30ecadSmrg	  if test yes = "$with_gnu_ld"; then
89575c30ecadSmrg	    # We only use this code for GNU lds that support --whole-archive.
89585c30ecadSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
89595c30ecadSmrg	  else
89605c30ecadSmrg	    # Exported symbols can be pulled into shared objects from archives
89615c30ecadSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
89625c30ecadSmrg	  fi
89635c30ecadSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
89645c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
89655c30ecadSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
89665c30ecadSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
89675c30ecadSmrg	  if test svr4 != "$with_aix_soname"; then
89685c30ecadSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
89695c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
89705c30ecadSmrg	  fi
89715c30ecadSmrg	  if test aix != "$with_aix_soname"; then
89725c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
89735c30ecadSmrg	  else
89745c30ecadSmrg	    # used by -dlpreopen to get the symbols
89755c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
89765c30ecadSmrg	  fi
89775c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
89785c30ecadSmrg	fi
89795c30ecadSmrg      fi
89805c30ecadSmrg      ;;
8981dc99b369Smrg
89825c30ecadSmrg    amigaos*)
89835c30ecadSmrg      case $host_cpu in
89845c30ecadSmrg      powerpc)
89855c30ecadSmrg            # see comment about AmigaOS4 .so support
89865c30ecadSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
89875c30ecadSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
89885c30ecadSmrg        ;;
89895c30ecadSmrg      m68k)
89905c30ecadSmrg            _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)'
89915c30ecadSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
89925c30ecadSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
89935c30ecadSmrg        ;;
89945c30ecadSmrg      esac
89955c30ecadSmrg      ;;
8996dc99b369Smrg
89975c30ecadSmrg    bsdi[[45]]*)
89985c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
89995c30ecadSmrg      ;;
9000dc99b369Smrg
90015c30ecadSmrg    cygwin* | mingw* | pw32* | cegcc*)
90025c30ecadSmrg      # When not using gcc, we currently assume that we are using
90035c30ecadSmrg      # Microsoft Visual C++ or Intel C++ Compiler.
90045c30ecadSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
90055c30ecadSmrg      # no search path for DLLs.
90065c30ecadSmrg      case $cc_basename in
90075c30ecadSmrg      cl* | icl*)
90085c30ecadSmrg	# Native MSVC or ICC
90095c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
90105c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
90115c30ecadSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
90125c30ecadSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
90135c30ecadSmrg	# Tell ltmain to make .lib files, not .a files.
90145c30ecadSmrg	libext=lib
90155c30ecadSmrg	# Tell ltmain to make .dll files, not .so files.
90165c30ecadSmrg	shrext_cmds=.dll
90175c30ecadSmrg	# FIXME: Setting linknames here is a bad hack.
90185c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
90195c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
90205c30ecadSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
90215c30ecadSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
90225c30ecadSmrg          else
90235c30ecadSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
90245c30ecadSmrg          fi~
90255c30ecadSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
90265c30ecadSmrg          linknames='
90275c30ecadSmrg	# The linker will not automatically build a static lib if we build a DLL.
90285c30ecadSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
90295c30ecadSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
90305c30ecadSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
90315c30ecadSmrg	_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'
90325c30ecadSmrg	# Don't use ranlib
90335c30ecadSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
90345c30ecadSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
90355c30ecadSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
90365c30ecadSmrg          case $lt_outputfile in
90375c30ecadSmrg            *.exe|*.EXE) ;;
90385c30ecadSmrg            *)
90395c30ecadSmrg              lt_outputfile=$lt_outputfile.exe
90405c30ecadSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
90415c30ecadSmrg              ;;
90425c30ecadSmrg          esac~
90435c30ecadSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
90445c30ecadSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
90455c30ecadSmrg            $RM "$lt_outputfile.manifest";
90465c30ecadSmrg          fi'
90475c30ecadSmrg	;;
90485c30ecadSmrg      *)
90495c30ecadSmrg	# Assume MSVC and ICC wrapper
90505c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
90515c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
90525c30ecadSmrg	# Tell ltmain to make .lib files, not .a files.
90535c30ecadSmrg	libext=lib
90545c30ecadSmrg	# Tell ltmain to make .dll files, not .so files.
90555c30ecadSmrg	shrext_cmds=.dll
90565c30ecadSmrg	# FIXME: Setting linknames here is a bad hack.
90575c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
90585c30ecadSmrg	# The linker will automatically build a .lib file if we build a DLL.
90595c30ecadSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
90605c30ecadSmrg	# FIXME: Should let the user specify the lib program.
90615c30ecadSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
90625c30ecadSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
90635c30ecadSmrg	;;
90645c30ecadSmrg      esac
90655c30ecadSmrg      ;;
9066dc99b369Smrg
90675c30ecadSmrg    darwin* | rhapsody*)
90685c30ecadSmrg      _LT_DARWIN_LINKER_FEATURES($1)
90695c30ecadSmrg      ;;
9070dc99b369Smrg
90715c30ecadSmrg    dgux*)
90725c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
90735c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
90745c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90755c30ecadSmrg      ;;
9076dc99b369Smrg
90775c30ecadSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
90785c30ecadSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
90795c30ecadSmrg    # does not break anything, and helps significantly (at the cost of a little
90805c30ecadSmrg    # extra space).
90815c30ecadSmrg    freebsd2.2*)
90825c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
90835c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
90845c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
90855c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
9086dc99b369Smrg      ;;
9087dc99b369Smrg
90885c30ecadSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
90895c30ecadSmrg    freebsd2.*)
90905c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
90915c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
90925c30ecadSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
90935c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90945c30ecadSmrg      ;;
9095dc99b369Smrg
90965c30ecadSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
90975c30ecadSmrg    freebsd* | dragonfly* | midnightbsd*)
90985c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
90995c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
91005c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
91015c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
91025c30ecadSmrg      ;;
9103dc99b369Smrg
91045c30ecadSmrg    hpux9*)
91055c30ecadSmrg      if test yes = "$GCC"; then
91065c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
91075c30ecadSmrg      else
91085c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
91095c30ecadSmrg      fi
91105c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
91115c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
91125c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
9113dc99b369Smrg
91145c30ecadSmrg      # hardcode_minus_L: Not really in the search PATH,
91155c30ecadSmrg      # but as the default location of the library.
91165c30ecadSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
91175c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
91185c30ecadSmrg      ;;
9119dc99b369Smrg
91205c30ecadSmrg    hpux10*)
91215c30ecadSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
91225c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
91235c30ecadSmrg      else
91245c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
91255c30ecadSmrg      fi
91265c30ecadSmrg      if test no = "$with_gnu_ld"; then
91275c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
91285c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
91295c30ecadSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
91305c30ecadSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
91315c30ecadSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
91325c30ecadSmrg	# hardcode_minus_L: Not really in the search PATH,
91335c30ecadSmrg	# but as the default location of the library.
91345c30ecadSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
91355c30ecadSmrg      fi
91365c30ecadSmrg      ;;
9137dc99b369Smrg
91385c30ecadSmrg    hpux11*)
91395c30ecadSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
91405c30ecadSmrg	case $host_cpu in
91415c30ecadSmrg	hppa*64*)
91425c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
91435c30ecadSmrg	  ;;
91445c30ecadSmrg	ia64*)
91455c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
91465c30ecadSmrg	  ;;
91475c30ecadSmrg	*)
91485c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
91495c30ecadSmrg	  ;;
91505c30ecadSmrg	esac
91515c30ecadSmrg      else
91525c30ecadSmrg	case $host_cpu in
91535c30ecadSmrg	hppa*64*)
91545c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
91555c30ecadSmrg	  ;;
91565c30ecadSmrg	ia64*)
91575c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
91585c30ecadSmrg	  ;;
91595c30ecadSmrg	*)
91605c30ecadSmrg	m4_if($1, [], [
91615c30ecadSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
91625c30ecadSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
91635c30ecadSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
91645c30ecadSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
91655c30ecadSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
91665c30ecadSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
91675c30ecadSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
91685c30ecadSmrg	  ;;
91695c30ecadSmrg	esac
91705c30ecadSmrg      fi
91715c30ecadSmrg      if test no = "$with_gnu_ld"; then
91725c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
91735c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9174dc99b369Smrg
91755c30ecadSmrg	case $host_cpu in
91765c30ecadSmrg	hppa*64*|ia64*)
91775c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
91785c30ecadSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
91795c30ecadSmrg	  ;;
91805c30ecadSmrg	*)
91815c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
91825c30ecadSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
91835c30ecadSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9184dc99b369Smrg
91855c30ecadSmrg	  # hardcode_minus_L: Not really in the search PATH,
91865c30ecadSmrg	  # but as the default location of the library.
91875c30ecadSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
91885c30ecadSmrg	  ;;
91895c30ecadSmrg	esac
91905c30ecadSmrg      fi
91915c30ecadSmrg      ;;
9192dc99b369Smrg
91935c30ecadSmrg    irix5* | irix6* | nonstopux*)
91945c30ecadSmrg      if test yes = "$GCC"; then
91955c30ecadSmrg	_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'
91965c30ecadSmrg	# Try to use the -exported_symbol ld option, if it does not
91975c30ecadSmrg	# work, assume that -exports_file does not work either and
91985c30ecadSmrg	# implicitly export all symbols.
91995c30ecadSmrg	# This should be the same for all languages, so no per-tag cache variable.
92005c30ecadSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
92015c30ecadSmrg	  [lt_cv_irix_exported_symbol],
92025c30ecadSmrg	  [save_LDFLAGS=$LDFLAGS
92035c30ecadSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
92045c30ecadSmrg	   AC_LINK_IFELSE(
92055c30ecadSmrg	     [AC_LANG_SOURCE(
92065c30ecadSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
92075c30ecadSmrg			      [C++], [[int foo (void) { return 0; }]],
92085c30ecadSmrg			      [Fortran 77], [[
92095c30ecadSmrg      subroutine foo
92105c30ecadSmrg      end]],
92115c30ecadSmrg			      [Fortran], [[
92125c30ecadSmrg      subroutine foo
92135c30ecadSmrg      end]])])],
92145c30ecadSmrg	      [lt_cv_irix_exported_symbol=yes],
92155c30ecadSmrg	      [lt_cv_irix_exported_symbol=no])
92165c30ecadSmrg           LDFLAGS=$save_LDFLAGS])
92175c30ecadSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
92185c30ecadSmrg          _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'
9219dc99b369Smrg	fi
92205c30ecadSmrg      else
92215c30ecadSmrg	_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'
92225c30ecadSmrg	_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'
92235c30ecadSmrg      fi
92245c30ecadSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
92255c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
92265c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
92275c30ecadSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
92285c30ecadSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
9229dc99b369Smrg      ;;
9230dc99b369Smrg
92315c30ecadSmrg    linux*)
92325c30ecadSmrg      case $cc_basename in
92335c30ecadSmrg      tcc*)
92345c30ecadSmrg	# Fabrice Bellard et al's Tiny C Compiler
92355c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
92365c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
92375c30ecadSmrg	;;
92385c30ecadSmrg      esac
92395c30ecadSmrg      ;;
9240dc99b369Smrg
92415c30ecadSmrg    netbsd*)
92425c30ecadSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
92435c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
92445c30ecadSmrg      else
92455c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
92465c30ecadSmrg      fi
92475c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
92485c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
92495c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
92505c30ecadSmrg      ;;
9251dc99b369Smrg
92525c30ecadSmrg    newsos6)
92535c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
92545c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
92555c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
92565c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
92575c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
92585c30ecadSmrg      ;;
9259dc99b369Smrg
92605c30ecadSmrg    *nto* | *qnx*)
92615c30ecadSmrg      ;;
9262dc99b369Smrg
92635c30ecadSmrg    openbsd* | bitrig*)
92645c30ecadSmrg      if test -f /usr/libexec/ld.so; then
92655c30ecadSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
92665c30ecadSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
92675c30ecadSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
92685c30ecadSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
92695c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
92705c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
92715c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
92725c30ecadSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
92735c30ecadSmrg	else
92745c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
92755c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
92765c30ecadSmrg	fi
92775c30ecadSmrg      else
92785c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
92795c30ecadSmrg      fi
92805c30ecadSmrg      ;;
9281dc99b369Smrg
92825c30ecadSmrg    os2*)
92835c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
92845c30ecadSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
92855c30ecadSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
92865c30ecadSmrg      shrext_cmds=.dll
92875c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
92885c30ecadSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
92895c30ecadSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
92905c30ecadSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
92915c30ecadSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
92925c30ecadSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
92935c30ecadSmrg	emximp -o $lib $output_objdir/$libname.def'
92945c30ecadSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
92955c30ecadSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
92965c30ecadSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
92975c30ecadSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
92985c30ecadSmrg	prefix_cmds="$SED"~
92995c30ecadSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
93005c30ecadSmrg	  prefix_cmds="$prefix_cmds -e 1d";
93015c30ecadSmrg	fi~
93025c30ecadSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
93035c30ecadSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
93045c30ecadSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
93055c30ecadSmrg	emximp -o $lib $output_objdir/$libname.def'
93065c30ecadSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
93075c30ecadSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
93085c30ecadSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
93095c30ecadSmrg      ;;
9310dc99b369Smrg
93115c30ecadSmrg    osf3*)
93125c30ecadSmrg      if test yes = "$GCC"; then
93135c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
93145c30ecadSmrg	_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'
93155c30ecadSmrg      else
93165c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
93175c30ecadSmrg	_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'
93185c30ecadSmrg      fi
93195c30ecadSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
93205c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
93215c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
93225c30ecadSmrg      ;;
9323dc99b369Smrg
93245c30ecadSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
93255c30ecadSmrg      if test yes = "$GCC"; then
93265c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
93275c30ecadSmrg	_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'
93285c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
93295c30ecadSmrg      else
93305c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
93315c30ecadSmrg	_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'
93325c30ecadSmrg	_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~
93335c30ecadSmrg          $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'
9334dc99b369Smrg
93355c30ecadSmrg	# Both c and cxx compiler support -rpath directly
93365c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
93375c30ecadSmrg      fi
93385c30ecadSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
93395c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
93405c30ecadSmrg      ;;
93415c30ecadSmrg
93425c30ecadSmrg    solaris*)
93435c30ecadSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
93445c30ecadSmrg      if test yes = "$GCC"; then
93455c30ecadSmrg	wlarc='$wl'
93465c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
93475c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
93485c30ecadSmrg          $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'
93495c30ecadSmrg      else
93505c30ecadSmrg	case `$CC -V 2>&1` in
93515c30ecadSmrg	*"Compilers 5.0"*)
93525c30ecadSmrg	  wlarc=''
93535c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
93545c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
93555c30ecadSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
93565c30ecadSmrg	  ;;
93575c30ecadSmrg	*)
93585c30ecadSmrg	  wlarc='$wl'
93595c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
93605c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
93615c30ecadSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
93625c30ecadSmrg	  ;;
93635c30ecadSmrg	esac
93645c30ecadSmrg      fi
93655c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
93665c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93675c30ecadSmrg      case $host_os in
93685c30ecadSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
93695c30ecadSmrg      *)
93705c30ecadSmrg	# The compiler driver will combine and reorder linker options,
93715c30ecadSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
93725c30ecadSmrg	# but is careful enough not to reorder.
93735c30ecadSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
93745c30ecadSmrg	if test yes = "$GCC"; then
93755c30ecadSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
93765c30ecadSmrg	else
93775c30ecadSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
9378dc99b369Smrg	fi
93795c30ecadSmrg	;;
93805c30ecadSmrg      esac
93815c30ecadSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
9382dc99b369Smrg      ;;
9383dc99b369Smrg
93845c30ecadSmrg    sunos4*)
93855c30ecadSmrg      if test sequent = "$host_vendor"; then
93865c30ecadSmrg	# Use $CC to link under sequent, because it throws in some extra .o
93875c30ecadSmrg	# files that make .init and .fini sections work.
93885c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
93895c30ecadSmrg      else
93905c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
93915c30ecadSmrg      fi
93925c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
93935c30ecadSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
93945c30ecadSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
93955c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93965c30ecadSmrg      ;;
9397dc99b369Smrg
93985c30ecadSmrg    sysv4)
93995c30ecadSmrg      case $host_vendor in
94005c30ecadSmrg	sni)
94015c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
94025c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
94035c30ecadSmrg	;;
94045c30ecadSmrg	siemens)
94055c30ecadSmrg	  ## LD is ld it makes a PLAMLIB
94065c30ecadSmrg	  ## CC just makes a GrossModule.
94075c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
94085c30ecadSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
94095c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
94105c30ecadSmrg        ;;
94115c30ecadSmrg	motorola)
94125c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
94135c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
94145c30ecadSmrg	;;
94155c30ecadSmrg      esac
94165c30ecadSmrg      runpath_var='LD_RUN_PATH'
94175c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94185c30ecadSmrg      ;;
9419dc99b369Smrg
94205c30ecadSmrg    sysv4.3*)
94215c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
94225c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94235c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
94245c30ecadSmrg      ;;
9425dc99b369Smrg
94265c30ecadSmrg    sysv4*MP*)
94275c30ecadSmrg      if test -d /usr/nec; then
94285c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
94295c30ecadSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94305c30ecadSmrg	runpath_var=LD_RUN_PATH
94315c30ecadSmrg	hardcode_runpath_var=yes
94325c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
94335c30ecadSmrg      fi
94345c30ecadSmrg      ;;
9435dc99b369Smrg
94365c30ecadSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
94375c30ecadSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
94385c30ecadSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
94395c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94405c30ecadSmrg      runpath_var='LD_RUN_PATH'
9441dc99b369Smrg
94425c30ecadSmrg      if test yes = "$GCC"; then
94435c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94445c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94455c30ecadSmrg      else
94465c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94475c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94485c30ecadSmrg      fi
94495c30ecadSmrg      ;;
9450dc99b369Smrg
94515c30ecadSmrg    sysv5* | sco3.2v5* | sco5v6*)
94525c30ecadSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
94535c30ecadSmrg      # link with -lc, and that would cause any symbols used from libc to
94545c30ecadSmrg      # always be unresolved, which means just about no library would
94555c30ecadSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
94565c30ecadSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
94575c30ecadSmrg      # as -z defs.
94585c30ecadSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
94595c30ecadSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
94605c30ecadSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
94615c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94625c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
94635c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
94645c30ecadSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
94655c30ecadSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
94665c30ecadSmrg      runpath_var='LD_RUN_PATH'
9467dc99b369Smrg
94685c30ecadSmrg      if test yes = "$GCC"; then
94695c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94705c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94715c30ecadSmrg      else
94725c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94735c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94745c30ecadSmrg      fi
94755c30ecadSmrg      ;;
9476dc99b369Smrg
94775c30ecadSmrg    uts4*)
94785c30ecadSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
94795c30ecadSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
94805c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94815c30ecadSmrg      ;;
9482dc99b369Smrg
94835c30ecadSmrg    *)
94845c30ecadSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
94855c30ecadSmrg      ;;
94865c30ecadSmrg    esac
9487dc99b369Smrg
94885c30ecadSmrg    if test sni = "$host_vendor"; then
94895c30ecadSmrg      case $host in
94905c30ecadSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
94915c30ecadSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
94925c30ecadSmrg	;;
94935c30ecadSmrg      esac
94945c30ecadSmrg    fi
94955c30ecadSmrg  fi
9496dc99b369Smrg])
94975c30ecadSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
94985c30ecadSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
9499dc99b369Smrg
95005c30ecadSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
9501dc99b369Smrg
95025c30ecadSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
95035c30ecadSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
95045c30ecadSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
95055c30ecadSmrg    [The commands to extract the exported symbol list from a shared archive])
9506dc99b369Smrg
9507dc99b369Smrg#
95085c30ecadSmrg# Do we need to explicitly link libc?
9509dc99b369Smrg#
95105c30ecadSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
95115c30ecadSmrgx|xyes)
95125c30ecadSmrg  # Assume -lc should be added
95135c30ecadSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
9514dc99b369Smrg
95155c30ecadSmrg  if test yes,yes = "$GCC,$enable_shared"; then
95165c30ecadSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
95175c30ecadSmrg    *'~'*)
95185c30ecadSmrg      # FIXME: we may have to deal with multi-command sequences.
95195c30ecadSmrg      ;;
95205c30ecadSmrg    '$CC '*)
95215c30ecadSmrg      # Test whether the compiler implicitly links with -lc since on some
95225c30ecadSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
95235c30ecadSmrg      # to ld, don't add -lc before -lgcc.
95245c30ecadSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
95255c30ecadSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
95265c30ecadSmrg	[$RM conftest*
95275c30ecadSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
9528dc99b369Smrg
95295c30ecadSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
95305c30ecadSmrg	  soname=conftest
95315c30ecadSmrg	  lib=conftest
95325c30ecadSmrg	  libobjs=conftest.$ac_objext
95335c30ecadSmrg	  deplibs=
95345c30ecadSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
95355c30ecadSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
95365c30ecadSmrg	  compiler_flags=-v
95375c30ecadSmrg	  linker_flags=-v
95385c30ecadSmrg	  verstring=
95395c30ecadSmrg	  output_objdir=.
95405c30ecadSmrg	  libname=conftest
95415c30ecadSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
95425c30ecadSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
95435c30ecadSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
95445c30ecadSmrg	  then
95455c30ecadSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
95465c30ecadSmrg	  else
95475c30ecadSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
95485c30ecadSmrg	  fi
95495c30ecadSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
95505c30ecadSmrg	else
95515c30ecadSmrg	  cat conftest.err 1>&5
95525c30ecadSmrg	fi
95535c30ecadSmrg	$RM conftest*
95545c30ecadSmrg	])
95555c30ecadSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
95565c30ecadSmrg      ;;
95575c30ecadSmrg    esac
95585c30ecadSmrg  fi
95595c30ecadSmrg  ;;
95605c30ecadSmrgesac
95615c30ecadSmrg
95625c30ecadSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
95635c30ecadSmrg    [Whether or not to add -lc for building shared libraries])
95645c30ecadSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
95655c30ecadSmrg    [enable_shared_with_static_runtimes], [0],
95665c30ecadSmrg    [Whether or not to disallow shared libs when runtime libs are static])
95675c30ecadSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
95685c30ecadSmrg    [Compiler flag to allow reflexive dlopens])
95695c30ecadSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
95705c30ecadSmrg    [Compiler flag to generate shared objects directly from archives])
95715c30ecadSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
95725c30ecadSmrg    [Whether the compiler copes with passing no objects directly])
95735c30ecadSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
95745c30ecadSmrg    [Create an old-style archive from a shared archive])
95755c30ecadSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
95765c30ecadSmrg    [Create a temporary old-style archive to link instead of a shared archive])
95775c30ecadSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
95785c30ecadSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
95795c30ecadSmrg_LT_TAGDECL([], [module_cmds], [2],
95805c30ecadSmrg    [Commands used to build a loadable module if different from building
95815c30ecadSmrg    a shared archive.])
95825c30ecadSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
95835c30ecadSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
95845c30ecadSmrg    [Whether we are building with GNU ld or not])
95855c30ecadSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
95865c30ecadSmrg    [Flag that allows shared libraries with undefined symbols to be built])
95875c30ecadSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
95885c30ecadSmrg    [Flag that enforces no undefined symbols])
95895c30ecadSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
95905c30ecadSmrg    [Flag to hardcode $libdir into a binary during linking.
95915c30ecadSmrg    This must work even if $libdir does not exist])
95925c30ecadSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
95935c30ecadSmrg    [Whether we need a single "-rpath" flag with a separated argument])
95945c30ecadSmrg_LT_TAGDECL([], [hardcode_direct], [0],
95955c30ecadSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
95965c30ecadSmrg    DIR into the resulting binary])
95975c30ecadSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
95985c30ecadSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
95995c30ecadSmrg    DIR into the resulting binary and the resulting library dependency is
96005c30ecadSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
96015c30ecadSmrg    library is relocated])
96025c30ecadSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
96035c30ecadSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
96045c30ecadSmrg    into the resulting binary])
96055c30ecadSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
96065c30ecadSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
96075c30ecadSmrg    into the resulting binary])
96085c30ecadSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
96095c30ecadSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
96105c30ecadSmrg    into the library and all subsequent libraries and executables linked
96115c30ecadSmrg    against it])
96125c30ecadSmrg_LT_TAGDECL([], [inherit_rpath], [0],
96135c30ecadSmrg    [Set to yes if linker adds runtime paths of dependent libraries
96145c30ecadSmrg    to runtime path list])
96155c30ecadSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
96165c30ecadSmrg    [Whether libtool must link a program against all its dependency libraries])
96175c30ecadSmrg_LT_TAGDECL([], [always_export_symbols], [0],
96185c30ecadSmrg    [Set to "yes" if exported symbols are required])
96195c30ecadSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
96205c30ecadSmrg    [The commands to list exported symbols])
96215c30ecadSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
96225c30ecadSmrg    [Symbols that should not be listed in the preloaded symbols])
96235c30ecadSmrg_LT_TAGDECL([], [include_expsyms], [1],
96245c30ecadSmrg    [Symbols that must always be exported])
96255c30ecadSmrg_LT_TAGDECL([], [prelink_cmds], [2],
96265c30ecadSmrg    [Commands necessary for linking programs (against libraries) with templates])
96275c30ecadSmrg_LT_TAGDECL([], [postlink_cmds], [2],
96285c30ecadSmrg    [Commands necessary for finishing linking programs])
96295c30ecadSmrg_LT_TAGDECL([], [file_list_spec], [1],
96305c30ecadSmrg    [Specify filename containing input files])
96315c30ecadSmrgdnl FIXME: Not yet implemented
96325c30ecadSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
96335c30ecadSmrgdnl    [Compiler flag to generate thread safe objects])
96345c30ecadSmrg])# _LT_LINKER_SHLIBS
9635dc99b369Smrg
9636dc99b369Smrg
96375c30ecadSmrg# _LT_LANG_C_CONFIG([TAG])
96385c30ecadSmrg# ------------------------
96395c30ecadSmrg# Ensure that the configuration variables for a C compiler are suitably
96405c30ecadSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
96415c30ecadSmrg# the compiler configuration to 'libtool'.
96425c30ecadSmrgm4_defun([_LT_LANG_C_CONFIG],
96435c30ecadSmrg[m4_require([_LT_DECL_EGREP])dnl
96445c30ecadSmrglt_save_CC=$CC
96455c30ecadSmrgAC_LANG_PUSH(C)
9646dc99b369Smrg
96475c30ecadSmrg# Source file extension for C test sources.
96485c30ecadSmrgac_ext=c
9649dc99b369Smrg
96505c30ecadSmrg# Object file extension for compiled C test sources.
96515c30ecadSmrgobjext=o
96525c30ecadSmrg_LT_TAGVAR(objext, $1)=$objext
96535c30ecadSmrg
96545c30ecadSmrg# Code to be used in simple compile tests
96555c30ecadSmrglt_simple_compile_test_code="int some_variable = 0;"
96565c30ecadSmrg
96575c30ecadSmrg# Code to be used in simple link tests
96585c30ecadSmrglt_simple_link_test_code='int main(){return(0);}'
96595c30ecadSmrg
96605c30ecadSmrg_LT_TAG_COMPILER
96615c30ecadSmrg# Save the default compiler, since it gets overwritten when the other
96625c30ecadSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
96635c30ecadSmrgcompiler_DEFAULT=$CC
96645c30ecadSmrg
96655c30ecadSmrg# save warnings/boilerplate of simple test code
96665c30ecadSmrg_LT_COMPILER_BOILERPLATE
96675c30ecadSmrg_LT_LINKER_BOILERPLATE
9668dc99b369Smrg
96695c30ecadSmrgif test -n "$compiler"; then
96705c30ecadSmrg  _LT_COMPILER_NO_RTTI($1)
96715c30ecadSmrg  _LT_COMPILER_PIC($1)
96725c30ecadSmrg  _LT_COMPILER_C_O($1)
96735c30ecadSmrg  _LT_COMPILER_FILE_LOCKS($1)
96745c30ecadSmrg  _LT_LINKER_SHLIBS($1)
96755c30ecadSmrg  _LT_SYS_DYNAMIC_LINKER($1)
96765c30ecadSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
96775c30ecadSmrg  LT_SYS_DLOPEN_SELF
96785c30ecadSmrg  _LT_CMD_STRIPLIB
9679dc99b369Smrg
96805c30ecadSmrg  # Report what library types will actually be built
96815c30ecadSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
96825c30ecadSmrg  AC_MSG_RESULT([$can_build_shared])
9683dc99b369Smrg
96845c30ecadSmrg  AC_MSG_CHECKING([whether to build shared libraries])
96855c30ecadSmrg  test no = "$can_build_shared" && enable_shared=no
9686dc99b369Smrg
96875c30ecadSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
96885c30ecadSmrg  # are all built from PIC.
96895c30ecadSmrg  case $host_os in
96905c30ecadSmrg  aix3*)
96915c30ecadSmrg    test yes = "$enable_shared" && enable_static=no
96925c30ecadSmrg    if test -n "$RANLIB"; then
96935c30ecadSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
96945c30ecadSmrg      postinstall_cmds='$RANLIB $lib'
96955c30ecadSmrg    fi
96965c30ecadSmrg    ;;
9697dc99b369Smrg
96985c30ecadSmrg  aix[[4-9]]*)
96995c30ecadSmrg    if test ia64 != "$host_cpu"; then
97005c30ecadSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
97015c30ecadSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
97025c30ecadSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
97035c30ecadSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
97045c30ecadSmrg      esac
97055c30ecadSmrg    fi
97065c30ecadSmrg    ;;
97075c30ecadSmrg  esac
97085c30ecadSmrg  AC_MSG_RESULT([$enable_shared])
9709dc99b369Smrg
97105c30ecadSmrg  AC_MSG_CHECKING([whether to build static libraries])
97115c30ecadSmrg  # Make sure either enable_shared or enable_static is yes.
97125c30ecadSmrg  test yes = "$enable_shared" || enable_static=yes
97135c30ecadSmrg  AC_MSG_RESULT([$enable_static])
9714dc99b369Smrg
97155c30ecadSmrg  _LT_CONFIG($1)
97165c30ecadSmrgfi
97175c30ecadSmrgAC_LANG_POP
97185c30ecadSmrgCC=$lt_save_CC
97195c30ecadSmrg])# _LT_LANG_C_CONFIG
9720dc99b369Smrg
9721dc99b369Smrg
97225c30ecadSmrg# _LT_LANG_CXX_CONFIG([TAG])
97235c30ecadSmrg# --------------------------
97245c30ecadSmrg# Ensure that the configuration variables for a C++ compiler are suitably
97255c30ecadSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
97265c30ecadSmrg# the compiler configuration to 'libtool'.
97275c30ecadSmrgm4_defun([_LT_LANG_CXX_CONFIG],
97285c30ecadSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
97295c30ecadSmrgm4_require([_LT_DECL_EGREP])dnl
97305c30ecadSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
97315c30ecadSmrgif test -n "$CXX" && ( test no != "$CXX" &&
97325c30ecadSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
97335c30ecadSmrg    (test g++ != "$CXX"))); then
97345c30ecadSmrg  AC_PROG_CXXCPP
97355c30ecadSmrgelse
97365c30ecadSmrg  _lt_caught_CXX_error=yes
97375c30ecadSmrgfi
9738dc99b369Smrg
97395c30ecadSmrgAC_LANG_PUSH(C++)
97405c30ecadSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
97415c30ecadSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
97425c30ecadSmrg_LT_TAGVAR(always_export_symbols, $1)=no
97435c30ecadSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
97445c30ecadSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
97455c30ecadSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
97465c30ecadSmrg_LT_TAGVAR(hardcode_direct, $1)=no
97475c30ecadSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
97485c30ecadSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
97495c30ecadSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
97505c30ecadSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
97515c30ecadSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
97525c30ecadSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
97535c30ecadSmrg_LT_TAGVAR(inherit_rpath, $1)=no
97545c30ecadSmrg_LT_TAGVAR(module_cmds, $1)=
97555c30ecadSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
97565c30ecadSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
97575c30ecadSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
97585c30ecadSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
97595c30ecadSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
97605c30ecadSmrg_LT_TAGVAR(no_undefined_flag, $1)=
97615c30ecadSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
97625c30ecadSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9763dc99b369Smrg
97645c30ecadSmrg# Source file extension for C++ test sources.
97655c30ecadSmrgac_ext=cpp
9766dc99b369Smrg
97675c30ecadSmrg# Object file extension for compiled C++ test sources.
97685c30ecadSmrgobjext=o
97695c30ecadSmrg_LT_TAGVAR(objext, $1)=$objext
9770dc99b369Smrg
97715c30ecadSmrg# No sense in running all these tests if we already determined that
97725c30ecadSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
97735c30ecadSmrg# are currently assumed to apply to all compilers on this platform,
97745c30ecadSmrg# and will be corrupted by setting them based on a non-working compiler.
97755c30ecadSmrgif test yes != "$_lt_caught_CXX_error"; then
97765c30ecadSmrg  # Code to be used in simple compile tests
97775c30ecadSmrg  lt_simple_compile_test_code="int some_variable = 0;"
9778dc99b369Smrg
97795c30ecadSmrg  # Code to be used in simple link tests
97805c30ecadSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
9781dc99b369Smrg
97825c30ecadSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
97835c30ecadSmrg  _LT_TAG_COMPILER
9784dc99b369Smrg
97855c30ecadSmrg  # save warnings/boilerplate of simple test code
97865c30ecadSmrg  _LT_COMPILER_BOILERPLATE
97875c30ecadSmrg  _LT_LINKER_BOILERPLATE
9788dc99b369Smrg
97895c30ecadSmrg  # Allow CC to be a program name with arguments.
97905c30ecadSmrg  lt_save_CC=$CC
97915c30ecadSmrg  lt_save_CFLAGS=$CFLAGS
97925c30ecadSmrg  lt_save_LD=$LD
97935c30ecadSmrg  lt_save_GCC=$GCC
97945c30ecadSmrg  GCC=$GXX
97955c30ecadSmrg  lt_save_with_gnu_ld=$with_gnu_ld
97965c30ecadSmrg  lt_save_path_LD=$lt_cv_path_LD
97975c30ecadSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
97985c30ecadSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
97995c30ecadSmrg  else
98005c30ecadSmrg    $as_unset lt_cv_prog_gnu_ld
98015c30ecadSmrg  fi
98025c30ecadSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
98035c30ecadSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
98045c30ecadSmrg  else
98055c30ecadSmrg    $as_unset lt_cv_path_LD
98065c30ecadSmrg  fi
98075c30ecadSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
98085c30ecadSmrg  CC=${CXX-"c++"}
98095c30ecadSmrg  CFLAGS=$CXXFLAGS
98105c30ecadSmrg  compiler=$CC
98115c30ecadSmrg  _LT_TAGVAR(compiler, $1)=$CC
98125c30ecadSmrg  _LT_CC_BASENAME([$compiler])
9813dc99b369Smrg
98145c30ecadSmrg  if test -n "$compiler"; then
98155c30ecadSmrg    # We don't want -fno-exception when compiling C++ code, so set the
98165c30ecadSmrg    # no_builtin_flag separately
98175c30ecadSmrg    if test yes = "$GXX"; then
98185c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
98195c30ecadSmrg    else
98205c30ecadSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
98215c30ecadSmrg    fi
9822dc99b369Smrg
98235c30ecadSmrg    if test yes = "$GXX"; then
98245c30ecadSmrg      # Set up default GNU C++ configuration
9825dc99b369Smrg
98265c30ecadSmrg      LT_PATH_LD
9827dc99b369Smrg
98285c30ecadSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
98295c30ecadSmrg      # archiving commands below assume that GNU ld is being used.
98305c30ecadSmrg      if test yes = "$with_gnu_ld"; then
98315c30ecadSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
98325c30ecadSmrg        _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'
9833dc99b369Smrg
98345c30ecadSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
98355c30ecadSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
98365eefee25Smacallan
98375c30ecadSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
98385c30ecadSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
98395c30ecadSmrg        #     investigate it a little bit more. (MM)
98405c30ecadSmrg        wlarc='$wl'
9841dc99b369Smrg
98425c30ecadSmrg        # ancient GNU ld didn't support --whole-archive et. al.
98435c30ecadSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
98445c30ecadSmrg	  $GREP 'no-whole-archive' > /dev/null; then
98455c30ecadSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
98465c30ecadSmrg        else
98475c30ecadSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
98485c30ecadSmrg        fi
98495c30ecadSmrg      else
98505c30ecadSmrg        with_gnu_ld=no
98515c30ecadSmrg        wlarc=
9852dc99b369Smrg
98535c30ecadSmrg        # A generic and very simple default shared library creation
98545c30ecadSmrg        # command for GNU C++ for the case where it uses the native
98555c30ecadSmrg        # linker, instead of GNU ld.  If possible, this setting should
98565c30ecadSmrg        # overridden to take advantage of the native linker features on
98575c30ecadSmrg        # the platform it is being used on.
98585c30ecadSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
98595c30ecadSmrg      fi
9860dc99b369Smrg
98615c30ecadSmrg      # Commands to make compiler produce verbose output that lists
98625c30ecadSmrg      # what "hidden" libraries, object files and flags are used when
98635c30ecadSmrg      # linking a shared library.
98645c30ecadSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
98655c30ecadSmrg
98665c30ecadSmrg    else
98675c30ecadSmrg      GXX=no
98685c30ecadSmrg      with_gnu_ld=no
98695c30ecadSmrg      wlarc=
98705c30ecadSmrg    fi
9871dc99b369Smrg
98725c30ecadSmrg    # PORTME: fill in a description of your system's C++ link characteristics
98735c30ecadSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
98745c30ecadSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
98755c30ecadSmrg    case $host_os in
98765c30ecadSmrg      aix3*)
98775c30ecadSmrg        # FIXME: insert proper C++ library support
98785c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
98795c30ecadSmrg        ;;
98805c30ecadSmrg      aix[[4-9]]*)
98815c30ecadSmrg        if test ia64 = "$host_cpu"; then
98825c30ecadSmrg          # On IA64, the linker does run time linking by default, so we don't
98835c30ecadSmrg          # have to do anything special.
98845c30ecadSmrg          aix_use_runtimelinking=no
98855c30ecadSmrg          exp_sym_flag='-Bexport'
98865c30ecadSmrg          no_entry_flag=
98875c30ecadSmrg        else
98885c30ecadSmrg          aix_use_runtimelinking=no
9889dc99b369Smrg
98905c30ecadSmrg          # Test if we are trying to use run time linking or normal
98915c30ecadSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
98925c30ecadSmrg          # have runtime linking enabled, and use it for executables.
98935c30ecadSmrg          # For shared libraries, we enable/disable runtime linking
98945c30ecadSmrg          # depending on the kind of the shared library created -
98955c30ecadSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
98965c30ecadSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
98975c30ecadSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
98985c30ecadSmrg          #            lib.a           static archive
98995c30ecadSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
99005c30ecadSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
99015c30ecadSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
99025c30ecadSmrg          #            lib.a(lib.so.V) shared, rtl:no
99035c30ecadSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
99045c30ecadSmrg          #            lib.a           static archive
99055c30ecadSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
99065c30ecadSmrg	    for ld_flag in $LDFLAGS; do
99075c30ecadSmrg	      case $ld_flag in
99085c30ecadSmrg	      *-brtl*)
99095c30ecadSmrg	        aix_use_runtimelinking=yes
99105c30ecadSmrg	        break
99115c30ecadSmrg	        ;;
99125c30ecadSmrg	      esac
99135c30ecadSmrg	    done
99145c30ecadSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
99155c30ecadSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
99165c30ecadSmrg	      # so we don't have lib.a shared libs to link our executables.
99175c30ecadSmrg	      # We have to force runtime linking in this case.
99185c30ecadSmrg	      aix_use_runtimelinking=yes
99195c30ecadSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
99205c30ecadSmrg	    fi
99215c30ecadSmrg	    ;;
99225c30ecadSmrg          esac
99235eefee25Smacallan
99245c30ecadSmrg          exp_sym_flag='-bexport'
99255c30ecadSmrg          no_entry_flag='-bnoentry'
99265c30ecadSmrg        fi
9927dc99b369Smrg
99285c30ecadSmrg        # When large executables or shared objects are built, AIX ld can
99295c30ecadSmrg        # have problems creating the table of contents.  If linking a library
99305c30ecadSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
99315c30ecadSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
99325c30ecadSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
99335eefee25Smacallan
99345c30ecadSmrg        _LT_TAGVAR(archive_cmds, $1)=''
99355c30ecadSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
99365c30ecadSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
99375c30ecadSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
99385c30ecadSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
99395c30ecadSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
99405c30ecadSmrg        case $with_aix_soname,$aix_use_runtimelinking in
99415c30ecadSmrg        aix,*) ;;	# no import file
99425c30ecadSmrg        svr4,* | *,yes) # use import file
99435c30ecadSmrg          # The Import File defines what to hardcode.
99445c30ecadSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
99455c30ecadSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
99465c30ecadSmrg          ;;
99475c30ecadSmrg        esac
99485eefee25Smacallan
99495c30ecadSmrg        if test yes = "$GXX"; then
99505c30ecadSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
99515c30ecadSmrg          # We only want to do this on AIX 4.2 and lower, the check
99525c30ecadSmrg          # below for broken collect2 doesn't work under 4.3+
99535c30ecadSmrg	  collect2name=`$CC -print-prog-name=collect2`
99545c30ecadSmrg	  if test -f "$collect2name" &&
99555c30ecadSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
99565c30ecadSmrg	  then
99575c30ecadSmrg	    # We have reworked collect2
99585c30ecadSmrg	    :
99595c30ecadSmrg	  else
99605c30ecadSmrg	    # We have old collect2
99615c30ecadSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
99625c30ecadSmrg	    # It fails to find uninstalled libraries when the uninstalled
99635c30ecadSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
99645c30ecadSmrg	    # to unsupported forces relinking
99655c30ecadSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
99665c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
99675c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
99685c30ecadSmrg	  fi
99695c30ecadSmrg          esac
99705c30ecadSmrg          shared_flag='-shared'
99715c30ecadSmrg	  if test yes = "$aix_use_runtimelinking"; then
99725c30ecadSmrg	    shared_flag=$shared_flag' $wl-G'
99735c30ecadSmrg	  fi
99745c30ecadSmrg	  # Need to ensure runtime linking is disabled for the traditional
99755c30ecadSmrg	  # shared library, or the linker may eventually find shared libraries
99765c30ecadSmrg	  # /with/ Import File - we do not want to mix them.
99775c30ecadSmrg	  shared_flag_aix='-shared'
99785c30ecadSmrg	  shared_flag_svr4='-shared $wl-G'
99795c30ecadSmrg        else
99805c30ecadSmrg          # not using gcc
99815c30ecadSmrg          if test ia64 = "$host_cpu"; then
99825c30ecadSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
99835c30ecadSmrg	  # chokes on -Wl,-G. The following line is correct:
99845c30ecadSmrg	  shared_flag='-G'
99855c30ecadSmrg          else
99865c30ecadSmrg	    if test yes = "$aix_use_runtimelinking"; then
99875c30ecadSmrg	      shared_flag='$wl-G'
99885c30ecadSmrg	    else
99895c30ecadSmrg	      shared_flag='$wl-bM:SRE'
99905c30ecadSmrg	    fi
99915c30ecadSmrg	    shared_flag_aix='$wl-bM:SRE'
99925c30ecadSmrg	    shared_flag_svr4='$wl-G'
99935c30ecadSmrg          fi
99945c30ecadSmrg        fi
99955eefee25Smacallan
99965c30ecadSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
99975c30ecadSmrg        # It seems that -bexpall does not export symbols beginning with
99985c30ecadSmrg        # underscore (_), so it is better to generate a list of symbols to
99995c30ecadSmrg	# export.
100005c30ecadSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
100015c30ecadSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
100025c30ecadSmrg          # Warning - without using the other runtime loading flags (-brtl),
100035c30ecadSmrg          # -berok will link without error, but may produce a broken library.
100045c30ecadSmrg          # The "-G" linker flag allows undefined symbols.
100055c30ecadSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
100065c30ecadSmrg          # Determine the default libpath from the value encoded in an empty
100075c30ecadSmrg          # executable.
100085c30ecadSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
100095c30ecadSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
100105eefee25Smacallan
100115c30ecadSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag
100125c30ecadSmrg        else
100135c30ecadSmrg          if test ia64 = "$host_cpu"; then
100145c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
100155c30ecadSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
100165c30ecadSmrg	    _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"
100175c30ecadSmrg          else
100185c30ecadSmrg	    # Determine the default libpath from the value encoded in an
100195c30ecadSmrg	    # empty executable.
100205c30ecadSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
100215c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
100225c30ecadSmrg	    # Warning - without using the other run time loading flags,
100235c30ecadSmrg	    # -berok will link without error, but may produce a broken library.
100245c30ecadSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
100255c30ecadSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
100265c30ecadSmrg	    if test yes = "$with_gnu_ld"; then
100275c30ecadSmrg	      # We only use this code for GNU lds that support --whole-archive.
100285c30ecadSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
100295c30ecadSmrg	    else
100305c30ecadSmrg	      # Exported symbols can be pulled into shared objects from archives
100315c30ecadSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
100325c30ecadSmrg	    fi
100335c30ecadSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
100345c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
100355c30ecadSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
100365c30ecadSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
100375c30ecadSmrg	    if test svr4 != "$with_aix_soname"; then
100385c30ecadSmrg	      # This is similar to how AIX traditionally builds its shared
100395c30ecadSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
100405c30ecadSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname'
100415c30ecadSmrg	    fi
100425c30ecadSmrg	    if test aix != "$with_aix_soname"; then
100435c30ecadSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp'
100445c30ecadSmrg	    else
100455c30ecadSmrg	      # used by -dlpreopen to get the symbols
100465c30ecadSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
100475c30ecadSmrg	    fi
100485c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
100495c30ecadSmrg          fi
100505c30ecadSmrg        fi
100515c30ecadSmrg        ;;
100525eefee25Smacallan
100535c30ecadSmrg      beos*)
100545c30ecadSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
100555c30ecadSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
100565c30ecadSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
100575c30ecadSmrg	  # support --undefined.  This deserves some investigation.  FIXME
100585c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
100595c30ecadSmrg	else
100605c30ecadSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
100615c30ecadSmrg	fi
100625c30ecadSmrg	;;
100635eefee25Smacallan
100645c30ecadSmrg      chorus*)
100655c30ecadSmrg        case $cc_basename in
100665c30ecadSmrg          *)
100675c30ecadSmrg	  # FIXME: insert proper C++ library support
100685c30ecadSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
100695c30ecadSmrg	  ;;
100705c30ecadSmrg        esac
100715c30ecadSmrg        ;;
100725eefee25Smacallan
100735c30ecadSmrg      cygwin* | mingw* | pw32* | cegcc*)
100745c30ecadSmrg	case $GXX,$cc_basename in
100755c30ecadSmrg	,cl* | no,cl* | ,icl* | no,icl*)
100765c30ecadSmrg	  # Native MSVC or ICC
100775c30ecadSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
100785c30ecadSmrg	  # no search path for DLLs.
100795c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
100805c30ecadSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
100815c30ecadSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
100825c30ecadSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
100835c30ecadSmrg	  # Tell ltmain to make .lib files, not .a files.
100845c30ecadSmrg	  libext=lib
100855c30ecadSmrg	  # Tell ltmain to make .dll files, not .so files.
100865c30ecadSmrg	  shrext_cmds=.dll
100875c30ecadSmrg	  # FIXME: Setting linknames here is a bad hack.
100885c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
100895c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
100905c30ecadSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
100915c30ecadSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
100925c30ecadSmrg            else
100935c30ecadSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
100945c30ecadSmrg            fi~
100955c30ecadSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
100965c30ecadSmrg            linknames='
100975c30ecadSmrg	  # The linker will not automatically build a static lib if we build a DLL.
100985c30ecadSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
100995c30ecadSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
101005c30ecadSmrg	  # Don't use ranlib
101015c30ecadSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
101025c30ecadSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
101035c30ecadSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
101045c30ecadSmrg            case $lt_outputfile in
101055c30ecadSmrg              *.exe|*.EXE) ;;
101065c30ecadSmrg              *)
101075c30ecadSmrg                lt_outputfile=$lt_outputfile.exe
101085c30ecadSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
101095c30ecadSmrg                ;;
101105c30ecadSmrg            esac~
101115c30ecadSmrg            func_to_tool_file "$lt_outputfile"~
101125c30ecadSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
101135c30ecadSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
101145c30ecadSmrg              $RM "$lt_outputfile.manifest";
101155c30ecadSmrg            fi'
101165c30ecadSmrg	  ;;
101175c30ecadSmrg	*)
101185c30ecadSmrg	  # g++
101195c30ecadSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
101205c30ecadSmrg	  # as there is no search path for DLLs.
101215c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
101225c30ecadSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
101235c30ecadSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
101245c30ecadSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
101255c30ecadSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
101265eefee25Smacallan
101275c30ecadSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
101285c30ecadSmrg	    _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'
101295c30ecadSmrg	    # If the export-symbols file already is a .def file, use it as
101305c30ecadSmrg	    # is; otherwise, prepend EXPORTS...
101315c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
101325c30ecadSmrg              cp $export_symbols $output_objdir/$soname.def;
101335c30ecadSmrg            else
101345c30ecadSmrg              echo EXPORTS > $output_objdir/$soname.def;
101355c30ecadSmrg              cat $export_symbols >> $output_objdir/$soname.def;
101365c30ecadSmrg            fi~
101375c30ecadSmrg            $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'
101385c30ecadSmrg	  else
101395c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101405c30ecadSmrg	  fi
101415c30ecadSmrg	  ;;
101425c30ecadSmrg	esac
101435c30ecadSmrg	;;
101445c30ecadSmrg      darwin* | rhapsody*)
101455c30ecadSmrg        _LT_DARWIN_LINKER_FEATURES($1)
101465c30ecadSmrg	;;
101475eefee25Smacallan
101485c30ecadSmrg      os2*)
101495c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
101505c30ecadSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
101515c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
101525c30ecadSmrg	shrext_cmds=.dll
101535c30ecadSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
101545c30ecadSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
101555c30ecadSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
101565c30ecadSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
101575c30ecadSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
101585c30ecadSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
101595c30ecadSmrg	  emximp -o $lib $output_objdir/$libname.def'
101605c30ecadSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
101615c30ecadSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
101625c30ecadSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
101635c30ecadSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
101645c30ecadSmrg	  prefix_cmds="$SED"~
101655c30ecadSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
101665c30ecadSmrg	    prefix_cmds="$prefix_cmds -e 1d";
101675c30ecadSmrg	  fi~
101685c30ecadSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
101695c30ecadSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
101705c30ecadSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
101715c30ecadSmrg	  emximp -o $lib $output_objdir/$libname.def'
101725c30ecadSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
101735c30ecadSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
101745c30ecadSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
101755c30ecadSmrg	;;
101765eefee25Smacallan
101775c30ecadSmrg      dgux*)
101785c30ecadSmrg        case $cc_basename in
101795c30ecadSmrg          ec++*)
101805c30ecadSmrg	    # FIXME: insert proper C++ library support
101815c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101825c30ecadSmrg	    ;;
101835c30ecadSmrg          ghcx*)
101845c30ecadSmrg	    # Green Hills C++ Compiler
101855c30ecadSmrg	    # FIXME: insert proper C++ library support
101865c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101875c30ecadSmrg	    ;;
101885c30ecadSmrg          *)
101895c30ecadSmrg	    # FIXME: insert proper C++ library support
101905c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101915c30ecadSmrg	    ;;
101925c30ecadSmrg        esac
101935c30ecadSmrg        ;;
101945eefee25Smacallan
101955c30ecadSmrg      freebsd2.*)
101965c30ecadSmrg        # C++ shared libraries reported to be fairly broken before
101975c30ecadSmrg	# switch to ELF
101985c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
101995c30ecadSmrg        ;;
102005eefee25Smacallan
102015c30ecadSmrg      freebsd-elf*)
102025c30ecadSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
102035c30ecadSmrg        ;;
102045eefee25Smacallan
102055c30ecadSmrg      freebsd* | dragonfly* | midnightbsd*)
102065c30ecadSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
102075c30ecadSmrg        # conventions
102085c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
102095c30ecadSmrg        ;;
102105eefee25Smacallan
102115c30ecadSmrg      haiku*)
102125c30ecadSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
102135c30ecadSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
102145c30ecadSmrg        ;;
102155eefee25Smacallan
102165c30ecadSmrg      hpux9*)
102175c30ecadSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
102185c30ecadSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
102195c30ecadSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
102205c30ecadSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
102215c30ecadSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
102225c30ecadSmrg				             # but as the default
102235c30ecadSmrg				             # location of the library.
102245eefee25Smacallan
102255c30ecadSmrg        case $cc_basename in
102265c30ecadSmrg          CC*)
102275c30ecadSmrg            # FIXME: insert proper C++ library support
102285c30ecadSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
102295c30ecadSmrg            ;;
102305c30ecadSmrg          aCC*)
102315c30ecadSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
102325c30ecadSmrg            # Commands to make compiler produce verbose output that lists
102335c30ecadSmrg            # what "hidden" libraries, object files and flags are used when
102345c30ecadSmrg            # linking a shared library.
102355c30ecadSmrg            #
102365c30ecadSmrg            # There doesn't appear to be a way to prevent this compiler from
102375c30ecadSmrg            # explicitly linking system object files so we need to strip them
102385c30ecadSmrg            # from the output so that they don't get included in the library
102395c30ecadSmrg            # dependencies.
102405c30ecadSmrg            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"'
102415c30ecadSmrg            ;;
102425c30ecadSmrg          *)
102435c30ecadSmrg            if test yes = "$GXX"; then
102445c30ecadSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib'
102455c30ecadSmrg            else
102465c30ecadSmrg              # FIXME: insert proper C++ library support
102475c30ecadSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
102485c30ecadSmrg            fi
102495c30ecadSmrg            ;;
102505c30ecadSmrg        esac
102515c30ecadSmrg        ;;
10252dc99b369Smrg
102535c30ecadSmrg      hpux10*|hpux11*)
102545c30ecadSmrg        if test no = "$with_gnu_ld"; then
102555c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
102565c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10257dc99b369Smrg
102585c30ecadSmrg          case $host_cpu in
102595c30ecadSmrg            hppa*64*|ia64*)
102605c30ecadSmrg              ;;
102615c30ecadSmrg            *)
102625c30ecadSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
102635c30ecadSmrg              ;;
102645c30ecadSmrg          esac
102655c30ecadSmrg        fi
102665c30ecadSmrg        case $host_cpu in
102675c30ecadSmrg          hppa*64*|ia64*)
102685c30ecadSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
102695c30ecadSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
102705c30ecadSmrg            ;;
102715c30ecadSmrg          *)
102725c30ecadSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
102735c30ecadSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
102745c30ecadSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
102755c30ecadSmrg					         # but as the default
102765c30ecadSmrg					         # location of the library.
102775c30ecadSmrg            ;;
102785c30ecadSmrg        esac
10279dc99b369Smrg
102805c30ecadSmrg        case $cc_basename in
102815c30ecadSmrg          CC*)
102825c30ecadSmrg	    # FIXME: insert proper C++ library support
102835c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
102845c30ecadSmrg	    ;;
102855c30ecadSmrg          aCC*)
102865c30ecadSmrg	    case $host_cpu in
102875c30ecadSmrg	      hppa*64*)
102885c30ecadSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102895c30ecadSmrg	        ;;
102905c30ecadSmrg	      ia64*)
102915c30ecadSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102925c30ecadSmrg	        ;;
102935c30ecadSmrg	      *)
102945c30ecadSmrg	        _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'
102955c30ecadSmrg	        ;;
102965c30ecadSmrg	    esac
102975c30ecadSmrg	    # Commands to make compiler produce verbose output that lists
102985c30ecadSmrg	    # what "hidden" libraries, object files and flags are used when
102995c30ecadSmrg	    # linking a shared library.
103005c30ecadSmrg	    #
103015c30ecadSmrg	    # There doesn't appear to be a way to prevent this compiler from
103025c30ecadSmrg	    # explicitly linking system object files so we need to strip them
103035c30ecadSmrg	    # from the output so that they don't get included in the library
103045c30ecadSmrg	    # dependencies.
103055c30ecadSmrg	    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"'
103065c30ecadSmrg	    ;;
103075c30ecadSmrg          *)
103085c30ecadSmrg	    if test yes = "$GXX"; then
103095c30ecadSmrg	      if test no = "$with_gnu_ld"; then
103105c30ecadSmrg	        case $host_cpu in
103115c30ecadSmrg	          hppa*64*)
103125c30ecadSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
103135c30ecadSmrg	            ;;
103145c30ecadSmrg	          ia64*)
103155c30ecadSmrg	            _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'
103165c30ecadSmrg	            ;;
103175c30ecadSmrg	          *)
103185c30ecadSmrg	            _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'
103195c30ecadSmrg	            ;;
103205c30ecadSmrg	        esac
103215c30ecadSmrg	      fi
103225c30ecadSmrg	    else
103235c30ecadSmrg	      # FIXME: insert proper C++ library support
103245c30ecadSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
103255c30ecadSmrg	    fi
103265c30ecadSmrg	    ;;
103275c30ecadSmrg        esac
103285c30ecadSmrg        ;;
10329dc99b369Smrg
103305c30ecadSmrg      interix[[3-9]]*)
103315c30ecadSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
103325c30ecadSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
103335c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
103345c30ecadSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
103355c30ecadSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
103365c30ecadSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
103375c30ecadSmrg	# default) and relocated if they conflict, which is a slow very memory
103385c30ecadSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
103395c30ecadSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
103405c30ecadSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
103415c30ecadSmrg	_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'
103425c30ecadSmrg	_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'
103435c30ecadSmrg	;;
103445c30ecadSmrg      irix5* | irix6*)
103455c30ecadSmrg        case $cc_basename in
103465c30ecadSmrg          CC*)
103475c30ecadSmrg	    # SGI C++
103485c30ecadSmrg	    _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'
1034962ab96baSmrg
103505c30ecadSmrg	    # Archives containing C++ object files must be created using
103515c30ecadSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
103525c30ecadSmrg	    # necessary to make sure instantiated templates are included
103535c30ecadSmrg	    # in the archive.
103545c30ecadSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
103555c30ecadSmrg	    ;;
103565c30ecadSmrg          *)
103575c30ecadSmrg	    if test yes = "$GXX"; then
103585c30ecadSmrg	      if test no = "$with_gnu_ld"; then
103595c30ecadSmrg	        _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'
103605c30ecadSmrg	      else
103615c30ecadSmrg	        _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'
103625c30ecadSmrg	      fi
103635c30ecadSmrg	    fi
103645c30ecadSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
103655c30ecadSmrg	    ;;
103665c30ecadSmrg        esac
103675c30ecadSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
103685c30ecadSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
103695c30ecadSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
103705c30ecadSmrg        ;;
103715eefee25Smacallan
103725c30ecadSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
103735c30ecadSmrg        case $cc_basename in
103745c30ecadSmrg          KCC*)
103755c30ecadSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
103765eefee25Smacallan
103775c30ecadSmrg	    # KCC will only create a shared library if the output file
103785c30ecadSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
103795c30ecadSmrg	    # to its proper name (with version) after linking.
103805c30ecadSmrg	    _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'
103815c30ecadSmrg	    _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'
103825c30ecadSmrg	    # Commands to make compiler produce verbose output that lists
103835c30ecadSmrg	    # what "hidden" libraries, object files and flags are used when
103845c30ecadSmrg	    # linking a shared library.
103855c30ecadSmrg	    #
103865c30ecadSmrg	    # There doesn't appear to be a way to prevent this compiler from
103875c30ecadSmrg	    # explicitly linking system object files so we need to strip them
103885c30ecadSmrg	    # from the output so that they don't get included in the library
103895c30ecadSmrg	    # dependencies.
103905c30ecadSmrg	    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"'
103915eefee25Smacallan
103925c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
103935c30ecadSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
103945eefee25Smacallan
103955c30ecadSmrg	    # Archives containing C++ object files must be created using
103965c30ecadSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
103975c30ecadSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
103985c30ecadSmrg	    ;;
103995c30ecadSmrg	  icpc* | ecpc* )
104005c30ecadSmrg	    # Intel C++
104015c30ecadSmrg	    with_gnu_ld=yes
104025c30ecadSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
104035c30ecadSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
104045c30ecadSmrg	    # earlier do not add the objects themselves.
104055c30ecadSmrg	    case `$CC -V 2>&1` in
104065c30ecadSmrg	      *"Version 7."*)
104075c30ecadSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
104085c30ecadSmrg		_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'
104095c30ecadSmrg		;;
104105c30ecadSmrg	      *)  # Version 8.0 or newer
104115c30ecadSmrg	        tmp_idyn=
104125c30ecadSmrg	        case $host_cpu in
104135c30ecadSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
104145c30ecadSmrg		esac
104155c30ecadSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
104165c30ecadSmrg		_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'
104175c30ecadSmrg		;;
104185c30ecadSmrg	    esac
104195c30ecadSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
104205c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
104215c30ecadSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
104225c30ecadSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
104235c30ecadSmrg	    ;;
104245c30ecadSmrg          pgCC* | pgcpp*)
104255c30ecadSmrg            # Portland Group C++ compiler
104265c30ecadSmrg	    case `$CC -V` in
104275c30ecadSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
104285c30ecadSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
104295c30ecadSmrg               rm -rf $tpldir~
104305c30ecadSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
104315c30ecadSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
104325c30ecadSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
104335c30ecadSmrg                rm -rf $tpldir~
104345c30ecadSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
104355c30ecadSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
104365c30ecadSmrg                $RANLIB $oldlib'
104375c30ecadSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
104385c30ecadSmrg                rm -rf $tpldir~
104395c30ecadSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
104405c30ecadSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
104415c30ecadSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
104425c30ecadSmrg                rm -rf $tpldir~
104435c30ecadSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
104445c30ecadSmrg                $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'
104455c30ecadSmrg	      ;;
104465c30ecadSmrg	    *) # Version 6 and above use weak symbols
104475c30ecadSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
104485c30ecadSmrg	      _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'
104495c30ecadSmrg	      ;;
104505c30ecadSmrg	    esac
104515eefee25Smacallan
104525c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
104535c30ecadSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
104545c30ecadSmrg	    _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'
104555c30ecadSmrg            ;;
104565c30ecadSmrg	  cxx*)
104575c30ecadSmrg	    # Compaq C++
104585c30ecadSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
104595c30ecadSmrg	    _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'
104605eefee25Smacallan
104615c30ecadSmrg	    runpath_var=LD_RUN_PATH
104625c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
104635c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
104645eefee25Smacallan
104655c30ecadSmrg	    # Commands to make compiler produce verbose output that lists
104665c30ecadSmrg	    # what "hidden" libraries, object files and flags are used when
104675c30ecadSmrg	    # linking a shared library.
104685c30ecadSmrg	    #
104695c30ecadSmrg	    # There doesn't appear to be a way to prevent this compiler from
104705c30ecadSmrg	    # explicitly linking system object files so we need to strip them
104715c30ecadSmrg	    # from the output so that they don't get included in the library
104725c30ecadSmrg	    # dependencies.
104735c30ecadSmrg	    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'
104745c30ecadSmrg	    ;;
104755c30ecadSmrg	  xl* | mpixl* | bgxl*)
104765c30ecadSmrg	    # IBM XL 8.0 on PPC, with GNU ld
104775c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
104785c30ecadSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
104795c30ecadSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
104805c30ecadSmrg	    if test yes = "$supports_anon_versioning"; then
104815c30ecadSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
104825c30ecadSmrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
104835c30ecadSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
104845c30ecadSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
104855c30ecadSmrg	    fi
104865c30ecadSmrg	    ;;
104875c30ecadSmrg	  *)
104885c30ecadSmrg	    case `$CC -V 2>&1 | $SED 5q` in
104895c30ecadSmrg	    *Sun\ C*)
104905c30ecadSmrg	      # Sun C++ 5.9
104915c30ecadSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
104925c30ecadSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
104935c30ecadSmrg	      _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'
104945c30ecadSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
104955c30ecadSmrg	      _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'
104965c30ecadSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
104975eefee25Smacallan
104985c30ecadSmrg	      # Not sure whether something based on
104995c30ecadSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
105005c30ecadSmrg	      # would be better.
105015c30ecadSmrg	      output_verbose_link_cmd='func_echo_all'
105025eefee25Smacallan
105035c30ecadSmrg	      # Archives containing C++ object files must be created using
105045c30ecadSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
105055c30ecadSmrg	      # necessary to make sure instantiated templates are included
105065c30ecadSmrg	      # in the archive.
105075c30ecadSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
105085c30ecadSmrg	      ;;
105095c30ecadSmrg	    esac
105105c30ecadSmrg	    ;;
105115c30ecadSmrg	esac
105125c30ecadSmrg	;;
105135eefee25Smacallan
105145c30ecadSmrg      lynxos*)
105155c30ecadSmrg        # FIXME: insert proper C++ library support
105165c30ecadSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
105175c30ecadSmrg	;;
105185eefee25Smacallan
105195c30ecadSmrg      m88k*)
105205c30ecadSmrg        # FIXME: insert proper C++ library support
105215c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
105225c30ecadSmrg	;;
105235c30ecadSmrg
105245c30ecadSmrg      mvs*)
105255c30ecadSmrg        case $cc_basename in
105265c30ecadSmrg          cxx*)
105275c30ecadSmrg	    # FIXME: insert proper C++ library support
105285c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105295c30ecadSmrg	    ;;
105305c30ecadSmrg	  *)
105315c30ecadSmrg	    # FIXME: insert proper C++ library support
105325c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105335c30ecadSmrg	    ;;
105345c30ecadSmrg	esac
105355c30ecadSmrg	;;
105365eefee25Smacallan
105375c30ecadSmrg      netbsd*)
105385c30ecadSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
105395c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
105405c30ecadSmrg	  wlarc=
105415c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
105425c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
105435c30ecadSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
105445c30ecadSmrg	fi
105455c30ecadSmrg	# Workaround some broken pre-1.5 toolchains
105465c30ecadSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
105475c30ecadSmrg	;;
105485eefee25Smacallan
105495c30ecadSmrg      *nto* | *qnx*)
105505c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
105515c30ecadSmrg	;;
10552dc99b369Smrg
105535c30ecadSmrg      openbsd* | bitrig*)
105545c30ecadSmrg	if test -f /usr/libexec/ld.so; then
105555c30ecadSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
105565c30ecadSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
105575c30ecadSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
105585c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
105595c30ecadSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
105605c30ecadSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
105615c30ecadSmrg	    _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'
105625c30ecadSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
105635c30ecadSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
105645c30ecadSmrg	  fi
105655c30ecadSmrg	  output_verbose_link_cmd=func_echo_all
105665c30ecadSmrg	else
105675c30ecadSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
105685c30ecadSmrg	fi
105695c30ecadSmrg	;;
10570dc99b369Smrg
105715c30ecadSmrg      osf3* | osf4* | osf5*)
105725c30ecadSmrg        case $cc_basename in
105735c30ecadSmrg          KCC*)
105745c30ecadSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
105755eefee25Smacallan
105765c30ecadSmrg	    # KCC will only create a shared library if the output file
105775c30ecadSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
105785c30ecadSmrg	    # to its proper name (with version) after linking.
105795c30ecadSmrg	    _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'
10580dc99b369Smrg
105815c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
105825c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10583dc99b369Smrg
105845c30ecadSmrg	    # Archives containing C++ object files must be created using
105855c30ecadSmrg	    # the KAI C++ compiler.
105865c30ecadSmrg	    case $host in
105875c30ecadSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
105885c30ecadSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
105895c30ecadSmrg	    esac
105905c30ecadSmrg	    ;;
105915c30ecadSmrg          RCC*)
105925c30ecadSmrg	    # Rational C++ 2.4.1
105935c30ecadSmrg	    # FIXME: insert proper C++ library support
105945c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105955c30ecadSmrg	    ;;
105965c30ecadSmrg          cxx*)
105975c30ecadSmrg	    case $host in
105985c30ecadSmrg	      osf3*)
105995c30ecadSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
106005c30ecadSmrg	        _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'
106015c30ecadSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
106025c30ecadSmrg		;;
106035c30ecadSmrg	      *)
106045c30ecadSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
106055c30ecadSmrg	        _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'
106065c30ecadSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
106075c30ecadSmrg                  echo "-hidden">> $lib.exp~
106085c30ecadSmrg                  $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~
106095c30ecadSmrg                  $RM $lib.exp'
106105c30ecadSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
106115c30ecadSmrg		;;
106125c30ecadSmrg	    esac
10613dc99b369Smrg
106145c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
106155eefee25Smacallan
106165c30ecadSmrg	    # Commands to make compiler produce verbose output that lists
106175c30ecadSmrg	    # what "hidden" libraries, object files and flags are used when
106185c30ecadSmrg	    # linking a shared library.
106195c30ecadSmrg	    #
106205c30ecadSmrg	    # There doesn't appear to be a way to prevent this compiler from
106215c30ecadSmrg	    # explicitly linking system object files so we need to strip them
106225c30ecadSmrg	    # from the output so that they don't get included in the library
106235c30ecadSmrg	    # dependencies.
106245c30ecadSmrg	    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"'
106255c30ecadSmrg	    ;;
106265c30ecadSmrg	  *)
106275c30ecadSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
106285c30ecadSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
106295c30ecadSmrg	      case $host in
106305c30ecadSmrg	        osf3*)
106315c30ecadSmrg	          _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'
106325c30ecadSmrg		  ;;
106335c30ecadSmrg	        *)
106345c30ecadSmrg	          _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'
106355c30ecadSmrg		  ;;
106365c30ecadSmrg	      esac
106375eefee25Smacallan
106385c30ecadSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
106395c30ecadSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
106405eefee25Smacallan
106415c30ecadSmrg	      # Commands to make compiler produce verbose output that lists
106425c30ecadSmrg	      # what "hidden" libraries, object files and flags are used when
106435c30ecadSmrg	      # linking a shared library.
106445c30ecadSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
106455eefee25Smacallan
106465c30ecadSmrg	    else
106475c30ecadSmrg	      # FIXME: insert proper C++ library support
106485c30ecadSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
106495c30ecadSmrg	    fi
106505c30ecadSmrg	    ;;
106515c30ecadSmrg        esac
106525c30ecadSmrg        ;;
106535eefee25Smacallan
106545c30ecadSmrg      psos*)
106555c30ecadSmrg        # FIXME: insert proper C++ library support
106565c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
106575c30ecadSmrg        ;;
106585eefee25Smacallan
106595c30ecadSmrg      sunos4*)
106605c30ecadSmrg        case $cc_basename in
106615c30ecadSmrg          CC*)
106625c30ecadSmrg	    # Sun C++ 4.x
106635c30ecadSmrg	    # FIXME: insert proper C++ library support
106645c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
106655c30ecadSmrg	    ;;
106665c30ecadSmrg          lcc*)
106675c30ecadSmrg	    # Lucid
106685c30ecadSmrg	    # FIXME: insert proper C++ library support
106695c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
106705c30ecadSmrg	    ;;
106715c30ecadSmrg          *)
106725c30ecadSmrg	    # FIXME: insert proper C++ library support
106735c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
106745c30ecadSmrg	    ;;
106755c30ecadSmrg        esac
106765c30ecadSmrg        ;;
106775eefee25Smacallan
106785c30ecadSmrg      solaris*)
106795c30ecadSmrg        case $cc_basename in
106805c30ecadSmrg          CC* | sunCC*)
106815c30ecadSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
106825c30ecadSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
106835c30ecadSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
106845c30ecadSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
106855c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
106865c30ecadSmrg              $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'
106875eefee25Smacallan
106885c30ecadSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
106895c30ecadSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
106905c30ecadSmrg	    case $host_os in
106915c30ecadSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
106925c30ecadSmrg	      *)
106935c30ecadSmrg		# The compiler driver will combine and reorder linker options,
106945c30ecadSmrg		# but understands '-z linker_flag'.
106955c30ecadSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
106965c30ecadSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
106975c30ecadSmrg	        ;;
106985c30ecadSmrg	    esac
106995c30ecadSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
107005eefee25Smacallan
107015c30ecadSmrg	    output_verbose_link_cmd='func_echo_all'
107025eefee25Smacallan
107035c30ecadSmrg	    # Archives containing C++ object files must be created using
107045c30ecadSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
107055c30ecadSmrg	    # necessary to make sure instantiated templates are included
107065c30ecadSmrg	    # in the archive.
107075c30ecadSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
107085c30ecadSmrg	    ;;
107095c30ecadSmrg          gcx*)
107105c30ecadSmrg	    # Green Hills C++ Compiler
107115c30ecadSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
107125eefee25Smacallan
107135c30ecadSmrg	    # The C++ compiler must be used to create the archive.
107145c30ecadSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
107155c30ecadSmrg	    ;;
107165c30ecadSmrg          *)
107175c30ecadSmrg	    # GNU C++ compiler with Solaris linker
107185c30ecadSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
107195c30ecadSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
107205c30ecadSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
107215c30ecadSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
107225c30ecadSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
107235c30ecadSmrg                  $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
107245eefee25Smacallan
107255c30ecadSmrg	        # Commands to make compiler produce verbose output that lists
107265c30ecadSmrg	        # what "hidden" libraries, object files and flags are used when
107275c30ecadSmrg	        # linking a shared library.
107285c30ecadSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
107295c30ecadSmrg	      else
107305c30ecadSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
107315c30ecadSmrg	        # platform.
107325c30ecadSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
107335c30ecadSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
107345c30ecadSmrg                  $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
10735dc99b369Smrg
107365c30ecadSmrg	        # Commands to make compiler produce verbose output that lists
107375c30ecadSmrg	        # what "hidden" libraries, object files and flags are used when
107385c30ecadSmrg	        # linking a shared library.
107395c30ecadSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
107405c30ecadSmrg	      fi
1074162ab96baSmrg
107425c30ecadSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
107435c30ecadSmrg	      case $host_os in
107445c30ecadSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
107455c30ecadSmrg		*)
107465c30ecadSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
107475c30ecadSmrg		  ;;
107485c30ecadSmrg	      esac
107495c30ecadSmrg	    fi
107505c30ecadSmrg	    ;;
107515c30ecadSmrg        esac
107525c30ecadSmrg        ;;
10753dc99b369Smrg
107545c30ecadSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
107555c30ecadSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
107565c30ecadSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
107575c30ecadSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
107585c30ecadSmrg      runpath_var='LD_RUN_PATH'
10759dc99b369Smrg
107605c30ecadSmrg      case $cc_basename in
107615c30ecadSmrg        CC*)
107625c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107635c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107645c30ecadSmrg	  ;;
107655c30ecadSmrg	*)
107665c30ecadSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107675c30ecadSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107685c30ecadSmrg	  ;;
107695c30ecadSmrg      esac
107705c30ecadSmrg      ;;
10771dc99b369Smrg
107725c30ecadSmrg      sysv5* | sco3.2v5* | sco5v6*)
107735c30ecadSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
107745c30ecadSmrg	# link with -lc, and that would cause any symbols used from libc to
107755c30ecadSmrg	# always be unresolved, which means just about no library would
107765c30ecadSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
107775c30ecadSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
107785c30ecadSmrg	# as -z defs.
107795c30ecadSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
107805c30ecadSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
107815c30ecadSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
107825c30ecadSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
107835c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
107845c30ecadSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
107855c30ecadSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
107865c30ecadSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
107875c30ecadSmrg	runpath_var='LD_RUN_PATH'
10788dc99b369Smrg
107895c30ecadSmrg	case $cc_basename in
107905c30ecadSmrg          CC*)
107915c30ecadSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107925c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107935c30ecadSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
107945c30ecadSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
107955c30ecadSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
107965c30ecadSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
107975c30ecadSmrg	    ;;
107985c30ecadSmrg	  *)
107995c30ecadSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
108005c30ecadSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
108015c30ecadSmrg	    ;;
108025c30ecadSmrg	esac
108035c30ecadSmrg      ;;
10804dc99b369Smrg
108055c30ecadSmrg      tandem*)
108065c30ecadSmrg        case $cc_basename in
108075c30ecadSmrg          NCC*)
108085c30ecadSmrg	    # NonStop-UX NCC 3.20
108095c30ecadSmrg	    # FIXME: insert proper C++ library support
108105c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
108115c30ecadSmrg	    ;;
108125c30ecadSmrg          *)
108135c30ecadSmrg	    # FIXME: insert proper C++ library support
108145c30ecadSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
108155c30ecadSmrg	    ;;
108165c30ecadSmrg        esac
108175c30ecadSmrg        ;;
10818dc99b369Smrg
108195c30ecadSmrg      vxworks*)
108205c30ecadSmrg        # FIXME: insert proper C++ library support
108215c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
108225c30ecadSmrg        ;;
10823dc99b369Smrg
108245c30ecadSmrg      *)
108255c30ecadSmrg        # FIXME: insert proper C++ library support
108265c30ecadSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
108275c30ecadSmrg        ;;
108285c30ecadSmrg    esac
10829dc99b369Smrg
108305c30ecadSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
108315c30ecadSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
10832dc99b369Smrg
108335c30ecadSmrg    _LT_TAGVAR(GCC, $1)=$GXX
108345c30ecadSmrg    _LT_TAGVAR(LD, $1)=$LD
10835dc99b369Smrg
108365c30ecadSmrg    ## CAVEAT EMPTOR:
108375c30ecadSmrg    ## There is no encapsulation within the following macros, do not change
108385c30ecadSmrg    ## the running order or otherwise move them around unless you know exactly
108395c30ecadSmrg    ## what you are doing...
108405c30ecadSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
108415c30ecadSmrg    _LT_COMPILER_PIC($1)
108425c30ecadSmrg    _LT_COMPILER_C_O($1)
108435c30ecadSmrg    _LT_COMPILER_FILE_LOCKS($1)
108445c30ecadSmrg    _LT_LINKER_SHLIBS($1)
108455c30ecadSmrg    _LT_SYS_DYNAMIC_LINKER($1)
108465c30ecadSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
10847dc99b369Smrg
108485c30ecadSmrg    _LT_CONFIG($1)
108495c30ecadSmrg  fi # test -n "$compiler"
10850dc99b369Smrg
108515c30ecadSmrg  CC=$lt_save_CC
108525c30ecadSmrg  CFLAGS=$lt_save_CFLAGS
108535c30ecadSmrg  LDCXX=$LD
108545c30ecadSmrg  LD=$lt_save_LD
108555c30ecadSmrg  GCC=$lt_save_GCC
108565c30ecadSmrg  with_gnu_ld=$lt_save_with_gnu_ld
108575c30ecadSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
108585c30ecadSmrg  lt_cv_path_LD=$lt_save_path_LD
108595c30ecadSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
108605c30ecadSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
108615c30ecadSmrgfi # test yes != "$_lt_caught_CXX_error"
10862dc99b369Smrg
108635c30ecadSmrgAC_LANG_POP
108645c30ecadSmrg])# _LT_LANG_CXX_CONFIG
10865dc99b369Smrg
108665c30ecadSmrg
108675c30ecadSmrg# _LT_FUNC_STRIPNAME_CNF
108685c30ecadSmrg# ----------------------
108695c30ecadSmrg# func_stripname_cnf prefix suffix name
108705c30ecadSmrg# strip PREFIX and SUFFIX off of NAME.
108715c30ecadSmrg# PREFIX and SUFFIX must not contain globbing or regex special
108725c30ecadSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
108735c30ecadSmrg# dot (in which case that matches only a dot).
10874dc99b369Smrg#
108755c30ecadSmrg# This function is identical to the (non-XSI) version of func_stripname,
108765c30ecadSmrg# except this one can be used by m4 code that may be executed by configure,
108775c30ecadSmrg# rather than the libtool script.
108785c30ecadSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
108795c30ecadSmrgAC_REQUIRE([_LT_DECL_SED])
108805c30ecadSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
108815c30ecadSmrgfunc_stripname_cnf ()
108825c30ecadSmrg{
108835c30ecadSmrg  case @S|@2 in
108845c30ecadSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
108855c30ecadSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
108865c30ecadSmrg  esac
108875c30ecadSmrg} # func_stripname_cnf
108885c30ecadSmrg])# _LT_FUNC_STRIPNAME_CNF
10889dc99b369Smrg
10890dc99b369Smrg
108915c30ecadSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
108925c30ecadSmrg# ---------------------------------
108935c30ecadSmrg# Figure out "hidden" library dependencies from verbose
108945c30ecadSmrg# compiler output when linking a shared library.
108955c30ecadSmrg# Parse the compiler output and extract the necessary
108965c30ecadSmrg# objects, libraries and library flags.
108975c30ecadSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
108985c30ecadSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
108995c30ecadSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
109005c30ecadSmrg# Dependencies to place before and after the object being linked:
109015c30ecadSmrg_LT_TAGVAR(predep_objects, $1)=
109025c30ecadSmrg_LT_TAGVAR(postdep_objects, $1)=
109035c30ecadSmrg_LT_TAGVAR(predeps, $1)=
109045c30ecadSmrg_LT_TAGVAR(postdeps, $1)=
109055c30ecadSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
10906dc99b369Smrg
109075c30ecadSmrgdnl we can't use the lt_simple_compile_test_code here,
109085c30ecadSmrgdnl because it contains code intended for an executable,
109095c30ecadSmrgdnl not a library.  It's possible we should let each
109105c30ecadSmrgdnl tag define a new lt_????_link_test_code variable,
109115c30ecadSmrgdnl but it's only used here...
109125c30ecadSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
109135c30ecadSmrgint a;
109145c30ecadSmrgvoid foo (void) { a = 0; }
109155c30ecadSmrg_LT_EOF
109165c30ecadSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
109175c30ecadSmrgclass Foo
109185c30ecadSmrg{
109195c30ecadSmrgpublic:
109205c30ecadSmrg  Foo (void) { a = 0; }
109215c30ecadSmrgprivate:
109225c30ecadSmrg  int a;
109235c30ecadSmrg};
109245c30ecadSmrg_LT_EOF
109255c30ecadSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
109265c30ecadSmrg      subroutine foo
109275c30ecadSmrg      implicit none
109285c30ecadSmrg      integer*4 a
109295c30ecadSmrg      a=0
109305c30ecadSmrg      return
109315c30ecadSmrg      end
109325c30ecadSmrg_LT_EOF
109335c30ecadSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
109345c30ecadSmrg      subroutine foo
109355c30ecadSmrg      implicit none
109365c30ecadSmrg      integer a
109375c30ecadSmrg      a=0
109385c30ecadSmrg      return
109395c30ecadSmrg      end
109405c30ecadSmrg_LT_EOF
109415c30ecadSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
109425c30ecadSmrgpublic class foo {
109435c30ecadSmrg  private int a;
109445c30ecadSmrg  public void bar (void) {
109455c30ecadSmrg    a = 0;
109465c30ecadSmrg  }
109475c30ecadSmrg};
109485c30ecadSmrg_LT_EOF
109495c30ecadSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
109505c30ecadSmrgpackage foo
109515c30ecadSmrgfunc foo() {
109525c30ecadSmrg}
109535c30ecadSmrg_LT_EOF
109545c30ecadSmrg])
10955dc99b369Smrg
109565c30ecadSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
109575c30ecadSmrgcase "$CC $CFLAGS " in #(
109585c30ecadSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
109595c30ecadSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
109605c30ecadSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
109615c30ecadSmrgesac
109625c30ecadSmrg
109635c30ecadSmrgdnl Parse the compiler output and extract the necessary
109645c30ecadSmrgdnl objects, libraries and library flags.
109655c30ecadSmrgif AC_TRY_EVAL(ac_compile); then
109665c30ecadSmrg  # Parse the compiler output and extract the necessary
109675c30ecadSmrg  # objects, libraries and library flags.
109685c30ecadSmrg
109695c30ecadSmrg  # Sentinel used to keep track of whether or not we are before
109705c30ecadSmrg  # the conftest object file.
109715c30ecadSmrg  pre_test_object_deps_done=no
109725c30ecadSmrg
109735c30ecadSmrg  for p in `eval "$output_verbose_link_cmd"`; do
109745c30ecadSmrg    case $prev$p in
109755c30ecadSmrg
109765c30ecadSmrg    -L* | -R* | -l*)
109775c30ecadSmrg       # Some compilers place space between "-{L,R}" and the path.
109785c30ecadSmrg       # Remove the space.
109795c30ecadSmrg       if test x-L = "$p" ||
109805c30ecadSmrg          test x-R = "$p"; then
109815c30ecadSmrg	 prev=$p
109825c30ecadSmrg	 continue
109835c30ecadSmrg       fi
109845c30ecadSmrg
109855c30ecadSmrg       # Expand the sysroot to ease extracting the directories later.
109865c30ecadSmrg       if test -z "$prev"; then
109875c30ecadSmrg         case $p in
109885c30ecadSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
109895c30ecadSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
109905c30ecadSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
109915c30ecadSmrg         esac
109925c30ecadSmrg       fi
109935c30ecadSmrg       case $p in
109945c30ecadSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
109955c30ecadSmrg       esac
109965c30ecadSmrg       if test no = "$pre_test_object_deps_done"; then
109975c30ecadSmrg	 case $prev in
109985c30ecadSmrg	 -L | -R)
109995c30ecadSmrg	   # Internal compiler library paths should come after those
110005c30ecadSmrg	   # provided the user.  The postdeps already come after the
110015c30ecadSmrg	   # user supplied libs so there is no need to process them.
110025c30ecadSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
110035c30ecadSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
110045c30ecadSmrg	   else
110055c30ecadSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
110065c30ecadSmrg	   fi
110075c30ecadSmrg	   ;;
110085c30ecadSmrg	 # The "-l" case would never come before the object being
110095c30ecadSmrg	 # linked, so don't bother handling this case.
110105c30ecadSmrg	 esac
110115c30ecadSmrg       else
110125c30ecadSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
110135c30ecadSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
110145c30ecadSmrg	 else
110155c30ecadSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
110165c30ecadSmrg	 fi
110175c30ecadSmrg       fi
110185c30ecadSmrg       prev=
110195c30ecadSmrg       ;;
11020dc99b369Smrg
110215c30ecadSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
110225c30ecadSmrg    *.$objext)
110235c30ecadSmrg       # This assumes that the test object file only shows up
110245c30ecadSmrg       # once in the compiler output.
110255c30ecadSmrg       if test "$p" = "conftest.$objext"; then
110265c30ecadSmrg	 pre_test_object_deps_done=yes
110275c30ecadSmrg	 continue
110285c30ecadSmrg       fi
11029dc99b369Smrg
110305c30ecadSmrg       if test no = "$pre_test_object_deps_done"; then
110315c30ecadSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
110325c30ecadSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
110335c30ecadSmrg	 else
110345c30ecadSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
110355c30ecadSmrg	 fi
110365c30ecadSmrg       else
110375c30ecadSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
110385c30ecadSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
110395c30ecadSmrg	 else
110405c30ecadSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
110415c30ecadSmrg	 fi
110425c30ecadSmrg       fi
110435c30ecadSmrg       ;;
11044dc99b369Smrg
110455c30ecadSmrg    *) ;; # Ignore the rest.
11046dc99b369Smrg
110475c30ecadSmrg    esac
110485c30ecadSmrg  done
110495c30ecadSmrg
110505c30ecadSmrg  # Clean up.
110515c30ecadSmrg  rm -f a.out a.exe
11052dc99b369Smrgelse
110535c30ecadSmrg  echo "libtool.m4: error: problem compiling $1 test program"
11054dc99b369Smrgfi
11055dc99b369Smrg
110565c30ecadSmrg$RM -f confest.$objext
110575c30ecadSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
110585c30ecadSmrg
110595c30ecadSmrg# PORTME: override above test on systems where it is broken
110605c30ecadSmrgm4_if([$1], [CXX],
110615c30ecadSmrg[case $host_os in
110625c30ecadSmrginterix[[3-9]]*)
110635c30ecadSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
110645c30ecadSmrg  # hack all around it, let's just trust "g++" to DTRT.
110655c30ecadSmrg  _LT_TAGVAR(predep_objects,$1)=
110665c30ecadSmrg  _LT_TAGVAR(postdep_objects,$1)=
110675c30ecadSmrg  _LT_TAGVAR(postdeps,$1)=
110685c30ecadSmrg  ;;
110695c30ecadSmrgesac
110705c30ecadSmrg])
110715c30ecadSmrg
110725c30ecadSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
110735c30ecadSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
110745c30ecadSmrgesac
110755c30ecadSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
110765c30ecadSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
110775c30ecadSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
11078dc99b369Smrgfi
110795c30ecadSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
110805c30ecadSmrg    [The directories searched by this compiler when creating a shared library])
110815c30ecadSmrg_LT_TAGDECL([], [predep_objects], [1],
110825c30ecadSmrg    [Dependencies to place before and after the objects being linked to
110835c30ecadSmrg    create a shared library])
110845c30ecadSmrg_LT_TAGDECL([], [postdep_objects], [1])
110855c30ecadSmrg_LT_TAGDECL([], [predeps], [1])
110865c30ecadSmrg_LT_TAGDECL([], [postdeps], [1])
110875c30ecadSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
110885c30ecadSmrg    [The library search path used internally by the compiler when linking
110895c30ecadSmrg    a shared library])
110905c30ecadSmrg])# _LT_SYS_HIDDEN_LIBDEPS
11091dc99b369Smrg
110925c30ecadSmrg
110935c30ecadSmrg# _LT_LANG_F77_CONFIG([TAG])
110945c30ecadSmrg# --------------------------
110955c30ecadSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
110965c30ecadSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
110975c30ecadSmrg# to write the compiler configuration to 'libtool'.
110985c30ecadSmrgm4_defun([_LT_LANG_F77_CONFIG],
110995c30ecadSmrg[AC_LANG_PUSH(Fortran 77)
111005c30ecadSmrgif test -z "$F77" || test no = "$F77"; then
111015c30ecadSmrg  _lt_disable_F77=yes
11102dc99b369Smrgfi
11103dc99b369Smrg
111045c30ecadSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
111055c30ecadSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
111065c30ecadSmrg_LT_TAGVAR(always_export_symbols, $1)=no
111075c30ecadSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
111085c30ecadSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
111095c30ecadSmrg_LT_TAGVAR(hardcode_direct, $1)=no
111105c30ecadSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
111115c30ecadSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
111125c30ecadSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
111135c30ecadSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
111145c30ecadSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
111155c30ecadSmrg_LT_TAGVAR(inherit_rpath, $1)=no
111165c30ecadSmrg_LT_TAGVAR(module_cmds, $1)=
111175c30ecadSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
111185c30ecadSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
111195c30ecadSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
111205c30ecadSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
111215c30ecadSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
111225c30ecadSmrg_LT_TAGVAR(no_undefined_flag, $1)=
111235c30ecadSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
111245c30ecadSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
111255c30ecadSmrg
111265c30ecadSmrg# Source file extension for f77 test sources.
111275c30ecadSmrgac_ext=f
11128dc99b369Smrg
111295c30ecadSmrg# Object file extension for compiled f77 test sources.
111305c30ecadSmrgobjext=o
111315c30ecadSmrg_LT_TAGVAR(objext, $1)=$objext
11132dc99b369Smrg
111335c30ecadSmrg# No sense in running all these tests if we already determined that
111345c30ecadSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
111355c30ecadSmrg# are currently assumed to apply to all compilers on this platform,
111365c30ecadSmrg# and will be corrupted by setting them based on a non-working compiler.
111375c30ecadSmrgif test yes != "$_lt_disable_F77"; then
111385c30ecadSmrg  # Code to be used in simple compile tests
111395c30ecadSmrg  lt_simple_compile_test_code="\
111405c30ecadSmrg      subroutine t
111415c30ecadSmrg      return
111425c30ecadSmrg      end
111435c30ecadSmrg"
11144dc99b369Smrg
111455c30ecadSmrg  # Code to be used in simple link tests
111465c30ecadSmrg  lt_simple_link_test_code="\
111475c30ecadSmrg      program t
111485c30ecadSmrg      end
111495c30ecadSmrg"
11150dc99b369Smrg
111515c30ecadSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
111525c30ecadSmrg  _LT_TAG_COMPILER
11153dc99b369Smrg
111545c30ecadSmrg  # save warnings/boilerplate of simple test code
111555c30ecadSmrg  _LT_COMPILER_BOILERPLATE
111565c30ecadSmrg  _LT_LINKER_BOILERPLATE
11157dc99b369Smrg
111585c30ecadSmrg  # Allow CC to be a program name with arguments.
111595c30ecadSmrg  lt_save_CC=$CC
111605c30ecadSmrg  lt_save_GCC=$GCC
111615c30ecadSmrg  lt_save_CFLAGS=$CFLAGS
111625c30ecadSmrg  CC=${F77-"f77"}
111635c30ecadSmrg  CFLAGS=$FFLAGS
111645c30ecadSmrg  compiler=$CC
111655c30ecadSmrg  _LT_TAGVAR(compiler, $1)=$CC
111665c30ecadSmrg  _LT_CC_BASENAME([$compiler])
111675c30ecadSmrg  GCC=$G77
111685c30ecadSmrg  if test -n "$compiler"; then
111695c30ecadSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
111705c30ecadSmrg    AC_MSG_RESULT([$can_build_shared])
11171dc99b369Smrg
111725c30ecadSmrg    AC_MSG_CHECKING([whether to build shared libraries])
111735c30ecadSmrg    test no = "$can_build_shared" && enable_shared=no
111745c30ecadSmrg
111755c30ecadSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
111765c30ecadSmrg    # are all built from PIC.
111775c30ecadSmrg    case $host_os in
111785c30ecadSmrg      aix3*)
111795c30ecadSmrg        test yes = "$enable_shared" && enable_static=no
111805c30ecadSmrg        if test -n "$RANLIB"; then
111815c30ecadSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
111825c30ecadSmrg          postinstall_cmds='$RANLIB $lib'
111835c30ecadSmrg        fi
111845c30ecadSmrg        ;;
111855c30ecadSmrg      aix[[4-9]]*)
111865c30ecadSmrg	if test ia64 != "$host_cpu"; then
111875c30ecadSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
111885c30ecadSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
111895c30ecadSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
111905c30ecadSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
111915c30ecadSmrg	  esac
111925c30ecadSmrg	fi
111935c30ecadSmrg        ;;
111945c30ecadSmrg    esac
111955c30ecadSmrg    AC_MSG_RESULT([$enable_shared])
111965c30ecadSmrg
111975c30ecadSmrg    AC_MSG_CHECKING([whether to build static libraries])
111985c30ecadSmrg    # Make sure either enable_shared or enable_static is yes.
111995c30ecadSmrg    test yes = "$enable_shared" || enable_static=yes
112005c30ecadSmrg    AC_MSG_RESULT([$enable_static])
11201dc99b369Smrg
112025c30ecadSmrg    _LT_TAGVAR(GCC, $1)=$G77
112035c30ecadSmrg    _LT_TAGVAR(LD, $1)=$LD
11204dc99b369Smrg
112055c30ecadSmrg    ## CAVEAT EMPTOR:
112065c30ecadSmrg    ## There is no encapsulation within the following macros, do not change
112075c30ecadSmrg    ## the running order or otherwise move them around unless you know exactly
112085c30ecadSmrg    ## what you are doing...
112095c30ecadSmrg    _LT_COMPILER_PIC($1)
112105c30ecadSmrg    _LT_COMPILER_C_O($1)
112115c30ecadSmrg    _LT_COMPILER_FILE_LOCKS($1)
112125c30ecadSmrg    _LT_LINKER_SHLIBS($1)
112135c30ecadSmrg    _LT_SYS_DYNAMIC_LINKER($1)
112145c30ecadSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
11215dc99b369Smrg
112165c30ecadSmrg    _LT_CONFIG($1)
112175c30ecadSmrg  fi # test -n "$compiler"
11218dc99b369Smrg
112195c30ecadSmrg  GCC=$lt_save_GCC
112205c30ecadSmrg  CC=$lt_save_CC
112215c30ecadSmrg  CFLAGS=$lt_save_CFLAGS
112225c30ecadSmrgfi # test yes != "$_lt_disable_F77"
11223dc99b369Smrg
112245c30ecadSmrgAC_LANG_POP
112255c30ecadSmrg])# _LT_LANG_F77_CONFIG
1122662ab96baSmrg
1122762ab96baSmrg
112285c30ecadSmrg# _LT_LANG_FC_CONFIG([TAG])
112295c30ecadSmrg# -------------------------
112305c30ecadSmrg# Ensure that the configuration variables for a Fortran compiler are
112315c30ecadSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
112325c30ecadSmrg# to write the compiler configuration to 'libtool'.
112335c30ecadSmrgm4_defun([_LT_LANG_FC_CONFIG],
112345c30ecadSmrg[AC_LANG_PUSH(Fortran)
112355c30ecadSmrg
112365c30ecadSmrgif test -z "$FC" || test no = "$FC"; then
112375c30ecadSmrg  _lt_disable_FC=yes
1123862ab96baSmrgfi
1123962ab96baSmrg
112405c30ecadSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
112415c30ecadSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
112425c30ecadSmrg_LT_TAGVAR(always_export_symbols, $1)=no
112435c30ecadSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
112445c30ecadSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
112455c30ecadSmrg_LT_TAGVAR(hardcode_direct, $1)=no
112465c30ecadSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
112475c30ecadSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
112485c30ecadSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
112495c30ecadSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
112505c30ecadSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
112515c30ecadSmrg_LT_TAGVAR(inherit_rpath, $1)=no
112525c30ecadSmrg_LT_TAGVAR(module_cmds, $1)=
112535c30ecadSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
112545c30ecadSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
112555c30ecadSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
112565c30ecadSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
112575c30ecadSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
112585c30ecadSmrg_LT_TAGVAR(no_undefined_flag, $1)=
112595c30ecadSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
112605c30ecadSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
112615c30ecadSmrg
112625c30ecadSmrg# Source file extension for fc test sources.
112635c30ecadSmrgac_ext=${ac_fc_srcext-f}
112645c30ecadSmrg
112655c30ecadSmrg# Object file extension for compiled fc test sources.
112665c30ecadSmrgobjext=o
112675c30ecadSmrg_LT_TAGVAR(objext, $1)=$objext
112685c30ecadSmrg
112695c30ecadSmrg# No sense in running all these tests if we already determined that
112705c30ecadSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
112715c30ecadSmrg# are currently assumed to apply to all compilers on this platform,
112725c30ecadSmrg# and will be corrupted by setting them based on a non-working compiler.
112735c30ecadSmrgif test yes != "$_lt_disable_FC"; then
112745c30ecadSmrg  # Code to be used in simple compile tests
112755c30ecadSmrg  lt_simple_compile_test_code="\
112765c30ecadSmrg      subroutine t
112775c30ecadSmrg      return
112785c30ecadSmrg      end
112795c30ecadSmrg"
112805c30ecadSmrg
112815c30ecadSmrg  # Code to be used in simple link tests
112825c30ecadSmrg  lt_simple_link_test_code="\
112835c30ecadSmrg      program t
112845c30ecadSmrg      end
112855c30ecadSmrg"
112865c30ecadSmrg
112875c30ecadSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
112885c30ecadSmrg  _LT_TAG_COMPILER
112895c30ecadSmrg
112905c30ecadSmrg  # save warnings/boilerplate of simple test code
112915c30ecadSmrg  _LT_COMPILER_BOILERPLATE
112925c30ecadSmrg  _LT_LINKER_BOILERPLATE
112935c30ecadSmrg
112945c30ecadSmrg  # Allow CC to be a program name with arguments.
112955c30ecadSmrg  lt_save_CC=$CC
112965c30ecadSmrg  lt_save_GCC=$GCC
112975c30ecadSmrg  lt_save_CFLAGS=$CFLAGS
112985c30ecadSmrg  CC=${FC-"f95"}
112995c30ecadSmrg  CFLAGS=$FCFLAGS
113005c30ecadSmrg  compiler=$CC
113015c30ecadSmrg  GCC=$ac_cv_fc_compiler_gnu
113025c30ecadSmrg
113035c30ecadSmrg  _LT_TAGVAR(compiler, $1)=$CC
113045c30ecadSmrg  _LT_CC_BASENAME([$compiler])
113055c30ecadSmrg
113065c30ecadSmrg  if test -n "$compiler"; then
113075c30ecadSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
113085c30ecadSmrg    AC_MSG_RESULT([$can_build_shared])
113095c30ecadSmrg
113105c30ecadSmrg    AC_MSG_CHECKING([whether to build shared libraries])
113115c30ecadSmrg    test no = "$can_build_shared" && enable_shared=no
113125c30ecadSmrg
113135c30ecadSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
113145c30ecadSmrg    # are all built from PIC.
113155c30ecadSmrg    case $host_os in
113165c30ecadSmrg      aix3*)
113175c30ecadSmrg        test yes = "$enable_shared" && enable_static=no
113185c30ecadSmrg        if test -n "$RANLIB"; then
113195c30ecadSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
113205c30ecadSmrg          postinstall_cmds='$RANLIB $lib'
113215c30ecadSmrg        fi
113225c30ecadSmrg        ;;
113235c30ecadSmrg      aix[[4-9]]*)
113245c30ecadSmrg	if test ia64 != "$host_cpu"; then
113255c30ecadSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
113265c30ecadSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
113275c30ecadSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
113285c30ecadSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
113295c30ecadSmrg	  esac
113305c30ecadSmrg	fi
113315c30ecadSmrg        ;;
113325c30ecadSmrg    esac
113335c30ecadSmrg    AC_MSG_RESULT([$enable_shared])
113345c30ecadSmrg
113355c30ecadSmrg    AC_MSG_CHECKING([whether to build static libraries])
113365c30ecadSmrg    # Make sure either enable_shared or enable_static is yes.
113375c30ecadSmrg    test yes = "$enable_shared" || enable_static=yes
113385c30ecadSmrg    AC_MSG_RESULT([$enable_static])
1133962ab96baSmrg
113405c30ecadSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
113415c30ecadSmrg    _LT_TAGVAR(LD, $1)=$LD
11342dc99b369Smrg
113435c30ecadSmrg    ## CAVEAT EMPTOR:
113445c30ecadSmrg    ## There is no encapsulation within the following macros, do not change
113455c30ecadSmrg    ## the running order or otherwise move them around unless you know exactly
113465c30ecadSmrg    ## what you are doing...
113475c30ecadSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
113485c30ecadSmrg    _LT_COMPILER_PIC($1)
113495c30ecadSmrg    _LT_COMPILER_C_O($1)
113505c30ecadSmrg    _LT_COMPILER_FILE_LOCKS($1)
113515c30ecadSmrg    _LT_LINKER_SHLIBS($1)
113525c30ecadSmrg    _LT_SYS_DYNAMIC_LINKER($1)
113535c30ecadSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
1135462ab96baSmrg
113555c30ecadSmrg    _LT_CONFIG($1)
113565c30ecadSmrg  fi # test -n "$compiler"
1135762ab96baSmrg
113585c30ecadSmrg  GCC=$lt_save_GCC
113595c30ecadSmrg  CC=$lt_save_CC
113605c30ecadSmrg  CFLAGS=$lt_save_CFLAGS
113615c30ecadSmrgfi # test yes != "$_lt_disable_FC"
1136262ab96baSmrg
113635c30ecadSmrgAC_LANG_POP
113645c30ecadSmrg])# _LT_LANG_FC_CONFIG
11365dc99b369Smrg
11366dc99b369Smrg
113675c30ecadSmrg# _LT_LANG_GCJ_CONFIG([TAG])
113685c30ecadSmrg# --------------------------
113695c30ecadSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
113705c30ecadSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
113715c30ecadSmrg# to write the compiler configuration to 'libtool'.
113725c30ecadSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
113735c30ecadSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
113745c30ecadSmrgAC_LANG_SAVE
11375dc99b369Smrg
113765c30ecadSmrg# Source file extension for Java test sources.
113775c30ecadSmrgac_ext=java
1137862ab96baSmrg
113795c30ecadSmrg# Object file extension for compiled Java test sources.
113805c30ecadSmrgobjext=o
113815c30ecadSmrg_LT_TAGVAR(objext, $1)=$objext
113825eefee25Smacallan
113835c30ecadSmrg# Code to be used in simple compile tests
113845c30ecadSmrglt_simple_compile_test_code="class foo {}"
113855eefee25Smacallan
113865c30ecadSmrg# Code to be used in simple link tests
113875c30ecadSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
113885eefee25Smacallan
113895c30ecadSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
113905c30ecadSmrg_LT_TAG_COMPILER
113915eefee25Smacallan
113925c30ecadSmrg# save warnings/boilerplate of simple test code
113935c30ecadSmrg_LT_COMPILER_BOILERPLATE
113945c30ecadSmrg_LT_LINKER_BOILERPLATE
1139562ab96baSmrg
113965c30ecadSmrg# Allow CC to be a program name with arguments.
113975c30ecadSmrglt_save_CC=$CC
113985c30ecadSmrglt_save_CFLAGS=$CFLAGS
113995c30ecadSmrglt_save_GCC=$GCC
114005c30ecadSmrgGCC=yes
114015c30ecadSmrgCC=${GCJ-"gcj"}
114025c30ecadSmrgCFLAGS=$GCJFLAGS
114035c30ecadSmrgcompiler=$CC
114045c30ecadSmrg_LT_TAGVAR(compiler, $1)=$CC
114055c30ecadSmrg_LT_TAGVAR(LD, $1)=$LD
114065c30ecadSmrg_LT_CC_BASENAME([$compiler])
11407dc99b369Smrg
114085c30ecadSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
114095c30ecadSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11410dc99b369Smrg
114115c30ecadSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
114125c30ecadSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
114135c30ecadSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11414dc99b369Smrg
114155c30ecadSmrgif test -n "$compiler"; then
114165c30ecadSmrg  _LT_COMPILER_NO_RTTI($1)
114175c30ecadSmrg  _LT_COMPILER_PIC($1)
114185c30ecadSmrg  _LT_COMPILER_C_O($1)
114195c30ecadSmrg  _LT_COMPILER_FILE_LOCKS($1)
114205c30ecadSmrg  _LT_LINKER_SHLIBS($1)
114215c30ecadSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
114225c30ecadSmrg
114235c30ecadSmrg  _LT_CONFIG($1)
1142462ab96baSmrgfi
1142562ab96baSmrg
114265c30ecadSmrgAC_LANG_RESTORE
1142762ab96baSmrg
114285c30ecadSmrgGCC=$lt_save_GCC
114295c30ecadSmrgCC=$lt_save_CC
114305c30ecadSmrgCFLAGS=$lt_save_CFLAGS
114315c30ecadSmrg])# _LT_LANG_GCJ_CONFIG
1143262ab96baSmrg
114335c30ecadSmrg
114345c30ecadSmrg# _LT_LANG_GO_CONFIG([TAG])
1143562ab96baSmrg# --------------------------
114365c30ecadSmrg# Ensure that the configuration variables for the GNU Go compiler
114375c30ecadSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
114385c30ecadSmrg# to write the compiler configuration to 'libtool'.
114395c30ecadSmrgm4_defun([_LT_LANG_GO_CONFIG],
114405c30ecadSmrg[AC_REQUIRE([LT_PROG_GO])dnl
114415c30ecadSmrgAC_LANG_SAVE
1144262ab96baSmrg
114435c30ecadSmrg# Source file extension for Go test sources.
114445c30ecadSmrgac_ext=go
11445dc99b369Smrg
114465c30ecadSmrg# Object file extension for compiled Go test sources.
114475c30ecadSmrgobjext=o
114485c30ecadSmrg_LT_TAGVAR(objext, $1)=$objext
11449dc99b369Smrg
114505c30ecadSmrg# Code to be used in simple compile tests
114515c30ecadSmrglt_simple_compile_test_code="package main; func main() { }"
1145262ab96baSmrg
114535c30ecadSmrg# Code to be used in simple link tests
114545c30ecadSmrglt_simple_link_test_code='package main; func main() { }'
1145562ab96baSmrg
114565c30ecadSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
114575c30ecadSmrg_LT_TAG_COMPILER
11458dc99b369Smrg
114595c30ecadSmrg# save warnings/boilerplate of simple test code
114605c30ecadSmrg_LT_COMPILER_BOILERPLATE
114615c30ecadSmrg_LT_LINKER_BOILERPLATE
11462dc99b369Smrg
114635c30ecadSmrg# Allow CC to be a program name with arguments.
114645c30ecadSmrglt_save_CC=$CC
114655c30ecadSmrglt_save_CFLAGS=$CFLAGS
114665c30ecadSmrglt_save_GCC=$GCC
114675c30ecadSmrgGCC=yes
114685c30ecadSmrgCC=${GOC-"gccgo"}
114695c30ecadSmrgCFLAGS=$GOFLAGS
114705c30ecadSmrgcompiler=$CC
114715c30ecadSmrg_LT_TAGVAR(compiler, $1)=$CC
114725c30ecadSmrg_LT_TAGVAR(LD, $1)=$LD
114735c30ecadSmrg_LT_CC_BASENAME([$compiler])
11474dc99b369Smrg
114755c30ecadSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
114765c30ecadSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11477dc99b369Smrg
114785c30ecadSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
114795c30ecadSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
114805c30ecadSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
11481dc99b369Smrg
114825c30ecadSmrgif test -n "$compiler"; then
114835c30ecadSmrg  _LT_COMPILER_NO_RTTI($1)
114845c30ecadSmrg  _LT_COMPILER_PIC($1)
114855c30ecadSmrg  _LT_COMPILER_C_O($1)
114865c30ecadSmrg  _LT_COMPILER_FILE_LOCKS($1)
114875c30ecadSmrg  _LT_LINKER_SHLIBS($1)
114885c30ecadSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
11489dc99b369Smrg
114905c30ecadSmrg  _LT_CONFIG($1)
11491dc99b369Smrgfi
11492dc99b369Smrg
114935c30ecadSmrgAC_LANG_RESTORE
11494dc99b369Smrg
114955c30ecadSmrgGCC=$lt_save_GCC
114965c30ecadSmrgCC=$lt_save_CC
114975c30ecadSmrgCFLAGS=$lt_save_CFLAGS
114985c30ecadSmrg])# _LT_LANG_GO_CONFIG
11499dc99b369Smrg
11500dc99b369Smrg
115015c30ecadSmrg# _LT_LANG_RC_CONFIG([TAG])
115025c30ecadSmrg# -------------------------
115035c30ecadSmrg# Ensure that the configuration variables for the Windows resource compiler
115045c30ecadSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
115055c30ecadSmrg# to write the compiler configuration to 'libtool'.
115065c30ecadSmrgm4_defun([_LT_LANG_RC_CONFIG],
115075c30ecadSmrg[AC_REQUIRE([LT_PROG_RC])dnl
115085c30ecadSmrgAC_LANG_SAVE
11509dc99b369Smrg
115105c30ecadSmrg# Source file extension for RC test sources.
115115c30ecadSmrgac_ext=rc
11512dc99b369Smrg
115135c30ecadSmrg# Object file extension for compiled RC test sources.
115145c30ecadSmrgobjext=o
115155c30ecadSmrg_LT_TAGVAR(objext, $1)=$objext
11516dc99b369Smrg
115175c30ecadSmrg# Code to be used in simple compile tests
115185c30ecadSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
11519dc99b369Smrg
115205c30ecadSmrg# Code to be used in simple link tests
115215c30ecadSmrglt_simple_link_test_code=$lt_simple_compile_test_code
11522dc99b369Smrg
115235c30ecadSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
115245c30ecadSmrg_LT_TAG_COMPILER
11525dc99b369Smrg
115265c30ecadSmrg# save warnings/boilerplate of simple test code
115275c30ecadSmrg_LT_COMPILER_BOILERPLATE
115285c30ecadSmrg_LT_LINKER_BOILERPLATE
11529dc99b369Smrg
115305c30ecadSmrg# Allow CC to be a program name with arguments.
115315c30ecadSmrglt_save_CC=$CC
115325c30ecadSmrglt_save_CFLAGS=$CFLAGS
115335c30ecadSmrglt_save_GCC=$GCC
115345c30ecadSmrgGCC=
115355c30ecadSmrgCC=${RC-"windres"}
115365c30ecadSmrgCFLAGS=
115375c30ecadSmrgcompiler=$CC
115385c30ecadSmrg_LT_TAGVAR(compiler, $1)=$CC
115395c30ecadSmrg_LT_CC_BASENAME([$compiler])
115405c30ecadSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
11541dc99b369Smrg
115425c30ecadSmrgif test -n "$compiler"; then
115435c30ecadSmrg  :
115445c30ecadSmrg  _LT_CONFIG($1)
11545dc99b369Smrgfi
11546dc99b369Smrg
115475c30ecadSmrgGCC=$lt_save_GCC
115485c30ecadSmrgAC_LANG_RESTORE
115495c30ecadSmrgCC=$lt_save_CC
115505c30ecadSmrgCFLAGS=$lt_save_CFLAGS
115515c30ecadSmrg])# _LT_LANG_RC_CONFIG
11552dc99b369Smrg
11553dc99b369Smrg
115545c30ecadSmrg# LT_PROG_GCJ
115555c30ecadSmrg# -----------
115565c30ecadSmrgAC_DEFUN([LT_PROG_GCJ],
115575c30ecadSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
115585c30ecadSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
115595c30ecadSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
115605c30ecadSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
115615c30ecadSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
115625c30ecadSmrg])
11563dc99b369Smrg
115645c30ecadSmrg# Old name:
115655c30ecadSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
115665c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
115675c30ecadSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
11568dc99b369Smrg
11569dc99b369Smrg
115705c30ecadSmrg# LT_PROG_GO
115715c30ecadSmrg# ----------
115725c30ecadSmrgAC_DEFUN([LT_PROG_GO],
115735c30ecadSmrg[AC_CHECK_TOOL(GOC, gccgo,)
115745c30ecadSmrg])
11575dc99b369Smrg
11576dc99b369Smrg
115775c30ecadSmrg# LT_PROG_RC
115785c30ecadSmrg# ----------
115795c30ecadSmrgAC_DEFUN([LT_PROG_RC],
115805c30ecadSmrg[AC_CHECK_TOOL(RC, windres,)
115815c30ecadSmrg])
11582dc99b369Smrg
115835c30ecadSmrg# Old name:
115845c30ecadSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
115855c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
115865c30ecadSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
115875c30ecadSmrg
115885c30ecadSmrg
115895c30ecadSmrg# _LT_DECL_EGREP
115905c30ecadSmrg# --------------
115915c30ecadSmrg# If we don't have a new enough Autoconf to choose the best grep
115925c30ecadSmrg# available, choose the one first in the user's PATH.
115935c30ecadSmrgm4_defun([_LT_DECL_EGREP],
115945c30ecadSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
115955c30ecadSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
115965c30ecadSmrgtest -z "$GREP" && GREP=grep
115975c30ecadSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
115985c30ecadSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
115995c30ecadSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
116005c30ecadSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
116015c30ecadSmrgAC_SUBST([GREP])
116025c30ecadSmrg])
116035c30ecadSmrg
116045c30ecadSmrg
116055c30ecadSmrg# _LT_DECL_OBJDUMP
116065c30ecadSmrg# --------------
116075c30ecadSmrg# If we don't have a new enough Autoconf to choose the best objdump
116085c30ecadSmrg# available, choose the one first in the user's PATH.
116095c30ecadSmrgm4_defun([_LT_DECL_OBJDUMP],
116105c30ecadSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
116115c30ecadSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
116125c30ecadSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
116135c30ecadSmrgAC_SUBST([OBJDUMP])
116145c30ecadSmrg])
116155c30ecadSmrg
116165c30ecadSmrg# _LT_DECL_DLLTOOL
116175c30ecadSmrg# ----------------
116185c30ecadSmrg# Ensure DLLTOOL variable is set.
116195c30ecadSmrgm4_defun([_LT_DECL_DLLTOOL],
116205c30ecadSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
116215c30ecadSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
116225c30ecadSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
116235c30ecadSmrgAC_SUBST([DLLTOOL])
116245c30ecadSmrg])
11625dc99b369Smrg
116265c30ecadSmrg# _LT_DECL_FILECMD
11627dc99b369Smrg# ----------------
116285c30ecadSmrg# Check for a file(cmd) program that can be used to detect file type and magic
116295c30ecadSmrgm4_defun([_LT_DECL_FILECMD],
116305c30ecadSmrg[AC_CHECK_TOOL([FILECMD], [file], [:])
116315c30ecadSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
116325c30ecadSmrg])# _LD_DECL_FILECMD
1163362ab96baSmrg
116345c30ecadSmrg# _LT_DECL_SED
116355c30ecadSmrg# ------------
116365c30ecadSmrg# Check for a fully-functional sed program, that truncates
116375c30ecadSmrg# as few characters as possible.  Prefer GNU sed if found.
116385c30ecadSmrgm4_defun([_LT_DECL_SED],
116395c30ecadSmrg[AC_PROG_SED
116405c30ecadSmrgtest -z "$SED" && SED=sed
116415c30ecadSmrgXsed="$SED -e 1s/^X//"
116425c30ecadSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
116435c30ecadSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
116445c30ecadSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
116455c30ecadSmrg])# _LT_DECL_SED
116465c30ecadSmrg
116475c30ecadSmrgm4_ifndef([AC_PROG_SED], [
116485c30ecadSmrg# NOTE: This macro has been submitted for inclusion into   #
116495c30ecadSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
116505c30ecadSmrg#  a released version of Autoconf we should remove this    #
116515c30ecadSmrg#  macro and use it instead.                               #
116525c30ecadSmrg
116535c30ecadSmrgm4_defun([AC_PROG_SED],
116545c30ecadSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
116555c30ecadSmrgAC_CACHE_VAL(lt_cv_path_SED,
116565c30ecadSmrg[# Loop through the user's path and test for sed and gsed.
116575c30ecadSmrg# Then use that list of sed's as ones to test for truncation.
116585c30ecadSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
116595c30ecadSmrgfor as_dir in $PATH
116605c30ecadSmrgdo
116615c30ecadSmrg  IFS=$as_save_IFS
116625c30ecadSmrg  test -z "$as_dir" && as_dir=.
116635c30ecadSmrg  for lt_ac_prog in sed gsed; do
116645c30ecadSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
116655c30ecadSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
116665c30ecadSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
116675c30ecadSmrg      fi
116685c30ecadSmrg    done
116695c30ecadSmrg  done
116705c30ecadSmrgdone
116715c30ecadSmrgIFS=$as_save_IFS
116725c30ecadSmrglt_ac_max=0
116735c30ecadSmrglt_ac_count=0
116745c30ecadSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
116755c30ecadSmrg# along with /bin/sed that truncates output.
116765c30ecadSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
116775c30ecadSmrg  test ! -f "$lt_ac_sed" && continue
116785c30ecadSmrg  cat /dev/null > conftest.in
116795c30ecadSmrg  lt_ac_count=0
116805c30ecadSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
116815c30ecadSmrg  # Check for GNU sed and select it if it is found.
116825c30ecadSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
116835c30ecadSmrg    lt_cv_path_SED=$lt_ac_sed
116845c30ecadSmrg    break
116855c30ecadSmrg  fi
116865c30ecadSmrg  while true; do
116875c30ecadSmrg    cat conftest.in conftest.in >conftest.tmp
116885c30ecadSmrg    mv conftest.tmp conftest.in
116895c30ecadSmrg    cp conftest.in conftest.nl
116905c30ecadSmrg    echo >>conftest.nl
116915c30ecadSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
116925c30ecadSmrg    cmp -s conftest.out conftest.nl || break
116935c30ecadSmrg    # 10000 chars as input seems more than enough
116945c30ecadSmrg    test 10 -lt "$lt_ac_count" && break
116955c30ecadSmrg    lt_ac_count=`expr $lt_ac_count + 1`
116965c30ecadSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
116975c30ecadSmrg      lt_ac_max=$lt_ac_count
116985c30ecadSmrg      lt_cv_path_SED=$lt_ac_sed
116995c30ecadSmrg    fi
117005c30ecadSmrg  done
117015c30ecadSmrgdone
1170262ab96baSmrg])
117035c30ecadSmrgSED=$lt_cv_path_SED
117045c30ecadSmrgAC_SUBST([SED])
117055c30ecadSmrgAC_MSG_RESULT([$SED])
117065c30ecadSmrg])#AC_PROG_SED
117075c30ecadSmrg])#m4_ifndef
1170862ab96baSmrg
117095c30ecadSmrg# Old name:
117105c30ecadSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
117115c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
117125c30ecadSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
1171362ab96baSmrg
117145eefee25Smacallan
117155c30ecadSmrg# _LT_CHECK_SHELL_FEATURES
117165c30ecadSmrg# ------------------------
117175c30ecadSmrg# Find out whether the shell is Bourne or XSI compatible,
117185c30ecadSmrg# or has some other useful features.
117195c30ecadSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
117205c30ecadSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
117215c30ecadSmrg  lt_unset=unset
117225c30ecadSmrgelse
117235c30ecadSmrg  lt_unset=false
117245c30ecadSmrgfi
117255c30ecadSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
117265eefee25Smacallan
117275c30ecadSmrg# test EBCDIC or ASCII
117285c30ecadSmrgcase `echo X|tr X '\101'` in
117295c30ecadSmrg A) # ASCII based system
117305c30ecadSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
117315c30ecadSmrg  lt_SP2NL='tr \040 \012'
117325c30ecadSmrg  lt_NL2SP='tr \015\012 \040\040'
117335c30ecadSmrg  ;;
117345c30ecadSmrg *) # EBCDIC based system
117355c30ecadSmrg  lt_SP2NL='tr \100 \n'
117365c30ecadSmrg  lt_NL2SP='tr \r\n \100\100'
117375c30ecadSmrg  ;;
117385c30ecadSmrgesac
117395c30ecadSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
117405c30ecadSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
117415c30ecadSmrg])# _LT_CHECK_SHELL_FEATURES
117425c30ecadSmrg
117435c30ecadSmrg
117445c30ecadSmrg# _LT_PATH_CONVERSION_FUNCTIONS
117455c30ecadSmrg# -----------------------------
117465c30ecadSmrg# Determine what file name conversion functions should be used by
117475c30ecadSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
117485c30ecadSmrg# for certain cross-compile configurations and native mingw.
117495c30ecadSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
117505c30ecadSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
117515c30ecadSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
117525c30ecadSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
117535c30ecadSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
117545c30ecadSmrg[case $host in
117555c30ecadSmrg  *-*-mingw* )
117565c30ecadSmrg    case $build in
117575c30ecadSmrg      *-*-mingw* ) # actually msys
117585c30ecadSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
117595c30ecadSmrg        ;;
117605c30ecadSmrg      *-*-cygwin* )
117615c30ecadSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
117625c30ecadSmrg        ;;
117635c30ecadSmrg      * ) # otherwise, assume *nix
117645c30ecadSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
117655c30ecadSmrg        ;;
117665c30ecadSmrg    esac
117675c30ecadSmrg    ;;
117685c30ecadSmrg  *-*-cygwin* )
117695c30ecadSmrg    case $build in
117705c30ecadSmrg      *-*-mingw* ) # actually msys
117715c30ecadSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
117725c30ecadSmrg        ;;
117735c30ecadSmrg      *-*-cygwin* )
117745c30ecadSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
117755c30ecadSmrg        ;;
117765c30ecadSmrg      * ) # otherwise, assume *nix
117775c30ecadSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
117785c30ecadSmrg        ;;
117795c30ecadSmrg    esac
117805c30ecadSmrg    ;;
117815c30ecadSmrg  * ) # unhandled hosts (and "normal" native builds)
117825c30ecadSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
117835c30ecadSmrg    ;;
117845c30ecadSmrgesac
117855eefee25Smacallan])
117865c30ecadSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
117875c30ecadSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
117885c30ecadSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
117895c30ecadSmrg         [0], [convert $build file names to $host format])dnl
117905eefee25Smacallan
117915c30ecadSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
117925c30ecadSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
117935c30ecadSmrg[#assume ordinary cross tools, or native build.
117945c30ecadSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
117955c30ecadSmrgcase $host in
117965c30ecadSmrg  *-*-mingw* )
117975c30ecadSmrg    case $build in
117985c30ecadSmrg      *-*-mingw* ) # actually msys
117995c30ecadSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
118005c30ecadSmrg        ;;
118015c30ecadSmrg    esac
118025c30ecadSmrg    ;;
118035c30ecadSmrgesac
1180462ab96baSmrg])
118055c30ecadSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
118065c30ecadSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
118075c30ecadSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
118085c30ecadSmrg         [0], [convert $build files to toolchain format])dnl
118095c30ecadSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
1181062ab96baSmrg
118115c30ecadSmrg# Helper functions for option handling.                    -*- Autoconf -*-
118125c30ecadSmrg#
118135c30ecadSmrg#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
118145c30ecadSmrg#   Software Foundation, Inc.
118155c30ecadSmrg#   Written by Gary V. Vaughan, 2004
118165c30ecadSmrg#
118175c30ecadSmrg# This file is free software; the Free Software Foundation gives
118185c30ecadSmrg# unlimited permission to copy and/or distribute it, with or without
118195c30ecadSmrg# modifications, as long as this notice is preserved.
118205eefee25Smacallan
118215c30ecadSmrg# serial 8 ltoptions.m4
118225eefee25Smacallan
118235c30ecadSmrg# This is to help aclocal find these macros, as it can't see m4_define.
118245c30ecadSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
118255eefee25Smacallan
118265eefee25Smacallan
118275c30ecadSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
118285c30ecadSmrg# ------------------------------------------
118295c30ecadSmrgm4_define([_LT_MANGLE_OPTION],
118305c30ecadSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
118315eefee25Smacallan
118325eefee25Smacallan
118335c30ecadSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
118345c30ecadSmrg# ---------------------------------------
118355c30ecadSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
118365c30ecadSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
118375c30ecadSmrg# saved as a flag.
118385c30ecadSmrgm4_define([_LT_SET_OPTION],
118395c30ecadSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
118405c30ecadSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
118415c30ecadSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
118425c30ecadSmrg    [m4_warning([Unknown $1 option '$2'])])[]dnl
118435c30ecadSmrg])
118445eefee25Smacallan
118455eefee25Smacallan
118465c30ecadSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
118475c30ecadSmrg# ------------------------------------------------------------
118485c30ecadSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
118495c30ecadSmrgm4_define([_LT_IF_OPTION],
118505c30ecadSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
118515eefee25Smacallan
118525eefee25Smacallan
118535c30ecadSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
118545c30ecadSmrg# -------------------------------------------------------
118555c30ecadSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
118565c30ecadSmrg# are set.
118575c30ecadSmrgm4_define([_LT_UNLESS_OPTIONS],
118585c30ecadSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
118595c30ecadSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
118605c30ecadSmrg		      [m4_define([$0_found])])])[]dnl
118615c30ecadSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
118625c30ecadSmrg])[]dnl
118635c30ecadSmrg])
118645eefee25Smacallan
118655eefee25Smacallan
118665c30ecadSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
118675c30ecadSmrg# ----------------------------------------
118685c30ecadSmrg# OPTION-LIST is a space-separated list of Libtool options associated
118695c30ecadSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
118705c30ecadSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
118715c30ecadSmrg# the unknown option and exit.
118725c30ecadSmrgm4_defun([_LT_SET_OPTIONS],
118735c30ecadSmrg[# Set options
118745c30ecadSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
118755c30ecadSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
118765eefee25Smacallan
118775c30ecadSmrgm4_if([$1],[LT_INIT],[
118785c30ecadSmrg  dnl
118795c30ecadSmrg  dnl Simply set some default values (i.e off) if boolean options were not
118805c30ecadSmrg  dnl specified:
118815c30ecadSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
118825c30ecadSmrg  ])
118835c30ecadSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
118845c30ecadSmrg  ])
118855c30ecadSmrg  dnl
118865c30ecadSmrg  dnl If no reference was made to various pairs of opposing options, then
118875c30ecadSmrg  dnl we run the default mode handler for the pair.  For example, if neither
118885c30ecadSmrg  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
118895c30ecadSmrg  dnl archives by default:
118905c30ecadSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
118915c30ecadSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
118925c30ecadSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
118935c30ecadSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
118945c30ecadSmrg		   [_LT_ENABLE_FAST_INSTALL])
118955c30ecadSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
118965c30ecadSmrg		   [_LT_WITH_AIX_SONAME([aix])])
118975c30ecadSmrg  ])
118985c30ecadSmrg])# _LT_SET_OPTIONS
118995eefee25Smacallan
119005eefee25Smacallan
119015eefee25Smacallan
119025c30ecadSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
119035c30ecadSmrg# -----------------------------------------
119045c30ecadSmrgm4_define([_LT_MANGLE_DEFUN],
119055c30ecadSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
11906dc99b369Smrg
119075eefee25Smacallan
119085c30ecadSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
119095c30ecadSmrg# -----------------------------------------------
119105c30ecadSmrgm4_define([LT_OPTION_DEFINE],
119115c30ecadSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
119125c30ecadSmrg])# LT_OPTION_DEFINE
119135eefee25Smacallan
119145c30ecadSmrg
119155c30ecadSmrg# dlopen
119165c30ecadSmrg# ------
119175c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
119185eefee25Smacallan])
119195c30ecadSmrg
119205c30ecadSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
119215c30ecadSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
119225c30ecadSmrgAC_DIAGNOSE([obsolete],
119235c30ecadSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
119245c30ecadSmrgput the 'dlopen' option into LT_INIT's first parameter.])
119255eefee25Smacallan])
119265eefee25Smacallan
119275c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
119285c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
119295eefee25Smacallan
119305eefee25Smacallan
119315c30ecadSmrg# win32-dll
119325c30ecadSmrg# ---------
119335c30ecadSmrg# Declare package support for building win32 dll's.
119345c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
119355c30ecadSmrg[enable_win32_dll=yes
119365eefee25Smacallan
119375c30ecadSmrgcase $host in
119385c30ecadSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
119395c30ecadSmrg  AC_CHECK_TOOL(AS, as, false)
119405c30ecadSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
119415c30ecadSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
119425c30ecadSmrg  ;;
119435c30ecadSmrgesac
119445c30ecadSmrg
119455c30ecadSmrgtest -z "$AS" && AS=as
119465c30ecadSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
119475c30ecadSmrg
119485c30ecadSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
119495c30ecadSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
119505c30ecadSmrg
119515c30ecadSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
119525c30ecadSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
119535c30ecadSmrg])# win32-dll
119545c30ecadSmrg
119555c30ecadSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
119565c30ecadSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
119575c30ecadSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
119585c30ecadSmrgAC_DIAGNOSE([obsolete],
119595c30ecadSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
119605c30ecadSmrgput the 'win32-dll' option into LT_INIT's first parameter.])
119615eefee25Smacallan])
119625eefee25Smacallan
119635c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
119645c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
119655eefee25Smacallan
119665eefee25Smacallan
119675c30ecadSmrg# _LT_ENABLE_SHARED([DEFAULT])
119685c30ecadSmrg# ----------------------------
119695c30ecadSmrg# implement the --enable-shared flag, and supports the 'shared' and
119705c30ecadSmrg# 'disable-shared' LT_INIT options.
119715c30ecadSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
119725c30ecadSmrgm4_define([_LT_ENABLE_SHARED],
119735c30ecadSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
119745c30ecadSmrgAC_ARG_ENABLE([shared],
119755c30ecadSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
119765c30ecadSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
119775c30ecadSmrg    [p=${PACKAGE-default}
119785c30ecadSmrg    case $enableval in
119795c30ecadSmrg    yes) enable_shared=yes ;;
119805c30ecadSmrg    no) enable_shared=no ;;
119815c30ecadSmrg    *)
119825c30ecadSmrg      enable_shared=no
119835c30ecadSmrg      # Look at the argument we got.  We use all the common list separators.
119845c30ecadSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
119855c30ecadSmrg      for pkg in $enableval; do
119865c30ecadSmrg	IFS=$lt_save_ifs
119875c30ecadSmrg	if test "X$pkg" = "X$p"; then
119885c30ecadSmrg	  enable_shared=yes
119895c30ecadSmrg	fi
119905c30ecadSmrg      done
119915c30ecadSmrg      IFS=$lt_save_ifs
119925c30ecadSmrg      ;;
119935c30ecadSmrg    esac],
119945c30ecadSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
119955eefee25Smacallan
119965c30ecadSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
119975c30ecadSmrg	[Whether or not to build shared libraries])
119985c30ecadSmrg])# _LT_ENABLE_SHARED
119995eefee25Smacallan
120005c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
120015c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
120025eefee25Smacallan
120035c30ecadSmrg# Old names:
120045c30ecadSmrgAC_DEFUN([AC_ENABLE_SHARED],
120055c30ecadSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
120065eefee25Smacallan])
120075eefee25Smacallan
120085c30ecadSmrgAC_DEFUN([AC_DISABLE_SHARED],
120095c30ecadSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
120105c30ecadSmrg])
120115eefee25Smacallan
120125c30ecadSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
120135c30ecadSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
120145eefee25Smacallan
120155c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
120165c30ecadSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
120175c30ecadSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
120185eefee25Smacallan
120195eefee25Smacallan
120205eefee25Smacallan
120215c30ecadSmrg# _LT_ENABLE_STATIC([DEFAULT])
120225c30ecadSmrg# ----------------------------
120235c30ecadSmrg# implement the --enable-static flag, and support the 'static' and
120245c30ecadSmrg# 'disable-static' LT_INIT options.
120255c30ecadSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
120265c30ecadSmrgm4_define([_LT_ENABLE_STATIC],
120275c30ecadSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
120285c30ecadSmrgAC_ARG_ENABLE([static],
120295c30ecadSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
120305c30ecadSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
120315c30ecadSmrg    [p=${PACKAGE-default}
120325c30ecadSmrg    case $enableval in
120335c30ecadSmrg    yes) enable_static=yes ;;
120345c30ecadSmrg    no) enable_static=no ;;
120355c30ecadSmrg    *)
120365c30ecadSmrg     enable_static=no
120375c30ecadSmrg      # Look at the argument we got.  We use all the common list separators.
120385c30ecadSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
120395c30ecadSmrg      for pkg in $enableval; do
120405c30ecadSmrg	IFS=$lt_save_ifs
120415c30ecadSmrg	if test "X$pkg" = "X$p"; then
120425c30ecadSmrg	  enable_static=yes
120435c30ecadSmrg	fi
120445c30ecadSmrg      done
120455c30ecadSmrg      IFS=$lt_save_ifs
120465c30ecadSmrg      ;;
120475c30ecadSmrg    esac],
120485c30ecadSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
120495eefee25Smacallan
120505c30ecadSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
120515c30ecadSmrg	[Whether or not to build static libraries])
120525c30ecadSmrg])# _LT_ENABLE_STATIC
120535c30ecadSmrg
120545c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
120555c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
120565c30ecadSmrg
120575c30ecadSmrg# Old names:
120585c30ecadSmrgAC_DEFUN([AC_ENABLE_STATIC],
120595c30ecadSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
120605eefee25Smacallan])
120615c30ecadSmrg
120625c30ecadSmrgAC_DEFUN([AC_DISABLE_STATIC],
120635c30ecadSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
120645eefee25Smacallan])
120655eefee25Smacallan
120665c30ecadSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
120675c30ecadSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
12068dc99b369Smrg
120695c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
120705c30ecadSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
120715c30ecadSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
120725eefee25Smacallan
120735eefee25Smacallan
120745eefee25Smacallan
120755c30ecadSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
120765c30ecadSmrg# ----------------------------------
120775c30ecadSmrg# implement the --enable-fast-install flag, and support the 'fast-install'
120785c30ecadSmrg# and 'disable-fast-install' LT_INIT options.
120795c30ecadSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
120805c30ecadSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
120815c30ecadSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
120825c30ecadSmrgAC_ARG_ENABLE([fast-install],
120835c30ecadSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
120845c30ecadSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
120855c30ecadSmrg    [p=${PACKAGE-default}
120865c30ecadSmrg    case $enableval in
120875c30ecadSmrg    yes) enable_fast_install=yes ;;
120885c30ecadSmrg    no) enable_fast_install=no ;;
120895c30ecadSmrg    *)
120905c30ecadSmrg      enable_fast_install=no
120915c30ecadSmrg      # Look at the argument we got.  We use all the common list separators.
120925c30ecadSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
120935c30ecadSmrg      for pkg in $enableval; do
120945c30ecadSmrg	IFS=$lt_save_ifs
120955c30ecadSmrg	if test "X$pkg" = "X$p"; then
120965c30ecadSmrg	  enable_fast_install=yes
120975c30ecadSmrg	fi
120985c30ecadSmrg      done
120995c30ecadSmrg      IFS=$lt_save_ifs
121005c30ecadSmrg      ;;
121015c30ecadSmrg    esac],
121025c30ecadSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
121035eefee25Smacallan
121045c30ecadSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
121055c30ecadSmrg	 [Whether or not to optimize for fast installation])dnl
121065c30ecadSmrg])# _LT_ENABLE_FAST_INSTALL
121075eefee25Smacallan
121085c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
121095c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
121105eefee25Smacallan
121115c30ecadSmrg# Old names:
121125c30ecadSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
121135c30ecadSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
121145c30ecadSmrgAC_DIAGNOSE([obsolete],
121155c30ecadSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
121165c30ecadSmrgthe 'fast-install' option into LT_INIT's first parameter.])
121175c30ecadSmrg])
121185eefee25Smacallan
121195c30ecadSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
121205c30ecadSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
121215c30ecadSmrgAC_DIAGNOSE([obsolete],
121225c30ecadSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
121235c30ecadSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.])
121245c30ecadSmrg])
121255eefee25Smacallan
121265c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
121275c30ecadSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
121285c30ecadSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
121295eefee25Smacallan
121305c30ecadSmrg
121315c30ecadSmrg# _LT_WITH_AIX_SONAME([DEFAULT])
12132dc99b369Smrg# ----------------------------------
121335c30ecadSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix'
121345c30ecadSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
121355c30ecadSmrg# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
121365c30ecadSmrgm4_define([_LT_WITH_AIX_SONAME],
121375c30ecadSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
121385c30ecadSmrgshared_archive_member_spec=
121395c30ecadSmrgcase $host,$enable_shared in
121405c30ecadSmrgpower*-*-aix[[5-9]]*,yes)
121415c30ecadSmrg  AC_MSG_CHECKING([which variant of shared library versioning to provide])
121425c30ecadSmrg  AC_ARG_WITH([aix-soname],
121435c30ecadSmrg    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
121445c30ecadSmrg      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
121455c30ecadSmrg    [case $withval in
121465c30ecadSmrg    aix|svr4|both)
121475c30ecadSmrg      ;;
121485c30ecadSmrg    *)
121495c30ecadSmrg      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
121505c30ecadSmrg      ;;
121515c30ecadSmrg    esac
121525c30ecadSmrg    lt_cv_with_aix_soname=$with_aix_soname],
121535c30ecadSmrg    [AC_CACHE_VAL([lt_cv_with_aix_soname],
121545c30ecadSmrg      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
121555c30ecadSmrg    with_aix_soname=$lt_cv_with_aix_soname])
121565c30ecadSmrg  AC_MSG_RESULT([$with_aix_soname])
121575c30ecadSmrg  if test aix != "$with_aix_soname"; then
121585c30ecadSmrg    # For the AIX way of multilib, we name the shared archive member
121595c30ecadSmrg    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
121605c30ecadSmrg    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
121615c30ecadSmrg    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
121625c30ecadSmrg    # the AIX toolchain works better with OBJECT_MODE set (default 32).
121635c30ecadSmrg    if test 64 = "${OBJECT_MODE-32}"; then
121645c30ecadSmrg      shared_archive_member_spec=shr_64
121655c30ecadSmrg    else
121665c30ecadSmrg      shared_archive_member_spec=shr
121675c30ecadSmrg    fi
121685c30ecadSmrg  fi
121695c30ecadSmrg  ;;
121705c30ecadSmrg*)
121715c30ecadSmrg  with_aix_soname=aix
121725c30ecadSmrg  ;;
121735c30ecadSmrgesac
121745c30ecadSmrg
121755c30ecadSmrg_LT_DECL([], [shared_archive_member_spec], [0],
121765c30ecadSmrg    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
121775c30ecadSmrg])# _LT_WITH_AIX_SONAME
121785eefee25Smacallan
121795c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
121805c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
121815c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
121825c30ecadSmrg
121835c30ecadSmrg
121845c30ecadSmrg# _LT_WITH_PIC([MODE])
121855c30ecadSmrg# --------------------
121865c30ecadSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
121875c30ecadSmrg# LT_INIT options.
121885c30ecadSmrg# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
121895c30ecadSmrgm4_define([_LT_WITH_PIC],
121905c30ecadSmrg[AC_ARG_WITH([pic],
121915c30ecadSmrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
121925c30ecadSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
121935c30ecadSmrg    [lt_p=${PACKAGE-default}
121945c30ecadSmrg    case $withval in
121955c30ecadSmrg    yes|no) pic_mode=$withval ;;
121965c30ecadSmrg    *)
121975c30ecadSmrg      pic_mode=default
121985c30ecadSmrg      # Look at the argument we got.  We use all the common list separators.
121995c30ecadSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
122005c30ecadSmrg      for lt_pkg in $withval; do
122015c30ecadSmrg	IFS=$lt_save_ifs
122025c30ecadSmrg	if test "X$lt_pkg" = "X$lt_p"; then
122035c30ecadSmrg	  pic_mode=yes
122045c30ecadSmrg	fi
122055c30ecadSmrg      done
122065c30ecadSmrg      IFS=$lt_save_ifs
122075c30ecadSmrg      ;;
122085c30ecadSmrg    esac],
122095c30ecadSmrg    [pic_mode=m4_default([$1], [default])])
122105eefee25Smacallan
122115c30ecadSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
122125c30ecadSmrg])# _LT_WITH_PIC
122135eefee25Smacallan
122145c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
122155c30ecadSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
122165eefee25Smacallan
122175c30ecadSmrg# Old name:
122185c30ecadSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
122195c30ecadSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
122205c30ecadSmrgAC_DIAGNOSE([obsolete],
122215c30ecadSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
122225c30ecadSmrgput the 'pic-only' option into LT_INIT's first parameter.])
122235eefee25Smacallan])
122245eefee25Smacallan
122255c30ecadSmrgdnl aclocal-1.4 backwards compatibility:
122265c30ecadSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
122275c30ecadSmrg
122285c30ecadSmrg
122295c30ecadSmrgm4_define([_LTDL_MODE], [])
122305c30ecadSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
122315c30ecadSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
122325c30ecadSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
122335c30ecadSmrg		 [m4_define([_LTDL_MODE], [recursive])])
122345c30ecadSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
122355c30ecadSmrg		 [m4_define([_LTDL_MODE], [subproject])])
122365c30ecadSmrg
122375c30ecadSmrgm4_define([_LTDL_TYPE], [])
122385c30ecadSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
122395c30ecadSmrg		 [m4_define([_LTDL_TYPE], [installable])])
122405c30ecadSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
122415c30ecadSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
122425eefee25Smacallan
122435c30ecadSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
122445eefee25Smacallan#
122455c30ecadSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
122465c30ecadSmrg# Foundation, Inc.
122475c30ecadSmrg# Written by Gary V. Vaughan, 2004
122485c30ecadSmrg#
122495c30ecadSmrg# This file is free software; the Free Software Foundation gives
122505c30ecadSmrg# unlimited permission to copy and/or distribute it, with or without
122515c30ecadSmrg# modifications, as long as this notice is preserved.
122525eefee25Smacallan
122535c30ecadSmrg# serial 6 ltsugar.m4
122545eefee25Smacallan
122555c30ecadSmrg# This is to help aclocal find these macros, as it can't see m4_define.
122565c30ecadSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
122575c30ecadSmrg
122585c30ecadSmrg
122595c30ecadSmrg# lt_join(SEP, ARG1, [ARG2...])
122605c30ecadSmrg# -----------------------------
122615c30ecadSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
122625c30ecadSmrg# associated separator.
122635c30ecadSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
122645c30ecadSmrg# versions in m4sugar had bugs.
122655c30ecadSmrgm4_define([lt_join],
122665c30ecadSmrg[m4_if([$#], [1], [],
122675c30ecadSmrg       [$#], [2], [[$2]],
122685c30ecadSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
122695c30ecadSmrgm4_define([_lt_join],
122705c30ecadSmrg[m4_if([$#$2], [2], [],
122715c30ecadSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
122725c30ecadSmrg
122735c30ecadSmrg
122745c30ecadSmrg# lt_car(LIST)
122755c30ecadSmrg# lt_cdr(LIST)
122765c30ecadSmrg# ------------
122775c30ecadSmrg# Manipulate m4 lists.
122785c30ecadSmrg# These macros are necessary as long as will still need to support
122795c30ecadSmrg# Autoconf-2.59, which quotes differently.
122805c30ecadSmrgm4_define([lt_car], [[$1]])
122815c30ecadSmrgm4_define([lt_cdr],
122825c30ecadSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
122835c30ecadSmrg       [$#], 1, [],
122845c30ecadSmrg       [m4_dquote(m4_shift($@))])])
122855c30ecadSmrgm4_define([lt_unquote], $1)
122865eefee25Smacallan
122875eefee25Smacallan
122885c30ecadSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
122895c30ecadSmrg# ------------------------------------------
122905c30ecadSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
122915c30ecadSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
122925c30ecadSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
122935c30ecadSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
122945c30ecadSmrg# than defined and empty).
122955eefee25Smacallan#
122965c30ecadSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
122975c30ecadSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
122985c30ecadSmrgm4_define([lt_append],
122995c30ecadSmrg[m4_define([$1],
123005c30ecadSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
123015eefee25Smacallan
123025eefee25Smacallan
123035eefee25Smacallan
123045c30ecadSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
123055c30ecadSmrg# ----------------------------------------------------------
123065c30ecadSmrg# Produce a SEP delimited list of all paired combinations of elements of
123075c30ecadSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
123085c30ecadSmrg# has the form PREFIXmINFIXSUFFIXn.
123095c30ecadSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
123105c30ecadSmrgm4_define([lt_combine],
123115c30ecadSmrg[m4_if(m4_eval([$# > 3]), [1],
123125c30ecadSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
123135c30ecadSmrg[[m4_foreach([_Lt_prefix], [$2],
123145c30ecadSmrg	     [m4_foreach([_Lt_suffix],
123155c30ecadSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
123165c30ecadSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
123175eefee25Smacallan
123185eefee25Smacallan
123195c30ecadSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
123205c30ecadSmrg# -----------------------------------------------------------------------
123215c30ecadSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
123225c30ecadSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
123235c30ecadSmrgm4_define([lt_if_append_uniq],
123245c30ecadSmrg[m4_ifdef([$1],
123255c30ecadSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
123265c30ecadSmrg		 [lt_append([$1], [$2], [$3])$4],
123275c30ecadSmrg		 [$5])],
123285c30ecadSmrg	  [lt_append([$1], [$2], [$3])$4])])
123295eefee25Smacallan
123305eefee25Smacallan
123315c30ecadSmrg# lt_dict_add(DICT, KEY, VALUE)
123325c30ecadSmrg# -----------------------------
123335c30ecadSmrgm4_define([lt_dict_add],
123345c30ecadSmrg[m4_define([$1($2)], [$3])])
12335dc99b369Smrg
12336dc99b369Smrg
123375c30ecadSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
123385c30ecadSmrg# --------------------------------------------
123395c30ecadSmrgm4_define([lt_dict_add_subkey],
123405c30ecadSmrg[m4_define([$1($2:$3)], [$4])])
123415c30ecadSmrg
12342dc99b369Smrg
123435c30ecadSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
123445c30ecadSmrg# ----------------------------------
123455c30ecadSmrgm4_define([lt_dict_fetch],
123465c30ecadSmrg[m4_ifval([$3],
123475c30ecadSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
123485c30ecadSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
12349dc99b369Smrg
123505eefee25Smacallan
123515c30ecadSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
123525c30ecadSmrg# -----------------------------------------------------------------
123535c30ecadSmrgm4_define([lt_if_dict_fetch],
123545c30ecadSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
123555c30ecadSmrg	[$5],
123565c30ecadSmrg    [$6])])
123575eefee25Smacallan
123585eefee25Smacallan
123595c30ecadSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
123605c30ecadSmrg# --------------------------------------------------------------
123615c30ecadSmrgm4_define([lt_dict_filter],
123625c30ecadSmrg[m4_if([$5], [], [],
123635c30ecadSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
123645c30ecadSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
123655c30ecadSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123665c30ecadSmrg])
123675c30ecadSmrg
123685c30ecadSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
1236962ab96baSmrg#
123705c30ecadSmrg#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
123715c30ecadSmrg#   Inc.
123725c30ecadSmrg#   Written by Scott James Remnant, 2004
123735c30ecadSmrg#
123745c30ecadSmrg# This file is free software; the Free Software Foundation gives
123755c30ecadSmrg# unlimited permission to copy and/or distribute it, with or without
123765c30ecadSmrg# modifications, as long as this notice is preserved.
1237762ab96baSmrg
123785c30ecadSmrg# @configure_input@
1237962ab96baSmrg
123805c30ecadSmrg# serial 4245 ltversion.m4
123815c30ecadSmrg# This file is part of GNU Libtool
12382dc99b369Smrg
123835c30ecadSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7])
123845c30ecadSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7])
123855eefee25Smacallan
123865c30ecadSmrgAC_DEFUN([LTVERSION_VERSION],
123875c30ecadSmrg[macro_version='2.4.7'
123885c30ecadSmrgmacro_revision='2.4.7'
123895c30ecadSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
123905c30ecadSmrg_LT_DECL(, macro_revision, 0)
123915c30ecadSmrg])
123925eefee25Smacallan
123935c30ecadSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
123945eefee25Smacallan#
123955c30ecadSmrg#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
123965c30ecadSmrg#   Software Foundation, Inc.
123975c30ecadSmrg#   Written by Scott James Remnant, 2004.
123985eefee25Smacallan#
123995c30ecadSmrg# This file is free software; the Free Software Foundation gives
124005c30ecadSmrg# unlimited permission to copy and/or distribute it, with or without
124015c30ecadSmrg# modifications, as long as this notice is preserved.
124025eefee25Smacallan
124035c30ecadSmrg# serial 5 lt~obsolete.m4
124045eefee25Smacallan
124055c30ecadSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
124065c30ecadSmrg#
124075c30ecadSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
124085c30ecadSmrg# which have later been changed to m4_define as they aren't part of the
124095c30ecadSmrg# exported API, or moved to Autoconf or Automake where they belong.
124105c30ecadSmrg#
124115c30ecadSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
124125c30ecadSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
124135c30ecadSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
124145c30ecadSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
124155c30ecadSmrg# and doesn't know about Autoconf macros at all.)
124165c30ecadSmrg#
124175c30ecadSmrg# So we provide this file, which has a silly filename so it's always
124185c30ecadSmrg# included after everything else.  This provides aclocal with the
124195c30ecadSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
124205c30ecadSmrg# because those macros already exist, or will be overwritten later.
124215c30ecadSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
124225c30ecadSmrg#
124235c30ecadSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
124245c30ecadSmrg# Yes, that means every name once taken will need to remain here until
124255c30ecadSmrg# we give up compatibility with versions before 1.7, at which point
124265c30ecadSmrg# we need to keep only those names which we still refer to.
124275eefee25Smacallan
124285c30ecadSmrg# This is to help aclocal find these macros, as it can't see m4_define.
124295c30ecadSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
124305c30ecadSmrg
124315c30ecadSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
124325c30ecadSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
124335c30ecadSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
124345c30ecadSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
124355c30ecadSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
124365c30ecadSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
124375c30ecadSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
124385c30ecadSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
124395c30ecadSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
124405c30ecadSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
124415c30ecadSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
124425c30ecadSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
124435c30ecadSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
124445c30ecadSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
124455c30ecadSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
124465c30ecadSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
124475c30ecadSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
124485c30ecadSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
124495c30ecadSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
124505c30ecadSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
124515c30ecadSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
124525c30ecadSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
124535c30ecadSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
124545c30ecadSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
124555c30ecadSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
124565c30ecadSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
124575c30ecadSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
124585c30ecadSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
124595c30ecadSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
124605c30ecadSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
124615c30ecadSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
124625c30ecadSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
124635c30ecadSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
124645c30ecadSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
124655c30ecadSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
124665c30ecadSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
124675c30ecadSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
124685c30ecadSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
124695c30ecadSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
124705c30ecadSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
124715c30ecadSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
124725c30ecadSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
124735c30ecadSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
124745c30ecadSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
124755c30ecadSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
124765c30ecadSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
124775c30ecadSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
124785c30ecadSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
124795c30ecadSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
124805c30ecadSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
124815c30ecadSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
124825c30ecadSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
124835c30ecadSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
124845c30ecadSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
124855c30ecadSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
124865c30ecadSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
124875c30ecadSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
124885c30ecadSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
124895c30ecadSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
124905c30ecadSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
124915c30ecadSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
124925eefee25Smacallan
12493