18d623946Smrg# generated automatically by aclocal 1.16.5 -*- Autoconf -*-
23e72ca8cSmrg
38d623946Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4ee3138f1Smrg
5ee3138f1Smrg# This file is free software; the Free Software Foundation
6ee3138f1Smrg# gives unlimited permission to copy and/or distribute it,
7ee3138f1Smrg# with or without modifications, as long as this notice is preserved.
8ee3138f1Smrg
9ee3138f1Smrg# This program is distributed in the hope that it will be useful,
10ee3138f1Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11ee3138f1Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12ee3138f1Smrg# PARTICULAR PURPOSE.
13ee3138f1Smrg
1426b1ff4eSmrgm4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
15ee3138f1Smrgm4_ifndef([AC_AUTOCONF_VERSION],
16ee3138f1Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
178d623946Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
188d623946Smrg[m4_warning([this file was generated for autoconf 2.71.
19ee3138f1SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
20ee3138f1SmrgIf you have problems, you may need to regenerate the build system entirely.
213e72ca8cSmrgTo do so, use the procedure documented by the package, typically 'autoreconf'.])])
22ee3138f1Smrg
238d623946Smrg# Copyright (C) 2002-2021 Free Software Foundation, Inc.
2434977a2fSmrg#
258d623946Smrg# This file is free software; the Free Software Foundation
268d623946Smrg# gives unlimited permission to copy and/or distribute it,
278d623946Smrg# with or without modifications, as long as this notice is preserved.
28fe24f8a2Smrg
298d623946Smrg# AM_AUTOMAKE_VERSION(VERSION)
308d623946Smrg# ----------------------------
318d623946Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
328d623946Smrg# generated from the m4 files accompanying Automake X.Y.
338d623946Smrg# (This private macro should not be called outside this file.)
348d623946SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
358d623946Smrg[am__api_version='1.16'
368d623946Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
378d623946Smrgdnl require some minimum version.  Point them to the right macro.
388d623946Smrgm4_if([$1], [1.16.5], [],
398d623946Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
40414bd68fSmrg])
41ee3138f1Smrg
428d623946Smrg# _AM_AUTOCONF_VERSION(VERSION)
438d623946Smrg# -----------------------------
448d623946Smrg# aclocal traces this macro to find the Autoconf version.
458d623946Smrg# This is a private macro too.  Using m4_define simplifies
468d623946Smrg# the logic in aclocal, which can simply ignore this definition.
478d623946Smrgm4_define([_AM_AUTOCONF_VERSION], [])
48414bd68fSmrg
498d623946Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
508d623946Smrg# -------------------------------
518d623946Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
528d623946Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
538d623946SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
548d623946Smrg[AM_AUTOMAKE_VERSION([1.16.5])dnl
558d623946Smrgm4_ifndef([AC_AUTOCONF_VERSION],
568d623946Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
578d623946Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
58414bd68fSmrg
598d623946Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
60414bd68fSmrg
618d623946Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
628d623946Smrg#
638d623946Smrg# This file is free software; the Free Software Foundation
648d623946Smrg# gives unlimited permission to copy and/or distribute it,
658d623946Smrg# with or without modifications, as long as this notice is preserved.
66414bd68fSmrg
678d623946Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
688d623946Smrg# $ac_aux_dir to '$srcdir/foo'.  In other projects, it is set to
698d623946Smrg# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
708d623946Smrg#
718d623946Smrg# Of course, Automake must honor this variable whenever it calls a
728d623946Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
738d623946Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
748d623946Smrg# depending on how configure is run.  This is pretty annoying, since
758d623946Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
768d623946Smrg# source directory, any form will work fine, but in subdirectories a
778d623946Smrg# relative path needs to be adjusted first.
788d623946Smrg#
798d623946Smrg# $ac_aux_dir/missing
808d623946Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
818d623946Smrg# $top_srcdir/$ac_aux_dir/missing
828d623946Smrg#    fails if $ac_aux_dir is absolute,
838d623946Smrg#    fails when called from a subdirectory in a VPATH build with
848d623946Smrg#          a relative $ac_aux_dir
858d623946Smrg#
868d623946Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
878d623946Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
888d623946Smrg# harmless because $srcdir is '.', but things will broke when you
898d623946Smrg# start a VPATH build or use an absolute $srcdir.
908d623946Smrg#
918d623946Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
928d623946Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
938d623946Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
948d623946Smrg# and then we would define $MISSING as
958d623946Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
968d623946Smrg# This will work as long as MISSING is not called from configure, because
978d623946Smrg# unfortunately $(top_srcdir) has no meaning in configure.
988d623946Smrg# However there are other variables, like CC, which are often used in
998d623946Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
1008d623946Smrg#
1018d623946Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
1028d623946Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
1038d623946Smrg# configured tree to be moved without reconfiguration.
1048d623946Smrg
1058d623946SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1068d623946Smrg[AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
1078d623946Smrg# Expand $ac_aux_dir to an absolute path.
1088d623946Smrgam_aux_dir=`cd "$ac_aux_dir" && pwd`
109a1ed278cSmrg])
11034977a2fSmrg
1118d623946Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
11234977a2fSmrg
1138d623946Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
1148d623946Smrg#
1158d623946Smrg# This file is free software; the Free Software Foundation
1168d623946Smrg# gives unlimited permission to copy and/or distribute it,
1178d623946Smrg# with or without modifications, as long as this notice is preserved.
11834977a2fSmrg
1198d623946Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1208d623946Smrg# -------------------------------------
1218d623946Smrg# Define a conditional.
1228d623946SmrgAC_DEFUN([AM_CONDITIONAL],
1238d623946Smrg[AC_PREREQ([2.52])dnl
1248d623946Smrg m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1258d623946Smrg       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1268d623946SmrgAC_SUBST([$1_TRUE])dnl
1278d623946SmrgAC_SUBST([$1_FALSE])dnl
1288d623946Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1298d623946Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1308d623946Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1318d623946Smrgif $2; then
1328d623946Smrg  $1_TRUE=
1338d623946Smrg  $1_FALSE='#'
1348d623946Smrgelse
1358d623946Smrg  $1_TRUE='#'
1368d623946Smrg  $1_FALSE=
1378d623946Smrgfi
1388d623946SmrgAC_CONFIG_COMMANDS_PRE(
1398d623946Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1408d623946Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1418d623946SmrgUsually this means the macro was only invoked conditionally.]])
1428d623946Smrgfi])])
14334977a2fSmrg
1448d623946Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
1458d623946Smrg#
1468d623946Smrg# This file is free software; the Free Software Foundation
1478d623946Smrg# gives unlimited permission to copy and/or distribute it,
1488d623946Smrg# with or without modifications, as long as this notice is preserved.
14934977a2fSmrg
150ee3138f1Smrg
1518d623946Smrg# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
1528d623946Smrg# written in clear, in which case automake, when reading aclocal.m4,
1538d623946Smrg# will think it sees a *use*, and therefore will trigger all it's
1548d623946Smrg# C support machinery.  Also note that it means that autoscan, seeing
1558d623946Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
156ee3138f1Smrg
157ee3138f1Smrg
1588d623946Smrg# _AM_DEPENDENCIES(NAME)
1598d623946Smrg# ----------------------
1608d623946Smrg# See how the compiler implements dependency checking.
1618d623946Smrg# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
1628d623946Smrg# We try a few techniques and use that to set a single cache variable.
1638d623946Smrg#
1648d623946Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1658d623946Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1668d623946Smrg# dependency, and given that the user is not expected to run this macro,
1678d623946Smrg# just rely on AC_PROG_CC.
1688d623946SmrgAC_DEFUN([_AM_DEPENDENCIES],
1698d623946Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1708d623946SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1718d623946SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1728d623946SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
17379a8a9c6Smrg
1748d623946Smrgm4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
1758d623946Smrg      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
1768d623946Smrg      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1778d623946Smrg      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
1788d623946Smrg      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
1798d623946Smrg      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1808d623946Smrg                    [depcc="$$1"   am_compiler_list=])
181ee3138f1Smrg
1828d623946SmrgAC_CACHE_CHECK([dependency style of $depcc],
1838d623946Smrg               [am_cv_$1_dependencies_compiler_type],
1848d623946Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1858d623946Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
1868d623946Smrg  # making bogus files that we don't know about and never remove.  For
1878d623946Smrg  # instance it was reported that on HP-UX the gcc test will end up
1888d623946Smrg  # making a dummy file named 'D' -- because '-MD' means "put the output
1898d623946Smrg  # in D".
1908d623946Smrg  rm -rf conftest.dir
1918d623946Smrg  mkdir conftest.dir
1928d623946Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1938d623946Smrg  # using a relative directory.
1948d623946Smrg  cp "$am_depcomp" conftest.dir
1958d623946Smrg  cd conftest.dir
1968d623946Smrg  # We will build objects and dependencies in a subdirectory because
1978d623946Smrg  # it helps to detect inapplicable dependency modes.  For instance
1988d623946Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
1998d623946Smrg  # side effect of compilation, but ICC will put the dependencies in
2008d623946Smrg  # the current directory while Tru64 will put them in the object
2018d623946Smrg  # directory.
2028d623946Smrg  mkdir sub
203ee3138f1Smrg
2048d623946Smrg  am_cv_$1_dependencies_compiler_type=none
2058d623946Smrg  if test "$am_compiler_list" = ""; then
2068d623946Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2078d623946Smrg  fi
2088d623946Smrg  am__universal=false
2098d623946Smrg  m4_case([$1], [CC],
2108d623946Smrg    [case " $depcc " in #(
2118d623946Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2128d623946Smrg     esac],
2138d623946Smrg    [CXX],
2148d623946Smrg    [case " $depcc " in #(
2158d623946Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2168d623946Smrg     esac])
217ee3138f1Smrg
2188d623946Smrg  for depmode in $am_compiler_list; do
2198d623946Smrg    # Setup a source with many dependencies, because some compilers
2208d623946Smrg    # like to wrap large dependency lists on column 80 (with \), and
2218d623946Smrg    # we should not choose a depcomp mode which is confused by this.
2228d623946Smrg    #
2238d623946Smrg    # We need to recreate these files for each test, as the compiler may
2248d623946Smrg    # overwrite some of them when testing with obscure command lines.
2258d623946Smrg    # This happens at least with the AIX C compiler.
2268d623946Smrg    : > sub/conftest.c
2278d623946Smrg    for i in 1 2 3 4 5 6; do
2288d623946Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2298d623946Smrg      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
2308d623946Smrg      # Solaris 10 /bin/sh.
2318d623946Smrg      echo '/* dummy */' > sub/conftst$i.h
232fe24f8a2Smrg    done
2338d623946Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
234fe24f8a2Smrg
2358d623946Smrg    # We check with '-c' and '-o' for the sake of the "dashmstdout"
2368d623946Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2378d623946Smrg    # handle '-M -o', and we need to detect this.  Also, some Intel
2388d623946Smrg    # versions had trouble with output in subdirs.
2398d623946Smrg    am__obj=sub/conftest.${OBJEXT-o}
2408d623946Smrg    am__minus_obj="-o $am__obj"
2418d623946Smrg    case $depmode in
2428d623946Smrg    gcc)
2438d623946Smrg      # This depmode causes a compiler race in universal mode.
2448d623946Smrg      test "$am__universal" = false || continue
2458d623946Smrg      ;;
2468d623946Smrg    nosideeffect)
2478d623946Smrg      # After this tag, mechanisms are not by side-effect, so they'll
2488d623946Smrg      # only be used when explicitly requested.
2498d623946Smrg      if test "x$enable_dependency_tracking" = xyes; then
2508d623946Smrg	continue
2518d623946Smrg      else
2528d623946Smrg	break
2538d623946Smrg      fi
2548d623946Smrg      ;;
2558d623946Smrg    msvc7 | msvc7msys | msvisualcpp | msvcmsys)
2568d623946Smrg      # This compiler won't grok '-c -o', but also, the minuso test has
2578d623946Smrg      # not run yet.  These depmodes are late enough in the game, and
2588d623946Smrg      # so weak that their functioning should not be impacted.
2598d623946Smrg      am__obj=conftest.${OBJEXT-o}
2608d623946Smrg      am__minus_obj=
2618d623946Smrg      ;;
2628d623946Smrg    none) break ;;
2638d623946Smrg    esac
2648d623946Smrg    if depmode=$depmode \
2658d623946Smrg       source=sub/conftest.c object=$am__obj \
2668d623946Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2678d623946Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2688d623946Smrg         >/dev/null 2>conftest.err &&
2698d623946Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2708d623946Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2718d623946Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2728d623946Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2738d623946Smrg      # icc doesn't choke on unknown options, it will just issue warnings
2748d623946Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
2758d623946Smrg      # that says an option was ignored or not supported.
2768d623946Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2778d623946Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2788d623946Smrg      # The diagnosis changed in icc 8.0:
2798d623946Smrg      #   icc: Command line remark: option '-MP' not supported
2808d623946Smrg      if (grep 'ignoring option' conftest.err ||
2818d623946Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2828d623946Smrg        am_cv_$1_dependencies_compiler_type=$depmode
2838d623946Smrg        break
2848d623946Smrg      fi
2858d623946Smrg    fi
2868d623946Smrg  done
287fe24f8a2Smrg
2888d623946Smrg  cd ..
2898d623946Smrg  rm -rf conftest.dir
2908d623946Smrgelse
2918d623946Smrg  am_cv_$1_dependencies_compiler_type=none
2928d623946Smrgfi
2938d623946Smrg])
2948d623946SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2958d623946SmrgAM_CONDITIONAL([am__fastdep$1], [
2968d623946Smrg  test "x$enable_dependency_tracking" != xno \
2978d623946Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
298414bd68fSmrg])
29934977a2fSmrg
30034977a2fSmrg
3018d623946Smrg# AM_SET_DEPDIR
3028d623946Smrg# -------------
3038d623946Smrg# Choose a directory name for dependency files.
3048d623946Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
3058d623946SmrgAC_DEFUN([AM_SET_DEPDIR],
3068d623946Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3078d623946SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3088d623946Smrg])
30934977a2fSmrg
31034977a2fSmrg
3118d623946Smrg# AM_DEP_TRACK
3128d623946Smrg# ------------
3138d623946SmrgAC_DEFUN([AM_DEP_TRACK],
3148d623946Smrg[AC_ARG_ENABLE([dependency-tracking], [dnl
3158d623946SmrgAS_HELP_STRING(
3168d623946Smrg  [--enable-dependency-tracking],
3178d623946Smrg  [do not reject slow dependency extractors])
3188d623946SmrgAS_HELP_STRING(
3198d623946Smrg  [--disable-dependency-tracking],
3208d623946Smrg  [speeds up one-time build])])
3218d623946Smrgif test "x$enable_dependency_tracking" != xno; then
3228d623946Smrg  am_depcomp="$ac_aux_dir/depcomp"
3238d623946Smrg  AMDEPBACKSLASH='\'
3248d623946Smrg  am__nodep='_no'
3253e72ca8cSmrgfi
3268d623946SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3278d623946SmrgAC_SUBST([AMDEPBACKSLASH])dnl
3288d623946Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3298d623946SmrgAC_SUBST([am__nodep])dnl
3308d623946Smrg_AM_SUBST_NOTMAKE([am__nodep])dnl
3313e72ca8cSmrg])
33234977a2fSmrg
3338d623946Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
33434977a2fSmrg
3358d623946Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
3368d623946Smrg#
3378d623946Smrg# This file is free software; the Free Software Foundation
3388d623946Smrg# gives unlimited permission to copy and/or distribute it,
3398d623946Smrg# with or without modifications, as long as this notice is preserved.
34034977a2fSmrg
3418d623946Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3428d623946Smrg# ------------------------------
3438d623946SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3448d623946Smrg[{
3458d623946Smrg  # Older Autoconf quotes --file arguments for eval, but not when files
3468d623946Smrg  # are listed without --file.  Let's play safe and only enable the eval
3478d623946Smrg  # if we detect the quoting.
3488d623946Smrg  # TODO: see whether this extra hack can be removed once we start
3498d623946Smrg  # requiring Autoconf 2.70 or later.
3508d623946Smrg  AS_CASE([$CONFIG_FILES],
3518d623946Smrg          [*\'*], [eval set x "$CONFIG_FILES"],
3528d623946Smrg          [*], [set x $CONFIG_FILES])
3538d623946Smrg  shift
3548d623946Smrg  # Used to flag and report bootstrapping failures.
3558d623946Smrg  am_rc=0
3568d623946Smrg  for am_mf
3578d623946Smrg  do
3588d623946Smrg    # Strip MF so we end up with the name of the file.
3598d623946Smrg    am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'`
3608d623946Smrg    # Check whether this is an Automake generated Makefile which includes
3618d623946Smrg    # dependency-tracking related rules and includes.
3628d623946Smrg    # Grep'ing the whole file directly is not great: AIX grep has a line
3638d623946Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
3648d623946Smrg    sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \
3658d623946Smrg      || continue
3668d623946Smrg    am_dirpart=`AS_DIRNAME(["$am_mf"])`
3678d623946Smrg    am_filepart=`AS_BASENAME(["$am_mf"])`
3688d623946Smrg    AM_RUN_LOG([cd "$am_dirpart" \
3698d623946Smrg      && sed -e '/# am--include-marker/d' "$am_filepart" \
3708d623946Smrg        | $MAKE -f - am--depfiles]) || am_rc=$?
3718d623946Smrg  done
3728d623946Smrg  if test $am_rc -ne 0; then
3738d623946Smrg    AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments
3748d623946Smrg    for automatic dependency tracking.  If GNU make was not used, consider
3758d623946Smrg    re-running the configure script with MAKE="gmake" (or whatever is
3768d623946Smrg    necessary).  You can also try re-running configure with the
3778d623946Smrg    '--disable-dependency-tracking' option to at least be able to build
3788d623946Smrg    the package (albeit without support for automatic dependency tracking).])
379414bd68fSmrg  fi
3808d623946Smrg  AS_UNSET([am_dirpart])
3818d623946Smrg  AS_UNSET([am_filepart])
3828d623946Smrg  AS_UNSET([am_mf])
3838d623946Smrg  AS_UNSET([am_rc])
3848d623946Smrg  rm -f conftest-deps.mk
3858d623946Smrg}
3868d623946Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
387a1ed278cSmrg
388a1ed278cSmrg
3898d623946Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3908d623946Smrg# -----------------------------
3918d623946Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
3928d623946Smrg#
3938d623946Smrg# This code is only required when automatic dependency tracking is enabled.
3948d623946Smrg# This creates each '.Po' and '.Plo' makefile fragment that we'll need in
3958d623946Smrg# order to bootstrap the dependency handling code.
3968d623946SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
3978d623946Smrg[AC_CONFIG_COMMANDS([depfiles],
3988d623946Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
3998d623946Smrg     [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])])
400a1ed278cSmrg
4018d623946Smrg# Do all the work for Automake.                             -*- Autoconf -*-
402a1ed278cSmrg
4038d623946Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
4048d623946Smrg#
4058d623946Smrg# This file is free software; the Free Software Foundation
4068d623946Smrg# gives unlimited permission to copy and/or distribute it,
4078d623946Smrg# with or without modifications, as long as this notice is preserved.
40834977a2fSmrg
4098d623946Smrg# This macro actually does too much.  Some checks are only needed if
4108d623946Smrg# your package does certain things.  But this isn't really a big deal.
41134977a2fSmrg
4128d623946Smrgdnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
4138d623946Smrgm4_define([AC_PROG_CC],
4148d623946Smrgm4_defn([AC_PROG_CC])
4158d623946Smrg[_AM_PROG_CC_C_O
4168d623946Smrg])
41734977a2fSmrg
4188d623946Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4198d623946Smrg# AM_INIT_AUTOMAKE([OPTIONS])
4208d623946Smrg# -----------------------------------------------
4218d623946Smrg# The call with PACKAGE and VERSION arguments is the old style
4228d623946Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4238d623946Smrg# and VERSION should now be passed to AC_INIT and removed from
4248d623946Smrg# the call to AM_INIT_AUTOMAKE.
4258d623946Smrg# We support both call styles for the transition.  After
4268d623946Smrg# the next Automake release, Autoconf can make the AC_INIT
4278d623946Smrg# arguments mandatory, and then we can depend on a new Autoconf
4288d623946Smrg# release and drop the old call support.
4298d623946SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4308d623946Smrg[AC_PREREQ([2.65])dnl
4318d623946Smrgm4_ifdef([_$0_ALREADY_INIT],
4328d623946Smrg  [m4_fatal([$0 expanded multiple times
4338d623946Smrg]m4_defn([_$0_ALREADY_INIT]))],
4348d623946Smrg  [m4_define([_$0_ALREADY_INIT], m4_expansion_stack)])dnl
4358d623946Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4368d623946Smrgdnl the ones we care about.
4378d623946Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4388d623946SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4398d623946SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4408d623946Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4418d623946Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4428d623946Smrg  # is not polluted with repeated "-I."
4438d623946Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4448d623946Smrg  # test to see if srcdir already configured
4458d623946Smrg  if test -f $srcdir/config.status; then
4468d623946Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4478d623946Smrg  fi
4488d623946Smrgfi
44934977a2fSmrg
4508d623946Smrg# test whether we have cygpath
4518d623946Smrgif test -z "$CYGPATH_W"; then
4528d623946Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4538d623946Smrg    CYGPATH_W='cygpath -w'
4548d623946Smrg  else
4558d623946Smrg    CYGPATH_W=echo
4568d623946Smrg  fi
4578d623946Smrgfi
4588d623946SmrgAC_SUBST([CYGPATH_W])
459414bd68fSmrg
4608d623946Smrg# Define the identity of the package.
4618d623946Smrgdnl Distinguish between old-style and new-style calls.
4628d623946Smrgm4_ifval([$2],
4638d623946Smrg[AC_DIAGNOSE([obsolete],
4648d623946Smrg             [$0: two- and three-arguments forms are deprecated.])
4658d623946Smrgm4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4668d623946Smrg AC_SUBST([PACKAGE], [$1])dnl
4678d623946Smrg AC_SUBST([VERSION], [$2])],
4688d623946Smrg[_AM_SET_OPTIONS([$1])dnl
4698d623946Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4708d623946Smrgm4_if(
4718d623946Smrg  m4_ifset([AC_PACKAGE_NAME], [ok]):m4_ifset([AC_PACKAGE_VERSION], [ok]),
4728d623946Smrg  [ok:ok],,
4738d623946Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4748d623946Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4758d623946Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
476414bd68fSmrg
4778d623946Smrg_AM_IF_OPTION([no-define],,
4788d623946Smrg[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
4798d623946Smrg AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
480414bd68fSmrg
4818d623946Smrg# Some tools Automake needs.
4828d623946SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4838d623946SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
4848d623946SmrgAM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
4858d623946SmrgAM_MISSING_PROG([AUTOCONF], [autoconf])
4868d623946SmrgAM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
4878d623946SmrgAM_MISSING_PROG([AUTOHEADER], [autoheader])
4888d623946SmrgAM_MISSING_PROG([MAKEINFO], [makeinfo])
4898d623946SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4908d623946SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
4918d623946SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
4928d623946Smrg# For better backward compatibility.  To be removed once Automake 1.9.x
4938d623946Smrg# dies out for good.  For more background, see:
4948d623946Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4958d623946Smrg# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4968d623946SmrgAC_SUBST([mkdir_p], ['$(MKDIR_P)'])
4978d623946Smrg# We need awk for the "check" target (and possibly the TAP driver).  The
4988d623946Smrg# system "awk" is bad on some platforms.
4998d623946SmrgAC_REQUIRE([AC_PROG_AWK])dnl
5008d623946SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5018d623946SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5028d623946Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5038d623946Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5048d623946Smrg			     [_AM_PROG_TAR([v7])])])
5058d623946Smrg_AM_IF_OPTION([no-dependencies],,
5068d623946Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
5078d623946Smrg		  [_AM_DEPENDENCIES([CC])],
5088d623946Smrg		  [m4_define([AC_PROG_CC],
5098d623946Smrg			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
5108d623946SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5118d623946Smrg		  [_AM_DEPENDENCIES([CXX])],
5128d623946Smrg		  [m4_define([AC_PROG_CXX],
5138d623946Smrg			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
5148d623946SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5158d623946Smrg		  [_AM_DEPENDENCIES([OBJC])],
5168d623946Smrg		  [m4_define([AC_PROG_OBJC],
5178d623946Smrg			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
5188d623946SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
5198d623946Smrg		  [_AM_DEPENDENCIES([OBJCXX])],
5208d623946Smrg		  [m4_define([AC_PROG_OBJCXX],
5218d623946Smrg			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
522a1ed278cSmrg])
5238d623946Smrg# Variables for tags utilities; see am/tags.am
5248d623946Smrgif test -z "$CTAGS"; then
5258d623946Smrg  CTAGS=ctags
5268d623946Smrgfi
5278d623946SmrgAC_SUBST([CTAGS])
5288d623946Smrgif test -z "$ETAGS"; then
5298d623946Smrg  ETAGS=etags
5308d623946Smrgfi
5318d623946SmrgAC_SUBST([ETAGS])
5328d623946Smrgif test -z "$CSCOPE"; then
5338d623946Smrg  CSCOPE=cscope
5348d623946Smrgfi
5358d623946SmrgAC_SUBST([CSCOPE])
53634977a2fSmrg
5378d623946SmrgAC_REQUIRE([AM_SILENT_RULES])dnl
5388d623946Smrgdnl The testsuite driver may need to know about EXEEXT, so add the
5398d623946Smrgdnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
5408d623946Smrgdnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
5418d623946SmrgAC_CONFIG_COMMANDS_PRE(dnl
5428d623946Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5438d623946Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
54434977a2fSmrg
5458d623946Smrg# POSIX will say in a future version that running "rm -f" with no argument
5468d623946Smrg# is OK; and we want to be able to make that assumption in our Makefile
5478d623946Smrg# recipes.  So use an aggressive probe to check that the usage we want is
5488d623946Smrg# actually supported "in the wild" to an acceptable degree.
5498d623946Smrg# See automake bug#10828.
5508d623946Smrg# To make any issue more visible, cause the running configure to be aborted
5518d623946Smrg# by default if the 'rm' program in use doesn't match our expectations; the
5528d623946Smrg# user can still override this though.
5538d623946Smrgif rm -f && rm -fr && rm -rf; then : OK; else
5548d623946Smrg  cat >&2 <<'END'
5558d623946SmrgOops!
55634977a2fSmrg
5578d623946SmrgYour 'rm' program seems unable to run without file operands specified
5588d623946Smrgon the command line, even when the '-f' option is present.  This is contrary
5598d623946Smrgto the behaviour of most rm programs out there, and not conforming with
5608d623946Smrgthe upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
56134977a2fSmrg
5628d623946SmrgPlease tell bug-automake@gnu.org about your system, including the value
5638d623946Smrgof your $PATH and any error possibly output before this message.  This
5648d623946Smrgcan help us improve future automake versions.
56534977a2fSmrg
5668d623946SmrgEND
5678d623946Smrg  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
5688d623946Smrg    echo 'Configuration will proceed anyway, since you have set the' >&2
5698d623946Smrg    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
5708d623946Smrg    echo >&2
5718d623946Smrg  else
5728d623946Smrg    cat >&2 <<'END'
5738d623946SmrgAborting the configuration process, to ensure you take notice of the issue.
57434977a2fSmrg
5758d623946SmrgYou can download and install GNU coreutils to get an 'rm' implementation
5768d623946Smrgthat behaves properly: <https://www.gnu.org/software/coreutils/>.
57734977a2fSmrg
5788d623946SmrgIf you want to complete the configuration process using your problematic
5798d623946Smrg'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
5808d623946Smrgto "yes", and re-run configure.
581414bd68fSmrg
5828d623946SmrgEND
5838d623946Smrg    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
5848d623946Smrg  fi
5858d623946Smrgfi
5868d623946Smrgdnl The trailing newline in this macro's definition is deliberate, for
5878d623946Smrgdnl backward compatibility and to allow trailing 'dnl'-style comments
5888d623946Smrgdnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841.
5893e72ca8cSmrg])
59034977a2fSmrg
5918d623946Smrgdnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5928d623946Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5938d623946Smrgdnl mangled by Autoconf and run in a shell conditional statement.
5948d623946Smrgm4_define([_AC_COMPILER_EXEEXT],
5958d623946Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
59634977a2fSmrg
5978d623946Smrg# When config.status generates a header, we must update the stamp-h file.
5988d623946Smrg# This file resides in the same directory as the config header
5998d623946Smrg# that is generated.  The stamp files are numbered to have different names.
600414bd68fSmrg
6018d623946Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6028d623946Smrg# loop where config.status creates the headers, so we can generate
6038d623946Smrg# our stamp files there.
6048d623946SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6058d623946Smrg[# Compute $1's index in $config_headers.
6068d623946Smrg_am_arg=$1
6078d623946Smrg_am_stamp_count=1
6088d623946Smrgfor _am_header in $config_headers :; do
6098d623946Smrg  case $_am_header in
6108d623946Smrg    $_am_arg | $_am_arg:* )
6118d623946Smrg      break ;;
6128d623946Smrg    * )
6138d623946Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6148d623946Smrg  esac
6158d623946Smrgdone
6168d623946Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
617414bd68fSmrg
6188d623946Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6198d623946Smrg#
6208d623946Smrg# This file is free software; the Free Software Foundation
6218d623946Smrg# gives unlimited permission to copy and/or distribute it,
6228d623946Smrg# with or without modifications, as long as this notice is preserved.
623414bd68fSmrg
6248d623946Smrg# AM_PROG_INSTALL_SH
6258d623946Smrg# ------------------
6268d623946Smrg# Define $install_sh.
6278d623946SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
6288d623946Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6298d623946Smrgif test x"${install_sh+set}" != xset; then
6308d623946Smrg  case $am_aux_dir in
6318d623946Smrg  *\ * | *\	*)
6328d623946Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
6338d623946Smrg  *)
6348d623946Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
6358d623946Smrg  esac
6368d623946Smrgfi
6378d623946SmrgAC_SUBST([install_sh])])
63834977a2fSmrg
6398d623946Smrg# Copyright (C) 2003-2021 Free Software Foundation, Inc.
6408d623946Smrg#
6418d623946Smrg# This file is free software; the Free Software Foundation
6428d623946Smrg# gives unlimited permission to copy and/or distribute it,
6438d623946Smrg# with or without modifications, as long as this notice is preserved.
64434977a2fSmrg
6458d623946Smrg# Check whether the underlying file-system supports filenames
6468d623946Smrg# with a leading dot.  For instance MS-DOS doesn't.
6478d623946SmrgAC_DEFUN([AM_SET_LEADING_DOT],
6488d623946Smrg[rm -rf .tst 2>/dev/null
6498d623946Smrgmkdir .tst 2>/dev/null
6508d623946Smrgif test -d .tst; then
6518d623946Smrg  am__leading_dot=.
6528d623946Smrgelse
6538d623946Smrg  am__leading_dot=_
6548d623946Smrgfi
6558d623946Smrgrmdir .tst 2>/dev/null
6568d623946SmrgAC_SUBST([am__leading_dot])])
65734977a2fSmrg
6588d623946Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
65934977a2fSmrg
6608d623946Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
6618d623946Smrg#
6628d623946Smrg# This file is free software; the Free Software Foundation
6638d623946Smrg# gives unlimited permission to copy and/or distribute it,
6648d623946Smrg# with or without modifications, as long as this notice is preserved.
66534977a2fSmrg
6668d623946Smrg# AM_MAKE_INCLUDE()
6678d623946Smrg# -----------------
6688d623946Smrg# Check whether make has an 'include' directive that can support all
6698d623946Smrg# the idioms we need for our automatic dependency tracking code.
6708d623946SmrgAC_DEFUN([AM_MAKE_INCLUDE],
6718d623946Smrg[AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive])
6728d623946Smrgcat > confinc.mk << 'END'
6738d623946Smrgam__doit:
6748d623946Smrg	@echo this is the am__doit target >confinc.out
6758d623946Smrg.PHONY: am__doit
6768d623946SmrgEND
6778d623946Smrgam__include="#"
6788d623946Smrgam__quote=
6798d623946Smrg# BSD make does it like this.
6808d623946Smrgecho '.include "confinc.mk" # ignored' > confmf.BSD
6818d623946Smrg# Other make implementations (GNU, Solaris 10, AIX) do it like this.
6828d623946Smrgecho 'include confinc.mk # ignored' > confmf.GNU
6838d623946Smrg_am_result=no
6848d623946Smrgfor s in GNU BSD; do
6858d623946Smrg  AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out])
6868d623946Smrg  AS_CASE([$?:`cat confinc.out 2>/dev/null`],
6878d623946Smrg      ['0:this is the am__doit target'],
6888d623946Smrg      [AS_CASE([$s],
6898d623946Smrg          [BSD], [am__include='.include' am__quote='"'],
6908d623946Smrg          [am__include='include' am__quote=''])])
6918d623946Smrg  if test "$am__include" != "#"; then
6928d623946Smrg    _am_result="yes ($s style)"
6938d623946Smrg    break
6948d623946Smrg  fi
6958d623946Smrgdone
6968d623946Smrgrm -f confinc.* confmf.*
6978d623946SmrgAC_MSG_RESULT([${_am_result}])
6988d623946SmrgAC_SUBST([am__include])])
6998d623946SmrgAC_SUBST([am__quote])])
70034977a2fSmrg
7018d623946Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
70234977a2fSmrg
7038d623946Smrg# Copyright (C) 1997-2021 Free Software Foundation, Inc.
7048d623946Smrg#
7058d623946Smrg# This file is free software; the Free Software Foundation
7068d623946Smrg# gives unlimited permission to copy and/or distribute it,
7078d623946Smrg# with or without modifications, as long as this notice is preserved.
70834977a2fSmrg
7098d623946Smrg# AM_MISSING_PROG(NAME, PROGRAM)
7108d623946Smrg# ------------------------------
7118d623946SmrgAC_DEFUN([AM_MISSING_PROG],
7128d623946Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7138d623946Smrg$1=${$1-"${am_missing_run}$2"}
7148d623946SmrgAC_SUBST($1)])
7158d623946Smrg
7168d623946Smrg# AM_MISSING_HAS_RUN
7178d623946Smrg# ------------------
7188d623946Smrg# Define MISSING if not defined so far and test if it is modern enough.
7198d623946Smrg# If it is, set am_missing_run to use it, otherwise, to nothing.
7208d623946SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7218d623946Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7228d623946SmrgAC_REQUIRE_AUX_FILE([missing])dnl
7238d623946Smrgif test x"${MISSING+set}" != xset; then
7248d623946Smrg  MISSING="\${SHELL} '$am_aux_dir/missing'"
7258d623946Smrgfi
7268d623946Smrg# Use eval to expand $SHELL
7278d623946Smrgif eval "$MISSING --is-lightweight"; then
7288d623946Smrg  am_missing_run="$MISSING "
7298d623946Smrgelse
7308d623946Smrg  am_missing_run=
7318d623946Smrg  AC_MSG_WARN(['missing' script is too old or missing])
7328d623946Smrgfi
7338d623946Smrg])
73434977a2fSmrg
7358d623946Smrg# Helper functions for option handling.                     -*- Autoconf -*-
73634977a2fSmrg
7378d623946Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
7388d623946Smrg#
7398d623946Smrg# This file is free software; the Free Software Foundation
7408d623946Smrg# gives unlimited permission to copy and/or distribute it,
7418d623946Smrg# with or without modifications, as long as this notice is preserved.
7423e72ca8cSmrg
7438d623946Smrg# _AM_MANGLE_OPTION(NAME)
7448d623946Smrg# -----------------------
7458d623946SmrgAC_DEFUN([_AM_MANGLE_OPTION],
7468d623946Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
747414bd68fSmrg
7488d623946Smrg# _AM_SET_OPTION(NAME)
7498d623946Smrg# --------------------
7508d623946Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7518d623946SmrgAC_DEFUN([_AM_SET_OPTION],
7528d623946Smrg[m4_define(_AM_MANGLE_OPTION([$1]), [1])])
753414bd68fSmrg
7548d623946Smrg# _AM_SET_OPTIONS(OPTIONS)
7558d623946Smrg# ------------------------
7568d623946Smrg# OPTIONS is a space-separated list of Automake options.
7578d623946SmrgAC_DEFUN([_AM_SET_OPTIONS],
7588d623946Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
759414bd68fSmrg
7608d623946Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7618d623946Smrg# -------------------------------------------
7628d623946Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7638d623946SmrgAC_DEFUN([_AM_IF_OPTION],
7648d623946Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
76534977a2fSmrg
7668d623946Smrg# Copyright (C) 1999-2021 Free Software Foundation, Inc.
7678d623946Smrg#
7688d623946Smrg# This file is free software; the Free Software Foundation
7698d623946Smrg# gives unlimited permission to copy and/or distribute it,
7708d623946Smrg# with or without modifications, as long as this notice is preserved.
77134977a2fSmrg
7728d623946Smrg# _AM_PROG_CC_C_O
7738d623946Smrg# ---------------
7748d623946Smrg# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
7758d623946Smrg# to automatically call this.
7768d623946SmrgAC_DEFUN([_AM_PROG_CC_C_O],
7778d623946Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7788d623946SmrgAC_REQUIRE_AUX_FILE([compile])dnl
7798d623946SmrgAC_LANG_PUSH([C])dnl
7808d623946SmrgAC_CACHE_CHECK(
7818d623946Smrg  [whether $CC understands -c and -o together],
7828d623946Smrg  [am_cv_prog_cc_c_o],
7838d623946Smrg  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
7848d623946Smrg  # Make sure it works both with $CC and with simple cc.
7858d623946Smrg  # Following AC_PROG_CC_C_O, we do the test twice because some
7868d623946Smrg  # compilers refuse to overwrite an existing .o file with -o,
7878d623946Smrg  # though they will create one.
7888d623946Smrg  am_cv_prog_cc_c_o=yes
7898d623946Smrg  for am_i in 1 2; do
7908d623946Smrg    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
7918d623946Smrg         && test -f conftest2.$ac_objext; then
7928d623946Smrg      : OK
7938d623946Smrg    else
7948d623946Smrg      am_cv_prog_cc_c_o=no
7958d623946Smrg      break
7968d623946Smrg    fi
7978d623946Smrg  done
7988d623946Smrg  rm -f core conftest*
7998d623946Smrg  unset am_i])
8008d623946Smrgif test "$am_cv_prog_cc_c_o" != yes; then
8018d623946Smrg   # Losing compiler, so override with the script.
8028d623946Smrg   # FIXME: It is wrong to rewrite CC.
8038d623946Smrg   # But if we don't then we get into trouble of one sort or another.
8048d623946Smrg   # A longer-term fix would be to have automake use am__CC in this case,
8058d623946Smrg   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
8068d623946Smrg   CC="$am_aux_dir/compile $CC"
8078d623946Smrgfi
8088d623946SmrgAC_LANG_POP([C])])
809414bd68fSmrg
8108d623946Smrg# For backward compatibility.
8118d623946SmrgAC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
81234977a2fSmrg
8138d623946Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
8143e72ca8cSmrg#
8158d623946Smrg# This file is free software; the Free Software Foundation
8168d623946Smrg# gives unlimited permission to copy and/or distribute it,
8178d623946Smrg# with or without modifications, as long as this notice is preserved.
81834977a2fSmrg
8198d623946Smrg# AM_RUN_LOG(COMMAND)
8208d623946Smrg# -------------------
8218d623946Smrg# Run COMMAND, save the exit status in ac_status, and log it.
8228d623946Smrg# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
8238d623946SmrgAC_DEFUN([AM_RUN_LOG],
8248d623946Smrg[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
8258d623946Smrg   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
8268d623946Smrg   ac_status=$?
8278d623946Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
8288d623946Smrg   (exit $ac_status); }])
829414bd68fSmrg
8308d623946Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
831414bd68fSmrg
8328d623946Smrg# Copyright (C) 1996-2021 Free Software Foundation, Inc.
83334977a2fSmrg#
8348d623946Smrg# This file is free software; the Free Software Foundation
8358d623946Smrg# gives unlimited permission to copy and/or distribute it,
8368d623946Smrg# with or without modifications, as long as this notice is preserved.
83734977a2fSmrg
8388d623946Smrg# AM_SANITY_CHECK
8398d623946Smrg# ---------------
8408d623946SmrgAC_DEFUN([AM_SANITY_CHECK],
8418d623946Smrg[AC_MSG_CHECKING([whether build environment is sane])
8428d623946Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8438d623946Smrg# name.  Accept space and tab only in the latter.
8448d623946Smrgam_lf='
8458d623946Smrg'
8468d623946Smrgcase `pwd` in
8478d623946Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8488d623946Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8498d623946Smrgesac
8508d623946Smrgcase $srcdir in
8518d623946Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8528d623946Smrg    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
8538d623946Smrgesac
85434977a2fSmrg
8558d623946Smrg# Do 'set' in a subshell so we don't clobber the current shell's
8568d623946Smrg# arguments.  Must try -L first in case configure is actually a
8578d623946Smrg# symlink; some systems play weird games with the mod time of symlinks
8588d623946Smrg# (eg FreeBSD returns the mod time of the symlink's containing
8598d623946Smrg# directory).
8608d623946Smrgif (
8618d623946Smrg   am_has_slept=no
8628d623946Smrg   for am_try in 1 2; do
8638d623946Smrg     echo "timestamp, slept: $am_has_slept" > conftest.file
8648d623946Smrg     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8658d623946Smrg     if test "$[*]" = "X"; then
8668d623946Smrg	# -L didn't work.
8678d623946Smrg	set X `ls -t "$srcdir/configure" conftest.file`
8688d623946Smrg     fi
8698d623946Smrg     if test "$[*]" != "X $srcdir/configure conftest.file" \
8708d623946Smrg	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
87134977a2fSmrg
8728d623946Smrg	# If neither matched, then we have a broken ls.  This can happen
8738d623946Smrg	# if, for instance, CONFIG_SHELL is bash and it inherits a
8748d623946Smrg	# broken ls alias from the environment.  This has actually
8758d623946Smrg	# happened.  Such a system could not be considered "sane".
8768d623946Smrg	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8778d623946Smrg  alias in your environment])
8788d623946Smrg     fi
8798d623946Smrg     if test "$[2]" = conftest.file || test $am_try -eq 2; then
8808d623946Smrg       break
8818d623946Smrg     fi
8828d623946Smrg     # Just in case.
8838d623946Smrg     sleep 1
8848d623946Smrg     am_has_slept=yes
8858d623946Smrg   done
8868d623946Smrg   test "$[2]" = conftest.file
8878d623946Smrg   )
8888d623946Smrgthen
8898d623946Smrg   # Ok.
8908d623946Smrg   :
8918d623946Smrgelse
8928d623946Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
8938d623946SmrgCheck your system clock])
8948d623946Smrgfi
8958d623946SmrgAC_MSG_RESULT([yes])
8968d623946Smrg# If we didn't sleep, we still need to ensure time stamps of config.status and
8978d623946Smrg# generated files are strictly newer.
8988d623946Smrgam_sleep_pid=
8998d623946Smrgif grep 'slept: no' conftest.file >/dev/null 2>&1; then
9008d623946Smrg  ( sleep 1 ) &
9018d623946Smrg  am_sleep_pid=$!
9028d623946Smrgfi
9038d623946SmrgAC_CONFIG_COMMANDS_PRE(
9048d623946Smrg  [AC_MSG_CHECKING([that generated files are newer than configure])
9058d623946Smrg   if test -n "$am_sleep_pid"; then
9068d623946Smrg     # Hide warnings about reused PIDs.
9078d623946Smrg     wait $am_sleep_pid 2>/dev/null
9088d623946Smrg   fi
9098d623946Smrg   AC_MSG_RESULT([done])])
9108d623946Smrgrm -f conftest.file
9118d623946Smrg])
91226b1ff4eSmrg
9138d623946Smrg# Copyright (C) 2009-2021 Free Software Foundation, Inc.
9148d623946Smrg#
9158d623946Smrg# This file is free software; the Free Software Foundation
9168d623946Smrg# gives unlimited permission to copy and/or distribute it,
9178d623946Smrg# with or without modifications, as long as this notice is preserved.
91834977a2fSmrg
9198d623946Smrg# AM_SILENT_RULES([DEFAULT])
9208d623946Smrg# --------------------------
9218d623946Smrg# Enable less verbose build rules; with the default set to DEFAULT
9228d623946Smrg# ("yes" being less verbose, "no" or empty being verbose).
9238d623946SmrgAC_DEFUN([AM_SILENT_RULES],
9248d623946Smrg[AC_ARG_ENABLE([silent-rules], [dnl
9258d623946SmrgAS_HELP_STRING(
9268d623946Smrg  [--enable-silent-rules],
9278d623946Smrg  [less verbose build output (undo: "make V=1")])
9288d623946SmrgAS_HELP_STRING(
9298d623946Smrg  [--disable-silent-rules],
9308d623946Smrg  [verbose build output (undo: "make V=0")])dnl
9318d623946Smrg])
9328d623946Smrgcase $enable_silent_rules in @%:@ (((
9338d623946Smrg  yes) AM_DEFAULT_VERBOSITY=0;;
9348d623946Smrg   no) AM_DEFAULT_VERBOSITY=1;;
9358d623946Smrg    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
9368d623946Smrgesac
9378d623946Smrgdnl
9388d623946Smrgdnl A few 'make' implementations (e.g., NonStop OS and NextStep)
9398d623946Smrgdnl do not support nested variable expansions.
9408d623946Smrgdnl See automake bug#9928 and bug#10237.
9418d623946Smrgam_make=${MAKE-make}
9428d623946SmrgAC_CACHE_CHECK([whether $am_make supports nested variables],
9438d623946Smrg   [am_cv_make_support_nested_variables],
9448d623946Smrg   [if AS_ECHO([['TRUE=$(BAR$(V))
9458d623946SmrgBAR0=false
9468d623946SmrgBAR1=true
9478d623946SmrgV=1
9488d623946Smrgam__doit:
9498d623946Smrg	@$(TRUE)
9508d623946Smrg.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
9518d623946Smrg  am_cv_make_support_nested_variables=yes
9528d623946Smrgelse
9538d623946Smrg  am_cv_make_support_nested_variables=no
9548d623946Smrgfi])
9558d623946Smrgif test $am_cv_make_support_nested_variables = yes; then
9568d623946Smrg  dnl Using '$V' instead of '$(V)' breaks IRIX make.
9578d623946Smrg  AM_V='$(V)'
9588d623946Smrg  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
9598d623946Smrgelse
9608d623946Smrg  AM_V=$AM_DEFAULT_VERBOSITY
9618d623946Smrg  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
9628d623946Smrgfi
9638d623946SmrgAC_SUBST([AM_V])dnl
9648d623946SmrgAM_SUBST_NOTMAKE([AM_V])dnl
9658d623946SmrgAC_SUBST([AM_DEFAULT_V])dnl
9668d623946SmrgAM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
9678d623946SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
9688d623946SmrgAM_BACKSLASH='\'
9698d623946SmrgAC_SUBST([AM_BACKSLASH])dnl
9708d623946Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
9718d623946Smrg])
97226b1ff4eSmrg
9738d623946Smrg# Copyright (C) 2001-2021 Free Software Foundation, Inc.
9748d623946Smrg#
9758d623946Smrg# This file is free software; the Free Software Foundation
9768d623946Smrg# gives unlimited permission to copy and/or distribute it,
9778d623946Smrg# with or without modifications, as long as this notice is preserved.
97826b1ff4eSmrg
9798d623946Smrg# AM_PROG_INSTALL_STRIP
9808d623946Smrg# ---------------------
9818d623946Smrg# One issue with vendor 'install' (even GNU) is that you can't
9828d623946Smrg# specify the program used to strip binaries.  This is especially
9838d623946Smrg# annoying in cross-compiling environments, where the build's strip
9848d623946Smrg# is unlikely to handle the host's binaries.
9858d623946Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9868d623946Smrg# always use install-sh in "make install-strip", and initialize
9878d623946Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
9888d623946SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9898d623946Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9908d623946Smrg# Installed binaries are usually stripped using 'strip' when the user
9918d623946Smrg# run "make install-strip".  However 'strip' might not be the right
9928d623946Smrg# tool to use in cross-compilation environments, therefore Automake
9938d623946Smrg# will honor the 'STRIP' environment variable to overrule this program.
9948d623946Smrgdnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
9958d623946Smrgif test "$cross_compiling" != no; then
9968d623946Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9978d623946Smrgfi
9988d623946SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9998d623946SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
100026b1ff4eSmrg
10018d623946Smrg# Copyright (C) 2006-2021 Free Software Foundation, Inc.
10028d623946Smrg#
10038d623946Smrg# This file is free software; the Free Software Foundation
10048d623946Smrg# gives unlimited permission to copy and/or distribute it,
10058d623946Smrg# with or without modifications, as long as this notice is preserved.
100626b1ff4eSmrg
10078d623946Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
10088d623946Smrg# ---------------------------
10098d623946Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
10108d623946Smrg# This macro is traced by Automake.
10118d623946SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
101226b1ff4eSmrg
10138d623946Smrg# AM_SUBST_NOTMAKE(VARIABLE)
10148d623946Smrg# --------------------------
10158d623946Smrg# Public sister of _AM_SUBST_NOTMAKE.
10168d623946SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
101726b1ff4eSmrg
10188d623946Smrg# Check how to create a tarball.                            -*- Autoconf -*-
1019414bd68fSmrg
10208d623946Smrg# Copyright (C) 2004-2021 Free Software Foundation, Inc.
10218d623946Smrg#
10228d623946Smrg# This file is free software; the Free Software Foundation
10238d623946Smrg# gives unlimited permission to copy and/or distribute it,
10248d623946Smrg# with or without modifications, as long as this notice is preserved.
1025414bd68fSmrg
10268d623946Smrg# _AM_PROG_TAR(FORMAT)
10278d623946Smrg# --------------------
10288d623946Smrg# Check how to create a tarball in format FORMAT.
10298d623946Smrg# FORMAT should be one of 'v7', 'ustar', or 'pax'.
10308d623946Smrg#
10318d623946Smrg# Substitute a variable $(am__tar) that is a command
10328d623946Smrg# writing to stdout a FORMAT-tarball containing the directory
10338d623946Smrg# $tardir.
10348d623946Smrg#     tardir=directory && $(am__tar) > result.tar
10358d623946Smrg#
10368d623946Smrg# Substitute a variable $(am__untar) that extract such
10378d623946Smrg# a tarball read from stdin.
10388d623946Smrg#     $(am__untar) < result.tar
10398d623946Smrg#
10408d623946SmrgAC_DEFUN([_AM_PROG_TAR],
10418d623946Smrg[# Always define AMTAR for backward compatibility.  Yes, it's still used
10428d623946Smrg# in the wild :-(  We should find a proper way to deprecate it ...
10438d623946SmrgAC_SUBST([AMTAR], ['$${TAR-tar}'])
1044ee3138f1Smrg
10458d623946Smrg# We'll loop over all known methods to create a tar archive until one works.
10468d623946Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
104734977a2fSmrg
10488d623946Smrgm4_if([$1], [v7],
10498d623946Smrg  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
1050ee3138f1Smrg
10518d623946Smrg  [m4_case([$1],
10528d623946Smrg    [ustar],
10538d623946Smrg     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
10548d623946Smrg      # There is notably a 21 bits limit for the UID and the GID.  In fact,
10558d623946Smrg      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
10568d623946Smrg      # and bug#13588).
10578d623946Smrg      am_max_uid=2097151 # 2^21 - 1
10588d623946Smrg      am_max_gid=$am_max_uid
10598d623946Smrg      # The $UID and $GID variables are not portable, so we need to resort
10608d623946Smrg      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
10618d623946Smrg      # below are definitely unexpected, so allow the users to see them
10628d623946Smrg      # (that is, avoid stderr redirection).
10638d623946Smrg      am_uid=`id -u || echo unknown`
10648d623946Smrg      am_gid=`id -g || echo unknown`
10658d623946Smrg      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
10668d623946Smrg      if test $am_uid -le $am_max_uid; then
10678d623946Smrg         AC_MSG_RESULT([yes])
10688d623946Smrg      else
10698d623946Smrg         AC_MSG_RESULT([no])
10708d623946Smrg         _am_tools=none
10718d623946Smrg      fi
10728d623946Smrg      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
10738d623946Smrg      if test $am_gid -le $am_max_gid; then
10748d623946Smrg         AC_MSG_RESULT([yes])
10758d623946Smrg      else
10768d623946Smrg        AC_MSG_RESULT([no])
10778d623946Smrg        _am_tools=none
10788d623946Smrg      fi],
1079ee3138f1Smrg
10808d623946Smrg  [pax],
10818d623946Smrg    [],
1082ee3138f1Smrg
10838d623946Smrg  [m4_fatal([Unknown tar format])])
1084ee3138f1Smrg
10858d623946Smrg  AC_MSG_CHECKING([how to create a $1 tar archive])
1086b425557eSmrg
10878d623946Smrg  # Go ahead even if we have the value already cached.  We do so because we
10888d623946Smrg  # need to set the values for the 'am__tar' and 'am__untar' variables.
10898d623946Smrg  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
1090b425557eSmrg
10918d623946Smrg  for _am_tool in $_am_tools; do
10928d623946Smrg    case $_am_tool in
10938d623946Smrg    gnutar)
10948d623946Smrg      for _am_tar in tar gnutar gtar; do
10958d623946Smrg        AM_RUN_LOG([$_am_tar --version]) && break
10968d623946Smrg      done
10978d623946Smrg      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
10988d623946Smrg      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
10998d623946Smrg      am__untar="$_am_tar -xf -"
11008d623946Smrg      ;;
11018d623946Smrg    plaintar)
11028d623946Smrg      # Must skip GNU tar: if it does not support --format= it doesn't create
11038d623946Smrg      # ustar tarball either.
11048d623946Smrg      (tar --version) >/dev/null 2>&1 && continue
11058d623946Smrg      am__tar='tar chf - "$$tardir"'
11068d623946Smrg      am__tar_='tar chf - "$tardir"'
11078d623946Smrg      am__untar='tar xf -'
11088d623946Smrg      ;;
11098d623946Smrg    pax)
11108d623946Smrg      am__tar='pax -L -x $1 -w "$$tardir"'
11118d623946Smrg      am__tar_='pax -L -x $1 -w "$tardir"'
11128d623946Smrg      am__untar='pax -r'
11138d623946Smrg      ;;
11148d623946Smrg    cpio)
11158d623946Smrg      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
11168d623946Smrg      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
11178d623946Smrg      am__untar='cpio -i -H $1 -d'
11188d623946Smrg      ;;
11198d623946Smrg    none)
11208d623946Smrg      am__tar=false
11218d623946Smrg      am__tar_=false
11228d623946Smrg      am__untar=false
11238d623946Smrg      ;;
11248d623946Smrg    esac
1125b425557eSmrg
11268d623946Smrg    # If the value was cached, stop now.  We just wanted to have am__tar
11278d623946Smrg    # and am__untar set.
11288d623946Smrg    test -n "${am_cv_prog_tar_$1}" && break
1129ee3138f1Smrg
11308d623946Smrg    # tar/untar a dummy directory, and stop if the command works.
11318d623946Smrg    rm -rf conftest.dir
11328d623946Smrg    mkdir conftest.dir
11338d623946Smrg    echo GrepMe > conftest.dir/file
11348d623946Smrg    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
11358d623946Smrg    rm -rf conftest.dir
11368d623946Smrg    if test -s conftest.tar; then
11378d623946Smrg      AM_RUN_LOG([$am__untar <conftest.tar])
11388d623946Smrg      AM_RUN_LOG([cat conftest.dir/file])
11398d623946Smrg      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
11408d623946Smrg    fi
11418d623946Smrg  done
11428d623946Smrg  rm -rf conftest.dir
1143ee3138f1Smrg
11448d623946Smrg  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
11458d623946Smrg  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
1146ee3138f1Smrg
11478d623946SmrgAC_SUBST([am__tar])
11488d623946SmrgAC_SUBST([am__untar])
11498d623946Smrg]) # _AM_PROG_TAR
115079a8a9c6Smrg
11518d623946Smrgdnl pkg.m4 - Macros to locate and utilise pkg-config.   -*- Autoconf -*-
11528d623946Smrgdnl serial 11 (pkg-config-0.29)
11538d623946Smrgdnl
11548d623946Smrgdnl Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
11558d623946Smrgdnl Copyright © 2012-2015 Dan Nicholson <dbn.lists@gmail.com>
11568d623946Smrgdnl
11578d623946Smrgdnl This program is free software; you can redistribute it and/or modify
11588d623946Smrgdnl it under the terms of the GNU General Public License as published by
11598d623946Smrgdnl the Free Software Foundation; either version 2 of the License, or
11608d623946Smrgdnl (at your option) any later version.
11618d623946Smrgdnl
11628d623946Smrgdnl This program is distributed in the hope that it will be useful, but
11638d623946Smrgdnl WITHOUT ANY WARRANTY; without even the implied warranty of
11648d623946Smrgdnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11658d623946Smrgdnl General Public License for more details.
11668d623946Smrgdnl
11678d623946Smrgdnl You should have received a copy of the GNU General Public License
11688d623946Smrgdnl along with this program; if not, write to the Free Software
11698d623946Smrgdnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
11708d623946Smrgdnl 02111-1307, USA.
11718d623946Smrgdnl
11728d623946Smrgdnl As a special exception to the GNU General Public License, if you
11738d623946Smrgdnl distribute this file as part of a program that contains a
11748d623946Smrgdnl configuration script generated by Autoconf, you may include it under
11758d623946Smrgdnl the same distribution terms that you use for the rest of that
11768d623946Smrgdnl program.
117734977a2fSmrg
11788d623946Smrgdnl PKG_PREREQ(MIN-VERSION)
11798d623946Smrgdnl -----------------------
11808d623946Smrgdnl Since: 0.29
11818d623946Smrgdnl
11828d623946Smrgdnl Verify that the version of the pkg-config macros are at least
11838d623946Smrgdnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's
11848d623946Smrgdnl installed version of pkg-config, this checks the developer's version
11858d623946Smrgdnl of pkg.m4 when generating configure.
11868d623946Smrgdnl
11878d623946Smrgdnl To ensure that this macro is defined, also add:
11888d623946Smrgdnl m4_ifndef([PKG_PREREQ],
11898d623946Smrgdnl     [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])])
11908d623946Smrgdnl
11918d623946Smrgdnl See the "Since" comment for each macro you use to see what version
11928d623946Smrgdnl of the macros you require.
11938d623946Smrgm4_defun([PKG_PREREQ],
11948d623946Smrg[m4_define([PKG_MACROS_VERSION], [0.29])
11958d623946Smrgm4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1,
11968d623946Smrg    [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])])
11978d623946Smrg])dnl PKG_PREREQ
1198ee3138f1Smrg
11998d623946Smrgdnl PKG_PROG_PKG_CONFIG([MIN-VERSION])
12008d623946Smrgdnl ----------------------------------
12018d623946Smrgdnl Since: 0.16
12028d623946Smrgdnl
12038d623946Smrgdnl Search for the pkg-config tool and set the PKG_CONFIG variable to
12048d623946Smrgdnl first found in the path. Checks that the version of pkg-config found
12058d623946Smrgdnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is
12068d623946Smrgdnl used since that's the first version where most current features of
12078d623946Smrgdnl pkg-config existed.
12088d623946SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
12098d623946Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
12108d623946Smrgm4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
12118d623946Smrgm4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
12128d623946SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
12138d623946SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
12148d623946SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
1215fe24f8a2Smrg
12168d623946Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
12178d623946Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
12188d623946Smrgfi
12198d623946Smrgif test -n "$PKG_CONFIG"; then
12208d623946Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
12218d623946Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
12228d623946Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
12238d623946Smrg		AC_MSG_RESULT([yes])
12248d623946Smrg	else
12258d623946Smrg		AC_MSG_RESULT([no])
12268d623946Smrg		PKG_CONFIG=""
12278d623946Smrg	fi
12288d623946Smrgfi[]dnl
12298d623946Smrg])dnl PKG_PROG_PKG_CONFIG
1230ee3138f1Smrg
12318d623946Smrgdnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
12328d623946Smrgdnl -------------------------------------------------------------------
12338d623946Smrgdnl Since: 0.18
12348d623946Smrgdnl
12358d623946Smrgdnl Check to see whether a particular set of modules exists. Similar to
12368d623946Smrgdnl PKG_CHECK_MODULES(), but does not set variables or print errors.
12378d623946Smrgdnl
12388d623946Smrgdnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
12398d623946Smrgdnl only at the first occurence in configure.ac, so if the first place
12408d623946Smrgdnl it's called might be skipped (such as if it is within an "if", you
12418d623946Smrgdnl have to call PKG_CHECK_EXISTS manually
12428d623946SmrgAC_DEFUN([PKG_CHECK_EXISTS],
12438d623946Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
12448d623946Smrgif test -n "$PKG_CONFIG" && \
12458d623946Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
12468d623946Smrg  m4_default([$2], [:])
12478d623946Smrgm4_ifvaln([$3], [else
12488d623946Smrg  $3])dnl
12498d623946Smrgfi])
1250fe24f8a2Smrg
12518d623946Smrgdnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
12528d623946Smrgdnl ---------------------------------------------
12538d623946Smrgdnl Internal wrapper calling pkg-config via PKG_CONFIG and setting
12548d623946Smrgdnl pkg_failed based on the result.
12558d623946Smrgm4_define([_PKG_CONFIG],
12568d623946Smrg[if test -n "$$1"; then
12578d623946Smrg    pkg_cv_[]$1="$$1"
12588d623946Smrg elif test -n "$PKG_CONFIG"; then
12598d623946Smrg    PKG_CHECK_EXISTS([$3],
12608d623946Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
12618d623946Smrg		      test "x$?" != "x0" && pkg_failed=yes ],
12628d623946Smrg		     [pkg_failed=yes])
12638d623946Smrg else
12648d623946Smrg    pkg_failed=untried
12658d623946Smrgfi[]dnl
12668d623946Smrg])dnl _PKG_CONFIG
1267ee3138f1Smrg
12688d623946Smrgdnl _PKG_SHORT_ERRORS_SUPPORTED
12698d623946Smrgdnl ---------------------------
12708d623946Smrgdnl Internal check to see if pkg-config supports short errors.
12718d623946SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
12728d623946Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
12738d623946Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
12748d623946Smrg        _pkg_short_errors_supported=yes
12758d623946Smrgelse
12768d623946Smrg        _pkg_short_errors_supported=no
12778d623946Smrgfi[]dnl
12788d623946Smrg])dnl _PKG_SHORT_ERRORS_SUPPORTED
1279fe24f8a2Smrg
1280fe24f8a2Smrg
12818d623946Smrgdnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
12828d623946Smrgdnl   [ACTION-IF-NOT-FOUND])
12838d623946Smrgdnl --------------------------------------------------------------
12848d623946Smrgdnl Since: 0.4.0
12858d623946Smrgdnl
12868d623946Smrgdnl Note that if there is a possibility the first call to
12878d623946Smrgdnl PKG_CHECK_MODULES might not happen, you should be sure to include an
12888d623946Smrgdnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
12898d623946SmrgAC_DEFUN([PKG_CHECK_MODULES],
12908d623946Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
12918d623946SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
12928d623946SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1293fe24f8a2Smrg
12948d623946Smrgpkg_failed=no
12958d623946SmrgAC_MSG_CHECKING([for $1])
1296fe24f8a2Smrg
12978d623946Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
12988d623946Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1299fe24f8a2Smrg
13008d623946Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
13018d623946Smrgand $1[]_LIBS to avoid the need to call pkg-config.
13028d623946SmrgSee the pkg-config man page for more details.])
1303ee3138f1Smrg
13048d623946Smrgif test $pkg_failed = yes; then
13058d623946Smrg   	AC_MSG_RESULT([no])
13068d623946Smrg        _PKG_SHORT_ERRORS_SUPPORTED
13078d623946Smrg        if test $_pkg_short_errors_supported = yes; then
13088d623946Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
13098d623946Smrg        else 
13108d623946Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
13118d623946Smrg        fi
13128d623946Smrg	# Put the nasty error message in config.log where it belongs
13138d623946Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1314ee3138f1Smrg
13158d623946Smrg	m4_default([$4], [AC_MSG_ERROR(
13168d623946Smrg[Package requirements ($2) were not met:
1317ee3138f1Smrg
13188d623946Smrg$$1_PKG_ERRORS
1319ee3138f1Smrg
13208d623946SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
13218d623946Smrginstalled software in a non-standard prefix.
1322ee3138f1Smrg
13238d623946Smrg_PKG_TEXT])[]dnl
13248d623946Smrg        ])
13258d623946Smrgelif test $pkg_failed = untried; then
13268d623946Smrg     	AC_MSG_RESULT([no])
13278d623946Smrg	m4_default([$4], [AC_MSG_FAILURE(
13288d623946Smrg[The pkg-config script could not be found or is too old.  Make sure it
13298d623946Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
13308d623946Smrgpath to pkg-config.
1331ee3138f1Smrg
13328d623946Smrg_PKG_TEXT
1333ee3138f1Smrg
13348d623946SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
13358d623946Smrg        ])
13368d623946Smrgelse
13378d623946Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
13388d623946Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
13398d623946Smrg        AC_MSG_RESULT([yes])
13408d623946Smrg	$3
13418d623946Smrgfi[]dnl
13428d623946Smrg])dnl PKG_CHECK_MODULES
1343ee3138f1Smrg
1344ee3138f1Smrg
13458d623946Smrgdnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
13468d623946Smrgdnl   [ACTION-IF-NOT-FOUND])
13478d623946Smrgdnl ---------------------------------------------------------------------
13488d623946Smrgdnl Since: 0.29
13498d623946Smrgdnl
13508d623946Smrgdnl Checks for existence of MODULES and gathers its build flags with
13518d623946Smrgdnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags
13528d623946Smrgdnl and VARIABLE-PREFIX_LIBS from --libs.
13538d623946Smrgdnl
13548d623946Smrgdnl Note that if there is a possibility the first call to
13558d623946Smrgdnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to
13568d623946Smrgdnl include an explicit call to PKG_PROG_PKG_CONFIG in your
13578d623946Smrgdnl configure.ac.
13588d623946SmrgAC_DEFUN([PKG_CHECK_MODULES_STATIC],
13598d623946Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
13608d623946Smrg_save_PKG_CONFIG=$PKG_CONFIG
13618d623946SmrgPKG_CONFIG="$PKG_CONFIG --static"
13628d623946SmrgPKG_CHECK_MODULES($@)
13638d623946SmrgPKG_CONFIG=$_save_PKG_CONFIG[]dnl
13648d623946Smrg])dnl PKG_CHECK_MODULES_STATIC
1365b425557eSmrg
136634977a2fSmrg
13678d623946Smrgdnl PKG_INSTALLDIR([DIRECTORY])
13688d623946Smrgdnl -------------------------
13698d623946Smrgdnl Since: 0.27
13708d623946Smrgdnl
13718d623946Smrgdnl Substitutes the variable pkgconfigdir as the location where a module
13728d623946Smrgdnl should install pkg-config .pc files. By default the directory is
13738d623946Smrgdnl $libdir/pkgconfig, but the default can be changed by passing
13748d623946Smrgdnl DIRECTORY. The user can override through the --with-pkgconfigdir
13758d623946Smrgdnl parameter.
13768d623946SmrgAC_DEFUN([PKG_INSTALLDIR],
13778d623946Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
13788d623946Smrgm4_pushdef([pkg_description],
13798d623946Smrg    [pkg-config installation directory @<:@]pkg_default[@:>@])
13808d623946SmrgAC_ARG_WITH([pkgconfigdir],
13818d623946Smrg    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
13828d623946Smrg    [with_pkgconfigdir=]pkg_default)
13838d623946SmrgAC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
13848d623946Smrgm4_popdef([pkg_default])
13858d623946Smrgm4_popdef([pkg_description])
13868d623946Smrg])dnl PKG_INSTALLDIR
138734977a2fSmrg
1388b425557eSmrg
13898d623946Smrgdnl PKG_NOARCH_INSTALLDIR([DIRECTORY])
13908d623946Smrgdnl --------------------------------
13918d623946Smrgdnl Since: 0.27
13928d623946Smrgdnl
13938d623946Smrgdnl Substitutes the variable noarch_pkgconfigdir as the location where a
13948d623946Smrgdnl module should install arch-independent pkg-config .pc files. By
13958d623946Smrgdnl default the directory is $datadir/pkgconfig, but the default can be
13968d623946Smrgdnl changed by passing DIRECTORY. The user can override through the
13978d623946Smrgdnl --with-noarch-pkgconfigdir parameter.
13988d623946SmrgAC_DEFUN([PKG_NOARCH_INSTALLDIR],
13998d623946Smrg[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
14008d623946Smrgm4_pushdef([pkg_description],
14018d623946Smrg    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
14028d623946SmrgAC_ARG_WITH([noarch-pkgconfigdir],
14038d623946Smrg    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
14048d623946Smrg    [with_noarch_pkgconfigdir=]pkg_default)
14058d623946SmrgAC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
14068d623946Smrgm4_popdef([pkg_default])
14078d623946Smrgm4_popdef([pkg_description])
14088d623946Smrg])dnl PKG_NOARCH_INSTALLDIR
1409b425557eSmrg
141034977a2fSmrg
14118d623946Smrgdnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
14128d623946Smrgdnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
14138d623946Smrgdnl -------------------------------------------
14148d623946Smrgdnl Since: 0.28
14158d623946Smrgdnl
14168d623946Smrgdnl Retrieves the value of the pkg-config variable for the given module.
14178d623946SmrgAC_DEFUN([PKG_CHECK_VAR],
14188d623946Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
14198d623946SmrgAC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
1420ee3138f1Smrg
14218d623946Smrg_PKG_CONFIG([$1], [variable="][$3]["], [$2])
14228d623946SmrgAS_VAR_COPY([$1], [pkg_cv_][$1])
1423ee3138f1Smrg
14248d623946SmrgAS_VAR_IF([$1], [""], [$5], [$4])dnl
14258d623946Smrg])dnl PKG_CHECK_VAR
1426ee3138f1Smrg
14278d623946Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
14288d623946Smrgdnl
14298d623946Smrgdnl Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
14308d623946Smrgdnl
14318d623946Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
14328d623946Smrgdnl copy of this software and associated documentation files (the "Software"),
14338d623946Smrgdnl to deal in the Software without restriction, including without limitation
14348d623946Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
14358d623946Smrgdnl and/or sell copies of the Software, and to permit persons to whom the
14368d623946Smrgdnl Software is furnished to do so, subject to the following conditions:
14378d623946Smrgdnl
14388d623946Smrgdnl The above copyright notice and this permission notice (including the next
14398d623946Smrgdnl paragraph) shall be included in all copies or substantial portions of the
14408d623946Smrgdnl Software.
14418d623946Smrgdnl
14428d623946Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14438d623946Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
14448d623946Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
14458d623946Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
14468d623946Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
14478d623946Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
14488d623946Smrgdnl DEALINGS IN THE SOFTWARE.
1449b425557eSmrg
14508d623946Smrg# XORG_MACROS_VERSION(required-version)
14518d623946Smrg# -------------------------------------
14528d623946Smrg# Minimum version: 1.1.0
14538d623946Smrg#
14548d623946Smrg# If you're using a macro added in Version 1.1 or newer, include this in
14558d623946Smrg# your configure.ac with the minimum required version, such as:
14568d623946Smrg# XORG_MACROS_VERSION(1.1)
14578d623946Smrg#
14588d623946Smrg# To ensure that this macro is defined, also add:
14598d623946Smrg# m4_ifndef([XORG_MACROS_VERSION],
14608d623946Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
14618d623946Smrg#
14628d623946Smrg#
14638d623946Smrg# See the "minimum version" comment for each macro you use to see what
14648d623946Smrg# version you require.
14658d623946Smrgm4_defun([XORG_MACROS_VERSION],[
14668d623946Smrgm4_define([vers_have], [1.19.3])
14678d623946Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
14688d623946Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
14698d623946Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
14708d623946Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
14718d623946Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
14728d623946Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
14738d623946Smrgm4_undefine([vers_have])
14748d623946Smrgm4_undefine([maj_have])
14758d623946Smrgm4_undefine([maj_needed])
14768d623946Smrg]) # XORG_MACROS_VERSION
1477ee3138f1Smrg
14788d623946Smrg# XORG_PROG_RAWCPP()
14798d623946Smrg# ------------------
14808d623946Smrg# Minimum version: 1.0.0
14818d623946Smrg#
14828d623946Smrg# Find cpp program and necessary flags for use in pre-processing text files
14838d623946Smrg# such as man pages and config files
14848d623946SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
14858d623946SmrgAC_REQUIRE([AC_PROG_CPP])
14868d623946SmrgAC_PATH_TOOL(RAWCPP, [cpp], [${CPP}],
14878d623946Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
1488b425557eSmrg
14898d623946Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
14908d623946Smrg# which is not the best choice for supporting other OS'es, but covers most
14918d623946Smrg# of the ones we need for now.
14928d623946SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
14938d623946SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
14948d623946Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
14958d623946Smrg	AC_MSG_RESULT([no])
14968d623946Smrgelse
14978d623946Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
14988d623946Smrg		RAWCPPFLAGS=-undef
14998d623946Smrg		AC_MSG_RESULT([yes])
15008d623946Smrg	# under Cygwin unix is still defined even with -undef
15018d623946Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
15028d623946Smrg		RAWCPPFLAGS="-undef -ansi"
15038d623946Smrg		AC_MSG_RESULT([yes, with -ansi])
15048d623946Smrg	else
15058d623946Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
15068d623946Smrg	fi
15078d623946Smrgfi
15088d623946Smrgrm -f conftest.$ac_ext
1509ee3138f1Smrg
15108d623946SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
15118d623946SmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
15128d623946Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
15138d623946Smrg	AC_MSG_RESULT([no])
15148d623946Smrgelse
15158d623946Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
15168d623946Smrg		TRADITIONALCPPFLAGS="-traditional"
15178d623946Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
15188d623946Smrg		AC_MSG_RESULT([yes])
15198d623946Smrg	else
15208d623946Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
15218d623946Smrg	fi
15228d623946Smrgfi
15238d623946Smrgrm -f conftest.$ac_ext
15248d623946SmrgAC_SUBST(RAWCPPFLAGS)
15258d623946SmrgAC_SUBST(TRADITIONALCPPFLAGS)
15268d623946Smrg]) # XORG_PROG_RAWCPP
1527a1ed278cSmrg
15288d623946Smrg# XORG_MANPAGE_SECTIONS()
15298d623946Smrg# -----------------------
15308d623946Smrg# Minimum version: 1.0.0
15318d623946Smrg#
15328d623946Smrg# Determine which sections man pages go in for the different man page types
15338d623946Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
15348d623946Smrg# Not sure if there's any better way than just hardcoding by OS name.
15358d623946Smrg# Override default settings by setting environment variables
15368d623946Smrg# Added MAN_SUBSTS in version 1.8
15378d623946Smrg# Added AC_PROG_SED in version 1.8
1538a1ed278cSmrg
15398d623946SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
15408d623946SmrgAC_REQUIRE([AC_CANONICAL_HOST])
15418d623946SmrgAC_REQUIRE([AC_PROG_SED])
1542ee3138f1Smrg
15438d623946Smrgcase $host_os in
15448d623946Smrg    solaris*)
15458d623946Smrg        # Solaris 2.0 - 11.3 use SysV man page section numbers, so we
15468d623946Smrg        # check for a man page file found in later versions that use
15478d623946Smrg        # traditional section numbers instead
15488d623946Smrg        AC_CHECK_FILE([/usr/share/man/man7/attributes.7],
15498d623946Smrg                [SYSV_MAN_SECTIONS=false], [SYSV_MAN_SECTIONS=true])
15508d623946Smrg        ;;
15518d623946Smrg    *) SYSV_MAN_SECTIONS=false ;;
15528d623946Smrgesac
1553ee3138f1Smrg
15548d623946Smrgif test x$APP_MAN_SUFFIX = x    ; then
15558d623946Smrg    APP_MAN_SUFFIX=1
15568d623946Smrgfi
15578d623946Smrgif test x$APP_MAN_DIR = x    ; then
15588d623946Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
15598d623946Smrgfi
1560ee3138f1Smrg
15618d623946Smrgif test x$LIB_MAN_SUFFIX = x    ; then
15628d623946Smrg    LIB_MAN_SUFFIX=3
15638d623946Smrgfi
15648d623946Smrgif test x$LIB_MAN_DIR = x    ; then
15658d623946Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
15668d623946Smrgfi
1567ee3138f1Smrg
15688d623946Smrgif test x$FILE_MAN_SUFFIX = x    ; then
15698d623946Smrg    case $SYSV_MAN_SECTIONS in
15708d623946Smrg	true)				FILE_MAN_SUFFIX=4  ;;
15718d623946Smrg	*)				FILE_MAN_SUFFIX=5  ;;
15728d623946Smrg    esac
15738d623946Smrgfi
15748d623946Smrgif test x$FILE_MAN_DIR = x    ; then
15758d623946Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
15768d623946Smrgfi
1577ee3138f1Smrg
15788d623946Smrgif test x$MISC_MAN_SUFFIX = x    ; then
15798d623946Smrg    case $SYSV_MAN_SECTIONS in
15808d623946Smrg	true)				MISC_MAN_SUFFIX=5  ;;
15818d623946Smrg	*)				MISC_MAN_SUFFIX=7  ;;
15828d623946Smrg    esac
15838d623946Smrgfi
15848d623946Smrgif test x$MISC_MAN_DIR = x    ; then
15858d623946Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
15868d623946Smrgfi
1587ee3138f1Smrg
15888d623946Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
15898d623946Smrg    case $SYSV_MAN_SECTIONS in
15908d623946Smrg	true)				DRIVER_MAN_SUFFIX=7  ;;
15918d623946Smrg	*)				DRIVER_MAN_SUFFIX=4  ;;
15928d623946Smrg    esac
15938d623946Smrgfi
15948d623946Smrgif test x$DRIVER_MAN_DIR = x    ; then
15958d623946Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
15968d623946Smrgfi
1597ee3138f1Smrg
15988d623946Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
15998d623946Smrg    case $SYSV_MAN_SECTIONS in
16008d623946Smrg	true)				ADMIN_MAN_SUFFIX=1m ;;
16018d623946Smrg	*)				ADMIN_MAN_SUFFIX=8  ;;
16028d623946Smrg    esac
16038d623946Smrgfi
16048d623946Smrgif test x$ADMIN_MAN_DIR = x    ; then
16058d623946Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
16068d623946Smrgfi
1607ee3138f1Smrg
160834977a2fSmrg
16098d623946SmrgAC_SUBST([APP_MAN_SUFFIX])
16108d623946SmrgAC_SUBST([LIB_MAN_SUFFIX])
16118d623946SmrgAC_SUBST([FILE_MAN_SUFFIX])
16128d623946SmrgAC_SUBST([MISC_MAN_SUFFIX])
16138d623946SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
16148d623946SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
16158d623946SmrgAC_SUBST([APP_MAN_DIR])
16168d623946SmrgAC_SUBST([LIB_MAN_DIR])
16178d623946SmrgAC_SUBST([FILE_MAN_DIR])
16188d623946SmrgAC_SUBST([MISC_MAN_DIR])
16198d623946SmrgAC_SUBST([DRIVER_MAN_DIR])
16208d623946SmrgAC_SUBST([ADMIN_MAN_DIR])
1621ee3138f1Smrg
16228d623946SmrgXORG_MAN_PAGE="X Version 11"
16238d623946SmrgAC_SUBST([XORG_MAN_PAGE])
16248d623946SmrgMAN_SUBSTS="\
16258d623946Smrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
16268d623946Smrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
16278d623946Smrg	-e 's|__xservername__|Xorg|g' \
16288d623946Smrg	-e 's|__xconfigfile__|xorg.conf|g' \
16298d623946Smrg	-e 's|__projectroot__|\$(prefix)|g' \
16308d623946Smrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
16318d623946Smrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
16328d623946Smrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
16338d623946Smrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
16348d623946Smrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
16358d623946Smrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
16368d623946Smrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
16378d623946SmrgAC_SUBST([MAN_SUBSTS])
1638ee3138f1Smrg
16398d623946Smrg]) # XORG_MANPAGE_SECTIONS
1640ee3138f1Smrg
16418d623946Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
16428d623946Smrg# ------------------------
16438d623946Smrg# Minimum version: 1.7.0
16448d623946Smrg#
16458d623946Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
16468d623946Smrg# provided by xorg-sgml-doctools, if installed.
16478d623946SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
16488d623946SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
16498d623946SmrgXORG_SGML_PATH=
16508d623946SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
16518d623946Smrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
16528d623946Smrg    [m4_ifval([$1],[:],
16538d623946Smrg        [if test x"$cross_compiling" != x"yes" ; then
16548d623946Smrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
16558d623946Smrg                          [XORG_SGML_PATH=$prefix/share/sgml])
16568d623946Smrg         fi])
1657414bd68fSmrg    ])
16583e72ca8cSmrg
16598d623946Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
16608d623946Smrg# the path and the name of the doc stylesheet
16618d623946Smrgif test "x$XORG_SGML_PATH" != "x" ; then
16628d623946Smrg   AC_MSG_RESULT([$XORG_SGML_PATH])
16638d623946Smrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
16648d623946Smrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
16658d623946Smrgelse
16668d623946Smrg   AC_MSG_RESULT([no])
16678d623946Smrgfi
1668ee3138f1Smrg
16698d623946SmrgAC_SUBST(XORG_SGML_PATH)
16708d623946SmrgAC_SUBST(STYLESHEET_SRCDIR)
16718d623946SmrgAC_SUBST(XSL_STYLESHEET)
16728d623946SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
16738d623946Smrg]) # XORG_CHECK_SGML_DOCTOOLS
1674ee3138f1Smrg
16758d623946Smrg# XORG_CHECK_LINUXDOC
16768d623946Smrg# -------------------
16778d623946Smrg# Minimum version: 1.0.0
16788d623946Smrg#
16798d623946Smrg# Defines the variable MAKE_TEXT if the necessary tools and
16808d623946Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
16818d623946Smrg# Whether or not the necessary tools and files are found can be checked
16828d623946Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
16838d623946SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
16848d623946SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
16858d623946SmrgAC_REQUIRE([XORG_WITH_PS2PDF])
1686414bd68fSmrg
16878d623946SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
1688ee3138f1Smrg
16898d623946SmrgAC_MSG_CHECKING([whether to build documentation])
1690ee3138f1Smrg
16918d623946Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
16928d623946Smrg   BUILDDOC=yes
16938d623946Smrgelse
16948d623946Smrg   BUILDDOC=no
16958d623946Smrgfi
1696a1ed278cSmrg
16978d623946SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
1698a1ed278cSmrg
16998d623946SmrgAC_MSG_RESULT([$BUILDDOC])
1700ee3138f1Smrg
17018d623946SmrgAC_MSG_CHECKING([whether to build pdf documentation])
1702ee3138f1Smrg
17038d623946Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
17048d623946Smrg   BUILDPDFDOC=yes
1705414bd68fSmrgelse
17068d623946Smrg   BUILDPDFDOC=no
1707414bd68fSmrgfi
1708ee3138f1Smrg
17098d623946SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
1710ee3138f1Smrg
17118d623946SmrgAC_MSG_RESULT([$BUILDPDFDOC])
1712ee3138f1Smrg
17138d623946SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
17148d623946SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
17158d623946SmrgMAKE_PDF="$PS2PDF"
17168d623946SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
1717ee3138f1Smrg
17188d623946SmrgAC_SUBST(MAKE_TEXT)
17198d623946SmrgAC_SUBST(MAKE_PS)
17208d623946SmrgAC_SUBST(MAKE_PDF)
17218d623946SmrgAC_SUBST(MAKE_HTML)
17228d623946Smrg]) # XORG_CHECK_LINUXDOC
1723ee3138f1Smrg
17248d623946Smrg# XORG_CHECK_DOCBOOK
17258d623946Smrg# -------------------
17268d623946Smrg# Minimum version: 1.0.0
17278d623946Smrg#
17288d623946Smrg# Checks for the ability to build output formats from SGML DocBook source.
17298d623946Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
17308d623946Smrg# indicates whether the necessary tools and files are found and, if set,
17318d623946Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
17328d623946SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
17338d623946SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
1734ee3138f1Smrg
17358d623946SmrgBUILDTXTDOC=no
17368d623946SmrgBUILDPDFDOC=no
17378d623946SmrgBUILDPSDOC=no
17388d623946SmrgBUILDHTMLDOC=no
17393e72ca8cSmrg
17408d623946SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
17418d623946SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
17428d623946SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
17438d623946SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
1744ee3138f1Smrg
17458d623946SmrgAC_MSG_CHECKING([whether to build text documentation])
17468d623946Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
17478d623946Smrg   test x$BUILD_TXTDOC != xno; then
17488d623946Smrg	BUILDTXTDOC=yes
17498d623946Smrgfi
17508d623946SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
17518d623946SmrgAC_MSG_RESULT([$BUILDTXTDOC])
1752ee3138f1Smrg
17538d623946SmrgAC_MSG_CHECKING([whether to build PDF documentation])
17548d623946Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
17558d623946Smrg   test x$BUILD_PDFDOC != xno; then
17568d623946Smrg	BUILDPDFDOC=yes
17578d623946Smrgfi
17588d623946SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
17598d623946SmrgAC_MSG_RESULT([$BUILDPDFDOC])
1760ee3138f1Smrg
17618d623946SmrgAC_MSG_CHECKING([whether to build PostScript documentation])
17628d623946Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
17638d623946Smrg   test x$BUILD_PSDOC != xno; then
17648d623946Smrg	BUILDPSDOC=yes
17658d623946Smrgfi
17668d623946SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
17678d623946SmrgAC_MSG_RESULT([$BUILDPSDOC])
1768ee3138f1Smrg
17698d623946SmrgAC_MSG_CHECKING([whether to build HTML documentation])
17708d623946Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
17718d623946Smrg   test x$BUILD_HTMLDOC != xno; then
17728d623946Smrg	BUILDHTMLDOC=yes
17738d623946Smrgfi
17748d623946SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
17758d623946SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
1776ee3138f1Smrg
17778d623946SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
17788d623946SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
17798d623946SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
17808d623946SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
1781ee3138f1Smrg
17828d623946SmrgAC_SUBST(MAKE_TEXT)
17838d623946SmrgAC_SUBST(MAKE_PS)
17848d623946SmrgAC_SUBST(MAKE_PDF)
17858d623946SmrgAC_SUBST(MAKE_HTML)
17868d623946Smrg]) # XORG_CHECK_DOCBOOK
17873e72ca8cSmrg
17888d623946Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
17898d623946Smrg# ----------------
17908d623946Smrg# Minimum version: 1.5.0
17918d623946Smrg# Minimum version for optional DEFAULT argument: 1.11.0
17928d623946Smrg#
17938d623946Smrg# Documentation tools are not always available on all platforms and sometimes
17948d623946Smrg# not at the appropriate level. This macro enables a module to test for the
17958d623946Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
17968d623946Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
17978d623946Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
17988d623946Smrg# --with-xmlto assumes 'auto'.
17998d623946Smrg#
18008d623946Smrg# Interface to module:
18018d623946Smrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
18028d623946Smrg# XMLTO:	returns the path of the xmlto program found
18038d623946Smrg#		returns the path set by the user in the environment
18048d623946Smrg# --with-xmlto:	'yes' user instructs the module to use xmlto
18058d623946Smrg#		'no' user instructs the module not to use xmlto
18068d623946Smrg#
18078d623946Smrg# Added in version 1.10.0
18088d623946Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
18098d623946Smrg#                  xmlto for text output requires either lynx, links, or w3m browsers
18108d623946Smrg#
18118d623946Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
18128d623946Smrg#
18138d623946SmrgAC_DEFUN([XORG_WITH_XMLTO],[
18148d623946SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
18158d623946Smrgm4_define([_defopt], m4_default([$2], [auto]))
18168d623946SmrgAC_ARG_WITH(xmlto,
18178d623946Smrg	AS_HELP_STRING([--with-xmlto],
18188d623946Smrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
18198d623946Smrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
18208d623946Smrgm4_undefine([_defopt])
18213e72ca8cSmrg
18228d623946Smrgif test "x$use_xmlto" = x"auto"; then
18238d623946Smrg   AC_PATH_PROG([XMLTO], [xmlto])
18248d623946Smrg   if test "x$XMLTO" = "x"; then
18258d623946Smrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
18268d623946Smrg	have_xmlto=no
18278d623946Smrg   else
18288d623946Smrg        have_xmlto=yes
18298d623946Smrg   fi
18308d623946Smrgelif test "x$use_xmlto" = x"yes" ; then
18318d623946Smrg   AC_PATH_PROG([XMLTO], [xmlto])
18328d623946Smrg   if test "x$XMLTO" = "x"; then
18338d623946Smrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
18348d623946Smrg   fi
18358d623946Smrg   have_xmlto=yes
18368d623946Smrgelif test "x$use_xmlto" = x"no" ; then
18378d623946Smrg   if test "x$XMLTO" != "x"; then
18388d623946Smrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
18398d623946Smrg   fi
18408d623946Smrg   have_xmlto=no
18413e72ca8cSmrgelse
18428d623946Smrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
18433e72ca8cSmrgfi
18443e72ca8cSmrg
18458d623946Smrg# Test for a minimum version of xmlto, if provided.
18468d623946Smrgm4_ifval([$1],
18478d623946Smrg[if test "$have_xmlto" = yes; then
18488d623946Smrg    # scrape the xmlto version
18498d623946Smrg    AC_MSG_CHECKING([the xmlto version])
18508d623946Smrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
18518d623946Smrg    AC_MSG_RESULT([$xmlto_version])
18528d623946Smrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
18538d623946Smrg        [if test "x$use_xmlto" = xauto; then
18548d623946Smrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
18558d623946Smrg            have_xmlto=no
18568d623946Smrg        else
18578d623946Smrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
18588d623946Smrg        fi])
18598d623946Smrgfi])
18603e72ca8cSmrg
18618d623946Smrg# Test for the ability of xmlto to generate a text target
18628d623946Smrg#
18638d623946Smrg# NOTE: xmlto 0.0.27 or higher return a non-zero return code in the
18648d623946Smrg# following test for empty XML docbook files.
18658d623946Smrg# For compatibility reasons use the following empty XML docbook file and if
18668d623946Smrg# it fails try it again with a non-empty XML file.
18678d623946Smrghave_xmlto_text=no
18688d623946Smrgcat > conftest.xml << "EOF"
18698d623946SmrgEOF
18708d623946SmrgAS_IF([test "$have_xmlto" = yes],
18718d623946Smrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
18728d623946Smrg             [have_xmlto_text=yes],
18738d623946Smrg             [# Try it again with a non-empty XML file.
18748d623946Smrg              cat > conftest.xml << "EOF"
18758d623946Smrg<x></x>
18768d623946SmrgEOF
18778d623946Smrg              AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
18788d623946Smrg                    [have_xmlto_text=yes],
18798d623946Smrg                    [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])])
18808d623946Smrgrm -f conftest.xml
18818d623946SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
18828d623946SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
18838d623946Smrg]) # XORG_WITH_XMLTO
18843e72ca8cSmrg
18858d623946Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
18868d623946Smrg# --------------------------------------------
18878d623946Smrg# Minimum version: 1.12.0
18888d623946Smrg# Minimum version for optional DEFAULT argument: 1.12.0
18898d623946Smrg#
18908d623946Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
18918d623946Smrg# XML-based language used for the transformation of XML documents.
18928d623946Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
18938d623946Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
18948d623946Smrg# The XSLT processor is often used as a standalone tool for transformations.
18958d623946Smrg# It should not be assumed that this tool is used only to work with documnetation.
18968d623946Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
18978d623946Smrg#
18988d623946Smrg# Interface to module:
18998d623946Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
19008d623946Smrg# XSLTPROC:	 returns the path of the xsltproc program found
19018d623946Smrg#		 returns the path set by the user in the environment
19028d623946Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
19038d623946Smrg#		  'no' user instructs the module not to use xsltproc
19048d623946Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no
19058d623946Smrg#
19068d623946Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
19078d623946Smrg#
19088d623946SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
19098d623946SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
19108d623946Smrg# Preserves the interface, should it be implemented later
19118d623946Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
19128d623946Smrgm4_define([_defopt], m4_default([$2], [auto]))
19138d623946SmrgAC_ARG_WITH(xsltproc,
19148d623946Smrg	AS_HELP_STRING([--with-xsltproc],
19158d623946Smrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
19168d623946Smrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
19178d623946Smrgm4_undefine([_defopt])
19183e72ca8cSmrg
19198d623946Smrgif test "x$use_xsltproc" = x"auto"; then
19208d623946Smrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
19218d623946Smrg   if test "x$XSLTPROC" = "x"; then
19228d623946Smrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
19238d623946Smrg	have_xsltproc=no
19248d623946Smrg   else
19258d623946Smrg        have_xsltproc=yes
19268d623946Smrg   fi
19278d623946Smrgelif test "x$use_xsltproc" = x"yes" ; then
19288d623946Smrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
19298d623946Smrg   if test "x$XSLTPROC" = "x"; then
19308d623946Smrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
19318d623946Smrg   fi
19328d623946Smrg   have_xsltproc=yes
19338d623946Smrgelif test "x$use_xsltproc" = x"no" ; then
19348d623946Smrg   if test "x$XSLTPROC" != "x"; then
19358d623946Smrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
19368d623946Smrg   fi
19378d623946Smrg   have_xsltproc=no
19388d623946Smrgelse
19398d623946Smrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
19403e72ca8cSmrgfi
1941ee3138f1Smrg
19428d623946SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
19438d623946Smrg]) # XORG_WITH_XSLTPROC
1944ee3138f1Smrg
19458d623946Smrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
19468d623946Smrg# ----------------------------------------
19478d623946Smrg# Minimum version: 1.15.0
19488d623946Smrg#
19498d623946Smrg# PERL (Practical Extraction and Report Language) is a language optimized for
19508d623946Smrg# scanning arbitrary text files, extracting information from those text files,
19518d623946Smrg# and printing reports based on that information.
19528d623946Smrg#
19538d623946Smrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
19548d623946Smrg#
19558d623946Smrg# Interface to module:
19568d623946Smrg# HAVE_PERL: used in makefiles to conditionally scan text files
19578d623946Smrg# PERL:	     returns the path of the perl program found
19588d623946Smrg#	     returns the path set by the user in the environment
19598d623946Smrg# --with-perl: 'yes' user instructs the module to use perl
19608d623946Smrg#	       'no' user instructs the module not to use perl
19618d623946Smrg# have_perl: returns yes if perl found in PATH or no
19628d623946Smrg#
19638d623946Smrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
19648d623946Smrg#
19658d623946SmrgAC_DEFUN([XORG_WITH_PERL],[
19668d623946SmrgAC_ARG_VAR([PERL], [Path to perl command])
19678d623946Smrg# Preserves the interface, should it be implemented later
19688d623946Smrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
19698d623946Smrgm4_define([_defopt], m4_default([$2], [auto]))
19708d623946SmrgAC_ARG_WITH(perl,
19718d623946Smrg	AS_HELP_STRING([--with-perl],
19728d623946Smrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
19738d623946Smrg	   [use_perl=$withval], [use_perl=]_defopt)
19748d623946Smrgm4_undefine([_defopt])
197534977a2fSmrg
19768d623946Smrgif test "x$use_perl" = x"auto"; then
19778d623946Smrg   AC_PATH_PROG([PERL], [perl])
19788d623946Smrg   if test "x$PERL" = "x"; then
19798d623946Smrg        AC_MSG_WARN([perl not found - cannot extract information and report])
19808d623946Smrg	have_perl=no
19818d623946Smrg   else
19828d623946Smrg        have_perl=yes
19833e72ca8cSmrg   fi
19848d623946Smrgelif test "x$use_perl" = x"yes" ; then
19858d623946Smrg   AC_PATH_PROG([PERL], [perl])
19868d623946Smrg   if test "x$PERL" = "x"; then
19878d623946Smrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
19888d623946Smrg   fi
19898d623946Smrg   have_perl=yes
19908d623946Smrgelif test "x$use_perl" = x"no" ; then
19918d623946Smrg   if test "x$PERL" != "x"; then
19928d623946Smrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
19938d623946Smrg   fi
19948d623946Smrg   have_perl=no
19953e72ca8cSmrgelse
19968d623946Smrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
19973e72ca8cSmrgfi
1998b425557eSmrg
19998d623946SmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
20008d623946Smrg]) # XORG_WITH_PERL
2001ee3138f1Smrg
20028d623946Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
20038d623946Smrg# ----------------
20048d623946Smrg# Minimum version: 1.5.0
20058d623946Smrg# Minimum version for optional DEFAULT argument: 1.11.0
20068d623946Smrg#
20078d623946Smrg# Documentation tools are not always available on all platforms and sometimes
20088d623946Smrg# not at the appropriate level. This macro enables a module to test for the
20098d623946Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
20108d623946Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
20118d623946Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
20128d623946Smrg# --with-asciidoc assumes 'auto'.
20138d623946Smrg#
20148d623946Smrg# Interface to module:
20158d623946Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
20168d623946Smrg# ASCIIDOC:	 returns the path of the asciidoc program found
20178d623946Smrg#		 returns the path set by the user in the environment
20188d623946Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
20198d623946Smrg#		  'no' user instructs the module not to use asciidoc
20208d623946Smrg#
20218d623946Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
20228d623946Smrg#
20238d623946SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
20248d623946SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
20258d623946Smrgm4_define([_defopt], m4_default([$2], [auto]))
20268d623946SmrgAC_ARG_WITH(asciidoc,
20278d623946Smrg	AS_HELP_STRING([--with-asciidoc],
20288d623946Smrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
20298d623946Smrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
20308d623946Smrgm4_undefine([_defopt])
203134977a2fSmrg
20328d623946Smrgif test "x$use_asciidoc" = x"auto"; then
20338d623946Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
20348d623946Smrg   if test "x$ASCIIDOC" = "x"; then
20358d623946Smrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
20368d623946Smrg	have_asciidoc=no
20378d623946Smrg   else
20388d623946Smrg        have_asciidoc=yes
20398d623946Smrg   fi
20408d623946Smrgelif test "x$use_asciidoc" = x"yes" ; then
20418d623946Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
20428d623946Smrg   if test "x$ASCIIDOC" = "x"; then
20438d623946Smrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
20448d623946Smrg   fi
20458d623946Smrg   have_asciidoc=yes
20468d623946Smrgelif test "x$use_asciidoc" = x"no" ; then
20478d623946Smrg   if test "x$ASCIIDOC" != "x"; then
20488d623946Smrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
20498d623946Smrg   fi
20508d623946Smrg   have_asciidoc=no
20513e72ca8cSmrgelse
20528d623946Smrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
20533e72ca8cSmrgfi
20548d623946Smrgm4_ifval([$1],
20558d623946Smrg[if test "$have_asciidoc" = yes; then
20568d623946Smrg    # scrape the asciidoc version
20578d623946Smrg    AC_MSG_CHECKING([the asciidoc version])
20588d623946Smrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
20598d623946Smrg    AC_MSG_RESULT([$asciidoc_version])
20608d623946Smrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
20618d623946Smrg        [if test "x$use_asciidoc" = xauto; then
20628d623946Smrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
20638d623946Smrg            have_asciidoc=no
20648d623946Smrg        else
20658d623946Smrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
20668d623946Smrg        fi])
20678d623946Smrgfi])
20688d623946SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
20698d623946Smrg]) # XORG_WITH_ASCIIDOC
2070ee3138f1Smrg
20718d623946Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
20728d623946Smrg# -------------------------------------------
20738d623946Smrg# Minimum version: 1.5.0
20748d623946Smrg# Minimum version for optional DEFAULT argument: 1.11.0
20758d623946Smrg# Minimum version for optional DOT checking: 1.18.0
20768d623946Smrg#
20778d623946Smrg# Documentation tools are not always available on all platforms and sometimes
20788d623946Smrg# not at the appropriate level. This macro enables a module to test for the
20798d623946Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
20808d623946Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
20818d623946Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
20828d623946Smrg# --with-doxygen assumes 'auto'.
20838d623946Smrg#
20848d623946Smrg# Interface to module:
20858d623946Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
20868d623946Smrg# DOXYGEN:	 returns the path of the doxygen program found
20878d623946Smrg#		 returns the path set by the user in the environment
20888d623946Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen
20898d623946Smrg#		  'no' user instructs the module not to use doxygen
20908d623946Smrg#
20918d623946Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
20928d623946Smrg#
20938d623946SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
20948d623946SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
20958d623946SmrgAC_ARG_VAR([DOT], [Path to the dot graphics utility])
20968d623946Smrgm4_define([_defopt], m4_default([$2], [auto]))
20978d623946SmrgAC_ARG_WITH(doxygen,
20988d623946Smrg	AS_HELP_STRING([--with-doxygen],
20998d623946Smrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
21008d623946Smrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
21018d623946Smrgm4_undefine([_defopt])
2102ee3138f1Smrg
21038d623946Smrgif test "x$use_doxygen" = x"auto"; then
21048d623946Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
21058d623946Smrg   if test "x$DOXYGEN" = "x"; then
21068d623946Smrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
21078d623946Smrg	have_doxygen=no
21088d623946Smrg   else
21098d623946Smrg        have_doxygen=yes
21108d623946Smrg   fi
21118d623946Smrgelif test "x$use_doxygen" = x"yes" ; then
21128d623946Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
21138d623946Smrg   if test "x$DOXYGEN" = "x"; then
21148d623946Smrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
21158d623946Smrg   fi
21168d623946Smrg   have_doxygen=yes
21178d623946Smrgelif test "x$use_doxygen" = x"no" ; then
21188d623946Smrg   if test "x$DOXYGEN" != "x"; then
21198d623946Smrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
21208d623946Smrg   fi
21218d623946Smrg   have_doxygen=no
21228d623946Smrgelse
21238d623946Smrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
21248d623946Smrgfi
21258d623946Smrgm4_ifval([$1],
21268d623946Smrg[if test "$have_doxygen" = yes; then
21278d623946Smrg    # scrape the doxygen version
21288d623946Smrg    AC_MSG_CHECKING([the doxygen version])
21298d623946Smrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
21308d623946Smrg    AC_MSG_RESULT([$doxygen_version])
21318d623946Smrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
21328d623946Smrg        [if test "x$use_doxygen" = xauto; then
21338d623946Smrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
21348d623946Smrg            have_doxygen=no
21358d623946Smrg        else
21368d623946Smrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
21378d623946Smrg        fi])
21388d623946Smrgfi])
2139ee3138f1Smrg
21408d623946Smrgdnl Check for DOT if we have doxygen. The caller decides if it is mandatory
21418d623946Smrgdnl HAVE_DOT is a variable that can be used in your doxygen.in config file:
21428d623946Smrgdnl 	HAVE_DOT = @HAVE_DOT@
21438d623946SmrgHAVE_DOT=no
21448d623946Smrgif test "x$have_doxygen" = "xyes"; then
21458d623946Smrg  AC_PATH_PROG([DOT], [dot])
21468d623946Smrg    if test "x$DOT" != "x"; then
21478d623946Smrg      HAVE_DOT=yes
21483e72ca8cSmrg    fi
21498d623946Smrgfi
21503e72ca8cSmrg
21518d623946SmrgAC_SUBST([HAVE_DOT])
21528d623946SmrgAM_CONDITIONAL([HAVE_DOT], [test "$HAVE_DOT" = "yes"])
21538d623946SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
21548d623946Smrg]) # XORG_WITH_DOXYGEN
21553e72ca8cSmrg
21568d623946Smrg# XORG_WITH_GROFF([DEFAULT])
21578d623946Smrg# ----------------
21588d623946Smrg# Minimum version: 1.6.0
21598d623946Smrg# Minimum version for optional DEFAULT argument: 1.11.0
21608d623946Smrg#
21618d623946Smrg# Documentation tools are not always available on all platforms and sometimes
21628d623946Smrg# not at the appropriate level. This macro enables a module to test for the
21638d623946Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
21648d623946Smrg# the --with-groff option, it allows maximum flexibilty in making decisions
21658d623946Smrg# as whether or not to use the groff package. When DEFAULT is not specified,
21668d623946Smrg# --with-groff assumes 'auto'.
21678d623946Smrg#
21688d623946Smrg# Interface to module:
21698d623946Smrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
21708d623946Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
21718d623946Smrg# HAVE_GROFF_MS: the -ms macros package
21728d623946Smrg# GROFF:	 returns the path of the groff program found
21738d623946Smrg#		 returns the path set by the user in the environment
21748d623946Smrg# --with-groff:	 'yes' user instructs the module to use groff
21758d623946Smrg#		 'no' user instructs the module not to use groff
21768d623946Smrg#
21778d623946Smrg# Added in version 1.9.0:
21788d623946Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
21798d623946Smrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
21808d623946Smrg#		   psselect from the psutils package.
21818d623946Smrg#		   the ghostcript package. Refer to the grohtml man pages
21828d623946Smrg#
21838d623946Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
21848d623946Smrg#
21858d623946Smrg# OS and distros often splits groff in a basic and full package, the former
21868d623946Smrg# having the groff program and the later having devices, fonts and macros
21878d623946Smrg# Checking for the groff executable is not enough.
21888d623946Smrg#
21898d623946Smrg# If macros are missing, we cannot assume that groff is useless, so we don't
21908d623946Smrg# unset HAVE_GROFF or GROFF env variables.
21918d623946Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
21928d623946Smrg#
21938d623946SmrgAC_DEFUN([XORG_WITH_GROFF],[
21948d623946SmrgAC_ARG_VAR([GROFF], [Path to groff command])
21958d623946Smrgm4_define([_defopt], m4_default([$1], [auto]))
21968d623946SmrgAC_ARG_WITH(groff,
21978d623946Smrg	AS_HELP_STRING([--with-groff],
21988d623946Smrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
21998d623946Smrg	   [use_groff=$withval], [use_groff=]_defopt)
22008d623946Smrgm4_undefine([_defopt])
22018d623946Smrg
22028d623946Smrgif test "x$use_groff" = x"auto"; then
22038d623946Smrg   AC_PATH_PROG([GROFF], [groff])
22048d623946Smrg   if test "x$GROFF" = "x"; then
22058d623946Smrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
22068d623946Smrg	have_groff=no
22078d623946Smrg   else
22088d623946Smrg        have_groff=yes
22098d623946Smrg   fi
22108d623946Smrgelif test "x$use_groff" = x"yes" ; then
22118d623946Smrg   AC_PATH_PROG([GROFF], [groff])
22128d623946Smrg   if test "x$GROFF" = "x"; then
22138d623946Smrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
22148d623946Smrg   fi
22158d623946Smrg   have_groff=yes
22168d623946Smrgelif test "x$use_groff" = x"no" ; then
22178d623946Smrg   if test "x$GROFF" != "x"; then
22188d623946Smrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
22198d623946Smrg   fi
22208d623946Smrg   have_groff=no
22213e72ca8cSmrgelse
22228d623946Smrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
22233e72ca8cSmrgfi
2224ee3138f1Smrg
22258d623946Smrg# We have groff, test for the presence of the macro packages
22268d623946Smrgif test "x$have_groff" = x"yes"; then
22278d623946Smrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
22288d623946Smrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
22298d623946Smrg        groff_ms_works=yes
22308d623946Smrg    else
22318d623946Smrg        groff_ms_works=no
22328d623946Smrg    fi
22338d623946Smrg    AC_MSG_RESULT([$groff_ms_works])
22348d623946Smrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
22358d623946Smrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
22368d623946Smrg        groff_mm_works=yes
22378d623946Smrg    else
22388d623946Smrg        groff_mm_works=no
22398d623946Smrg    fi
22408d623946Smrg    AC_MSG_RESULT([$groff_mm_works])
22418d623946Smrgfi
2242ee3138f1Smrg
22438d623946Smrg# We have groff, test for HTML dependencies, one command per package
22448d623946Smrgif test "x$have_groff" = x"yes"; then
22458d623946Smrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
22468d623946Smrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
22478d623946Smrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
22488d623946Smrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
22498d623946Smrg      have_groff_html=yes
22508d623946Smrg   else
22518d623946Smrg      have_groff_html=no
22528d623946Smrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
22538d623946Smrg   fi
22548d623946Smrgfi
2255ee3138f1Smrg
22568d623946Smrg# Set Automake conditionals for Makefiles
22578d623946SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
22588d623946SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
22598d623946SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
22608d623946SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
22618d623946Smrg]) # XORG_WITH_GROFF
2262ee3138f1Smrg
22638d623946Smrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
22648d623946Smrg# ---------------------------------------
22658d623946Smrg# Minimum version: 1.6.0
22668d623946Smrg# Minimum version for optional DEFAULT argument: 1.11.0
22678d623946Smrg# Minimum version for optional MIN-VERSION argument: 1.15.0
22688d623946Smrg#
22698d623946Smrg# Documentation tools are not always available on all platforms and sometimes
22708d623946Smrg# not at the appropriate level. This macro enables a module to test for the
22718d623946Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
22728d623946Smrg# the --with-fop option, it allows maximum flexibilty in making decisions
22738d623946Smrg# as whether or not to use the fop package. When DEFAULT is not specified,
22748d623946Smrg# --with-fop assumes 'auto'.
22758d623946Smrg#
22768d623946Smrg# Interface to module:
22778d623946Smrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
22788d623946Smrg# FOP:	 	returns the path of the fop program found
22798d623946Smrg#		returns the path set by the user in the environment
22808d623946Smrg# --with-fop: 	'yes' user instructs the module to use fop
22818d623946Smrg#		'no' user instructs the module not to use fop
22828d623946Smrg#
22838d623946Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
22848d623946Smrg#
22858d623946SmrgAC_DEFUN([XORG_WITH_FOP],[
22868d623946SmrgAC_ARG_VAR([FOP], [Path to fop command])
22878d623946Smrgm4_define([_defopt], m4_default([$2], [auto]))
22888d623946SmrgAC_ARG_WITH(fop,
22898d623946Smrg	AS_HELP_STRING([--with-fop],
22908d623946Smrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
22918d623946Smrg	   [use_fop=$withval], [use_fop=]_defopt)
22928d623946Smrgm4_undefine([_defopt])
2293ee3138f1Smrg
22948d623946Smrgif test "x$use_fop" = x"auto"; then
22958d623946Smrg   AC_PATH_PROG([FOP], [fop])
22968d623946Smrg   if test "x$FOP" = "x"; then
22978d623946Smrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
22988d623946Smrg	have_fop=no
22998d623946Smrg   else
23008d623946Smrg        have_fop=yes
23018d623946Smrg   fi
23028d623946Smrgelif test "x$use_fop" = x"yes" ; then
23038d623946Smrg   AC_PATH_PROG([FOP], [fop])
23048d623946Smrg   if test "x$FOP" = "x"; then
23058d623946Smrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
23068d623946Smrg   fi
23078d623946Smrg   have_fop=yes
23088d623946Smrgelif test "x$use_fop" = x"no" ; then
23098d623946Smrg   if test "x$FOP" != "x"; then
23108d623946Smrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
23118d623946Smrg   fi
23128d623946Smrg   have_fop=no
23133e72ca8cSmrgelse
23148d623946Smrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
23158d623946Smrgfi
2316ee3138f1Smrg
23178d623946Smrg# Test for a minimum version of fop, if provided.
23188d623946Smrgm4_ifval([$1],
23198d623946Smrg[if test "$have_fop" = yes; then
23208d623946Smrg    # scrape the fop version
23218d623946Smrg    AC_MSG_CHECKING([for fop minimum version])
23228d623946Smrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
23238d623946Smrg    AC_MSG_RESULT([$fop_version])
23248d623946Smrg    AS_VERSION_COMPARE([$fop_version], [$1],
23258d623946Smrg        [if test "x$use_fop" = xauto; then
23268d623946Smrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
23278d623946Smrg            have_fop=no
23288d623946Smrg        else
23298d623946Smrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
23308d623946Smrg        fi])
23318d623946Smrgfi])
23328d623946SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
23338d623946Smrg]) # XORG_WITH_FOP
2334ee3138f1Smrg
23358d623946Smrg# XORG_WITH_M4([MIN-VERSION])
23368d623946Smrg# ---------------------------
23378d623946Smrg# Minimum version: 1.19.0
23388d623946Smrg#
23398d623946Smrg# This macro attempts to locate an m4 macro processor which supports
23408d623946Smrg# -I option and is only useful for modules relying on M4 in order to
23418d623946Smrg# expand macros in source code files.
23428d623946Smrg#
23438d623946Smrg# Interface to module:
23448d623946Smrg# M4:	 	returns the path of the m4 program found
23458d623946Smrg#		returns the path set by the user in the environment
23468d623946Smrg#
23478d623946SmrgAC_DEFUN([XORG_WITH_M4], [
23488d623946SmrgAC_CACHE_CHECK([for m4 that supports -I option], [ac_cv_path_M4],
23498d623946Smrg   [AC_PATH_PROGS_FEATURE_CHECK([M4], [m4 gm4],
23508d623946Smrg       [[$ac_path_M4 -I. /dev/null > /dev/null 2>&1 && \
23518d623946Smrg         ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=:]],
23528d623946Smrg   [AC_MSG_ERROR([could not find m4 that supports -I option])],
23538d623946Smrg   [$PATH:/usr/gnu/bin])])
2354ee3138f1Smrg
23558d623946SmrgAC_SUBST([M4], [$ac_cv_path_M4])
23568d623946Smrg]) # XORG_WITH_M4
2357b425557eSmrg
23588d623946Smrg# XORG_WITH_PS2PDF([DEFAULT])
23598d623946Smrg# ----------------
23608d623946Smrg# Minimum version: 1.6.0
23618d623946Smrg# Minimum version for optional DEFAULT argument: 1.11.0
23628d623946Smrg#
23638d623946Smrg# Documentation tools are not always available on all platforms and sometimes
23648d623946Smrg# not at the appropriate level. This macro enables a module to test for the
23658d623946Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
23668d623946Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
23678d623946Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
23688d623946Smrg# --with-ps2pdf assumes 'auto'.
23698d623946Smrg#
23708d623946Smrg# Interface to module:
23718d623946Smrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
23728d623946Smrg# PS2PDF:	returns the path of the ps2pdf program found
23738d623946Smrg#		returns the path set by the user in the environment
23748d623946Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
23758d623946Smrg#		 'no' user instructs the module not to use ps2pdf
23768d623946Smrg#
23778d623946Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
23788d623946Smrg#
23798d623946SmrgAC_DEFUN([XORG_WITH_PS2PDF],[
23808d623946SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
23818d623946Smrgm4_define([_defopt], m4_default([$1], [auto]))
23828d623946SmrgAC_ARG_WITH(ps2pdf,
23838d623946Smrg	AS_HELP_STRING([--with-ps2pdf],
23848d623946Smrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
23858d623946Smrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
23868d623946Smrgm4_undefine([_defopt])
2387b425557eSmrg
23888d623946Smrgif test "x$use_ps2pdf" = x"auto"; then
23898d623946Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
23908d623946Smrg   if test "x$PS2PDF" = "x"; then
23918d623946Smrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
23928d623946Smrg	have_ps2pdf=no
23938d623946Smrg   else
23948d623946Smrg        have_ps2pdf=yes
23958d623946Smrg   fi
23968d623946Smrgelif test "x$use_ps2pdf" = x"yes" ; then
23978d623946Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
23988d623946Smrg   if test "x$PS2PDF" = "x"; then
23998d623946Smrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
24008d623946Smrg   fi
24018d623946Smrg   have_ps2pdf=yes
24028d623946Smrgelif test "x$use_ps2pdf" = x"no" ; then
24038d623946Smrg   if test "x$PS2PDF" != "x"; then
24048d623946Smrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
24058d623946Smrg   fi
24068d623946Smrg   have_ps2pdf=no
24073e72ca8cSmrgelse
24088d623946Smrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
24098d623946Smrgfi
24108d623946SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
24118d623946Smrg]) # XORG_WITH_PS2PDF
2412b425557eSmrg
24138d623946Smrg# XORG_ENABLE_DOCS (enable_docs=yes)
24148d623946Smrg# ----------------
24158d623946Smrg# Minimum version: 1.6.0
24168d623946Smrg#
24178d623946Smrg# Documentation tools are not always available on all platforms and sometimes
24188d623946Smrg# not at the appropriate level. This macro enables a builder to skip all
24198d623946Smrg# documentation targets except traditional man pages.
24208d623946Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
24218d623946Smrg# maximum flexibilty in controlling documentation building.
24228d623946Smrg# Refer to:
24238d623946Smrg# XORG_WITH_XMLTO         --with-xmlto
24248d623946Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
24258d623946Smrg# XORG_WITH_DOXYGEN       --with-doxygen
24268d623946Smrg# XORG_WITH_FOP           --with-fop
24278d623946Smrg# XORG_WITH_GROFF         --with-groff
24288d623946Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
24298d623946Smrg#
24308d623946Smrg# Interface to module:
24318d623946Smrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
24328d623946Smrg# --enable-docs: 'yes' user instructs the module to generate docs
24338d623946Smrg#		 'no' user instructs the module not to generate docs
24348d623946Smrg# parm1:	specify the default value, yes or no.
24358d623946Smrg#
24368d623946SmrgAC_DEFUN([XORG_ENABLE_DOCS],[
24378d623946Smrgm4_define([docs_default], m4_default([$1], [yes]))
24388d623946SmrgAC_ARG_ENABLE(docs,
24398d623946Smrg	AS_HELP_STRING([--enable-docs],
24408d623946Smrg	   [Enable building the documentation (default: ]docs_default[)]),
24418d623946Smrg	   [build_docs=$enableval], [build_docs=]docs_default)
24428d623946Smrgm4_undefine([docs_default])
24438d623946SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
24448d623946SmrgAC_MSG_CHECKING([whether to build documentation])
24458d623946SmrgAC_MSG_RESULT([$build_docs])
24468d623946Smrg]) # XORG_ENABLE_DOCS
24473e72ca8cSmrg
24488d623946Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
24498d623946Smrg# ----------------
24508d623946Smrg# Minimum version: 1.6.0
24518d623946Smrg#
24528d623946Smrg# This macro enables a builder to skip all developer documentation.
24538d623946Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
24548d623946Smrg# maximum flexibilty in controlling documentation building.
24558d623946Smrg# Refer to:
24568d623946Smrg# XORG_WITH_XMLTO         --with-xmlto
24578d623946Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
24588d623946Smrg# XORG_WITH_DOXYGEN       --with-doxygen
24598d623946Smrg# XORG_WITH_FOP           --with-fop
24608d623946Smrg# XORG_WITH_GROFF         --with-groff
24618d623946Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
24628d623946Smrg#
24638d623946Smrg# Interface to module:
24648d623946Smrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
24658d623946Smrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
24668d623946Smrg#			'no' user instructs the module not to generate developer docs
24678d623946Smrg# parm1:		specify the default value, yes or no.
24688d623946Smrg#
24698d623946SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
24708d623946Smrgm4_define([devel_default], m4_default([$1], [yes]))
24718d623946SmrgAC_ARG_ENABLE(devel-docs,
24728d623946Smrg	AS_HELP_STRING([--enable-devel-docs],
24738d623946Smrg	   [Enable building the developer documentation (default: ]devel_default[)]),
24748d623946Smrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
24758d623946Smrgm4_undefine([devel_default])
24768d623946SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
24778d623946SmrgAC_MSG_CHECKING([whether to build developer documentation])
24788d623946SmrgAC_MSG_RESULT([$build_devel_docs])
24798d623946Smrg]) # XORG_ENABLE_DEVEL_DOCS
24803e72ca8cSmrg
24818d623946Smrg# XORG_ENABLE_SPECS (enable_specs=yes)
24828d623946Smrg# ----------------
24838d623946Smrg# Minimum version: 1.6.0
24848d623946Smrg#
24858d623946Smrg# This macro enables a builder to skip all functional specification targets.
24868d623946Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
24878d623946Smrg# maximum flexibilty in controlling documentation building.
24888d623946Smrg# Refer to:
24898d623946Smrg# XORG_WITH_XMLTO         --with-xmlto
24908d623946Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
24918d623946Smrg# XORG_WITH_DOXYGEN       --with-doxygen
24928d623946Smrg# XORG_WITH_FOP           --with-fop
24938d623946Smrg# XORG_WITH_GROFF         --with-groff
24948d623946Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
24958d623946Smrg#
24968d623946Smrg# Interface to module:
24978d623946Smrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
24988d623946Smrg# --enable-specs:	'yes' user instructs the module to generate specs
24998d623946Smrg#			'no' user instructs the module not to generate specs
25008d623946Smrg# parm1:		specify the default value, yes or no.
25018d623946Smrg#
25028d623946SmrgAC_DEFUN([XORG_ENABLE_SPECS],[
25038d623946Smrgm4_define([spec_default], m4_default([$1], [yes]))
25048d623946SmrgAC_ARG_ENABLE(specs,
25058d623946Smrg	AS_HELP_STRING([--enable-specs],
25068d623946Smrg	   [Enable building the specs (default: ]spec_default[)]),
25078d623946Smrg	   [build_specs=$enableval], [build_specs=]spec_default)
25088d623946Smrgm4_undefine([spec_default])
25098d623946SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
25108d623946SmrgAC_MSG_CHECKING([whether to build functional specifications])
25118d623946SmrgAC_MSG_RESULT([$build_specs])
25128d623946Smrg]) # XORG_ENABLE_SPECS
25133e72ca8cSmrg
25148d623946Smrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
25158d623946Smrg# ----------------------------------------------
25168d623946Smrg# Minimum version: 1.13.0
25178d623946Smrg#
25188d623946Smrg# This macro enables a builder to enable/disable unit testing
25198d623946Smrg# It makes no assumption about the test cases implementation
25208d623946Smrg# Test cases may or may not use Automake "Support for test suites"
25218d623946Smrg# They may or may not use the software utility library GLib
25228d623946Smrg#
25238d623946Smrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
25248d623946Smrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
25258d623946Smrg# The variable enable_unit_tests is used by other macros in this file.
25268d623946Smrg#
25278d623946Smrg# Interface to module:
25288d623946Smrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
25298d623946Smrg# enable_unit_tests:    used in configure.ac for additional configuration
25308d623946Smrg# --enable-unit-tests:	'yes' user instructs the module to build tests
25318d623946Smrg#			'no' user instructs the module not to build tests
25328d623946Smrg# parm1:		specify the default value, yes or no.
25338d623946Smrg#
25348d623946SmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
25358d623946SmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
25368d623946SmrgAC_BEFORE([$0], [XORG_LD_WRAP])
25378d623946SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
25388d623946Smrgm4_define([_defopt], m4_default([$1], [auto]))
25398d623946SmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
25408d623946Smrg	[Enable building unit test cases (default: ]_defopt[)]),
25418d623946Smrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
25428d623946Smrgm4_undefine([_defopt])
25438d623946SmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
25448d623946SmrgAC_MSG_CHECKING([whether to build unit test cases])
25458d623946SmrgAC_MSG_RESULT([$enable_unit_tests])
25468d623946Smrg]) # XORG_ENABLE_UNIT_TESTS
2547ee3138f1Smrg
25488d623946Smrg# XORG_ENABLE_INTEGRATION_TESTS (enable_unit_tests=auto)
25498d623946Smrg# ------------------------------------------------------
25508d623946Smrg# Minimum version: 1.17.0
25518d623946Smrg#
25528d623946Smrg# This macro enables a builder to enable/disable integration testing
25538d623946Smrg# It makes no assumption about the test cases' implementation
25548d623946Smrg# Test cases may or may not use Automake "Support for test suites"
25558d623946Smrg#
25568d623946Smrg# Please see XORG_ENABLE_UNIT_TESTS for unit test support. Unit test support
25578d623946Smrg# usually requires less dependencies and may be built and run under less
25588d623946Smrg# stringent environments than integration tests.
25598d623946Smrg#
25608d623946Smrg# Interface to module:
25618d623946Smrg# ENABLE_INTEGRATION_TESTS:   used in makefiles to conditionally build tests
25628d623946Smrg# enable_integration_tests:   used in configure.ac for additional configuration
25638d623946Smrg# --enable-integration-tests: 'yes' user instructs the module to build tests
25648d623946Smrg#                             'no' user instructs the module not to build tests
25658d623946Smrg# parm1:                      specify the default value, yes or no.
25668d623946Smrg#
25678d623946SmrgAC_DEFUN([XORG_ENABLE_INTEGRATION_TESTS],[
25688d623946SmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
25698d623946Smrgm4_define([_defopt], m4_default([$1], [auto]))
25708d623946SmrgAC_ARG_ENABLE(integration-tests, AS_HELP_STRING([--enable-integration-tests],
25718d623946Smrg	[Enable building integration test cases (default: ]_defopt[)]),
25728d623946Smrg	[enable_integration_tests=$enableval],
25738d623946Smrg	[enable_integration_tests=]_defopt)
25748d623946Smrgm4_undefine([_defopt])
25758d623946SmrgAM_CONDITIONAL([ENABLE_INTEGRATION_TESTS],
25768d623946Smrg	[test "x$enable_integration_tests" != xno])
25778d623946SmrgAC_MSG_CHECKING([whether to build unit test cases])
25788d623946SmrgAC_MSG_RESULT([$enable_integration_tests])
25798d623946Smrg]) # XORG_ENABLE_INTEGRATION_TESTS
2580b425557eSmrg
25818d623946Smrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
25828d623946Smrg# ----------------------------------------
25838d623946Smrg# Minimum version: 1.13.0
25848d623946Smrg#
25858d623946Smrg# GLib is a library which provides advanced data structures and functions.
25868d623946Smrg# This macro enables a module to test for the presence of Glib.
25878d623946Smrg#
25888d623946Smrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
25898d623946Smrg# Otherwise the value of $enable_unit_tests is blank.
25908d623946Smrg#
25918d623946Smrg# Please see XORG_ENABLE_INTEGRATION_TESTS for integration test support. Unit
25928d623946Smrg# test support usually requires less dependencies and may be built and run under
25938d623946Smrg# less stringent environments than integration tests.
25948d623946Smrg#
25958d623946Smrg# Interface to module:
25968d623946Smrg# HAVE_GLIB: used in makefiles to conditionally build targets
25978d623946Smrg# with_glib: used in configure.ac to know if GLib has been found
25988d623946Smrg# --with-glib:	'yes' user instructs the module to use glib
25998d623946Smrg#		'no' user instructs the module not to use glib
26008d623946Smrg#
26018d623946SmrgAC_DEFUN([XORG_WITH_GLIB],[
26028d623946SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
26038d623946Smrgm4_define([_defopt], m4_default([$2], [auto]))
26048d623946SmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
26058d623946Smrg	[Use GLib library for unit testing (default: ]_defopt[)]),
26068d623946Smrg	[with_glib=$withval], [with_glib=]_defopt)
26078d623946Smrgm4_undefine([_defopt])
26083e72ca8cSmrg
26098d623946Smrghave_glib=no
26108d623946Smrg# Do not probe GLib if user explicitly disabled unit testing
26118d623946Smrgif test "x$enable_unit_tests" != x"no"; then
26128d623946Smrg  # Do not probe GLib if user explicitly disabled it
26138d623946Smrg  if test "x$with_glib" != x"no"; then
26148d623946Smrg    m4_ifval(
26158d623946Smrg      [$1],
26168d623946Smrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
26178d623946Smrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
26188d623946Smrg    )
26198d623946Smrg  fi
26208d623946Smrgfi
2621b425557eSmrg
26228d623946Smrg# Not having GLib when unit testing has been explicitly requested is an error
26238d623946Smrgif test "x$enable_unit_tests" = x"yes"; then
26248d623946Smrg  if test "x$have_glib" = x"no"; then
26258d623946Smrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
26268d623946Smrg  fi
26278d623946Smrgfi
2628b425557eSmrg
26298d623946Smrg# Having unit testing disabled when GLib has been explicitly requested is an error
26308d623946Smrgif test "x$enable_unit_tests" = x"no"; then
26318d623946Smrg  if test "x$with_glib" = x"yes"; then
26328d623946Smrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
26338d623946Smrg  fi
26343e72ca8cSmrgfi
2635b425557eSmrg
26368d623946Smrg# Not having GLib when it has been explicitly requested is an error
26378d623946Smrgif test "x$with_glib" = x"yes"; then
26388d623946Smrg  if test "x$have_glib" = x"no"; then
26398d623946Smrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
26408d623946Smrg  fi
26418d623946Smrgfi
2642b425557eSmrg
26438d623946SmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
26448d623946Smrg]) # XORG_WITH_GLIB
2645b425557eSmrg
26468d623946Smrg# XORG_LD_WRAP([required|optional])
26478d623946Smrg# ---------------------------------
26488d623946Smrg# Minimum version: 1.13.0
26498d623946Smrg#
26508d623946Smrg# Check if linker supports -wrap, passed via compiler flags
26518d623946Smrg#
26528d623946Smrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
26538d623946Smrg# Otherwise the value of $enable_unit_tests is blank.
26548d623946Smrg#
26558d623946Smrg# Argument added in 1.16.0 - default is "required", to match existing behavior
26568d623946Smrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
26578d623946Smrg# available, an argument of "optional" allows use when some unit tests require
26588d623946Smrg# ld -wrap and others do not.
26598d623946Smrg#
26608d623946SmrgAC_DEFUN([XORG_LD_WRAP],[
26618d623946SmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
26628d623946Smrg    [AC_LANG_PROGRAM([#include <stdlib.h>
26638d623946Smrg                      void __wrap_exit(int status) { return; }],
26648d623946Smrg                     [exit(0);])])
26658d623946Smrg# Not having ld wrap when unit testing has been explicitly requested is an error
26668d623946Smrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
26678d623946Smrg  if test "x$have_ld_wrap" = x"no"; then
26688d623946Smrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
26698d623946Smrg  fi
26708d623946Smrgfi
26718d623946SmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
26728d623946Smrg#
26738d623946Smrg]) # XORG_LD_WRAP
2674a1ed278cSmrg
26758d623946Smrg# XORG_CHECK_LINKER_FLAGS
26768d623946Smrg# -----------------------
26778d623946Smrg# SYNOPSIS
26788d623946Smrg#
26798d623946Smrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
26808d623946Smrg#
26818d623946Smrg# DESCRIPTION
26828d623946Smrg#
26838d623946Smrg#   Check whether the given linker FLAGS work with the current language's
26848d623946Smrg#   linker, or whether they give an error.
26858d623946Smrg#
26868d623946Smrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
26878d623946Smrg#   success/failure.
26888d623946Smrg#
26898d623946Smrg#   PROGRAM-SOURCE is the program source to link with, if needed
26908d623946Smrg#
26918d623946Smrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
26928d623946Smrg#
26938d623946Smrg# LICENSE
26948d623946Smrg#
26958d623946Smrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
26968d623946Smrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
26978d623946Smrg#   Copyright (c) 2009 Matteo Frigo
26988d623946Smrg#
26998d623946Smrg#   This program is free software: you can redistribute it and/or modify it
27008d623946Smrg#   under the terms of the GNU General Public License as published by the
27018d623946Smrg#   Free Software Foundation, either version 3 of the License, or (at your
27028d623946Smrg#   option) any later version.
27038d623946Smrg#
27048d623946Smrg#   This program is distributed in the hope that it will be useful, but
27058d623946Smrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
27068d623946Smrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
27078d623946Smrg#   Public License for more details.
27088d623946Smrg#
27098d623946Smrg#   You should have received a copy of the GNU General Public License along
27108d623946Smrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
27118d623946Smrg#
27128d623946Smrg#   As a special exception, the respective Autoconf Macro's copyright owner
27138d623946Smrg#   gives unlimited permission to copy, distribute and modify the configure
27148d623946Smrg#   scripts that are the output of Autoconf when processing the Macro. You
27158d623946Smrg#   need not follow the terms of the GNU General Public License when using
27168d623946Smrg#   or distributing such scripts, even though portions of the text of the
27178d623946Smrg#   Macro appear in them. The GNU General Public License (GPL) does govern
27188d623946Smrg#   all other use of the material that constitutes the Autoconf Macro.
27198d623946Smrg#
27208d623946Smrg#   This special exception to the GPL applies to versions of the Autoconf
27218d623946Smrg#   Macro released by the Autoconf Archive. When you make and distribute a
27228d623946Smrg#   modified version of the Autoconf Macro, you may extend this special
27238d623946Smrg#   exception to the GPL to apply to your modified version as well.#
27248d623946SmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
27258d623946Smrg[AC_MSG_CHECKING([whether the linker accepts $1])
27268d623946Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
27278d623946SmrgAS_LITERAL_IF([$1],
27288d623946Smrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
27298d623946Smrg      ax_save_FLAGS=$LDFLAGS
27308d623946Smrg      LDFLAGS="$1"
27318d623946Smrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
27328d623946Smrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
27338d623946Smrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
27348d623946Smrg      LDFLAGS=$ax_save_FLAGS])],
27358d623946Smrg  [ax_save_FLAGS=$LDFLAGS
27368d623946Smrg   LDFLAGS="$1"
27378d623946Smrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
27388d623946Smrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
27398d623946Smrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
27408d623946Smrg   LDFLAGS=$ax_save_FLAGS])
27418d623946Smrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
27428d623946SmrgAC_MSG_RESULT($xorg_check_linker_flags)
27438d623946Smrgif test "x$xorg_check_linker_flags" = xyes; then
27448d623946Smrg	m4_default([$2], :)
27453e72ca8cSmrgelse
27468d623946Smrg	m4_default([$3], :)
27473e72ca8cSmrgfi
27488d623946Smrg]) # XORG_CHECK_LINKER_FLAGS
27498d623946Smrg
27508d623946Smrg# XORG_MEMORY_CHECK_FLAGS
27518d623946Smrg# -----------------------
27528d623946Smrg# Minimum version: 1.16.0
27538d623946Smrg#
27548d623946Smrg# This macro attempts to find appropriate memory checking functionality
27558d623946Smrg# for various platforms which unit testing code may use to catch various
27568d623946Smrg# forms of memory allocation and access errors in testing.
27578d623946Smrg#
27588d623946Smrg# Interface to module:
27598d623946Smrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
27608d623946Smrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
27618d623946Smrg#
27628d623946Smrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
27638d623946Smrg#
27648d623946SmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
2765b425557eSmrg
27668d623946SmrgAC_REQUIRE([AC_CANONICAL_HOST])
27678d623946SmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
27688d623946Smrg           [Environment variables to enable memory checking in tests])
2769a1ed278cSmrg
27708d623946Smrg# Check for different types of support on different platforms
27718d623946Smrgcase $host_os in
27728d623946Smrg    solaris*)
27738d623946Smrg        AC_CHECK_LIB([umem], [umem_alloc],
27748d623946Smrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
27758d623946Smrg        ;;
27768d623946Smrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
27778d623946Smrg        # both directly and inverted, so should not be 0 or 255.
27788d623946Smrg        malloc_debug_env='MALLOC_PERTURB_=15'
27798d623946Smrg        ;;
27808d623946Smrg    darwin*)
27818d623946Smrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
27828d623946Smrg        ;;
27838d623946Smrg    *bsd*)
27848d623946Smrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
27858d623946Smrg        ;;
27868d623946Smrgesac
27878d623946Smrg
27888d623946Smrg# User supplied flags override default flags
27898d623946Smrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
27908d623946Smrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
27913e72ca8cSmrgfi
2792a1ed278cSmrg
27938d623946SmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
27948d623946Smrg]) # XORG_WITH_LINT
27953e72ca8cSmrg
27968d623946Smrg# XORG_CHECK_MALLOC_ZERO
27978d623946Smrg# ----------------------
27988d623946Smrg# Minimum version: 1.0.0
27998d623946Smrg#
28008d623946Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
28018d623946Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
28028d623946Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
28038d623946SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
28048d623946SmrgAC_ARG_ENABLE(malloc0returnsnull,
28058d623946Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
28068d623946Smrg		       [malloc(0) returns NULL (default: auto)]),
28078d623946Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
28088d623946Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
28093e72ca8cSmrg
28108d623946SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
28118d623946Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
28128d623946SmrgAC_CACHE_VAL([xorg_cv_malloc0_returns_null],
28138d623946Smrg	[AC_RUN_IFELSE([AC_LANG_PROGRAM([
28148d623946Smrg#include <stdlib.h>
28158d623946Smrg],[
28168d623946Smrg    char *m0, *r0, *c0, *p;
28178d623946Smrg    m0 = malloc(0);
28188d623946Smrg    p = malloc(10);
28198d623946Smrg    r0 = realloc(p,0);
28208d623946Smrg    c0 = calloc(0,10);
28218d623946Smrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
28228d623946Smrg])],
28238d623946Smrg		[xorg_cv_malloc0_returns_null=yes],
28248d623946Smrg		[xorg_cv_malloc0_returns_null=no])])
28258d623946SmrgMALLOC_ZERO_RETURNS_NULL=$xorg_cv_malloc0_returns_null
28268d623946Smrgfi
28278d623946SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
28288d623946Smrg
28298d623946Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
28308d623946Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
28318d623946Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
28328d623946Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
28333e72ca8cSmrgelse
28348d623946Smrg	MALLOC_ZERO_CFLAGS=""
28358d623946Smrg	XMALLOC_ZERO_CFLAGS=""
28368d623946Smrg	XTMALLOC_ZERO_CFLAGS=""
28373e72ca8cSmrgfi
283834977a2fSmrg
28398d623946SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
28408d623946SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
28418d623946SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
28428d623946Smrg]) # XORG_CHECK_MALLOC_ZERO
284334977a2fSmrg
28448d623946Smrg# XORG_WITH_LINT()
28453e72ca8cSmrg# ----------------
28468d623946Smrg# Minimum version: 1.1.0
28478d623946Smrg#
28488d623946Smrg# This macro enables the use of a tool that flags some suspicious and
28498d623946Smrg# non-portable constructs (likely to be bugs) in C language source code.
28508d623946Smrg# It will attempt to locate the tool and use appropriate options.
28518d623946Smrg# There are various lint type tools on different platforms.
28528d623946Smrg#
28538d623946Smrg# Interface to module:
28548d623946Smrg# LINT:		returns the path to the tool found on the platform
28558d623946Smrg#		or the value set to LINT on the configure cmd line
28568d623946Smrg#		also an Automake conditional
28578d623946Smrg# LINT_FLAGS:	an Automake variable with appropriate flags
28588d623946Smrg#
28598d623946Smrg# --with-lint:	'yes' user instructs the module to use lint
28608d623946Smrg#		'no' user instructs the module not to use lint (default)
28618d623946Smrg#
28628d623946Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
28638d623946Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
28648d623946Smrg#
28658d623946SmrgAC_DEFUN([XORG_WITH_LINT],[
2866ee3138f1Smrg
28678d623946SmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
28688d623946SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
28698d623946SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
28708d623946Smrg		[Use a lint-style source code checker (default: disabled)])],
28718d623946Smrg		[use_lint=$withval], [use_lint=no])
2872fe24f8a2Smrg
28738d623946Smrg# Obtain platform specific info like program name and options
28748d623946Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
28758d623946Smrgcase $host_os in
28768d623946Smrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
28778d623946Smrg	lint_name=splint
28788d623946Smrg	lint_options="-badflag"
28798d623946Smrg	;;
28808d623946Smrg  *freebsd* | *netbsd*)
28818d623946Smrg	lint_name=lint
28828d623946Smrg	lint_options="-u -b"
28838d623946Smrg	;;
28848d623946Smrg  *solaris*)
28858d623946Smrg	lint_name=lint
28868d623946Smrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
28878d623946Smrg	;;
28888d623946Smrgesac
2889fe24f8a2Smrg
28908d623946Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
28918d623946Smrgif test "x$use_lint" = x"yes" ; then
28928d623946Smrg   AC_PATH_PROG([LINT], [$lint_name])
28938d623946Smrg   if test "x$LINT" = "x"; then
28948d623946Smrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
28958d623946Smrg   fi
28968d623946Smrgelif test "x$use_lint" = x"no" ; then
28978d623946Smrg   if test "x$LINT" != "x"; then
28988d623946Smrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
28998d623946Smrg   fi
29003e72ca8cSmrgelse
29018d623946Smrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
29028d623946Smrgfi
2903ee3138f1Smrg
29048d623946Smrg# User supplied flags override default flags
29058d623946Smrgif test "x$LINT_FLAGS" != "x"; then
29068d623946Smrg   lint_options=$LINT_FLAGS
29078d623946Smrgfi
2908fe24f8a2Smrg
29098d623946SmrgAC_SUBST([LINT_FLAGS],[$lint_options])
29108d623946SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
2911ee3138f1Smrg
29128d623946Smrg]) # XORG_WITH_LINT
2913ee3138f1Smrg
29148d623946Smrg# XORG_LINT_LIBRARY(LIBNAME)
29158d623946Smrg# --------------------------
29168d623946Smrg# Minimum version: 1.1.0
29178d623946Smrg#
29188d623946Smrg# Sets up flags for building lint libraries for checking programs that call
29198d623946Smrg# functions in the library.
29208d623946Smrg#
29218d623946Smrg# Interface to module:
29228d623946Smrg# LINTLIB		- Automake variable with the name of lint library file to make
29238d623946Smrg# MAKE_LINT_LIB		- Automake conditional
29248d623946Smrg#
29258d623946Smrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
29268d623946Smrg#			  - 'no' user instructs the module not to create a lint library (default)
2927fe24f8a2Smrg
29288d623946SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
29298d623946SmrgAC_REQUIRE([XORG_WITH_LINT])
29308d623946SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
29318d623946Smrg	[Create lint library (default: disabled)])],
29328d623946Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
2933ee3138f1Smrg
29348d623946Smrgif test "x$make_lint_lib" = x"yes" ; then
29358d623946Smrg   LINTLIB=llib-l$1.ln
29368d623946Smrg   if test "x$LINT" = "x"; then
29378d623946Smrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
29388d623946Smrg   fi
29398d623946Smrgelif test "x$make_lint_lib" != x"no" ; then
29408d623946Smrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
29418d623946Smrgfi
2942ee3138f1Smrg
29438d623946SmrgAC_SUBST(LINTLIB)
29448d623946SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
2945ee3138f1Smrg
29468d623946Smrg]) # XORG_LINT_LIBRARY
2947ee3138f1Smrg
29488d623946Smrg# XORG_COMPILER_BRAND
29498d623946Smrg# -------------------
29508d623946Smrg# Minimum version: 1.14.0
29518d623946Smrg#
29528d623946Smrg# Checks for various brands of compilers and sets flags as appropriate:
29538d623946Smrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
29548d623946Smrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
29558d623946Smrg#   clang compiler - sets CLANGCC to "yes"
29568d623946Smrg#   Intel compiler - sets INTELCC to "yes"
29578d623946Smrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
29588d623946Smrg#
29598d623946SmrgAC_DEFUN([XORG_COMPILER_BRAND], [
29608d623946SmrgAC_LANG_CASE(
29618d623946Smrg	[C], [
29628d623946Smrg		AC_REQUIRE([AC_PROG_CC_C99])
29638d623946Smrg	],
29648d623946Smrg	[C++], [
29658d623946Smrg		AC_REQUIRE([AC_PROG_CXX])
29668d623946Smrg	]
29678d623946Smrg)
29688d623946SmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
29698d623946SmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
29708d623946SmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
29718d623946Smrg]) # XORG_COMPILER_BRAND
2972ee3138f1Smrg
29738d623946Smrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
29748d623946Smrg# ---------------
29758d623946Smrg# Minimum version: 1.16.0
29768d623946Smrg#
29778d623946Smrg# Test if the compiler works when passed the given flag as a command line argument.
29788d623946Smrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
29798d623946Smrg# next flag in the list until there are no more options.
29808d623946Smrg#
29818d623946Smrg# Note that this does not guarantee that the compiler supports the flag as some
29828d623946Smrg# compilers will simply ignore arguments that they do not understand, but we do
29838d623946Smrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
29848d623946Smrg# -Werror=unused-command-line-argument
29858d623946Smrg#
29868d623946SmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
29878d623946Smrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
29888d623946Smrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
29893e72ca8cSmrg
29908d623946SmrgAC_LANG_COMPILER_REQUIRE
29913e72ca8cSmrg
29928d623946SmrgAC_LANG_CASE(
29938d623946Smrg	[C], [
29948d623946Smrg		AC_REQUIRE([AC_PROG_CC_C99])
29958d623946Smrg		define([PREFIX], [C])
29968d623946Smrg		define([CACHE_PREFIX], [cc])
29978d623946Smrg		define([COMPILER], [$CC])
29988d623946Smrg	],
29998d623946Smrg	[C++], [
30008d623946Smrg		define([PREFIX], [CXX])
30018d623946Smrg		define([CACHE_PREFIX], [cxx])
30028d623946Smrg		define([COMPILER], [$CXX])
30038d623946Smrg	]
30048d623946Smrg)
30053e72ca8cSmrg
30068d623946Smrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
30073e72ca8cSmrg
30088d623946Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "x" ; then
30098d623946Smrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
30108d623946Smrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unknown-warning-option],
30118d623946Smrg			[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option],
30128d623946Smrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
30138d623946Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=yes],
30148d623946Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option=no]))
30158d623946Smrg	[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]=$[xorg_cv_]CACHE_PREFIX[_flag_unknown_warning_option]
30168d623946Smrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
30178d623946Smrgfi
30183e72ca8cSmrg
30198d623946Smrgif test "x$[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]" = "x" ; then
30208d623946Smrg	if test "x$[xorg_testset_]CACHE_PREFIX[_unknown_warning_option]" = "xyes" ; then
30218d623946Smrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
30228d623946Smrg	fi
30238d623946Smrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
30248d623946Smrg	AC_CACHE_CHECK([if ]COMPILER[ supports -Werror=unused-command-line-argument],
30258d623946Smrg			[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument],
30268d623946Smrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
30278d623946Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=yes],
30288d623946Smrg					  [xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument=no]))
30298d623946Smrg	[xorg_testset_]CACHE_PREFIX[_unused_command_line_argument]=$[xorg_cv_]CACHE_PREFIX[_flag_unused_command_line_argument]
30308d623946Smrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
30318d623946Smrgfi
3032ee3138f1Smrg
30338d623946Smrgfound="no"
30348d623946Smrgm4_foreach([flag], m4_cdr($@), [
30358d623946Smrg	if test $found = "no" ; then
30368d623946Smrg		if test "x$xorg_testset_]CACHE_PREFIX[_unknown_warning_option" = "xyes" ; then
30378d623946Smrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
30388d623946Smrg		fi
3039ee3138f1Smrg
30408d623946Smrg		if test "x$xorg_testset_]CACHE_PREFIX[_unused_command_line_argument" = "xyes" ; then
30418d623946Smrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
30428d623946Smrg		fi
3043ee3138f1Smrg
30448d623946Smrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
3045ee3138f1Smrg
30468d623946Smrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
30478d623946Smrg		AC_MSG_CHECKING([if ]COMPILER[ supports ]flag[])
30488d623946Smrg		cacheid=AS_TR_SH([xorg_cv_]CACHE_PREFIX[_flag_]flag[])
30498d623946Smrg		AC_CACHE_VAL($cacheid,
30508d623946Smrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
30518d623946Smrg					     [eval $cacheid=yes],
30528d623946Smrg					     [eval $cacheid=no])])
3053ee3138f1Smrg
30548d623946Smrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
30553e72ca8cSmrg
30568d623946Smrg		eval supported=\$$cacheid
30578d623946Smrg		AC_MSG_RESULT([$supported])
30588d623946Smrg		if test "$supported" = "yes" ; then
30598d623946Smrg			$1="$$1 ]flag["
30608d623946Smrg			found="yes"
30618d623946Smrg		fi
30628d623946Smrg	fi
30638d623946Smrg])
30648d623946Smrg]) # XORG_TESTSET_CFLAG
30653e72ca8cSmrg
30668d623946Smrg# XORG_COMPILER_FLAGS
30678d623946Smrg# ---------------
30688d623946Smrg# Minimum version: 1.16.0
30698d623946Smrg#
30708d623946Smrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
30718d623946Smrg# arguments supported by the selected compiler which do NOT alter the generated
30728d623946Smrg# code.  These arguments will cause the compiler to print various warnings
30738d623946Smrg# during compilation AND turn a conservative set of warnings into errors.
30748d623946Smrg#
30758d623946Smrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
30768d623946Smrg# future versions of util-macros as options are added to new compilers.
30778d623946Smrg#
30788d623946SmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
30798d623946SmrgAC_REQUIRE([XORG_COMPILER_BRAND])
30803e72ca8cSmrg
30818d623946SmrgAC_ARG_ENABLE(selective-werror,
30828d623946Smrg              AS_HELP_STRING([--disable-selective-werror],
30838d623946Smrg                             [Turn off selective compiler errors. (default: enabled)]),
30848d623946Smrg              [SELECTIVE_WERROR=$enableval],
30858d623946Smrg              [SELECTIVE_WERROR=yes])
3086ee3138f1Smrg
30878d623946SmrgAC_LANG_CASE(
30888d623946Smrg        [C], [
30898d623946Smrg                define([PREFIX], [C])
30908d623946Smrg        ],
30918d623946Smrg        [C++], [
30928d623946Smrg                define([PREFIX], [CXX])
30938d623946Smrg        ]
30948d623946Smrg)
30958d623946Smrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
30968d623946Smrgif test "x$SUNCC" = "xyes"; then
30978d623946Smrg    [BASE_]PREFIX[FLAGS]="-v"
30988d623946Smrgelse
30998d623946Smrg    [BASE_]PREFIX[FLAGS]=""
31008d623946Smrgfi
3101fe24f8a2Smrg
31028d623946Smrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
31038d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
31048d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
31058d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
31068d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
3107fe24f8a2Smrg
31088d623946SmrgAC_LANG_CASE(
31098d623946Smrg	[C], [
31108d623946Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
31118d623946Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
31128d623946Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
31138d623946Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
31148d623946Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition], [-fd])
31158d623946Smrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
31168d623946Smrg	]
31178d623946Smrg)
3118fe24f8a2Smrg
31198d623946Smrg# This chunk adds additional warnings that could catch undesired effects.
31208d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
31218d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
31228d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
31238d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
31248d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
31258d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
31268d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
3127ee3138f1Smrg
31288d623946Smrg# These are currently disabled because they are noisy.  They will be enabled
31298d623946Smrg# in the future once the codebase is sufficiently modernized to silence
31308d623946Smrg# them.  For now, I don't want them to drown out the other warnings.
31318d623946Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
31328d623946Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
31338d623946Smrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
313434977a2fSmrg
31358d623946Smrg# Turn some warnings into errors, so we don't accidently get successful builds
31368d623946Smrg# when there are problems that should be fixed.
3137ee3138f1Smrg
31388d623946Smrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
31398d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
31408d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
31418d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
31428d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
31438d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
31448d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
31458d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
31468d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
31478d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
31488d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
31498d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
31508d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
31518d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
31528d623946Smrgelse
31538d623946SmrgAC_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])
31548d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
31558d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
31568d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
31578d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
31588d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
31598d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
31608d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
31618d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
31628d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
31638d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
31648d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
31658d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
31668d623946SmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
31678d623946Smrgfi
3168ee3138f1Smrg
31698d623946SmrgAC_SUBST([BASE_]PREFIX[FLAGS])
31708d623946Smrg]) # XORG_COMPILER_FLAGS
3171ee3138f1Smrg
31728d623946Smrg# XORG_CWARNFLAGS
31738d623946Smrg# ---------------
31748d623946Smrg# Minimum version: 1.2.0
31758d623946Smrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
31768d623946Smrg#
31778d623946Smrg# Defines CWARNFLAGS to enable C compiler warnings.
31788d623946Smrg#
31798d623946Smrg# This function is deprecated because it defines -fno-strict-aliasing
31808d623946Smrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
31818d623946Smrg# is needed, then it should be added explicitly in the module when
31828d623946Smrg# it is updated to use BASE_CFLAGS.
31838d623946Smrg#
31848d623946SmrgAC_DEFUN([XORG_CWARNFLAGS], [
31858d623946SmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
31868d623946SmrgAC_REQUIRE([XORG_COMPILER_BRAND])
31878d623946SmrgAC_LANG_CASE(
31888d623946Smrg	[C], [
31898d623946Smrg		CWARNFLAGS="$BASE_CFLAGS"
31908d623946Smrg		if  test "x$GCC" = xyes ; then
31918d623946Smrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
31928d623946Smrg		fi
31938d623946Smrg		AC_SUBST(CWARNFLAGS)
31948d623946Smrg	]
31958d623946Smrg)
31968d623946Smrg]) # XORG_CWARNFLAGS
31973e72ca8cSmrg
31988d623946Smrg# XORG_STRICT_OPTION
31998d623946Smrg# -----------------------
32008d623946Smrg# Minimum version: 1.3.0
32018d623946Smrg#
32028d623946Smrg# Add configure option to enable strict compilation flags, such as treating
32038d623946Smrg# warnings as fatal errors.
32048d623946Smrg# If --enable-strict-compilation is passed to configure, adds strict flags to
32058d623946Smrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
32068d623946Smrg#
32078d623946Smrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
32088d623946Smrg# when strict compilation is unconditionally desired.
32098d623946SmrgAC_DEFUN([XORG_STRICT_OPTION], [
32108d623946SmrgAC_REQUIRE([XORG_CWARNFLAGS])
32118d623946SmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
3212ee3138f1Smrg
32138d623946SmrgAC_ARG_ENABLE(strict-compilation,
32148d623946Smrg			  AS_HELP_STRING([--enable-strict-compilation],
32158d623946Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
32168d623946Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
3217ee3138f1Smrg
32188d623946SmrgAC_LANG_CASE(
32198d623946Smrg        [C], [
32208d623946Smrg                define([PREFIX], [C])
32218d623946Smrg        ],
32228d623946Smrg        [C++], [
32238d623946Smrg                define([PREFIX], [CXX])
32248d623946Smrg        ]
32258d623946Smrg)
3226ee3138f1Smrg
32278d623946Smrg[STRICT_]PREFIX[FLAGS]=""
32288d623946SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
32298d623946SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
3230ee3138f1Smrg
32318d623946Smrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
32328d623946Smrg# activate it with -Werror, so we add it here explicitly.
32338d623946SmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
3234ee3138f1Smrg
32358d623946Smrgif test "x$STRICT_COMPILE" = "xyes"; then
32368d623946Smrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
32378d623946Smrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
32388d623946Smrgfi
32398d623946SmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
32408d623946SmrgAC_SUBST([BASE_]PREFIX[FLAGS])
32418d623946SmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
32428d623946Smrg]) # XORG_STRICT_OPTION
3243ee3138f1Smrg
32448d623946Smrg# XORG_DEFAULT_OPTIONS
32458d623946Smrg# --------------------
32468d623946Smrg# Minimum version: 1.3.0
32478d623946Smrg#
32488d623946Smrg# Defines default options for X.Org modules.
32498d623946Smrg#
32508d623946SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
32518d623946SmrgAC_REQUIRE([AC_PROG_INSTALL])
32528d623946SmrgXORG_COMPILER_FLAGS
32538d623946SmrgXORG_CWARNFLAGS
32548d623946SmrgXORG_STRICT_OPTION
32558d623946SmrgXORG_RELEASE_VERSION
32568d623946SmrgXORG_CHANGELOG
32578d623946SmrgXORG_INSTALL
32588d623946SmrgXORG_MANPAGE_SECTIONS
32598d623946Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
32608d623946Smrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
32618d623946Smrg]) # XORG_DEFAULT_OPTIONS
3262ee3138f1Smrg
32638d623946Smrg# XORG_INSTALL()
32648d623946Smrg# ----------------
32658d623946Smrg# Minimum version: 1.4.0
32668d623946Smrg#
32678d623946Smrg# Defines the variable INSTALL_CMD as the command to copy
32688d623946Smrg# INSTALL from $prefix/share/util-macros.
32698d623946Smrg#
32708d623946SmrgAC_DEFUN([XORG_INSTALL], [
32718d623946SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
32728d623946Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
32738d623946SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
32748d623946Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
32758d623946Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; test -e \$(top_srcdir)/INSTALL || ( \
32768d623946Smrgtouch \$(top_srcdir)/INSTALL; \
32778d623946Smrgecho 'failed to copy INSTALL from util-macros: installing empty INSTALL.' >&2))"
32788d623946SmrgAC_SUBST([INSTALL_CMD])
32798d623946Smrg]) # XORG_INSTALL
32808d623946Smrgdnl Copyright 2005 Red Hat, Inc
32818d623946Smrgdnl
32828d623946Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
32838d623946Smrgdnl documentation for any purpose is hereby granted without fee, provided that
32848d623946Smrgdnl the above copyright notice appear in all copies and that both that
32858d623946Smrgdnl copyright notice and this permission notice appear in supporting
32868d623946Smrgdnl documentation.
32878d623946Smrgdnl
32888d623946Smrgdnl The above copyright notice and this permission notice shall be included
32898d623946Smrgdnl in all copies or substantial portions of the Software.
32908d623946Smrgdnl
32918d623946Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
32928d623946Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
32938d623946Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
32948d623946Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
32958d623946Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
32968d623946Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
32978d623946Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
32988d623946Smrgdnl
32998d623946Smrgdnl Except as contained in this notice, the name of the copyright holders shall
33008d623946Smrgdnl not be used in advertising or otherwise to promote the sale, use or
33018d623946Smrgdnl other dealings in this Software without prior written authorization
33028d623946Smrgdnl from the copyright holders.
33038d623946Smrgdnl
3304a1ed278cSmrg
33058d623946Smrg# XORG_RELEASE_VERSION
33068d623946Smrg# --------------------
33078d623946Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
3308a1ed278cSmrg
33098d623946SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
33108d623946Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
33118d623946Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
33128d623946Smrg		[Major version of this package])
33138d623946Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
33148d623946Smrg	if test "x$PVM" = "x"; then
33158d623946Smrg		PVM="0"
33168d623946Smrg	fi
33178d623946Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
33188d623946Smrg		[$PVM],
33198d623946Smrg		[Minor version of this package])
33208d623946Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
33218d623946Smrg	if test "x$PVP" = "x"; then
33228d623946Smrg		PVP="0"
33238d623946Smrg	fi
33248d623946Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
33258d623946Smrg		[$PVP],
33268d623946Smrg		[Patch version of this package])
33278d623946Smrg])
33283e72ca8cSmrg
33298d623946Smrg# XORG_CHANGELOG()
33308d623946Smrg# ----------------
33318d623946Smrg# Minimum version: 1.2.0
33328d623946Smrg#
33338d623946Smrg# Defines the variable CHANGELOG_CMD as the command to generate
33348d623946Smrg# ChangeLog from git.
33358d623946Smrg#
33368d623946Smrg#
33378d623946SmrgAC_DEFUN([XORG_CHANGELOG], [
33388d623946SmrgCHANGELOG_CMD="((GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp) 2>/dev/null && \
33398d623946Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
33408d623946Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; test -e \$(top_srcdir)/ChangeLog || ( \
33418d623946Smrgtouch \$(top_srcdir)/ChangeLog; \
33428d623946Smrgecho 'git failed to create ChangeLog: installing empty ChangeLog.' >&2))"
33438d623946SmrgAC_SUBST([CHANGELOG_CMD])
33448d623946Smrg]) # XORG_CHANGELOG
3345a1ed278cSmrg
33468d623946Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
33478d623946Smrg#
33488d623946Smrg#   Copyright (C) 1996-2001, 2003-2019, 2021-2022 Free Software
33498d623946Smrg#   Foundation, Inc.
33508d623946Smrg#   Written by Gordon Matzigkeit, 1996
33518d623946Smrg#
33528d623946Smrg# This file is free software; the Free Software Foundation gives
33538d623946Smrg# unlimited permission to copy and/or distribute it, with or without
33548d623946Smrg# modifications, as long as this notice is preserved.
3355ee3138f1Smrg
33568d623946Smrgm4_define([_LT_COPYING], [dnl
33578d623946Smrg# Copyright (C) 2014 Free Software Foundation, Inc.
33588d623946Smrg# This is free software; see the source for copying conditions.  There is NO
33598d623946Smrg# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
3360ee3138f1Smrg
33618d623946Smrg# GNU Libtool is free software; you can redistribute it and/or modify
33628d623946Smrg# it under the terms of the GNU General Public License as published by
33638d623946Smrg# the Free Software Foundation; either version 2 of of the License, or
33648d623946Smrg# (at your option) any later version.
33658d623946Smrg#
33668d623946Smrg# As a special exception to the GNU General Public License, if you
33678d623946Smrg# distribute this file as part of a program or library that is built
33688d623946Smrg# using GNU Libtool, you may include this file under the  same
33698d623946Smrg# distribution terms that you use for the rest of that program.
33708d623946Smrg#
33718d623946Smrg# GNU Libtool is distributed in the hope that it will be useful, but
33728d623946Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
33738d623946Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
33748d623946Smrg# GNU General Public License for more details.
33758d623946Smrg#
33768d623946Smrg# You should have received a copy of the GNU General Public License
33778d623946Smrg# along with this program.  If not, see <http://www.gnu.org/licenses/>.
33788d623946Smrg])
3379ee3138f1Smrg
33808d623946Smrg# serial 59 LT_INIT
3381b425557eSmrg
3382b425557eSmrg
33838d623946Smrg# LT_PREREQ(VERSION)
33848d623946Smrg# ------------------
33858d623946Smrg# Complain and exit if this libtool version is less that VERSION.
33868d623946Smrgm4_defun([LT_PREREQ],
33878d623946Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
33888d623946Smrg       [m4_default([$3],
33898d623946Smrg		   [m4_fatal([Libtool version $1 or higher is required],
33908d623946Smrg		             63)])],
33918d623946Smrg       [$2])])
3392fe24f8a2Smrg
3393ee3138f1Smrg
33948d623946Smrg# _LT_CHECK_BUILDDIR
33958d623946Smrg# ------------------
33968d623946Smrg# Complain if the absolute build directory name contains unusual characters
33978d623946Smrgm4_defun([_LT_CHECK_BUILDDIR],
33988d623946Smrg[case `pwd` in
33998d623946Smrg  *\ * | *\	*)
34008d623946Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
34018d623946Smrgesac
34028d623946Smrg])
3403fe24f8a2Smrg
3404fe24f8a2Smrg
34058d623946Smrg# LT_INIT([OPTIONS])
34068d623946Smrg# ------------------
34078d623946SmrgAC_DEFUN([LT_INIT],
34088d623946Smrg[AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK
34098d623946SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
34108d623946SmrgAC_BEFORE([$0], [LT_LANG])dnl
34118d623946SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
34128d623946SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
34138d623946Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
3414fe24f8a2Smrg
34158d623946Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
34168d623946Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
34178d623946Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
34188d623946Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
34198d623946Smrgdnl unless we require an AC_DEFUNed macro:
34208d623946SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
34218d623946SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
34228d623946SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
34238d623946SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
34248d623946Smrgm4_require([_LT_PROG_LTMAIN])dnl
3425ee3138f1Smrg
34268d623946Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
3427ee3138f1Smrg
34288d623946Smrgdnl Parse OPTIONS
34298d623946Smrg_LT_SET_OPTIONS([$0], [$1])
3430ee3138f1Smrg
34318d623946Smrg# This can be used to rebuild libtool when needed
34328d623946SmrgLIBTOOL_DEPS=$ltmain
3433ee3138f1Smrg
34348d623946Smrg# Always use our own libtool.
34358d623946SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
34368d623946SmrgAC_SUBST(LIBTOOL)dnl
3437ee3138f1Smrg
34388d623946Smrg_LT_SETUP
343934977a2fSmrg
34408d623946Smrg# Only expand once:
34418d623946Smrgm4_define([LT_INIT])
34428d623946Smrg])# LT_INIT
3443ee3138f1Smrg
34448d623946Smrg# Old names:
34458d623946SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
34468d623946SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
34478d623946Smrgdnl aclocal-1.4 backwards compatibility:
34488d623946Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
34498d623946Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
34503e72ca8cSmrg
3451ee3138f1Smrg
34528d623946Smrg# _LT_PREPARE_CC_BASENAME
34538d623946Smrg# -----------------------
34548d623946Smrgm4_defun([_LT_PREPARE_CC_BASENAME], [
34558d623946Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
34568d623946Smrgfunc_cc_basename ()
34578d623946Smrg{
34588d623946Smrg    for cc_temp in @S|@*""; do
34598d623946Smrg      case $cc_temp in
34608d623946Smrg        compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
34618d623946Smrg        distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
34628d623946Smrg        \-*) ;;
34638d623946Smrg        *) break;;
34648d623946Smrg      esac
34658d623946Smrg    done
34668d623946Smrg    func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
34678d623946Smrg}
34688d623946Smrg])# _LT_PREPARE_CC_BASENAME
346934977a2fSmrg
34703e72ca8cSmrg
34718d623946Smrg# _LT_CC_BASENAME(CC)
34728d623946Smrg# -------------------
34738d623946Smrg# It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME,
34748d623946Smrg# but that macro is also expanded into generated libtool script, which
34758d623946Smrg# arranges for $SED and $ECHO to be set by different means.
34768d623946Smrgm4_defun([_LT_CC_BASENAME],
34778d623946Smrg[m4_require([_LT_PREPARE_CC_BASENAME])dnl
34788d623946SmrgAC_REQUIRE([_LT_DECL_SED])dnl
34798d623946SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
34808d623946Smrgfunc_cc_basename $1
34818d623946Smrgcc_basename=$func_cc_basename_result
34828d623946Smrg])
348334977a2fSmrg
348434977a2fSmrg
34858d623946Smrg# _LT_FILEUTILS_DEFAULTS
34868d623946Smrg# ----------------------
34878d623946Smrg# It is okay to use these file commands and assume they have been set
34888d623946Smrg# sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'.
34898d623946Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
34908d623946Smrg[: ${CP="cp -f"}
34918d623946Smrg: ${MV="mv -f"}
34928d623946Smrg: ${RM="rm -f"}
34938d623946Smrg])# _LT_FILEUTILS_DEFAULTS
349434977a2fSmrg
349534977a2fSmrg
34968d623946Smrg# _LT_SETUP
34978d623946Smrg# ---------
34988d623946Smrgm4_defun([_LT_SETUP],
34998d623946Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
35008d623946SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
35018d623946SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
35028d623946SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
35038d623946Smrg
35048d623946Smrg_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl
35058d623946Smrgdnl
35068d623946Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
35078d623946Smrg_LT_DECL([], [host], [0])dnl
35088d623946Smrg_LT_DECL([], [host_os], [0])dnl
35098d623946Smrgdnl
35108d623946Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
35118d623946Smrg_LT_DECL([], [build], [0])dnl
35128d623946Smrg_LT_DECL([], [build_os], [0])dnl
35138d623946Smrgdnl
35148d623946SmrgAC_REQUIRE([AC_PROG_CC])dnl
35158d623946SmrgAC_REQUIRE([LT_PATH_LD])dnl
35168d623946SmrgAC_REQUIRE([LT_PATH_NM])dnl
35178d623946Smrgdnl
35188d623946SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
35198d623946Smrgtest -z "$LN_S" && LN_S="ln -s"
35208d623946Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
35218d623946Smrgdnl
35228d623946SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
35238d623946Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
35248d623946Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
35258d623946Smrgdnl
35268d623946Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
35278d623946Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
35288d623946Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
35298d623946Smrgm4_require([_LT_CMD_RELOAD])dnl
35308d623946Smrgm4_require([_LT_DECL_FILECMD])dnl
35318d623946Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
35328d623946Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
35338d623946Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
35348d623946Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
35358d623946Smrgm4_require([_LT_WITH_SYSROOT])dnl
35368d623946Smrgm4_require([_LT_CMD_TRUNCATE])dnl
3537ee3138f1Smrg
35388d623946Smrg_LT_CONFIG_LIBTOOL_INIT([
35398d623946Smrg# See if we are running on zsh, and set the options that allow our
35408d623946Smrg# commands through without removal of \ escapes INIT.
35418d623946Smrgif test -n "\${ZSH_VERSION+set}"; then
35428d623946Smrg   setopt NO_GLOB_SUBST
35438d623946Smrgfi
35448d623946Smrg])
35458d623946Smrgif test -n "${ZSH_VERSION+set}"; then
35468d623946Smrg   setopt NO_GLOB_SUBST
35478d623946Smrgfi
35488d623946Smrg
35498d623946Smrg_LT_CHECK_OBJDIR
35508d623946Smrg
35518d623946Smrgm4_require([_LT_TAG_COMPILER])dnl
3552ee3138f1Smrg
35533e72ca8cSmrgcase $host_os in
35548d623946Smrgaix3*)
35558d623946Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
35568d623946Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
35578d623946Smrg  # vanish in a puff of smoke.
35588d623946Smrg  if test set != "${COLLECT_NAMES+set}"; then
35598d623946Smrg    COLLECT_NAMES=
35608d623946Smrg    export COLLECT_NAMES
35618d623946Smrg  fi
35628d623946Smrg  ;;
35633e72ca8cSmrgesac
3564ee3138f1Smrg
35658d623946Smrg# Global variables:
35668d623946Smrgofile=libtool
35678d623946Smrgcan_build_shared=yes
3568ee3138f1Smrg
35698d623946Smrg# All known linkers require a '.a' archive for static linking (except MSVC and
35708d623946Smrg# ICC, which need '.lib').
35718d623946Smrglibext=a
3572fe24f8a2Smrg
35738d623946Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
3574fe24f8a2Smrg
35758d623946Smrgold_CC=$CC
35768d623946Smrgold_CFLAGS=$CFLAGS
3577fe24f8a2Smrg
35788d623946Smrg# Set sane defaults for various variables
35798d623946Smrgtest -z "$CC" && CC=cc
35808d623946Smrgtest -z "$LTCC" && LTCC=$CC
35818d623946Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
35828d623946Smrgtest -z "$LD" && LD=ld
35838d623946Smrgtest -z "$ac_objext" && ac_objext=o
3584fe24f8a2Smrg
35858d623946Smrg_LT_CC_BASENAME([$compiler])
3586ee3138f1Smrg
35878d623946Smrg# Only perform the check for file, if the check method requires it
35888d623946Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
35898d623946Smrgcase $deplibs_check_method in
35908d623946Smrgfile_magic*)
35918d623946Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
35928d623946Smrg    _LT_PATH_MAGIC
35938d623946Smrg  fi
35943e72ca8cSmrg  ;;
35958d623946Smrgesac
3596ee3138f1Smrg
35978d623946Smrg# Use C for the default configuration in the libtool script
35988d623946SmrgLT_SUPPORTED_TAG([CC])
35998d623946Smrg_LT_LANG_C_CONFIG
36008d623946Smrg_LT_LANG_DEFAULT_CONFIG
36018d623946Smrg_LT_CONFIG_COMMANDS
36028d623946Smrg])# _LT_SETUP
3603b425557eSmrg
3604b425557eSmrg
36058d623946Smrg# _LT_PREPARE_SED_QUOTE_VARS
36068d623946Smrg# --------------------------
36078d623946Smrg# Define a few sed substitution that help us do robust quoting.
36088d623946Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
36098d623946Smrg[# Backslashify metacharacters that are still active within
36108d623946Smrg# double-quoted strings.
36118d623946Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
3612a1ed278cSmrg
36138d623946Smrg# Same as above, but do not quote variable references.
36148d623946Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
3615ee3138f1Smrg
36168d623946Smrg# Sed substitution to delay expansion of an escaped shell variable in a
36178d623946Smrg# double_quote_subst'ed string.
36188d623946Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
3619a1ed278cSmrg
36208d623946Smrg# Sed substitution to delay expansion of an escaped single quote.
36218d623946Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
3622a1ed278cSmrg
36238d623946Smrg# Sed substitution to avoid accidental globbing in evaled expressions
36248d623946Smrgno_glob_subst='s/\*/\\\*/g'
36258d623946Smrg])
3626a1ed278cSmrg
36278d623946Smrg# _LT_PROG_LTMAIN
36288d623946Smrg# ---------------
36298d623946Smrg# Note that this code is called both from 'configure', and 'config.status'
36308d623946Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
36318d623946Smrg# 'config.status' has no value for ac_aux_dir unless we are using Automake,
36328d623946Smrg# so we pass a copy along to make sure it has a sensible value anyway.
36338d623946Smrgm4_defun([_LT_PROG_LTMAIN],
36348d623946Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
36358d623946Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
36368d623946Smrgltmain=$ac_aux_dir/ltmain.sh
36378d623946Smrg])# _LT_PROG_LTMAIN
36383e72ca8cSmrg
36393e72ca8cSmrg
36403e72ca8cSmrg
36418d623946Smrg# So that we can recreate a full libtool script including additional
36428d623946Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
36438d623946Smrg# in macros and then make a single call at the end using the 'libtool'
36448d623946Smrg# label.
36453e72ca8cSmrg
36463e72ca8cSmrg
36478d623946Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
36488d623946Smrg# ----------------------------------------
36498d623946Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
36508d623946Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
36518d623946Smrg[m4_ifval([$1],
36528d623946Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
36538d623946Smrg                     [$1
36548d623946Smrg])])])
3655ee3138f1Smrg
36568d623946Smrg# Initialize.
36578d623946Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
36583e72ca8cSmrg
36593e72ca8cSmrg
36608d623946Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
36618d623946Smrg# ------------------------------
36628d623946Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
36638d623946Smrgm4_define([_LT_CONFIG_LIBTOOL],
36648d623946Smrg[m4_ifval([$1],
36658d623946Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
36668d623946Smrg                     [$1
36678d623946Smrg])])])
3668ee3138f1Smrg
36698d623946Smrg# Initialize.
36708d623946Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
3671ee3138f1Smrg
367234977a2fSmrg
36738d623946Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
36748d623946Smrg# -----------------------------------------------------
36758d623946Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
36768d623946Smrg[_LT_CONFIG_LIBTOOL([$1])
36778d623946Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
36788d623946Smrg])
367934977a2fSmrg
3680ee3138f1Smrg
36818d623946Smrg# _LT_FORMAT_COMMENT([COMMENT])
36828d623946Smrg# -----------------------------
36838d623946Smrg# Add leading comment marks to the start of each line, and a trailing
36848d623946Smrg# full-stop to the whole comment if one is not present already.
36858d623946Smrgm4_define([_LT_FORMAT_COMMENT],
36868d623946Smrg[m4_ifval([$1], [
36878d623946Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
36888d623946Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
36898d623946Smrg)])
3690a1ed278cSmrg
369134977a2fSmrg
3692a1ed278cSmrg
3693a1ed278cSmrg
3694a1ed278cSmrg
36958d623946Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
36968d623946Smrg# -------------------------------------------------------------------
36978d623946Smrg# CONFIGNAME is the name given to the value in the libtool script.
36988d623946Smrg# VARNAME is the (base) name used in the configure script.
36998d623946Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
37008d623946Smrg# VARNAME.  Any other value will be used directly.
37018d623946Smrgm4_define([_LT_DECL],
37028d623946Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
37038d623946Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
37048d623946Smrg	[m4_ifval([$1], [$1], [$2])])
37058d623946Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
37068d623946Smrg    m4_ifval([$4],
37078d623946Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
37088d623946Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
37098d623946Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
37108d623946Smrg])
3711a1ed278cSmrg
3712a1ed278cSmrg
37138d623946Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
37148d623946Smrg# --------------------------------------------------------
37158d623946Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
3716a1ed278cSmrg
3717a1ed278cSmrg
37188d623946Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
37198d623946Smrg# ------------------------------------------------
37208d623946Smrgm4_define([lt_decl_tag_varnames],
37218d623946Smrg[_lt_decl_filter([tagged?], [yes], $@)])
3722a1ed278cSmrg
3723a1ed278cSmrg
37248d623946Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
37258d623946Smrg# ---------------------------------------------------------
37268d623946Smrgm4_define([_lt_decl_filter],
37278d623946Smrg[m4_case([$#],
37288d623946Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
37298d623946Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
37308d623946Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
37318d623946Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
37328d623946Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
37338d623946Smrg])
3734a1ed278cSmrg
3735a1ed278cSmrg
37368d623946Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
37378d623946Smrg# --------------------------------------------------
37388d623946Smrgm4_define([lt_decl_quote_varnames],
37398d623946Smrg[_lt_decl_filter([value], [1], $@)])
3740a1ed278cSmrg
3741fe24f8a2Smrg
37428d623946Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
37438d623946Smrg# ---------------------------------------------------
37448d623946Smrgm4_define([lt_decl_dquote_varnames],
37458d623946Smrg[_lt_decl_filter([value], [2], $@)])
3746fe24f8a2Smrg
3747a1ed278cSmrg
37488d623946Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
37498d623946Smrg# ---------------------------------------------------
37508d623946Smrgm4_define([lt_decl_varnames_tagged],
37518d623946Smrg[m4_assert([$# <= 2])dnl
37528d623946Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
37538d623946Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
37548d623946Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
37558d623946Smrgm4_define([_lt_decl_varnames_tagged],
37568d623946Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
3757a1ed278cSmrg
3758a1ed278cSmrg
37598d623946Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
37608d623946Smrg# ------------------------------------------------
37618d623946Smrgm4_define([lt_decl_all_varnames],
37628d623946Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
37638d623946Smrg     m4_if([$2], [],
37648d623946Smrg	   m4_quote(lt_decl_varnames),
37658d623946Smrg	m4_quote(m4_shift($@))))[]dnl
37668d623946Smrg])
37678d623946Smrgm4_define([_lt_decl_all_varnames],
37688d623946Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
37698d623946Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
37708d623946Smrg])
3771a1ed278cSmrg
3772a1ed278cSmrg
37738d623946Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
37748d623946Smrg# ------------------------------------
37758d623946Smrg# Quote a variable value, and forward it to 'config.status' so that its
37768d623946Smrg# declaration there will have the same value as in 'configure'.  VARNAME
37778d623946Smrg# must have a single quote delimited value for this to work.
37788d623946Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
37798d623946Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
37803e72ca8cSmrg
3781a1ed278cSmrg
37828d623946Smrg# _LT_CONFIG_STATUS_DECLARATIONS
37838d623946Smrg# ------------------------------
37848d623946Smrg# We delimit libtool config variables with single quotes, so when
37858d623946Smrg# we write them to config.status, we have to be sure to quote all
37868d623946Smrg# embedded single quotes properly.  In configure, this macro expands
37878d623946Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
37888d623946Smrg#
37898d623946Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
37908d623946Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
37918d623946Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
37928d623946Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
3793a1ed278cSmrg
3794a1ed278cSmrg
37958d623946Smrg# _LT_LIBTOOL_TAGS
37968d623946Smrg# ----------------
37978d623946Smrg# Output comment and list of tags supported by the script
37988d623946Smrgm4_defun([_LT_LIBTOOL_TAGS],
37998d623946Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
38008d623946Smrgavailable_tags='_LT_TAGS'dnl
38018d623946Smrg])
3802a1ed278cSmrg
3803a1ed278cSmrg
38048d623946Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
38058d623946Smrg# -----------------------------------
38068d623946Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
38078d623946Smrg# expand to a commented shell variable setting:
38088d623946Smrg#
38098d623946Smrg#    # Some comment about what VAR is for.
38108d623946Smrg#    visible_name=$lt_internal_name
38118d623946Smrgm4_define([_LT_LIBTOOL_DECLARE],
38128d623946Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
38138d623946Smrg					   [description])))[]dnl
38148d623946Smrgm4_pushdef([_libtool_name],
38158d623946Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
38168d623946Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
38178d623946Smrg    [0], [_libtool_name=[$]$1],
38188d623946Smrg    [1], [_libtool_name=$lt_[]$1],
38198d623946Smrg    [2], [_libtool_name=$lt_[]$1],
38208d623946Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
38218d623946Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
38228d623946Smrg])
3823a1ed278cSmrg
3824a1ed278cSmrg
38258d623946Smrg# _LT_LIBTOOL_CONFIG_VARS
38268d623946Smrg# -----------------------
38278d623946Smrg# Produce commented declarations of non-tagged libtool config variables
38288d623946Smrg# suitable for insertion in the LIBTOOL CONFIG section of the 'libtool'
38298d623946Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
38308d623946Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
38318d623946Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
38328d623946Smrg[m4_foreach([_lt_var],
38338d623946Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
38348d623946Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
3835a1ed278cSmrg
3836fe24f8a2Smrg
38378d623946Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
38388d623946Smrg# -------------------------
38398d623946Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
38408d623946Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
38418d623946Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
3842a1ed278cSmrg
3843fe24f8a2Smrg
38448d623946Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
38458d623946Smrg# ------------------------------
38468d623946Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
3847a1ed278cSmrg
3848a1ed278cSmrg
38498d623946Smrg# _LT_CONFIG_COMMANDS
38508d623946Smrg# -------------------
38518d623946Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
38528d623946Smrg# variables for single and double quote escaping we saved from calls
38538d623946Smrg# to _LT_DECL, we can put quote escaped variables declarations
38548d623946Smrg# into 'config.status', and then the shell code to quote escape them in
38558d623946Smrg# for loops in 'config.status'.  Finally, any additional code accumulated
38568d623946Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
38578d623946Smrgm4_defun([_LT_CONFIG_COMMANDS],
38588d623946Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
38598d623946Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
38608d623946Smrg	dnl instead of duplicating it all over again into config.status,
38618d623946Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
38628d623946Smrg	dnl needs to know what name is stored there:
38638d623946Smrg        [AC_CONFIG_COMMANDS([libtool],
38648d623946Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
38658d623946Smrg    dnl If the libtool generation code is destined for config.status,
38668d623946Smrg    dnl expand the accumulated commands and init code now:
38678d623946Smrg    [AC_CONFIG_COMMANDS([libtool],
38688d623946Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
38698d623946Smrg])#_LT_CONFIG_COMMANDS
3870a1ed278cSmrg
38713e72ca8cSmrg
38728d623946Smrg# Initialize.
38738d623946Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
38748d623946Smrg[
3875a1ed278cSmrg
38768d623946Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
38778d623946Smrg# if CDPATH is set.
38788d623946Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
38793e72ca8cSmrg
38808d623946Smrgsed_quote_subst='$sed_quote_subst'
38818d623946Smrgdouble_quote_subst='$double_quote_subst'
38828d623946Smrgdelay_variable_subst='$delay_variable_subst'
38838d623946Smrg_LT_CONFIG_STATUS_DECLARATIONS
38848d623946SmrgLTCC='$LTCC'
38858d623946SmrgLTCFLAGS='$LTCFLAGS'
38868d623946Smrgcompiler='$compiler_DEFAULT'
38878d623946Smrg
38888d623946Smrg# A function that is used when there is no print builtin or printf.
38898d623946Smrgfunc_fallback_echo ()
38908d623946Smrg{
38918d623946Smrg  eval 'cat <<_LTECHO_EOF
38928d623946Smrg\$[]1
38938d623946Smrg_LTECHO_EOF'
38943e72ca8cSmrg}
38953e72ca8cSmrg
38968d623946Smrg# Quote evaled strings.
38978d623946Smrgfor var in lt_decl_all_varnames([[ \
38988d623946Smrg]], lt_decl_quote_varnames); do
38998d623946Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
39008d623946Smrg    *[[\\\\\\\`\\"\\\$]]*)
39018d623946Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
39028d623946Smrg      ;;
39038d623946Smrg    *)
39048d623946Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
39058d623946Smrg      ;;
39068d623946Smrg    esac
39078d623946Smrgdone
3908a1ed278cSmrg
39098d623946Smrg# Double-quote double-evaled strings.
39108d623946Smrgfor var in lt_decl_all_varnames([[ \
39118d623946Smrg]], lt_decl_dquote_varnames); do
39128d623946Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
39138d623946Smrg    *[[\\\\\\\`\\"\\\$]]*)
39148d623946Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes
39158d623946Smrg      ;;
39168d623946Smrg    *)
39178d623946Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
39188d623946Smrg      ;;
39198d623946Smrg    esac
39208d623946Smrgdone
3921a1ed278cSmrg
39228d623946Smrg_LT_OUTPUT_LIBTOOL_INIT
39238d623946Smrg])
3924a1ed278cSmrg
39258d623946Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
39268d623946Smrg# ------------------------------------
39278d623946Smrg# Generate a child script FILE with all initialization necessary to
39288d623946Smrg# reuse the environment learned by the parent script, and make the
39298d623946Smrg# file executable.  If COMMENT is supplied, it is inserted after the
39308d623946Smrg# '#!' sequence but before initialization text begins.  After this
39318d623946Smrg# macro, additional text can be appended to FILE to form the body of
39328d623946Smrg# the child script.  The macro ends with non-zero status if the
39338d623946Smrg# file could not be fully written (such as if the disk is full).
39348d623946Smrgm4_ifdef([AS_INIT_GENERATED],
39358d623946Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
39368d623946Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
39378d623946Smrg[m4_require([AS_PREPARE])]dnl
39388d623946Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
39398d623946Smrg[lt_write_fail=0
39408d623946Smrgcat >$1 <<_ASEOF || lt_write_fail=1
39418d623946Smrg#! $SHELL
39428d623946Smrg# Generated by $as_me.
39438d623946Smrg$2
39448d623946SmrgSHELL=\${CONFIG_SHELL-$SHELL}
39458d623946Smrgexport SHELL
39468d623946Smrg_ASEOF
39478d623946Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
39488d623946SmrgAS_SHELL_SANITIZE
39498d623946Smrg_AS_PREPARE
39508d623946Smrgexec AS_MESSAGE_FD>&1
39518d623946Smrg_ASEOF
39528d623946Smrgtest 0 = "$lt_write_fail" && chmod +x $1[]dnl
39538d623946Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
3954a1ed278cSmrg
39558d623946Smrg# LT_OUTPUT
39568d623946Smrg# ---------
39578d623946Smrg# This macro allows early generation of the libtool script (before
39588d623946Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
39598d623946Smrg# tests.
39608d623946SmrgAC_DEFUN([LT_OUTPUT],
39618d623946Smrg[: ${CONFIG_LT=./config.lt}
39628d623946SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
39638d623946Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
39648d623946Smrg[# Run this file to recreate a libtool stub with the current configuration.])
3965a1ed278cSmrg
39668d623946Smrgcat >>"$CONFIG_LT" <<\_LTEOF
39678d623946Smrglt_cl_silent=false
39688d623946Smrgexec AS_MESSAGE_LOG_FD>>config.log
39693e72ca8cSmrg{
39708d623946Smrg  echo
39718d623946Smrg  AS_BOX([Running $as_me.])
39728d623946Smrg} >&AS_MESSAGE_LOG_FD
3973a1ed278cSmrg
39748d623946Smrglt_cl_help="\
39758d623946Smrg'$as_me' creates a local libtool stub from the current configuration,
39768d623946Smrgfor use in further configure time tests before the real libtool is
39778d623946Smrggenerated.
3978a1ed278cSmrg
39798d623946SmrgUsage: $[0] [[OPTIONS]]
398034977a2fSmrg
39818d623946Smrg  -h, --help      print this help, then exit
39828d623946Smrg  -V, --version   print version number, then exit
39838d623946Smrg  -q, --quiet     do not print progress messages
39848d623946Smrg  -d, --debug     don't remove temporary files
398534977a2fSmrg
39868d623946SmrgReport bugs to <bug-libtool@gnu.org>."
3987ee3138f1Smrg
39888d623946Smrglt_cl_version="\
39898d623946Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
39908d623946Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
39918d623946Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
3992ee3138f1Smrg
39938d623946SmrgCopyright (C) 2011 Free Software Foundation, Inc.
39948d623946SmrgThis config.lt script is free software; the Free Software Foundation
39958d623946Smrggives unlimited permision to copy, distribute and modify it."
3996ee3138f1Smrg
39978d623946Smrgwhile test 0 != $[#]
39988d623946Smrgdo
39998d623946Smrg  case $[1] in
40008d623946Smrg    --version | --v* | -V )
40018d623946Smrg      echo "$lt_cl_version"; exit 0 ;;
40028d623946Smrg    --help | --h* | -h )
40038d623946Smrg      echo "$lt_cl_help"; exit 0 ;;
40048d623946Smrg    --debug | --d* | -d )
40058d623946Smrg      debug=: ;;
40068d623946Smrg    --quiet | --q* | --silent | --s* | -q )
40078d623946Smrg      lt_cl_silent=: ;;
400834977a2fSmrg
40098d623946Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
40108d623946SmrgTry '$[0] --help' for more information.]) ;;
4011ee3138f1Smrg
40128d623946Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
40138d623946SmrgTry '$[0] --help' for more information.]) ;;
40148d623946Smrg  esac
40158d623946Smrg  shift
40168d623946Smrgdone
4017a1ed278cSmrg
40188d623946Smrgif $lt_cl_silent; then
40198d623946Smrg  exec AS_MESSAGE_FD>/dev/null
40208d623946Smrgfi
40218d623946Smrg_LTEOF
4022a1ed278cSmrg
40238d623946Smrgcat >>"$CONFIG_LT" <<_LTEOF
40248d623946Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
40258d623946Smrg_LTEOF
4026a1ed278cSmrg
40278d623946Smrgcat >>"$CONFIG_LT" <<\_LTEOF
40288d623946SmrgAC_MSG_NOTICE([creating $ofile])
40298d623946Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
40308d623946SmrgAS_EXIT(0)
40318d623946Smrg_LTEOF
40328d623946Smrgchmod +x "$CONFIG_LT"
4033a1ed278cSmrg
40348d623946Smrg# configure is writing to config.log, but config.lt does its own redirection,
40358d623946Smrg# appending to config.log, which fails on DOS, as config.log is still kept
40368d623946Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
40378d623946Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
40388d623946Smrglt_cl_success=:
40398d623946Smrgtest yes = "$silent" &&
40408d623946Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
40418d623946Smrgexec AS_MESSAGE_LOG_FD>/dev/null
40428d623946Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
40438d623946Smrgexec AS_MESSAGE_LOG_FD>>config.log
40448d623946Smrg$lt_cl_success || AS_EXIT(1)
40458d623946Smrg])# LT_OUTPUT
4046a1ed278cSmrg
4047a1ed278cSmrg
40488d623946Smrg# _LT_CONFIG(TAG)
40498d623946Smrg# ---------------
40508d623946Smrg# If TAG is the built-in tag, create an initial libtool script with a
40518d623946Smrg# default configuration from the untagged config vars.  Otherwise add code
40528d623946Smrg# to config.status for appending the configuration named by TAG from the
40538d623946Smrg# matching tagged config vars.
40548d623946Smrgm4_defun([_LT_CONFIG],
40558d623946Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
40568d623946Smrg_LT_CONFIG_SAVE_COMMANDS([
40578d623946Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
40588d623946Smrg  m4_if(_LT_TAG, [C], [
40598d623946Smrg    # See if we are running on zsh, and set the options that allow our
40608d623946Smrg    # commands through without removal of \ escapes.
40618d623946Smrg    if test -n "${ZSH_VERSION+set}"; then
40628d623946Smrg      setopt NO_GLOB_SUBST
40638d623946Smrg    fi
4064a1ed278cSmrg
40658d623946Smrg    cfgfile=${ofile}T
40668d623946Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
40678d623946Smrg    $RM "$cfgfile"
4068a1ed278cSmrg
40698d623946Smrg    cat <<_LT_EOF >> "$cfgfile"
40708d623946Smrg#! $SHELL
40718d623946Smrg# Generated automatically by $as_me ($PACKAGE) $VERSION
40728d623946Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
40738d623946Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4074a1ed278cSmrg
40758d623946Smrg# Provide generalized library-building support services.
40768d623946Smrg# Written by Gordon Matzigkeit, 1996
4077a1ed278cSmrg
40788d623946Smrg_LT_COPYING
40798d623946Smrg_LT_LIBTOOL_TAGS
4080a1ed278cSmrg
40818d623946Smrg# Configured defaults for sys_lib_dlsearch_path munging.
40828d623946Smrg: \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"}
4083a1ed278cSmrg
40848d623946Smrg# ### BEGIN LIBTOOL CONFIG
40858d623946Smrg_LT_LIBTOOL_CONFIG_VARS
40868d623946Smrg_LT_LIBTOOL_TAG_VARS
40878d623946Smrg# ### END LIBTOOL CONFIG
4088a1ed278cSmrg
40898d623946Smrg_LT_EOF
4090a1ed278cSmrg
40918d623946Smrg    cat <<'_LT_EOF' >> "$cfgfile"
4092a1ed278cSmrg
40938d623946Smrg# ### BEGIN FUNCTIONS SHARED WITH CONFIGURE
4094ee3138f1Smrg
40958d623946Smrg_LT_PREPARE_MUNGE_PATH_LIST
40968d623946Smrg_LT_PREPARE_CC_BASENAME
4097fe24f8a2Smrg
40988d623946Smrg# ### END FUNCTIONS SHARED WITH CONFIGURE
4099ee3138f1Smrg
41008d623946Smrg_LT_EOF
410134977a2fSmrg
41028d623946Smrg  case $host_os in
41038d623946Smrg  aix3*)
41048d623946Smrg    cat <<\_LT_EOF >> "$cfgfile"
41058d623946Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
41068d623946Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
41078d623946Smrg# vanish in a puff of smoke.
41088d623946Smrgif test set != "${COLLECT_NAMES+set}"; then
41098d623946Smrg  COLLECT_NAMES=
41108d623946Smrg  export COLLECT_NAMES
41118d623946Smrgfi
41128d623946Smrg_LT_EOF
41138d623946Smrg    ;;
41148d623946Smrg  esac
411534977a2fSmrg
41168d623946Smrg  _LT_PROG_LTMAIN
4117ee3138f1Smrg
41188d623946Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
41198d623946Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
41208d623946Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
41218d623946Smrg  # is reportedly fixed, but why not run on old versions too?
41228d623946Smrg  $SED '$q' "$ltmain" >> "$cfgfile" \
41238d623946Smrg     || (rm -f "$cfgfile"; exit 1)
4124ee3138f1Smrg
41258d623946Smrg   mv -f "$cfgfile" "$ofile" ||
41268d623946Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
41278d623946Smrg  chmod +x "$ofile"
41288d623946Smrg],
41298d623946Smrg[cat <<_LT_EOF >> "$ofile"
4130ee3138f1Smrg
41318d623946Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
41328d623946Smrgdnl in a comment (ie after a #).
41338d623946Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
41348d623946Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
41358d623946Smrg# ### END LIBTOOL TAG CONFIG: $1
41368d623946Smrg_LT_EOF
41378d623946Smrg])dnl /m4_if
41388d623946Smrg],
41398d623946Smrg[m4_if([$1], [], [
41408d623946Smrg    PACKAGE='$PACKAGE'
41418d623946Smrg    VERSION='$VERSION'
41428d623946Smrg    RM='$RM'
41438d623946Smrg    ofile='$ofile'], [])
41448d623946Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
41458d623946Smrg])# _LT_CONFIG
4146ee3138f1Smrg
4147ee3138f1Smrg
41488d623946Smrg# LT_SUPPORTED_TAG(TAG)
41498d623946Smrg# ---------------------
41508d623946Smrg# Trace this macro to discover what tags are supported by the libtool
41518d623946Smrg# --tag option, using:
41528d623946Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
41538d623946SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
4154ee3138f1Smrg
41553e72ca8cSmrg
41568d623946Smrg# C support is built-in for now
41578d623946Smrgm4_define([_LT_LANG_C_enabled], [])
41588d623946Smrgm4_define([_LT_TAGS], [])
41593e72ca8cSmrg
4160b425557eSmrg
41618d623946Smrg# LT_LANG(LANG)
41628d623946Smrg# -------------
41638d623946Smrg# Enable libtool support for the given language if not already enabled.
41648d623946SmrgAC_DEFUN([LT_LANG],
41658d623946Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
41668d623946Smrgm4_case([$1],
41678d623946Smrg  [C],			[_LT_LANG(C)],
41688d623946Smrg  [C++],		[_LT_LANG(CXX)],
41698d623946Smrg  [Go],			[_LT_LANG(GO)],
41708d623946Smrg  [Java],		[_LT_LANG(GCJ)],
41718d623946Smrg  [Fortran 77],		[_LT_LANG(F77)],
41728d623946Smrg  [Fortran],		[_LT_LANG(FC)],
41738d623946Smrg  [Windows Resource],	[_LT_LANG(RC)],
41748d623946Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
41758d623946Smrg    [_LT_LANG($1)],
41768d623946Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
41778d623946Smrg])# LT_LANG
4178b425557eSmrg
4179b425557eSmrg
41808d623946Smrg# _LT_LANG(LANGNAME)
41818d623946Smrg# ------------------
41828d623946Smrgm4_defun([_LT_LANG],
41838d623946Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
41848d623946Smrg  [LT_SUPPORTED_TAG([$1])dnl
41858d623946Smrg  m4_append([_LT_TAGS], [$1 ])dnl
41868d623946Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
41878d623946Smrg  _LT_LANG_$1_CONFIG($1)])dnl
41888d623946Smrg])# _LT_LANG
4189b425557eSmrg
4190b425557eSmrg
41918d623946Smrgm4_ifndef([AC_PROG_GO], [
41928d623946Smrg# NOTE: This macro has been submitted for inclusion into   #
41938d623946Smrg#  GNU Autoconf as AC_PROG_GO.  When it is available in    #
41948d623946Smrg#  a released version of Autoconf we should remove this    #
41958d623946Smrg#  macro and use it instead.                               #
41968d623946Smrgm4_defun([AC_PROG_GO],
41978d623946Smrg[AC_LANG_PUSH(Go)dnl
41988d623946SmrgAC_ARG_VAR([GOC],     [Go compiler command])dnl
41998d623946SmrgAC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl
42008d623946Smrg_AC_ARG_VAR_LDFLAGS()dnl
42018d623946SmrgAC_CHECK_TOOL(GOC, gccgo)
42028d623946Smrgif test -z "$GOC"; then
42038d623946Smrg  if test -n "$ac_tool_prefix"; then
42048d623946Smrg    AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo])
42058d623946Smrg  fi
42063e72ca8cSmrgfi
42078d623946Smrgif test -z "$GOC"; then
42088d623946Smrg  AC_CHECK_PROG(GOC, gccgo, gccgo, false)
42098d623946Smrgfi
42108d623946Smrg])#m4_defun
42118d623946Smrg])#m4_ifndef
4212b425557eSmrg
4213ee3138f1Smrg
42148d623946Smrg# _LT_LANG_DEFAULT_CONFIG
42158d623946Smrg# -----------------------
42168d623946Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
42178d623946Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
42188d623946Smrg  [LT_LANG(CXX)],
42198d623946Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
4220ee3138f1Smrg
42218d623946SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
42228d623946Smrg  [LT_LANG(F77)],
42238d623946Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
422434977a2fSmrg
42258d623946SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
42268d623946Smrg  [LT_LANG(FC)],
42278d623946Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
422834977a2fSmrg
42298d623946Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
42308d623946Smrgdnl pulling things in needlessly.
42318d623946SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
42328d623946Smrg  [LT_LANG(GCJ)],
42338d623946Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
42348d623946Smrg    [LT_LANG(GCJ)],
42358d623946Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
42368d623946Smrg      [LT_LANG(GCJ)],
42378d623946Smrg      [m4_ifdef([AC_PROG_GCJ],
42388d623946Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
42398d623946Smrg       m4_ifdef([A][M_PROG_GCJ],
42408d623946Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
42418d623946Smrg       m4_ifdef([LT_PROG_GCJ],
42428d623946Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
4243a1ed278cSmrg
42448d623946SmrgAC_PROVIDE_IFELSE([AC_PROG_GO],
42458d623946Smrg  [LT_LANG(GO)],
42468d623946Smrg  [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])])
4247a1ed278cSmrg
42488d623946SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
42498d623946Smrg  [LT_LANG(RC)],
42508d623946Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
42518d623946Smrg])# _LT_LANG_DEFAULT_CONFIG
4252a1ed278cSmrg
42538d623946Smrg# Obsolete macros:
42548d623946SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
42558d623946SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
42568d623946SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
42578d623946SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
42588d623946SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
42598d623946Smrgdnl aclocal-1.4 backwards compatibility:
42608d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
42618d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
42628d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
42638d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
42648d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
4265a1ed278cSmrg
4266a1ed278cSmrg
42678d623946Smrg# _LT_TAG_COMPILER
42688d623946Smrg# ----------------
42698d623946Smrgm4_defun([_LT_TAG_COMPILER],
42708d623946Smrg[AC_REQUIRE([AC_PROG_CC])dnl
4271ee3138f1Smrg
42728d623946Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
42738d623946Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
42748d623946Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
42758d623946Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
4276ee3138f1Smrg
42778d623946Smrg# If no C compiler was specified, use CC.
42788d623946SmrgLTCC=${LTCC-"$CC"}
4279ee3138f1Smrg
42808d623946Smrg# If no C compiler flags were specified, use CFLAGS.
42818d623946SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
4282ee3138f1Smrg
42838d623946Smrg# Allow CC to be a program name with arguments.
42848d623946Smrgcompiler=$CC
42858d623946Smrg])# _LT_TAG_COMPILER
4286ee3138f1Smrg
4287ee3138f1Smrg
42888d623946Smrg# _LT_COMPILER_BOILERPLATE
42898d623946Smrg# ------------------------
42908d623946Smrg# Check for compiler boilerplate output or warnings with
42918d623946Smrg# the simple compiler test code.
42928d623946Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
42938d623946Smrg[m4_require([_LT_DECL_SED])dnl
42948d623946Smrgac_outfile=conftest.$ac_objext
42958d623946Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
42968d623946Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
42978d623946Smrg_lt_compiler_boilerplate=`cat conftest.err`
42988d623946Smrg$RM conftest*
42998d623946Smrg])# _LT_COMPILER_BOILERPLATE
4300fe24f8a2Smrg
4301ee3138f1Smrg
43028d623946Smrg# _LT_LINKER_BOILERPLATE
43038d623946Smrg# ----------------------
43048d623946Smrg# Check for linker boilerplate output or warnings with
43058d623946Smrg# the simple link test code.
43068d623946Smrgm4_defun([_LT_LINKER_BOILERPLATE],
43078d623946Smrg[m4_require([_LT_DECL_SED])dnl
43088d623946Smrgac_outfile=conftest.$ac_objext
43098d623946Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
43108d623946Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
43118d623946Smrg_lt_linker_boilerplate=`cat conftest.err`
43128d623946Smrg$RM -r conftest*
43138d623946Smrg])# _LT_LINKER_BOILERPLATE
4314ee3138f1Smrg
43158d623946Smrg# _LT_REQUIRED_DARWIN_CHECKS
43168d623946Smrg# -------------------------
43178d623946Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
43188d623946Smrg  case $host_os in
43198d623946Smrg    rhapsody* | darwin*)
43208d623946Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
43218d623946Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
43228d623946Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
43238d623946Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
43248d623946Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
43258d623946Smrg    _LT_DECL([], [DSYMUTIL], [1],
43268d623946Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
43278d623946Smrg    _LT_DECL([], [NMEDIT], [1],
43288d623946Smrg      [Tool to change global to local symbols on Mac OS X])
43298d623946Smrg    _LT_DECL([], [LIPO], [1],
43308d623946Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
43318d623946Smrg    _LT_DECL([], [OTOOL], [1],
43328d623946Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
43338d623946Smrg    _LT_DECL([], [OTOOL64], [1],
43348d623946Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
4335ee3138f1Smrg
43368d623946Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
43378d623946Smrg      [lt_cv_apple_cc_single_mod=no
43388d623946Smrg      if test -z "$LT_MULTI_MODULE"; then
43398d623946Smrg	# By default we will add the -single_module flag. You can override
43408d623946Smrg	# by either setting the environment variable LT_MULTI_MODULE
43418d623946Smrg	# non-empty at configure time, or by adding -multi_module to the
43428d623946Smrg	# link flags.
43438d623946Smrg	rm -rf libconftest.dylib*
43448d623946Smrg	echo "int foo(void){return 1;}" > conftest.c
43458d623946Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
43468d623946Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
43478d623946Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
43488d623946Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
43498d623946Smrg        _lt_result=$?
43508d623946Smrg	# If there is a non-empty error log, and "single_module"
43518d623946Smrg	# appears in it, assume the flag caused a linker warning
43528d623946Smrg        if test -s conftest.err && $GREP single_module conftest.err; then
43538d623946Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
43548d623946Smrg	# Otherwise, if the output was created with a 0 exit code from
43558d623946Smrg	# the compiler, it worked.
43568d623946Smrg	elif test -f libconftest.dylib && test 0 = "$_lt_result"; then
43578d623946Smrg	  lt_cv_apple_cc_single_mod=yes
43588d623946Smrg	else
43598d623946Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
43608d623946Smrg	fi
43618d623946Smrg	rm -rf libconftest.dylib*
43628d623946Smrg	rm -f conftest.*
43638d623946Smrg      fi])
4364ee3138f1Smrg
43658d623946Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
43668d623946Smrg      [lt_cv_ld_exported_symbols_list],
43678d623946Smrg      [lt_cv_ld_exported_symbols_list=no
43688d623946Smrg      save_LDFLAGS=$LDFLAGS
43698d623946Smrg      echo "_main" > conftest.sym
43708d623946Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
43718d623946Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
43728d623946Smrg	[lt_cv_ld_exported_symbols_list=yes],
43738d623946Smrg	[lt_cv_ld_exported_symbols_list=no])
43748d623946Smrg	LDFLAGS=$save_LDFLAGS
43758d623946Smrg    ])
4376ee3138f1Smrg
43778d623946Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
43788d623946Smrg      [lt_cv_ld_force_load=no
43798d623946Smrg      cat > conftest.c << _LT_EOF
43808d623946Smrgint forced_loaded() { return 2;}
43813e72ca8cSmrg_LT_EOF
43828d623946Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
43838d623946Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
43848d623946Smrg      echo "$AR $AR_FLAGS libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
43858d623946Smrg      $AR $AR_FLAGS libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
43868d623946Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
43878d623946Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
43888d623946Smrg      cat > conftest.c << _LT_EOF
43898d623946Smrgint main() { return 0;}
43908d623946Smrg_LT_EOF
43918d623946Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
43928d623946Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
43938d623946Smrg      _lt_result=$?
43948d623946Smrg      if test -s conftest.err && $GREP force_load conftest.err; then
43958d623946Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
43968d623946Smrg      elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then
43978d623946Smrg	lt_cv_ld_force_load=yes
43983e72ca8cSmrg      else
43998d623946Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
44003e72ca8cSmrg      fi
44018d623946Smrg        rm -f conftest.err libconftest.a conftest conftest.c
44028d623946Smrg        rm -rf conftest.dSYM
44038d623946Smrg    ])
44048d623946Smrg    case $host_os in
44058d623946Smrg    rhapsody* | darwin1.[[012]])
44068d623946Smrg      _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;;
44078d623946Smrg    darwin1.*)
44088d623946Smrg      _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
44098d623946Smrg    darwin*)
44108d623946Smrg      case $MACOSX_DEPLOYMENT_TARGET,$host in
44118d623946Smrg        10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
44128d623946Smrg          _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;;
44138d623946Smrg        *)
44148d623946Smrg          _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
44158d623946Smrg      esac
44168d623946Smrg    ;;
44178d623946Smrg  esac
44188d623946Smrg    if test yes = "$lt_cv_apple_cc_single_mod"; then
44198d623946Smrg      _lt_dar_single_mod='$single_module'
44208d623946Smrg    fi
44218d623946Smrg    if test yes = "$lt_cv_ld_exported_symbols_list"; then
44228d623946Smrg      _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym'
44238d623946Smrg    else
44248d623946Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib'
44258d623946Smrg    fi
44268d623946Smrg    if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then
44278d623946Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
44288d623946Smrg    else
44298d623946Smrg      _lt_dsymutil=
44308d623946Smrg    fi
44318d623946Smrg    ;;
44328d623946Smrg  esac
44338d623946Smrg])
4434ee3138f1Smrg
4435ee3138f1Smrg
44368d623946Smrg# _LT_DARWIN_LINKER_FEATURES([TAG])
44378d623946Smrg# ---------------------------------
44388d623946Smrg# Checks for linker and compiler features on darwin
44398d623946Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
44408d623946Smrg[
44418d623946Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
44428d623946Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
44438d623946Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
44448d623946Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
44458d623946Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
44468d623946Smrg  if test yes = "$lt_cv_ld_force_load"; then
44478d623946Smrg    _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\"`'
44488d623946Smrg    m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes],
44498d623946Smrg                  [FC],  [_LT_TAGVAR(compiler_needs_object, $1)=yes])
44508d623946Smrg  else
44518d623946Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
44528d623946Smrg  fi
44538d623946Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
44548d623946Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined
44558d623946Smrg  case $cc_basename in
44568d623946Smrg     ifort*|nagfor*) _lt_dar_can_shared=yes ;;
44578d623946Smrg     *) _lt_dar_can_shared=$GCC ;;
44588d623946Smrg  esac
44598d623946Smrg  if test yes = "$_lt_dar_can_shared"; then
44608d623946Smrg    output_verbose_link_cmd=func_echo_all
44618d623946Smrg    _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"
44628d623946Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil"
44638d623946Smrg    _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"
44648d623946Smrg    _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"
44658d623946Smrg    m4_if([$1], [CXX],
44668d623946Smrg[   if test yes != "$lt_cv_apple_cc_single_mod"; then
44678d623946Smrg      _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"
44688d623946Smrg      _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"
44698d623946Smrg    fi
44708d623946Smrg],[])
44718d623946Smrg  else
44728d623946Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
44738d623946Smrg  fi
44748d623946Smrg])
447534977a2fSmrg
44768d623946Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
44778d623946Smrg# ----------------------------------
44788d623946Smrg# Links a minimal program and checks the executable
44798d623946Smrg# for the system default hardcoded library path. In most cases,
44808d623946Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
44818d623946Smrg# the location of the communication and MPI libs are included too.
44828d623946Smrg# If we don't find anything, use the default library path according
44838d623946Smrg# to the aix ld manual.
44848d623946Smrg# Store the results from the different compilers for each TAGNAME.
44858d623946Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
44868d623946Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
44878d623946Smrg[m4_require([_LT_DECL_SED])dnl
44888d623946Smrgif test set = "${lt_cv_aix_libpath+set}"; then
44898d623946Smrg  aix_libpath=$lt_cv_aix_libpath
44908d623946Smrgelse
44918d623946Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
44928d623946Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
44938d623946Smrg  lt_aix_libpath_sed='[
44948d623946Smrg      /Import File Strings/,/^$/ {
44958d623946Smrg	  /^0/ {
44968d623946Smrg	      s/^0  *\([^ ]*\) *$/\1/
44978d623946Smrg	      p
44988d623946Smrg	  }
44998d623946Smrg      }]'
45008d623946Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
45018d623946Smrg  # Check for a 64-bit object if we didn't find anything.
45028d623946Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
45038d623946Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
45048d623946Smrg  fi],[])
45058d623946Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
45068d623946Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib
45078d623946Smrg  fi
45088d623946Smrg  ])
45098d623946Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
45108d623946Smrgfi
45118d623946Smrg])# _LT_SYS_MODULE_PATH_AIX
4512ee3138f1Smrg
4513a1ed278cSmrg
45148d623946Smrg# _LT_SHELL_INIT(ARG)
45158d623946Smrg# -------------------
45168d623946Smrgm4_define([_LT_SHELL_INIT],
45178d623946Smrg[m4_divert_text([M4SH-INIT], [$1
45188d623946Smrg])])# _LT_SHELL_INIT
4519ee3138f1Smrg
4520a1ed278cSmrg
4521a1ed278cSmrg
45228d623946Smrg# _LT_PROG_ECHO_BACKSLASH
45238d623946Smrg# -----------------------
45248d623946Smrg# Find how we can fake an echo command that does not interpret backslash.
45258d623946Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
45268d623946Smrg# of the generated configure script that will find a shell with a builtin
45278d623946Smrg# printf (that we can use as an echo command).
45288d623946Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
45298d623946Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45308d623946SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
45318d623946SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
4532a1ed278cSmrg
45338d623946SmrgAC_MSG_CHECKING([how to print strings])
45348d623946Smrg# Test print first, because it will be a builtin if present.
45358d623946Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
45368d623946Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
45378d623946Smrg  ECHO='print -r --'
45388d623946Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
45398d623946Smrg  ECHO='printf %s\n'
45408d623946Smrgelse
45418d623946Smrg  # Use this function as a fallback that always works.
45428d623946Smrg  func_fallback_echo ()
45438d623946Smrg  {
45448d623946Smrg    eval 'cat <<_LTECHO_EOF
45458d623946Smrg$[]1
45468d623946Smrg_LTECHO_EOF'
45478d623946Smrg  }
45488d623946Smrg  ECHO='func_fallback_echo'
45498d623946Smrgfi
4550a1ed278cSmrg
45518d623946Smrg# func_echo_all arg...
45528d623946Smrg# Invoke $ECHO with all args, space-separated.
45538d623946Smrgfunc_echo_all ()
45548d623946Smrg{
45558d623946Smrg    $ECHO "$*"
45568d623946Smrg}
4557a1ed278cSmrg
45588d623946Smrgcase $ECHO in
45598d623946Smrg  printf*) AC_MSG_RESULT([printf]) ;;
45608d623946Smrg  print*) AC_MSG_RESULT([print -r]) ;;
45618d623946Smrg  *) AC_MSG_RESULT([cat]) ;;
45628d623946Smrgesac
4563a1ed278cSmrg
45648d623946Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
45658d623946Smrg[_AS_DETECT_SUGGESTED([
45668d623946Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
45678d623946Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
45688d623946Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
45698d623946Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
45708d623946Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
45718d623946Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
45728d623946Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
4573a1ed278cSmrg
45748d623946Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
45758d623946Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
45768d623946Smrg])# _LT_PROG_ECHO_BACKSLASH
4577a1ed278cSmrg
4578ee3138f1Smrg
45798d623946Smrg# _LT_WITH_SYSROOT
45808d623946Smrg# ----------------
45818d623946SmrgAC_DEFUN([_LT_WITH_SYSROOT],
45828d623946Smrg[m4_require([_LT_DECL_SED])dnl
45838d623946SmrgAC_MSG_CHECKING([for sysroot])
45848d623946SmrgAC_ARG_WITH([sysroot],
45858d623946Smrg[AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@],
45868d623946Smrg  [Search for dependent libraries within DIR (or the compiler's sysroot
45878d623946Smrg   if not specified).])],
45888d623946Smrg[], [with_sysroot=no])
4589ee3138f1Smrg
45908d623946Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
45918d623946Smrgdnl in case the user passed a directory name.
45928d623946Smrglt_sysroot=
45938d623946Smrgcase $with_sysroot in #(
45948d623946Smrg yes)
45958d623946Smrg   if test yes = "$GCC"; then
45968d623946Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
45978d623946Smrg   fi
45988d623946Smrg   ;; #(
45998d623946Smrg /*)
46008d623946Smrg   lt_sysroot=`echo "$with_sysroot" | $SED -e "$sed_quote_subst"`
46018d623946Smrg   ;; #(
46028d623946Smrg no|'')
46038d623946Smrg   ;; #(
46048d623946Smrg *)
46058d623946Smrg   AC_MSG_RESULT([$with_sysroot])
46068d623946Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
46078d623946Smrg   ;;
46088d623946Smrgesac
46093e72ca8cSmrg
46108d623946Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
46118d623946Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
46128d623946Smrg[dependent libraries, and where our libraries should be installed.])])
46133e72ca8cSmrg
46148d623946Smrg# _LT_ENABLE_LOCK
46158d623946Smrg# ---------------
46168d623946Smrgm4_defun([_LT_ENABLE_LOCK],
46178d623946Smrg[AC_ARG_ENABLE([libtool-lock],
46188d623946Smrg  [AS_HELP_STRING([--disable-libtool-lock],
46198d623946Smrg    [avoid locking (might break parallel builds)])])
46208d623946Smrgtest no = "$enable_libtool_lock" || enable_libtool_lock=yes
46213e72ca8cSmrg
46228d623946Smrg# Some flags need to be propagated to the compiler or linker for good
46238d623946Smrg# libtool support.
46248d623946Smrgcase $host in
46258d623946Smrgia64-*-hpux*)
46268d623946Smrg  # Find out what ABI is being produced by ac_compile, and set mode
46278d623946Smrg  # options accordingly.
46288d623946Smrg  echo 'int i;' > conftest.$ac_ext
46298d623946Smrg  if AC_TRY_EVAL(ac_compile); then
46308d623946Smrg    case `$FILECMD conftest.$ac_objext` in
46318d623946Smrg      *ELF-32*)
46328d623946Smrg	HPUX_IA64_MODE=32
46338d623946Smrg	;;
46348d623946Smrg      *ELF-64*)
46358d623946Smrg	HPUX_IA64_MODE=64
46368d623946Smrg	;;
46378d623946Smrg    esac
46388d623946Smrg  fi
46398d623946Smrg  rm -rf conftest*
46408d623946Smrg  ;;
46418d623946Smrg*-*-irix6*)
46428d623946Smrg  # Find out what ABI is being produced by ac_compile, and set linker
46438d623946Smrg  # options accordingly.
46448d623946Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
46458d623946Smrg  if AC_TRY_EVAL(ac_compile); then
46468d623946Smrg    if test yes = "$lt_cv_prog_gnu_ld"; then
46478d623946Smrg      case `$FILECMD conftest.$ac_objext` in
46488d623946Smrg	*32-bit*)
46498d623946Smrg	  LD="${LD-ld} -melf32bsmip"
4650a1ed278cSmrg	  ;;
46518d623946Smrg	*N32*)
46528d623946Smrg	  LD="${LD-ld} -melf32bmipn32"
46533e72ca8cSmrg	  ;;
46548d623946Smrg	*64-bit*)
46558d623946Smrg	  LD="${LD-ld} -melf64bmip"
46568d623946Smrg	;;
46578d623946Smrg      esac
46588d623946Smrg    else
46598d623946Smrg      case `$FILECMD conftest.$ac_objext` in
46608d623946Smrg	*32-bit*)
46618d623946Smrg	  LD="${LD-ld} -32"
46623e72ca8cSmrg	  ;;
46638d623946Smrg	*N32*)
46648d623946Smrg	  LD="${LD-ld} -n32"
46653e72ca8cSmrg	  ;;
46668d623946Smrg	*64-bit*)
46678d623946Smrg	  LD="${LD-ld} -64"
46683e72ca8cSmrg	  ;;
46698d623946Smrg      esac
46708d623946Smrg    fi
46718d623946Smrg  fi
46728d623946Smrg  rm -rf conftest*
46738d623946Smrg  ;;
4674a1ed278cSmrg
46758d623946Smrgmips64*-*linux*)
46768d623946Smrg  # Find out what ABI is being produced by ac_compile, and set linker
46778d623946Smrg  # options accordingly.
46788d623946Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
46798d623946Smrg  if AC_TRY_EVAL(ac_compile); then
46808d623946Smrg    emul=elf
46818d623946Smrg    case `$FILECMD conftest.$ac_objext` in
46828d623946Smrg      *32-bit*)
46838d623946Smrg	emul="${emul}32"
46848d623946Smrg	;;
46858d623946Smrg      *64-bit*)
46868d623946Smrg	emul="${emul}64"
46878d623946Smrg	;;
46888d623946Smrg    esac
46898d623946Smrg    case `$FILECMD conftest.$ac_objext` in
46908d623946Smrg      *MSB*)
46918d623946Smrg	emul="${emul}btsmip"
46928d623946Smrg	;;
46938d623946Smrg      *LSB*)
46948d623946Smrg	emul="${emul}ltsmip"
46958d623946Smrg	;;
46968d623946Smrg    esac
46978d623946Smrg    case `$FILECMD conftest.$ac_objext` in
46988d623946Smrg      *N32*)
46998d623946Smrg	emul="${emul}n32"
47008d623946Smrg	;;
47018d623946Smrg    esac
47028d623946Smrg    LD="${LD-ld} -m $emul"
47038d623946Smrg  fi
47048d623946Smrg  rm -rf conftest*
47058d623946Smrg  ;;
4706ee3138f1Smrg
47078d623946Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
47088d623946Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
47098d623946Smrg  # Find out what ABI is being produced by ac_compile, and set linker
47108d623946Smrg  # options accordingly.  Note that the listed cases only cover the
47118d623946Smrg  # situations where additional linker options are needed (such as when
47128d623946Smrg  # doing 32-bit compilation for a host where ld defaults to 64-bit, or
47138d623946Smrg  # vice versa); the common cases where no linker options are needed do
47148d623946Smrg  # not appear in the list.
47158d623946Smrg  echo 'int i;' > conftest.$ac_ext
47168d623946Smrg  if AC_TRY_EVAL(ac_compile); then
47178d623946Smrg    case `$FILECMD conftest.o` in
47188d623946Smrg      *32-bit*)
47198d623946Smrg	case $host in
47208d623946Smrg	  x86_64-*kfreebsd*-gnu)
47218d623946Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
47228d623946Smrg	    ;;
47238d623946Smrg	  x86_64-*linux*)
47248d623946Smrg	    case `$FILECMD conftest.o` in
47258d623946Smrg	      *x86-64*)
47268d623946Smrg		LD="${LD-ld} -m elf32_x86_64"
47278d623946Smrg		;;
47288d623946Smrg	      *)
47298d623946Smrg		LD="${LD-ld} -m elf_i386"
47308d623946Smrg		;;
47318d623946Smrg	    esac
47328d623946Smrg	    ;;
47338d623946Smrg	  powerpc64le-*linux*)
47348d623946Smrg	    LD="${LD-ld} -m elf32lppclinux"
47358d623946Smrg	    ;;
47368d623946Smrg	  powerpc64-*linux*)
47378d623946Smrg	    LD="${LD-ld} -m elf32ppclinux"
47388d623946Smrg	    ;;
47398d623946Smrg	  s390x-*linux*)
47408d623946Smrg	    LD="${LD-ld} -m elf_s390"
47418d623946Smrg	    ;;
47428d623946Smrg	  sparc64-*linux*)
47438d623946Smrg	    LD="${LD-ld} -m elf32_sparc"
47448d623946Smrg	    ;;
47458d623946Smrg	esac
47468d623946Smrg	;;
47478d623946Smrg      *64-bit*)
47488d623946Smrg	case $host in
47498d623946Smrg	  x86_64-*kfreebsd*-gnu)
47508d623946Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
47518d623946Smrg	    ;;
47528d623946Smrg	  x86_64-*linux*)
47538d623946Smrg	    LD="${LD-ld} -m elf_x86_64"
47548d623946Smrg	    ;;
47558d623946Smrg	  powerpcle-*linux*)
47568d623946Smrg	    LD="${LD-ld} -m elf64lppc"
47578d623946Smrg	    ;;
47588d623946Smrg	  powerpc-*linux*)
47598d623946Smrg	    LD="${LD-ld} -m elf64ppc"
47608d623946Smrg	    ;;
47618d623946Smrg	  s390*-*linux*|s390*-*tpf*)
47628d623946Smrg	    LD="${LD-ld} -m elf64_s390"
47638d623946Smrg	    ;;
47648d623946Smrg	  sparc*-*linux*)
47658d623946Smrg	    LD="${LD-ld} -m elf64_sparc"
47668d623946Smrg	    ;;
47678d623946Smrg	esac
47688d623946Smrg	;;
47698d623946Smrg    esac
47708d623946Smrg  fi
47718d623946Smrg  rm -rf conftest*
47728d623946Smrg  ;;
4773a1ed278cSmrg
47748d623946Smrg*-*-sco3.2v5*)
47758d623946Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
47768d623946Smrg  SAVE_CFLAGS=$CFLAGS
47778d623946Smrg  CFLAGS="$CFLAGS -belf"
47788d623946Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
47798d623946Smrg    [AC_LANG_PUSH(C)
47808d623946Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
47818d623946Smrg     AC_LANG_POP])
47828d623946Smrg  if test yes != "$lt_cv_cc_needs_belf"; then
47838d623946Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
47848d623946Smrg    CFLAGS=$SAVE_CFLAGS
47858d623946Smrg  fi
47868d623946Smrg  ;;
47878d623946Smrg*-*solaris*)
47888d623946Smrg  # Find out what ABI is being produced by ac_compile, and set linker
47898d623946Smrg  # options accordingly.
47908d623946Smrg  echo 'int i;' > conftest.$ac_ext
47918d623946Smrg  if AC_TRY_EVAL(ac_compile); then
47928d623946Smrg    case `$FILECMD conftest.o` in
47938d623946Smrg    *64-bit*)
47948d623946Smrg      case $lt_cv_prog_gnu_ld in
47958d623946Smrg      yes*)
47968d623946Smrg        case $host in
47978d623946Smrg        i?86-*-solaris*|x86_64-*-solaris*)
47988d623946Smrg          LD="${LD-ld} -m elf_x86_64"
47998d623946Smrg          ;;
48008d623946Smrg        sparc*-*-solaris*)
48018d623946Smrg          LD="${LD-ld} -m elf64_sparc"
48028d623946Smrg          ;;
48038d623946Smrg        esac
48048d623946Smrg        # GNU ld 2.21 introduced _sol2 emulations.  Use them if available.
48058d623946Smrg        if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then
48068d623946Smrg          LD=${LD-ld}_sol2
48078d623946Smrg        fi
48088d623946Smrg        ;;
48098d623946Smrg      *)
48108d623946Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
48118d623946Smrg	  LD="${LD-ld} -64"
48128d623946Smrg	fi
4813fe24f8a2Smrg	;;
4814fe24f8a2Smrg      esac
4815fe24f8a2Smrg      ;;
48168d623946Smrg    esac
48178d623946Smrg  fi
48188d623946Smrg  rm -rf conftest*
48198d623946Smrg  ;;
48208d623946Smrgesac
4821fe24f8a2Smrg
48228d623946Smrgneed_locks=$enable_libtool_lock
48238d623946Smrg])# _LT_ENABLE_LOCK
482434977a2fSmrg
4825ee3138f1Smrg
48268d623946Smrg# _LT_PROG_AR
48278d623946Smrg# -----------
48288d623946Smrgm4_defun([_LT_PROG_AR],
48298d623946Smrg[AC_CHECK_TOOLS(AR, [ar], false)
48308d623946Smrg: ${AR=ar}
48318d623946Smrg_LT_DECL([], [AR], [1], [The archiver])
4832ee3138f1Smrg
48338d623946Smrg# Use ARFLAGS variable as AR's operation code to sync the variable naming with
48348d623946Smrg# Automake.  If both AR_FLAGS and ARFLAGS are specified, AR_FLAGS should have
48358d623946Smrg# higher priority because thats what people were doing historically (setting
48368d623946Smrg# ARFLAGS for automake and AR_FLAGS for libtool).  FIXME: Make the AR_FLAGS
48378d623946Smrg# variable obsoleted/removed.
4838ee3138f1Smrg
48398d623946Smrgtest ${AR_FLAGS+y} || AR_FLAGS=${ARFLAGS-cr}
48408d623946Smrglt_ar_flags=$AR_FLAGS
48418d623946Smrg_LT_DECL([], [lt_ar_flags], [0], [Flags to create an archive (by configure)])
4842ee3138f1Smrg
48438d623946Smrg# Make AR_FLAGS overridable by 'make ARFLAGS='.  Don't try to run-time override
48448d623946Smrg# by AR_FLAGS because that was never working and AR_FLAGS is about to die.
48458d623946Smrg_LT_DECL([], [AR_FLAGS], [\@S|@{ARFLAGS-"\@S|@lt_ar_flags"}],
48468d623946Smrg         [Flags to create an archive])
4847ee3138f1Smrg
48488d623946SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
48498d623946Smrg  [lt_cv_ar_at_file=no
48508d623946Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
48518d623946Smrg     [echo conftest.$ac_objext > conftest.lst
48528d623946Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
48538d623946Smrg      AC_TRY_EVAL([lt_ar_try])
48548d623946Smrg      if test 0 -eq "$ac_status"; then
48558d623946Smrg	# Ensure the archiver fails upon bogus file names.
48568d623946Smrg	rm -f conftest.$ac_objext libconftest.a
48578d623946Smrg	AC_TRY_EVAL([lt_ar_try])
48588d623946Smrg	if test 0 -ne "$ac_status"; then
48598d623946Smrg          lt_cv_ar_at_file=@
48608d623946Smrg        fi
48613e72ca8cSmrg      fi
48628d623946Smrg      rm -f conftest.* libconftest.a
48638d623946Smrg     ])
48648d623946Smrg  ])
4865ee3138f1Smrg
48668d623946Smrgif test no = "$lt_cv_ar_at_file"; then
48678d623946Smrg  archiver_list_spec=
48688d623946Smrgelse
48698d623946Smrg  archiver_list_spec=$lt_cv_ar_at_file
48708d623946Smrgfi
48718d623946Smrg_LT_DECL([], [archiver_list_spec], [1],
48728d623946Smrg  [How to feed a file listing to the archiver])
48738d623946Smrg])# _LT_PROG_AR
4874a1ed278cSmrg
4875a1ed278cSmrg
48768d623946Smrg# _LT_CMD_OLD_ARCHIVE
48778d623946Smrg# -------------------
48788d623946Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
48798d623946Smrg[_LT_PROG_AR
4880a1ed278cSmrg
48818d623946SmrgAC_CHECK_TOOL(STRIP, strip, :)
48828d623946Smrgtest -z "$STRIP" && STRIP=:
48838d623946Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
4884a1ed278cSmrg
48858d623946SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
48868d623946Smrgtest -z "$RANLIB" && RANLIB=:
48878d623946Smrg_LT_DECL([], [RANLIB], [1],
48888d623946Smrg    [Commands used to install an old-style archive])
4889a1ed278cSmrg
48908d623946Smrg# Determine commands to create old-style static archives.
48918d623946Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
48928d623946Smrgold_postinstall_cmds='chmod 644 $oldlib'
48938d623946Smrgold_postuninstall_cmds=
4894a1ed278cSmrg
48958d623946Smrgif test -n "$RANLIB"; then
48968d623946Smrg  case $host_os in
48978d623946Smrg  bitrig* | openbsd*)
48988d623946Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib"
48998d623946Smrg    ;;
49008d623946Smrg  *)
49018d623946Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib"
49028d623946Smrg    ;;
49038d623946Smrg  esac
49048d623946Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib"
49058d623946Smrgfi
490634977a2fSmrg
49078d623946Smrgcase $host_os in
49088d623946Smrg  darwin*)
49098d623946Smrg    lock_old_archive_extraction=yes ;;
49108d623946Smrg  *)
49118d623946Smrg    lock_old_archive_extraction=no ;;
49128d623946Smrgesac
49138d623946Smrg_LT_DECL([], [old_postinstall_cmds], [2])
49148d623946Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
49158d623946Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
49168d623946Smrg    [Commands used to build an old-style archive])
49178d623946Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
49188d623946Smrg    [Whether to use a lock for old archive extraction])
49198d623946Smrg])# _LT_CMD_OLD_ARCHIVE
492034977a2fSmrg
4921ee3138f1Smrg
49228d623946Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
49238d623946Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
49248d623946Smrg# ----------------------------------------------------------------
49258d623946Smrg# Check whether the given compiler option works
49268d623946SmrgAC_DEFUN([_LT_COMPILER_OPTION],
49278d623946Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
49288d623946Smrgm4_require([_LT_DECL_SED])dnl
49298d623946SmrgAC_CACHE_CHECK([$1], [$2],
49308d623946Smrg  [$2=no
49318d623946Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
49328d623946Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
49338d623946Smrg   lt_compiler_flag="$3"  ## exclude from sc_useless_quotes_in_assignment
49348d623946Smrg   # Insert the option either (1) after the last *FLAGS variable, or
49358d623946Smrg   # (2) before a word containing "conftest.", or (3) at the end.
49368d623946Smrg   # Note that $ac_compile itself does not contain backslashes and begins
49378d623946Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
49388d623946Smrg   # The option is referenced via a variable to avoid confusing sed.
49398d623946Smrg   lt_compile=`echo "$ac_compile" | $SED \
49408d623946Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
49418d623946Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
49428d623946Smrg   -e 's:$: $lt_compiler_flag:'`
49438d623946Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
49448d623946Smrg   (eval "$lt_compile" 2>conftest.err)
49458d623946Smrg   ac_status=$?
49468d623946Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
49478d623946Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
49488d623946Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
49498d623946Smrg     # The compiler can only warn and ignore the option if not recognized
49508d623946Smrg     # So say no if there are warnings other than the usual output.
49518d623946Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
49528d623946Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
49538d623946Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
49548d623946Smrg       $2=yes
49558d623946Smrg     fi
49568d623946Smrg   fi
49578d623946Smrg   $RM conftest*
49583e72ca8cSmrg])
4959ee3138f1Smrg
49608d623946Smrgif test yes = "[$]$2"; then
49618d623946Smrg    m4_if([$5], , :, [$5])
49628d623946Smrgelse
49638d623946Smrg    m4_if([$6], , :, [$6])
49648d623946Smrgfi
49658d623946Smrg])# _LT_COMPILER_OPTION
4966ee3138f1Smrg
49678d623946Smrg# Old name:
49688d623946SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
49698d623946Smrgdnl aclocal-1.4 backwards compatibility:
49708d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
4971ee3138f1Smrg
497234977a2fSmrg
49738d623946Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
49748d623946Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
49758d623946Smrg# ----------------------------------------------------
49768d623946Smrg# Check whether the given linker option works
49778d623946SmrgAC_DEFUN([_LT_LINKER_OPTION],
49788d623946Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
49798d623946Smrgm4_require([_LT_DECL_SED])dnl
49808d623946SmrgAC_CACHE_CHECK([$1], [$2],
49818d623946Smrg  [$2=no
49828d623946Smrg   save_LDFLAGS=$LDFLAGS
49838d623946Smrg   LDFLAGS="$LDFLAGS $3"
49848d623946Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
49858d623946Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
49868d623946Smrg     # The linker can only warn and ignore the option if not recognized
49878d623946Smrg     # So say no if there are warnings
49888d623946Smrg     if test -s conftest.err; then
49898d623946Smrg       # Append any errors to the config.log.
49908d623946Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
49918d623946Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
49928d623946Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
49938d623946Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
49948d623946Smrg         $2=yes
49958d623946Smrg       fi
49968d623946Smrg     else
49978d623946Smrg       $2=yes
49988d623946Smrg     fi
49998d623946Smrg   fi
50008d623946Smrg   $RM -r conftest*
50018d623946Smrg   LDFLAGS=$save_LDFLAGS
50028d623946Smrg])
5003a1ed278cSmrg
50048d623946Smrgif test yes = "[$]$2"; then
50058d623946Smrg    m4_if([$4], , :, [$4])
50068d623946Smrgelse
50078d623946Smrg    m4_if([$5], , :, [$5])
50088d623946Smrgfi
50098d623946Smrg])# _LT_LINKER_OPTION
501034977a2fSmrg
50118d623946Smrg# Old name:
50128d623946SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
50138d623946Smrgdnl aclocal-1.4 backwards compatibility:
50148d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
501534977a2fSmrg
501634977a2fSmrg
50178d623946Smrg# LT_CMD_MAX_LEN
50188d623946Smrg#---------------
50198d623946SmrgAC_DEFUN([LT_CMD_MAX_LEN],
50208d623946Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
50218d623946Smrg# find the maximum length of command line arguments
50228d623946SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
50238d623946SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
50248d623946Smrg  i=0
50258d623946Smrg  teststring=ABCD
5026ee3138f1Smrg
50278d623946Smrg  case $build_os in
50288d623946Smrg  msdosdjgpp*)
50298d623946Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
50308d623946Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
50318d623946Smrg    # during glob expansion).  Even if it were fixed, the result of this
50328d623946Smrg    # check would be larger than it should be.
50338d623946Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
50348d623946Smrg    ;;
5035ee3138f1Smrg
50368d623946Smrg  gnu*)
50378d623946Smrg    # Under GNU Hurd, this test is not required because there is
50388d623946Smrg    # no limit to the length of command line arguments.
50398d623946Smrg    # Libtool will interpret -1 as no limit whatsoever
50408d623946Smrg    lt_cv_sys_max_cmd_len=-1;
50418d623946Smrg    ;;
5042a1ed278cSmrg
50438d623946Smrg  cygwin* | mingw* | cegcc*)
50448d623946Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
50458d623946Smrg    # about 5 minutes as the teststring grows exponentially.
50468d623946Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
50478d623946Smrg    # you end up with a "frozen" computer, even though with patience
50488d623946Smrg    # the test eventually succeeds (with a max line length of 256k).
50498d623946Smrg    # Instead, let's just punt: use the minimum linelength reported by
50508d623946Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
50518d623946Smrg    lt_cv_sys_max_cmd_len=8192;
50528d623946Smrg    ;;
5053ee3138f1Smrg
50548d623946Smrg  mint*)
50558d623946Smrg    # On MiNT this can take a long time and run out of memory.
50568d623946Smrg    lt_cv_sys_max_cmd_len=8192;
50578d623946Smrg    ;;
5058ee3138f1Smrg
50598d623946Smrg  amigaos*)
50608d623946Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
50618d623946Smrg    # So we just punt and use a minimum line length of 8192.
50628d623946Smrg    lt_cv_sys_max_cmd_len=8192;
50638d623946Smrg    ;;
5064ee3138f1Smrg
50658d623946Smrg  bitrig* | darwin* | dragonfly* | freebsd* | midnightbsd* | netbsd* | openbsd*)
50668d623946Smrg    # This has been around since 386BSD, at least.  Likely further.
50678d623946Smrg    if test -x /sbin/sysctl; then
50688d623946Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
50698d623946Smrg    elif test -x /usr/sbin/sysctl; then
50708d623946Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
50718d623946Smrg    else
50728d623946Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
50733e72ca8cSmrg    fi
50748d623946Smrg    # And add a safety zone
50758d623946Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
50768d623946Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
50773e72ca8cSmrg    ;;
5078ee3138f1Smrg
50798d623946Smrg  interix*)
50808d623946Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
50818d623946Smrg    lt_cv_sys_max_cmd_len=196608
50828d623946Smrg    ;;
50838d623946Smrg
50848d623946Smrg  os2*)
50858d623946Smrg    # The test takes a long time on OS/2.
50868d623946Smrg    lt_cv_sys_max_cmd_len=8192
50878d623946Smrg    ;;
50888d623946Smrg
50898d623946Smrg  osf*)
50908d623946Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
50918d623946Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
50928d623946Smrg    # nice to cause kernel panics so lets avoid the loop below.
50938d623946Smrg    # First set a reasonable default.
50948d623946Smrg    lt_cv_sys_max_cmd_len=16384
50958d623946Smrg    #
50968d623946Smrg    if test -x /sbin/sysconfig; then
50978d623946Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
50988d623946Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
5099fe24f8a2Smrg      esac
51003e72ca8cSmrg    fi
51013e72ca8cSmrg    ;;
51028d623946Smrg  sco3.2v5*)
51038d623946Smrg    lt_cv_sys_max_cmd_len=102400
51048d623946Smrg    ;;
51058d623946Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
51068d623946Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
51078d623946Smrg    if test -n "$kargmax"; then
51088d623946Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | $SED 's/.*[[	 ]]//'`
51098d623946Smrg    else
51108d623946Smrg      lt_cv_sys_max_cmd_len=32768
51118d623946Smrg    fi
51128d623946Smrg    ;;
51138d623946Smrg  *)
51148d623946Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
51158d623946Smrg    if test -n "$lt_cv_sys_max_cmd_len" && \
51168d623946Smrg       test undefined != "$lt_cv_sys_max_cmd_len"; then
51178d623946Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
51188d623946Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
51198d623946Smrg    else
51208d623946Smrg      # Make teststring a little bigger before we do anything with it.
51218d623946Smrg      # a 1K string should be a reasonable start.
51228d623946Smrg      for i in 1 2 3 4 5 6 7 8; do
51238d623946Smrg        teststring=$teststring$teststring
51248d623946Smrg      done
51258d623946Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
51268d623946Smrg      # If test is not a shell built-in, we'll probably end up computing a
51278d623946Smrg      # maximum length that is only half of the actual maximum length, but
51288d623946Smrg      # we can't tell.
51298d623946Smrg      while { test X`env echo "$teststring$teststring" 2>/dev/null` \
51308d623946Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
51318d623946Smrg	      test 17 != "$i" # 1/2 MB should be enough
51328d623946Smrg      do
51338d623946Smrg        i=`expr $i + 1`
51348d623946Smrg        teststring=$teststring$teststring
51358d623946Smrg      done
51368d623946Smrg      # Only check the string length outside the loop.
51378d623946Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
51388d623946Smrg      teststring=
51398d623946Smrg      # Add a significant safety factor because C++ compilers can tack on
51408d623946Smrg      # massive amounts of additional arguments before passing them to the
51418d623946Smrg      # linker.  It appears as though 1/2 is a usable value.
51428d623946Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
51438d623946Smrg    fi
51448d623946Smrg    ;;
51453e72ca8cSmrg  esac
51468d623946Smrg])
51478d623946Smrgif test -n "$lt_cv_sys_max_cmd_len"; then
51488d623946Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
51493e72ca8cSmrgelse
51508d623946Smrg  AC_MSG_RESULT(none)
5151a1ed278cSmrgfi
51528d623946Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
51538d623946Smrg_LT_DECL([], [max_cmd_len], [0],
51548d623946Smrg    [What is the maximum length of a command?])
51558d623946Smrg])# LT_CMD_MAX_LEN
5156a1ed278cSmrg
51578d623946Smrg# Old name:
51588d623946SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
51598d623946Smrgdnl aclocal-1.4 backwards compatibility:
51608d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
516134977a2fSmrg
516234977a2fSmrg
51638d623946Smrg# _LT_HEADER_DLFCN
51648d623946Smrg# ----------------
51658d623946Smrgm4_defun([_LT_HEADER_DLFCN],
51668d623946Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
51678d623946Smrg])# _LT_HEADER_DLFCN
516834977a2fSmrg
516934977a2fSmrg
51708d623946Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
51718d623946Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
51728d623946Smrg# ----------------------------------------------------------------
51738d623946Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
51748d623946Smrg[m4_require([_LT_HEADER_DLFCN])dnl
51758d623946Smrgif test yes = "$cross_compiling"; then :
51768d623946Smrg  [$4]
51778d623946Smrgelse
51788d623946Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
51798d623946Smrg  lt_status=$lt_dlunknown
51808d623946Smrg  cat > conftest.$ac_ext <<_LT_EOF
51818d623946Smrg[#line $LINENO "configure"
51828d623946Smrg#include "confdefs.h"
518334977a2fSmrg
51848d623946Smrg#if HAVE_DLFCN_H
51858d623946Smrg#include <dlfcn.h>
51868d623946Smrg#endif
5187b425557eSmrg
51888d623946Smrg#include <stdio.h>
51893e72ca8cSmrg
51908d623946Smrg#ifdef RTLD_GLOBAL
51918d623946Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
51928d623946Smrg#else
51938d623946Smrg#  ifdef DL_GLOBAL
51948d623946Smrg#    define LT_DLGLOBAL		DL_GLOBAL
51958d623946Smrg#  else
51968d623946Smrg#    define LT_DLGLOBAL		0
51978d623946Smrg#  endif
51988d623946Smrg#endif
51993e72ca8cSmrg
52008d623946Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
52018d623946Smrg   find out it does not work in some platform. */
52028d623946Smrg#ifndef LT_DLLAZY_OR_NOW
52038d623946Smrg#  ifdef RTLD_LAZY
52048d623946Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
52058d623946Smrg#  else
52068d623946Smrg#    ifdef DL_LAZY
52078d623946Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
52088d623946Smrg#    else
52098d623946Smrg#      ifdef RTLD_NOW
52108d623946Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
52118d623946Smrg#      else
52128d623946Smrg#        ifdef DL_NOW
52138d623946Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
52148d623946Smrg#        else
52158d623946Smrg#          define LT_DLLAZY_OR_NOW	0
52168d623946Smrg#        endif
52178d623946Smrg#      endif
52188d623946Smrg#    endif
52198d623946Smrg#  endif
52208d623946Smrg#endif
52213e72ca8cSmrg
52228d623946Smrg/* When -fvisibility=hidden is used, assume the code has been annotated
52238d623946Smrg   correspondingly for the symbols needed.  */
52248d623946Smrg#if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
52258d623946Smrgint fnord () __attribute__((visibility("default")));
52268d623946Smrg#endif
52273e72ca8cSmrg
52288d623946Smrgint fnord () { return 42; }
52298d623946Smrgint main ()
52308d623946Smrg{
52318d623946Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
52328d623946Smrg  int status = $lt_dlunknown;
52333e72ca8cSmrg
52348d623946Smrg  if (self)
52358d623946Smrg    {
52368d623946Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
52373e72ca8cSmrg      else
52388d623946Smrg        {
52398d623946Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
52408d623946Smrg          else puts (dlerror ());
52418d623946Smrg	}
52428d623946Smrg      /* dlclose (self); */
52438d623946Smrg    }
52448d623946Smrg  else
52458d623946Smrg    puts (dlerror ());
52463e72ca8cSmrg
52478d623946Smrg  return status;
52488d623946Smrg}]
52498d623946Smrg_LT_EOF
52508d623946Smrg  if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then
52518d623946Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
52528d623946Smrg    lt_status=$?
52538d623946Smrg    case x$lt_status in
52548d623946Smrg      x$lt_dlno_uscore) $1 ;;
52558d623946Smrg      x$lt_dlneed_uscore) $2 ;;
52568d623946Smrg      x$lt_dlunknown|x*) $3 ;;
52578d623946Smrg    esac
52588d623946Smrg  else :
52598d623946Smrg    # compilation failed
52608d623946Smrg    $3
52618d623946Smrg  fi
52628d623946Smrgfi
52638d623946Smrgrm -fr conftest*
52648d623946Smrg])# _LT_TRY_DLOPEN_SELF
52653e72ca8cSmrg
5266a1ed278cSmrg
52678d623946Smrg# LT_SYS_DLOPEN_SELF
52688d623946Smrg# ------------------
52698d623946SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
52708d623946Smrg[m4_require([_LT_HEADER_DLFCN])dnl
52718d623946Smrgif test yes != "$enable_dlopen"; then
52728d623946Smrg  enable_dlopen=unknown
52738d623946Smrg  enable_dlopen_self=unknown
52748d623946Smrg  enable_dlopen_self_static=unknown
52758d623946Smrgelse
52768d623946Smrg  lt_cv_dlopen=no
52778d623946Smrg  lt_cv_dlopen_libs=
5278a1ed278cSmrg
52798d623946Smrg  case $host_os in
52808d623946Smrg  beos*)
52818d623946Smrg    lt_cv_dlopen=load_add_on
52828d623946Smrg    lt_cv_dlopen_libs=
52838d623946Smrg    lt_cv_dlopen_self=yes
52848d623946Smrg    ;;
528534977a2fSmrg
52868d623946Smrg  mingw* | pw32* | cegcc*)
52878d623946Smrg    lt_cv_dlopen=LoadLibrary
52888d623946Smrg    lt_cv_dlopen_libs=
52898d623946Smrg    ;;
5290ee3138f1Smrg
52918d623946Smrg  cygwin*)
52928d623946Smrg    lt_cv_dlopen=dlopen
52938d623946Smrg    lt_cv_dlopen_libs=
52948d623946Smrg    ;;
5295ee3138f1Smrg
52968d623946Smrg  darwin*)
52978d623946Smrg    # if libdl is installed we need to link against it
52988d623946Smrg    AC_CHECK_LIB([dl], [dlopen],
52998d623946Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[
53008d623946Smrg    lt_cv_dlopen=dyld
53018d623946Smrg    lt_cv_dlopen_libs=
53028d623946Smrg    lt_cv_dlopen_self=yes
53038d623946Smrg    ])
53048d623946Smrg    ;;
5305a1ed278cSmrg
53068d623946Smrg  tpf*)
53078d623946Smrg    # Don't try to run any link tests for TPF.  We know it's impossible
53088d623946Smrg    # because TPF is a cross-compiler, and we know how we open DSOs.
53098d623946Smrg    lt_cv_dlopen=dlopen
53108d623946Smrg    lt_cv_dlopen_libs=
53118d623946Smrg    lt_cv_dlopen_self=no
53128d623946Smrg    ;;
5313a1ed278cSmrg
53148d623946Smrg  *)
53158d623946Smrg    AC_CHECK_FUNC([shl_load],
53168d623946Smrg	  [lt_cv_dlopen=shl_load],
53178d623946Smrg      [AC_CHECK_LIB([dld], [shl_load],
53188d623946Smrg	    [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld],
53198d623946Smrg	[AC_CHECK_FUNC([dlopen],
53208d623946Smrg	      [lt_cv_dlopen=dlopen],
53218d623946Smrg	  [AC_CHECK_LIB([dl], [dlopen],
53228d623946Smrg		[lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],
53238d623946Smrg	    [AC_CHECK_LIB([svld], [dlopen],
53248d623946Smrg		  [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld],
53258d623946Smrg	      [AC_CHECK_LIB([dld], [dld_link],
53268d623946Smrg		    [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld])
53278d623946Smrg	      ])
53288d623946Smrg	    ])
53298d623946Smrg	  ])
53308d623946Smrg	])
53318d623946Smrg      ])
53328d623946Smrg    ;;
53338d623946Smrg  esac
5334ee3138f1Smrg
53358d623946Smrg  if test no = "$lt_cv_dlopen"; then
53368d623946Smrg    enable_dlopen=no
53378d623946Smrg  else
53388d623946Smrg    enable_dlopen=yes
53398d623946Smrg  fi
5340ee3138f1Smrg
53418d623946Smrg  case $lt_cv_dlopen in
53428d623946Smrg  dlopen)
53438d623946Smrg    save_CPPFLAGS=$CPPFLAGS
53448d623946Smrg    test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
5345a1ed278cSmrg
53468d623946Smrg    save_LDFLAGS=$LDFLAGS
53478d623946Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
5348a1ed278cSmrg
53498d623946Smrg    save_LIBS=$LIBS
53508d623946Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
5351a1ed278cSmrg
53528d623946Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
53538d623946Smrg	  lt_cv_dlopen_self, [dnl
53548d623946Smrg	  _LT_TRY_DLOPEN_SELF(
53558d623946Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
53568d623946Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
53578d623946Smrg    ])
53583e72ca8cSmrg
53598d623946Smrg    if test yes = "$lt_cv_dlopen_self"; then
53608d623946Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
53618d623946Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
53628d623946Smrg	  lt_cv_dlopen_self_static, [dnl
53638d623946Smrg	  _LT_TRY_DLOPEN_SELF(
53648d623946Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
53658d623946Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
53668d623946Smrg      ])
53678d623946Smrg    fi
5368ee3138f1Smrg
53698d623946Smrg    CPPFLAGS=$save_CPPFLAGS
53708d623946Smrg    LDFLAGS=$save_LDFLAGS
53718d623946Smrg    LIBS=$save_LIBS
53728d623946Smrg    ;;
53738d623946Smrg  esac
5374fe24f8a2Smrg
53758d623946Smrg  case $lt_cv_dlopen_self in
53768d623946Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
53778d623946Smrg  *) enable_dlopen_self=unknown ;;
53788d623946Smrg  esac
5379ee3138f1Smrg
53808d623946Smrg  case $lt_cv_dlopen_self_static in
53818d623946Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
53828d623946Smrg  *) enable_dlopen_self_static=unknown ;;
53838d623946Smrg  esac
53848d623946Smrgfi
53858d623946Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
53868d623946Smrg	 [Whether dlopen is supported])
53878d623946Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
53888d623946Smrg	 [Whether dlopen of programs is supported])
53898d623946Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
53908d623946Smrg	 [Whether dlopen of statically linked programs is supported])
53918d623946Smrg])# LT_SYS_DLOPEN_SELF
53923e72ca8cSmrg
53938d623946Smrg# Old name:
53948d623946SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
53958d623946Smrgdnl aclocal-1.4 backwards compatibility:
53968d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
53973e72ca8cSmrg
53983e72ca8cSmrg
53998d623946Smrg# _LT_COMPILER_C_O([TAGNAME])
54008d623946Smrg# ---------------------------
54018d623946Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
54028d623946Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
54038d623946Smrgm4_defun([_LT_COMPILER_C_O],
54048d623946Smrg[m4_require([_LT_DECL_SED])dnl
54058d623946Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
54068d623946Smrgm4_require([_LT_TAG_COMPILER])dnl
54078d623946SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
54088d623946Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
54098d623946Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
54108d623946Smrg   $RM -r conftest 2>/dev/null
54118d623946Smrg   mkdir conftest
54128d623946Smrg   cd conftest
54138d623946Smrg   mkdir out
54148d623946Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
5415ee3138f1Smrg
54168d623946Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
54178d623946Smrg   # Insert the option either (1) after the last *FLAGS variable, or
54188d623946Smrg   # (2) before a word containing "conftest.", or (3) at the end.
54198d623946Smrg   # Note that $ac_compile itself does not contain backslashes and begins
54208d623946Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
54218d623946Smrg   lt_compile=`echo "$ac_compile" | $SED \
54228d623946Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
54238d623946Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
54248d623946Smrg   -e 's:$: $lt_compiler_flag:'`
54258d623946Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
54268d623946Smrg   (eval "$lt_compile" 2>out/conftest.err)
54278d623946Smrg   ac_status=$?
54288d623946Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
54298d623946Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
54308d623946Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
54318d623946Smrg   then
54328d623946Smrg     # The compiler can only warn and ignore the option if not recognized
54338d623946Smrg     # So say no if there are warnings
54348d623946Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
54358d623946Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
54368d623946Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
54378d623946Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
54388d623946Smrg     fi
54398d623946Smrg   fi
54408d623946Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
54418d623946Smrg   $RM conftest*
54428d623946Smrg   # SGI C++ compiler will create directory out/ii_files/ for
54438d623946Smrg   # template instantiation
54448d623946Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
54458d623946Smrg   $RM out/* && rmdir out
54468d623946Smrg   cd ..
54478d623946Smrg   $RM -r conftest
54488d623946Smrg   $RM conftest*
54498d623946Smrg])
54508d623946Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
54518d623946Smrg	[Does compiler simultaneously support -c and -o options?])
54528d623946Smrg])# _LT_COMPILER_C_O
5453ee3138f1Smrg
5454a1ed278cSmrg
54558d623946Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
54568d623946Smrg# ----------------------------------
54578d623946Smrg# Check to see if we can do hard links to lock some files if needed
54588d623946Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
54598d623946Smrg[m4_require([_LT_ENABLE_LOCK])dnl
54608d623946Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
54618d623946Smrg_LT_COMPILER_C_O([$1])
5462a1ed278cSmrg
54638d623946Smrghard_links=nottested
54648d623946Smrgif test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then
54658d623946Smrg  # do not overwrite the value of need_locks provided by the user
54668d623946Smrg  AC_MSG_CHECKING([if we can lock with hard links])
54678d623946Smrg  hard_links=yes
54688d623946Smrg  $RM conftest*
54698d623946Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
54708d623946Smrg  touch conftest.a
54718d623946Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
54728d623946Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
54738d623946Smrg  AC_MSG_RESULT([$hard_links])
54748d623946Smrg  if test no = "$hard_links"; then
54758d623946Smrg    AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe])
54768d623946Smrg    need_locks=warn
54778d623946Smrg  fi
54788d623946Smrgelse
54798d623946Smrg  need_locks=no
54808d623946Smrgfi
54818d623946Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
54828d623946Smrg])# _LT_COMPILER_FILE_LOCKS
5483a1ed278cSmrg
5484ee3138f1Smrg
54858d623946Smrg# _LT_CHECK_OBJDIR
54868d623946Smrg# ----------------
54878d623946Smrgm4_defun([_LT_CHECK_OBJDIR],
54888d623946Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
54898d623946Smrg[rm -f .libs 2>/dev/null
54908d623946Smrgmkdir .libs 2>/dev/null
54918d623946Smrgif test -d .libs; then
54928d623946Smrg  lt_cv_objdir=.libs
54938d623946Smrgelse
54948d623946Smrg  # MS-DOS does not allow filenames that begin with a dot.
54958d623946Smrg  lt_cv_objdir=_libs
54968d623946Smrgfi
54978d623946Smrgrmdir .libs 2>/dev/null])
54988d623946Smrgobjdir=$lt_cv_objdir
54998d623946Smrg_LT_DECL([], [objdir], [0],
55008d623946Smrg         [The name of the directory that contains temporary libtool files])dnl
55018d623946Smrgm4_pattern_allow([LT_OBJDIR])dnl
55028d623946SmrgAC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/",
55038d623946Smrg  [Define to the sub-directory where libtool stores uninstalled libraries.])
55048d623946Smrg])# _LT_CHECK_OBJDIR
550534977a2fSmrg
550634977a2fSmrg
55078d623946Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
55088d623946Smrg# --------------------------------------
55098d623946Smrg# Check hardcoding attributes.
55108d623946Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
55118d623946Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
55128d623946Smrg_LT_TAGVAR(hardcode_action, $1)=
55138d623946Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
55148d623946Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
55158d623946Smrg   test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then
551634977a2fSmrg
55178d623946Smrg  # We can hardcode non-existent directories.
55188d623946Smrg  if test no != "$_LT_TAGVAR(hardcode_direct, $1)" &&
55198d623946Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
55208d623946Smrg     # have to relink, otherwise we might link with an installed library
55218d623946Smrg     # when we should be linking with a yet-to-be-installed one
55228d623946Smrg     ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" &&
55238d623946Smrg     test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then
55248d623946Smrg    # Linking always hardcodes the temporary library directory.
55258d623946Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
55268d623946Smrg  else
55278d623946Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
55288d623946Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
55298d623946Smrg  fi
55308d623946Smrgelse
55318d623946Smrg  # We cannot hardcode anything, or else we can only hardcode existing
55328d623946Smrg  # directories.
55338d623946Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
55348d623946Smrgfi
55358d623946SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
5536a1ed278cSmrg
55378d623946Smrgif test relink = "$_LT_TAGVAR(hardcode_action, $1)" ||
55388d623946Smrg   test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then
55398d623946Smrg  # Fast installation is not supported
55408d623946Smrg  enable_fast_install=no
55418d623946Smrgelif test yes = "$shlibpath_overrides_runpath" ||
55428d623946Smrg     test no = "$enable_shared"; then
55438d623946Smrg  # Fast installation is not necessary
55448d623946Smrg  enable_fast_install=needless
55458d623946Smrgfi
55468d623946Smrg_LT_TAGDECL([], [hardcode_action], [0],
55478d623946Smrg    [How to hardcode a shared library path into an executable])
55488d623946Smrg])# _LT_LINKER_HARDCODE_LIBPATH
5549a1ed278cSmrg
5550a1ed278cSmrg
55518d623946Smrg# _LT_CMD_STRIPLIB
55528d623946Smrg# ----------------
55538d623946Smrgm4_defun([_LT_CMD_STRIPLIB],
55548d623946Smrg[m4_require([_LT_DECL_EGREP])
55558d623946Smrgstriplib=
55568d623946Smrgold_striplib=
55578d623946SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
55588d623946Smrgif test -z "$STRIP"; then
55598d623946Smrg  AC_MSG_RESULT([no])
55608d623946Smrgelse
55618d623946Smrg  if $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
55628d623946Smrg    old_striplib="$STRIP --strip-debug"
55638d623946Smrg    striplib="$STRIP --strip-unneeded"
55648d623946Smrg    AC_MSG_RESULT([yes])
55658d623946Smrg  else
55668d623946Smrg    case $host_os in
55678d623946Smrg    darwin*)
55688d623946Smrg      # FIXME - insert some real tests, host_os isn't really good enough
55698d623946Smrg      striplib="$STRIP -x"
55708d623946Smrg      old_striplib="$STRIP -S"
55718d623946Smrg      AC_MSG_RESULT([yes])
55728d623946Smrg      ;;
55738d623946Smrg    freebsd*)
55748d623946Smrg      if $STRIP -V 2>&1 | $GREP "elftoolchain" >/dev/null; then
55758d623946Smrg        old_striplib="$STRIP --strip-debug"
55768d623946Smrg        striplib="$STRIP --strip-unneeded"
55778d623946Smrg        AC_MSG_RESULT([yes])
55788d623946Smrg      else
55798d623946Smrg        AC_MSG_RESULT([no])
55808d623946Smrg      fi
55818d623946Smrg      ;;
55828d623946Smrg    *)
55838d623946Smrg      AC_MSG_RESULT([no])
55848d623946Smrg      ;;
55858d623946Smrg    esac
55868d623946Smrg  fi
55878d623946Smrgfi
55888d623946Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
55898d623946Smrg_LT_DECL([], [striplib], [1])
55908d623946Smrg])# _LT_CMD_STRIPLIB
5591a1ed278cSmrg
5592a1ed278cSmrg
55938d623946Smrg# _LT_PREPARE_MUNGE_PATH_LIST
55948d623946Smrg# ---------------------------
55958d623946Smrg# Make sure func_munge_path_list() is defined correctly.
55968d623946Smrgm4_defun([_LT_PREPARE_MUNGE_PATH_LIST],
55978d623946Smrg[[# func_munge_path_list VARIABLE PATH
55988d623946Smrg# -----------------------------------
55998d623946Smrg# VARIABLE is name of variable containing _space_ separated list of
56008d623946Smrg# directories to be munged by the contents of PATH, which is string
56018d623946Smrg# having a format:
56028d623946Smrg# "DIR[:DIR]:"
56038d623946Smrg#       string "DIR[ DIR]" will be prepended to VARIABLE
56048d623946Smrg# ":DIR[:DIR]"
56058d623946Smrg#       string "DIR[ DIR]" will be appended to VARIABLE
56068d623946Smrg# "DIRP[:DIRP]::[DIRA:]DIRA"
56078d623946Smrg#       string "DIRP[ DIRP]" will be prepended to VARIABLE and string
56088d623946Smrg#       "DIRA[ DIRA]" will be appended to VARIABLE
56098d623946Smrg# "DIR[:DIR]"
56108d623946Smrg#       VARIABLE will be replaced by "DIR[ DIR]"
56118d623946Smrgfunc_munge_path_list ()
56128d623946Smrg{
56138d623946Smrg    case x@S|@2 in
56148d623946Smrg    x)
56158d623946Smrg        ;;
56168d623946Smrg    *:)
56178d623946Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\"
56188d623946Smrg        ;;
56198d623946Smrg    x:*)
56208d623946Smrg        eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\"
56218d623946Smrg        ;;
56228d623946Smrg    *::*)
56238d623946Smrg        eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\"
56248d623946Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\"
56258d623946Smrg        ;;
56268d623946Smrg    *)
56278d623946Smrg        eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\"
56288d623946Smrg        ;;
56298d623946Smrg    esac
56308d623946Smrg}
56318d623946Smrg]])# _LT_PREPARE_PATH_LIST
5632a1ed278cSmrg
5633a1ed278cSmrg
56348d623946Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
56358d623946Smrg# -----------------------------
56368d623946Smrg# PORTME Fill in your ld.so characteristics
56378d623946Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
56388d623946Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
56398d623946Smrgm4_require([_LT_DECL_EGREP])dnl
56408d623946Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
56418d623946Smrgm4_require([_LT_DECL_OBJDUMP])dnl
56428d623946Smrgm4_require([_LT_DECL_SED])dnl
56438d623946Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
56448d623946Smrgm4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl
56458d623946SmrgAC_MSG_CHECKING([dynamic linker characteristics])
56468d623946Smrgm4_if([$1],
56478d623946Smrg	[], [
56488d623946Smrgif test yes = "$GCC"; then
56498d623946Smrg  case $host_os in
56508d623946Smrg    darwin*) lt_awk_arg='/^libraries:/,/LR/' ;;
56518d623946Smrg    *) lt_awk_arg='/^libraries:/' ;;
56528d623946Smrg  esac
56538d623946Smrg  case $host_os in
56548d623946Smrg    mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;;
56558d623946Smrg    *) lt_sed_strip_eq='s|=/|/|g' ;;
56568d623946Smrg  esac
56578d623946Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
56588d623946Smrg  case $lt_search_path_spec in
56598d623946Smrg  *\;*)
56608d623946Smrg    # if the path contains ";" then we assume it to be the separator
56618d623946Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
56628d623946Smrg    # assumed that no part of a normal pathname contains ";" but that should
56638d623946Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
56648d623946Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
56658d623946Smrg    ;;
56668d623946Smrg  *)
56678d623946Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
56688d623946Smrg    ;;
56698d623946Smrg  esac
56708d623946Smrg  # Ok, now we have the path, separated by spaces, we can step through it
56718d623946Smrg  # and add multilib dir if necessary...
56728d623946Smrg  lt_tmp_lt_search_path_spec=
56738d623946Smrg  lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
56748d623946Smrg  # ...but if some path component already ends with the multilib dir we assume
56758d623946Smrg  # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer).
56768d623946Smrg  case "$lt_multi_os_dir; $lt_search_path_spec " in
56778d623946Smrg  "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*)
56788d623946Smrg    lt_multi_os_dir=
56798d623946Smrg    ;;
56808d623946Smrg  esac
56818d623946Smrg  for lt_sys_path in $lt_search_path_spec; do
56828d623946Smrg    if test -d "$lt_sys_path$lt_multi_os_dir"; then
56838d623946Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir"
56848d623946Smrg    elif test -n "$lt_multi_os_dir"; then
56858d623946Smrg      test -d "$lt_sys_path" && \
56868d623946Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
56878d623946Smrg    fi
56888d623946Smrg  done
56898d623946Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
56908d623946SmrgBEGIN {RS = " "; FS = "/|\n";} {
56918d623946Smrg  lt_foo = "";
56928d623946Smrg  lt_count = 0;
56938d623946Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
56948d623946Smrg    if ($lt_i != "" && $lt_i != ".") {
56958d623946Smrg      if ($lt_i == "..") {
56968d623946Smrg        lt_count++;
56978d623946Smrg      } else {
56988d623946Smrg        if (lt_count == 0) {
56998d623946Smrg          lt_foo = "/" $lt_i lt_foo;
57008d623946Smrg        } else {
57018d623946Smrg          lt_count--;
57028d623946Smrg        }
57038d623946Smrg      }
57048d623946Smrg    }
57058d623946Smrg  }
57068d623946Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
57078d623946Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
57088d623946Smrg}'`
57098d623946Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
57108d623946Smrg  # for these hosts.
57118d623946Smrg  case $host_os in
57128d623946Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
57138d623946Smrg      $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;;
57148d623946Smrg  esac
57158d623946Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
57168d623946Smrgelse
57178d623946Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
57188d623946Smrgfi])
57198d623946Smrglibrary_names_spec=
57208d623946Smrglibname_spec='lib$name'
57218d623946Smrgsoname_spec=
57228d623946Smrgshrext_cmds=.so
57238d623946Smrgpostinstall_cmds=
57248d623946Smrgpostuninstall_cmds=
57258d623946Smrgfinish_cmds=
57268d623946Smrgfinish_eval=
57278d623946Smrgshlibpath_var=
57288d623946Smrgshlibpath_overrides_runpath=unknown
57298d623946Smrgversion_type=none
57308d623946Smrgdynamic_linker="$host_os ld.so"
57318d623946Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
57328d623946Smrgneed_lib_prefix=unknown
57338d623946Smrghardcode_into_libs=no
5734a1ed278cSmrg
57358d623946Smrg# when you set need_version to no, make sure it does not cause -set_version
57368d623946Smrg# flags to be left without arguments
57378d623946Smrgneed_version=unknown
5738a1ed278cSmrg
57398d623946SmrgAC_ARG_VAR([LT_SYS_LIBRARY_PATH],
57408d623946Smrg[User-defined run-time library search path.])
5741a1ed278cSmrg
57428d623946Smrgcase $host_os in
57438d623946Smrgaix3*)
57448d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
57458d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname.a'
57468d623946Smrg  shlibpath_var=LIBPATH
5747a1ed278cSmrg
57488d623946Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
57498d623946Smrg  soname_spec='$libname$release$shared_ext$major'
57508d623946Smrg  ;;
5751a1ed278cSmrg
57528d623946Smrgaix[[4-9]]*)
57538d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
57548d623946Smrg  need_lib_prefix=no
57558d623946Smrg  need_version=no
57568d623946Smrg  hardcode_into_libs=yes
57578d623946Smrg  if test ia64 = "$host_cpu"; then
57588d623946Smrg    # AIX 5 supports IA64
57598d623946Smrg    library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext'
57608d623946Smrg    shlibpath_var=LD_LIBRARY_PATH
57618d623946Smrg  else
57628d623946Smrg    # With GCC up to 2.95.x, collect2 would create an import file
57638d623946Smrg    # for dependence libraries.  The import file would start with
57648d623946Smrg    # the line '#! .'.  This would cause the generated library to
57658d623946Smrg    # depend on '.', always an invalid library.  This was fixed in
57668d623946Smrg    # development snapshots of GCC prior to 3.0.
57678d623946Smrg    case $host_os in
57688d623946Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
57698d623946Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
57708d623946Smrg	   echo ' yes '
57718d623946Smrg	   echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then
57728d623946Smrg	:
57738d623946Smrg      else
57748d623946Smrg	can_build_shared=no
57758d623946Smrg      fi
57768d623946Smrg      ;;
57778d623946Smrg    esac
57788d623946Smrg    # Using Import Files as archive members, it is possible to support
57798d623946Smrg    # filename-based versioning of shared library archives on AIX. While
57808d623946Smrg    # this would work for both with and without runtime linking, it will
57818d623946Smrg    # prevent static linking of such archives. So we do filename-based
57828d623946Smrg    # shared library versioning with .so extension only, which is used
57838d623946Smrg    # when both runtime linking and shared linking is enabled.
57848d623946Smrg    # Unfortunately, runtime linking may impact performance, so we do
57858d623946Smrg    # not want this to be the default eventually. Also, we use the
57868d623946Smrg    # versioned .so libs for executables only if there is the -brtl
57878d623946Smrg    # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only.
57888d623946Smrg    # To allow for filename-based versioning support, we need to create
57898d623946Smrg    # libNAME.so.V as an archive file, containing:
57908d623946Smrg    # *) an Import File, referring to the versioned filename of the
57918d623946Smrg    #    archive as well as the shared archive member, telling the
57928d623946Smrg    #    bitwidth (32 or 64) of that shared object, and providing the
57938d623946Smrg    #    list of exported symbols of that shared object, eventually
57948d623946Smrg    #    decorated with the 'weak' keyword
57958d623946Smrg    # *) the shared object with the F_LOADONLY flag set, to really avoid
57968d623946Smrg    #    it being seen by the linker.
57978d623946Smrg    # At run time we better use the real file rather than another symlink,
57988d623946Smrg    # but for link time we create the symlink libNAME.so -> libNAME.so.V
5799a1ed278cSmrg
58008d623946Smrg    case $with_aix_soname,$aix_use_runtimelinking in
58018d623946Smrg    # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct
58028d623946Smrg    # soname into executable. Probably we can add versioning support to
58038d623946Smrg    # collect2, so additional links can be useful in future.
58048d623946Smrg    aix,yes) # traditional libtool
58058d623946Smrg      dynamic_linker='AIX unversionable lib.so'
58068d623946Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
58078d623946Smrg      # instead of lib<name>.a to let people know that these are not
58088d623946Smrg      # typical AIX shared libraries.
58098d623946Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
58108d623946Smrg      ;;
58118d623946Smrg    aix,no) # traditional AIX only
58128d623946Smrg      dynamic_linker='AIX lib.a[(]lib.so.V[)]'
58138d623946Smrg      # We preserve .a as extension for shared libraries through AIX4.2
58148d623946Smrg      # and later when we are not doing run time linking.
58158d623946Smrg      library_names_spec='$libname$release.a $libname.a'
58168d623946Smrg      soname_spec='$libname$release$shared_ext$major'
58178d623946Smrg      ;;
58188d623946Smrg    svr4,*) # full svr4 only
58198d623946Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]"
58208d623946Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
58218d623946Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
58228d623946Smrg      shlibpath_overrides_runpath=yes
58238d623946Smrg      ;;
58248d623946Smrg    *,yes) # both, prefer svr4
58258d623946Smrg      dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]"
58268d623946Smrg      library_names_spec='$libname$release$shared_ext$major $libname$shared_ext'
58278d623946Smrg      # unpreferred sharedlib libNAME.a needs extra handling
58288d623946Smrg      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"'
58298d623946Smrg      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"'
58308d623946Smrg      # We do not specify a path in Import Files, so LIBPATH fires.
58318d623946Smrg      shlibpath_overrides_runpath=yes
58328d623946Smrg      ;;
58338d623946Smrg    *,no) # both, prefer aix
58348d623946Smrg      dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]"
58358d623946Smrg      library_names_spec='$libname$release.a $libname.a'
58368d623946Smrg      soname_spec='$libname$release$shared_ext$major'
58378d623946Smrg      # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling
58388d623946Smrg      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)'
58398d623946Smrg      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"'
58408d623946Smrg      ;;
58418d623946Smrg    esac
58428d623946Smrg    shlibpath_var=LIBPATH
58438d623946Smrg  fi
58448d623946Smrg  ;;
5845ee3138f1Smrg
58468d623946Smrgamigaos*)
58478d623946Smrg  case $host_cpu in
58488d623946Smrg  powerpc)
58498d623946Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
58508d623946Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
58518d623946Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
58528d623946Smrg    ;;
58538d623946Smrg  m68k)
58548d623946Smrg    library_names_spec='$libname.ixlibrary $libname.a'
58558d623946Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
58568d623946Smrg    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'
58578d623946Smrg    ;;
58588d623946Smrg  esac
58598d623946Smrg  ;;
5860ee3138f1Smrg
58618d623946Smrgbeos*)
58628d623946Smrg  library_names_spec='$libname$shared_ext'
58638d623946Smrg  dynamic_linker="$host_os ld.so"
58648d623946Smrg  shlibpath_var=LIBRARY_PATH
58658d623946Smrg  ;;
5866ee3138f1Smrg
58678d623946Smrgbsdi[[45]]*)
58688d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
58698d623946Smrg  need_version=no
58708d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
58718d623946Smrg  soname_spec='$libname$release$shared_ext$major'
58728d623946Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
58738d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
58748d623946Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
58758d623946Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
58768d623946Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
58778d623946Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
58788d623946Smrg  # libtool to hard-code these into programs
58798d623946Smrg  ;;
5880a1ed278cSmrg
58818d623946Smrgcygwin* | mingw* | pw32* | cegcc*)
58828d623946Smrg  version_type=windows
58838d623946Smrg  shrext_cmds=.dll
58848d623946Smrg  need_version=no
58858d623946Smrg  need_lib_prefix=no
5886ee3138f1Smrg
58878d623946Smrg  case $GCC,$cc_basename in
58888d623946Smrg  yes,*)
58898d623946Smrg    # gcc
58908d623946Smrg    library_names_spec='$libname.dll.a'
58918d623946Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
58928d623946Smrg    postinstall_cmds='base_file=`basename \$file`~
58938d623946Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
58948d623946Smrg      dldir=$destdir/`dirname \$dlpath`~
58958d623946Smrg      test -d \$dldir || mkdir -p \$dldir~
58968d623946Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
58978d623946Smrg      chmod a+x \$dldir/$dlname~
58988d623946Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
58998d623946Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
59008d623946Smrg      fi'
59018d623946Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
59028d623946Smrg      dlpath=$dir/\$dldll~
59038d623946Smrg       $RM \$dlpath'
59048d623946Smrg    shlibpath_overrides_runpath=yes
5905ee3138f1Smrg
59068d623946Smrg    case $host_os in
59078d623946Smrg    cygwin*)
59088d623946Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
59098d623946Smrg      soname_spec='`echo $libname | $SED -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59108d623946Smrgm4_if([$1], [],[
59118d623946Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
59128d623946Smrg      ;;
59138d623946Smrg    mingw* | cegcc*)
59148d623946Smrg      # MinGW DLLs use traditional 'lib' prefix
59158d623946Smrg      soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59168d623946Smrg      ;;
59178d623946Smrg    pw32*)
59188d623946Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
59198d623946Smrg      library_names_spec='`echo $libname | $SED -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59208d623946Smrg      ;;
59218d623946Smrg    esac
59228d623946Smrg    dynamic_linker='Win32 ld.exe'
59238d623946Smrg    ;;
5924ee3138f1Smrg
59258d623946Smrg  *,cl* | *,icl*)
59268d623946Smrg    # Native MSVC or ICC
59278d623946Smrg    libname_spec='$name'
59288d623946Smrg    soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext'
59298d623946Smrg    library_names_spec='$libname.dll.lib'
5930ee3138f1Smrg
59318d623946Smrg    case $build_os in
59328d623946Smrg    mingw*)
59338d623946Smrg      sys_lib_search_path_spec=
59348d623946Smrg      lt_save_ifs=$IFS
59358d623946Smrg      IFS=';'
59368d623946Smrg      for lt_path in $LIB
59378d623946Smrg      do
59388d623946Smrg        IFS=$lt_save_ifs
59398d623946Smrg        # Let DOS variable expansion print the short 8.3 style file name.
59408d623946Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
59418d623946Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
59428d623946Smrg      done
59438d623946Smrg      IFS=$lt_save_ifs
59448d623946Smrg      # Convert to MSYS style.
59458d623946Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
59468d623946Smrg      ;;
59478d623946Smrg    cygwin*)
59488d623946Smrg      # Convert to unix form, then to dos form, then back to unix form
59498d623946Smrg      # but this time dos style (no spaces!) so that the unix form looks
59508d623946Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
59518d623946Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
59528d623946Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
59538d623946Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
59548d623946Smrg      ;;
59558d623946Smrg    *)
59568d623946Smrg      sys_lib_search_path_spec=$LIB
59578d623946Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
59588d623946Smrg        # It is most probably a Windows format PATH.
59598d623946Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
59608d623946Smrg      else
59618d623946Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
59628d623946Smrg      fi
59638d623946Smrg      # FIXME: find the short name or the path components, as spaces are
59648d623946Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
59653e72ca8cSmrg      ;;
59668d623946Smrg    esac
59673e72ca8cSmrg
59688d623946Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
59698d623946Smrg    postinstall_cmds='base_file=`basename \$file`~
59708d623946Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~
59718d623946Smrg      dldir=$destdir/`dirname \$dlpath`~
59728d623946Smrg      test -d \$dldir || mkdir -p \$dldir~
59738d623946Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
59748d623946Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
59758d623946Smrg      dlpath=$dir/\$dldll~
59768d623946Smrg       $RM \$dlpath'
59778d623946Smrg    shlibpath_overrides_runpath=yes
59788d623946Smrg    dynamic_linker='Win32 link.exe'
59798d623946Smrg    ;;
5980ee3138f1Smrg
59818d623946Smrg  *)
59828d623946Smrg    # Assume MSVC and ICC wrapper
59838d623946Smrg    library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib'
59848d623946Smrg    dynamic_linker='Win32 ld.exe'
59858d623946Smrg    ;;
59868d623946Smrg  esac
59878d623946Smrg  # FIXME: first we should search . and the directory the executable is in
59888d623946Smrg  shlibpath_var=PATH
59898d623946Smrg  ;;
5990ee3138f1Smrg
59918d623946Smrgdarwin* | rhapsody*)
59928d623946Smrg  dynamic_linker="$host_os dyld"
59938d623946Smrg  version_type=darwin
59948d623946Smrg  need_lib_prefix=no
59958d623946Smrg  need_version=no
59968d623946Smrg  library_names_spec='$libname$release$major$shared_ext $libname$shared_ext'
59978d623946Smrg  soname_spec='$libname$release$major$shared_ext'
59988d623946Smrg  shlibpath_overrides_runpath=yes
59998d623946Smrg  shlibpath_var=DYLD_LIBRARY_PATH
60008d623946Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
60018d623946Smrgm4_if([$1], [],[
60028d623946Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
60038d623946Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
60048d623946Smrg  ;;
6005ee3138f1Smrg
60068d623946Smrgdgux*)
60078d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
60088d623946Smrg  need_lib_prefix=no
60098d623946Smrg  need_version=no
60108d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
60118d623946Smrg  soname_spec='$libname$release$shared_ext$major'
60128d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
60138d623946Smrg  ;;
6014ee3138f1Smrg
60158d623946Smrgfreebsd* | dragonfly* | midnightbsd*)
60168d623946Smrg  # DragonFly does not have aout.  When/if they implement a new
60178d623946Smrg  # versioning mechanism, adjust this.
60188d623946Smrg  if test -x /usr/bin/objformat; then
60198d623946Smrg    objformat=`/usr/bin/objformat`
60208d623946Smrg  else
60218d623946Smrg    case $host_os in
60228d623946Smrg    freebsd[[23]].*) objformat=aout ;;
60238d623946Smrg    *) objformat=elf ;;
60243e72ca8cSmrg    esac
60258d623946Smrg  fi
60268d623946Smrg  version_type=freebsd-$objformat
60278d623946Smrg  case $version_type in
60288d623946Smrg    freebsd-elf*)
60298d623946Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
60308d623946Smrg      soname_spec='$libname$release$shared_ext$major'
60318d623946Smrg      need_version=no
60328d623946Smrg      need_lib_prefix=no
60338d623946Smrg      ;;
60348d623946Smrg    freebsd-*)
60358d623946Smrg      library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
60368d623946Smrg      need_version=yes
60378d623946Smrg      ;;
60388d623946Smrg  esac
60398d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
60408d623946Smrg  case $host_os in
60418d623946Smrg  freebsd2.*)
60428d623946Smrg    shlibpath_overrides_runpath=yes
60438d623946Smrg    ;;
60448d623946Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
60458d623946Smrg    shlibpath_overrides_runpath=yes
60468d623946Smrg    hardcode_into_libs=yes
60478d623946Smrg    ;;
60488d623946Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
60498d623946Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
60508d623946Smrg    shlibpath_overrides_runpath=no
60518d623946Smrg    hardcode_into_libs=yes
60528d623946Smrg    ;;
60538d623946Smrg  *) # from 4.6 on, and DragonFly
60548d623946Smrg    shlibpath_overrides_runpath=yes
60558d623946Smrg    hardcode_into_libs=yes
60568d623946Smrg    ;;
60578d623946Smrg  esac
60588d623946Smrg  ;;
6059ee3138f1Smrg
60608d623946Smrghaiku*)
60618d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
60628d623946Smrg  need_lib_prefix=no
60638d623946Smrg  need_version=no
60648d623946Smrg  dynamic_linker="$host_os runtime_loader"
60658d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
60668d623946Smrg  soname_spec='$libname$release$shared_ext$major'
60678d623946Smrg  shlibpath_var=LIBRARY_PATH
60688d623946Smrg  shlibpath_overrides_runpath=no
60698d623946Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
60708d623946Smrg  hardcode_into_libs=yes
60718d623946Smrg  ;;
6072ee3138f1Smrg
60738d623946Smrghpux9* | hpux10* | hpux11*)
60748d623946Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
60758d623946Smrg  # link against other versions.
60768d623946Smrg  version_type=sunos
60778d623946Smrg  need_lib_prefix=no
60788d623946Smrg  need_version=no
60798d623946Smrg  case $host_cpu in
60808d623946Smrg  ia64*)
60818d623946Smrg    shrext_cmds='.so'
60828d623946Smrg    hardcode_into_libs=yes
60838d623946Smrg    dynamic_linker="$host_os dld.so"
60848d623946Smrg    shlibpath_var=LD_LIBRARY_PATH
60858d623946Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
60868d623946Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
60878d623946Smrg    soname_spec='$libname$release$shared_ext$major'
60888d623946Smrg    if test 32 = "$HPUX_IA64_MODE"; then
60898d623946Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
60908d623946Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux32
60918d623946Smrg    else
60928d623946Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
60938d623946Smrg      sys_lib_dlsearch_path_spec=/usr/lib/hpux64
60948d623946Smrg    fi
60958d623946Smrg    ;;
60968d623946Smrg  hppa*64*)
60978d623946Smrg    shrext_cmds='.sl'
60988d623946Smrg    hardcode_into_libs=yes
60998d623946Smrg    dynamic_linker="$host_os dld.sl"
61008d623946Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
61018d623946Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
61028d623946Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61038d623946Smrg    soname_spec='$libname$release$shared_ext$major'
61048d623946Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
61058d623946Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
61068d623946Smrg    ;;
61078d623946Smrg  *)
61088d623946Smrg    shrext_cmds='.sl'
61098d623946Smrg    dynamic_linker="$host_os dld.sl"
61108d623946Smrg    shlibpath_var=SHLIB_PATH
61118d623946Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
61128d623946Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61138d623946Smrg    soname_spec='$libname$release$shared_ext$major'
61148d623946Smrg    ;;
6115a1ed278cSmrg  esac
61168d623946Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
61178d623946Smrg  postinstall_cmds='chmod 555 $lib'
61188d623946Smrg  # or fails outright, so override atomically:
61198d623946Smrg  install_override_mode=555
61208d623946Smrg  ;;
6121fe24f8a2Smrg
61228d623946Smrginterix[[3-9]]*)
61238d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
61248d623946Smrg  need_lib_prefix=no
61258d623946Smrg  need_version=no
61268d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
61278d623946Smrg  soname_spec='$libname$release$shared_ext$major'
61288d623946Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
61298d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
61308d623946Smrg  shlibpath_overrides_runpath=no
61318d623946Smrg  hardcode_into_libs=yes
61328d623946Smrg  ;;
6133ee3138f1Smrg
61348d623946Smrgirix5* | irix6* | nonstopux*)
61358d623946Smrg  case $host_os in
61368d623946Smrg    nonstopux*) version_type=nonstopux ;;
61378d623946Smrg    *)
61388d623946Smrg	if test yes = "$lt_cv_prog_gnu_ld"; then
61398d623946Smrg		version_type=linux # correct to gnu/linux during the next big refactor
61408d623946Smrg	else
61418d623946Smrg		version_type=irix
61428d623946Smrg	fi ;;
61438d623946Smrg  esac
61448d623946Smrg  need_lib_prefix=no
61458d623946Smrg  need_version=no
61468d623946Smrg  soname_spec='$libname$release$shared_ext$major'
61478d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext'
61488d623946Smrg  case $host_os in
61498d623946Smrg  irix5* | nonstopux*)
61508d623946Smrg    libsuff= shlibsuff=
61518d623946Smrg    ;;
61528d623946Smrg  *)
61538d623946Smrg    case $LD in # libtool.m4 will add one of these switches to LD
61548d623946Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
61558d623946Smrg      libsuff= shlibsuff= libmagic=32-bit;;
61568d623946Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
61578d623946Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
61588d623946Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
61598d623946Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
61608d623946Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
61618d623946Smrg    esac
61628d623946Smrg    ;;
61638d623946Smrg  esac
61648d623946Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
61658d623946Smrg  shlibpath_overrides_runpath=no
61668d623946Smrg  sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff"
61678d623946Smrg  sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff"
61688d623946Smrg  hardcode_into_libs=yes
61698d623946Smrg  ;;
6170ee3138f1Smrg
61718d623946Smrg# No shared lib support for Linux oldld, aout, or coff.
61728d623946Smrglinux*oldld* | linux*aout* | linux*coff*)
61738d623946Smrg  dynamic_linker=no
61748d623946Smrg  ;;
6175ee3138f1Smrg
61768d623946Smrglinux*android*)
61778d623946Smrg  version_type=none # Android doesn't support versioned libraries.
61788d623946Smrg  need_lib_prefix=no
61798d623946Smrg  need_version=no
61808d623946Smrg  library_names_spec='$libname$release$shared_ext'
61818d623946Smrg  soname_spec='$libname$release$shared_ext'
61828d623946Smrg  finish_cmds=
61838d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
61848d623946Smrg  shlibpath_overrides_runpath=yes
6185ee3138f1Smrg
61868d623946Smrg  # This implies no fast_install, which is unacceptable.
61878d623946Smrg  # Some rework will be needed to allow for fast_install
61888d623946Smrg  # before this can be enabled.
61898d623946Smrg  hardcode_into_libs=yes
6190ee3138f1Smrg
61918d623946Smrg  dynamic_linker='Android linker'
61928d623946Smrg  # Don't embed -rpath directories since the linker doesn't support them.
61938d623946Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61948d623946Smrg  ;;
6195ee3138f1Smrg
61968d623946Smrg# This must be glibc/ELF.
61978d623946Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
61988d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
61998d623946Smrg  need_lib_prefix=no
62008d623946Smrg  need_version=no
62018d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
62028d623946Smrg  soname_spec='$libname$release$shared_ext$major'
62038d623946Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
62048d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
62058d623946Smrg  shlibpath_overrides_runpath=no
6206ee3138f1Smrg
62078d623946Smrg  # Some binutils ld are patched to set DT_RUNPATH
62088d623946Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
62098d623946Smrg    [lt_cv_shlibpath_overrides_runpath=no
62108d623946Smrg    save_LDFLAGS=$LDFLAGS
62118d623946Smrg    save_libdir=$libdir
62128d623946Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
62138d623946Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
62148d623946Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
62158d623946Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
62168d623946Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
62178d623946Smrg    LDFLAGS=$save_LDFLAGS
62188d623946Smrg    libdir=$save_libdir
62198d623946Smrg    ])
62208d623946Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
6221ee3138f1Smrg
62228d623946Smrg  # This implies no fast_install, which is unacceptable.
62238d623946Smrg  # Some rework will be needed to allow for fast_install
62248d623946Smrg  # before this can be enabled.
62258d623946Smrg  hardcode_into_libs=yes
6226ee3138f1Smrg
62278d623946Smrg  # Ideally, we could use ldconfig to report *all* directores which are
62288d623946Smrg  # searched for libraries, however this is still not possible.  Aside from not
62298d623946Smrg  # being certain /sbin/ldconfig is available, command
62308d623946Smrg  # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64,
62318d623946Smrg  # even though it is searched at run-time.  Try to do the best guess by
62328d623946Smrg  # appending ld.so.conf contents (and includes) to the search path.
62338d623946Smrg  if test -f /etc/ld.so.conf; then
62348d623946Smrg    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' ' '`
62358d623946Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
62368d623946Smrg  fi
62373e72ca8cSmrg
62388d623946Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
62398d623946Smrg  # powerpc, because MkLinux only supported shared libraries with the
62408d623946Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
62418d623946Smrg  # most powerpc-linux boxes support dynamic linking these days and
62428d623946Smrg  # people can always --disable-shared, the test was removed, and we
62438d623946Smrg  # assume the GNU/Linux dynamic linker is in use.
62448d623946Smrg  dynamic_linker='GNU/Linux ld.so'
62458d623946Smrg  ;;
6246ee3138f1Smrg
62478d623946Smrgnetbsd*)
62488d623946Smrg  version_type=sunos
62498d623946Smrg  need_lib_prefix=no
62508d623946Smrg  need_version=no
62518d623946Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
62528d623946Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
62538d623946Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
62548d623946Smrg    dynamic_linker='NetBSD (a.out) ld.so'
62558d623946Smrg  else
62568d623946Smrg    library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
62578d623946Smrg    soname_spec='$libname$release$shared_ext$major'
62588d623946Smrg    dynamic_linker='NetBSD ld.elf_so'
62598d623946Smrg  fi
62608d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
62618d623946Smrg  shlibpath_overrides_runpath=yes
62628d623946Smrg  hardcode_into_libs=yes
62638d623946Smrg  ;;
626434977a2fSmrg
62658d623946Smrgnewsos6)
62668d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
62678d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
62688d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
62698d623946Smrg  shlibpath_overrides_runpath=yes
62708d623946Smrg  ;;
627134977a2fSmrg
62728d623946Smrg*nto* | *qnx*)
62738d623946Smrg  version_type=qnx
62748d623946Smrg  need_lib_prefix=no
62758d623946Smrg  need_version=no
62768d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
62778d623946Smrg  soname_spec='$libname$release$shared_ext$major'
62788d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
62798d623946Smrg  shlibpath_overrides_runpath=no
62808d623946Smrg  hardcode_into_libs=yes
62818d623946Smrg  dynamic_linker='ldqnx.so'
6282a1ed278cSmrg  ;;
628334977a2fSmrg
62848d623946Smrgopenbsd* | bitrig*)
62858d623946Smrg  version_type=sunos
62868d623946Smrg  sys_lib_dlsearch_path_spec=/usr/lib
62878d623946Smrg  need_lib_prefix=no
62888d623946Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
62898d623946Smrg    need_version=no
62908d623946Smrg  else
62918d623946Smrg    need_version=yes
62928d623946Smrg  fi
62938d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
62948d623946Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
62958d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
62968d623946Smrg  shlibpath_overrides_runpath=yes
62978d623946Smrg  ;;
6298ee3138f1Smrg
62998d623946Smrgos2*)
63008d623946Smrg  libname_spec='$name'
63018d623946Smrg  version_type=windows
63028d623946Smrg  shrext_cmds=.dll
63038d623946Smrg  need_version=no
63048d623946Smrg  need_lib_prefix=no
63058d623946Smrg  # OS/2 can only load a DLL with a base name of 8 characters or less.
63068d623946Smrg  soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
63078d623946Smrg    v=$($ECHO $release$versuffix | tr -d .-);
63088d623946Smrg    n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
63098d623946Smrg    $ECHO $n$v`$shared_ext'
63108d623946Smrg  library_names_spec='${libname}_dll.$libext'
63118d623946Smrg  dynamic_linker='OS/2 ld.exe'
63128d623946Smrg  shlibpath_var=BEGINLIBPATH
63138d623946Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
63148d623946Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
63158d623946Smrg  postinstall_cmds='base_file=`basename \$file`~
63168d623946Smrg    dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~
63178d623946Smrg    dldir=$destdir/`dirname \$dlpath`~
63188d623946Smrg    test -d \$dldir || mkdir -p \$dldir~
63198d623946Smrg    $install_prog $dir/$dlname \$dldir/$dlname~
63208d623946Smrg    chmod a+x \$dldir/$dlname~
63218d623946Smrg    if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
63228d623946Smrg      eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
63238d623946Smrg    fi'
63248d623946Smrg  postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~
63258d623946Smrg    dlpath=$dir/\$dldll~
63268d623946Smrg    $RM \$dlpath'
63278d623946Smrg  ;;
632834977a2fSmrg
63298d623946Smrgosf3* | osf4* | osf5*)
63308d623946Smrg  version_type=osf
63318d623946Smrg  need_lib_prefix=no
63328d623946Smrg  need_version=no
63338d623946Smrg  soname_spec='$libname$release$shared_ext$major'
63348d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63358d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
63368d623946Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
63378d623946Smrg  sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
63388d623946Smrg  ;;
6339414bd68fSmrg
63408d623946Smrgrdos*)
63418d623946Smrg  dynamic_linker=no
63428d623946Smrg  ;;
6343414bd68fSmrg
63448d623946Smrgsolaris*)
63458d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
63468d623946Smrg  need_lib_prefix=no
63478d623946Smrg  need_version=no
63488d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63498d623946Smrg  soname_spec='$libname$release$shared_ext$major'
63508d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
63518d623946Smrg  shlibpath_overrides_runpath=yes
63528d623946Smrg  hardcode_into_libs=yes
63538d623946Smrg  # ldd complains unless libraries are executable
63548d623946Smrg  postinstall_cmds='chmod +x $lib'
63558d623946Smrg  ;;
6356414bd68fSmrg
63578d623946Smrgsunos4*)
63588d623946Smrg  version_type=sunos
63598d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix'
63608d623946Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
63618d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
63628d623946Smrg  shlibpath_overrides_runpath=yes
63638d623946Smrg  if test yes = "$with_gnu_ld"; then
63648d623946Smrg    need_lib_prefix=no
63658d623946Smrg  fi
63668d623946Smrg  need_version=yes
63678d623946Smrg  ;;
6368414bd68fSmrg
63698d623946Smrgsysv4 | sysv4.3*)
63708d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
63718d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
63728d623946Smrg  soname_spec='$libname$release$shared_ext$major'
63738d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
63748d623946Smrg  case $host_vendor in
63758d623946Smrg    sni)
63768d623946Smrg      shlibpath_overrides_runpath=no
63778d623946Smrg      need_lib_prefix=no
63788d623946Smrg      runpath_var=LD_RUN_PATH
63798d623946Smrg      ;;
63808d623946Smrg    siemens)
63818d623946Smrg      need_lib_prefix=no
63828d623946Smrg      ;;
63838d623946Smrg    motorola)
63848d623946Smrg      need_lib_prefix=no
63858d623946Smrg      need_version=no
63868d623946Smrg      shlibpath_overrides_runpath=no
63878d623946Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
63888d623946Smrg      ;;
63898d623946Smrg  esac
63908d623946Smrg  ;;
6391414bd68fSmrg
63928d623946Smrgsysv4*MP*)
63938d623946Smrg  if test -d /usr/nec; then
63948d623946Smrg    version_type=linux # correct to gnu/linux during the next big refactor
63958d623946Smrg    library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext'
63968d623946Smrg    soname_spec='$libname$shared_ext.$major'
63978d623946Smrg    shlibpath_var=LD_LIBRARY_PATH
63988d623946Smrg  fi
63998d623946Smrg  ;;
6400414bd68fSmrg
64018d623946Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
64028d623946Smrg  version_type=sco
64038d623946Smrg  need_lib_prefix=no
64048d623946Smrg  need_version=no
64058d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext'
64068d623946Smrg  soname_spec='$libname$release$shared_ext$major'
64078d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
64088d623946Smrg  shlibpath_overrides_runpath=yes
64098d623946Smrg  hardcode_into_libs=yes
64108d623946Smrg  if test yes = "$with_gnu_ld"; then
64118d623946Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
64128d623946Smrg  else
64138d623946Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
64148d623946Smrg    case $host_os in
64158d623946Smrg      sco3.2v5*)
64168d623946Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
64178d623946Smrg	;;
64188d623946Smrg    esac
64198d623946Smrg  fi
64208d623946Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
64218d623946Smrg  ;;
6422414bd68fSmrg
64238d623946Smrgtpf*)
64248d623946Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
64258d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
64268d623946Smrg  need_lib_prefix=no
64278d623946Smrg  need_version=no
64288d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64298d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
64308d623946Smrg  shlibpath_overrides_runpath=no
64318d623946Smrg  hardcode_into_libs=yes
64328d623946Smrg  ;;
6433414bd68fSmrg
64348d623946Smrguts4*)
64358d623946Smrg  version_type=linux # correct to gnu/linux during the next big refactor
64368d623946Smrg  library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext'
64378d623946Smrg  soname_spec='$libname$release$shared_ext$major'
64388d623946Smrg  shlibpath_var=LD_LIBRARY_PATH
64398d623946Smrg  ;;
6440414bd68fSmrg
64418d623946Smrg*)
64428d623946Smrg  dynamic_linker=no
64438d623946Smrg  ;;
64448d623946Smrgesac
64458d623946SmrgAC_MSG_RESULT([$dynamic_linker])
64468d623946Smrgtest no = "$dynamic_linker" && can_build_shared=no
6447414bd68fSmrg
64488d623946Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
64498d623946Smrgif test yes = "$GCC"; then
64508d623946Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
64518d623946Smrgfi
6452414bd68fSmrg
64538d623946Smrgif test set = "${lt_cv_sys_lib_search_path_spec+set}"; then
64548d623946Smrg  sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec
64558d623946Smrgfi
6456414bd68fSmrg
64578d623946Smrgif test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then
64588d623946Smrg  sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec
64598d623946Smrgfi
6460414bd68fSmrg
64618d623946Smrg# remember unaugmented sys_lib_dlsearch_path content for libtool script decls...
64628d623946Smrgconfigure_time_dlsearch_path=$sys_lib_dlsearch_path_spec
6463414bd68fSmrg
64648d623946Smrg# ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code
64658d623946Smrgfunc_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH"
6466414bd68fSmrg
64678d623946Smrg# to be used as default LT_SYS_LIBRARY_PATH value in generated libtool
64688d623946Smrgconfigure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH
6469414bd68fSmrg
64708d623946Smrg_LT_DECL([], [variables_saved_for_relink], [1],
64718d623946Smrg    [Variables whose values should be saved in libtool wrapper scripts and
64728d623946Smrg    restored at link time])
64738d623946Smrg_LT_DECL([], [need_lib_prefix], [0],
64748d623946Smrg    [Do we need the "lib" prefix for modules?])
64758d623946Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
64768d623946Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
64778d623946Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
64788d623946Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
64798d623946Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
64808d623946Smrg    [Is shlibpath searched before the hard-coded library search path?])
64818d623946Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
64828d623946Smrg_LT_DECL([], [library_names_spec], [1],
64838d623946Smrg    [[List of archive names.  First name is the real one, the rest are links.
64848d623946Smrg    The last name is the one that the linker finds with -lNAME]])
64858d623946Smrg_LT_DECL([], [soname_spec], [1],
64868d623946Smrg    [[The coded name of the library, if different from the real name]])
64878d623946Smrg_LT_DECL([], [install_override_mode], [1],
64888d623946Smrg    [Permission mode override for installation of shared libraries])
64898d623946Smrg_LT_DECL([], [postinstall_cmds], [2],
64908d623946Smrg    [Command to use after installation of a shared archive])
64918d623946Smrg_LT_DECL([], [postuninstall_cmds], [2],
64928d623946Smrg    [Command to use after uninstallation of a shared archive])
64938d623946Smrg_LT_DECL([], [finish_cmds], [2],
64948d623946Smrg    [Commands used to finish a libtool library installation in a directory])
64958d623946Smrg_LT_DECL([], [finish_eval], [1],
64968d623946Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
64978d623946Smrg    not shown]])
64988d623946Smrg_LT_DECL([], [hardcode_into_libs], [0],
64998d623946Smrg    [Whether we should hardcode library paths into libraries])
65008d623946Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
65018d623946Smrg    [Compile-time system search path for libraries])
65028d623946Smrg_LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2],
65038d623946Smrg    [Detected run-time system search path for libraries])
65048d623946Smrg_LT_DECL([], [configure_time_lt_sys_library_path], [2],
65058d623946Smrg    [Explicit LT_SYS_LIBRARY_PATH set during ./configure time])
65068d623946Smrg])# _LT_SYS_DYNAMIC_LINKER
6507414bd68fSmrg
6508414bd68fSmrg
65098d623946Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
65108d623946Smrg# --------------------------
65118d623946Smrg# find a file program that can recognize shared library
65128d623946SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
65138d623946Smrg[m4_require([_LT_DECL_EGREP])dnl
65148d623946SmrgAC_MSG_CHECKING([for $1])
65158d623946SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
65168d623946Smrg[case $MAGIC_CMD in
65178d623946Smrg[[\\/*] |  ?:[\\/]*])
65188d623946Smrg  lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path.
65198d623946Smrg  ;;
65208d623946Smrg*)
65218d623946Smrg  lt_save_MAGIC_CMD=$MAGIC_CMD
65228d623946Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
65238d623946Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
65248d623946Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
65258d623946Smrgdnl not every word.  This closes a longstanding sh security hole.
65268d623946Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
65278d623946Smrg  for ac_dir in $ac_dummy; do
65288d623946Smrg    IFS=$lt_save_ifs
65298d623946Smrg    test -z "$ac_dir" && ac_dir=.
65308d623946Smrg    if test -f "$ac_dir/$1"; then
65318d623946Smrg      lt_cv_path_MAGIC_CMD=$ac_dir/"$1"
65328d623946Smrg      if test -n "$file_magic_test_file"; then
65338d623946Smrg	case $deplibs_check_method in
65348d623946Smrg	"file_magic "*)
65358d623946Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
65368d623946Smrg	  MAGIC_CMD=$lt_cv_path_MAGIC_CMD
65378d623946Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
65388d623946Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
65398d623946Smrg	    :
65408d623946Smrg	  else
65418d623946Smrg	    cat <<_LT_EOF 1>&2
6542414bd68fSmrg
65438d623946Smrg*** Warning: the command libtool uses to detect shared libraries,
65448d623946Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
65458d623946Smrg*** The result is that libtool may fail to recognize shared libraries
65468d623946Smrg*** as such.  This will affect the creation of libtool libraries that
65478d623946Smrg*** depend on shared libraries, but programs linked with such libtool
65488d623946Smrg*** libraries will work regardless of this problem.  Nevertheless, you
65498d623946Smrg*** may want to report the problem to your system manager and/or to
65508d623946Smrg*** bug-libtool@gnu.org
65518d623946Smrg
65528d623946Smrg_LT_EOF
65538d623946Smrg	  fi ;;
65548d623946Smrg	esac
65558d623946Smrg      fi
65568d623946Smrg      break
65578d623946Smrg    fi
65588d623946Smrg  done
65598d623946Smrg  IFS=$lt_save_ifs
65608d623946Smrg  MAGIC_CMD=$lt_save_MAGIC_CMD
65618d623946Smrg  ;;
65628d623946Smrgesac])
65638d623946SmrgMAGIC_CMD=$lt_cv_path_MAGIC_CMD
65648d623946Smrgif test -n "$MAGIC_CMD"; then
65658d623946Smrg  AC_MSG_RESULT($MAGIC_CMD)
65668d623946Smrgelse
65678d623946Smrg  AC_MSG_RESULT(no)
65683e72ca8cSmrgfi
65698d623946Smrg_LT_DECL([], [MAGIC_CMD], [0],
65708d623946Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
65718d623946Smrg])# _LT_PATH_TOOL_PREFIX
65723e72ca8cSmrg
65738d623946Smrg# Old name:
65748d623946SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
65758d623946Smrgdnl aclocal-1.4 backwards compatibility:
65768d623946Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
657734977a2fSmrg
657834977a2fSmrg
65798d623946Smrg# _LT_PATH_MAGIC
65808d623946Smrg# --------------
65818d623946Smrg# find a file program that can recognize a shared library
65828d623946Smrgm4_defun([_LT_PATH_MAGIC],
65838d623946Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
65848d623946Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
65858d623946Smrg  if test -n "$ac_tool_prefix"; then
65868d623946Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
65878d623946Smrg  else
65888d623946Smrg    MAGIC_CMD=:
65898d623946Smrg  fi
65908d623946Smrgfi
65918d623946Smrg])# _LT_PATH_MAGIC
659234977a2fSmrg
659334977a2fSmrg
65948d623946Smrg# LT_PATH_LD
65958d623946Smrg# ----------
65968d623946Smrg# find the pathname to the GNU or non-GNU linker
65978d623946SmrgAC_DEFUN([LT_PATH_LD],
65988d623946Smrg[AC_REQUIRE([AC_PROG_CC])dnl
65998d623946SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
66008d623946SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
66018d623946Smrgm4_require([_LT_DECL_SED])dnl
66028d623946Smrgm4_require([_LT_DECL_EGREP])dnl
66038d623946Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
660434977a2fSmrg
66058d623946SmrgAC_ARG_WITH([gnu-ld],
66068d623946Smrg    [AS_HELP_STRING([--with-gnu-ld],
66078d623946Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
66088d623946Smrg    [test no = "$withval" || with_gnu_ld=yes],
66098d623946Smrg    [with_gnu_ld=no])dnl
661034977a2fSmrg
66118d623946Smrgac_prog=ld
66128d623946Smrgif test yes = "$GCC"; then
66138d623946Smrg  # Check if gcc -print-prog-name=ld gives a path.
66148d623946Smrg  AC_MSG_CHECKING([for ld used by $CC])
66158d623946Smrg  case $host in
66168d623946Smrg  *-*-mingw*)
66178d623946Smrg    # gcc leaves a trailing carriage return, which upsets mingw
66188d623946Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
66198d623946Smrg  *)
66208d623946Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
66218d623946Smrg  esac
66228d623946Smrg  case $ac_prog in
66238d623946Smrg    # Accept absolute paths.
66248d623946Smrg    [[\\/]]* | ?:[[\\/]]*)
66258d623946Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
66268d623946Smrg      # Canonicalize the pathname of ld
66278d623946Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
66288d623946Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
66298d623946Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
66308d623946Smrg      done
66318d623946Smrg      test -z "$LD" && LD=$ac_prog
66328d623946Smrg      ;;
66338d623946Smrg  "")
66348d623946Smrg    # If it fails, then pretend we aren't using GCC.
66358d623946Smrg    ac_prog=ld
66368d623946Smrg    ;;
66378d623946Smrg  *)
66388d623946Smrg    # If it is relative, then search for the first ld in PATH.
66398d623946Smrg    with_gnu_ld=unknown
66408d623946Smrg    ;;
66418d623946Smrg  esac
66428d623946Smrgelif test yes = "$with_gnu_ld"; then
66438d623946Smrg  AC_MSG_CHECKING([for GNU ld])
66448d623946Smrgelse
66458d623946Smrg  AC_MSG_CHECKING([for non-GNU ld])
66468d623946Smrgfi
66478d623946SmrgAC_CACHE_VAL(lt_cv_path_LD,
66488d623946Smrg[if test -z "$LD"; then
66498d623946Smrg  lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
66508d623946Smrg  for ac_dir in $PATH; do
66518d623946Smrg    IFS=$lt_save_ifs
66528d623946Smrg    test -z "$ac_dir" && ac_dir=.
66538d623946Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
66548d623946Smrg      lt_cv_path_LD=$ac_dir/$ac_prog
66558d623946Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
66568d623946Smrg      # but apparently some variants of GNU ld only accept -v.
66578d623946Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
66588d623946Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
66598d623946Smrg      *GNU* | *'with BFD'*)
66608d623946Smrg	test no != "$with_gnu_ld" && break
66618d623946Smrg	;;
66628d623946Smrg      *)
66638d623946Smrg	test yes != "$with_gnu_ld" && break
66648d623946Smrg	;;
66658d623946Smrg      esac
66668d623946Smrg    fi
66678d623946Smrg  done
66688d623946Smrg  IFS=$lt_save_ifs
66698d623946Smrgelse
66708d623946Smrg  lt_cv_path_LD=$LD # Let the user override the test with a path.
66718d623946Smrgfi])
66728d623946SmrgLD=$lt_cv_path_LD
66738d623946Smrgif test -n "$LD"; then
66748d623946Smrg  AC_MSG_RESULT($LD)
66758d623946Smrgelse
66768d623946Smrg  AC_MSG_RESULT(no)
66778d623946Smrgfi
66788d623946Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
66798d623946Smrg_LT_PATH_LD_GNU
66808d623946SmrgAC_SUBST([LD])
6681414bd68fSmrg
66828d623946Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
66838d623946Smrg])# LT_PATH_LD
6684414bd68fSmrg
66858d623946Smrg# Old names:
66868d623946SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
66878d623946SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
66888d623946Smrgdnl aclocal-1.4 backwards compatibility:
66898d623946Smrgdnl AC_DEFUN([AM_PROG_LD], [])
66908d623946Smrgdnl AC_DEFUN([AC_PROG_LD], [])
6691ee3138f1Smrg
6692ee3138f1Smrg
66938d623946Smrg# _LT_PATH_LD_GNU
66948d623946Smrg#- --------------
66958d623946Smrgm4_defun([_LT_PATH_LD_GNU],
66968d623946Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
66978d623946Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
66988d623946Smrgcase `$LD -v 2>&1 </dev/null` in
66998d623946Smrg*GNU* | *'with BFD'*)
67008d623946Smrg  lt_cv_prog_gnu_ld=yes
67018d623946Smrg  ;;
67028d623946Smrg*)
67038d623946Smrg  lt_cv_prog_gnu_ld=no
67048d623946Smrg  ;;
67058d623946Smrgesac])
67068d623946Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
67078d623946Smrg])# _LT_PATH_LD_GNU
6708ee3138f1Smrg
6709ee3138f1Smrg
67108d623946Smrg# _LT_CMD_RELOAD
67118d623946Smrg# --------------
67128d623946Smrg# find reload flag for linker
67138d623946Smrg#   -- PORTME Some linkers may need a different reload flag.
67148d623946Smrgm4_defun([_LT_CMD_RELOAD],
67158d623946Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
67168d623946Smrg  lt_cv_ld_reload_flag,
67178d623946Smrg  [lt_cv_ld_reload_flag='-r'])
67188d623946Smrgreload_flag=$lt_cv_ld_reload_flag
67198d623946Smrgcase $reload_flag in
67208d623946Smrg"" | " "*) ;;
67218d623946Smrg*) reload_flag=" $reload_flag" ;;
67228d623946Smrgesac
67238d623946Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
67248d623946Smrgcase $host_os in
67258d623946Smrg  cygwin* | mingw* | pw32* | cegcc*)
67268d623946Smrg    if test yes != "$GCC"; then
67278d623946Smrg      reload_cmds=false
67288d623946Smrg    fi
67298d623946Smrg    ;;
67308d623946Smrg  darwin*)
67318d623946Smrg    if test yes = "$GCC"; then
67328d623946Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs'
67338d623946Smrg    else
67348d623946Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
67358d623946Smrg    fi
67368d623946Smrg    ;;
67378d623946Smrgesac
67388d623946Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
67398d623946Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
67408d623946Smrg])# _LT_CMD_RELOAD
6741ee3138f1Smrg
6742ee3138f1Smrg
67438d623946Smrg# _LT_PATH_DD
67448d623946Smrg# -----------
67458d623946Smrg# find a working dd
67468d623946Smrgm4_defun([_LT_PATH_DD],
67478d623946Smrg[AC_CACHE_CHECK([for a working dd], [ac_cv_path_lt_DD],
67488d623946Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
67498d623946Smrgcat conftest.i conftest.i >conftest2.i
67508d623946Smrg: ${lt_DD:=$DD}
67518d623946SmrgAC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd],
67528d623946Smrg[if "$ac_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
67538d623946Smrg  cmp -s conftest.i conftest.out \
67548d623946Smrg  && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=:
67558d623946Smrgfi])
67568d623946Smrgrm -f conftest.i conftest2.i conftest.out])
67578d623946Smrg])# _LT_PATH_DD
6758a1ed278cSmrg
6759a1ed278cSmrg
67608d623946Smrg# _LT_CMD_TRUNCATE
67618d623946Smrg# ----------------
67628d623946Smrg# find command to truncate a binary pipe
67638d623946Smrgm4_defun([_LT_CMD_TRUNCATE],
67648d623946Smrg[m4_require([_LT_PATH_DD])
67658d623946SmrgAC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin],
67668d623946Smrg[printf 0123456789abcdef0123456789abcdef >conftest.i
67678d623946Smrgcat conftest.i conftest.i >conftest2.i
67688d623946Smrglt_cv_truncate_bin=
67698d623946Smrgif "$ac_cv_path_lt_DD" bs=32 count=1 <conftest2.i >conftest.out 2>/dev/null; then
67708d623946Smrg  cmp -s conftest.i conftest.out \
67718d623946Smrg  && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1"
67728d623946Smrgfi
67738d623946Smrgrm -f conftest.i conftest2.i conftest.out
67748d623946Smrgtest -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"])
67758d623946Smrg_LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1],
67768d623946Smrg  [Command to truncate a binary pipe])
67778d623946Smrg])# _LT_CMD_TRUNCATE
6778ee3138f1Smrg
6779ee3138f1Smrg
67808d623946Smrg# _LT_CHECK_MAGIC_METHOD
67818d623946Smrg# ----------------------
67828d623946Smrg# how to check for library dependencies
67838d623946Smrg#  -- PORTME fill in with the dynamic library characteristics
67848d623946Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
67858d623946Smrg[m4_require([_LT_DECL_EGREP])
67868d623946Smrgm4_require([_LT_DECL_OBJDUMP])
67878d623946SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
67888d623946Smrglt_cv_deplibs_check_method,
67898d623946Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
67908d623946Smrglt_cv_file_magic_test_file=
67918d623946Smrglt_cv_deplibs_check_method='unknown'
67928d623946Smrg# Need to set the preceding variable on all platforms that support
67938d623946Smrg# interlibrary dependencies.
67948d623946Smrg# 'none' -- dependencies not supported.
67958d623946Smrg# 'unknown' -- same as none, but documents that we really don't know.
67968d623946Smrg# 'pass_all' -- all dependencies passed with no checks.
67978d623946Smrg# 'test_compile' -- check by making test program.
67988d623946Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
67998d623946Smrg# that responds to the $file_magic_cmd with a given extended regex.
68008d623946Smrg# If you have 'file' or equivalent on your system and you're not sure
68018d623946Smrg# whether 'pass_all' will *always* work, you probably want this one.
6802ee3138f1Smrg
68038d623946Smrgcase $host_os in
68048d623946Smrgaix[[4-9]]*)
68058d623946Smrg  lt_cv_deplibs_check_method=pass_all
68068d623946Smrg  ;;
6807414bd68fSmrg
68088d623946Smrgbeos*)
68098d623946Smrg  lt_cv_deplibs_check_method=pass_all
68108d623946Smrg  ;;
6811414bd68fSmrg
68128d623946Smrgbsdi[[45]]*)
68138d623946Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
68148d623946Smrg  lt_cv_file_magic_cmd='$FILECMD -L'
68158d623946Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
68168d623946Smrg  ;;
6817414bd68fSmrg
68188d623946Smrgcygwin*)
68198d623946Smrg  # func_win32_libid is a shell function defined in ltmain.sh
68208d623946Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
68218d623946Smrg  lt_cv_file_magic_cmd='func_win32_libid'
68228d623946Smrg  ;;
6823414bd68fSmrg
68248d623946Smrgmingw* | pw32*)
68258d623946Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
68268d623946Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
68278d623946Smrg  # unless we find 'file', for example because we are cross-compiling.
68288d623946Smrg  if ( file / ) >/dev/null 2>&1; then
68298d623946Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
68308d623946Smrg    lt_cv_file_magic_cmd='func_win32_libid'
68318d623946Smrg  else
68328d623946Smrg    # Keep this pattern in sync with the one in func_win32_libid.
68338d623946Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
68348d623946Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
68358d623946Smrg  fi
68368d623946Smrg  ;;
6837414bd68fSmrg
68388d623946Smrgcegcc*)
68398d623946Smrg  # use the weaker test based on 'objdump'. See mingw*.
68408d623946Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
68418d623946Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
68428d623946Smrg  ;;
6843414bd68fSmrg
68448d623946Smrgdarwin* | rhapsody*)
68458d623946Smrg  lt_cv_deplibs_check_method=pass_all
68468d623946Smrg  ;;
6847414bd68fSmrg
68488d623946Smrgfreebsd* | dragonfly* | midnightbsd*)
68498d623946Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
68508d623946Smrg    case $host_cpu in
68518d623946Smrg    i*86 )
68528d623946Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
68538d623946Smrg      # Let's accept both of them until this is cleared up.
68548d623946Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
68558d623946Smrg      lt_cv_file_magic_cmd=$FILECMD
68568d623946Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
68578d623946Smrg      ;;
68588d623946Smrg    esac
68598d623946Smrg  else
68608d623946Smrg    lt_cv_deplibs_check_method=pass_all
68618d623946Smrg  fi
68628d623946Smrg  ;;
6863414bd68fSmrg
68648d623946Smrghaiku*)
68658d623946Smrg  lt_cv_deplibs_check_method=pass_all
68668d623946Smrg  ;;
6867414bd68fSmrg
68688d623946Smrghpux10.20* | hpux11*)
68698d623946Smrg  lt_cv_file_magic_cmd=$FILECMD
68708d623946Smrg  case $host_cpu in
68718d623946Smrg  ia64*)
68728d623946Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
68738d623946Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
68748d623946Smrg    ;;
68758d623946Smrg  hppa*64*)
68768d623946Smrg    [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]']
68778d623946Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
68788d623946Smrg    ;;
68798d623946Smrg  *)
68808d623946Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
68818d623946Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
68828d623946Smrg    ;;
68838d623946Smrg  esac
68848d623946Smrg  ;;
6885414bd68fSmrg
68868d623946Smrginterix[[3-9]]*)
68878d623946Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
68888d623946Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
68898d623946Smrg  ;;
689034977a2fSmrg
68918d623946Smrgirix5* | irix6* | nonstopux*)
68928d623946Smrg  case $LD in
68938d623946Smrg  *-32|*"-32 ") libmagic=32-bit;;
68948d623946Smrg  *-n32|*"-n32 ") libmagic=N32;;
68958d623946Smrg  *-64|*"-64 ") libmagic=64-bit;;
68968d623946Smrg  *) libmagic=never-match;;
68978d623946Smrg  esac
68988d623946Smrg  lt_cv_deplibs_check_method=pass_all
68998d623946Smrg  ;;
6900414bd68fSmrg
69018d623946Smrg# This must be glibc/ELF.
69028d623946Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
69038d623946Smrg  lt_cv_deplibs_check_method=pass_all
69048d623946Smrg  ;;
6905414bd68fSmrg
69068d623946Smrgnetbsd*)
69078d623946Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
69088d623946Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
69098d623946Smrg  else
69108d623946Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
69118d623946Smrg  fi
69128d623946Smrg  ;;
6913414bd68fSmrg
69148d623946Smrgnewos6*)
69158d623946Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
69168d623946Smrg  lt_cv_file_magic_cmd=$FILECMD
69178d623946Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
69188d623946Smrg  ;;
6919414bd68fSmrg
69208d623946Smrg*nto* | *qnx*)
69218d623946Smrg  lt_cv_deplibs_check_method=pass_all
69228d623946Smrg  ;;
6923414bd68fSmrg
69248d623946Smrgopenbsd* | bitrig*)
69258d623946Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
69268d623946Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
69278d623946Smrg  else
69288d623946Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
69298d623946Smrg  fi
69308d623946Smrg  ;;
6931414bd68fSmrg
69328d623946Smrgosf3* | osf4* | osf5*)
69338d623946Smrg  lt_cv_deplibs_check_method=pass_all
69348d623946Smrg  ;;
6935414bd68fSmrg
69368d623946Smrgrdos*)
69378d623946Smrg  lt_cv_deplibs_check_method=pass_all
69388d623946Smrg  ;;
6939414bd68fSmrg
69408d623946Smrgsolaris*)
69418d623946Smrg  lt_cv_deplibs_check_method=pass_all
69428d623946Smrg  ;;
6943414bd68fSmrg
69448d623946Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
69458d623946Smrg  lt_cv_deplibs_check_method=pass_all
69468d623946Smrg  ;;
6947414bd68fSmrg
69488d623946Smrgsysv4 | sysv4.3*)
69498d623946Smrg  case $host_vendor in
69508d623946Smrg  motorola)
69518d623946Smrg    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]]'
69528d623946Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
69538d623946Smrg    ;;
69548d623946Smrg  ncr)
69558d623946Smrg    lt_cv_deplibs_check_method=pass_all
69568d623946Smrg    ;;
69578d623946Smrg  sequent)
69588d623946Smrg    lt_cv_file_magic_cmd='/bin/file'
69598d623946Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
69608d623946Smrg    ;;
69618d623946Smrg  sni)
69628d623946Smrg    lt_cv_file_magic_cmd='/bin/file'
69638d623946Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
69648d623946Smrg    lt_cv_file_magic_test_file=/lib/libc.so
69658d623946Smrg    ;;
69668d623946Smrg  siemens)
69678d623946Smrg    lt_cv_deplibs_check_method=pass_all
69688d623946Smrg    ;;
69698d623946Smrg  pc)
69708d623946Smrg    lt_cv_deplibs_check_method=pass_all
69718d623946Smrg    ;;
69728d623946Smrg  esac
69738d623946Smrg  ;;
6974414bd68fSmrg
69758d623946Smrgtpf*)
69768d623946Smrg  lt_cv_deplibs_check_method=pass_all
69778d623946Smrg  ;;
69788d623946Smrgos2*)
69798d623946Smrg  lt_cv_deplibs_check_method=pass_all
69808d623946Smrg  ;;
69818d623946Smrgesac
69828d623946Smrg])
6983414bd68fSmrg
69848d623946Smrgfile_magic_glob=
69858d623946Smrgwant_nocaseglob=no
69868d623946Smrgif test "$build" = "$host"; then
69878d623946Smrg  case $host_os in
69888d623946Smrg  mingw* | pw32*)
69898d623946Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
69908d623946Smrg      want_nocaseglob=yes
69918d623946Smrg    else
69928d623946Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
69938d623946Smrg    fi
69948d623946Smrg    ;;
69958d623946Smrg  esac
6996414bd68fSmrgfi
6997414bd68fSmrg
69988d623946Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
69998d623946Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
70008d623946Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
7001414bd68fSmrg
70028d623946Smrg_LT_DECL([], [deplibs_check_method], [1],
70038d623946Smrg    [Method to check whether dependent libraries are shared objects])
70048d623946Smrg_LT_DECL([], [file_magic_cmd], [1],
70058d623946Smrg    [Command to use when deplibs_check_method = "file_magic"])
70068d623946Smrg_LT_DECL([], [file_magic_glob], [1],
70078d623946Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
70088d623946Smrg_LT_DECL([], [want_nocaseglob], [1],
70098d623946Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
70108d623946Smrg])# _LT_CHECK_MAGIC_METHOD
7011414bd68fSmrg
7012414bd68fSmrg
70138d623946Smrg# LT_PATH_NM
70148d623946Smrg# ----------
70158d623946Smrg# find the pathname to a BSD- or MS-compatible name lister
70168d623946SmrgAC_DEFUN([LT_PATH_NM],
70178d623946Smrg[AC_REQUIRE([AC_PROG_CC])dnl
70188d623946SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
70198d623946Smrg[if test -n "$NM"; then
70208d623946Smrg  # Let the user override the test.
70218d623946Smrg  lt_cv_path_NM=$NM
70228d623946Smrgelse
70238d623946Smrg  lt_nm_to_check=${ac_tool_prefix}nm
70248d623946Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
70258d623946Smrg    lt_nm_to_check="$lt_nm_to_check nm"
70268d623946Smrg  fi
70278d623946Smrg  for lt_tmp_nm in $lt_nm_to_check; do
70288d623946Smrg    lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR
70298d623946Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
70308d623946Smrg      IFS=$lt_save_ifs
70318d623946Smrg      test -z "$ac_dir" && ac_dir=.
70328d623946Smrg      tmp_nm=$ac_dir/$lt_tmp_nm
70338d623946Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then
70348d623946Smrg	# Check to see if the nm accepts a BSD-compat flag.
70358d623946Smrg	# Adding the 'sed 1q' prevents false positives on HP-UX, which says:
70368d623946Smrg	#   nm: unknown option "B" ignored
70378d623946Smrg	# Tru64's nm complains that /dev/null is an invalid object file
70388d623946Smrg	# MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty
70398d623946Smrg	case $build_os in
70408d623946Smrg	mingw*) lt_bad_file=conftest.nm/nofile ;;
70418d623946Smrg	*) lt_bad_file=/dev/null ;;
70428d623946Smrg	esac
70438d623946Smrg	case `"$tmp_nm" -B $lt_bad_file 2>&1 | $SED '1q'` in
70448d623946Smrg	*$lt_bad_file* | *'Invalid file or object type'*)
70458d623946Smrg	  lt_cv_path_NM="$tmp_nm -B"
70468d623946Smrg	  break 2
70478d623946Smrg	  ;;
70488d623946Smrg	*)
70498d623946Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | $SED '1q'` in
70508d623946Smrg	  */dev/null*)
70518d623946Smrg	    lt_cv_path_NM="$tmp_nm -p"
70528d623946Smrg	    break 2
70538d623946Smrg	    ;;
70548d623946Smrg	  *)
70558d623946Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
70568d623946Smrg	    continue # so that we can try to find one that supports BSD flags
70578d623946Smrg	    ;;
70588d623946Smrg	  esac
70598d623946Smrg	  ;;
70608d623946Smrg	esac
70618d623946Smrg      fi
70628d623946Smrg    done
70638d623946Smrg    IFS=$lt_save_ifs
70648d623946Smrg  done
70658d623946Smrg  : ${lt_cv_path_NM=no}
70668d623946Smrgfi])
70678d623946Smrgif test no != "$lt_cv_path_NM"; then
70688d623946Smrg  NM=$lt_cv_path_NM
70698d623946Smrgelse
70708d623946Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
70718d623946Smrg  if test -n "$DUMPBIN"; then :
70728d623946Smrg    # Let the user override the test.
70738d623946Smrg  else
70748d623946Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
70758d623946Smrg    case `$DUMPBIN -symbols -headers /dev/null 2>&1 | $SED '1q'` in
70768d623946Smrg    *COFF*)
70778d623946Smrg      DUMPBIN="$DUMPBIN -symbols -headers"
70788d623946Smrg      ;;
70798d623946Smrg    *)
70808d623946Smrg      DUMPBIN=:
70818d623946Smrg      ;;
70828d623946Smrg    esac
70838d623946Smrg  fi
70848d623946Smrg  AC_SUBST([DUMPBIN])
70858d623946Smrg  if test : != "$DUMPBIN"; then
70868d623946Smrg    NM=$DUMPBIN
70878d623946Smrg  fi
70888d623946Smrgfi
70898d623946Smrgtest -z "$NM" && NM=nm
70908d623946SmrgAC_SUBST([NM])
70918d623946Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
7092414bd68fSmrg
70938d623946SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
70948d623946Smrg  [lt_cv_nm_interface="BSD nm"
70958d623946Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
70968d623946Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
70978d623946Smrg  (eval "$ac_compile" 2>conftest.err)
70988d623946Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
70998d623946Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
71008d623946Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
71018d623946Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
71028d623946Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
71038d623946Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
71048d623946Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
71058d623946Smrg    lt_cv_nm_interface="MS dumpbin"
71068d623946Smrg  fi
71078d623946Smrg  rm -f conftest*])
71088d623946Smrg])# LT_PATH_NM
7109ee3138f1Smrg
71108d623946Smrg# Old names:
71118d623946SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
71128d623946SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
71138d623946Smrgdnl aclocal-1.4 backwards compatibility:
71148d623946Smrgdnl AC_DEFUN([AM_PROG_NM], [])
71158d623946Smrgdnl AC_DEFUN([AC_PROG_NM], [])
7116414bd68fSmrg
71178d623946Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
71188d623946Smrg# --------------------------------
71198d623946Smrg# how to determine the name of the shared library
71208d623946Smrg# associated with a specific link library.
71218d623946Smrg#  -- PORTME fill in with the dynamic library characteristics
71228d623946Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
71238d623946Smrg[m4_require([_LT_DECL_EGREP])
71248d623946Smrgm4_require([_LT_DECL_OBJDUMP])
71258d623946Smrgm4_require([_LT_DECL_DLLTOOL])
71268d623946SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
71278d623946Smrglt_cv_sharedlib_from_linklib_cmd,
71288d623946Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
7129414bd68fSmrg
71308d623946Smrgcase $host_os in
71318d623946Smrgcygwin* | mingw* | pw32* | cegcc*)
71328d623946Smrg  # two different shell functions defined in ltmain.sh;
71338d623946Smrg  # decide which one to use based on capabilities of $DLLTOOL
71348d623946Smrg  case `$DLLTOOL --help 2>&1` in
71358d623946Smrg  *--identify-strict*)
71368d623946Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
71378d623946Smrg    ;;
71388d623946Smrg  *)
71398d623946Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
71408d623946Smrg    ;;
71418d623946Smrg  esac
71428d623946Smrg  ;;
71438d623946Smrg*)
71448d623946Smrg  # fallback: assume linklib IS sharedlib
71458d623946Smrg  lt_cv_sharedlib_from_linklib_cmd=$ECHO
71468d623946Smrg  ;;
71478d623946Smrgesac
71488d623946Smrg])
71498d623946Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
71508d623946Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
7151414bd68fSmrg
71528d623946Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
71538d623946Smrg    [Command to associate shared and link libraries])
71548d623946Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
7155414bd68fSmrg
7156414bd68fSmrg
71578d623946Smrg# _LT_PATH_MANIFEST_TOOL
71588d623946Smrg# ----------------------
71598d623946Smrg# locate the manifest tool
71608d623946Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
71618d623946Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
71628d623946Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
71638d623946SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
71648d623946Smrg  [lt_cv_path_mainfest_tool=no
71658d623946Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
71668d623946Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
71678d623946Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
71688d623946Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
71698d623946Smrg    lt_cv_path_mainfest_tool=yes
71708d623946Smrg  fi
71718d623946Smrg  rm -f conftest*])
71728d623946Smrgif test yes != "$lt_cv_path_mainfest_tool"; then
71738d623946Smrg  MANIFEST_TOOL=:
7174414bd68fSmrgfi
71758d623946Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
71768d623946Smrg])# _LT_PATH_MANIFEST_TOOL
7177414bd68fSmrg
7178414bd68fSmrg
71798d623946Smrg# _LT_DLL_DEF_P([FILE])
71808d623946Smrg# ---------------------
71818d623946Smrg# True iff FILE is a Windows DLL '.def' file.
71828d623946Smrg# Keep in sync with func_dll_def_p in the libtool script
71838d623946SmrgAC_DEFUN([_LT_DLL_DEF_P],
71848d623946Smrg[dnl
71858d623946Smrg  test DEF = "`$SED -n dnl
71868d623946Smrg    -e '\''s/^[[	 ]]*//'\'' dnl Strip leading whitespace
71878d623946Smrg    -e '\''/^\(;.*\)*$/d'\'' dnl      Delete empty lines and comments
71888d623946Smrg    -e '\''s/^\(EXPORTS\|LIBRARY\)\([[	 ]].*\)*$/DEF/p'\'' dnl
71898d623946Smrg    -e q dnl                          Only consider the first "real" line
71908d623946Smrg    $1`" dnl
71918d623946Smrg])# _LT_DLL_DEF_P
71923e72ca8cSmrg
71938d623946Smrg
71948d623946Smrg# LT_LIB_M
71958d623946Smrg# --------
71968d623946Smrg# check for math library
71978d623946SmrgAC_DEFUN([LT_LIB_M],
71988d623946Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
71998d623946SmrgLIBM=
72008d623946Smrgcase $host in
72018d623946Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
72028d623946Smrg  # These system don't have libm, or don't need it
72038d623946Smrg  ;;
72048d623946Smrg*-ncr-sysv4.3*)
72058d623946Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw)
72068d623946Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
72078d623946Smrg  ;;
72088d623946Smrg*)
72098d623946Smrg  AC_CHECK_LIB(m, cos, LIBM=-lm)
72108d623946Smrg  ;;
72118d623946Smrgesac
72128d623946SmrgAC_SUBST([LIBM])
72138d623946Smrg])# LT_LIB_M
72143e72ca8cSmrg
7215414bd68fSmrg# Old name:
72168d623946SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
7217414bd68fSmrgdnl aclocal-1.4 backwards compatibility:
72188d623946Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
7219ee3138f1Smrg
7220ee3138f1Smrg
72218d623946Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
72228d623946Smrg# -------------------------------
72238d623946Smrgm4_defun([_LT_COMPILER_NO_RTTI],
72248d623946Smrg[m4_require([_LT_TAG_COMPILER])dnl
7225ee3138f1Smrg
72268d623946Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
722734977a2fSmrg
72288d623946Smrgif test yes = "$GCC"; then
72298d623946Smrg  case $cc_basename in
72308d623946Smrg  nvcc*)
72318d623946Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
72328d623946Smrg  *)
72338d623946Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
72348d623946Smrg  esac
723534977a2fSmrg
72368d623946Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
72378d623946Smrg    lt_cv_prog_compiler_rtti_exceptions,
72388d623946Smrg    [-fno-rtti -fno-exceptions], [],
72398d623946Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
72408d623946Smrgfi
72418d623946Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
72428d623946Smrg	[Compiler flag to turn off builtin functions])
72438d623946Smrg])# _LT_COMPILER_NO_RTTI
724434977a2fSmrg
724534977a2fSmrg
72468d623946Smrg# _LT_CMD_GLOBAL_SYMBOLS
72478d623946Smrg# ----------------------
72488d623946Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
72498d623946Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
72508d623946SmrgAC_REQUIRE([AC_PROG_CC])dnl
72518d623946SmrgAC_REQUIRE([AC_PROG_AWK])dnl
72528d623946SmrgAC_REQUIRE([LT_PATH_NM])dnl
72538d623946SmrgAC_REQUIRE([LT_PATH_LD])dnl
72548d623946Smrgm4_require([_LT_DECL_SED])dnl
72558d623946Smrgm4_require([_LT_DECL_EGREP])dnl
72568d623946Smrgm4_require([_LT_TAG_COMPILER])dnl
725734977a2fSmrg
72588d623946Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
72598d623946SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
72608d623946SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
72618d623946Smrg[
72628d623946Smrg# These are sane defaults that work on at least a few old systems.
72638d623946Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
726434977a2fSmrg
72658d623946Smrg# Character class describing NM global symbol codes.
72668d623946Smrgsymcode='[[BCDEGRST]]'
726734977a2fSmrg
72688d623946Smrg# Regexp to match symbols that can be accessed directly from C.
72698d623946Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
7270414bd68fSmrg
72718d623946Smrg# Define system-specific variables.
72728d623946Smrgcase $host_os in
72738d623946Smrgaix*)
72748d623946Smrg  symcode='[[BCDT]]'
72758d623946Smrg  ;;
72768d623946Smrgcygwin* | mingw* | pw32* | cegcc*)
72778d623946Smrg  symcode='[[ABCDGISTW]]'
72788d623946Smrg  ;;
72798d623946Smrghpux*)
72808d623946Smrg  if test ia64 = "$host_cpu"; then
72818d623946Smrg    symcode='[[ABCDEGRST]]'
7282414bd68fSmrg  fi
72838d623946Smrg  ;;
72848d623946Smrgirix* | nonstopux*)
72858d623946Smrg  symcode='[[BCDEGRST]]'
72868d623946Smrg  ;;
72878d623946Smrgosf*)
72888d623946Smrg  symcode='[[BCDEGQRST]]'
72898d623946Smrg  ;;
72908d623946Smrgsolaris*)
72918d623946Smrg  symcode='[[BDRT]]'
72928d623946Smrg  ;;
72938d623946Smrgsco3.2v5*)
72948d623946Smrg  symcode='[[DT]]'
72958d623946Smrg  ;;
72968d623946Smrgsysv4.2uw2*)
72978d623946Smrg  symcode='[[DT]]'
72988d623946Smrg  ;;
72998d623946Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
73008d623946Smrg  symcode='[[ABDT]]'
73018d623946Smrg  ;;
73028d623946Smrgsysv4)
73038d623946Smrg  symcode='[[DFNSTU]]'
73048d623946Smrg  ;;
73058d623946Smrgesac
730634977a2fSmrg
73078d623946Smrg# If we're using GNU nm, then use its standard symbol codes.
73088d623946Smrgcase `$NM -V 2>&1` in
73098d623946Smrg*GNU* | *'with BFD'*)
73108d623946Smrg  symcode='[[ABCDGIRSTW]]' ;;
73118d623946Smrgesac
731234977a2fSmrg
73138d623946Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
73148d623946Smrg  # Gets list of data symbols to import.
73158d623946Smrg  lt_cv_sys_global_symbol_to_import="$SED -n -e 's/^I .* \(.*\)$/\1/p'"
73168d623946Smrg  # Adjust the below global symbol transforms to fixup imported variables.
73178d623946Smrg  lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'"
73188d623946Smrg  lt_c_name_hook=" -e 's/^I .* \(.*\)$/  {\"\1\", (void *) 0},/p'"
73198d623946Smrg  lt_c_name_lib_hook="\
73208d623946Smrg  -e 's/^I .* \(lib.*\)$/  {\"\1\", (void *) 0},/p'\
73218d623946Smrg  -e 's/^I .* \(.*\)$/  {\"lib\1\", (void *) 0},/p'"
7322414bd68fSmrgelse
73238d623946Smrg  # Disable hooks by default.
73248d623946Smrg  lt_cv_sys_global_symbol_to_import=
73258d623946Smrg  lt_cdecl_hook=
73268d623946Smrg  lt_c_name_hook=
73278d623946Smrg  lt_c_name_lib_hook=
7328414bd68fSmrgfi
732934977a2fSmrg
73308d623946Smrg# Transform an extracted symbol line into a proper C declaration.
73318d623946Smrg# Some systems (esp. on ia64) link data and code symbols differently,
73328d623946Smrg# so use this general approach.
73338d623946Smrglt_cv_sys_global_symbol_to_cdecl="$SED -n"\
73348d623946Smrg$lt_cdecl_hook\
73358d623946Smrg" -e 's/^T .* \(.*\)$/extern int \1();/p'"\
73368d623946Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'"
73378d623946Smrg
73388d623946Smrg# Transform an extracted symbol line into symbol name and symbol address
73398d623946Smrglt_cv_sys_global_symbol_to_c_name_address="$SED -n"\
73408d623946Smrg$lt_c_name_hook\
73418d623946Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
73428d623946Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/p'"
73438d623946Smrg
73448d623946Smrg# Transform an extracted symbol line into symbol name with lib prefix and
73458d623946Smrg# symbol address.
73468d623946Smrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="$SED -n"\
73478d623946Smrg$lt_c_name_lib_hook\
73488d623946Smrg" -e 's/^: \(.*\) .*$/  {\"\1\", (void *) 0},/p'"\
73498d623946Smrg" -e 's/^$symcode$symcode* .* \(lib.*\)$/  {\"\1\", (void *) \&\1},/p'"\
73508d623946Smrg" -e 's/^$symcode$symcode* .* \(.*\)$/  {\"lib\1\", (void *) \&\1},/p'"
73518d623946Smrg
73528d623946Smrg# Handle CRLF in mingw tool chain
73538d623946Smrgopt_cr=
73548d623946Smrgcase $build_os in
73558d623946Smrgmingw*)
73568d623946Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
7357414bd68fSmrg  ;;
7358414bd68fSmrgesac
735934977a2fSmrg
73608d623946Smrg# Try without a prefix underscore, then with it.
73618d623946Smrgfor ac_symprfx in "" "_"; do
73628d623946Smrg
73638d623946Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
73648d623946Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
73658d623946Smrg
73668d623946Smrg  # Write the raw and C identifiers.
73678d623946Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
73688d623946Smrg    # Fake it for dumpbin and say T for any non-static function,
73698d623946Smrg    # D for any global variable and I for any imported variable.
73708d623946Smrg    # Also find C++ and __fastcall symbols from MSVC++ or ICC,
73718d623946Smrg    # which start with @ or ?.
73728d623946Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
73738d623946Smrg"     {last_section=section; section=\$ 3};"\
73748d623946Smrg"     /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\
73758d623946Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
73768d623946Smrg"     /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\
73778d623946Smrg"     /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\
73788d623946Smrg"     /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\
73798d623946Smrg"     \$ 0!~/External *\|/{next};"\
73808d623946Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
73818d623946Smrg"     {if(hide[section]) next};"\
73828d623946Smrg"     {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\
73838d623946Smrg"     {split(\$ 0,a,/\||\r/); split(a[2],s)};"\
73848d623946Smrg"     s[1]~/^[@?]/{print f,s[1],s[1]; next};"\
73858d623946Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\
73868d623946Smrg"     ' prfx=^$ac_symprfx]"
73878d623946Smrg  else
73888d623946Smrg    lt_cv_sys_global_symbol_pipe="$SED -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
73898d623946Smrg  fi
73908d623946Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | $SED '/ __gnu_lto/d'"
73918d623946Smrg
73928d623946Smrg  # Check to see that the pipe works correctly.
73938d623946Smrg  pipe_works=no
73948d623946Smrg
73958d623946Smrg  rm -f conftest*
73968d623946Smrg  cat > conftest.$ac_ext <<_LT_EOF
73978d623946Smrg#ifdef __cplusplus
73988d623946Smrgextern "C" {
73998d623946Smrg#endif
74008d623946Smrgchar nm_test_var;
74018d623946Smrgvoid nm_test_func(void);
74028d623946Smrgvoid nm_test_func(void){}
74038d623946Smrg#ifdef __cplusplus
74048d623946Smrg}
74058d623946Smrg#endif
74068d623946Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
74078d623946Smrg_LT_EOF
74088d623946Smrg
74098d623946Smrg  if AC_TRY_EVAL(ac_compile); then
74108d623946Smrg    # Now try to grab the symbols.
74118d623946Smrg    nlist=conftest.nm
74128d623946Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
74138d623946Smrg      # Try sorting and uniquifying the output.
74148d623946Smrg      if sort "$nlist" | uniq > "$nlist"T; then
74158d623946Smrg	mv -f "$nlist"T "$nlist"
74168d623946Smrg      else
74178d623946Smrg	rm -f "$nlist"T
74188d623946Smrg      fi
74198d623946Smrg
74208d623946Smrg      # Make sure that we snagged all the symbols we need.
74218d623946Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
74228d623946Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
74238d623946Smrg	  cat <<_LT_EOF > conftest.$ac_ext
74248d623946Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
74258d623946Smrg#if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE
74268d623946Smrg/* DATA imports from DLLs on WIN32 can't be const, because runtime
74278d623946Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
74288d623946Smrg# define LT@&t@_DLSYM_CONST
74298d623946Smrg#elif defined __osf__
74308d623946Smrg/* This system does not cope well with relocations in const data.  */
74318d623946Smrg# define LT@&t@_DLSYM_CONST
74328d623946Smrg#else
74338d623946Smrg# define LT@&t@_DLSYM_CONST const
74348d623946Smrg#endif
74358d623946Smrg
74368d623946Smrg#ifdef __cplusplus
74378d623946Smrgextern "C" {
74388d623946Smrg#endif
74398d623946Smrg
74408d623946Smrg_LT_EOF
74418d623946Smrg	  # Now generate the symbol file.
74428d623946Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
74438d623946Smrg
74448d623946Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
74458d623946Smrg
74468d623946Smrg/* The mapping between symbol names and symbols.  */
74478d623946SmrgLT@&t@_DLSYM_CONST struct {
74488d623946Smrg  const char *name;
74498d623946Smrg  void       *address;
74508d623946Smrg}
74518d623946Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
74528d623946Smrg{
74538d623946Smrg  { "@PROGRAM@", (void *) 0 },
74548d623946Smrg_LT_EOF
74558d623946Smrg	  $SED "s/^$symcode$symcode* .* \(.*\)$/  {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
74568d623946Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
74578d623946Smrg  {0, (void *) 0}
74588d623946Smrg};
74598d623946Smrg
74608d623946Smrg/* This works around a problem in FreeBSD linker */
74618d623946Smrg#ifdef FREEBSD_WORKAROUND
74628d623946Smrgstatic const void *lt_preloaded_setup() {
74638d623946Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
74648d623946Smrg}
74658d623946Smrg#endif
74668d623946Smrg
74678d623946Smrg#ifdef __cplusplus
74688d623946Smrg}
74698d623946Smrg#endif
74708d623946Smrg_LT_EOF
74718d623946Smrg	  # Now try linking the two files.
74728d623946Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
74738d623946Smrg	  lt_globsym_save_LIBS=$LIBS
74748d623946Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
74758d623946Smrg	  LIBS=conftstm.$ac_objext
74768d623946Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
74778d623946Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then
74788d623946Smrg	    pipe_works=yes
74798d623946Smrg	  fi
74808d623946Smrg	  LIBS=$lt_globsym_save_LIBS
74818d623946Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
74828d623946Smrg	else
74838d623946Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
74848d623946Smrg	fi
74858d623946Smrg      else
74868d623946Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
74878d623946Smrg      fi
74888d623946Smrg    else
74898d623946Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
74908d623946Smrg    fi
74918d623946Smrg  else
74928d623946Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
74938d623946Smrg    cat conftest.$ac_ext >&5
74948d623946Smrg  fi
74958d623946Smrg  rm -rf conftest* conftst*
74968d623946Smrg
74978d623946Smrg  # Do not use the global_symbol_pipe unless it works.
74988d623946Smrg  if test yes = "$pipe_works"; then
74998d623946Smrg    break
75008d623946Smrg  else
75018d623946Smrg    lt_cv_sys_global_symbol_pipe=
75028d623946Smrg  fi
75038d623946Smrgdone
75048d623946Smrg])
75058d623946Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
75068d623946Smrg  lt_cv_sys_global_symbol_to_cdecl=
75078d623946Smrgfi
75088d623946Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
75098d623946Smrg  AC_MSG_RESULT(failed)
75108d623946Smrgelse
75118d623946Smrg  AC_MSG_RESULT(ok)
75128d623946Smrgfi
75138d623946Smrg
75148d623946Smrg# Response file support.
75158d623946Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
75168d623946Smrg  nm_file_list_spec='@'
75178d623946Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
75188d623946Smrg  nm_file_list_spec='@'
75198d623946Smrgfi
75208d623946Smrg
75218d623946Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
75228d623946Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
75238d623946Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
75248d623946Smrg    [Transform the output of nm in a proper C declaration])
75258d623946Smrg_LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1],
75268d623946Smrg    [Transform the output of nm into a list of symbols to manually relocate])
75278d623946Smrg_LT_DECL([global_symbol_to_c_name_address],
75288d623946Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
75298d623946Smrg    [Transform the output of nm in a C name address pair])
75308d623946Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
75318d623946Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
75328d623946Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
75338d623946Smrg_LT_DECL([nm_interface], [lt_cv_nm_interface], [1],
75348d623946Smrg    [The name lister interface])
75358d623946Smrg_LT_DECL([], [nm_file_list_spec], [1],
75368d623946Smrg    [Specify filename containing input files for $NM])
75378d623946Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
75388d623946Smrg
75398d623946Smrg
75408d623946Smrg# _LT_COMPILER_PIC([TAGNAME])
75418d623946Smrg# ---------------------------
75428d623946Smrgm4_defun([_LT_COMPILER_PIC],
75438d623946Smrg[m4_require([_LT_TAG_COMPILER])dnl
75448d623946Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
75458d623946Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
75468d623946Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
75478d623946Smrg
75488d623946Smrgm4_if([$1], [CXX], [
75498d623946Smrg  # C++ specific cases for pic, static, wl, etc.
75508d623946Smrg  if test yes = "$GXX"; then
75518d623946Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
75528d623946Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
75538d623946Smrg
75548d623946Smrg    case $host_os in
75558d623946Smrg    aix*)
75568d623946Smrg      # All AIX code is PIC.
75578d623946Smrg      if test ia64 = "$host_cpu"; then
75588d623946Smrg	# AIX 5 now supports IA64 processor
75598d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
75608d623946Smrg      fi
75618d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
75628d623946Smrg      ;;
75638d623946Smrg
75648d623946Smrg    amigaos*)
75658d623946Smrg      case $host_cpu in
75668d623946Smrg      powerpc)
75678d623946Smrg            # see comment about AmigaOS4 .so support
75688d623946Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
75698d623946Smrg        ;;
75708d623946Smrg      m68k)
75718d623946Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
75728d623946Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
75738d623946Smrg            # like '-m68040'.
75748d623946Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
75758d623946Smrg        ;;
75768d623946Smrg      esac
75778d623946Smrg      ;;
75788d623946Smrg
75798d623946Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
75808d623946Smrg      # PIC is the default for these OSes.
75818d623946Smrg      ;;
75828d623946Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
75838d623946Smrg      # This hack is so that the source file can tell whether it is being
75848d623946Smrg      # built for inclusion in a dll (and should export symbols for example).
75858d623946Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
75868d623946Smrg      # (--disable-auto-import) libraries
75878d623946Smrg      m4_if([$1], [GCJ], [],
75888d623946Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
75898d623946Smrg      case $host_os in
75908d623946Smrg      os2*)
75918d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
75928d623946Smrg	;;
75938d623946Smrg      esac
75948d623946Smrg      ;;
75958d623946Smrg    darwin* | rhapsody*)
75968d623946Smrg      # PIC is the default on this platform
75978d623946Smrg      # Common symbols not allowed in MH_DYLIB files
75988d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
75998d623946Smrg      ;;
76008d623946Smrg    *djgpp*)
76018d623946Smrg      # DJGPP does not support shared libraries at all
76028d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
76038d623946Smrg      ;;
76048d623946Smrg    haiku*)
76058d623946Smrg      # PIC is the default for Haiku.
76068d623946Smrg      # The "-static" flag exists, but is broken.
76078d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
76088d623946Smrg      ;;
76098d623946Smrg    interix[[3-9]]*)
76108d623946Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
76118d623946Smrg      # Instead, we relocate shared libraries at runtime.
76128d623946Smrg      ;;
76138d623946Smrg    sysv4*MP*)
76148d623946Smrg      if test -d /usr/nec; then
76158d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
76168d623946Smrg      fi
76178d623946Smrg      ;;
76188d623946Smrg    hpux*)
76198d623946Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
76208d623946Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
76218d623946Smrg      # sets the default TLS model and affects inlining.
76228d623946Smrg      case $host_cpu in
76238d623946Smrg      hppa*64*)
76248d623946Smrg	;;
76258d623946Smrg      *)
76268d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76278d623946Smrg	;;
76288d623946Smrg      esac
76298d623946Smrg      ;;
76308d623946Smrg    *qnx* | *nto*)
76318d623946Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
76328d623946Smrg      # it will coredump.
76338d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
76348d623946Smrg      ;;
76358d623946Smrg    *)
76368d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
76378d623946Smrg      ;;
76388d623946Smrg    esac
76398d623946Smrg  else
76408d623946Smrg    case $host_os in
76418d623946Smrg      aix[[4-9]]*)
76428d623946Smrg	# All AIX code is PIC.
76438d623946Smrg	if test ia64 = "$host_cpu"; then
76448d623946Smrg	  # AIX 5 now supports IA64 processor
76458d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
76468d623946Smrg	else
76478d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
76488d623946Smrg	fi
76498d623946Smrg	;;
76508d623946Smrg      chorus*)
76518d623946Smrg	case $cc_basename in
76528d623946Smrg	cxch68*)
76538d623946Smrg	  # Green Hills C++ Compiler
76548d623946Smrg	  # _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"
76558d623946Smrg	  ;;
76568d623946Smrg	esac
76578d623946Smrg	;;
76588d623946Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
76598d623946Smrg	# This hack is so that the source file can tell whether it is being
76608d623946Smrg	# built for inclusion in a dll (and should export symbols for example).
76618d623946Smrg	m4_if([$1], [GCJ], [],
76628d623946Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
76638d623946Smrg	;;
76648d623946Smrg      dgux*)
76658d623946Smrg	case $cc_basename in
76668d623946Smrg	  ec++*)
76678d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
76688d623946Smrg	    ;;
76698d623946Smrg	  ghcx*)
76708d623946Smrg	    # Green Hills C++ Compiler
76718d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
76728d623946Smrg	    ;;
76738d623946Smrg	  *)
76748d623946Smrg	    ;;
76758d623946Smrg	esac
76768d623946Smrg	;;
76778d623946Smrg      freebsd* | dragonfly* | midnightbsd*)
76788d623946Smrg	# FreeBSD uses GNU C++
76798d623946Smrg	;;
76808d623946Smrg      hpux9* | hpux10* | hpux11*)
76818d623946Smrg	case $cc_basename in
76828d623946Smrg	  CC*)
76838d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
76848d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
76858d623946Smrg	    if test ia64 != "$host_cpu"; then
76868d623946Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
76878d623946Smrg	    fi
76888d623946Smrg	    ;;
76898d623946Smrg	  aCC*)
76908d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
76918d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
76928d623946Smrg	    case $host_cpu in
76938d623946Smrg	    hppa*64*|ia64*)
76948d623946Smrg	      # +Z the default
76958d623946Smrg	      ;;
76968d623946Smrg	    *)
76978d623946Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
76988d623946Smrg	      ;;
76998d623946Smrg	    esac
77008d623946Smrg	    ;;
77018d623946Smrg	  *)
77028d623946Smrg	    ;;
77038d623946Smrg	esac
77048d623946Smrg	;;
77058d623946Smrg      interix*)
77068d623946Smrg	# This is c89, which is MS Visual C++ (no shared libs)
77078d623946Smrg	# Anyone wants to do a port?
77088d623946Smrg	;;
77098d623946Smrg      irix5* | irix6* | nonstopux*)
77108d623946Smrg	case $cc_basename in
77118d623946Smrg	  CC*)
77128d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77138d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
77148d623946Smrg	    # CC pic flag -KPIC is the default.
77158d623946Smrg	    ;;
77168d623946Smrg	  *)
77178d623946Smrg	    ;;
77188d623946Smrg	esac
77198d623946Smrg	;;
77208d623946Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
77218d623946Smrg	case $cc_basename in
77228d623946Smrg	  KCC*)
77238d623946Smrg	    # KAI C++ Compiler
77248d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
77258d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
77268d623946Smrg	    ;;
77278d623946Smrg	  ecpc* )
77288d623946Smrg	    # old Intel C++ for x86_64, which still supported -KPIC.
77298d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77308d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
77318d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
77328d623946Smrg	    ;;
77338d623946Smrg	  icpc* )
77348d623946Smrg	    # Intel C++, used to be incompatible with GCC.
77358d623946Smrg	    # ICC 10 doesn't accept -KPIC any more.
77368d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77378d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
77388d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
77398d623946Smrg	    ;;
77408d623946Smrg	  pgCC* | pgcpp*)
77418d623946Smrg	    # Portland Group C++ compiler
77428d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77438d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
77448d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
77458d623946Smrg	    ;;
77468d623946Smrg	  cxx*)
77478d623946Smrg	    # Compaq C++
77488d623946Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
77498d623946Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
77508d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
77518d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
77528d623946Smrg	    ;;
77538d623946Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
77548d623946Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
77558d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
77568d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
77578d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
77588d623946Smrg	    ;;
77598d623946Smrg	  *)
77608d623946Smrg	    case `$CC -V 2>&1 | $SED 5q` in
77618d623946Smrg	    *Sun\ C*)
77628d623946Smrg	      # Sun C++ 5.9
77638d623946Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
77648d623946Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
77658d623946Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
77668d623946Smrg	      ;;
77678d623946Smrg	    esac
77688d623946Smrg	    ;;
77698d623946Smrg	esac
77708d623946Smrg	;;
77718d623946Smrg      lynxos*)
77728d623946Smrg	;;
77738d623946Smrg      m88k*)
77748d623946Smrg	;;
77758d623946Smrg      mvs*)
77768d623946Smrg	case $cc_basename in
77778d623946Smrg	  cxx*)
77788d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
77798d623946Smrg	    ;;
77808d623946Smrg	  *)
77818d623946Smrg	    ;;
77828d623946Smrg	esac
77838d623946Smrg	;;
77848d623946Smrg      netbsd*)
77858d623946Smrg	;;
77868d623946Smrg      *qnx* | *nto*)
77878d623946Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
77888d623946Smrg        # it will coredump.
77898d623946Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
77908d623946Smrg        ;;
77918d623946Smrg      osf3* | osf4* | osf5*)
77928d623946Smrg	case $cc_basename in
77938d623946Smrg	  KCC*)
77948d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
77958d623946Smrg	    ;;
77968d623946Smrg	  RCC*)
77978d623946Smrg	    # Rational C++ 2.4.1
77988d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
77998d623946Smrg	    ;;
78008d623946Smrg	  cxx*)
78018d623946Smrg	    # Digital/Compaq C++
78028d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78038d623946Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
78048d623946Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
78058d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
78068d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
78078d623946Smrg	    ;;
78088d623946Smrg	  *)
78098d623946Smrg	    ;;
78108d623946Smrg	esac
78118d623946Smrg	;;
78128d623946Smrg      psos*)
78138d623946Smrg	;;
78148d623946Smrg      solaris*)
78158d623946Smrg	case $cc_basename in
78168d623946Smrg	  CC* | sunCC*)
78178d623946Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
78188d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
78198d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78208d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
78218d623946Smrg	    ;;
78228d623946Smrg	  gcx*)
78238d623946Smrg	    # Green Hills C++ Compiler
78248d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
78258d623946Smrg	    ;;
78268d623946Smrg	  *)
78278d623946Smrg	    ;;
78288d623946Smrg	esac
78298d623946Smrg	;;
78308d623946Smrg      sunos4*)
78318d623946Smrg	case $cc_basename in
78328d623946Smrg	  CC*)
78338d623946Smrg	    # Sun C++ 4.x
78348d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
78358d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78368d623946Smrg	    ;;
78378d623946Smrg	  lcc*)
78388d623946Smrg	    # Lucid
78398d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
78408d623946Smrg	    ;;
78418d623946Smrg	  *)
78428d623946Smrg	    ;;
78438d623946Smrg	esac
78448d623946Smrg	;;
78458d623946Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
78468d623946Smrg	case $cc_basename in
78478d623946Smrg	  CC*)
78488d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78498d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
78508d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78518d623946Smrg	    ;;
78528d623946Smrg	esac
78538d623946Smrg	;;
78548d623946Smrg      tandem*)
78558d623946Smrg	case $cc_basename in
78568d623946Smrg	  NCC*)
78578d623946Smrg	    # NonStop-UX NCC 3.20
78588d623946Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
78598d623946Smrg	    ;;
78608d623946Smrg	  *)
78618d623946Smrg	    ;;
78628d623946Smrg	esac
78638d623946Smrg	;;
78648d623946Smrg      vxworks*)
78658d623946Smrg	;;
78668d623946Smrg      *)
78678d623946Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
78688d623946Smrg	;;
78698d623946Smrg    esac
78708d623946Smrg  fi
78718d623946Smrg],
78728d623946Smrg[
78738d623946Smrg  if test yes = "$GCC"; then
78748d623946Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
78758d623946Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
78768d623946Smrg
78778d623946Smrg    case $host_os in
78788d623946Smrg      aix*)
78798d623946Smrg      # All AIX code is PIC.
78808d623946Smrg      if test ia64 = "$host_cpu"; then
78818d623946Smrg	# AIX 5 now supports IA64 processor
78828d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
78838d623946Smrg      fi
78848d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
78858d623946Smrg      ;;
788634977a2fSmrg
78878d623946Smrg    amigaos*)
78888d623946Smrg      case $host_cpu in
78898d623946Smrg      powerpc)
78908d623946Smrg            # see comment about AmigaOS4 .so support
78918d623946Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
7892414bd68fSmrg        ;;
78938d623946Smrg      m68k)
78948d623946Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
78958d623946Smrg            # adding the '-m68020' flag to GCC prevents building anything better,
78968d623946Smrg            # like '-m68040'.
78978d623946Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
7898414bd68fSmrg        ;;
78998d623946Smrg      esac
79008d623946Smrg      ;;
7901a1ed278cSmrg
79028d623946Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
79038d623946Smrg      # PIC is the default for these OSes.
79048d623946Smrg      ;;
7905ee3138f1Smrg
79068d623946Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
79078d623946Smrg      # This hack is so that the source file can tell whether it is being
79088d623946Smrg      # built for inclusion in a dll (and should export symbols for example).
79098d623946Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
79108d623946Smrg      # (--disable-auto-import) libraries
79118d623946Smrg      m4_if([$1], [GCJ], [],
79128d623946Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
79138d623946Smrg      case $host_os in
79148d623946Smrg      os2*)
79158d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
79168d623946Smrg	;;
79178d623946Smrg      esac
79188d623946Smrg      ;;
7919ee3138f1Smrg
79208d623946Smrg    darwin* | rhapsody*)
79218d623946Smrg      # PIC is the default on this platform
79228d623946Smrg      # Common symbols not allowed in MH_DYLIB files
79238d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
79248d623946Smrg      ;;
7925ee3138f1Smrg
79268d623946Smrg    haiku*)
79278d623946Smrg      # PIC is the default for Haiku.
79288d623946Smrg      # The "-static" flag exists, but is broken.
79298d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
79308d623946Smrg      ;;
7931b425557eSmrg
79328d623946Smrg    hpux*)
79338d623946Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
79348d623946Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
79358d623946Smrg      # sets the default TLS model and affects inlining.
79368d623946Smrg      case $host_cpu in
79378d623946Smrg      hppa*64*)
79388d623946Smrg	# +Z the default
79398d623946Smrg	;;
79408d623946Smrg      *)
79418d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
79428d623946Smrg	;;
79438d623946Smrg      esac
79448d623946Smrg      ;;
7945ee3138f1Smrg
79468d623946Smrg    interix[[3-9]]*)
79478d623946Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
79488d623946Smrg      # Instead, we relocate shared libraries at runtime.
79498d623946Smrg      ;;
7950ee3138f1Smrg
79518d623946Smrg    msdosdjgpp*)
79528d623946Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
79538d623946Smrg      # on systems that don't support them.
79548d623946Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
79558d623946Smrg      enable_shared=no
79568d623946Smrg      ;;
7957ee3138f1Smrg
79588d623946Smrg    *nto* | *qnx*)
79598d623946Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
79608d623946Smrg      # it will coredump.
79618d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
79628d623946Smrg      ;;
796334977a2fSmrg
79648d623946Smrg    sysv4*MP*)
79658d623946Smrg      if test -d /usr/nec; then
79668d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
79678d623946Smrg      fi
79688d623946Smrg      ;;
796934977a2fSmrg
79708d623946Smrg    *)
79718d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
79728d623946Smrg      ;;
79738d623946Smrg    esac
797434977a2fSmrg
79758d623946Smrg    case $cc_basename in
79768d623946Smrg    nvcc*) # Cuda Compiler Driver 2.2
79778d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
79788d623946Smrg      if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
79798d623946Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)"
79808d623946Smrg      fi
79818d623946Smrg      ;;
79828d623946Smrg    esac
79838d623946Smrg  else
79848d623946Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
79858d623946Smrg    case $host_os in
79868d623946Smrg    aix*)
79878d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
79888d623946Smrg      if test ia64 = "$host_cpu"; then
79898d623946Smrg	# AIX 5 now supports IA64 processor
79908d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
79918d623946Smrg      else
79928d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
79938d623946Smrg      fi
79948d623946Smrg      ;;
799534977a2fSmrg
79968d623946Smrg    darwin* | rhapsody*)
79978d623946Smrg      # PIC is the default on this platform
79988d623946Smrg      # Common symbols not allowed in MH_DYLIB files
79998d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
80008d623946Smrg      case $cc_basename in
80018d623946Smrg      nagfor*)
80028d623946Smrg        # NAG Fortran compiler
80038d623946Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
80048d623946Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
80058d623946Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
80068d623946Smrg        ;;
80078d623946Smrg      esac
80088d623946Smrg      ;;
800934977a2fSmrg
80108d623946Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
80118d623946Smrg      # This hack is so that the source file can tell whether it is being
80128d623946Smrg      # built for inclusion in a dll (and should export symbols for example).
80138d623946Smrg      m4_if([$1], [GCJ], [],
80148d623946Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
80158d623946Smrg      case $host_os in
80168d623946Smrg      os2*)
80178d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static'
80188d623946Smrg	;;
80198d623946Smrg      esac
80208d623946Smrg      ;;
8021ee3138f1Smrg
80228d623946Smrg    hpux9* | hpux10* | hpux11*)
80238d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80248d623946Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
80258d623946Smrg      # not for PA HP-UX.
80268d623946Smrg      case $host_cpu in
80278d623946Smrg      hppa*64*|ia64*)
80288d623946Smrg	# +Z the default
80298d623946Smrg	;;
80308d623946Smrg      *)
80318d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
80328d623946Smrg	;;
80338d623946Smrg      esac
80348d623946Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
80358d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive'
80368d623946Smrg      ;;
80373e72ca8cSmrg
80388d623946Smrg    irix5* | irix6* | nonstopux*)
80398d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80408d623946Smrg      # PIC (with -KPIC) is the default.
80418d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
80428d623946Smrg      ;;
8043ee3138f1Smrg
80448d623946Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
80458d623946Smrg      case $cc_basename in
80468d623946Smrg      # old Intel for x86_64, which still supported -KPIC.
80478d623946Smrg      ecc*)
80488d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80498d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
80508d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
80518d623946Smrg        ;;
80528d623946Smrg      # icc used to be incompatible with GCC.
80538d623946Smrg      # ICC 10 doesn't accept -KPIC any more.
80548d623946Smrg      icc* | ifort*)
80558d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80568d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
80578d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
80588d623946Smrg        ;;
80598d623946Smrg      # Lahey Fortran 8.1.
80608d623946Smrg      lf95*)
80618d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80628d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
80638d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
80648d623946Smrg	;;
80658d623946Smrg      nagfor*)
80668d623946Smrg	# NAG Fortran compiler
80678d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
80688d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
80698d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
80708d623946Smrg	;;
80718d623946Smrg      tcc*)
80728d623946Smrg	# Fabrice Bellard et al's Tiny C Compiler
80738d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80748d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
80758d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
80768d623946Smrg	;;
80778d623946Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
80788d623946Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
80798d623946Smrg	# which looks to be a dead project)
80808d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80818d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
80828d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
80838d623946Smrg        ;;
80848d623946Smrg      ccc*)
80858d623946Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80868d623946Smrg        # All Alpha code is PIC.
80878d623946Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
80888d623946Smrg        ;;
80898d623946Smrg      xl* | bgxl* | bgf* | mpixl*)
80908d623946Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
80918d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
80928d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
80938d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
80948d623946Smrg	;;
80958d623946Smrg      *)
80968d623946Smrg	case `$CC -V 2>&1 | $SED 5q` in
80978d623946Smrg	*Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*)
80988d623946Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
80998d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81008d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81018d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
81028d623946Smrg	  ;;
81038d623946Smrg	*Sun\ F* | *Sun*Fortran*)
81048d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81058d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81068d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
81078d623946Smrg	  ;;
81088d623946Smrg	*Sun\ C*)
81098d623946Smrg	  # Sun C 5.9
81108d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81118d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81128d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81138d623946Smrg	  ;;
81148d623946Smrg        *Intel*\ [[CF]]*Compiler*)
81158d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81168d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
81178d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
81188d623946Smrg	  ;;
81198d623946Smrg	*Portland\ Group*)
81208d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81218d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
81228d623946Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81238d623946Smrg	  ;;
81248d623946Smrg	esac
81258d623946Smrg	;;
81268d623946Smrg      esac
81278d623946Smrg      ;;
8128ee3138f1Smrg
81298d623946Smrg    newsos6)
81308d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81318d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81328d623946Smrg      ;;
8133ee3138f1Smrg
81348d623946Smrg    *nto* | *qnx*)
81358d623946Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
81368d623946Smrg      # it will coredump.
81378d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
81388d623946Smrg      ;;
8139ee3138f1Smrg
81408d623946Smrg    osf3* | osf4* | osf5*)
81418d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81428d623946Smrg      # All OSF/1 code is PIC.
81438d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
81448d623946Smrg      ;;
8145ee3138f1Smrg
81468d623946Smrg    rdos*)
81478d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
81488d623946Smrg      ;;
8149ee3138f1Smrg
81508d623946Smrg    solaris*)
81518d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81528d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81538d623946Smrg      case $cc_basename in
81548d623946Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
81558d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
81568d623946Smrg      *)
81578d623946Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
81588d623946Smrg      esac
81598d623946Smrg      ;;
8160ee3138f1Smrg
81618d623946Smrg    sunos4*)
81628d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
81638d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
81648d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81658d623946Smrg      ;;
8166ee3138f1Smrg
81678d623946Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
81688d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81698d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81708d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81718d623946Smrg      ;;
8172ee3138f1Smrg
81738d623946Smrg    sysv4*MP*)
81748d623946Smrg      if test -d /usr/nec; then
81758d623946Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
81768d623946Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81778d623946Smrg      fi
81788d623946Smrg      ;;
8179ee3138f1Smrg
81808d623946Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
81818d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81828d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
81838d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81848d623946Smrg      ;;
8185ee3138f1Smrg
81868d623946Smrg    unicos*)
81878d623946Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
81888d623946Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
81898d623946Smrg      ;;
8190b425557eSmrg
81918d623946Smrg    uts4*)
81928d623946Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
81938d623946Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
81948d623946Smrg      ;;
8195b425557eSmrg
81968d623946Smrg    *)
81978d623946Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
81988d623946Smrg      ;;
81998d623946Smrg    esac
82008d623946Smrg  fi
82018d623946Smrg])
82028d623946Smrgcase $host_os in
82038d623946Smrg  # For platforms that do not support PIC, -DPIC is meaningless:
82048d623946Smrg  *djgpp*)
82058d623946Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
82068d623946Smrg    ;;
82078d623946Smrg  *)
82088d623946Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
82098d623946Smrg    ;;
82108d623946Smrgesac
8211414bd68fSmrg
82128d623946SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
82138d623946Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
82148d623946Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
82158d623946Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
8216414bd68fSmrg
82178d623946Smrg#
82188d623946Smrg# Check to make sure the PIC flag actually works.
82198d623946Smrg#
82208d623946Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
82218d623946Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
82228d623946Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
82238d623946Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
82248d623946Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
82258d623946Smrg     "" | " "*) ;;
82268d623946Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
82278d623946Smrg     esac],
82288d623946Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
82298d623946Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
82308d623946Smrgfi
82318d623946Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
82328d623946Smrg	[Additional compiler flags for building library objects])
8233b425557eSmrg
82348d623946Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
82358d623946Smrg	[How to pass a linker flag through the compiler])
82368d623946Smrg#
82378d623946Smrg# Check to make sure the static flag actually works.
82388d623946Smrg#
82398d623946Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
82408d623946Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
82418d623946Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
82428d623946Smrg  $lt_tmp_static_flag,
82438d623946Smrg  [],
82448d623946Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
82458d623946Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
82468d623946Smrg	[Compiler flag to prevent dynamic linking])
82478d623946Smrg])# _LT_COMPILER_PIC
8248414bd68fSmrg
8249414bd68fSmrg
82508d623946Smrg# _LT_LINKER_SHLIBS([TAGNAME])
8251414bd68fSmrg# ----------------------------
82528d623946Smrg# See if the linker supports building shared libraries.
82538d623946Smrgm4_defun([_LT_LINKER_SHLIBS],
82548d623946Smrg[AC_REQUIRE([LT_PATH_LD])dnl
82558d623946SmrgAC_REQUIRE([LT_PATH_NM])dnl
82568d623946Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
82578d623946Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
82588d623946Smrgm4_require([_LT_DECL_EGREP])dnl
82598d623946Smrgm4_require([_LT_DECL_SED])dnl
82608d623946Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
82618d623946Smrgm4_require([_LT_TAG_COMPILER])dnl
82628d623946SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
82638d623946Smrgm4_if([$1], [CXX], [
82648d623946Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
82658d623946Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
82668d623946Smrg  case $host_os in
82678d623946Smrg  aix[[4-9]]*)
82688d623946Smrg    # If we're using GNU nm, then we don't want the "-C" option.
82698d623946Smrg    # -C means demangle to GNU nm, but means don't demangle to AIX nm.
82708d623946Smrg    # Without the "-l" option, or with the "-B" option, AIX nm treats
82718d623946Smrg    # weak defined symbols like other global defined symbols, whereas
82728d623946Smrg    # GNU nm marks them as "W".
82738d623946Smrg    # While the 'weak' keyword is ignored in the Export File, we need
82748d623946Smrg    # it in the Import File for the 'aix-soname' feature, so we have
82758d623946Smrg    # to replace the "-B" option with "-P" for AIX nm.
82768d623946Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
82778d623946Smrg      _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'
82788d623946Smrg    else
82798d623946Smrg      _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'
82808d623946Smrg    fi
82818d623946Smrg    ;;
82828d623946Smrg  pw32*)
82838d623946Smrg    _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds
82848d623946Smrg    ;;
82858d623946Smrg  cygwin* | mingw* | cegcc*)
82868d623946Smrg    case $cc_basename in
82878d623946Smrg    cl* | icl*)
82888d623946Smrg      _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
82898d623946Smrg      ;;
8290414bd68fSmrg    *)
82918d623946Smrg      _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'
82928d623946Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8293414bd68fSmrg      ;;
82948d623946Smrg    esac
82958d623946Smrg    ;;
82968d623946Smrg  *)
82978d623946Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
82988d623946Smrg    ;;
82998d623946Smrg  esac
83008d623946Smrg], [
83018d623946Smrg  runpath_var=
83028d623946Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
83038d623946Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
83048d623946Smrg  _LT_TAGVAR(archive_cmds, $1)=
83058d623946Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
83068d623946Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
83078d623946Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
83088d623946Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
83098d623946Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
83108d623946Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
83118d623946Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
83128d623946Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
83138d623946Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
83148d623946Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
83158d623946Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
83168d623946Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
83178d623946Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
83188d623946Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
83198d623946Smrg  _LT_TAGVAR(module_cmds, $1)=
83208d623946Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
83218d623946Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
83228d623946Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
83238d623946Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
83248d623946Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
83258d623946Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
83268d623946Smrg  # included in the symbol list
83278d623946Smrg  _LT_TAGVAR(include_expsyms, $1)=
83288d623946Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
83298d623946Smrg  # it will be wrapped by ' (' and ')$', so one must not match beginning or
83308d623946Smrg  # end of line.  Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc',
83318d623946Smrg  # as well as any symbol that contains 'd'.
83328d623946Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
83338d623946Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
83348d623946Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
83358d623946Smrg  # the symbol is explicitly referenced.  Since portable code cannot
83368d623946Smrg  # rely on this symbol name, it's probably fine to never include it in
83378d623946Smrg  # preloaded symbol tables.
83388d623946Smrg  # Exclude shared library initialization/finalization symbols.
83398d623946Smrgdnl Note also adjust exclude_expsyms for C++ above.
83408d623946Smrg  extract_expsyms_cmds=
8341414bd68fSmrg
83428d623946Smrg  case $host_os in
83438d623946Smrg  cygwin* | mingw* | pw32* | cegcc*)
83448d623946Smrg    # FIXME: the MSVC++ and ICC port hasn't been tested in a loooong time
83458d623946Smrg    # When not using gcc, we currently assume that we are using
83468d623946Smrg    # Microsoft Visual C++ or Intel C++ Compiler.
83478d623946Smrg    if test yes != "$GCC"; then
83488d623946Smrg      with_gnu_ld=no
83498d623946Smrg    fi
83508d623946Smrg    ;;
83518d623946Smrg  interix*)
83528d623946Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++ or ICC)
83538d623946Smrg    with_gnu_ld=yes
83548d623946Smrg    ;;
83558d623946Smrg  openbsd* | bitrig*)
83568d623946Smrg    with_gnu_ld=no
83578d623946Smrg    ;;
83588d623946Smrg  esac
8359b425557eSmrg
83608d623946Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
8361b425557eSmrg
83628d623946Smrg  # On some targets, GNU ld is compatible enough with the native linker
83638d623946Smrg  # that we're better off using the native interface for both.
83648d623946Smrg  lt_use_gnu_ld_interface=no
83658d623946Smrg  if test yes = "$with_gnu_ld"; then
83668d623946Smrg    case $host_os in
83678d623946Smrg      aix*)
83688d623946Smrg	# The AIX port of GNU ld has always aspired to compatibility
83698d623946Smrg	# with the native linker.  However, as the warning in the GNU ld
83708d623946Smrg	# block says, versions before 2.19.5* couldn't really create working
83718d623946Smrg	# shared libraries, regardless of the interface used.
83728d623946Smrg	case `$LD -v 2>&1` in
83738d623946Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
83748d623946Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
83758d623946Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
83768d623946Smrg	  *)
83778d623946Smrg	    lt_use_gnu_ld_interface=yes
83788d623946Smrg	    ;;
83798d623946Smrg	esac
83808d623946Smrg	;;
83818d623946Smrg      *)
83828d623946Smrg	lt_use_gnu_ld_interface=yes
83838d623946Smrg	;;
83848d623946Smrg    esac
83858d623946Smrg  fi
8386b425557eSmrg
83878d623946Smrg  if test yes = "$lt_use_gnu_ld_interface"; then
83888d623946Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
83898d623946Smrg    wlarc='$wl'
8390414bd68fSmrg
83918d623946Smrg    # Set some defaults for GNU ld with shared library support. These
83928d623946Smrg    # are reset later if shared libraries are not supported. Putting them
83938d623946Smrg    # here allows them to be overridden if necessary.
83948d623946Smrg    runpath_var=LD_RUN_PATH
83958d623946Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
83968d623946Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
83978d623946Smrg    # ancient GNU ld didn't support --whole-archive et. al.
83988d623946Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
83998d623946Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
84008d623946Smrg    else
84018d623946Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
84028d623946Smrg    fi
84038d623946Smrg    supports_anon_versioning=no
84048d623946Smrg    case `$LD -v | $SED -e 's/([[^)]]\+)\s\+//' 2>&1` in
84058d623946Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
84068d623946Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
84078d623946Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
84088d623946Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
84098d623946Smrg      *\ 2.11.*) ;; # other 2.11 versions
84108d623946Smrg      *) supports_anon_versioning=yes ;;
84118d623946Smrg    esac
8412414bd68fSmrg
84138d623946Smrg    # See if GNU ld supports shared libraries.
84148d623946Smrg    case $host_os in
84158d623946Smrg    aix[[3-9]]*)
84168d623946Smrg      # On AIX/PPC, the GNU linker is very broken
84178d623946Smrg      if test ia64 != "$host_cpu"; then
84188d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
84198d623946Smrg	cat <<_LT_EOF 1>&2
8420b425557eSmrg
84218d623946Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
84228d623946Smrg*** to be unable to reliably create shared libraries on AIX.
84238d623946Smrg*** Therefore, libtool is disabling shared libraries support.  If you
84248d623946Smrg*** really care for shared libraries, you may want to install binutils
84258d623946Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
84268d623946Smrg*** You will then need to restart the configuration process.
84278d623946Smrg
84288d623946Smrg_LT_EOF
84298d623946Smrg      fi
84308d623946Smrg      ;;
8431ee3138f1Smrg
84328d623946Smrg    amigaos*)
84338d623946Smrg      case $host_cpu in
84348d623946Smrg      powerpc)
84358d623946Smrg            # see comment about AmigaOS4 .so support
84368d623946Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
84378d623946Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
84388d623946Smrg        ;;
84398d623946Smrg      m68k)
84408d623946Smrg            _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)'
84418d623946Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
84428d623946Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
84438d623946Smrg        ;;
84448d623946Smrg      esac
84458d623946Smrg      ;;
8446ee3138f1Smrg
84478d623946Smrg    beos*)
84488d623946Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
84498d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
84508d623946Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
84518d623946Smrg	# support --undefined.  This deserves some investigation.  FIXME
84528d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
84538d623946Smrg      else
84548d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
84558d623946Smrg      fi
8456414bd68fSmrg      ;;
8457ee3138f1Smrg
84588d623946Smrg    cygwin* | mingw* | pw32* | cegcc*)
84598d623946Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
84608d623946Smrg      # as there is no search path for DLLs.
84618d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
84628d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
84638d623946Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
84648d623946Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
84658d623946Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
84668d623946Smrg      _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'
84678d623946Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
8468ee3138f1Smrg
84698d623946Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
84708d623946Smrg        _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'
84718d623946Smrg	# If the export-symbols file already is a .def file, use it as
84728d623946Smrg	# is; otherwise, prepend EXPORTS...
84738d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
84748d623946Smrg          cp $export_symbols $output_objdir/$soname.def;
84758d623946Smrg        else
84768d623946Smrg          echo EXPORTS > $output_objdir/$soname.def;
84778d623946Smrg          cat $export_symbols >> $output_objdir/$soname.def;
84788d623946Smrg        fi~
84798d623946Smrg        $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
84808d623946Smrg      else
84818d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
84828d623946Smrg      fi
84838d623946Smrg      ;;
84843e72ca8cSmrg
84858d623946Smrg    haiku*)
84868d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
84878d623946Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
84888d623946Smrg      ;;
84893e72ca8cSmrg
84908d623946Smrg    os2*)
84918d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
84928d623946Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
84938d623946Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
84948d623946Smrg      shrext_cmds=.dll
84958d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
84968d623946Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
84978d623946Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
84988d623946Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
84998d623946Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
85008d623946Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85018d623946Smrg	emximp -o $lib $output_objdir/$libname.def'
85028d623946Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
85038d623946Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
85048d623946Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
85058d623946Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
85068d623946Smrg	prefix_cmds="$SED"~
85078d623946Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
85088d623946Smrg	  prefix_cmds="$prefix_cmds -e 1d";
85098d623946Smrg	fi~
85108d623946Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
85118d623946Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
85128d623946Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
85138d623946Smrg	emximp -o $lib $output_objdir/$libname.def'
85148d623946Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
85158d623946Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
85168d623946Smrg      _LT_TAGVAR(file_list_spec, $1)='@'
85178d623946Smrg      ;;
851834977a2fSmrg
85198d623946Smrg    interix[[3-9]]*)
85208d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
85218d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
85228d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
85238d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
85248d623946Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
85258d623946Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
85268d623946Smrg      # default) and relocated if they conflict, which is a slow very memory
85278d623946Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
85288d623946Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
85298d623946Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
85308d623946Smrg      _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'
85318d623946Smrg      _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'
85328d623946Smrg      ;;
853334977a2fSmrg
85348d623946Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
85358d623946Smrg      tmp_diet=no
85368d623946Smrg      if test linux-dietlibc = "$host_os"; then
85378d623946Smrg	case $cc_basename in
85388d623946Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
85398d623946Smrg	esac
85408d623946Smrg      fi
85418d623946Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
85428d623946Smrg	 && test no = "$tmp_diet"
85438d623946Smrg      then
85448d623946Smrg	tmp_addflag=' $pic_flag'
85458d623946Smrg	tmp_sharedflag='-shared'
85468d623946Smrg	case $cc_basename,$host_cpu in
85478d623946Smrg        pgcc*)				# Portland Group C compiler
85488d623946Smrg	  _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'
85498d623946Smrg	  tmp_addflag=' $pic_flag'
85508d623946Smrg	  ;;
85518d623946Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
85528d623946Smrg					# Portland Group f77 and f90 compilers
85538d623946Smrg	  _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'
85548d623946Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
85558d623946Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
85568d623946Smrg	  tmp_addflag=' -i_dynamic' ;;
85578d623946Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
85588d623946Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
85598d623946Smrg	ifc* | ifort*)			# Intel Fortran compiler
85608d623946Smrg	  tmp_addflag=' -nofor_main' ;;
85618d623946Smrg	lf95*)				# Lahey Fortran 8.1
85628d623946Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
85638d623946Smrg	  tmp_sharedflag='--shared' ;;
85648d623946Smrg        nagfor*)                        # NAGFOR 5.3
85658d623946Smrg          tmp_sharedflag='-Wl,-shared' ;;
85668d623946Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
85678d623946Smrg	  tmp_sharedflag='-qmkshrobj'
85688d623946Smrg	  tmp_addflag= ;;
85698d623946Smrg	nvcc*)	# Cuda Compiler Driver 2.2
85708d623946Smrg	  _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'
85718d623946Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
85728d623946Smrg	  ;;
85738d623946Smrg	esac
85748d623946Smrg	case `$CC -V 2>&1 | $SED 5q` in
85758d623946Smrg	*Sun\ C*)			# Sun C 5.9
85768d623946Smrg	  _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'
85778d623946Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
85788d623946Smrg	  tmp_sharedflag='-G' ;;
85798d623946Smrg	*Sun\ F*)			# Sun Fortran 8.3
85808d623946Smrg	  tmp_sharedflag='-G' ;;
85818d623946Smrg	esac
85828d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
85833e72ca8cSmrg
85848d623946Smrg        if test yes = "$supports_anon_versioning"; then
85858d623946Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
85868d623946Smrg            cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
85878d623946Smrg            echo "local: *; };" >> $output_objdir/$libname.ver~
85888d623946Smrg            $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
85898d623946Smrg        fi
85903e72ca8cSmrg
85918d623946Smrg	case $cc_basename in
85928d623946Smrg	tcc*)
85938d623946Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic'
85948d623946Smrg	  ;;
85958d623946Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
85968d623946Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
85978d623946Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
85988d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
85998d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
86008d623946Smrg	  if test yes = "$supports_anon_versioning"; then
86018d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
86028d623946Smrg              cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
86038d623946Smrg              echo "local: *; };" >> $output_objdir/$libname.ver~
86048d623946Smrg              $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
86058d623946Smrg	  fi
86068d623946Smrg	  ;;
86078d623946Smrg	esac
86088d623946Smrg      else
86098d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
86108d623946Smrg      fi
86118d623946Smrg      ;;
861234977a2fSmrg
86138d623946Smrg    netbsd*)
86148d623946Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
86158d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
86168d623946Smrg	wlarc=
86178d623946Smrg      else
86188d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
86198d623946Smrg	_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'
86208d623946Smrg      fi
8621414bd68fSmrg      ;;
862234977a2fSmrg
86238d623946Smrg    solaris*)
86248d623946Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
86258d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
86268d623946Smrg	cat <<_LT_EOF 1>&2
8627414bd68fSmrg
86288d623946Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
86298d623946Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
86308d623946Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
86318d623946Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
86328d623946Smrg*** your PATH or compiler configuration so that the native linker is
86338d623946Smrg*** used, and then restart.
8634414bd68fSmrg
86358d623946Smrg_LT_EOF
86368d623946Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
86378d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
86388d623946Smrg	_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'
86398d623946Smrg      else
86408d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
86418d623946Smrg      fi
86428d623946Smrg      ;;
8643414bd68fSmrg
86448d623946Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
86458d623946Smrg      case `$LD -v 2>&1` in
86468d623946Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
86478d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
86488d623946Smrg	cat <<_LT_EOF 1>&2
86493e72ca8cSmrg
86508d623946Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot
86518d623946Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
86528d623946Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
86538d623946Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
86548d623946Smrg*** your PATH or compiler configuration so that the native linker is
86558d623946Smrg*** used, and then restart.
86563e72ca8cSmrg
86578d623946Smrg_LT_EOF
86588d623946Smrg	;;
86598d623946Smrg	*)
86608d623946Smrg	  # For security reasons, it is highly recommended that you always
86618d623946Smrg	  # use absolute paths for naming shared libraries, and exclude the
86628d623946Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
86638d623946Smrg	  # requires that you compile everything twice, which is a pain.
86648d623946Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
86658d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
86668d623946Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
86678d623946Smrg	    _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'
86688d623946Smrg	  else
86698d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
86708d623946Smrg	  fi
86718d623946Smrg	;;
86728d623946Smrg      esac
86738d623946Smrg      ;;
86743e72ca8cSmrg
86758d623946Smrg    sunos4*)
86768d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
86778d623946Smrg      wlarc=
86788d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
86798d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
8680fe24f8a2Smrg      ;;
86818d623946Smrg
8682fe24f8a2Smrg    *)
86838d623946Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
86848d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
86858d623946Smrg	_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'
86868d623946Smrg      else
86878d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
86888d623946Smrg      fi
8689fe24f8a2Smrg      ;;
8690fe24f8a2Smrg    esac
86918d623946Smrg
86928d623946Smrg    if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then
86938d623946Smrg      runpath_var=
86948d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
86958d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
86968d623946Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
8697fe24f8a2Smrg    fi
86988d623946Smrg  else
86998d623946Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
87008d623946Smrg    case $host_os in
87018d623946Smrg    aix3*)
87028d623946Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
87038d623946Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
87048d623946Smrg      _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'
87058d623946Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
87068d623946Smrg      # are no directories specified by -L.
87078d623946Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
87088d623946Smrg      if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then
87098d623946Smrg	# Neither direct hardcoding nor static linking is supported with a
87108d623946Smrg	# broken collect2.
87118d623946Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
87128d623946Smrg      fi
87138d623946Smrg      ;;
8714fe24f8a2Smrg
87158d623946Smrg    aix[[4-9]]*)
87168d623946Smrg      if test ia64 = "$host_cpu"; then
87178d623946Smrg	# On IA64, the linker does run time linking by default, so we don't
87188d623946Smrg	# have to do anything special.
87198d623946Smrg	aix_use_runtimelinking=no
87208d623946Smrg	exp_sym_flag='-Bexport'
87218d623946Smrg	no_entry_flag=
87228d623946Smrg      else
87238d623946Smrg	# If we're using GNU nm, then we don't want the "-C" option.
87248d623946Smrg	# -C means demangle to GNU nm, but means don't demangle to AIX nm.
87258d623946Smrg	# Without the "-l" option, or with the "-B" option, AIX nm treats
87268d623946Smrg	# weak defined symbols like other global defined symbols, whereas
87278d623946Smrg	# GNU nm marks them as "W".
87288d623946Smrg	# While the 'weak' keyword is ignored in the Export File, we need
87298d623946Smrg	# it in the Import File for the 'aix-soname' feature, so we have
87308d623946Smrg	# to replace the "-B" option with "-P" for AIX nm.
87318d623946Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
87328d623946Smrg	  _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'
87338d623946Smrg	else
87348d623946Smrg	  _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'
87358d623946Smrg	fi
87368d623946Smrg	aix_use_runtimelinking=no
8737fe24f8a2Smrg
87388d623946Smrg	# Test if we are trying to use run time linking or normal
87398d623946Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
87408d623946Smrg	# have runtime linking enabled, and use it for executables.
87418d623946Smrg	# For shared libraries, we enable/disable runtime linking
87428d623946Smrg	# depending on the kind of the shared library created -
87438d623946Smrg	# when "with_aix_soname,aix_use_runtimelinking" is:
87448d623946Smrg	# "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
87458d623946Smrg	# "aix,yes"  lib.so          shared, rtl:yes, for executables
87468d623946Smrg	#            lib.a           static archive
87478d623946Smrg	# "both,no"  lib.so.V(shr.o) shared, rtl:yes
87488d623946Smrg	#            lib.a(lib.so.V) shared, rtl:no,  for executables
87498d623946Smrg	# "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
87508d623946Smrg	#            lib.a(lib.so.V) shared, rtl:no
87518d623946Smrg	# "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
87528d623946Smrg	#            lib.a           static archive
87538d623946Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
87548d623946Smrg	  for ld_flag in $LDFLAGS; do
87558d623946Smrg	  if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then
87568d623946Smrg	    aix_use_runtimelinking=yes
87578d623946Smrg	    break
87588d623946Smrg	  fi
87598d623946Smrg	  done
87608d623946Smrg	  if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
87618d623946Smrg	    # With aix-soname=svr4, we create the lib.so.V shared archives only,
87628d623946Smrg	    # so we don't have lib.a shared libs to link our executables.
87638d623946Smrg	    # We have to force runtime linking in this case.
87648d623946Smrg	    aix_use_runtimelinking=yes
87658d623946Smrg	    LDFLAGS="$LDFLAGS -Wl,-brtl"
87668d623946Smrg	  fi
87678d623946Smrg	  ;;
87688d623946Smrg	esac
87698d623946Smrg
87708d623946Smrg	exp_sym_flag='-bexport'
87718d623946Smrg	no_entry_flag='-bnoentry'
87728d623946Smrg      fi
87738d623946Smrg
87748d623946Smrg      # When large executables or shared objects are built, AIX ld can
87758d623946Smrg      # have problems creating the table of contents.  If linking a library
87768d623946Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
87778d623946Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
87788d623946Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
87798d623946Smrg
87808d623946Smrg      _LT_TAGVAR(archive_cmds, $1)=''
87818d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
87828d623946Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
87838d623946Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
87848d623946Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
87858d623946Smrg      _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
87868d623946Smrg      case $with_aix_soname,$aix_use_runtimelinking in
87878d623946Smrg      aix,*) ;; # traditional, no import file
87888d623946Smrg      svr4,* | *,yes) # use import file
87898d623946Smrg	# The Import File defines what to hardcode.
87908d623946Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
87918d623946Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=no
87928d623946Smrg	;;
87938d623946Smrg      esac
8794fe24f8a2Smrg
87958d623946Smrg      if test yes = "$GCC"; then
87968d623946Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
87978d623946Smrg	# We only want to do this on AIX 4.2 and lower, the check
87988d623946Smrg	# below for broken collect2 doesn't work under 4.3+
87998d623946Smrg	  collect2name=`$CC -print-prog-name=collect2`
88008d623946Smrg	  if test -f "$collect2name" &&
88018d623946Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
88028d623946Smrg	  then
88038d623946Smrg	  # We have reworked collect2
88048d623946Smrg	  :
88058d623946Smrg	  else
88068d623946Smrg	  # We have old collect2
88078d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
88088d623946Smrg	  # It fails to find uninstalled libraries when the uninstalled
88098d623946Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
88108d623946Smrg	  # to unsupported forces relinking
88118d623946Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
88128d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
88138d623946Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
88148d623946Smrg	  fi
88158d623946Smrg	  ;;
88168d623946Smrg	esac
88178d623946Smrg	shared_flag='-shared'
88188d623946Smrg	if test yes = "$aix_use_runtimelinking"; then
88198d623946Smrg	  shared_flag="$shared_flag "'$wl-G'
88208d623946Smrg	fi
88218d623946Smrg	# Need to ensure runtime linking is disabled for the traditional
88228d623946Smrg	# shared library, or the linker may eventually find shared libraries
88238d623946Smrg	# /with/ Import File - we do not want to mix them.
88248d623946Smrg	shared_flag_aix='-shared'
88258d623946Smrg	shared_flag_svr4='-shared $wl-G'
88268d623946Smrg      else
88278d623946Smrg	# not using gcc
88288d623946Smrg	if test ia64 = "$host_cpu"; then
88298d623946Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
88308d623946Smrg	# chokes on -Wl,-G. The following line is correct:
88318d623946Smrg	  shared_flag='-G'
88328d623946Smrg	else
88338d623946Smrg	  if test yes = "$aix_use_runtimelinking"; then
88348d623946Smrg	    shared_flag='$wl-G'
88358d623946Smrg	  else
88368d623946Smrg	    shared_flag='$wl-bM:SRE'
88378d623946Smrg	  fi
88388d623946Smrg	  shared_flag_aix='$wl-bM:SRE'
88398d623946Smrg	  shared_flag_svr4='$wl-G'
88408d623946Smrg	fi
88418d623946Smrg      fi
8842fe24f8a2Smrg
88438d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
88448d623946Smrg      # It seems that -bexpall does not export symbols beginning with
88458d623946Smrg      # underscore (_), so it is better to generate a list of symbols to export.
88468d623946Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
88478d623946Smrg      if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
88488d623946Smrg	# Warning - without using the other runtime loading flags (-brtl),
88498d623946Smrg	# -berok will link without error, but may produce a broken library.
88508d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
88518d623946Smrg        # Determine the default libpath from the value encoded in an
88528d623946Smrg        # empty executable.
88538d623946Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
88548d623946Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
88558d623946Smrg        _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
88568d623946Smrg      else
88578d623946Smrg	if test ia64 = "$host_cpu"; then
88588d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
88598d623946Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
88608d623946Smrg	  _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"
88618d623946Smrg	else
88628d623946Smrg	 # Determine the default libpath from the value encoded in an
88638d623946Smrg	 # empty executable.
88648d623946Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
88658d623946Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
88668d623946Smrg	  # Warning - without using the other run time loading flags,
88678d623946Smrg	  # -berok will link without error, but may produce a broken library.
88688d623946Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
88698d623946Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
88708d623946Smrg	  if test yes = "$with_gnu_ld"; then
88718d623946Smrg	    # We only use this code for GNU lds that support --whole-archive.
88728d623946Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
88738d623946Smrg	  else
88748d623946Smrg	    # Exported symbols can be pulled into shared objects from archives
88758d623946Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
88768d623946Smrg	  fi
88778d623946Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
88788d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
88798d623946Smrg	  # -brtl affects multiple linker settings, -berok does not and is overridden later
88808d623946Smrg	  compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
88818d623946Smrg	  if test svr4 != "$with_aix_soname"; then
88828d623946Smrg	    # This is similar to how AIX traditionally builds its shared libraries.
88838d623946Smrg	    _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'
88848d623946Smrg	  fi
88858d623946Smrg	  if test aix != "$with_aix_soname"; then
88868d623946Smrg	    _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'
88878d623946Smrg	  else
88888d623946Smrg	    # used by -dlpreopen to get the symbols
88898d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
88908d623946Smrg	  fi
88918d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
8892414bd68fSmrg	fi
88938d623946Smrg      fi
8894414bd68fSmrg      ;;
88953e72ca8cSmrg
88968d623946Smrg    amigaos*)
88978d623946Smrg      case $host_cpu in
88988d623946Smrg      powerpc)
88998d623946Smrg            # see comment about AmigaOS4 .so support
89008d623946Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
89018d623946Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
89028d623946Smrg        ;;
89038d623946Smrg      m68k)
89048d623946Smrg            _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)'
89058d623946Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
89068d623946Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
89078d623946Smrg        ;;
89088d623946Smrg      esac
89098d623946Smrg      ;;
8910ee3138f1Smrg
89118d623946Smrg    bsdi[[45]]*)
89128d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
89138d623946Smrg      ;;
8914ee3138f1Smrg
89158d623946Smrg    cygwin* | mingw* | pw32* | cegcc*)
89168d623946Smrg      # When not using gcc, we currently assume that we are using
89178d623946Smrg      # Microsoft Visual C++ or Intel C++ Compiler.
89188d623946Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
89198d623946Smrg      # no search path for DLLs.
89208d623946Smrg      case $cc_basename in
89218d623946Smrg      cl* | icl*)
89228d623946Smrg	# Native MSVC or ICC
89238d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
89248d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
89258d623946Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
89268d623946Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
89278d623946Smrg	# Tell ltmain to make .lib files, not .a files.
89288d623946Smrg	libext=lib
89298d623946Smrg	# Tell ltmain to make .dll files, not .so files.
89308d623946Smrg	shrext_cmds=.dll
89318d623946Smrg	# FIXME: Setting linknames here is a bad hack.
89328d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
89338d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
89348d623946Smrg            cp "$export_symbols" "$output_objdir/$soname.def";
89358d623946Smrg            echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
89368d623946Smrg          else
89378d623946Smrg            $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
89388d623946Smrg          fi~
89398d623946Smrg          $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
89408d623946Smrg          linknames='
89418d623946Smrg	# The linker will not automatically build a static lib if we build a DLL.
89428d623946Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
89438d623946Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
89448d623946Smrg	_LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*'
89458d623946Smrg	_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'
89468d623946Smrg	# Don't use ranlib
89478d623946Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
89488d623946Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
89498d623946Smrg          lt_tool_outputfile="@TOOL_OUTPUT@"~
89508d623946Smrg          case $lt_outputfile in
89518d623946Smrg            *.exe|*.EXE) ;;
89528d623946Smrg            *)
89538d623946Smrg              lt_outputfile=$lt_outputfile.exe
89548d623946Smrg              lt_tool_outputfile=$lt_tool_outputfile.exe
89558d623946Smrg              ;;
89568d623946Smrg          esac~
89578d623946Smrg          if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
89588d623946Smrg            $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
89598d623946Smrg            $RM "$lt_outputfile.manifest";
89608d623946Smrg          fi'
89618d623946Smrg	;;
89628d623946Smrg      *)
89638d623946Smrg	# Assume MSVC and ICC wrapper
89648d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
89658d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
89668d623946Smrg	# Tell ltmain to make .lib files, not .a files.
89678d623946Smrg	libext=lib
89688d623946Smrg	# Tell ltmain to make .dll files, not .so files.
89698d623946Smrg	shrext_cmds=.dll
89708d623946Smrg	# FIXME: Setting linknames here is a bad hack.
89718d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
89728d623946Smrg	# The linker will automatically build a .lib file if we build a DLL.
89738d623946Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
89748d623946Smrg	# FIXME: Should let the user specify the lib program.
89758d623946Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
89768d623946Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
89778d623946Smrg	;;
89788d623946Smrg      esac
89798d623946Smrg      ;;
89803e72ca8cSmrg
89818d623946Smrg    darwin* | rhapsody*)
89828d623946Smrg      _LT_DARWIN_LINKER_FEATURES($1)
89838d623946Smrg      ;;
8984ee3138f1Smrg
89858d623946Smrg    dgux*)
89868d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
89878d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
89888d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
89898d623946Smrg      ;;
8990ee3138f1Smrg
89918d623946Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
89928d623946Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
89938d623946Smrg    # does not break anything, and helps significantly (at the cost of a little
89948d623946Smrg    # extra space).
89958d623946Smrg    freebsd2.2*)
89968d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
89978d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
89988d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
89998d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90008d623946Smrg      ;;
9001ee3138f1Smrg
90028d623946Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
90038d623946Smrg    freebsd2.*)
90048d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
90058d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
90068d623946Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
90078d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90088d623946Smrg      ;;
9009b425557eSmrg
90108d623946Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
90118d623946Smrg    freebsd* | dragonfly* | midnightbsd*)
90128d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
90138d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
90148d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
90158d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90168d623946Smrg      ;;
9017b425557eSmrg
90188d623946Smrg    hpux9*)
90198d623946Smrg      if test yes = "$GCC"; then
90208d623946Smrg	_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'
90218d623946Smrg      else
90228d623946Smrg	_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'
90238d623946Smrg      fi
90248d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
90258d623946Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
90268d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
9027ee3138f1Smrg
90288d623946Smrg      # hardcode_minus_L: Not really in the search PATH,
90298d623946Smrg      # but as the default location of the library.
90308d623946Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
90318d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
90328d623946Smrg      ;;
9033ee3138f1Smrg
90348d623946Smrg    hpux10*)
90358d623946Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
90368d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
90378d623946Smrg      else
90388d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
90398d623946Smrg      fi
90408d623946Smrg      if test no = "$with_gnu_ld"; then
90418d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
90428d623946Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
90438d623946Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
90448d623946Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
90458d623946Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
90468d623946Smrg	# hardcode_minus_L: Not really in the search PATH,
90478d623946Smrg	# but as the default location of the library.
90488d623946Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
90498d623946Smrg      fi
90508d623946Smrg      ;;
9051ee3138f1Smrg
90528d623946Smrg    hpux11*)
90538d623946Smrg      if test yes,no = "$GCC,$with_gnu_ld"; then
90548d623946Smrg	case $host_cpu in
90558d623946Smrg	hppa*64*)
90568d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
90578d623946Smrg	  ;;
90588d623946Smrg	ia64*)
90598d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
90608d623946Smrg	  ;;
90618d623946Smrg	*)
90628d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
90638d623946Smrg	  ;;
90648d623946Smrg	esac
90658d623946Smrg      else
90668d623946Smrg	case $host_cpu in
90678d623946Smrg	hppa*64*)
90688d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
90698d623946Smrg	  ;;
90708d623946Smrg	ia64*)
90718d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
90728d623946Smrg	  ;;
90738d623946Smrg	*)
90748d623946Smrg	m4_if($1, [], [
90758d623946Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
90768d623946Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
90778d623946Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
90788d623946Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
90798d623946Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
90808d623946Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
90818d623946Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
90828d623946Smrg	  ;;
90838d623946Smrg	esac
90848d623946Smrg      fi
90858d623946Smrg      if test no = "$with_gnu_ld"; then
90868d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
90878d623946Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
9088ee3138f1Smrg
90898d623946Smrg	case $host_cpu in
90908d623946Smrg	hppa*64*|ia64*)
90918d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
90928d623946Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
90938d623946Smrg	  ;;
90948d623946Smrg	*)
90958d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
90968d623946Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
90978d623946Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
9098ee3138f1Smrg
90998d623946Smrg	  # hardcode_minus_L: Not really in the search PATH,
91008d623946Smrg	  # but as the default location of the library.
91018d623946Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
91028d623946Smrg	  ;;
91038d623946Smrg	esac
91048d623946Smrg      fi
91058d623946Smrg      ;;
9106ee3138f1Smrg
91078d623946Smrg    irix5* | irix6* | nonstopux*)
91088d623946Smrg      if test yes = "$GCC"; then
91098d623946Smrg	_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'
91108d623946Smrg	# Try to use the -exported_symbol ld option, if it does not
91118d623946Smrg	# work, assume that -exports_file does not work either and
91128d623946Smrg	# implicitly export all symbols.
91138d623946Smrg	# This should be the same for all languages, so no per-tag cache variable.
91148d623946Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
91158d623946Smrg	  [lt_cv_irix_exported_symbol],
91168d623946Smrg	  [save_LDFLAGS=$LDFLAGS
91178d623946Smrg	   LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null"
91188d623946Smrg	   AC_LINK_IFELSE(
91198d623946Smrg	     [AC_LANG_SOURCE(
91208d623946Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
91218d623946Smrg			      [C++], [[int foo (void) { return 0; }]],
91228d623946Smrg			      [Fortran 77], [[
91238d623946Smrg      subroutine foo
91248d623946Smrg      end]],
91258d623946Smrg			      [Fortran], [[
91268d623946Smrg      subroutine foo
91278d623946Smrg      end]])])],
91288d623946Smrg	      [lt_cv_irix_exported_symbol=yes],
91298d623946Smrg	      [lt_cv_irix_exported_symbol=no])
91308d623946Smrg           LDFLAGS=$save_LDFLAGS])
91318d623946Smrg	if test yes = "$lt_cv_irix_exported_symbol"; then
91328d623946Smrg          _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'
91338d623946Smrg	fi
91348d623946Smrg      else
91358d623946Smrg	_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'
91368d623946Smrg	_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'
91378d623946Smrg      fi
91388d623946Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
91398d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
91408d623946Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
91418d623946Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
91428d623946Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
91438d623946Smrg      ;;
9144ee3138f1Smrg
91458d623946Smrg    linux*)
91468d623946Smrg      case $cc_basename in
91478d623946Smrg      tcc*)
91488d623946Smrg	# Fabrice Bellard et al's Tiny C Compiler
91498d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
91508d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
91518d623946Smrg	;;
91528d623946Smrg      esac
91538d623946Smrg      ;;
9154b425557eSmrg
91558d623946Smrg    netbsd*)
91568d623946Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
91578d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
91588d623946Smrg      else
91598d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
91608d623946Smrg      fi
91618d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
91628d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
91638d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
91648d623946Smrg      ;;
9165ee3138f1Smrg
91668d623946Smrg    newsos6)
91678d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
91688d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
91698d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
91708d623946Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
91718d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
91728d623946Smrg      ;;
9173a1ed278cSmrg
91748d623946Smrg    *nto* | *qnx*)
91758d623946Smrg      ;;
9176a1ed278cSmrg
91778d623946Smrg    openbsd* | bitrig*)
91788d623946Smrg      if test -f /usr/libexec/ld.so; then
91798d623946Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
91808d623946Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
91818d623946Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
91828d623946Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then
91838d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
91848d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols'
91858d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
91868d623946Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
91878d623946Smrg	else
91888d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
91898d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
91908d623946Smrg	fi
91918d623946Smrg      else
91928d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
91938d623946Smrg      fi
91948d623946Smrg      ;;
9195a1ed278cSmrg
91968d623946Smrg    os2*)
91978d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
91988d623946Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
91998d623946Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
92008d623946Smrg      shrext_cmds=.dll
92018d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
92028d623946Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
92038d623946Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
92048d623946Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
92058d623946Smrg	emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
92068d623946Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
92078d623946Smrg	emximp -o $lib $output_objdir/$libname.def'
92088d623946Smrg      _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
92098d623946Smrg	$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
92108d623946Smrg	$ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
92118d623946Smrg	$ECHO EXPORTS >> $output_objdir/$libname.def~
92128d623946Smrg	prefix_cmds="$SED"~
92138d623946Smrg	if test EXPORTS = "`$SED 1q $export_symbols`"; then
92148d623946Smrg	  prefix_cmds="$prefix_cmds -e 1d";
92158d623946Smrg	fi~
92168d623946Smrg	prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
92178d623946Smrg	cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
92188d623946Smrg	$CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
92198d623946Smrg	emximp -o $lib $output_objdir/$libname.def'
92208d623946Smrg      _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
92218d623946Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
92228d623946Smrg      _LT_TAGVAR(file_list_spec, $1)='@'
92238d623946Smrg      ;;
92243e72ca8cSmrg
92258d623946Smrg    osf3*)
92268d623946Smrg      if test yes = "$GCC"; then
92278d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
92288d623946Smrg	_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'
92298d623946Smrg      else
92308d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
92318d623946Smrg	_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'
92328d623946Smrg      fi
92338d623946Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
92348d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
92358d623946Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
92368d623946Smrg      ;;
92373e72ca8cSmrg
92388d623946Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
92398d623946Smrg      if test yes = "$GCC"; then
92408d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
92418d623946Smrg	_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'
92428d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
92438d623946Smrg      else
92448d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
92458d623946Smrg	_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'
92468d623946Smrg	_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~
92478d623946Smrg          $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'
92483e72ca8cSmrg
92498d623946Smrg	# Both c and cxx compiler support -rpath directly
92508d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
92518d623946Smrg      fi
92528d623946Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
92538d623946Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
92548d623946Smrg      ;;
92553e72ca8cSmrg
92568d623946Smrg    solaris*)
92578d623946Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
92588d623946Smrg      if test yes = "$GCC"; then
92598d623946Smrg	wlarc='$wl'
92608d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags'
92618d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
92628d623946Smrg          $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'
92638d623946Smrg      else
92648d623946Smrg	case `$CC -V 2>&1` in
92658d623946Smrg	*"Compilers 5.0"*)
92668d623946Smrg	  wlarc=''
92678d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags'
92688d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
92698d623946Smrg            $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
92708d623946Smrg	  ;;
92718d623946Smrg	*)
92728d623946Smrg	  wlarc='$wl'
92738d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags'
92748d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
92758d623946Smrg            $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
92768d623946Smrg	  ;;
92778d623946Smrg	esac
92788d623946Smrg      fi
92798d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
92808d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
92818d623946Smrg      case $host_os in
92828d623946Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
92838d623946Smrg      *)
92848d623946Smrg	# The compiler driver will combine and reorder linker options,
92858d623946Smrg	# but understands '-z linker_flag'.  GCC discards it without '$wl',
92868d623946Smrg	# but is careful enough not to reorder.
92878d623946Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
92888d623946Smrg	if test yes = "$GCC"; then
92898d623946Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
92908d623946Smrg	else
92918d623946Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
92928d623946Smrg	fi
92938d623946Smrg	;;
92948d623946Smrg      esac
92958d623946Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
92968d623946Smrg      ;;
92973e72ca8cSmrg
92988d623946Smrg    sunos4*)
92998d623946Smrg      if test sequent = "$host_vendor"; then
93008d623946Smrg	# Use $CC to link under sequent, because it throws in some extra .o
93018d623946Smrg	# files that make .init and .fini sections work.
93028d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags'
93038d623946Smrg      else
93048d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
93058d623946Smrg      fi
93068d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
93078d623946Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
93088d623946Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
93098d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93108d623946Smrg      ;;
93113e72ca8cSmrg
93128d623946Smrg    sysv4)
93138d623946Smrg      case $host_vendor in
93148d623946Smrg	sni)
93158d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93168d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
93178d623946Smrg	;;
93188d623946Smrg	siemens)
93198d623946Smrg	  ## LD is ld it makes a PLAMLIB
93208d623946Smrg	  ## CC just makes a GrossModule.
93218d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
93228d623946Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
93238d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
93248d623946Smrg        ;;
93258d623946Smrg	motorola)
93268d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93278d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
93288d623946Smrg	;;
93298d623946Smrg      esac
93308d623946Smrg      runpath_var='LD_RUN_PATH'
93318d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93328d623946Smrg      ;;
9333ee3138f1Smrg
93348d623946Smrg    sysv4.3*)
93358d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93368d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93378d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
93388d623946Smrg      ;;
9339ee3138f1Smrg
93408d623946Smrg    sysv4*MP*)
93418d623946Smrg      if test -d /usr/nec; then
93428d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93438d623946Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93448d623946Smrg	runpath_var=LD_RUN_PATH
93458d623946Smrg	hardcode_runpath_var=yes
93468d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
93478d623946Smrg      fi
93488d623946Smrg      ;;
9349414bd68fSmrg
93508d623946Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
93518d623946Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
93528d623946Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
93538d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93548d623946Smrg      runpath_var='LD_RUN_PATH'
9355414bd68fSmrg
93568d623946Smrg      if test yes = "$GCC"; then
93578d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93588d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93598d623946Smrg      else
93608d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93618d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93628d623946Smrg      fi
93638d623946Smrg      ;;
93648d623946Smrg
93658d623946Smrg    sysv5* | sco3.2v5* | sco5v6*)
93668d623946Smrg      # Note: We CANNOT use -z defs as we might desire, because we do not
93678d623946Smrg      # link with -lc, and that would cause any symbols used from libc to
93688d623946Smrg      # always be unresolved, which means just about no library would
93698d623946Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
93708d623946Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
93718d623946Smrg      # as -z defs.
93728d623946Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
93738d623946Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
93748d623946Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
93758d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93768d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
93778d623946Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
93788d623946Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
93798d623946Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
93808d623946Smrg      runpath_var='LD_RUN_PATH'
938134977a2fSmrg
93828d623946Smrg      if test yes = "$GCC"; then
93838d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93848d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93858d623946Smrg      else
93868d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93878d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
93888d623946Smrg      fi
93898d623946Smrg      ;;
9390fe24f8a2Smrg
93918d623946Smrg    uts4*)
93928d623946Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
93938d623946Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
93948d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
93958d623946Smrg      ;;
9396fe24f8a2Smrg
93978d623946Smrg    *)
93988d623946Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
93998d623946Smrg      ;;
94008d623946Smrg    esac
9401ee3138f1Smrg
94028d623946Smrg    if test sni = "$host_vendor"; then
94038d623946Smrg      case $host in
94048d623946Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
94058d623946Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym'
94068d623946Smrg	;;
94078d623946Smrg      esac
94088d623946Smrg    fi
94098d623946Smrg  fi
94108d623946Smrg])
94118d623946SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
94128d623946Smrgtest no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
9413ee3138f1Smrg
94148d623946Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
94153e72ca8cSmrg
94168d623946Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
94178d623946Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
94188d623946Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
94198d623946Smrg    [The commands to extract the exported symbol list from a shared archive])
9420ee3138f1Smrg
94218d623946Smrg#
94228d623946Smrg# Do we need to explicitly link libc?
94238d623946Smrg#
94248d623946Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
94258d623946Smrgx|xyes)
94268d623946Smrg  # Assume -lc should be added
94278d623946Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
94288d623946Smrg
94298d623946Smrg  if test yes,yes = "$GCC,$enable_shared"; then
94308d623946Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
94318d623946Smrg    *'~'*)
94328d623946Smrg      # FIXME: we may have to deal with multi-command sequences.
94338d623946Smrg      ;;
94348d623946Smrg    '$CC '*)
94358d623946Smrg      # Test whether the compiler implicitly links with -lc since on some
94368d623946Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
94378d623946Smrg      # to ld, don't add -lc before -lgcc.
94388d623946Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
94398d623946Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
94408d623946Smrg	[$RM conftest*
94418d623946Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
94428d623946Smrg
94438d623946Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
94448d623946Smrg	  soname=conftest
94458d623946Smrg	  lib=conftest
94468d623946Smrg	  libobjs=conftest.$ac_objext
94478d623946Smrg	  deplibs=
94488d623946Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
94498d623946Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
94508d623946Smrg	  compiler_flags=-v
94518d623946Smrg	  linker_flags=-v
94528d623946Smrg	  verstring=
94538d623946Smrg	  output_objdir=.
94548d623946Smrg	  libname=conftest
94558d623946Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
94568d623946Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
94578d623946Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
94588d623946Smrg	  then
94598d623946Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
94608d623946Smrg	  else
94618d623946Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
94628d623946Smrg	  fi
94638d623946Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
94648d623946Smrg	else
94658d623946Smrg	  cat conftest.err 1>&5
94668d623946Smrg	fi
94678d623946Smrg	$RM conftest*
94688d623946Smrg	])
94698d623946Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
94708d623946Smrg      ;;
94718d623946Smrg    esac
94728d623946Smrg  fi
94738d623946Smrg  ;;
94748d623946Smrgesac
9475ee3138f1Smrg
94768d623946Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
94778d623946Smrg    [Whether or not to add -lc for building shared libraries])
94788d623946Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
94798d623946Smrg    [enable_shared_with_static_runtimes], [0],
94808d623946Smrg    [Whether or not to disallow shared libs when runtime libs are static])
94818d623946Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
94828d623946Smrg    [Compiler flag to allow reflexive dlopens])
94838d623946Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
94848d623946Smrg    [Compiler flag to generate shared objects directly from archives])
94858d623946Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
94868d623946Smrg    [Whether the compiler copes with passing no objects directly])
94878d623946Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
94888d623946Smrg    [Create an old-style archive from a shared archive])
94898d623946Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
94908d623946Smrg    [Create a temporary old-style archive to link instead of a shared archive])
94918d623946Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
94928d623946Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
94938d623946Smrg_LT_TAGDECL([], [module_cmds], [2],
94948d623946Smrg    [Commands used to build a loadable module if different from building
94958d623946Smrg    a shared archive.])
94968d623946Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
94978d623946Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
94988d623946Smrg    [Whether we are building with GNU ld or not])
94998d623946Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
95008d623946Smrg    [Flag that allows shared libraries with undefined symbols to be built])
95018d623946Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
95028d623946Smrg    [Flag that enforces no undefined symbols])
95038d623946Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
95048d623946Smrg    [Flag to hardcode $libdir into a binary during linking.
95058d623946Smrg    This must work even if $libdir does not exist])
95068d623946Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
95078d623946Smrg    [Whether we need a single "-rpath" flag with a separated argument])
95088d623946Smrg_LT_TAGDECL([], [hardcode_direct], [0],
95098d623946Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
95108d623946Smrg    DIR into the resulting binary])
95118d623946Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
95128d623946Smrg    [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes
95138d623946Smrg    DIR into the resulting binary and the resulting library dependency is
95148d623946Smrg    "absolute", i.e impossible to change by setting $shlibpath_var if the
95158d623946Smrg    library is relocated])
95168d623946Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
95178d623946Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
95188d623946Smrg    into the resulting binary])
95198d623946Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
95208d623946Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
95218d623946Smrg    into the resulting binary])
95228d623946Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
95238d623946Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
95248d623946Smrg    into the library and all subsequent libraries and executables linked
95258d623946Smrg    against it])
95268d623946Smrg_LT_TAGDECL([], [inherit_rpath], [0],
95278d623946Smrg    [Set to yes if linker adds runtime paths of dependent libraries
95288d623946Smrg    to runtime path list])
95298d623946Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
95308d623946Smrg    [Whether libtool must link a program against all its dependency libraries])
95318d623946Smrg_LT_TAGDECL([], [always_export_symbols], [0],
95328d623946Smrg    [Set to "yes" if exported symbols are required])
95338d623946Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
95348d623946Smrg    [The commands to list exported symbols])
95358d623946Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
95368d623946Smrg    [Symbols that should not be listed in the preloaded symbols])
95378d623946Smrg_LT_TAGDECL([], [include_expsyms], [1],
95388d623946Smrg    [Symbols that must always be exported])
95398d623946Smrg_LT_TAGDECL([], [prelink_cmds], [2],
95408d623946Smrg    [Commands necessary for linking programs (against libraries) with templates])
95418d623946Smrg_LT_TAGDECL([], [postlink_cmds], [2],
95428d623946Smrg    [Commands necessary for finishing linking programs])
95438d623946Smrg_LT_TAGDECL([], [file_list_spec], [1],
95448d623946Smrg    [Specify filename containing input files])
95458d623946Smrgdnl FIXME: Not yet implemented
95468d623946Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
95478d623946Smrgdnl    [Compiler flag to generate thread safe objects])
95488d623946Smrg])# _LT_LINKER_SHLIBS
9549ee3138f1Smrg
9550ee3138f1Smrg
95518d623946Smrg# _LT_LANG_C_CONFIG([TAG])
95528d623946Smrg# ------------------------
95538d623946Smrg# Ensure that the configuration variables for a C compiler are suitably
95548d623946Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
95558d623946Smrg# the compiler configuration to 'libtool'.
95568d623946Smrgm4_defun([_LT_LANG_C_CONFIG],
95578d623946Smrg[m4_require([_LT_DECL_EGREP])dnl
95588d623946Smrglt_save_CC=$CC
95598d623946SmrgAC_LANG_PUSH(C)
956079a8a9c6Smrg
95618d623946Smrg# Source file extension for C test sources.
95628d623946Smrgac_ext=c
956379a8a9c6Smrg
95648d623946Smrg# Object file extension for compiled C test sources.
95658d623946Smrgobjext=o
95668d623946Smrg_LT_TAGVAR(objext, $1)=$objext
956779a8a9c6Smrg
95688d623946Smrg# Code to be used in simple compile tests
95698d623946Smrglt_simple_compile_test_code="int some_variable = 0;"
957079a8a9c6Smrg
95718d623946Smrg# Code to be used in simple link tests
95728d623946Smrglt_simple_link_test_code='int main(){return(0);}'
95733e72ca8cSmrg
95748d623946Smrg_LT_TAG_COMPILER
95758d623946Smrg# Save the default compiler, since it gets overwritten when the other
95768d623946Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
95778d623946Smrgcompiler_DEFAULT=$CC
95783e72ca8cSmrg
95798d623946Smrg# save warnings/boilerplate of simple test code
95808d623946Smrg_LT_COMPILER_BOILERPLATE
95818d623946Smrg_LT_LINKER_BOILERPLATE
95823e72ca8cSmrg
95838d623946Smrgif test -n "$compiler"; then
95848d623946Smrg  _LT_COMPILER_NO_RTTI($1)
95858d623946Smrg  _LT_COMPILER_PIC($1)
95868d623946Smrg  _LT_COMPILER_C_O($1)
95878d623946Smrg  _LT_COMPILER_FILE_LOCKS($1)
95888d623946Smrg  _LT_LINKER_SHLIBS($1)
95898d623946Smrg  _LT_SYS_DYNAMIC_LINKER($1)
95908d623946Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
95918d623946Smrg  LT_SYS_DLOPEN_SELF
95928d623946Smrg  _LT_CMD_STRIPLIB
95933e72ca8cSmrg
95948d623946Smrg  # Report what library types will actually be built
95958d623946Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
95968d623946Smrg  AC_MSG_RESULT([$can_build_shared])
95973e72ca8cSmrg
95988d623946Smrg  AC_MSG_CHECKING([whether to build shared libraries])
95998d623946Smrg  test no = "$can_build_shared" && enable_shared=no
96003e72ca8cSmrg
96018d623946Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
96028d623946Smrg  # are all built from PIC.
96038d623946Smrg  case $host_os in
96048d623946Smrg  aix3*)
96058d623946Smrg    test yes = "$enable_shared" && enable_static=no
96068d623946Smrg    if test -n "$RANLIB"; then
96078d623946Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
96088d623946Smrg      postinstall_cmds='$RANLIB $lib'
96098d623946Smrg    fi
96108d623946Smrg    ;;
9611ee3138f1Smrg
96128d623946Smrg  aix[[4-9]]*)
96138d623946Smrg    if test ia64 != "$host_cpu"; then
96148d623946Smrg      case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
96158d623946Smrg      yes,aix,yes) ;;			# shared object as lib.so file only
96168d623946Smrg      yes,svr4,*) ;;			# shared object as lib.so archive member only
96178d623946Smrg      yes,*) enable_static=no ;;	# shared object in lib.a archive as well
96188d623946Smrg      esac
96198d623946Smrg    fi
96208d623946Smrg    ;;
96218d623946Smrg  esac
96228d623946Smrg  AC_MSG_RESULT([$enable_shared])
9623fe24f8a2Smrg
96248d623946Smrg  AC_MSG_CHECKING([whether to build static libraries])
96258d623946Smrg  # Make sure either enable_shared or enable_static is yes.
96268d623946Smrg  test yes = "$enable_shared" || enable_static=yes
96278d623946Smrg  AC_MSG_RESULT([$enable_static])
9628fe24f8a2Smrg
96298d623946Smrg  _LT_CONFIG($1)
96308d623946Smrgfi
96318d623946SmrgAC_LANG_POP
96328d623946SmrgCC=$lt_save_CC
96338d623946Smrg])# _LT_LANG_C_CONFIG
9634414bd68fSmrg
9635414bd68fSmrg
96368d623946Smrg# _LT_LANG_CXX_CONFIG([TAG])
96378d623946Smrg# --------------------------
96388d623946Smrg# Ensure that the configuration variables for a C++ compiler are suitably
96398d623946Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
96408d623946Smrg# the compiler configuration to 'libtool'.
96418d623946Smrgm4_defun([_LT_LANG_CXX_CONFIG],
96428d623946Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
96438d623946Smrgm4_require([_LT_DECL_EGREP])dnl
96448d623946Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
96458d623946Smrgif test -n "$CXX" && ( test no != "$CXX" &&
96468d623946Smrg    ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) ||
96478d623946Smrg    (test g++ != "$CXX"))); then
96488d623946Smrg  AC_PROG_CXXCPP
96498d623946Smrgelse
96508d623946Smrg  _lt_caught_CXX_error=yes
96518d623946Smrgfi
9652414bd68fSmrg
96538d623946SmrgAC_LANG_PUSH(C++)
96548d623946Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
96558d623946Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
96568d623946Smrg_LT_TAGVAR(always_export_symbols, $1)=no
96578d623946Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
96588d623946Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
96598d623946Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
96608d623946Smrg_LT_TAGVAR(hardcode_direct, $1)=no
96618d623946Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
96628d623946Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
96638d623946Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
96648d623946Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
96658d623946Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
96668d623946Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
96678d623946Smrg_LT_TAGVAR(inherit_rpath, $1)=no
96688d623946Smrg_LT_TAGVAR(module_cmds, $1)=
96698d623946Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
96708d623946Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
96718d623946Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
96728d623946Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
96738d623946Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
96748d623946Smrg_LT_TAGVAR(no_undefined_flag, $1)=
96758d623946Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
96768d623946Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
9677414bd68fSmrg
96788d623946Smrg# Source file extension for C++ test sources.
96798d623946Smrgac_ext=cpp
96803e72ca8cSmrg
96818d623946Smrg# Object file extension for compiled C++ test sources.
96828d623946Smrgobjext=o
96838d623946Smrg_LT_TAGVAR(objext, $1)=$objext
96843e72ca8cSmrg
96858d623946Smrg# No sense in running all these tests if we already determined that
96868d623946Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
96878d623946Smrg# are currently assumed to apply to all compilers on this platform,
96888d623946Smrg# and will be corrupted by setting them based on a non-working compiler.
96898d623946Smrgif test yes != "$_lt_caught_CXX_error"; then
96908d623946Smrg  # Code to be used in simple compile tests
96918d623946Smrg  lt_simple_compile_test_code="int some_variable = 0;"
9692ee3138f1Smrg
96938d623946Smrg  # Code to be used in simple link tests
96948d623946Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
96953e72ca8cSmrg
96968d623946Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
96978d623946Smrg  _LT_TAG_COMPILER
9698fe24f8a2Smrg
96998d623946Smrg  # save warnings/boilerplate of simple test code
97008d623946Smrg  _LT_COMPILER_BOILERPLATE
97018d623946Smrg  _LT_LINKER_BOILERPLATE
9702fe24f8a2Smrg
97038d623946Smrg  # Allow CC to be a program name with arguments.
97048d623946Smrg  lt_save_CC=$CC
97058d623946Smrg  lt_save_CFLAGS=$CFLAGS
97068d623946Smrg  lt_save_LD=$LD
97078d623946Smrg  lt_save_GCC=$GCC
97088d623946Smrg  GCC=$GXX
97098d623946Smrg  lt_save_with_gnu_ld=$with_gnu_ld
97108d623946Smrg  lt_save_path_LD=$lt_cv_path_LD
97118d623946Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
97128d623946Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
97138d623946Smrg  else
97148d623946Smrg    $as_unset lt_cv_prog_gnu_ld
97158d623946Smrg  fi
97168d623946Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
97178d623946Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
97188d623946Smrg  else
97198d623946Smrg    $as_unset lt_cv_path_LD
97208d623946Smrg  fi
97218d623946Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
97228d623946Smrg  CC=${CXX-"c++"}
97238d623946Smrg  CFLAGS=$CXXFLAGS
97248d623946Smrg  compiler=$CC
97258d623946Smrg  _LT_TAGVAR(compiler, $1)=$CC
97268d623946Smrg  _LT_CC_BASENAME([$compiler])
9727fe24f8a2Smrg
97288d623946Smrg  if test -n "$compiler"; then
97298d623946Smrg    # We don't want -fno-exception when compiling C++ code, so set the
97308d623946Smrg    # no_builtin_flag separately
97318d623946Smrg    if test yes = "$GXX"; then
97328d623946Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
97338d623946Smrg    else
97348d623946Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
97358d623946Smrg    fi
9736fe24f8a2Smrg
97378d623946Smrg    if test yes = "$GXX"; then
97388d623946Smrg      # Set up default GNU C++ configuration
9739fe24f8a2Smrg
97408d623946Smrg      LT_PATH_LD
9741ee3138f1Smrg
97428d623946Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
97438d623946Smrg      # archiving commands below assume that GNU ld is being used.
97448d623946Smrg      if test yes = "$with_gnu_ld"; then
97458d623946Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
97468d623946Smrg        _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'
9747fe24f8a2Smrg
97488d623946Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
97498d623946Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
9750fe24f8a2Smrg
97518d623946Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
97528d623946Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
97538d623946Smrg        #     investigate it a little bit more. (MM)
97548d623946Smrg        wlarc='$wl'
9755ee3138f1Smrg
97568d623946Smrg        # ancient GNU ld didn't support --whole-archive et. al.
97578d623946Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
97588d623946Smrg	  $GREP 'no-whole-archive' > /dev/null; then
97598d623946Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
97608d623946Smrg        else
97618d623946Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
97628d623946Smrg        fi
97638d623946Smrg      else
97648d623946Smrg        with_gnu_ld=no
97658d623946Smrg        wlarc=
9766ee3138f1Smrg
97678d623946Smrg        # A generic and very simple default shared library creation
97688d623946Smrg        # command for GNU C++ for the case where it uses the native
97698d623946Smrg        # linker, instead of GNU ld.  If possible, this setting should
97708d623946Smrg        # overridden to take advantage of the native linker features on
97718d623946Smrg        # the platform it is being used on.
97728d623946Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
97738d623946Smrg      fi
9774ee3138f1Smrg
97758d623946Smrg      # Commands to make compiler produce verbose output that lists
97768d623946Smrg      # what "hidden" libraries, object files and flags are used when
97778d623946Smrg      # linking a shared library.
97788d623946Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
9779fe24f8a2Smrg
97808d623946Smrg    else
97818d623946Smrg      GXX=no
97828d623946Smrg      with_gnu_ld=no
97838d623946Smrg      wlarc=
97848d623946Smrg    fi
9785fe24f8a2Smrg
97868d623946Smrg    # PORTME: fill in a description of your system's C++ link characteristics
97878d623946Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
97888d623946Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
97898d623946Smrg    case $host_os in
97908d623946Smrg      aix3*)
97918d623946Smrg        # FIXME: insert proper C++ library support
97928d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
97938d623946Smrg        ;;
97948d623946Smrg      aix[[4-9]]*)
97958d623946Smrg        if test ia64 = "$host_cpu"; then
97968d623946Smrg          # On IA64, the linker does run time linking by default, so we don't
97978d623946Smrg          # have to do anything special.
97988d623946Smrg          aix_use_runtimelinking=no
97998d623946Smrg          exp_sym_flag='-Bexport'
98008d623946Smrg          no_entry_flag=
98018d623946Smrg        else
98028d623946Smrg          aix_use_runtimelinking=no
9803fe24f8a2Smrg
98048d623946Smrg          # Test if we are trying to use run time linking or normal
98058d623946Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
98068d623946Smrg          # have runtime linking enabled, and use it for executables.
98078d623946Smrg          # For shared libraries, we enable/disable runtime linking
98088d623946Smrg          # depending on the kind of the shared library created -
98098d623946Smrg          # when "with_aix_soname,aix_use_runtimelinking" is:
98108d623946Smrg          # "aix,no"   lib.a(lib.so.V) shared, rtl:no,  for executables
98118d623946Smrg          # "aix,yes"  lib.so          shared, rtl:yes, for executables
98128d623946Smrg          #            lib.a           static archive
98138d623946Smrg          # "both,no"  lib.so.V(shr.o) shared, rtl:yes
98148d623946Smrg          #            lib.a(lib.so.V) shared, rtl:no,  for executables
98158d623946Smrg          # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables
98168d623946Smrg          #            lib.a(lib.so.V) shared, rtl:no
98178d623946Smrg          # "svr4,*"   lib.so.V(shr.o) shared, rtl:yes, for executables
98188d623946Smrg          #            lib.a           static archive
98198d623946Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
98208d623946Smrg	    for ld_flag in $LDFLAGS; do
98218d623946Smrg	      case $ld_flag in
98228d623946Smrg	      *-brtl*)
98238d623946Smrg	        aix_use_runtimelinking=yes
98248d623946Smrg	        break
98258d623946Smrg	        ;;
98268d623946Smrg	      esac
98278d623946Smrg	    done
98288d623946Smrg	    if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then
98298d623946Smrg	      # With aix-soname=svr4, we create the lib.so.V shared archives only,
98308d623946Smrg	      # so we don't have lib.a shared libs to link our executables.
98318d623946Smrg	      # We have to force runtime linking in this case.
98328d623946Smrg	      aix_use_runtimelinking=yes
98338d623946Smrg	      LDFLAGS="$LDFLAGS -Wl,-brtl"
98348d623946Smrg	    fi
98358d623946Smrg	    ;;
98368d623946Smrg          esac
9837b425557eSmrg
98388d623946Smrg          exp_sym_flag='-bexport'
98398d623946Smrg          no_entry_flag='-bnoentry'
98408d623946Smrg        fi
984134977a2fSmrg
98428d623946Smrg        # When large executables or shared objects are built, AIX ld can
98438d623946Smrg        # have problems creating the table of contents.  If linking a library
98448d623946Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
98458d623946Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
98468d623946Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
984734977a2fSmrg
98488d623946Smrg        _LT_TAGVAR(archive_cmds, $1)=''
98498d623946Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
98508d623946Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
98518d623946Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
98528d623946Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
98538d623946Smrg        _LT_TAGVAR(file_list_spec, $1)='$wl-f,'
98548d623946Smrg        case $with_aix_soname,$aix_use_runtimelinking in
98558d623946Smrg        aix,*) ;;	# no import file
98568d623946Smrg        svr4,* | *,yes) # use import file
98578d623946Smrg          # The Import File defines what to hardcode.
98588d623946Smrg          _LT_TAGVAR(hardcode_direct, $1)=no
98598d623946Smrg          _LT_TAGVAR(hardcode_direct_absolute, $1)=no
98608d623946Smrg          ;;
98618d623946Smrg        esac
986234977a2fSmrg
98638d623946Smrg        if test yes = "$GXX"; then
98648d623946Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
98658d623946Smrg          # We only want to do this on AIX 4.2 and lower, the check
98668d623946Smrg          # below for broken collect2 doesn't work under 4.3+
98678d623946Smrg	  collect2name=`$CC -print-prog-name=collect2`
98688d623946Smrg	  if test -f "$collect2name" &&
98698d623946Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
98708d623946Smrg	  then
98718d623946Smrg	    # We have reworked collect2
98728d623946Smrg	    :
98738d623946Smrg	  else
98748d623946Smrg	    # We have old collect2
98758d623946Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
98768d623946Smrg	    # It fails to find uninstalled libraries when the uninstalled
98778d623946Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
98788d623946Smrg	    # to unsupported forces relinking
98798d623946Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
98808d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
98818d623946Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
98828d623946Smrg	  fi
98838d623946Smrg          esac
98848d623946Smrg          shared_flag='-shared'
98858d623946Smrg	  if test yes = "$aix_use_runtimelinking"; then
98868d623946Smrg	    shared_flag=$shared_flag' $wl-G'
98878d623946Smrg	  fi
98888d623946Smrg	  # Need to ensure runtime linking is disabled for the traditional
98898d623946Smrg	  # shared library, or the linker may eventually find shared libraries
98908d623946Smrg	  # /with/ Import File - we do not want to mix them.
98918d623946Smrg	  shared_flag_aix='-shared'
98928d623946Smrg	  shared_flag_svr4='-shared $wl-G'
98938d623946Smrg        else
98948d623946Smrg          # not using gcc
98958d623946Smrg          if test ia64 = "$host_cpu"; then
98968d623946Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
98978d623946Smrg	  # chokes on -Wl,-G. The following line is correct:
98988d623946Smrg	  shared_flag='-G'
98998d623946Smrg          else
99008d623946Smrg	    if test yes = "$aix_use_runtimelinking"; then
99018d623946Smrg	      shared_flag='$wl-G'
99028d623946Smrg	    else
99038d623946Smrg	      shared_flag='$wl-bM:SRE'
99048d623946Smrg	    fi
99058d623946Smrg	    shared_flag_aix='$wl-bM:SRE'
99068d623946Smrg	    shared_flag_svr4='$wl-G'
99078d623946Smrg          fi
99088d623946Smrg        fi
990934977a2fSmrg
99108d623946Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall'
99118d623946Smrg        # It seems that -bexpall does not export symbols beginning with
99128d623946Smrg        # underscore (_), so it is better to generate a list of symbols to
99138d623946Smrg	# export.
99148d623946Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
99158d623946Smrg	if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then
99168d623946Smrg          # Warning - without using the other runtime loading flags (-brtl),
99178d623946Smrg          # -berok will link without error, but may produce a broken library.
99188d623946Smrg          # The "-G" linker flag allows undefined symbols.
99198d623946Smrg          _LT_TAGVAR(no_undefined_flag, $1)='-bernotok'
99208d623946Smrg          # Determine the default libpath from the value encoded in an empty
99218d623946Smrg          # executable.
99228d623946Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
99238d623946Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
992434977a2fSmrg
99258d623946Smrg          _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
99268d623946Smrg        else
99278d623946Smrg          if test ia64 = "$host_cpu"; then
99288d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib'
99298d623946Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
99308d623946Smrg	    _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"
99318d623946Smrg          else
99328d623946Smrg	    # Determine the default libpath from the value encoded in an
99338d623946Smrg	    # empty executable.
99348d623946Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
99358d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath"
99368d623946Smrg	    # Warning - without using the other run time loading flags,
99378d623946Smrg	    # -berok will link without error, but may produce a broken library.
99388d623946Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok'
99398d623946Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok'
99408d623946Smrg	    if test yes = "$with_gnu_ld"; then
99418d623946Smrg	      # We only use this code for GNU lds that support --whole-archive.
99428d623946Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
99438d623946Smrg	    else
99448d623946Smrg	      # Exported symbols can be pulled into shared objects from archives
99458d623946Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
99468d623946Smrg	    fi
99478d623946Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
99488d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d'
99498d623946Smrg	    # -brtl affects multiple linker settings, -berok does not and is overridden later
99508d623946Smrg	    compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`'
99518d623946Smrg	    if test svr4 != "$with_aix_soname"; then
99528d623946Smrg	      # This is similar to how AIX traditionally builds its shared
99538d623946Smrg	      # libraries. Need -bnortl late, we may have -brtl in LDFLAGS.
99548d623946Smrg	      _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'
99558d623946Smrg	    fi
99568d623946Smrg	    if test aix != "$with_aix_soname"; then
99578d623946Smrg	      _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'
99588d623946Smrg	    else
99598d623946Smrg	      # used by -dlpreopen to get the symbols
99608d623946Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV  $output_objdir/$realname.d/$soname $output_objdir'
99618d623946Smrg	    fi
99628d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d'
99638d623946Smrg          fi
99648d623946Smrg        fi
99658d623946Smrg        ;;
996634977a2fSmrg
99678d623946Smrg      beos*)
99688d623946Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
99698d623946Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
99708d623946Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
99718d623946Smrg	  # support --undefined.  This deserves some investigation.  FIXME
99728d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
99738d623946Smrg	else
99748d623946Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
99758d623946Smrg	fi
99768d623946Smrg	;;
9977b425557eSmrg
99788d623946Smrg      chorus*)
99798d623946Smrg        case $cc_basename in
99808d623946Smrg          *)
99818d623946Smrg	  # FIXME: insert proper C++ library support
99828d623946Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
99838d623946Smrg	  ;;
99848d623946Smrg        esac
99858d623946Smrg        ;;
9986b425557eSmrg
99878d623946Smrg      cygwin* | mingw* | pw32* | cegcc*)
99888d623946Smrg	case $GXX,$cc_basename in
99898d623946Smrg	,cl* | no,cl* | ,icl* | no,icl*)
99908d623946Smrg	  # Native MSVC or ICC
99918d623946Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
99928d623946Smrg	  # no search path for DLLs.
99938d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
99948d623946Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
99958d623946Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
99968d623946Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
99978d623946Smrg	  # Tell ltmain to make .lib files, not .a files.
99988d623946Smrg	  libext=lib
99998d623946Smrg	  # Tell ltmain to make .dll files, not .so files.
100008d623946Smrg	  shrext_cmds=.dll
100018d623946Smrg	  # FIXME: Setting linknames here is a bad hack.
100028d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames='
100038d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
100048d623946Smrg              cp "$export_symbols" "$output_objdir/$soname.def";
100058d623946Smrg              echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp";
100068d623946Smrg            else
100078d623946Smrg              $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp;
100088d623946Smrg            fi~
100098d623946Smrg            $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
100108d623946Smrg            linknames='
100118d623946Smrg	  # The linker will not automatically build a static lib if we build a DLL.
100128d623946Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
100138d623946Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
100148d623946Smrg	  # Don't use ranlib
100158d623946Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
100168d623946Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
100178d623946Smrg            lt_tool_outputfile="@TOOL_OUTPUT@"~
100188d623946Smrg            case $lt_outputfile in
100198d623946Smrg              *.exe|*.EXE) ;;
100208d623946Smrg              *)
100218d623946Smrg                lt_outputfile=$lt_outputfile.exe
100228d623946Smrg                lt_tool_outputfile=$lt_tool_outputfile.exe
100238d623946Smrg                ;;
100248d623946Smrg            esac~
100258d623946Smrg            func_to_tool_file "$lt_outputfile"~
100268d623946Smrg            if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then
100278d623946Smrg              $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
100288d623946Smrg              $RM "$lt_outputfile.manifest";
100298d623946Smrg            fi'
100308d623946Smrg	  ;;
100318d623946Smrg	*)
100328d623946Smrg	  # g++
100338d623946Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
100348d623946Smrg	  # as there is no search path for DLLs.
100358d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
100368d623946Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols'
100378d623946Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
100388d623946Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
100398d623946Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
10040b425557eSmrg
100418d623946Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
100428d623946Smrg	    _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'
100438d623946Smrg	    # If the export-symbols file already is a .def file, use it as
100448d623946Smrg	    # is; otherwise, prepend EXPORTS...
100458d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then
100468d623946Smrg              cp $export_symbols $output_objdir/$soname.def;
100478d623946Smrg            else
100488d623946Smrg              echo EXPORTS > $output_objdir/$soname.def;
100498d623946Smrg              cat $export_symbols >> $output_objdir/$soname.def;
100508d623946Smrg            fi~
100518d623946Smrg            $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'
100528d623946Smrg	  else
100538d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
100548d623946Smrg	  fi
100558d623946Smrg	  ;;
100568d623946Smrg	esac
100578d623946Smrg	;;
100588d623946Smrg      darwin* | rhapsody*)
100598d623946Smrg        _LT_DARWIN_LINKER_FEATURES($1)
100608d623946Smrg	;;
1006134977a2fSmrg
100628d623946Smrg      os2*)
100638d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
100648d623946Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
100658d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
100668d623946Smrg	shrext_cmds=.dll
100678d623946Smrg	_LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
100688d623946Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
100698d623946Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
100708d623946Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
100718d623946Smrg	  emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~
100728d623946Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
100738d623946Smrg	  emximp -o $lib $output_objdir/$libname.def'
100748d623946Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~
100758d623946Smrg	  $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~
100768d623946Smrg	  $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~
100778d623946Smrg	  $ECHO EXPORTS >> $output_objdir/$libname.def~
100788d623946Smrg	  prefix_cmds="$SED"~
100798d623946Smrg	  if test EXPORTS = "`$SED 1q $export_symbols`"; then
100808d623946Smrg	    prefix_cmds="$prefix_cmds -e 1d";
100818d623946Smrg	  fi~
100828d623946Smrg	  prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~
100838d623946Smrg	  cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~
100848d623946Smrg	  $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~
100858d623946Smrg	  emximp -o $lib $output_objdir/$libname.def'
100868d623946Smrg	_LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def'
100878d623946Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
100888d623946Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
100898d623946Smrg	;;
1009034977a2fSmrg
100918d623946Smrg      dgux*)
100928d623946Smrg        case $cc_basename in
100938d623946Smrg          ec++*)
100948d623946Smrg	    # FIXME: insert proper C++ library support
100958d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
100968d623946Smrg	    ;;
100978d623946Smrg          ghcx*)
100988d623946Smrg	    # Green Hills C++ Compiler
100998d623946Smrg	    # FIXME: insert proper C++ library support
101008d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101018d623946Smrg	    ;;
101028d623946Smrg          *)
101038d623946Smrg	    # FIXME: insert proper C++ library support
101048d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101058d623946Smrg	    ;;
101068d623946Smrg        esac
101078d623946Smrg        ;;
10108a1ed278cSmrg
101098d623946Smrg      freebsd2.*)
101108d623946Smrg        # C++ shared libraries reported to be fairly broken before
101118d623946Smrg	# switch to ELF
101128d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
101138d623946Smrg        ;;
1011434977a2fSmrg
101158d623946Smrg      freebsd-elf*)
101168d623946Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
101178d623946Smrg        ;;
1011834977a2fSmrg
101198d623946Smrg      freebsd* | dragonfly* | midnightbsd*)
101208d623946Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
101218d623946Smrg        # conventions
101228d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
101238d623946Smrg        ;;
1012434977a2fSmrg
101258d623946Smrg      haiku*)
101268d623946Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
101278d623946Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
101288d623946Smrg        ;;
10129a1ed278cSmrg
101308d623946Smrg      hpux9*)
101318d623946Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
101328d623946Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
101338d623946Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
101348d623946Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
101358d623946Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
101368d623946Smrg				             # but as the default
101378d623946Smrg				             # location of the library.
101383e72ca8cSmrg
101398d623946Smrg        case $cc_basename in
101408d623946Smrg          CC*)
101418d623946Smrg            # FIXME: insert proper C++ library support
101428d623946Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
101438d623946Smrg            ;;
101448d623946Smrg          aCC*)
101458d623946Smrg            _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'
101468d623946Smrg            # Commands to make compiler produce verbose output that lists
101478d623946Smrg            # what "hidden" libraries, object files and flags are used when
101488d623946Smrg            # linking a shared library.
101498d623946Smrg            #
101508d623946Smrg            # There doesn't appear to be a way to prevent this compiler from
101518d623946Smrg            # explicitly linking system object files so we need to strip them
101528d623946Smrg            # from the output so that they don't get included in the library
101538d623946Smrg            # dependencies.
101548d623946Smrg            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"'
101558d623946Smrg            ;;
101568d623946Smrg          *)
101578d623946Smrg            if test yes = "$GXX"; then
101588d623946Smrg              _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'
101598d623946Smrg            else
101608d623946Smrg              # FIXME: insert proper C++ library support
101618d623946Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
101628d623946Smrg            fi
101638d623946Smrg            ;;
101648d623946Smrg        esac
101658d623946Smrg        ;;
101668d623946Smrg
101678d623946Smrg      hpux10*|hpux11*)
101688d623946Smrg        if test no = "$with_gnu_ld"; then
101698d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir'
101708d623946Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
1017134977a2fSmrg
101728d623946Smrg          case $host_cpu in
101738d623946Smrg            hppa*64*|ia64*)
101748d623946Smrg              ;;
101758d623946Smrg            *)
101768d623946Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
101778d623946Smrg              ;;
101788d623946Smrg          esac
101798d623946Smrg        fi
101808d623946Smrg        case $host_cpu in
101818d623946Smrg          hppa*64*|ia64*)
101828d623946Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
101838d623946Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
101848d623946Smrg            ;;
101858d623946Smrg          *)
101868d623946Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
101878d623946Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
101888d623946Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
101898d623946Smrg					         # but as the default
101908d623946Smrg					         # location of the library.
101918d623946Smrg            ;;
101928d623946Smrg        esac
101933e72ca8cSmrg
101948d623946Smrg        case $cc_basename in
101958d623946Smrg          CC*)
101968d623946Smrg	    # FIXME: insert proper C++ library support
101978d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
101988d623946Smrg	    ;;
101998d623946Smrg          aCC*)
102008d623946Smrg	    case $host_cpu in
102018d623946Smrg	      hppa*64*)
102028d623946Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102038d623946Smrg	        ;;
102048d623946Smrg	      ia64*)
102058d623946Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102068d623946Smrg	        ;;
102078d623946Smrg	      *)
102088d623946Smrg	        _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'
102098d623946Smrg	        ;;
102108d623946Smrg	    esac
102118d623946Smrg	    # Commands to make compiler produce verbose output that lists
102128d623946Smrg	    # what "hidden" libraries, object files and flags are used when
102138d623946Smrg	    # linking a shared library.
102148d623946Smrg	    #
102158d623946Smrg	    # There doesn't appear to be a way to prevent this compiler from
102168d623946Smrg	    # explicitly linking system object files so we need to strip them
102178d623946Smrg	    # from the output so that they don't get included in the library
102188d623946Smrg	    # dependencies.
102198d623946Smrg	    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"'
102208d623946Smrg	    ;;
102218d623946Smrg          *)
102228d623946Smrg	    if test yes = "$GXX"; then
102238d623946Smrg	      if test no = "$with_gnu_ld"; then
102248d623946Smrg	        case $host_cpu in
102258d623946Smrg	          hppa*64*)
102268d623946Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
102278d623946Smrg	            ;;
102288d623946Smrg	          ia64*)
102298d623946Smrg	            _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'
102308d623946Smrg	            ;;
102318d623946Smrg	          *)
102328d623946Smrg	            _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'
102338d623946Smrg	            ;;
102348d623946Smrg	        esac
102358d623946Smrg	      fi
102368d623946Smrg	    else
102378d623946Smrg	      # FIXME: insert proper C++ library support
102388d623946Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
102398d623946Smrg	    fi
102408d623946Smrg	    ;;
102418d623946Smrg        esac
102428d623946Smrg        ;;
102433e72ca8cSmrg
102448d623946Smrg      interix[[3-9]]*)
102458d623946Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
102468d623946Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
102478d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
102488d623946Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
102498d623946Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
102508d623946Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
102518d623946Smrg	# default) and relocated if they conflict, which is a slow very memory
102528d623946Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
102538d623946Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
102548d623946Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
102558d623946Smrg	_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'
102568d623946Smrg	_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'
102578d623946Smrg	;;
102588d623946Smrg      irix5* | irix6*)
102598d623946Smrg        case $cc_basename in
102608d623946Smrg          CC*)
102618d623946Smrg	    # SGI C++
102628d623946Smrg	    _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'
102633e72ca8cSmrg
102648d623946Smrg	    # Archives containing C++ object files must be created using
102658d623946Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
102668d623946Smrg	    # necessary to make sure instantiated templates are included
102678d623946Smrg	    # in the archive.
102688d623946Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
102698d623946Smrg	    ;;
102708d623946Smrg          *)
102718d623946Smrg	    if test yes = "$GXX"; then
102728d623946Smrg	      if test no = "$with_gnu_ld"; then
102738d623946Smrg	        _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'
102748d623946Smrg	      else
102758d623946Smrg	        _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'
102768d623946Smrg	      fi
102778d623946Smrg	    fi
102788d623946Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
102798d623946Smrg	    ;;
102808d623946Smrg        esac
102818d623946Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
102828d623946Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
102838d623946Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
102848d623946Smrg        ;;
10285ee3138f1Smrg
102868d623946Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*)
102878d623946Smrg        case $cc_basename in
102888d623946Smrg          KCC*)
102898d623946Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
10290ee3138f1Smrg
102918d623946Smrg	    # KCC will only create a shared library if the output file
102928d623946Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
102938d623946Smrg	    # to its proper name (with version) after linking.
102948d623946Smrg	    _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'
102958d623946Smrg	    _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'
102968d623946Smrg	    # Commands to make compiler produce verbose output that lists
102978d623946Smrg	    # what "hidden" libraries, object files and flags are used when
102988d623946Smrg	    # linking a shared library.
102998d623946Smrg	    #
103008d623946Smrg	    # There doesn't appear to be a way to prevent this compiler from
103018d623946Smrg	    # explicitly linking system object files so we need to strip them
103028d623946Smrg	    # from the output so that they don't get included in the library
103038d623946Smrg	    # dependencies.
103048d623946Smrg	    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"'
10305ee3138f1Smrg
103068d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
103078d623946Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
103088d623946Smrg
103098d623946Smrg	    # Archives containing C++ object files must be created using
103108d623946Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
103118d623946Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
103128d623946Smrg	    ;;
103138d623946Smrg	  icpc* | ecpc* )
103148d623946Smrg	    # Intel C++
103158d623946Smrg	    with_gnu_ld=yes
103168d623946Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
103178d623946Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
103188d623946Smrg	    # earlier do not add the objects themselves.
103198d623946Smrg	    case `$CC -V 2>&1` in
103208d623946Smrg	      *"Version 7."*)
103218d623946Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
103228d623946Smrg		_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'
103238d623946Smrg		;;
103248d623946Smrg	      *)  # Version 8.0 or newer
103258d623946Smrg	        tmp_idyn=
103268d623946Smrg	        case $host_cpu in
103278d623946Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
103288d623946Smrg		esac
103298d623946Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
103308d623946Smrg		_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'
103318d623946Smrg		;;
103328d623946Smrg	    esac
103338d623946Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
103348d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
103358d623946Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
103368d623946Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive'
103378d623946Smrg	    ;;
103388d623946Smrg          pgCC* | pgcpp*)
103398d623946Smrg            # Portland Group C++ compiler
103408d623946Smrg	    case `$CC -V` in
103418d623946Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
103428d623946Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
103438d623946Smrg               rm -rf $tpldir~
103448d623946Smrg               $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
103458d623946Smrg               compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
103468d623946Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
103478d623946Smrg                rm -rf $tpldir~
103488d623946Smrg                $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
103498d623946Smrg                $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
103508d623946Smrg                $RANLIB $oldlib'
103518d623946Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
103528d623946Smrg                rm -rf $tpldir~
103538d623946Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
103548d623946Smrg                $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
103558d623946Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
103568d623946Smrg                rm -rf $tpldir~
103578d623946Smrg                $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
103588d623946Smrg                $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'
103598d623946Smrg	      ;;
103608d623946Smrg	    *) # Version 6 and above use weak symbols
103618d623946Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
103628d623946Smrg	      _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'
103638d623946Smrg	      ;;
103648d623946Smrg	    esac
10365a1ed278cSmrg
103668d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir'
103678d623946Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
103688d623946Smrg	    _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'
103698d623946Smrg            ;;
103708d623946Smrg	  cxx*)
103718d623946Smrg	    # Compaq C++
103728d623946Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib'
103738d623946Smrg	    _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'
10374414bd68fSmrg
103758d623946Smrg	    runpath_var=LD_RUN_PATH
103768d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
103778d623946Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10378414bd68fSmrg
103798d623946Smrg	    # Commands to make compiler produce verbose output that lists
103808d623946Smrg	    # what "hidden" libraries, object files and flags are used when
103818d623946Smrg	    # linking a shared library.
103828d623946Smrg	    #
103838d623946Smrg	    # There doesn't appear to be a way to prevent this compiler from
103848d623946Smrg	    # explicitly linking system object files so we need to strip them
103858d623946Smrg	    # from the output so that they don't get included in the library
103868d623946Smrg	    # dependencies.
103878d623946Smrg	    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'
103888d623946Smrg	    ;;
103898d623946Smrg	  xl* | mpixl* | bgxl*)
103908d623946Smrg	    # IBM XL 8.0 on PPC, with GNU ld
103918d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
103928d623946Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic'
103938d623946Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib'
103948d623946Smrg	    if test yes = "$supports_anon_versioning"; then
103958d623946Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
103968d623946Smrg                cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
103978d623946Smrg                echo "local: *; };" >> $output_objdir/$libname.ver~
103988d623946Smrg                $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
103998d623946Smrg	    fi
104008d623946Smrg	    ;;
104018d623946Smrg	  *)
104028d623946Smrg	    case `$CC -V 2>&1 | $SED 5q` in
104038d623946Smrg	    *Sun\ C*)
104048d623946Smrg	      # Sun C++ 5.9
104058d623946Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
104068d623946Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
104078d623946Smrg	      _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'
104088d623946Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
104098d623946Smrg	      _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'
104108d623946Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
10411414bd68fSmrg
104128d623946Smrg	      # Not sure whether something based on
104138d623946Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
104148d623946Smrg	      # would be better.
104158d623946Smrg	      output_verbose_link_cmd='func_echo_all'
10416414bd68fSmrg
104178d623946Smrg	      # Archives containing C++ object files must be created using
104188d623946Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
104198d623946Smrg	      # necessary to make sure instantiated templates are included
104208d623946Smrg	      # in the archive.
104218d623946Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
104228d623946Smrg	      ;;
104238d623946Smrg	    esac
104248d623946Smrg	    ;;
104258d623946Smrg	esac
104268d623946Smrg	;;
10427414bd68fSmrg
104288d623946Smrg      lynxos*)
104298d623946Smrg        # FIXME: insert proper C++ library support
104308d623946Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
104318d623946Smrg	;;
10432fe24f8a2Smrg
104338d623946Smrg      m88k*)
104348d623946Smrg        # FIXME: insert proper C++ library support
104358d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
104368d623946Smrg	;;
10437414bd68fSmrg
104388d623946Smrg      mvs*)
104398d623946Smrg        case $cc_basename in
104408d623946Smrg          cxx*)
104418d623946Smrg	    # FIXME: insert proper C++ library support
104428d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
104438d623946Smrg	    ;;
104448d623946Smrg	  *)
104458d623946Smrg	    # FIXME: insert proper C++ library support
104468d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
104478d623946Smrg	    ;;
104488d623946Smrg	esac
104498d623946Smrg	;;
10450414bd68fSmrg
104518d623946Smrg      netbsd*)
104528d623946Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
104538d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
104548d623946Smrg	  wlarc=
104558d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
104568d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
104578d623946Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
104588d623946Smrg	fi
104598d623946Smrg	# Workaround some broken pre-1.5 toolchains
104608d623946Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
104618d623946Smrg	;;
10462414bd68fSmrg
104638d623946Smrg      *nto* | *qnx*)
104648d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
104658d623946Smrg	;;
10466fe24f8a2Smrg
104678d623946Smrg      openbsd* | bitrig*)
104688d623946Smrg	if test -f /usr/libexec/ld.so; then
104698d623946Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
104708d623946Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
104718d623946Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
104728d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
104738d623946Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
104748d623946Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then
104758d623946Smrg	    _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'
104768d623946Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E'
104778d623946Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive'
104788d623946Smrg	  fi
104798d623946Smrg	  output_verbose_link_cmd=func_echo_all
104808d623946Smrg	else
104818d623946Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
104828d623946Smrg	fi
104838d623946Smrg	;;
10484fe24f8a2Smrg
104858d623946Smrg      osf3* | osf4* | osf5*)
104868d623946Smrg        case $cc_basename in
104878d623946Smrg          KCC*)
104888d623946Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
10489fe24f8a2Smrg
104908d623946Smrg	    # KCC will only create a shared library if the output file
104918d623946Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
104928d623946Smrg	    # to its proper name (with version) after linking.
104938d623946Smrg	    _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'
10494b425557eSmrg
104958d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir'
104968d623946Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
104978d623946Smrg
104988d623946Smrg	    # Archives containing C++ object files must be created using
104998d623946Smrg	    # the KAI C++ compiler.
105008d623946Smrg	    case $host in
105018d623946Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
105028d623946Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
105038d623946Smrg	    esac
105048d623946Smrg	    ;;
105058d623946Smrg          RCC*)
105068d623946Smrg	    # Rational C++ 2.4.1
105078d623946Smrg	    # FIXME: insert proper C++ library support
105088d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105098d623946Smrg	    ;;
105108d623946Smrg          cxx*)
105118d623946Smrg	    case $host in
105128d623946Smrg	      osf3*)
105138d623946Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
105148d623946Smrg	        _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'
105158d623946Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
105168d623946Smrg		;;
105178d623946Smrg	      *)
105188d623946Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
105198d623946Smrg	        _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'
105208d623946Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
105218d623946Smrg                  echo "-hidden">> $lib.exp~
105228d623946Smrg                  $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~
105238d623946Smrg                  $RM $lib.exp'
105248d623946Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
105258d623946Smrg		;;
105268d623946Smrg	    esac
105273e72ca8cSmrg
105288d623946Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
105293e72ca8cSmrg
105308d623946Smrg	    # Commands to make compiler produce verbose output that lists
105318d623946Smrg	    # what "hidden" libraries, object files and flags are used when
105328d623946Smrg	    # linking a shared library.
105338d623946Smrg	    #
105348d623946Smrg	    # There doesn't appear to be a way to prevent this compiler from
105358d623946Smrg	    # explicitly linking system object files so we need to strip them
105368d623946Smrg	    # from the output so that they don't get included in the library
105378d623946Smrg	    # dependencies.
105388d623946Smrg	    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"'
105398d623946Smrg	    ;;
105408d623946Smrg	  *)
105418d623946Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
105428d623946Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*'
105438d623946Smrg	      case $host in
105448d623946Smrg	        osf3*)
105458d623946Smrg	          _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'
105468d623946Smrg		  ;;
105478d623946Smrg	        *)
105488d623946Smrg	          _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'
105498d623946Smrg		  ;;
105508d623946Smrg	      esac
10551414bd68fSmrg
105528d623946Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir'
105538d623946Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
10554b425557eSmrg
105558d623946Smrg	      # Commands to make compiler produce verbose output that lists
105568d623946Smrg	      # what "hidden" libraries, object files and flags are used when
105578d623946Smrg	      # linking a shared library.
105588d623946Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
10559b425557eSmrg
105608d623946Smrg	    else
105618d623946Smrg	      # FIXME: insert proper C++ library support
105628d623946Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
105638d623946Smrg	    fi
105648d623946Smrg	    ;;
105658d623946Smrg        esac
105668d623946Smrg        ;;
105673e72ca8cSmrg
105688d623946Smrg      psos*)
105698d623946Smrg        # FIXME: insert proper C++ library support
105708d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
105718d623946Smrg        ;;
10572fe24f8a2Smrg
105738d623946Smrg      sunos4*)
105748d623946Smrg        case $cc_basename in
105758d623946Smrg          CC*)
105768d623946Smrg	    # Sun C++ 4.x
105778d623946Smrg	    # FIXME: insert proper C++ library support
105788d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105798d623946Smrg	    ;;
105808d623946Smrg          lcc*)
105818d623946Smrg	    # Lucid
105828d623946Smrg	    # FIXME: insert proper C++ library support
105838d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105848d623946Smrg	    ;;
105858d623946Smrg          *)
105868d623946Smrg	    # FIXME: insert proper C++ library support
105878d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
105888d623946Smrg	    ;;
105898d623946Smrg        esac
105908d623946Smrg        ;;
10591b425557eSmrg
105928d623946Smrg      solaris*)
105938d623946Smrg        case $cc_basename in
105948d623946Smrg          CC* | sunCC*)
105958d623946Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
105968d623946Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
105978d623946Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
105988d623946Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
105998d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
106008d623946Smrg              $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'
1060134977a2fSmrg
106028d623946Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
106038d623946Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
106048d623946Smrg	    case $host_os in
106058d623946Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
106068d623946Smrg	      *)
106078d623946Smrg		# The compiler driver will combine and reorder linker options,
106088d623946Smrg		# but understands '-z linker_flag'.
106098d623946Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
106108d623946Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
106118d623946Smrg	        ;;
106128d623946Smrg	    esac
106138d623946Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
10614ee3138f1Smrg
106158d623946Smrg	    output_verbose_link_cmd='func_echo_all'
10616ee3138f1Smrg
106178d623946Smrg	    # Archives containing C++ object files must be created using
106188d623946Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
106198d623946Smrg	    # necessary to make sure instantiated templates are included
106208d623946Smrg	    # in the archive.
106218d623946Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
106228d623946Smrg	    ;;
106238d623946Smrg          gcx*)
106248d623946Smrg	    # Green Hills C++ Compiler
106258d623946Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
10626ee3138f1Smrg
106278d623946Smrg	    # The C++ compiler must be used to create the archive.
106288d623946Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
106298d623946Smrg	    ;;
106308d623946Smrg          *)
106318d623946Smrg	    # GNU C++ compiler with Solaris linker
106328d623946Smrg	    if test yes,no = "$GXX,$with_gnu_ld"; then
106338d623946Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs'
106348d623946Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
106358d623946Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
106368d623946Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
106378d623946Smrg                  $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'
10638ee3138f1Smrg
106398d623946Smrg	        # Commands to make compiler produce verbose output that lists
106408d623946Smrg	        # what "hidden" libraries, object files and flags are used when
106418d623946Smrg	        # linking a shared library.
106428d623946Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
106438d623946Smrg	      else
106448d623946Smrg	        # g++ 2.7 appears to require '-G' NOT '-shared' on this
106458d623946Smrg	        # platform.
106468d623946Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib'
106478d623946Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
106488d623946Smrg                  $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'
10649ee3138f1Smrg
106508d623946Smrg	        # Commands to make compiler produce verbose output that lists
106518d623946Smrg	        # what "hidden" libraries, object files and flags are used when
106528d623946Smrg	        # linking a shared library.
106538d623946Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
106548d623946Smrg	      fi
10655ee3138f1Smrg
106568d623946Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir'
106578d623946Smrg	      case $host_os in
106588d623946Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
106598d623946Smrg		*)
106608d623946Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract'
106618d623946Smrg		  ;;
106628d623946Smrg	      esac
106638d623946Smrg	    fi
106648d623946Smrg	    ;;
106658d623946Smrg        esac
106668d623946Smrg        ;;
10667ee3138f1Smrg
106688d623946Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
106698d623946Smrg      _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
106708d623946Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
106718d623946Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
106728d623946Smrg      runpath_var='LD_RUN_PATH'
1067334977a2fSmrg
106748d623946Smrg      case $cc_basename in
106758d623946Smrg        CC*)
106768d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
106778d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
106788d623946Smrg	  ;;
106798d623946Smrg	*)
106808d623946Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
106818d623946Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
106828d623946Smrg	  ;;
106838d623946Smrg      esac
106848d623946Smrg      ;;
10685b425557eSmrg
106868d623946Smrg      sysv5* | sco3.2v5* | sco5v6*)
106878d623946Smrg	# Note: We CANNOT use -z defs as we might desire, because we do not
106888d623946Smrg	# link with -lc, and that would cause any symbols used from libc to
106898d623946Smrg	# always be unresolved, which means just about no library would
106908d623946Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
106918d623946Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
106928d623946Smrg	# as -z defs.
106938d623946Smrg	_LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text'
106948d623946Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs'
106958d623946Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
106968d623946Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
106978d623946Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir'
106988d623946Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
106998d623946Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
107008d623946Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport'
107018d623946Smrg	runpath_var='LD_RUN_PATH'
10702ee3138f1Smrg
107038d623946Smrg	case $cc_basename in
107048d623946Smrg          CC*)
107058d623946Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107068d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107078d623946Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
107088d623946Smrg              '"$_LT_TAGVAR(old_archive_cmds, $1)"
107098d623946Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
107108d623946Smrg              '"$_LT_TAGVAR(reload_cmds, $1)"
107118d623946Smrg	    ;;
107128d623946Smrg	  *)
107138d623946Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107148d623946Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
107158d623946Smrg	    ;;
107168d623946Smrg	esac
107178d623946Smrg      ;;
10718ee3138f1Smrg
107198d623946Smrg      tandem*)
107208d623946Smrg        case $cc_basename in
107218d623946Smrg          NCC*)
107228d623946Smrg	    # NonStop-UX NCC 3.20
107238d623946Smrg	    # FIXME: insert proper C++ library support
107248d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
107258d623946Smrg	    ;;
107268d623946Smrg          *)
107278d623946Smrg	    # FIXME: insert proper C++ library support
107288d623946Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
107298d623946Smrg	    ;;
107308d623946Smrg        esac
107318d623946Smrg        ;;
10732ee3138f1Smrg
107338d623946Smrg      vxworks*)
107348d623946Smrg        # FIXME: insert proper C++ library support
107358d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
107368d623946Smrg        ;;
10737ee3138f1Smrg
107388d623946Smrg      *)
107398d623946Smrg        # FIXME: insert proper C++ library support
107408d623946Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
107418d623946Smrg        ;;
107428d623946Smrg    esac
10743414bd68fSmrg
107448d623946Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
107458d623946Smrg    test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no
10746ee3138f1Smrg
107478d623946Smrg    _LT_TAGVAR(GCC, $1)=$GXX
107488d623946Smrg    _LT_TAGVAR(LD, $1)=$LD
10749ee3138f1Smrg
107508d623946Smrg    ## CAVEAT EMPTOR:
107518d623946Smrg    ## There is no encapsulation within the following macros, do not change
107528d623946Smrg    ## the running order or otherwise move them around unless you know exactly
107538d623946Smrg    ## what you are doing...
107548d623946Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
107558d623946Smrg    _LT_COMPILER_PIC($1)
107568d623946Smrg    _LT_COMPILER_C_O($1)
107578d623946Smrg    _LT_COMPILER_FILE_LOCKS($1)
107588d623946Smrg    _LT_LINKER_SHLIBS($1)
107598d623946Smrg    _LT_SYS_DYNAMIC_LINKER($1)
107608d623946Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
107618d623946Smrg
107628d623946Smrg    _LT_CONFIG($1)
107638d623946Smrg  fi # test -n "$compiler"
107648d623946Smrg
107658d623946Smrg  CC=$lt_save_CC
107668d623946Smrg  CFLAGS=$lt_save_CFLAGS
107678d623946Smrg  LDCXX=$LD
107688d623946Smrg  LD=$lt_save_LD
107698d623946Smrg  GCC=$lt_save_GCC
107708d623946Smrg  with_gnu_ld=$lt_save_with_gnu_ld
107718d623946Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
107728d623946Smrg  lt_cv_path_LD=$lt_save_path_LD
107738d623946Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
107748d623946Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
107758d623946Smrgfi # test yes != "$_lt_caught_CXX_error"
10776ee3138f1Smrg
107778d623946SmrgAC_LANG_POP
107788d623946Smrg])# _LT_LANG_CXX_CONFIG
10779ee3138f1Smrg
10780fe24f8a2Smrg
107818d623946Smrg# _LT_FUNC_STRIPNAME_CNF
107828d623946Smrg# ----------------------
107838d623946Smrg# func_stripname_cnf prefix suffix name
107848d623946Smrg# strip PREFIX and SUFFIX off of NAME.
107858d623946Smrg# PREFIX and SUFFIX must not contain globbing or regex special
107868d623946Smrg# characters, hashes, percent signs, but SUFFIX may contain a leading
107878d623946Smrg# dot (in which case that matches only a dot).
10788414bd68fSmrg#
107898d623946Smrg# This function is identical to the (non-XSI) version of func_stripname,
107908d623946Smrg# except this one can be used by m4 code that may be executed by configure,
107918d623946Smrg# rather than the libtool script.
107928d623946Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
107938d623946SmrgAC_REQUIRE([_LT_DECL_SED])
107948d623946SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
107958d623946Smrgfunc_stripname_cnf ()
107968d623946Smrg{
107978d623946Smrg  case @S|@2 in
107988d623946Smrg  .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;;
107998d623946Smrg  *)  func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;;
108008d623946Smrg  esac
108018d623946Smrg} # func_stripname_cnf
108028d623946Smrg])# _LT_FUNC_STRIPNAME_CNF
10803ee3138f1Smrg
10804fe24f8a2Smrg
108058d623946Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
108068d623946Smrg# ---------------------------------
108078d623946Smrg# Figure out "hidden" library dependencies from verbose
108088d623946Smrg# compiler output when linking a shared library.
108098d623946Smrg# Parse the compiler output and extract the necessary
108108d623946Smrg# objects, libraries and library flags.
108118d623946Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
108128d623946Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
108138d623946SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
108148d623946Smrg# Dependencies to place before and after the object being linked:
108158d623946Smrg_LT_TAGVAR(predep_objects, $1)=
108168d623946Smrg_LT_TAGVAR(postdep_objects, $1)=
108178d623946Smrg_LT_TAGVAR(predeps, $1)=
108188d623946Smrg_LT_TAGVAR(postdeps, $1)=
108198d623946Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
10820fe24f8a2Smrg
108218d623946Smrgdnl we can't use the lt_simple_compile_test_code here,
108228d623946Smrgdnl because it contains code intended for an executable,
108238d623946Smrgdnl not a library.  It's possible we should let each
108248d623946Smrgdnl tag define a new lt_????_link_test_code variable,
108258d623946Smrgdnl but it's only used here...
108268d623946Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
108278d623946Smrgint a;
108288d623946Smrgvoid foo (void) { a = 0; }
108298d623946Smrg_LT_EOF
108308d623946Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
108318d623946Smrgclass Foo
108328d623946Smrg{
108338d623946Smrgpublic:
108348d623946Smrg  Foo (void) { a = 0; }
108358d623946Smrgprivate:
108368d623946Smrg  int a;
108378d623946Smrg};
108388d623946Smrg_LT_EOF
108398d623946Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
108408d623946Smrg      subroutine foo
108418d623946Smrg      implicit none
108428d623946Smrg      integer*4 a
108438d623946Smrg      a=0
108448d623946Smrg      return
108458d623946Smrg      end
108468d623946Smrg_LT_EOF
108478d623946Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
108488d623946Smrg      subroutine foo
108498d623946Smrg      implicit none
108508d623946Smrg      integer a
108518d623946Smrg      a=0
108528d623946Smrg      return
108538d623946Smrg      end
108548d623946Smrg_LT_EOF
108558d623946Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
108568d623946Smrgpublic class foo {
108578d623946Smrg  private int a;
108588d623946Smrg  public void bar (void) {
108598d623946Smrg    a = 0;
108608d623946Smrg  }
108618d623946Smrg};
108628d623946Smrg_LT_EOF
108638d623946Smrg], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF
108648d623946Smrgpackage foo
108658d623946Smrgfunc foo() {
108668d623946Smrg}
108678d623946Smrg_LT_EOF
108688d623946Smrg])
10869fe24f8a2Smrg
108708d623946Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
108718d623946Smrgcase "$CC $CFLAGS " in #(
108728d623946Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
108738d623946Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
108748d623946Smrg*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;;
108758d623946Smrgesac
10876fe24f8a2Smrg
108778d623946Smrgdnl Parse the compiler output and extract the necessary
108788d623946Smrgdnl objects, libraries and library flags.
108798d623946Smrgif AC_TRY_EVAL(ac_compile); then
108808d623946Smrg  # Parse the compiler output and extract the necessary
108818d623946Smrg  # objects, libraries and library flags.
10882ee3138f1Smrg
108838d623946Smrg  # Sentinel used to keep track of whether or not we are before
108848d623946Smrg  # the conftest object file.
108858d623946Smrg  pre_test_object_deps_done=no
10886ee3138f1Smrg
108878d623946Smrg  for p in `eval "$output_verbose_link_cmd"`; do
108888d623946Smrg    case $prev$p in
10889ee3138f1Smrg
108908d623946Smrg    -L* | -R* | -l*)
108918d623946Smrg       # Some compilers place space between "-{L,R}" and the path.
108928d623946Smrg       # Remove the space.
108938d623946Smrg       if test x-L = "$p" ||
108948d623946Smrg          test x-R = "$p"; then
108958d623946Smrg	 prev=$p
108968d623946Smrg	 continue
108978d623946Smrg       fi
10898ee3138f1Smrg
108998d623946Smrg       # Expand the sysroot to ease extracting the directories later.
109008d623946Smrg       if test -z "$prev"; then
109018d623946Smrg         case $p in
109028d623946Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
109038d623946Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
109048d623946Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
109058d623946Smrg         esac
109068d623946Smrg       fi
109078d623946Smrg       case $p in
109088d623946Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
109098d623946Smrg       esac
109108d623946Smrg       if test no = "$pre_test_object_deps_done"; then
109118d623946Smrg	 case $prev in
109128d623946Smrg	 -L | -R)
109138d623946Smrg	   # Internal compiler library paths should come after those
109148d623946Smrg	   # provided the user.  The postdeps already come after the
109158d623946Smrg	   # user supplied libs so there is no need to process them.
109168d623946Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
109178d623946Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p
109188d623946Smrg	   else
109198d623946Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p"
109208d623946Smrg	   fi
109218d623946Smrg	   ;;
109228d623946Smrg	 # The "-l" case would never come before the object being
109238d623946Smrg	 # linked, so don't bother handling this case.
109248d623946Smrg	 esac
109258d623946Smrg       else
109268d623946Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
109278d623946Smrg	   _LT_TAGVAR(postdeps, $1)=$prev$p
109288d623946Smrg	 else
109298d623946Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p"
109308d623946Smrg	 fi
109318d623946Smrg       fi
109328d623946Smrg       prev=
109338d623946Smrg       ;;
109348d623946Smrg
109358d623946Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
109368d623946Smrg    *.$objext)
109378d623946Smrg       # This assumes that the test object file only shows up
109388d623946Smrg       # once in the compiler output.
109398d623946Smrg       if test "$p" = "conftest.$objext"; then
109408d623946Smrg	 pre_test_object_deps_done=yes
109418d623946Smrg	 continue
109428d623946Smrg       fi
109438d623946Smrg
109448d623946Smrg       if test no = "$pre_test_object_deps_done"; then
109458d623946Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
109468d623946Smrg	   _LT_TAGVAR(predep_objects, $1)=$p
109478d623946Smrg	 else
109488d623946Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
109498d623946Smrg	 fi
109508d623946Smrg       else
109518d623946Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
109528d623946Smrg	   _LT_TAGVAR(postdep_objects, $1)=$p
109538d623946Smrg	 else
109548d623946Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
109558d623946Smrg	 fi
109568d623946Smrg       fi
109578d623946Smrg       ;;
10958ee3138f1Smrg
109598d623946Smrg    *) ;; # Ignore the rest.
10960ee3138f1Smrg
109618d623946Smrg    esac
109628d623946Smrg  done
10963ee3138f1Smrg
109648d623946Smrg  # Clean up.
109658d623946Smrg  rm -f a.out a.exe
109668d623946Smrgelse
109678d623946Smrg  echo "libtool.m4: error: problem compiling $1 test program"
109688d623946Smrgfi
10969ee3138f1Smrg
109708d623946Smrg$RM -f confest.$objext
109718d623946SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
10972fe24f8a2Smrg
109738d623946Smrg# PORTME: override above test on systems where it is broken
109748d623946Smrgm4_if([$1], [CXX],
109758d623946Smrg[case $host_os in
109768d623946Smrginterix[[3-9]]*)
109778d623946Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
109788d623946Smrg  # hack all around it, let's just trust "g++" to DTRT.
109798d623946Smrg  _LT_TAGVAR(predep_objects,$1)=
109808d623946Smrg  _LT_TAGVAR(postdep_objects,$1)=
109818d623946Smrg  _LT_TAGVAR(postdeps,$1)=
109828d623946Smrg  ;;
109838d623946Smrgesac
109848d623946Smrg])
10985fe24f8a2Smrg
109868d623946Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
109878d623946Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
109888d623946Smrgesac
109898d623946Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
109908d623946Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
109918d623946Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'`
109928d623946Smrgfi
109938d623946Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
109948d623946Smrg    [The directories searched by this compiler when creating a shared library])
109958d623946Smrg_LT_TAGDECL([], [predep_objects], [1],
109968d623946Smrg    [Dependencies to place before and after the objects being linked to
109978d623946Smrg    create a shared library])
109988d623946Smrg_LT_TAGDECL([], [postdep_objects], [1])
109998d623946Smrg_LT_TAGDECL([], [predeps], [1])
110008d623946Smrg_LT_TAGDECL([], [postdeps], [1])
110018d623946Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
110028d623946Smrg    [The library search path used internally by the compiler when linking
110038d623946Smrg    a shared library])
110048d623946Smrg])# _LT_SYS_HIDDEN_LIBDEPS
11005fe24f8a2Smrg
11006fe24f8a2Smrg
110078d623946Smrg# _LT_LANG_F77_CONFIG([TAG])
110088d623946Smrg# --------------------------
110098d623946Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
110108d623946Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
110118d623946Smrg# to write the compiler configuration to 'libtool'.
110128d623946Smrgm4_defun([_LT_LANG_F77_CONFIG],
110138d623946Smrg[AC_LANG_PUSH(Fortran 77)
110148d623946Smrgif test -z "$F77" || test no = "$F77"; then
110158d623946Smrg  _lt_disable_F77=yes
110168d623946Smrgfi
11017fe24f8a2Smrg
110188d623946Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
110198d623946Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
110208d623946Smrg_LT_TAGVAR(always_export_symbols, $1)=no
110218d623946Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
110228d623946Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
110238d623946Smrg_LT_TAGVAR(hardcode_direct, $1)=no
110248d623946Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
110258d623946Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
110268d623946Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
110278d623946Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
110288d623946Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
110298d623946Smrg_LT_TAGVAR(inherit_rpath, $1)=no
110308d623946Smrg_LT_TAGVAR(module_cmds, $1)=
110318d623946Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
110328d623946Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
110338d623946Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
110348d623946Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
110358d623946Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
110368d623946Smrg_LT_TAGVAR(no_undefined_flag, $1)=
110378d623946Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
110388d623946Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11039fe24f8a2Smrg
110408d623946Smrg# Source file extension for f77 test sources.
110418d623946Smrgac_ext=f
11042fe24f8a2Smrg
110438d623946Smrg# Object file extension for compiled f77 test sources.
110448d623946Smrgobjext=o
110458d623946Smrg_LT_TAGVAR(objext, $1)=$objext
11046fe24f8a2Smrg
110478d623946Smrg# No sense in running all these tests if we already determined that
110488d623946Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
110498d623946Smrg# are currently assumed to apply to all compilers on this platform,
110508d623946Smrg# and will be corrupted by setting them based on a non-working compiler.
110518d623946Smrgif test yes != "$_lt_disable_F77"; then
110528d623946Smrg  # Code to be used in simple compile tests
110538d623946Smrg  lt_simple_compile_test_code="\
110548d623946Smrg      subroutine t
110558d623946Smrg      return
110568d623946Smrg      end
110578d623946Smrg"
11058ee3138f1Smrg
110598d623946Smrg  # Code to be used in simple link tests
110608d623946Smrg  lt_simple_link_test_code="\
110618d623946Smrg      program t
110628d623946Smrg      end
110638d623946Smrg"
11064fe24f8a2Smrg
110658d623946Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
110668d623946Smrg  _LT_TAG_COMPILER
110673e72ca8cSmrg
110688d623946Smrg  # save warnings/boilerplate of simple test code
110698d623946Smrg  _LT_COMPILER_BOILERPLATE
110708d623946Smrg  _LT_LINKER_BOILERPLATE
11071414bd68fSmrg
110728d623946Smrg  # Allow CC to be a program name with arguments.
110738d623946Smrg  lt_save_CC=$CC
110748d623946Smrg  lt_save_GCC=$GCC
110758d623946Smrg  lt_save_CFLAGS=$CFLAGS
110768d623946Smrg  CC=${F77-"f77"}
110778d623946Smrg  CFLAGS=$FFLAGS
110788d623946Smrg  compiler=$CC
110798d623946Smrg  _LT_TAGVAR(compiler, $1)=$CC
110808d623946Smrg  _LT_CC_BASENAME([$compiler])
110818d623946Smrg  GCC=$G77
110828d623946Smrg  if test -n "$compiler"; then
110838d623946Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
110848d623946Smrg    AC_MSG_RESULT([$can_build_shared])
110853e72ca8cSmrg
110868d623946Smrg    AC_MSG_CHECKING([whether to build shared libraries])
110878d623946Smrg    test no = "$can_build_shared" && enable_shared=no
110883e72ca8cSmrg
110898d623946Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
110908d623946Smrg    # are all built from PIC.
11091fe24f8a2Smrg    case $host_os in
110928d623946Smrg      aix3*)
110938d623946Smrg        test yes = "$enable_shared" && enable_static=no
110948d623946Smrg        if test -n "$RANLIB"; then
110958d623946Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
110968d623946Smrg          postinstall_cmds='$RANLIB $lib'
110978d623946Smrg        fi
110988d623946Smrg        ;;
110998d623946Smrg      aix[[4-9]]*)
111008d623946Smrg	if test ia64 != "$host_cpu"; then
111018d623946Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
111028d623946Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
111038d623946Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
111048d623946Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
111058d623946Smrg	  esac
111068d623946Smrg	fi
111078d623946Smrg        ;;
11108fe24f8a2Smrg    esac
111098d623946Smrg    AC_MSG_RESULT([$enable_shared])
11110414bd68fSmrg
111118d623946Smrg    AC_MSG_CHECKING([whether to build static libraries])
111128d623946Smrg    # Make sure either enable_shared or enable_static is yes.
111138d623946Smrg    test yes = "$enable_shared" || enable_static=yes
111148d623946Smrg    AC_MSG_RESULT([$enable_static])
111153e72ca8cSmrg
111168d623946Smrg    _LT_TAGVAR(GCC, $1)=$G77
111178d623946Smrg    _LT_TAGVAR(LD, $1)=$LD
111183e72ca8cSmrg
111198d623946Smrg    ## CAVEAT EMPTOR:
111208d623946Smrg    ## There is no encapsulation within the following macros, do not change
111218d623946Smrg    ## the running order or otherwise move them around unless you know exactly
111228d623946Smrg    ## what you are doing...
111238d623946Smrg    _LT_COMPILER_PIC($1)
111248d623946Smrg    _LT_COMPILER_C_O($1)
111258d623946Smrg    _LT_COMPILER_FILE_LOCKS($1)
111268d623946Smrg    _LT_LINKER_SHLIBS($1)
111278d623946Smrg    _LT_SYS_DYNAMIC_LINKER($1)
111288d623946Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
111293e72ca8cSmrg
111308d623946Smrg    _LT_CONFIG($1)
111318d623946Smrg  fi # test -n "$compiler"
11132ee3138f1Smrg
111338d623946Smrg  GCC=$lt_save_GCC
111348d623946Smrg  CC=$lt_save_CC
111358d623946Smrg  CFLAGS=$lt_save_CFLAGS
111368d623946Smrgfi # test yes != "$_lt_disable_F77"
11137414bd68fSmrg
111388d623946SmrgAC_LANG_POP
111398d623946Smrg])# _LT_LANG_F77_CONFIG
11140414bd68fSmrg
11141fe24f8a2Smrg
111428d623946Smrg# _LT_LANG_FC_CONFIG([TAG])
111438d623946Smrg# -------------------------
111448d623946Smrg# Ensure that the configuration variables for a Fortran compiler are
111458d623946Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
111468d623946Smrg# to write the compiler configuration to 'libtool'.
111478d623946Smrgm4_defun([_LT_LANG_FC_CONFIG],
111488d623946Smrg[AC_LANG_PUSH(Fortran)
11149fe24f8a2Smrg
111508d623946Smrgif test -z "$FC" || test no = "$FC"; then
111518d623946Smrg  _lt_disable_FC=yes
11152a1ed278cSmrgfi
11153ee3138f1Smrg
111548d623946Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
111558d623946Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
111568d623946Smrg_LT_TAGVAR(always_export_symbols, $1)=no
111578d623946Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
111588d623946Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
111598d623946Smrg_LT_TAGVAR(hardcode_direct, $1)=no
111608d623946Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
111618d623946Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
111628d623946Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
111638d623946Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
111648d623946Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
111658d623946Smrg_LT_TAGVAR(inherit_rpath, $1)=no
111668d623946Smrg_LT_TAGVAR(module_cmds, $1)=
111678d623946Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
111688d623946Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
111698d623946Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
111708d623946Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
111718d623946Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
111728d623946Smrg_LT_TAGVAR(no_undefined_flag, $1)=
111738d623946Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
111748d623946Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
11175414bd68fSmrg
111768d623946Smrg# Source file extension for fc test sources.
111778d623946Smrgac_ext=${ac_fc_srcext-f}
11178414bd68fSmrg
111798d623946Smrg# Object file extension for compiled fc test sources.
111808d623946Smrgobjext=o
111818d623946Smrg_LT_TAGVAR(objext, $1)=$objext
11182414bd68fSmrg
111838d623946Smrg# No sense in running all these tests if we already determined that
111848d623946Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
111858d623946Smrg# are currently assumed to apply to all compilers on this platform,
111868d623946Smrg# and will be corrupted by setting them based on a non-working compiler.
111878d623946Smrgif test yes != "$_lt_disable_FC"; then
111888d623946Smrg  # Code to be used in simple compile tests
111898d623946Smrg  lt_simple_compile_test_code="\
111908d623946Smrg      subroutine t
111918d623946Smrg      return
111928d623946Smrg      end
111938d623946Smrg"
11194a1ed278cSmrg
111958d623946Smrg  # Code to be used in simple link tests
111968d623946Smrg  lt_simple_link_test_code="\
111978d623946Smrg      program t
111988d623946Smrg      end
111998d623946Smrg"
11200ee3138f1Smrg
112018d623946Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
112028d623946Smrg  _LT_TAG_COMPILER
11203fe24f8a2Smrg
112048d623946Smrg  # save warnings/boilerplate of simple test code
112058d623946Smrg  _LT_COMPILER_BOILERPLATE
112068d623946Smrg  _LT_LINKER_BOILERPLATE
112078d623946Smrg
112088d623946Smrg  # Allow CC to be a program name with arguments.
112098d623946Smrg  lt_save_CC=$CC
112108d623946Smrg  lt_save_GCC=$GCC
112118d623946Smrg  lt_save_CFLAGS=$CFLAGS
112128d623946Smrg  CC=${FC-"f95"}
112138d623946Smrg  CFLAGS=$FCFLAGS
112148d623946Smrg  compiler=$CC
112158d623946Smrg  GCC=$ac_cv_fc_compiler_gnu
11216fe24f8a2Smrg
112178d623946Smrg  _LT_TAGVAR(compiler, $1)=$CC
112188d623946Smrg  _LT_CC_BASENAME([$compiler])
11219fe24f8a2Smrg
112208d623946Smrg  if test -n "$compiler"; then
112218d623946Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
112228d623946Smrg    AC_MSG_RESULT([$can_build_shared])
11223414bd68fSmrg
112248d623946Smrg    AC_MSG_CHECKING([whether to build shared libraries])
112258d623946Smrg    test no = "$can_build_shared" && enable_shared=no
11226414bd68fSmrg
112278d623946Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
112288d623946Smrg    # are all built from PIC.
112298d623946Smrg    case $host_os in
112308d623946Smrg      aix3*)
112318d623946Smrg        test yes = "$enable_shared" && enable_static=no
112328d623946Smrg        if test -n "$RANLIB"; then
112338d623946Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
112348d623946Smrg          postinstall_cmds='$RANLIB $lib'
112358d623946Smrg        fi
112368d623946Smrg        ;;
112378d623946Smrg      aix[[4-9]]*)
112388d623946Smrg	if test ia64 != "$host_cpu"; then
112398d623946Smrg	  case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in
112408d623946Smrg	  yes,aix,yes) ;;		# shared object as lib.so file only
112418d623946Smrg	  yes,svr4,*) ;;		# shared object as lib.so archive member only
112428d623946Smrg	  yes,*) enable_static=no ;;	# shared object in lib.a archive as well
112438d623946Smrg	  esac
112448d623946Smrg	fi
112458d623946Smrg        ;;
112468d623946Smrg    esac
112478d623946Smrg    AC_MSG_RESULT([$enable_shared])
11248414bd68fSmrg
112498d623946Smrg    AC_MSG_CHECKING([whether to build static libraries])
112508d623946Smrg    # Make sure either enable_shared or enable_static is yes.
112518d623946Smrg    test yes = "$enable_shared" || enable_static=yes
112528d623946Smrg    AC_MSG_RESULT([$enable_static])
11253414bd68fSmrg
112548d623946Smrg    _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu
112558d623946Smrg    _LT_TAGVAR(LD, $1)=$LD
11256fe24f8a2Smrg
112578d623946Smrg    ## CAVEAT EMPTOR:
112588d623946Smrg    ## There is no encapsulation within the following macros, do not change
112598d623946Smrg    ## the running order or otherwise move them around unless you know exactly
112608d623946Smrg    ## what you are doing...
112618d623946Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
112628d623946Smrg    _LT_COMPILER_PIC($1)
112638d623946Smrg    _LT_COMPILER_C_O($1)
112648d623946Smrg    _LT_COMPILER_FILE_LOCKS($1)
112658d623946Smrg    _LT_LINKER_SHLIBS($1)
112668d623946Smrg    _LT_SYS_DYNAMIC_LINKER($1)
112678d623946Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
11268ee3138f1Smrg
112698d623946Smrg    _LT_CONFIG($1)
112708d623946Smrg  fi # test -n "$compiler"
11271ee3138f1Smrg
112728d623946Smrg  GCC=$lt_save_GCC
112738d623946Smrg  CC=$lt_save_CC
112748d623946Smrg  CFLAGS=$lt_save_CFLAGS
112758d623946Smrgfi # test yes != "$_lt_disable_FC"
11276414bd68fSmrg
112778d623946SmrgAC_LANG_POP
112788d623946Smrg])# _LT_LANG_FC_CONFIG
11279414bd68fSmrg
11280ee3138f1Smrg
112818d623946Smrg# _LT_LANG_GCJ_CONFIG([TAG])
112828d623946Smrg# --------------------------
112838d623946Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
112848d623946Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
112858d623946Smrg# to write the compiler configuration to 'libtool'.
112868d623946Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
112878d623946Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
112888d623946SmrgAC_LANG_SAVE
11289ee3138f1Smrg
112908d623946Smrg# Source file extension for Java test sources.
112918d623946Smrgac_ext=java
11292414bd68fSmrg
112938d623946Smrg# Object file extension for compiled Java test sources.
112948d623946Smrgobjext=o
112958d623946Smrg_LT_TAGVAR(objext, $1)=$objext
11296414bd68fSmrg
112978d623946Smrg# Code to be used in simple compile tests
112988d623946Smrglt_simple_compile_test_code="class foo {}"
11299414bd68fSmrg
113008d623946Smrg# Code to be used in simple link tests
113018d623946Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
11302414bd68fSmrg
113038d623946Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
113048d623946Smrg_LT_TAG_COMPILER
113053e72ca8cSmrg
113068d623946Smrg# save warnings/boilerplate of simple test code
113078d623946Smrg_LT_COMPILER_BOILERPLATE
113088d623946Smrg_LT_LINKER_BOILERPLATE
11309ee3138f1Smrg
113108d623946Smrg# Allow CC to be a program name with arguments.
113118d623946Smrglt_save_CC=$CC
113128d623946Smrglt_save_CFLAGS=$CFLAGS
113138d623946Smrglt_save_GCC=$GCC
113148d623946SmrgGCC=yes
113158d623946SmrgCC=${GCJ-"gcj"}
113168d623946SmrgCFLAGS=$GCJFLAGS
113178d623946Smrgcompiler=$CC
113188d623946Smrg_LT_TAGVAR(compiler, $1)=$CC
113198d623946Smrg_LT_TAGVAR(LD, $1)=$LD
113208d623946Smrg_LT_CC_BASENAME([$compiler])
11321414bd68fSmrg
113228d623946Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
113238d623946Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11324414bd68fSmrg
113258d623946Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
113268d623946Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
113278d623946Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
113288d623946Smrg
113298d623946Smrgif test -n "$compiler"; then
113308d623946Smrg  _LT_COMPILER_NO_RTTI($1)
113318d623946Smrg  _LT_COMPILER_PIC($1)
113328d623946Smrg  _LT_COMPILER_C_O($1)
113338d623946Smrg  _LT_COMPILER_FILE_LOCKS($1)
113348d623946Smrg  _LT_LINKER_SHLIBS($1)
113358d623946Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
113368d623946Smrg
113378d623946Smrg  _LT_CONFIG($1)
11338414bd68fSmrgfi
11339414bd68fSmrg
113408d623946SmrgAC_LANG_RESTORE
11341fe24f8a2Smrg
113428d623946SmrgGCC=$lt_save_GCC
113438d623946SmrgCC=$lt_save_CC
113448d623946SmrgCFLAGS=$lt_save_CFLAGS
113458d623946Smrg])# _LT_LANG_GCJ_CONFIG
11346ee3138f1Smrg
11347414bd68fSmrg
113488d623946Smrg# _LT_LANG_GO_CONFIG([TAG])
113498d623946Smrg# --------------------------
113508d623946Smrg# Ensure that the configuration variables for the GNU Go compiler
113518d623946Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
113528d623946Smrg# to write the compiler configuration to 'libtool'.
113538d623946Smrgm4_defun([_LT_LANG_GO_CONFIG],
113548d623946Smrg[AC_REQUIRE([LT_PROG_GO])dnl
113558d623946SmrgAC_LANG_SAVE
11356414bd68fSmrg
113578d623946Smrg# Source file extension for Go test sources.
113588d623946Smrgac_ext=go
113593e72ca8cSmrg
113608d623946Smrg# Object file extension for compiled Go test sources.
113618d623946Smrgobjext=o
113628d623946Smrg_LT_TAGVAR(objext, $1)=$objext
11363414bd68fSmrg
113648d623946Smrg# Code to be used in simple compile tests
113658d623946Smrglt_simple_compile_test_code="package main; func main() { }"
113668d623946Smrg
113678d623946Smrg# Code to be used in simple link tests
113688d623946Smrglt_simple_link_test_code='package main; func main() { }'
113698d623946Smrg
113708d623946Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
113718d623946Smrg_LT_TAG_COMPILER
113728d623946Smrg
113738d623946Smrg# save warnings/boilerplate of simple test code
113748d623946Smrg_LT_COMPILER_BOILERPLATE
113758d623946Smrg_LT_LINKER_BOILERPLATE
113768d623946Smrg
113778d623946Smrg# Allow CC to be a program name with arguments.
113788d623946Smrglt_save_CC=$CC
113798d623946Smrglt_save_CFLAGS=$CFLAGS
113808d623946Smrglt_save_GCC=$GCC
113818d623946SmrgGCC=yes
113828d623946SmrgCC=${GOC-"gccgo"}
113838d623946SmrgCFLAGS=$GOFLAGS
113848d623946Smrgcompiler=$CC
113858d623946Smrg_LT_TAGVAR(compiler, $1)=$CC
113868d623946Smrg_LT_TAGVAR(LD, $1)=$LD
113878d623946Smrg_LT_CC_BASENAME([$compiler])
11388414bd68fSmrg
113898d623946Smrg# Go did not exist at the time GCC didn't implicitly link libc in.
113908d623946Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
11391414bd68fSmrg
113928d623946Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
113938d623946Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
113948d623946Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
113958d623946Smrg
113968d623946Smrgif test -n "$compiler"; then
113978d623946Smrg  _LT_COMPILER_NO_RTTI($1)
113988d623946Smrg  _LT_COMPILER_PIC($1)
113998d623946Smrg  _LT_COMPILER_C_O($1)
114008d623946Smrg  _LT_COMPILER_FILE_LOCKS($1)
114018d623946Smrg  _LT_LINKER_SHLIBS($1)
114028d623946Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
114038d623946Smrg
114048d623946Smrg  _LT_CONFIG($1)
11405fe24f8a2Smrgfi
11406414bd68fSmrg
114078d623946SmrgAC_LANG_RESTORE
11408414bd68fSmrg
114098d623946SmrgGCC=$lt_save_GCC
114108d623946SmrgCC=$lt_save_CC
114118d623946SmrgCFLAGS=$lt_save_CFLAGS
114128d623946Smrg])# _LT_LANG_GO_CONFIG
11413414bd68fSmrg
11414414bd68fSmrg
114158d623946Smrg# _LT_LANG_RC_CONFIG([TAG])
114168d623946Smrg# -------------------------
114178d623946Smrg# Ensure that the configuration variables for the Windows resource compiler
114188d623946Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
114198d623946Smrg# to write the compiler configuration to 'libtool'.
114208d623946Smrgm4_defun([_LT_LANG_RC_CONFIG],
114218d623946Smrg[AC_REQUIRE([LT_PROG_RC])dnl
114228d623946SmrgAC_LANG_SAVE
114233e72ca8cSmrg
114248d623946Smrg# Source file extension for RC test sources.
114258d623946Smrgac_ext=rc
114268d623946Smrg
114278d623946Smrg# Object file extension for compiled RC test sources.
114288d623946Smrgobjext=o
114298d623946Smrg_LT_TAGVAR(objext, $1)=$objext
114308d623946Smrg
114318d623946Smrg# Code to be used in simple compile tests
114328d623946Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
114338d623946Smrg
114348d623946Smrg# Code to be used in simple link tests
114358d623946Smrglt_simple_link_test_code=$lt_simple_compile_test_code
114368d623946Smrg
114378d623946Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
114388d623946Smrg_LT_TAG_COMPILER
114398d623946Smrg
114408d623946Smrg# save warnings/boilerplate of simple test code
114418d623946Smrg_LT_COMPILER_BOILERPLATE
114428d623946Smrg_LT_LINKER_BOILERPLATE
114438d623946Smrg
114448d623946Smrg# Allow CC to be a program name with arguments.
114458d623946Smrglt_save_CC=$CC
114468d623946Smrglt_save_CFLAGS=$CFLAGS
114478d623946Smrglt_save_GCC=$GCC
114488d623946SmrgGCC=
114498d623946SmrgCC=${RC-"windres"}
114508d623946SmrgCFLAGS=
114518d623946Smrgcompiler=$CC
114528d623946Smrg_LT_TAGVAR(compiler, $1)=$CC
114538d623946Smrg_LT_CC_BASENAME([$compiler])
114548d623946Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
114558d623946Smrg
114568d623946Smrgif test -n "$compiler"; then
114578d623946Smrg  :
114588d623946Smrg  _LT_CONFIG($1)
11459fe24f8a2Smrgfi
11460414bd68fSmrg
114618d623946SmrgGCC=$lt_save_GCC
114628d623946SmrgAC_LANG_RESTORE
114638d623946SmrgCC=$lt_save_CC
114648d623946SmrgCFLAGS=$lt_save_CFLAGS
114658d623946Smrg])# _LT_LANG_RC_CONFIG
114668d623946Smrg
114678d623946Smrg
114688d623946Smrg# LT_PROG_GCJ
114698d623946Smrg# -----------
114708d623946SmrgAC_DEFUN([LT_PROG_GCJ],
114718d623946Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
114728d623946Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
114738d623946Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
114748d623946Smrg      test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2"
114758d623946Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
114768d623946Smrg])
114778d623946Smrg
114788d623946Smrg# Old name:
114798d623946SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
114808d623946Smrgdnl aclocal-1.4 backwards compatibility:
114818d623946Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
114828d623946Smrg
114838d623946Smrg
114848d623946Smrg# LT_PROG_GO
114858d623946Smrg# ----------
114868d623946SmrgAC_DEFUN([LT_PROG_GO],
114878d623946Smrg[AC_CHECK_TOOL(GOC, gccgo,)
114888d623946Smrg])
114898d623946Smrg
114908d623946Smrg
114918d623946Smrg# LT_PROG_RC
114928d623946Smrg# ----------
114938d623946SmrgAC_DEFUN([LT_PROG_RC],
114948d623946Smrg[AC_CHECK_TOOL(RC, windres,)
114958d623946Smrg])
11496414bd68fSmrg
114978d623946Smrg# Old name:
114988d623946SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
114998d623946Smrgdnl aclocal-1.4 backwards compatibility:
115008d623946Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
11501414bd68fSmrg
115023e72ca8cSmrg
115038d623946Smrg# _LT_DECL_EGREP
115048d623946Smrg# --------------
115058d623946Smrg# If we don't have a new enough Autoconf to choose the best grep
115068d623946Smrg# available, choose the one first in the user's PATH.
115078d623946Smrgm4_defun([_LT_DECL_EGREP],
115088d623946Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
115098d623946SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
115108d623946Smrgtest -z "$GREP" && GREP=grep
115118d623946Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
115128d623946Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
115138d623946Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
115148d623946Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
115158d623946SmrgAC_SUBST([GREP])
115168d623946Smrg])
115173e72ca8cSmrg
115183e72ca8cSmrg
115198d623946Smrg# _LT_DECL_OBJDUMP
115208d623946Smrg# --------------
115218d623946Smrg# If we don't have a new enough Autoconf to choose the best objdump
115228d623946Smrg# available, choose the one first in the user's PATH.
115238d623946Smrgm4_defun([_LT_DECL_OBJDUMP],
115248d623946Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
115258d623946Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
115268d623946Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
115278d623946SmrgAC_SUBST([OBJDUMP])
115288d623946Smrg])
115293e72ca8cSmrg
115308d623946Smrg# _LT_DECL_DLLTOOL
11531fe24f8a2Smrg# ----------------
115328d623946Smrg# Ensure DLLTOOL variable is set.
115338d623946Smrgm4_defun([_LT_DECL_DLLTOOL],
115348d623946Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
115358d623946Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
115368d623946Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
115378d623946SmrgAC_SUBST([DLLTOOL])
115388d623946Smrg])
11539fe24f8a2Smrg
115408d623946Smrg# _LT_DECL_FILECMD
115418d623946Smrg# ----------------
115428d623946Smrg# Check for a file(cmd) program that can be used to detect file type and magic
115438d623946Smrgm4_defun([_LT_DECL_FILECMD],
115448d623946Smrg[AC_CHECK_TOOL([FILECMD], [file], [:])
115458d623946Smrg_LT_DECL([], [FILECMD], [1], [A file(cmd) program that detects file types])
115468d623946Smrg])# _LD_DECL_FILECMD
115478d623946Smrg
115488d623946Smrg# _LT_DECL_SED
115498d623946Smrg# ------------
115508d623946Smrg# Check for a fully-functional sed program, that truncates
115518d623946Smrg# as few characters as possible.  Prefer GNU sed if found.
115528d623946Smrgm4_defun([_LT_DECL_SED],
115538d623946Smrg[AC_PROG_SED
115548d623946Smrgtest -z "$SED" && SED=sed
115558d623946SmrgXsed="$SED -e 1s/^X//"
115568d623946Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
115578d623946Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
115588d623946Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
115598d623946Smrg])# _LT_DECL_SED
115608d623946Smrg
115618d623946Smrgm4_ifndef([AC_PROG_SED], [
115628d623946Smrg# NOTE: This macro has been submitted for inclusion into   #
115638d623946Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
115648d623946Smrg#  a released version of Autoconf we should remove this    #
115658d623946Smrg#  macro and use it instead.                               #
115668d623946Smrg
115678d623946Smrgm4_defun([AC_PROG_SED],
115688d623946Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
115698d623946SmrgAC_CACHE_VAL(lt_cv_path_SED,
115708d623946Smrg[# Loop through the user's path and test for sed and gsed.
115718d623946Smrg# Then use that list of sed's as ones to test for truncation.
115728d623946Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
115738d623946Smrgfor as_dir in $PATH
115748d623946Smrgdo
115758d623946Smrg  IFS=$as_save_IFS
115768d623946Smrg  test -z "$as_dir" && as_dir=.
115778d623946Smrg  for lt_ac_prog in sed gsed; do
115788d623946Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
115798d623946Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
115808d623946Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
115818d623946Smrg      fi
115828d623946Smrg    done
115838d623946Smrg  done
115848d623946Smrgdone
115858d623946SmrgIFS=$as_save_IFS
115868d623946Smrglt_ac_max=0
115878d623946Smrglt_ac_count=0
115888d623946Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
115898d623946Smrg# along with /bin/sed that truncates output.
115908d623946Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
115918d623946Smrg  test ! -f "$lt_ac_sed" && continue
115928d623946Smrg  cat /dev/null > conftest.in
115938d623946Smrg  lt_ac_count=0
115948d623946Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
115958d623946Smrg  # Check for GNU sed and select it if it is found.
115968d623946Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
115978d623946Smrg    lt_cv_path_SED=$lt_ac_sed
115988d623946Smrg    break
115998d623946Smrg  fi
116008d623946Smrg  while true; do
116018d623946Smrg    cat conftest.in conftest.in >conftest.tmp
116028d623946Smrg    mv conftest.tmp conftest.in
116038d623946Smrg    cp conftest.in conftest.nl
116048d623946Smrg    echo >>conftest.nl
116058d623946Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
116068d623946Smrg    cmp -s conftest.out conftest.nl || break
116078d623946Smrg    # 10000 chars as input seems more than enough
116088d623946Smrg    test 10 -lt "$lt_ac_count" && break
116098d623946Smrg    lt_ac_count=`expr $lt_ac_count + 1`
116108d623946Smrg    if test "$lt_ac_count" -gt "$lt_ac_max"; then
116118d623946Smrg      lt_ac_max=$lt_ac_count
116128d623946Smrg      lt_cv_path_SED=$lt_ac_sed
116138d623946Smrg    fi
116148d623946Smrg  done
116158d623946Smrgdone
116168d623946Smrg])
116178d623946SmrgSED=$lt_cv_path_SED
116188d623946SmrgAC_SUBST([SED])
116198d623946SmrgAC_MSG_RESULT([$SED])
116208d623946Smrg])#AC_PROG_SED
116218d623946Smrg])#m4_ifndef
116228d623946Smrg
116238d623946Smrg# Old name:
116248d623946SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
116258d623946Smrgdnl aclocal-1.4 backwards compatibility:
116268d623946Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
116278d623946Smrg
116288d623946Smrg
116298d623946Smrg# _LT_CHECK_SHELL_FEATURES
116308d623946Smrg# ------------------------
116318d623946Smrg# Find out whether the shell is Bourne or XSI compatible,
116328d623946Smrg# or has some other useful features.
116338d623946Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
116348d623946Smrg[if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
116358d623946Smrg  lt_unset=unset
11636fe24f8a2Smrgelse
116378d623946Smrg  lt_unset=false
11638fe24f8a2Smrgfi
116398d623946Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
11640414bd68fSmrg
116418d623946Smrg# test EBCDIC or ASCII
116428d623946Smrgcase `echo X|tr X '\101'` in
116438d623946Smrg A) # ASCII based system
116448d623946Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
116458d623946Smrg  lt_SP2NL='tr \040 \012'
116468d623946Smrg  lt_NL2SP='tr \015\012 \040\040'
116478d623946Smrg  ;;
116488d623946Smrg *) # EBCDIC based system
116498d623946Smrg  lt_SP2NL='tr \100 \n'
116508d623946Smrg  lt_NL2SP='tr \r\n \100\100'
116518d623946Smrg  ;;
116528d623946Smrgesac
116538d623946Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
116548d623946Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
116558d623946Smrg])# _LT_CHECK_SHELL_FEATURES
11656414bd68fSmrg
11657414bd68fSmrg
116588d623946Smrg# _LT_PATH_CONVERSION_FUNCTIONS
116598d623946Smrg# -----------------------------
116608d623946Smrg# Determine what file name conversion functions should be used by
116618d623946Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
116628d623946Smrg# for certain cross-compile configurations and native mingw.
116638d623946Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
116648d623946Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
116658d623946SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
116668d623946SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
116678d623946SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
116688d623946Smrg[case $host in
116698d623946Smrg  *-*-mingw* )
116708d623946Smrg    case $build in
116718d623946Smrg      *-*-mingw* ) # actually msys
116728d623946Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
116738d623946Smrg        ;;
116748d623946Smrg      *-*-cygwin* )
116758d623946Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
116768d623946Smrg        ;;
116778d623946Smrg      * ) # otherwise, assume *nix
116788d623946Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
116798d623946Smrg        ;;
116808d623946Smrg    esac
116818d623946Smrg    ;;
116828d623946Smrg  *-*-cygwin* )
116838d623946Smrg    case $build in
116848d623946Smrg      *-*-mingw* ) # actually msys
116858d623946Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
116868d623946Smrg        ;;
116878d623946Smrg      *-*-cygwin* )
116888d623946Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
116898d623946Smrg        ;;
116908d623946Smrg      * ) # otherwise, assume *nix
116918d623946Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
116928d623946Smrg        ;;
116938d623946Smrg    esac
116948d623946Smrg    ;;
116958d623946Smrg  * ) # unhandled hosts (and "normal" native builds)
116968d623946Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
116978d623946Smrg    ;;
116988d623946Smrgesac
116998d623946Smrg])
117008d623946Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
117018d623946SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
117028d623946Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
117038d623946Smrg         [0], [convert $build file names to $host format])dnl
117043e72ca8cSmrg
117058d623946SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
117068d623946SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
117078d623946Smrg[#assume ordinary cross tools, or native build.
117088d623946Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
117098d623946Smrgcase $host in
117108d623946Smrg  *-*-mingw* )
117118d623946Smrg    case $build in
117128d623946Smrg      *-*-mingw* ) # actually msys
117138d623946Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
117148d623946Smrg        ;;
117158d623946Smrg    esac
117168d623946Smrg    ;;
117178d623946Smrgesac
117188d623946Smrg])
117198d623946Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
117208d623946SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
117218d623946Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
117228d623946Smrg         [0], [convert $build files to toolchain format])dnl
117238d623946Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
117243e72ca8cSmrg
117258d623946Smrg# Helper functions for option handling.                    -*- Autoconf -*-
11726fe24f8a2Smrg#
117278d623946Smrg#   Copyright (C) 2004-2005, 2007-2009, 2011-2019, 2021-2022 Free
117288d623946Smrg#   Software Foundation, Inc.
117298d623946Smrg#   Written by Gary V. Vaughan, 2004
11730fe24f8a2Smrg#
117318d623946Smrg# This file is free software; the Free Software Foundation gives
117328d623946Smrg# unlimited permission to copy and/or distribute it, with or without
117338d623946Smrg# modifications, as long as this notice is preserved.
117343e72ca8cSmrg
117358d623946Smrg# serial 8 ltoptions.m4
11736414bd68fSmrg
117378d623946Smrg# This is to help aclocal find these macros, as it can't see m4_define.
117388d623946SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
11739ee3138f1Smrg
11740ee3138f1Smrg
117418d623946Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
117428d623946Smrg# ------------------------------------------
117438d623946Smrgm4_define([_LT_MANGLE_OPTION],
117448d623946Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
11745ee3138f1Smrg
11746ee3138f1Smrg
117478d623946Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
117488d623946Smrg# ---------------------------------------
117498d623946Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
117508d623946Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
117518d623946Smrg# saved as a flag.
117528d623946Smrgm4_define([_LT_SET_OPTION],
117538d623946Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
117548d623946Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
117558d623946Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
117568d623946Smrg    [m4_warning([Unknown $1 option '$2'])])[]dnl
117578d623946Smrg])
11758ee3138f1Smrg
11759ee3138f1Smrg
117608d623946Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
117618d623946Smrg# ------------------------------------------------------------
117628d623946Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
117638d623946Smrgm4_define([_LT_IF_OPTION],
117648d623946Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
117658d623946Smrg
117668d623946Smrg
117678d623946Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
117688d623946Smrg# -------------------------------------------------------
117698d623946Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
117708d623946Smrg# are set.
117718d623946Smrgm4_define([_LT_UNLESS_OPTIONS],
117728d623946Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
117738d623946Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
117748d623946Smrg		      [m4_define([$0_found])])])[]dnl
117758d623946Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
117768d623946Smrg])[]dnl
117778d623946Smrg])
117788d623946Smrg
117798d623946Smrg
117808d623946Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
117818d623946Smrg# ----------------------------------------
117828d623946Smrg# OPTION-LIST is a space-separated list of Libtool options associated
117838d623946Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
117848d623946Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
117858d623946Smrg# the unknown option and exit.
117868d623946Smrgm4_defun([_LT_SET_OPTIONS],
117878d623946Smrg[# Set options
117888d623946Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
117898d623946Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
117908d623946Smrg
117918d623946Smrgm4_if([$1],[LT_INIT],[
117928d623946Smrg  dnl
117938d623946Smrg  dnl Simply set some default values (i.e off) if boolean options were not
117948d623946Smrg  dnl specified:
117958d623946Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
117968d623946Smrg  ])
117978d623946Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
117988d623946Smrg  ])
117998d623946Smrg  dnl
118008d623946Smrg  dnl If no reference was made to various pairs of opposing options, then
118018d623946Smrg  dnl we run the default mode handler for the pair.  For example, if neither
118028d623946Smrg  dnl 'shared' nor 'disable-shared' was passed, we enable building of shared
118038d623946Smrg  dnl archives by default:
118048d623946Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
118058d623946Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
118068d623946Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
118078d623946Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
118088d623946Smrg		   [_LT_ENABLE_FAST_INSTALL])
118098d623946Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4],
118108d623946Smrg		   [_LT_WITH_AIX_SONAME([aix])])
118118d623946Smrg  ])
118128d623946Smrg])# _LT_SET_OPTIONS
118138d623946Smrg
118148d623946Smrg
118158d623946Smrg
118168d623946Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
118178d623946Smrg# -----------------------------------------
118188d623946Smrgm4_define([_LT_MANGLE_DEFUN],
118198d623946Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
118208d623946Smrg
118218d623946Smrg
118228d623946Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
118238d623946Smrg# -----------------------------------------------
118248d623946Smrgm4_define([LT_OPTION_DEFINE],
118258d623946Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
118268d623946Smrg])# LT_OPTION_DEFINE
118278d623946Smrg
118288d623946Smrg
118298d623946Smrg# dlopen
118308d623946Smrg# ------
118318d623946SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
118328d623946Smrg])
118338d623946Smrg
118348d623946SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
118358d623946Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
118368d623946SmrgAC_DIAGNOSE([obsolete],
118378d623946Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
118388d623946Smrgput the 'dlopen' option into LT_INIT's first parameter.])
118398d623946Smrg])
11840ee3138f1Smrg
118418d623946Smrgdnl aclocal-1.4 backwards compatibility:
118428d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
1184334977a2fSmrg
118448d623946Smrg
118458d623946Smrg# win32-dll
118468d623946Smrg# ---------
118478d623946Smrg# Declare package support for building win32 dll's.
118488d623946SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
118498d623946Smrg[enable_win32_dll=yes
118508d623946Smrg
118518d623946Smrgcase $host in
118528d623946Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
118538d623946Smrg  AC_CHECK_TOOL(AS, as, false)
118548d623946Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
118558d623946Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
118568d623946Smrg  ;;
11857fe24f8a2Smrgesac
11858414bd68fSmrg
118598d623946Smrgtest -z "$AS" && AS=as
118608d623946Smrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
11861ee3138f1Smrg
118628d623946Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
118638d623946Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
11864b425557eSmrg
118658d623946Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
118668d623946Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
118678d623946Smrg])# win32-dll
118683e72ca8cSmrg
118698d623946SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
118708d623946Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
118718d623946Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
118728d623946SmrgAC_DIAGNOSE([obsolete],
118738d623946Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
118748d623946Smrgput the 'win32-dll' option into LT_INIT's first parameter.])
118758d623946Smrg])
118763e72ca8cSmrg
118778d623946Smrgdnl aclocal-1.4 backwards compatibility:
118788d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
118793e72ca8cSmrg
11880fe24f8a2Smrg
118818d623946Smrg# _LT_ENABLE_SHARED([DEFAULT])
118828d623946Smrg# ----------------------------
118838d623946Smrg# implement the --enable-shared flag, and supports the 'shared' and
118848d623946Smrg# 'disable-shared' LT_INIT options.
118858d623946Smrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
118868d623946Smrgm4_define([_LT_ENABLE_SHARED],
118878d623946Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
118888d623946SmrgAC_ARG_ENABLE([shared],
118898d623946Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
118908d623946Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
118918d623946Smrg    [p=${PACKAGE-default}
118928d623946Smrg    case $enableval in
118938d623946Smrg    yes) enable_shared=yes ;;
118948d623946Smrg    no) enable_shared=no ;;
118958d623946Smrg    *)
118968d623946Smrg      enable_shared=no
118978d623946Smrg      # Look at the argument we got.  We use all the common list separators.
118988d623946Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
118998d623946Smrg      for pkg in $enableval; do
119008d623946Smrg	IFS=$lt_save_ifs
119018d623946Smrg	if test "X$pkg" = "X$p"; then
119028d623946Smrg	  enable_shared=yes
119038d623946Smrg	fi
119048d623946Smrg      done
119058d623946Smrg      IFS=$lt_save_ifs
119068d623946Smrg      ;;
119078d623946Smrg    esac],
119088d623946Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
119093e72ca8cSmrg
119108d623946Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
119118d623946Smrg	[Whether or not to build shared libraries])
119128d623946Smrg])# _LT_ENABLE_SHARED
119133e72ca8cSmrg
119148d623946SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
119158d623946SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
119168d623946Smrg
119178d623946Smrg# Old names:
119188d623946SmrgAC_DEFUN([AC_ENABLE_SHARED],
119198d623946Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
119208d623946Smrg])
119218d623946Smrg
119228d623946SmrgAC_DEFUN([AC_DISABLE_SHARED],
119238d623946Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
119248d623946Smrg])
119258d623946Smrg
119268d623946SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
119278d623946SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
119288d623946Smrg
119298d623946Smrgdnl aclocal-1.4 backwards compatibility:
119308d623946Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
119318d623946Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
119328d623946Smrg
119338d623946Smrg
119348d623946Smrg
119358d623946Smrg# _LT_ENABLE_STATIC([DEFAULT])
119368d623946Smrg# ----------------------------
119378d623946Smrg# implement the --enable-static flag, and support the 'static' and
119388d623946Smrg# 'disable-static' LT_INIT options.
119398d623946Smrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
119408d623946Smrgm4_define([_LT_ENABLE_STATIC],
119418d623946Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
119428d623946SmrgAC_ARG_ENABLE([static],
119438d623946Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
119448d623946Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
119458d623946Smrg    [p=${PACKAGE-default}
119468d623946Smrg    case $enableval in
119478d623946Smrg    yes) enable_static=yes ;;
119488d623946Smrg    no) enable_static=no ;;
119498d623946Smrg    *)
119508d623946Smrg     enable_static=no
119518d623946Smrg      # Look at the argument we got.  We use all the common list separators.
119528d623946Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
119538d623946Smrg      for pkg in $enableval; do
119548d623946Smrg	IFS=$lt_save_ifs
119558d623946Smrg	if test "X$pkg" = "X$p"; then
119568d623946Smrg	  enable_static=yes
119578d623946Smrg	fi
119588d623946Smrg      done
119598d623946Smrg      IFS=$lt_save_ifs
119608d623946Smrg      ;;
119618d623946Smrg    esac],
119628d623946Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
119638d623946Smrg
119648d623946Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
119658d623946Smrg	[Whether or not to build static libraries])
119668d623946Smrg])# _LT_ENABLE_STATIC
119678d623946Smrg
119688d623946SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
119698d623946SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
119708d623946Smrg
119718d623946Smrg# Old names:
119728d623946SmrgAC_DEFUN([AC_ENABLE_STATIC],
119738d623946Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
119748d623946Smrg])
11975fe24f8a2Smrg
119768d623946SmrgAC_DEFUN([AC_DISABLE_STATIC],
119778d623946Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
119788d623946Smrg])
119793e72ca8cSmrg
119808d623946SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
119818d623946SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
119823e72ca8cSmrg
119838d623946Smrgdnl aclocal-1.4 backwards compatibility:
119848d623946Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
119858d623946Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
119863e72ca8cSmrg
119873e72ca8cSmrg
119883e72ca8cSmrg
119898d623946Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
119908d623946Smrg# ----------------------------------
119918d623946Smrg# implement the --enable-fast-install flag, and support the 'fast-install'
119928d623946Smrg# and 'disable-fast-install' LT_INIT options.
119938d623946Smrg# DEFAULT is either 'yes' or 'no'.  If omitted, it defaults to 'yes'.
119948d623946Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
119958d623946Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
119968d623946SmrgAC_ARG_ENABLE([fast-install],
119978d623946Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
119988d623946Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
119998d623946Smrg    [p=${PACKAGE-default}
120008d623946Smrg    case $enableval in
120018d623946Smrg    yes) enable_fast_install=yes ;;
120028d623946Smrg    no) enable_fast_install=no ;;
120038d623946Smrg    *)
120048d623946Smrg      enable_fast_install=no
120058d623946Smrg      # Look at the argument we got.  We use all the common list separators.
120068d623946Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
120078d623946Smrg      for pkg in $enableval; do
120088d623946Smrg	IFS=$lt_save_ifs
120098d623946Smrg	if test "X$pkg" = "X$p"; then
120108d623946Smrg	  enable_fast_install=yes
120118d623946Smrg	fi
120128d623946Smrg      done
120138d623946Smrg      IFS=$lt_save_ifs
120148d623946Smrg      ;;
120158d623946Smrg    esac],
120168d623946Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
12017fe24f8a2Smrg
120188d623946Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
120198d623946Smrg	 [Whether or not to optimize for fast installation])dnl
120208d623946Smrg])# _LT_ENABLE_FAST_INSTALL
12021414bd68fSmrg
120228d623946SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
120238d623946SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
12024414bd68fSmrg
120258d623946Smrg# Old names:
120268d623946SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
120278d623946Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
120288d623946SmrgAC_DIAGNOSE([obsolete],
120298d623946Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
120308d623946Smrgthe 'fast-install' option into LT_INIT's first parameter.])
120318d623946Smrg])
120323e72ca8cSmrg
120338d623946SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
120348d623946Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
120358d623946SmrgAC_DIAGNOSE([obsolete],
120368d623946Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
120378d623946Smrgthe 'disable-fast-install' option into LT_INIT's first parameter.])
120388d623946Smrg])
120393e72ca8cSmrg
120408d623946Smrgdnl aclocal-1.4 backwards compatibility:
120418d623946Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
120428d623946Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
120433e72ca8cSmrg
120443e72ca8cSmrg
120458d623946Smrg# _LT_WITH_AIX_SONAME([DEFAULT])
120468d623946Smrg# ----------------------------------
120478d623946Smrg# implement the --with-aix-soname flag, and support the `aix-soname=aix'
120488d623946Smrg# and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT
120498d623946Smrg# is either `aix', `both' or `svr4'.  If omitted, it defaults to `aix'.
120508d623946Smrgm4_define([_LT_WITH_AIX_SONAME],
120518d623946Smrg[m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl
120528d623946Smrgshared_archive_member_spec=
120538d623946Smrgcase $host,$enable_shared in
120548d623946Smrgpower*-*-aix[[5-9]]*,yes)
120558d623946Smrg  AC_MSG_CHECKING([which variant of shared library versioning to provide])
120568d623946Smrg  AC_ARG_WITH([aix-soname],
120578d623946Smrg    [AS_HELP_STRING([--with-aix-soname=aix|svr4|both],
120588d623946Smrg      [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])],
120598d623946Smrg    [case $withval in
120608d623946Smrg    aix|svr4|both)
120618d623946Smrg      ;;
120628d623946Smrg    *)
120638d623946Smrg      AC_MSG_ERROR([Unknown argument to --with-aix-soname])
120648d623946Smrg      ;;
120658d623946Smrg    esac
120668d623946Smrg    lt_cv_with_aix_soname=$with_aix_soname],
120678d623946Smrg    [AC_CACHE_VAL([lt_cv_with_aix_soname],
120688d623946Smrg      [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT)
120698d623946Smrg    with_aix_soname=$lt_cv_with_aix_soname])
120708d623946Smrg  AC_MSG_RESULT([$with_aix_soname])
120718d623946Smrg  if test aix != "$with_aix_soname"; then
120728d623946Smrg    # For the AIX way of multilib, we name the shared archive member
120738d623946Smrg    # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o',
120748d623946Smrg    # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File.
120758d623946Smrg    # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag,
120768d623946Smrg    # the AIX toolchain works better with OBJECT_MODE set (default 32).
120778d623946Smrg    if test 64 = "${OBJECT_MODE-32}"; then
120788d623946Smrg      shared_archive_member_spec=shr_64
120798d623946Smrg    else
120808d623946Smrg      shared_archive_member_spec=shr
120818d623946Smrg    fi
120828d623946Smrg  fi
120838d623946Smrg  ;;
120848d623946Smrg*)
120858d623946Smrg  with_aix_soname=aix
120868d623946Smrg  ;;
120878d623946Smrgesac
12088fe24f8a2Smrg
120898d623946Smrg_LT_DECL([], [shared_archive_member_spec], [0],
120908d623946Smrg    [Shared archive member basename, for filename based shared library versioning on AIX])dnl
120918d623946Smrg])# _LT_WITH_AIX_SONAME
12092fe24f8a2Smrg
120938d623946SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])])
120948d623946SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])])
120958d623946SmrgLT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])])
12096fe24f8a2Smrg
12097fe24f8a2Smrg
120988d623946Smrg# _LT_WITH_PIC([MODE])
120998d623946Smrg# --------------------
121008d623946Smrg# implement the --with-pic flag, and support the 'pic-only' and 'no-pic'
121018d623946Smrg# LT_INIT options.
121028d623946Smrg# MODE is either 'yes' or 'no'.  If omitted, it defaults to 'both'.
121038d623946Smrgm4_define([_LT_WITH_PIC],
121048d623946Smrg[AC_ARG_WITH([pic],
121058d623946Smrg    [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@],
121068d623946Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
121078d623946Smrg    [lt_p=${PACKAGE-default}
121088d623946Smrg    case $withval in
121098d623946Smrg    yes|no) pic_mode=$withval ;;
121108d623946Smrg    *)
121118d623946Smrg      pic_mode=default
121128d623946Smrg      # Look at the argument we got.  We use all the common list separators.
121138d623946Smrg      lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR,
121148d623946Smrg      for lt_pkg in $withval; do
121158d623946Smrg	IFS=$lt_save_ifs
121168d623946Smrg	if test "X$lt_pkg" = "X$lt_p"; then
121178d623946Smrg	  pic_mode=yes
121188d623946Smrg	fi
121198d623946Smrg      done
121208d623946Smrg      IFS=$lt_save_ifs
121218d623946Smrg      ;;
121228d623946Smrg    esac],
121238d623946Smrg    [pic_mode=m4_default([$1], [default])])
121248d623946Smrg
121258d623946Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
121268d623946Smrg])# _LT_WITH_PIC
12127fe24f8a2Smrg
121288d623946SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
121298d623946SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
12130fe24f8a2Smrg
121318d623946Smrg# Old name:
121328d623946SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
121338d623946Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
121348d623946SmrgAC_DIAGNOSE([obsolete],
121358d623946Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
121368d623946Smrgput the 'pic-only' option into LT_INIT's first parameter.])
121378d623946Smrg])
12138fe24f8a2Smrg
121398d623946Smrgdnl aclocal-1.4 backwards compatibility:
121408d623946Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
12141fe24f8a2Smrg
12142fe24f8a2Smrg
121438d623946Smrgm4_define([_LTDL_MODE], [])
121448d623946SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
121458d623946Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
121468d623946SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
121478d623946Smrg		 [m4_define([_LTDL_MODE], [recursive])])
121488d623946SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
121498d623946Smrg		 [m4_define([_LTDL_MODE], [subproject])])
121503e72ca8cSmrg
121518d623946Smrgm4_define([_LTDL_TYPE], [])
121528d623946SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
121538d623946Smrg		 [m4_define([_LTDL_TYPE], [installable])])
121548d623946SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
121558d623946Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
121568d623946Smrg
121578d623946Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
12158fe24f8a2Smrg#
121598d623946Smrg# Copyright (C) 2004-2005, 2007-2008, 2011-2019, 2021-2022 Free Software
121608d623946Smrg# Foundation, Inc.
121618d623946Smrg# Written by Gary V. Vaughan, 2004
12162fe24f8a2Smrg#
121638d623946Smrg# This file is free software; the Free Software Foundation gives
121648d623946Smrg# unlimited permission to copy and/or distribute it, with or without
121658d623946Smrg# modifications, as long as this notice is preserved.
12166ee3138f1Smrg
121678d623946Smrg# serial 6 ltsugar.m4
12168fe24f8a2Smrg
121698d623946Smrg# This is to help aclocal find these macros, as it can't see m4_define.
121708d623946SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
12171414bd68fSmrg
12172414bd68fSmrg
121738d623946Smrg# lt_join(SEP, ARG1, [ARG2...])
121748d623946Smrg# -----------------------------
121758d623946Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
121768d623946Smrg# associated separator.
121778d623946Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
121788d623946Smrg# versions in m4sugar had bugs.
121798d623946Smrgm4_define([lt_join],
121808d623946Smrg[m4_if([$#], [1], [],
121818d623946Smrg       [$#], [2], [[$2]],
121828d623946Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
121838d623946Smrgm4_define([_lt_join],
121848d623946Smrg[m4_if([$#$2], [2], [],
121858d623946Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
1218634977a2fSmrg
121873e72ca8cSmrg
121888d623946Smrg# lt_car(LIST)
121898d623946Smrg# lt_cdr(LIST)
121908d623946Smrg# ------------
121918d623946Smrg# Manipulate m4 lists.
121928d623946Smrg# These macros are necessary as long as will still need to support
121938d623946Smrg# Autoconf-2.59, which quotes differently.
121948d623946Smrgm4_define([lt_car], [[$1]])
121958d623946Smrgm4_define([lt_cdr],
121968d623946Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
121978d623946Smrg       [$#], 1, [],
121988d623946Smrg       [m4_dquote(m4_shift($@))])])
121998d623946Smrgm4_define([lt_unquote], $1)
122003e72ca8cSmrg
122013e72ca8cSmrg
122028d623946Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
122038d623946Smrg# ------------------------------------------
122048d623946Smrg# Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'.
122058d623946Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
122068d623946Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
122078d623946Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
122088d623946Smrg# than defined and empty).
122098d623946Smrg#
122108d623946Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
122118d623946Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
122128d623946Smrgm4_define([lt_append],
122138d623946Smrg[m4_define([$1],
122148d623946Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
122153e72ca8cSmrg
12216a1ed278cSmrg
12217ee3138f1Smrg
122188d623946Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
122198d623946Smrg# ----------------------------------------------------------
122208d623946Smrg# Produce a SEP delimited list of all paired combinations of elements of
122218d623946Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
122228d623946Smrg# has the form PREFIXmINFIXSUFFIXn.
122238d623946Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
122248d623946Smrgm4_define([lt_combine],
122258d623946Smrg[m4_if(m4_eval([$# > 3]), [1],
122268d623946Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
122278d623946Smrg[[m4_foreach([_Lt_prefix], [$2],
122288d623946Smrg	     [m4_foreach([_Lt_suffix],
122298d623946Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
122308d623946Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
122318d623946Smrg
122328d623946Smrg
122338d623946Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
122348d623946Smrg# -----------------------------------------------------------------------
122358d623946Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
122368d623946Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
122378d623946Smrgm4_define([lt_if_append_uniq],
122388d623946Smrg[m4_ifdef([$1],
122398d623946Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
122408d623946Smrg		 [lt_append([$1], [$2], [$3])$4],
122418d623946Smrg		 [$5])],
122428d623946Smrg	  [lt_append([$1], [$2], [$3])$4])])
122438d623946Smrg
122448d623946Smrg
122458d623946Smrg# lt_dict_add(DICT, KEY, VALUE)
122468d623946Smrg# -----------------------------
122478d623946Smrgm4_define([lt_dict_add],
122488d623946Smrg[m4_define([$1($2)], [$3])])
122498d623946Smrg
12250414bd68fSmrg
122518d623946Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
122528d623946Smrg# --------------------------------------------
122538d623946Smrgm4_define([lt_dict_add_subkey],
122548d623946Smrg[m4_define([$1($2:$3)], [$4])])
12255414bd68fSmrg
12256414bd68fSmrg
122578d623946Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
122588d623946Smrg# ----------------------------------
122598d623946Smrgm4_define([lt_dict_fetch],
122608d623946Smrg[m4_ifval([$3],
122618d623946Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
122628d623946Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
12263414bd68fSmrg
12264414bd68fSmrg
122658d623946Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
122668d623946Smrg# -----------------------------------------------------------------
122678d623946Smrgm4_define([lt_if_dict_fetch],
122688d623946Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
122698d623946Smrg	[$5],
122708d623946Smrg    [$6])])
12271414bd68fSmrg
12272414bd68fSmrg
122738d623946Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
122748d623946Smrg# --------------------------------------------------------------
122758d623946Smrgm4_define([lt_dict_filter],
122768d623946Smrg[m4_if([$5], [], [],
122778d623946Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
122788d623946Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
122798d623946Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
122808d623946Smrg])
122818d623946Smrg
122828d623946Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
12283fe24f8a2Smrg#
122848d623946Smrg#   Copyright (C) 2004, 2011-2019, 2021-2022 Free Software Foundation,
122858d623946Smrg#   Inc.
122868d623946Smrg#   Written by Scott James Remnant, 2004
12287fe24f8a2Smrg#
122888d623946Smrg# This file is free software; the Free Software Foundation gives
122898d623946Smrg# unlimited permission to copy and/or distribute it, with or without
122908d623946Smrg# modifications, as long as this notice is preserved.
12291414bd68fSmrg
122928d623946Smrg# @configure_input@
12293414bd68fSmrg
122948d623946Smrg# serial 4245 ltversion.m4
122958d623946Smrg# This file is part of GNU Libtool
122968d623946Smrg
122978d623946Smrgm4_define([LT_PACKAGE_VERSION], [2.4.7])
122988d623946Smrgm4_define([LT_PACKAGE_REVISION], [2.4.7])
122998d623946Smrg
123008d623946SmrgAC_DEFUN([LTVERSION_VERSION],
123018d623946Smrg[macro_version='2.4.7'
123028d623946Smrgmacro_revision='2.4.7'
123038d623946Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
123048d623946Smrg_LT_DECL(, macro_revision, 0)
12305fe24f8a2Smrg])
12306414bd68fSmrg
123078d623946Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
12308fe24f8a2Smrg#
123098d623946Smrg#   Copyright (C) 2004-2005, 2007, 2009, 2011-2019, 2021-2022 Free
123108d623946Smrg#   Software Foundation, Inc.
123118d623946Smrg#   Written by Scott James Remnant, 2004.
12312fe24f8a2Smrg#
123138d623946Smrg# This file is free software; the Free Software Foundation gives
123148d623946Smrg# unlimited permission to copy and/or distribute it, with or without
123158d623946Smrg# modifications, as long as this notice is preserved.
123168d623946Smrg
123178d623946Smrg# serial 5 lt~obsolete.m4
123188d623946Smrg
123198d623946Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
12320fe24f8a2Smrg#
123218d623946Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN),
123228d623946Smrg# which have later been changed to m4_define as they aren't part of the
123238d623946Smrg# exported API, or moved to Autoconf or Automake where they belong.
123248d623946Smrg#
123258d623946Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
123268d623946Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
123278d623946Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
123288d623946Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
123298d623946Smrg# and doesn't know about Autoconf macros at all.)
123308d623946Smrg#
123318d623946Smrg# So we provide this file, which has a silly filename so it's always
123328d623946Smrg# included after everything else.  This provides aclocal with the
123338d623946Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
123348d623946Smrg# because those macros already exist, or will be overwritten later.
123358d623946Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
123368d623946Smrg#
123378d623946Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
123388d623946Smrg# Yes, that means every name once taken will need to remain here until
123398d623946Smrg# we give up compatibility with versions before 1.7, at which point
123408d623946Smrg# we need to keep only those names which we still refer to.
123418d623946Smrg
123428d623946Smrg# This is to help aclocal find these macros, as it can't see m4_define.
123438d623946SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
123448d623946Smrg
123458d623946Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
123468d623946Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
123478d623946Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
123488d623946Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
123498d623946Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
123508d623946Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
123518d623946Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
123528d623946Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
123538d623946Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
123548d623946Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
123558d623946Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
123568d623946Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
123578d623946Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
123588d623946Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
123598d623946Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
123608d623946Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
123618d623946Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
123628d623946Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
123638d623946Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
123648d623946Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
123658d623946Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
123668d623946Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
123678d623946Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
123688d623946Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
123698d623946Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
123708d623946Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
123718d623946Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
123728d623946Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
123738d623946Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
123748d623946Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
123758d623946Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
123768d623946Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
123778d623946Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
123788d623946Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
123798d623946Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
123808d623946Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
123818d623946Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
123828d623946Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
123838d623946Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
123848d623946Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
123858d623946Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
123868d623946Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
123878d623946Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
123888d623946Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
123898d623946Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
123908d623946Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
123918d623946Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
123928d623946Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
123938d623946Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
123948d623946Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
123958d623946Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
123968d623946Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
123978d623946Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
123988d623946Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
123998d623946Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
124008d623946Smrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
124018d623946Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
124028d623946Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
124038d623946Smrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
124048d623946Smrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
124058d623946Smrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
12406ee3138f1Smrg
12407