10814a2baSmrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
29586ba5aSmrg
30814a2baSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
476888252Smrg
576888252Smrg# This file is free software; the Free Software Foundation
676888252Smrg# gives unlimited permission to copy and/or distribute it,
776888252Smrg# with or without modifications, as long as this notice is preserved.
876888252Smrg
976888252Smrg# This program is distributed in the hope that it will be useful,
1076888252Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1176888252Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1276888252Smrg# PARTICULAR PURPOSE.
1376888252Smrg
149586ba5aSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
1586dafe34Smrgm4_ifndef([AC_AUTOCONF_VERSION],
1686dafe34Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
170814a2baSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
180814a2baSmrg[m4_warning([this file was generated for autoconf 2.71.
1986dafe34SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
2086dafe34SmrgIf you have problems, you may need to regenerate the build system entirely.
219586ba5aSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
2276888252Smrg
230814a2baSmrg# Copyright (C) 2002-2021 Free Software Foundation, Inc.
2463847c39Smrg#
250814a2baSmrg# This file is free software; the Free Software Foundation
260814a2baSmrg# gives unlimited permission to copy and/or distribute it,
270814a2baSmrg# with or without modifications, as long as this notice is preserved.
280814a2baSmrg
290814a2baSmrg# AM_AUTOMAKE_VERSION(VERSION)
300814a2baSmrg# ----------------------------
310814a2baSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
320814a2baSmrg# generated from the m4 files accompanying Automake X.Y.
330814a2baSmrg# (This private macro should not be called outside this file.)
340814a2baSmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
350814a2baSmrg[am__api_version='1.16'
360814a2baSmrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
370814a2baSmrgdnl require some minimum version.  Point them to the right macro.
380814a2baSmrgm4_if([$1], [1.16.5], [],
390814a2baSmrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
400814a2baSmrg])
410814a2baSmrg
420814a2baSmrg# _AM_AUTOCONF_VERSION(VERSION)
430814a2baSmrg# -----------------------------
440814a2baSmrg# aclocal traces this macro to find the Autoconf version.
450814a2baSmrg# This is a private macro too.  Using m4_define simplifies
460814a2baSmrg# the logic in aclocal, which can simply ignore this definition.
470814a2baSmrgm4_define([_AM_AUTOCONF_VERSION], [])
480814a2baSmrg
490814a2baSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
500814a2baSmrg# -------------------------------
510814a2baSmrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
520814a2baSmrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
530814a2baSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
540814a2baSmrg[AM_AUTOMAKE_VERSION([1.16.5])dnl
550814a2baSmrgm4_ifndef([AC_AUTOCONF_VERSION],
560814a2baSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
570814a2baSmrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
580814a2baSmrg
590814a2baSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
600814a2baSmrg
610814a2baSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6263847c39Smrg#
630814a2baSmrg# This file is free software; the Free Software Foundation
640814a2baSmrg# gives unlimited permission to copy and/or distribute it,
650814a2baSmrg# with or without modifications, as long as this notice is preserved.
6663847c39Smrg
670814a2baSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
680814a2baSmrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
690814a2baSmrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
7063847c39Smrg#
710814a2baSmrg# Of course, Automake must honor this variable whenever it calls a
720814a2baSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
730814a2baSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
740814a2baSmrg# depending on how configure is run.  This is pretty annoying, since
750814a2baSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
760814a2baSmrg# source directory, any form will work fine, but in subdirectories a
770814a2baSmrg# relative path needs to be adjusted first.
7863847c39Smrg#
790814a2baSmrg# $ac_aux_dir/missing
800814a2baSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
810814a2baSmrg# $top_srcdir/$ac_aux_dir/missing
820814a2baSmrg#    fails if $ac_aux_dir is absolute,
830814a2baSmrg#    fails when called from a subdirectory in a VPATH build with
840814a2baSmrg#          a relative $ac_aux_dir
8563847c39Smrg#
860814a2baSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
870814a2baSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
880814a2baSmrg# harmless because $srcdir is '.', but things will broke when you
890814a2baSmrg# start a VPATH build or use an absolute $srcdir.
9063847c39Smrg#
910814a2baSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
920814a2baSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
930814a2baSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
940814a2baSmrg# and then we would define $MISSING as
950814a2baSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
960814a2baSmrg# This will work as long as MISSING is not called from configure, because
970814a2baSmrg# unfortunately $(top_srcdir) has no meaning in configure.
980814a2baSmrg# However there are other variables, like CC, which are often used in
990814a2baSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
10063847c39Smrg#
1010814a2baSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
1020814a2baSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
1030814a2baSmrg# configured tree to be moved without reconfiguration.
10476888252Smrg
1050814a2baSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1060814a2baSmrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1070814a2baSmrg# Expand $ac_aux_dir to an absolute path.
1080814a2baSmrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
10963847c39Smrg])
11063847c39Smrg
1110814a2baSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
11263847c39Smrg
1130814a2baSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
1140814a2baSmrg#
1150814a2baSmrg# This file is free software; the Free Software Foundation
1160814a2baSmrg# gives unlimited permission to copy and/or distribute it,
1170814a2baSmrg# with or without modifications, as long as this notice is preserved.
11863847c39Smrg
1190814a2baSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1200814a2baSmrg# -------------------------------------
1210814a2baSmrg# Define a conditional.
1220814a2baSmrgAC_DEFUN([AM_CONDITIONAL],
1230814a2baSmrg[AC_PREREQ([2.52])dnl
1240814a2baSmrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1250814a2baSmrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1260814a2baSmrgAC_SUBST([$1_TRUE])dnl
1270814a2baSmrgAC_SUBST([$1_FALSE])dnl
1280814a2baSmrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1290814a2baSmrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1300814a2baSmrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1310814a2baSmrgif $2; then
1320814a2baSmrg  $1_TRUE=
1330814a2baSmrg  $1_FALSE='#'
1340814a2baSmrgelse
1350814a2baSmrg  $1_TRUE='#'
1360814a2baSmrg  $1_FALSE=
1370814a2baSmrgfi
1380814a2baSmrgAC_CONFIG_COMMANDS_PRE(
1390814a2baSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1400814a2baSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1410814a2baSmrgUsually this means the macro was only invoked conditionally.]])
1420814a2baSmrgfi])])
14363847c39Smrg
1440814a2baSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1450814a2baSmrg#
1460814a2baSmrg# This file is free software; the Free Software Foundation
1470814a2baSmrg# gives unlimited permission to copy and/or distribute it,
1480814a2baSmrg# with or without modifications, as long as this notice is preserved.
14963847c39Smrg
15076888252Smrg
1510814a2baSmrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1520814a2baSmrg# written in clear, in which case automake, when reading aclocal.m4,
1530814a2baSmrg# will think it sees a *use*, and therefore will trigger all it's
1540814a2baSmrg# C support machinery.  Also note that it means that autoscan, seeing
1550814a2baSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
15676888252Smrg
15776888252Smrg
1580814a2baSmrg# _AM_DEPENDENCIES(NAME)
1590814a2baSmrg# ----------------------
1600814a2baSmrg# See how the compiler implements dependency checking.
1610814a2baSmrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1620814a2baSmrg# We try a few techniques and use that to set a single cache variable.
1630814a2baSmrg#
1640814a2baSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1650814a2baSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1660814a2baSmrg# dependency, and given that the user is not expected to run this macro,
1670814a2baSmrg# just rely on AC_PROG_CC.
1680814a2baSmrgAC_DEFUN([_AM_DEPENDENCIES],
1690814a2baSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1700814a2baSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1710814a2baSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1720814a2baSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
17376888252Smrg
1740814a2baSmrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1750814a2baSmrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1760814a2baSmrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1770814a2baSmrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1780814a2baSmrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1790814a2baSmrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1800814a2baSmrg                    [depcc="$$1"   am_compiler_list=])
18186dafe34Smrg
1820814a2baSmrgAC_CACHE_CHECK([dependency style of $depcc],
1830814a2baSmrg               [am_cv_$1_dependencies_compiler_type],
1840814a2baSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1850814a2baSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
1860814a2baSmrg  # making bogus files that we don't know about and never remove.  For
1870814a2baSmrg  # instance it was reported that on HP-UX the gcc test will end up
1880814a2baSmrg  # making a dummy file named 'D' -- because '-MD' means "put the output
1890814a2baSmrg  # in D".
1900814a2baSmrg  rm -rf conftest.dir
1910814a2baSmrg  mkdir conftest.dir
1920814a2baSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1930814a2baSmrg  # using a relative directory.
1940814a2baSmrg  cp "$am_depcomp" conftest.dir
1950814a2baSmrg  cd conftest.dir
1960814a2baSmrg  # We will build objects and dependencies in a subdirectory because
1970814a2baSmrg  # it helps to detect inapplicable dependency modes.  For instance
1980814a2baSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
1990814a2baSmrg  # side effect of compilation, but ICC will put the dependencies in
2000814a2baSmrg  # the current directory while Tru64 will put them in the object
2010814a2baSmrg  # directory.
2020814a2baSmrg  mkdir sub
20363847c39Smrg
2040814a2baSmrg  am_cv_$1_dependencies_compiler_type=none
2050814a2baSmrg  if test "$am_compiler_list" = ""; then
2060814a2baSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2070814a2baSmrg  fi
2080814a2baSmrg  am__universal=false
2090814a2baSmrg  m4_case([$1], [CC],
2100814a2baSmrg    [case " $depcc " in #(
2110814a2baSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2120814a2baSmrg     esac],
2130814a2baSmrg    [CXX],
2140814a2baSmrg    [case " $depcc " in #(
2150814a2baSmrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2160814a2baSmrg     esac])
21763847c39Smrg
2180814a2baSmrg  for depmode in $am_compiler_list; do
2190814a2baSmrg    # Setup a source with many dependencies, because some compilers
2200814a2baSmrg    # like to wrap large dependency lists on column 80 (with \), and
2210814a2baSmrg    # we should not choose a depcomp mode which is confused by this.
2220814a2baSmrg    #
2230814a2baSmrg    # We need to recreate these files for each test, as the compiler may
2240814a2baSmrg    # overwrite some of them when testing with obscure command lines.
2250814a2baSmrg    # This happens at least with the AIX C compiler.
2260814a2baSmrg    : > sub/conftest.c
2270814a2baSmrg    for i in 1 2 3 4 5 6; do
2280814a2baSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2290814a2baSmrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
2300814a2baSmrg      # Solaris 10 /bin/sh.
2310814a2baSmrg      echo '/* dummy */' > sub/conftst$i.h
2320814a2baSmrg    done
2330814a2baSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23463847c39Smrg
2350814a2baSmrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
2360814a2baSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2370814a2baSmrg    # handle '-M -o', and we need to detect this.  Also, some Intel
2380814a2baSmrg    # versions had trouble with output in subdirs.
2390814a2baSmrg    am__obj=sub/conftest.${OBJEXT-o}
2400814a2baSmrg    am__minus_obj="-o $am__obj"
2410814a2baSmrg    case $depmode in
2420814a2baSmrg    gcc)
2430814a2baSmrg      # This depmode causes a compiler race in universal mode.
2440814a2baSmrg      test "$am__universal" = false || continue
2450814a2baSmrg      ;;
2460814a2baSmrg    nosideeffect)
2470814a2baSmrg      # After this tag, mechanisms are not by side-effect, so they'll
2480814a2baSmrg      # only be used when explicitly requested.
2490814a2baSmrg      if test "x$enable_dependency_tracking" = xyes; then
2500814a2baSmrg	continue
2510814a2baSmrg      else
2520814a2baSmrg	break
2530814a2baSmrg      fi
2540814a2baSmrg      ;;
2550814a2baSmrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
2560814a2baSmrg      # This compiler won't grok '-c -o', but also, the minuso test has
2570814a2baSmrg      # not run yet.  These depmodes are late enough in the game, and
2580814a2baSmrg      # so weak that their functioning should not be impacted.
2590814a2baSmrg      am__obj=conftest.${OBJEXT-o}
2600814a2baSmrg      am__minus_obj=
2610814a2baSmrg      ;;
2620814a2baSmrg    none) break ;;
2630814a2baSmrg    esac
2640814a2baSmrg    if depmode=$depmode \
2650814a2baSmrg       source=sub/conftest.c object=$am__obj \
2660814a2baSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2670814a2baSmrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2680814a2baSmrg         >/dev/null 2>conftest.err &&
2690814a2baSmrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2700814a2baSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2710814a2baSmrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2720814a2baSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2730814a2baSmrg      # icc doesn't choke on unknown options, it will just issue warnings
2740814a2baSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
2750814a2baSmrg      # that says an option was ignored or not supported.
2760814a2baSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2770814a2baSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2780814a2baSmrg      # The diagnosis changed in icc 8.0:
2790814a2baSmrg      #   icc: Command line remark: option '-MP' not supported
2800814a2baSmrg      if (grep 'ignoring option' conftest.err ||
2810814a2baSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2820814a2baSmrg        am_cv_$1_dependencies_compiler_type=$depmode
2830814a2baSmrg        break
2840814a2baSmrg      fi
2850814a2baSmrg    fi
2860814a2baSmrg  done
28763847c39Smrg
2880814a2baSmrg  cd ..
2890814a2baSmrg  rm -rf conftest.dir
2900814a2baSmrgelse
2910814a2baSmrg  am_cv_$1_dependencies_compiler_type=none
2920814a2baSmrgfi
2930814a2baSmrg])
2940814a2baSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2950814a2baSmrgAM_CONDITIONAL([am__fastdep$1], [
2960814a2baSmrg  test "x$enable_dependency_tracking" != xno \
2970814a2baSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
2980814a2baSmrg])
29963847c39Smrg
30063847c39Smrg
3010814a2baSmrg# AM_SET_DEPDIR
3020814a2baSmrg# -------------
3030814a2baSmrg# Choose a directory name for dependency files.
3040814a2baSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3050814a2baSmrgAC_DEFUN([AM_SET_DEPDIR],
3060814a2baSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3070814a2baSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3080814a2baSmrg])
309d8556812Smrg
31063847c39Smrg
3110814a2baSmrg# AM_DEP_TRACK
3120814a2baSmrg# ------------
3130814a2baSmrgAC_DEFUN([AM_DEP_TRACK],
3140814a2baSmrg[AC_ARG_ENABLE([dependency-tracking], [dnl
3150814a2baSmrgAS_HELP_STRING(
3160814a2baSmrg  [--enable-dependency-tracking],
3170814a2baSmrg  [do not reject slow dependency extractors])
3180814a2baSmrgAS_HELP_STRING(
3190814a2baSmrg  [--disable-dependency-tracking],
3200814a2baSmrg  [speeds up one-time build])])
3210814a2baSmrgif test "x$enable_dependency_tracking" != xno; then
3220814a2baSmrg  am_depcomp="$ac_aux_dir/depcomp"
3230814a2baSmrg  AMDEPBACKSLASH='\'
3240814a2baSmrg  am__nodep='_no'
32563847c39Smrgfi
3260814a2baSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3270814a2baSmrgAC_SUBST([AMDEPBACKSLASH])dnl
3280814a2baSmrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3290814a2baSmrgAC_SUBST([am__nodep])dnl
3300814a2baSmrg_AM_SUBST_NOTMAKE([am__nodep])dnl
33163847c39Smrg])
33276888252Smrg
3330814a2baSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
33463847c39Smrg
3350814a2baSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
3360814a2baSmrg#
3370814a2baSmrg# This file is free software; the Free Software Foundation
3380814a2baSmrg# gives unlimited permission to copy and/or distribute it,
3390814a2baSmrg# with or without modifications, as long as this notice is preserved.
34076888252Smrg
3410814a2baSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3420814a2baSmrg# ------------------------------
3430814a2baSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3440814a2baSmrg[{
3450814a2baSmrg  # Older Autoconf quotes --file arguments for eval, but not when files
3460814a2baSmrg  # are listed without --file.  Let's play safe and only enable the eval
3470814a2baSmrg  # if we detect the quoting.
3480814a2baSmrg  # TODO: see whether this extra hack can be removed once we start
3490814a2baSmrg  # requiring Autoconf 2.70 or later.
3500814a2baSmrg  AS_CASE([$CONFIG_FILES],
3510814a2baSmrg          [*\'*], [eval set x "$CONFIG_FILES"],
3520814a2baSmrg          [*], [set x $CONFIG_FILES])
3530814a2baSmrg  shift
3540814a2baSmrg  # Used to flag and report bootstrapping failures.
3550814a2baSmrg  am_rc=0
3560814a2baSmrg  for am_mf
3570814a2baSmrg  do
3580814a2baSmrg    # Strip MF so we end up with the name of the file.
3590814a2baSmrg    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
3600814a2baSmrg    # Check whether this is an Automake generated Makefile which includes
3610814a2baSmrg    # dependency-tracking related rules and includes.
3620814a2baSmrg    # Grep'ing the whole file directly is not great: AIX grep has a line
3630814a2baSmrg    # limit of 2048, but all sed's we know have understand at least 4000.
3640814a2baSmrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
3650814a2baSmrg      || continue
3660814a2baSmrg    am_dirpart=`AS_DIRNAME(["$am_mf"])`
3670814a2baSmrg    am_filepart=`AS_BASENAME(["$am_mf"])`
3680814a2baSmrg    AM_RUN_LOG([cd "$am_dirpart" \
3690814a2baSmrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
3700814a2baSmrg        | $MAKE -f - am--depfiles]) || am_rc=$?
3710814a2baSmrg  done
3720814a2baSmrg  if test $am_rc -ne 0; then
3730814a2baSmrg    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
3740814a2baSmrg    for automatic dependency tracking.  If GNU make was not used, consider
3750814a2baSmrg    re-running the configure script with MAKE="gmake" (or whatever is
3760814a2baSmrg    necessary).  You can also try re-running configure with the
3770814a2baSmrg    '--disable-dependency-tracking' option to at least be able to build
3780814a2baSmrg    the package (albeit without support for automatic dependency tracking).])
37986dafe34Smrg  fi
3800814a2baSmrg  AS_UNSET([am_dirpart])
3810814a2baSmrg  AS_UNSET([am_filepart])
3820814a2baSmrg  AS_UNSET([am_mf])
3830814a2baSmrg  AS_UNSET([am_rc])
3840814a2baSmrg  rm -f conftest-deps.mk
3850814a2baSmrg}
3860814a2baSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
38776888252Smrg
38876888252Smrg
3890814a2baSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3900814a2baSmrg# -----------------------------
3910814a2baSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
3920814a2baSmrg#
3930814a2baSmrg# This code is only required when automatic dependency tracking is enabled.
3940814a2baSmrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
3950814a2baSmrg# order to bootstrap the dependency handling code.
3960814a2baSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3970814a2baSmrg[AC_CONFIG_COMMANDS([depfiles],
3980814a2baSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3990814a2baSmrg     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
40076888252Smrg
4010814a2baSmrg# Do all the work for Automake.                             -*- Autoconf -*-
402d8556812Smrg
4030814a2baSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4040814a2baSmrg#
4050814a2baSmrg# This file is free software; the Free Software Foundation
4060814a2baSmrg# gives unlimited permission to copy and/or distribute it,
4070814a2baSmrg# with or without modifications, as long as this notice is preserved.
4081ae1b5e8Smrg
4090814a2baSmrg# This macro actually does too much.  Some checks are only needed if
4100814a2baSmrg# your package does certain things.  But this isn't really a big deal.
4111ae1b5e8Smrg
4120814a2baSmrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
4130814a2baSmrgm4_define([AC_PROG_CC],
4140814a2baSmrgm4_defn([AC_PROG_CC])
4150814a2baSmrg[_AM_PROG_CC_C_O
4160814a2baSmrg])
4171ae1b5e8Smrg
4180814a2baSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4190814a2baSmrg# AM_INIT_AUTOMAKE([OPTIONS])
4200814a2baSmrg# -----------------------------------------------
4210814a2baSmrg# The call with PACKAGE and VERSION arguments is the old style
4220814a2baSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4230814a2baSmrg# and VERSION should now be passed to AC_INIT and removed from
4240814a2baSmrg# the call to AM_INIT_AUTOMAKE.
4250814a2baSmrg# We support both call styles for the transition.  After
4260814a2baSmrg# the next Automake release, Autoconf can make the AC_INIT
4270814a2baSmrg# arguments mandatory, and then we can depend on a new Autoconf
4280814a2baSmrg# release and drop the old call support.
4290814a2baSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4300814a2baSmrg[AC_PREREQ([2.65])dnl
4310814a2baSmrgm4_ifdef([_$0_ALREADY_INIT],
4320814a2baSmrg  [m4_fatal([$0 expanded multiple times
4330814a2baSmrg]m4_defn([_$0_ALREADY_INIT]))],
4340814a2baSmrg  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
4350814a2baSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4360814a2baSmrgdnl the ones we care about.
4370814a2baSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4380814a2baSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4390814a2baSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4400814a2baSmrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4410814a2baSmrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4420814a2baSmrg  # is not polluted with repeated "-I."
4430814a2baSmrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4440814a2baSmrg  # test to see if srcdir already configured
4450814a2baSmrg  if test -f $srcdir/config.status; then
4460814a2baSmrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
44786dafe34Smrg  fi
4480814a2baSmrgfi
44976888252Smrg
4500814a2baSmrg# test whether we have cygpath
4510814a2baSmrgif test -z "$CYGPATH_W"; then
4520814a2baSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4530814a2baSmrg    CYGPATH_W='cygpath -w'
4540814a2baSmrg  else
4550814a2baSmrg    CYGPATH_W=echo
4560814a2baSmrg  fi
4570814a2baSmrgfi
4580814a2baSmrgAC_SUBST([CYGPATH_W])
45976888252Smrg
4600814a2baSmrg# Define the identity of the package.
4610814a2baSmrgdnl Distinguish between old-style and new-style calls.
4620814a2baSmrgm4_ifval([$2],
4630814a2baSmrg[AC_DIAGNOSE([obsolete],
4640814a2baSmrg             [$0: two- and three-arguments forms are deprecated.])
4650814a2baSmrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4660814a2baSmrg AC_SUBST([PACKAGE], [$1])dnl
4670814a2baSmrg AC_SUBST([VERSION], [$2])],
4680814a2baSmrg[_AM_SET_OPTIONS([$1])dnl
4690814a2baSmrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4700814a2baSmrgm4_if(
4710814a2baSmrg  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
4720814a2baSmrg  [ok:ok],,
4730814a2baSmrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4740814a2baSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4750814a2baSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
47676888252Smrg
4770814a2baSmrg_AM_IF_OPTION([no-define],,
4780814a2baSmrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
4790814a2baSmrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
48076888252Smrg
4810814a2baSmrg# Some tools Automake needs.
4820814a2baSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4830814a2baSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
4840814a2baSmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
4850814a2baSmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
4860814a2baSmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
4870814a2baSmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
4880814a2baSmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
4890814a2baSmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4900814a2baSmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
4910814a2baSmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
4920814a2baSmrg# For better backward compatibility.  To be removed once Automake 1.9.x
4930814a2baSmrg# dies out for good.  For more background, see:
4940814a2baSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4950814a2baSmrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4960814a2baSmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
4970814a2baSmrg# We need awk for the "check" target (and possibly the TAP driver).  The
4980814a2baSmrg# system "awk" is bad on some platforms.
4990814a2baSmrgAC_REQUIRE([AC_PROG_AWK])dnl
5000814a2baSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5010814a2baSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5020814a2baSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5030814a2baSmrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5040814a2baSmrg			     [_AM_PROG_TAR([v7])])])
5050814a2baSmrg_AM_IF_OPTION([no-dependencies],,
5060814a2baSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
5070814a2baSmrg		  [_AM_DEPENDENCIES([CC])],
5080814a2baSmrg		  [m4_define([AC_PROG_CC],
5090814a2baSmrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
5100814a2baSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5110814a2baSmrg		  [_AM_DEPENDENCIES([CXX])],
5120814a2baSmrg		  [m4_define([AC_PROG_CXX],
5130814a2baSmrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
5140814a2baSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5150814a2baSmrg		  [_AM_DEPENDENCIES([OBJC])],
5160814a2baSmrg		  [m4_define([AC_PROG_OBJC],
5170814a2baSmrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
5180814a2baSmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
5190814a2baSmrg		  [_AM_DEPENDENCIES([OBJCXX])],
5200814a2baSmrg		  [m4_define([AC_PROG_OBJCXX],
5210814a2baSmrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
52263847c39Smrg])
5230814a2baSmrg# Variables for tags utilities; see am/tags.am
5240814a2baSmrgif test -z "$CTAGS"; then
5250814a2baSmrg  CTAGS=ctags
5260814a2baSmrgfi
5270814a2baSmrgAC_SUBST([CTAGS])
5280814a2baSmrgif test -z "$ETAGS"; then
5290814a2baSmrg  ETAGS=etags
5300814a2baSmrgfi
5310814a2baSmrgAC_SUBST([ETAGS])
5320814a2baSmrgif test -z "$CSCOPE"; then
5330814a2baSmrg  CSCOPE=cscope
5340814a2baSmrgfi
5350814a2baSmrgAC_SUBST([CSCOPE])
53676888252Smrg
5370814a2baSmrgAC_REQUIRE([AM_SILENT_RULES])dnl
5380814a2baSmrgdnl The testsuite driver may need to know about EXEEXT, so add the
5390814a2baSmrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
5400814a2baSmrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
5410814a2baSmrgAC_CONFIG_COMMANDS_PRE(dnl
5420814a2baSmrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5430814a2baSmrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
54476888252Smrg
5450814a2baSmrg# POSIX will say in a future version that running "rm -f" with no argument
5460814a2baSmrg# is OK; and we want to be able to make that assumption in our Makefile
5470814a2baSmrg# recipes.  So use an aggressive probe to check that the usage we want is
5480814a2baSmrg# actually supported "in the wild" to an acceptable degree.
5490814a2baSmrg# See automake bug#10828.
5500814a2baSmrg# To make any issue more visible, cause the running configure to be aborted
5510814a2baSmrg# by default if the 'rm' program in use doesn't match our expectations; the
5520814a2baSmrg# user can still override this though.
5530814a2baSmrgif rm -f && rm -fr && rm -rf; then : OK; else
5540814a2baSmrg  cat >&2 <<'END'
5550814a2baSmrgOops!
55676888252Smrg
5570814a2baSmrgYour 'rm' program seems unable to run without file operands specified
5580814a2baSmrgon the command line, even when the '-f' option is present.  This is contrary
5590814a2baSmrgto the behaviour of most rm programs out there, and not conforming with
5600814a2baSmrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
561d8556812Smrg
5620814a2baSmrgPlease tell bug-automake@gnu.org about your system, including the value
5630814a2baSmrgof your $PATH and any error possibly output before this message.  This
5640814a2baSmrgcan help us improve future automake versions.
565d8556812Smrg
5660814a2baSmrgEND
5670814a2baSmrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5680814a2baSmrg    echo 'Configuration will proceed anyway, since you have set the' >&2
5690814a2baSmrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5700814a2baSmrg    echo >&2
5710814a2baSmrg  else
5720814a2baSmrg    cat >&2 <<'END'
5730814a2baSmrgAborting the configuration process, to ensure you take notice of the issue.
57476888252Smrg
5750814a2baSmrgYou can download and install GNU coreutils to get an 'rm' implementation
5760814a2baSmrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
57776888252Smrg
5780814a2baSmrgIf you want to complete the configuration process using your problematic
5790814a2baSmrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5800814a2baSmrgto "yes", and re-run configure.
58176888252Smrg
5820814a2baSmrgEND
5830814a2baSmrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
5840814a2baSmrg  fi
5850814a2baSmrgfi
5860814a2baSmrgdnl The trailing newline in this macro's definition is deliberate, for
5870814a2baSmrgdnl backward compatibility and to allow trailing 'dnl'-style comments
5880814a2baSmrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
5890814a2baSmrg])
59076888252Smrg
5910814a2baSmrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5920814a2baSmrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5930814a2baSmrgdnl mangled by Autoconf and run in a shell conditional statement.
5940814a2baSmrgm4_define([_AC_COMPILER_EXEEXT],
5950814a2baSmrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
59663847c39Smrg
5970814a2baSmrg# When config.status generates a header, we must update the stamp-h file.
5980814a2baSmrg# This file resides in the same directory as the config header
5990814a2baSmrg# that is generated.  The stamp files are numbered to have different names.
60063847c39Smrg
6010814a2baSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6020814a2baSmrg# loop where config.status creates the headers, so we can generate
6030814a2baSmrg# our stamp files there.
6040814a2baSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6050814a2baSmrg[# Compute $1's index in $config_headers.
6060814a2baSmrg_am_arg=$1
6070814a2baSmrg_am_stamp_count=1
6080814a2baSmrgfor _am_header in $config_headers :; do
6090814a2baSmrg  case $_am_header in
6100814a2baSmrg    $_am_arg | $_am_arg:* )
6110814a2baSmrg      break ;;
6120814a2baSmrg    * )
6130814a2baSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6140814a2baSmrg  esac
6150814a2baSmrgdone
6160814a2baSmrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
61763847c39Smrg
6180814a2baSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6190814a2baSmrg#
6200814a2baSmrg# This file is free software; the Free Software Foundation
6210814a2baSmrg# gives unlimited permission to copy and/or distribute it,
6220814a2baSmrg# with or without modifications, as long as this notice is preserved.
62376888252Smrg
6240814a2baSmrg# AM_PROG_INSTALL_SH
6250814a2baSmrg# ------------------
6260814a2baSmrg# Define $install_sh.
6270814a2baSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
6280814a2baSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6290814a2baSmrgif test x"${install_sh+set}" != xset; then
6300814a2baSmrg  case $am_aux_dir in
6310814a2baSmrg  *\ * | *\	*)
6320814a2baSmrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6330814a2baSmrg  *)
6340814a2baSmrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
6350814a2baSmrg  esac
6360814a2baSmrgfi
6370814a2baSmrgAC_SUBST([install_sh])])
63886dafe34Smrg
6390814a2baSmrg# Copyright (C) 2003-2021 Free Software Foundation, Inc.
6400814a2baSmrg#
6410814a2baSmrg# This file is free software; the Free Software Foundation
6420814a2baSmrg# gives unlimited permission to copy and/or distribute it,
6430814a2baSmrg# with or without modifications, as long as this notice is preserved.
64463847c39Smrg
6450814a2baSmrg# Check whether the underlying file-system supports filenames
6460814a2baSmrg# with a leading dot.  For instance MS-DOS doesn't.
6470814a2baSmrgAC_DEFUN([AM_SET_LEADING_DOT],
6480814a2baSmrg[rm -rf .tst 2>/dev/null
6490814a2baSmrgmkdir .tst 2>/dev/null
6500814a2baSmrgif test -d .tst; then
6510814a2baSmrg  am__leading_dot=.
6520814a2baSmrgelse
6530814a2baSmrg  am__leading_dot=_
6540814a2baSmrgfi
6550814a2baSmrgrmdir .tst 2>/dev/null
6560814a2baSmrgAC_SUBST([am__leading_dot])])
65763847c39Smrg
6580814a2baSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
65963847c39Smrg
6600814a2baSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6610814a2baSmrg#
6620814a2baSmrg# This file is free software; the Free Software Foundation
6630814a2baSmrg# gives unlimited permission to copy and/or distribute it,
6640814a2baSmrg# with or without modifications, as long as this notice is preserved.
66563847c39Smrg
6660814a2baSmrg# AM_MAKE_INCLUDE()
6670814a2baSmrg# -----------------
6680814a2baSmrg# Check whether make has an 'include' directive that can support all
6690814a2baSmrg# the idioms we need for our automatic dependency tracking code.
6700814a2baSmrgAC_DEFUN([AM_MAKE_INCLUDE],
6710814a2baSmrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
6720814a2baSmrgcat > confinc.mk << 'END'
6730814a2baSmrgam__doit:
6740814a2baSmrg	@echo this is the am__doit target >confinc.out
6750814a2baSmrg.PHONY: am__doit
6760814a2baSmrgEND
6770814a2baSmrgam__include="#"
6780814a2baSmrgam__quote=
6790814a2baSmrg# BSD make does it like this.
6800814a2baSmrgecho '.include "confinc.mk" # ignored' > confmf.BSD
6810814a2baSmrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
6820814a2baSmrgecho 'include confinc.mk # ignored' > confmf.GNU
6830814a2baSmrg_am_result=no
6840814a2baSmrgfor s in GNU BSD; do
6850814a2baSmrg  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
6860814a2baSmrg  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
6870814a2baSmrg      ['0:this is the am__doit target'],
6880814a2baSmrg      [AS_CASE([$s],
6890814a2baSmrg          [BSD], [am__include='.include' am__quote='"'],
6900814a2baSmrg          [am__include='include' am__quote=''])])
6910814a2baSmrg  if test "$am__include" != "#"; then
6920814a2baSmrg    _am_result="yes ($s style)"
6930814a2baSmrg    break
6940814a2baSmrg  fi
6950814a2baSmrgdone
6960814a2baSmrgrm -f confinc.* confmf.*
6970814a2baSmrgAC_MSG_RESULT([${_am_result}])
6980814a2baSmrgAC_SUBST([am__include])])
6990814a2baSmrgAC_SUBST([am__quote])])
70063847c39Smrg
7010814a2baSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
70276888252Smrg
7030814a2baSmrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
7040814a2baSmrg#
7050814a2baSmrg# This file is free software; the Free Software Foundation
7060814a2baSmrg# gives unlimited permission to copy and/or distribute it,
7070814a2baSmrg# with or without modifications, as long as this notice is preserved.
70876888252Smrg
7090814a2baSmrg# AM_MISSING_PROG(NAME, PROGRAM)
7100814a2baSmrg# ------------------------------
7110814a2baSmrgAC_DEFUN([AM_MISSING_PROG],
7120814a2baSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7130814a2baSmrg$1=${$1-"${am_missing_run}$2"}
7140814a2baSmrgAC_SUBST($1)])
71586dafe34Smrg
7160814a2baSmrg# AM_MISSING_HAS_RUN
7170814a2baSmrg# ------------------
7180814a2baSmrg# Define MISSING if not defined so far and test if it is modern enough.
7190814a2baSmrg# If it is, set am_missing_run to use it, otherwise, to nothing.
7200814a2baSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7210814a2baSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7220814a2baSmrgAC_REQUIRE_AUX_FILE([missing])dnl
7230814a2baSmrgif test x"${MISSING+set}" != xset; then
7240814a2baSmrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
7250814a2baSmrgfi
7260814a2baSmrg# Use eval to expand $SHELL
7270814a2baSmrgif eval "$MISSING --is-lightweight"; then
7280814a2baSmrg  am_missing_run="$MISSING "
7290814a2baSmrgelse
7300814a2baSmrg  am_missing_run=
7310814a2baSmrg  AC_MSG_WARN(['missing' script is too old or missing])
7320814a2baSmrgfi
73363847c39Smrg])
73476888252Smrg
7350814a2baSmrg# Helper functions for option handling.                     -*- Autoconf -*-
73676888252Smrg
7370814a2baSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
7380814a2baSmrg#
7390814a2baSmrg# This file is free software; the Free Software Foundation
7400814a2baSmrg# gives unlimited permission to copy and/or distribute it,
7410814a2baSmrg# with or without modifications, as long as this notice is preserved.
742d8556812Smrg
7430814a2baSmrg# _AM_MANGLE_OPTION(NAME)
7440814a2baSmrg# -----------------------
7450814a2baSmrgAC_DEFUN([_AM_MANGLE_OPTION],
7460814a2baSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
74776888252Smrg
7480814a2baSmrg# _AM_SET_OPTION(NAME)
7490814a2baSmrg# --------------------
7500814a2baSmrg# Set option NAME.  Presently that only means defining a flag for this option.
7510814a2baSmrgAC_DEFUN([_AM_SET_OPTION],
7520814a2baSmrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
75376888252Smrg
7540814a2baSmrg# _AM_SET_OPTIONS(OPTIONS)
7550814a2baSmrg# ------------------------
7560814a2baSmrg# OPTIONS is a space-separated list of Automake options.
7570814a2baSmrgAC_DEFUN([_AM_SET_OPTIONS],
7580814a2baSmrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
75976888252Smrg
7600814a2baSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7610814a2baSmrg# -------------------------------------------
7620814a2baSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7630814a2baSmrgAC_DEFUN([_AM_IF_OPTION],
7640814a2baSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
76576888252Smrg
7660814a2baSmrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
76763847c39Smrg#
7680814a2baSmrg# This file is free software; the Free Software Foundation
7690814a2baSmrg# gives unlimited permission to copy and/or distribute it,
7700814a2baSmrg# with or without modifications, as long as this notice is preserved.
77163847c39Smrg
7720814a2baSmrg# _AM_PROG_CC_C_O
7730814a2baSmrg# ---------------
7740814a2baSmrg# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
7750814a2baSmrg# to automatically call this.
7760814a2baSmrgAC_DEFUN([_AM_PROG_CC_C_O],
7770814a2baSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7780814a2baSmrgAC_REQUIRE_AUX_FILE([compile])dnl
7790814a2baSmrgAC_LANG_PUSH([C])dnl
7800814a2baSmrgAC_CACHE_CHECK(
7810814a2baSmrg  [whether $CC understands -c and -o together],
7820814a2baSmrg  [am_cv_prog_cc_c_o],
7830814a2baSmrg  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
7840814a2baSmrg  # Make sure it works both with $CC and with simple cc.
7850814a2baSmrg  # Following AC_PROG_CC_C_O, we do the test twice because some
7860814a2baSmrg  # compilers refuse to overwrite an existing .o file with -o,
7870814a2baSmrg  # though they will create one.
7880814a2baSmrg  am_cv_prog_cc_c_o=yes
7890814a2baSmrg  for am_i in 1 2; do
7900814a2baSmrg    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
7910814a2baSmrg         && test -f conftest2.$ac_objext; then
7920814a2baSmrg      : OK
7930814a2baSmrg    else
7940814a2baSmrg      am_cv_prog_cc_c_o=no
7950814a2baSmrg      break
7960814a2baSmrg    fi
7970814a2baSmrg  done
7980814a2baSmrg  rm -f core conftest*
7990814a2baSmrg  unset am_i])
8000814a2baSmrgif test "$am_cv_prog_cc_c_o" != yes; then
8010814a2baSmrg   # Losing compiler, so override with the script.
8020814a2baSmrg   # FIXME: It is wrong to rewrite CC.
8030814a2baSmrg   # But if we don't then we get into trouble of one sort or another.
8040814a2baSmrg   # A longer-term fix would be to have automake use am__CC in this case,
8050814a2baSmrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8060814a2baSmrg   CC="$am_aux_dir/compile $CC"
8070814a2baSmrgfi
8080814a2baSmrgAC_LANG_POP([C])])
80963847c39Smrg
8100814a2baSmrg# For backward compatibility.
8110814a2baSmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
81263847c39Smrg
8130814a2baSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
81463847c39Smrg#
8150814a2baSmrg# This file is free software; the Free Software Foundation
8160814a2baSmrg# gives unlimited permission to copy and/or distribute it,
8170814a2baSmrg# with or without modifications, as long as this notice is preserved.
81863847c39Smrg
8190814a2baSmrg# AM_RUN_LOG(COMMAND)
8200814a2baSmrg# -------------------
8210814a2baSmrg# Run COMMAND, save the exit status in ac_status, and log it.
8220814a2baSmrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
8230814a2baSmrgAC_DEFUN([AM_RUN_LOG],
8240814a2baSmrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
8250814a2baSmrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
8260814a2baSmrg   ac_status=$?
8270814a2baSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8280814a2baSmrg   (exit $ac_status); }])
82963847c39Smrg
8300814a2baSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
83163847c39Smrg
8320814a2baSmrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
8330814a2baSmrg#
8340814a2baSmrg# This file is free software; the Free Software Foundation
8350814a2baSmrg# gives unlimited permission to copy and/or distribute it,
8360814a2baSmrg# with or without modifications, as long as this notice is preserved.
83763847c39Smrg
8380814a2baSmrg# AM_SANITY_CHECK
8390814a2baSmrg# ---------------
8400814a2baSmrgAC_DEFUN([AM_SANITY_CHECK],
8410814a2baSmrg[AC_MSG_CHECKING([whether build environment is sane])
8420814a2baSmrg# Reject unsafe characters in $srcdir or the absolute working directory
8430814a2baSmrg# name.  Accept space and tab only in the latter.
8440814a2baSmrgam_lf='
8450814a2baSmrg'
8460814a2baSmrgcase `pwd` in
8470814a2baSmrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8480814a2baSmrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8490814a2baSmrgesac
8500814a2baSmrgcase $srcdir in
8510814a2baSmrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8520814a2baSmrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
8530814a2baSmrgesac
85463847c39Smrg
8550814a2baSmrg# Do 'set' in a subshell so we don't clobber the current shell's
8560814a2baSmrg# arguments.  Must try -L first in case configure is actually a
8570814a2baSmrg# symlink; some systems play weird games with the mod time of symlinks
8580814a2baSmrg# (eg FreeBSD returns the mod time of the symlink's containing
8590814a2baSmrg# directory).
8600814a2baSmrgif (
8610814a2baSmrg   am_has_slept=no
8620814a2baSmrg   for am_try in 1 2; do
8630814a2baSmrg     echo "timestamp, slept: $am_has_slept" > conftest.file
8640814a2baSmrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8650814a2baSmrg     if test "$[*]" = "X"; then
8660814a2baSmrg	# -L didn't work.
8670814a2baSmrg	set X `ls -t "$srcdir/configure" conftest.file`
8680814a2baSmrg     fi
8690814a2baSmrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
8700814a2baSmrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
87163847c39Smrg
8720814a2baSmrg	# If neither matched, then we have a broken ls.  This can happen
8730814a2baSmrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
8740814a2baSmrg	# broken ls alias from the environment.  This has actually
8750814a2baSmrg	# happened.  Such a system could not be considered "sane".
8760814a2baSmrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8770814a2baSmrg  alias in your environment])
8780814a2baSmrg     fi
8790814a2baSmrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
8800814a2baSmrg       break
8810814a2baSmrg     fi
8820814a2baSmrg     # Just in case.
8830814a2baSmrg     sleep 1
8840814a2baSmrg     am_has_slept=yes
8850814a2baSmrg   done
8860814a2baSmrg   test "$[2]" = conftest.file
8870814a2baSmrg   )
8880814a2baSmrgthen
8890814a2baSmrg   # Ok.
8900814a2baSmrg   :
8910814a2baSmrgelse
8920814a2baSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
8930814a2baSmrgCheck your system clock])
8940814a2baSmrgfi
8950814a2baSmrgAC_MSG_RESULT([yes])
8960814a2baSmrg# If we didn't sleep, we still need to ensure time stamps of config.status and
8970814a2baSmrg# generated files are strictly newer.
8980814a2baSmrgam_sleep_pid=
8990814a2baSmrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
9000814a2baSmrg  ( sleep 1 ) &
9010814a2baSmrg  am_sleep_pid=$!
9020814a2baSmrgfi
9030814a2baSmrgAC_CONFIG_COMMANDS_PRE(
9040814a2baSmrg  [AC_MSG_CHECKING([that generated files are newer than configure])
9050814a2baSmrg   if test -n "$am_sleep_pid"; then
9060814a2baSmrg     # Hide warnings about reused PIDs.
9070814a2baSmrg     wait $am_sleep_pid 2>/dev/null
9080814a2baSmrg   fi
9090814a2baSmrg   AC_MSG_RESULT([done])])
9100814a2baSmrgrm -f conftest.file
9110814a2baSmrg])
91276888252Smrg
9130814a2baSmrg# Copyright (C) 2009-2021 Free Software Foundation, Inc.
9140814a2baSmrg#
9150814a2baSmrg# This file is free software; the Free Software Foundation
9160814a2baSmrg# gives unlimited permission to copy and/or distribute it,
9170814a2baSmrg# with or without modifications, as long as this notice is preserved.
91876888252Smrg
9190814a2baSmrg# AM_SILENT_RULES([DEFAULT])
9200814a2baSmrg# --------------------------
9210814a2baSmrg# Enable less verbose build rules; with the default set to DEFAULT
9220814a2baSmrg# ("yes" being less verbose, "no" or empty being verbose).
9230814a2baSmrgAC_DEFUN([AM_SILENT_RULES],
9240814a2baSmrg[AC_ARG_ENABLE([silent-rules], [dnl
9250814a2baSmrgAS_HELP_STRING(
9260814a2baSmrg  [--enable-silent-rules],
9270814a2baSmrg  [less verbose build output (undo: "make V=1")])
9280814a2baSmrgAS_HELP_STRING(
9290814a2baSmrg  [--disable-silent-rules],
9300814a2baSmrg  [verbose build output (undo: "make V=0")])dnl
9310814a2baSmrg])
9320814a2baSmrgcase $enable_silent_rules in @%:@ (((
9330814a2baSmrg  yes) AM_DEFAULT_VERBOSITY=0;;
9340814a2baSmrg   no) AM_DEFAULT_VERBOSITY=1;;
9350814a2baSmrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9360814a2baSmrgesac
9370814a2baSmrgdnl
9380814a2baSmrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
9390814a2baSmrgdnl do not support nested variable expansions.
9400814a2baSmrgdnl See automake bug#9928 and bug#10237.
9410814a2baSmrgam_make=${MAKE-make}
9420814a2baSmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
9430814a2baSmrg   [am_cv_make_support_nested_variables],
9440814a2baSmrg   [if AS_ECHO([['TRUE=$(BAR$(V))
9450814a2baSmrgBAR0=false
9460814a2baSmrgBAR1=true
9470814a2baSmrgV=1
9480814a2baSmrgam__doit:
9490814a2baSmrg	@$(TRUE)
9500814a2baSmrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
9510814a2baSmrg  am_cv_make_support_nested_variables=yes
9520814a2baSmrgelse
9530814a2baSmrg  am_cv_make_support_nested_variables=no
9540814a2baSmrgfi])
9550814a2baSmrgif test $am_cv_make_support_nested_variables = yes; then
9560814a2baSmrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
9570814a2baSmrg  AM_V='$(V)'
9580814a2baSmrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
9590814a2baSmrgelse
9600814a2baSmrg  AM_V=$AM_DEFAULT_VERBOSITY
9610814a2baSmrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
9620814a2baSmrgfi
9630814a2baSmrgAC_SUBST([AM_V])dnl
9640814a2baSmrgAM_SUBST_NOTMAKE([AM_V])dnl
9650814a2baSmrgAC_SUBST([AM_DEFAULT_V])dnl
9660814a2baSmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
9670814a2baSmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9680814a2baSmrgAM_BACKSLASH='\'
9690814a2baSmrgAC_SUBST([AM_BACKSLASH])dnl
9700814a2baSmrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
97163847c39Smrg])
972d8556812Smrg
9730814a2baSmrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
9740814a2baSmrg#
9750814a2baSmrg# This file is free software; the Free Software Foundation
9760814a2baSmrg# gives unlimited permission to copy and/or distribute it,
9770814a2baSmrg# with or without modifications, as long as this notice is preserved.
97863847c39Smrg
9790814a2baSmrg# AM_PROG_INSTALL_STRIP
9800814a2baSmrg# ---------------------
9810814a2baSmrg# One issue with vendor 'install' (even GNU) is that you can't
9820814a2baSmrg# specify the program used to strip binaries.  This is especially
9830814a2baSmrg# annoying in cross-compiling environments, where the build's strip
9840814a2baSmrg# is unlikely to handle the host's binaries.
9850814a2baSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9860814a2baSmrg# always use install-sh in "make install-strip", and initialize
9870814a2baSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
9880814a2baSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9890814a2baSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9900814a2baSmrg# Installed binaries are usually stripped using 'strip' when the user
9910814a2baSmrg# run "make install-strip".  However 'strip' might not be the right
9920814a2baSmrg# tool to use in cross-compilation environments, therefore Automake
9930814a2baSmrg# will honor the 'STRIP' environment variable to overrule this program.
9940814a2baSmrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
9950814a2baSmrgif test "$cross_compiling" != no; then
9960814a2baSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
9970814a2baSmrgfi
9980814a2baSmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9990814a2baSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
100076888252Smrg
10010814a2baSmrg# Copyright (C) 2006-2021 Free Software Foundation, Inc.
10020814a2baSmrg#
10030814a2baSmrg# This file is free software; the Free Software Foundation
10040814a2baSmrg# gives unlimited permission to copy and/or distribute it,
10050814a2baSmrg# with or without modifications, as long as this notice is preserved.
100676888252Smrg
10070814a2baSmrg# _AM_SUBST_NOTMAKE(VARIABLE)
10080814a2baSmrg# ---------------------------
10090814a2baSmrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10100814a2baSmrg# This macro is traced by Automake.
10110814a2baSmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
101276888252Smrg
10130814a2baSmrg# AM_SUBST_NOTMAKE(VARIABLE)
10140814a2baSmrg# --------------------------
10150814a2baSmrg# Public sister of _AM_SUBST_NOTMAKE.
10160814a2baSmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
101776888252Smrg
10180814a2baSmrg# Check how to create a tarball.                            -*- Autoconf -*-
101976888252Smrg
10200814a2baSmrg# Copyright (C) 2004-2021 Free Software Foundation, Inc.
10210814a2baSmrg#
10220814a2baSmrg# This file is free software; the Free Software Foundation
10230814a2baSmrg# gives unlimited permission to copy and/or distribute it,
10240814a2baSmrg# with or without modifications, as long as this notice is preserved.
102576888252Smrg
10260814a2baSmrg# _AM_PROG_TAR(FORMAT)
10270814a2baSmrg# --------------------
10280814a2baSmrg# Check how to create a tarball in format FORMAT.
10290814a2baSmrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
10300814a2baSmrg#
10310814a2baSmrg# Substitute a variable $(am__tar) that is a command
10320814a2baSmrg# writing to stdout a FORMAT-tarball containing the directory
10330814a2baSmrg# $tardir.
10340814a2baSmrg#     tardir=directory && $(am__tar) > result.tar
10350814a2baSmrg#
10360814a2baSmrg# Substitute a variable $(am__untar) that extract such
10370814a2baSmrg# a tarball read from stdin.
10380814a2baSmrg#     $(am__untar) < result.tar
10390814a2baSmrg#
10400814a2baSmrgAC_DEFUN([_AM_PROG_TAR],
10410814a2baSmrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
10420814a2baSmrg# in the wild :-(  We should find a proper way to deprecate it ...
10430814a2baSmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
104476888252Smrg
10450814a2baSmrg# We'll loop over all known methods to create a tar archive until one works.
10460814a2baSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
104763847c39Smrg
10480814a2baSmrgm4_if([$1], [v7],
10490814a2baSmrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
105063847c39Smrg
10510814a2baSmrg  [m4_case([$1],
10520814a2baSmrg    [ustar],
10530814a2baSmrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10540814a2baSmrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
10550814a2baSmrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10560814a2baSmrg      # and bug#13588).
10570814a2baSmrg      am_max_uid=2097151 # 2^21 - 1
10580814a2baSmrg      am_max_gid=$am_max_uid
10590814a2baSmrg      # The $UID and $GID variables are not portable, so we need to resort
10600814a2baSmrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
10610814a2baSmrg      # below are definitely unexpected, so allow the users to see them
10620814a2baSmrg      # (that is, avoid stderr redirection).
10630814a2baSmrg      am_uid=`id -u || echo unknown`
10640814a2baSmrg      am_gid=`id -g || echo unknown`
10650814a2baSmrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10660814a2baSmrg      if test $am_uid -le $am_max_uid; then
10670814a2baSmrg         AC_MSG_RESULT([yes])
10680814a2baSmrg      else
10690814a2baSmrg         AC_MSG_RESULT([no])
10700814a2baSmrg         _am_tools=none
10710814a2baSmrg      fi
10720814a2baSmrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10730814a2baSmrg      if test $am_gid -le $am_max_gid; then
10740814a2baSmrg         AC_MSG_RESULT([yes])
10750814a2baSmrg      else
10760814a2baSmrg        AC_MSG_RESULT([no])
10770814a2baSmrg        _am_tools=none
10780814a2baSmrg      fi],
107976888252Smrg
10800814a2baSmrg  [pax],
10810814a2baSmrg    [],
108263847c39Smrg
10830814a2baSmrg  [m4_fatal([Unknown tar format])])
108463847c39Smrg
10850814a2baSmrg  AC_MSG_CHECKING([how to create a $1 tar archive])
108663847c39Smrg
10870814a2baSmrg  # Go ahead even if we have the value already cached.  We do so because we
10880814a2baSmrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
10890814a2baSmrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
10900814a2baSmrg
10910814a2baSmrg  for _am_tool in $_am_tools; do
10920814a2baSmrg    case $_am_tool in
10930814a2baSmrg    gnutar)
10940814a2baSmrg      for _am_tar in tar gnutar gtar; do
10950814a2baSmrg        AM_RUN_LOG([$_am_tar --version]) && break
10960814a2baSmrg      done
10970814a2baSmrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10980814a2baSmrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10990814a2baSmrg      am__untar="$_am_tar -xf -"
11000814a2baSmrg      ;;
11010814a2baSmrg    plaintar)
11020814a2baSmrg      # Must skip GNU tar: if it does not support --format= it doesn't create
11030814a2baSmrg      # ustar tarball either.
11040814a2baSmrg      (tar --version) >/dev/null 2>&1 && continue
11050814a2baSmrg      am__tar='tar chf - "$$tardir"'
11060814a2baSmrg      am__tar_='tar chf - "$tardir"'
11070814a2baSmrg      am__untar='tar xf -'
11080814a2baSmrg      ;;
11090814a2baSmrg    pax)
11100814a2baSmrg      am__tar='pax -L -x $1 -w "$$tardir"'
11110814a2baSmrg      am__tar_='pax -L -x $1 -w "$tardir"'
11120814a2baSmrg      am__untar='pax -r'
11130814a2baSmrg      ;;
11140814a2baSmrg    cpio)
11150814a2baSmrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11160814a2baSmrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11170814a2baSmrg      am__untar='cpio -i -H $1 -d'
11180814a2baSmrg      ;;
11190814a2baSmrg    none)
11200814a2baSmrg      am__tar=false
11210814a2baSmrg      am__tar_=false
11220814a2baSmrg      am__untar=false
11230814a2baSmrg      ;;
11240814a2baSmrg    esac
112563847c39Smrg
11260814a2baSmrg    # If the value was cached, stop now.  We just wanted to have am__tar
11270814a2baSmrg    # and am__untar set.
11280814a2baSmrg    test -n "${am_cv_prog_tar_$1}" && break
112963847c39Smrg
11300814a2baSmrg    # tar/untar a dummy directory, and stop if the command works.
11310814a2baSmrg    rm -rf conftest.dir
11320814a2baSmrg    mkdir conftest.dir
11330814a2baSmrg    echo GrepMe > conftest.dir/file
11340814a2baSmrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11350814a2baSmrg    rm -rf conftest.dir
11360814a2baSmrg    if test -s conftest.tar; then
11370814a2baSmrg      AM_RUN_LOG([$am__untar <conftest.tar])
11380814a2baSmrg      AM_RUN_LOG([cat conftest.dir/file])
11390814a2baSmrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
114063847c39Smrg    fi
11410814a2baSmrg  done
11420814a2baSmrg  rm -rf conftest.dir
114376888252Smrg
11440814a2baSmrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11450814a2baSmrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
114676888252Smrg
11470814a2baSmrgAC_SUBST([am__tar])
11480814a2baSmrgAC_SUBST([am__untar])
11490814a2baSmrg]) # _AM_PROG_TAR
115076888252Smrg
11510814a2baSmrgdnl Copyright 2005 Red Hat, Inc
11520814a2baSmrgdnl 
11530814a2baSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
11540814a2baSmrgdnl documentation for any purpose is hereby granted without fee, provided that
11550814a2baSmrgdnl the above copyright notice appear in all copies and that both that
11560814a2baSmrgdnl copyright notice and this permission notice appear in supporting
11570814a2baSmrgdnl documentation.
11580814a2baSmrgdnl 
11590814a2baSmrgdnl The above copyright notice and this permission notice shall be included
11600814a2baSmrgdnl in all copies or substantial portions of the Software.
11610814a2baSmrgdnl 
11620814a2baSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
11630814a2baSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
11640814a2baSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11650814a2baSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
11660814a2baSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
11670814a2baSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
11680814a2baSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
11690814a2baSmrgdnl 
11700814a2baSmrgdnl Except as contained in this notice, the name of the copyright holders shall
11710814a2baSmrgdnl not be used in advertising or otherwise to promote the sale, use or
11720814a2baSmrgdnl other dealings in this Software without prior written authorization
11730814a2baSmrgdnl from the copyright holders.
11740814a2baSmrgdnl 
117576888252Smrg
11760814a2baSmrg# XORG_DRIVER_CHECK_EXT(MACRO, PROTO)
11770814a2baSmrg# --------------------------
11780814a2baSmrg# Checks for the MACRO define in xorg-server.h (from the sdk).  If it
11790814a2baSmrg# is defined, then add the given PROTO to $REQUIRED_MODULES.
118076888252Smrg
11810814a2baSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
11820814a2baSmrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11830814a2baSmrg	SAVE_CFLAGS="$CFLAGS"
11840814a2baSmrg	CFLAGS="$CFLAGS -I`$PKG_CONFIG --variable=sdkdir xorg-server`"
11850814a2baSmrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
11860814a2baSmrg#include "xorg-server.h"
11870814a2baSmrg#if !defined $1
11880814a2baSmrg#error $1 not defined
11890814a2baSmrg#endif
11900814a2baSmrg		]])],
11910814a2baSmrg		[_EXT_CHECK=yes],
11920814a2baSmrg		[_EXT_CHECK=no])
11930814a2baSmrg	CFLAGS="$SAVE_CFLAGS"
11940814a2baSmrg	AC_MSG_CHECKING([if $1 is defined])
11950814a2baSmrg	AC_MSG_RESULT([$_EXT_CHECK])
11960814a2baSmrg	if test "$_EXT_CHECK" != no; then
11970814a2baSmrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
11980814a2baSmrg	fi
11990814a2baSmrg])
120076888252Smrg
12010814a2baSmrgdnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
12020814a2baSmrgdnl serial 11 (pkg-config-0.29)
12030814a2baSmrgdnl
12040814a2baSmrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
12050814a2baSmrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
12060814a2baSmrgdnl
12070814a2baSmrgdnl This program is free software; you can redistribute it and/or modify
12080814a2baSmrgdnl it under the terms of the GNU General Public License as published by
12090814a2baSmrgdnl the Free Software Foundation; either version 2 of the License, or
12100814a2baSmrgdnl (at your option) any later version.
12110814a2baSmrgdnl
12120814a2baSmrgdnl This program is distributed in the hope that it will be useful, but
12130814a2baSmrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of
12140814a2baSmrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12150814a2baSmrgdnl General Public License for more details.
12160814a2baSmrgdnl
12170814a2baSmrgdnl You should have received a copy of the GNU General Public License
12180814a2baSmrgdnl along with this program; if not, write to the Free Software
12190814a2baSmrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
12200814a2baSmrgdnl 02111-1307, USA.
12210814a2baSmrgdnl
12220814a2baSmrgdnl As a special exception to the GNU General Public License, if you
12230814a2baSmrgdnl distribute this file as part of a program that contains a
12240814a2baSmrgdnl configuration script generated by Autoconf, you may include it under
12250814a2baSmrgdnl the same distribution terms that you use for the rest of that
12260814a2baSmrgdnl program.
12270814a2baSmrg
12280814a2baSmrgdnl PKG_PREREQ(MIN-VERSION)
12290814a2baSmrgdnl -----------------------
12300814a2baSmrgdnl Since: 0.29
12310814a2baSmrgdnl
12320814a2baSmrgdnl Verify that the version of the pkg-config macros are at least
12330814a2baSmrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
12340814a2baSmrgdnl installed version of pkg-config, this checks the developer's version
12350814a2baSmrgdnl of pkg.m4 when generating configure.
12360814a2baSmrgdnl
12370814a2baSmrgdnl To ensure that this macro is defined, also add:
12380814a2baSmrgdnl m4_ifndef([PKG_PREREQ],
12390814a2baSmrgdnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
12400814a2baSmrgdnl
12410814a2baSmrgdnl See the "Since" comment for each macro you use to see what version
12420814a2baSmrgdnl of the macros you require.
12430814a2baSmrgm4_defun([PKG_PREREQ],
12440814a2baSmrg[m4_define([PKG_MACROS_VERSION], [0.29])
12450814a2baSmrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
12460814a2baSmrg    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
12470814a2baSmrg])dnl PKG_PREREQ
12480814a2baSmrg
12490814a2baSmrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
12500814a2baSmrgdnl ----------------------------------
12510814a2baSmrgdnl Since: 0.16
12520814a2baSmrgdnl
12530814a2baSmrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to
12540814a2baSmrgdnl first found in the path. Checks that the version of pkg-config found
12550814a2baSmrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
12560814a2baSmrgdnl used since that's the first version where most current features of
12570814a2baSmrgdnl pkg-config existed.
12580814a2baSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
12590814a2baSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
12600814a2baSmrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
12610814a2baSmrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
12620814a2baSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
12630814a2baSmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
12640814a2baSmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
126576888252Smrg
12660814a2baSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12670814a2baSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
12680814a2baSmrgfi
12690814a2baSmrgif test -n "$PKG_CONFIG"; then
12700814a2baSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
12710814a2baSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
12720814a2baSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12730814a2baSmrg		AC_MSG_RESULT([yes])
12740814a2baSmrg	else
12750814a2baSmrg		AC_MSG_RESULT([no])
12760814a2baSmrg		PKG_CONFIG=""
12770814a2baSmrg	fi
12780814a2baSmrgfi[]dnl
12790814a2baSmrg])dnl PKG_PROG_PKG_CONFIG
128063847c39Smrg
12810814a2baSmrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
12820814a2baSmrgdnl -------------------------------------------------------------------
12830814a2baSmrgdnl Since: 0.18
12840814a2baSmrgdnl
12850814a2baSmrgdnl Check to see whether a particular set of modules exists. Similar to
12860814a2baSmrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors.
12870814a2baSmrgdnl
12880814a2baSmrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
12890814a2baSmrgdnl only at the first occurence in configure.ac, so if the first place
12900814a2baSmrgdnl it's called might be skipped (such as if it is within an "if", you
12910814a2baSmrgdnl have to call PKG_CHECK_EXISTS manually
12920814a2baSmrgAC_DEFUN([PKG_CHECK_EXISTS],
12930814a2baSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
12940814a2baSmrgif test -n "$PKG_CONFIG" && \
12950814a2baSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
12960814a2baSmrg  m4_default([$2], [:])
12970814a2baSmrgm4_ifvaln([$3], [else
12980814a2baSmrg  $3])dnl
12990814a2baSmrgfi])
130063847c39Smrg
13010814a2baSmrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
13020814a2baSmrgdnl ---------------------------------------------
13030814a2baSmrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
13040814a2baSmrgdnl pkg_failed based on the result.
13050814a2baSmrgm4_define([_PKG_CONFIG],
13060814a2baSmrg[if test -n "$$1"; then
13070814a2baSmrg    pkg_cv_[]$1="$$1"
13080814a2baSmrg elif test -n "$PKG_CONFIG"; then
13090814a2baSmrg    PKG_CHECK_EXISTS([$3],
13100814a2baSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
13110814a2baSmrg		      test "x$?" != "x0" && pkg_failed=yes ],
13120814a2baSmrg		     [pkg_failed=yes])
13130814a2baSmrg else
13140814a2baSmrg    pkg_failed=untried
13150814a2baSmrgfi[]dnl
13160814a2baSmrg])dnl _PKG_CONFIG
131763847c39Smrg
13180814a2baSmrgdnl _PKG_SHORT_ERRORS_SUPPORTED
13190814a2baSmrgdnl ---------------------------
13200814a2baSmrgdnl Internal check to see if pkg-config supports short errors.
13210814a2baSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
13220814a2baSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
13230814a2baSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
13240814a2baSmrg        _pkg_short_errors_supported=yes
13250814a2baSmrgelse
13260814a2baSmrg        _pkg_short_errors_supported=no
13270814a2baSmrgfi[]dnl
13280814a2baSmrg])dnl _PKG_SHORT_ERRORS_SUPPORTED
132986dafe34Smrg
133063847c39Smrg
13310814a2baSmrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
13320814a2baSmrgdnl   [ACTION-IF-NOT-FOUND])
13330814a2baSmrgdnl --------------------------------------------------------------
13340814a2baSmrgdnl Since: 0.4.0
13350814a2baSmrgdnl
13360814a2baSmrgdnl Note that if there is a possibility the first call to
13370814a2baSmrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an
13380814a2baSmrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
13390814a2baSmrgAC_DEFUN([PKG_CHECK_MODULES],
13400814a2baSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
13410814a2baSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
13420814a2baSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
134363847c39Smrg
13440814a2baSmrgpkg_failed=no
13450814a2baSmrgAC_MSG_CHECKING([for $1])
134663847c39Smrg
13470814a2baSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
13480814a2baSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
134976888252Smrg
13500814a2baSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
13510814a2baSmrgand $1[]_LIBS to avoid the need to call pkg-config.
13520814a2baSmrgSee the pkg-config man page for more details.])
13531ae1b5e8Smrg
13540814a2baSmrgif test $pkg_failed = yes; then
13550814a2baSmrg   	AC_MSG_RESULT([no])
13560814a2baSmrg        _PKG_SHORT_ERRORS_SUPPORTED
13570814a2baSmrg        if test $_pkg_short_errors_supported = yes; then
13580814a2baSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
13590814a2baSmrg        else 
13600814a2baSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
13610814a2baSmrg        fi
13620814a2baSmrg	# Put the nasty error message in config.log where it belongs
13630814a2baSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
136463847c39Smrg
13650814a2baSmrg	m4_default([$4], [AC_MSG_ERROR(
13660814a2baSmrg[Package requirements ($2) were not met:
136763847c39Smrg
13680814a2baSmrg$$1_PKG_ERRORS
136976888252Smrg
13700814a2baSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
13710814a2baSmrginstalled software in a non-standard prefix.
137276888252Smrg
13730814a2baSmrg_PKG_TEXT])[]dnl
13740814a2baSmrg        ])
13750814a2baSmrgelif test $pkg_failed = untried; then
13760814a2baSmrg     	AC_MSG_RESULT([no])
13770814a2baSmrg	m4_default([$4], [AC_MSG_FAILURE(
13780814a2baSmrg[The pkg-config script could not be found or is too old.  Make sure it
13790814a2baSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
13800814a2baSmrgpath to pkg-config.
138176888252Smrg
13820814a2baSmrg_PKG_TEXT
138376888252Smrg
13840814a2baSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
13850814a2baSmrg        ])
13860814a2baSmrgelse
13870814a2baSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
13880814a2baSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
13890814a2baSmrg        AC_MSG_RESULT([yes])
13900814a2baSmrg	$3
13910814a2baSmrgfi[]dnl
13920814a2baSmrg])dnl PKG_CHECK_MODULES
139363847c39Smrg
139463847c39Smrg
13950814a2baSmrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
13960814a2baSmrgdnl   [ACTION-IF-NOT-FOUND])
13970814a2baSmrgdnl ---------------------------------------------------------------------
13980814a2baSmrgdnl Since: 0.29
13990814a2baSmrgdnl
14000814a2baSmrgdnl Checks for existence of MODULES and gathers its build flags with
14010814a2baSmrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
14020814a2baSmrgdnl and VARIABLE-PREFIX_LIBS from --libs.
14030814a2baSmrgdnl
14040814a2baSmrgdnl Note that if there is a possibility the first call to
14050814a2baSmrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
14060814a2baSmrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your
14070814a2baSmrgdnl configure.ac.
14080814a2baSmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC],
14090814a2baSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
14100814a2baSmrg_save_PKG_CONFIG=$PKG_CONFIG
14110814a2baSmrgPKG_CONFIG="$PKG_CONFIG --static"
14120814a2baSmrgPKG_CHECK_MODULES($@)
14130814a2baSmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl
14140814a2baSmrg])dnl PKG_CHECK_MODULES_STATIC
141563847c39Smrg
141663847c39Smrg
14170814a2baSmrgdnl PKG_INSTALLDIR([DIRECTORY])
14180814a2baSmrgdnl -------------------------
14190814a2baSmrgdnl Since: 0.27
14200814a2baSmrgdnl
14210814a2baSmrgdnl Substitutes the variable pkgconfigdir as the location where a module
14220814a2baSmrgdnl should install pkg-config .pc files. By default the directory is
14230814a2baSmrgdnl $libdir/pkgconfig, but the default can be changed by passing
14240814a2baSmrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir
14250814a2baSmrgdnl parameter.
14260814a2baSmrgAC_DEFUN([PKG_INSTALLDIR],
14270814a2baSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
14280814a2baSmrgm4_pushdef([pkg_description],
14290814a2baSmrg    [pkg-config installation directory @<:@]pkg_default[@:>@])
14300814a2baSmrgAC_ARG_WITH([pkgconfigdir],
14310814a2baSmrg    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
14320814a2baSmrg    [with_pkgconfigdir=]pkg_default)
14330814a2baSmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
14340814a2baSmrgm4_popdef([pkg_default])
14350814a2baSmrgm4_popdef([pkg_description])
14360814a2baSmrg])dnl PKG_INSTALLDIR
143763847c39Smrg
143863847c39Smrg
14390814a2baSmrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
14400814a2baSmrgdnl --------------------------------
14410814a2baSmrgdnl Since: 0.27
14420814a2baSmrgdnl
14430814a2baSmrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a
14440814a2baSmrgdnl module should install arch-independent pkg-config .pc files. By
14450814a2baSmrgdnl default the directory is $datadir/pkgconfig, but the default can be
14460814a2baSmrgdnl changed by passing DIRECTORY. The user can override through the
14470814a2baSmrgdnl --with-noarch-pkgconfigdir parameter.
14480814a2baSmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR],
14490814a2baSmrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
14500814a2baSmrgm4_pushdef([pkg_description],
14510814a2baSmrg    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
14520814a2baSmrgAC_ARG_WITH([noarch-pkgconfigdir],
14530814a2baSmrg    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
14540814a2baSmrg    [with_noarch_pkgconfigdir=]pkg_default)
14550814a2baSmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
14560814a2baSmrgm4_popdef([pkg_default])
14570814a2baSmrgm4_popdef([pkg_description])
14580814a2baSmrg])dnl PKG_NOARCH_INSTALLDIR
145963847c39Smrg
146063847c39Smrg
14610814a2baSmrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
14620814a2baSmrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
14630814a2baSmrgdnl -------------------------------------------
14640814a2baSmrgdnl Since: 0.28
14650814a2baSmrgdnl
14660814a2baSmrgdnl Retrieves the value of the pkg-config variable for the given module.
14670814a2baSmrgAC_DEFUN([PKG_CHECK_VAR],
14680814a2baSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
14690814a2baSmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
147076888252Smrg
14710814a2baSmrg_PKG_CONFIG([$1], [variable="][$3]["], [$2])
14720814a2baSmrgAS_VAR_COPY([$1], [pkg_cv_][$1])
147376888252Smrg
14740814a2baSmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl
14750814a2baSmrg])dnl PKG_CHECK_VAR
147676888252Smrg
14770814a2baSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
14780814a2baSmrgdnl
14790814a2baSmrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
14800814a2baSmrgdnl
14810814a2baSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
14820814a2baSmrgdnl copy of this software and associated documentation files (the "Software"),
14830814a2baSmrgdnl to deal in the Software without restriction, including without limitation
14840814a2baSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
14850814a2baSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
14860814a2baSmrgdnl Software is furnished to do so, subject to the following conditions:
14870814a2baSmrgdnl
14880814a2baSmrgdnl The above copyright notice and this permission notice (including the next
14890814a2baSmrgdnl paragraph) shall be included in all copies or substantial portions of the
14900814a2baSmrgdnl Software.
14910814a2baSmrgdnl
14920814a2baSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14930814a2baSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14940814a2baSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
14950814a2baSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14960814a2baSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
14970814a2baSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
14980814a2baSmrgdnl DEALINGS IN THE SOFTWARE.
1499d8556812Smrg
15000814a2baSmrg# XORG_MACROS_VERSION(required-version)
15010814a2baSmrg# -------------------------------------
15020814a2baSmrg# Minimum version: 1.1.0
15030814a2baSmrg#
15040814a2baSmrg# If you're using a macro added in Version 1.1 or newer, include this in
15050814a2baSmrg# your configure.ac with the minimum required version, such as:
15060814a2baSmrg# XORG_MACROS_VERSION(1.1)
15070814a2baSmrg#
15080814a2baSmrg# To ensure that this macro is defined, also add:
15090814a2baSmrg# m4_ifndef([XORG_MACROS_VERSION],
15100814a2baSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
15110814a2baSmrg#
15120814a2baSmrg#
15130814a2baSmrg# See the "minimum version" comment for each macro you use to see what
15140814a2baSmrg# version you require.
15150814a2baSmrgm4_defun([XORG_MACROS_VERSION],[
15160814a2baSmrgm4_define([vers_have], [1.19.3])
15170814a2baSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
15180814a2baSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
15190814a2baSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
15200814a2baSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
15210814a2baSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
15220814a2baSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
15230814a2baSmrgm4_undefine([vers_have])
15240814a2baSmrgm4_undefine([maj_have])
15250814a2baSmrgm4_undefine([maj_needed])
15260814a2baSmrg]) # XORG_MACROS_VERSION
152776888252Smrg
15280814a2baSmrg# XORG_PROG_RAWCPP()
15290814a2baSmrg# ------------------
15300814a2baSmrg# Minimum version: 1.0.0
15310814a2baSmrg#
15320814a2baSmrg# Find cpp program and necessary flags for use in pre-processing text files
15330814a2baSmrg# such as man pages and config files
15340814a2baSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
15350814a2baSmrgAC_REQUIRE([AC_PROG_CPP])
15360814a2baSmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
15370814a2baSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
153876888252Smrg
15390814a2baSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
15400814a2baSmrg# which is not the best choice for supporting other OS'es, but covers most
15410814a2baSmrg# of the ones we need for now.
15420814a2baSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
15430814a2baSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
15440814a2baSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
15450814a2baSmrg	AC_MSG_RESULT([no])
15460814a2baSmrgelse
15470814a2baSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
15480814a2baSmrg		RAWCPPFLAGS=-undef
15490814a2baSmrg		AC_MSG_RESULT([yes])
15500814a2baSmrg	# under Cygwin unix is still defined even with -undef
15510814a2baSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
15520814a2baSmrg		RAWCPPFLAGS="-undef -ansi"
15530814a2baSmrg		AC_MSG_RESULT([yes, with -ansi])
15540814a2baSmrg	else
15550814a2baSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
15560814a2baSmrg	fi
15570814a2baSmrgfi
15580814a2baSmrgrm -f conftest.$ac_ext
155976888252Smrg
15600814a2baSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
15610814a2baSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
15620814a2baSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
15630814a2baSmrg	AC_MSG_RESULT([no])
15640814a2baSmrgelse
15650814a2baSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
15660814a2baSmrg		TRADITIONALCPPFLAGS="-traditional"
15670814a2baSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
15680814a2baSmrg		AC_MSG_RESULT([yes])
15690814a2baSmrg	else
15700814a2baSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
15710814a2baSmrg	fi
15720814a2baSmrgfi
15730814a2baSmrgrm -f conftest.$ac_ext
15740814a2baSmrgAC_SUBST(RAWCPPFLAGS)
15750814a2baSmrgAC_SUBST(TRADITIONALCPPFLAGS)
15760814a2baSmrg]) # XORG_PROG_RAWCPP
157776888252Smrg
15780814a2baSmrg# XORG_MANPAGE_SECTIONS()
15790814a2baSmrg# -----------------------
15800814a2baSmrg# Minimum version: 1.0.0
15810814a2baSmrg#
15820814a2baSmrg# Determine which sections man pages go in for the different man page types
15830814a2baSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
15840814a2baSmrg# Not sure if there's any better way than just hardcoding by OS name.
15850814a2baSmrg# Override default settings by setting environment variables
15860814a2baSmrg# Added MAN_SUBSTS in version 1.8
15870814a2baSmrg# Added AC_PROG_SED in version 1.8
158876888252Smrg
15890814a2baSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
15900814a2baSmrgAC_REQUIRE([AC_CANONICAL_HOST])
15910814a2baSmrgAC_REQUIRE([AC_PROG_SED])
159276888252Smrg
15930814a2baSmrgcase $host_os in
15940814a2baSmrg    solaris*)
15950814a2baSmrg        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
15960814a2baSmrg        # check for a man page file found in later versions that use
15970814a2baSmrg        # traditional section numbers instead
15980814a2baSmrg        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
15990814a2baSmrg                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
16000814a2baSmrg        ;;
16010814a2baSmrg    *) SYSV_MAN_SECTIONS=false ;;
16020814a2baSmrgesac
160376888252Smrg
16040814a2baSmrgif test x$APP_MAN_SUFFIX = x    ; then
16050814a2baSmrg    APP_MAN_SUFFIX=1
16060814a2baSmrgfi
16070814a2baSmrgif test x$APP_MAN_DIR = x    ; then
16080814a2baSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
16090814a2baSmrgfi
161076888252Smrg
16110814a2baSmrgif test x$LIB_MAN_SUFFIX = x    ; then
16120814a2baSmrg    LIB_MAN_SUFFIX=3
16130814a2baSmrgfi
16140814a2baSmrgif test x$LIB_MAN_DIR = x    ; then
16150814a2baSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
16160814a2baSmrgfi
161776888252Smrg
16180814a2baSmrgif test x$FILE_MAN_SUFFIX = x    ; then
16190814a2baSmrg    case $SYSV_MAN_SECTIONS in
16200814a2baSmrg	true)				FILE_MAN_SUFFIX=4  ;;
16210814a2baSmrg	*)				FILE_MAN_SUFFIX=5  ;;
16220814a2baSmrg    esac
16230814a2baSmrgfi
16240814a2baSmrgif test x$FILE_MAN_DIR = x    ; then
16250814a2baSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
16260814a2baSmrgfi
162763847c39Smrg
16280814a2baSmrgif test x$MISC_MAN_SUFFIX = x    ; then
16290814a2baSmrg    case $SYSV_MAN_SECTIONS in
16300814a2baSmrg	true)				MISC_MAN_SUFFIX=5  ;;
16310814a2baSmrg	*)				MISC_MAN_SUFFIX=7  ;;
16320814a2baSmrg    esac
16330814a2baSmrgfi
16340814a2baSmrgif test x$MISC_MAN_DIR = x    ; then
16350814a2baSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
16360814a2baSmrgfi
163776888252Smrg
16380814a2baSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
16390814a2baSmrg    case $SYSV_MAN_SECTIONS in
16400814a2baSmrg	true)				DRIVER_MAN_SUFFIX=7  ;;
16410814a2baSmrg	*)				DRIVER_MAN_SUFFIX=4  ;;
16420814a2baSmrg    esac
16430814a2baSmrgfi
16440814a2baSmrgif test x$DRIVER_MAN_DIR = x    ; then
16450814a2baSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
164663847c39Smrgfi
164776888252Smrg
16480814a2baSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
16490814a2baSmrg    case $SYSV_MAN_SECTIONS in
16500814a2baSmrg	true)				ADMIN_MAN_SUFFIX=1m ;;
16510814a2baSmrg	*)				ADMIN_MAN_SUFFIX=8  ;;
16520814a2baSmrg    esac
16530814a2baSmrgfi
16540814a2baSmrgif test x$ADMIN_MAN_DIR = x    ; then
16550814a2baSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
16560814a2baSmrgfi
165776888252Smrg
165876888252Smrg
16590814a2baSmrgAC_SUBST([APP_MAN_SUFFIX])
16600814a2baSmrgAC_SUBST([LIB_MAN_SUFFIX])
16610814a2baSmrgAC_SUBST([FILE_MAN_SUFFIX])
16620814a2baSmrgAC_SUBST([MISC_MAN_SUFFIX])
16630814a2baSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
16640814a2baSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
16650814a2baSmrgAC_SUBST([APP_MAN_DIR])
16660814a2baSmrgAC_SUBST([LIB_MAN_DIR])
16670814a2baSmrgAC_SUBST([FILE_MAN_DIR])
16680814a2baSmrgAC_SUBST([MISC_MAN_DIR])
16690814a2baSmrgAC_SUBST([DRIVER_MAN_DIR])
16700814a2baSmrgAC_SUBST([ADMIN_MAN_DIR])
167163847c39Smrg
16720814a2baSmrgXORG_MAN_PAGE="X Version 11"
16730814a2baSmrgAC_SUBST([XORG_MAN_PAGE])
16740814a2baSmrgMAN_SUBSTS="\
16750814a2baSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
16760814a2baSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
16770814a2baSmrg	-e 's|__xservername__|Xorg|g' \
16780814a2baSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
16790814a2baSmrg	-e 's|__projectroot__|\$(prefix)|g' \
16800814a2baSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
16810814a2baSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
16820814a2baSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
16830814a2baSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
16840814a2baSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
16850814a2baSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
16860814a2baSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
16870814a2baSmrgAC_SUBST([MAN_SUBSTS])
168863847c39Smrg
16890814a2baSmrg]) # XORG_MANPAGE_SECTIONS
169063847c39Smrg
16910814a2baSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
16920814a2baSmrg# ------------------------
16930814a2baSmrg# Minimum version: 1.7.0
16940814a2baSmrg#
16950814a2baSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
16960814a2baSmrg# provided by xorg-sgml-doctools, if installed.
16970814a2baSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
16980814a2baSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
16990814a2baSmrgXORG_SGML_PATH=
17000814a2baSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
17010814a2baSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
17020814a2baSmrg    [m4_ifval([$1],[:],
17030814a2baSmrg        [if test x"$cross_compiling" != x"yes" ; then
17040814a2baSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
17050814a2baSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
17060814a2baSmrg         fi])
17070814a2baSmrg    ])
17080814a2baSmrg
17090814a2baSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
17100814a2baSmrg# the path and the name of the doc stylesheet
17110814a2baSmrgif test "x$XORG_SGML_PATH" != "x" ; then
17120814a2baSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
17130814a2baSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
17140814a2baSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
171563847c39Smrgelse
17160814a2baSmrg   AC_MSG_RESULT([no])
171763847c39Smrgfi
171863847c39Smrg
17190814a2baSmrgAC_SUBST(XORG_SGML_PATH)
17200814a2baSmrgAC_SUBST(STYLESHEET_SRCDIR)
17210814a2baSmrgAC_SUBST(XSL_STYLESHEET)
17220814a2baSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
17230814a2baSmrg]) # XORG_CHECK_SGML_DOCTOOLS
172463847c39Smrg
17250814a2baSmrg# XORG_CHECK_LINUXDOC
17260814a2baSmrg# -------------------
17270814a2baSmrg# Minimum version: 1.0.0
17280814a2baSmrg#
17290814a2baSmrg# Defines the variable MAKE_TEXT if the necessary tools and
17300814a2baSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
17310814a2baSmrg# Whether or not the necessary tools and files are found can be checked
17320814a2baSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
17330814a2baSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
17340814a2baSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
17350814a2baSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
173663847c39Smrg
17370814a2baSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
173863847c39Smrg
17390814a2baSmrgAC_MSG_CHECKING([whether to build documentation])
174063847c39Smrg
17410814a2baSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
17420814a2baSmrg   BUILDDOC=yes
17430814a2baSmrgelse
17440814a2baSmrg   BUILDDOC=no
17450814a2baSmrgfi
174663847c39Smrg
17470814a2baSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
174863847c39Smrg
17490814a2baSmrgAC_MSG_RESULT([$BUILDDOC])
175063847c39Smrg
17510814a2baSmrgAC_MSG_CHECKING([whether to build pdf documentation])
175263847c39Smrg
17530814a2baSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
17540814a2baSmrg   BUILDPDFDOC=yes
17550814a2baSmrgelse
17560814a2baSmrg   BUILDPDFDOC=no
17570814a2baSmrgfi
175863847c39Smrg
17590814a2baSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
176076888252Smrg
17610814a2baSmrgAC_MSG_RESULT([$BUILDPDFDOC])
176276888252Smrg
17630814a2baSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
17640814a2baSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
17650814a2baSmrgMAKE_PDF="$PS2PDF"
17660814a2baSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
176776888252Smrg
17680814a2baSmrgAC_SUBST(MAKE_TEXT)
17690814a2baSmrgAC_SUBST(MAKE_PS)
17700814a2baSmrgAC_SUBST(MAKE_PDF)
17710814a2baSmrgAC_SUBST(MAKE_HTML)
17720814a2baSmrg]) # XORG_CHECK_LINUXDOC
177363847c39Smrg
17740814a2baSmrg# XORG_CHECK_DOCBOOK
17750814a2baSmrg# -------------------
17760814a2baSmrg# Minimum version: 1.0.0
17770814a2baSmrg#
17780814a2baSmrg# Checks for the ability to build output formats from SGML DocBook source.
17790814a2baSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
17800814a2baSmrg# indicates whether the necessary tools and files are found and, if set,
17810814a2baSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
17820814a2baSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
17830814a2baSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
178463847c39Smrg
17850814a2baSmrgBUILDTXTDOC=no
17860814a2baSmrgBUILDPDFDOC=no
17870814a2baSmrgBUILDPSDOC=no
17880814a2baSmrgBUILDHTMLDOC=no
178963847c39Smrg
17900814a2baSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
17910814a2baSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
17920814a2baSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
17930814a2baSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
179463847c39Smrg
17950814a2baSmrgAC_MSG_CHECKING([whether to build text documentation])
17960814a2baSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
17970814a2baSmrg   test x$BUILD_TXTDOC != xno; then
17980814a2baSmrg	BUILDTXTDOC=yes
179963847c39Smrgfi
18000814a2baSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
18010814a2baSmrgAC_MSG_RESULT([$BUILDTXTDOC])
180263847c39Smrg
18030814a2baSmrgAC_MSG_CHECKING([whether to build PDF documentation])
18040814a2baSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
18050814a2baSmrg   test x$BUILD_PDFDOC != xno; then
18060814a2baSmrg	BUILDPDFDOC=yes
18070814a2baSmrgfi
18080814a2baSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
18090814a2baSmrgAC_MSG_RESULT([$BUILDPDFDOC])
181063847c39Smrg
18110814a2baSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
18120814a2baSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
18130814a2baSmrg   test x$BUILD_PSDOC != xno; then
18140814a2baSmrg	BUILDPSDOC=yes
18150814a2baSmrgfi
18160814a2baSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
18170814a2baSmrgAC_MSG_RESULT([$BUILDPSDOC])
181863847c39Smrg
18190814a2baSmrgAC_MSG_CHECKING([whether to build HTML documentation])
18200814a2baSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
18210814a2baSmrg   test x$BUILD_HTMLDOC != xno; then
18220814a2baSmrg	BUILDHTMLDOC=yes
182386dafe34Smrgfi
18240814a2baSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
18250814a2baSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
182663847c39Smrg
18270814a2baSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
18280814a2baSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
18290814a2baSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
18300814a2baSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
183176888252Smrg
18320814a2baSmrgAC_SUBST(MAKE_TEXT)
18330814a2baSmrgAC_SUBST(MAKE_PS)
18340814a2baSmrgAC_SUBST(MAKE_PDF)
18350814a2baSmrgAC_SUBST(MAKE_HTML)
18360814a2baSmrg]) # XORG_CHECK_DOCBOOK
18371ae1b5e8Smrg
18380814a2baSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
18390814a2baSmrg# ----------------
18400814a2baSmrg# Minimum version: 1.5.0
18410814a2baSmrg# Minimum version for optional DEFAULT argument: 1.11.0
18420814a2baSmrg#
18430814a2baSmrg# Documentation tools are not always available on all platforms and sometimes
18440814a2baSmrg# not at the appropriate level. This macro enables a module to test for the
18450814a2baSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
18460814a2baSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
18470814a2baSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
18480814a2baSmrg# --with-xmlto assumes 'auto'.
18490814a2baSmrg#
18500814a2baSmrg# Interface to module:
18510814a2baSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
18520814a2baSmrg# XMLTO:	returns the path of the xmlto program found
18530814a2baSmrg#		returns the path set by the user in the environment
18540814a2baSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
18550814a2baSmrg#		'no' user instructs the module not to use xmlto
18560814a2baSmrg#
18570814a2baSmrg# Added in version 1.10.0
18580814a2baSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
18590814a2baSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
18600814a2baSmrg#
18610814a2baSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
18620814a2baSmrg#
18630814a2baSmrgAC_DEFUN([XORG_WITH_XMLTO],[
18640814a2baSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
18650814a2baSmrgm4_define([_defopt], m4_default([$2], [auto]))
18660814a2baSmrgAC_ARG_WITH(xmlto,
18670814a2baSmrg	AS_HELP_STRING([--with-xmlto],
18680814a2baSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
18690814a2baSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
18700814a2baSmrgm4_undefine([_defopt])
187176888252Smrg
18720814a2baSmrgif test "x$use_xmlto" = x"auto"; then
18730814a2baSmrg   AC_PATH_PROG([XMLTO], [xmlto])
18740814a2baSmrg   if test "x$XMLTO" = "x"; then
18750814a2baSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
18760814a2baSmrg	have_xmlto=no
18770814a2baSmrg   else
18780814a2baSmrg        have_xmlto=yes
18790814a2baSmrg   fi
18800814a2baSmrgelif test "x$use_xmlto" = x"yes" ; then
18810814a2baSmrg   AC_PATH_PROG([XMLTO], [xmlto])
18820814a2baSmrg   if test "x$XMLTO" = "x"; then
18830814a2baSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
18840814a2baSmrg   fi
18850814a2baSmrg   have_xmlto=yes
18860814a2baSmrgelif test "x$use_xmlto" = x"no" ; then
18870814a2baSmrg   if test "x$XMLTO" != "x"; then
18880814a2baSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
18890814a2baSmrg   fi
18900814a2baSmrg   have_xmlto=no
189186dafe34Smrgelse
18920814a2baSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
18931ae1b5e8Smrgfi
189476888252Smrg
18950814a2baSmrg# Test for a minimum version of xmlto, if provided.
18960814a2baSmrgm4_ifval([$1],
18970814a2baSmrg[if test "$have_xmlto" = yes; then
18980814a2baSmrg    # scrape the xmlto version
18990814a2baSmrg    AC_MSG_CHECKING([the xmlto version])
19000814a2baSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
19010814a2baSmrg    AC_MSG_RESULT([$xmlto_version])
19020814a2baSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
19030814a2baSmrg        [if test "x$use_xmlto" = xauto; then
19040814a2baSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
19050814a2baSmrg            have_xmlto=no
19060814a2baSmrg        else
19070814a2baSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
19080814a2baSmrg        fi])
19090814a2baSmrgfi])
191076888252Smrg
19110814a2baSmrg# Test for the ability of xmlto to generate a text target
19120814a2baSmrg#
19130814a2baSmrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
19140814a2baSmrg# following test for empty XML docbook files.
19150814a2baSmrg# For compatibility reasons use the following empty XML docbook file and if
19160814a2baSmrg# it fails try it again with a non-empty XML file.
19170814a2baSmrghave_xmlto_text=no
19180814a2baSmrgcat > conftest.xml << "EOF"
19190814a2baSmrgEOF
19200814a2baSmrgAS_IF([test "$have_xmlto" = yes],
19210814a2baSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
19220814a2baSmrg             [have_xmlto_text=yes],
19230814a2baSmrg             [# Try it again with a non-empty XML file.
19240814a2baSmrg              cat > conftest.xml << "EOF"
19250814a2baSmrg<x></x>
19260814a2baSmrgEOF
19270814a2baSmrg              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
19280814a2baSmrg                    [have_xmlto_text=yes],
19290814a2baSmrg                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
19300814a2baSmrgrm -f conftest.xml
19310814a2baSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
19320814a2baSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
19330814a2baSmrg]) # XORG_WITH_XMLTO
193476888252Smrg
19350814a2baSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
19360814a2baSmrg# --------------------------------------------
19370814a2baSmrg# Minimum version: 1.12.0
19380814a2baSmrg# Minimum version for optional DEFAULT argument: 1.12.0
19390814a2baSmrg#
19400814a2baSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
19410814a2baSmrg# XML-based language used for the transformation of XML documents.
19420814a2baSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
19430814a2baSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
19440814a2baSmrg# The XSLT processor is often used as a standalone tool for transformations.
19450814a2baSmrg# It should not be assumed that this tool is used only to work with documnetation.
19460814a2baSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
19470814a2baSmrg#
19480814a2baSmrg# Interface to module:
19490814a2baSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
19500814a2baSmrg# XSLTPROC:	 returns the path of the xsltproc program found
19510814a2baSmrg#		 returns the path set by the user in the environment
19520814a2baSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
19530814a2baSmrg#		  'no' user instructs the module not to use xsltproc
19540814a2baSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
19550814a2baSmrg#
19560814a2baSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
19570814a2baSmrg#
19580814a2baSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
19590814a2baSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
19600814a2baSmrg# Preserves the interface, should it be implemented later
19610814a2baSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
19620814a2baSmrgm4_define([_defopt], m4_default([$2], [auto]))
19630814a2baSmrgAC_ARG_WITH(xsltproc,
19640814a2baSmrg	AS_HELP_STRING([--with-xsltproc],
19650814a2baSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
19660814a2baSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
19670814a2baSmrgm4_undefine([_defopt])
196876888252Smrg
19690814a2baSmrgif test "x$use_xsltproc" = x"auto"; then
19700814a2baSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
19710814a2baSmrg   if test "x$XSLTPROC" = "x"; then
19720814a2baSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
19730814a2baSmrg	have_xsltproc=no
19740814a2baSmrg   else
19750814a2baSmrg        have_xsltproc=yes
19760814a2baSmrg   fi
19770814a2baSmrgelif test "x$use_xsltproc" = x"yes" ; then
19780814a2baSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
19790814a2baSmrg   if test "x$XSLTPROC" = "x"; then
19800814a2baSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
19810814a2baSmrg   fi
19820814a2baSmrg   have_xsltproc=yes
19830814a2baSmrgelif test "x$use_xsltproc" = x"no" ; then
19840814a2baSmrg   if test "x$XSLTPROC" != "x"; then
19850814a2baSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
19860814a2baSmrg   fi
19870814a2baSmrg   have_xsltproc=no
198886dafe34Smrgelse
19890814a2baSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
19901ae1b5e8Smrgfi
199176888252Smrg
19920814a2baSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
19930814a2baSmrg]) # XORG_WITH_XSLTPROC
199476888252Smrg
19950814a2baSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
19960814a2baSmrg# ----------------------------------------
19970814a2baSmrg# Minimum version: 1.15.0
19980814a2baSmrg#
19990814a2baSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
20000814a2baSmrg# scanning arbitrary text files, extracting information from those text files,
20010814a2baSmrg# and printing reports based on that information.
20020814a2baSmrg#
20030814a2baSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
20040814a2baSmrg#
20050814a2baSmrg# Interface to module:
20060814a2baSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
20070814a2baSmrg# PERL:	     returns the path of the perl program found
20080814a2baSmrg#	     returns the path set by the user in the environment
20090814a2baSmrg# --with-perl: 'yes' user instructs the module to use perl
20100814a2baSmrg#	       'no' user instructs the module not to use perl
20110814a2baSmrg# have_perl: returns yes if perl found in PATH or no
20120814a2baSmrg#
20130814a2baSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
20140814a2baSmrg#
20150814a2baSmrgAC_DEFUN([XORG_WITH_PERL],[
20160814a2baSmrgAC_ARG_VAR([PERL], [Path to perl command])
20170814a2baSmrg# Preserves the interface, should it be implemented later
20180814a2baSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
20190814a2baSmrgm4_define([_defopt], m4_default([$2], [auto]))
20200814a2baSmrgAC_ARG_WITH(perl,
20210814a2baSmrg	AS_HELP_STRING([--with-perl],
20220814a2baSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
20230814a2baSmrg	   [use_perl=$withval], [use_perl=]_defopt)
20240814a2baSmrgm4_undefine([_defopt])
202576888252Smrg
20260814a2baSmrgif test "x$use_perl" = x"auto"; then
20270814a2baSmrg   AC_PATH_PROG([PERL], [perl])
20280814a2baSmrg   if test "x$PERL" = "x"; then
20290814a2baSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
20300814a2baSmrg	have_perl=no
20310814a2baSmrg   else
20320814a2baSmrg        have_perl=yes
20330814a2baSmrg   fi
20340814a2baSmrgelif test "x$use_perl" = x"yes" ; then
20350814a2baSmrg   AC_PATH_PROG([PERL], [perl])
20360814a2baSmrg   if test "x$PERL" = "x"; then
20370814a2baSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
20380814a2baSmrg   fi
20390814a2baSmrg   have_perl=yes
20400814a2baSmrgelif test "x$use_perl" = x"no" ; then
20410814a2baSmrg   if test "x$PERL" != "x"; then
20420814a2baSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
20430814a2baSmrg   fi
20440814a2baSmrg   have_perl=no
204563847c39Smrgelse
20460814a2baSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
204763847c39Smrgfi
204876888252Smrg
20490814a2baSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
20500814a2baSmrg]) # XORG_WITH_PERL
205176888252Smrg
20520814a2baSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
205363847c39Smrg# ----------------
20540814a2baSmrg# Minimum version: 1.5.0
20550814a2baSmrg# Minimum version for optional DEFAULT argument: 1.11.0
20560814a2baSmrg#
20570814a2baSmrg# Documentation tools are not always available on all platforms and sometimes
20580814a2baSmrg# not at the appropriate level. This macro enables a module to test for the
20590814a2baSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
20600814a2baSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
20610814a2baSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
20620814a2baSmrg# --with-asciidoc assumes 'auto'.
20630814a2baSmrg#
20640814a2baSmrg# Interface to module:
20650814a2baSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
20660814a2baSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
20670814a2baSmrg#		 returns the path set by the user in the environment
20680814a2baSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
20690814a2baSmrg#		  'no' user instructs the module not to use asciidoc
20700814a2baSmrg#
20710814a2baSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
20720814a2baSmrg#
20730814a2baSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
20740814a2baSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
20750814a2baSmrgm4_define([_defopt], m4_default([$2], [auto]))
20760814a2baSmrgAC_ARG_WITH(asciidoc,
20770814a2baSmrg	AS_HELP_STRING([--with-asciidoc],
20780814a2baSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
20790814a2baSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
20800814a2baSmrgm4_undefine([_defopt])
208163847c39Smrg
20820814a2baSmrgif test "x$use_asciidoc" = x"auto"; then
20830814a2baSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
20840814a2baSmrg   if test "x$ASCIIDOC" = "x"; then
20850814a2baSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
20860814a2baSmrg	have_asciidoc=no
20870814a2baSmrg   else
20880814a2baSmrg        have_asciidoc=yes
20890814a2baSmrg   fi
20900814a2baSmrgelif test "x$use_asciidoc" = x"yes" ; then
20910814a2baSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
20920814a2baSmrg   if test "x$ASCIIDOC" = "x"; then
20930814a2baSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
20940814a2baSmrg   fi
20950814a2baSmrg   have_asciidoc=yes
20960814a2baSmrgelif test "x$use_asciidoc" = x"no" ; then
20970814a2baSmrg   if test "x$ASCIIDOC" != "x"; then
20980814a2baSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
20990814a2baSmrg   fi
21000814a2baSmrg   have_asciidoc=no
210163847c39Smrgelse
21020814a2baSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
21030814a2baSmrgfi
21040814a2baSmrgm4_ifval([$1],
21050814a2baSmrg[if test "$have_asciidoc" = yes; then
21060814a2baSmrg    # scrape the asciidoc version
21070814a2baSmrg    AC_MSG_CHECKING([the asciidoc version])
21080814a2baSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
21090814a2baSmrg    AC_MSG_RESULT([$asciidoc_version])
21100814a2baSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
21110814a2baSmrg        [if test "x$use_asciidoc" = xauto; then
21120814a2baSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
21130814a2baSmrg            have_asciidoc=no
21140814a2baSmrg        else
21150814a2baSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
21160814a2baSmrg        fi])
21170814a2baSmrgfi])
21180814a2baSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
21190814a2baSmrg]) # XORG_WITH_ASCIIDOC
212063847c39Smrg
21210814a2baSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
21220814a2baSmrg# -------------------------------------------
21230814a2baSmrg# Minimum version: 1.5.0
21240814a2baSmrg# Minimum version for optional DEFAULT argument: 1.11.0
21250814a2baSmrg# Minimum version for optional DOT checking: 1.18.0
21260814a2baSmrg#
21270814a2baSmrg# Documentation tools are not always available on all platforms and sometimes
21280814a2baSmrg# not at the appropriate level. This macro enables a module to test for the
21290814a2baSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
21300814a2baSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
21310814a2baSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
21320814a2baSmrg# --with-doxygen assumes 'auto'.
21330814a2baSmrg#
21340814a2baSmrg# Interface to module:
21350814a2baSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
21360814a2baSmrg# DOXYGEN:	 returns the path of the doxygen program found
21370814a2baSmrg#		 returns the path set by the user in the environment
21380814a2baSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
21390814a2baSmrg#		  'no' user instructs the module not to use doxygen
21400814a2baSmrg#
21410814a2baSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
21420814a2baSmrg#
21430814a2baSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
21440814a2baSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
21450814a2baSmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility])
21460814a2baSmrgm4_define([_defopt], m4_default([$2], [auto]))
21470814a2baSmrgAC_ARG_WITH(doxygen,
21480814a2baSmrg	AS_HELP_STRING([--with-doxygen],
21490814a2baSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
21500814a2baSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
21510814a2baSmrgm4_undefine([_defopt])
215263847c39Smrg
21530814a2baSmrgif test "x$use_doxygen" = x"auto"; then
21540814a2baSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
21550814a2baSmrg   if test "x$DOXYGEN" = "x"; then
21560814a2baSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
21570814a2baSmrg	have_doxygen=no
21580814a2baSmrg   else
21590814a2baSmrg        have_doxygen=yes
21600814a2baSmrg   fi
21610814a2baSmrgelif test "x$use_doxygen" = x"yes" ; then
21620814a2baSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
21630814a2baSmrg   if test "x$DOXYGEN" = "x"; then
21640814a2baSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
21650814a2baSmrg   fi
21660814a2baSmrg   have_doxygen=yes
21670814a2baSmrgelif test "x$use_doxygen" = x"no" ; then
21680814a2baSmrg   if test "x$DOXYGEN" != "x"; then
21690814a2baSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
21700814a2baSmrg   fi
21710814a2baSmrg   have_doxygen=no
21720814a2baSmrgelse
21730814a2baSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
21740814a2baSmrgfi
21750814a2baSmrgm4_ifval([$1],
21760814a2baSmrg[if test "$have_doxygen" = yes; then
21770814a2baSmrg    # scrape the doxygen version
21780814a2baSmrg    AC_MSG_CHECKING([the doxygen version])
21790814a2baSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
21800814a2baSmrg    AC_MSG_RESULT([$doxygen_version])
21810814a2baSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
21820814a2baSmrg        [if test "x$use_doxygen" = xauto; then
21830814a2baSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
21840814a2baSmrg            have_doxygen=no
21850814a2baSmrg        else
21860814a2baSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
21870814a2baSmrg        fi])
21880814a2baSmrgfi])
218963847c39Smrg
21900814a2baSmrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory
21910814a2baSmrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
21920814a2baSmrgdnl 	HAVE_DOT = @HAVE_DOT@
21930814a2baSmrgHAVE_DOT=no
21940814a2baSmrgif test "x$have_doxygen" = "xyes"; then
21950814a2baSmrg  AC_PATH_PROG([DOT], [dot])
21960814a2baSmrg    if test "x$DOT" != "x"; then
21970814a2baSmrg      HAVE_DOT=yes
21980814a2baSmrg    fi
219963847c39Smrgfi
220063847c39Smrg
22010814a2baSmrgAC_SUBST([HAVE_DOT])
22020814a2baSmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
22030814a2baSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
22040814a2baSmrg]) # XORG_WITH_DOXYGEN
220563847c39Smrg
22060814a2baSmrg# XORG_WITH_GROFF([DEFAULT])
22070814a2baSmrg# ----------------
22080814a2baSmrg# Minimum version: 1.6.0
22090814a2baSmrg# Minimum version for optional DEFAULT argument: 1.11.0
22100814a2baSmrg#
22110814a2baSmrg# Documentation tools are not always available on all platforms and sometimes
22120814a2baSmrg# not at the appropriate level. This macro enables a module to test for the
22130814a2baSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
22140814a2baSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
22150814a2baSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
22160814a2baSmrg# --with-groff assumes 'auto'.
22170814a2baSmrg#
22180814a2baSmrg# Interface to module:
22190814a2baSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
22200814a2baSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
22210814a2baSmrg# HAVE_GROFF_MS: the -ms macros package
22220814a2baSmrg# GROFF:	 returns the path of the groff program found
22230814a2baSmrg#		 returns the path set by the user in the environment
22240814a2baSmrg# --with-groff:	 'yes' user instructs the module to use groff
22250814a2baSmrg#		 'no' user instructs the module not to use groff
22260814a2baSmrg#
22270814a2baSmrg# Added in version 1.9.0:
22280814a2baSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
22290814a2baSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
22300814a2baSmrg#		   psselect from the psutils package.
22310814a2baSmrg#		   the ghostcript package. Refer to the grohtml man pages
22320814a2baSmrg#
22330814a2baSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
22340814a2baSmrg#
22350814a2baSmrg# OS and distros often splits groff in a basic and full package, the former
22360814a2baSmrg# having the groff program and the later having devices, fonts and macros
22370814a2baSmrg# Checking for the groff executable is not enough.
22380814a2baSmrg#
22390814a2baSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
22400814a2baSmrg# unset HAVE_GROFF or GROFF env variables.
22410814a2baSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
22420814a2baSmrg#
22430814a2baSmrgAC_DEFUN([XORG_WITH_GROFF],[
22440814a2baSmrgAC_ARG_VAR([GROFF], [Path to groff command])
22450814a2baSmrgm4_define([_defopt], m4_default([$1], [auto]))
22460814a2baSmrgAC_ARG_WITH(groff,
22470814a2baSmrg	AS_HELP_STRING([--with-groff],
22480814a2baSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
22490814a2baSmrg	   [use_groff=$withval], [use_groff=]_defopt)
22500814a2baSmrgm4_undefine([_defopt])
225163847c39Smrg
22520814a2baSmrgif test "x$use_groff" = x"auto"; then
22530814a2baSmrg   AC_PATH_PROG([GROFF], [groff])
22540814a2baSmrg   if test "x$GROFF" = "x"; then
22550814a2baSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
22560814a2baSmrg	have_groff=no
22570814a2baSmrg   else
22580814a2baSmrg        have_groff=yes
22590814a2baSmrg   fi
22600814a2baSmrgelif test "x$use_groff" = x"yes" ; then
22610814a2baSmrg   AC_PATH_PROG([GROFF], [groff])
22620814a2baSmrg   if test "x$GROFF" = "x"; then
22630814a2baSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
22640814a2baSmrg   fi
22650814a2baSmrg   have_groff=yes
22660814a2baSmrgelif test "x$use_groff" = x"no" ; then
22670814a2baSmrg   if test "x$GROFF" != "x"; then
22680814a2baSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
22690814a2baSmrg   fi
22700814a2baSmrg   have_groff=no
22710814a2baSmrgelse
22720814a2baSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
22730814a2baSmrgfi
227463847c39Smrg
22750814a2baSmrg# We have groff, test for the presence of the macro packages
22760814a2baSmrgif test "x$have_groff" = x"yes"; then
22770814a2baSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
22780814a2baSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
22790814a2baSmrg        groff_ms_works=yes
22800814a2baSmrg    else
22810814a2baSmrg        groff_ms_works=no
22820814a2baSmrg    fi
22830814a2baSmrg    AC_MSG_RESULT([$groff_ms_works])
22840814a2baSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
22850814a2baSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
22860814a2baSmrg        groff_mm_works=yes
22870814a2baSmrg    else
22880814a2baSmrg        groff_mm_works=no
22890814a2baSmrg    fi
22900814a2baSmrg    AC_MSG_RESULT([$groff_mm_works])
22910814a2baSmrgfi
229263847c39Smrg
22930814a2baSmrg# We have groff, test for HTML dependencies, one command per package
22940814a2baSmrgif test "x$have_groff" = x"yes"; then
22950814a2baSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
22960814a2baSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
22970814a2baSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
22980814a2baSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
22990814a2baSmrg      have_groff_html=yes
23000814a2baSmrg   else
23010814a2baSmrg      have_groff_html=no
23020814a2baSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
23030814a2baSmrg   fi
23040814a2baSmrgfi
230563847c39Smrg
23060814a2baSmrg# Set Automake conditionals for Makefiles
23070814a2baSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
23080814a2baSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
23090814a2baSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
23100814a2baSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
23110814a2baSmrg]) # XORG_WITH_GROFF
231263847c39Smrg
23130814a2baSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
23140814a2baSmrg# ---------------------------------------
23150814a2baSmrg# Minimum version: 1.6.0
23160814a2baSmrg# Minimum version for optional DEFAULT argument: 1.11.0
23170814a2baSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
23180814a2baSmrg#
23190814a2baSmrg# Documentation tools are not always available on all platforms and sometimes
23200814a2baSmrg# not at the appropriate level. This macro enables a module to test for the
23210814a2baSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
23220814a2baSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
23230814a2baSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
23240814a2baSmrg# --with-fop assumes 'auto'.
23250814a2baSmrg#
23260814a2baSmrg# Interface to module:
23270814a2baSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
23280814a2baSmrg# FOP:	 	returns the path of the fop program found
23290814a2baSmrg#		returns the path set by the user in the environment
23300814a2baSmrg# --with-fop: 	'yes' user instructs the module to use fop
23310814a2baSmrg#		'no' user instructs the module not to use fop
23320814a2baSmrg#
23330814a2baSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
23340814a2baSmrg#
23350814a2baSmrgAC_DEFUN([XORG_WITH_FOP],[
23360814a2baSmrgAC_ARG_VAR([FOP], [Path to fop command])
23370814a2baSmrgm4_define([_defopt], m4_default([$2], [auto]))
23380814a2baSmrgAC_ARG_WITH(fop,
23390814a2baSmrg	AS_HELP_STRING([--with-fop],
23400814a2baSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
23410814a2baSmrg	   [use_fop=$withval], [use_fop=]_defopt)
23420814a2baSmrgm4_undefine([_defopt])
234363847c39Smrg
23440814a2baSmrgif test "x$use_fop" = x"auto"; then
23450814a2baSmrg   AC_PATH_PROG([FOP], [fop])
23460814a2baSmrg   if test "x$FOP" = "x"; then
23470814a2baSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
23480814a2baSmrg	have_fop=no
23490814a2baSmrg   else
23500814a2baSmrg        have_fop=yes
23510814a2baSmrg   fi
23520814a2baSmrgelif test "x$use_fop" = x"yes" ; then
23530814a2baSmrg   AC_PATH_PROG([FOP], [fop])
23540814a2baSmrg   if test "x$FOP" = "x"; then
23550814a2baSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
23560814a2baSmrg   fi
23570814a2baSmrg   have_fop=yes
23580814a2baSmrgelif test "x$use_fop" = x"no" ; then
23590814a2baSmrg   if test "x$FOP" != "x"; then
23600814a2baSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
23610814a2baSmrg   fi
23620814a2baSmrg   have_fop=no
23630814a2baSmrgelse
23640814a2baSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
23650814a2baSmrgfi
236663847c39Smrg
23670814a2baSmrg# Test for a minimum version of fop, if provided.
23680814a2baSmrgm4_ifval([$1],
23690814a2baSmrg[if test "$have_fop" = yes; then
23700814a2baSmrg    # scrape the fop version
23710814a2baSmrg    AC_MSG_CHECKING([for fop minimum version])
23720814a2baSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
23730814a2baSmrg    AC_MSG_RESULT([$fop_version])
23740814a2baSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
23750814a2baSmrg        [if test "x$use_fop" = xauto; then
23760814a2baSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
23770814a2baSmrg            have_fop=no
23780814a2baSmrg        else
23790814a2baSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
23800814a2baSmrg        fi])
23810814a2baSmrgfi])
23820814a2baSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
23830814a2baSmrg]) # XORG_WITH_FOP
238463847c39Smrg
23850814a2baSmrg# XORG_WITH_M4([MIN-VERSION])
23860814a2baSmrg# ---------------------------
23870814a2baSmrg# Minimum version: 1.19.0
23880814a2baSmrg#
23890814a2baSmrg# This macro attempts to locate an m4 macro processor which supports
23900814a2baSmrg# -I option and is only useful for modules relying on M4 in order to
23910814a2baSmrg# expand macros in source code files.
23920814a2baSmrg#
23930814a2baSmrg# Interface to module:
23940814a2baSmrg# M4:	 	returns the path of the m4 program found
23950814a2baSmrg#		returns the path set by the user in the environment
23960814a2baSmrg#
23970814a2baSmrgAC_DEFUN([XORG_WITH_M4], [
23980814a2baSmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
23990814a2baSmrg   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
24000814a2baSmrg       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
24010814a2baSmrg         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
24020814a2baSmrg   [AC_MSG_ERROR([could not find m4 that supports -I option])],
24030814a2baSmrg   [$PATH:/usr/gnu/bin])])
240463847c39Smrg
24050814a2baSmrgAC_SUBST([M4], [$ac_cv_path_M4])
24060814a2baSmrg]) # XORG_WITH_M4
240763847c39Smrg
24080814a2baSmrg# XORG_WITH_PS2PDF([DEFAULT])
24090814a2baSmrg# ----------------
24100814a2baSmrg# Minimum version: 1.6.0
24110814a2baSmrg# Minimum version for optional DEFAULT argument: 1.11.0
24120814a2baSmrg#
24130814a2baSmrg# Documentation tools are not always available on all platforms and sometimes
24140814a2baSmrg# not at the appropriate level. This macro enables a module to test for the
24150814a2baSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
24160814a2baSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
24170814a2baSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
24180814a2baSmrg# --with-ps2pdf assumes 'auto'.
24190814a2baSmrg#
24200814a2baSmrg# Interface to module:
24210814a2baSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
24220814a2baSmrg# PS2PDF:	returns the path of the ps2pdf program found
24230814a2baSmrg#		returns the path set by the user in the environment
24240814a2baSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
24250814a2baSmrg#		 'no' user instructs the module not to use ps2pdf
24260814a2baSmrg#
24270814a2baSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
24280814a2baSmrg#
24290814a2baSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
24300814a2baSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
24310814a2baSmrgm4_define([_defopt], m4_default([$1], [auto]))
24320814a2baSmrgAC_ARG_WITH(ps2pdf,
24330814a2baSmrg	AS_HELP_STRING([--with-ps2pdf],
24340814a2baSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
24350814a2baSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
24360814a2baSmrgm4_undefine([_defopt])
243763847c39Smrg
24380814a2baSmrgif test "x$use_ps2pdf" = x"auto"; then
24390814a2baSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
24400814a2baSmrg   if test "x$PS2PDF" = "x"; then
24410814a2baSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
24420814a2baSmrg	have_ps2pdf=no
24430814a2baSmrg   else
24440814a2baSmrg        have_ps2pdf=yes
24450814a2baSmrg   fi
24460814a2baSmrgelif test "x$use_ps2pdf" = x"yes" ; then
24470814a2baSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
24480814a2baSmrg   if test "x$PS2PDF" = "x"; then
24490814a2baSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
24500814a2baSmrg   fi
24510814a2baSmrg   have_ps2pdf=yes
24520814a2baSmrgelif test "x$use_ps2pdf" = x"no" ; then
24530814a2baSmrg   if test "x$PS2PDF" != "x"; then
24540814a2baSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
24550814a2baSmrg   fi
24560814a2baSmrg   have_ps2pdf=no
24570814a2baSmrgelse
24580814a2baSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
245963847c39Smrgfi
24600814a2baSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
24610814a2baSmrg]) # XORG_WITH_PS2PDF
246263847c39Smrg
24630814a2baSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
24640814a2baSmrg# ----------------
24650814a2baSmrg# Minimum version: 1.6.0
24660814a2baSmrg#
24670814a2baSmrg# Documentation tools are not always available on all platforms and sometimes
24680814a2baSmrg# not at the appropriate level. This macro enables a builder to skip all
24690814a2baSmrg# documentation targets except traditional man pages.
24700814a2baSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
24710814a2baSmrg# maximum flexibilty in controlling documentation building.
24720814a2baSmrg# Refer to:
24730814a2baSmrg# XORG_WITH_XMLTO         --with-xmlto
24740814a2baSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
24750814a2baSmrg# XORG_WITH_DOXYGEN       --with-doxygen
24760814a2baSmrg# XORG_WITH_FOP           --with-fop
24770814a2baSmrg# XORG_WITH_GROFF         --with-groff
24780814a2baSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
24790814a2baSmrg#
24800814a2baSmrg# Interface to module:
24810814a2baSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
24820814a2baSmrg# --enable-docs: 'yes' user instructs the module to generate docs
24830814a2baSmrg#		 'no' user instructs the module not to generate docs
24840814a2baSmrg# parm1:	specify the default value, yes or no.
24850814a2baSmrg#
24860814a2baSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
24870814a2baSmrgm4_define([docs_default], m4_default([$1], [yes]))
24880814a2baSmrgAC_ARG_ENABLE(docs,
24890814a2baSmrg	AS_HELP_STRING([--enable-docs],
24900814a2baSmrg	   [Enable building the documentation (default: ]docs_default[)]),
24910814a2baSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
24920814a2baSmrgm4_undefine([docs_default])
24930814a2baSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
24940814a2baSmrgAC_MSG_CHECKING([whether to build documentation])
24950814a2baSmrgAC_MSG_RESULT([$build_docs])
24960814a2baSmrg]) # XORG_ENABLE_DOCS
249763847c39Smrg
24980814a2baSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
24990814a2baSmrg# ----------------
25000814a2baSmrg# Minimum version: 1.6.0
25010814a2baSmrg#
25020814a2baSmrg# This macro enables a builder to skip all developer documentation.
25030814a2baSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
25040814a2baSmrg# maximum flexibilty in controlling documentation building.
25050814a2baSmrg# Refer to:
25060814a2baSmrg# XORG_WITH_XMLTO         --with-xmlto
25070814a2baSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
25080814a2baSmrg# XORG_WITH_DOXYGEN       --with-doxygen
25090814a2baSmrg# XORG_WITH_FOP           --with-fop
25100814a2baSmrg# XORG_WITH_GROFF         --with-groff
25110814a2baSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
25120814a2baSmrg#
25130814a2baSmrg# Interface to module:
25140814a2baSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
25150814a2baSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
25160814a2baSmrg#			'no' user instructs the module not to generate developer docs
25170814a2baSmrg# parm1:		specify the default value, yes or no.
25180814a2baSmrg#
25190814a2baSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
25200814a2baSmrgm4_define([devel_default], m4_default([$1], [yes]))
25210814a2baSmrgAC_ARG_ENABLE(devel-docs,
25220814a2baSmrg	AS_HELP_STRING([--enable-devel-docs],
25230814a2baSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
25240814a2baSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
25250814a2baSmrgm4_undefine([devel_default])
25260814a2baSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
25270814a2baSmrgAC_MSG_CHECKING([whether to build developer documentation])
25280814a2baSmrgAC_MSG_RESULT([$build_devel_docs])
25290814a2baSmrg]) # XORG_ENABLE_DEVEL_DOCS
253063847c39Smrg
25310814a2baSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
25320814a2baSmrg# ----------------
25330814a2baSmrg# Minimum version: 1.6.0
25340814a2baSmrg#
25350814a2baSmrg# This macro enables a builder to skip all functional specification targets.
25360814a2baSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
25370814a2baSmrg# maximum flexibilty in controlling documentation building.
25380814a2baSmrg# Refer to:
25390814a2baSmrg# XORG_WITH_XMLTO         --with-xmlto
25400814a2baSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
25410814a2baSmrg# XORG_WITH_DOXYGEN       --with-doxygen
25420814a2baSmrg# XORG_WITH_FOP           --with-fop
25430814a2baSmrg# XORG_WITH_GROFF         --with-groff
25440814a2baSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
25450814a2baSmrg#
25460814a2baSmrg# Interface to module:
25470814a2baSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
25480814a2baSmrg# --enable-specs:	'yes' user instructs the module to generate specs
25490814a2baSmrg#			'no' user instructs the module not to generate specs
25500814a2baSmrg# parm1:		specify the default value, yes or no.
25510814a2baSmrg#
25520814a2baSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
25530814a2baSmrgm4_define([spec_default], m4_default([$1], [yes]))
25540814a2baSmrgAC_ARG_ENABLE(specs,
25550814a2baSmrg	AS_HELP_STRING([--enable-specs],
25560814a2baSmrg	   [Enable building the specs (default: ]spec_default[)]),
25570814a2baSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
25580814a2baSmrgm4_undefine([spec_default])
25590814a2baSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
25600814a2baSmrgAC_MSG_CHECKING([whether to build functional specifications])
25610814a2baSmrgAC_MSG_RESULT([$build_specs])
25620814a2baSmrg]) # XORG_ENABLE_SPECS
256363847c39Smrg
25640814a2baSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
25650814a2baSmrg# ----------------------------------------------
25660814a2baSmrg# Minimum version: 1.13.0
25670814a2baSmrg#
25680814a2baSmrg# This macro enables a builder to enable/disable unit testing
25690814a2baSmrg# It makes no assumption about the test cases implementation
25700814a2baSmrg# Test cases may or may not use Automake "Support for test suites"
25710814a2baSmrg# They may or may not use the software utility library GLib
25720814a2baSmrg#
25730814a2baSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
25740814a2baSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
25750814a2baSmrg# The variable enable_unit_tests is used by other macros in this file.
25760814a2baSmrg#
25770814a2baSmrg# Interface to module:
25780814a2baSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
25790814a2baSmrg# enable_unit_tests:    used in configure.ac for additional configuration
25800814a2baSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
25810814a2baSmrg#			'no' user instructs the module not to build tests
25820814a2baSmrg# parm1:		specify the default value, yes or no.
25830814a2baSmrg#
25840814a2baSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
25850814a2baSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
25860814a2baSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
25870814a2baSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
25880814a2baSmrgm4_define([_defopt], m4_default([$1], [auto]))
25890814a2baSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
25900814a2baSmrg	[Enable building unit test cases (default: ]_defopt[)]),
25910814a2baSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
25920814a2baSmrgm4_undefine([_defopt])
25930814a2baSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
25940814a2baSmrgAC_MSG_CHECKING([whether to build unit test cases])
25950814a2baSmrgAC_MSG_RESULT([$enable_unit_tests])
25960814a2baSmrg]) # XORG_ENABLE_UNIT_TESTS
259763847c39Smrg
25980814a2baSmrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
25990814a2baSmrg# ------------------------------------------------------
26000814a2baSmrg# Minimum version: 1.17.0
26010814a2baSmrg#
26020814a2baSmrg# This macro enables a builder to enable/disable integration testing
26030814a2baSmrg# It makes no assumption about the test cases' implementation
26040814a2baSmrg# Test cases may or may not use Automake "Support for test suites"
26050814a2baSmrg#
26060814a2baSmrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
26070814a2baSmrg# usually requires less dependencies and may be built and run under less
26080814a2baSmrg# stringent environments than integration tests.
26090814a2baSmrg#
26100814a2baSmrg# Interface to module:
26110814a2baSmrg# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
26120814a2baSmrg# enable_integration_tests:   used in configure.ac for additional configuration
26130814a2baSmrg# --enable-integration-tests: 'yes' user instructs the module to build tests
26140814a2baSmrg#                             'no' user instructs the module not to build tests
26150814a2baSmrg# parm1:                      specify the default value, yes or no.
26160814a2baSmrg#
26170814a2baSmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
26180814a2baSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
26190814a2baSmrgm4_define([_defopt], m4_default([$1], [auto]))
26200814a2baSmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
26210814a2baSmrg	[Enable building integration test cases (default: ]_defopt[)]),
26220814a2baSmrg	[enable_integration_tests=$enableval],
26230814a2baSmrg	[enable_integration_tests=]_defopt)
26240814a2baSmrgm4_undefine([_defopt])
26250814a2baSmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
26260814a2baSmrg	[test "x$enable_integration_tests" != xno])
26270814a2baSmrgAC_MSG_CHECKING([whether to build unit test cases])
26280814a2baSmrgAC_MSG_RESULT([$enable_integration_tests])
26290814a2baSmrg]) # XORG_ENABLE_INTEGRATION_TESTS
263063847c39Smrg
26310814a2baSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
26320814a2baSmrg# ----------------------------------------
26330814a2baSmrg# Minimum version: 1.13.0
26340814a2baSmrg#
26350814a2baSmrg# GLib is a library which provides advanced data structures and functions.
26360814a2baSmrg# This macro enables a module to test for the presence of Glib.
26370814a2baSmrg#
26380814a2baSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
26390814a2baSmrg# Otherwise the value of $enable_unit_tests is blank.
26400814a2baSmrg#
26410814a2baSmrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
26420814a2baSmrg# test support usually requires less dependencies and may be built and run under
26430814a2baSmrg# less stringent environments than integration tests.
26440814a2baSmrg#
26450814a2baSmrg# Interface to module:
26460814a2baSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
26470814a2baSmrg# with_glib: used in configure.ac to know if GLib has been found
26480814a2baSmrg# --with-glib:	'yes' user instructs the module to use glib
26490814a2baSmrg#		'no' user instructs the module not to use glib
26500814a2baSmrg#
26510814a2baSmrgAC_DEFUN([XORG_WITH_GLIB],[
26520814a2baSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
26530814a2baSmrgm4_define([_defopt], m4_default([$2], [auto]))
26540814a2baSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
26550814a2baSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
26560814a2baSmrg	[with_glib=$withval], [with_glib=]_defopt)
26570814a2baSmrgm4_undefine([_defopt])
265863847c39Smrg
26590814a2baSmrghave_glib=no
26600814a2baSmrg# Do not probe GLib if user explicitly disabled unit testing
26610814a2baSmrgif test "x$enable_unit_tests" != x"no"; then
26620814a2baSmrg  # Do not probe GLib if user explicitly disabled it
26630814a2baSmrg  if test "x$with_glib" != x"no"; then
26640814a2baSmrg    m4_ifval(
26650814a2baSmrg      [$1],
26660814a2baSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
26670814a2baSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
26680814a2baSmrg    )
266963847c39Smrg  fi
267063847c39Smrgfi
267163847c39Smrg
26720814a2baSmrg# Not having GLib when unit testing has been explicitly requested is an error
26730814a2baSmrgif test "x$enable_unit_tests" = x"yes"; then
26740814a2baSmrg  if test "x$have_glib" = x"no"; then
26750814a2baSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
26760814a2baSmrg  fi
26770814a2baSmrgfi
267863847c39Smrg
26790814a2baSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
26800814a2baSmrgif test "x$enable_unit_tests" = x"no"; then
26810814a2baSmrg  if test "x$with_glib" = x"yes"; then
26820814a2baSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
26830814a2baSmrg  fi
268463847c39Smrgfi
268563847c39Smrg
26860814a2baSmrg# Not having GLib when it has been explicitly requested is an error
26870814a2baSmrgif test "x$with_glib" = x"yes"; then
26880814a2baSmrg  if test "x$have_glib" = x"no"; then
26890814a2baSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
26900814a2baSmrg  fi
26910814a2baSmrgfi
269263847c39Smrg
26930814a2baSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
26940814a2baSmrg]) # XORG_WITH_GLIB
269563847c39Smrg
26960814a2baSmrg# XORG_LD_WRAP([required|optional])
26970814a2baSmrg# ---------------------------------
26980814a2baSmrg# Minimum version: 1.13.0
26990814a2baSmrg#
27000814a2baSmrg# Check if linker supports -wrap, passed via compiler flags
27010814a2baSmrg#
27020814a2baSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
27030814a2baSmrg# Otherwise the value of $enable_unit_tests is blank.
27040814a2baSmrg#
27050814a2baSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior
27060814a2baSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
27070814a2baSmrg# available, an argument of "optional" allows use when some unit tests require
27080814a2baSmrg# ld -wrap and others do not.
27090814a2baSmrg#
27100814a2baSmrgAC_DEFUN([XORG_LD_WRAP],[
27110814a2baSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
27120814a2baSmrg    [AC_LANG_PROGRAM([#include <stdlib.h>
27130814a2baSmrg                      void __wrap_exit(int status) { return; }],
27140814a2baSmrg                     [exit(0);])])
27150814a2baSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
27160814a2baSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
27170814a2baSmrg  if test "x$have_ld_wrap" = x"no"; then
27180814a2baSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
271963847c39Smrg  fi
27200814a2baSmrgfi
27210814a2baSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
27220814a2baSmrg#
27230814a2baSmrg]) # XORG_LD_WRAP
27240814a2baSmrg
27250814a2baSmrg# XORG_CHECK_LINKER_FLAGS
27260814a2baSmrg# -----------------------
27270814a2baSmrg# SYNOPSIS
27280814a2baSmrg#
27290814a2baSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
27300814a2baSmrg#
27310814a2baSmrg# DESCRIPTION
27320814a2baSmrg#
27330814a2baSmrg#   Check whether the given linker FLAGS work with the current language's
27340814a2baSmrg#   linker, or whether they give an error.
27350814a2baSmrg#
27360814a2baSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
27370814a2baSmrg#   success/failure.
27380814a2baSmrg#
27390814a2baSmrg#   PROGRAM-SOURCE is the program source to link with, if needed
27400814a2baSmrg#
27410814a2baSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
27420814a2baSmrg#
27430814a2baSmrg# LICENSE
27440814a2baSmrg#
27450814a2baSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
27460814a2baSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
27470814a2baSmrg#   Copyright (c) 2009 Matteo Frigo
27480814a2baSmrg#
27490814a2baSmrg#   This program is free software: you can redistribute it and/or modify it
27500814a2baSmrg#   under the terms of the GNU General Public License as published by the
27510814a2baSmrg#   Free Software Foundation, either version 3 of the License, or (at your
27520814a2baSmrg#   option) any later version.
27530814a2baSmrg#
27540814a2baSmrg#   This program is distributed in the hope that it will be useful, but
27550814a2baSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
27560814a2baSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
27570814a2baSmrg#   Public License for more details.
27580814a2baSmrg#
27590814a2baSmrg#   You should have received a copy of the GNU General Public License along
27600814a2baSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
27610814a2baSmrg#
27620814a2baSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
27630814a2baSmrg#   gives unlimited permission to copy, distribute and modify the configure
27640814a2baSmrg#   scripts that are the output of Autoconf when processing the Macro. You
27650814a2baSmrg#   need not follow the terms of the GNU General Public License when using
27660814a2baSmrg#   or distributing such scripts, even though portions of the text of the
27670814a2baSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
27680814a2baSmrg#   all other use of the material that constitutes the Autoconf Macro.
27690814a2baSmrg#
27700814a2baSmrg#   This special exception to the GPL applies to versions of the Autoconf
27710814a2baSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
27720814a2baSmrg#   modified version of the Autoconf Macro, you may extend this special
27730814a2baSmrg#   exception to the GPL to apply to your modified version as well.#
27740814a2baSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
27750814a2baSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
27760814a2baSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
27770814a2baSmrgAS_LITERAL_IF([$1],
27780814a2baSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
27790814a2baSmrg      ax_save_FLAGS=$LDFLAGS
27800814a2baSmrg      LDFLAGS="$1"
27810814a2baSmrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
27820814a2baSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
27830814a2baSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
27840814a2baSmrg      LDFLAGS=$ax_save_FLAGS])],
27850814a2baSmrg  [ax_save_FLAGS=$LDFLAGS
27860814a2baSmrg   LDFLAGS="$1"
27870814a2baSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
27880814a2baSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
27890814a2baSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
27900814a2baSmrg   LDFLAGS=$ax_save_FLAGS])
27910814a2baSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
27920814a2baSmrgAC_MSG_RESULT($xorg_check_linker_flags)
27930814a2baSmrgif test "x$xorg_check_linker_flags" = xyes; then
27940814a2baSmrg	m4_default([$2], :)
279563847c39Smrgelse
27960814a2baSmrg	m4_default([$3], :)
279763847c39Smrgfi
27980814a2baSmrg]) # XORG_CHECK_LINKER_FLAGS
279963847c39Smrg
28000814a2baSmrg# XORG_MEMORY_CHECK_FLAGS
28010814a2baSmrg# -----------------------
28020814a2baSmrg# Minimum version: 1.16.0
28030814a2baSmrg#
28040814a2baSmrg# This macro attempts to find appropriate memory checking functionality
28050814a2baSmrg# for various platforms which unit testing code may use to catch various
28060814a2baSmrg# forms of memory allocation and access errors in testing.
28070814a2baSmrg#
28080814a2baSmrg# Interface to module:
28090814a2baSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
28100814a2baSmrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
28110814a2baSmrg#
28120814a2baSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
28130814a2baSmrg#
28140814a2baSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
28150814a2baSmrg
28160814a2baSmrgAC_REQUIRE([AC_CANONICAL_HOST])
28170814a2baSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
28180814a2baSmrg           [Environment variables to enable memory checking in tests])
28190814a2baSmrg
28200814a2baSmrg# Check for different types of support on different platforms
28210814a2baSmrgcase $host_os in
28220814a2baSmrg    solaris*)
28230814a2baSmrg        AC_CHECK_LIB([umem], [umem_alloc],
28240814a2baSmrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
28250814a2baSmrg        ;;
28260814a2baSmrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
28270814a2baSmrg        # both directly and inverted, so should not be 0 or 255.
28280814a2baSmrg        malloc_debug_env='MALLOC_PERTURB_=15'
28290814a2baSmrg        ;;
28300814a2baSmrg    darwin*)
28310814a2baSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
28320814a2baSmrg        ;;
28330814a2baSmrg    *bsd*)
28340814a2baSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
28350814a2baSmrg        ;;
28360814a2baSmrgesac
28370814a2baSmrg
28380814a2baSmrg# User supplied flags override default flags
28390814a2baSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
28400814a2baSmrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
284163847c39Smrgfi
284263847c39Smrg
28430814a2baSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
28440814a2baSmrg]) # XORG_WITH_LINT
284563847c39Smrg
28460814a2baSmrg# XORG_CHECK_MALLOC_ZERO
28470814a2baSmrg# ----------------------
28480814a2baSmrg# Minimum version: 1.0.0
28490814a2baSmrg#
28500814a2baSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
28510814a2baSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
28520814a2baSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
28530814a2baSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
28540814a2baSmrgAC_ARG_ENABLE(malloc0returnsnull,
28550814a2baSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
28560814a2baSmrg		       [malloc(0) returns NULL (default: auto)]),
28570814a2baSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
28580814a2baSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
28590814a2baSmrg
28600814a2baSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
28610814a2baSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
28620814a2baSmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null],
28630814a2baSmrg	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
28640814a2baSmrg#include <stdlib.h>
28650814a2baSmrg],[
28660814a2baSmrg    char *m0, *r0, *c0, *p;
28670814a2baSmrg    m0 = malloc(0);
28680814a2baSmrg    p = malloc(10);
28690814a2baSmrg    r0 = realloc(p,0);
28700814a2baSmrg    c0 = calloc(0,10);
28710814a2baSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
28720814a2baSmrg])],
28730814a2baSmrg		[xorg_cv_malloc0_returns_null=yes],
28740814a2baSmrg		[xorg_cv_malloc0_returns_null=no])])
28750814a2baSmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
28760814a2baSmrgfi
28770814a2baSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
28780814a2baSmrg
28790814a2baSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
28800814a2baSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
28810814a2baSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
28820814a2baSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
288363847c39Smrgelse
28840814a2baSmrg	MALLOC_ZERO_CFLAGS=""
28850814a2baSmrg	XMALLOC_ZERO_CFLAGS=""
28860814a2baSmrg	XTMALLOC_ZERO_CFLAGS=""
288763847c39Smrgfi
288863847c39Smrg
28890814a2baSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
28900814a2baSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
28910814a2baSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
28920814a2baSmrg]) # XORG_CHECK_MALLOC_ZERO
289363847c39Smrg
28940814a2baSmrg# XORG_WITH_LINT()
28950814a2baSmrg# ----------------
28960814a2baSmrg# Minimum version: 1.1.0
28970814a2baSmrg#
28980814a2baSmrg# This macro enables the use of a tool that flags some suspicious and
28990814a2baSmrg# non-portable constructs (likely to be bugs) in C language source code.
29000814a2baSmrg# It will attempt to locate the tool and use appropriate options.
29010814a2baSmrg# There are various lint type tools on different platforms.
29020814a2baSmrg#
29030814a2baSmrg# Interface to module:
29040814a2baSmrg# LINT:		returns the path to the tool found on the platform
29050814a2baSmrg#		or the value set to LINT on the configure cmd line
29060814a2baSmrg#		also an Automake conditional
29070814a2baSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
29080814a2baSmrg#
29090814a2baSmrg# --with-lint:	'yes' user instructs the module to use lint
29100814a2baSmrg#		'no' user instructs the module not to use lint (default)
29110814a2baSmrg#
29120814a2baSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
29130814a2baSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
29140814a2baSmrg#
29150814a2baSmrgAC_DEFUN([XORG_WITH_LINT],[
291663847c39Smrg
29170814a2baSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
29180814a2baSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
29190814a2baSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
29200814a2baSmrg		[Use a lint-style source code checker (default: disabled)])],
29210814a2baSmrg		[use_lint=$withval], [use_lint=no])
292263847c39Smrg
29230814a2baSmrg# Obtain platform specific info like program name and options
29240814a2baSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
292563847c39Smrgcase $host_os in
29260814a2baSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
29270814a2baSmrg	lint_name=splint
29280814a2baSmrg	lint_options="-badflag"
29290814a2baSmrg	;;
29300814a2baSmrg  *freebsd* | *netbsd*)
29310814a2baSmrg	lint_name=lint
29320814a2baSmrg	lint_options="-u -b"
29330814a2baSmrg	;;
29340814a2baSmrg  *solaris*)
29350814a2baSmrg	lint_name=lint
29360814a2baSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
29370814a2baSmrg	;;
29380814a2baSmrgesac
293963847c39Smrg
29400814a2baSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
29410814a2baSmrgif test "x$use_lint" = x"yes" ; then
29420814a2baSmrg   AC_PATH_PROG([LINT], [$lint_name])
29430814a2baSmrg   if test "x$LINT" = "x"; then
29440814a2baSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
29450814a2baSmrg   fi
29460814a2baSmrgelif test "x$use_lint" = x"no" ; then
29470814a2baSmrg   if test "x$LINT" != "x"; then
29480814a2baSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
29490814a2baSmrg   fi
29500814a2baSmrgelse
29510814a2baSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
29520814a2baSmrgfi
295363847c39Smrg
29540814a2baSmrg# User supplied flags override default flags
29550814a2baSmrgif test "x$LINT_FLAGS" != "x"; then
29560814a2baSmrg   lint_options=$LINT_FLAGS
29570814a2baSmrgfi
295863847c39Smrg
29590814a2baSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
29600814a2baSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
296163847c39Smrg
29620814a2baSmrg]) # XORG_WITH_LINT
296363847c39Smrg
29640814a2baSmrg# XORG_LINT_LIBRARY(LIBNAME)
29650814a2baSmrg# --------------------------
29660814a2baSmrg# Minimum version: 1.1.0
29670814a2baSmrg#
29680814a2baSmrg# Sets up flags for building lint libraries for checking programs that call
29690814a2baSmrg# functions in the library.
29700814a2baSmrg#
29710814a2baSmrg# Interface to module:
29720814a2baSmrg# LINTLIB		- Automake variable with the name of lint library file to make
29730814a2baSmrg# MAKE_LINT_LIB		- Automake conditional
29740814a2baSmrg#
29750814a2baSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
29760814a2baSmrg#			  - 'no' user instructs the module not to create a lint library (default)
297763847c39Smrg
29780814a2baSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
29790814a2baSmrgAC_REQUIRE([XORG_WITH_LINT])
29800814a2baSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
29810814a2baSmrg	[Create lint library (default: disabled)])],
29820814a2baSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
298363847c39Smrg
29840814a2baSmrgif test "x$make_lint_lib" = x"yes" ; then
29850814a2baSmrg   LINTLIB=llib-l$1.ln
29860814a2baSmrg   if test "x$LINT" = "x"; then
29870814a2baSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
29880814a2baSmrg   fi
29890814a2baSmrgelif test "x$make_lint_lib" != x"no" ; then
29900814a2baSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
29910814a2baSmrgfi
299263847c39Smrg
29930814a2baSmrgAC_SUBST(LINTLIB)
29940814a2baSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
299563847c39Smrg
29960814a2baSmrg]) # XORG_LINT_LIBRARY
299763847c39Smrg
29980814a2baSmrg# XORG_COMPILER_BRAND
29990814a2baSmrg# -------------------
30000814a2baSmrg# Minimum version: 1.14.0
30010814a2baSmrg#
30020814a2baSmrg# Checks for various brands of compilers and sets flags as appropriate:
30030814a2baSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
30040814a2baSmrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
30050814a2baSmrg#   clang compiler - sets CLANGCC to "yes"
30060814a2baSmrg#   Intel compiler - sets INTELCC to "yes"
30070814a2baSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
30080814a2baSmrg#
30090814a2baSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
30100814a2baSmrgAC_LANG_CASE(
30110814a2baSmrg	[C], [
30120814a2baSmrg		AC_REQUIRE([AC_PROG_CC_C99])
30130814a2baSmrg	],
30140814a2baSmrg	[C++], [
30150814a2baSmrg		AC_REQUIRE([AC_PROG_CXX])
30160814a2baSmrg	]
30170814a2baSmrg)
30180814a2baSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
30190814a2baSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
30200814a2baSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
30210814a2baSmrg]) # XORG_COMPILER_BRAND
302263847c39Smrg
30230814a2baSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
30240814a2baSmrg# ---------------
30250814a2baSmrg# Minimum version: 1.16.0
30260814a2baSmrg#
30270814a2baSmrg# Test if the compiler works when passed the given flag as a command line argument.
30280814a2baSmrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
30290814a2baSmrg# next flag in the list until there are no more options.
30300814a2baSmrg#
30310814a2baSmrg# Note that this does not guarantee that the compiler supports the flag as some
30320814a2baSmrg# compilers will simply ignore arguments that they do not understand, but we do
30330814a2baSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
30340814a2baSmrg# -Werror=unused-command-line-argument
30350814a2baSmrg#
30360814a2baSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
30370814a2baSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
30380814a2baSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
303963847c39Smrg
30400814a2baSmrgAC_LANG_COMPILER_REQUIRE
304163847c39Smrg
30420814a2baSmrgAC_LANG_CASE(
30430814a2baSmrg	[C], [
30440814a2baSmrg		AC_REQUIRE([AC_PROG_CC_C99])
30450814a2baSmrg		define([PREFIX], [C])
30460814a2baSmrg		define([CACHE_PREFIX], [cc])
30470814a2baSmrg		define([COMPILER], [$CC])
30480814a2baSmrg	],
30490814a2baSmrg	[C++], [
30500814a2baSmrg		define([PREFIX], [CXX])
30510814a2baSmrg		define([CACHE_PREFIX], [cxx])
30520814a2baSmrg		define([COMPILER], [$CXX])
30530814a2baSmrg	]
30540814a2baSmrg)
305563847c39Smrg
30560814a2baSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
305763847c39Smrg
30580814a2baSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
30590814a2baSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
30600814a2baSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
30610814a2baSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
30620814a2baSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
30630814a2baSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
30640814a2baSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
30650814a2baSmrg	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
30660814a2baSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
30670814a2baSmrgfi
306863847c39Smrg
30690814a2baSmrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
30700814a2baSmrg	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
30710814a2baSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
30720814a2baSmrg	fi
30730814a2baSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
30740814a2baSmrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
30750814a2baSmrg			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
30760814a2baSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
30770814a2baSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
30780814a2baSmrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
30790814a2baSmrg	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
30800814a2baSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
30810814a2baSmrgfi
308276888252Smrg
30830814a2baSmrgfound="no"
30840814a2baSmrgm4_foreach([flag], m4_cdr($@), [
30850814a2baSmrg	if test $found = "no" ; then
30860814a2baSmrg		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
30870814a2baSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
30880814a2baSmrg		fi
308976888252Smrg
30900814a2baSmrg		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
30910814a2baSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
30920814a2baSmrg		fi
309376888252Smrg
30940814a2baSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
309563847c39Smrg
30960814a2baSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
30970814a2baSmrg		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
30980814a2baSmrg		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
30990814a2baSmrg		AC_CACHE_VAL($cacheid,
31000814a2baSmrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
31010814a2baSmrg					     [eval $cacheid=yes],
31020814a2baSmrg					     [eval $cacheid=no])])
310363847c39Smrg
31040814a2baSmrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
310576888252Smrg
31060814a2baSmrg		eval supported=\$$cacheid
31070814a2baSmrg		AC_MSG_RESULT([$supported])
31080814a2baSmrg		if test "$supported" = "yes" ; then
31090814a2baSmrg			$1="$$1 ]flag["
31100814a2baSmrg			found="yes"
31110814a2baSmrg		fi
31120814a2baSmrg	fi
31130814a2baSmrg])
31140814a2baSmrg]) # XORG_TESTSET_CFLAG
311576888252Smrg
31160814a2baSmrg# XORG_COMPILER_FLAGS
31170814a2baSmrg# ---------------
31180814a2baSmrg# Minimum version: 1.16.0
31190814a2baSmrg#
31200814a2baSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
31210814a2baSmrg# arguments supported by the selected compiler which do NOT alter the generated
31220814a2baSmrg# code.  These arguments will cause the compiler to print various warnings
31230814a2baSmrg# during compilation AND turn a conservative set of warnings into errors.
31240814a2baSmrg#
31250814a2baSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
31260814a2baSmrg# future versions of util-macros as options are added to new compilers.
31270814a2baSmrg#
31280814a2baSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
31290814a2baSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
313076888252Smrg
31310814a2baSmrgAC_ARG_ENABLE(selective-werror,
31320814a2baSmrg              AS_HELP_STRING([--disable-selective-werror],
31330814a2baSmrg                             [Turn off selective compiler errors. (default: enabled)]),
31340814a2baSmrg              [SELECTIVE_WERROR=$enableval],
31350814a2baSmrg              [SELECTIVE_WERROR=yes])
313663847c39Smrg
31370814a2baSmrgAC_LANG_CASE(
31380814a2baSmrg        [C], [
31390814a2baSmrg                define([PREFIX], [C])
31400814a2baSmrg        ],
31410814a2baSmrg        [C++], [
31420814a2baSmrg                define([PREFIX], [CXX])
31430814a2baSmrg        ]
31440814a2baSmrg)
31450814a2baSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
31460814a2baSmrgif test "x$SUNCC" = "xyes"; then
31470814a2baSmrg    [BASE_]PREFIX[FLAGS]="-v"
31480814a2baSmrgelse
31490814a2baSmrg    [BASE_]PREFIX[FLAGS]=""
31500814a2baSmrgfi
315176888252Smrg
31520814a2baSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
31530814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
31540814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
31550814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
31560814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
315776888252Smrg
31580814a2baSmrgAC_LANG_CASE(
31590814a2baSmrg	[C], [
31600814a2baSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
31610814a2baSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
31620814a2baSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
31630814a2baSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
31640814a2baSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
31650814a2baSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
31660814a2baSmrg	]
31670814a2baSmrg)
316876888252Smrg
31690814a2baSmrg# This chunk adds additional warnings that could catch undesired effects.
31700814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
31710814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
31720814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
31730814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
31740814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
31750814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
31760814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
317776888252Smrg
31780814a2baSmrg# These are currently disabled because they are noisy.  They will be enabled
31790814a2baSmrg# in the future once the codebase is sufficiently modernized to silence
31800814a2baSmrg# them.  For now, I don't want them to drown out the other warnings.
31810814a2baSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
31820814a2baSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
31830814a2baSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
318476888252Smrg
31850814a2baSmrg# Turn some warnings into errors, so we don't accidently get successful builds
31860814a2baSmrg# when there are problems that should be fixed.
318776888252Smrg
31880814a2baSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
31890814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
31900814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
31910814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
31920814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
31930814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
31940814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
31950814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
31960814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
31970814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
31980814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
31990814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
32000814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
32010814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
32020814a2baSmrgelse
32030814a2baSmrgAC_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])
32040814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
32050814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
32060814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
32070814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
32080814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
32090814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
32100814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
32110814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
32120814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
32130814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
32140814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
32150814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
32160814a2baSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
32170814a2baSmrgfi
321876888252Smrg
32190814a2baSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
32200814a2baSmrg]) # XORG_COMPILER_FLAGS
322176888252Smrg
32220814a2baSmrg# XORG_CWARNFLAGS
32230814a2baSmrg# ---------------
32240814a2baSmrg# Minimum version: 1.2.0
32250814a2baSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
32260814a2baSmrg#
32270814a2baSmrg# Defines CWARNFLAGS to enable C compiler warnings.
32280814a2baSmrg#
32290814a2baSmrg# This function is deprecated because it defines -fno-strict-aliasing
32300814a2baSmrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
32310814a2baSmrg# is needed, then it should be added explicitly in the module when
32320814a2baSmrg# it is updated to use BASE_CFLAGS.
32330814a2baSmrg#
32340814a2baSmrgAC_DEFUN([XORG_CWARNFLAGS], [
32350814a2baSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
32360814a2baSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
32370814a2baSmrgAC_LANG_CASE(
32380814a2baSmrg	[C], [
32390814a2baSmrg		CWARNFLAGS="$BASE_CFLAGS"
32400814a2baSmrg		if  test "x$GCC" = xyes ; then
32410814a2baSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
32420814a2baSmrg		fi
32430814a2baSmrg		AC_SUBST(CWARNFLAGS)
32440814a2baSmrg	]
32450814a2baSmrg)
32460814a2baSmrg]) # XORG_CWARNFLAGS
324776888252Smrg
32480814a2baSmrg# XORG_STRICT_OPTION
32490814a2baSmrg# -----------------------
32500814a2baSmrg# Minimum version: 1.3.0
32510814a2baSmrg#
32520814a2baSmrg# Add configure option to enable strict compilation flags, such as treating
32530814a2baSmrg# warnings as fatal errors.
32540814a2baSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
32550814a2baSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
32560814a2baSmrg#
32570814a2baSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
32580814a2baSmrg# when strict compilation is unconditionally desired.
32590814a2baSmrgAC_DEFUN([XORG_STRICT_OPTION], [
32600814a2baSmrgAC_REQUIRE([XORG_CWARNFLAGS])
32610814a2baSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
326276888252Smrg
32630814a2baSmrgAC_ARG_ENABLE(strict-compilation,
32640814a2baSmrg			  AS_HELP_STRING([--enable-strict-compilation],
32650814a2baSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
32660814a2baSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
326763847c39Smrg
32680814a2baSmrgAC_LANG_CASE(
32690814a2baSmrg        [C], [
32700814a2baSmrg                define([PREFIX], [C])
32710814a2baSmrg        ],
32720814a2baSmrg        [C++], [
32730814a2baSmrg                define([PREFIX], [CXX])
32740814a2baSmrg        ]
32750814a2baSmrg)
327676888252Smrg
32770814a2baSmrg[STRICT_]PREFIX[FLAGS]=""
32780814a2baSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
32790814a2baSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
328086dafe34Smrg
32810814a2baSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
32820814a2baSmrg# activate it with -Werror, so we add it here explicitly.
32830814a2baSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
3284d8556812Smrg
32850814a2baSmrgif test "x$STRICT_COMPILE" = "xyes"; then
32860814a2baSmrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
32870814a2baSmrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
3288d8556812Smrgfi
32890814a2baSmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
32900814a2baSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
32910814a2baSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
32920814a2baSmrg]) # XORG_STRICT_OPTION
3293d8556812Smrg
32940814a2baSmrg# XORG_DEFAULT_OPTIONS
32950814a2baSmrg# --------------------
32960814a2baSmrg# Minimum version: 1.3.0
32970814a2baSmrg#
32980814a2baSmrg# Defines default options for X.Org modules.
32990814a2baSmrg#
33000814a2baSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
33010814a2baSmrgAC_REQUIRE([AC_PROG_INSTALL])
33020814a2baSmrgXORG_COMPILER_FLAGS
33030814a2baSmrgXORG_CWARNFLAGS
33040814a2baSmrgXORG_STRICT_OPTION
33050814a2baSmrgXORG_RELEASE_VERSION
33060814a2baSmrgXORG_CHANGELOG
33070814a2baSmrgXORG_INSTALL
33080814a2baSmrgXORG_MANPAGE_SECTIONS
33090814a2baSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
33100814a2baSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
33110814a2baSmrg]) # XORG_DEFAULT_OPTIONS
331263847c39Smrg
33130814a2baSmrg# XORG_INSTALL()
33140814a2baSmrg# ----------------
33150814a2baSmrg# Minimum version: 1.4.0
33160814a2baSmrg#
33170814a2baSmrg# Defines the variable INSTALL_CMD as the command to copy
33180814a2baSmrg# INSTALL from $prefix/share/util-macros.
33190814a2baSmrg#
33200814a2baSmrgAC_DEFUN([XORG_INSTALL], [
33210814a2baSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
33220814a2baSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
33230814a2baSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
33240814a2baSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
33250814a2baSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
33260814a2baSmrgtouch \$(top_srcdir)/INSTALL; \
33270814a2baSmrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
33280814a2baSmrgAC_SUBST([INSTALL_CMD])
33290814a2baSmrg]) # XORG_INSTALL
33300814a2baSmrgdnl Copyright 2005 Red Hat, Inc
33310814a2baSmrgdnl
33320814a2baSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
33330814a2baSmrgdnl documentation for any purpose is hereby granted without fee, provided that
33340814a2baSmrgdnl the above copyright notice appear in all copies and that both that
33350814a2baSmrgdnl copyright notice and this permission notice appear in supporting
33360814a2baSmrgdnl documentation.
33370814a2baSmrgdnl
33380814a2baSmrgdnl The above copyright notice and this permission notice shall be included
33390814a2baSmrgdnl in all copies or substantial portions of the Software.
33400814a2baSmrgdnl
33410814a2baSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
33420814a2baSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
33430814a2baSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
33440814a2baSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
33450814a2baSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
33460814a2baSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
33470814a2baSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
33480814a2baSmrgdnl
33490814a2baSmrgdnl Except as contained in this notice, the name of the copyright holders shall
33500814a2baSmrgdnl not be used in advertising or otherwise to promote the sale, use or
33510814a2baSmrgdnl other dealings in this Software without prior written authorization
33520814a2baSmrgdnl from the copyright holders.
33530814a2baSmrgdnl
335463847c39Smrg
33550814a2baSmrg# XORG_RELEASE_VERSION
33560814a2baSmrg# --------------------
33570814a2baSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
335876888252Smrg
33590814a2baSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
33600814a2baSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
33610814a2baSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
33620814a2baSmrg		[Major version of this package])
33630814a2baSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
33640814a2baSmrg	if test "x$PVM" = "x"; then
33650814a2baSmrg		PVM="0"
33660814a2baSmrg	fi
33670814a2baSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
33680814a2baSmrg		[$PVM],
33690814a2baSmrg		[Minor version of this package])
33700814a2baSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
33710814a2baSmrg	if test "x$PVP" = "x"; then
33720814a2baSmrg		PVP="0"
33730814a2baSmrg	fi
33740814a2baSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
33750814a2baSmrg		[$PVP],
33760814a2baSmrg		[Patch version of this package])
33770814a2baSmrg])
337886dafe34Smrg
33790814a2baSmrg# XORG_CHANGELOG()
33800814a2baSmrg# ----------------
33810814a2baSmrg# Minimum version: 1.2.0
33820814a2baSmrg#
33830814a2baSmrg# Defines the variable CHANGELOG_CMD as the command to generate
33840814a2baSmrg# ChangeLog from git.
33850814a2baSmrg#
33860814a2baSmrg#
33870814a2baSmrgAC_DEFUN([XORG_CHANGELOG], [
33880814a2baSmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
33890814a2baSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
33900814a2baSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
33910814a2baSmrgtouch \$(top_srcdir)/ChangeLog; \
33920814a2baSmrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
33930814a2baSmrgAC_SUBST([CHANGELOG_CMD])
33940814a2baSmrg]) # XORG_CHANGELOG
339576888252Smrg
33960814a2baSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
33970814a2baSmrg#
33980814a2baSmrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
33990814a2baSmrg#   Foundation, Inc.
34000814a2baSmrg#   Written by Gordon Matzigkeit, 1996
34010814a2baSmrg#
34020814a2baSmrg# This file is free software; the Free Software Foundation gives
34030814a2baSmrg# unlimited permission to copy and/or distribute it, with or without
34040814a2baSmrg# modifications, as long as this notice is preserved.
340576888252Smrg
34060814a2baSmrgm4_define([_LT_COPYING], [dnl
34070814a2baSmrg# Copyright (C) 2014 Free Software Foundation, Inc.
34080814a2baSmrg# This is free software; see the source for copying conditions.  There is NO
34090814a2baSmrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
341063847c39Smrg
34110814a2baSmrg# GNU Libtool is free software; you can redistribute it and/or modify
34120814a2baSmrg# it under the terms of the GNU General Public License as published by
34130814a2baSmrg# the Free Software Foundation; either version 2 of of the License, or
34140814a2baSmrg# (at your option) any later version.
34150814a2baSmrg#
34160814a2baSmrg# As a special exception to the GNU General Public License, if you
34170814a2baSmrg# distribute this file as part of a program or library that is built
34180814a2baSmrg# using GNU Libtool, you may include this file under the  same
34190814a2baSmrg# distribution terms that you use for the rest of that program.
34200814a2baSmrg#
34210814a2baSmrg# GNU Libtool is distributed in the hope that it will be useful, but
34220814a2baSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
34230814a2baSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
34240814a2baSmrg# GNU General Public License for more details.
34250814a2baSmrg#
34260814a2baSmrg# You should have received a copy of the GNU General Public License
34270814a2baSmrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
34280814a2baSmrg])
342976888252Smrg
34300814a2baSmrg# serial 59 LT_INIT
343176888252Smrg
343263847c39Smrg
34330814a2baSmrg# LT_PREREQ(VERSION)
34340814a2baSmrg# ------------------
34350814a2baSmrg# Complain and exit if this libtool version is less that VERSION.
34360814a2baSmrgm4_defun([LT_PREREQ],
34370814a2baSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
34380814a2baSmrg       [m4_default([$3],
34390814a2baSmrg		   [m4_fatal([Libtool version $1 or higher is required],
34400814a2baSmrg		             63)])],
34410814a2baSmrg       [$2])])
344263847c39Smrg
344376888252Smrg
34440814a2baSmrg# _LT_CHECK_BUILDDIR
34450814a2baSmrg# ------------------
34460814a2baSmrg# Complain if the absolute build directory name contains unusual characters
34470814a2baSmrgm4_defun([_LT_CHECK_BUILDDIR],
34480814a2baSmrg[case `pwd` in
34490814a2baSmrg  *\ * | *\	*)
34500814a2baSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
34510814a2baSmrgesac
34520814a2baSmrg])
345376888252Smrg
345463847c39Smrg
34550814a2baSmrg# LT_INIT([OPTIONS])
34560814a2baSmrg# ------------------
34570814a2baSmrgAC_DEFUN([LT_INIT],
34580814a2baSmrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
34590814a2baSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
34600814a2baSmrgAC_BEFORE([$0], [LT_LANG])dnl
34610814a2baSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
34620814a2baSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
34630814a2baSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
346463847c39Smrg
34650814a2baSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
34660814a2baSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
34670814a2baSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
34680814a2baSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
34690814a2baSmrgdnl unless we require an AC_DEFUNed macro:
34700814a2baSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
34710814a2baSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
34720814a2baSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
34730814a2baSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
34740814a2baSmrgm4_require([_LT_PROG_LTMAIN])dnl
347576888252Smrg
34760814a2baSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
347776888252Smrg
34780814a2baSmrgdnl Parse OPTIONS
34790814a2baSmrg_LT_SET_OPTIONS([$0], [$1])
348076888252Smrg
34810814a2baSmrg# This can be used to rebuild libtool when needed
34820814a2baSmrgLIBTOOL_DEPS=$ltmain
348376888252Smrg
34840814a2baSmrg# Always use our own libtool.
34850814a2baSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
34860814a2baSmrgAC_SUBST(LIBTOOL)dnl
348776888252Smrg
34880814a2baSmrg_LT_SETUP
348976888252Smrg
34900814a2baSmrg# Only expand once:
34910814a2baSmrgm4_define([LT_INIT])
34920814a2baSmrg])# LT_INIT
349376888252Smrg
34940814a2baSmrg# Old names:
34950814a2baSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
34960814a2baSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
34970814a2baSmrgdnl aclocal-1.4 backwards compatibility:
34980814a2baSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
34990814a2baSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
350076888252Smrg
350176888252Smrg
35020814a2baSmrg# _LT_PREPARE_CC_BASENAME
35030814a2baSmrg# -----------------------
35040814a2baSmrgm4_defun([_LT_PREPARE_CC_BASENAME], [
35050814a2baSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
35060814a2baSmrgfunc_cc_basename ()
35070814a2baSmrg{
35080814a2baSmrg    for cc_temp in @S|@*""; do
35090814a2baSmrg      case $cc_temp in
35100814a2baSmrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
35110814a2baSmrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
35120814a2baSmrg        \-*) ;;
35130814a2baSmrg        *) break;;
35140814a2baSmrg      esac
35150814a2baSmrg    done
35160814a2baSmrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
35170814a2baSmrg}
35180814a2baSmrg])# _LT_PREPARE_CC_BASENAME
351976888252Smrg
352063847c39Smrg
35210814a2baSmrg# _LT_CC_BASENAME(CC)
35220814a2baSmrg# -------------------
35230814a2baSmrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
35240814a2baSmrg# but that macro is also expanded into generated libtool script, which
35250814a2baSmrg# arranges for $SED and $ECHO to be set by different means.
35260814a2baSmrgm4_defun([_LT_CC_BASENAME],
35270814a2baSmrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
35280814a2baSmrgAC_REQUIRE([_LT_DECL_SED])dnl
35290814a2baSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
35300814a2baSmrgfunc_cc_basename $1
35310814a2baSmrgcc_basename=$func_cc_basename_result
35320814a2baSmrg])
35331ae1b5e8Smrg
35341ae1b5e8Smrg
35350814a2baSmrg# _LT_FILEUTILS_DEFAULTS
35360814a2baSmrg# ----------------------
35370814a2baSmrg# It is okay to use these file commands and assume they have been set
35380814a2baSmrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
35390814a2baSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
35400814a2baSmrg[: ${CP="cp -f"}
35410814a2baSmrg: ${MV="mv -f"}
35420814a2baSmrg: ${RM="rm -f"}
35430814a2baSmrg])# _LT_FILEUTILS_DEFAULTS
354463847c39Smrg
354576888252Smrg
35460814a2baSmrg# _LT_SETUP
35470814a2baSmrg# ---------
35480814a2baSmrgm4_defun([_LT_SETUP],
35490814a2baSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
35500814a2baSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
35510814a2baSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
35520814a2baSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
355376888252Smrg
35540814a2baSmrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
35550814a2baSmrgdnl
35560814a2baSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
35570814a2baSmrg_LT_DECL([], [host], [0])dnl
35580814a2baSmrg_LT_DECL([], [host_os], [0])dnl
35590814a2baSmrgdnl
35600814a2baSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
35610814a2baSmrg_LT_DECL([], [build], [0])dnl
35620814a2baSmrg_LT_DECL([], [build_os], [0])dnl
35630814a2baSmrgdnl
35640814a2baSmrgAC_REQUIRE([AC_PROG_CC])dnl
35650814a2baSmrgAC_REQUIRE([LT_PATH_LD])dnl
35660814a2baSmrgAC_REQUIRE([LT_PATH_NM])dnl
35670814a2baSmrgdnl
35680814a2baSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
35690814a2baSmrgtest -z "$LN_S" && LN_S="ln -s"
35700814a2baSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
35710814a2baSmrgdnl
35720814a2baSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
35730814a2baSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
35740814a2baSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
35750814a2baSmrgdnl
35760814a2baSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
35770814a2baSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
35780814a2baSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
35790814a2baSmrgm4_require([_LT_CMD_RELOAD])dnl
35800814a2baSmrgm4_require([_LT_DECL_FILECMD])dnl
35810814a2baSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
35820814a2baSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
35830814a2baSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
35840814a2baSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
35850814a2baSmrgm4_require([_LT_WITH_SYSROOT])dnl
35860814a2baSmrgm4_require([_LT_CMD_TRUNCATE])dnl
358776888252Smrg
35880814a2baSmrg_LT_CONFIG_LIBTOOL_INIT([
35890814a2baSmrg# See if we are running on zsh, and set the options that allow our
35900814a2baSmrg# commands through without removal of \ escapes INIT.
35910814a2baSmrgif test -n "\${ZSH_VERSION+set}"; then
35920814a2baSmrg   setopt NO_GLOB_SUBST
35930814a2baSmrgfi
35940814a2baSmrg])
35950814a2baSmrgif test -n "${ZSH_VERSION+set}"; then
35960814a2baSmrg   setopt NO_GLOB_SUBST
35970814a2baSmrgfi
359876888252Smrg
35990814a2baSmrg_LT_CHECK_OBJDIR
36000814a2baSmrg
36010814a2baSmrgm4_require([_LT_TAG_COMPILER])dnl
36020814a2baSmrg
36030814a2baSmrgcase $host_os in
36040814a2baSmrgaix3*)
36050814a2baSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
36060814a2baSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
36070814a2baSmrg  # vanish in a puff of smoke.
36080814a2baSmrg  if test set != "${COLLECT_NAMES+set}"; then
36090814a2baSmrg    COLLECT_NAMES=
36100814a2baSmrg    export COLLECT_NAMES
361186dafe34Smrg  fi
361286dafe34Smrg  ;;
36130814a2baSmrgesac
361476888252Smrg
36150814a2baSmrg# Global variables:
36160814a2baSmrgofile=libtool
36170814a2baSmrgcan_build_shared=yes
361886dafe34Smrg
36190814a2baSmrg# All known linkers require a '.a' archive for static linking (except MSVC and
36200814a2baSmrg# ICC, which need '.lib').
36210814a2baSmrglibext=a
362286dafe34Smrg
36230814a2baSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
36240814a2baSmrg
36250814a2baSmrgold_CC=$CC
36260814a2baSmrgold_CFLAGS=$CFLAGS
36270814a2baSmrg
36280814a2baSmrg# Set sane defaults for various variables
36290814a2baSmrgtest -z "$CC" && CC=cc
36300814a2baSmrgtest -z "$LTCC" && LTCC=$CC
36310814a2baSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
36320814a2baSmrgtest -z "$LD" && LD=ld
36330814a2baSmrgtest -z "$ac_objext" && ac_objext=o
36340814a2baSmrg
36350814a2baSmrg_LT_CC_BASENAME([$compiler])
36360814a2baSmrg
36370814a2baSmrg# Only perform the check for file, if the check method requires it
36380814a2baSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
36390814a2baSmrgcase $deplibs_check_method in
36400814a2baSmrgfile_magic*)
36410814a2baSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
36420814a2baSmrg    _LT_PATH_MAGIC
364386dafe34Smrg  fi
364486dafe34Smrg  ;;
36450814a2baSmrgesac
364686dafe34Smrg
36470814a2baSmrg# Use C for the default configuration in the libtool script
36480814a2baSmrgLT_SUPPORTED_TAG([CC])
36490814a2baSmrg_LT_LANG_C_CONFIG
36500814a2baSmrg_LT_LANG_DEFAULT_CONFIG
36510814a2baSmrg_LT_CONFIG_COMMANDS
36520814a2baSmrg])# _LT_SETUP
365386dafe34Smrg
365486dafe34Smrg
36550814a2baSmrg# _LT_PREPARE_SED_QUOTE_VARS
36560814a2baSmrg# --------------------------
36570814a2baSmrg# Define a few sed substitution that help us do robust quoting.
36580814a2baSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
36590814a2baSmrg[# Backslashify metacharacters that are still active within
36600814a2baSmrg# double-quoted strings.
36610814a2baSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
366286dafe34Smrg
36630814a2baSmrg# Same as above, but do not quote variable references.
36640814a2baSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
366563847c39Smrg
36660814a2baSmrg# Sed substitution to delay expansion of an escaped shell variable in a
36670814a2baSmrg# double_quote_subst'ed string.
36680814a2baSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
366986dafe34Smrg
36700814a2baSmrg# Sed substitution to delay expansion of an escaped single quote.
36710814a2baSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
36720814a2baSmrg
36730814a2baSmrg# Sed substitution to avoid accidental globbing in evaled expressions
36740814a2baSmrgno_glob_subst='s/\*/\\\*/g'
36751ae1b5e8Smrg])
367663847c39Smrg
36770814a2baSmrg# _LT_PROG_LTMAIN
36780814a2baSmrg# ---------------
36790814a2baSmrg# Note that this code is called both from 'configure', and 'config.status'
36800814a2baSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
36810814a2baSmrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
36820814a2baSmrg# so we pass a copy along to make sure it has a sensible value anyway.
36830814a2baSmrgm4_defun([_LT_PROG_LTMAIN],
36840814a2baSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
36850814a2baSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
36860814a2baSmrgltmain=$ac_aux_dir/ltmain.sh
36870814a2baSmrg])# _LT_PROG_LTMAIN
368863847c39Smrg
368963847c39Smrg
369076888252Smrg
36910814a2baSmrg# So that we can recreate a full libtool script including additional
36920814a2baSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
36930814a2baSmrg# in macros and then make a single call at the end using the 'libtool'
36940814a2baSmrg# label.
369576888252Smrg
369663847c39Smrg
36970814a2baSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
36980814a2baSmrg# ----------------------------------------
36990814a2baSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
37000814a2baSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
37010814a2baSmrg[m4_ifval([$1],
37020814a2baSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
37030814a2baSmrg                     [$1
37040814a2baSmrg])])])
370563847c39Smrg
37060814a2baSmrg# Initialize.
37070814a2baSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
370863847c39Smrg
370963847c39Smrg
37100814a2baSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
37110814a2baSmrg# ------------------------------
37120814a2baSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
37130814a2baSmrgm4_define([_LT_CONFIG_LIBTOOL],
37140814a2baSmrg[m4_ifval([$1],
37150814a2baSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
37160814a2baSmrg                     [$1
37170814a2baSmrg])])])
371876888252Smrg
37190814a2baSmrg# Initialize.
37200814a2baSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
372176888252Smrg
372263847c39Smrg
37230814a2baSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
37240814a2baSmrg# -----------------------------------------------------
37250814a2baSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
37260814a2baSmrg[_LT_CONFIG_LIBTOOL([$1])
37270814a2baSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
37280814a2baSmrg])
372963847c39Smrg
373063847c39Smrg
37310814a2baSmrg# _LT_FORMAT_COMMENT([COMMENT])
37320814a2baSmrg# -----------------------------
37330814a2baSmrg# Add leading comment marks to the start of each line, and a trailing
37340814a2baSmrg# full-stop to the whole comment if one is not present already.
37350814a2baSmrgm4_define([_LT_FORMAT_COMMENT],
37360814a2baSmrg[m4_ifval([$1], [
37370814a2baSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
37380814a2baSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
37390814a2baSmrg)])
374076888252Smrg
374186dafe34Smrg
374286dafe34Smrg
37431ae1b5e8Smrg
3744d8556812Smrg
37450814a2baSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
37460814a2baSmrg# -------------------------------------------------------------------
37470814a2baSmrg# CONFIGNAME is the name given to the value in the libtool script.
37480814a2baSmrg# VARNAME is the (base) name used in the configure script.
37490814a2baSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
37500814a2baSmrg# VARNAME.  Any other value will be used directly.
37510814a2baSmrgm4_define([_LT_DECL],
37520814a2baSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
37530814a2baSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
37540814a2baSmrg	[m4_ifval([$1], [$1], [$2])])
37550814a2baSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
37560814a2baSmrg    m4_ifval([$4],
37570814a2baSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
37580814a2baSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
37590814a2baSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
37600814a2baSmrg])
3761d8556812Smrg
3762d8556812Smrg
37630814a2baSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
37640814a2baSmrg# --------------------------------------------------------
37650814a2baSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3766d8556812Smrg
3767d8556812Smrg
37680814a2baSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
37690814a2baSmrg# ------------------------------------------------
37700814a2baSmrgm4_define([lt_decl_tag_varnames],
37710814a2baSmrg[_lt_decl_filter([tagged?], [yes], $@)])
3772d8556812Smrg
3773d8556812Smrg
37740814a2baSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
37750814a2baSmrg# ---------------------------------------------------------
37760814a2baSmrgm4_define([_lt_decl_filter],
37770814a2baSmrg[m4_case([$#],
37780814a2baSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
37790814a2baSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
37800814a2baSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
37810814a2baSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
37820814a2baSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
37830814a2baSmrg])
3784d8556812Smrg
3785d8556812Smrg
37860814a2baSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
37870814a2baSmrg# --------------------------------------------------
37880814a2baSmrgm4_define([lt_decl_quote_varnames],
37890814a2baSmrg[_lt_decl_filter([value], [1], $@)])
3790d8556812Smrg
3791d8556812Smrg
37920814a2baSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
37930814a2baSmrg# ---------------------------------------------------
37940814a2baSmrgm4_define([lt_decl_dquote_varnames],
37950814a2baSmrg[_lt_decl_filter([value], [2], $@)])
3796d8556812Smrg
3797d8556812Smrg
37980814a2baSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
37990814a2baSmrg# ---------------------------------------------------
38000814a2baSmrgm4_define([lt_decl_varnames_tagged],
38010814a2baSmrg[m4_assert([$# <= 2])dnl
38020814a2baSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
38030814a2baSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
38040814a2baSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
38050814a2baSmrgm4_define([_lt_decl_varnames_tagged],
38060814a2baSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
380776888252Smrg
3808d8556812Smrg
38090814a2baSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
38100814a2baSmrg# ------------------------------------------------
38110814a2baSmrgm4_define([lt_decl_all_varnames],
38120814a2baSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
38130814a2baSmrg     m4_if([$2], [],
38140814a2baSmrg	   m4_quote(lt_decl_varnames),
38150814a2baSmrg	m4_quote(m4_shift($@))))[]dnl
38160814a2baSmrg])
38170814a2baSmrgm4_define([_lt_decl_all_varnames],
38180814a2baSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
38190814a2baSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
38200814a2baSmrg])
382176888252Smrg
382263847c39Smrg
38230814a2baSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
38240814a2baSmrg# ------------------------------------
38250814a2baSmrg# Quote a variable value, and forward it to 'config.status' so that its
38260814a2baSmrg# declaration there will have the same value as in 'configure'.  VARNAME
38270814a2baSmrg# must have a single quote delimited value for this to work.
38280814a2baSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
38290814a2baSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
383076888252Smrg
383176888252Smrg
38320814a2baSmrg# _LT_CONFIG_STATUS_DECLARATIONS
38330814a2baSmrg# ------------------------------
38340814a2baSmrg# We delimit libtool config variables with single quotes, so when
38350814a2baSmrg# we write them to config.status, we have to be sure to quote all
38360814a2baSmrg# embedded single quotes properly.  In configure, this macro expands
38370814a2baSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
38380814a2baSmrg#
38390814a2baSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
38400814a2baSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
38410814a2baSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
38420814a2baSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
384376888252Smrg
384476888252Smrg
38450814a2baSmrg# _LT_LIBTOOL_TAGS
38460814a2baSmrg# ----------------
38470814a2baSmrg# Output comment and list of tags supported by the script
38480814a2baSmrgm4_defun([_LT_LIBTOOL_TAGS],
38490814a2baSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
38500814a2baSmrgavailable_tags='_LT_TAGS'dnl
38510814a2baSmrg])
385263847c39Smrg
385363847c39Smrg
38540814a2baSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
38550814a2baSmrg# -----------------------------------
38560814a2baSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
38570814a2baSmrg# expand to a commented shell variable setting:
38580814a2baSmrg#
38590814a2baSmrg#    # Some comment about what VAR is for.
38600814a2baSmrg#    visible_name=$lt_internal_name
38610814a2baSmrgm4_define([_LT_LIBTOOL_DECLARE],
38620814a2baSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
38630814a2baSmrg					   [description])))[]dnl
38640814a2baSmrgm4_pushdef([_libtool_name],
38650814a2baSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
38660814a2baSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
38670814a2baSmrg    [0], [_libtool_name=[$]$1],
38680814a2baSmrg    [1], [_libtool_name=$lt_[]$1],
38690814a2baSmrg    [2], [_libtool_name=$lt_[]$1],
38700814a2baSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
38710814a2baSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
387263847c39Smrg])
3873d8556812Smrg
3874d8556812Smrg
38750814a2baSmrg# _LT_LIBTOOL_CONFIG_VARS
38760814a2baSmrg# -----------------------
38770814a2baSmrg# Produce commented declarations of non-tagged libtool config variables
38780814a2baSmrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
38790814a2baSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
38800814a2baSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
38810814a2baSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
38820814a2baSmrg[m4_foreach([_lt_var],
38830814a2baSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
38840814a2baSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
388563847c39Smrg
388663847c39Smrg
38870814a2baSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
38880814a2baSmrg# -------------------------
38890814a2baSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
38900814a2baSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
38910814a2baSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
3892d8556812Smrg
389363847c39Smrg
38940814a2baSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
38950814a2baSmrg# ------------------------------
38960814a2baSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
3897d8556812Smrg
3898d8556812Smrg
38990814a2baSmrg# _LT_CONFIG_COMMANDS
39000814a2baSmrg# -------------------
39010814a2baSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
39020814a2baSmrg# variables for single and double quote escaping we saved from calls
39030814a2baSmrg# to _LT_DECL, we can put quote escaped variables declarations
39040814a2baSmrg# into 'config.status', and then the shell code to quote escape them in
39050814a2baSmrg# for loops in 'config.status'.  Finally, any additional code accumulated
39060814a2baSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
39070814a2baSmrgm4_defun([_LT_CONFIG_COMMANDS],
39080814a2baSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
39090814a2baSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
39100814a2baSmrg	dnl instead of duplicating it all over again into config.status,
39110814a2baSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
39120814a2baSmrg	dnl needs to know what name is stored there:
39130814a2baSmrg        [AC_CONFIG_COMMANDS([libtool],
39140814a2baSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
39150814a2baSmrg    dnl If the libtool generation code is destined for config.status,
39160814a2baSmrg    dnl expand the accumulated commands and init code now:
39170814a2baSmrg    [AC_CONFIG_COMMANDS([libtool],
39180814a2baSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
39190814a2baSmrg])#_LT_CONFIG_COMMANDS
39200814a2baSmrg
39210814a2baSmrg
39220814a2baSmrg# Initialize.
39230814a2baSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
39240814a2baSmrg[
39250814a2baSmrg
39260814a2baSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
39270814a2baSmrg# if CDPATH is set.
39280814a2baSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
39290814a2baSmrg
39300814a2baSmrgsed_quote_subst='$sed_quote_subst'
39310814a2baSmrgdouble_quote_subst='$double_quote_subst'
39320814a2baSmrgdelay_variable_subst='$delay_variable_subst'
39330814a2baSmrg_LT_CONFIG_STATUS_DECLARATIONS
39340814a2baSmrgLTCC='$LTCC'
39350814a2baSmrgLTCFLAGS='$LTCFLAGS'
39360814a2baSmrgcompiler='$compiler_DEFAULT'
39370814a2baSmrg
39380814a2baSmrg# A function that is used when there is no print builtin or printf.
39390814a2baSmrgfunc_fallback_echo ()
39400814a2baSmrg{
39410814a2baSmrg  eval 'cat <<_LTECHO_EOF
39420814a2baSmrg\$[]1
39430814a2baSmrg_LTECHO_EOF'
39440814a2baSmrg}
39450814a2baSmrg
39460814a2baSmrg# Quote evaled strings.
39470814a2baSmrgfor var in lt_decl_all_varnames([[ \
39480814a2baSmrg]], lt_decl_quote_varnames); do
39490814a2baSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
39500814a2baSmrg    *[[\\\\\\\`\\"\\\$]]*)
39510814a2baSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
395286dafe34Smrg      ;;
39530814a2baSmrg    *)
39540814a2baSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
395563847c39Smrg      ;;
39560814a2baSmrg    esac
39570814a2baSmrgdone
39580814a2baSmrg
39590814a2baSmrg# Double-quote double-evaled strings.
39600814a2baSmrgfor var in lt_decl_all_varnames([[ \
39610814a2baSmrg]], lt_decl_dquote_varnames); do
39620814a2baSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
39630814a2baSmrg    *[[\\\\\\\`\\"\\\$]]*)
39640814a2baSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
3965d8556812Smrg      ;;
3966d8556812Smrg    *)
39670814a2baSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
396886dafe34Smrg      ;;
3969d8556812Smrg    esac
39700814a2baSmrgdone
397176888252Smrg
39720814a2baSmrg_LT_OUTPUT_LIBTOOL_INIT
39730814a2baSmrg])
397476888252Smrg
39750814a2baSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
39760814a2baSmrg# ------------------------------------
39770814a2baSmrg# Generate a child script FILE with all initialization necessary to
39780814a2baSmrg# reuse the environment learned by the parent script, and make the
39790814a2baSmrg# file executable.  If COMMENT is supplied, it is inserted after the
39800814a2baSmrg# '#!' sequence but before initialization text begins.  After this
39810814a2baSmrg# macro, additional text can be appended to FILE to form the body of
39820814a2baSmrg# the child script.  The macro ends with non-zero status if the
39830814a2baSmrg# file could not be fully written (such as if the disk is full).
39840814a2baSmrgm4_ifdef([AS_INIT_GENERATED],
39850814a2baSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
39860814a2baSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
39870814a2baSmrg[m4_require([AS_PREPARE])]dnl
39880814a2baSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
39890814a2baSmrg[lt_write_fail=0
39900814a2baSmrgcat >$1 <<_ASEOF || lt_write_fail=1
39910814a2baSmrg#! $SHELL
39920814a2baSmrg# Generated by $as_me.
39930814a2baSmrg$2
39940814a2baSmrgSHELL=\${CONFIG_SHELL-$SHELL}
39950814a2baSmrgexport SHELL
39960814a2baSmrg_ASEOF
39970814a2baSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
39980814a2baSmrgAS_SHELL_SANITIZE
39990814a2baSmrg_AS_PREPARE
40000814a2baSmrgexec AS_MESSAGE_FD>&1
40010814a2baSmrg_ASEOF
40020814a2baSmrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
40030814a2baSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
400476888252Smrg
40050814a2baSmrg# LT_OUTPUT
40060814a2baSmrg# ---------
40070814a2baSmrg# This macro allows early generation of the libtool script (before
40080814a2baSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
40090814a2baSmrg# tests.
40100814a2baSmrgAC_DEFUN([LT_OUTPUT],
40110814a2baSmrg[: ${CONFIG_LT=./config.lt}
40120814a2baSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
40130814a2baSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
40140814a2baSmrg[# Run this file to recreate a libtool stub with the current configuration.])
401563847c39Smrg
40160814a2baSmrgcat >>"$CONFIG_LT" <<\_LTEOF
40170814a2baSmrglt_cl_silent=false
40180814a2baSmrgexec AS_MESSAGE_LOG_FD>>config.log
40190814a2baSmrg{
40200814a2baSmrg  echo
40210814a2baSmrg  AS_BOX([Running $as_me.])
40220814a2baSmrg} >&AS_MESSAGE_LOG_FD
402376888252Smrg
40240814a2baSmrglt_cl_help="\
40250814a2baSmrg'$as_me' creates a local libtool stub from the current configuration,
40260814a2baSmrgfor use in further configure time tests before the real libtool is
40270814a2baSmrggenerated.
402876888252Smrg
40290814a2baSmrgUsage: $[0] [[OPTIONS]]
403063847c39Smrg
40310814a2baSmrg  -h, --help      print this help, then exit
40320814a2baSmrg  -V, --version   print version number, then exit
40330814a2baSmrg  -q, --quiet     do not print progress messages
40340814a2baSmrg  -d, --debug     don't remove temporary files
403576888252Smrg
40360814a2baSmrgReport bugs to <bug-libtool@gnu.org>."
403776888252Smrg
40380814a2baSmrglt_cl_version="\
40390814a2baSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
40400814a2baSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
40410814a2baSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
404286dafe34Smrg
40430814a2baSmrgCopyright (C) 2011 Free Software Foundation, Inc.
40440814a2baSmrgThis config.lt script is free software; the Free Software Foundation
40450814a2baSmrggives unlimited permision to copy, distribute and modify it."
40460814a2baSmrg
40470814a2baSmrgwhile test 0 != $[#]
40480814a2baSmrgdo
40490814a2baSmrg  case $[1] in
40500814a2baSmrg    --version | --v* | -V )
40510814a2baSmrg      echo "$lt_cl_version"; exit 0 ;;
40520814a2baSmrg    --help | --h* | -h )
40530814a2baSmrg      echo "$lt_cl_help"; exit 0 ;;
40540814a2baSmrg    --debug | --d* | -d )
40550814a2baSmrg      debug=: ;;
40560814a2baSmrg    --quiet | --q* | --silent | --s* | -q )
40570814a2baSmrg      lt_cl_silent=: ;;
40580814a2baSmrg
40590814a2baSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
40600814a2baSmrgTry '$[0] --help' for more information.]) ;;
40610814a2baSmrg
40620814a2baSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
40630814a2baSmrgTry '$[0] --help' for more information.]) ;;
406463847c39Smrg  esac
40650814a2baSmrg  shift
40660814a2baSmrgdone
406776888252Smrg
40680814a2baSmrgif $lt_cl_silent; then
40690814a2baSmrg  exec AS_MESSAGE_FD>/dev/null
40700814a2baSmrgfi
40710814a2baSmrg_LTEOF
407286dafe34Smrg
40730814a2baSmrgcat >>"$CONFIG_LT" <<_LTEOF
40740814a2baSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
40750814a2baSmrg_LTEOF
407686dafe34Smrg
40770814a2baSmrgcat >>"$CONFIG_LT" <<\_LTEOF
40780814a2baSmrgAC_MSG_NOTICE([creating $ofile])
40790814a2baSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
40800814a2baSmrgAS_EXIT(0)
40810814a2baSmrg_LTEOF
40820814a2baSmrgchmod +x "$CONFIG_LT"
408386dafe34Smrg
40840814a2baSmrg# configure is writing to config.log, but config.lt does its own redirection,
40850814a2baSmrg# appending to config.log, which fails on DOS, as config.log is still kept
40860814a2baSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
40870814a2baSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
40880814a2baSmrglt_cl_success=:
40890814a2baSmrgtest yes = "$silent" &&
40900814a2baSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
40910814a2baSmrgexec AS_MESSAGE_LOG_FD>/dev/null
40920814a2baSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
40930814a2baSmrgexec AS_MESSAGE_LOG_FD>>config.log
40940814a2baSmrg$lt_cl_success || AS_EXIT(1)
40950814a2baSmrg])# LT_OUTPUT
40960814a2baSmrg
40970814a2baSmrg
40980814a2baSmrg# _LT_CONFIG(TAG)
40990814a2baSmrg# ---------------
41000814a2baSmrg# If TAG is the built-in tag, create an initial libtool script with a
41010814a2baSmrg# default configuration from the untagged config vars.  Otherwise add code
41020814a2baSmrg# to config.status for appending the configuration named by TAG from the
41030814a2baSmrg# matching tagged config vars.
41040814a2baSmrgm4_defun([_LT_CONFIG],
41050814a2baSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
41060814a2baSmrg_LT_CONFIG_SAVE_COMMANDS([
41070814a2baSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
41080814a2baSmrg  m4_if(_LT_TAG, [C], [
41090814a2baSmrg    # See if we are running on zsh, and set the options that allow our
41100814a2baSmrg    # commands through without removal of \ escapes.
41110814a2baSmrg    if test -n "${ZSH_VERSION+set}"; then
41120814a2baSmrg      setopt NO_GLOB_SUBST
411363847c39Smrg    fi
411486dafe34Smrg
41150814a2baSmrg    cfgfile=${ofile}T
41160814a2baSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
41170814a2baSmrg    $RM "$cfgfile"
411886dafe34Smrg
41190814a2baSmrg    cat <<_LT_EOF >> "$cfgfile"
41200814a2baSmrg#! $SHELL
41210814a2baSmrg# Generated automatically by $as_me ($PACKAGE) $VERSION
41220814a2baSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
41230814a2baSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
41240814a2baSmrg
41250814a2baSmrg# Provide generalized library-building support services.
41260814a2baSmrg# Written by Gordon Matzigkeit, 1996
41270814a2baSmrg
41280814a2baSmrg_LT_COPYING
41290814a2baSmrg_LT_LIBTOOL_TAGS
41300814a2baSmrg
41310814a2baSmrg# Configured defaults for sys_lib_dlsearch_path munging.
41320814a2baSmrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
41330814a2baSmrg
41340814a2baSmrg# ### BEGIN LIBTOOL CONFIG
41350814a2baSmrg_LT_LIBTOOL_CONFIG_VARS
41360814a2baSmrg_LT_LIBTOOL_TAG_VARS
41370814a2baSmrg# ### END LIBTOOL CONFIG
413886dafe34Smrg
413963847c39Smrg_LT_EOF
414086dafe34Smrg
41410814a2baSmrg    cat <<'_LT_EOF' >> "$cfgfile"
414286dafe34Smrg
41430814a2baSmrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
414486dafe34Smrg
41450814a2baSmrg_LT_PREPARE_MUNGE_PATH_LIST
41460814a2baSmrg_LT_PREPARE_CC_BASENAME
414763847c39Smrg
41480814a2baSmrg# ### END FUNCTIONS SHARED WITH CONFIGURE
414986dafe34Smrg
41500814a2baSmrg_LT_EOF
415186dafe34Smrg
41520814a2baSmrg  case $host_os in
41530814a2baSmrg  aix3*)
41540814a2baSmrg    cat <<\_LT_EOF >> "$cfgfile"
41550814a2baSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
41560814a2baSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
41570814a2baSmrg# vanish in a puff of smoke.
41580814a2baSmrgif test set != "${COLLECT_NAMES+set}"; then
41590814a2baSmrg  COLLECT_NAMES=
41600814a2baSmrg  export COLLECT_NAMES
41610814a2baSmrgfi
41620814a2baSmrg_LT_EOF
41630814a2baSmrg    ;;
41640814a2baSmrg  esac
416586dafe34Smrg
41660814a2baSmrg  _LT_PROG_LTMAIN
41670814a2baSmrg
41680814a2baSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
41690814a2baSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
41700814a2baSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
41710814a2baSmrg  # is reportedly fixed, but why not run on old versions too?
41720814a2baSmrg  $SED '$q' "$ltmain" >> "$cfgfile" \
41730814a2baSmrg     || (rm -f "$cfgfile"; exit 1)
41740814a2baSmrg
41750814a2baSmrg   mv -f "$cfgfile" "$ofile" ||
41760814a2baSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
41770814a2baSmrg  chmod +x "$ofile"
41780814a2baSmrg],
41790814a2baSmrg[cat <<_LT_EOF >> "$ofile"
418086dafe34Smrg
41810814a2baSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
41820814a2baSmrgdnl in a comment (ie after a #).
41830814a2baSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
41840814a2baSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
41850814a2baSmrg# ### END LIBTOOL TAG CONFIG: $1
41860814a2baSmrg_LT_EOF
41870814a2baSmrg])dnl /m4_if
41880814a2baSmrg],
41890814a2baSmrg[m4_if([$1], [], [
41900814a2baSmrg    PACKAGE='$PACKAGE'
41910814a2baSmrg    VERSION='$VERSION'
41920814a2baSmrg    RM='$RM'
41930814a2baSmrg    ofile='$ofile'], [])
41940814a2baSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
41950814a2baSmrg])# _LT_CONFIG
419686dafe34Smrg
419786dafe34Smrg
41980814a2baSmrg# LT_SUPPORTED_TAG(TAG)
41990814a2baSmrg# ---------------------
42000814a2baSmrg# Trace this macro to discover what tags are supported by the libtool
42010814a2baSmrg# --tag option, using:
42020814a2baSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
42030814a2baSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
420486dafe34Smrg
420586dafe34Smrg
42060814a2baSmrg# C support is built-in for now
42070814a2baSmrgm4_define([_LT_LANG_C_enabled], [])
42080814a2baSmrgm4_define([_LT_TAGS], [])
420986dafe34Smrg
421086dafe34Smrg
42110814a2baSmrg# LT_LANG(LANG)
42120814a2baSmrg# -------------
42130814a2baSmrg# Enable libtool support for the given language if not already enabled.
42140814a2baSmrgAC_DEFUN([LT_LANG],
42150814a2baSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
42160814a2baSmrgm4_case([$1],
42170814a2baSmrg  [C],			[_LT_LANG(C)],
42180814a2baSmrg  [C++],		[_LT_LANG(CXX)],
42190814a2baSmrg  [Go],			[_LT_LANG(GO)],
42200814a2baSmrg  [Java],		[_LT_LANG(GCJ)],
42210814a2baSmrg  [Fortran 77],		[_LT_LANG(F77)],
42220814a2baSmrg  [Fortran],		[_LT_LANG(FC)],
42230814a2baSmrg  [Windows Resource],	[_LT_LANG(RC)],
42240814a2baSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
42250814a2baSmrg    [_LT_LANG($1)],
42260814a2baSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
42270814a2baSmrg])# LT_LANG
422886dafe34Smrg
422986dafe34Smrg
42300814a2baSmrg# _LT_LANG(LANGNAME)
42310814a2baSmrg# ------------------
42320814a2baSmrgm4_defun([_LT_LANG],
42330814a2baSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
42340814a2baSmrg  [LT_SUPPORTED_TAG([$1])dnl
42350814a2baSmrg  m4_append([_LT_TAGS], [$1 ])dnl
42360814a2baSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
42370814a2baSmrg  _LT_LANG_$1_CONFIG($1)])dnl
42380814a2baSmrg])# _LT_LANG
423986dafe34Smrg
424086dafe34Smrg
42410814a2baSmrgm4_ifndef([AC_PROG_GO], [
42420814a2baSmrg# NOTE: This macro has been submitted for inclusion into   #
42430814a2baSmrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
42440814a2baSmrg#  a released version of Autoconf we should remove this    #
42450814a2baSmrg#  macro and use it instead.                               #
42460814a2baSmrgm4_defun([AC_PROG_GO],
42470814a2baSmrg[AC_LANG_PUSH(Go)dnl
42480814a2baSmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
42490814a2baSmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
42500814a2baSmrg_AC_ARG_VAR_LDFLAGS()dnl
42510814a2baSmrgAC_CHECK_TOOL(GOC, gccgo)
42520814a2baSmrgif test -z "$GOC"; then
42530814a2baSmrg  if test -n "$ac_tool_prefix"; then
42540814a2baSmrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
42550814a2baSmrg  fi
42560814a2baSmrgfi
42570814a2baSmrgif test -z "$GOC"; then
42580814a2baSmrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
42590814a2baSmrgfi
42600814a2baSmrg])#m4_defun
42610814a2baSmrg])#m4_ifndef
426286dafe34Smrg
426376888252Smrg
42640814a2baSmrg# _LT_LANG_DEFAULT_CONFIG
42650814a2baSmrg# -----------------------
42660814a2baSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
42670814a2baSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
42680814a2baSmrg  [LT_LANG(CXX)],
42690814a2baSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
42701ae1b5e8Smrg
42710814a2baSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
42720814a2baSmrg  [LT_LANG(F77)],
42730814a2baSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
42741ae1b5e8Smrg
42750814a2baSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
42760814a2baSmrg  [LT_LANG(FC)],
42770814a2baSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
427886dafe34Smrg
42790814a2baSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
42800814a2baSmrgdnl pulling things in needlessly.
42810814a2baSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
42820814a2baSmrg  [LT_LANG(GCJ)],
42830814a2baSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
42840814a2baSmrg    [LT_LANG(GCJ)],
42850814a2baSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
42860814a2baSmrg      [LT_LANG(GCJ)],
42870814a2baSmrg      [m4_ifdef([AC_PROG_GCJ],
42880814a2baSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
42890814a2baSmrg       m4_ifdef([A][M_PROG_GCJ],
42900814a2baSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
42910814a2baSmrg       m4_ifdef([LT_PROG_GCJ],
42920814a2baSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
42930814a2baSmrg
42940814a2baSmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
42950814a2baSmrg  [LT_LANG(GO)],
42960814a2baSmrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
42970814a2baSmrg
42980814a2baSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
42990814a2baSmrg  [LT_LANG(RC)],
43000814a2baSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
43010814a2baSmrg])# _LT_LANG_DEFAULT_CONFIG
43020814a2baSmrg
43030814a2baSmrg# Obsolete macros:
43040814a2baSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
43050814a2baSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
43060814a2baSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
43070814a2baSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
43080814a2baSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
43090814a2baSmrgdnl aclocal-1.4 backwards compatibility:
43100814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
43110814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
43120814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
43130814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
43140814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
43150814a2baSmrg
43160814a2baSmrg
43170814a2baSmrg# _LT_TAG_COMPILER
43180814a2baSmrg# ----------------
43190814a2baSmrgm4_defun([_LT_TAG_COMPILER],
43200814a2baSmrg[AC_REQUIRE([AC_PROG_CC])dnl
43210814a2baSmrg
43220814a2baSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
43230814a2baSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
43240814a2baSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
43250814a2baSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
432686dafe34Smrg
43270814a2baSmrg# If no C compiler was specified, use CC.
43280814a2baSmrgLTCC=${LTCC-"$CC"}
432986dafe34Smrg
43300814a2baSmrg# If no C compiler flags were specified, use CFLAGS.
43310814a2baSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
433286dafe34Smrg
43330814a2baSmrg# Allow CC to be a program name with arguments.
43340814a2baSmrgcompiler=$CC
43350814a2baSmrg])# _LT_TAG_COMPILER
433686dafe34Smrg
43371ae1b5e8Smrg
43380814a2baSmrg# _LT_COMPILER_BOILERPLATE
43390814a2baSmrg# ------------------------
43400814a2baSmrg# Check for compiler boilerplate output or warnings with
43410814a2baSmrg# the simple compiler test code.
43420814a2baSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
43430814a2baSmrg[m4_require([_LT_DECL_SED])dnl
43440814a2baSmrgac_outfile=conftest.$ac_objext
43450814a2baSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
43460814a2baSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
43470814a2baSmrg_lt_compiler_boilerplate=`cat conftest.err`
43480814a2baSmrg$RM conftest*
43490814a2baSmrg])# _LT_COMPILER_BOILERPLATE
43501ae1b5e8Smrg
43511ae1b5e8Smrg
43520814a2baSmrg# _LT_LINKER_BOILERPLATE
43530814a2baSmrg# ----------------------
43540814a2baSmrg# Check for linker boilerplate output or warnings with
43550814a2baSmrg# the simple link test code.
43560814a2baSmrgm4_defun([_LT_LINKER_BOILERPLATE],
43570814a2baSmrg[m4_require([_LT_DECL_SED])dnl
43580814a2baSmrgac_outfile=conftest.$ac_objext
43590814a2baSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
43600814a2baSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
43610814a2baSmrg_lt_linker_boilerplate=`cat conftest.err`
43620814a2baSmrg$RM -r conftest*
43630814a2baSmrg])# _LT_LINKER_BOILERPLATE
43641ae1b5e8Smrg
43650814a2baSmrg# _LT_REQUIRED_DARWIN_CHECKS
43660814a2baSmrg# -------------------------
43670814a2baSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
43680814a2baSmrg  case $host_os in
43690814a2baSmrg    rhapsody* | darwin*)
43700814a2baSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
43710814a2baSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
43720814a2baSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
43730814a2baSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
43740814a2baSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
43750814a2baSmrg    _LT_DECL([], [DSYMUTIL], [1],
43760814a2baSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
43770814a2baSmrg    _LT_DECL([], [NMEDIT], [1],
43780814a2baSmrg      [Tool to change global to local symbols on Mac OS X])
43790814a2baSmrg    _LT_DECL([], [LIPO], [1],
43800814a2baSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
43810814a2baSmrg    _LT_DECL([], [OTOOL], [1],
43820814a2baSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
43830814a2baSmrg    _LT_DECL([], [OTOOL64], [1],
43840814a2baSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
43851ae1b5e8Smrg
43860814a2baSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
43870814a2baSmrg      [lt_cv_apple_cc_single_mod=no
43880814a2baSmrg      if test -z "$LT_MULTI_MODULE"; then
43890814a2baSmrg	# By default we will add the -single_module flag. You can override
43900814a2baSmrg	# by either setting the environment variable LT_MULTI_MODULE
43910814a2baSmrg	# non-empty at configure time, or by adding -multi_module to the
43920814a2baSmrg	# link flags.
43930814a2baSmrg	rm -rf libconftest.dylib*
43940814a2baSmrg	echo "int foo(void){return 1;}" > conftest.c
43950814a2baSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
43960814a2baSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
43970814a2baSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
43980814a2baSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
43990814a2baSmrg        _lt_result=$?
44000814a2baSmrg	# If there is a non-empty error log, and "single_module"
44010814a2baSmrg	# appears in it, assume the flag caused a linker warning
44020814a2baSmrg        if test -s conftest.err && $GREP single_module conftest.err; then
44030814a2baSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
44040814a2baSmrg	# Otherwise, if the output was created with a 0 exit code from
44050814a2baSmrg	# the compiler, it worked.
44060814a2baSmrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
44070814a2baSmrg	  lt_cv_apple_cc_single_mod=yes
44080814a2baSmrg	else
44090814a2baSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
44100814a2baSmrg	fi
44110814a2baSmrg	rm -rf libconftest.dylib*
44120814a2baSmrg	rm -f conftest.*
44130814a2baSmrg      fi])
44140814a2baSmrg
44150814a2baSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
44160814a2baSmrg      [lt_cv_ld_exported_symbols_list],
44170814a2baSmrg      [lt_cv_ld_exported_symbols_list=no
44180814a2baSmrg      save_LDFLAGS=$LDFLAGS
44190814a2baSmrg      echo "_main" > conftest.sym
44200814a2baSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
44210814a2baSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
44220814a2baSmrg	[lt_cv_ld_exported_symbols_list=yes],
44230814a2baSmrg	[lt_cv_ld_exported_symbols_list=no])
44240814a2baSmrg	LDFLAGS=$save_LDFLAGS
44250814a2baSmrg    ])
44260814a2baSmrg
44270814a2baSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
44280814a2baSmrg      [lt_cv_ld_force_load=no
44290814a2baSmrg      cat > conftest.c << _LT_EOF
44300814a2baSmrgint forced_loaded() { return 2;}
44310814a2baSmrg_LT_EOF
44320814a2baSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
44330814a2baSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
44340814a2baSmrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
44350814a2baSmrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
44360814a2baSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
44370814a2baSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
44380814a2baSmrg      cat > conftest.c << _LT_EOF
44390814a2baSmrgint main() { return 0;}
44400814a2baSmrg_LT_EOF
44410814a2baSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
44420814a2baSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
44430814a2baSmrg      _lt_result=$?
44440814a2baSmrg      if test -s conftest.err && $GREP force_load conftest.err; then
44450814a2baSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
44460814a2baSmrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
44470814a2baSmrg	lt_cv_ld_force_load=yes
44480814a2baSmrg      else
44490814a2baSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
44500814a2baSmrg      fi
44510814a2baSmrg        rm -f conftest.err libconftest.a conftest conftest.c
44520814a2baSmrg        rm -rf conftest.dSYM
44530814a2baSmrg    ])
44540814a2baSmrg    case $host_os in
44550814a2baSmrg    rhapsody* | darwin1.[[012]])
44560814a2baSmrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
44570814a2baSmrg    darwin1.*)
44580814a2baSmrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
44590814a2baSmrg    darwin*)
44600814a2baSmrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
44610814a2baSmrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
44620814a2baSmrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
44630814a2baSmrg        *)
44640814a2baSmrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
44650814a2baSmrg      esac
44660814a2baSmrg    ;;
44670814a2baSmrg  esac
44680814a2baSmrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
44690814a2baSmrg      _lt_dar_single_mod='$single_module'
44700814a2baSmrg    fi
44710814a2baSmrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
44720814a2baSmrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
44730814a2baSmrg    else
44740814a2baSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
44750814a2baSmrg    fi
44760814a2baSmrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
44770814a2baSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
44780814a2baSmrg    else
44790814a2baSmrg      _lt_dsymutil=
44800814a2baSmrg    fi
44810814a2baSmrg    ;;
44820814a2baSmrg  esac
44830814a2baSmrg])
44841ae1b5e8Smrg
44851ae1b5e8Smrg
44860814a2baSmrg# _LT_DARWIN_LINKER_FEATURES([TAG])
44870814a2baSmrg# ---------------------------------
44880814a2baSmrg# Checks for linker and compiler features on darwin
44890814a2baSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
44900814a2baSmrg[
44910814a2baSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
44920814a2baSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
44930814a2baSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
44940814a2baSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
44950814a2baSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
44960814a2baSmrg  if test yes = "$lt_cv_ld_force_load"; then
44970814a2baSmrg    _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\"`'
44980814a2baSmrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
44990814a2baSmrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
45000814a2baSmrg  else
45010814a2baSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
45020814a2baSmrg  fi
45030814a2baSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
45040814a2baSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
45050814a2baSmrg  case $cc_basename in
45060814a2baSmrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
45070814a2baSmrg     *) _lt_dar_can_shared=$GCC ;;
45080814a2baSmrg  esac
45090814a2baSmrg  if test yes = "$_lt_dar_can_shared"; then
45100814a2baSmrg    output_verbose_link_cmd=func_echo_all
45110814a2baSmrg    _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"
45120814a2baSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
45130814a2baSmrg    _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"
45140814a2baSmrg    _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"
45150814a2baSmrg    m4_if([$1], [CXX],
45160814a2baSmrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
45170814a2baSmrg      _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"
45180814a2baSmrg      _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"
45190814a2baSmrg    fi
45200814a2baSmrg],[])
45210814a2baSmrg  else
45220814a2baSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
45230814a2baSmrg  fi
45240814a2baSmrg])
452586dafe34Smrg
45260814a2baSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
45270814a2baSmrg# ----------------------------------
45280814a2baSmrg# Links a minimal program and checks the executable
45290814a2baSmrg# for the system default hardcoded library path. In most cases,
45300814a2baSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
45310814a2baSmrg# the location of the communication and MPI libs are included too.
45320814a2baSmrg# If we don't find anything, use the default library path according
45330814a2baSmrg# to the aix ld manual.
45340814a2baSmrg# Store the results from the different compilers for each TAGNAME.
45350814a2baSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
45360814a2baSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
45370814a2baSmrg[m4_require([_LT_DECL_SED])dnl
45380814a2baSmrgif test set = "${lt_cv_aix_libpath+set}"; then
45390814a2baSmrg  aix_libpath=$lt_cv_aix_libpath
45400814a2baSmrgelse
45410814a2baSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
45420814a2baSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
45430814a2baSmrg  lt_aix_libpath_sed='[
45440814a2baSmrg      /Import File Strings/,/^$/ {
45450814a2baSmrg	  /^0/ {
45460814a2baSmrg	      s/^0  *\([^ ]*\) *$/\1/
45470814a2baSmrg	      p
45480814a2baSmrg	  }
45490814a2baSmrg      }]'
45500814a2baSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
45510814a2baSmrg  # Check for a 64-bit object if we didn't find anything.
45520814a2baSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
45530814a2baSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
45540814a2baSmrg  fi],[])
45550814a2baSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
45560814a2baSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
45570814a2baSmrg  fi
45580814a2baSmrg  ])
45590814a2baSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
45600814a2baSmrgfi
45610814a2baSmrg])# _LT_SYS_MODULE_PATH_AIX
45621ae1b5e8Smrg
45631ae1b5e8Smrg
45640814a2baSmrg# _LT_SHELL_INIT(ARG)
45650814a2baSmrg# -------------------
45660814a2baSmrgm4_define([_LT_SHELL_INIT],
45670814a2baSmrg[m4_divert_text([M4SH-INIT], [$1
45680814a2baSmrg])])# _LT_SHELL_INIT
456986dafe34Smrg
457086dafe34Smrg
457186dafe34Smrg
45720814a2baSmrg# _LT_PROG_ECHO_BACKSLASH
45730814a2baSmrg# -----------------------
45740814a2baSmrg# Find how we can fake an echo command that does not interpret backslash.
45750814a2baSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
45760814a2baSmrg# of the generated configure script that will find a shell with a builtin
45770814a2baSmrg# printf (that we can use as an echo command).
45780814a2baSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
45790814a2baSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45800814a2baSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
45810814a2baSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
458286dafe34Smrg
45830814a2baSmrgAC_MSG_CHECKING([how to print strings])
45840814a2baSmrg# Test print first, because it will be a builtin if present.
45850814a2baSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
45860814a2baSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
45870814a2baSmrg  ECHO='print -r --'
45880814a2baSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
45890814a2baSmrg  ECHO='printf %s\n'
45900814a2baSmrgelse
45910814a2baSmrg  # Use this function as a fallback that always works.
45920814a2baSmrg  func_fallback_echo ()
45930814a2baSmrg  {
45940814a2baSmrg    eval 'cat <<_LTECHO_EOF
45950814a2baSmrg$[]1
45960814a2baSmrg_LTECHO_EOF'
45970814a2baSmrg  }
45980814a2baSmrg  ECHO='func_fallback_echo'
45990814a2baSmrgfi
460086dafe34Smrg
46010814a2baSmrg# func_echo_all arg...
46020814a2baSmrg# Invoke $ECHO with all args, space-separated.
46030814a2baSmrgfunc_echo_all ()
46040814a2baSmrg{
46050814a2baSmrg    $ECHO "$*"
46060814a2baSmrg}
460786dafe34Smrg
46080814a2baSmrgcase $ECHO in
46090814a2baSmrg  printf*) AC_MSG_RESULT([printf]) ;;
46100814a2baSmrg  print*) AC_MSG_RESULT([print -r]) ;;
46110814a2baSmrg  *) AC_MSG_RESULT([cat]) ;;
46120814a2baSmrgesac
461386dafe34Smrg
46140814a2baSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
46150814a2baSmrg[_AS_DETECT_SUGGESTED([
46160814a2baSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
46170814a2baSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
46180814a2baSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
46190814a2baSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
46200814a2baSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
46210814a2baSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
46220814a2baSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
462386dafe34Smrg
46240814a2baSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
46250814a2baSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
46260814a2baSmrg])# _LT_PROG_ECHO_BACKSLASH
46271ae1b5e8Smrg
462886dafe34Smrg
46290814a2baSmrg# _LT_WITH_SYSROOT
46300814a2baSmrg# ----------------
46310814a2baSmrgAC_DEFUN([_LT_WITH_SYSROOT],
46320814a2baSmrg[m4_require([_LT_DECL_SED])dnl
46330814a2baSmrgAC_MSG_CHECKING([for sysroot])
46340814a2baSmrgAC_ARG_WITH([sysroot],
46350814a2baSmrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
46360814a2baSmrg  [Search for dependent libraries within DIR (or the compiler's sysroot
46370814a2baSmrg   if not specified).])],
46380814a2baSmrg[], [with_sysroot=no])
463986dafe34Smrg
46400814a2baSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
46410814a2baSmrgdnl in case the user passed a directory name.
46420814a2baSmrglt_sysroot=
46430814a2baSmrgcase $with_sysroot in #(
46440814a2baSmrg yes)
46450814a2baSmrg   if test yes = "$GCC"; then
46460814a2baSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
46470814a2baSmrg   fi
46480814a2baSmrg   ;; #(
46490814a2baSmrg /*)
46500814a2baSmrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
46510814a2baSmrg   ;; #(
46520814a2baSmrg no|'')
46530814a2baSmrg   ;; #(
46540814a2baSmrg *)
46550814a2baSmrg   AC_MSG_RESULT([$with_sysroot])
46560814a2baSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
46570814a2baSmrg   ;;
46580814a2baSmrgesac
465986dafe34Smrg
46600814a2baSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
46610814a2baSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
46620814a2baSmrg[dependent libraries, and where our libraries should be installed.])])
466386dafe34Smrg
46640814a2baSmrg# _LT_ENABLE_LOCK
46650814a2baSmrg# ---------------
46660814a2baSmrgm4_defun([_LT_ENABLE_LOCK],
46670814a2baSmrg[AC_ARG_ENABLE([libtool-lock],
46680814a2baSmrg  [AS_HELP_STRING([--disable-libtool-lock],
46690814a2baSmrg    [avoid locking (might break parallel builds)])])
46700814a2baSmrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
46710814a2baSmrg
46720814a2baSmrg# Some flags need to be propagated to the compiler or linker for good
46730814a2baSmrg# libtool support.
46740814a2baSmrgcase $host in
46750814a2baSmrgia64-*-hpux*)
46760814a2baSmrg  # Find out what ABI is being produced by ac_compile, and set mode
46770814a2baSmrg  # options accordingly.
46780814a2baSmrg  echo 'int i;' > conftest.$ac_ext
46790814a2baSmrg  if AC_TRY_EVAL(ac_compile); then
46800814a2baSmrg    case `$FILECMD conftest.$ac_objext` in
46810814a2baSmrg      *ELF-32*)
46820814a2baSmrg	HPUX_IA64_MODE=32
46830814a2baSmrg	;;
46840814a2baSmrg      *ELF-64*)
46850814a2baSmrg	HPUX_IA64_MODE=64
46860814a2baSmrg	;;
46870814a2baSmrg    esac
46880814a2baSmrg  fi
46890814a2baSmrg  rm -rf conftest*
46900814a2baSmrg  ;;
46910814a2baSmrg*-*-irix6*)
46920814a2baSmrg  # Find out what ABI is being produced by ac_compile, and set linker
46930814a2baSmrg  # options accordingly.
46940814a2baSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
46950814a2baSmrg  if AC_TRY_EVAL(ac_compile); then
46960814a2baSmrg    if test yes = "$lt_cv_prog_gnu_ld"; then
46970814a2baSmrg      case `$FILECMD conftest.$ac_objext` in
46980814a2baSmrg	*32-bit*)
46990814a2baSmrg	  LD="${LD-ld} -melf32bsmip"
470063847c39Smrg	  ;;
47010814a2baSmrg	*N32*)
47020814a2baSmrg	  LD="${LD-ld} -melf32bmipn32"
470363847c39Smrg	  ;;
47040814a2baSmrg	*64-bit*)
47050814a2baSmrg	  LD="${LD-ld} -melf64bmip"
470663847c39Smrg	;;
470763847c39Smrg      esac
47080814a2baSmrg    else
47090814a2baSmrg      case `$FILECMD conftest.$ac_objext` in
47100814a2baSmrg	*32-bit*)
47110814a2baSmrg	  LD="${LD-ld} -32"
47120814a2baSmrg	  ;;
47130814a2baSmrg	*N32*)
47140814a2baSmrg	  LD="${LD-ld} -n32"
47150814a2baSmrg	  ;;
47160814a2baSmrg	*64-bit*)
47170814a2baSmrg	  LD="${LD-ld} -64"
47180814a2baSmrg	  ;;
47190814a2baSmrg      esac
47200814a2baSmrg    fi
47210814a2baSmrg  fi
47220814a2baSmrg  rm -rf conftest*
47230814a2baSmrg  ;;
472486dafe34Smrg
47250814a2baSmrgmips64*-*linux*)
47260814a2baSmrg  # Find out what ABI is being produced by ac_compile, and set linker
47270814a2baSmrg  # options accordingly.
47280814a2baSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
47290814a2baSmrg  if AC_TRY_EVAL(ac_compile); then
47300814a2baSmrg    emul=elf
47310814a2baSmrg    case `$FILECMD conftest.$ac_objext` in
47320814a2baSmrg      *32-bit*)
47330814a2baSmrg	emul="${emul}32"
473463847c39Smrg	;;
47350814a2baSmrg      *64-bit*)
47360814a2baSmrg	emul="${emul}64"
47370814a2baSmrg	;;
47380814a2baSmrg    esac
47390814a2baSmrg    case `$FILECMD conftest.$ac_objext` in
47400814a2baSmrg      *MSB*)
47410814a2baSmrg	emul="${emul}btsmip"
47420814a2baSmrg	;;
47430814a2baSmrg      *LSB*)
47440814a2baSmrg	emul="${emul}ltsmip"
47450814a2baSmrg	;;
47460814a2baSmrg    esac
47470814a2baSmrg    case `$FILECMD conftest.$ac_objext` in
47480814a2baSmrg      *N32*)
47490814a2baSmrg	emul="${emul}n32"
475063847c39Smrg	;;
475163847c39Smrg    esac
47520814a2baSmrg    LD="${LD-ld} -m $emul"
47530814a2baSmrg  fi
47540814a2baSmrg  rm -rf conftest*
47550814a2baSmrg  ;;
475686dafe34Smrg
47570814a2baSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
47580814a2baSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
47590814a2baSmrg  # Find out what ABI is being produced by ac_compile, and set linker
47600814a2baSmrg  # options accordingly.  Note that the listed cases only cover the
47610814a2baSmrg  # situations where additional linker options are needed (such as when
47620814a2baSmrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
47630814a2baSmrg  # vice versa); the common cases where no linker options are needed do
47640814a2baSmrg  # not appear in the list.
47650814a2baSmrg  echo 'int i;' > conftest.$ac_ext
47660814a2baSmrg  if AC_TRY_EVAL(ac_compile); then
47670814a2baSmrg    case `$FILECMD conftest.o` in
47680814a2baSmrg      *32-bit*)
47690814a2baSmrg	case $host in
47700814a2baSmrg	  x86_64-*kfreebsd*-gnu)
47710814a2baSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
47720814a2baSmrg	    ;;
47730814a2baSmrg	  x86_64-*linux*)
47740814a2baSmrg	    case `$FILECMD conftest.o` in
47750814a2baSmrg	      *x86-64*)
47760814a2baSmrg		LD="${LD-ld} -m elf32_x86_64"
47770814a2baSmrg		;;
47780814a2baSmrg	      *)
47790814a2baSmrg		LD="${LD-ld} -m elf_i386"
47800814a2baSmrg		;;
47810814a2baSmrg	    esac
47820814a2baSmrg	    ;;
47830814a2baSmrg	  powerpc64le-*linux*)
47840814a2baSmrg	    LD="${LD-ld} -m elf32lppclinux"
47850814a2baSmrg	    ;;
47860814a2baSmrg	  powerpc64-*linux*)
47870814a2baSmrg	    LD="${LD-ld} -m elf32ppclinux"
47880814a2baSmrg	    ;;
47890814a2baSmrg	  s390x-*linux*)
47900814a2baSmrg	    LD="${LD-ld} -m elf_s390"
47910814a2baSmrg	    ;;
47920814a2baSmrg	  sparc64-*linux*)
47930814a2baSmrg	    LD="${LD-ld} -m elf32_sparc"
47940814a2baSmrg	    ;;
47950814a2baSmrg	esac
47960814a2baSmrg	;;
47970814a2baSmrg      *64-bit*)
47980814a2baSmrg	case $host in
47990814a2baSmrg	  x86_64-*kfreebsd*-gnu)
48000814a2baSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
48010814a2baSmrg	    ;;
48020814a2baSmrg	  x86_64-*linux*)
48030814a2baSmrg	    LD="${LD-ld} -m elf_x86_64"
48040814a2baSmrg	    ;;
48050814a2baSmrg	  powerpcle-*linux*)
48060814a2baSmrg	    LD="${LD-ld} -m elf64lppc"
48070814a2baSmrg	    ;;
48080814a2baSmrg	  powerpc-*linux*)
48090814a2baSmrg	    LD="${LD-ld} -m elf64ppc"
48100814a2baSmrg	    ;;
48110814a2baSmrg	  s390*-*linux*|s390*-*tpf*)
48120814a2baSmrg	    LD="${LD-ld} -m elf64_s390"
48130814a2baSmrg	    ;;
48140814a2baSmrg	  sparc*-*linux*)
48150814a2baSmrg	    LD="${LD-ld} -m elf64_sparc"
48160814a2baSmrg	    ;;
48170814a2baSmrg	esac
481863847c39Smrg	;;
48190814a2baSmrg    esac
482063847c39Smrg  fi
48210814a2baSmrg  rm -rf conftest*
48220814a2baSmrg  ;;
482363847c39Smrg
48240814a2baSmrg*-*-sco3.2v5*)
48250814a2baSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
48260814a2baSmrg  SAVE_CFLAGS=$CFLAGS
48270814a2baSmrg  CFLAGS="$CFLAGS -belf"
48280814a2baSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
48290814a2baSmrg    [AC_LANG_PUSH(C)
48300814a2baSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
48310814a2baSmrg     AC_LANG_POP])
48320814a2baSmrg  if test yes != "$lt_cv_cc_needs_belf"; then
48330814a2baSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
48340814a2baSmrg    CFLAGS=$SAVE_CFLAGS
48350814a2baSmrg  fi
48360814a2baSmrg  ;;
48370814a2baSmrg*-*solaris*)
48380814a2baSmrg  # Find out what ABI is being produced by ac_compile, and set linker
48390814a2baSmrg  # options accordingly.
48400814a2baSmrg  echo 'int i;' > conftest.$ac_ext
48410814a2baSmrg  if AC_TRY_EVAL(ac_compile); then
48420814a2baSmrg    case `$FILECMD conftest.o` in
48430814a2baSmrg    *64-bit*)
48440814a2baSmrg      case $lt_cv_prog_gnu_ld in
48450814a2baSmrg      yes*)
48460814a2baSmrg        case $host in
48470814a2baSmrg        i?86-*-solaris*|x86_64-*-solaris*)
48480814a2baSmrg          LD="${LD-ld} -m elf_x86_64"
48490814a2baSmrg          ;;
48500814a2baSmrg        sparc*-*-solaris*)
48510814a2baSmrg          LD="${LD-ld} -m elf64_sparc"
48520814a2baSmrg          ;;
48530814a2baSmrg        esac
48540814a2baSmrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
48550814a2baSmrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
48560814a2baSmrg          LD=${LD-ld}_sol2
48570814a2baSmrg        fi
48580814a2baSmrg        ;;
48590814a2baSmrg      *)
48600814a2baSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
48610814a2baSmrg	  LD="${LD-ld} -64"
486263847c39Smrg	fi
48630814a2baSmrg	;;
48640814a2baSmrg      esac
486563847c39Smrg      ;;
486663847c39Smrg    esac
486763847c39Smrg  fi
48680814a2baSmrg  rm -rf conftest*
486963847c39Smrg  ;;
487063847c39Smrgesac
487186dafe34Smrg
48720814a2baSmrgneed_locks=$enable_libtool_lock
48730814a2baSmrg])# _LT_ENABLE_LOCK
487463847c39Smrg
487563847c39Smrg
48760814a2baSmrg# _LT_PROG_AR
48770814a2baSmrg# -----------
48780814a2baSmrgm4_defun([_LT_PROG_AR],
48790814a2baSmrg[AC_CHECK_TOOLS(AR, [ar], false)
48800814a2baSmrg: ${AR=ar}
48810814a2baSmrg_LT_DECL([], [AR], [1], [The archiver])
488286dafe34Smrg
48830814a2baSmrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
48840814a2baSmrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
48850814a2baSmrg# higher priority because thats what people were doing historically (setting
48860814a2baSmrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
48870814a2baSmrg# variable obsoleted/removed.
48881ae1b5e8Smrg
48890814a2baSmrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
48900814a2baSmrglt_ar_flags=$AR_FLAGS
48910814a2baSmrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
48921ae1b5e8Smrg
48930814a2baSmrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
48940814a2baSmrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
48950814a2baSmrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
48960814a2baSmrg         [Flags to create an archive])
48971ae1b5e8Smrg
48980814a2baSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
48990814a2baSmrg  [lt_cv_ar_at_file=no
49000814a2baSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
49010814a2baSmrg     [echo conftest.$ac_objext > conftest.lst
49020814a2baSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
49030814a2baSmrg      AC_TRY_EVAL([lt_ar_try])
49040814a2baSmrg      if test 0 -eq "$ac_status"; then
49050814a2baSmrg	# Ensure the archiver fails upon bogus file names.
49060814a2baSmrg	rm -f conftest.$ac_objext libconftest.a
49070814a2baSmrg	AC_TRY_EVAL([lt_ar_try])
49080814a2baSmrg	if test 0 -ne "$ac_status"; then
49090814a2baSmrg          lt_cv_ar_at_file=@
49100814a2baSmrg        fi
49110814a2baSmrg      fi
49120814a2baSmrg      rm -f conftest.* libconftest.a
49130814a2baSmrg     ])
49140814a2baSmrg  ])
49151ae1b5e8Smrg
49160814a2baSmrgif test no = "$lt_cv_ar_at_file"; then
49170814a2baSmrg  archiver_list_spec=
49180814a2baSmrgelse
49190814a2baSmrg  archiver_list_spec=$lt_cv_ar_at_file
49200814a2baSmrgfi
49210814a2baSmrg_LT_DECL([], [archiver_list_spec], [1],
49220814a2baSmrg  [How to feed a file listing to the archiver])
49230814a2baSmrg])# _LT_PROG_AR
49241ae1b5e8Smrg
49251ae1b5e8Smrg
49260814a2baSmrg# _LT_CMD_OLD_ARCHIVE
49270814a2baSmrg# -------------------
49280814a2baSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
49290814a2baSmrg[_LT_PROG_AR
493063847c39Smrg
49310814a2baSmrgAC_CHECK_TOOL(STRIP, strip, :)
49320814a2baSmrgtest -z "$STRIP" && STRIP=:
49330814a2baSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
493463847c39Smrg
49350814a2baSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
49360814a2baSmrgtest -z "$RANLIB" && RANLIB=:
49370814a2baSmrg_LT_DECL([], [RANLIB], [1],
49380814a2baSmrg    [Commands used to install an old-style archive])
493963847c39Smrg
49400814a2baSmrg# Determine commands to create old-style static archives.
49410814a2baSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
49420814a2baSmrgold_postinstall_cmds='chmod 644 $oldlib'
49430814a2baSmrgold_postuninstall_cmds=
49441ae1b5e8Smrg
49450814a2baSmrgif test -n "$RANLIB"; then
49460814a2baSmrg  case $host_os in
49470814a2baSmrg  bitrig* | openbsd*)
49480814a2baSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
49490814a2baSmrg    ;;
49500814a2baSmrg  *)
49510814a2baSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
4952d8556812Smrg    ;;
4953d8556812Smrg  esac
49540814a2baSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
49550814a2baSmrgfi
49561ae1b5e8Smrg
49570814a2baSmrgcase $host_os in
49580814a2baSmrg  darwin*)
49590814a2baSmrg    lock_old_archive_extraction=yes ;;
49600814a2baSmrg  *)
49610814a2baSmrg    lock_old_archive_extraction=no ;;
49620814a2baSmrgesac
49630814a2baSmrg_LT_DECL([], [old_postinstall_cmds], [2])
49640814a2baSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
49650814a2baSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
49660814a2baSmrg    [Commands used to build an old-style archive])
49670814a2baSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
49680814a2baSmrg    [Whether to use a lock for old archive extraction])
49690814a2baSmrg])# _LT_CMD_OLD_ARCHIVE
49701ae1b5e8Smrg
49710814a2baSmrg
49720814a2baSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
49730814a2baSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
49740814a2baSmrg# ----------------------------------------------------------------
49750814a2baSmrg# Check whether the given compiler option works
49760814a2baSmrgAC_DEFUN([_LT_COMPILER_OPTION],
49770814a2baSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
49780814a2baSmrgm4_require([_LT_DECL_SED])dnl
49790814a2baSmrgAC_CACHE_CHECK([$1], [$2],
49800814a2baSmrg  [$2=no
49810814a2baSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
49820814a2baSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
49830814a2baSmrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
49840814a2baSmrg   # Insert the option either (1) after the last *FLAGS variable, or
49850814a2baSmrg   # (2) before a word containing "conftest.", or (3) at the end.
49860814a2baSmrg   # Note that $ac_compile itself does not contain backslashes and begins
49870814a2baSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
49880814a2baSmrg   # The option is referenced via a variable to avoid confusing sed.
49890814a2baSmrg   lt_compile=`echo "$ac_compile" | $SED \
49900814a2baSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
49910814a2baSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
49920814a2baSmrg   -e 's:$: $lt_compiler_flag:'`
49930814a2baSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
49940814a2baSmrg   (eval "$lt_compile" 2>conftest.err)
49950814a2baSmrg   ac_status=$?
49960814a2baSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
49970814a2baSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
49980814a2baSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
49990814a2baSmrg     # The compiler can only warn and ignore the option if not recognized
50000814a2baSmrg     # So say no if there are warnings other than the usual output.
50010814a2baSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
50020814a2baSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
50030814a2baSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
50040814a2baSmrg       $2=yes
50050814a2baSmrg     fi
50060814a2baSmrg   fi
50070814a2baSmrg   $RM conftest*
50080814a2baSmrg])
50090814a2baSmrg
50100814a2baSmrgif test yes = "[$]$2"; then
50110814a2baSmrg    m4_if([$5], , :, [$5])
50120814a2baSmrgelse
50130814a2baSmrg    m4_if([$6], , :, [$6])
50141ae1b5e8Smrgfi
50150814a2baSmrg])# _LT_COMPILER_OPTION
501686dafe34Smrg
50170814a2baSmrg# Old name:
50180814a2baSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
50190814a2baSmrgdnl aclocal-1.4 backwards compatibility:
50200814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
50211ae1b5e8Smrg
50220814a2baSmrg
50230814a2baSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
50240814a2baSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
50250814a2baSmrg# ----------------------------------------------------
50260814a2baSmrg# Check whether the given linker option works
50270814a2baSmrgAC_DEFUN([_LT_LINKER_OPTION],
502863847c39Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
50290814a2baSmrgm4_require([_LT_DECL_SED])dnl
50300814a2baSmrgAC_CACHE_CHECK([$1], [$2],
50310814a2baSmrg  [$2=no
50320814a2baSmrg   save_LDFLAGS=$LDFLAGS
50330814a2baSmrg   LDFLAGS="$LDFLAGS $3"
50340814a2baSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
50350814a2baSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
50360814a2baSmrg     # The linker can only warn and ignore the option if not recognized
50370814a2baSmrg     # So say no if there are warnings
50380814a2baSmrg     if test -s conftest.err; then
50390814a2baSmrg       # Append any errors to the config.log.
50400814a2baSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
50410814a2baSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
50420814a2baSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
50430814a2baSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
50440814a2baSmrg         $2=yes
50450814a2baSmrg       fi
50460814a2baSmrg     else
50470814a2baSmrg       $2=yes
50480814a2baSmrg     fi
50490814a2baSmrg   fi
50500814a2baSmrg   $RM -r conftest*
50510814a2baSmrg   LDFLAGS=$save_LDFLAGS
50520814a2baSmrg])
50530814a2baSmrg
50540814a2baSmrgif test yes = "[$]$2"; then
50550814a2baSmrg    m4_if([$4], , :, [$4])
505663847c39Smrgelse
50570814a2baSmrg    m4_if([$5], , :, [$5])
505886dafe34Smrgfi
50590814a2baSmrg])# _LT_LINKER_OPTION
506086dafe34Smrg
50610814a2baSmrg# Old name:
50620814a2baSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
50630814a2baSmrgdnl aclocal-1.4 backwards compatibility:
50640814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
506586dafe34Smrg
506686dafe34Smrg
50670814a2baSmrg# LT_CMD_MAX_LEN
50680814a2baSmrg#---------------
50690814a2baSmrgAC_DEFUN([LT_CMD_MAX_LEN],
50700814a2baSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
50710814a2baSmrg# find the maximum length of command line arguments
50720814a2baSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
50730814a2baSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
50740814a2baSmrg  i=0
50750814a2baSmrg  teststring=ABCD
507663847c39Smrg
50770814a2baSmrg  case $build_os in
50780814a2baSmrg  msdosdjgpp*)
50790814a2baSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
50800814a2baSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
50810814a2baSmrg    # during glob expansion).  Even if it were fixed, the result of this
50820814a2baSmrg    # check would be larger than it should be.
50830814a2baSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
50840814a2baSmrg    ;;
508563847c39Smrg
50860814a2baSmrg  gnu*)
50870814a2baSmrg    # Under GNU Hurd, this test is not required because there is
50880814a2baSmrg    # no limit to the length of command line arguments.
50890814a2baSmrg    # Libtool will interpret -1 as no limit whatsoever
50900814a2baSmrg    lt_cv_sys_max_cmd_len=-1;
50910814a2baSmrg    ;;
509263847c39Smrg
50930814a2baSmrg  cygwin* | mingw* | cegcc*)
50940814a2baSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
50950814a2baSmrg    # about 5 minutes as the teststring grows exponentially.
50960814a2baSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
50970814a2baSmrg    # you end up with a "frozen" computer, even though with patience
50980814a2baSmrg    # the test eventually succeeds (with a max line length of 256k).
50990814a2baSmrg    # Instead, let's just punt: use the minimum linelength reported by
51000814a2baSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
51010814a2baSmrg    lt_cv_sys_max_cmd_len=8192;
51020814a2baSmrg    ;;
510363847c39Smrg
51040814a2baSmrg  mint*)
51050814a2baSmrg    # On MiNT this can take a long time and run out of memory.
51060814a2baSmrg    lt_cv_sys_max_cmd_len=8192;
51070814a2baSmrg    ;;
510863847c39Smrg
51090814a2baSmrg  amigaos*)
51100814a2baSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
51110814a2baSmrg    # So we just punt and use a minimum line length of 8192.
51120814a2baSmrg    lt_cv_sys_max_cmd_len=8192;
51130814a2baSmrg    ;;
511486dafe34Smrg
51150814a2baSmrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
51160814a2baSmrg    # This has been around since 386BSD, at least.  Likely further.
51170814a2baSmrg    if test -x /sbin/sysctl; then
51180814a2baSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
51190814a2baSmrg    elif test -x /usr/sbin/sysctl; then
51200814a2baSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
51210814a2baSmrg    else
51220814a2baSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
51230814a2baSmrg    fi
51240814a2baSmrg    # And add a safety zone
51250814a2baSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
51260814a2baSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
51270814a2baSmrg    ;;
51280814a2baSmrg
51290814a2baSmrg  interix*)
51300814a2baSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
51310814a2baSmrg    lt_cv_sys_max_cmd_len=196608
51320814a2baSmrg    ;;
51330814a2baSmrg
51340814a2baSmrg  os2*)
51350814a2baSmrg    # The test takes a long time on OS/2.
51360814a2baSmrg    lt_cv_sys_max_cmd_len=8192
51370814a2baSmrg    ;;
51380814a2baSmrg
51390814a2baSmrg  osf*)
51400814a2baSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
51410814a2baSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
51420814a2baSmrg    # nice to cause kernel panics so lets avoid the loop below.
51430814a2baSmrg    # First set a reasonable default.
51440814a2baSmrg    lt_cv_sys_max_cmd_len=16384
51450814a2baSmrg    #
51460814a2baSmrg    if test -x /sbin/sysconfig; then
51470814a2baSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
51480814a2baSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
51490814a2baSmrg      esac
51500814a2baSmrg    fi
51510814a2baSmrg    ;;
51520814a2baSmrg  sco3.2v5*)
51530814a2baSmrg    lt_cv_sys_max_cmd_len=102400
51540814a2baSmrg    ;;
51550814a2baSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
51560814a2baSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
51570814a2baSmrg    if test -n "$kargmax"; then
51580814a2baSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
515963847c39Smrg    else
51600814a2baSmrg      lt_cv_sys_max_cmd_len=32768
516163847c39Smrg    fi
51620814a2baSmrg    ;;
51630814a2baSmrg  *)
51640814a2baSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
51650814a2baSmrg    if test -n "$lt_cv_sys_max_cmd_len" && \
51660814a2baSmrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
51670814a2baSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
51680814a2baSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
51690814a2baSmrg    else
51700814a2baSmrg      # Make teststring a little bigger before we do anything with it.
51710814a2baSmrg      # a 1K string should be a reasonable start.
51720814a2baSmrg      for i in 1 2 3 4 5 6 7 8; do
51730814a2baSmrg        teststring=$teststring$teststring
51740814a2baSmrg      done
51750814a2baSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
51760814a2baSmrg      # If test is not a shell built-in, we'll probably end up computing a
51770814a2baSmrg      # maximum length that is only half of the actual maximum length, but
51780814a2baSmrg      # we can't tell.
51790814a2baSmrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
51800814a2baSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
51810814a2baSmrg	      test 17 != "$i" # 1/2 MB should be enough
51820814a2baSmrg      do
51830814a2baSmrg        i=`expr $i + 1`
51840814a2baSmrg        teststring=$teststring$teststring
51850814a2baSmrg      done
51860814a2baSmrg      # Only check the string length outside the loop.
51870814a2baSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
51880814a2baSmrg      teststring=
51890814a2baSmrg      # Add a significant safety factor because C++ compilers can tack on
51900814a2baSmrg      # massive amounts of additional arguments before passing them to the
51910814a2baSmrg      # linker.  It appears as though 1/2 is a usable value.
51920814a2baSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
51930814a2baSmrg    fi
51940814a2baSmrg    ;;
51950814a2baSmrg  esac
51960814a2baSmrg])
51970814a2baSmrgif test -n "$lt_cv_sys_max_cmd_len"; then
51980814a2baSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
51990814a2baSmrgelse
52000814a2baSmrg  AC_MSG_RESULT(none)
52010814a2baSmrgfi
52020814a2baSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
52030814a2baSmrg_LT_DECL([], [max_cmd_len], [0],
52040814a2baSmrg    [What is the maximum length of a command?])
52050814a2baSmrg])# LT_CMD_MAX_LEN
520686dafe34Smrg
52070814a2baSmrg# Old name:
52080814a2baSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
52090814a2baSmrgdnl aclocal-1.4 backwards compatibility:
52100814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
521186dafe34Smrg
52121ae1b5e8Smrg
52130814a2baSmrg# _LT_HEADER_DLFCN
52140814a2baSmrg# ----------------
52150814a2baSmrgm4_defun([_LT_HEADER_DLFCN],
52160814a2baSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
52170814a2baSmrg])# _LT_HEADER_DLFCN
52181ae1b5e8Smrg
521963847c39Smrg
52200814a2baSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
52210814a2baSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
52220814a2baSmrg# ----------------------------------------------------------------
52230814a2baSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
52240814a2baSmrg[m4_require([_LT_HEADER_DLFCN])dnl
52250814a2baSmrgif test yes = "$cross_compiling"; then :
52260814a2baSmrg  [$4]
52270814a2baSmrgelse
52280814a2baSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
52290814a2baSmrg  lt_status=$lt_dlunknown
52300814a2baSmrg  cat > conftest.$ac_ext <<_LT_EOF
52310814a2baSmrg[#line $LINENO "configure"
52320814a2baSmrg#include "confdefs.h"
523363847c39Smrg
52340814a2baSmrg#if HAVE_DLFCN_H
52350814a2baSmrg#include <dlfcn.h>
52360814a2baSmrg#endif
523763847c39Smrg
52380814a2baSmrg#include <stdio.h>
52391ae1b5e8Smrg
52400814a2baSmrg#ifdef RTLD_GLOBAL
52410814a2baSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
52420814a2baSmrg#else
52430814a2baSmrg#  ifdef DL_GLOBAL
52440814a2baSmrg#    define LT_DLGLOBAL		DL_GLOBAL
52450814a2baSmrg#  else
52460814a2baSmrg#    define LT_DLGLOBAL		0
52470814a2baSmrg#  endif
52480814a2baSmrg#endif
524963847c39Smrg
52500814a2baSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
52510814a2baSmrg   find out it does not work in some platform. */
52520814a2baSmrg#ifndef LT_DLLAZY_OR_NOW
52530814a2baSmrg#  ifdef RTLD_LAZY
52540814a2baSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
52550814a2baSmrg#  else
52560814a2baSmrg#    ifdef DL_LAZY
52570814a2baSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
52580814a2baSmrg#    else
52590814a2baSmrg#      ifdef RTLD_NOW
52600814a2baSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
52610814a2baSmrg#      else
52620814a2baSmrg#        ifdef DL_NOW
52630814a2baSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
52640814a2baSmrg#        else
52650814a2baSmrg#          define LT_DLLAZY_OR_NOW	0
52660814a2baSmrg#        endif
52670814a2baSmrg#      endif
52680814a2baSmrg#    endif
52690814a2baSmrg#  endif
52700814a2baSmrg#endif
52711ae1b5e8Smrg
52720814a2baSmrg/* When -fvisibility=hidden is used, assume the code has been annotated
52730814a2baSmrg   correspondingly for the symbols needed.  */
52740814a2baSmrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
52750814a2baSmrgint fnord () __attribute__((visibility("default")));
52760814a2baSmrg#endif
52771ae1b5e8Smrg
52780814a2baSmrgint fnord () { return 42; }
52790814a2baSmrgint main ()
52800814a2baSmrg{
52810814a2baSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
52820814a2baSmrg  int status = $lt_dlunknown;
528363847c39Smrg
52840814a2baSmrg  if (self)
52850814a2baSmrg    {
52860814a2baSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
52870814a2baSmrg      else
52880814a2baSmrg        {
52890814a2baSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
52900814a2baSmrg          else puts (dlerror ());
52910814a2baSmrg	}
52920814a2baSmrg      /* dlclose (self); */
52930814a2baSmrg    }
52940814a2baSmrg  else
52950814a2baSmrg    puts (dlerror ());
529663847c39Smrg
52970814a2baSmrg  return status;
52980814a2baSmrg}]
52990814a2baSmrg_LT_EOF
53000814a2baSmrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
53010814a2baSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
53020814a2baSmrg    lt_status=$?
53030814a2baSmrg    case x$lt_status in
53040814a2baSmrg      x$lt_dlno_uscore) $1 ;;
53050814a2baSmrg      x$lt_dlneed_uscore) $2 ;;
53060814a2baSmrg      x$lt_dlunknown|x*) $3 ;;
53070814a2baSmrg    esac
53080814a2baSmrg  else :
53090814a2baSmrg    # compilation failed
53100814a2baSmrg    $3
53110814a2baSmrg  fi
53120814a2baSmrgfi
53130814a2baSmrgrm -fr conftest*
53140814a2baSmrg])# _LT_TRY_DLOPEN_SELF
53151ae1b5e8Smrg
531663847c39Smrg
53170814a2baSmrg# LT_SYS_DLOPEN_SELF
53180814a2baSmrg# ------------------
53190814a2baSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
53200814a2baSmrg[m4_require([_LT_HEADER_DLFCN])dnl
53210814a2baSmrgif test yes != "$enable_dlopen"; then
53220814a2baSmrg  enable_dlopen=unknown
53230814a2baSmrg  enable_dlopen_self=unknown
53240814a2baSmrg  enable_dlopen_self_static=unknown
53250814a2baSmrgelse
53260814a2baSmrg  lt_cv_dlopen=no
53270814a2baSmrg  lt_cv_dlopen_libs=
53281ae1b5e8Smrg
53290814a2baSmrg  case $host_os in
53300814a2baSmrg  beos*)
53310814a2baSmrg    lt_cv_dlopen=load_add_on
53320814a2baSmrg    lt_cv_dlopen_libs=
53330814a2baSmrg    lt_cv_dlopen_self=yes
53340814a2baSmrg    ;;
533563847c39Smrg
53360814a2baSmrg  mingw* | pw32* | cegcc*)
53370814a2baSmrg    lt_cv_dlopen=LoadLibrary
53380814a2baSmrg    lt_cv_dlopen_libs=
53390814a2baSmrg    ;;
534063847c39Smrg
53410814a2baSmrg  cygwin*)
53420814a2baSmrg    lt_cv_dlopen=dlopen
53430814a2baSmrg    lt_cv_dlopen_libs=
53440814a2baSmrg    ;;
534563847c39Smrg
53460814a2baSmrg  darwin*)
53470814a2baSmrg    # if libdl is installed we need to link against it
53480814a2baSmrg    AC_CHECK_LIB([dl], [dlopen],
53490814a2baSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
53500814a2baSmrg    lt_cv_dlopen=dyld
53510814a2baSmrg    lt_cv_dlopen_libs=
53520814a2baSmrg    lt_cv_dlopen_self=yes
53530814a2baSmrg    ])
53540814a2baSmrg    ;;
535563847c39Smrg
53560814a2baSmrg  tpf*)
53570814a2baSmrg    # Don't try to run any link tests for TPF.  We know it's impossible
53580814a2baSmrg    # because TPF is a cross-compiler, and we know how we open DSOs.
53590814a2baSmrg    lt_cv_dlopen=dlopen
53600814a2baSmrg    lt_cv_dlopen_libs=
53610814a2baSmrg    lt_cv_dlopen_self=no
53620814a2baSmrg    ;;
536363847c39Smrg
53640814a2baSmrg  *)
53650814a2baSmrg    AC_CHECK_FUNC([shl_load],
53660814a2baSmrg	  [lt_cv_dlopen=shl_load],
53670814a2baSmrg      [AC_CHECK_LIB([dld], [shl_load],
53680814a2baSmrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
53690814a2baSmrg	[AC_CHECK_FUNC([dlopen],
53700814a2baSmrg	      [lt_cv_dlopen=dlopen],
53710814a2baSmrg	  [AC_CHECK_LIB([dl], [dlopen],
53720814a2baSmrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
53730814a2baSmrg	    [AC_CHECK_LIB([svld], [dlopen],
53740814a2baSmrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
53750814a2baSmrg	      [AC_CHECK_LIB([dld], [dld_link],
53760814a2baSmrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
53770814a2baSmrg	      ])
53780814a2baSmrg	    ])
53790814a2baSmrg	  ])
53800814a2baSmrg	])
53810814a2baSmrg      ])
53820814a2baSmrg    ;;
53830814a2baSmrg  esac
538463847c39Smrg
53850814a2baSmrg  if test no = "$lt_cv_dlopen"; then
53860814a2baSmrg    enable_dlopen=no
53870814a2baSmrg  else
53880814a2baSmrg    enable_dlopen=yes
53890814a2baSmrg  fi
539063847c39Smrg
53910814a2baSmrg  case $lt_cv_dlopen in
53920814a2baSmrg  dlopen)
53930814a2baSmrg    save_CPPFLAGS=$CPPFLAGS
53940814a2baSmrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
539563847c39Smrg
53960814a2baSmrg    save_LDFLAGS=$LDFLAGS
53970814a2baSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
539863847c39Smrg
53990814a2baSmrg    save_LIBS=$LIBS
54000814a2baSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
540163847c39Smrg
54020814a2baSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
54030814a2baSmrg	  lt_cv_dlopen_self, [dnl
54040814a2baSmrg	  _LT_TRY_DLOPEN_SELF(
54050814a2baSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
54060814a2baSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
54070814a2baSmrg    ])
540863847c39Smrg
54090814a2baSmrg    if test yes = "$lt_cv_dlopen_self"; then
54100814a2baSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
54110814a2baSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
54120814a2baSmrg	  lt_cv_dlopen_self_static, [dnl
54130814a2baSmrg	  _LT_TRY_DLOPEN_SELF(
54140814a2baSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
54150814a2baSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
54160814a2baSmrg      ])
54170814a2baSmrg    fi
541863847c39Smrg
54190814a2baSmrg    CPPFLAGS=$save_CPPFLAGS
54200814a2baSmrg    LDFLAGS=$save_LDFLAGS
54210814a2baSmrg    LIBS=$save_LIBS
54220814a2baSmrg    ;;
54230814a2baSmrg  esac
54240814a2baSmrg
54250814a2baSmrg  case $lt_cv_dlopen_self in
54260814a2baSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
54270814a2baSmrg  *) enable_dlopen_self=unknown ;;
54280814a2baSmrg  esac
54290814a2baSmrg
54300814a2baSmrg  case $lt_cv_dlopen_self_static in
54310814a2baSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
54320814a2baSmrg  *) enable_dlopen_self_static=unknown ;;
54330814a2baSmrg  esac
54340814a2baSmrgfi
54350814a2baSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
54360814a2baSmrg	 [Whether dlopen is supported])
54370814a2baSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
54380814a2baSmrg	 [Whether dlopen of programs is supported])
54390814a2baSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
54400814a2baSmrg	 [Whether dlopen of statically linked programs is supported])
54410814a2baSmrg])# LT_SYS_DLOPEN_SELF
544263847c39Smrg
54430814a2baSmrg# Old name:
54440814a2baSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
54450814a2baSmrgdnl aclocal-1.4 backwards compatibility:
54460814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
544763847c39Smrg
544863847c39Smrg
54490814a2baSmrg# _LT_COMPILER_C_O([TAGNAME])
54500814a2baSmrg# ---------------------------
54510814a2baSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
54520814a2baSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
54530814a2baSmrgm4_defun([_LT_COMPILER_C_O],
54540814a2baSmrg[m4_require([_LT_DECL_SED])dnl
54550814a2baSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
54560814a2baSmrgm4_require([_LT_TAG_COMPILER])dnl
54570814a2baSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
54580814a2baSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
54590814a2baSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
54600814a2baSmrg   $RM -r conftest 2>/dev/null
54610814a2baSmrg   mkdir conftest
54620814a2baSmrg   cd conftest
54630814a2baSmrg   mkdir out
54640814a2baSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
546563847c39Smrg
54660814a2baSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
54670814a2baSmrg   # Insert the option either (1) after the last *FLAGS variable, or
54680814a2baSmrg   # (2) before a word containing "conftest.", or (3) at the end.
54690814a2baSmrg   # Note that $ac_compile itself does not contain backslashes and begins
54700814a2baSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
54710814a2baSmrg   lt_compile=`echo "$ac_compile" | $SED \
54720814a2baSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
54730814a2baSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
54740814a2baSmrg   -e 's:$: $lt_compiler_flag:'`
54750814a2baSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
54760814a2baSmrg   (eval "$lt_compile" 2>out/conftest.err)
54770814a2baSmrg   ac_status=$?
54780814a2baSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
54790814a2baSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
54800814a2baSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
54810814a2baSmrg   then
54820814a2baSmrg     # The compiler can only warn and ignore the option if not recognized
54830814a2baSmrg     # So say no if there are warnings
54840814a2baSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
54850814a2baSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
54860814a2baSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
54870814a2baSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
54880814a2baSmrg     fi
54890814a2baSmrg   fi
54900814a2baSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
54910814a2baSmrg   $RM conftest*
54920814a2baSmrg   # SGI C++ compiler will create directory out/ii_files/ for
54930814a2baSmrg   # template instantiation
54940814a2baSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
54950814a2baSmrg   $RM out/* && rmdir out
54960814a2baSmrg   cd ..
54970814a2baSmrg   $RM -r conftest
54980814a2baSmrg   $RM conftest*
54990814a2baSmrg])
55000814a2baSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
55010814a2baSmrg	[Does compiler simultaneously support -c and -o options?])
55020814a2baSmrg])# _LT_COMPILER_C_O
550363847c39Smrg
550463847c39Smrg
55050814a2baSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
55060814a2baSmrg# ----------------------------------
55070814a2baSmrg# Check to see if we can do hard links to lock some files if needed
55080814a2baSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
55090814a2baSmrg[m4_require([_LT_ENABLE_LOCK])dnl
55100814a2baSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
55110814a2baSmrg_LT_COMPILER_C_O([$1])
551263847c39Smrg
55130814a2baSmrghard_links=nottested
55140814a2baSmrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
55150814a2baSmrg  # do not overwrite the value of need_locks provided by the user
55160814a2baSmrg  AC_MSG_CHECKING([if we can lock with hard links])
55170814a2baSmrg  hard_links=yes
55180814a2baSmrg  $RM conftest*
55190814a2baSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
55200814a2baSmrg  touch conftest.a
55210814a2baSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
55220814a2baSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
55230814a2baSmrg  AC_MSG_RESULT([$hard_links])
55240814a2baSmrg  if test no = "$hard_links"; then
55250814a2baSmrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
55260814a2baSmrg    need_locks=warn
55270814a2baSmrg  fi
55280814a2baSmrgelse
55290814a2baSmrg  need_locks=no
55300814a2baSmrgfi
55310814a2baSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
55320814a2baSmrg])# _LT_COMPILER_FILE_LOCKS
553363847c39Smrg
553463847c39Smrg
55350814a2baSmrg# _LT_CHECK_OBJDIR
55360814a2baSmrg# ----------------
55370814a2baSmrgm4_defun([_LT_CHECK_OBJDIR],
55380814a2baSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
55390814a2baSmrg[rm -f .libs 2>/dev/null
55400814a2baSmrgmkdir .libs 2>/dev/null
55410814a2baSmrgif test -d .libs; then
55420814a2baSmrg  lt_cv_objdir=.libs
55430814a2baSmrgelse
55440814a2baSmrg  # MS-DOS does not allow filenames that begin with a dot.
55450814a2baSmrg  lt_cv_objdir=_libs
55460814a2baSmrgfi
55470814a2baSmrgrmdir .libs 2>/dev/null])
55480814a2baSmrgobjdir=$lt_cv_objdir
55490814a2baSmrg_LT_DECL([], [objdir], [0],
55500814a2baSmrg         [The name of the directory that contains temporary libtool files])dnl
55510814a2baSmrgm4_pattern_allow([LT_OBJDIR])dnl
55520814a2baSmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
55530814a2baSmrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
55540814a2baSmrg])# _LT_CHECK_OBJDIR
555563847c39Smrg
555663847c39Smrg
55570814a2baSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
55580814a2baSmrg# --------------------------------------
55590814a2baSmrg# Check hardcoding attributes.
55600814a2baSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
55610814a2baSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
55620814a2baSmrg_LT_TAGVAR(hardcode_action, $1)=
55630814a2baSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
55640814a2baSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
55650814a2baSmrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
556663847c39Smrg
55670814a2baSmrg  # We can hardcode non-existent directories.
55680814a2baSmrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
55690814a2baSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
55700814a2baSmrg     # have to relink, otherwise we might link with an installed library
55710814a2baSmrg     # when we should be linking with a yet-to-be-installed one
55720814a2baSmrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
55730814a2baSmrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
55740814a2baSmrg    # Linking always hardcodes the temporary library directory.
55750814a2baSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
55760814a2baSmrg  else
55770814a2baSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
55780814a2baSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
55790814a2baSmrg  fi
55800814a2baSmrgelse
55810814a2baSmrg  # We cannot hardcode anything, or else we can only hardcode existing
55820814a2baSmrg  # directories.
55830814a2baSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
55840814a2baSmrgfi
55850814a2baSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
558663847c39Smrg
55870814a2baSmrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
55880814a2baSmrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
55890814a2baSmrg  # Fast installation is not supported
55900814a2baSmrg  enable_fast_install=no
55910814a2baSmrgelif test yes = "$shlibpath_overrides_runpath" ||
55920814a2baSmrg     test no = "$enable_shared"; then
55930814a2baSmrg  # Fast installation is not necessary
55940814a2baSmrg  enable_fast_install=needless
55950814a2baSmrgfi
55960814a2baSmrg_LT_TAGDECL([], [hardcode_action], [0],
55970814a2baSmrg    [How to hardcode a shared library path into an executable])
55980814a2baSmrg])# _LT_LINKER_HARDCODE_LIBPATH
559963847c39Smrg
560063847c39Smrg
56010814a2baSmrg# _LT_CMD_STRIPLIB
56020814a2baSmrg# ----------------
56030814a2baSmrgm4_defun([_LT_CMD_STRIPLIB],
56040814a2baSmrg[m4_require([_LT_DECL_EGREP])
56050814a2baSmrgstriplib=
56060814a2baSmrgold_striplib=
56070814a2baSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
56080814a2baSmrgif test -z "$STRIP"; then
56090814a2baSmrg  AC_MSG_RESULT([no])
56100814a2baSmrgelse
56110814a2baSmrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
56120814a2baSmrg    old_striplib="$STRIP --strip-debug"
56130814a2baSmrg    striplib="$STRIP --strip-unneeded"
56140814a2baSmrg    AC_MSG_RESULT([yes])
56150814a2baSmrg  else
56160814a2baSmrg    case $host_os in
56170814a2baSmrg    darwin*)
56180814a2baSmrg      # FIXME - insert some real tests, host_os isn't really good enough
56190814a2baSmrg      striplib="$STRIP -x"
56200814a2baSmrg      old_striplib="$STRIP -S"
56210814a2baSmrg      AC_MSG_RESULT([yes])
56220814a2baSmrg      ;;
56230814a2baSmrg    freebsd*)
56240814a2baSmrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
56250814a2baSmrg        old_striplib="$STRIP --strip-debug"
56260814a2baSmrg        striplib="$STRIP --strip-unneeded"
56270814a2baSmrg        AC_MSG_RESULT([yes])
56280814a2baSmrg      else
56290814a2baSmrg        AC_MSG_RESULT([no])
56300814a2baSmrg      fi
56310814a2baSmrg      ;;
56320814a2baSmrg    *)
56330814a2baSmrg      AC_MSG_RESULT([no])
56340814a2baSmrg      ;;
56350814a2baSmrg    esac
56360814a2baSmrg  fi
56370814a2baSmrgfi
56380814a2baSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
56390814a2baSmrg_LT_DECL([], [striplib], [1])
56400814a2baSmrg])# _LT_CMD_STRIPLIB
564163847c39Smrg
564263847c39Smrg
56430814a2baSmrg# _LT_PREPARE_MUNGE_PATH_LIST
56440814a2baSmrg# ---------------------------
56450814a2baSmrg# Make sure func_munge_path_list() is defined correctly.
56460814a2baSmrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
56470814a2baSmrg[[# func_munge_path_list VARIABLE PATH
56480814a2baSmrg# -----------------------------------
56490814a2baSmrg# VARIABLE is name of variable containing _space_ separated list of
56500814a2baSmrg# directories to be munged by the contents of PATH, which is string
56510814a2baSmrg# having a format:
56520814a2baSmrg# "DIR[:DIR]:"
56530814a2baSmrg#       string "DIR[ DIR]" will be prepended to VARIABLE
56540814a2baSmrg# ":DIR[:DIR]"
56550814a2baSmrg#       string "DIR[ DIR]" will be appended to VARIABLE
56560814a2baSmrg# "DIRP[:DIRP]::[DIRA:]DIRA"
56570814a2baSmrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
56580814a2baSmrg#       "DIRA[ DIRA]" will be appended to VARIABLE
56590814a2baSmrg# "DIR[:DIR]"
56600814a2baSmrg#       VARIABLE will be replaced by "DIR[ DIR]"
56610814a2baSmrgfunc_munge_path_list ()
56620814a2baSmrg{
56630814a2baSmrg    case x@S|@2 in
56640814a2baSmrg    x)
56650814a2baSmrg        ;;
56660814a2baSmrg    *:)
56670814a2baSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
56680814a2baSmrg        ;;
56690814a2baSmrg    x:*)
56700814a2baSmrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
56710814a2baSmrg        ;;
56720814a2baSmrg    *::*)
56730814a2baSmrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
56740814a2baSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
56750814a2baSmrg        ;;
56760814a2baSmrg    *)
56770814a2baSmrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
56780814a2baSmrg        ;;
56790814a2baSmrg    esac
56800814a2baSmrg}
56810814a2baSmrg]])# _LT_PREPARE_PATH_LIST
568263847c39Smrg
568363847c39Smrg
56840814a2baSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
56850814a2baSmrg# -----------------------------
56860814a2baSmrg# PORTME Fill in your ld.so characteristics
56870814a2baSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
56880814a2baSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
56890814a2baSmrgm4_require([_LT_DECL_EGREP])dnl
56900814a2baSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
56910814a2baSmrgm4_require([_LT_DECL_OBJDUMP])dnl
56920814a2baSmrgm4_require([_LT_DECL_SED])dnl
56930814a2baSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
56940814a2baSmrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
56950814a2baSmrgAC_MSG_CHECKING([dynamic linker characteristics])
56960814a2baSmrgm4_if([$1],
56970814a2baSmrg	[], [
56980814a2baSmrgif test yes = "$GCC"; then
56990814a2baSmrg  case $host_os in
57000814a2baSmrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
57010814a2baSmrg    *) lt_awk_arg='/^libraries:/' ;;
57020814a2baSmrg  esac
57030814a2baSmrg  case $host_os in
57040814a2baSmrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
57050814a2baSmrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
57060814a2baSmrg  esac
57070814a2baSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
57080814a2baSmrg  case $lt_search_path_spec in
57090814a2baSmrg  *\;*)
57100814a2baSmrg    # if the path contains ";" then we assume it to be the separator
57110814a2baSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
57120814a2baSmrg    # assumed that no part of a normal pathname contains ";" but that should
57130814a2baSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
57140814a2baSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
57150814a2baSmrg    ;;
57160814a2baSmrg  *)
57170814a2baSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
57180814a2baSmrg    ;;
57190814a2baSmrg  esac
57200814a2baSmrg  # Ok, now we have the path, separated by spaces, we can step through it
57210814a2baSmrg  # and add multilib dir if necessary...
57220814a2baSmrg  lt_tmp_lt_search_path_spec=
57230814a2baSmrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
57240814a2baSmrg  # ...but if some path component already ends with the multilib dir we assume
57250814a2baSmrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
57260814a2baSmrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
57270814a2baSmrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
57280814a2baSmrg    lt_multi_os_dir=
57290814a2baSmrg    ;;
57300814a2baSmrg  esac
57310814a2baSmrg  for lt_sys_path in $lt_search_path_spec; do
57320814a2baSmrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
57330814a2baSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
57340814a2baSmrg    elif test -n "$lt_multi_os_dir"; then
57350814a2baSmrg      test -d "$lt_sys_path" && \
57360814a2baSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
57370814a2baSmrg    fi
57380814a2baSmrg  done
57390814a2baSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
57400814a2baSmrgBEGIN {RS = " "; FS = "/|\n";} {
57410814a2baSmrg  lt_foo = "";
57420814a2baSmrg  lt_count = 0;
57430814a2baSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
57440814a2baSmrg    if ($lt_i != "" && $lt_i != ".") {
57450814a2baSmrg      if ($lt_i == "..") {
57460814a2baSmrg        lt_count++;
57470814a2baSmrg      } else {
57480814a2baSmrg        if (lt_count == 0) {
57490814a2baSmrg          lt_foo = "/" $lt_i lt_foo;
57500814a2baSmrg        } else {
57510814a2baSmrg          lt_count--;
57520814a2baSmrg        }
57530814a2baSmrg      }
57540814a2baSmrg    }
57550814a2baSmrg  }
57560814a2baSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
57570814a2baSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
57580814a2baSmrg}'`
57590814a2baSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
57600814a2baSmrg  # for these hosts.
57610814a2baSmrg  case $host_os in
57620814a2baSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
57630814a2baSmrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
57640814a2baSmrg  esac
57650814a2baSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
57660814a2baSmrgelse
57670814a2baSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
57680814a2baSmrgfi])
57690814a2baSmrglibrary_names_spec=
57700814a2baSmrglibname_spec='lib$name'
57710814a2baSmrgsoname_spec=
57720814a2baSmrgshrext_cmds=.so
57730814a2baSmrgpostinstall_cmds=
57740814a2baSmrgpostuninstall_cmds=
57750814a2baSmrgfinish_cmds=
57760814a2baSmrgfinish_eval=
57770814a2baSmrgshlibpath_var=
57780814a2baSmrgshlibpath_overrides_runpath=unknown
57790814a2baSmrgversion_type=none
57800814a2baSmrgdynamic_linker="$host_os ld.so"
57810814a2baSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
57820814a2baSmrgneed_lib_prefix=unknown
57830814a2baSmrghardcode_into_libs=no
578463847c39Smrg
57850814a2baSmrg# when you set need_version to no, make sure it does not cause -set_version
57860814a2baSmrg# flags to be left without arguments
57870814a2baSmrgneed_version=unknown
578863847c39Smrg
57890814a2baSmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
57900814a2baSmrg[User-defined run-time library search path.])
579163847c39Smrg
57920814a2baSmrgcase $host_os in
57930814a2baSmrgaix3*)
57940814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
57950814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
57960814a2baSmrg  shlibpath_var=LIBPATH
579763847c39Smrg
57980814a2baSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
57990814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
58000814a2baSmrg  ;;
58010814a2baSmrg
58020814a2baSmrgaix[[4-9]]*)
58030814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
58040814a2baSmrg  need_lib_prefix=no
58050814a2baSmrg  need_version=no
58060814a2baSmrg  hardcode_into_libs=yes
58070814a2baSmrg  if test ia64 = "$host_cpu"; then
58080814a2baSmrg    # AIX 5 supports IA64
58090814a2baSmrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
58100814a2baSmrg    shlibpath_var=LD_LIBRARY_PATH
58110814a2baSmrg  else
58120814a2baSmrg    # With GCC up to 2.95.x, collect2 would create an import file
58130814a2baSmrg    # for dependence libraries.  The import file would start with
58140814a2baSmrg    # the line '#! .'.  This would cause the generated library to
58150814a2baSmrg    # depend on '.', always an invalid library.  This was fixed in
58160814a2baSmrg    # development snapshots of GCC prior to 3.0.
58170814a2baSmrg    case $host_os in
58180814a2baSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
58190814a2baSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
58200814a2baSmrg	   echo ' yes '
58210814a2baSmrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
58220814a2baSmrg	:
58230814a2baSmrg      else
58240814a2baSmrg	can_build_shared=no
58250814a2baSmrg      fi
58260814a2baSmrg      ;;
58270814a2baSmrg    esac
58280814a2baSmrg    # Using Import Files as archive members, it is possible to support
58290814a2baSmrg    # filename-based versioning of shared library archives on AIX. While
58300814a2baSmrg    # this would work for both with and without runtime linking, it will
58310814a2baSmrg    # prevent static linking of such archives. So we do filename-based
58320814a2baSmrg    # shared library versioning with .so extension only, which is used
58330814a2baSmrg    # when both runtime linking and shared linking is enabled.
58340814a2baSmrg    # Unfortunately, runtime linking may impact performance, so we do
58350814a2baSmrg    # not want this to be the default eventually. Also, we use the
58360814a2baSmrg    # versioned .so libs for executables only if there is the -brtl
58370814a2baSmrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
58380814a2baSmrg    # To allow for filename-based versioning support, we need to create
58390814a2baSmrg    # libNAME.so.V as an archive file, containing:
58400814a2baSmrg    # *) an Import File, referring to the versioned filename of the
58410814a2baSmrg    #    archive as well as the shared archive member, telling the
58420814a2baSmrg    #    bitwidth (32 or 64) of that shared object, and providing the
58430814a2baSmrg    #    list of exported symbols of that shared object, eventually
58440814a2baSmrg    #    decorated with the 'weak' keyword
58450814a2baSmrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
58460814a2baSmrg    #    it being seen by the linker.
58470814a2baSmrg    # At run time we better use the real file rather than another symlink,
58480814a2baSmrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
58490814a2baSmrg
58500814a2baSmrg    case $with_aix_soname,$aix_use_runtimelinking in
58510814a2baSmrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
58520814a2baSmrg    # soname into executable. Probably we can add versioning support to
58530814a2baSmrg    # collect2, so additional links can be useful in future.
58540814a2baSmrg    aix,yes) # traditional libtool
58550814a2baSmrg      dynamic_linker='AIX unversionable lib.so'
58560814a2baSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
58570814a2baSmrg      # instead of lib<name>.a to let people know that these are not
58580814a2baSmrg      # typical AIX shared libraries.
58590814a2baSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
58600814a2baSmrg      ;;
58610814a2baSmrg    aix,no) # traditional AIX only
58620814a2baSmrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
58630814a2baSmrg      # We preserve .a as extension for shared libraries through AIX4.2
58640814a2baSmrg      # and later when we are not doing run time linking.
58650814a2baSmrg      library_names_spec='$libname$release.a $libname.a'
58660814a2baSmrg      soname_spec='$libname$release$shared_ext$major'
58670814a2baSmrg      ;;
58680814a2baSmrg    svr4,*) # full svr4 only
58690814a2baSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
58700814a2baSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
58710814a2baSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
58720814a2baSmrg      shlibpath_overrides_runpath=yes
58730814a2baSmrg      ;;
58740814a2baSmrg    *,yes) # both, prefer svr4
58750814a2baSmrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
58760814a2baSmrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
58770814a2baSmrg      # unpreferred sharedlib libNAME.a needs extra handling
58780814a2baSmrg      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"'
58790814a2baSmrg      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"'
58800814a2baSmrg      # We do not specify a path in Import Files, so LIBPATH fires.
58810814a2baSmrg      shlibpath_overrides_runpath=yes
58820814a2baSmrg      ;;
58830814a2baSmrg    *,no) # both, prefer aix
58840814a2baSmrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
58850814a2baSmrg      library_names_spec='$libname$release.a $libname.a'
58860814a2baSmrg      soname_spec='$libname$release$shared_ext$major'
58870814a2baSmrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
58880814a2baSmrg      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)'
58890814a2baSmrg      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"'
58900814a2baSmrg      ;;
58910814a2baSmrg    esac
58920814a2baSmrg    shlibpath_var=LIBPATH
58930814a2baSmrg  fi
58940814a2baSmrg  ;;
589563847c39Smrg
58960814a2baSmrgamigaos*)
58970814a2baSmrg  case $host_cpu in
58980814a2baSmrg  powerpc)
58990814a2baSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
59000814a2baSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
59010814a2baSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
59020814a2baSmrg    ;;
59030814a2baSmrg  m68k)
59040814a2baSmrg    library_names_spec='$libname.ixlibrary $libname.a'
59050814a2baSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
59060814a2baSmrg    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'
59070814a2baSmrg    ;;
59080814a2baSmrg  esac
59090814a2baSmrg  ;;
591063847c39Smrg
59110814a2baSmrgbeos*)
59120814a2baSmrg  library_names_spec='$libname$shared_ext'
59130814a2baSmrg  dynamic_linker="$host_os ld.so"
59140814a2baSmrg  shlibpath_var=LIBRARY_PATH
59150814a2baSmrg  ;;
591663847c39Smrg
59170814a2baSmrgbsdi[[45]]*)
59180814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
59190814a2baSmrg  need_version=no
59200814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
59210814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
59220814a2baSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
59230814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
59240814a2baSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
59250814a2baSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
59260814a2baSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
59270814a2baSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
59280814a2baSmrg  # libtool to hard-code these into programs
59290814a2baSmrg  ;;
593063847c39Smrg
59310814a2baSmrgcygwin* | mingw* | pw32* | cegcc*)
59320814a2baSmrg  version_type=windows
59330814a2baSmrg  shrext_cmds=.dll
59340814a2baSmrg  need_version=no
59350814a2baSmrg  need_lib_prefix=no
593663847c39Smrg
59370814a2baSmrg  case $GCC,$cc_basename in
59380814a2baSmrg  yes,*)
59390814a2baSmrg    # gcc
59400814a2baSmrg    library_names_spec='$libname.dll.a'
59410814a2baSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
59420814a2baSmrg    postinstall_cmds='base_file=`basename \$file`~
59430814a2baSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
59440814a2baSmrg      dldir=$destdir/`dirname \$dlpath`~
59450814a2baSmrg      test -d \$dldir || mkdir -p \$dldir~
59460814a2baSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
59470814a2baSmrg      chmod a+x \$dldir/$dlname~
59480814a2baSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
59490814a2baSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
59500814a2baSmrg      fi'
59510814a2baSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
59520814a2baSmrg      dlpath=$dir/\$dldll~
59530814a2baSmrg       $RM \$dlpath'
59540814a2baSmrg    shlibpath_overrides_runpath=yes
595563847c39Smrg
59560814a2baSmrg    case $host_os in
59570814a2baSmrg    cygwin*)
59580814a2baSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
59590814a2baSmrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59600814a2baSmrgm4_if([$1], [],[
59610814a2baSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
59620814a2baSmrg      ;;
59630814a2baSmrg    mingw* | cegcc*)
59640814a2baSmrg      # MinGW DLLs use traditional 'lib' prefix
59650814a2baSmrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59660814a2baSmrg      ;;
59670814a2baSmrg    pw32*)
59680814a2baSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
59690814a2baSmrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59700814a2baSmrg      ;;
59710814a2baSmrg    esac
59720814a2baSmrg    dynamic_linker='Win32 ld.exe'
59730814a2baSmrg    ;;
597463847c39Smrg
59750814a2baSmrg  *,cl* | *,icl*)
59760814a2baSmrg    # Native MSVC or ICC
59770814a2baSmrg    libname_spec='$name'
59780814a2baSmrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59790814a2baSmrg    library_names_spec='$libname.dll.lib'
59801ae1b5e8Smrg
59810814a2baSmrg    case $build_os in
59820814a2baSmrg    mingw*)
59830814a2baSmrg      sys_lib_search_path_spec=
59840814a2baSmrg      lt_save_ifs=$IFS
59850814a2baSmrg      IFS=';'
59860814a2baSmrg      for lt_path in $LIB
59870814a2baSmrg      do
59880814a2baSmrg        IFS=$lt_save_ifs
59890814a2baSmrg        # Let DOS variable expansion print the short 8.3 style file name.
59900814a2baSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
59910814a2baSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
59920814a2baSmrg      done
59930814a2baSmrg      IFS=$lt_save_ifs
59940814a2baSmrg      # Convert to MSYS style.
59950814a2baSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
59960814a2baSmrg      ;;
59970814a2baSmrg    cygwin*)
59980814a2baSmrg      # Convert to unix form, then to dos form, then back to unix form
59990814a2baSmrg      # but this time dos style (no spaces!) so that the unix form looks
60000814a2baSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
60010814a2baSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
60020814a2baSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
60030814a2baSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
60040814a2baSmrg      ;;
60050814a2baSmrg    *)
60060814a2baSmrg      sys_lib_search_path_spec=$LIB
60070814a2baSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
60080814a2baSmrg        # It is most probably a Windows format PATH.
60090814a2baSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
60100814a2baSmrg      else
60110814a2baSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
60120814a2baSmrg      fi
60130814a2baSmrg      # FIXME: find the short name or the path components, as spaces are
60140814a2baSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
60150814a2baSmrg      ;;
60160814a2baSmrg    esac
601763847c39Smrg
60180814a2baSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
60190814a2baSmrg    postinstall_cmds='base_file=`basename \$file`~
60200814a2baSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
60210814a2baSmrg      dldir=$destdir/`dirname \$dlpath`~
60220814a2baSmrg      test -d \$dldir || mkdir -p \$dldir~
60230814a2baSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
60240814a2baSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
60250814a2baSmrg      dlpath=$dir/\$dldll~
60260814a2baSmrg       $RM \$dlpath'
60270814a2baSmrg    shlibpath_overrides_runpath=yes
60280814a2baSmrg    dynamic_linker='Win32 link.exe'
60290814a2baSmrg    ;;
60301ae1b5e8Smrg
60310814a2baSmrg  *)
60320814a2baSmrg    # Assume MSVC and ICC wrapper
60330814a2baSmrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
60340814a2baSmrg    dynamic_linker='Win32 ld.exe'
60350814a2baSmrg    ;;
60360814a2baSmrg  esac
60370814a2baSmrg  # FIXME: first we should search . and the directory the executable is in
60380814a2baSmrg  shlibpath_var=PATH
60390814a2baSmrg  ;;
60401ae1b5e8Smrg
60410814a2baSmrgdarwin* | rhapsody*)
60420814a2baSmrg  dynamic_linker="$host_os dyld"
60430814a2baSmrg  version_type=darwin
60440814a2baSmrg  need_lib_prefix=no
60450814a2baSmrg  need_version=no
60460814a2baSmrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
60470814a2baSmrg  soname_spec='$libname$release$major$shared_ext'
60480814a2baSmrg  shlibpath_overrides_runpath=yes
60490814a2baSmrg  shlibpath_var=DYLD_LIBRARY_PATH
60500814a2baSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
60510814a2baSmrgm4_if([$1], [],[
60520814a2baSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
60530814a2baSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
60540814a2baSmrg  ;;
60551ae1b5e8Smrg
60560814a2baSmrgdgux*)
60570814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
60580814a2baSmrg  need_lib_prefix=no
60590814a2baSmrg  need_version=no
60600814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
60610814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
60620814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
60630814a2baSmrg  ;;
60640814a2baSmrg
60650814a2baSmrgfreebsd* | dragonfly* | midnightbsd*)
60660814a2baSmrg  # DragonFly does not have aout.  When/if they implement a new
60670814a2baSmrg  # versioning mechanism, adjust this.
60680814a2baSmrg  if test -x /usr/bin/objformat; then
60690814a2baSmrg    objformat=`/usr/bin/objformat`
60700814a2baSmrg  else
60710814a2baSmrg    case $host_os in
60720814a2baSmrg    freebsd[[23]].*) objformat=aout ;;
60730814a2baSmrg    *) objformat=elf ;;
60740814a2baSmrg    esac
60750814a2baSmrg  fi
60760814a2baSmrg  version_type=freebsd-$objformat
60770814a2baSmrg  case $version_type in
60780814a2baSmrg    freebsd-elf*)
60790814a2baSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
60800814a2baSmrg      soname_spec='$libname$release$shared_ext$major'
60810814a2baSmrg      need_version=no
60820814a2baSmrg      need_lib_prefix=no
60830814a2baSmrg      ;;
60840814a2baSmrg    freebsd-*)
60850814a2baSmrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
60860814a2baSmrg      need_version=yes
60870814a2baSmrg      ;;
60880814a2baSmrg  esac
60890814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
60900814a2baSmrg  case $host_os in
60910814a2baSmrg  freebsd2.*)
60920814a2baSmrg    shlibpath_overrides_runpath=yes
60930814a2baSmrg    ;;
60940814a2baSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
60950814a2baSmrg    shlibpath_overrides_runpath=yes
60960814a2baSmrg    hardcode_into_libs=yes
60970814a2baSmrg    ;;
60980814a2baSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
60990814a2baSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
61000814a2baSmrg    shlibpath_overrides_runpath=no
61010814a2baSmrg    hardcode_into_libs=yes
61020814a2baSmrg    ;;
61030814a2baSmrg  *) # from 4.6 on, and DragonFly
61040814a2baSmrg    shlibpath_overrides_runpath=yes
61050814a2baSmrg    hardcode_into_libs=yes
61060814a2baSmrg    ;;
61070814a2baSmrg  esac
61080814a2baSmrg  ;;
610963847c39Smrg
61100814a2baSmrghaiku*)
61110814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
61120814a2baSmrg  need_lib_prefix=no
61130814a2baSmrg  need_version=no
61140814a2baSmrg  dynamic_linker="$host_os runtime_loader"
61150814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61160814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
61170814a2baSmrg  shlibpath_var=LIBRARY_PATH
61180814a2baSmrg  shlibpath_overrides_runpath=no
61190814a2baSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
61200814a2baSmrg  hardcode_into_libs=yes
61210814a2baSmrg  ;;
612263847c39Smrg
61230814a2baSmrghpux9* | hpux10* | hpux11*)
61240814a2baSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
61250814a2baSmrg  # link against other versions.
61260814a2baSmrg  version_type=sunos
61270814a2baSmrg  need_lib_prefix=no
61280814a2baSmrg  need_version=no
61290814a2baSmrg  case $host_cpu in
61300814a2baSmrg  ia64*)
61310814a2baSmrg    shrext_cmds='.so'
61320814a2baSmrg    hardcode_into_libs=yes
61330814a2baSmrg    dynamic_linker="$host_os dld.so"
61340814a2baSmrg    shlibpath_var=LD_LIBRARY_PATH
61350814a2baSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
61360814a2baSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61370814a2baSmrg    soname_spec='$libname$release$shared_ext$major'
61380814a2baSmrg    if test 32 = "$HPUX_IA64_MODE"; then
61390814a2baSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
61400814a2baSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
61410814a2baSmrg    else
61420814a2baSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
61430814a2baSmrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
61440814a2baSmrg    fi
61450814a2baSmrg    ;;
61460814a2baSmrg  hppa*64*)
61470814a2baSmrg    shrext_cmds='.sl'
61480814a2baSmrg    hardcode_into_libs=yes
61490814a2baSmrg    dynamic_linker="$host_os dld.sl"
61500814a2baSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
61510814a2baSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
61520814a2baSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61530814a2baSmrg    soname_spec='$libname$release$shared_ext$major'
61540814a2baSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
61550814a2baSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
61560814a2baSmrg    ;;
61570814a2baSmrg  *)
61580814a2baSmrg    shrext_cmds='.sl'
61590814a2baSmrg    dynamic_linker="$host_os dld.sl"
61600814a2baSmrg    shlibpath_var=SHLIB_PATH
61610814a2baSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
61620814a2baSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61630814a2baSmrg    soname_spec='$libname$release$shared_ext$major'
61640814a2baSmrg    ;;
61650814a2baSmrg  esac
61660814a2baSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
61670814a2baSmrg  postinstall_cmds='chmod 555 $lib'
61680814a2baSmrg  # or fails outright, so override atomically:
61690814a2baSmrg  install_override_mode=555
61700814a2baSmrg  ;;
617163847c39Smrg
61720814a2baSmrginterix[[3-9]]*)
61730814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
61740814a2baSmrg  need_lib_prefix=no
61750814a2baSmrg  need_version=no
61760814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61770814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
61780814a2baSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
61790814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
61800814a2baSmrg  shlibpath_overrides_runpath=no
61810814a2baSmrg  hardcode_into_libs=yes
61820814a2baSmrg  ;;
61831ae1b5e8Smrg
61840814a2baSmrgirix5* | irix6* | nonstopux*)
61850814a2baSmrg  case $host_os in
61860814a2baSmrg    nonstopux*) version_type=nonstopux ;;
61870814a2baSmrg    *)
61880814a2baSmrg	if test yes = "$lt_cv_prog_gnu_ld"; then
61890814a2baSmrg		version_type=linux # correct to gnu/linux during the next big refactor
61900814a2baSmrg	else
61910814a2baSmrg		version_type=irix
61920814a2baSmrg	fi ;;
61930814a2baSmrg  esac
61940814a2baSmrg  need_lib_prefix=no
61950814a2baSmrg  need_version=no
61960814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
61970814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
61980814a2baSmrg  case $host_os in
61990814a2baSmrg  irix5* | nonstopux*)
62000814a2baSmrg    libsuff= shlibsuff=
62010814a2baSmrg    ;;
62020814a2baSmrg  *)
62030814a2baSmrg    case $LD in # libtool.m4 will add one of these switches to LD
62040814a2baSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
62050814a2baSmrg      libsuff= shlibsuff= libmagic=32-bit;;
62060814a2baSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
62070814a2baSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
62080814a2baSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
62090814a2baSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
62100814a2baSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
62110814a2baSmrg    esac
62120814a2baSmrg    ;;
62130814a2baSmrg  esac
62140814a2baSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
62150814a2baSmrg  shlibpath_overrides_runpath=no
62160814a2baSmrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
62170814a2baSmrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
62180814a2baSmrg  hardcode_into_libs=yes
62190814a2baSmrg  ;;
62201ae1b5e8Smrg
62210814a2baSmrg# No shared lib support for Linux oldld, aout, or coff.
62220814a2baSmrglinux*oldld* | linux*aout* | linux*coff*)
62230814a2baSmrg  dynamic_linker=no
62240814a2baSmrg  ;;
62251ae1b5e8Smrg
62260814a2baSmrglinux*android*)
62270814a2baSmrg  version_type=none # Android doesn't support versioned libraries.
62280814a2baSmrg  need_lib_prefix=no
62290814a2baSmrg  need_version=no
62300814a2baSmrg  library_names_spec='$libname$release$shared_ext'
62310814a2baSmrg  soname_spec='$libname$release$shared_ext'
62320814a2baSmrg  finish_cmds=
62330814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
62340814a2baSmrg  shlibpath_overrides_runpath=yes
62351ae1b5e8Smrg
62360814a2baSmrg  # This implies no fast_install, which is unacceptable.
62370814a2baSmrg  # Some rework will be needed to allow for fast_install
62380814a2baSmrg  # before this can be enabled.
62390814a2baSmrg  hardcode_into_libs=yes
62401ae1b5e8Smrg
62410814a2baSmrg  dynamic_linker='Android linker'
62420814a2baSmrg  # Don't embed -rpath directories since the linker doesn't support them.
62430814a2baSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
62440814a2baSmrg  ;;
62451ae1b5e8Smrg
62460814a2baSmrg# This must be glibc/ELF.
62470814a2baSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
62480814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
62490814a2baSmrg  need_lib_prefix=no
62500814a2baSmrg  need_version=no
62510814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
62520814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
62530814a2baSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
62540814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
62550814a2baSmrg  shlibpath_overrides_runpath=no
62561ae1b5e8Smrg
62570814a2baSmrg  # Some binutils ld are patched to set DT_RUNPATH
62580814a2baSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
62590814a2baSmrg    [lt_cv_shlibpath_overrides_runpath=no
62600814a2baSmrg    save_LDFLAGS=$LDFLAGS
62610814a2baSmrg    save_libdir=$libdir
62620814a2baSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
62630814a2baSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
62640814a2baSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
62650814a2baSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
62660814a2baSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
62670814a2baSmrg    LDFLAGS=$save_LDFLAGS
62680814a2baSmrg    libdir=$save_libdir
62690814a2baSmrg    ])
62700814a2baSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
627176888252Smrg
62720814a2baSmrg  # This implies no fast_install, which is unacceptable.
62730814a2baSmrg  # Some rework will be needed to allow for fast_install
62740814a2baSmrg  # before this can be enabled.
62750814a2baSmrg  hardcode_into_libs=yes
627663847c39Smrg
62770814a2baSmrg  # Ideally, we could use ldconfig to report *all* directores which are
62780814a2baSmrg  # searched for libraries, however this is still not possible.  Aside from not
62790814a2baSmrg  # being certain /sbin/ldconfig is available, command
62800814a2baSmrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
62810814a2baSmrg  # even though it is searched at run-time.  Try to do the best guess by
62820814a2baSmrg  # appending ld.so.conf contents (and includes) to the search path.
62830814a2baSmrg  if test -f /etc/ld.so.conf; then
62840814a2baSmrg    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' ' '`
62850814a2baSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
62860814a2baSmrg  fi
628763847c39Smrg
62880814a2baSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
62890814a2baSmrg  # powerpc, because MkLinux only supported shared libraries with the
62900814a2baSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
62910814a2baSmrg  # most powerpc-linux boxes support dynamic linking these days and
62920814a2baSmrg  # people can always --disable-shared, the test was removed, and we
62930814a2baSmrg  # assume the GNU/Linux dynamic linker is in use.
62940814a2baSmrg  dynamic_linker='GNU/Linux ld.so'
62950814a2baSmrg  ;;
629663847c39Smrg
62970814a2baSmrgnetbsd*)
62980814a2baSmrg  version_type=sunos
62990814a2baSmrg  need_lib_prefix=no
63000814a2baSmrg  need_version=no
63010814a2baSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
63020814a2baSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
63030814a2baSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
63040814a2baSmrg    dynamic_linker='NetBSD (a.out) ld.so'
63050814a2baSmrg  else
63060814a2baSmrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63070814a2baSmrg    soname_spec='$libname$release$shared_ext$major'
63080814a2baSmrg    dynamic_linker='NetBSD ld.elf_so'
63090814a2baSmrg  fi
63100814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
63110814a2baSmrg  shlibpath_overrides_runpath=yes
63120814a2baSmrg  hardcode_into_libs=yes
63130814a2baSmrg  ;;
631463847c39Smrg
63150814a2baSmrgnewsos6)
63160814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
63170814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63180814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
63190814a2baSmrg  shlibpath_overrides_runpath=yes
63200814a2baSmrg  ;;
632176888252Smrg
63220814a2baSmrg*nto* | *qnx*)
63230814a2baSmrg  version_type=qnx
63240814a2baSmrg  need_lib_prefix=no
63250814a2baSmrg  need_version=no
63260814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63270814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
63280814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
63290814a2baSmrg  shlibpath_overrides_runpath=no
63300814a2baSmrg  hardcode_into_libs=yes
63310814a2baSmrg  dynamic_linker='ldqnx.so'
63320814a2baSmrg  ;;
633363847c39Smrg
63340814a2baSmrgopenbsd* | bitrig*)
63350814a2baSmrg  version_type=sunos
63360814a2baSmrg  sys_lib_dlsearch_path_spec=/usr/lib
63370814a2baSmrg  need_lib_prefix=no
63380814a2baSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
63390814a2baSmrg    need_version=no
63400814a2baSmrg  else
63410814a2baSmrg    need_version=yes
63420814a2baSmrg  fi
63430814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
63440814a2baSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
63450814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
63460814a2baSmrg  shlibpath_overrides_runpath=yes
63470814a2baSmrg  ;;
634863847c39Smrg
63490814a2baSmrgos2*)
63500814a2baSmrg  libname_spec='$name'
63510814a2baSmrg  version_type=windows
63520814a2baSmrg  shrext_cmds=.dll
63530814a2baSmrg  need_version=no
63540814a2baSmrg  need_lib_prefix=no
63550814a2baSmrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
63560814a2baSmrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
63570814a2baSmrg    v=$($ECHO $release$versuffix | tr -d .-);
63580814a2baSmrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
63590814a2baSmrg    $ECHO $n$v`$shared_ext'
63600814a2baSmrg  library_names_spec='${libname}_dll.$libext'
63610814a2baSmrg  dynamic_linker='OS/2 ld.exe'
63620814a2baSmrg  shlibpath_var=BEGINLIBPATH
63630814a2baSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
63640814a2baSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
63650814a2baSmrg  postinstall_cmds='base_file=`basename \$file`~
63660814a2baSmrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
63670814a2baSmrg    dldir=$destdir/`dirname \$dlpath`~
63680814a2baSmrg    test -d \$dldir || mkdir -p \$dldir~
63690814a2baSmrg    $install_prog $dir/$dlname \$dldir/$dlname~
63700814a2baSmrg    chmod a+x \$dldir/$dlname~
63710814a2baSmrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
63720814a2baSmrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
63730814a2baSmrg    fi'
63740814a2baSmrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
63750814a2baSmrg    dlpath=$dir/\$dldll~
63760814a2baSmrg    $RM \$dlpath'
63770814a2baSmrg  ;;
637863847c39Smrg
63790814a2baSmrgosf3* | osf4* | osf5*)
63800814a2baSmrg  version_type=osf
63810814a2baSmrg  need_lib_prefix=no
63820814a2baSmrg  need_version=no
63830814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
63840814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63850814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
63860814a2baSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
63870814a2baSmrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
63880814a2baSmrg  ;;
638963847c39Smrg
63900814a2baSmrgrdos*)
63910814a2baSmrg  dynamic_linker=no
63920814a2baSmrg  ;;
639376888252Smrg
63940814a2baSmrgsolaris*)
63950814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
63960814a2baSmrg  need_lib_prefix=no
63970814a2baSmrg  need_version=no
63980814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63990814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
64000814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
64010814a2baSmrg  shlibpath_overrides_runpath=yes
64020814a2baSmrg  hardcode_into_libs=yes
64030814a2baSmrg  # ldd complains unless libraries are executable
64040814a2baSmrg  postinstall_cmds='chmod +x $lib'
64050814a2baSmrg  ;;
640676888252Smrg
64070814a2baSmrgsunos4*)
64080814a2baSmrg  version_type=sunos
64090814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
64100814a2baSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
64110814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
64120814a2baSmrg  shlibpath_overrides_runpath=yes
64130814a2baSmrg  if test yes = "$with_gnu_ld"; then
64140814a2baSmrg    need_lib_prefix=no
64150814a2baSmrg  fi
64160814a2baSmrg  need_version=yes
64170814a2baSmrg  ;;
641876888252Smrg
64190814a2baSmrgsysv4 | sysv4.3*)
64200814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
64210814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64220814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
64230814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
64240814a2baSmrg  case $host_vendor in
64250814a2baSmrg    sni)
64260814a2baSmrg      shlibpath_overrides_runpath=no
64270814a2baSmrg      need_lib_prefix=no
64280814a2baSmrg      runpath_var=LD_RUN_PATH
64290814a2baSmrg      ;;
64300814a2baSmrg    siemens)
64310814a2baSmrg      need_lib_prefix=no
64320814a2baSmrg      ;;
64330814a2baSmrg    motorola)
64340814a2baSmrg      need_lib_prefix=no
64350814a2baSmrg      need_version=no
64360814a2baSmrg      shlibpath_overrides_runpath=no
64370814a2baSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
64380814a2baSmrg      ;;
64390814a2baSmrg  esac
64400814a2baSmrg  ;;
64411ae1b5e8Smrg
64420814a2baSmrgsysv4*MP*)
64430814a2baSmrg  if test -d /usr/nec; then
64440814a2baSmrg    version_type=linux # correct to gnu/linux during the next big refactor
64450814a2baSmrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
64460814a2baSmrg    soname_spec='$libname$shared_ext.$major'
64470814a2baSmrg    shlibpath_var=LD_LIBRARY_PATH
64480814a2baSmrg  fi
64490814a2baSmrg  ;;
64501ae1b5e8Smrg
64510814a2baSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
64520814a2baSmrg  version_type=sco
64530814a2baSmrg  need_lib_prefix=no
64540814a2baSmrg  need_version=no
64550814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
64560814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
64570814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
64580814a2baSmrg  shlibpath_overrides_runpath=yes
64590814a2baSmrg  hardcode_into_libs=yes
64600814a2baSmrg  if test yes = "$with_gnu_ld"; then
64610814a2baSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
64620814a2baSmrg  else
64630814a2baSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
64640814a2baSmrg    case $host_os in
64650814a2baSmrg      sco3.2v5*)
64660814a2baSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
64670814a2baSmrg	;;
64680814a2baSmrg    esac
64690814a2baSmrg  fi
64700814a2baSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
64710814a2baSmrg  ;;
64721ae1b5e8Smrg
64730814a2baSmrgtpf*)
64740814a2baSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
64750814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
64760814a2baSmrg  need_lib_prefix=no
64770814a2baSmrg  need_version=no
64780814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64790814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
64800814a2baSmrg  shlibpath_overrides_runpath=no
64810814a2baSmrg  hardcode_into_libs=yes
64820814a2baSmrg  ;;
64831ae1b5e8Smrg
64840814a2baSmrguts4*)
64850814a2baSmrg  version_type=linux # correct to gnu/linux during the next big refactor
64860814a2baSmrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64870814a2baSmrg  soname_spec='$libname$release$shared_ext$major'
64880814a2baSmrg  shlibpath_var=LD_LIBRARY_PATH
64890814a2baSmrg  ;;
64901ae1b5e8Smrg
64910814a2baSmrg*)
64920814a2baSmrg  dynamic_linker=no
64930814a2baSmrg  ;;
64940814a2baSmrgesac
64950814a2baSmrgAC_MSG_RESULT([$dynamic_linker])
64960814a2baSmrgtest no = "$dynamic_linker" && can_build_shared=no
64971ae1b5e8Smrg
64980814a2baSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
64990814a2baSmrgif test yes = "$GCC"; then
65000814a2baSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
65010814a2baSmrgfi
65021ae1b5e8Smrg
65030814a2baSmrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
65040814a2baSmrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
65050814a2baSmrgfi
65061ae1b5e8Smrg
65070814a2baSmrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
65080814a2baSmrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
650963847c39Smrgfi
65101ae1b5e8Smrg
65110814a2baSmrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
65120814a2baSmrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
651363847c39Smrg
65140814a2baSmrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
65150814a2baSmrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
65161ae1b5e8Smrg
65170814a2baSmrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
65180814a2baSmrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
651963847c39Smrg
65200814a2baSmrg_LT_DECL([], [variables_saved_for_relink], [1],
65210814a2baSmrg    [Variables whose values should be saved in libtool wrapper scripts and
65220814a2baSmrg    restored at link time])
65230814a2baSmrg_LT_DECL([], [need_lib_prefix], [0],
65240814a2baSmrg    [Do we need the "lib" prefix for modules?])
65250814a2baSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
65260814a2baSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
65270814a2baSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
65280814a2baSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
65290814a2baSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
65300814a2baSmrg    [Is shlibpath searched before the hard-coded library search path?])
65310814a2baSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
65320814a2baSmrg_LT_DECL([], [library_names_spec], [1],
65330814a2baSmrg    [[List of archive names.  First name is the real one, the rest are links.
65340814a2baSmrg    The last name is the one that the linker finds with -lNAME]])
65350814a2baSmrg_LT_DECL([], [soname_spec], [1],
65360814a2baSmrg    [[The coded name of the library, if different from the real name]])
65370814a2baSmrg_LT_DECL([], [install_override_mode], [1],
65380814a2baSmrg    [Permission mode override for installation of shared libraries])
65390814a2baSmrg_LT_DECL([], [postinstall_cmds], [2],
65400814a2baSmrg    [Command to use after installation of a shared archive])
65410814a2baSmrg_LT_DECL([], [postuninstall_cmds], [2],
65420814a2baSmrg    [Command to use after uninstallation of a shared archive])
65430814a2baSmrg_LT_DECL([], [finish_cmds], [2],
65440814a2baSmrg    [Commands used to finish a libtool library installation in a directory])
65450814a2baSmrg_LT_DECL([], [finish_eval], [1],
65460814a2baSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
65470814a2baSmrg    not shown]])
65480814a2baSmrg_LT_DECL([], [hardcode_into_libs], [0],
65490814a2baSmrg    [Whether we should hardcode library paths into libraries])
65500814a2baSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
65510814a2baSmrg    [Compile-time system search path for libraries])
65520814a2baSmrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
65530814a2baSmrg    [Detected run-time system search path for libraries])
65540814a2baSmrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
65550814a2baSmrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
65560814a2baSmrg])# _LT_SYS_DYNAMIC_LINKER
65571ae1b5e8Smrg
65580814a2baSmrg
65590814a2baSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
65600814a2baSmrg# --------------------------
65610814a2baSmrg# find a file program that can recognize shared library
65620814a2baSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
65630814a2baSmrg[m4_require([_LT_DECL_EGREP])dnl
65640814a2baSmrgAC_MSG_CHECKING([for $1])
65650814a2baSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
65660814a2baSmrg[case $MAGIC_CMD in
65670814a2baSmrg[[\\/*] |  ?:[\\/]*])
65680814a2baSmrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
656963847c39Smrg  ;;
65700814a2baSmrg*)
65710814a2baSmrg  lt_save_MAGIC_CMD=$MAGIC_CMD
65720814a2baSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
65730814a2baSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
65740814a2baSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
65750814a2baSmrgdnl not every word.  This closes a longstanding sh security hole.
65760814a2baSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
65770814a2baSmrg  for ac_dir in $ac_dummy; do
65780814a2baSmrg    IFS=$lt_save_ifs
65790814a2baSmrg    test -z "$ac_dir" && ac_dir=.
65800814a2baSmrg    if test -f "$ac_dir/$1"; then
65810814a2baSmrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
65820814a2baSmrg      if test -n "$file_magic_test_file"; then
65830814a2baSmrg	case $deplibs_check_method in
65840814a2baSmrg	"file_magic "*)
65850814a2baSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
65860814a2baSmrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
65870814a2baSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
65880814a2baSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
65890814a2baSmrg	    :
65900814a2baSmrg	  else
65910814a2baSmrg	    cat <<_LT_EOF 1>&2
659263847c39Smrg
65930814a2baSmrg*** Warning: the command libtool uses to detect shared libraries,
65940814a2baSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
65950814a2baSmrg*** The result is that libtool may fail to recognize shared libraries
65960814a2baSmrg*** as such.  This will affect the creation of libtool libraries that
65970814a2baSmrg*** depend on shared libraries, but programs linked with such libtool
65980814a2baSmrg*** libraries will work regardless of this problem.  Nevertheless, you
65990814a2baSmrg*** may want to report the problem to your system manager and/or to
66000814a2baSmrg*** bug-libtool@gnu.org
660176888252Smrg
66020814a2baSmrg_LT_EOF
66030814a2baSmrg	  fi ;;
66040814a2baSmrg	esac
66050814a2baSmrg      fi
66060814a2baSmrg      break
660763847c39Smrg    fi
66080814a2baSmrg  done
66090814a2baSmrg  IFS=$lt_save_ifs
66100814a2baSmrg  MAGIC_CMD=$lt_save_MAGIC_CMD
661163847c39Smrg  ;;
66120814a2baSmrgesac])
66130814a2baSmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
66140814a2baSmrgif test -n "$MAGIC_CMD"; then
66150814a2baSmrg  AC_MSG_RESULT($MAGIC_CMD)
66160814a2baSmrgelse
66170814a2baSmrg  AC_MSG_RESULT(no)
66180814a2baSmrgfi
66190814a2baSmrg_LT_DECL([], [MAGIC_CMD], [0],
66200814a2baSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
66210814a2baSmrg])# _LT_PATH_TOOL_PREFIX
662276888252Smrg
66230814a2baSmrg# Old name:
66240814a2baSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
66250814a2baSmrgdnl aclocal-1.4 backwards compatibility:
66260814a2baSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
66270814a2baSmrg
66280814a2baSmrg
66290814a2baSmrg# _LT_PATH_MAGIC
66300814a2baSmrg# --------------
66310814a2baSmrg# find a file program that can recognize a shared library
66320814a2baSmrgm4_defun([_LT_PATH_MAGIC],
66330814a2baSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
66340814a2baSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
66350814a2baSmrg  if test -n "$ac_tool_prefix"; then
66360814a2baSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
66370814a2baSmrg  else
66380814a2baSmrg    MAGIC_CMD=:
66390814a2baSmrg  fi
664063847c39Smrgfi
66410814a2baSmrg])# _LT_PATH_MAGIC
664263847c39Smrg
664363847c39Smrg
66440814a2baSmrg# LT_PATH_LD
66450814a2baSmrg# ----------
66460814a2baSmrg# find the pathname to the GNU or non-GNU linker
66470814a2baSmrgAC_DEFUN([LT_PATH_LD],
66480814a2baSmrg[AC_REQUIRE([AC_PROG_CC])dnl
66490814a2baSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
66500814a2baSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
66510814a2baSmrgm4_require([_LT_DECL_SED])dnl
66520814a2baSmrgm4_require([_LT_DECL_EGREP])dnl
66530814a2baSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
66540814a2baSmrg
66550814a2baSmrgAC_ARG_WITH([gnu-ld],
66560814a2baSmrg    [AS_HELP_STRING([--with-gnu-ld],
66570814a2baSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
66580814a2baSmrg    [test no = "$withval" || with_gnu_ld=yes],
66590814a2baSmrg    [with_gnu_ld=no])dnl
66600814a2baSmrg
66610814a2baSmrgac_prog=ld
66620814a2baSmrgif test yes = "$GCC"; then
66630814a2baSmrg  # Check if gcc -print-prog-name=ld gives a path.
66640814a2baSmrg  AC_MSG_CHECKING([for ld used by $CC])
66650814a2baSmrg  case $host in
66660814a2baSmrg  *-*-mingw*)
66670814a2baSmrg    # gcc leaves a trailing carriage return, which upsets mingw
66680814a2baSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
66690814a2baSmrg  *)
66700814a2baSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
66710814a2baSmrg  esac
66720814a2baSmrg  case $ac_prog in
66730814a2baSmrg    # Accept absolute paths.
66740814a2baSmrg    [[\\/]]* | ?:[[\\/]]*)
66750814a2baSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
66760814a2baSmrg      # Canonicalize the pathname of ld
66770814a2baSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
66780814a2baSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
66790814a2baSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
66800814a2baSmrg      done
66810814a2baSmrg      test -z "$LD" && LD=$ac_prog
66820814a2baSmrg      ;;
66830814a2baSmrg  "")
66840814a2baSmrg    # If it fails, then pretend we aren't using GCC.
66850814a2baSmrg    ac_prog=ld
66860814a2baSmrg    ;;
66870814a2baSmrg  *)
66880814a2baSmrg    # If it is relative, then search for the first ld in PATH.
66890814a2baSmrg    with_gnu_ld=unknown
66900814a2baSmrg    ;;
66910814a2baSmrg  esac
66920814a2baSmrgelif test yes = "$with_gnu_ld"; then
66930814a2baSmrg  AC_MSG_CHECKING([for GNU ld])
66940814a2baSmrgelse
66950814a2baSmrg  AC_MSG_CHECKING([for non-GNU ld])
66960814a2baSmrgfi
66970814a2baSmrgAC_CACHE_VAL(lt_cv_path_LD,
66980814a2baSmrg[if test -z "$LD"; then
66990814a2baSmrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
67000814a2baSmrg  for ac_dir in $PATH; do
67010814a2baSmrg    IFS=$lt_save_ifs
67020814a2baSmrg    test -z "$ac_dir" && ac_dir=.
67030814a2baSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
67040814a2baSmrg      lt_cv_path_LD=$ac_dir/$ac_prog
67050814a2baSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
67060814a2baSmrg      # but apparently some variants of GNU ld only accept -v.
67070814a2baSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
67080814a2baSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
67090814a2baSmrg      *GNU* | *'with BFD'*)
67100814a2baSmrg	test no != "$with_gnu_ld" && break
67110814a2baSmrg	;;
67120814a2baSmrg      *)
67130814a2baSmrg	test yes != "$with_gnu_ld" && break
67140814a2baSmrg	;;
67150814a2baSmrg      esac
67160814a2baSmrg    fi
67170814a2baSmrg  done
67180814a2baSmrg  IFS=$lt_save_ifs
67190814a2baSmrgelse
67200814a2baSmrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
67210814a2baSmrgfi])
67220814a2baSmrgLD=$lt_cv_path_LD
67230814a2baSmrgif test -n "$LD"; then
67240814a2baSmrg  AC_MSG_RESULT($LD)
67250814a2baSmrgelse
67260814a2baSmrg  AC_MSG_RESULT(no)
672763847c39Smrgfi
67280814a2baSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
67290814a2baSmrg_LT_PATH_LD_GNU
67300814a2baSmrgAC_SUBST([LD])
673176888252Smrg
67320814a2baSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
67330814a2baSmrg])# LT_PATH_LD
673476888252Smrg
67350814a2baSmrg# Old names:
67360814a2baSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
67370814a2baSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
67380814a2baSmrgdnl aclocal-1.4 backwards compatibility:
67390814a2baSmrgdnl AC_DEFUN([AM_PROG_LD], [])
67400814a2baSmrgdnl AC_DEFUN([AC_PROG_LD], [])
674176888252Smrg
674263847c39Smrg
67430814a2baSmrg# _LT_PATH_LD_GNU
67440814a2baSmrg#- --------------
67450814a2baSmrgm4_defun([_LT_PATH_LD_GNU],
67460814a2baSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
67470814a2baSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
67480814a2baSmrgcase `$LD -v 2>&1 </dev/null` in
67490814a2baSmrg*GNU* | *'with BFD'*)
67500814a2baSmrg  lt_cv_prog_gnu_ld=yes
67510814a2baSmrg  ;;
67520814a2baSmrg*)
67530814a2baSmrg  lt_cv_prog_gnu_ld=no
67540814a2baSmrg  ;;
67550814a2baSmrgesac])
67560814a2baSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
67570814a2baSmrg])# _LT_PATH_LD_GNU
675863847c39Smrg
675976888252Smrg
67600814a2baSmrg# _LT_CMD_RELOAD
67610814a2baSmrg# --------------
67620814a2baSmrg# find reload flag for linker
67630814a2baSmrg#   -- PORTME Some linkers may need a different reload flag.
67640814a2baSmrgm4_defun([_LT_CMD_RELOAD],
67650814a2baSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
67660814a2baSmrg  lt_cv_ld_reload_flag,
67670814a2baSmrg  [lt_cv_ld_reload_flag='-r'])
67680814a2baSmrgreload_flag=$lt_cv_ld_reload_flag
67690814a2baSmrgcase $reload_flag in
67700814a2baSmrg"" | " "*) ;;
67710814a2baSmrg*) reload_flag=" $reload_flag" ;;
67720814a2baSmrgesac
67730814a2baSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
67740814a2baSmrgcase $host_os in
67750814a2baSmrg  cygwin* | mingw* | pw32* | cegcc*)
67760814a2baSmrg    if test yes != "$GCC"; then
67770814a2baSmrg      reload_cmds=false
67780814a2baSmrg    fi
67790814a2baSmrg    ;;
67800814a2baSmrg  darwin*)
67810814a2baSmrg    if test yes = "$GCC"; then
67820814a2baSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
67830814a2baSmrg    else
67840814a2baSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
67850814a2baSmrg    fi
67860814a2baSmrg    ;;
67870814a2baSmrgesac
67880814a2baSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
67890814a2baSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
67900814a2baSmrg])# _LT_CMD_RELOAD
679176888252Smrg
679263847c39Smrg
67930814a2baSmrg# _LT_PATH_DD
67940814a2baSmrg# -----------
67950814a2baSmrg# find a working dd
67960814a2baSmrgm4_defun([_LT_PATH_DD],
67970814a2baSmrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
67980814a2baSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
67990814a2baSmrgcat conftest.i conftest.i >conftest2.i
68000814a2baSmrg: ${lt_DD:=$DD}
68010814a2baSmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
68020814a2baSmrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
68030814a2baSmrg  cmp -s conftest.i conftest.out \
68040814a2baSmrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
68050814a2baSmrgfi])
68060814a2baSmrgrm -f conftest.i conftest2.i conftest.out])
68070814a2baSmrg])# _LT_PATH_DD
680863847c39Smrg
680963847c39Smrg
68100814a2baSmrg# _LT_CMD_TRUNCATE
68110814a2baSmrg# ----------------
68120814a2baSmrg# find command to truncate a binary pipe
68130814a2baSmrgm4_defun([_LT_CMD_TRUNCATE],
68140814a2baSmrg[m4_require([_LT_PATH_DD])
68150814a2baSmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
68160814a2baSmrg[printf 0123456789abcdef0123456789abcdef >conftest.i
68170814a2baSmrgcat conftest.i conftest.i >conftest2.i
68180814a2baSmrglt_cv_truncate_bin=
68190814a2baSmrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
68200814a2baSmrg  cmp -s conftest.i conftest.out \
68210814a2baSmrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
68220814a2baSmrgfi
68230814a2baSmrgrm -f conftest.i conftest2.i conftest.out
68240814a2baSmrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
68250814a2baSmrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
68260814a2baSmrg  [Command to truncate a binary pipe])
68270814a2baSmrg])# _LT_CMD_TRUNCATE
682863847c39Smrg
682963847c39Smrg
68300814a2baSmrg# _LT_CHECK_MAGIC_METHOD
68310814a2baSmrg# ----------------------
68320814a2baSmrg# how to check for library dependencies
68330814a2baSmrg#  -- PORTME fill in with the dynamic library characteristics
68340814a2baSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
68350814a2baSmrg[m4_require([_LT_DECL_EGREP])
68360814a2baSmrgm4_require([_LT_DECL_OBJDUMP])
68370814a2baSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
68380814a2baSmrglt_cv_deplibs_check_method,
68390814a2baSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
68400814a2baSmrglt_cv_file_magic_test_file=
68410814a2baSmrglt_cv_deplibs_check_method='unknown'
68420814a2baSmrg# Need to set the preceding variable on all platforms that support
68430814a2baSmrg# interlibrary dependencies.
68440814a2baSmrg# 'none' -- dependencies not supported.
68450814a2baSmrg# 'unknown' -- same as none, but documents that we really don't know.
68460814a2baSmrg# 'pass_all' -- all dependencies passed with no checks.
68470814a2baSmrg# 'test_compile' -- check by making test program.
68480814a2baSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
68490814a2baSmrg# that responds to the $file_magic_cmd with a given extended regex.
68500814a2baSmrg# If you have 'file' or equivalent on your system and you're not sure
68510814a2baSmrg# whether 'pass_all' will *always* work, you probably want this one.
685276888252Smrg
68530814a2baSmrgcase $host_os in
68540814a2baSmrgaix[[4-9]]*)
68550814a2baSmrg  lt_cv_deplibs_check_method=pass_all
68560814a2baSmrg  ;;
685776888252Smrg
68580814a2baSmrgbeos*)
68590814a2baSmrg  lt_cv_deplibs_check_method=pass_all
68600814a2baSmrg  ;;
686176888252Smrg
68620814a2baSmrgbsdi[[45]]*)
68630814a2baSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
68640814a2baSmrg  lt_cv_file_magic_cmd='$FILECMD -L'
68650814a2baSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
68660814a2baSmrg  ;;
686763847c39Smrg
68680814a2baSmrgcygwin*)
68690814a2baSmrg  # func_win32_libid is a shell function defined in ltmain.sh
68700814a2baSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
68710814a2baSmrg  lt_cv_file_magic_cmd='func_win32_libid'
68720814a2baSmrg  ;;
687376888252Smrg
68740814a2baSmrgmingw* | pw32*)
68750814a2baSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
68760814a2baSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
68770814a2baSmrg  # unless we find 'file', for example because we are cross-compiling.
68780814a2baSmrg  if ( file / ) >/dev/null 2>&1; then
68790814a2baSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
68800814a2baSmrg    lt_cv_file_magic_cmd='func_win32_libid'
68810814a2baSmrg  else
68820814a2baSmrg    # Keep this pattern in sync with the one in func_win32_libid.
68830814a2baSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
68840814a2baSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
68850814a2baSmrg  fi
68860814a2baSmrg  ;;
688763847c39Smrg
68880814a2baSmrgcegcc*)
68890814a2baSmrg  # use the weaker test based on 'objdump'. See mingw*.
68900814a2baSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
68910814a2baSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
68920814a2baSmrg  ;;
689363847c39Smrg
68940814a2baSmrgdarwin* | rhapsody*)
68950814a2baSmrg  lt_cv_deplibs_check_method=pass_all
68960814a2baSmrg  ;;
689763847c39Smrg
68980814a2baSmrgfreebsd* | dragonfly* | midnightbsd*)
68990814a2baSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
69000814a2baSmrg    case $host_cpu in
69010814a2baSmrg    i*86 )
69020814a2baSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
69030814a2baSmrg      # Let's accept both of them until this is cleared up.
69040814a2baSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
69050814a2baSmrg      lt_cv_file_magic_cmd=$FILECMD
69060814a2baSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
69070814a2baSmrg      ;;
69080814a2baSmrg    esac
69090814a2baSmrg  else
69100814a2baSmrg    lt_cv_deplibs_check_method=pass_all
69110814a2baSmrg  fi
69120814a2baSmrg  ;;
691376888252Smrg
69140814a2baSmrghaiku*)
69150814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69160814a2baSmrg  ;;
691776888252Smrg
69180814a2baSmrghpux10.20* | hpux11*)
69190814a2baSmrg  lt_cv_file_magic_cmd=$FILECMD
69200814a2baSmrg  case $host_cpu in
69210814a2baSmrg  ia64*)
69220814a2baSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
69230814a2baSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
69240814a2baSmrg    ;;
69250814a2baSmrg  hppa*64*)
69260814a2baSmrg    [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]']
69270814a2baSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
69280814a2baSmrg    ;;
69290814a2baSmrg  *)
69300814a2baSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
69310814a2baSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
69320814a2baSmrg    ;;
69330814a2baSmrg  esac
69340814a2baSmrg  ;;
693563847c39Smrg
69360814a2baSmrginterix[[3-9]]*)
69370814a2baSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
69380814a2baSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
69390814a2baSmrg  ;;
694063847c39Smrg
69410814a2baSmrgirix5* | irix6* | nonstopux*)
69420814a2baSmrg  case $LD in
69430814a2baSmrg  *-32|*"-32 ") libmagic=32-bit;;
69440814a2baSmrg  *-n32|*"-n32 ") libmagic=N32;;
69450814a2baSmrg  *-64|*"-64 ") libmagic=64-bit;;
69460814a2baSmrg  *) libmagic=never-match;;
69470814a2baSmrg  esac
69480814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69490814a2baSmrg  ;;
695063847c39Smrg
69510814a2baSmrg# This must be glibc/ELF.
69520814a2baSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69530814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69540814a2baSmrg  ;;
695563847c39Smrg
69560814a2baSmrgnetbsd*)
69570814a2baSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
69580814a2baSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
69590814a2baSmrg  else
69600814a2baSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
69610814a2baSmrg  fi
69620814a2baSmrg  ;;
696363847c39Smrg
69640814a2baSmrgnewos6*)
69650814a2baSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
69660814a2baSmrg  lt_cv_file_magic_cmd=$FILECMD
69670814a2baSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
69680814a2baSmrg  ;;
696963847c39Smrg
69700814a2baSmrg*nto* | *qnx*)
69710814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69720814a2baSmrg  ;;
697363847c39Smrg
69740814a2baSmrgopenbsd* | bitrig*)
69750814a2baSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
69760814a2baSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
69770814a2baSmrg  else
69780814a2baSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
69790814a2baSmrg  fi
69800814a2baSmrg  ;;
698163847c39Smrg
69820814a2baSmrgosf3* | osf4* | osf5*)
69830814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69840814a2baSmrg  ;;
698563847c39Smrg
69860814a2baSmrgrdos*)
69870814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69880814a2baSmrg  ;;
698963847c39Smrg
69900814a2baSmrgsolaris*)
69910814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69920814a2baSmrg  ;;
699363847c39Smrg
69940814a2baSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
69950814a2baSmrg  lt_cv_deplibs_check_method=pass_all
69960814a2baSmrg  ;;
699776888252Smrg
69980814a2baSmrgsysv4 | sysv4.3*)
69990814a2baSmrg  case $host_vendor in
70000814a2baSmrg  motorola)
70010814a2baSmrg    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]]'
70020814a2baSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
70030814a2baSmrg    ;;
70040814a2baSmrg  ncr)
70050814a2baSmrg    lt_cv_deplibs_check_method=pass_all
70060814a2baSmrg    ;;
70070814a2baSmrg  sequent)
70080814a2baSmrg    lt_cv_file_magic_cmd='/bin/file'
70090814a2baSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
70100814a2baSmrg    ;;
70110814a2baSmrg  sni)
70120814a2baSmrg    lt_cv_file_magic_cmd='/bin/file'
70130814a2baSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
70140814a2baSmrg    lt_cv_file_magic_test_file=/lib/libc.so
70150814a2baSmrg    ;;
70160814a2baSmrg  siemens)
70170814a2baSmrg    lt_cv_deplibs_check_method=pass_all
70180814a2baSmrg    ;;
70190814a2baSmrg  pc)
70200814a2baSmrg    lt_cv_deplibs_check_method=pass_all
70210814a2baSmrg    ;;
70220814a2baSmrg  esac
70230814a2baSmrg  ;;
702476888252Smrg
70250814a2baSmrgtpf*)
70260814a2baSmrg  lt_cv_deplibs_check_method=pass_all
70270814a2baSmrg  ;;
70280814a2baSmrgos2*)
70290814a2baSmrg  lt_cv_deplibs_check_method=pass_all
70300814a2baSmrg  ;;
70310814a2baSmrgesac
70320814a2baSmrg])
703376888252Smrg
70340814a2baSmrgfile_magic_glob=
70350814a2baSmrgwant_nocaseglob=no
70360814a2baSmrgif test "$build" = "$host"; then
70370814a2baSmrg  case $host_os in
70380814a2baSmrg  mingw* | pw32*)
70390814a2baSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
70400814a2baSmrg      want_nocaseglob=yes
70410814a2baSmrg    else
70420814a2baSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
70430814a2baSmrg    fi
70440814a2baSmrg    ;;
70450814a2baSmrg  esac
70460814a2baSmrgfi
704776888252Smrg
70480814a2baSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
70490814a2baSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
70500814a2baSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
705176888252Smrg
70520814a2baSmrg_LT_DECL([], [deplibs_check_method], [1],
70530814a2baSmrg    [Method to check whether dependent libraries are shared objects])
70540814a2baSmrg_LT_DECL([], [file_magic_cmd], [1],
70550814a2baSmrg    [Command to use when deplibs_check_method = "file_magic"])
70560814a2baSmrg_LT_DECL([], [file_magic_glob], [1],
70570814a2baSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
70580814a2baSmrg_LT_DECL([], [want_nocaseglob], [1],
70590814a2baSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
70600814a2baSmrg])# _LT_CHECK_MAGIC_METHOD
706176888252Smrg
706276888252Smrg
70630814a2baSmrg# LT_PATH_NM
70640814a2baSmrg# ----------
70650814a2baSmrg# find the pathname to a BSD- or MS-compatible name lister
70660814a2baSmrgAC_DEFUN([LT_PATH_NM],
70670814a2baSmrg[AC_REQUIRE([AC_PROG_CC])dnl
70680814a2baSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
70690814a2baSmrg[if test -n "$NM"; then
70700814a2baSmrg  # Let the user override the test.
70710814a2baSmrg  lt_cv_path_NM=$NM
70720814a2baSmrgelse
70730814a2baSmrg  lt_nm_to_check=${ac_tool_prefix}nm
70740814a2baSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
70750814a2baSmrg    lt_nm_to_check="$lt_nm_to_check nm"
70760814a2baSmrg  fi
70770814a2baSmrg  for lt_tmp_nm in $lt_nm_to_check; do
70780814a2baSmrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
70790814a2baSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
70800814a2baSmrg      IFS=$lt_save_ifs
70810814a2baSmrg      test -z "$ac_dir" && ac_dir=.
70820814a2baSmrg      tmp_nm=$ac_dir/$lt_tmp_nm
70830814a2baSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
70840814a2baSmrg	# Check to see if the nm accepts a BSD-compat flag.
70850814a2baSmrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
70860814a2baSmrg	#   nm: unknown option "B" ignored
70870814a2baSmrg	# Tru64's nm complains that /dev/null is an invalid object file
70880814a2baSmrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
70890814a2baSmrg	case $build_os in
70900814a2baSmrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
70910814a2baSmrg	*) lt_bad_file=/dev/null ;;
70920814a2baSmrg	esac
70930814a2baSmrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
70940814a2baSmrg	*$lt_bad_file* | *'Invalid file or object type'*)
70950814a2baSmrg	  lt_cv_path_NM="$tmp_nm -B"
70960814a2baSmrg	  break 2
70970814a2baSmrg	  ;;
70980814a2baSmrg	*)
70990814a2baSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
71000814a2baSmrg	  */dev/null*)
71010814a2baSmrg	    lt_cv_path_NM="$tmp_nm -p"
71020814a2baSmrg	    break 2
71030814a2baSmrg	    ;;
71040814a2baSmrg	  *)
71050814a2baSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
71060814a2baSmrg	    continue # so that we can try to find one that supports BSD flags
71070814a2baSmrg	    ;;
71080814a2baSmrg	  esac
71090814a2baSmrg	  ;;
71100814a2baSmrg	esac
71110814a2baSmrg      fi
71120814a2baSmrg    done
71130814a2baSmrg    IFS=$lt_save_ifs
71140814a2baSmrg  done
71150814a2baSmrg  : ${lt_cv_path_NM=no}
71160814a2baSmrgfi])
71170814a2baSmrgif test no != "$lt_cv_path_NM"; then
71180814a2baSmrg  NM=$lt_cv_path_NM
71190814a2baSmrgelse
71200814a2baSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
71210814a2baSmrg  if test -n "$DUMPBIN"; then :
71220814a2baSmrg    # Let the user override the test.
71230814a2baSmrg  else
71240814a2baSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
71250814a2baSmrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
71260814a2baSmrg    *COFF*)
71270814a2baSmrg      DUMPBIN="$DUMPBIN -symbols -headers"
71280814a2baSmrg      ;;
71290814a2baSmrg    *)
71300814a2baSmrg      DUMPBIN=:
71310814a2baSmrg      ;;
71320814a2baSmrg    esac
71330814a2baSmrg  fi
71340814a2baSmrg  AC_SUBST([DUMPBIN])
71350814a2baSmrg  if test : != "$DUMPBIN"; then
71360814a2baSmrg    NM=$DUMPBIN
71370814a2baSmrg  fi
71380814a2baSmrgfi
71390814a2baSmrgtest -z "$NM" && NM=nm
71400814a2baSmrgAC_SUBST([NM])
71410814a2baSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
714263847c39Smrg
71430814a2baSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
71440814a2baSmrg  [lt_cv_nm_interface="BSD nm"
71450814a2baSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
71460814a2baSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
71470814a2baSmrg  (eval "$ac_compile" 2>conftest.err)
71480814a2baSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
71490814a2baSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
71500814a2baSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
71510814a2baSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
71520814a2baSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
71530814a2baSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
71540814a2baSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
71550814a2baSmrg    lt_cv_nm_interface="MS dumpbin"
71560814a2baSmrg  fi
71570814a2baSmrg  rm -f conftest*])
71580814a2baSmrg])# LT_PATH_NM
715963847c39Smrg
71600814a2baSmrg# Old names:
71610814a2baSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
71620814a2baSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
71630814a2baSmrgdnl aclocal-1.4 backwards compatibility:
71640814a2baSmrgdnl AC_DEFUN([AM_PROG_NM], [])
71650814a2baSmrgdnl AC_DEFUN([AC_PROG_NM], [])
716663847c39Smrg
71670814a2baSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
71680814a2baSmrg# --------------------------------
71690814a2baSmrg# how to determine the name of the shared library
71700814a2baSmrg# associated with a specific link library.
71710814a2baSmrg#  -- PORTME fill in with the dynamic library characteristics
71720814a2baSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
71730814a2baSmrg[m4_require([_LT_DECL_EGREP])
71740814a2baSmrgm4_require([_LT_DECL_OBJDUMP])
71750814a2baSmrgm4_require([_LT_DECL_DLLTOOL])
71760814a2baSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
71770814a2baSmrglt_cv_sharedlib_from_linklib_cmd,
71780814a2baSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
717976888252Smrg
71800814a2baSmrgcase $host_os in
71810814a2baSmrgcygwin* | mingw* | pw32* | cegcc*)
71820814a2baSmrg  # two different shell functions defined in ltmain.sh;
71830814a2baSmrg  # decide which one to use based on capabilities of $DLLTOOL
71840814a2baSmrg  case `$DLLTOOL --help 2>&1` in
71850814a2baSmrg  *--identify-strict*)
71860814a2baSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
71870814a2baSmrg    ;;
71880814a2baSmrg  *)
71890814a2baSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
71900814a2baSmrg    ;;
71910814a2baSmrg  esac
71920814a2baSmrg  ;;
71930814a2baSmrg*)
71940814a2baSmrg  # fallback: assume linklib IS sharedlib
71950814a2baSmrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
71960814a2baSmrg  ;;
71970814a2baSmrgesac
71980814a2baSmrg])
71990814a2baSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
72000814a2baSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
720176888252Smrg
72020814a2baSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
72030814a2baSmrg    [Command to associate shared and link libraries])
72040814a2baSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
720576888252Smrg
720676888252Smrg
72070814a2baSmrg# _LT_PATH_MANIFEST_TOOL
72080814a2baSmrg# ----------------------
72090814a2baSmrg# locate the manifest tool
72100814a2baSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
72110814a2baSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
72120814a2baSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
72130814a2baSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
72140814a2baSmrg  [lt_cv_path_mainfest_tool=no
72150814a2baSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
72160814a2baSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
72170814a2baSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
72180814a2baSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
72190814a2baSmrg    lt_cv_path_mainfest_tool=yes
72200814a2baSmrg  fi
72210814a2baSmrg  rm -f conftest*])
72220814a2baSmrgif test yes != "$lt_cv_path_mainfest_tool"; then
72230814a2baSmrg  MANIFEST_TOOL=:
722463847c39Smrgfi
72250814a2baSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
72260814a2baSmrg])# _LT_PATH_MANIFEST_TOOL
722776888252Smrg
722876888252Smrg
72290814a2baSmrg# _LT_DLL_DEF_P([FILE])
72300814a2baSmrg# ---------------------
72310814a2baSmrg# True iff FILE is a Windows DLL '.def' file.
72320814a2baSmrg# Keep in sync with func_dll_def_p in the libtool script
72330814a2baSmrgAC_DEFUN([_LT_DLL_DEF_P],
72340814a2baSmrg[dnl
72350814a2baSmrg  test DEF = "`$SED -n dnl
72360814a2baSmrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
72370814a2baSmrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
72380814a2baSmrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
72390814a2baSmrg    -e q dnl                          Only consider the first "real" line
72400814a2baSmrg    $1`" dnl
72410814a2baSmrg])# _LT_DLL_DEF_P
724276888252Smrg
724376888252Smrg
72440814a2baSmrg# LT_LIB_M
72450814a2baSmrg# --------
72460814a2baSmrg# check for math library
72470814a2baSmrgAC_DEFUN([LT_LIB_M],
72480814a2baSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
72490814a2baSmrgLIBM=
72500814a2baSmrgcase $host in
72510814a2baSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
72520814a2baSmrg  # These system don't have libm, or don't need it
72530814a2baSmrg  ;;
72540814a2baSmrg*-ncr-sysv4.3*)
72550814a2baSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
72560814a2baSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
72570814a2baSmrg  ;;
72580814a2baSmrg*)
72590814a2baSmrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
72600814a2baSmrg  ;;
72610814a2baSmrgesac
72620814a2baSmrgAC_SUBST([LIBM])
72630814a2baSmrg])# LT_LIB_M
726476888252Smrg
72650814a2baSmrg# Old name:
72660814a2baSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
72670814a2baSmrgdnl aclocal-1.4 backwards compatibility:
72680814a2baSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
726976888252Smrg
727076888252Smrg
72710814a2baSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
72720814a2baSmrg# -------------------------------
72730814a2baSmrgm4_defun([_LT_COMPILER_NO_RTTI],
72740814a2baSmrg[m4_require([_LT_TAG_COMPILER])dnl
727576888252Smrg
72760814a2baSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
727776888252Smrg
72780814a2baSmrgif test yes = "$GCC"; then
72790814a2baSmrg  case $cc_basename in
72800814a2baSmrg  nvcc*)
72810814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
72820814a2baSmrg  *)
72830814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
72840814a2baSmrg  esac
728576888252Smrg
72860814a2baSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
72870814a2baSmrg    lt_cv_prog_compiler_rtti_exceptions,
72880814a2baSmrg    [-fno-rtti -fno-exceptions], [],
72890814a2baSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
72900814a2baSmrgfi
72910814a2baSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
72920814a2baSmrg	[Compiler flag to turn off builtin functions])
72930814a2baSmrg])# _LT_COMPILER_NO_RTTI
729476888252Smrg
729576888252Smrg
72960814a2baSmrg# _LT_CMD_GLOBAL_SYMBOLS
72970814a2baSmrg# ----------------------
72980814a2baSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
72990814a2baSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
73000814a2baSmrgAC_REQUIRE([AC_PROG_CC])dnl
73010814a2baSmrgAC_REQUIRE([AC_PROG_AWK])dnl
73020814a2baSmrgAC_REQUIRE([LT_PATH_NM])dnl
73030814a2baSmrgAC_REQUIRE([LT_PATH_LD])dnl
73040814a2baSmrgm4_require([_LT_DECL_SED])dnl
73050814a2baSmrgm4_require([_LT_DECL_EGREP])dnl
73060814a2baSmrgm4_require([_LT_TAG_COMPILER])dnl
730776888252Smrg
73080814a2baSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
73090814a2baSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
73100814a2baSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
73110814a2baSmrg[
73120814a2baSmrg# These are sane defaults that work on at least a few old systems.
73130814a2baSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
731476888252Smrg
73150814a2baSmrg# Character class describing NM global symbol codes.
73160814a2baSmrgsymcode='[[BCDEGRST]]'
731776888252Smrg
73180814a2baSmrg# Regexp to match symbols that can be accessed directly from C.
73190814a2baSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
732076888252Smrg
73210814a2baSmrg# Define system-specific variables.
73220814a2baSmrgcase $host_os in
73230814a2baSmrgaix*)
73240814a2baSmrg  symcode='[[BCDT]]'
73250814a2baSmrg  ;;
73260814a2baSmrgcygwin* | mingw* | pw32* | cegcc*)
73270814a2baSmrg  symcode='[[ABCDGISTW]]'
73280814a2baSmrg  ;;
73290814a2baSmrghpux*)
73300814a2baSmrg  if test ia64 = "$host_cpu"; then
73310814a2baSmrg    symcode='[[ABCDEGRST]]'
73320814a2baSmrg  fi
73330814a2baSmrg  ;;
73340814a2baSmrgirix* | nonstopux*)
73350814a2baSmrg  symcode='[[BCDEGRST]]'
73360814a2baSmrg  ;;
73370814a2baSmrgosf*)
73380814a2baSmrg  symcode='[[BCDEGQRST]]'
73390814a2baSmrg  ;;
73400814a2baSmrgsolaris*)
73410814a2baSmrg  symcode='[[BDRT]]'
73420814a2baSmrg  ;;
73430814a2baSmrgsco3.2v5*)
73440814a2baSmrg  symcode='[[DT]]'
73450814a2baSmrg  ;;
73460814a2baSmrgsysv4.2uw2*)
73470814a2baSmrg  symcode='[[DT]]'
73480814a2baSmrg  ;;
73490814a2baSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
73500814a2baSmrg  symcode='[[ABDT]]'
73510814a2baSmrg  ;;
73520814a2baSmrgsysv4)
73530814a2baSmrg  symcode='[[DFNSTU]]'
73540814a2baSmrg  ;;
73550814a2baSmrgesac
735676888252Smrg
73570814a2baSmrg# If we're using GNU nm, then use its standard symbol codes.
73580814a2baSmrgcase `$NM -V 2>&1` in
73590814a2baSmrg*GNU* | *'with BFD'*)
73600814a2baSmrg  symcode='[[ABCDGIRSTW]]' ;;
73610814a2baSmrgesac
736276888252Smrg
73630814a2baSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
73640814a2baSmrg  # Gets list of data symbols to import.
73650814a2baSmrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
73660814a2baSmrg  # Adjust the below global symbol transforms to fixup imported variables.
73670814a2baSmrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
73680814a2baSmrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
73690814a2baSmrg  lt_c_name_lib_hook="\
73700814a2baSmrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
73710814a2baSmrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
73720814a2baSmrgelse
73730814a2baSmrg  # Disable hooks by default.
73740814a2baSmrg  lt_cv_sys_global_symbol_to_import=
73750814a2baSmrg  lt_cdecl_hook=
73760814a2baSmrg  lt_c_name_hook=
73770814a2baSmrg  lt_c_name_lib_hook=
73780814a2baSmrgfi
737976888252Smrg
73800814a2baSmrg# Transform an extracted symbol line into a proper C declaration.
73810814a2baSmrg# Some systems (esp. on ia64) link data and code symbols differently,
73820814a2baSmrg# so use this general approach.
73830814a2baSmrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
73840814a2baSmrg$lt_cdecl_hook\
73850814a2baSmrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
73860814a2baSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
738776888252Smrg
73880814a2baSmrg# Transform an extracted symbol line into symbol name and symbol address
73890814a2baSmrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
73900814a2baSmrg$lt_c_name_hook\
73910814a2baSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
73920814a2baSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
73930814a2baSmrg
73940814a2baSmrg# Transform an extracted symbol line into symbol name with lib prefix and
73950814a2baSmrg# symbol address.
73960814a2baSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
73970814a2baSmrg$lt_c_name_lib_hook\
73980814a2baSmrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
73990814a2baSmrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
74000814a2baSmrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
740176888252Smrg
74020814a2baSmrg# Handle CRLF in mingw tool chain
74030814a2baSmrgopt_cr=
74040814a2baSmrgcase $build_os in
74050814a2baSmrgmingw*)
74060814a2baSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
74070814a2baSmrg  ;;
74080814a2baSmrgesac
740976888252Smrg
74100814a2baSmrg# Try without a prefix underscore, then with it.
74110814a2baSmrgfor ac_symprfx in "" "_"; do
741276888252Smrg
74130814a2baSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
74140814a2baSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
741576888252Smrg
74160814a2baSmrg  # Write the raw and C identifiers.
74170814a2baSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
74180814a2baSmrg    # Fake it for dumpbin and say T for any non-static function,
74190814a2baSmrg    # D for any global variable and I for any imported variable.
74200814a2baSmrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
74210814a2baSmrg    # which start with @ or ?.
74220814a2baSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
74230814a2baSmrg"     {last_section=section; section=\$ 3};"\
74240814a2baSmrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
74250814a2baSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
74260814a2baSmrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
74270814a2baSmrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
74280814a2baSmrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
74290814a2baSmrg"     \$ 0!~/External *\|/{next};"\
74300814a2baSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
74310814a2baSmrg"     {if(hide[section]) next};"\
74320814a2baSmrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
74330814a2baSmrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
74340814a2baSmrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
74350814a2baSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
74360814a2baSmrg"     ' prfx=^$ac_symprfx]"
74370814a2baSmrg  else
74380814a2baSmrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
74390814a2baSmrg  fi
74400814a2baSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
744163847c39Smrg
74420814a2baSmrg  # Check to see that the pipe works correctly.
74430814a2baSmrg  pipe_works=no
744476888252Smrg
74450814a2baSmrg  rm -f conftest*
74460814a2baSmrg  cat > conftest.$ac_ext <<_LT_EOF
74470814a2baSmrg#ifdef __cplusplus
74480814a2baSmrgextern "C" {
74490814a2baSmrg#endif
74500814a2baSmrgchar nm_test_var;
74510814a2baSmrgvoid nm_test_func(void);
74520814a2baSmrgvoid nm_test_func(void){}
74530814a2baSmrg#ifdef __cplusplus
74540814a2baSmrg}
74550814a2baSmrg#endif
74560814a2baSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
74570814a2baSmrg_LT_EOF
745876888252Smrg
74590814a2baSmrg  if AC_TRY_EVAL(ac_compile); then
74600814a2baSmrg    # Now try to grab the symbols.
74610814a2baSmrg    nlist=conftest.nm
74620814a2baSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
74630814a2baSmrg      # Try sorting and uniquifying the output.
74640814a2baSmrg      if sort "$nlist" | uniq > "$nlist"T; then
74650814a2baSmrg	mv -f "$nlist"T "$nlist"
74660814a2baSmrg      else
74670814a2baSmrg	rm -f "$nlist"T
74680814a2baSmrg      fi
746963847c39Smrg
74700814a2baSmrg      # Make sure that we snagged all the symbols we need.
74710814a2baSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
74720814a2baSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
74730814a2baSmrg	  cat <<_LT_EOF > conftest.$ac_ext
74740814a2baSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
74750814a2baSmrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
74760814a2baSmrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
74770814a2baSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
74780814a2baSmrg# define LT@&t@_DLSYM_CONST
74790814a2baSmrg#elif defined __osf__
74800814a2baSmrg/* This system does not cope well with relocations in const data.  */
74810814a2baSmrg# define LT@&t@_DLSYM_CONST
74820814a2baSmrg#else
74830814a2baSmrg# define LT@&t@_DLSYM_CONST const
74840814a2baSmrg#endif
74851ae1b5e8Smrg
74860814a2baSmrg#ifdef __cplusplus
74870814a2baSmrgextern "C" {
74880814a2baSmrg#endif
74891ae1b5e8Smrg
74900814a2baSmrg_LT_EOF
74910814a2baSmrg	  # Now generate the symbol file.
74920814a2baSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
749376888252Smrg
74940814a2baSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
749576888252Smrg
74960814a2baSmrg/* The mapping between symbol names and symbols.  */
74970814a2baSmrgLT@&t@_DLSYM_CONST struct {
74980814a2baSmrg  const char *name;
74990814a2baSmrg  void       *address;
75000814a2baSmrg}
75010814a2baSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
75020814a2baSmrg{
75030814a2baSmrg  { "@PROGRAM@", (void *) 0 },
75040814a2baSmrg_LT_EOF
75050814a2baSmrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
75060814a2baSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
75070814a2baSmrg  {0, (void *) 0}
75080814a2baSmrg};
750976888252Smrg
75100814a2baSmrg/* This works around a problem in FreeBSD linker */
75110814a2baSmrg#ifdef FREEBSD_WORKAROUND
75120814a2baSmrgstatic const void *lt_preloaded_setup() {
75130814a2baSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
75140814a2baSmrg}
75150814a2baSmrg#endif
751663847c39Smrg
75170814a2baSmrg#ifdef __cplusplus
75180814a2baSmrg}
75190814a2baSmrg#endif
75200814a2baSmrg_LT_EOF
75210814a2baSmrg	  # Now try linking the two files.
75220814a2baSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
75230814a2baSmrg	  lt_globsym_save_LIBS=$LIBS
75240814a2baSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
75250814a2baSmrg	  LIBS=conftstm.$ac_objext
75260814a2baSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
75270814a2baSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
75280814a2baSmrg	    pipe_works=yes
75290814a2baSmrg	  fi
75300814a2baSmrg	  LIBS=$lt_globsym_save_LIBS
75310814a2baSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
75320814a2baSmrg	else
75330814a2baSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
75340814a2baSmrg	fi
75350814a2baSmrg      else
75360814a2baSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
75370814a2baSmrg      fi
75380814a2baSmrg    else
75390814a2baSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
75400814a2baSmrg    fi
75410814a2baSmrg  else
75420814a2baSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
75430814a2baSmrg    cat conftest.$ac_ext >&5
75440814a2baSmrg  fi
75450814a2baSmrg  rm -rf conftest* conftst*
754663847c39Smrg
75470814a2baSmrg  # Do not use the global_symbol_pipe unless it works.
75480814a2baSmrg  if test yes = "$pipe_works"; then
75490814a2baSmrg    break
75500814a2baSmrg  else
75510814a2baSmrg    lt_cv_sys_global_symbol_pipe=
75520814a2baSmrg  fi
75530814a2baSmrgdone
755486dafe34Smrg])
75550814a2baSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
75560814a2baSmrg  lt_cv_sys_global_symbol_to_cdecl=
75570814a2baSmrgfi
75580814a2baSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
75590814a2baSmrg  AC_MSG_RESULT(failed)
75600814a2baSmrgelse
75610814a2baSmrg  AC_MSG_RESULT(ok)
75620814a2baSmrgfi
756376888252Smrg
75640814a2baSmrg# Response file support.
75650814a2baSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
75660814a2baSmrg  nm_file_list_spec='@'
75670814a2baSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
75680814a2baSmrg  nm_file_list_spec='@'
75690814a2baSmrgfi
757076888252Smrg
75710814a2baSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
75720814a2baSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
75730814a2baSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
75740814a2baSmrg    [Transform the output of nm in a proper C declaration])
75750814a2baSmrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
75760814a2baSmrg    [Transform the output of nm into a list of symbols to manually relocate])
75770814a2baSmrg_LT_DECL([global_symbol_to_c_name_address],
75780814a2baSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
75790814a2baSmrg    [Transform the output of nm in a C name address pair])
75800814a2baSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
75810814a2baSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
75820814a2baSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
75830814a2baSmrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
75840814a2baSmrg    [The name lister interface])
75850814a2baSmrg_LT_DECL([], [nm_file_list_spec], [1],
75860814a2baSmrg    [Specify filename containing input files for $NM])
75870814a2baSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
758876888252Smrg
758976888252Smrg
75900814a2baSmrg# _LT_COMPILER_PIC([TAGNAME])
75910814a2baSmrg# ---------------------------
75920814a2baSmrgm4_defun([_LT_COMPILER_PIC],
75930814a2baSmrg[m4_require([_LT_TAG_COMPILER])dnl
75940814a2baSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
75950814a2baSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
75960814a2baSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
759776888252Smrg
75980814a2baSmrgm4_if([$1], [CXX], [
75990814a2baSmrg  # C++ specific cases for pic, static, wl, etc.
76000814a2baSmrg  if test yes = "$GXX"; then
76010814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
76020814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
760363847c39Smrg
76040814a2baSmrg    case $host_os in
76050814a2baSmrg    aix*)
76060814a2baSmrg      # All AIX code is PIC.
76070814a2baSmrg      if test ia64 = "$host_cpu"; then
76080814a2baSmrg	# AIX 5 now supports IA64 processor
76090814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
7610d8556812Smrg      fi
76110814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76120814a2baSmrg      ;;
76130814a2baSmrg
76140814a2baSmrg    amigaos*)
76150814a2baSmrg      case $host_cpu in
76160814a2baSmrg      powerpc)
76170814a2baSmrg            # see comment about AmigaOS4 .so support
76180814a2baSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76190814a2baSmrg        ;;
76200814a2baSmrg      m68k)
76210814a2baSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
76220814a2baSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
76230814a2baSmrg            # like '-m68040'.
76240814a2baSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
76250814a2baSmrg        ;;
76260814a2baSmrg      esac
76270814a2baSmrg      ;;
76280814a2baSmrg
76290814a2baSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
76300814a2baSmrg      # PIC is the default for these OSes.
76310814a2baSmrg      ;;
76320814a2baSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
76330814a2baSmrg      # This hack is so that the source file can tell whether it is being
76340814a2baSmrg      # built for inclusion in a dll (and should export symbols for example).
76350814a2baSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
76360814a2baSmrg      # (--disable-auto-import) libraries
76370814a2baSmrg      m4_if([$1], [GCJ], [],
76380814a2baSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
76390814a2baSmrg      case $host_os in
76400814a2baSmrg      os2*)
76410814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
76420814a2baSmrg	;;
76430814a2baSmrg      esac
76440814a2baSmrg      ;;
76450814a2baSmrg    darwin* | rhapsody*)
76460814a2baSmrg      # PIC is the default on this platform
76470814a2baSmrg      # Common symbols not allowed in MH_DYLIB files
76480814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
76490814a2baSmrg      ;;
76500814a2baSmrg    *djgpp*)
76510814a2baSmrg      # DJGPP does not support shared libraries at all
76520814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
76530814a2baSmrg      ;;
76540814a2baSmrg    haiku*)
76550814a2baSmrg      # PIC is the default for Haiku.
76560814a2baSmrg      # The "-static" flag exists, but is broken.
76570814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
76580814a2baSmrg      ;;
76590814a2baSmrg    interix[[3-9]]*)
76600814a2baSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
76610814a2baSmrg      # Instead, we relocate shared libraries at runtime.
76620814a2baSmrg      ;;
76630814a2baSmrg    sysv4*MP*)
76640814a2baSmrg      if test -d /usr/nec; then
76650814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
76660814a2baSmrg      fi
76670814a2baSmrg      ;;
76680814a2baSmrg    hpux*)
76690814a2baSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
76700814a2baSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
76710814a2baSmrg      # sets the default TLS model and affects inlining.
76720814a2baSmrg      case $host_cpu in
76730814a2baSmrg      hppa*64*)
76740814a2baSmrg	;;
76750814a2baSmrg      *)
76760814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76770814a2baSmrg	;;
76780814a2baSmrg      esac
76790814a2baSmrg      ;;
76800814a2baSmrg    *qnx* | *nto*)
76810814a2baSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
76820814a2baSmrg      # it will coredump.
76830814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
76840814a2baSmrg      ;;
76850814a2baSmrg    *)
76860814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76870814a2baSmrg      ;;
76880814a2baSmrg    esac
76890814a2baSmrg  else
76900814a2baSmrg    case $host_os in
76910814a2baSmrg      aix[[4-9]]*)
76920814a2baSmrg	# All AIX code is PIC.
76930814a2baSmrg	if test ia64 = "$host_cpu"; then
76940814a2baSmrg	  # AIX 5 now supports IA64 processor
76950814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
76960814a2baSmrg	else
76970814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
76980814a2baSmrg	fi
76990814a2baSmrg	;;
77000814a2baSmrg      chorus*)
77010814a2baSmrg	case $cc_basename in
77020814a2baSmrg	cxch68*)
77030814a2baSmrg	  # Green Hills C++ Compiler
77040814a2baSmrg	  # _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"
77050814a2baSmrg	  ;;
77060814a2baSmrg	esac
77070814a2baSmrg	;;
77080814a2baSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
77090814a2baSmrg	# This hack is so that the source file can tell whether it is being
77100814a2baSmrg	# built for inclusion in a dll (and should export symbols for example).
77110814a2baSmrg	m4_if([$1], [GCJ], [],
77120814a2baSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
77130814a2baSmrg	;;
77140814a2baSmrg      dgux*)
77150814a2baSmrg	case $cc_basename in
77160814a2baSmrg	  ec++*)
77170814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
77180814a2baSmrg	    ;;
77190814a2baSmrg	  ghcx*)
77200814a2baSmrg	    # Green Hills C++ Compiler
77210814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
77220814a2baSmrg	    ;;
77230814a2baSmrg	  *)
77240814a2baSmrg	    ;;
77250814a2baSmrg	esac
77260814a2baSmrg	;;
77270814a2baSmrg      freebsd* | dragonfly* | midnightbsd*)
77280814a2baSmrg	# FreeBSD uses GNU C++
77290814a2baSmrg	;;
77300814a2baSmrg      hpux9* | hpux10* | hpux11*)
77310814a2baSmrg	case $cc_basename in
77320814a2baSmrg	  CC*)
77330814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77340814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
77350814a2baSmrg	    if test ia64 != "$host_cpu"; then
77360814a2baSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
77370814a2baSmrg	    fi
77380814a2baSmrg	    ;;
77390814a2baSmrg	  aCC*)
77400814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77410814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
77420814a2baSmrg	    case $host_cpu in
77430814a2baSmrg	    hppa*64*|ia64*)
77440814a2baSmrg	      # +Z the default
77450814a2baSmrg	      ;;
77460814a2baSmrg	    *)
77470814a2baSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
77480814a2baSmrg	      ;;
77490814a2baSmrg	    esac
77500814a2baSmrg	    ;;
77510814a2baSmrg	  *)
77520814a2baSmrg	    ;;
77530814a2baSmrg	esac
77540814a2baSmrg	;;
77550814a2baSmrg      interix*)
77560814a2baSmrg	# This is c89, which is MS Visual C++ (no shared libs)
77570814a2baSmrg	# Anyone wants to do a port?
77580814a2baSmrg	;;
77590814a2baSmrg      irix5* | irix6* | nonstopux*)
77600814a2baSmrg	case $cc_basename in
77610814a2baSmrg	  CC*)
77620814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77630814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
77640814a2baSmrg	    # CC pic flag -KPIC is the default.
77650814a2baSmrg	    ;;
77660814a2baSmrg	  *)
77670814a2baSmrg	    ;;
77680814a2baSmrg	esac
77690814a2baSmrg	;;
77700814a2baSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
77710814a2baSmrg	case $cc_basename in
77720814a2baSmrg	  KCC*)
77730814a2baSmrg	    # KAI C++ Compiler
77740814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
77750814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
77760814a2baSmrg	    ;;
77770814a2baSmrg	  ecpc* )
77780814a2baSmrg	    # old Intel C++ for x86_64, which still supported -KPIC.
77790814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77800814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
77810814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
77820814a2baSmrg	    ;;
77830814a2baSmrg	  icpc* )
77840814a2baSmrg	    # Intel C++, used to be incompatible with GCC.
77850814a2baSmrg	    # ICC 10 doesn't accept -KPIC any more.
77860814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77870814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
77880814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
77890814a2baSmrg	    ;;
77900814a2baSmrg	  pgCC* | pgcpp*)
77910814a2baSmrg	    # Portland Group C++ compiler
77920814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77930814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
77940814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
77950814a2baSmrg	    ;;
77960814a2baSmrg	  cxx*)
77970814a2baSmrg	    # Compaq C++
77980814a2baSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
77990814a2baSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
78000814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
78010814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
78020814a2baSmrg	    ;;
78030814a2baSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
78040814a2baSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
78050814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78060814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
78070814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
78080814a2baSmrg	    ;;
78090814a2baSmrg	  *)
78100814a2baSmrg	    case `$CC -V 2>&1 | $SED 5q` in
78110814a2baSmrg	    *Sun\ C*)
78120814a2baSmrg	      # Sun C++ 5.9
78130814a2baSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
78140814a2baSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78150814a2baSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
78160814a2baSmrg	      ;;
78170814a2baSmrg	    esac
78180814a2baSmrg	    ;;
78190814a2baSmrg	esac
78200814a2baSmrg	;;
78210814a2baSmrg      lynxos*)
78220814a2baSmrg	;;
78230814a2baSmrg      m88k*)
78240814a2baSmrg	;;
78250814a2baSmrg      mvs*)
78260814a2baSmrg	case $cc_basename in
78270814a2baSmrg	  cxx*)
78280814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
78290814a2baSmrg	    ;;
78300814a2baSmrg	  *)
78310814a2baSmrg	    ;;
78320814a2baSmrg	esac
78330814a2baSmrg	;;
78340814a2baSmrg      netbsd*)
78350814a2baSmrg	;;
78360814a2baSmrg      *qnx* | *nto*)
78370814a2baSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
78380814a2baSmrg        # it will coredump.
78390814a2baSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
78400814a2baSmrg        ;;
78410814a2baSmrg      osf3* | osf4* | osf5*)
78420814a2baSmrg	case $cc_basename in
78430814a2baSmrg	  KCC*)
78440814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
78450814a2baSmrg	    ;;
78460814a2baSmrg	  RCC*)
78470814a2baSmrg	    # Rational C++ 2.4.1
78480814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
78490814a2baSmrg	    ;;
78500814a2baSmrg	  cxx*)
78510814a2baSmrg	    # Digital/Compaq C++
78520814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78530814a2baSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
78540814a2baSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
78550814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
78560814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
78570814a2baSmrg	    ;;
78580814a2baSmrg	  *)
78590814a2baSmrg	    ;;
78600814a2baSmrg	esac
78610814a2baSmrg	;;
78620814a2baSmrg      psos*)
78630814a2baSmrg	;;
78640814a2baSmrg      solaris*)
78650814a2baSmrg	case $cc_basename in
78660814a2baSmrg	  CC* | sunCC*)
78670814a2baSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
78680814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
78690814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78700814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
78710814a2baSmrg	    ;;
78720814a2baSmrg	  gcx*)
78730814a2baSmrg	    # Green Hills C++ Compiler
78740814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
78750814a2baSmrg	    ;;
78760814a2baSmrg	  *)
78770814a2baSmrg	    ;;
78780814a2baSmrg	esac
78790814a2baSmrg	;;
78800814a2baSmrg      sunos4*)
78810814a2baSmrg	case $cc_basename in
78820814a2baSmrg	  CC*)
78830814a2baSmrg	    # Sun C++ 4.x
78840814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
78850814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78860814a2baSmrg	    ;;
78870814a2baSmrg	  lcc*)
78880814a2baSmrg	    # Lucid
78890814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
78900814a2baSmrg	    ;;
78910814a2baSmrg	  *)
78920814a2baSmrg	    ;;
78930814a2baSmrg	esac
78940814a2baSmrg	;;
78950814a2baSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
78960814a2baSmrg	case $cc_basename in
78970814a2baSmrg	  CC*)
78980814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78990814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
79000814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
79010814a2baSmrg	    ;;
79020814a2baSmrg	esac
79030814a2baSmrg	;;
79040814a2baSmrg      tandem*)
79050814a2baSmrg	case $cc_basename in
79060814a2baSmrg	  NCC*)
79070814a2baSmrg	    # NonStop-UX NCC 3.20
79080814a2baSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
79090814a2baSmrg	    ;;
79100814a2baSmrg	  *)
79110814a2baSmrg	    ;;
79120814a2baSmrg	esac
79130814a2baSmrg	;;
79140814a2baSmrg      vxworks*)
79150814a2baSmrg	;;
79160814a2baSmrg      *)
79170814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
79180814a2baSmrg	;;
79190814a2baSmrg    esac
7920d8556812Smrg  fi
79210814a2baSmrg],
79220814a2baSmrg[
79230814a2baSmrg  if test yes = "$GCC"; then
79240814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
79250814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
792663847c39Smrg
79270814a2baSmrg    case $host_os in
79280814a2baSmrg      aix*)
79290814a2baSmrg      # All AIX code is PIC.
79300814a2baSmrg      if test ia64 = "$host_cpu"; then
79310814a2baSmrg	# AIX 5 now supports IA64 processor
79320814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
79330814a2baSmrg      fi
79340814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
79350814a2baSmrg      ;;
793663847c39Smrg
79370814a2baSmrg    amigaos*)
79380814a2baSmrg      case $host_cpu in
79390814a2baSmrg      powerpc)
79400814a2baSmrg            # see comment about AmigaOS4 .so support
79410814a2baSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
79420814a2baSmrg        ;;
79430814a2baSmrg      m68k)
79440814a2baSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
79450814a2baSmrg            # adding the '-m68020' flag to GCC prevents building anything better,
79460814a2baSmrg            # like '-m68040'.
79470814a2baSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
79480814a2baSmrg        ;;
79490814a2baSmrg      esac
79500814a2baSmrg      ;;
795163847c39Smrg
79520814a2baSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
79530814a2baSmrg      # PIC is the default for these OSes.
79540814a2baSmrg      ;;
795563847c39Smrg
79560814a2baSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
79570814a2baSmrg      # This hack is so that the source file can tell whether it is being
79580814a2baSmrg      # built for inclusion in a dll (and should export symbols for example).
79590814a2baSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
79600814a2baSmrg      # (--disable-auto-import) libraries
79610814a2baSmrg      m4_if([$1], [GCJ], [],
79620814a2baSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
79630814a2baSmrg      case $host_os in
79640814a2baSmrg      os2*)
79650814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
79660814a2baSmrg	;;
79670814a2baSmrg      esac
79680814a2baSmrg      ;;
796963847c39Smrg
79700814a2baSmrg    darwin* | rhapsody*)
79710814a2baSmrg      # PIC is the default on this platform
79720814a2baSmrg      # Common symbols not allowed in MH_DYLIB files
79730814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
79740814a2baSmrg      ;;
797563847c39Smrg
79760814a2baSmrg    haiku*)
79770814a2baSmrg      # PIC is the default for Haiku.
79780814a2baSmrg      # The "-static" flag exists, but is broken.
79790814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
79800814a2baSmrg      ;;
798163847c39Smrg
79820814a2baSmrg    hpux*)
79830814a2baSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
79840814a2baSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
79850814a2baSmrg      # sets the default TLS model and affects inlining.
79860814a2baSmrg      case $host_cpu in
79870814a2baSmrg      hppa*64*)
79880814a2baSmrg	# +Z the default
79890814a2baSmrg	;;
79900814a2baSmrg      *)
79910814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
79920814a2baSmrg	;;
79930814a2baSmrg      esac
79940814a2baSmrg      ;;
799563847c39Smrg
79960814a2baSmrg    interix[[3-9]]*)
79970814a2baSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
79980814a2baSmrg      # Instead, we relocate shared libraries at runtime.
79990814a2baSmrg      ;;
800063847c39Smrg
80010814a2baSmrg    msdosdjgpp*)
80020814a2baSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
80030814a2baSmrg      # on systems that don't support them.
80040814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
80050814a2baSmrg      enable_shared=no
80060814a2baSmrg      ;;
800763847c39Smrg
80080814a2baSmrg    *nto* | *qnx*)
80090814a2baSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
80100814a2baSmrg      # it will coredump.
80110814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
80120814a2baSmrg      ;;
801363847c39Smrg
80140814a2baSmrg    sysv4*MP*)
80150814a2baSmrg      if test -d /usr/nec; then
80160814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
80170814a2baSmrg      fi
80180814a2baSmrg      ;;
801963847c39Smrg
80200814a2baSmrg    *)
80210814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
80220814a2baSmrg      ;;
80230814a2baSmrg    esac
802463847c39Smrg
80250814a2baSmrg    case $cc_basename in
80260814a2baSmrg    nvcc*) # Cuda Compiler Driver 2.2
80270814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
80280814a2baSmrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
80290814a2baSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
80300814a2baSmrg      fi
80310814a2baSmrg      ;;
80320814a2baSmrg    esac
80330814a2baSmrg  else
80340814a2baSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
80350814a2baSmrg    case $host_os in
80360814a2baSmrg    aix*)
80370814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80380814a2baSmrg      if test ia64 = "$host_cpu"; then
80390814a2baSmrg	# AIX 5 now supports IA64 processor
80400814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
80410814a2baSmrg      else
80420814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
80430814a2baSmrg      fi
80440814a2baSmrg      ;;
804563847c39Smrg
80460814a2baSmrg    darwin* | rhapsody*)
80470814a2baSmrg      # PIC is the default on this platform
80480814a2baSmrg      # Common symbols not allowed in MH_DYLIB files
80490814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
80500814a2baSmrg      case $cc_basename in
80510814a2baSmrg      nagfor*)
80520814a2baSmrg        # NAG Fortran compiler
80530814a2baSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
80540814a2baSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
80550814a2baSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
80560814a2baSmrg        ;;
80570814a2baSmrg      esac
80580814a2baSmrg      ;;
805963847c39Smrg
80600814a2baSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
80610814a2baSmrg      # This hack is so that the source file can tell whether it is being
80620814a2baSmrg      # built for inclusion in a dll (and should export symbols for example).
80630814a2baSmrg      m4_if([$1], [GCJ], [],
80640814a2baSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
80650814a2baSmrg      case $host_os in
80660814a2baSmrg      os2*)
80670814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
80680814a2baSmrg	;;
80690814a2baSmrg      esac
80700814a2baSmrg      ;;
807163847c39Smrg
80720814a2baSmrg    hpux9* | hpux10* | hpux11*)
80730814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80740814a2baSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
80750814a2baSmrg      # not for PA HP-UX.
80760814a2baSmrg      case $host_cpu in
80770814a2baSmrg      hppa*64*|ia64*)
80780814a2baSmrg	# +Z the default
80790814a2baSmrg	;;
80800814a2baSmrg      *)
80810814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
80820814a2baSmrg	;;
80830814a2baSmrg      esac
80840814a2baSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
80850814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
80860814a2baSmrg      ;;
808763847c39Smrg
80880814a2baSmrg    irix5* | irix6* | nonstopux*)
80890814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80900814a2baSmrg      # PIC (with -KPIC) is the default.
80910814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
80920814a2baSmrg      ;;
809363847c39Smrg
80940814a2baSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
80950814a2baSmrg      case $cc_basename in
80960814a2baSmrg      # old Intel for x86_64, which still supported -KPIC.
80970814a2baSmrg      ecc*)
80980814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80990814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81000814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
810163847c39Smrg        ;;
81020814a2baSmrg      # icc used to be incompatible with GCC.
81030814a2baSmrg      # ICC 10 doesn't accept -KPIC any more.
81040814a2baSmrg      icc* | ifort*)
81050814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81060814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
81070814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
810863847c39Smrg        ;;
81090814a2baSmrg      # Lahey Fortran 8.1.
81100814a2baSmrg      lf95*)
81110814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81120814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
81130814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
81140814a2baSmrg	;;
81150814a2baSmrg      nagfor*)
81160814a2baSmrg	# NAG Fortran compiler
81170814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
81180814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
81190814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81200814a2baSmrg	;;
81210814a2baSmrg      tcc*)
81220814a2baSmrg	# Fabrice Bellard et al's Tiny C Compiler
81230814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81240814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
81250814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
81260814a2baSmrg	;;
81270814a2baSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
81280814a2baSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
81290814a2baSmrg	# which looks to be a dead project)
81300814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81310814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
81320814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
813363847c39Smrg        ;;
81340814a2baSmrg      ccc*)
81350814a2baSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81360814a2baSmrg        # All Alpha code is PIC.
81370814a2baSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
813863847c39Smrg        ;;
81390814a2baSmrg      xl* | bgxl* | bgf* | mpixl*)
81400814a2baSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
81410814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81420814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
81430814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
81440814a2baSmrg	;;
81450814a2baSmrg      *)
81460814a2baSmrg	case `$CC -V 2>&1 | $SED 5q` in
81470814a2baSmrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
81480814a2baSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
81490814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81500814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81510814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
81520814a2baSmrg	  ;;
81530814a2baSmrg	*Sun\ F* | *Sun*Fortran*)
81540814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81550814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81560814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
81570814a2baSmrg	  ;;
81580814a2baSmrg	*Sun\ C*)
81590814a2baSmrg	  # Sun C 5.9
81600814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81610814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81620814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81630814a2baSmrg	  ;;
81640814a2baSmrg        *Intel*\ [[CF]]*Compiler*)
81650814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81660814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
81670814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
81680814a2baSmrg	  ;;
81690814a2baSmrg	*Portland\ Group*)
81700814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81710814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
81720814a2baSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81730814a2baSmrg	  ;;
81740814a2baSmrg	esac
81750814a2baSmrg	;;
81760814a2baSmrg      esac
81770814a2baSmrg      ;;
817863847c39Smrg
81790814a2baSmrg    newsos6)
81800814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81810814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81820814a2baSmrg      ;;
818363847c39Smrg
81840814a2baSmrg    *nto* | *qnx*)
81850814a2baSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
81860814a2baSmrg      # it will coredump.
81870814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
81880814a2baSmrg      ;;
818963847c39Smrg
81900814a2baSmrg    osf3* | osf4* | osf5*)
81910814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81920814a2baSmrg      # All OSF/1 code is PIC.
81930814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
81940814a2baSmrg      ;;
819563847c39Smrg
81960814a2baSmrg    rdos*)
81970814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
81980814a2baSmrg      ;;
819963847c39Smrg
82000814a2baSmrg    solaris*)
82010814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
82020814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82030814a2baSmrg      case $cc_basename in
82040814a2baSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
82050814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
82060814a2baSmrg      *)
82070814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
82080814a2baSmrg      esac
82090814a2baSmrg      ;;
821063847c39Smrg
82110814a2baSmrg    sunos4*)
82120814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
82130814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
82140814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82150814a2baSmrg      ;;
821663847c39Smrg
82170814a2baSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
82180814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82190814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
82200814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82210814a2baSmrg      ;;
822263847c39Smrg
82230814a2baSmrg    sysv4*MP*)
82240814a2baSmrg      if test -d /usr/nec; then
82250814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
82260814a2baSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82270814a2baSmrg      fi
82280814a2baSmrg      ;;
822963847c39Smrg
82300814a2baSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
82310814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82320814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
82330814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82340814a2baSmrg      ;;
823563847c39Smrg
82360814a2baSmrg    unicos*)
82370814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
82380814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
82390814a2baSmrg      ;;
82400814a2baSmrg
82410814a2baSmrg    uts4*)
82420814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
82430814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
82440814a2baSmrg      ;;
82450814a2baSmrg
82460814a2baSmrg    *)
82470814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
82480814a2baSmrg      ;;
82490814a2baSmrg    esac
82500814a2baSmrg  fi
825163847c39Smrg])
82520814a2baSmrgcase $host_os in
82530814a2baSmrg  # For platforms that do not support PIC, -DPIC is meaningless:
82540814a2baSmrg  *djgpp*)
82550814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
82560814a2baSmrg    ;;
82570814a2baSmrg  *)
82580814a2baSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
82590814a2baSmrg    ;;
82600814a2baSmrgesac
826163847c39Smrg
82620814a2baSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
82630814a2baSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
82640814a2baSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
82650814a2baSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
826663847c39Smrg
82670814a2baSmrg#
82680814a2baSmrg# Check to make sure the PIC flag actually works.
82690814a2baSmrg#
82700814a2baSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
82710814a2baSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
82720814a2baSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
82730814a2baSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
82740814a2baSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
82750814a2baSmrg     "" | " "*) ;;
82760814a2baSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
82770814a2baSmrg     esac],
82780814a2baSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
82790814a2baSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
82800814a2baSmrgfi
82810814a2baSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
82820814a2baSmrg	[Additional compiler flags for building library objects])
82830814a2baSmrg
82840814a2baSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
82850814a2baSmrg	[How to pass a linker flag through the compiler])
82860814a2baSmrg#
82870814a2baSmrg# Check to make sure the static flag actually works.
82880814a2baSmrg#
82890814a2baSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
82900814a2baSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
82910814a2baSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
82920814a2baSmrg  $lt_tmp_static_flag,
82930814a2baSmrg  [],
82940814a2baSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
82950814a2baSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
82960814a2baSmrg	[Compiler flag to prevent dynamic linking])
82970814a2baSmrg])# _LT_COMPILER_PIC
829863847c39Smrg
829963847c39Smrg
83000814a2baSmrg# _LT_LINKER_SHLIBS([TAGNAME])
83010814a2baSmrg# ----------------------------
83020814a2baSmrg# See if the linker supports building shared libraries.
83030814a2baSmrgm4_defun([_LT_LINKER_SHLIBS],
83040814a2baSmrg[AC_REQUIRE([LT_PATH_LD])dnl
83050814a2baSmrgAC_REQUIRE([LT_PATH_NM])dnl
83060814a2baSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
83070814a2baSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
83080814a2baSmrgm4_require([_LT_DECL_EGREP])dnl
83090814a2baSmrgm4_require([_LT_DECL_SED])dnl
83100814a2baSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
83110814a2baSmrgm4_require([_LT_TAG_COMPILER])dnl
83120814a2baSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
83130814a2baSmrgm4_if([$1], [CXX], [
83140814a2baSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
83150814a2baSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
83160814a2baSmrg  case $host_os in
83170814a2baSmrg  aix[[4-9]]*)
83180814a2baSmrg    # If we're using GNU nm, then we don't want the "-C" option.
83190814a2baSmrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
83200814a2baSmrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
83210814a2baSmrg    # weak defined symbols like other global defined symbols, whereas
83220814a2baSmrg    # GNU nm marks them as "W".
83230814a2baSmrg    # While the 'weak' keyword is ignored in the Export File, we need
83240814a2baSmrg    # it in the Import File for the 'aix-soname' feature, so we have
83250814a2baSmrg    # to replace the "-B" option with "-P" for AIX nm.
83260814a2baSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
83270814a2baSmrg      _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'
83280814a2baSmrg    else
83290814a2baSmrg      _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'
83300814a2baSmrg    fi
83310814a2baSmrg    ;;
83320814a2baSmrg  pw32*)
83330814a2baSmrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
83340814a2baSmrg    ;;
83350814a2baSmrg  cygwin* | mingw* | cegcc*)
83360814a2baSmrg    case $cc_basename in
83370814a2baSmrg    cl* | icl*)
83380814a2baSmrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
83390814a2baSmrg      ;;
83400814a2baSmrg    *)
83410814a2baSmrg      _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'
83420814a2baSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
83430814a2baSmrg      ;;
83440814a2baSmrg    esac
83450814a2baSmrg    ;;
83460814a2baSmrg  *)
83470814a2baSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
83480814a2baSmrg    ;;
83490814a2baSmrg  esac
83500814a2baSmrg], [
83510814a2baSmrg  runpath_var=
83520814a2baSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
83530814a2baSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
83540814a2baSmrg  _LT_TAGVAR(archive_cmds, $1)=
83550814a2baSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
83560814a2baSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
83570814a2baSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
83580814a2baSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
83590814a2baSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
83600814a2baSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
83610814a2baSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
83620814a2baSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
83630814a2baSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
83640814a2baSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
83650814a2baSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
83660814a2baSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
83670814a2baSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
83680814a2baSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
83690814a2baSmrg  _LT_TAGVAR(module_cmds, $1)=
83700814a2baSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
83710814a2baSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
83720814a2baSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
83730814a2baSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
83740814a2baSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
83750814a2baSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
83760814a2baSmrg  # included in the symbol list
83770814a2baSmrg  _LT_TAGVAR(include_expsyms, $1)=
83780814a2baSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
83790814a2baSmrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
83800814a2baSmrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
83810814a2baSmrg  # as well as any symbol that contains 'd'.
83820814a2baSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
83830814a2baSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
83840814a2baSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
83850814a2baSmrg  # the symbol is explicitly referenced.  Since portable code cannot
83860814a2baSmrg  # rely on this symbol name, it's probably fine to never include it in
83870814a2baSmrg  # preloaded symbol tables.
83880814a2baSmrg  # Exclude shared library initialization/finalization symbols.
83890814a2baSmrgdnl Note also adjust exclude_expsyms for C++ above.
83900814a2baSmrg  extract_expsyms_cmds=
839163847c39Smrg
83920814a2baSmrg  case $host_os in
83930814a2baSmrg  cygwin* | mingw* | pw32* | cegcc*)
83940814a2baSmrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
83950814a2baSmrg    # When not using gcc, we currently assume that we are using
83960814a2baSmrg    # Microsoft Visual C++ or Intel C++ Compiler.
83970814a2baSmrg    if test yes != "$GCC"; then
83980814a2baSmrg      with_gnu_ld=no
83990814a2baSmrg    fi
84000814a2baSmrg    ;;
84010814a2baSmrg  interix*)
84020814a2baSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
84030814a2baSmrg    with_gnu_ld=yes
84040814a2baSmrg    ;;
84050814a2baSmrg  openbsd* | bitrig*)
84060814a2baSmrg    with_gnu_ld=no
84070814a2baSmrg    ;;
84080814a2baSmrg  esac
840963847c39Smrg
84100814a2baSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
841163847c39Smrg
84120814a2baSmrg  # On some targets, GNU ld is compatible enough with the native linker
84130814a2baSmrg  # that we're better off using the native interface for both.
84140814a2baSmrg  lt_use_gnu_ld_interface=no
84150814a2baSmrg  if test yes = "$with_gnu_ld"; then
84160814a2baSmrg    case $host_os in
84170814a2baSmrg      aix*)
84180814a2baSmrg	# The AIX port of GNU ld has always aspired to compatibility
84190814a2baSmrg	# with the native linker.  However, as the warning in the GNU ld
84200814a2baSmrg	# block says, versions before 2.19.5* couldn't really create working
84210814a2baSmrg	# shared libraries, regardless of the interface used.
84220814a2baSmrg	case `$LD -v 2>&1` in
84230814a2baSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
84240814a2baSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
84250814a2baSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
84260814a2baSmrg	  *)
84270814a2baSmrg	    lt_use_gnu_ld_interface=yes
84280814a2baSmrg	    ;;
84290814a2baSmrg	esac
84300814a2baSmrg	;;
84310814a2baSmrg      *)
84320814a2baSmrg	lt_use_gnu_ld_interface=yes
84330814a2baSmrg	;;
84340814a2baSmrg    esac
84350814a2baSmrg  fi
843663847c39Smrg
84370814a2baSmrg  if test yes = "$lt_use_gnu_ld_interface"; then
84380814a2baSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
84390814a2baSmrg    wlarc='$wl'
844063847c39Smrg
84410814a2baSmrg    # Set some defaults for GNU ld with shared library support. These
84420814a2baSmrg    # are reset later if shared libraries are not supported. Putting them
84430814a2baSmrg    # here allows them to be overridden if necessary.
84440814a2baSmrg    runpath_var=LD_RUN_PATH
84450814a2baSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
84460814a2baSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
84470814a2baSmrg    # ancient GNU ld didn't support --whole-archive et. al.
84480814a2baSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
84490814a2baSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
84500814a2baSmrg    else
84510814a2baSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
84520814a2baSmrg    fi
84530814a2baSmrg    supports_anon_versioning=no
84540814a2baSmrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
84550814a2baSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
84560814a2baSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
84570814a2baSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
84580814a2baSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
84590814a2baSmrg      *\ 2.11.*) ;; # other 2.11 versions
84600814a2baSmrg      *) supports_anon_versioning=yes ;;
84610814a2baSmrg    esac
846263847c39Smrg
84630814a2baSmrg    # See if GNU ld supports shared libraries.
84640814a2baSmrg    case $host_os in
84650814a2baSmrg    aix[[3-9]]*)
84660814a2baSmrg      # On AIX/PPC, the GNU linker is very broken
84670814a2baSmrg      if test ia64 != "$host_cpu"; then
84680814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
84690814a2baSmrg	cat <<_LT_EOF 1>&2
847063847c39Smrg
84710814a2baSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
84720814a2baSmrg*** to be unable to reliably create shared libraries on AIX.
84730814a2baSmrg*** Therefore, libtool is disabling shared libraries support.  If you
84740814a2baSmrg*** really care for shared libraries, you may want to install binutils
84750814a2baSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
84760814a2baSmrg*** You will then need to restart the configuration process.
847763847c39Smrg
84780814a2baSmrg_LT_EOF
84790814a2baSmrg      fi
84800814a2baSmrg      ;;
848163847c39Smrg
84820814a2baSmrg    amigaos*)
84830814a2baSmrg      case $host_cpu in
84840814a2baSmrg      powerpc)
84850814a2baSmrg            # see comment about AmigaOS4 .so support
84860814a2baSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
84870814a2baSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
84880814a2baSmrg        ;;
84890814a2baSmrg      m68k)
84900814a2baSmrg            _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)'
84910814a2baSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
84920814a2baSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
84930814a2baSmrg        ;;
84940814a2baSmrg      esac
84950814a2baSmrg      ;;
849663847c39Smrg
84970814a2baSmrg    beos*)
84980814a2baSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
84990814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
85000814a2baSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
85010814a2baSmrg	# support --undefined.  This deserves some investigation.  FIXME
85020814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85030814a2baSmrg      else
85040814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
85050814a2baSmrg      fi
85060814a2baSmrg      ;;
850763847c39Smrg
85080814a2baSmrg    cygwin* | mingw* | pw32* | cegcc*)
85090814a2baSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
85100814a2baSmrg      # as there is no search path for DLLs.
85110814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
85120814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
85130814a2baSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
85140814a2baSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
85150814a2baSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
85160814a2baSmrg      _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'
85170814a2baSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
851863847c39Smrg
85190814a2baSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
85200814a2baSmrg        _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'
85210814a2baSmrg	# If the export-symbols file already is a .def file, use it as
85220814a2baSmrg	# is; otherwise, prepend EXPORTS...
85230814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
85240814a2baSmrg          cp $export_symbols $output_objdir/$soname.def;
85250814a2baSmrg        else
85260814a2baSmrg          echo EXPORTS > $output_objdir/$soname.def;
85270814a2baSmrg          cat $export_symbols >> $output_objdir/$soname.def;
85280814a2baSmrg        fi~
85290814a2baSmrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
85300814a2baSmrg      else
85310814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
85320814a2baSmrg      fi
85330814a2baSmrg      ;;
853463847c39Smrg
85350814a2baSmrg    haiku*)
85360814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85370814a2baSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
85380814a2baSmrg      ;;
853963847c39Smrg
85400814a2baSmrg    os2*)
85410814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
85420814a2baSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
85430814a2baSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
85440814a2baSmrg      shrext_cmds=.dll
85450814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
85460814a2baSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
85470814a2baSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
85480814a2baSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
85490814a2baSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
85500814a2baSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85510814a2baSmrg	emximp -o $lib $output_objdir/$libname.def'
85520814a2baSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
85530814a2baSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
85540814a2baSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
85550814a2baSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
85560814a2baSmrg	prefix_cmds="$SED"~
85570814a2baSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
85580814a2baSmrg	  prefix_cmds="$prefix_cmds -e 1d";
85590814a2baSmrg	fi~
85600814a2baSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
85610814a2baSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
85620814a2baSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85630814a2baSmrg	emximp -o $lib $output_objdir/$libname.def'
85640814a2baSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
85650814a2baSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
85660814a2baSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
85670814a2baSmrg      ;;
856863847c39Smrg
85690814a2baSmrg    interix[[3-9]]*)
85700814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
85710814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
85720814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
85730814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
85740814a2baSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
85750814a2baSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
85760814a2baSmrg      # default) and relocated if they conflict, which is a slow very memory
85770814a2baSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
85780814a2baSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
85790814a2baSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
85800814a2baSmrg      _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'
85810814a2baSmrg      _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'
85820814a2baSmrg      ;;
858363847c39Smrg
85840814a2baSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
85850814a2baSmrg      tmp_diet=no
85860814a2baSmrg      if test linux-dietlibc = "$host_os"; then
85870814a2baSmrg	case $cc_basename in
85880814a2baSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
85890814a2baSmrg	esac
85900814a2baSmrg      fi
85910814a2baSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
85920814a2baSmrg	 && test no = "$tmp_diet"
85930814a2baSmrg      then
85940814a2baSmrg	tmp_addflag=' $pic_flag'
85950814a2baSmrg	tmp_sharedflag='-shared'
85960814a2baSmrg	case $cc_basename,$host_cpu in
85970814a2baSmrg        pgcc*)				# Portland Group C compiler
85980814a2baSmrg	  _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'
85990814a2baSmrg	  tmp_addflag=' $pic_flag'
86000814a2baSmrg	  ;;
86010814a2baSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
86020814a2baSmrg					# Portland Group f77 and f90 compilers
86030814a2baSmrg	  _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'
86040814a2baSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
86050814a2baSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
86060814a2baSmrg	  tmp_addflag=' -i_dynamic' ;;
86070814a2baSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
86080814a2baSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
86090814a2baSmrg	ifc* | ifort*)			# Intel Fortran compiler
86100814a2baSmrg	  tmp_addflag=' -nofor_main' ;;
86110814a2baSmrg	lf95*)				# Lahey Fortran 8.1
86120814a2baSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
86130814a2baSmrg	  tmp_sharedflag='--shared' ;;
86140814a2baSmrg        nagfor*)                        # NAGFOR 5.3
86150814a2baSmrg          tmp_sharedflag='-Wl,-shared' ;;
86160814a2baSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
86170814a2baSmrg	  tmp_sharedflag='-qmkshrobj'
86180814a2baSmrg	  tmp_addflag= ;;
86190814a2baSmrg	nvcc*)	# Cuda Compiler Driver 2.2
86200814a2baSmrg	  _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'
86210814a2baSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
86220814a2baSmrg	  ;;
86230814a2baSmrg	esac
86240814a2baSmrg	case `$CC -V 2>&1 | $SED 5q` in
86250814a2baSmrg	*Sun\ C*)			# Sun C 5.9
86260814a2baSmrg	  _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'
86270814a2baSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
86280814a2baSmrg	  tmp_sharedflag='-G' ;;
86290814a2baSmrg	*Sun\ F*)			# Sun Fortran 8.3
86300814a2baSmrg	  tmp_sharedflag='-G' ;;
86310814a2baSmrg	esac
86320814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
863363847c39Smrg
86340814a2baSmrg        if test yes = "$supports_anon_versioning"; then
86350814a2baSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
86360814a2baSmrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
86370814a2baSmrg            echo "local: *; };" >> $output_objdir/$libname.ver~
86380814a2baSmrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
86390814a2baSmrg        fi
864063847c39Smrg
86410814a2baSmrg	case $cc_basename in
86420814a2baSmrg	tcc*)
86430814a2baSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
86440814a2baSmrg	  ;;
86450814a2baSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
86460814a2baSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
86470814a2baSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
86480814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
86490814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
86500814a2baSmrg	  if test yes = "$supports_anon_versioning"; then
86510814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
86520814a2baSmrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
86530814a2baSmrg              echo "local: *; };" >> $output_objdir/$libname.ver~
86540814a2baSmrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
86550814a2baSmrg	  fi
86560814a2baSmrg	  ;;
86570814a2baSmrg	esac
86580814a2baSmrg      else
86590814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
86600814a2baSmrg      fi
866163847c39Smrg      ;;
866263847c39Smrg
86630814a2baSmrg    netbsd*)
86640814a2baSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
86650814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
86660814a2baSmrg	wlarc=
86670814a2baSmrg      else
86680814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
86690814a2baSmrg	_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'
86700814a2baSmrg      fi
86710814a2baSmrg      ;;
867263847c39Smrg
86730814a2baSmrg    solaris*)
86740814a2baSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
86750814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
86760814a2baSmrg	cat <<_LT_EOF 1>&2
867763847c39Smrg
86780814a2baSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
86790814a2baSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
86800814a2baSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
86810814a2baSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
86820814a2baSmrg*** your PATH or compiler configuration so that the native linker is
86830814a2baSmrg*** used, and then restart.
868463847c39Smrg
86850814a2baSmrg_LT_EOF
86860814a2baSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
86870814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
86880814a2baSmrg	_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'
86890814a2baSmrg      else
86900814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
86910814a2baSmrg      fi
86920814a2baSmrg      ;;
869363847c39Smrg
86940814a2baSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
86950814a2baSmrg      case `$LD -v 2>&1` in
86960814a2baSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
86970814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
86980814a2baSmrg	cat <<_LT_EOF 1>&2
869963847c39Smrg
87000814a2baSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
87010814a2baSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
87020814a2baSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
87030814a2baSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
87040814a2baSmrg*** your PATH or compiler configuration so that the native linker is
87050814a2baSmrg*** used, and then restart.
870663847c39Smrg
87070814a2baSmrg_LT_EOF
87080814a2baSmrg	;;
87090814a2baSmrg	*)
87100814a2baSmrg	  # For security reasons, it is highly recommended that you always
87110814a2baSmrg	  # use absolute paths for naming shared libraries, and exclude the
87120814a2baSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
87130814a2baSmrg	  # requires that you compile everything twice, which is a pain.
87140814a2baSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
87150814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
87160814a2baSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
87170814a2baSmrg	    _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'
87180814a2baSmrg	  else
87190814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
87200814a2baSmrg	  fi
87210814a2baSmrg	;;
87220814a2baSmrg      esac
87230814a2baSmrg      ;;
872463847c39Smrg
87250814a2baSmrg    sunos4*)
87260814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
87270814a2baSmrg      wlarc=
87280814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
87290814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
87300814a2baSmrg      ;;
873163847c39Smrg
873263847c39Smrg    *)
87330814a2baSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
87340814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
87350814a2baSmrg	_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'
87360814a2baSmrg      else
87370814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
87380814a2baSmrg      fi
873963847c39Smrg      ;;
87400814a2baSmrg    esac
874163847c39Smrg
87420814a2baSmrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
87430814a2baSmrg      runpath_var=
87440814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
87450814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
87460814a2baSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
87470814a2baSmrg    fi
87480814a2baSmrg  else
87490814a2baSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
87500814a2baSmrg    case $host_os in
87510814a2baSmrg    aix3*)
87520814a2baSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
87530814a2baSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
87540814a2baSmrg      _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'
87550814a2baSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
87560814a2baSmrg      # are no directories specified by -L.
87570814a2baSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
87580814a2baSmrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
87590814a2baSmrg	# Neither direct hardcoding nor static linking is supported with a
87600814a2baSmrg	# broken collect2.
87610814a2baSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
87620814a2baSmrg      fi
87630814a2baSmrg      ;;
876463847c39Smrg
87650814a2baSmrg    aix[[4-9]]*)
87660814a2baSmrg      if test ia64 = "$host_cpu"; then
87670814a2baSmrg	# On IA64, the linker does run time linking by default, so we don't
87680814a2baSmrg	# have to do anything special.
87690814a2baSmrg	aix_use_runtimelinking=no
87700814a2baSmrg	exp_sym_flag='-Bexport'
87710814a2baSmrg	no_entry_flag=
87720814a2baSmrg      else
87730814a2baSmrg	# If we're using GNU nm, then we don't want the "-C" option.
87740814a2baSmrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
87750814a2baSmrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
87760814a2baSmrg	# weak defined symbols like other global defined symbols, whereas
87770814a2baSmrg	# GNU nm marks them as "W".
87780814a2baSmrg	# While the 'weak' keyword is ignored in the Export File, we need
87790814a2baSmrg	# it in the Import File for the 'aix-soname' feature, so we have
87800814a2baSmrg	# to replace the "-B" option with "-P" for AIX nm.
87810814a2baSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
87820814a2baSmrg	  _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'
87830814a2baSmrg	else
87840814a2baSmrg	  _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'
87850814a2baSmrg	fi
87860814a2baSmrg	aix_use_runtimelinking=no
878763847c39Smrg
87880814a2baSmrg	# Test if we are trying to use run time linking or normal
87890814a2baSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
87900814a2baSmrg	# have runtime linking enabled, and use it for executables.
87910814a2baSmrg	# For shared libraries, we enable/disable runtime linking
87920814a2baSmrg	# depending on the kind of the shared library created -
87930814a2baSmrg	# when "with_aix_soname,aix_use_runtimelinking" is:
87940814a2baSmrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
87950814a2baSmrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
87960814a2baSmrg	#            lib.a           static archive
87970814a2baSmrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
87980814a2baSmrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
87990814a2baSmrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
88000814a2baSmrg	#            lib.a(lib.so.V) shared, rtl:no
88010814a2baSmrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
88020814a2baSmrg	#            lib.a           static archive
88030814a2baSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
88040814a2baSmrg	  for ld_flag in $LDFLAGS; do
88050814a2baSmrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
88060814a2baSmrg	    aix_use_runtimelinking=yes
88070814a2baSmrg	    break
88080814a2baSmrg	  fi
88090814a2baSmrg	  done
88100814a2baSmrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
88110814a2baSmrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
88120814a2baSmrg	    # so we don't have lib.a shared libs to link our executables.
88130814a2baSmrg	    # We have to force runtime linking in this case.
88140814a2baSmrg	    aix_use_runtimelinking=yes
88150814a2baSmrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
88160814a2baSmrg	  fi
88170814a2baSmrg	  ;;
88180814a2baSmrg	esac
881963847c39Smrg
88200814a2baSmrg	exp_sym_flag='-bexport'
88210814a2baSmrg	no_entry_flag='-bnoentry'
88220814a2baSmrg      fi
882363847c39Smrg
88240814a2baSmrg      # When large executables or shared objects are built, AIX ld can
88250814a2baSmrg      # have problems creating the table of contents.  If linking a library
88260814a2baSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
88270814a2baSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
88280814a2baSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
882963847c39Smrg
88300814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)=''
88310814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
88320814a2baSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
88330814a2baSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
88340814a2baSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
88350814a2baSmrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
88360814a2baSmrg      case $with_aix_soname,$aix_use_runtimelinking in
88370814a2baSmrg      aix,*) ;; # traditional, no import file
88380814a2baSmrg      svr4,* | *,yes) # use import file
88390814a2baSmrg	# The Import File defines what to hardcode.
88400814a2baSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
88410814a2baSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
88420814a2baSmrg	;;
88430814a2baSmrg      esac
884463847c39Smrg
88450814a2baSmrg      if test yes = "$GCC"; then
88460814a2baSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
88470814a2baSmrg	# We only want to do this on AIX 4.2 and lower, the check
88480814a2baSmrg	# below for broken collect2 doesn't work under 4.3+
88490814a2baSmrg	  collect2name=`$CC -print-prog-name=collect2`
88500814a2baSmrg	  if test -f "$collect2name" &&
88510814a2baSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
88520814a2baSmrg	  then
88530814a2baSmrg	  # We have reworked collect2
88540814a2baSmrg	  :
88550814a2baSmrg	  else
88560814a2baSmrg	  # We have old collect2
88570814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
88580814a2baSmrg	  # It fails to find uninstalled libraries when the uninstalled
88590814a2baSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
88600814a2baSmrg	  # to unsupported forces relinking
88610814a2baSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
88620814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
88630814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
88640814a2baSmrg	  fi
88650814a2baSmrg	  ;;
88660814a2baSmrg	esac
88670814a2baSmrg	shared_flag='-shared'
88680814a2baSmrg	if test yes = "$aix_use_runtimelinking"; then
88690814a2baSmrg	  shared_flag="$shared_flag "'$wl-G'
88700814a2baSmrg	fi
88710814a2baSmrg	# Need to ensure runtime linking is disabled for the traditional
88720814a2baSmrg	# shared library, or the linker may eventually find shared libraries
88730814a2baSmrg	# /with/ Import File - we do not want to mix them.
88740814a2baSmrg	shared_flag_aix='-shared'
88750814a2baSmrg	shared_flag_svr4='-shared $wl-G'
88760814a2baSmrg      else
88770814a2baSmrg	# not using gcc
88780814a2baSmrg	if test ia64 = "$host_cpu"; then
88790814a2baSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
88800814a2baSmrg	# chokes on -Wl,-G. The following line is correct:
88810814a2baSmrg	  shared_flag='-G'
88820814a2baSmrg	else
88830814a2baSmrg	  if test yes = "$aix_use_runtimelinking"; then
88840814a2baSmrg	    shared_flag='$wl-G'
88850814a2baSmrg	  else
88860814a2baSmrg	    shared_flag='$wl-bM:SRE'
88870814a2baSmrg	  fi
88880814a2baSmrg	  shared_flag_aix='$wl-bM:SRE'
88890814a2baSmrg	  shared_flag_svr4='$wl-G'
88900814a2baSmrg	fi
88910814a2baSmrg      fi
889263847c39Smrg
88930814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
88940814a2baSmrg      # It seems that -bexpall does not export symbols beginning with
88950814a2baSmrg      # underscore (_), so it is better to generate a list of symbols to export.
88960814a2baSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
88970814a2baSmrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
88980814a2baSmrg	# Warning - without using the other runtime loading flags (-brtl),
88990814a2baSmrg	# -berok will link without error, but may produce a broken library.
89000814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
89010814a2baSmrg        # Determine the default libpath from the value encoded in an
89020814a2baSmrg        # empty executable.
89030814a2baSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
89040814a2baSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
89050814a2baSmrg        _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
89060814a2baSmrg      else
89070814a2baSmrg	if test ia64 = "$host_cpu"; then
89080814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
89090814a2baSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
89100814a2baSmrg	  _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"
89110814a2baSmrg	else
89120814a2baSmrg	 # Determine the default libpath from the value encoded in an
89130814a2baSmrg	 # empty executable.
89140814a2baSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
89150814a2baSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
89160814a2baSmrg	  # Warning - without using the other run time loading flags,
89170814a2baSmrg	  # -berok will link without error, but may produce a broken library.
89180814a2baSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
89190814a2baSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
89200814a2baSmrg	  if test yes = "$with_gnu_ld"; then
89210814a2baSmrg	    # We only use this code for GNU lds that support --whole-archive.
89220814a2baSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
89230814a2baSmrg	  else
89240814a2baSmrg	    # Exported symbols can be pulled into shared objects from archives
89250814a2baSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
89260814a2baSmrg	  fi
89270814a2baSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
89280814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
89290814a2baSmrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
89300814a2baSmrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
89310814a2baSmrg	  if test svr4 != "$with_aix_soname"; then
89320814a2baSmrg	    # This is similar to how AIX traditionally builds its shared libraries.
89330814a2baSmrg	    _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'
89340814a2baSmrg	  fi
89350814a2baSmrg	  if test aix != "$with_aix_soname"; then
89360814a2baSmrg	    _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'
89370814a2baSmrg	  else
89380814a2baSmrg	    # used by -dlpreopen to get the symbols
89390814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
89400814a2baSmrg	  fi
89410814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
894263847c39Smrg	fi
89430814a2baSmrg      fi
894463847c39Smrg      ;;
894563847c39Smrg
89460814a2baSmrg    amigaos*)
89470814a2baSmrg      case $host_cpu in
89480814a2baSmrg      powerpc)
89490814a2baSmrg            # see comment about AmigaOS4 .so support
89500814a2baSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
89510814a2baSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
89520814a2baSmrg        ;;
89530814a2baSmrg      m68k)
89540814a2baSmrg            _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)'
89550814a2baSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
89560814a2baSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
89570814a2baSmrg        ;;
89580814a2baSmrg      esac
89590814a2baSmrg      ;;
896063847c39Smrg
89610814a2baSmrg    bsdi[[45]]*)
89620814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
89630814a2baSmrg      ;;
896463847c39Smrg
89650814a2baSmrg    cygwin* | mingw* | pw32* | cegcc*)
89660814a2baSmrg      # When not using gcc, we currently assume that we are using
89670814a2baSmrg      # Microsoft Visual C++ or Intel C++ Compiler.
89680814a2baSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
89690814a2baSmrg      # no search path for DLLs.
89700814a2baSmrg      case $cc_basename in
89710814a2baSmrg      cl* | icl*)
89720814a2baSmrg	# Native MSVC or ICC
89730814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
89740814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
89750814a2baSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
89760814a2baSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
89770814a2baSmrg	# Tell ltmain to make .lib files, not .a files.
89780814a2baSmrg	libext=lib
89790814a2baSmrg	# Tell ltmain to make .dll files, not .so files.
89800814a2baSmrg	shrext_cmds=.dll
89810814a2baSmrg	# FIXME: Setting linknames here is a bad hack.
89820814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
89830814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
89840814a2baSmrg            cp "$export_symbols" "$output_objdir/$soname.def";
89850814a2baSmrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
89860814a2baSmrg          else
89870814a2baSmrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
89880814a2baSmrg          fi~
89890814a2baSmrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
89900814a2baSmrg          linknames='
89910814a2baSmrg	# The linker will not automatically build a static lib if we build a DLL.
89920814a2baSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
89930814a2baSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
89940814a2baSmrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
89950814a2baSmrg	_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'
89960814a2baSmrg	# Don't use ranlib
89970814a2baSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
89980814a2baSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
89990814a2baSmrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
90000814a2baSmrg          case $lt_outputfile in
90010814a2baSmrg            *.exe|*.EXE) ;;
90020814a2baSmrg            *)
90030814a2baSmrg              lt_outputfile=$lt_outputfile.exe
90040814a2baSmrg              lt_tool_outputfile=$lt_tool_outputfile.exe
90050814a2baSmrg              ;;
90060814a2baSmrg          esac~
90070814a2baSmrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
90080814a2baSmrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
90090814a2baSmrg            $RM "$lt_outputfile.manifest";
90100814a2baSmrg          fi'
90110814a2baSmrg	;;
90120814a2baSmrg      *)
90130814a2baSmrg	# Assume MSVC and ICC wrapper
90140814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
90150814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
90160814a2baSmrg	# Tell ltmain to make .lib files, not .a files.
90170814a2baSmrg	libext=lib
90180814a2baSmrg	# Tell ltmain to make .dll files, not .so files.
90190814a2baSmrg	shrext_cmds=.dll
90200814a2baSmrg	# FIXME: Setting linknames here is a bad hack.
90210814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
90220814a2baSmrg	# The linker will automatically build a .lib file if we build a DLL.
90230814a2baSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
90240814a2baSmrg	# FIXME: Should let the user specify the lib program.
90250814a2baSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
90260814a2baSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
90270814a2baSmrg	;;
90280814a2baSmrg      esac
90290814a2baSmrg      ;;
903063847c39Smrg
90310814a2baSmrg    darwin* | rhapsody*)
90320814a2baSmrg      _LT_DARWIN_LINKER_FEATURES($1)
903363847c39Smrg      ;;
903463847c39Smrg
90350814a2baSmrg    dgux*)
90360814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
90370814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
90380814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90390814a2baSmrg      ;;
904063847c39Smrg
90410814a2baSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
90420814a2baSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
90430814a2baSmrg    # does not break anything, and helps significantly (at the cost of a little
90440814a2baSmrg    # extra space).
90450814a2baSmrg    freebsd2.2*)
90460814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
90470814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
90480814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
90490814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90500814a2baSmrg      ;;
905163847c39Smrg
90520814a2baSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
90530814a2baSmrg    freebsd2.*)
90540814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
90550814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
90560814a2baSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
90570814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90580814a2baSmrg      ;;
905963847c39Smrg
90600814a2baSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
90610814a2baSmrg    freebsd* | dragonfly* | midnightbsd*)
90620814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
90630814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
90640814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
90650814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90660814a2baSmrg      ;;
906763847c39Smrg
90680814a2baSmrg    hpux9*)
90690814a2baSmrg      if test yes = "$GCC"; then
90700814a2baSmrg	_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'
90710814a2baSmrg      else
90720814a2baSmrg	_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'
90730814a2baSmrg      fi
90740814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
90750814a2baSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
90760814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
907763847c39Smrg
90780814a2baSmrg      # hardcode_minus_L: Not really in the search PATH,
90790814a2baSmrg      # but as the default location of the library.
90800814a2baSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
90810814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
90820814a2baSmrg      ;;
908363847c39Smrg
90840814a2baSmrg    hpux10*)
90850814a2baSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
90860814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
90870814a2baSmrg      else
90880814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
90890814a2baSmrg      fi
90900814a2baSmrg      if test no = "$with_gnu_ld"; then
90910814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
90920814a2baSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
90930814a2baSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
90940814a2baSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
90950814a2baSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
90960814a2baSmrg	# hardcode_minus_L: Not really in the search PATH,
90970814a2baSmrg	# but as the default location of the library.
90980814a2baSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
90990814a2baSmrg      fi
91000814a2baSmrg      ;;
910163847c39Smrg
91020814a2baSmrg    hpux11*)
91030814a2baSmrg      if test yes,no = "$GCC,$with_gnu_ld"; then
91040814a2baSmrg	case $host_cpu in
91050814a2baSmrg	hppa*64*)
91060814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
91070814a2baSmrg	  ;;
91080814a2baSmrg	ia64*)
91090814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
91100814a2baSmrg	  ;;
91110814a2baSmrg	*)
91120814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
91130814a2baSmrg	  ;;
91140814a2baSmrg	esac
91150814a2baSmrg      else
91160814a2baSmrg	case $host_cpu in
91170814a2baSmrg	hppa*64*)
91180814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
91190814a2baSmrg	  ;;
91200814a2baSmrg	ia64*)
91210814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
91220814a2baSmrg	  ;;
91230814a2baSmrg	*)
91240814a2baSmrg	m4_if($1, [], [
91250814a2baSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
91260814a2baSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
91270814a2baSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
91280814a2baSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
91290814a2baSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
91300814a2baSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
91310814a2baSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
91320814a2baSmrg	  ;;
91330814a2baSmrg	esac
91340814a2baSmrg      fi
91350814a2baSmrg      if test no = "$with_gnu_ld"; then
91360814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
91370814a2baSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
913863847c39Smrg
91390814a2baSmrg	case $host_cpu in
91400814a2baSmrg	hppa*64*|ia64*)
91410814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
91420814a2baSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
91430814a2baSmrg	  ;;
91440814a2baSmrg	*)
91450814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
91460814a2baSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
91470814a2baSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
914863847c39Smrg
91490814a2baSmrg	  # hardcode_minus_L: Not really in the search PATH,
91500814a2baSmrg	  # but as the default location of the library.
91510814a2baSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
91520814a2baSmrg	  ;;
91530814a2baSmrg	esac
91540814a2baSmrg      fi
91550814a2baSmrg      ;;
915663847c39Smrg
91570814a2baSmrg    irix5* | irix6* | nonstopux*)
91580814a2baSmrg      if test yes = "$GCC"; then
91590814a2baSmrg	_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'
91600814a2baSmrg	# Try to use the -exported_symbol ld option, if it does not
91610814a2baSmrg	# work, assume that -exports_file does not work either and
91620814a2baSmrg	# implicitly export all symbols.
91630814a2baSmrg	# This should be the same for all languages, so no per-tag cache variable.
91640814a2baSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
91650814a2baSmrg	  [lt_cv_irix_exported_symbol],
91660814a2baSmrg	  [save_LDFLAGS=$LDFLAGS
91670814a2baSmrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
91680814a2baSmrg	   AC_LINK_IFELSE(
91690814a2baSmrg	     [AC_LANG_SOURCE(
91700814a2baSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
91710814a2baSmrg			      [C++], [[int foo (void) { return 0; }]],
91720814a2baSmrg			      [Fortran 77], [[
91730814a2baSmrg      subroutine foo
91740814a2baSmrg      end]],
91750814a2baSmrg			      [Fortran], [[
91760814a2baSmrg      subroutine foo
91770814a2baSmrg      end]])])],
91780814a2baSmrg	      [lt_cv_irix_exported_symbol=yes],
91790814a2baSmrg	      [lt_cv_irix_exported_symbol=no])
91800814a2baSmrg           LDFLAGS=$save_LDFLAGS])
91810814a2baSmrg	if test yes = "$lt_cv_irix_exported_symbol"; then
91820814a2baSmrg          _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'
91830814a2baSmrg	fi
91840814a2baSmrg      else
91850814a2baSmrg	_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'
91860814a2baSmrg	_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'
91870814a2baSmrg      fi
91880814a2baSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
91890814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
91900814a2baSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
91910814a2baSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
91920814a2baSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
91930814a2baSmrg      ;;
919463847c39Smrg
91950814a2baSmrg    linux*)
91960814a2baSmrg      case $cc_basename in
91970814a2baSmrg      tcc*)
91980814a2baSmrg	# Fabrice Bellard et al's Tiny C Compiler
91990814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
92000814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
92010814a2baSmrg	;;
92020814a2baSmrg      esac
92030814a2baSmrg      ;;
920463847c39Smrg
92050814a2baSmrg    netbsd*)
92060814a2baSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
92070814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
92080814a2baSmrg      else
92090814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
92100814a2baSmrg      fi
92110814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
92120814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
92130814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
92140814a2baSmrg      ;;
921563847c39Smrg
92160814a2baSmrg    newsos6)
92170814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
92180814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
92190814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
92200814a2baSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
92210814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
92220814a2baSmrg      ;;
922363847c39Smrg
92240814a2baSmrg    *nto* | *qnx*)
92250814a2baSmrg      ;;
922663847c39Smrg
92270814a2baSmrg    openbsd* | bitrig*)
92280814a2baSmrg      if test -f /usr/libexec/ld.so; then
92290814a2baSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
92300814a2baSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
92310814a2baSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
92320814a2baSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
92330814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
92340814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
92350814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
92360814a2baSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
92370814a2baSmrg	else
92380814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
92390814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
92400814a2baSmrg	fi
92410814a2baSmrg      else
92420814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
92430814a2baSmrg      fi
92440814a2baSmrg      ;;
924563847c39Smrg
92460814a2baSmrg    os2*)
92470814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
92480814a2baSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
92490814a2baSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
92500814a2baSmrg      shrext_cmds=.dll
92510814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
92520814a2baSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
92530814a2baSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
92540814a2baSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
92550814a2baSmrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
92560814a2baSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
92570814a2baSmrg	emximp -o $lib $output_objdir/$libname.def'
92580814a2baSmrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
92590814a2baSmrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
92600814a2baSmrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
92610814a2baSmrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
92620814a2baSmrg	prefix_cmds="$SED"~
92630814a2baSmrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
92640814a2baSmrg	  prefix_cmds="$prefix_cmds -e 1d";
92650814a2baSmrg	fi~
92660814a2baSmrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
92670814a2baSmrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
92680814a2baSmrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
92690814a2baSmrg	emximp -o $lib $output_objdir/$libname.def'
92700814a2baSmrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
92710814a2baSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
92720814a2baSmrg      _LT_TAGVAR(file_list_spec, $1)='@'
92730814a2baSmrg      ;;
927463847c39Smrg
92750814a2baSmrg    osf3*)
92760814a2baSmrg      if test yes = "$GCC"; then
92770814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
92780814a2baSmrg	_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'
92790814a2baSmrg      else
92800814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
92810814a2baSmrg	_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'
92820814a2baSmrg      fi
92830814a2baSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
92840814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
92850814a2baSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
92860814a2baSmrg      ;;
928763847c39Smrg
92880814a2baSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
92890814a2baSmrg      if test yes = "$GCC"; then
92900814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
92910814a2baSmrg	_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'
92920814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
92930814a2baSmrg      else
92940814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
92950814a2baSmrg	_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'
92960814a2baSmrg	_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~
92970814a2baSmrg          $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'
929863847c39Smrg
92990814a2baSmrg	# Both c and cxx compiler support -rpath directly
93000814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
93010814a2baSmrg      fi
93020814a2baSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
93030814a2baSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
93040814a2baSmrg      ;;
930563847c39Smrg
93060814a2baSmrg    solaris*)
93070814a2baSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
93080814a2baSmrg      if test yes = "$GCC"; then
93090814a2baSmrg	wlarc='$wl'
93100814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
93110814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
93120814a2baSmrg          $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'
93130814a2baSmrg      else
93140814a2baSmrg	case `$CC -V 2>&1` in
93150814a2baSmrg	*"Compilers 5.0"*)
93160814a2baSmrg	  wlarc=''
93170814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
93180814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
93190814a2baSmrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
93200814a2baSmrg	  ;;
93210814a2baSmrg	*)
93220814a2baSmrg	  wlarc='$wl'
93230814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
93240814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
93250814a2baSmrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
93260814a2baSmrg	  ;;
93270814a2baSmrg	esac
93280814a2baSmrg      fi
93290814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
93300814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93310814a2baSmrg      case $host_os in
93320814a2baSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
93330814a2baSmrg      *)
93340814a2baSmrg	# The compiler driver will combine and reorder linker options,
93350814a2baSmrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
93360814a2baSmrg	# but is careful enough not to reorder.
93370814a2baSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
93380814a2baSmrg	if test yes = "$GCC"; then
93390814a2baSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
93400814a2baSmrg	else
93410814a2baSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
93420814a2baSmrg	fi
93430814a2baSmrg	;;
93440814a2baSmrg      esac
93450814a2baSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
93460814a2baSmrg      ;;
934763847c39Smrg
93480814a2baSmrg    sunos4*)
93490814a2baSmrg      if test sequent = "$host_vendor"; then
93500814a2baSmrg	# Use $CC to link under sequent, because it throws in some extra .o
93510814a2baSmrg	# files that make .init and .fini sections work.
93520814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
93530814a2baSmrg      else
93540814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
93550814a2baSmrg      fi
93560814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
93570814a2baSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
93580814a2baSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
93590814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93600814a2baSmrg      ;;
936163847c39Smrg
93620814a2baSmrg    sysv4)
93630814a2baSmrg      case $host_vendor in
93640814a2baSmrg	sni)
93650814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93660814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
93670814a2baSmrg	;;
93680814a2baSmrg	siemens)
93690814a2baSmrg	  ## LD is ld it makes a PLAMLIB
93700814a2baSmrg	  ## CC just makes a GrossModule.
93710814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
93720814a2baSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
93730814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
93740814a2baSmrg        ;;
93750814a2baSmrg	motorola)
93760814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93770814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
93780814a2baSmrg	;;
93790814a2baSmrg      esac
93800814a2baSmrg      runpath_var='LD_RUN_PATH'
93810814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93820814a2baSmrg      ;;
938363847c39Smrg
93840814a2baSmrg    sysv4.3*)
93850814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93860814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93870814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
93880814a2baSmrg      ;;
938963847c39Smrg
93900814a2baSmrg    sysv4*MP*)
93910814a2baSmrg      if test -d /usr/nec; then
93920814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93930814a2baSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93940814a2baSmrg	runpath_var=LD_RUN_PATH
93950814a2baSmrg	hardcode_runpath_var=yes
93960814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
93970814a2baSmrg      fi
93980814a2baSmrg      ;;
939963847c39Smrg
94000814a2baSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
94010814a2baSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
94020814a2baSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
94030814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94040814a2baSmrg      runpath_var='LD_RUN_PATH'
940563847c39Smrg
94060814a2baSmrg      if test yes = "$GCC"; then
94070814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94080814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94090814a2baSmrg      else
94100814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94110814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94120814a2baSmrg      fi
94130814a2baSmrg      ;;
941463847c39Smrg
94150814a2baSmrg    sysv5* | sco3.2v5* | sco5v6*)
94160814a2baSmrg      # Note: We CANNOT use -z defs as we might desire, because we do not
94170814a2baSmrg      # link with -lc, and that would cause any symbols used from libc to
94180814a2baSmrg      # always be unresolved, which means just about no library would
94190814a2baSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
94200814a2baSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
94210814a2baSmrg      # as -z defs.
94220814a2baSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
94230814a2baSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
94240814a2baSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
94250814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94260814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
94270814a2baSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
94280814a2baSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
94290814a2baSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
94300814a2baSmrg      runpath_var='LD_RUN_PATH'
943163847c39Smrg
94320814a2baSmrg      if test yes = "$GCC"; then
94330814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94340814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94350814a2baSmrg      else
94360814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94370814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
94380814a2baSmrg      fi
94390814a2baSmrg      ;;
944063847c39Smrg
94410814a2baSmrg    uts4*)
94420814a2baSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
94430814a2baSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
94440814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
94450814a2baSmrg      ;;
944663847c39Smrg
94470814a2baSmrg    *)
94480814a2baSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
94490814a2baSmrg      ;;
94500814a2baSmrg    esac
945163847c39Smrg
94520814a2baSmrg    if test sni = "$host_vendor"; then
94530814a2baSmrg      case $host in
94540814a2baSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
94550814a2baSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
94560814a2baSmrg	;;
94570814a2baSmrg      esac
94580814a2baSmrg    fi
94590814a2baSmrg  fi
946063847c39Smrg])
94610814a2baSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
94620814a2baSmrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
94630814a2baSmrg
94640814a2baSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
94650814a2baSmrg
94660814a2baSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
94670814a2baSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
94680814a2baSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
94690814a2baSmrg    [The commands to extract the exported symbol list from a shared archive])
947063847c39Smrg
947163847c39Smrg#
94720814a2baSmrg# Do we need to explicitly link libc?
947363847c39Smrg#
94740814a2baSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
94750814a2baSmrgx|xyes)
94760814a2baSmrg  # Assume -lc should be added
94770814a2baSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
94780814a2baSmrg
94790814a2baSmrg  if test yes,yes = "$GCC,$enable_shared"; then
94800814a2baSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
94810814a2baSmrg    *'~'*)
94820814a2baSmrg      # FIXME: we may have to deal with multi-command sequences.
94830814a2baSmrg      ;;
94840814a2baSmrg    '$CC '*)
94850814a2baSmrg      # Test whether the compiler implicitly links with -lc since on some
94860814a2baSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
94870814a2baSmrg      # to ld, don't add -lc before -lgcc.
94880814a2baSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
94890814a2baSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
94900814a2baSmrg	[$RM conftest*
94910814a2baSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
94920814a2baSmrg
94930814a2baSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
94940814a2baSmrg	  soname=conftest
94950814a2baSmrg	  lib=conftest
94960814a2baSmrg	  libobjs=conftest.$ac_objext
94970814a2baSmrg	  deplibs=
94980814a2baSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
94990814a2baSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
95000814a2baSmrg	  compiler_flags=-v
95010814a2baSmrg	  linker_flags=-v
95020814a2baSmrg	  verstring=
95030814a2baSmrg	  output_objdir=.
95040814a2baSmrg	  libname=conftest
95050814a2baSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
95060814a2baSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
95070814a2baSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
95080814a2baSmrg	  then
95090814a2baSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
95100814a2baSmrg	  else
95110814a2baSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
95120814a2baSmrg	  fi
95130814a2baSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
95140814a2baSmrg	else
95150814a2baSmrg	  cat conftest.err 1>&5
95160814a2baSmrg	fi
95170814a2baSmrg	$RM conftest*
95180814a2baSmrg	])
95190814a2baSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
95200814a2baSmrg      ;;
95210814a2baSmrg    esac
95220814a2baSmrg  fi
95230814a2baSmrg  ;;
95240814a2baSmrgesac
95250814a2baSmrg
95260814a2baSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
95270814a2baSmrg    [Whether or not to add -lc for building shared libraries])
95280814a2baSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
95290814a2baSmrg    [enable_shared_with_static_runtimes], [0],
95300814a2baSmrg    [Whether or not to disallow shared libs when runtime libs are static])
95310814a2baSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
95320814a2baSmrg    [Compiler flag to allow reflexive dlopens])
95330814a2baSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
95340814a2baSmrg    [Compiler flag to generate shared objects directly from archives])
95350814a2baSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
95360814a2baSmrg    [Whether the compiler copes with passing no objects directly])
95370814a2baSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
95380814a2baSmrg    [Create an old-style archive from a shared archive])
95390814a2baSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
95400814a2baSmrg    [Create a temporary old-style archive to link instead of a shared archive])
95410814a2baSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
95420814a2baSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
95430814a2baSmrg_LT_TAGDECL([], [module_cmds], [2],
95440814a2baSmrg    [Commands used to build a loadable module if different from building
95450814a2baSmrg    a shared archive.])
95460814a2baSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
95470814a2baSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
95480814a2baSmrg    [Whether we are building with GNU ld or not])
95490814a2baSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
95500814a2baSmrg    [Flag that allows shared libraries with undefined symbols to be built])
95510814a2baSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
95520814a2baSmrg    [Flag that enforces no undefined symbols])
95530814a2baSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
95540814a2baSmrg    [Flag to hardcode $libdir into a binary during linking.
95550814a2baSmrg    This must work even if $libdir does not exist])
95560814a2baSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
95570814a2baSmrg    [Whether we need a single "-rpath" flag with a separated argument])
95580814a2baSmrg_LT_TAGDECL([], [hardcode_direct], [0],
95590814a2baSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
95600814a2baSmrg    DIR into the resulting binary])
95610814a2baSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
95620814a2baSmrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
95630814a2baSmrg    DIR into the resulting binary and the resulting library dependency is
95640814a2baSmrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
95650814a2baSmrg    library is relocated])
95660814a2baSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
95670814a2baSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
95680814a2baSmrg    into the resulting binary])
95690814a2baSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
95700814a2baSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
95710814a2baSmrg    into the resulting binary])
95720814a2baSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
95730814a2baSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
95740814a2baSmrg    into the library and all subsequent libraries and executables linked
95750814a2baSmrg    against it])
95760814a2baSmrg_LT_TAGDECL([], [inherit_rpath], [0],
95770814a2baSmrg    [Set to yes if linker adds runtime paths of dependent libraries
95780814a2baSmrg    to runtime path list])
95790814a2baSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
95800814a2baSmrg    [Whether libtool must link a program against all its dependency libraries])
95810814a2baSmrg_LT_TAGDECL([], [always_export_symbols], [0],
95820814a2baSmrg    [Set to "yes" if exported symbols are required])
95830814a2baSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
95840814a2baSmrg    [The commands to list exported symbols])
95850814a2baSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
95860814a2baSmrg    [Symbols that should not be listed in the preloaded symbols])
95870814a2baSmrg_LT_TAGDECL([], [include_expsyms], [1],
95880814a2baSmrg    [Symbols that must always be exported])
95890814a2baSmrg_LT_TAGDECL([], [prelink_cmds], [2],
95900814a2baSmrg    [Commands necessary for linking programs (against libraries) with templates])
95910814a2baSmrg_LT_TAGDECL([], [postlink_cmds], [2],
95920814a2baSmrg    [Commands necessary for finishing linking programs])
95930814a2baSmrg_LT_TAGDECL([], [file_list_spec], [1],
95940814a2baSmrg    [Specify filename containing input files])
95950814a2baSmrgdnl FIXME: Not yet implemented
95960814a2baSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
95970814a2baSmrgdnl    [Compiler flag to generate thread safe objects])
95980814a2baSmrg])# _LT_LINKER_SHLIBS
959963847c39Smrg
960063847c39Smrg
96010814a2baSmrg# _LT_LANG_C_CONFIG([TAG])
96020814a2baSmrg# ------------------------
96030814a2baSmrg# Ensure that the configuration variables for a C compiler are suitably
96040814a2baSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
96050814a2baSmrg# the compiler configuration to 'libtool'.
96060814a2baSmrgm4_defun([_LT_LANG_C_CONFIG],
96070814a2baSmrg[m4_require([_LT_DECL_EGREP])dnl
96080814a2baSmrglt_save_CC=$CC
96090814a2baSmrgAC_LANG_PUSH(C)
961063847c39Smrg
96110814a2baSmrg# Source file extension for C test sources.
96120814a2baSmrgac_ext=c
961363847c39Smrg
96140814a2baSmrg# Object file extension for compiled C test sources.
96150814a2baSmrgobjext=o
96160814a2baSmrg_LT_TAGVAR(objext, $1)=$objext
961776888252Smrg
96180814a2baSmrg# Code to be used in simple compile tests
96190814a2baSmrglt_simple_compile_test_code="int some_variable = 0;"
962063847c39Smrg
96210814a2baSmrg# Code to be used in simple link tests
96220814a2baSmrglt_simple_link_test_code='int main(){return(0);}'
962363847c39Smrg
96240814a2baSmrg_LT_TAG_COMPILER
96250814a2baSmrg# Save the default compiler, since it gets overwritten when the other
96260814a2baSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
96270814a2baSmrgcompiler_DEFAULT=$CC
962863847c39Smrg
96290814a2baSmrg# save warnings/boilerplate of simple test code
96300814a2baSmrg_LT_COMPILER_BOILERPLATE
96310814a2baSmrg_LT_LINKER_BOILERPLATE
963263847c39Smrg
96330814a2baSmrgif test -n "$compiler"; then
96340814a2baSmrg  _LT_COMPILER_NO_RTTI($1)
96350814a2baSmrg  _LT_COMPILER_PIC($1)
96360814a2baSmrg  _LT_COMPILER_C_O($1)
96370814a2baSmrg  _LT_COMPILER_FILE_LOCKS($1)
96380814a2baSmrg  _LT_LINKER_SHLIBS($1)
96390814a2baSmrg  _LT_SYS_DYNAMIC_LINKER($1)
96400814a2baSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
96410814a2baSmrg  LT_SYS_DLOPEN_SELF
96420814a2baSmrg  _LT_CMD_STRIPLIB
964363847c39Smrg
96440814a2baSmrg  # Report what library types will actually be built
96450814a2baSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
96460814a2baSmrg  AC_MSG_RESULT([$can_build_shared])
964776888252Smrg
96480814a2baSmrg  AC_MSG_CHECKING([whether to build shared libraries])
96490814a2baSmrg  test no = "$can_build_shared" && enable_shared=no
965063847c39Smrg
96510814a2baSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
96520814a2baSmrg  # are all built from PIC.
96530814a2baSmrg  case $host_os in
96540814a2baSmrg  aix3*)
96550814a2baSmrg    test yes = "$enable_shared" && enable_static=no
96560814a2baSmrg    if test -n "$RANLIB"; then
96570814a2baSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
96580814a2baSmrg      postinstall_cmds='$RANLIB $lib'
96590814a2baSmrg    fi
96600814a2baSmrg    ;;
966176888252Smrg
96620814a2baSmrg  aix[[4-9]]*)
96630814a2baSmrg    if test ia64 != "$host_cpu"; then
96640814a2baSmrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
96650814a2baSmrg      yes,aix,yes) ;;			# shared object as lib.so file only
96660814a2baSmrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
96670814a2baSmrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
96680814a2baSmrg      esac
96690814a2baSmrg    fi
96700814a2baSmrg    ;;
96710814a2baSmrg  esac
96720814a2baSmrg  AC_MSG_RESULT([$enable_shared])
967376888252Smrg
96740814a2baSmrg  AC_MSG_CHECKING([whether to build static libraries])
96750814a2baSmrg  # Make sure either enable_shared or enable_static is yes.
96760814a2baSmrg  test yes = "$enable_shared" || enable_static=yes
96770814a2baSmrg  AC_MSG_RESULT([$enable_static])
967876888252Smrg
96790814a2baSmrg  _LT_CONFIG($1)
96800814a2baSmrgfi
96810814a2baSmrgAC_LANG_POP
96820814a2baSmrgCC=$lt_save_CC
96830814a2baSmrg])# _LT_LANG_C_CONFIG
968476888252Smrg
968586dafe34Smrg
96860814a2baSmrg# _LT_LANG_CXX_CONFIG([TAG])
96870814a2baSmrg# --------------------------
96880814a2baSmrg# Ensure that the configuration variables for a C++ compiler are suitably
96890814a2baSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
96900814a2baSmrg# the compiler configuration to 'libtool'.
96910814a2baSmrgm4_defun([_LT_LANG_CXX_CONFIG],
96920814a2baSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
96930814a2baSmrgm4_require([_LT_DECL_EGREP])dnl
96940814a2baSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
96950814a2baSmrgif test -n "$CXX" && ( test no != "$CXX" &&
96960814a2baSmrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
96970814a2baSmrg    (test g++ != "$CXX"))); then
96980814a2baSmrg  AC_PROG_CXXCPP
96990814a2baSmrgelse
97000814a2baSmrg  _lt_caught_CXX_error=yes
97010814a2baSmrgfi
970286dafe34Smrg
97030814a2baSmrgAC_LANG_PUSH(C++)
97040814a2baSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
97050814a2baSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
97060814a2baSmrg_LT_TAGVAR(always_export_symbols, $1)=no
97070814a2baSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
97080814a2baSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
97090814a2baSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
97100814a2baSmrg_LT_TAGVAR(hardcode_direct, $1)=no
97110814a2baSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
97120814a2baSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
97130814a2baSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
97140814a2baSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
97150814a2baSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
97160814a2baSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
97170814a2baSmrg_LT_TAGVAR(inherit_rpath, $1)=no
97180814a2baSmrg_LT_TAGVAR(module_cmds, $1)=
97190814a2baSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
97200814a2baSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
97210814a2baSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
97220814a2baSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
97230814a2baSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
97240814a2baSmrg_LT_TAGVAR(no_undefined_flag, $1)=
97250814a2baSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
97260814a2baSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
972786dafe34Smrg
97280814a2baSmrg# Source file extension for C++ test sources.
97290814a2baSmrgac_ext=cpp
973086dafe34Smrg
97310814a2baSmrg# Object file extension for compiled C++ test sources.
97320814a2baSmrgobjext=o
97330814a2baSmrg_LT_TAGVAR(objext, $1)=$objext
973486dafe34Smrg
97350814a2baSmrg# No sense in running all these tests if we already determined that
97360814a2baSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
97370814a2baSmrg# are currently assumed to apply to all compilers on this platform,
97380814a2baSmrg# and will be corrupted by setting them based on a non-working compiler.
97390814a2baSmrgif test yes != "$_lt_caught_CXX_error"; then
97400814a2baSmrg  # Code to be used in simple compile tests
97410814a2baSmrg  lt_simple_compile_test_code="int some_variable = 0;"
974286dafe34Smrg
97430814a2baSmrg  # Code to be used in simple link tests
97440814a2baSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
974586dafe34Smrg
97460814a2baSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
97470814a2baSmrg  _LT_TAG_COMPILER
974886dafe34Smrg
97490814a2baSmrg  # save warnings/boilerplate of simple test code
97500814a2baSmrg  _LT_COMPILER_BOILERPLATE
97510814a2baSmrg  _LT_LINKER_BOILERPLATE
975286dafe34Smrg
97530814a2baSmrg  # Allow CC to be a program name with arguments.
97540814a2baSmrg  lt_save_CC=$CC
97550814a2baSmrg  lt_save_CFLAGS=$CFLAGS
97560814a2baSmrg  lt_save_LD=$LD
97570814a2baSmrg  lt_save_GCC=$GCC
97580814a2baSmrg  GCC=$GXX
97590814a2baSmrg  lt_save_with_gnu_ld=$with_gnu_ld
97600814a2baSmrg  lt_save_path_LD=$lt_cv_path_LD
97610814a2baSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
97620814a2baSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
97630814a2baSmrg  else
97640814a2baSmrg    $as_unset lt_cv_prog_gnu_ld
97650814a2baSmrg  fi
97660814a2baSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
97670814a2baSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
97680814a2baSmrg  else
97690814a2baSmrg    $as_unset lt_cv_path_LD
97700814a2baSmrg  fi
97710814a2baSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
97720814a2baSmrg  CC=${CXX-"c++"}
97730814a2baSmrg  CFLAGS=$CXXFLAGS
97740814a2baSmrg  compiler=$CC
97750814a2baSmrg  _LT_TAGVAR(compiler, $1)=$CC
97760814a2baSmrg  _LT_CC_BASENAME([$compiler])
977786dafe34Smrg
97780814a2baSmrg  if test -n "$compiler"; then
97790814a2baSmrg    # We don't want -fno-exception when compiling C++ code, so set the
97800814a2baSmrg    # no_builtin_flag separately
97810814a2baSmrg    if test yes = "$GXX"; then
97820814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
97830814a2baSmrg    else
97840814a2baSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
97850814a2baSmrg    fi
978686dafe34Smrg
97870814a2baSmrg    if test yes = "$GXX"; then
97880814a2baSmrg      # Set up default GNU C++ configuration
978986dafe34Smrg
97900814a2baSmrg      LT_PATH_LD
97919586ba5aSmrg
97920814a2baSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
97930814a2baSmrg      # archiving commands below assume that GNU ld is being used.
97940814a2baSmrg      if test yes = "$with_gnu_ld"; then
97950814a2baSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
97960814a2baSmrg        _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'
97979586ba5aSmrg
97980814a2baSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
97990814a2baSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
98009586ba5aSmrg
98010814a2baSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
98020814a2baSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
98030814a2baSmrg        #     investigate it a little bit more. (MM)
98040814a2baSmrg        wlarc='$wl'
98059586ba5aSmrg
98060814a2baSmrg        # ancient GNU ld didn't support --whole-archive et. al.
98070814a2baSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
98080814a2baSmrg	  $GREP 'no-whole-archive' > /dev/null; then
98090814a2baSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
98100814a2baSmrg        else
98110814a2baSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
98120814a2baSmrg        fi
98130814a2baSmrg      else
98140814a2baSmrg        with_gnu_ld=no
98150814a2baSmrg        wlarc=
98169586ba5aSmrg
98170814a2baSmrg        # A generic and very simple default shared library creation
98180814a2baSmrg        # command for GNU C++ for the case where it uses the native
98190814a2baSmrg        # linker, instead of GNU ld.  If possible, this setting should
98200814a2baSmrg        # overridden to take advantage of the native linker features on
98210814a2baSmrg        # the platform it is being used on.
98220814a2baSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
98230814a2baSmrg      fi
98249586ba5aSmrg
98250814a2baSmrg      # Commands to make compiler produce verbose output that lists
98260814a2baSmrg      # what "hidden" libraries, object files and flags are used when
98270814a2baSmrg      # linking a shared library.
98280814a2baSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
98299586ba5aSmrg
98300814a2baSmrg    else
98310814a2baSmrg      GXX=no
98320814a2baSmrg      with_gnu_ld=no
98330814a2baSmrg      wlarc=
98340814a2baSmrg    fi
98359586ba5aSmrg
98360814a2baSmrg    # PORTME: fill in a description of your system's C++ link characteristics
98370814a2baSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
98380814a2baSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
98390814a2baSmrg    case $host_os in
98400814a2baSmrg      aix3*)
98410814a2baSmrg        # FIXME: insert proper C++ library support
98420814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
98430814a2baSmrg        ;;
98440814a2baSmrg      aix[[4-9]]*)
98450814a2baSmrg        if test ia64 = "$host_cpu"; then
98460814a2baSmrg          # On IA64, the linker does run time linking by default, so we don't
98470814a2baSmrg          # have to do anything special.
98480814a2baSmrg          aix_use_runtimelinking=no
98490814a2baSmrg          exp_sym_flag='-Bexport'
98500814a2baSmrg          no_entry_flag=
98510814a2baSmrg        else
98520814a2baSmrg          aix_use_runtimelinking=no
98530814a2baSmrg
98540814a2baSmrg          # Test if we are trying to use run time linking or normal
98550814a2baSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
98560814a2baSmrg          # have runtime linking enabled, and use it for executables.
98570814a2baSmrg          # For shared libraries, we enable/disable runtime linking
98580814a2baSmrg          # depending on the kind of the shared library created -
98590814a2baSmrg          # when "with_aix_soname,aix_use_runtimelinking" is:
98600814a2baSmrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
98610814a2baSmrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
98620814a2baSmrg          #            lib.a           static archive
98630814a2baSmrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
98640814a2baSmrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
98650814a2baSmrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
98660814a2baSmrg          #            lib.a(lib.so.V) shared, rtl:no
98670814a2baSmrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
98680814a2baSmrg          #            lib.a           static archive
98690814a2baSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
98700814a2baSmrg	    for ld_flag in $LDFLAGS; do
98710814a2baSmrg	      case $ld_flag in
98720814a2baSmrg	      *-brtl*)
98730814a2baSmrg	        aix_use_runtimelinking=yes
98740814a2baSmrg	        break
98750814a2baSmrg	        ;;
98760814a2baSmrg	      esac
98770814a2baSmrg	    done
98780814a2baSmrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
98790814a2baSmrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
98800814a2baSmrg	      # so we don't have lib.a shared libs to link our executables.
98810814a2baSmrg	      # We have to force runtime linking in this case.
98820814a2baSmrg	      aix_use_runtimelinking=yes
98830814a2baSmrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
98840814a2baSmrg	    fi
98850814a2baSmrg	    ;;
98860814a2baSmrg          esac
988786dafe34Smrg
98880814a2baSmrg          exp_sym_flag='-bexport'
98890814a2baSmrg          no_entry_flag='-bnoentry'
98900814a2baSmrg        fi
989186dafe34Smrg
98920814a2baSmrg        # When large executables or shared objects are built, AIX ld can
98930814a2baSmrg        # have problems creating the table of contents.  If linking a library
98940814a2baSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
98950814a2baSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
98960814a2baSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
989786dafe34Smrg
98980814a2baSmrg        _LT_TAGVAR(archive_cmds, $1)=''
98990814a2baSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
99000814a2baSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
99010814a2baSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
99020814a2baSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
99030814a2baSmrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
99040814a2baSmrg        case $with_aix_soname,$aix_use_runtimelinking in
99050814a2baSmrg        aix,*) ;;	# no import file
99060814a2baSmrg        svr4,* | *,yes) # use import file
99070814a2baSmrg          # The Import File defines what to hardcode.
99080814a2baSmrg          _LT_TAGVAR(hardcode_direct, $1)=no
99090814a2baSmrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
99100814a2baSmrg          ;;
99110814a2baSmrg        esac
991286dafe34Smrg
99130814a2baSmrg        if test yes = "$GXX"; then
99140814a2baSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
99150814a2baSmrg          # We only want to do this on AIX 4.2 and lower, the check
99160814a2baSmrg          # below for broken collect2 doesn't work under 4.3+
99170814a2baSmrg	  collect2name=`$CC -print-prog-name=collect2`
99180814a2baSmrg	  if test -f "$collect2name" &&
99190814a2baSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
99200814a2baSmrg	  then
99210814a2baSmrg	    # We have reworked collect2
99220814a2baSmrg	    :
99230814a2baSmrg	  else
99240814a2baSmrg	    # We have old collect2
99250814a2baSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
99260814a2baSmrg	    # It fails to find uninstalled libraries when the uninstalled
99270814a2baSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
99280814a2baSmrg	    # to unsupported forces relinking
99290814a2baSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
99300814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
99310814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
99320814a2baSmrg	  fi
99330814a2baSmrg          esac
99340814a2baSmrg          shared_flag='-shared'
99350814a2baSmrg	  if test yes = "$aix_use_runtimelinking"; then
99360814a2baSmrg	    shared_flag=$shared_flag' $wl-G'
99370814a2baSmrg	  fi
99380814a2baSmrg	  # Need to ensure runtime linking is disabled for the traditional
99390814a2baSmrg	  # shared library, or the linker may eventually find shared libraries
99400814a2baSmrg	  # /with/ Import File - we do not want to mix them.
99410814a2baSmrg	  shared_flag_aix='-shared'
99420814a2baSmrg	  shared_flag_svr4='-shared $wl-G'
99430814a2baSmrg        else
99440814a2baSmrg          # not using gcc
99450814a2baSmrg          if test ia64 = "$host_cpu"; then
99460814a2baSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
99470814a2baSmrg	  # chokes on -Wl,-G. The following line is correct:
99480814a2baSmrg	  shared_flag='-G'
99490814a2baSmrg          else
99500814a2baSmrg	    if test yes = "$aix_use_runtimelinking"; then
99510814a2baSmrg	      shared_flag='$wl-G'
99520814a2baSmrg	    else
99530814a2baSmrg	      shared_flag='$wl-bM:SRE'
99540814a2baSmrg	    fi
99550814a2baSmrg	    shared_flag_aix='$wl-bM:SRE'
99560814a2baSmrg	    shared_flag_svr4='$wl-G'
99570814a2baSmrg          fi
99580814a2baSmrg        fi
995986dafe34Smrg
99600814a2baSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
99610814a2baSmrg        # It seems that -bexpall does not export symbols beginning with
99620814a2baSmrg        # underscore (_), so it is better to generate a list of symbols to
99630814a2baSmrg	# export.
99640814a2baSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
99650814a2baSmrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
99660814a2baSmrg          # Warning - without using the other runtime loading flags (-brtl),
99670814a2baSmrg          # -berok will link without error, but may produce a broken library.
99680814a2baSmrg          # The "-G" linker flag allows undefined symbols.
99690814a2baSmrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
99700814a2baSmrg          # Determine the default libpath from the value encoded in an empty
99710814a2baSmrg          # executable.
99720814a2baSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
99730814a2baSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
997486dafe34Smrg
99750814a2baSmrg          _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
99760814a2baSmrg        else
99770814a2baSmrg          if test ia64 = "$host_cpu"; then
99780814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
99790814a2baSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
99800814a2baSmrg	    _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"
99810814a2baSmrg          else
99820814a2baSmrg	    # Determine the default libpath from the value encoded in an
99830814a2baSmrg	    # empty executable.
99840814a2baSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
99850814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
99860814a2baSmrg	    # Warning - without using the other run time loading flags,
99870814a2baSmrg	    # -berok will link without error, but may produce a broken library.
99880814a2baSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
99890814a2baSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
99900814a2baSmrg	    if test yes = "$with_gnu_ld"; then
99910814a2baSmrg	      # We only use this code for GNU lds that support --whole-archive.
99920814a2baSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
99930814a2baSmrg	    else
99940814a2baSmrg	      # Exported symbols can be pulled into shared objects from archives
99950814a2baSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
99960814a2baSmrg	    fi
99970814a2baSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
99980814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
99990814a2baSmrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
100000814a2baSmrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
100010814a2baSmrg	    if test svr4 != "$with_aix_soname"; then
100020814a2baSmrg	      # This is similar to how AIX traditionally builds its shared
100030814a2baSmrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
100040814a2baSmrg	      _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'
100050814a2baSmrg	    fi
100060814a2baSmrg	    if test aix != "$with_aix_soname"; then
100070814a2baSmrg	      _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'
100080814a2baSmrg	    else
100090814a2baSmrg	      # used by -dlpreopen to get the symbols
100100814a2baSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
100110814a2baSmrg	    fi
100120814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
100130814a2baSmrg          fi
100140814a2baSmrg        fi
100150814a2baSmrg        ;;
1001686dafe34Smrg
100170814a2baSmrg      beos*)
100180814a2baSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
100190814a2baSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
100200814a2baSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
100210814a2baSmrg	  # support --undefined.  This deserves some investigation.  FIXME
100220814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
100230814a2baSmrg	else
100240814a2baSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
100250814a2baSmrg	fi
100260814a2baSmrg	;;
1002786dafe34Smrg
100280814a2baSmrg      chorus*)
100290814a2baSmrg        case $cc_basename in
100300814a2baSmrg          *)
100310814a2baSmrg	  # FIXME: insert proper C++ library support
100320814a2baSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
100330814a2baSmrg	  ;;
100340814a2baSmrg        esac
100350814a2baSmrg        ;;
1003686dafe34Smrg
100370814a2baSmrg      cygwin* | mingw* | pw32* | cegcc*)
100380814a2baSmrg	case $GXX,$cc_basename in
100390814a2baSmrg	,cl* | no,cl* | ,icl* | no,icl*)
100400814a2baSmrg	  # Native MSVC or ICC
100410814a2baSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
100420814a2baSmrg	  # no search path for DLLs.
100430814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
100440814a2baSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
100450814a2baSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
100460814a2baSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
100470814a2baSmrg	  # Tell ltmain to make .lib files, not .a files.
100480814a2baSmrg	  libext=lib
100490814a2baSmrg	  # Tell ltmain to make .dll files, not .so files.
100500814a2baSmrg	  shrext_cmds=.dll
100510814a2baSmrg	  # FIXME: Setting linknames here is a bad hack.
100520814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
100530814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
100540814a2baSmrg              cp "$export_symbols" "$output_objdir/$soname.def";
100550814a2baSmrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
100560814a2baSmrg            else
100570814a2baSmrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
100580814a2baSmrg            fi~
100590814a2baSmrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
100600814a2baSmrg            linknames='
100610814a2baSmrg	  # The linker will not automatically build a static lib if we build a DLL.
100620814a2baSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
100630814a2baSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
100640814a2baSmrg	  # Don't use ranlib
100650814a2baSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
100660814a2baSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
100670814a2baSmrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
100680814a2baSmrg            case $lt_outputfile in
100690814a2baSmrg              *.exe|*.EXE) ;;
100700814a2baSmrg              *)
100710814a2baSmrg                lt_outputfile=$lt_outputfile.exe
100720814a2baSmrg                lt_tool_outputfile=$lt_tool_outputfile.exe
100730814a2baSmrg                ;;
100740814a2baSmrg            esac~
100750814a2baSmrg            func_to_tool_file "$lt_outputfile"~
100760814a2baSmrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
100770814a2baSmrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
100780814a2baSmrg              $RM "$lt_outputfile.manifest";
100790814a2baSmrg            fi'
100800814a2baSmrg	  ;;
100810814a2baSmrg	*)
100820814a2baSmrg	  # g++
100830814a2baSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
100840814a2baSmrg	  # as there is no search path for DLLs.
100850814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
100860814a2baSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
100870814a2baSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
100880814a2baSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
100890814a2baSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
1009076888252Smrg
100910814a2baSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
100920814a2baSmrg	    _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'
100930814a2baSmrg	    # If the export-symbols file already is a .def file, use it as
100940814a2baSmrg	    # is; otherwise, prepend EXPORTS...
100950814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
100960814a2baSmrg              cp $export_symbols $output_objdir/$soname.def;
100970814a2baSmrg            else
100980814a2baSmrg              echo EXPORTS > $output_objdir/$soname.def;
100990814a2baSmrg              cat $export_symbols >> $output_objdir/$soname.def;
101000814a2baSmrg            fi~
101010814a2baSmrg            $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'
101020814a2baSmrg	  else
101030814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101040814a2baSmrg	  fi
101050814a2baSmrg	  ;;
101060814a2baSmrg	esac
101070814a2baSmrg	;;
101080814a2baSmrg      darwin* | rhapsody*)
101090814a2baSmrg        _LT_DARWIN_LINKER_FEATURES($1)
101100814a2baSmrg	;;
1011176888252Smrg
101120814a2baSmrg      os2*)
101130814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
101140814a2baSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
101150814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
101160814a2baSmrg	shrext_cmds=.dll
101170814a2baSmrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
101180814a2baSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
101190814a2baSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
101200814a2baSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
101210814a2baSmrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
101220814a2baSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
101230814a2baSmrg	  emximp -o $lib $output_objdir/$libname.def'
101240814a2baSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
101250814a2baSmrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
101260814a2baSmrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
101270814a2baSmrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
101280814a2baSmrg	  prefix_cmds="$SED"~
101290814a2baSmrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
101300814a2baSmrg	    prefix_cmds="$prefix_cmds -e 1d";
101310814a2baSmrg	  fi~
101320814a2baSmrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
101330814a2baSmrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
101340814a2baSmrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
101350814a2baSmrg	  emximp -o $lib $output_objdir/$libname.def'
101360814a2baSmrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
101370814a2baSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
101380814a2baSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
101390814a2baSmrg	;;
1014076888252Smrg
101410814a2baSmrg      dgux*)
101420814a2baSmrg        case $cc_basename in
101430814a2baSmrg          ec++*)
101440814a2baSmrg	    # FIXME: insert proper C++ library support
101450814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101460814a2baSmrg	    ;;
101470814a2baSmrg          ghcx*)
101480814a2baSmrg	    # Green Hills C++ Compiler
101490814a2baSmrg	    # FIXME: insert proper C++ library support
101500814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101510814a2baSmrg	    ;;
101520814a2baSmrg          *)
101530814a2baSmrg	    # FIXME: insert proper C++ library support
101540814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101550814a2baSmrg	    ;;
101560814a2baSmrg        esac
101570814a2baSmrg        ;;
1015876888252Smrg
101590814a2baSmrg      freebsd2.*)
101600814a2baSmrg        # C++ shared libraries reported to be fairly broken before
101610814a2baSmrg	# switch to ELF
101620814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
101630814a2baSmrg        ;;
1016476888252Smrg
101650814a2baSmrg      freebsd-elf*)
101660814a2baSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
101670814a2baSmrg        ;;
1016863847c39Smrg
101690814a2baSmrg      freebsd* | dragonfly* | midnightbsd*)
101700814a2baSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
101710814a2baSmrg        # conventions
101720814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
101730814a2baSmrg        ;;
1017463847c39Smrg
101750814a2baSmrg      haiku*)
101760814a2baSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
101770814a2baSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
101780814a2baSmrg        ;;
1017976888252Smrg
101800814a2baSmrg      hpux9*)
101810814a2baSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
101820814a2baSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
101830814a2baSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
101840814a2baSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
101850814a2baSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
101860814a2baSmrg				             # but as the default
101870814a2baSmrg				             # location of the library.
1018863847c39Smrg
101890814a2baSmrg        case $cc_basename in
101900814a2baSmrg          CC*)
101910814a2baSmrg            # FIXME: insert proper C++ library support
101920814a2baSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
101930814a2baSmrg            ;;
101940814a2baSmrg          aCC*)
101950814a2baSmrg            _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'
101960814a2baSmrg            # Commands to make compiler produce verbose output that lists
101970814a2baSmrg            # what "hidden" libraries, object files and flags are used when
101980814a2baSmrg            # linking a shared library.
101990814a2baSmrg            #
102000814a2baSmrg            # There doesn't appear to be a way to prevent this compiler from
102010814a2baSmrg            # explicitly linking system object files so we need to strip them
102020814a2baSmrg            # from the output so that they don't get included in the library
102030814a2baSmrg            # dependencies.
102040814a2baSmrg            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"'
102050814a2baSmrg            ;;
102060814a2baSmrg          *)
102070814a2baSmrg            if test yes = "$GXX"; then
102080814a2baSmrg              _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'
102090814a2baSmrg            else
102100814a2baSmrg              # FIXME: insert proper C++ library support
102110814a2baSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
102120814a2baSmrg            fi
102130814a2baSmrg            ;;
102140814a2baSmrg        esac
102150814a2baSmrg        ;;
1021663847c39Smrg
102170814a2baSmrg      hpux10*|hpux11*)
102180814a2baSmrg        if test no = "$with_gnu_ld"; then
102190814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
102200814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1022163847c39Smrg
102220814a2baSmrg          case $host_cpu in
102230814a2baSmrg            hppa*64*|ia64*)
102240814a2baSmrg              ;;
102250814a2baSmrg            *)
102260814a2baSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
102270814a2baSmrg              ;;
102280814a2baSmrg          esac
102290814a2baSmrg        fi
102300814a2baSmrg        case $host_cpu in
102310814a2baSmrg          hppa*64*|ia64*)
102320814a2baSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
102330814a2baSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
102340814a2baSmrg            ;;
102350814a2baSmrg          *)
102360814a2baSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
102370814a2baSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
102380814a2baSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
102390814a2baSmrg					         # but as the default
102400814a2baSmrg					         # location of the library.
102410814a2baSmrg            ;;
102420814a2baSmrg        esac
1024386dafe34Smrg
102440814a2baSmrg        case $cc_basename in
102450814a2baSmrg          CC*)
102460814a2baSmrg	    # FIXME: insert proper C++ library support
102470814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
102480814a2baSmrg	    ;;
102490814a2baSmrg          aCC*)
102500814a2baSmrg	    case $host_cpu in
102510814a2baSmrg	      hppa*64*)
102520814a2baSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102530814a2baSmrg	        ;;
102540814a2baSmrg	      ia64*)
102550814a2baSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102560814a2baSmrg	        ;;
102570814a2baSmrg	      *)
102580814a2baSmrg	        _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'
102590814a2baSmrg	        ;;
102600814a2baSmrg	    esac
102610814a2baSmrg	    # Commands to make compiler produce verbose output that lists
102620814a2baSmrg	    # what "hidden" libraries, object files and flags are used when
102630814a2baSmrg	    # linking a shared library.
102640814a2baSmrg	    #
102650814a2baSmrg	    # There doesn't appear to be a way to prevent this compiler from
102660814a2baSmrg	    # explicitly linking system object files so we need to strip them
102670814a2baSmrg	    # from the output so that they don't get included in the library
102680814a2baSmrg	    # dependencies.
102690814a2baSmrg	    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"'
102700814a2baSmrg	    ;;
102710814a2baSmrg          *)
102720814a2baSmrg	    if test yes = "$GXX"; then
102730814a2baSmrg	      if test no = "$with_gnu_ld"; then
102740814a2baSmrg	        case $host_cpu in
102750814a2baSmrg	          hppa*64*)
102760814a2baSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102770814a2baSmrg	            ;;
102780814a2baSmrg	          ia64*)
102790814a2baSmrg	            _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'
102800814a2baSmrg	            ;;
102810814a2baSmrg	          *)
102820814a2baSmrg	            _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'
102830814a2baSmrg	            ;;
102840814a2baSmrg	        esac
102850814a2baSmrg	      fi
102860814a2baSmrg	    else
102870814a2baSmrg	      # FIXME: insert proper C++ library support
102880814a2baSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
102890814a2baSmrg	    fi
102900814a2baSmrg	    ;;
102910814a2baSmrg        esac
102920814a2baSmrg        ;;
1029386dafe34Smrg
102940814a2baSmrg      interix[[3-9]]*)
102950814a2baSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
102960814a2baSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
102970814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
102980814a2baSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
102990814a2baSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
103000814a2baSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
103010814a2baSmrg	# default) and relocated if they conflict, which is a slow very memory
103020814a2baSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
103030814a2baSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
103040814a2baSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
103050814a2baSmrg	_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'
103060814a2baSmrg	_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'
103070814a2baSmrg	;;
103080814a2baSmrg      irix5* | irix6*)
103090814a2baSmrg        case $cc_basename in
103100814a2baSmrg          CC*)
103110814a2baSmrg	    # SGI C++
103120814a2baSmrg	    _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'
1031386dafe34Smrg
103140814a2baSmrg	    # Archives containing C++ object files must be created using
103150814a2baSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
103160814a2baSmrg	    # necessary to make sure instantiated templates are included
103170814a2baSmrg	    # in the archive.
103180814a2baSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
103190814a2baSmrg	    ;;
103200814a2baSmrg          *)
103210814a2baSmrg	    if test yes = "$GXX"; then
103220814a2baSmrg	      if test no = "$with_gnu_ld"; then
103230814a2baSmrg	        _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'
103240814a2baSmrg	      else
103250814a2baSmrg	        _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'
103260814a2baSmrg	      fi
103270814a2baSmrg	    fi
103280814a2baSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
103290814a2baSmrg	    ;;
103300814a2baSmrg        esac
103310814a2baSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
103320814a2baSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
103330814a2baSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
103340814a2baSmrg        ;;
1033586dafe34Smrg
103360814a2baSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
103370814a2baSmrg        case $cc_basename in
103380814a2baSmrg          KCC*)
103390814a2baSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
103400814a2baSmrg
103410814a2baSmrg	    # KCC will only create a shared library if the output file
103420814a2baSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
103430814a2baSmrg	    # to its proper name (with version) after linking.
103440814a2baSmrg	    _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'
103450814a2baSmrg	    _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'
103460814a2baSmrg	    # Commands to make compiler produce verbose output that lists
103470814a2baSmrg	    # what "hidden" libraries, object files and flags are used when
103480814a2baSmrg	    # linking a shared library.
103490814a2baSmrg	    #
103500814a2baSmrg	    # There doesn't appear to be a way to prevent this compiler from
103510814a2baSmrg	    # explicitly linking system object files so we need to strip them
103520814a2baSmrg	    # from the output so that they don't get included in the library
103530814a2baSmrg	    # dependencies.
103540814a2baSmrg	    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"'
1035586dafe34Smrg
103560814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
103570814a2baSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
1035886dafe34Smrg
103590814a2baSmrg	    # Archives containing C++ object files must be created using
103600814a2baSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
103610814a2baSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
103620814a2baSmrg	    ;;
103630814a2baSmrg	  icpc* | ecpc* )
103640814a2baSmrg	    # Intel C++
103650814a2baSmrg	    with_gnu_ld=yes
103660814a2baSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
103670814a2baSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
103680814a2baSmrg	    # earlier do not add the objects themselves.
103690814a2baSmrg	    case `$CC -V 2>&1` in
103700814a2baSmrg	      *"Version 7."*)
103710814a2baSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
103720814a2baSmrg		_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'
103730814a2baSmrg		;;
103740814a2baSmrg	      *)  # Version 8.0 or newer
103750814a2baSmrg	        tmp_idyn=
103760814a2baSmrg	        case $host_cpu in
103770814a2baSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
103780814a2baSmrg		esac
103790814a2baSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
103800814a2baSmrg		_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'
103810814a2baSmrg		;;
103820814a2baSmrg	    esac
103830814a2baSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
103840814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
103850814a2baSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
103860814a2baSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
103870814a2baSmrg	    ;;
103880814a2baSmrg          pgCC* | pgcpp*)
103890814a2baSmrg            # Portland Group C++ compiler
103900814a2baSmrg	    case `$CC -V` in
103910814a2baSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
103920814a2baSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
103930814a2baSmrg               rm -rf $tpldir~
103940814a2baSmrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
103950814a2baSmrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
103960814a2baSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
103970814a2baSmrg                rm -rf $tpldir~
103980814a2baSmrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
103990814a2baSmrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
104000814a2baSmrg                $RANLIB $oldlib'
104010814a2baSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
104020814a2baSmrg                rm -rf $tpldir~
104030814a2baSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
104040814a2baSmrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
104050814a2baSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
104060814a2baSmrg                rm -rf $tpldir~
104070814a2baSmrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
104080814a2baSmrg                $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'
104090814a2baSmrg	      ;;
104100814a2baSmrg	    *) # Version 6 and above use weak symbols
104110814a2baSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
104120814a2baSmrg	      _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'
104130814a2baSmrg	      ;;
104140814a2baSmrg	    esac
1041586dafe34Smrg
104160814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
104170814a2baSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
104180814a2baSmrg	    _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'
104190814a2baSmrg            ;;
104200814a2baSmrg	  cxx*)
104210814a2baSmrg	    # Compaq C++
104220814a2baSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
104230814a2baSmrg	    _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'
1042486dafe34Smrg
104250814a2baSmrg	    runpath_var=LD_RUN_PATH
104260814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
104270814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1042886dafe34Smrg
104290814a2baSmrg	    # Commands to make compiler produce verbose output that lists
104300814a2baSmrg	    # what "hidden" libraries, object files and flags are used when
104310814a2baSmrg	    # linking a shared library.
104320814a2baSmrg	    #
104330814a2baSmrg	    # There doesn't appear to be a way to prevent this compiler from
104340814a2baSmrg	    # explicitly linking system object files so we need to strip them
104350814a2baSmrg	    # from the output so that they don't get included in the library
104360814a2baSmrg	    # dependencies.
104370814a2baSmrg	    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'
104380814a2baSmrg	    ;;
104390814a2baSmrg	  xl* | mpixl* | bgxl*)
104400814a2baSmrg	    # IBM XL 8.0 on PPC, with GNU ld
104410814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
104420814a2baSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
104430814a2baSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
104440814a2baSmrg	    if test yes = "$supports_anon_versioning"; then
104450814a2baSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
104460814a2baSmrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
104470814a2baSmrg                echo "local: *; };" >> $output_objdir/$libname.ver~
104480814a2baSmrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
104490814a2baSmrg	    fi
104500814a2baSmrg	    ;;
104510814a2baSmrg	  *)
104520814a2baSmrg	    case `$CC -V 2>&1 | $SED 5q` in
104530814a2baSmrg	    *Sun\ C*)
104540814a2baSmrg	      # Sun C++ 5.9
104550814a2baSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
104560814a2baSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
104570814a2baSmrg	      _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'
104580814a2baSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
104590814a2baSmrg	      _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'
104600814a2baSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
1046186dafe34Smrg
104620814a2baSmrg	      # Not sure whether something based on
104630814a2baSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
104640814a2baSmrg	      # would be better.
104650814a2baSmrg	      output_verbose_link_cmd='func_echo_all'
1046686dafe34Smrg
104670814a2baSmrg	      # Archives containing C++ object files must be created using
104680814a2baSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
104690814a2baSmrg	      # necessary to make sure instantiated templates are included
104700814a2baSmrg	      # in the archive.
104710814a2baSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
104720814a2baSmrg	      ;;
104730814a2baSmrg	    esac
104740814a2baSmrg	    ;;
104750814a2baSmrg	esac
104760814a2baSmrg	;;
1047786dafe34Smrg
104780814a2baSmrg      lynxos*)
104790814a2baSmrg        # FIXME: insert proper C++ library support
104800814a2baSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
104810814a2baSmrg	;;
1048263847c39Smrg
104830814a2baSmrg      m88k*)
104840814a2baSmrg        # FIXME: insert proper C++ library support
104850814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
104860814a2baSmrg	;;
1048786dafe34Smrg
104880814a2baSmrg      mvs*)
104890814a2baSmrg        case $cc_basename in
104900814a2baSmrg          cxx*)
104910814a2baSmrg	    # FIXME: insert proper C++ library support
104920814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
104930814a2baSmrg	    ;;
104940814a2baSmrg	  *)
104950814a2baSmrg	    # FIXME: insert proper C++ library support
104960814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
104970814a2baSmrg	    ;;
104980814a2baSmrg	esac
104990814a2baSmrg	;;
1050086dafe34Smrg
105010814a2baSmrg      netbsd*)
105020814a2baSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
105030814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
105040814a2baSmrg	  wlarc=
105050814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
105060814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
105070814a2baSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
105080814a2baSmrg	fi
105090814a2baSmrg	# Workaround some broken pre-1.5 toolchains
105100814a2baSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
105110814a2baSmrg	;;
1051276888252Smrg
105130814a2baSmrg      *nto* | *qnx*)
105140814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
105150814a2baSmrg	;;
1051663847c39Smrg
105170814a2baSmrg      openbsd* | bitrig*)
105180814a2baSmrg	if test -f /usr/libexec/ld.so; then
105190814a2baSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
105200814a2baSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
105210814a2baSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
105220814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
105230814a2baSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
105240814a2baSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
105250814a2baSmrg	    _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'
105260814a2baSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
105270814a2baSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
105280814a2baSmrg	  fi
105290814a2baSmrg	  output_verbose_link_cmd=func_echo_all
105300814a2baSmrg	else
105310814a2baSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
105320814a2baSmrg	fi
105330814a2baSmrg	;;
1053463847c39Smrg
105350814a2baSmrg      osf3* | osf4* | osf5*)
105360814a2baSmrg        case $cc_basename in
105370814a2baSmrg          KCC*)
105380814a2baSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
1053963847c39Smrg
105400814a2baSmrg	    # KCC will only create a shared library if the output file
105410814a2baSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
105420814a2baSmrg	    # to its proper name (with version) after linking.
105430814a2baSmrg	    _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'
1054463847c39Smrg
105450814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
105460814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1054763847c39Smrg
105480814a2baSmrg	    # Archives containing C++ object files must be created using
105490814a2baSmrg	    # the KAI C++ compiler.
105500814a2baSmrg	    case $host in
105510814a2baSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
105520814a2baSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
105530814a2baSmrg	    esac
105540814a2baSmrg	    ;;
105550814a2baSmrg          RCC*)
105560814a2baSmrg	    # Rational C++ 2.4.1
105570814a2baSmrg	    # FIXME: insert proper C++ library support
105580814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105590814a2baSmrg	    ;;
105600814a2baSmrg          cxx*)
105610814a2baSmrg	    case $host in
105620814a2baSmrg	      osf3*)
105630814a2baSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
105640814a2baSmrg	        _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'
105650814a2baSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
105660814a2baSmrg		;;
105670814a2baSmrg	      *)
105680814a2baSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
105690814a2baSmrg	        _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'
105700814a2baSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
105710814a2baSmrg                  echo "-hidden">> $lib.exp~
105720814a2baSmrg                  $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~
105730814a2baSmrg                  $RM $lib.exp'
105740814a2baSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
105750814a2baSmrg		;;
105760814a2baSmrg	    esac
1057763847c39Smrg
105780814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1057963847c39Smrg
105800814a2baSmrg	    # Commands to make compiler produce verbose output that lists
105810814a2baSmrg	    # what "hidden" libraries, object files and flags are used when
105820814a2baSmrg	    # linking a shared library.
105830814a2baSmrg	    #
105840814a2baSmrg	    # There doesn't appear to be a way to prevent this compiler from
105850814a2baSmrg	    # explicitly linking system object files so we need to strip them
105860814a2baSmrg	    # from the output so that they don't get included in the library
105870814a2baSmrg	    # dependencies.
105880814a2baSmrg	    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"'
105890814a2baSmrg	    ;;
105900814a2baSmrg	  *)
105910814a2baSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
105920814a2baSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
105930814a2baSmrg	      case $host in
105940814a2baSmrg	        osf3*)
105950814a2baSmrg	          _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'
105960814a2baSmrg		  ;;
105970814a2baSmrg	        *)
105980814a2baSmrg	          _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'
105990814a2baSmrg		  ;;
106000814a2baSmrg	      esac
1060163847c39Smrg
106020814a2baSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
106030814a2baSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1060463847c39Smrg
106050814a2baSmrg	      # Commands to make compiler produce verbose output that lists
106060814a2baSmrg	      # what "hidden" libraries, object files and flags are used when
106070814a2baSmrg	      # linking a shared library.
106080814a2baSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
1060963847c39Smrg
106100814a2baSmrg	    else
106110814a2baSmrg	      # FIXME: insert proper C++ library support
106120814a2baSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
106130814a2baSmrg	    fi
106140814a2baSmrg	    ;;
106150814a2baSmrg        esac
106160814a2baSmrg        ;;
1061763847c39Smrg
106180814a2baSmrg      psos*)
106190814a2baSmrg        # FIXME: insert proper C++ library support
106200814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
106210814a2baSmrg        ;;
1062263847c39Smrg
106230814a2baSmrg      sunos4*)
106240814a2baSmrg        case $cc_basename in
106250814a2baSmrg          CC*)
106260814a2baSmrg	    # Sun C++ 4.x
106270814a2baSmrg	    # FIXME: insert proper C++ library support
106280814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
106290814a2baSmrg	    ;;
106300814a2baSmrg          lcc*)
106310814a2baSmrg	    # Lucid
106320814a2baSmrg	    # FIXME: insert proper C++ library support
106330814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
106340814a2baSmrg	    ;;
106350814a2baSmrg          *)
106360814a2baSmrg	    # FIXME: insert proper C++ library support
106370814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
106380814a2baSmrg	    ;;
106390814a2baSmrg        esac
106400814a2baSmrg        ;;
1064163847c39Smrg
106420814a2baSmrg      solaris*)
106430814a2baSmrg        case $cc_basename in
106440814a2baSmrg          CC* | sunCC*)
106450814a2baSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
106460814a2baSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
106470814a2baSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
106480814a2baSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
106490814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
106500814a2baSmrg              $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'
1065163847c39Smrg
106520814a2baSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
106530814a2baSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
106540814a2baSmrg	    case $host_os in
106550814a2baSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
106560814a2baSmrg	      *)
106570814a2baSmrg		# The compiler driver will combine and reorder linker options,
106580814a2baSmrg		# but understands '-z linker_flag'.
106590814a2baSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
106600814a2baSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
106610814a2baSmrg	        ;;
106620814a2baSmrg	    esac
106630814a2baSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
106640814a2baSmrg
106650814a2baSmrg	    output_verbose_link_cmd='func_echo_all'
106660814a2baSmrg
106670814a2baSmrg	    # Archives containing C++ object files must be created using
106680814a2baSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
106690814a2baSmrg	    # necessary to make sure instantiated templates are included
106700814a2baSmrg	    # in the archive.
106710814a2baSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
106720814a2baSmrg	    ;;
106730814a2baSmrg          gcx*)
106740814a2baSmrg	    # Green Hills C++ Compiler
106750814a2baSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
106760814a2baSmrg
106770814a2baSmrg	    # The C++ compiler must be used to create the archive.
106780814a2baSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
106790814a2baSmrg	    ;;
106800814a2baSmrg          *)
106810814a2baSmrg	    # GNU C++ compiler with Solaris linker
106820814a2baSmrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
106830814a2baSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
106840814a2baSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
106850814a2baSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
106860814a2baSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
106870814a2baSmrg                  $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'
106880814a2baSmrg
106890814a2baSmrg	        # Commands to make compiler produce verbose output that lists
106900814a2baSmrg	        # what "hidden" libraries, object files and flags are used when
106910814a2baSmrg	        # linking a shared library.
106920814a2baSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
106930814a2baSmrg	      else
106940814a2baSmrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
106950814a2baSmrg	        # platform.
106960814a2baSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
106970814a2baSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
106980814a2baSmrg                  $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'
1069963847c39Smrg
107000814a2baSmrg	        # Commands to make compiler produce verbose output that lists
107010814a2baSmrg	        # what "hidden" libraries, object files and flags are used when
107020814a2baSmrg	        # linking a shared library.
107030814a2baSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
107040814a2baSmrg	      fi
1070563847c39Smrg
107060814a2baSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
107070814a2baSmrg	      case $host_os in
107080814a2baSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
107090814a2baSmrg		*)
107100814a2baSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
107110814a2baSmrg		  ;;
107120814a2baSmrg	      esac
107130814a2baSmrg	    fi
107140814a2baSmrg	    ;;
107150814a2baSmrg        esac
107160814a2baSmrg        ;;
1071763847c39Smrg
107180814a2baSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
107190814a2baSmrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
107200814a2baSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
107210814a2baSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
107220814a2baSmrg      runpath_var='LD_RUN_PATH'
1072363847c39Smrg
107240814a2baSmrg      case $cc_basename in
107250814a2baSmrg        CC*)
107260814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107270814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107280814a2baSmrg	  ;;
107290814a2baSmrg	*)
107300814a2baSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107310814a2baSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107320814a2baSmrg	  ;;
107330814a2baSmrg      esac
107340814a2baSmrg      ;;
107359586ba5aSmrg
107360814a2baSmrg      sysv5* | sco3.2v5* | sco5v6*)
107370814a2baSmrg	# Note: We CANNOT use -z defs as we might desire, because we do not
107380814a2baSmrg	# link with -lc, and that would cause any symbols used from libc to
107390814a2baSmrg	# always be unresolved, which means just about no library would
107400814a2baSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
107410814a2baSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
107420814a2baSmrg	# as -z defs.
107430814a2baSmrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
107440814a2baSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
107450814a2baSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
107460814a2baSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
107470814a2baSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
107480814a2baSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
107490814a2baSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
107500814a2baSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
107510814a2baSmrg	runpath_var='LD_RUN_PATH'
107529586ba5aSmrg
107530814a2baSmrg	case $cc_basename in
107540814a2baSmrg          CC*)
107550814a2baSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107560814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107570814a2baSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
107580814a2baSmrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
107590814a2baSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
107600814a2baSmrg              '"$_LT_TAGVAR(reload_cmds, $1)"
107610814a2baSmrg	    ;;
107620814a2baSmrg	  *)
107630814a2baSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107640814a2baSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107650814a2baSmrg	    ;;
107660814a2baSmrg	esac
107670814a2baSmrg      ;;
1076863847c39Smrg
107690814a2baSmrg      tandem*)
107700814a2baSmrg        case $cc_basename in
107710814a2baSmrg          NCC*)
107720814a2baSmrg	    # NonStop-UX NCC 3.20
107730814a2baSmrg	    # FIXME: insert proper C++ library support
107740814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
107750814a2baSmrg	    ;;
107760814a2baSmrg          *)
107770814a2baSmrg	    # FIXME: insert proper C++ library support
107780814a2baSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
107790814a2baSmrg	    ;;
107800814a2baSmrg        esac
107810814a2baSmrg        ;;
107820814a2baSmrg
107830814a2baSmrg      vxworks*)
107840814a2baSmrg        # FIXME: insert proper C++ library support
107850814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
107860814a2baSmrg        ;;
1078763847c39Smrg
107880814a2baSmrg      *)
107890814a2baSmrg        # FIXME: insert proper C++ library support
107900814a2baSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
107910814a2baSmrg        ;;
107920814a2baSmrg    esac
1079363847c39Smrg
107940814a2baSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
107950814a2baSmrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
1079663847c39Smrg
107970814a2baSmrg    _LT_TAGVAR(GCC, $1)=$GXX
107980814a2baSmrg    _LT_TAGVAR(LD, $1)=$LD
1079963847c39Smrg
108000814a2baSmrg    ## CAVEAT EMPTOR:
108010814a2baSmrg    ## There is no encapsulation within the following macros, do not change
108020814a2baSmrg    ## the running order or otherwise move them around unless you know exactly
108030814a2baSmrg    ## what you are doing...
108040814a2baSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
108050814a2baSmrg    _LT_COMPILER_PIC($1)
108060814a2baSmrg    _LT_COMPILER_C_O($1)
108070814a2baSmrg    _LT_COMPILER_FILE_LOCKS($1)
108080814a2baSmrg    _LT_LINKER_SHLIBS($1)
108090814a2baSmrg    _LT_SYS_DYNAMIC_LINKER($1)
108100814a2baSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
1081163847c39Smrg
108120814a2baSmrg    _LT_CONFIG($1)
108130814a2baSmrg  fi # test -n "$compiler"
1081463847c39Smrg
108150814a2baSmrg  CC=$lt_save_CC
108160814a2baSmrg  CFLAGS=$lt_save_CFLAGS
108170814a2baSmrg  LDCXX=$LD
108180814a2baSmrg  LD=$lt_save_LD
108190814a2baSmrg  GCC=$lt_save_GCC
108200814a2baSmrg  with_gnu_ld=$lt_save_with_gnu_ld
108210814a2baSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
108220814a2baSmrg  lt_cv_path_LD=$lt_save_path_LD
108230814a2baSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
108240814a2baSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
108250814a2baSmrgfi # test yes != "$_lt_caught_CXX_error"
1082663847c39Smrg
108270814a2baSmrgAC_LANG_POP
108280814a2baSmrg])# _LT_LANG_CXX_CONFIG
1082963847c39Smrg
108300814a2baSmrg
108310814a2baSmrg# _LT_FUNC_STRIPNAME_CNF
108320814a2baSmrg# ----------------------
108330814a2baSmrg# func_stripname_cnf prefix suffix name
108340814a2baSmrg# strip PREFIX and SUFFIX off of NAME.
108350814a2baSmrg# PREFIX and SUFFIX must not contain globbing or regex special
108360814a2baSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
108370814a2baSmrg# dot (in which case that matches only a dot).
108389586ba5aSmrg#
108390814a2baSmrg# This function is identical to the (non-XSI) version of func_stripname,
108400814a2baSmrg# except this one can be used by m4 code that may be executed by configure,
108410814a2baSmrg# rather than the libtool script.
108420814a2baSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
108430814a2baSmrgAC_REQUIRE([_LT_DECL_SED])
108440814a2baSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
108450814a2baSmrgfunc_stripname_cnf ()
108460814a2baSmrg{
108470814a2baSmrg  case @S|@2 in
108480814a2baSmrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
108490814a2baSmrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
108500814a2baSmrg  esac
108510814a2baSmrg} # func_stripname_cnf
108520814a2baSmrg])# _LT_FUNC_STRIPNAME_CNF
108530814a2baSmrg
108540814a2baSmrg
108550814a2baSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
108560814a2baSmrg# ---------------------------------
108570814a2baSmrg# Figure out "hidden" library dependencies from verbose
108580814a2baSmrg# compiler output when linking a shared library.
108590814a2baSmrg# Parse the compiler output and extract the necessary
108600814a2baSmrg# objects, libraries and library flags.
108610814a2baSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
108620814a2baSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
108630814a2baSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
108640814a2baSmrg# Dependencies to place before and after the object being linked:
108650814a2baSmrg_LT_TAGVAR(predep_objects, $1)=
108660814a2baSmrg_LT_TAGVAR(postdep_objects, $1)=
108670814a2baSmrg_LT_TAGVAR(predeps, $1)=
108680814a2baSmrg_LT_TAGVAR(postdeps, $1)=
108690814a2baSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
108700814a2baSmrg
108710814a2baSmrgdnl we can't use the lt_simple_compile_test_code here,
108720814a2baSmrgdnl because it contains code intended for an executable,
108730814a2baSmrgdnl not a library.  It's possible we should let each
108740814a2baSmrgdnl tag define a new lt_????_link_test_code variable,
108750814a2baSmrgdnl but it's only used here...
108760814a2baSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
108770814a2baSmrgint a;
108780814a2baSmrgvoid foo (void) { a = 0; }
108790814a2baSmrg_LT_EOF
108800814a2baSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
108810814a2baSmrgclass Foo
108820814a2baSmrg{
108830814a2baSmrgpublic:
108840814a2baSmrg  Foo (void) { a = 0; }
108850814a2baSmrgprivate:
108860814a2baSmrg  int a;
108870814a2baSmrg};
108880814a2baSmrg_LT_EOF
108890814a2baSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
108900814a2baSmrg      subroutine foo
108910814a2baSmrg      implicit none
108920814a2baSmrg      integer*4 a
108930814a2baSmrg      a=0
108940814a2baSmrg      return
108950814a2baSmrg      end
108960814a2baSmrg_LT_EOF
108970814a2baSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
108980814a2baSmrg      subroutine foo
108990814a2baSmrg      implicit none
109000814a2baSmrg      integer a
109010814a2baSmrg      a=0
109020814a2baSmrg      return
109030814a2baSmrg      end
109040814a2baSmrg_LT_EOF
109050814a2baSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
109060814a2baSmrgpublic class foo {
109070814a2baSmrg  private int a;
109080814a2baSmrg  public void bar (void) {
109090814a2baSmrg    a = 0;
109100814a2baSmrg  }
109110814a2baSmrg};
109120814a2baSmrg_LT_EOF
109130814a2baSmrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
109140814a2baSmrgpackage foo
109150814a2baSmrgfunc foo() {
109160814a2baSmrg}
109170814a2baSmrg_LT_EOF
109180814a2baSmrg])
109199586ba5aSmrg
109200814a2baSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
109210814a2baSmrgcase "$CC $CFLAGS " in #(
109220814a2baSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
109230814a2baSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
109240814a2baSmrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
109250814a2baSmrgesac
109269586ba5aSmrg
109270814a2baSmrgdnl Parse the compiler output and extract the necessary
109280814a2baSmrgdnl objects, libraries and library flags.
109290814a2baSmrgif AC_TRY_EVAL(ac_compile); then
109300814a2baSmrg  # Parse the compiler output and extract the necessary
109310814a2baSmrg  # objects, libraries and library flags.
1093263847c39Smrg
109330814a2baSmrg  # Sentinel used to keep track of whether or not we are before
109340814a2baSmrg  # the conftest object file.
109350814a2baSmrg  pre_test_object_deps_done=no
1093663847c39Smrg
109370814a2baSmrg  for p in `eval "$output_verbose_link_cmd"`; do
109380814a2baSmrg    case $prev$p in
1093963847c39Smrg
109400814a2baSmrg    -L* | -R* | -l*)
109410814a2baSmrg       # Some compilers place space between "-{L,R}" and the path.
109420814a2baSmrg       # Remove the space.
109430814a2baSmrg       if test x-L = "$p" ||
109440814a2baSmrg          test x-R = "$p"; then
109450814a2baSmrg	 prev=$p
109460814a2baSmrg	 continue
109470814a2baSmrg       fi
1094863847c39Smrg
109490814a2baSmrg       # Expand the sysroot to ease extracting the directories later.
109500814a2baSmrg       if test -z "$prev"; then
109510814a2baSmrg         case $p in
109520814a2baSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
109530814a2baSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
109540814a2baSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
109550814a2baSmrg         esac
109560814a2baSmrg       fi
109570814a2baSmrg       case $p in
109580814a2baSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
109590814a2baSmrg       esac
109600814a2baSmrg       if test no = "$pre_test_object_deps_done"; then
109610814a2baSmrg	 case $prev in
109620814a2baSmrg	 -L | -R)
109630814a2baSmrg	   # Internal compiler library paths should come after those
109640814a2baSmrg	   # provided the user.  The postdeps already come after the
109650814a2baSmrg	   # user supplied libs so there is no need to process them.
109660814a2baSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
109670814a2baSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
109680814a2baSmrg	   else
109690814a2baSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
109700814a2baSmrg	   fi
109710814a2baSmrg	   ;;
109720814a2baSmrg	 # The "-l" case would never come before the object being
109730814a2baSmrg	 # linked, so don't bother handling this case.
109740814a2baSmrg	 esac
109750814a2baSmrg       else
109760814a2baSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
109770814a2baSmrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
109780814a2baSmrg	 else
109790814a2baSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
109800814a2baSmrg	 fi
109810814a2baSmrg       fi
109820814a2baSmrg       prev=
109830814a2baSmrg       ;;
1098463847c39Smrg
109850814a2baSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
109860814a2baSmrg    *.$objext)
109870814a2baSmrg       # This assumes that the test object file only shows up
109880814a2baSmrg       # once in the compiler output.
109890814a2baSmrg       if test "$p" = "conftest.$objext"; then
109900814a2baSmrg	 pre_test_object_deps_done=yes
109910814a2baSmrg	 continue
109920814a2baSmrg       fi
109930814a2baSmrg
109940814a2baSmrg       if test no = "$pre_test_object_deps_done"; then
109950814a2baSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
109960814a2baSmrg	   _LT_TAGVAR(predep_objects, $1)=$p
109970814a2baSmrg	 else
109980814a2baSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
109990814a2baSmrg	 fi
110000814a2baSmrg       else
110010814a2baSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
110020814a2baSmrg	   _LT_TAGVAR(postdep_objects, $1)=$p
110030814a2baSmrg	 else
110040814a2baSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
110050814a2baSmrg	 fi
110060814a2baSmrg       fi
110070814a2baSmrg       ;;
1100863847c39Smrg
110090814a2baSmrg    *) ;; # Ignore the rest.
1101063847c39Smrg
110110814a2baSmrg    esac
110120814a2baSmrg  done
1101363847c39Smrg
110140814a2baSmrg  # Clean up.
110150814a2baSmrg  rm -f a.out a.exe
110160814a2baSmrgelse
110170814a2baSmrg  echo "libtool.m4: error: problem compiling $1 test program"
1101863847c39Smrgfi
1101963847c39Smrg
110200814a2baSmrg$RM -f confest.$objext
110210814a2baSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
1102263847c39Smrg
110230814a2baSmrg# PORTME: override above test on systems where it is broken
110240814a2baSmrgm4_if([$1], [CXX],
110250814a2baSmrg[case $host_os in
110260814a2baSmrginterix[[3-9]]*)
110270814a2baSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
110280814a2baSmrg  # hack all around it, let's just trust "g++" to DTRT.
110290814a2baSmrg  _LT_TAGVAR(predep_objects,$1)=
110300814a2baSmrg  _LT_TAGVAR(postdep_objects,$1)=
110310814a2baSmrg  _LT_TAGVAR(postdeps,$1)=
110320814a2baSmrg  ;;
110330814a2baSmrgesac
110340814a2baSmrg])
1103563847c39Smrg
110360814a2baSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
110370814a2baSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
110380814a2baSmrgesac
110390814a2baSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
110400814a2baSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
110410814a2baSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
1104263847c39Smrgfi
110430814a2baSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
110440814a2baSmrg    [The directories searched by this compiler when creating a shared library])
110450814a2baSmrg_LT_TAGDECL([], [predep_objects], [1],
110460814a2baSmrg    [Dependencies to place before and after the objects being linked to
110470814a2baSmrg    create a shared library])
110480814a2baSmrg_LT_TAGDECL([], [postdep_objects], [1])
110490814a2baSmrg_LT_TAGDECL([], [predeps], [1])
110500814a2baSmrg_LT_TAGDECL([], [postdeps], [1])
110510814a2baSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
110520814a2baSmrg    [The library search path used internally by the compiler when linking
110530814a2baSmrg    a shared library])
110540814a2baSmrg])# _LT_SYS_HIDDEN_LIBDEPS
1105563847c39Smrg
1105663847c39Smrg
110570814a2baSmrg# _LT_LANG_F77_CONFIG([TAG])
110580814a2baSmrg# --------------------------
110590814a2baSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
110600814a2baSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
110610814a2baSmrg# to write the compiler configuration to 'libtool'.
110620814a2baSmrgm4_defun([_LT_LANG_F77_CONFIG],
110630814a2baSmrg[AC_LANG_PUSH(Fortran 77)
110640814a2baSmrgif test -z "$F77" || test no = "$F77"; then
110650814a2baSmrg  _lt_disable_F77=yes
1106663847c39Smrgfi
1106763847c39Smrg
110680814a2baSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
110690814a2baSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
110700814a2baSmrg_LT_TAGVAR(always_export_symbols, $1)=no
110710814a2baSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
110720814a2baSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
110730814a2baSmrg_LT_TAGVAR(hardcode_direct, $1)=no
110740814a2baSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
110750814a2baSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
110760814a2baSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
110770814a2baSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
110780814a2baSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
110790814a2baSmrg_LT_TAGVAR(inherit_rpath, $1)=no
110800814a2baSmrg_LT_TAGVAR(module_cmds, $1)=
110810814a2baSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
110820814a2baSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
110830814a2baSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
110840814a2baSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
110850814a2baSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
110860814a2baSmrg_LT_TAGVAR(no_undefined_flag, $1)=
110870814a2baSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
110880814a2baSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
1108963847c39Smrg
110900814a2baSmrg# Source file extension for f77 test sources.
110910814a2baSmrgac_ext=f
1109263847c39Smrg
110930814a2baSmrg# Object file extension for compiled f77 test sources.
110940814a2baSmrgobjext=o
110950814a2baSmrg_LT_TAGVAR(objext, $1)=$objext
1109676888252Smrg
110970814a2baSmrg# No sense in running all these tests if we already determined that
110980814a2baSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
110990814a2baSmrg# are currently assumed to apply to all compilers on this platform,
111000814a2baSmrg# and will be corrupted by setting them based on a non-working compiler.
111010814a2baSmrgif test yes != "$_lt_disable_F77"; then
111020814a2baSmrg  # Code to be used in simple compile tests
111030814a2baSmrg  lt_simple_compile_test_code="\
111040814a2baSmrg      subroutine t
111050814a2baSmrg      return
111060814a2baSmrg      end
111070814a2baSmrg"
1110876888252Smrg
111090814a2baSmrg  # Code to be used in simple link tests
111100814a2baSmrg  lt_simple_link_test_code="\
111110814a2baSmrg      program t
111120814a2baSmrg      end
111130814a2baSmrg"
1111476888252Smrg
111150814a2baSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
111160814a2baSmrg  _LT_TAG_COMPILER
1111776888252Smrg
111180814a2baSmrg  # save warnings/boilerplate of simple test code
111190814a2baSmrg  _LT_COMPILER_BOILERPLATE
111200814a2baSmrg  _LT_LINKER_BOILERPLATE
1112176888252Smrg
111220814a2baSmrg  # Allow CC to be a program name with arguments.
111230814a2baSmrg  lt_save_CC=$CC
111240814a2baSmrg  lt_save_GCC=$GCC
111250814a2baSmrg  lt_save_CFLAGS=$CFLAGS
111260814a2baSmrg  CC=${F77-"f77"}
111270814a2baSmrg  CFLAGS=$FFLAGS
111280814a2baSmrg  compiler=$CC
111290814a2baSmrg  _LT_TAGVAR(compiler, $1)=$CC
111300814a2baSmrg  _LT_CC_BASENAME([$compiler])
111310814a2baSmrg  GCC=$G77
111320814a2baSmrg  if test -n "$compiler"; then
111330814a2baSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
111340814a2baSmrg    AC_MSG_RESULT([$can_build_shared])
1113576888252Smrg
111360814a2baSmrg    AC_MSG_CHECKING([whether to build shared libraries])
111370814a2baSmrg    test no = "$can_build_shared" && enable_shared=no
1113876888252Smrg
111390814a2baSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
111400814a2baSmrg    # are all built from PIC.
111410814a2baSmrg    case $host_os in
111420814a2baSmrg      aix3*)
111430814a2baSmrg        test yes = "$enable_shared" && enable_static=no
111440814a2baSmrg        if test -n "$RANLIB"; then
111450814a2baSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
111460814a2baSmrg          postinstall_cmds='$RANLIB $lib'
111470814a2baSmrg        fi
111480814a2baSmrg        ;;
111490814a2baSmrg      aix[[4-9]]*)
111500814a2baSmrg	if test ia64 != "$host_cpu"; then
111510814a2baSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
111520814a2baSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
111530814a2baSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
111540814a2baSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
111550814a2baSmrg	  esac
111560814a2baSmrg	fi
111570814a2baSmrg        ;;
111580814a2baSmrg    esac
111590814a2baSmrg    AC_MSG_RESULT([$enable_shared])
1116076888252Smrg
111610814a2baSmrg    AC_MSG_CHECKING([whether to build static libraries])
111620814a2baSmrg    # Make sure either enable_shared or enable_static is yes.
111630814a2baSmrg    test yes = "$enable_shared" || enable_static=yes
111640814a2baSmrg    AC_MSG_RESULT([$enable_static])
1116576888252Smrg
111660814a2baSmrg    _LT_TAGVAR(GCC, $1)=$G77
111670814a2baSmrg    _LT_TAGVAR(LD, $1)=$LD
1116863847c39Smrg
111690814a2baSmrg    ## CAVEAT EMPTOR:
111700814a2baSmrg    ## There is no encapsulation within the following macros, do not change
111710814a2baSmrg    ## the running order or otherwise move them around unless you know exactly
111720814a2baSmrg    ## what you are doing...
111730814a2baSmrg    _LT_COMPILER_PIC($1)
111740814a2baSmrg    _LT_COMPILER_C_O($1)
111750814a2baSmrg    _LT_COMPILER_FILE_LOCKS($1)
111760814a2baSmrg    _LT_LINKER_SHLIBS($1)
111770814a2baSmrg    _LT_SYS_DYNAMIC_LINKER($1)
111780814a2baSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
1117963847c39Smrg
111800814a2baSmrg    _LT_CONFIG($1)
111810814a2baSmrg  fi # test -n "$compiler"
1118263847c39Smrg
111830814a2baSmrg  GCC=$lt_save_GCC
111840814a2baSmrg  CC=$lt_save_CC
111850814a2baSmrg  CFLAGS=$lt_save_CFLAGS
111860814a2baSmrgfi # test yes != "$_lt_disable_F77"
111870814a2baSmrg
111880814a2baSmrgAC_LANG_POP
111890814a2baSmrg])# _LT_LANG_F77_CONFIG
111900814a2baSmrg
111910814a2baSmrg
111920814a2baSmrg# _LT_LANG_FC_CONFIG([TAG])
111930814a2baSmrg# -------------------------
111940814a2baSmrg# Ensure that the configuration variables for a Fortran compiler are
111950814a2baSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
111960814a2baSmrg# to write the compiler configuration to 'libtool'.
111970814a2baSmrgm4_defun([_LT_LANG_FC_CONFIG],
111980814a2baSmrg[AC_LANG_PUSH(Fortran)
111990814a2baSmrg
112000814a2baSmrgif test -z "$FC" || test no = "$FC"; then
112010814a2baSmrg  _lt_disable_FC=yes
1120286dafe34Smrgfi
1120376888252Smrg
112040814a2baSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
112050814a2baSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
112060814a2baSmrg_LT_TAGVAR(always_export_symbols, $1)=no
112070814a2baSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
112080814a2baSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
112090814a2baSmrg_LT_TAGVAR(hardcode_direct, $1)=no
112100814a2baSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
112110814a2baSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
112120814a2baSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
112130814a2baSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
112140814a2baSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
112150814a2baSmrg_LT_TAGVAR(inherit_rpath, $1)=no
112160814a2baSmrg_LT_TAGVAR(module_cmds, $1)=
112170814a2baSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
112180814a2baSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
112190814a2baSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
112200814a2baSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
112210814a2baSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
112220814a2baSmrg_LT_TAGVAR(no_undefined_flag, $1)=
112230814a2baSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
112240814a2baSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
1122576888252Smrg
112260814a2baSmrg# Source file extension for fc test sources.
112270814a2baSmrgac_ext=${ac_fc_srcext-f}
1122876888252Smrg
112290814a2baSmrg# Object file extension for compiled fc test sources.
112300814a2baSmrgobjext=o
112310814a2baSmrg_LT_TAGVAR(objext, $1)=$objext
1123276888252Smrg
112330814a2baSmrg# No sense in running all these tests if we already determined that
112340814a2baSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
112350814a2baSmrg# are currently assumed to apply to all compilers on this platform,
112360814a2baSmrg# and will be corrupted by setting them based on a non-working compiler.
112370814a2baSmrgif test yes != "$_lt_disable_FC"; then
112380814a2baSmrg  # Code to be used in simple compile tests
112390814a2baSmrg  lt_simple_compile_test_code="\
112400814a2baSmrg      subroutine t
112410814a2baSmrg      return
112420814a2baSmrg      end
112430814a2baSmrg"
1124463847c39Smrg
112450814a2baSmrg  # Code to be used in simple link tests
112460814a2baSmrg  lt_simple_link_test_code="\
112470814a2baSmrg      program t
112480814a2baSmrg      end
112490814a2baSmrg"
1125063847c39Smrg
112510814a2baSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
112520814a2baSmrg  _LT_TAG_COMPILER
1125376888252Smrg
112540814a2baSmrg  # save warnings/boilerplate of simple test code
112550814a2baSmrg  _LT_COMPILER_BOILERPLATE
112560814a2baSmrg  _LT_LINKER_BOILERPLATE
1125776888252Smrg
112580814a2baSmrg  # Allow CC to be a program name with arguments.
112590814a2baSmrg  lt_save_CC=$CC
112600814a2baSmrg  lt_save_GCC=$GCC
112610814a2baSmrg  lt_save_CFLAGS=$CFLAGS
112620814a2baSmrg  CC=${FC-"f95"}
112630814a2baSmrg  CFLAGS=$FCFLAGS
112640814a2baSmrg  compiler=$CC
112650814a2baSmrg  GCC=$ac_cv_fc_compiler_gnu
1126663847c39Smrg
112670814a2baSmrg  _LT_TAGVAR(compiler, $1)=$CC
112680814a2baSmrg  _LT_CC_BASENAME([$compiler])
1126963847c39Smrg
112700814a2baSmrg  if test -n "$compiler"; then
112710814a2baSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
112720814a2baSmrg    AC_MSG_RESULT([$can_build_shared])
1127363847c39Smrg
112740814a2baSmrg    AC_MSG_CHECKING([whether to build shared libraries])
112750814a2baSmrg    test no = "$can_build_shared" && enable_shared=no
1127663847c39Smrg
112770814a2baSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
112780814a2baSmrg    # are all built from PIC.
112790814a2baSmrg    case $host_os in
112800814a2baSmrg      aix3*)
112810814a2baSmrg        test yes = "$enable_shared" && enable_static=no
112820814a2baSmrg        if test -n "$RANLIB"; then
112830814a2baSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
112840814a2baSmrg          postinstall_cmds='$RANLIB $lib'
112850814a2baSmrg        fi
112860814a2baSmrg        ;;
112870814a2baSmrg      aix[[4-9]]*)
112880814a2baSmrg	if test ia64 != "$host_cpu"; then
112890814a2baSmrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
112900814a2baSmrg	  yes,aix,yes) ;;		# shared object as lib.so file only
112910814a2baSmrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
112920814a2baSmrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
112930814a2baSmrg	  esac
112940814a2baSmrg	fi
112950814a2baSmrg        ;;
112960814a2baSmrg    esac
112970814a2baSmrg    AC_MSG_RESULT([$enable_shared])
1129863847c39Smrg
112990814a2baSmrg    AC_MSG_CHECKING([whether to build static libraries])
113000814a2baSmrg    # Make sure either enable_shared or enable_static is yes.
113010814a2baSmrg    test yes = "$enable_shared" || enable_static=yes
113020814a2baSmrg    AC_MSG_RESULT([$enable_static])
1130363847c39Smrg
113040814a2baSmrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
113050814a2baSmrg    _LT_TAGVAR(LD, $1)=$LD
1130663847c39Smrg
113070814a2baSmrg    ## CAVEAT EMPTOR:
113080814a2baSmrg    ## There is no encapsulation within the following macros, do not change
113090814a2baSmrg    ## the running order or otherwise move them around unless you know exactly
113100814a2baSmrg    ## what you are doing...
113110814a2baSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
113120814a2baSmrg    _LT_COMPILER_PIC($1)
113130814a2baSmrg    _LT_COMPILER_C_O($1)
113140814a2baSmrg    _LT_COMPILER_FILE_LOCKS($1)
113150814a2baSmrg    _LT_LINKER_SHLIBS($1)
113160814a2baSmrg    _LT_SYS_DYNAMIC_LINKER($1)
113170814a2baSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
1131863847c39Smrg
113190814a2baSmrg    _LT_CONFIG($1)
113200814a2baSmrg  fi # test -n "$compiler"
1132163847c39Smrg
113220814a2baSmrg  GCC=$lt_save_GCC
113230814a2baSmrg  CC=$lt_save_CC
113240814a2baSmrg  CFLAGS=$lt_save_CFLAGS
113250814a2baSmrgfi # test yes != "$_lt_disable_FC"
1132663847c39Smrg
113270814a2baSmrgAC_LANG_POP
113280814a2baSmrg])# _LT_LANG_FC_CONFIG
1132963847c39Smrg
1133063847c39Smrg
113310814a2baSmrg# _LT_LANG_GCJ_CONFIG([TAG])
113320814a2baSmrg# --------------------------
113330814a2baSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
113340814a2baSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
113350814a2baSmrg# to write the compiler configuration to 'libtool'.
113360814a2baSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
113370814a2baSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
113380814a2baSmrgAC_LANG_SAVE
1133963847c39Smrg
113400814a2baSmrg# Source file extension for Java test sources.
113410814a2baSmrgac_ext=java
1134263847c39Smrg
113430814a2baSmrg# Object file extension for compiled Java test sources.
113440814a2baSmrgobjext=o
113450814a2baSmrg_LT_TAGVAR(objext, $1)=$objext
1134663847c39Smrg
113470814a2baSmrg# Code to be used in simple compile tests
113480814a2baSmrglt_simple_compile_test_code="class foo {}"
1134963847c39Smrg
113500814a2baSmrg# Code to be used in simple link tests
113510814a2baSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
1135263847c39Smrg
113530814a2baSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
113540814a2baSmrg_LT_TAG_COMPILER
1135563847c39Smrg
113560814a2baSmrg# save warnings/boilerplate of simple test code
113570814a2baSmrg_LT_COMPILER_BOILERPLATE
113580814a2baSmrg_LT_LINKER_BOILERPLATE
1135963847c39Smrg
113600814a2baSmrg# Allow CC to be a program name with arguments.
113610814a2baSmrglt_save_CC=$CC
113620814a2baSmrglt_save_CFLAGS=$CFLAGS
113630814a2baSmrglt_save_GCC=$GCC
113640814a2baSmrgGCC=yes
113650814a2baSmrgCC=${GCJ-"gcj"}
113660814a2baSmrgCFLAGS=$GCJFLAGS
113670814a2baSmrgcompiler=$CC
113680814a2baSmrg_LT_TAGVAR(compiler, $1)=$CC
113690814a2baSmrg_LT_TAGVAR(LD, $1)=$LD
113700814a2baSmrg_LT_CC_BASENAME([$compiler])
1137163847c39Smrg
113720814a2baSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
113730814a2baSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
1137463847c39Smrg
113750814a2baSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
113760814a2baSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
113770814a2baSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
113780814a2baSmrg
113790814a2baSmrgif test -n "$compiler"; then
113800814a2baSmrg  _LT_COMPILER_NO_RTTI($1)
113810814a2baSmrg  _LT_COMPILER_PIC($1)
113820814a2baSmrg  _LT_COMPILER_C_O($1)
113830814a2baSmrg  _LT_COMPILER_FILE_LOCKS($1)
113840814a2baSmrg  _LT_LINKER_SHLIBS($1)
113850814a2baSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
113860814a2baSmrg
113870814a2baSmrg  _LT_CONFIG($1)
1138863847c39Smrgfi
1138963847c39Smrg
113900814a2baSmrgAC_LANG_RESTORE
1139163847c39Smrg
113920814a2baSmrgGCC=$lt_save_GCC
113930814a2baSmrgCC=$lt_save_CC
113940814a2baSmrgCFLAGS=$lt_save_CFLAGS
113950814a2baSmrg])# _LT_LANG_GCJ_CONFIG
1139663847c39Smrg
1139763847c39Smrg
113980814a2baSmrg# _LT_LANG_GO_CONFIG([TAG])
113990814a2baSmrg# --------------------------
114000814a2baSmrg# Ensure that the configuration variables for the GNU Go compiler
114010814a2baSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
114020814a2baSmrg# to write the compiler configuration to 'libtool'.
114030814a2baSmrgm4_defun([_LT_LANG_GO_CONFIG],
114040814a2baSmrg[AC_REQUIRE([LT_PROG_GO])dnl
114050814a2baSmrgAC_LANG_SAVE
1140663847c39Smrg
114070814a2baSmrg# Source file extension for Go test sources.
114080814a2baSmrgac_ext=go
1140963847c39Smrg
114100814a2baSmrg# Object file extension for compiled Go test sources.
114110814a2baSmrgobjext=o
114120814a2baSmrg_LT_TAGVAR(objext, $1)=$objext
1141363847c39Smrg
114140814a2baSmrg# Code to be used in simple compile tests
114150814a2baSmrglt_simple_compile_test_code="package main; func main() { }"
1141663847c39Smrg
114170814a2baSmrg# Code to be used in simple link tests
114180814a2baSmrglt_simple_link_test_code='package main; func main() { }'
1141963847c39Smrg
114200814a2baSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
114210814a2baSmrg_LT_TAG_COMPILER
1142263847c39Smrg
114230814a2baSmrg# save warnings/boilerplate of simple test code
114240814a2baSmrg_LT_COMPILER_BOILERPLATE
114250814a2baSmrg_LT_LINKER_BOILERPLATE
114260814a2baSmrg
114270814a2baSmrg# Allow CC to be a program name with arguments.
114280814a2baSmrglt_save_CC=$CC
114290814a2baSmrglt_save_CFLAGS=$CFLAGS
114300814a2baSmrglt_save_GCC=$GCC
114310814a2baSmrgGCC=yes
114320814a2baSmrgCC=${GOC-"gccgo"}
114330814a2baSmrgCFLAGS=$GOFLAGS
114340814a2baSmrgcompiler=$CC
114350814a2baSmrg_LT_TAGVAR(compiler, $1)=$CC
114360814a2baSmrg_LT_TAGVAR(LD, $1)=$LD
114370814a2baSmrg_LT_CC_BASENAME([$compiler])
114380814a2baSmrg
114390814a2baSmrg# Go did not exist at the time GCC didn't implicitly link libc in.
114400814a2baSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
1144176888252Smrg
114420814a2baSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
114430814a2baSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
114440814a2baSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
114459586ba5aSmrg
114460814a2baSmrgif test -n "$compiler"; then
114470814a2baSmrg  _LT_COMPILER_NO_RTTI($1)
114480814a2baSmrg  _LT_COMPILER_PIC($1)
114490814a2baSmrg  _LT_COMPILER_C_O($1)
114500814a2baSmrg  _LT_COMPILER_FILE_LOCKS($1)
114510814a2baSmrg  _LT_LINKER_SHLIBS($1)
114520814a2baSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
114531ae1b5e8Smrg
114540814a2baSmrg  _LT_CONFIG($1)
114550814a2baSmrgfi
1145676888252Smrg
114570814a2baSmrgAC_LANG_RESTORE
1145863847c39Smrg
114590814a2baSmrgGCC=$lt_save_GCC
114600814a2baSmrgCC=$lt_save_CC
114610814a2baSmrgCFLAGS=$lt_save_CFLAGS
114620814a2baSmrg])# _LT_LANG_GO_CONFIG
1146363847c39Smrg
1146463847c39Smrg
114650814a2baSmrg# _LT_LANG_RC_CONFIG([TAG])
114660814a2baSmrg# -------------------------
114670814a2baSmrg# Ensure that the configuration variables for the Windows resource compiler
114680814a2baSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
114690814a2baSmrg# to write the compiler configuration to 'libtool'.
114700814a2baSmrgm4_defun([_LT_LANG_RC_CONFIG],
114710814a2baSmrg[AC_REQUIRE([LT_PROG_RC])dnl
114720814a2baSmrgAC_LANG_SAVE
1147376888252Smrg
114740814a2baSmrg# Source file extension for RC test sources.
114750814a2baSmrgac_ext=rc
1147676888252Smrg
114770814a2baSmrg# Object file extension for compiled RC test sources.
114780814a2baSmrgobjext=o
114790814a2baSmrg_LT_TAGVAR(objext, $1)=$objext
1148076888252Smrg
114810814a2baSmrg# Code to be used in simple compile tests
114820814a2baSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
1148376888252Smrg
114840814a2baSmrg# Code to be used in simple link tests
114850814a2baSmrglt_simple_link_test_code=$lt_simple_compile_test_code
1148676888252Smrg
114870814a2baSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
114880814a2baSmrg_LT_TAG_COMPILER
1148976888252Smrg
114900814a2baSmrg# save warnings/boilerplate of simple test code
114910814a2baSmrg_LT_COMPILER_BOILERPLATE
114920814a2baSmrg_LT_LINKER_BOILERPLATE
1149376888252Smrg
114940814a2baSmrg# Allow CC to be a program name with arguments.
114950814a2baSmrglt_save_CC=$CC
114960814a2baSmrglt_save_CFLAGS=$CFLAGS
114970814a2baSmrglt_save_GCC=$GCC
114980814a2baSmrgGCC=
114990814a2baSmrgCC=${RC-"windres"}
115000814a2baSmrgCFLAGS=
115010814a2baSmrgcompiler=$CC
115020814a2baSmrg_LT_TAGVAR(compiler, $1)=$CC
115030814a2baSmrg_LT_CC_BASENAME([$compiler])
115040814a2baSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
115050814a2baSmrg
115060814a2baSmrgif test -n "$compiler"; then
115070814a2baSmrg  :
115080814a2baSmrg  _LT_CONFIG($1)
115090814a2baSmrgfi
115100814a2baSmrg
115110814a2baSmrgGCC=$lt_save_GCC
115120814a2baSmrgAC_LANG_RESTORE
115130814a2baSmrgCC=$lt_save_CC
115140814a2baSmrgCFLAGS=$lt_save_CFLAGS
115150814a2baSmrg])# _LT_LANG_RC_CONFIG
115160814a2baSmrg
115170814a2baSmrg
115180814a2baSmrg# LT_PROG_GCJ
115190814a2baSmrg# -----------
115200814a2baSmrgAC_DEFUN([LT_PROG_GCJ],
115210814a2baSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
115220814a2baSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
115230814a2baSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
115240814a2baSmrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
115250814a2baSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
1152686dafe34Smrg])
1152776888252Smrg
115280814a2baSmrg# Old name:
115290814a2baSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
115300814a2baSmrgdnl aclocal-1.4 backwards compatibility:
115310814a2baSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
1153276888252Smrg
1153376888252Smrg
115340814a2baSmrg# LT_PROG_GO
115350814a2baSmrg# ----------
115360814a2baSmrgAC_DEFUN([LT_PROG_GO],
115370814a2baSmrg[AC_CHECK_TOOL(GOC, gccgo,)
115380814a2baSmrg])
1153976888252Smrg
1154076888252Smrg
115410814a2baSmrg# LT_PROG_RC
115420814a2baSmrg# ----------
115430814a2baSmrgAC_DEFUN([LT_PROG_RC],
115440814a2baSmrg[AC_CHECK_TOOL(RC, windres,)
115450814a2baSmrg])
1154676888252Smrg
115470814a2baSmrg# Old name:
115480814a2baSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
115490814a2baSmrgdnl aclocal-1.4 backwards compatibility:
115500814a2baSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
1155176888252Smrg
1155276888252Smrg
115530814a2baSmrg# _LT_DECL_EGREP
115540814a2baSmrg# --------------
115550814a2baSmrg# If we don't have a new enough Autoconf to choose the best grep
115560814a2baSmrg# available, choose the one first in the user's PATH.
115570814a2baSmrgm4_defun([_LT_DECL_EGREP],
115580814a2baSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
115590814a2baSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
115600814a2baSmrgtest -z "$GREP" && GREP=grep
115610814a2baSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
115620814a2baSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
115630814a2baSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
115640814a2baSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
115650814a2baSmrgAC_SUBST([GREP])
115660814a2baSmrg])
1156776888252Smrg
1156886dafe34Smrg
115690814a2baSmrg# _LT_DECL_OBJDUMP
115700814a2baSmrg# --------------
115710814a2baSmrg# If we don't have a new enough Autoconf to choose the best objdump
115720814a2baSmrg# available, choose the one first in the user's PATH.
115730814a2baSmrgm4_defun([_LT_DECL_OBJDUMP],
115740814a2baSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
115750814a2baSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
115760814a2baSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
115770814a2baSmrgAC_SUBST([OBJDUMP])
115780814a2baSmrg])
1157976888252Smrg
115800814a2baSmrg# _LT_DECL_DLLTOOL
115810814a2baSmrg# ----------------
115820814a2baSmrg# Ensure DLLTOOL variable is set.
115830814a2baSmrgm4_defun([_LT_DECL_DLLTOOL],
115840814a2baSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
115850814a2baSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
115860814a2baSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
115870814a2baSmrgAC_SUBST([DLLTOOL])
115880814a2baSmrg])
11589d8556812Smrg
115900814a2baSmrg# _LT_DECL_FILECMD
115910814a2baSmrg# ----------------
115920814a2baSmrg# Check for a file(cmd) program that can be used to detect file type and magic
115930814a2baSmrgm4_defun([_LT_DECL_FILECMD],
115940814a2baSmrg[AC_CHECK_TOOL([FILECMD], [file], [:])
115950814a2baSmrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
115960814a2baSmrg])# _LD_DECL_FILECMD
1159776888252Smrg
115980814a2baSmrg# _LT_DECL_SED
115990814a2baSmrg# ------------
116000814a2baSmrg# Check for a fully-functional sed program, that truncates
116010814a2baSmrg# as few characters as possible.  Prefer GNU sed if found.
116020814a2baSmrgm4_defun([_LT_DECL_SED],
116030814a2baSmrg[AC_PROG_SED
116040814a2baSmrgtest -z "$SED" && SED=sed
116050814a2baSmrgXsed="$SED -e 1s/^X//"
116060814a2baSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
116070814a2baSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
116080814a2baSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
116090814a2baSmrg])# _LT_DECL_SED
116100814a2baSmrg
116110814a2baSmrgm4_ifndef([AC_PROG_SED], [
116120814a2baSmrg# NOTE: This macro has been submitted for inclusion into   #
116130814a2baSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
116140814a2baSmrg#  a released version of Autoconf we should remove this    #
116150814a2baSmrg#  macro and use it instead.                               #
116160814a2baSmrg
116170814a2baSmrgm4_defun([AC_PROG_SED],
116180814a2baSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
116190814a2baSmrgAC_CACHE_VAL(lt_cv_path_SED,
116200814a2baSmrg[# Loop through the user's path and test for sed and gsed.
116210814a2baSmrg# Then use that list of sed's as ones to test for truncation.
116220814a2baSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
116230814a2baSmrgfor as_dir in $PATH
116240814a2baSmrgdo
116250814a2baSmrg  IFS=$as_save_IFS
116260814a2baSmrg  test -z "$as_dir" && as_dir=.
116270814a2baSmrg  for lt_ac_prog in sed gsed; do
116280814a2baSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
116290814a2baSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
116300814a2baSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
1163186dafe34Smrg      fi
116320814a2baSmrg    done
116330814a2baSmrg  done
116340814a2baSmrgdone
116350814a2baSmrgIFS=$as_save_IFS
116360814a2baSmrglt_ac_max=0
116370814a2baSmrglt_ac_count=0
116380814a2baSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
116390814a2baSmrg# along with /bin/sed that truncates output.
116400814a2baSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
116410814a2baSmrg  test ! -f "$lt_ac_sed" && continue
116420814a2baSmrg  cat /dev/null > conftest.in
116430814a2baSmrg  lt_ac_count=0
116440814a2baSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
116450814a2baSmrg  # Check for GNU sed and select it if it is found.
116460814a2baSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
116470814a2baSmrg    lt_cv_path_SED=$lt_ac_sed
116480814a2baSmrg    break
116490814a2baSmrg  fi
116500814a2baSmrg  while true; do
116510814a2baSmrg    cat conftest.in conftest.in >conftest.tmp
116520814a2baSmrg    mv conftest.tmp conftest.in
116530814a2baSmrg    cp conftest.in conftest.nl
116540814a2baSmrg    echo >>conftest.nl
116550814a2baSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
116560814a2baSmrg    cmp -s conftest.out conftest.nl || break
116570814a2baSmrg    # 10000 chars as input seems more than enough
116580814a2baSmrg    test 10 -lt "$lt_ac_count" && break
116590814a2baSmrg    lt_ac_count=`expr $lt_ac_count + 1`
116600814a2baSmrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
116610814a2baSmrg      lt_ac_max=$lt_ac_count
116620814a2baSmrg      lt_cv_path_SED=$lt_ac_sed
1166386dafe34Smrg    fi
1166486dafe34Smrg  done
116650814a2baSmrgdone
116660814a2baSmrg])
116670814a2baSmrgSED=$lt_cv_path_SED
116680814a2baSmrgAC_SUBST([SED])
116690814a2baSmrgAC_MSG_RESULT([$SED])
116700814a2baSmrg])#AC_PROG_SED
116710814a2baSmrg])#m4_ifndef
1167276888252Smrg
116730814a2baSmrg# Old name:
116740814a2baSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
116750814a2baSmrgdnl aclocal-1.4 backwards compatibility:
116760814a2baSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
116770814a2baSmrg
116780814a2baSmrg
116790814a2baSmrg# _LT_CHECK_SHELL_FEATURES
116800814a2baSmrg# ------------------------
116810814a2baSmrg# Find out whether the shell is Bourne or XSI compatible,
116820814a2baSmrg# or has some other useful features.
116830814a2baSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
116840814a2baSmrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
116850814a2baSmrg  lt_unset=unset
1168686dafe34Smrgelse
116870814a2baSmrg  lt_unset=false
1168886dafe34Smrgfi
116890814a2baSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
116900814a2baSmrg
116910814a2baSmrg# test EBCDIC or ASCII
116920814a2baSmrgcase `echo X|tr X '\101'` in
116930814a2baSmrg A) # ASCII based system
116940814a2baSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
116950814a2baSmrg  lt_SP2NL='tr \040 \012'
116960814a2baSmrg  lt_NL2SP='tr \015\012 \040\040'
116970814a2baSmrg  ;;
116980814a2baSmrg *) # EBCDIC based system
116990814a2baSmrg  lt_SP2NL='tr \100 \n'
117000814a2baSmrg  lt_NL2SP='tr \r\n \100\100'
117010814a2baSmrg  ;;
117020814a2baSmrgesac
117030814a2baSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
117040814a2baSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
117050814a2baSmrg])# _LT_CHECK_SHELL_FEATURES
117060814a2baSmrg
117070814a2baSmrg
117080814a2baSmrg# _LT_PATH_CONVERSION_FUNCTIONS
117090814a2baSmrg# -----------------------------
117100814a2baSmrg# Determine what file name conversion functions should be used by
117110814a2baSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
117120814a2baSmrg# for certain cross-compile configurations and native mingw.
117130814a2baSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
117140814a2baSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
117150814a2baSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
117160814a2baSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
117170814a2baSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
117180814a2baSmrg[case $host in
117190814a2baSmrg  *-*-mingw* )
117200814a2baSmrg    case $build in
117210814a2baSmrg      *-*-mingw* ) # actually msys
117220814a2baSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
117230814a2baSmrg        ;;
117240814a2baSmrg      *-*-cygwin* )
117250814a2baSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
117260814a2baSmrg        ;;
117270814a2baSmrg      * ) # otherwise, assume *nix
117280814a2baSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
117290814a2baSmrg        ;;
117300814a2baSmrg    esac
117310814a2baSmrg    ;;
117320814a2baSmrg  *-*-cygwin* )
117330814a2baSmrg    case $build in
117340814a2baSmrg      *-*-mingw* ) # actually msys
117350814a2baSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
117360814a2baSmrg        ;;
117370814a2baSmrg      *-*-cygwin* )
117380814a2baSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
117390814a2baSmrg        ;;
117400814a2baSmrg      * ) # otherwise, assume *nix
117410814a2baSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
117420814a2baSmrg        ;;
117430814a2baSmrg    esac
117440814a2baSmrg    ;;
117450814a2baSmrg  * ) # unhandled hosts (and "normal" native builds)
117460814a2baSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
117470814a2baSmrg    ;;
117480814a2baSmrgesac
1174986dafe34Smrg])
117500814a2baSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
117510814a2baSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
117520814a2baSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
117530814a2baSmrg         [0], [convert $build file names to $host format])dnl
117540814a2baSmrg
117550814a2baSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
117560814a2baSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
117570814a2baSmrg[#assume ordinary cross tools, or native build.
117580814a2baSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
117590814a2baSmrgcase $host in
117600814a2baSmrg  *-*-mingw* )
117610814a2baSmrg    case $build in
117620814a2baSmrg      *-*-mingw* ) # actually msys
117630814a2baSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
117640814a2baSmrg        ;;
117650814a2baSmrg    esac
117660814a2baSmrg    ;;
117670814a2baSmrgesac
1176886dafe34Smrg])
117690814a2baSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
117700814a2baSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
117710814a2baSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
117720814a2baSmrg         [0], [convert $build files to toolchain format])dnl
117730814a2baSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
117740814a2baSmrg
117750814a2baSmrg# Helper functions for option handling.                    -*- Autoconf -*-
117760814a2baSmrg#
117770814a2baSmrg#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
117780814a2baSmrg#   Software Foundation, Inc.
117790814a2baSmrg#   Written by Gary V. Vaughan, 2004
117800814a2baSmrg#
117810814a2baSmrg# This file is free software; the Free Software Foundation gives
117820814a2baSmrg# unlimited permission to copy and/or distribute it, with or without
117830814a2baSmrg# modifications, as long as this notice is preserved.
1178476888252Smrg
117850814a2baSmrg# serial 8 ltoptions.m4
1178676888252Smrg
117870814a2baSmrg# This is to help aclocal find these macros, as it can't see m4_define.
117880814a2baSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
117890814a2baSmrg
117900814a2baSmrg
117910814a2baSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
117920814a2baSmrg# ------------------------------------------
117930814a2baSmrgm4_define([_LT_MANGLE_OPTION],
117940814a2baSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
117950814a2baSmrg
117960814a2baSmrg
117970814a2baSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
117980814a2baSmrg# ---------------------------------------
117990814a2baSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
118000814a2baSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
118010814a2baSmrg# saved as a flag.
118020814a2baSmrgm4_define([_LT_SET_OPTION],
118030814a2baSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
118040814a2baSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
118050814a2baSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
118060814a2baSmrg    [m4_warning([Unknown $1 option '$2'])])[]dnl
1180786dafe34Smrg])
1180876888252Smrg
1180976888252Smrg
118100814a2baSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
118110814a2baSmrg# ------------------------------------------------------------
118120814a2baSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
118130814a2baSmrgm4_define([_LT_IF_OPTION],
118140814a2baSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
118150814a2baSmrg
118160814a2baSmrg
118170814a2baSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
118180814a2baSmrg# -------------------------------------------------------
118190814a2baSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
118200814a2baSmrg# are set.
118210814a2baSmrgm4_define([_LT_UNLESS_OPTIONS],
118220814a2baSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
118230814a2baSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
118240814a2baSmrg		      [m4_define([$0_found])])])[]dnl
118250814a2baSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
118260814a2baSmrg])[]dnl
1182786dafe34Smrg])
1182876888252Smrg
1182976888252Smrg
118300814a2baSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
118310814a2baSmrg# ----------------------------------------
118320814a2baSmrg# OPTION-LIST is a space-separated list of Libtool options associated
118330814a2baSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
118340814a2baSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
118350814a2baSmrg# the unknown option and exit.
118360814a2baSmrgm4_defun([_LT_SET_OPTIONS],
118370814a2baSmrg[# Set options
118380814a2baSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
118390814a2baSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
118400814a2baSmrg
118410814a2baSmrgm4_if([$1],[LT_INIT],[
118420814a2baSmrg  dnl
118430814a2baSmrg  dnl Simply set some default values (i.e off) if boolean options were not
118440814a2baSmrg  dnl specified:
118450814a2baSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
118460814a2baSmrg  ])
118470814a2baSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
118480814a2baSmrg  ])
118490814a2baSmrg  dnl
118500814a2baSmrg  dnl If no reference was made to various pairs of opposing options, then
118510814a2baSmrg  dnl we run the default mode handler for the pair.  For example, if neither
118520814a2baSmrg  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
118530814a2baSmrg  dnl archives by default:
118540814a2baSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
118550814a2baSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
118560814a2baSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
118570814a2baSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
118580814a2baSmrg		   [_LT_ENABLE_FAST_INSTALL])
118590814a2baSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
118600814a2baSmrg		   [_LT_WITH_AIX_SONAME([aix])])
118610814a2baSmrg  ])
118620814a2baSmrg])# _LT_SET_OPTIONS
1186376888252Smrg
1186476888252Smrg
1186576888252Smrg
118660814a2baSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
118670814a2baSmrg# -----------------------------------------
118680814a2baSmrgm4_define([_LT_MANGLE_DEFUN],
118690814a2baSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
118701ae1b5e8Smrg
118710814a2baSmrg
118720814a2baSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
118730814a2baSmrg# -----------------------------------------------
118740814a2baSmrgm4_define([LT_OPTION_DEFINE],
118750814a2baSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
118760814a2baSmrg])# LT_OPTION_DEFINE
118770814a2baSmrg
118780814a2baSmrg
118790814a2baSmrg# dlopen
118800814a2baSmrg# ------
118810814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
118820814a2baSmrg])
118830814a2baSmrg
118840814a2baSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
118850814a2baSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
118860814a2baSmrgAC_DIAGNOSE([obsolete],
118870814a2baSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
118880814a2baSmrgput the 'dlopen' option into LT_INIT's first parameter.])
1188986dafe34Smrg])
118901ae1b5e8Smrg
118910814a2baSmrgdnl aclocal-1.4 backwards compatibility:
118920814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
118930814a2baSmrg
118940814a2baSmrg
118950814a2baSmrg# win32-dll
118960814a2baSmrg# ---------
118970814a2baSmrg# Declare package support for building win32 dll's.
118980814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
118990814a2baSmrg[enable_win32_dll=yes
119000814a2baSmrg
119010814a2baSmrgcase $host in
119020814a2baSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
119030814a2baSmrg  AC_CHECK_TOOL(AS, as, false)
119040814a2baSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
119050814a2baSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
119060814a2baSmrg  ;;
119070814a2baSmrgesac
119080814a2baSmrg
119090814a2baSmrgtest -z "$AS" && AS=as
119100814a2baSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
1191176888252Smrg
119120814a2baSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
119130814a2baSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
1191476888252Smrg
119150814a2baSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
119160814a2baSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
119170814a2baSmrg])# win32-dll
1191876888252Smrg
119190814a2baSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
119200814a2baSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
119210814a2baSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
119220814a2baSmrgAC_DIAGNOSE([obsolete],
119230814a2baSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
119240814a2baSmrgput the 'win32-dll' option into LT_INIT's first parameter.])
119259586ba5aSmrg])
119269586ba5aSmrg
119270814a2baSmrgdnl aclocal-1.4 backwards compatibility:
119280814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
1192976888252Smrg
1193076888252Smrg
119310814a2baSmrg# _LT_ENABLE_SHARED([DEFAULT])
119320814a2baSmrg# ----------------------------
119330814a2baSmrg# implement the --enable-shared flag, and supports the 'shared' and
119340814a2baSmrg# 'disable-shared' LT_INIT options.
119350814a2baSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
119360814a2baSmrgm4_define([_LT_ENABLE_SHARED],
119370814a2baSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
119380814a2baSmrgAC_ARG_ENABLE([shared],
119390814a2baSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
119400814a2baSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
119410814a2baSmrg    [p=${PACKAGE-default}
119420814a2baSmrg    case $enableval in
119430814a2baSmrg    yes) enable_shared=yes ;;
119440814a2baSmrg    no) enable_shared=no ;;
119450814a2baSmrg    *)
119460814a2baSmrg      enable_shared=no
119470814a2baSmrg      # Look at the argument we got.  We use all the common list separators.
119480814a2baSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
119490814a2baSmrg      for pkg in $enableval; do
119500814a2baSmrg	IFS=$lt_save_ifs
119510814a2baSmrg	if test "X$pkg" = "X$p"; then
119520814a2baSmrg	  enable_shared=yes
119530814a2baSmrg	fi
119540814a2baSmrg      done
119550814a2baSmrg      IFS=$lt_save_ifs
119560814a2baSmrg      ;;
119570814a2baSmrg    esac],
119580814a2baSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
1195976888252Smrg
119600814a2baSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
119610814a2baSmrg	[Whether or not to build shared libraries])
119620814a2baSmrg])# _LT_ENABLE_SHARED
119639586ba5aSmrg
119640814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
119650814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
119669586ba5aSmrg
119670814a2baSmrg# Old names:
119680814a2baSmrgAC_DEFUN([AC_ENABLE_SHARED],
119690814a2baSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
119700814a2baSmrg])
119719586ba5aSmrg
119720814a2baSmrgAC_DEFUN([AC_DISABLE_SHARED],
119730814a2baSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
119740814a2baSmrg])
119759586ba5aSmrg
119760814a2baSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
119770814a2baSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
119789586ba5aSmrg
119790814a2baSmrgdnl aclocal-1.4 backwards compatibility:
119800814a2baSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
119810814a2baSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
119829586ba5aSmrg
119839586ba5aSmrg
1198476888252Smrg
119850814a2baSmrg# _LT_ENABLE_STATIC([DEFAULT])
119860814a2baSmrg# ----------------------------
119870814a2baSmrg# implement the --enable-static flag, and support the 'static' and
119880814a2baSmrg# 'disable-static' LT_INIT options.
119890814a2baSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
119900814a2baSmrgm4_define([_LT_ENABLE_STATIC],
119910814a2baSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
119920814a2baSmrgAC_ARG_ENABLE([static],
119930814a2baSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
119940814a2baSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
119950814a2baSmrg    [p=${PACKAGE-default}
119960814a2baSmrg    case $enableval in
119970814a2baSmrg    yes) enable_static=yes ;;
119980814a2baSmrg    no) enable_static=no ;;
119990814a2baSmrg    *)
120000814a2baSmrg     enable_static=no
120010814a2baSmrg      # Look at the argument we got.  We use all the common list separators.
120020814a2baSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
120030814a2baSmrg      for pkg in $enableval; do
120040814a2baSmrg	IFS=$lt_save_ifs
120050814a2baSmrg	if test "X$pkg" = "X$p"; then
120060814a2baSmrg	  enable_static=yes
120070814a2baSmrg	fi
120080814a2baSmrg      done
120090814a2baSmrg      IFS=$lt_save_ifs
120100814a2baSmrg      ;;
120110814a2baSmrg    esac],
120120814a2baSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
12013d8556812Smrg
120140814a2baSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
120150814a2baSmrg	[Whether or not to build static libraries])
120160814a2baSmrg])# _LT_ENABLE_STATIC
1201776888252Smrg
120180814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
120190814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
1202076888252Smrg
120210814a2baSmrg# Old names:
120220814a2baSmrgAC_DEFUN([AC_ENABLE_STATIC],
120230814a2baSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
120240814a2baSmrg])
1202576888252Smrg
120260814a2baSmrgAC_DEFUN([AC_DISABLE_STATIC],
120270814a2baSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
120280814a2baSmrg])
1202976888252Smrg
120300814a2baSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
120310814a2baSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
1203276888252Smrg
120330814a2baSmrgdnl aclocal-1.4 backwards compatibility:
120340814a2baSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
120350814a2baSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
1203676888252Smrg
1203776888252Smrg
1203876888252Smrg
120390814a2baSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
120400814a2baSmrg# ----------------------------------
120410814a2baSmrg# implement the --enable-fast-install flag, and support the 'fast-install'
120420814a2baSmrg# and 'disable-fast-install' LT_INIT options.
120430814a2baSmrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
120440814a2baSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
120450814a2baSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
120460814a2baSmrgAC_ARG_ENABLE([fast-install],
120470814a2baSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
120480814a2baSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
120490814a2baSmrg    [p=${PACKAGE-default}
120500814a2baSmrg    case $enableval in
120510814a2baSmrg    yes) enable_fast_install=yes ;;
120520814a2baSmrg    no) enable_fast_install=no ;;
120530814a2baSmrg    *)
120540814a2baSmrg      enable_fast_install=no
120550814a2baSmrg      # Look at the argument we got.  We use all the common list separators.
120560814a2baSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
120570814a2baSmrg      for pkg in $enableval; do
120580814a2baSmrg	IFS=$lt_save_ifs
120590814a2baSmrg	if test "X$pkg" = "X$p"; then
120600814a2baSmrg	  enable_fast_install=yes
120610814a2baSmrg	fi
120620814a2baSmrg      done
120630814a2baSmrg      IFS=$lt_save_ifs
120640814a2baSmrg      ;;
120650814a2baSmrg    esac],
120660814a2baSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
1206776888252Smrg
120680814a2baSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
120690814a2baSmrg	 [Whether or not to optimize for fast installation])dnl
120700814a2baSmrg])# _LT_ENABLE_FAST_INSTALL
1207176888252Smrg
120720814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
120730814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
1207476888252Smrg
120750814a2baSmrg# Old names:
120760814a2baSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
120770814a2baSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
120780814a2baSmrgAC_DIAGNOSE([obsolete],
120790814a2baSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
120800814a2baSmrgthe 'fast-install' option into LT_INIT's first parameter.])
120810814a2baSmrg])
1208276888252Smrg
120830814a2baSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
120840814a2baSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
120850814a2baSmrgAC_DIAGNOSE([obsolete],
120860814a2baSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
120870814a2baSmrgthe 'disable-fast-install' option into LT_INIT's first parameter.])
120881ae1b5e8Smrg])
1208976888252Smrg
120900814a2baSmrgdnl aclocal-1.4 backwards compatibility:
120910814a2baSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
120920814a2baSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
1209376888252Smrg
1209486dafe34Smrg
120950814a2baSmrg# _LT_WITH_AIX_SONAME([DEFAULT])
120960814a2baSmrg# ----------------------------------
120970814a2baSmrg# implement the --with-aix-soname flag, and support the `aix-soname=aix'
120980814a2baSmrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
120990814a2baSmrg# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
121000814a2baSmrgm4_define([_LT_WITH_AIX_SONAME],
121010814a2baSmrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
121020814a2baSmrgshared_archive_member_spec=
121030814a2baSmrgcase $host,$enable_shared in
121040814a2baSmrgpower*-*-aix[[5-9]]*,yes)
121050814a2baSmrg  AC_MSG_CHECKING([which variant of shared library versioning to provide])
121060814a2baSmrg  AC_ARG_WITH([aix-soname],
121070814a2baSmrg    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
121080814a2baSmrg      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
121090814a2baSmrg    [case $withval in
121100814a2baSmrg    aix|svr4|both)
121110814a2baSmrg      ;;
121120814a2baSmrg    *)
121130814a2baSmrg      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
121140814a2baSmrg      ;;
121150814a2baSmrg    esac
121160814a2baSmrg    lt_cv_with_aix_soname=$with_aix_soname],
121170814a2baSmrg    [AC_CACHE_VAL([lt_cv_with_aix_soname],
121180814a2baSmrg      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
121190814a2baSmrg    with_aix_soname=$lt_cv_with_aix_soname])
121200814a2baSmrg  AC_MSG_RESULT([$with_aix_soname])
121210814a2baSmrg  if test aix != "$with_aix_soname"; then
121220814a2baSmrg    # For the AIX way of multilib, we name the shared archive member
121230814a2baSmrg    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
121240814a2baSmrg    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
121250814a2baSmrg    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
121260814a2baSmrg    # the AIX toolchain works better with OBJECT_MODE set (default 32).
121270814a2baSmrg    if test 64 = "${OBJECT_MODE-32}"; then
121280814a2baSmrg      shared_archive_member_spec=shr_64
121290814a2baSmrg    else
121300814a2baSmrg      shared_archive_member_spec=shr
121310814a2baSmrg    fi
121320814a2baSmrg  fi
121330814a2baSmrg  ;;
121340814a2baSmrg*)
121350814a2baSmrg  with_aix_soname=aix
121360814a2baSmrg  ;;
121370814a2baSmrgesac
1213886dafe34Smrg
121390814a2baSmrg_LT_DECL([], [shared_archive_member_spec], [0],
121400814a2baSmrg    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
121410814a2baSmrg])# _LT_WITH_AIX_SONAME
121420814a2baSmrg
121430814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
121440814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
121450814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
121460814a2baSmrg
121470814a2baSmrg
121480814a2baSmrg# _LT_WITH_PIC([MODE])
1214963847c39Smrg# --------------------
121500814a2baSmrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
121510814a2baSmrg# LT_INIT options.
121520814a2baSmrg# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
121530814a2baSmrgm4_define([_LT_WITH_PIC],
121540814a2baSmrg[AC_ARG_WITH([pic],
121550814a2baSmrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
121560814a2baSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
121570814a2baSmrg    [lt_p=${PACKAGE-default}
121580814a2baSmrg    case $withval in
121590814a2baSmrg    yes|no) pic_mode=$withval ;;
121600814a2baSmrg    *)
121610814a2baSmrg      pic_mode=default
121620814a2baSmrg      # Look at the argument we got.  We use all the common list separators.
121630814a2baSmrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
121640814a2baSmrg      for lt_pkg in $withval; do
121650814a2baSmrg	IFS=$lt_save_ifs
121660814a2baSmrg	if test "X$lt_pkg" = "X$lt_p"; then
121670814a2baSmrg	  pic_mode=yes
121680814a2baSmrg	fi
121690814a2baSmrg      done
121700814a2baSmrg      IFS=$lt_save_ifs
121710814a2baSmrg      ;;
121720814a2baSmrg    esac],
121730814a2baSmrg    [pic_mode=m4_default([$1], [default])])
1217486dafe34Smrg
121750814a2baSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
121760814a2baSmrg])# _LT_WITH_PIC
1217786dafe34Smrg
121780814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
121790814a2baSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
1218086dafe34Smrg
121810814a2baSmrg# Old name:
121820814a2baSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
121830814a2baSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
121840814a2baSmrgAC_DIAGNOSE([obsolete],
121850814a2baSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
121860814a2baSmrgput the 'pic-only' option into LT_INIT's first parameter.])
121870814a2baSmrg])
121889586ba5aSmrg
121890814a2baSmrgdnl aclocal-1.4 backwards compatibility:
121900814a2baSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
121919586ba5aSmrg
1219286dafe34Smrg
121930814a2baSmrgm4_define([_LTDL_MODE], [])
121940814a2baSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
121950814a2baSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
121960814a2baSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
121970814a2baSmrg		 [m4_define([_LTDL_MODE], [recursive])])
121980814a2baSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
121990814a2baSmrg		 [m4_define([_LTDL_MODE], [subproject])])
122000814a2baSmrg
122010814a2baSmrgm4_define([_LTDL_TYPE], [])
122020814a2baSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
122030814a2baSmrg		 [m4_define([_LTDL_TYPE], [installable])])
122040814a2baSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
122050814a2baSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
122060814a2baSmrg
122070814a2baSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
122081ae1b5e8Smrg#
122090814a2baSmrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
122100814a2baSmrg# Foundation, Inc.
122110814a2baSmrg# Written by Gary V. Vaughan, 2004
122120814a2baSmrg#
122130814a2baSmrg# This file is free software; the Free Software Foundation gives
122140814a2baSmrg# unlimited permission to copy and/or distribute it, with or without
122150814a2baSmrg# modifications, as long as this notice is preserved.
1221676888252Smrg
122170814a2baSmrg# serial 6 ltsugar.m4
122189586ba5aSmrg
122190814a2baSmrg# This is to help aclocal find these macros, as it can't see m4_define.
122200814a2baSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
122219586ba5aSmrg
1222276888252Smrg
122230814a2baSmrg# lt_join(SEP, ARG1, [ARG2...])
122240814a2baSmrg# -----------------------------
122250814a2baSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
122260814a2baSmrg# associated separator.
122270814a2baSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
122280814a2baSmrg# versions in m4sugar had bugs.
122290814a2baSmrgm4_define([lt_join],
122300814a2baSmrg[m4_if([$#], [1], [],
122310814a2baSmrg       [$#], [2], [[$2]],
122320814a2baSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
122330814a2baSmrgm4_define([_lt_join],
122340814a2baSmrg[m4_if([$#$2], [2], [],
122350814a2baSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
12236d8556812Smrg
122379586ba5aSmrg
122380814a2baSmrg# lt_car(LIST)
122390814a2baSmrg# lt_cdr(LIST)
122400814a2baSmrg# ------------
122410814a2baSmrg# Manipulate m4 lists.
122420814a2baSmrg# These macros are necessary as long as will still need to support
122430814a2baSmrg# Autoconf-2.59, which quotes differently.
122440814a2baSmrgm4_define([lt_car], [[$1]])
122450814a2baSmrgm4_define([lt_cdr],
122460814a2baSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
122470814a2baSmrg       [$#], 1, [],
122480814a2baSmrg       [m4_dquote(m4_shift($@))])])
122490814a2baSmrgm4_define([lt_unquote], $1)
122500814a2baSmrg
1225176888252Smrg
122520814a2baSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
122530814a2baSmrg# ------------------------------------------
122540814a2baSmrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
122550814a2baSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
122560814a2baSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
122570814a2baSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
122580814a2baSmrg# than defined and empty).
1225963847c39Smrg#
122600814a2baSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
122610814a2baSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
122620814a2baSmrgm4_define([lt_append],
122630814a2baSmrg[m4_define([$1],
122640814a2baSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
1226563847c39Smrg
1226663847c39Smrg
1226786dafe34Smrg
122680814a2baSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
122690814a2baSmrg# ----------------------------------------------------------
122700814a2baSmrg# Produce a SEP delimited list of all paired combinations of elements of
122710814a2baSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
122720814a2baSmrg# has the form PREFIXmINFIXSUFFIXn.
122730814a2baSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
122740814a2baSmrgm4_define([lt_combine],
122750814a2baSmrg[m4_if(m4_eval([$# > 3]), [1],
122760814a2baSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
122770814a2baSmrg[[m4_foreach([_Lt_prefix], [$2],
122780814a2baSmrg	     [m4_foreach([_Lt_suffix],
122790814a2baSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
122800814a2baSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
1228186dafe34Smrg
1228276888252Smrg
122830814a2baSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
122840814a2baSmrg# -----------------------------------------------------------------------
122850814a2baSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
122860814a2baSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
122870814a2baSmrgm4_define([lt_if_append_uniq],
122880814a2baSmrg[m4_ifdef([$1],
122890814a2baSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
122900814a2baSmrg		 [lt_append([$1], [$2], [$3])$4],
122910814a2baSmrg		 [$5])],
122920814a2baSmrg	  [lt_append([$1], [$2], [$3])$4])])
122930814a2baSmrg
122940814a2baSmrg
122950814a2baSmrg# lt_dict_add(DICT, KEY, VALUE)
122960814a2baSmrg# -----------------------------
122970814a2baSmrgm4_define([lt_dict_add],
122980814a2baSmrg[m4_define([$1($2)], [$3])])
122990814a2baSmrg
1230076888252Smrg
123010814a2baSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
123020814a2baSmrg# --------------------------------------------
123030814a2baSmrgm4_define([lt_dict_add_subkey],
123040814a2baSmrg[m4_define([$1($2:$3)], [$4])])
12305d8556812Smrg
1230676888252Smrg
123070814a2baSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
123080814a2baSmrg# ----------------------------------
123090814a2baSmrgm4_define([lt_dict_fetch],
123100814a2baSmrg[m4_ifval([$3],
123110814a2baSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
123120814a2baSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
1231376888252Smrg
123149586ba5aSmrg
123150814a2baSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
123160814a2baSmrg# -----------------------------------------------------------------
123170814a2baSmrgm4_define([lt_if_dict_fetch],
123180814a2baSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
123190814a2baSmrg	[$5],
123200814a2baSmrg    [$6])])
1232176888252Smrg
123229586ba5aSmrg
123230814a2baSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
123240814a2baSmrg# --------------------------------------------------------------
123250814a2baSmrgm4_define([lt_dict_filter],
123260814a2baSmrg[m4_if([$5], [], [],
123270814a2baSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
123280814a2baSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
123290814a2baSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
123300814a2baSmrg])
1233176888252Smrg
123320814a2baSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
123330814a2baSmrg#
123340814a2baSmrg#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
123350814a2baSmrg#   Inc.
123360814a2baSmrg#   Written by Scott James Remnant, 2004
123370814a2baSmrg#
123380814a2baSmrg# This file is free software; the Free Software Foundation gives
123390814a2baSmrg# unlimited permission to copy and/or distribute it, with or without
123400814a2baSmrg# modifications, as long as this notice is preserved.
123419586ba5aSmrg
123420814a2baSmrg# @configure_input@
123439586ba5aSmrg
123440814a2baSmrg# serial 4245 ltversion.m4
123450814a2baSmrg# This file is part of GNU Libtool
123469586ba5aSmrg
123470814a2baSmrgm4_define([LT_PACKAGE_VERSION], [2.4.7])
123480814a2baSmrgm4_define([LT_PACKAGE_REVISION], [2.4.7])
123499586ba5aSmrg
123500814a2baSmrgAC_DEFUN([LTVERSION_VERSION],
123510814a2baSmrg[macro_version='2.4.7'
123520814a2baSmrgmacro_revision='2.4.7'
123530814a2baSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
123540814a2baSmrg_LT_DECL(, macro_revision, 0)
123550814a2baSmrg])
123569586ba5aSmrg
123570814a2baSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
123580814a2baSmrg#
123590814a2baSmrg#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
123600814a2baSmrg#   Software Foundation, Inc.
123610814a2baSmrg#   Written by Scott James Remnant, 2004.
123620814a2baSmrg#
123630814a2baSmrg# This file is free software; the Free Software Foundation gives
123640814a2baSmrg# unlimited permission to copy and/or distribute it, with or without
123650814a2baSmrg# modifications, as long as this notice is preserved.
123669586ba5aSmrg
123670814a2baSmrg# serial 5 lt~obsolete.m4
1236886dafe34Smrg
123690814a2baSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
123700814a2baSmrg#
123710814a2baSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
123720814a2baSmrg# which have later been changed to m4_define as they aren't part of the
123730814a2baSmrg# exported API, or moved to Autoconf or Automake where they belong.
123740814a2baSmrg#
123750814a2baSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
123760814a2baSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
123770814a2baSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
123780814a2baSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
123790814a2baSmrg# and doesn't know about Autoconf macros at all.)
123800814a2baSmrg#
123810814a2baSmrg# So we provide this file, which has a silly filename so it's always
123820814a2baSmrg# included after everything else.  This provides aclocal with the
123830814a2baSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
123840814a2baSmrg# because those macros already exist, or will be overwritten later.
123850814a2baSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
123860814a2baSmrg#
123870814a2baSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
123880814a2baSmrg# Yes, that means every name once taken will need to remain here until
123890814a2baSmrg# we give up compatibility with versions before 1.7, at which point
123900814a2baSmrg# we need to keep only those names which we still refer to.
123919586ba5aSmrg
123920814a2baSmrg# This is to help aclocal find these macros, as it can't see m4_define.
123930814a2baSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
123940814a2baSmrg
123950814a2baSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
123960814a2baSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
123970814a2baSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
123980814a2baSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
123990814a2baSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
124000814a2baSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
124010814a2baSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
124020814a2baSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
124030814a2baSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
124040814a2baSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
124050814a2baSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
124060814a2baSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
124070814a2baSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
124080814a2baSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
124090814a2baSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
124100814a2baSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
124110814a2baSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
124120814a2baSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
124130814a2baSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
124140814a2baSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
124150814a2baSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
124160814a2baSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
124170814a2baSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
124180814a2baSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
124190814a2baSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
124200814a2baSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
124210814a2baSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
124220814a2baSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
124230814a2baSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
124240814a2baSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
124250814a2baSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
124260814a2baSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
124270814a2baSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
124280814a2baSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
124290814a2baSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
124300814a2baSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
124310814a2baSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
124320814a2baSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
124330814a2baSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
124340814a2baSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
124350814a2baSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
124360814a2baSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
124370814a2baSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
124380814a2baSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
124390814a2baSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
124400814a2baSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
124410814a2baSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
124420814a2baSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
124430814a2baSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
124440814a2baSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
124450814a2baSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
124460814a2baSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
124470814a2baSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
124480814a2baSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
124490814a2baSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
124500814a2baSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
124510814a2baSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
124520814a2baSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
124530814a2baSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
124540814a2baSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
124550814a2baSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
1245676888252Smrg
12457