aclocal.m4 revision 4cd6a3ae
14cd6a3aeSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
28c9fbc29Smrg
38c9fbc29Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
44e411241Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
58c9fbc29Smrg# This file is free software; the Free Software Foundation
68c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
78c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
88c9fbc29Smrg
98c9fbc29Smrg# This program is distributed in the hope that it will be useful,
108c9fbc29Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
118c9fbc29Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
128c9fbc29Smrg# PARTICULAR PURPOSE.
138c9fbc29Smrg
144e411241Smrgm4_ifndef([AC_AUTOCONF_VERSION],
154e411241Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
164cd6a3aeSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
174cd6a3aeSmrg[m4_warning([this file was generated for autoconf 2.68.
184e411241SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
194e411241SmrgIf you have problems, you may need to regenerate the build system entirely.
204e411241SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
218c9fbc29Smrg
224e411241Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
238c9fbc29Smrg#
248c9fbc29Smrg# This file is free software; the Free Software Foundation
258c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
268c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
278c9fbc29Smrg
288c9fbc29Smrg# AM_AUTOMAKE_VERSION(VERSION)
298c9fbc29Smrg# ----------------------------
308c9fbc29Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
318c9fbc29Smrg# generated from the m4 files accompanying Automake X.Y.
328c9fbc29Smrg# (This private macro should not be called outside this file.)
338c9fbc29SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
344e411241Smrg[am__api_version='1.11'
358c9fbc29Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
368c9fbc29Smrgdnl require some minimum version.  Point them to the right macro.
374cd6a3aeSmrgm4_if([$1], [1.11.1], [],
388c9fbc29Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
398c9fbc29Smrg])
408c9fbc29Smrg
418c9fbc29Smrg# _AM_AUTOCONF_VERSION(VERSION)
428c9fbc29Smrg# -----------------------------
438c9fbc29Smrg# aclocal traces this macro to find the Autoconf version.
448c9fbc29Smrg# This is a private macro too.  Using m4_define simplifies
458c9fbc29Smrg# the logic in aclocal, which can simply ignore this definition.
468c9fbc29Smrgm4_define([_AM_AUTOCONF_VERSION], [])
478c9fbc29Smrg
488c9fbc29Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
498c9fbc29Smrg# -------------------------------
508c9fbc29Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
514e411241Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
528c9fbc29SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
534cd6a3aeSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
544e411241Smrgm4_ifndef([AC_AUTOCONF_VERSION],
554e411241Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
564e411241Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
578c9fbc29Smrg
588c9fbc29Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
598c9fbc29Smrg
608c9fbc29Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
618c9fbc29Smrg#
628c9fbc29Smrg# This file is free software; the Free Software Foundation
638c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
648c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
658c9fbc29Smrg
668c9fbc29Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
678c9fbc29Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
688c9fbc29Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
698c9fbc29Smrg#
708c9fbc29Smrg# Of course, Automake must honor this variable whenever it calls a
718c9fbc29Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
728c9fbc29Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
738c9fbc29Smrg# depending on how configure is run.  This is pretty annoying, since
748c9fbc29Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
758c9fbc29Smrg# source directory, any form will work fine, but in subdirectories a
768c9fbc29Smrg# relative path needs to be adjusted first.
778c9fbc29Smrg#
788c9fbc29Smrg# $ac_aux_dir/missing
798c9fbc29Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
808c9fbc29Smrg# $top_srcdir/$ac_aux_dir/missing
818c9fbc29Smrg#    fails if $ac_aux_dir is absolute,
828c9fbc29Smrg#    fails when called from a subdirectory in a VPATH build with
838c9fbc29Smrg#          a relative $ac_aux_dir
848c9fbc29Smrg#
858c9fbc29Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
868c9fbc29Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
878c9fbc29Smrg# harmless because $srcdir is `.', but things will broke when you
888c9fbc29Smrg# start a VPATH build or use an absolute $srcdir.
898c9fbc29Smrg#
908c9fbc29Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
918c9fbc29Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
928c9fbc29Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
938c9fbc29Smrg# and then we would define $MISSING as
948c9fbc29Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
958c9fbc29Smrg# This will work as long as MISSING is not called from configure, because
968c9fbc29Smrg# unfortunately $(top_srcdir) has no meaning in configure.
978c9fbc29Smrg# However there are other variables, like CC, which are often used in
988c9fbc29Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
998c9fbc29Smrg#
1008c9fbc29Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
1018c9fbc29Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
1028c9fbc29Smrg# configured tree to be moved without reconfiguration.
1038c9fbc29Smrg
1048c9fbc29SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1058c9fbc29Smrg[dnl Rely on autoconf to set up CDPATH properly.
1068c9fbc29SmrgAC_PREREQ([2.50])dnl
1078c9fbc29Smrg# expand $ac_aux_dir to an absolute path
1088c9fbc29Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
1098c9fbc29Smrg])
1108c9fbc29Smrg
1118c9fbc29Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
1128c9fbc29Smrg
1134e411241Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1148c9fbc29Smrg# Free Software Foundation, Inc.
1158c9fbc29Smrg#
1168c9fbc29Smrg# This file is free software; the Free Software Foundation
1178c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
1188c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
1198c9fbc29Smrg
1204e411241Smrg# serial 9
1218c9fbc29Smrg
1228c9fbc29Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1238c9fbc29Smrg# -------------------------------------
1248c9fbc29Smrg# Define a conditional.
1258c9fbc29SmrgAC_DEFUN([AM_CONDITIONAL],
1268c9fbc29Smrg[AC_PREREQ(2.52)dnl
1278c9fbc29Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1288c9fbc29Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1298c9fbc29SmrgAC_SUBST([$1_TRUE])dnl
1308c9fbc29SmrgAC_SUBST([$1_FALSE])dnl
1318c9fbc29Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1328c9fbc29Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1334e411241Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1348c9fbc29Smrgif $2; then
1358c9fbc29Smrg  $1_TRUE=
1368c9fbc29Smrg  $1_FALSE='#'
1378c9fbc29Smrgelse
1388c9fbc29Smrg  $1_TRUE='#'
1398c9fbc29Smrg  $1_FALSE=
1408c9fbc29Smrgfi
1418c9fbc29SmrgAC_CONFIG_COMMANDS_PRE(
1428c9fbc29Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1438c9fbc29Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1448c9fbc29SmrgUsually this means the macro was only invoked conditionally.]])
1458c9fbc29Smrgfi])])
1468c9fbc29Smrg
1474e411241Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1488c9fbc29Smrg# Free Software Foundation, Inc.
1498c9fbc29Smrg#
1508c9fbc29Smrg# This file is free software; the Free Software Foundation
1518c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
1528c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
1538c9fbc29Smrg
1544e411241Smrg# serial 10
1558c9fbc29Smrg
1568c9fbc29Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1578c9fbc29Smrg# written in clear, in which case automake, when reading aclocal.m4,
1588c9fbc29Smrg# will think it sees a *use*, and therefore will trigger all it's
1598c9fbc29Smrg# C support machinery.  Also note that it means that autoscan, seeing
1608c9fbc29Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1618c9fbc29Smrg
1628c9fbc29Smrg
1638c9fbc29Smrg# _AM_DEPENDENCIES(NAME)
1648c9fbc29Smrg# ----------------------
1658c9fbc29Smrg# See how the compiler implements dependency checking.
1668c9fbc29Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
1678c9fbc29Smrg# We try a few techniques and use that to set a single cache variable.
1688c9fbc29Smrg#
1698c9fbc29Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1708c9fbc29Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1718c9fbc29Smrg# dependency, and given that the user is not expected to run this macro,
1728c9fbc29Smrg# just rely on AC_PROG_CC.
1738c9fbc29SmrgAC_DEFUN([_AM_DEPENDENCIES],
1748c9fbc29Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1758c9fbc29SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1768c9fbc29SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1778c9fbc29SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
1788c9fbc29Smrg
1798c9fbc29Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
1808c9fbc29Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
1818c9fbc29Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
1828c9fbc29Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
1838c9fbc29Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
1848c9fbc29Smrg                   [depcc="$$1"   am_compiler_list=])
1858c9fbc29Smrg
1868c9fbc29SmrgAC_CACHE_CHECK([dependency style of $depcc],
1878c9fbc29Smrg               [am_cv_$1_dependencies_compiler_type],
1888c9fbc29Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
1898c9fbc29Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
1908c9fbc29Smrg  # making bogus files that we don't know about and never remove.  For
1918c9fbc29Smrg  # instance it was reported that on HP-UX the gcc test will end up
1928c9fbc29Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
1938c9fbc29Smrg  # in D'.
1948c9fbc29Smrg  mkdir conftest.dir
1958c9fbc29Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
1968c9fbc29Smrg  # using a relative directory.
1978c9fbc29Smrg  cp "$am_depcomp" conftest.dir
1988c9fbc29Smrg  cd conftest.dir
1998c9fbc29Smrg  # We will build objects and dependencies in a subdirectory because
2008c9fbc29Smrg  # it helps to detect inapplicable dependency modes.  For instance
2018c9fbc29Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
2028c9fbc29Smrg  # side effect of compilation, but ICC will put the dependencies in
2038c9fbc29Smrg  # the current directory while Tru64 will put them in the object
2048c9fbc29Smrg  # directory.
2058c9fbc29Smrg  mkdir sub
2068c9fbc29Smrg
2078c9fbc29Smrg  am_cv_$1_dependencies_compiler_type=none
2088c9fbc29Smrg  if test "$am_compiler_list" = ""; then
2098c9fbc29Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
2108c9fbc29Smrg  fi
2114e411241Smrg  am__universal=false
2124e411241Smrg  m4_case([$1], [CC],
2134e411241Smrg    [case " $depcc " in #(
2144e411241Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2154e411241Smrg     esac],
2164e411241Smrg    [CXX],
2174e411241Smrg    [case " $depcc " in #(
2184e411241Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2194e411241Smrg     esac])
2204e411241Smrg
2218c9fbc29Smrg  for depmode in $am_compiler_list; do
2228c9fbc29Smrg    # Setup a source with many dependencies, because some compilers
2238c9fbc29Smrg    # like to wrap large dependency lists on column 80 (with \), and
2248c9fbc29Smrg    # we should not choose a depcomp mode which is confused by this.
2258c9fbc29Smrg    #
2268c9fbc29Smrg    # We need to recreate these files for each test, as the compiler may
2278c9fbc29Smrg    # overwrite some of them when testing with obscure command lines.
2288c9fbc29Smrg    # This happens at least with the AIX C compiler.
2298c9fbc29Smrg    : > sub/conftest.c
2308c9fbc29Smrg    for i in 1 2 3 4 5 6; do
2318c9fbc29Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2328c9fbc29Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2338c9fbc29Smrg      # Solaris 8's {/usr,}/bin/sh.
2348c9fbc29Smrg      touch sub/conftst$i.h
2358c9fbc29Smrg    done
2368c9fbc29Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
2378c9fbc29Smrg
2384e411241Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
2394e411241Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2404e411241Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
2414e411241Smrg    # versions had trouble with output in subdirs
2424e411241Smrg    am__obj=sub/conftest.${OBJEXT-o}
2434e411241Smrg    am__minus_obj="-o $am__obj"
2448c9fbc29Smrg    case $depmode in
2454e411241Smrg    gcc)
2464e411241Smrg      # This depmode causes a compiler race in universal mode.
2474e411241Smrg      test "$am__universal" = false || continue
2484e411241Smrg      ;;
2498c9fbc29Smrg    nosideeffect)
2508c9fbc29Smrg      # after this tag, mechanisms are not by side-effect, so they'll
2518c9fbc29Smrg      # only be used when explicitly requested
2528c9fbc29Smrg      if test "x$enable_dependency_tracking" = xyes; then
2538c9fbc29Smrg	continue
2548c9fbc29Smrg      else
2558c9fbc29Smrg	break
2568c9fbc29Smrg      fi
2578c9fbc29Smrg      ;;
2584e411241Smrg    msvisualcpp | msvcmsys)
2594e411241Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
2604e411241Smrg      # not run yet.  These depmodes are late enough in the game, and
2614e411241Smrg      # so weak that their functioning should not be impacted.
2624e411241Smrg      am__obj=conftest.${OBJEXT-o}
2634e411241Smrg      am__minus_obj=
2644e411241Smrg      ;;
2658c9fbc29Smrg    none) break ;;
2668c9fbc29Smrg    esac
2678c9fbc29Smrg    if depmode=$depmode \
2684e411241Smrg       source=sub/conftest.c object=$am__obj \
2698c9fbc29Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2704e411241Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2718c9fbc29Smrg         >/dev/null 2>conftest.err &&
2728c9fbc29Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2738c9fbc29Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2744e411241Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2758c9fbc29Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2768c9fbc29Smrg      # icc doesn't choke on unknown options, it will just issue warnings
2778c9fbc29Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
2788c9fbc29Smrg      # that says an option was ignored or not supported.
2798c9fbc29Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
2808c9fbc29Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
2818c9fbc29Smrg      # The diagnosis changed in icc 8.0:
2828c9fbc29Smrg      #   icc: Command line remark: option '-MP' not supported
2838c9fbc29Smrg      if (grep 'ignoring option' conftest.err ||
2848c9fbc29Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
2858c9fbc29Smrg        am_cv_$1_dependencies_compiler_type=$depmode
2868c9fbc29Smrg        break
2878c9fbc29Smrg      fi
2888c9fbc29Smrg    fi
2898c9fbc29Smrg  done
2908c9fbc29Smrg
2918c9fbc29Smrg  cd ..
2928c9fbc29Smrg  rm -rf conftest.dir
2938c9fbc29Smrgelse
2948c9fbc29Smrg  am_cv_$1_dependencies_compiler_type=none
2958c9fbc29Smrgfi
2968c9fbc29Smrg])
2978c9fbc29SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
2988c9fbc29SmrgAM_CONDITIONAL([am__fastdep$1], [
2998c9fbc29Smrg  test "x$enable_dependency_tracking" != xno \
3008c9fbc29Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3018c9fbc29Smrg])
3028c9fbc29Smrg
3038c9fbc29Smrg
3048c9fbc29Smrg# AM_SET_DEPDIR
3058c9fbc29Smrg# -------------
3068c9fbc29Smrg# Choose a directory name for dependency files.
3078c9fbc29Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
3088c9fbc29SmrgAC_DEFUN([AM_SET_DEPDIR],
3098c9fbc29Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3108c9fbc29SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3118c9fbc29Smrg])
3128c9fbc29Smrg
3138c9fbc29Smrg
3148c9fbc29Smrg# AM_DEP_TRACK
3158c9fbc29Smrg# ------------
3168c9fbc29SmrgAC_DEFUN([AM_DEP_TRACK],
3178c9fbc29Smrg[AC_ARG_ENABLE(dependency-tracking,
3188c9fbc29Smrg[  --disable-dependency-tracking  speeds up one-time build
3198c9fbc29Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
3208c9fbc29Smrgif test "x$enable_dependency_tracking" != xno; then
3218c9fbc29Smrg  am_depcomp="$ac_aux_dir/depcomp"
3228c9fbc29Smrg  AMDEPBACKSLASH='\'
3238c9fbc29Smrgfi
3248c9fbc29SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3258c9fbc29SmrgAC_SUBST([AMDEPBACKSLASH])dnl
3268c9fbc29Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3278c9fbc29Smrg])
3288c9fbc29Smrg
3298c9fbc29Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
3308c9fbc29Smrg
3314e411241Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3328c9fbc29Smrg# Free Software Foundation, Inc.
3338c9fbc29Smrg#
3348c9fbc29Smrg# This file is free software; the Free Software Foundation
3358c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
3368c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
3378c9fbc29Smrg
3384e411241Smrg#serial 5
3398c9fbc29Smrg
3408c9fbc29Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3418c9fbc29Smrg# ------------------------------
3428c9fbc29SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3434e411241Smrg[{
3444e411241Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
3454e411241Smrg  # are listed without --file.  Let's play safe and only enable the eval
3464e411241Smrg  # if we detect the quoting.
3474e411241Smrg  case $CONFIG_FILES in
3484e411241Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
3494e411241Smrg  *)   set x $CONFIG_FILES ;;
3504e411241Smrg  esac
3514e411241Smrg  shift
3524e411241Smrg  for mf
3534e411241Smrg  do
3544e411241Smrg    # Strip MF so we end up with the name of the file.
3554e411241Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
3564e411241Smrg    # Check whether this is an Automake generated Makefile or not.
3574e411241Smrg    # We used to match only the files named `Makefile.in', but
3584e411241Smrg    # some people rename them; so instead we look at the file content.
3594e411241Smrg    # Grep'ing the first line is not enough: some people post-process
3604e411241Smrg    # each Makefile.in and add a new line on top of each file to say so.
3614e411241Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
3624e411241Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
3634e411241Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3644e411241Smrg      dirpart=`AS_DIRNAME("$mf")`
3654e411241Smrg    else
3664e411241Smrg      continue
3674e411241Smrg    fi
3684e411241Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
3694e411241Smrg    # from the Makefile without running `make'.
3704e411241Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3714e411241Smrg    test -z "$DEPDIR" && continue
3724e411241Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
3734e411241Smrg    test -z "am__include" && continue
3744e411241Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3754e411241Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
3764e411241Smrg    U=`sed -n 's/^U = //p' < "$mf"`
3774e411241Smrg    # Find all dependency output files, they are included files with
3784e411241Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
3794e411241Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
3804e411241Smrg    # expansion.
3814e411241Smrg    for file in `sed -n "
3824e411241Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
3834e411241Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
3844e411241Smrg      # Make sure the directory exists.
3854e411241Smrg      test -f "$dirpart/$file" && continue
3864e411241Smrg      fdir=`AS_DIRNAME(["$file"])`
3874e411241Smrg      AS_MKDIR_P([$dirpart/$fdir])
3884e411241Smrg      # echo "creating $dirpart/$file"
3894e411241Smrg      echo '# dummy' > "$dirpart/$file"
3904e411241Smrg    done
3918c9fbc29Smrg  done
3924e411241Smrg}
3938c9fbc29Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
3948c9fbc29Smrg
3958c9fbc29Smrg
3968c9fbc29Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
3978c9fbc29Smrg# -----------------------------
3988c9fbc29Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
3998c9fbc29Smrg#
4008c9fbc29Smrg# This code is only required when automatic dependency tracking
4018c9fbc29Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
4028c9fbc29Smrg# need in order to bootstrap the dependency handling code.
4038c9fbc29SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4048c9fbc29Smrg[AC_CONFIG_COMMANDS([depfiles],
4058c9fbc29Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4068c9fbc29Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
4078c9fbc29Smrg])
4088c9fbc29Smrg
4098c9fbc29Smrg# Do all the work for Automake.                             -*- Autoconf -*-
4108c9fbc29Smrg
4118c9fbc29Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4124e411241Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
4138c9fbc29Smrg#
4148c9fbc29Smrg# This file is free software; the Free Software Foundation
4158c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
4168c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
4178c9fbc29Smrg
4184e411241Smrg# serial 16
4198c9fbc29Smrg
4208c9fbc29Smrg# This macro actually does too much.  Some checks are only needed if
4218c9fbc29Smrg# your package does certain things.  But this isn't really a big deal.
4228c9fbc29Smrg
4238c9fbc29Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4248c9fbc29Smrg# AM_INIT_AUTOMAKE([OPTIONS])
4258c9fbc29Smrg# -----------------------------------------------
4268c9fbc29Smrg# The call with PACKAGE and VERSION arguments is the old style
4278c9fbc29Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4288c9fbc29Smrg# and VERSION should now be passed to AC_INIT and removed from
4298c9fbc29Smrg# the call to AM_INIT_AUTOMAKE.
4308c9fbc29Smrg# We support both call styles for the transition.  After
4318c9fbc29Smrg# the next Automake release, Autoconf can make the AC_INIT
4328c9fbc29Smrg# arguments mandatory, and then we can depend on a new Autoconf
4338c9fbc29Smrg# release and drop the old call support.
4348c9fbc29SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4354e411241Smrg[AC_PREREQ([2.62])dnl
4368c9fbc29Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4378c9fbc29Smrgdnl the ones we care about.
4388c9fbc29Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4398c9fbc29SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4408c9fbc29SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4418c9fbc29Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4428c9fbc29Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4438c9fbc29Smrg  # is not polluted with repeated "-I."
4448c9fbc29Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4458c9fbc29Smrg  # test to see if srcdir already configured
4468c9fbc29Smrg  if test -f $srcdir/config.status; then
4478c9fbc29Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4488c9fbc29Smrg  fi
4498c9fbc29Smrgfi
4508c9fbc29Smrg
4518c9fbc29Smrg# test whether we have cygpath
4528c9fbc29Smrgif test -z "$CYGPATH_W"; then
4538c9fbc29Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4548c9fbc29Smrg    CYGPATH_W='cygpath -w'
4558c9fbc29Smrg  else
4568c9fbc29Smrg    CYGPATH_W=echo
4578c9fbc29Smrg  fi
4588c9fbc29Smrgfi
4598c9fbc29SmrgAC_SUBST([CYGPATH_W])
4608c9fbc29Smrg
4618c9fbc29Smrg# Define the identity of the package.
4628c9fbc29Smrgdnl Distinguish between old-style and new-style calls.
4638c9fbc29Smrgm4_ifval([$2],
4648c9fbc29Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4658c9fbc29Smrg AC_SUBST([PACKAGE], [$1])dnl
4668c9fbc29Smrg AC_SUBST([VERSION], [$2])],
4678c9fbc29Smrg[_AM_SET_OPTIONS([$1])dnl
4688c9fbc29Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4698c9fbc29Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
4708c9fbc29Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4718c9fbc29Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4728c9fbc29Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4738c9fbc29Smrg
4748c9fbc29Smrg_AM_IF_OPTION([no-define],,
4758c9fbc29Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
4768c9fbc29Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4778c9fbc29Smrg
4788c9fbc29Smrg# Some tools Automake needs.
4798c9fbc29SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
4808c9fbc29SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
4818c9fbc29SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
4828c9fbc29SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
4838c9fbc29SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
4848c9fbc29SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
4858c9fbc29SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
4864e411241SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
4874e411241SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
4888c9fbc29SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
4898c9fbc29Smrg# We need awk for the "check" target.  The system "awk" is bad on
4908c9fbc29Smrg# some platforms.
4918c9fbc29SmrgAC_REQUIRE([AC_PROG_AWK])dnl
4928c9fbc29SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
4938c9fbc29SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
4948c9fbc29Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
4954e411241Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
4964e411241Smrg			     [_AM_PROG_TAR([v7])])])
4978c9fbc29Smrg_AM_IF_OPTION([no-dependencies],,
4988c9fbc29Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
4994e411241Smrg		  [_AM_DEPENDENCIES(CC)],
5004e411241Smrg		  [define([AC_PROG_CC],
5014e411241Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
5028c9fbc29SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5034e411241Smrg		  [_AM_DEPENDENCIES(CXX)],
5044e411241Smrg		  [define([AC_PROG_CXX],
5054e411241Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
5068c9fbc29SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5074e411241Smrg		  [_AM_DEPENDENCIES(OBJC)],
5084e411241Smrg		  [define([AC_PROG_OBJC],
5094e411241Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
5108c9fbc29Smrg])
5114e411241Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
5124e411241Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
5134e411241Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
5144e411241Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
5154e411241SmrgAC_CONFIG_COMMANDS_PRE(dnl
5164e411241Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5174e411241Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5188c9fbc29Smrg])
5198c9fbc29Smrg
5204e411241Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5214e411241Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5224e411241Smrgdnl mangled by Autoconf and run in a shell conditional statement.
5234e411241Smrgm4_define([_AC_COMPILER_EXEEXT],
5244e411241Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5254e411241Smrg
5268c9fbc29Smrg
5278c9fbc29Smrg# When config.status generates a header, we must update the stamp-h file.
5288c9fbc29Smrg# This file resides in the same directory as the config header
5298c9fbc29Smrg# that is generated.  The stamp files are numbered to have different names.
5308c9fbc29Smrg
5318c9fbc29Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
5328c9fbc29Smrg# loop where config.status creates the headers, so we can generate
5338c9fbc29Smrg# our stamp files there.
5348c9fbc29SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
5358c9fbc29Smrg[# Compute $1's index in $config_headers.
5364e411241Smrg_am_arg=$1
5378c9fbc29Smrg_am_stamp_count=1
5388c9fbc29Smrgfor _am_header in $config_headers :; do
5398c9fbc29Smrg  case $_am_header in
5404e411241Smrg    $_am_arg | $_am_arg:* )
5418c9fbc29Smrg      break ;;
5428c9fbc29Smrg    * )
5438c9fbc29Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
5448c9fbc29Smrg  esac
5458c9fbc29Smrgdone
5464e411241Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
5478c9fbc29Smrg
5484e411241Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
5498c9fbc29Smrg#
5508c9fbc29Smrg# This file is free software; the Free Software Foundation
5518c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
5528c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
5538c9fbc29Smrg
5548c9fbc29Smrg# AM_PROG_INSTALL_SH
5558c9fbc29Smrg# ------------------
5568c9fbc29Smrg# Define $install_sh.
5578c9fbc29SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
5588c9fbc29Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5594e411241Smrgif test x"${install_sh}" != xset; then
5604e411241Smrg  case $am_aux_dir in
5614e411241Smrg  *\ * | *\	*)
5624e411241Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5634e411241Smrg  *)
5644e411241Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
5654e411241Smrg  esac
5664e411241Smrgfi
5678c9fbc29SmrgAC_SUBST(install_sh)])
5688c9fbc29Smrg
5698c9fbc29Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
5708c9fbc29Smrg#
5718c9fbc29Smrg# This file is free software; the Free Software Foundation
5728c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
5738c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
5748c9fbc29Smrg
5758c9fbc29Smrg# serial 2
5768c9fbc29Smrg
5778c9fbc29Smrg# Check whether the underlying file-system supports filenames
5788c9fbc29Smrg# with a leading dot.  For instance MS-DOS doesn't.
5798c9fbc29SmrgAC_DEFUN([AM_SET_LEADING_DOT],
5808c9fbc29Smrg[rm -rf .tst 2>/dev/null
5818c9fbc29Smrgmkdir .tst 2>/dev/null
5828c9fbc29Smrgif test -d .tst; then
5838c9fbc29Smrg  am__leading_dot=.
5848c9fbc29Smrgelse
5858c9fbc29Smrg  am__leading_dot=_
5868c9fbc29Smrgfi
5878c9fbc29Smrgrmdir .tst 2>/dev/null
5888c9fbc29SmrgAC_SUBST([am__leading_dot])])
5898c9fbc29Smrg
5908c9fbc29Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
5918c9fbc29Smrg# From Jim Meyering
5928c9fbc29Smrg
5934e411241Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
5948c9fbc29Smrg# Free Software Foundation, Inc.
5958c9fbc29Smrg#
5968c9fbc29Smrg# This file is free software; the Free Software Foundation
5978c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
5988c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
5998c9fbc29Smrg
6004e411241Smrg# serial 5
6018c9fbc29Smrg
6024e411241Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
6034e411241Smrg# ----------------------------------
6044e411241Smrg# Control maintainer-specific portions of Makefiles.
6054e411241Smrg# Default is to disable them, unless `enable' is passed literally.
6064e411241Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
6074e411241Smrg# can override the default with the --enable/--disable switch.
6088c9fbc29SmrgAC_DEFUN([AM_MAINTAINER_MODE],
6094e411241Smrg[m4_case(m4_default([$1], [disable]),
6104e411241Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
6114e411241Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
6124e411241Smrg       [m4_define([am_maintainer_other], [enable])
6134e411241Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
6144e411241SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
6154e411241Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
6164e411241Smrg  AC_ARG_ENABLE([maintainer-mode],
6174e411241Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
6188c9fbc29Smrg			  (and sometimes confusing) to the casual installer],
6194e411241Smrg      [USE_MAINTAINER_MODE=$enableval],
6204e411241Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
6218c9fbc29Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6224e411241Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
6238c9fbc29Smrg  MAINT=$MAINTAINER_MODE_TRUE
6244e411241Smrg  AC_SUBST([MAINT])dnl
6258c9fbc29Smrg]
6268c9fbc29Smrg)
6278c9fbc29Smrg
6288c9fbc29SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6298c9fbc29Smrg
6308c9fbc29Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6318c9fbc29Smrg
6324e411241Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
6338c9fbc29Smrg#
6348c9fbc29Smrg# This file is free software; the Free Software Foundation
6358c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
6368c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
6378c9fbc29Smrg
6384e411241Smrg# serial 4
6398c9fbc29Smrg
6408c9fbc29Smrg# AM_MAKE_INCLUDE()
6418c9fbc29Smrg# -----------------
6428c9fbc29Smrg# Check to see how make treats includes.
6438c9fbc29SmrgAC_DEFUN([AM_MAKE_INCLUDE],
6448c9fbc29Smrg[am_make=${MAKE-make}
6458c9fbc29Smrgcat > confinc << 'END'
6468c9fbc29Smrgam__doit:
6474e411241Smrg	@echo this is the am__doit target
6488c9fbc29Smrg.PHONY: am__doit
6498c9fbc29SmrgEND
6508c9fbc29Smrg# If we don't find an include directive, just comment out the code.
6518c9fbc29SmrgAC_MSG_CHECKING([for style of include used by $am_make])
6528c9fbc29Smrgam__include="#"
6538c9fbc29Smrgam__quote=
6548c9fbc29Smrg_am_result=none
6558c9fbc29Smrg# First try GNU make style include.
6568c9fbc29Smrgecho "include confinc" > confmf
6574e411241Smrg# Ignore all kinds of additional output from `make'.
6584e411241Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
6594e411241Smrg*the\ am__doit\ target*)
6604e411241Smrg  am__include=include
6614e411241Smrg  am__quote=
6624e411241Smrg  _am_result=GNU
6634e411241Smrg  ;;
6644e411241Smrgesac
6658c9fbc29Smrg# Now try BSD make style include.
6668c9fbc29Smrgif test "$am__include" = "#"; then
6678c9fbc29Smrg   echo '.include "confinc"' > confmf
6684e411241Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
6694e411241Smrg   *the\ am__doit\ target*)
6704e411241Smrg     am__include=.include
6714e411241Smrg     am__quote="\""
6724e411241Smrg     _am_result=BSD
6734e411241Smrg     ;;
6744e411241Smrg   esac
6758c9fbc29Smrgfi
6768c9fbc29SmrgAC_SUBST([am__include])
6778c9fbc29SmrgAC_SUBST([am__quote])
6788c9fbc29SmrgAC_MSG_RESULT([$_am_result])
6798c9fbc29Smrgrm -f confinc confmf
6808c9fbc29Smrg])
6818c9fbc29Smrg
6828c9fbc29Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6838c9fbc29Smrg
6844e411241Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
6858c9fbc29Smrg# Free Software Foundation, Inc.
6868c9fbc29Smrg#
6878c9fbc29Smrg# This file is free software; the Free Software Foundation
6888c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
6898c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
6908c9fbc29Smrg
6914e411241Smrg# serial 6
6928c9fbc29Smrg
6938c9fbc29Smrg# AM_MISSING_PROG(NAME, PROGRAM)
6948c9fbc29Smrg# ------------------------------
6958c9fbc29SmrgAC_DEFUN([AM_MISSING_PROG],
6968c9fbc29Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
6978c9fbc29Smrg$1=${$1-"${am_missing_run}$2"}
6988c9fbc29SmrgAC_SUBST($1)])
6998c9fbc29Smrg
7008c9fbc29Smrg
7018c9fbc29Smrg# AM_MISSING_HAS_RUN
7028c9fbc29Smrg# ------------------
7038c9fbc29Smrg# Define MISSING if not defined so far and test if it supports --run.
7048c9fbc29Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
7058c9fbc29SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7068c9fbc29Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7078c9fbc29SmrgAC_REQUIRE_AUX_FILE([missing])dnl
7084e411241Smrgif test x"${MISSING+set}" != xset; then
7094e411241Smrg  case $am_aux_dir in
7104e411241Smrg  *\ * | *\	*)
7114e411241Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7124e411241Smrg  *)
7134e411241Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
7144e411241Smrg  esac
7154e411241Smrgfi
7168c9fbc29Smrg# Use eval to expand $SHELL
7178c9fbc29Smrgif eval "$MISSING --run true"; then
7188c9fbc29Smrg  am_missing_run="$MISSING --run "
7198c9fbc29Smrgelse
7208c9fbc29Smrg  am_missing_run=
7218c9fbc29Smrg  AC_MSG_WARN([`missing' script is too old or missing])
7228c9fbc29Smrgfi
7238c9fbc29Smrg])
7248c9fbc29Smrg
7258c9fbc29Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7268c9fbc29Smrg#
7278c9fbc29Smrg# This file is free software; the Free Software Foundation
7288c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
7298c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
7308c9fbc29Smrg
7318c9fbc29Smrg# AM_PROG_MKDIR_P
7328c9fbc29Smrg# ---------------
7338c9fbc29Smrg# Check for `mkdir -p'.
7348c9fbc29SmrgAC_DEFUN([AM_PROG_MKDIR_P],
7358c9fbc29Smrg[AC_PREREQ([2.60])dnl
7368c9fbc29SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
7378c9fbc29Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
7388c9fbc29Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
7398c9fbc29Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7408c9fbc29Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7418c9fbc29Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
7428c9fbc29Smrgdnl adjustment using top_builddir (which is defined more often than
7438c9fbc29Smrgdnl MKDIR_P).
7448c9fbc29SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7458c9fbc29Smrgcase $mkdir_p in
7468c9fbc29Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
7478c9fbc29Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7488c9fbc29Smrgesac
7498c9fbc29Smrg])
7508c9fbc29Smrg
7518c9fbc29Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7528c9fbc29Smrg
7534e411241Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
7548c9fbc29Smrg#
7558c9fbc29Smrg# This file is free software; the Free Software Foundation
7568c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
7578c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
7588c9fbc29Smrg
7594e411241Smrg# serial 4
7608c9fbc29Smrg
7618c9fbc29Smrg# _AM_MANGLE_OPTION(NAME)
7628c9fbc29Smrg# -----------------------
7638c9fbc29SmrgAC_DEFUN([_AM_MANGLE_OPTION],
7648c9fbc29Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7658c9fbc29Smrg
7668c9fbc29Smrg# _AM_SET_OPTION(NAME)
7678c9fbc29Smrg# ------------------------------
7688c9fbc29Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7698c9fbc29SmrgAC_DEFUN([_AM_SET_OPTION],
7708c9fbc29Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7718c9fbc29Smrg
7728c9fbc29Smrg# _AM_SET_OPTIONS(OPTIONS)
7738c9fbc29Smrg# ----------------------------------
7748c9fbc29Smrg# OPTIONS is a space-separated list of Automake options.
7758c9fbc29SmrgAC_DEFUN([_AM_SET_OPTIONS],
7764e411241Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7778c9fbc29Smrg
7788c9fbc29Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7798c9fbc29Smrg# -------------------------------------------
7808c9fbc29Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7818c9fbc29SmrgAC_DEFUN([_AM_IF_OPTION],
7828c9fbc29Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7838c9fbc29Smrg
7848c9fbc29Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7858c9fbc29Smrg
7864e411241Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
7878c9fbc29Smrg# Free Software Foundation, Inc.
7888c9fbc29Smrg#
7898c9fbc29Smrg# This file is free software; the Free Software Foundation
7908c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
7918c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
7928c9fbc29Smrg
7934e411241Smrg# serial 5
7948c9fbc29Smrg
7958c9fbc29Smrg# AM_SANITY_CHECK
7968c9fbc29Smrg# ---------------
7978c9fbc29SmrgAC_DEFUN([AM_SANITY_CHECK],
7988c9fbc29Smrg[AC_MSG_CHECKING([whether build environment is sane])
7998c9fbc29Smrg# Just in case
8008c9fbc29Smrgsleep 1
8018c9fbc29Smrgecho timestamp > conftest.file
8024e411241Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8034e411241Smrg# name.  Accept space and tab only in the latter.
8044e411241Smrgam_lf='
8054e411241Smrg'
8064e411241Smrgcase `pwd` in
8074e411241Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8084e411241Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8094e411241Smrgesac
8104e411241Smrgcase $srcdir in
8114e411241Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8124e411241Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8134e411241Smrgesac
8144e411241Smrg
8158c9fbc29Smrg# Do `set' in a subshell so we don't clobber the current shell's
8168c9fbc29Smrg# arguments.  Must try -L first in case configure is actually a
8178c9fbc29Smrg# symlink; some systems play weird games with the mod time of symlinks
8188c9fbc29Smrg# (eg FreeBSD returns the mod time of the symlink's containing
8198c9fbc29Smrg# directory).
8208c9fbc29Smrgif (
8214e411241Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8228c9fbc29Smrg   if test "$[*]" = "X"; then
8238c9fbc29Smrg      # -L didn't work.
8244e411241Smrg      set X `ls -t "$srcdir/configure" conftest.file`
8258c9fbc29Smrg   fi
8268c9fbc29Smrg   rm -f conftest.file
8278c9fbc29Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
8288c9fbc29Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8298c9fbc29Smrg
8308c9fbc29Smrg      # If neither matched, then we have a broken ls.  This can happen
8318c9fbc29Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
8328c9fbc29Smrg      # broken ls alias from the environment.  This has actually
8338c9fbc29Smrg      # happened.  Such a system could not be considered "sane".
8348c9fbc29Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8358c9fbc29Smrgalias in your environment])
8368c9fbc29Smrg   fi
8378c9fbc29Smrg
8388c9fbc29Smrg   test "$[2]" = conftest.file
8398c9fbc29Smrg   )
8408c9fbc29Smrgthen
8418c9fbc29Smrg   # Ok.
8428c9fbc29Smrg   :
8438c9fbc29Smrgelse
8448c9fbc29Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
8458c9fbc29SmrgCheck your system clock])
8468c9fbc29Smrgfi
8478c9fbc29SmrgAC_MSG_RESULT(yes)])
8488c9fbc29Smrg
8494e411241Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
8504e411241Smrg#
8514e411241Smrg# This file is free software; the Free Software Foundation
8524e411241Smrg# gives unlimited permission to copy and/or distribute it,
8534e411241Smrg# with or without modifications, as long as this notice is preserved.
8544e411241Smrg
8554e411241Smrg# serial 1
8564e411241Smrg
8574e411241Smrg# AM_SILENT_RULES([DEFAULT])
8584e411241Smrg# --------------------------
8594e411241Smrg# Enable less verbose build rules; with the default set to DEFAULT
8604e411241Smrg# (`yes' being less verbose, `no' or empty being verbose).
8614e411241SmrgAC_DEFUN([AM_SILENT_RULES],
8624e411241Smrg[AC_ARG_ENABLE([silent-rules],
8634e411241Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8644e411241Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
8654e411241Smrgcase $enable_silent_rules in
8664e411241Smrgyes) AM_DEFAULT_VERBOSITY=0;;
8674e411241Smrgno)  AM_DEFAULT_VERBOSITY=1;;
8684e411241Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8694e411241Smrgesac
8704e411241SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8714e411241SmrgAM_BACKSLASH='\'
8724e411241SmrgAC_SUBST([AM_BACKSLASH])dnl
8734e411241Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8744e411241Smrg])
8754e411241Smrg
8768c9fbc29Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8778c9fbc29Smrg#
8788c9fbc29Smrg# This file is free software; the Free Software Foundation
8798c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
8808c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
8818c9fbc29Smrg
8828c9fbc29Smrg# AM_PROG_INSTALL_STRIP
8838c9fbc29Smrg# ---------------------
8848c9fbc29Smrg# One issue with vendor `install' (even GNU) is that you can't
8858c9fbc29Smrg# specify the program used to strip binaries.  This is especially
8868c9fbc29Smrg# annoying in cross-compiling environments, where the build's strip
8878c9fbc29Smrg# is unlikely to handle the host's binaries.
8888c9fbc29Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
8898c9fbc29Smrg# always use install-sh in `make install-strip', and initialize
8908c9fbc29Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
8918c9fbc29SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
8928c9fbc29Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
8938c9fbc29Smrg# Installed binaries are usually stripped using `strip' when the user
8948c9fbc29Smrg# run `make install-strip'.  However `strip' might not be the right
8958c9fbc29Smrg# tool to use in cross-compilation environments, therefore Automake
8968c9fbc29Smrg# will honor the `STRIP' environment variable to overrule this program.
8978c9fbc29Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
8988c9fbc29Smrgif test "$cross_compiling" != no; then
8998c9fbc29Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9008c9fbc29Smrgfi
9018c9fbc29SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9028c9fbc29SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9038c9fbc29Smrg
9044e411241Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9058c9fbc29Smrg#
9068c9fbc29Smrg# This file is free software; the Free Software Foundation
9078c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
9088c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
9098c9fbc29Smrg
9104e411241Smrg# serial 2
9114e411241Smrg
9128c9fbc29Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
9138c9fbc29Smrg# ---------------------------
9144e411241Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9158c9fbc29Smrg# This macro is traced by Automake.
9168c9fbc29SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9178c9fbc29Smrg
9184e411241Smrg# AM_SUBST_NOTMAKE(VARIABLE)
9194e411241Smrg# ---------------------------
9204e411241Smrg# Public sister of _AM_SUBST_NOTMAKE.
9214e411241SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9224e411241Smrg
9238c9fbc29Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9248c9fbc29Smrg
9258c9fbc29Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9268c9fbc29Smrg#
9278c9fbc29Smrg# This file is free software; the Free Software Foundation
9288c9fbc29Smrg# gives unlimited permission to copy and/or distribute it,
9298c9fbc29Smrg# with or without modifications, as long as this notice is preserved.
9308c9fbc29Smrg
9318c9fbc29Smrg# serial 2
9328c9fbc29Smrg
9338c9fbc29Smrg# _AM_PROG_TAR(FORMAT)
9348c9fbc29Smrg# --------------------
9358c9fbc29Smrg# Check how to create a tarball in format FORMAT.
9368c9fbc29Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9378c9fbc29Smrg#
9388c9fbc29Smrg# Substitute a variable $(am__tar) that is a command
9398c9fbc29Smrg# writing to stdout a FORMAT-tarball containing the directory
9408c9fbc29Smrg# $tardir.
9418c9fbc29Smrg#     tardir=directory && $(am__tar) > result.tar
9428c9fbc29Smrg#
9438c9fbc29Smrg# Substitute a variable $(am__untar) that extract such
9448c9fbc29Smrg# a tarball read from stdin.
9458c9fbc29Smrg#     $(am__untar) < result.tar
9468c9fbc29SmrgAC_DEFUN([_AM_PROG_TAR],
9478c9fbc29Smrg[# Always define AMTAR for backward compatibility.
9488c9fbc29SmrgAM_MISSING_PROG([AMTAR], [tar])
9498c9fbc29Smrgm4_if([$1], [v7],
9508c9fbc29Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9518c9fbc29Smrg     [m4_case([$1], [ustar],, [pax],,
9528c9fbc29Smrg              [m4_fatal([Unknown tar format])])
9538c9fbc29SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9548c9fbc29Smrg# Loop over all known methods to create a tar archive until one works.
9558c9fbc29Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9568c9fbc29Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9578c9fbc29Smrg# Do not fold the above two line into one, because Tru64 sh and
9588c9fbc29Smrg# Solaris sh will not grok spaces in the rhs of `-'.
9598c9fbc29Smrgfor _am_tool in $_am_tools
9608c9fbc29Smrgdo
9618c9fbc29Smrg  case $_am_tool in
9628c9fbc29Smrg  gnutar)
9638c9fbc29Smrg    for _am_tar in tar gnutar gtar;
9648c9fbc29Smrg    do
9658c9fbc29Smrg      AM_RUN_LOG([$_am_tar --version]) && break
9668c9fbc29Smrg    done
9678c9fbc29Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9688c9fbc29Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9698c9fbc29Smrg    am__untar="$_am_tar -xf -"
9708c9fbc29Smrg    ;;
9718c9fbc29Smrg  plaintar)
9728c9fbc29Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9738c9fbc29Smrg    # ustar tarball either.
9748c9fbc29Smrg    (tar --version) >/dev/null 2>&1 && continue
9758c9fbc29Smrg    am__tar='tar chf - "$$tardir"'
9768c9fbc29Smrg    am__tar_='tar chf - "$tardir"'
9778c9fbc29Smrg    am__untar='tar xf -'
9788c9fbc29Smrg    ;;
9798c9fbc29Smrg  pax)
9808c9fbc29Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
9818c9fbc29Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
9828c9fbc29Smrg    am__untar='pax -r'
9838c9fbc29Smrg    ;;
9848c9fbc29Smrg  cpio)
9858c9fbc29Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
9868c9fbc29Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
9878c9fbc29Smrg    am__untar='cpio -i -H $1 -d'
9888c9fbc29Smrg    ;;
9898c9fbc29Smrg  none)
9908c9fbc29Smrg    am__tar=false
9918c9fbc29Smrg    am__tar_=false
9928c9fbc29Smrg    am__untar=false
9938c9fbc29Smrg    ;;
9948c9fbc29Smrg  esac
9958c9fbc29Smrg
9968c9fbc29Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
9978c9fbc29Smrg  # and am__untar set.
9988c9fbc29Smrg  test -n "${am_cv_prog_tar_$1}" && break
9998c9fbc29Smrg
10008c9fbc29Smrg  # tar/untar a dummy directory, and stop if the command works
10018c9fbc29Smrg  rm -rf conftest.dir
10028c9fbc29Smrg  mkdir conftest.dir
10038c9fbc29Smrg  echo GrepMe > conftest.dir/file
10048c9fbc29Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10058c9fbc29Smrg  rm -rf conftest.dir
10068c9fbc29Smrg  if test -s conftest.tar; then
10078c9fbc29Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
10088c9fbc29Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10098c9fbc29Smrg  fi
10108c9fbc29Smrgdone
10118c9fbc29Smrgrm -rf conftest.dir
10128c9fbc29Smrg
10138c9fbc29SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10148c9fbc29SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
10158c9fbc29SmrgAC_SUBST([am__tar])
10168c9fbc29SmrgAC_SUBST([am__untar])
10178c9fbc29Smrg]) # _AM_PROG_TAR
10188c9fbc29Smrg
10194cd6a3aeSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
10204cd6a3aeSmrg# 
10214cd6a3aeSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
10224e411241Smrg#
10234cd6a3aeSmrg# This program is free software; you can redistribute it and/or modify
10244cd6a3aeSmrg# it under the terms of the GNU General Public License as published by
10254cd6a3aeSmrg# the Free Software Foundation; either version 2 of the License, or
10264cd6a3aeSmrg# (at your option) any later version.
10274e411241Smrg#
10284cd6a3aeSmrg# This program is distributed in the hope that it will be useful, but
10294cd6a3aeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
10304cd6a3aeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
10314cd6a3aeSmrg# General Public License for more details.
10324e411241Smrg#
10334cd6a3aeSmrg# You should have received a copy of the GNU General Public License
10344cd6a3aeSmrg# along with this program; if not, write to the Free Software
10354cd6a3aeSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
10364e411241Smrg#
10374cd6a3aeSmrg# As a special exception to the GNU General Public License, if you
10384cd6a3aeSmrg# distribute this file as part of a program that contains a
10394cd6a3aeSmrg# configuration script generated by Autoconf, you may include it under
10404cd6a3aeSmrg# the same distribution terms that you use for the rest of that program.
10414e411241Smrg
10424cd6a3aeSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
10434cd6a3aeSmrg# ----------------------------------
10444cd6a3aeSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
10454cd6a3aeSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
10464cd6a3aeSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
10474cd6a3aeSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
10484cd6a3aeSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
10494cd6a3aeSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
10504e411241Smrgfi
10514cd6a3aeSmrgif test -n "$PKG_CONFIG"; then
10524cd6a3aeSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
10534cd6a3aeSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
10544cd6a3aeSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
10554e411241Smrg		AC_MSG_RESULT([yes])
10564e411241Smrg	else
10574cd6a3aeSmrg		AC_MSG_RESULT([no])
10584cd6a3aeSmrg		PKG_CONFIG=""
10594e411241Smrg	fi
10604cd6a3aeSmrg		
10614cd6a3aeSmrgfi[]dnl
10624cd6a3aeSmrg])# PKG_PROG_PKG_CONFIG
10634e411241Smrg
10644cd6a3aeSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
10654e411241Smrg#
10664cd6a3aeSmrg# Check to see whether a particular set of modules exists.  Similar
10674cd6a3aeSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
10684cd6a3aeSmrg#
10694cd6a3aeSmrg#
10704cd6a3aeSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
10714cd6a3aeSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
10724cd6a3aeSmrg# PKG_CHECK_EXISTS manually
10734cd6a3aeSmrg# --------------------------------------------------------------
10744cd6a3aeSmrgAC_DEFUN([PKG_CHECK_EXISTS],
10754cd6a3aeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
10764cd6a3aeSmrgif test -n "$PKG_CONFIG" && \
10774cd6a3aeSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
10784cd6a3aeSmrg  m4_ifval([$2], [$2], [:])
10794cd6a3aeSmrgm4_ifvaln([$3], [else
10804cd6a3aeSmrg  $3])dnl
10814cd6a3aeSmrgfi])
10824e411241Smrg
10834e411241Smrg
10844cd6a3aeSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
10854cd6a3aeSmrg# ---------------------------------------------
10864cd6a3aeSmrgm4_define([_PKG_CONFIG],
10874cd6a3aeSmrg[if test -n "$$1"; then
10884cd6a3aeSmrg    pkg_cv_[]$1="$$1"
10894cd6a3aeSmrg elif test -n "$PKG_CONFIG"; then
10904cd6a3aeSmrg    PKG_CHECK_EXISTS([$3],
10914cd6a3aeSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
10924cd6a3aeSmrg		     [pkg_failed=yes])
10934cd6a3aeSmrg else
10944cd6a3aeSmrg    pkg_failed=untried
10954cd6a3aeSmrgfi[]dnl
10964cd6a3aeSmrg])# _PKG_CONFIG
10974e411241Smrg
10984cd6a3aeSmrg# _PKG_SHORT_ERRORS_SUPPORTED
10994cd6a3aeSmrg# -----------------------------
11004cd6a3aeSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
11014cd6a3aeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
11024cd6a3aeSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
11034cd6a3aeSmrg        _pkg_short_errors_supported=yes
11044cd6a3aeSmrgelse
11054cd6a3aeSmrg        _pkg_short_errors_supported=no
11064cd6a3aeSmrgfi[]dnl
11074cd6a3aeSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
11084e411241Smrg
11094e411241Smrg
11104cd6a3aeSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
11114cd6a3aeSmrg# [ACTION-IF-NOT-FOUND])
11124cd6a3aeSmrg#
11134cd6a3aeSmrg#
11144cd6a3aeSmrg# Note that if there is a possibility the first call to
11154cd6a3aeSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
11164cd6a3aeSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
11174cd6a3aeSmrg#
11184cd6a3aeSmrg#
11194cd6a3aeSmrg# --------------------------------------------------------------
11204cd6a3aeSmrgAC_DEFUN([PKG_CHECK_MODULES],
11214cd6a3aeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
11224cd6a3aeSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
11234cd6a3aeSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
11244e411241Smrg
11254cd6a3aeSmrgpkg_failed=no
11264cd6a3aeSmrgAC_MSG_CHECKING([for $1])
11274e411241Smrg
11284cd6a3aeSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
11294cd6a3aeSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
11304e411241Smrg
11314cd6a3aeSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
11324cd6a3aeSmrgand $1[]_LIBS to avoid the need to call pkg-config.
11334cd6a3aeSmrgSee the pkg-config man page for more details.])
11344e411241Smrg
11354cd6a3aeSmrgif test $pkg_failed = yes; then
11364cd6a3aeSmrg        _PKG_SHORT_ERRORS_SUPPORTED
11374cd6a3aeSmrg        if test $_pkg_short_errors_supported = yes; then
11384cd6a3aeSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
11394cd6a3aeSmrg        else 
11404cd6a3aeSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
11414cd6a3aeSmrg        fi
11424cd6a3aeSmrg	# Put the nasty error message in config.log where it belongs
11434cd6a3aeSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
11444e411241Smrg
11454cd6a3aeSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
11464cd6a3aeSmrg[Package requirements ($2) were not met:
11474e411241Smrg
11484cd6a3aeSmrg$$1_PKG_ERRORS
11494e411241Smrg
11504cd6a3aeSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
11514cd6a3aeSmrginstalled software in a non-standard prefix.
11524e411241Smrg
11534cd6a3aeSmrg_PKG_TEXT
11544cd6a3aeSmrg])],
11554cd6a3aeSmrg		[AC_MSG_RESULT([no])
11564cd6a3aeSmrg                $4])
11574cd6a3aeSmrgelif test $pkg_failed = untried; then
11584cd6a3aeSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
11594cd6a3aeSmrg[The pkg-config script could not be found or is too old.  Make sure it
11604cd6a3aeSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
11614cd6a3aeSmrgpath to pkg-config.
11624e411241Smrg
11634cd6a3aeSmrg_PKG_TEXT
11644e411241Smrg
11654cd6a3aeSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
11664cd6a3aeSmrg		[$4])
11674cd6a3aeSmrgelse
11684cd6a3aeSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
11694cd6a3aeSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
11704cd6a3aeSmrg        AC_MSG_RESULT([yes])
11714cd6a3aeSmrg	ifelse([$3], , :, [$3])
11724cd6a3aeSmrgfi[]dnl
11734cd6a3aeSmrg])# PKG_CHECK_MODULES
11744e411241Smrg
11754cd6a3aeSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
11764cd6a3aeSmrg#
11774cd6a3aeSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
11784cd6a3aeSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
11794cd6a3aeSmrg#                 Inc.
11804cd6a3aeSmrg#   Written by Gordon Matzigkeit, 1996
11814cd6a3aeSmrg#
11824cd6a3aeSmrg# This file is free software; the Free Software Foundation gives
11834cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without
11844cd6a3aeSmrg# modifications, as long as this notice is preserved.
11854cd6a3aeSmrg
11864cd6a3aeSmrgm4_define([_LT_COPYING], [dnl
11874cd6a3aeSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
11884cd6a3aeSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
11894cd6a3aeSmrg#                 Inc.
11904cd6a3aeSmrg#   Written by Gordon Matzigkeit, 1996
11914cd6a3aeSmrg#
11924cd6a3aeSmrg#   This file is part of GNU Libtool.
11934cd6a3aeSmrg#
11944cd6a3aeSmrg# GNU Libtool is free software; you can redistribute it and/or
11954cd6a3aeSmrg# modify it under the terms of the GNU General Public License as
11964cd6a3aeSmrg# published by the Free Software Foundation; either version 2 of
11974cd6a3aeSmrg# the License, or (at your option) any later version.
11984cd6a3aeSmrg#
11994cd6a3aeSmrg# As a special exception to the GNU General Public License,
12004cd6a3aeSmrg# if you distribute this file as part of a program or library that
12014cd6a3aeSmrg# is built using GNU Libtool, you may include this file under the
12024cd6a3aeSmrg# same distribution terms that you use for the rest of that program.
12034cd6a3aeSmrg#
12044cd6a3aeSmrg# GNU Libtool is distributed in the hope that it will be useful,
12054cd6a3aeSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
12064cd6a3aeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12074cd6a3aeSmrg# GNU General Public License for more details.
12084cd6a3aeSmrg#
12094cd6a3aeSmrg# You should have received a copy of the GNU General Public License
12104cd6a3aeSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
12114cd6a3aeSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
12124cd6a3aeSmrg# obtained by writing to the Free Software Foundation, Inc.,
12134cd6a3aeSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
12144cd6a3aeSmrg])
12154e411241Smrg
12164cd6a3aeSmrg# serial 57 LT_INIT
12174e411241Smrg
12184e411241Smrg
12194cd6a3aeSmrg# LT_PREREQ(VERSION)
12204cd6a3aeSmrg# ------------------
12214cd6a3aeSmrg# Complain and exit if this libtool version is less that VERSION.
12224cd6a3aeSmrgm4_defun([LT_PREREQ],
12234cd6a3aeSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
12244cd6a3aeSmrg       [m4_default([$3],
12254cd6a3aeSmrg		   [m4_fatal([Libtool version $1 or higher is required],
12264cd6a3aeSmrg		             63)])],
12274cd6a3aeSmrg       [$2])])
12284e411241Smrg
12294e411241Smrg
12304cd6a3aeSmrg# _LT_CHECK_BUILDDIR
12314cd6a3aeSmrg# ------------------
12324cd6a3aeSmrg# Complain if the absolute build directory name contains unusual characters
12334cd6a3aeSmrgm4_defun([_LT_CHECK_BUILDDIR],
12344cd6a3aeSmrg[case `pwd` in
12354cd6a3aeSmrg  *\ * | *\	*)
12364cd6a3aeSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
12374cd6a3aeSmrgesac
12384cd6a3aeSmrg])
12394e411241Smrg
12404e411241Smrg
12414cd6a3aeSmrg# LT_INIT([OPTIONS])
12424cd6a3aeSmrg# ------------------
12434cd6a3aeSmrgAC_DEFUN([LT_INIT],
12444cd6a3aeSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
12454cd6a3aeSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
12464cd6a3aeSmrgAC_BEFORE([$0], [LT_LANG])dnl
12474cd6a3aeSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
12484cd6a3aeSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
12494cd6a3aeSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
12504cd6a3aeSmrg
12514cd6a3aeSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
12524cd6a3aeSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
12534cd6a3aeSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
12544cd6a3aeSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
12554cd6a3aeSmrgdnl unless we require an AC_DEFUNed macro:
12564cd6a3aeSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
12574cd6a3aeSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
12584cd6a3aeSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
12594cd6a3aeSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
12604cd6a3aeSmrgm4_require([_LT_PROG_LTMAIN])dnl
12614cd6a3aeSmrg
12624cd6a3aeSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
12634cd6a3aeSmrg
12644cd6a3aeSmrgdnl Parse OPTIONS
12654cd6a3aeSmrg_LT_SET_OPTIONS([$0], [$1])
12664e411241Smrg
12674cd6a3aeSmrg# This can be used to rebuild libtool when needed
12684cd6a3aeSmrgLIBTOOL_DEPS="$ltmain"
12694e411241Smrg
12704cd6a3aeSmrg# Always use our own libtool.
12714cd6a3aeSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
12724cd6a3aeSmrgAC_SUBST(LIBTOOL)dnl
12734e411241Smrg
12744cd6a3aeSmrg_LT_SETUP
12754e411241Smrg
12764cd6a3aeSmrg# Only expand once:
12774cd6a3aeSmrgm4_define([LT_INIT])
12784cd6a3aeSmrg])# LT_INIT
12794e411241Smrg
12804cd6a3aeSmrg# Old names:
12814cd6a3aeSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
12824cd6a3aeSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
12834cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
12844cd6a3aeSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
12854cd6a3aeSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
12864e411241Smrg
12874e411241Smrg
12884cd6a3aeSmrg# _LT_CC_BASENAME(CC)
12894cd6a3aeSmrg# -------------------
12904cd6a3aeSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
12914cd6a3aeSmrgm4_defun([_LT_CC_BASENAME],
12924cd6a3aeSmrg[for cc_temp in $1""; do
12934cd6a3aeSmrg  case $cc_temp in
12944cd6a3aeSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
12954cd6a3aeSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
12964cd6a3aeSmrg    \-*) ;;
12974cd6a3aeSmrg    *) break;;
12984cd6a3aeSmrg  esac
12994cd6a3aeSmrgdone
13004cd6a3aeSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
13014cd6a3aeSmrg])
13024e411241Smrg
13034e411241Smrg
13044cd6a3aeSmrg# _LT_FILEUTILS_DEFAULTS
13054e411241Smrg# ----------------------
13064cd6a3aeSmrg# It is okay to use these file commands and assume they have been set
13074cd6a3aeSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
13084cd6a3aeSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
13094cd6a3aeSmrg[: ${CP="cp -f"}
13104cd6a3aeSmrg: ${MV="mv -f"}
13114cd6a3aeSmrg: ${RM="rm -f"}
13124cd6a3aeSmrg])# _LT_FILEUTILS_DEFAULTS
13134cd6a3aeSmrg
13144cd6a3aeSmrg
13154cd6a3aeSmrg# _LT_SETUP
13164cd6a3aeSmrg# ---------
13174cd6a3aeSmrgm4_defun([_LT_SETUP],
13184cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
13194cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
13204cd6a3aeSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
13214cd6a3aeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
13224e411241Smrg
13234cd6a3aeSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
13244cd6a3aeSmrg_LT_DECL([], [host], [0])dnl
13254cd6a3aeSmrg_LT_DECL([], [host_os], [0])dnl
13264cd6a3aeSmrgdnl
13274cd6a3aeSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
13284cd6a3aeSmrg_LT_DECL([], [build], [0])dnl
13294cd6a3aeSmrg_LT_DECL([], [build_os], [0])dnl
13304cd6a3aeSmrgdnl
13314cd6a3aeSmrgAC_REQUIRE([AC_PROG_CC])dnl
13324cd6a3aeSmrgAC_REQUIRE([LT_PATH_LD])dnl
13334cd6a3aeSmrgAC_REQUIRE([LT_PATH_NM])dnl
13344cd6a3aeSmrgdnl
13354cd6a3aeSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
13364cd6a3aeSmrgtest -z "$LN_S" && LN_S="ln -s"
13374cd6a3aeSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
13384cd6a3aeSmrgdnl
13394cd6a3aeSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
13404cd6a3aeSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
13414cd6a3aeSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
13424cd6a3aeSmrgdnl
13434cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
13444cd6a3aeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
13454cd6a3aeSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
13464cd6a3aeSmrgm4_require([_LT_CMD_RELOAD])dnl
13474cd6a3aeSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
13484cd6a3aeSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
13494cd6a3aeSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
13504cd6a3aeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
13514cd6a3aeSmrgm4_require([_LT_WITH_SYSROOT])dnl
13524cd6a3aeSmrg
13534cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([
13544cd6a3aeSmrg# See if we are running on zsh, and set the options which allow our
13554cd6a3aeSmrg# commands through without removal of \ escapes INIT.
13564cd6a3aeSmrgif test -n "\${ZSH_VERSION+set}" ; then
13574cd6a3aeSmrg   setopt NO_GLOB_SUBST
13584e411241Smrgfi
13594cd6a3aeSmrg])
13604cd6a3aeSmrgif test -n "${ZSH_VERSION+set}" ; then
13614cd6a3aeSmrg   setopt NO_GLOB_SUBST
13624e411241Smrgfi
13634e411241Smrg
13644cd6a3aeSmrg_LT_CHECK_OBJDIR
13654e411241Smrg
13664cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl
13674e411241Smrg
13684cd6a3aeSmrgcase $host_os in
13694cd6a3aeSmrgaix3*)
13704cd6a3aeSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
13714cd6a3aeSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
13724cd6a3aeSmrg  # vanish in a puff of smoke.
13734cd6a3aeSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
13744cd6a3aeSmrg    COLLECT_NAMES=
13754cd6a3aeSmrg    export COLLECT_NAMES
13764cd6a3aeSmrg  fi
13774cd6a3aeSmrg  ;;
13784cd6a3aeSmrgesac
13794e411241Smrg
13804cd6a3aeSmrg# Global variables:
13814cd6a3aeSmrgofile=libtool
13824cd6a3aeSmrgcan_build_shared=yes
13834e411241Smrg
13844cd6a3aeSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
13854cd6a3aeSmrg# which needs '.lib').
13864cd6a3aeSmrglibext=a
13874e411241Smrg
13884cd6a3aeSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
13894e411241Smrg
13904cd6a3aeSmrgold_CC="$CC"
13914cd6a3aeSmrgold_CFLAGS="$CFLAGS"
13924e411241Smrg
13934cd6a3aeSmrg# Set sane defaults for various variables
13944cd6a3aeSmrgtest -z "$CC" && CC=cc
13954cd6a3aeSmrgtest -z "$LTCC" && LTCC=$CC
13964cd6a3aeSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
13974cd6a3aeSmrgtest -z "$LD" && LD=ld
13984cd6a3aeSmrgtest -z "$ac_objext" && ac_objext=o
13994e411241Smrg
14004cd6a3aeSmrg_LT_CC_BASENAME([$compiler])
14014e411241Smrg
14024cd6a3aeSmrg# Only perform the check for file, if the check method requires it
14034cd6a3aeSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
14044cd6a3aeSmrgcase $deplibs_check_method in
14054cd6a3aeSmrgfile_magic*)
14064cd6a3aeSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
14074cd6a3aeSmrg    _LT_PATH_MAGIC
14084cd6a3aeSmrg  fi
14094cd6a3aeSmrg  ;;
14104cd6a3aeSmrgesac
14114e411241Smrg
14124cd6a3aeSmrg# Use C for the default configuration in the libtool script
14134cd6a3aeSmrgLT_SUPPORTED_TAG([CC])
14144cd6a3aeSmrg_LT_LANG_C_CONFIG
14154cd6a3aeSmrg_LT_LANG_DEFAULT_CONFIG
14164cd6a3aeSmrg_LT_CONFIG_COMMANDS
14174cd6a3aeSmrg])# _LT_SETUP
14184e411241Smrg
14198c9fbc29Smrg
14204cd6a3aeSmrg# _LT_PREPARE_SED_QUOTE_VARS
14214cd6a3aeSmrg# --------------------------
14224cd6a3aeSmrg# Define a few sed substitution that help us do robust quoting.
14234cd6a3aeSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
14244cd6a3aeSmrg[# Backslashify metacharacters that are still active within
14254cd6a3aeSmrg# double-quoted strings.
14264cd6a3aeSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
14274cd6a3aeSmrg
14284cd6a3aeSmrg# Same as above, but do not quote variable references.
14294cd6a3aeSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
14304cd6a3aeSmrg
14314cd6a3aeSmrg# Sed substitution to delay expansion of an escaped shell variable in a
14324cd6a3aeSmrg# double_quote_subst'ed string.
14334cd6a3aeSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
14344cd6a3aeSmrg
14354cd6a3aeSmrg# Sed substitution to delay expansion of an escaped single quote.
14364cd6a3aeSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
14374cd6a3aeSmrg
14384cd6a3aeSmrg# Sed substitution to avoid accidental globbing in evaled expressions
14394cd6a3aeSmrgno_glob_subst='s/\*/\\\*/g'
14408c9fbc29Smrg])
14418c9fbc29Smrg
14424cd6a3aeSmrg# _LT_PROG_LTMAIN
14434cd6a3aeSmrg# ---------------
14444cd6a3aeSmrg# Note that this code is called both from `configure', and `config.status'
14454cd6a3aeSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
14464cd6a3aeSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
14474cd6a3aeSmrg# so we pass a copy along to make sure it has a sensible value anyway.
14484cd6a3aeSmrgm4_defun([_LT_PROG_LTMAIN],
14494cd6a3aeSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
14504cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
14514cd6a3aeSmrgltmain="$ac_aux_dir/ltmain.sh"
14524cd6a3aeSmrg])# _LT_PROG_LTMAIN
14534e411241Smrg
14548c9fbc29Smrg
14558c9fbc29Smrg
14564cd6a3aeSmrg# So that we can recreate a full libtool script including additional
14574cd6a3aeSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
14584cd6a3aeSmrg# in macros and then make a single call at the end using the `libtool'
14594cd6a3aeSmrg# label.
14608c9fbc29Smrg
14618c9fbc29Smrg
14624cd6a3aeSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
14634cd6a3aeSmrg# ----------------------------------------
14644cd6a3aeSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
14654cd6a3aeSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
14664cd6a3aeSmrg[m4_ifval([$1],
14674cd6a3aeSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
14684cd6a3aeSmrg                     [$1
14694cd6a3aeSmrg])])])
14708c9fbc29Smrg
14714cd6a3aeSmrg# Initialize.
14724cd6a3aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
14738c9fbc29Smrg
14748c9fbc29Smrg
14754cd6a3aeSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
14764cd6a3aeSmrg# ------------------------------
14774cd6a3aeSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
14784cd6a3aeSmrgm4_define([_LT_CONFIG_LIBTOOL],
14794cd6a3aeSmrg[m4_ifval([$1],
14804cd6a3aeSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
14814cd6a3aeSmrg                     [$1
14824cd6a3aeSmrg])])])
14834cd6a3aeSmrg
14844cd6a3aeSmrg# Initialize.
14854cd6a3aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
14864cd6a3aeSmrg
14874cd6a3aeSmrg
14884cd6a3aeSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
14894cd6a3aeSmrg# -----------------------------------------------------
14904cd6a3aeSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
14914cd6a3aeSmrg[_LT_CONFIG_LIBTOOL([$1])
14924cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
14934cd6a3aeSmrg])
14948c9fbc29Smrg
14958c9fbc29Smrg
14964cd6a3aeSmrg# _LT_FORMAT_COMMENT([COMMENT])
14974cd6a3aeSmrg# -----------------------------
14984cd6a3aeSmrg# Add leading comment marks to the start of each line, and a trailing
14994cd6a3aeSmrg# full-stop to the whole comment if one is not present already.
15004cd6a3aeSmrgm4_define([_LT_FORMAT_COMMENT],
15014cd6a3aeSmrg[m4_ifval([$1], [
15024cd6a3aeSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
15034cd6a3aeSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
15044cd6a3aeSmrg)])
15054cd6a3aeSmrg
15064cd6a3aeSmrg
15074cd6a3aeSmrg
15084cd6a3aeSmrg
15094cd6a3aeSmrg
15104cd6a3aeSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
15114cd6a3aeSmrg# -------------------------------------------------------------------
15124cd6a3aeSmrg# CONFIGNAME is the name given to the value in the libtool script.
15134cd6a3aeSmrg# VARNAME is the (base) name used in the configure script.
15144cd6a3aeSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
15154cd6a3aeSmrg# VARNAME.  Any other value will be used directly.
15164cd6a3aeSmrgm4_define([_LT_DECL],
15174cd6a3aeSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
15184cd6a3aeSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
15194cd6a3aeSmrg	[m4_ifval([$1], [$1], [$2])])
15204cd6a3aeSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
15214cd6a3aeSmrg    m4_ifval([$4],
15224cd6a3aeSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
15234cd6a3aeSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
15244cd6a3aeSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
15254cd6a3aeSmrg])
15268c9fbc29Smrg
15278c9fbc29Smrg
15284cd6a3aeSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
15294cd6a3aeSmrg# --------------------------------------------------------
15304cd6a3aeSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
15318c9fbc29Smrg
15328c9fbc29Smrg
15334cd6a3aeSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
15344cd6a3aeSmrg# ------------------------------------------------
15354cd6a3aeSmrgm4_define([lt_decl_tag_varnames],
15364cd6a3aeSmrg[_lt_decl_filter([tagged?], [yes], $@)])
15378c9fbc29Smrg
15388c9fbc29Smrg
15394cd6a3aeSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
15404cd6a3aeSmrg# ---------------------------------------------------------
15414cd6a3aeSmrgm4_define([_lt_decl_filter],
15424cd6a3aeSmrg[m4_case([$#],
15434cd6a3aeSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
15444cd6a3aeSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
15454cd6a3aeSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
15464cd6a3aeSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
15474cd6a3aeSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
15484cd6a3aeSmrg])
15498c9fbc29Smrg
15508c9fbc29Smrg
15514cd6a3aeSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
15524cd6a3aeSmrg# --------------------------------------------------
15534cd6a3aeSmrgm4_define([lt_decl_quote_varnames],
15544cd6a3aeSmrg[_lt_decl_filter([value], [1], $@)])
15558c9fbc29Smrg
15568c9fbc29Smrg
15574cd6a3aeSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
15584cd6a3aeSmrg# ---------------------------------------------------
15594cd6a3aeSmrgm4_define([lt_decl_dquote_varnames],
15604cd6a3aeSmrg[_lt_decl_filter([value], [2], $@)])
15618c9fbc29Smrg
15628c9fbc29Smrg
15634cd6a3aeSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
15644cd6a3aeSmrg# ---------------------------------------------------
15654cd6a3aeSmrgm4_define([lt_decl_varnames_tagged],
15664cd6a3aeSmrg[m4_assert([$# <= 2])dnl
15674cd6a3aeSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
15684cd6a3aeSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
15694cd6a3aeSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
15704cd6a3aeSmrgm4_define([_lt_decl_varnames_tagged],
15714cd6a3aeSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
15728c9fbc29Smrg
15738c9fbc29Smrg
15744cd6a3aeSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
15754cd6a3aeSmrg# ------------------------------------------------
15764cd6a3aeSmrgm4_define([lt_decl_all_varnames],
15774cd6a3aeSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
15784cd6a3aeSmrg     m4_if([$2], [],
15794cd6a3aeSmrg	   m4_quote(lt_decl_varnames),
15804cd6a3aeSmrg	m4_quote(m4_shift($@))))[]dnl
15814cd6a3aeSmrg])
15824cd6a3aeSmrgm4_define([_lt_decl_all_varnames],
15834cd6a3aeSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
15844cd6a3aeSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
15854cd6a3aeSmrg])
15868c9fbc29Smrg
15878c9fbc29Smrg
15884cd6a3aeSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
15894cd6a3aeSmrg# ------------------------------------
15904cd6a3aeSmrg# Quote a variable value, and forward it to `config.status' so that its
15914cd6a3aeSmrg# declaration there will have the same value as in `configure'.  VARNAME
15924cd6a3aeSmrg# must have a single quote delimited value for this to work.
15934cd6a3aeSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
15944cd6a3aeSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
15958c9fbc29Smrg
15968c9fbc29Smrg
15974cd6a3aeSmrg# _LT_CONFIG_STATUS_DECLARATIONS
15984cd6a3aeSmrg# ------------------------------
15994cd6a3aeSmrg# We delimit libtool config variables with single quotes, so when
16004cd6a3aeSmrg# we write them to config.status, we have to be sure to quote all
16014cd6a3aeSmrg# embedded single quotes properly.  In configure, this macro expands
16024cd6a3aeSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
16034cd6a3aeSmrg#
16044cd6a3aeSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
16054cd6a3aeSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
16064cd6a3aeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
16074cd6a3aeSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
16088c9fbc29Smrg
16094e411241Smrg
16104cd6a3aeSmrg# _LT_LIBTOOL_TAGS
16114cd6a3aeSmrg# ----------------
16124cd6a3aeSmrg# Output comment and list of tags supported by the script
16134cd6a3aeSmrgm4_defun([_LT_LIBTOOL_TAGS],
16144cd6a3aeSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
16154cd6a3aeSmrgavailable_tags="_LT_TAGS"dnl
16164cd6a3aeSmrg])
16178c9fbc29Smrg
16188c9fbc29Smrg
16194cd6a3aeSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
16204cd6a3aeSmrg# -----------------------------------
16214cd6a3aeSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
16224cd6a3aeSmrg# expand to a commented shell variable setting:
16234cd6a3aeSmrg#
16244cd6a3aeSmrg#    # Some comment about what VAR is for.
16254cd6a3aeSmrg#    visible_name=$lt_internal_name
16264cd6a3aeSmrgm4_define([_LT_LIBTOOL_DECLARE],
16274cd6a3aeSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
16284cd6a3aeSmrg					   [description])))[]dnl
16294cd6a3aeSmrgm4_pushdef([_libtool_name],
16304cd6a3aeSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
16314cd6a3aeSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
16324cd6a3aeSmrg    [0], [_libtool_name=[$]$1],
16334cd6a3aeSmrg    [1], [_libtool_name=$lt_[]$1],
16344cd6a3aeSmrg    [2], [_libtool_name=$lt_[]$1],
16354cd6a3aeSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
16364cd6a3aeSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
16374cd6a3aeSmrg])
16388c9fbc29Smrg
16398c9fbc29Smrg
16404cd6a3aeSmrg# _LT_LIBTOOL_CONFIG_VARS
16414cd6a3aeSmrg# -----------------------
16424cd6a3aeSmrg# Produce commented declarations of non-tagged libtool config variables
16434cd6a3aeSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
16444cd6a3aeSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
16454cd6a3aeSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
16464cd6a3aeSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
16474cd6a3aeSmrg[m4_foreach([_lt_var],
16484cd6a3aeSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
16494cd6a3aeSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
16508c9fbc29Smrg
16518c9fbc29Smrg
16524cd6a3aeSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
16534cd6a3aeSmrg# -------------------------
16544cd6a3aeSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
16554cd6a3aeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
16564cd6a3aeSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
16578c9fbc29Smrg
16588c9fbc29Smrg
16594cd6a3aeSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
16604cd6a3aeSmrg# ------------------------------
16614cd6a3aeSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
16628c9fbc29Smrg
16638c9fbc29Smrg
16644cd6a3aeSmrg# _LT_CONFIG_COMMANDS
16658c9fbc29Smrg# -------------------
16664cd6a3aeSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
16674cd6a3aeSmrg# variables for single and double quote escaping we saved from calls
16684cd6a3aeSmrg# to _LT_DECL, we can put quote escaped variables declarations
16694cd6a3aeSmrg# into `config.status', and then the shell code to quote escape them in
16704cd6a3aeSmrg# for loops in `config.status'.  Finally, any additional code accumulated
16714cd6a3aeSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
16724cd6a3aeSmrgm4_defun([_LT_CONFIG_COMMANDS],
16734cd6a3aeSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
16744cd6a3aeSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
16754cd6a3aeSmrg	dnl instead of duplicating it all over again into config.status,
16764cd6a3aeSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
16774cd6a3aeSmrg	dnl needs to know what name is stored there:
16784cd6a3aeSmrg        [AC_CONFIG_COMMANDS([libtool],
16794cd6a3aeSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
16804cd6a3aeSmrg    dnl If the libtool generation code is destined for config.status,
16814cd6a3aeSmrg    dnl expand the accumulated commands and init code now:
16824cd6a3aeSmrg    [AC_CONFIG_COMMANDS([libtool],
16834cd6a3aeSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
16844cd6a3aeSmrg])#_LT_CONFIG_COMMANDS
16854cd6a3aeSmrg
16864cd6a3aeSmrg
16874cd6a3aeSmrg# Initialize.
16884cd6a3aeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
16894cd6a3aeSmrg[
16904cd6a3aeSmrg
16914cd6a3aeSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
16924cd6a3aeSmrg# if CDPATH is set.
16934cd6a3aeSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
16944cd6a3aeSmrg
16954cd6a3aeSmrgsed_quote_subst='$sed_quote_subst'
16964cd6a3aeSmrgdouble_quote_subst='$double_quote_subst'
16974cd6a3aeSmrgdelay_variable_subst='$delay_variable_subst'
16984cd6a3aeSmrg_LT_CONFIG_STATUS_DECLARATIONS
16994cd6a3aeSmrgLTCC='$LTCC'
17004cd6a3aeSmrgLTCFLAGS='$LTCFLAGS'
17014cd6a3aeSmrgcompiler='$compiler_DEFAULT'
17024cd6a3aeSmrg
17034cd6a3aeSmrg# A function that is used when there is no print builtin or printf.
17044cd6a3aeSmrgfunc_fallback_echo ()
17054cd6a3aeSmrg{
17064cd6a3aeSmrg  eval 'cat <<_LTECHO_EOF
17074cd6a3aeSmrg\$[]1
17084cd6a3aeSmrg_LTECHO_EOF'
17094cd6a3aeSmrg}
17104cd6a3aeSmrg
17114cd6a3aeSmrg# Quote evaled strings.
17124cd6a3aeSmrgfor var in lt_decl_all_varnames([[ \
17134cd6a3aeSmrg]], lt_decl_quote_varnames); do
17144cd6a3aeSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
17154cd6a3aeSmrg    *[[\\\\\\\`\\"\\\$]]*)
17164cd6a3aeSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
17174cd6a3aeSmrg      ;;
17184cd6a3aeSmrg    *)
17194cd6a3aeSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17204cd6a3aeSmrg      ;;
17214cd6a3aeSmrg    esac
17224cd6a3aeSmrgdone
17234cd6a3aeSmrg
17244cd6a3aeSmrg# Double-quote double-evaled strings.
17254cd6a3aeSmrgfor var in lt_decl_all_varnames([[ \
17264cd6a3aeSmrg]], lt_decl_dquote_varnames); do
17274cd6a3aeSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
17284cd6a3aeSmrg    *[[\\\\\\\`\\"\\\$]]*)
17294cd6a3aeSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
17304cd6a3aeSmrg      ;;
17314cd6a3aeSmrg    *)
17324cd6a3aeSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
17334cd6a3aeSmrg      ;;
17344cd6a3aeSmrg    esac
17358c9fbc29Smrgdone
17364cd6a3aeSmrg
17374cd6a3aeSmrg_LT_OUTPUT_LIBTOOL_INIT
17388c9fbc29Smrg])
17398c9fbc29Smrg
17404cd6a3aeSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
17414cd6a3aeSmrg# ------------------------------------
17424cd6a3aeSmrg# Generate a child script FILE with all initialization necessary to
17434cd6a3aeSmrg# reuse the environment learned by the parent script, and make the
17444cd6a3aeSmrg# file executable.  If COMMENT is supplied, it is inserted after the
17454cd6a3aeSmrg# `#!' sequence but before initialization text begins.  After this
17464cd6a3aeSmrg# macro, additional text can be appended to FILE to form the body of
17474cd6a3aeSmrg# the child script.  The macro ends with non-zero status if the
17484cd6a3aeSmrg# file could not be fully written (such as if the disk is full).
17494cd6a3aeSmrgm4_ifdef([AS_INIT_GENERATED],
17504cd6a3aeSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
17514cd6a3aeSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
17524cd6a3aeSmrg[m4_require([AS_PREPARE])]dnl
17534cd6a3aeSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
17544cd6a3aeSmrg[lt_write_fail=0
17554cd6a3aeSmrgcat >$1 <<_ASEOF || lt_write_fail=1
17564cd6a3aeSmrg#! $SHELL
17574cd6a3aeSmrg# Generated by $as_me.
17584cd6a3aeSmrg$2
17594cd6a3aeSmrgSHELL=\${CONFIG_SHELL-$SHELL}
17604cd6a3aeSmrgexport SHELL
17614cd6a3aeSmrg_ASEOF
17624cd6a3aeSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
17634cd6a3aeSmrgAS_SHELL_SANITIZE
17644cd6a3aeSmrg_AS_PREPARE
17654cd6a3aeSmrgexec AS_MESSAGE_FD>&1
17664cd6a3aeSmrg_ASEOF
17674cd6a3aeSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
17684cd6a3aeSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
17694cd6a3aeSmrg
17704cd6a3aeSmrg# LT_OUTPUT
17714cd6a3aeSmrg# ---------
17724cd6a3aeSmrg# This macro allows early generation of the libtool script (before
17734cd6a3aeSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
17744cd6a3aeSmrg# tests.
17754cd6a3aeSmrgAC_DEFUN([LT_OUTPUT],
17764cd6a3aeSmrg[: ${CONFIG_LT=./config.lt}
17774cd6a3aeSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
17784cd6a3aeSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
17794cd6a3aeSmrg[# Run this file to recreate a libtool stub with the current configuration.])
17804cd6a3aeSmrg
17814cd6a3aeSmrgcat >>"$CONFIG_LT" <<\_LTEOF
17824cd6a3aeSmrglt_cl_silent=false
17834cd6a3aeSmrgexec AS_MESSAGE_LOG_FD>>config.log
17844cd6a3aeSmrg{
17854cd6a3aeSmrg  echo
17864cd6a3aeSmrg  AS_BOX([Running $as_me.])
17874cd6a3aeSmrg} >&AS_MESSAGE_LOG_FD
17888c9fbc29Smrg
17894cd6a3aeSmrglt_cl_help="\
17904cd6a3aeSmrg\`$as_me' creates a local libtool stub from the current configuration,
17914cd6a3aeSmrgfor use in further configure time tests before the real libtool is
17924cd6a3aeSmrggenerated.
17934cd6a3aeSmrg
17944cd6a3aeSmrgUsage: $[0] [[OPTIONS]]
17954cd6a3aeSmrg
17964cd6a3aeSmrg  -h, --help      print this help, then exit
17974cd6a3aeSmrg  -V, --version   print version number, then exit
17984cd6a3aeSmrg  -q, --quiet     do not print progress messages
17994cd6a3aeSmrg  -d, --debug     don't remove temporary files
18004cd6a3aeSmrg
18014cd6a3aeSmrgReport bugs to <bug-libtool@gnu.org>."
18024cd6a3aeSmrg
18034cd6a3aeSmrglt_cl_version="\
18044cd6a3aeSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
18054cd6a3aeSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
18064cd6a3aeSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
18074cd6a3aeSmrg
18084cd6a3aeSmrgCopyright (C) 2010 Free Software Foundation, Inc.
18094cd6a3aeSmrgThis config.lt script is free software; the Free Software Foundation
18104cd6a3aeSmrggives unlimited permision to copy, distribute and modify it."
18114cd6a3aeSmrg
18124cd6a3aeSmrgwhile test $[#] != 0
18134cd6a3aeSmrgdo
18144cd6a3aeSmrg  case $[1] in
18154cd6a3aeSmrg    --version | --v* | -V )
18164cd6a3aeSmrg      echo "$lt_cl_version"; exit 0 ;;
18174cd6a3aeSmrg    --help | --h* | -h )
18184cd6a3aeSmrg      echo "$lt_cl_help"; exit 0 ;;
18194cd6a3aeSmrg    --debug | --d* | -d )
18204cd6a3aeSmrg      debug=: ;;
18214cd6a3aeSmrg    --quiet | --q* | --silent | --s* | -q )
18224cd6a3aeSmrg      lt_cl_silent=: ;;
18234cd6a3aeSmrg
18244cd6a3aeSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
18254cd6a3aeSmrgTry \`$[0] --help' for more information.]) ;;
18264cd6a3aeSmrg
18274cd6a3aeSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
18284cd6a3aeSmrgTry \`$[0] --help' for more information.]) ;;
18294cd6a3aeSmrg  esac
18304cd6a3aeSmrg  shift
18314cd6a3aeSmrgdone
18324cd6a3aeSmrg
18334cd6a3aeSmrgif $lt_cl_silent; then
18344cd6a3aeSmrg  exec AS_MESSAGE_FD>/dev/null
18354cd6a3aeSmrgfi
18364cd6a3aeSmrg_LTEOF
18374cd6a3aeSmrg
18384cd6a3aeSmrgcat >>"$CONFIG_LT" <<_LTEOF
18394cd6a3aeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
18404cd6a3aeSmrg_LTEOF
18414cd6a3aeSmrg
18424cd6a3aeSmrgcat >>"$CONFIG_LT" <<\_LTEOF
18434cd6a3aeSmrgAC_MSG_NOTICE([creating $ofile])
18444cd6a3aeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
18454cd6a3aeSmrgAS_EXIT(0)
18464cd6a3aeSmrg_LTEOF
18474cd6a3aeSmrgchmod +x "$CONFIG_LT"
18484cd6a3aeSmrg
18494cd6a3aeSmrg# configure is writing to config.log, but config.lt does its own redirection,
18504cd6a3aeSmrg# appending to config.log, which fails on DOS, as config.log is still kept
18514cd6a3aeSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
18524cd6a3aeSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
18534cd6a3aeSmrglt_cl_success=:
18544cd6a3aeSmrgtest "$silent" = yes &&
18554cd6a3aeSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
18564cd6a3aeSmrgexec AS_MESSAGE_LOG_FD>/dev/null
18574cd6a3aeSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
18584cd6a3aeSmrgexec AS_MESSAGE_LOG_FD>>config.log
18594cd6a3aeSmrg$lt_cl_success || AS_EXIT(1)
18604cd6a3aeSmrg])# LT_OUTPUT
18614cd6a3aeSmrg
18624cd6a3aeSmrg
18634cd6a3aeSmrg# _LT_CONFIG(TAG)
18644cd6a3aeSmrg# ---------------
18654cd6a3aeSmrg# If TAG is the built-in tag, create an initial libtool script with a
18664cd6a3aeSmrg# default configuration from the untagged config vars.  Otherwise add code
18674cd6a3aeSmrg# to config.status for appending the configuration named by TAG from the
18684cd6a3aeSmrg# matching tagged config vars.
18694cd6a3aeSmrgm4_defun([_LT_CONFIG],
18704cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
18714cd6a3aeSmrg_LT_CONFIG_SAVE_COMMANDS([
18724cd6a3aeSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
18734cd6a3aeSmrg  m4_if(_LT_TAG, [C], [
18744cd6a3aeSmrg    # See if we are running on zsh, and set the options which allow our
18754cd6a3aeSmrg    # commands through without removal of \ escapes.
18764cd6a3aeSmrg    if test -n "${ZSH_VERSION+set}" ; then
18774cd6a3aeSmrg      setopt NO_GLOB_SUBST
18784cd6a3aeSmrg    fi
18794cd6a3aeSmrg
18804cd6a3aeSmrg    cfgfile="${ofile}T"
18814cd6a3aeSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
18824cd6a3aeSmrg    $RM "$cfgfile"
18834cd6a3aeSmrg
18844cd6a3aeSmrg    cat <<_LT_EOF >> "$cfgfile"
18854cd6a3aeSmrg#! $SHELL
18864cd6a3aeSmrg
18874cd6a3aeSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
18884cd6a3aeSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
18894cd6a3aeSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
18904cd6a3aeSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
18914cd6a3aeSmrg#
18924cd6a3aeSmrg_LT_COPYING
18934cd6a3aeSmrg_LT_LIBTOOL_TAGS
18944cd6a3aeSmrg
18954cd6a3aeSmrg# ### BEGIN LIBTOOL CONFIG
18964cd6a3aeSmrg_LT_LIBTOOL_CONFIG_VARS
18974cd6a3aeSmrg_LT_LIBTOOL_TAG_VARS
18984cd6a3aeSmrg# ### END LIBTOOL CONFIG
18994cd6a3aeSmrg
19004cd6a3aeSmrg_LT_EOF
19014cd6a3aeSmrg
19024cd6a3aeSmrg  case $host_os in
19034cd6a3aeSmrg  aix3*)
19044cd6a3aeSmrg    cat <<\_LT_EOF >> "$cfgfile"
19054cd6a3aeSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
19064cd6a3aeSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
19074cd6a3aeSmrg# vanish in a puff of smoke.
19084cd6a3aeSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
19094cd6a3aeSmrg  COLLECT_NAMES=
19104cd6a3aeSmrg  export COLLECT_NAMES
19114cd6a3aeSmrgfi
19124cd6a3aeSmrg_LT_EOF
19134cd6a3aeSmrg    ;;
19144cd6a3aeSmrg  esac
19154cd6a3aeSmrg
19164cd6a3aeSmrg  _LT_PROG_LTMAIN
19174cd6a3aeSmrg
19184cd6a3aeSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
19194cd6a3aeSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
19204cd6a3aeSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
19214cd6a3aeSmrg  # is reportedly fixed, but why not run on old versions too?
19224cd6a3aeSmrg  sed '$q' "$ltmain" >> "$cfgfile" \
19234cd6a3aeSmrg     || (rm -f "$cfgfile"; exit 1)
19244cd6a3aeSmrg
19254cd6a3aeSmrg  _LT_PROG_REPLACE_SHELLFNS
19264cd6a3aeSmrg
19274cd6a3aeSmrg   mv -f "$cfgfile" "$ofile" ||
19284cd6a3aeSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
19294cd6a3aeSmrg  chmod +x "$ofile"
19304cd6a3aeSmrg],
19314cd6a3aeSmrg[cat <<_LT_EOF >> "$ofile"
19324cd6a3aeSmrg
19334cd6a3aeSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
19344cd6a3aeSmrgdnl in a comment (ie after a #).
19354cd6a3aeSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
19364cd6a3aeSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
19374cd6a3aeSmrg# ### END LIBTOOL TAG CONFIG: $1
19384cd6a3aeSmrg_LT_EOF
19394cd6a3aeSmrg])dnl /m4_if
19404cd6a3aeSmrg],
19414cd6a3aeSmrg[m4_if([$1], [], [
19424cd6a3aeSmrg    PACKAGE='$PACKAGE'
19434cd6a3aeSmrg    VERSION='$VERSION'
19444cd6a3aeSmrg    TIMESTAMP='$TIMESTAMP'
19454cd6a3aeSmrg    RM='$RM'
19464cd6a3aeSmrg    ofile='$ofile'], [])
19474cd6a3aeSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
19484cd6a3aeSmrg])# _LT_CONFIG
19494cd6a3aeSmrg
19504cd6a3aeSmrg
19514cd6a3aeSmrg# LT_SUPPORTED_TAG(TAG)
19524cd6a3aeSmrg# ---------------------
19534cd6a3aeSmrg# Trace this macro to discover what tags are supported by the libtool
19544cd6a3aeSmrg# --tag option, using:
19554cd6a3aeSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
19564cd6a3aeSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
19574cd6a3aeSmrg
19584cd6a3aeSmrg
19594cd6a3aeSmrg# C support is built-in for now
19604cd6a3aeSmrgm4_define([_LT_LANG_C_enabled], [])
19614cd6a3aeSmrgm4_define([_LT_TAGS], [])
19624cd6a3aeSmrg
19634cd6a3aeSmrg
19644cd6a3aeSmrg# LT_LANG(LANG)
19654cd6a3aeSmrg# -------------
19664cd6a3aeSmrg# Enable libtool support for the given language if not already enabled.
19674cd6a3aeSmrgAC_DEFUN([LT_LANG],
19684cd6a3aeSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
19694cd6a3aeSmrgm4_case([$1],
19704cd6a3aeSmrg  [C],			[_LT_LANG(C)],
19714cd6a3aeSmrg  [C++],		[_LT_LANG(CXX)],
19724cd6a3aeSmrg  [Java],		[_LT_LANG(GCJ)],
19734cd6a3aeSmrg  [Fortran 77],		[_LT_LANG(F77)],
19744cd6a3aeSmrg  [Fortran],		[_LT_LANG(FC)],
19754cd6a3aeSmrg  [Windows Resource],	[_LT_LANG(RC)],
19764cd6a3aeSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
19774cd6a3aeSmrg    [_LT_LANG($1)],
19784cd6a3aeSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
19794cd6a3aeSmrg])# LT_LANG
19804cd6a3aeSmrg
19814cd6a3aeSmrg
19824cd6a3aeSmrg# _LT_LANG(LANGNAME)
19834cd6a3aeSmrg# ------------------
19844cd6a3aeSmrgm4_defun([_LT_LANG],
19854cd6a3aeSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
19864cd6a3aeSmrg  [LT_SUPPORTED_TAG([$1])dnl
19874cd6a3aeSmrg  m4_append([_LT_TAGS], [$1 ])dnl
19884cd6a3aeSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
19894cd6a3aeSmrg  _LT_LANG_$1_CONFIG($1)])dnl
19904cd6a3aeSmrg])# _LT_LANG
19914cd6a3aeSmrg
19924cd6a3aeSmrg
19934cd6a3aeSmrg# _LT_LANG_DEFAULT_CONFIG
19944cd6a3aeSmrg# -----------------------
19954cd6a3aeSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
19964cd6a3aeSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
19974cd6a3aeSmrg  [LT_LANG(CXX)],
19984cd6a3aeSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
19994cd6a3aeSmrg
20004cd6a3aeSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
20014cd6a3aeSmrg  [LT_LANG(F77)],
20024cd6a3aeSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
20034cd6a3aeSmrg
20044cd6a3aeSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
20054cd6a3aeSmrg  [LT_LANG(FC)],
20064cd6a3aeSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
20074cd6a3aeSmrg
20084cd6a3aeSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
20094cd6a3aeSmrgdnl pulling things in needlessly.
20104cd6a3aeSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
20114cd6a3aeSmrg  [LT_LANG(GCJ)],
20124cd6a3aeSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
20134cd6a3aeSmrg    [LT_LANG(GCJ)],
20144cd6a3aeSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
20154cd6a3aeSmrg      [LT_LANG(GCJ)],
20164cd6a3aeSmrg      [m4_ifdef([AC_PROG_GCJ],
20174cd6a3aeSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
20184cd6a3aeSmrg       m4_ifdef([A][M_PROG_GCJ],
20194cd6a3aeSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
20204cd6a3aeSmrg       m4_ifdef([LT_PROG_GCJ],
20214cd6a3aeSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
20224cd6a3aeSmrg
20234cd6a3aeSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
20244cd6a3aeSmrg  [LT_LANG(RC)],
20254cd6a3aeSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
20264cd6a3aeSmrg])# _LT_LANG_DEFAULT_CONFIG
20274cd6a3aeSmrg
20284cd6a3aeSmrg# Obsolete macros:
20294cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
20304cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
20314cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
20324cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
20334cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
20344cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
20354cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
20364cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
20374cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
20384cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
20394cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
20404cd6a3aeSmrg
20414cd6a3aeSmrg
20424cd6a3aeSmrg# _LT_TAG_COMPILER
20434cd6a3aeSmrg# ----------------
20444cd6a3aeSmrgm4_defun([_LT_TAG_COMPILER],
20454cd6a3aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl
20464cd6a3aeSmrg
20474cd6a3aeSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
20484cd6a3aeSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
20494cd6a3aeSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
20504cd6a3aeSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
20514cd6a3aeSmrg
20524cd6a3aeSmrg# If no C compiler was specified, use CC.
20534cd6a3aeSmrgLTCC=${LTCC-"$CC"}
20544cd6a3aeSmrg
20554cd6a3aeSmrg# If no C compiler flags were specified, use CFLAGS.
20564cd6a3aeSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
20574cd6a3aeSmrg
20584cd6a3aeSmrg# Allow CC to be a program name with arguments.
20594cd6a3aeSmrgcompiler=$CC
20604cd6a3aeSmrg])# _LT_TAG_COMPILER
20614cd6a3aeSmrg
20624cd6a3aeSmrg
20634cd6a3aeSmrg# _LT_COMPILER_BOILERPLATE
20644cd6a3aeSmrg# ------------------------
20654cd6a3aeSmrg# Check for compiler boilerplate output or warnings with
20664cd6a3aeSmrg# the simple compiler test code.
20674cd6a3aeSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
20684cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl
20694cd6a3aeSmrgac_outfile=conftest.$ac_objext
20704cd6a3aeSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
20714cd6a3aeSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20724cd6a3aeSmrg_lt_compiler_boilerplate=`cat conftest.err`
20734cd6a3aeSmrg$RM conftest*
20744cd6a3aeSmrg])# _LT_COMPILER_BOILERPLATE
20758c9fbc29Smrg
20768c9fbc29Smrg
20778c9fbc29Smrg# _LT_LINKER_BOILERPLATE
20788c9fbc29Smrg# ----------------------
20798c9fbc29Smrg# Check for linker boilerplate output or warnings with
20808c9fbc29Smrg# the simple link test code.
20814cd6a3aeSmrgm4_defun([_LT_LINKER_BOILERPLATE],
20824cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl
20834e411241Smrgac_outfile=conftest.$ac_objext
20844e411241Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
20858c9fbc29Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
20868c9fbc29Smrg_lt_linker_boilerplate=`cat conftest.err`
20874cd6a3aeSmrg$RM -r conftest*
20888c9fbc29Smrg])# _LT_LINKER_BOILERPLATE
20898c9fbc29Smrg
20904e411241Smrg# _LT_REQUIRED_DARWIN_CHECKS
20914cd6a3aeSmrg# -------------------------
20924cd6a3aeSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
20934e411241Smrg  case $host_os in
20944e411241Smrg    rhapsody* | darwin*)
20954e411241Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
20964e411241Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
20974cd6a3aeSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
20984cd6a3aeSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
20994cd6a3aeSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
21004cd6a3aeSmrg    _LT_DECL([], [DSYMUTIL], [1],
21014cd6a3aeSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
21024cd6a3aeSmrg    _LT_DECL([], [NMEDIT], [1],
21034cd6a3aeSmrg      [Tool to change global to local symbols on Mac OS X])
21044cd6a3aeSmrg    _LT_DECL([], [LIPO], [1],
21054cd6a3aeSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
21064cd6a3aeSmrg    _LT_DECL([], [OTOOL], [1],
21074cd6a3aeSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
21084cd6a3aeSmrg    _LT_DECL([], [OTOOL64], [1],
21094cd6a3aeSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
21104e411241Smrg
21114e411241Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
21124e411241Smrg      [lt_cv_apple_cc_single_mod=no
21134e411241Smrg      if test -z "${LT_MULTI_MODULE}"; then
21144cd6a3aeSmrg	# By default we will add the -single_module flag. You can override
21154cd6a3aeSmrg	# by either setting the environment variable LT_MULTI_MODULE
21164cd6a3aeSmrg	# non-empty at configure time, or by adding -multi_module to the
21174cd6a3aeSmrg	# link flags.
21184cd6a3aeSmrg	rm -rf libconftest.dylib*
21194cd6a3aeSmrg	echo "int foo(void){return 1;}" > conftest.c
21204cd6a3aeSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
21214cd6a3aeSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
21224cd6a3aeSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
21234cd6a3aeSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
21244cd6a3aeSmrg        _lt_result=$?
21254cd6a3aeSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
21264cd6a3aeSmrg	  lt_cv_apple_cc_single_mod=yes
21274cd6a3aeSmrg	else
21284cd6a3aeSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
21294cd6a3aeSmrg	fi
21304cd6a3aeSmrg	rm -rf libconftest.dylib*
21314cd6a3aeSmrg	rm -f conftest.*
21324e411241Smrg      fi])
21334e411241Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
21344e411241Smrg      [lt_cv_ld_exported_symbols_list],
21354e411241Smrg      [lt_cv_ld_exported_symbols_list=no
21364e411241Smrg      save_LDFLAGS=$LDFLAGS
21374e411241Smrg      echo "_main" > conftest.sym
21384e411241Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
21394e411241Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
21404cd6a3aeSmrg	[lt_cv_ld_exported_symbols_list=yes],
21414cd6a3aeSmrg	[lt_cv_ld_exported_symbols_list=no])
21424cd6a3aeSmrg	LDFLAGS="$save_LDFLAGS"
21434cd6a3aeSmrg    ])
21444cd6a3aeSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
21454cd6a3aeSmrg      [lt_cv_ld_force_load=no
21464cd6a3aeSmrg      cat > conftest.c << _LT_EOF
21474cd6a3aeSmrgint forced_loaded() { return 2;}
21484cd6a3aeSmrg_LT_EOF
21494cd6a3aeSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
21504cd6a3aeSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
21514cd6a3aeSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
21524cd6a3aeSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
21534cd6a3aeSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
21544cd6a3aeSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
21554cd6a3aeSmrg      cat > conftest.c << _LT_EOF
21564cd6a3aeSmrgint main() { return 0;}
21574cd6a3aeSmrg_LT_EOF
21584cd6a3aeSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
21594cd6a3aeSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
21604cd6a3aeSmrg      _lt_result=$?
21614cd6a3aeSmrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
21624cd6a3aeSmrg	lt_cv_ld_force_load=yes
21634cd6a3aeSmrg      else
21644cd6a3aeSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
21654cd6a3aeSmrg      fi
21664cd6a3aeSmrg        rm -f conftest.err libconftest.a conftest conftest.c
21674cd6a3aeSmrg        rm -rf conftest.dSYM
21684e411241Smrg    ])
21694e411241Smrg    case $host_os in
21704cd6a3aeSmrg    rhapsody* | darwin1.[[012]])
21714e411241Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
21724e411241Smrg    darwin1.*)
21734cd6a3aeSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
21744cd6a3aeSmrg    darwin*) # darwin 5.x on
21754e411241Smrg      # if running on 10.5 or later, the deployment target defaults
21764e411241Smrg      # to the OS version, if on x86, and 10.4, the deployment
21774e411241Smrg      # target defaults to 10.4. Don't you love it?
21784e411241Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
21794cd6a3aeSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
21804cd6a3aeSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
21814cd6a3aeSmrg	10.[[012]]*)
21824cd6a3aeSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
21834cd6a3aeSmrg	10.*)
21844cd6a3aeSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
21854e411241Smrg      esac
21864e411241Smrg    ;;
21874e411241Smrg  esac
21884e411241Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
21894e411241Smrg      _lt_dar_single_mod='$single_module'
21904e411241Smrg    fi
21914e411241Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
21924e411241Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
21934e411241Smrg    else
21944cd6a3aeSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
21954e411241Smrg    fi
21964cd6a3aeSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
21974cd6a3aeSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
21984e411241Smrg    else
21994e411241Smrg      _lt_dsymutil=
22004e411241Smrg    fi
22014e411241Smrg    ;;
22024e411241Smrg  esac
22034e411241Smrg])
22048c9fbc29Smrg
22054cd6a3aeSmrg
22064cd6a3aeSmrg# _LT_DARWIN_LINKER_FEATURES
22074cd6a3aeSmrg# --------------------------
22084cd6a3aeSmrg# Checks for linker and compiler features on darwin
22094cd6a3aeSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
22104cd6a3aeSmrg[
22114cd6a3aeSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
22124cd6a3aeSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
22134cd6a3aeSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
22144cd6a3aeSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
22154cd6a3aeSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
22164cd6a3aeSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
22174cd6a3aeSmrg    _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\"`'
22184cd6a3aeSmrg  else
22194cd6a3aeSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
22204cd6a3aeSmrg  fi
22214cd6a3aeSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
22224cd6a3aeSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
22234cd6a3aeSmrg  case $cc_basename in
22244cd6a3aeSmrg     ifort*) _lt_dar_can_shared=yes ;;
22254cd6a3aeSmrg     *) _lt_dar_can_shared=$GCC ;;
22264cd6a3aeSmrg  esac
22274cd6a3aeSmrg  if test "$_lt_dar_can_shared" = "yes"; then
22284cd6a3aeSmrg    output_verbose_link_cmd=func_echo_all
22294cd6a3aeSmrg    _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}"
22304cd6a3aeSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
22314cd6a3aeSmrg    _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}"
22324cd6a3aeSmrg    _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}"
22334cd6a3aeSmrg    m4_if([$1], [CXX],
22344cd6a3aeSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
22354cd6a3aeSmrg      _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}"
22364cd6a3aeSmrg      _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}"
22374cd6a3aeSmrg    fi
22384cd6a3aeSmrg],[])
22394cd6a3aeSmrg  else
22404cd6a3aeSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
22414cd6a3aeSmrg  fi
22424cd6a3aeSmrg])
22434cd6a3aeSmrg
22444cd6a3aeSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
22454cd6a3aeSmrg# ----------------------------------
22468c9fbc29Smrg# Links a minimal program and checks the executable
22478c9fbc29Smrg# for the system default hardcoded library path. In most cases,
22488c9fbc29Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
22498c9fbc29Smrg# the location of the communication and MPI libs are included too.
22508c9fbc29Smrg# If we don't find anything, use the default library path according
22518c9fbc29Smrg# to the aix ld manual.
22524cd6a3aeSmrg# Store the results from the different compilers for each TAGNAME.
22534cd6a3aeSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
22544cd6a3aeSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
22554cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl
22564cd6a3aeSmrgif test "${lt_cv_aix_libpath+set}" = set; then
22574cd6a3aeSmrg  aix_libpath=$lt_cv_aix_libpath
22588c9fbc29Smrgelse
22594cd6a3aeSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
22604cd6a3aeSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
22614cd6a3aeSmrg  lt_aix_libpath_sed='[
22624cd6a3aeSmrg      /Import File Strings/,/^$/ {
22634cd6a3aeSmrg	  /^0/ {
22644cd6a3aeSmrg	      s/^0  *\([^ ]*\) *$/\1/
22654cd6a3aeSmrg	      p
22664cd6a3aeSmrg	  }
22674cd6a3aeSmrg      }]'
22684cd6a3aeSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22694cd6a3aeSmrg  # Check for a 64-bit object if we didn't find anything.
22704cd6a3aeSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
22714cd6a3aeSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
22724cd6a3aeSmrg  fi],[])
22734cd6a3aeSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
22744cd6a3aeSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
22754cd6a3aeSmrg  fi
22764cd6a3aeSmrg  ])
22774cd6a3aeSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
22788c9fbc29Smrgfi
22794cd6a3aeSmrg])# _LT_SYS_MODULE_PATH_AIX
22808c9fbc29Smrg
22818c9fbc29Smrg
22824cd6a3aeSmrg# _LT_SHELL_INIT(ARG)
22834cd6a3aeSmrg# -------------------
22844cd6a3aeSmrgm4_define([_LT_SHELL_INIT],
22854cd6a3aeSmrg[m4_divert_text([M4SH-INIT], [$1
22864cd6a3aeSmrg])])# _LT_SHELL_INIT
22878c9fbc29Smrg
22888c9fbc29Smrg
22894cd6a3aeSmrg
22904cd6a3aeSmrg# _LT_PROG_ECHO_BACKSLASH
22914cd6a3aeSmrg# -----------------------
22924cd6a3aeSmrg# Find how we can fake an echo command that does not interpret backslash.
22934cd6a3aeSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
22944cd6a3aeSmrg# of the generated configure script which will find a shell with a builtin
22954cd6a3aeSmrg# printf (which we can use as an echo command).
22964cd6a3aeSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
22974cd6a3aeSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
22984cd6a3aeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
22994cd6a3aeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
23004cd6a3aeSmrg
23014cd6a3aeSmrgAC_MSG_CHECKING([how to print strings])
23024cd6a3aeSmrg# Test print first, because it will be a builtin if present.
23034cd6a3aeSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
23044cd6a3aeSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
23054cd6a3aeSmrg  ECHO='print -r --'
23064cd6a3aeSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
23074cd6a3aeSmrg  ECHO='printf %s\n'
23088c9fbc29Smrgelse
23094cd6a3aeSmrg  # Use this function as a fallback that always works.
23104cd6a3aeSmrg  func_fallback_echo ()
23114cd6a3aeSmrg  {
23124cd6a3aeSmrg    eval 'cat <<_LTECHO_EOF
23134cd6a3aeSmrg$[]1
23144cd6a3aeSmrg_LTECHO_EOF'
23154cd6a3aeSmrg  }
23164cd6a3aeSmrg  ECHO='func_fallback_echo'
23174cd6a3aeSmrgfi
23188c9fbc29Smrg
23194cd6a3aeSmrg# func_echo_all arg...
23204cd6a3aeSmrg# Invoke $ECHO with all args, space-separated.
23214cd6a3aeSmrgfunc_echo_all ()
23224cd6a3aeSmrg{
23234cd6a3aeSmrg    $ECHO "$*" 
23244cd6a3aeSmrg}
23258c9fbc29Smrg
23264cd6a3aeSmrgcase "$ECHO" in
23274cd6a3aeSmrg  printf*) AC_MSG_RESULT([printf]) ;;
23284cd6a3aeSmrg  print*) AC_MSG_RESULT([print -r]) ;;
23294cd6a3aeSmrg  *) AC_MSG_RESULT([cat]) ;;
23304cd6a3aeSmrgesac
23318c9fbc29Smrg
23324cd6a3aeSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
23334cd6a3aeSmrg[_AS_DETECT_SUGGESTED([
23344cd6a3aeSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
23354cd6a3aeSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
23364cd6a3aeSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
23374cd6a3aeSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
23384cd6a3aeSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
23394cd6a3aeSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
23404cd6a3aeSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
23418c9fbc29Smrg
23424cd6a3aeSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
23434cd6a3aeSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
23444cd6a3aeSmrg])# _LT_PROG_ECHO_BACKSLASH
23458c9fbc29Smrg
23468c9fbc29Smrg
23474cd6a3aeSmrg# _LT_WITH_SYSROOT
23484cd6a3aeSmrg# ----------------
23494cd6a3aeSmrgAC_DEFUN([_LT_WITH_SYSROOT],
23504cd6a3aeSmrg[AC_MSG_CHECKING([for sysroot])
23514cd6a3aeSmrgAC_ARG_WITH([sysroot],
23524cd6a3aeSmrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
23534cd6a3aeSmrg                        (or the compiler's sysroot if not specified).],
23544cd6a3aeSmrg[], [with_sysroot=no])
23554cd6a3aeSmrg
23564cd6a3aeSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
23574cd6a3aeSmrgdnl in case the user passed a directory name.
23584cd6a3aeSmrglt_sysroot=
23594cd6a3aeSmrgcase ${with_sysroot} in #(
23604cd6a3aeSmrg yes)
23614cd6a3aeSmrg   if test "$GCC" = yes; then
23624cd6a3aeSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
23634cd6a3aeSmrg   fi
23644cd6a3aeSmrg   ;; #(
23654cd6a3aeSmrg /*)
23664cd6a3aeSmrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
23674cd6a3aeSmrg   ;; #(
23684cd6a3aeSmrg no|'')
23694cd6a3aeSmrg   ;; #(
23704cd6a3aeSmrg *)
23714cd6a3aeSmrg   AC_MSG_RESULT([${with_sysroot}])
23724cd6a3aeSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
23734cd6a3aeSmrg   ;;
23744cd6a3aeSmrgesac
23758c9fbc29Smrg
23764cd6a3aeSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
23774cd6a3aeSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
23784cd6a3aeSmrg[dependent libraries, and in which our libraries should be installed.])])
23798c9fbc29Smrg
23804cd6a3aeSmrg# _LT_ENABLE_LOCK
23814cd6a3aeSmrg# ---------------
23824cd6a3aeSmrgm4_defun([_LT_ENABLE_LOCK],
23838c9fbc29Smrg[AC_ARG_ENABLE([libtool-lock],
23844cd6a3aeSmrg  [AS_HELP_STRING([--disable-libtool-lock],
23854cd6a3aeSmrg    [avoid locking (might break parallel builds)])])
23868c9fbc29Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
23878c9fbc29Smrg
23888c9fbc29Smrg# Some flags need to be propagated to the compiler or linker for good
23898c9fbc29Smrg# libtool support.
23908c9fbc29Smrgcase $host in
23918c9fbc29Smrgia64-*-hpux*)
23928c9fbc29Smrg  # Find out which ABI we are using.
23938c9fbc29Smrg  echo 'int i;' > conftest.$ac_ext
23948c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
23958c9fbc29Smrg    case `/usr/bin/file conftest.$ac_objext` in
23964cd6a3aeSmrg      *ELF-32*)
23974cd6a3aeSmrg	HPUX_IA64_MODE="32"
23984cd6a3aeSmrg	;;
23994cd6a3aeSmrg      *ELF-64*)
24004cd6a3aeSmrg	HPUX_IA64_MODE="64"
24014cd6a3aeSmrg	;;
24028c9fbc29Smrg    esac
24038c9fbc29Smrg  fi
24048c9fbc29Smrg  rm -rf conftest*
24058c9fbc29Smrg  ;;
24068c9fbc29Smrg*-*-irix6*)
24078c9fbc29Smrg  # Find out which ABI we are using.
24084cd6a3aeSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
24098c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
24104cd6a3aeSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
24114cd6a3aeSmrg      case `/usr/bin/file conftest.$ac_objext` in
24124cd6a3aeSmrg	*32-bit*)
24134cd6a3aeSmrg	  LD="${LD-ld} -melf32bsmip"
24144cd6a3aeSmrg	  ;;
24154cd6a3aeSmrg	*N32*)
24164cd6a3aeSmrg	  LD="${LD-ld} -melf32bmipn32"
24174cd6a3aeSmrg	  ;;
24184cd6a3aeSmrg	*64-bit*)
24194cd6a3aeSmrg	  LD="${LD-ld} -melf64bmip"
24204cd6a3aeSmrg	;;
24214cd6a3aeSmrg      esac
24224cd6a3aeSmrg    else
24234cd6a3aeSmrg      case `/usr/bin/file conftest.$ac_objext` in
24244cd6a3aeSmrg	*32-bit*)
24254cd6a3aeSmrg	  LD="${LD-ld} -32"
24264cd6a3aeSmrg	  ;;
24274cd6a3aeSmrg	*N32*)
24284cd6a3aeSmrg	  LD="${LD-ld} -n32"
24294cd6a3aeSmrg	  ;;
24304cd6a3aeSmrg	*64-bit*)
24314cd6a3aeSmrg	  LD="${LD-ld} -64"
24324cd6a3aeSmrg	  ;;
24334cd6a3aeSmrg      esac
24344cd6a3aeSmrg    fi
24358c9fbc29Smrg  fi
24368c9fbc29Smrg  rm -rf conftest*
24378c9fbc29Smrg  ;;
24388c9fbc29Smrg
24394e411241Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
24404cd6a3aeSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
24418c9fbc29Smrg  # Find out which ABI we are using.
24428c9fbc29Smrg  echo 'int i;' > conftest.$ac_ext
24438c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
24448c9fbc29Smrg    case `/usr/bin/file conftest.o` in
24454cd6a3aeSmrg      *32-bit*)
24464cd6a3aeSmrg	case $host in
24474cd6a3aeSmrg	  x86_64-*kfreebsd*-gnu)
24484cd6a3aeSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
24494cd6a3aeSmrg	    ;;
24504cd6a3aeSmrg	  x86_64-*linux*)
24514cd6a3aeSmrg	    LD="${LD-ld} -m elf_i386"
24524cd6a3aeSmrg	    ;;
24534cd6a3aeSmrg	  ppc64-*linux*|powerpc64-*linux*)
24544cd6a3aeSmrg	    LD="${LD-ld} -m elf32ppclinux"
24554cd6a3aeSmrg	    ;;
24564cd6a3aeSmrg	  s390x-*linux*)
24574cd6a3aeSmrg	    LD="${LD-ld} -m elf_s390"
24584cd6a3aeSmrg	    ;;
24594cd6a3aeSmrg	  sparc64-*linux*)
24604cd6a3aeSmrg	    LD="${LD-ld} -m elf32_sparc"
24614cd6a3aeSmrg	    ;;
24624cd6a3aeSmrg	esac
24634cd6a3aeSmrg	;;
24644cd6a3aeSmrg      *64-bit*)
24654cd6a3aeSmrg	case $host in
24664cd6a3aeSmrg	  x86_64-*kfreebsd*-gnu)
24674cd6a3aeSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
24684cd6a3aeSmrg	    ;;
24694cd6a3aeSmrg	  x86_64-*linux*)
24704cd6a3aeSmrg	    LD="${LD-ld} -m elf_x86_64"
24714cd6a3aeSmrg	    ;;
24724cd6a3aeSmrg	  ppc*-*linux*|powerpc*-*linux*)
24734cd6a3aeSmrg	    LD="${LD-ld} -m elf64ppc"
24744cd6a3aeSmrg	    ;;
24754cd6a3aeSmrg	  s390*-*linux*|s390*-*tpf*)
24764cd6a3aeSmrg	    LD="${LD-ld} -m elf64_s390"
24774cd6a3aeSmrg	    ;;
24784cd6a3aeSmrg	  sparc*-*linux*)
24794cd6a3aeSmrg	    LD="${LD-ld} -m elf64_sparc"
24804cd6a3aeSmrg	    ;;
24814cd6a3aeSmrg	esac
24824cd6a3aeSmrg	;;
24838c9fbc29Smrg    esac
24848c9fbc29Smrg  fi
24858c9fbc29Smrg  rm -rf conftest*
24868c9fbc29Smrg  ;;
24878c9fbc29Smrg
24888c9fbc29Smrg*-*-sco3.2v5*)
24898c9fbc29Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
24908c9fbc29Smrg  SAVE_CFLAGS="$CFLAGS"
24918c9fbc29Smrg  CFLAGS="$CFLAGS -belf"
24928c9fbc29Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
24938c9fbc29Smrg    [AC_LANG_PUSH(C)
24944cd6a3aeSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
24958c9fbc29Smrg     AC_LANG_POP])
24968c9fbc29Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
24978c9fbc29Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
24988c9fbc29Smrg    CFLAGS="$SAVE_CFLAGS"
24998c9fbc29Smrg  fi
25008c9fbc29Smrg  ;;
25018c9fbc29Smrgsparc*-*solaris*)
25028c9fbc29Smrg  # Find out which ABI we are using.
25038c9fbc29Smrg  echo 'int i;' > conftest.$ac_ext
25048c9fbc29Smrg  if AC_TRY_EVAL(ac_compile); then
25058c9fbc29Smrg    case `/usr/bin/file conftest.o` in
25068c9fbc29Smrg    *64-bit*)
25078c9fbc29Smrg      case $lt_cv_prog_gnu_ld in
25088c9fbc29Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
25094e411241Smrg      *)
25104cd6a3aeSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
25114e411241Smrg	  LD="${LD-ld} -64"
25124e411241Smrg	fi
25134e411241Smrg	;;
25148c9fbc29Smrg      esac
25158c9fbc29Smrg      ;;
25168c9fbc29Smrg    esac
25178c9fbc29Smrg  fi
25188c9fbc29Smrg  rm -rf conftest*
25198c9fbc29Smrg  ;;
25208c9fbc29Smrgesac
25218c9fbc29Smrg
25228c9fbc29Smrgneed_locks="$enable_libtool_lock"
25234cd6a3aeSmrg])# _LT_ENABLE_LOCK
25248c9fbc29Smrg
25258c9fbc29Smrg
25264cd6a3aeSmrg# _LT_PROG_AR
25274cd6a3aeSmrg# -----------
25284cd6a3aeSmrgm4_defun([_LT_PROG_AR],
25294cd6a3aeSmrg[AC_CHECK_TOOLS(AR, [ar], false)
25304cd6a3aeSmrg: ${AR=ar}
25314cd6a3aeSmrg: ${AR_FLAGS=cru}
25324cd6a3aeSmrg_LT_DECL([], [AR], [1], [The archiver])
25334cd6a3aeSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
25344cd6a3aeSmrg
25354cd6a3aeSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
25364cd6a3aeSmrg  [lt_cv_ar_at_file=no
25374cd6a3aeSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
25384cd6a3aeSmrg     [echo conftest.$ac_objext > conftest.lst
25394cd6a3aeSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
25404cd6a3aeSmrg      AC_TRY_EVAL([lt_ar_try])
25414cd6a3aeSmrg      if test "$ac_status" -eq 0; then
25424cd6a3aeSmrg	# Ensure the archiver fails upon bogus file names.
25434cd6a3aeSmrg	rm -f conftest.$ac_objext libconftest.a
25444cd6a3aeSmrg	AC_TRY_EVAL([lt_ar_try])
25454cd6a3aeSmrg	if test "$ac_status" -ne 0; then
25464cd6a3aeSmrg          lt_cv_ar_at_file=@
25474cd6a3aeSmrg        fi
25484cd6a3aeSmrg      fi
25494cd6a3aeSmrg      rm -f conftest.* libconftest.a
25504cd6a3aeSmrg     ])
25514cd6a3aeSmrg  ])
25528c9fbc29Smrg
25534cd6a3aeSmrgif test "x$lt_cv_ar_at_file" = xno; then
25544cd6a3aeSmrg  archiver_list_spec=
25554cd6a3aeSmrgelse
25564cd6a3aeSmrg  archiver_list_spec=$lt_cv_ar_at_file
25574cd6a3aeSmrgfi
25584cd6a3aeSmrg_LT_DECL([], [archiver_list_spec], [1],
25594cd6a3aeSmrg  [How to feed a file listing to the archiver])
25604cd6a3aeSmrg])# _LT_PROG_AR
25614cd6a3aeSmrg
25624cd6a3aeSmrg
25634cd6a3aeSmrg# _LT_CMD_OLD_ARCHIVE
25644cd6a3aeSmrg# -------------------
25654cd6a3aeSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
25664cd6a3aeSmrg[_LT_PROG_AR
25674cd6a3aeSmrg
25684cd6a3aeSmrgAC_CHECK_TOOL(STRIP, strip, :)
25694cd6a3aeSmrgtest -z "$STRIP" && STRIP=:
25704cd6a3aeSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
25714cd6a3aeSmrg
25724cd6a3aeSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
25734cd6a3aeSmrgtest -z "$RANLIB" && RANLIB=:
25744cd6a3aeSmrg_LT_DECL([], [RANLIB], [1],
25754cd6a3aeSmrg    [Commands used to install an old-style archive])
25764cd6a3aeSmrg
25774cd6a3aeSmrg# Determine commands to create old-style static archives.
25784cd6a3aeSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
25794cd6a3aeSmrgold_postinstall_cmds='chmod 644 $oldlib'
25804cd6a3aeSmrgold_postuninstall_cmds=
25814cd6a3aeSmrg
25824cd6a3aeSmrgif test -n "$RANLIB"; then
25834cd6a3aeSmrg  case $host_os in
25844cd6a3aeSmrg  openbsd*)
25854cd6a3aeSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
25864cd6a3aeSmrg    ;;
25874cd6a3aeSmrg  *)
25884cd6a3aeSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
25894cd6a3aeSmrg    ;;
25904cd6a3aeSmrg  esac
25914cd6a3aeSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
25924cd6a3aeSmrgfi
25934cd6a3aeSmrg
25944cd6a3aeSmrgcase $host_os in
25954cd6a3aeSmrg  darwin*)
25964cd6a3aeSmrg    lock_old_archive_extraction=yes ;;
25974cd6a3aeSmrg  *)
25984cd6a3aeSmrg    lock_old_archive_extraction=no ;;
25994cd6a3aeSmrgesac
26004cd6a3aeSmrg_LT_DECL([], [old_postinstall_cmds], [2])
26014cd6a3aeSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
26024cd6a3aeSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
26034cd6a3aeSmrg    [Commands used to build an old-style archive])
26044cd6a3aeSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
26054cd6a3aeSmrg    [Whether to use a lock for old archive extraction])
26064cd6a3aeSmrg])# _LT_CMD_OLD_ARCHIVE
26074cd6a3aeSmrg
26084cd6a3aeSmrg
26094cd6a3aeSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
26104cd6a3aeSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
26114cd6a3aeSmrg# ----------------------------------------------------------------
26124cd6a3aeSmrg# Check whether the given compiler option works
26134cd6a3aeSmrgAC_DEFUN([_LT_COMPILER_OPTION],
26144cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
26154cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl
26164cd6a3aeSmrgAC_CACHE_CHECK([$1], [$2],
26174cd6a3aeSmrg  [$2=no
26184cd6a3aeSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
26194cd6a3aeSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
26204cd6a3aeSmrg   lt_compiler_flag="$3"
26214cd6a3aeSmrg   # Insert the option either (1) after the last *FLAGS variable, or
26224cd6a3aeSmrg   # (2) before a word containing "conftest.", or (3) at the end.
26234cd6a3aeSmrg   # Note that $ac_compile itself does not contain backslashes and begins
26244cd6a3aeSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
26254cd6a3aeSmrg   # The option is referenced via a variable to avoid confusing sed.
26264cd6a3aeSmrg   lt_compile=`echo "$ac_compile" | $SED \
26274cd6a3aeSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
26284cd6a3aeSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
26294cd6a3aeSmrg   -e 's:$: $lt_compiler_flag:'`
26304cd6a3aeSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
26314cd6a3aeSmrg   (eval "$lt_compile" 2>conftest.err)
26324cd6a3aeSmrg   ac_status=$?
26334cd6a3aeSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
26344cd6a3aeSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
26354cd6a3aeSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
26364cd6a3aeSmrg     # The compiler can only warn and ignore the option if not recognized
26374cd6a3aeSmrg     # So say no if there are warnings other than the usual output.
26384cd6a3aeSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
26394cd6a3aeSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
26404cd6a3aeSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
26414cd6a3aeSmrg       $2=yes
26428c9fbc29Smrg     fi
26438c9fbc29Smrg   fi
26444cd6a3aeSmrg   $RM conftest*
26458c9fbc29Smrg])
26468c9fbc29Smrg
26478c9fbc29Smrgif test x"[$]$2" = xyes; then
26484cd6a3aeSmrg    m4_if([$5], , :, [$5])
26498c9fbc29Smrgelse
26504cd6a3aeSmrg    m4_if([$6], , :, [$6])
26518c9fbc29Smrgfi
26524cd6a3aeSmrg])# _LT_COMPILER_OPTION
26538c9fbc29Smrg
26544cd6a3aeSmrg# Old name:
26554cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
26564cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
26574cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
26588c9fbc29Smrg
26594cd6a3aeSmrg
26604cd6a3aeSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
26614cd6a3aeSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
26624cd6a3aeSmrg# ----------------------------------------------------
26634cd6a3aeSmrg# Check whether the given linker option works
26644cd6a3aeSmrgAC_DEFUN([_LT_LINKER_OPTION],
26654cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
26664cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl
26674e411241SmrgAC_CACHE_CHECK([$1], [$2],
26688c9fbc29Smrg  [$2=no
26698c9fbc29Smrg   save_LDFLAGS="$LDFLAGS"
26708c9fbc29Smrg   LDFLAGS="$LDFLAGS $3"
26714e411241Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
26728c9fbc29Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
26738c9fbc29Smrg     # The linker can only warn and ignore the option if not recognized
26748c9fbc29Smrg     # So say no if there are warnings
26758c9fbc29Smrg     if test -s conftest.err; then
26768c9fbc29Smrg       # Append any errors to the config.log.
26778c9fbc29Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
26784cd6a3aeSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
26798c9fbc29Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
26808c9fbc29Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
26818c9fbc29Smrg         $2=yes
26828c9fbc29Smrg       fi
26838c9fbc29Smrg     else
26848c9fbc29Smrg       $2=yes
26858c9fbc29Smrg     fi
26868c9fbc29Smrg   fi
26874cd6a3aeSmrg   $RM -r conftest*
26888c9fbc29Smrg   LDFLAGS="$save_LDFLAGS"
26898c9fbc29Smrg])
26908c9fbc29Smrg
26918c9fbc29Smrgif test x"[$]$2" = xyes; then
26924cd6a3aeSmrg    m4_if([$4], , :, [$4])
26938c9fbc29Smrgelse
26944cd6a3aeSmrg    m4_if([$5], , :, [$5])
26958c9fbc29Smrgfi
26964cd6a3aeSmrg])# _LT_LINKER_OPTION
26978c9fbc29Smrg
26984cd6a3aeSmrg# Old name:
26994cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
27004cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
27014cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
27028c9fbc29Smrg
27034cd6a3aeSmrg
27044cd6a3aeSmrg# LT_CMD_MAX_LEN
27054cd6a3aeSmrg#---------------
27064cd6a3aeSmrgAC_DEFUN([LT_CMD_MAX_LEN],
27074cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
27084cd6a3aeSmrg# find the maximum length of command line arguments
27098c9fbc29SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
27108c9fbc29SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
27118c9fbc29Smrg  i=0
27128c9fbc29Smrg  teststring="ABCD"
27138c9fbc29Smrg
27148c9fbc29Smrg  case $build_os in
27158c9fbc29Smrg  msdosdjgpp*)
27168c9fbc29Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
27178c9fbc29Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
27188c9fbc29Smrg    # during glob expansion).  Even if it were fixed, the result of this
27198c9fbc29Smrg    # check would be larger than it should be.
27208c9fbc29Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
27218c9fbc29Smrg    ;;
27228c9fbc29Smrg
27238c9fbc29Smrg  gnu*)
27248c9fbc29Smrg    # Under GNU Hurd, this test is not required because there is
27258c9fbc29Smrg    # no limit to the length of command line arguments.
27268c9fbc29Smrg    # Libtool will interpret -1 as no limit whatsoever
27278c9fbc29Smrg    lt_cv_sys_max_cmd_len=-1;
27288c9fbc29Smrg    ;;
27298c9fbc29Smrg
27304cd6a3aeSmrg  cygwin* | mingw* | cegcc*)
27318c9fbc29Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
27328c9fbc29Smrg    # about 5 minutes as the teststring grows exponentially.
27338c9fbc29Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
27348c9fbc29Smrg    # you end up with a "frozen" computer, even though with patience
27358c9fbc29Smrg    # the test eventually succeeds (with a max line length of 256k).
27368c9fbc29Smrg    # Instead, let's just punt: use the minimum linelength reported by
27378c9fbc29Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
27388c9fbc29Smrg    lt_cv_sys_max_cmd_len=8192;
27398c9fbc29Smrg    ;;
27408c9fbc29Smrg
27414cd6a3aeSmrg  mint*)
27424cd6a3aeSmrg    # On MiNT this can take a long time and run out of memory.
27434cd6a3aeSmrg    lt_cv_sys_max_cmd_len=8192;
27444cd6a3aeSmrg    ;;
27454cd6a3aeSmrg
27468c9fbc29Smrg  amigaos*)
27478c9fbc29Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
27488c9fbc29Smrg    # So we just punt and use a minimum line length of 8192.
27498c9fbc29Smrg    lt_cv_sys_max_cmd_len=8192;
27508c9fbc29Smrg    ;;
27518c9fbc29Smrg
27528c9fbc29Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
27538c9fbc29Smrg    # This has been around since 386BSD, at least.  Likely further.
27548c9fbc29Smrg    if test -x /sbin/sysctl; then
27558c9fbc29Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
27568c9fbc29Smrg    elif test -x /usr/sbin/sysctl; then
27578c9fbc29Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
27588c9fbc29Smrg    else
27598c9fbc29Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
27608c9fbc29Smrg    fi
27618c9fbc29Smrg    # And add a safety zone
27628c9fbc29Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
27638c9fbc29Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
27648c9fbc29Smrg    ;;
27658c9fbc29Smrg
27668c9fbc29Smrg  interix*)
27678c9fbc29Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
27688c9fbc29Smrg    lt_cv_sys_max_cmd_len=196608
27698c9fbc29Smrg    ;;
27708c9fbc29Smrg
27718c9fbc29Smrg  osf*)
27728c9fbc29Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
27738c9fbc29Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
27748c9fbc29Smrg    # nice to cause kernel panics so lets avoid the loop below.
27758c9fbc29Smrg    # First set a reasonable default.
27768c9fbc29Smrg    lt_cv_sys_max_cmd_len=16384
27778c9fbc29Smrg    #
27788c9fbc29Smrg    if test -x /sbin/sysconfig; then
27798c9fbc29Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
27808c9fbc29Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
27818c9fbc29Smrg      esac
27828c9fbc29Smrg    fi
27838c9fbc29Smrg    ;;
27848c9fbc29Smrg  sco3.2v5*)
27858c9fbc29Smrg    lt_cv_sys_max_cmd_len=102400
27868c9fbc29Smrg    ;;
27878c9fbc29Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
27888c9fbc29Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
27898c9fbc29Smrg    if test -n "$kargmax"; then
27904cd6a3aeSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
27918c9fbc29Smrg    else
27928c9fbc29Smrg      lt_cv_sys_max_cmd_len=32768
27938c9fbc29Smrg    fi
27948c9fbc29Smrg    ;;
27958c9fbc29Smrg  *)
27964e411241Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
27974e411241Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
27984e411241Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
27994e411241Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
28004e411241Smrg    else
28014cd6a3aeSmrg      # Make teststring a little bigger before we do anything with it.
28024cd6a3aeSmrg      # a 1K string should be a reasonable start.
28034cd6a3aeSmrg      for i in 1 2 3 4 5 6 7 8 ; do
28044cd6a3aeSmrg        teststring=$teststring$teststring
28054cd6a3aeSmrg      done
28064e411241Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
28074cd6a3aeSmrg      # If test is not a shell built-in, we'll probably end up computing a
28084cd6a3aeSmrg      # maximum length that is only half of the actual maximum length, but
28094cd6a3aeSmrg      # we can't tell.
28104cd6a3aeSmrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
28114cd6a3aeSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
28124e411241Smrg	      test $i != 17 # 1/2 MB should be enough
28134e411241Smrg      do
28144e411241Smrg        i=`expr $i + 1`
28154e411241Smrg        teststring=$teststring$teststring
28164e411241Smrg      done
28174cd6a3aeSmrg      # Only check the string length outside the loop.
28184cd6a3aeSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
28194e411241Smrg      teststring=
28204cd6a3aeSmrg      # Add a significant safety factor because C++ compilers can tack on
28214cd6a3aeSmrg      # massive amounts of additional arguments before passing them to the
28224cd6a3aeSmrg      # linker.  It appears as though 1/2 is a usable value.
28234e411241Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
28244e411241Smrg    fi
28258c9fbc29Smrg    ;;
28268c9fbc29Smrg  esac
28278c9fbc29Smrg])
28288c9fbc29Smrgif test -n $lt_cv_sys_max_cmd_len ; then
28298c9fbc29Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
28308c9fbc29Smrgelse
28318c9fbc29Smrg  AC_MSG_RESULT(none)
28328c9fbc29Smrgfi
28334cd6a3aeSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
28344cd6a3aeSmrg_LT_DECL([], [max_cmd_len], [0],
28354cd6a3aeSmrg    [What is the maximum length of a command?])
28364cd6a3aeSmrg])# LT_CMD_MAX_LEN
28378c9fbc29Smrg
28384cd6a3aeSmrg# Old name:
28394cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
28404cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
28414cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
28428c9fbc29Smrg
28434cd6a3aeSmrg
28444cd6a3aeSmrg# _LT_HEADER_DLFCN
28454cd6a3aeSmrg# ----------------
28464cd6a3aeSmrgm4_defun([_LT_HEADER_DLFCN],
28474cd6a3aeSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
28484cd6a3aeSmrg])# _LT_HEADER_DLFCN
28498c9fbc29Smrg
28508c9fbc29Smrg
28514cd6a3aeSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
28524cd6a3aeSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
28534cd6a3aeSmrg# ----------------------------------------------------------------
28544cd6a3aeSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
28554cd6a3aeSmrg[m4_require([_LT_HEADER_DLFCN])dnl
28568c9fbc29Smrgif test "$cross_compiling" = yes; then :
28578c9fbc29Smrg  [$4]
28588c9fbc29Smrgelse
28598c9fbc29Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
28608c9fbc29Smrg  lt_status=$lt_dlunknown
28614cd6a3aeSmrg  cat > conftest.$ac_ext <<_LT_EOF
28624cd6a3aeSmrg[#line $LINENO "configure"
28638c9fbc29Smrg#include "confdefs.h"
28648c9fbc29Smrg
28658c9fbc29Smrg#if HAVE_DLFCN_H
28668c9fbc29Smrg#include <dlfcn.h>
28678c9fbc29Smrg#endif
28688c9fbc29Smrg
28698c9fbc29Smrg#include <stdio.h>
28708c9fbc29Smrg
28718c9fbc29Smrg#ifdef RTLD_GLOBAL
28728c9fbc29Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
28738c9fbc29Smrg#else
28748c9fbc29Smrg#  ifdef DL_GLOBAL
28758c9fbc29Smrg#    define LT_DLGLOBAL		DL_GLOBAL
28768c9fbc29Smrg#  else
28778c9fbc29Smrg#    define LT_DLGLOBAL		0
28788c9fbc29Smrg#  endif
28798c9fbc29Smrg#endif
28808c9fbc29Smrg
28818c9fbc29Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
28828c9fbc29Smrg   find out it does not work in some platform. */
28838c9fbc29Smrg#ifndef LT_DLLAZY_OR_NOW
28848c9fbc29Smrg#  ifdef RTLD_LAZY
28858c9fbc29Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
28868c9fbc29Smrg#  else
28878c9fbc29Smrg#    ifdef DL_LAZY
28888c9fbc29Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
28898c9fbc29Smrg#    else
28908c9fbc29Smrg#      ifdef RTLD_NOW
28918c9fbc29Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
28928c9fbc29Smrg#      else
28938c9fbc29Smrg#        ifdef DL_NOW
28948c9fbc29Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
28958c9fbc29Smrg#        else
28968c9fbc29Smrg#          define LT_DLLAZY_OR_NOW	0
28978c9fbc29Smrg#        endif
28988c9fbc29Smrg#      endif
28998c9fbc29Smrg#    endif
29008c9fbc29Smrg#  endif
29018c9fbc29Smrg#endif
29028c9fbc29Smrg
29034cd6a3aeSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
29044cd6a3aeSmrg   correspondingly for the symbols needed.  */
29054cd6a3aeSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
29064cd6a3aeSmrgint fnord () __attribute__((visibility("default")));
29078c9fbc29Smrg#endif
29088c9fbc29Smrg
29094cd6a3aeSmrgint fnord () { return 42; }
29108c9fbc29Smrgint main ()
29118c9fbc29Smrg{
29128c9fbc29Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
29138c9fbc29Smrg  int status = $lt_dlunknown;
29148c9fbc29Smrg
29158c9fbc29Smrg  if (self)
29168c9fbc29Smrg    {
29178c9fbc29Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
29184cd6a3aeSmrg      else
29194cd6a3aeSmrg        {
29204cd6a3aeSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
29214cd6a3aeSmrg          else puts (dlerror ());
29224cd6a3aeSmrg	}
29238c9fbc29Smrg      /* dlclose (self); */
29248c9fbc29Smrg    }
29258c9fbc29Smrg  else
29268c9fbc29Smrg    puts (dlerror ());
29278c9fbc29Smrg
29284cd6a3aeSmrg  return status;
29298c9fbc29Smrg}]
29304cd6a3aeSmrg_LT_EOF
29318c9fbc29Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
29328c9fbc29Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
29338c9fbc29Smrg    lt_status=$?
29348c9fbc29Smrg    case x$lt_status in
29358c9fbc29Smrg      x$lt_dlno_uscore) $1 ;;
29368c9fbc29Smrg      x$lt_dlneed_uscore) $2 ;;
29378c9fbc29Smrg      x$lt_dlunknown|x*) $3 ;;
29388c9fbc29Smrg    esac
29398c9fbc29Smrg  else :
29408c9fbc29Smrg    # compilation failed
29418c9fbc29Smrg    $3
29428c9fbc29Smrg  fi
29438c9fbc29Smrgfi
29448c9fbc29Smrgrm -fr conftest*
29454cd6a3aeSmrg])# _LT_TRY_DLOPEN_SELF
29468c9fbc29Smrg
29478c9fbc29Smrg
29484cd6a3aeSmrg# LT_SYS_DLOPEN_SELF
29494cd6a3aeSmrg# ------------------
29504cd6a3aeSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
29514cd6a3aeSmrg[m4_require([_LT_HEADER_DLFCN])dnl
29528c9fbc29Smrgif test "x$enable_dlopen" != xyes; then
29538c9fbc29Smrg  enable_dlopen=unknown
29548c9fbc29Smrg  enable_dlopen_self=unknown
29558c9fbc29Smrg  enable_dlopen_self_static=unknown
29568c9fbc29Smrgelse
29578c9fbc29Smrg  lt_cv_dlopen=no
29588c9fbc29Smrg  lt_cv_dlopen_libs=
29598c9fbc29Smrg
29608c9fbc29Smrg  case $host_os in
29618c9fbc29Smrg  beos*)
29628c9fbc29Smrg    lt_cv_dlopen="load_add_on"
29638c9fbc29Smrg    lt_cv_dlopen_libs=
29648c9fbc29Smrg    lt_cv_dlopen_self=yes
29658c9fbc29Smrg    ;;
29668c9fbc29Smrg
29674cd6a3aeSmrg  mingw* | pw32* | cegcc*)
29688c9fbc29Smrg    lt_cv_dlopen="LoadLibrary"
29698c9fbc29Smrg    lt_cv_dlopen_libs=
29704cd6a3aeSmrg    ;;
29718c9fbc29Smrg
29728c9fbc29Smrg  cygwin*)
29738c9fbc29Smrg    lt_cv_dlopen="dlopen"
29748c9fbc29Smrg    lt_cv_dlopen_libs=
29754cd6a3aeSmrg    ;;
29768c9fbc29Smrg
29778c9fbc29Smrg  darwin*)
29788c9fbc29Smrg  # if libdl is installed we need to link against it
29798c9fbc29Smrg    AC_CHECK_LIB([dl], [dlopen],
29808c9fbc29Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
29818c9fbc29Smrg    lt_cv_dlopen="dyld"
29828c9fbc29Smrg    lt_cv_dlopen_libs=
29838c9fbc29Smrg    lt_cv_dlopen_self=yes
29848c9fbc29Smrg    ])
29854cd6a3aeSmrg    ;;
29868c9fbc29Smrg
29878c9fbc29Smrg  *)
29888c9fbc29Smrg    AC_CHECK_FUNC([shl_load],
29898c9fbc29Smrg	  [lt_cv_dlopen="shl_load"],
29908c9fbc29Smrg      [AC_CHECK_LIB([dld], [shl_load],
29914e411241Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
29928c9fbc29Smrg	[AC_CHECK_FUNC([dlopen],
29938c9fbc29Smrg	      [lt_cv_dlopen="dlopen"],
29948c9fbc29Smrg	  [AC_CHECK_LIB([dl], [dlopen],
29958c9fbc29Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
29968c9fbc29Smrg	    [AC_CHECK_LIB([svld], [dlopen],
29978c9fbc29Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
29988c9fbc29Smrg	      [AC_CHECK_LIB([dld], [dld_link],
29994e411241Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
30008c9fbc29Smrg	      ])
30018c9fbc29Smrg	    ])
30028c9fbc29Smrg	  ])
30038c9fbc29Smrg	])
30048c9fbc29Smrg      ])
30058c9fbc29Smrg    ;;
30068c9fbc29Smrg  esac
30078c9fbc29Smrg
30088c9fbc29Smrg  if test "x$lt_cv_dlopen" != xno; then
30098c9fbc29Smrg    enable_dlopen=yes
30108c9fbc29Smrg  else
30118c9fbc29Smrg    enable_dlopen=no
30128c9fbc29Smrg  fi
30138c9fbc29Smrg
30148c9fbc29Smrg  case $lt_cv_dlopen in
30158c9fbc29Smrg  dlopen)
30168c9fbc29Smrg    save_CPPFLAGS="$CPPFLAGS"
30178c9fbc29Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
30188c9fbc29Smrg
30198c9fbc29Smrg    save_LDFLAGS="$LDFLAGS"
30208c9fbc29Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
30218c9fbc29Smrg
30228c9fbc29Smrg    save_LIBS="$LIBS"
30238c9fbc29Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
30248c9fbc29Smrg
30258c9fbc29Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
30268c9fbc29Smrg	  lt_cv_dlopen_self, [dnl
30274cd6a3aeSmrg	  _LT_TRY_DLOPEN_SELF(
30288c9fbc29Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
30298c9fbc29Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
30308c9fbc29Smrg    ])
30318c9fbc29Smrg
30328c9fbc29Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
30338c9fbc29Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
30348c9fbc29Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
30354cd6a3aeSmrg	  lt_cv_dlopen_self_static, [dnl
30364cd6a3aeSmrg	  _LT_TRY_DLOPEN_SELF(
30378c9fbc29Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
30388c9fbc29Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
30398c9fbc29Smrg      ])
30408c9fbc29Smrg    fi
30418c9fbc29Smrg
30428c9fbc29Smrg    CPPFLAGS="$save_CPPFLAGS"
30438c9fbc29Smrg    LDFLAGS="$save_LDFLAGS"
30448c9fbc29Smrg    LIBS="$save_LIBS"
30458c9fbc29Smrg    ;;
30468c9fbc29Smrg  esac
30478c9fbc29Smrg
30488c9fbc29Smrg  case $lt_cv_dlopen_self in
30498c9fbc29Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
30508c9fbc29Smrg  *) enable_dlopen_self=unknown ;;
30518c9fbc29Smrg  esac
30528c9fbc29Smrg
30538c9fbc29Smrg  case $lt_cv_dlopen_self_static in
30548c9fbc29Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
30558c9fbc29Smrg  *) enable_dlopen_self_static=unknown ;;
30568c9fbc29Smrg  esac
30578c9fbc29Smrgfi
30584cd6a3aeSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
30594cd6a3aeSmrg	 [Whether dlopen is supported])
30604cd6a3aeSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
30614cd6a3aeSmrg	 [Whether dlopen of programs is supported])
30624cd6a3aeSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
30634cd6a3aeSmrg	 [Whether dlopen of statically linked programs is supported])
30644cd6a3aeSmrg])# LT_SYS_DLOPEN_SELF
30658c9fbc29Smrg
30664cd6a3aeSmrg# Old name:
30674cd6a3aeSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
30684cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
30694cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
30708c9fbc29Smrg
30714cd6a3aeSmrg
30724cd6a3aeSmrg# _LT_COMPILER_C_O([TAGNAME])
30734cd6a3aeSmrg# ---------------------------
30744cd6a3aeSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
30754cd6a3aeSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
30764cd6a3aeSmrgm4_defun([_LT_COMPILER_C_O],
30774cd6a3aeSmrg[m4_require([_LT_DECL_SED])dnl
30784cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
30794cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl
30808c9fbc29SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
30814cd6a3aeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
30824cd6a3aeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
30834cd6a3aeSmrg   $RM -r conftest 2>/dev/null
30848c9fbc29Smrg   mkdir conftest
30858c9fbc29Smrg   cd conftest
30868c9fbc29Smrg   mkdir out
30874e411241Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
30888c9fbc29Smrg
30898c9fbc29Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
30908c9fbc29Smrg   # Insert the option either (1) after the last *FLAGS variable, or
30918c9fbc29Smrg   # (2) before a word containing "conftest.", or (3) at the end.
30928c9fbc29Smrg   # Note that $ac_compile itself does not contain backslashes and begins
30938c9fbc29Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
30948c9fbc29Smrg   lt_compile=`echo "$ac_compile" | $SED \
30958c9fbc29Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
30968c9fbc29Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
30978c9fbc29Smrg   -e 's:$: $lt_compiler_flag:'`
30984cd6a3aeSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
30998c9fbc29Smrg   (eval "$lt_compile" 2>out/conftest.err)
31008c9fbc29Smrg   ac_status=$?
31018c9fbc29Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
31024cd6a3aeSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
31038c9fbc29Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
31048c9fbc29Smrg   then
31058c9fbc29Smrg     # The compiler can only warn and ignore the option if not recognized
31068c9fbc29Smrg     # So say no if there are warnings
31074cd6a3aeSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
31088c9fbc29Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
31098c9fbc29Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
31104cd6a3aeSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
31118c9fbc29Smrg     fi
31128c9fbc29Smrg   fi
31138c9fbc29Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
31144cd6a3aeSmrg   $RM conftest*
31158c9fbc29Smrg   # SGI C++ compiler will create directory out/ii_files/ for
31168c9fbc29Smrg   # template instantiation
31174cd6a3aeSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
31184cd6a3aeSmrg   $RM out/* && rmdir out
31198c9fbc29Smrg   cd ..
31204cd6a3aeSmrg   $RM -r conftest
31214cd6a3aeSmrg   $RM conftest*
31228c9fbc29Smrg])
31234cd6a3aeSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
31244cd6a3aeSmrg	[Does compiler simultaneously support -c and -o options?])
31254cd6a3aeSmrg])# _LT_COMPILER_C_O
31268c9fbc29Smrg
31278c9fbc29Smrg
31284cd6a3aeSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
31294cd6a3aeSmrg# ----------------------------------
31308c9fbc29Smrg# Check to see if we can do hard links to lock some files if needed
31314cd6a3aeSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
31324cd6a3aeSmrg[m4_require([_LT_ENABLE_LOCK])dnl
31334cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
31344cd6a3aeSmrg_LT_COMPILER_C_O([$1])
31358c9fbc29Smrg
31368c9fbc29Smrghard_links="nottested"
31374cd6a3aeSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
31388c9fbc29Smrg  # do not overwrite the value of need_locks provided by the user
31398c9fbc29Smrg  AC_MSG_CHECKING([if we can lock with hard links])
31408c9fbc29Smrg  hard_links=yes
31414cd6a3aeSmrg  $RM conftest*
31428c9fbc29Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
31438c9fbc29Smrg  touch conftest.a
31448c9fbc29Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
31458c9fbc29Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
31468c9fbc29Smrg  AC_MSG_RESULT([$hard_links])
31478c9fbc29Smrg  if test "$hard_links" = no; then
31488c9fbc29Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
31498c9fbc29Smrg    need_locks=warn
31508c9fbc29Smrg  fi
31518c9fbc29Smrgelse
31528c9fbc29Smrg  need_locks=no
31538c9fbc29Smrgfi
31544cd6a3aeSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
31554cd6a3aeSmrg])# _LT_COMPILER_FILE_LOCKS
31568c9fbc29Smrg
31578c9fbc29Smrg
31584cd6a3aeSmrg# _LT_CHECK_OBJDIR
31594cd6a3aeSmrg# ----------------
31604cd6a3aeSmrgm4_defun([_LT_CHECK_OBJDIR],
31618c9fbc29Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
31628c9fbc29Smrg[rm -f .libs 2>/dev/null
31638c9fbc29Smrgmkdir .libs 2>/dev/null
31648c9fbc29Smrgif test -d .libs; then
31658c9fbc29Smrg  lt_cv_objdir=.libs
31668c9fbc29Smrgelse
31678c9fbc29Smrg  # MS-DOS does not allow filenames that begin with a dot.
31688c9fbc29Smrg  lt_cv_objdir=_libs
31698c9fbc29Smrgfi
31708c9fbc29Smrgrmdir .libs 2>/dev/null])
31718c9fbc29Smrgobjdir=$lt_cv_objdir
31724cd6a3aeSmrg_LT_DECL([], [objdir], [0],
31734cd6a3aeSmrg         [The name of the directory that contains temporary libtool files])dnl
31744cd6a3aeSmrgm4_pattern_allow([LT_OBJDIR])dnl
31754cd6a3aeSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
31764cd6a3aeSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
31774cd6a3aeSmrg])# _LT_CHECK_OBJDIR
31788c9fbc29Smrg
31798c9fbc29Smrg
31804cd6a3aeSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
31814cd6a3aeSmrg# --------------------------------------
31828c9fbc29Smrg# Check hardcoding attributes.
31834cd6a3aeSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
31848c9fbc29Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
31854cd6a3aeSmrg_LT_TAGVAR(hardcode_action, $1)=
31864cd6a3aeSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
31874cd6a3aeSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
31884cd6a3aeSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
31898c9fbc29Smrg
31904cd6a3aeSmrg  # We can hardcode non-existent directories.
31914cd6a3aeSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
31928c9fbc29Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
31938c9fbc29Smrg     # have to relink, otherwise we might link with an installed library
31948c9fbc29Smrg     # when we should be linking with a yet-to-be-installed one
31954cd6a3aeSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
31964cd6a3aeSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
31978c9fbc29Smrg    # Linking always hardcodes the temporary library directory.
31984cd6a3aeSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
31998c9fbc29Smrg  else
32008c9fbc29Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
32014cd6a3aeSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
32028c9fbc29Smrg  fi
32038c9fbc29Smrgelse
32048c9fbc29Smrg  # We cannot hardcode anything, or else we can only hardcode existing
32058c9fbc29Smrg  # directories.
32064cd6a3aeSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
32078c9fbc29Smrgfi
32084cd6a3aeSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
32098c9fbc29Smrg
32104cd6a3aeSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
32114cd6a3aeSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
32128c9fbc29Smrg  # Fast installation is not supported
32138c9fbc29Smrg  enable_fast_install=no
32148c9fbc29Smrgelif test "$shlibpath_overrides_runpath" = yes ||
32158c9fbc29Smrg     test "$enable_shared" = no; then
32168c9fbc29Smrg  # Fast installation is not necessary
32178c9fbc29Smrg  enable_fast_install=needless
32188c9fbc29Smrgfi
32194cd6a3aeSmrg_LT_TAGDECL([], [hardcode_action], [0],
32204cd6a3aeSmrg    [How to hardcode a shared library path into an executable])
32214cd6a3aeSmrg])# _LT_LINKER_HARDCODE_LIBPATH
32228c9fbc29Smrg
32238c9fbc29Smrg
32244cd6a3aeSmrg# _LT_CMD_STRIPLIB
32254cd6a3aeSmrg# ----------------
32264cd6a3aeSmrgm4_defun([_LT_CMD_STRIPLIB],
32274cd6a3aeSmrg[m4_require([_LT_DECL_EGREP])
32284cd6a3aeSmrgstriplib=
32298c9fbc29Smrgold_striplib=
32308c9fbc29SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
32314cd6a3aeSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
32328c9fbc29Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
32338c9fbc29Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
32348c9fbc29Smrg  AC_MSG_RESULT([yes])
32358c9fbc29Smrgelse
32368c9fbc29Smrg# FIXME - insert some real tests, host_os isn't really good enough
32378c9fbc29Smrg  case $host_os in
32384cd6a3aeSmrg  darwin*)
32394cd6a3aeSmrg    if test -n "$STRIP" ; then
32404cd6a3aeSmrg      striplib="$STRIP -x"
32414cd6a3aeSmrg      old_striplib="$STRIP -S"
32424cd6a3aeSmrg      AC_MSG_RESULT([yes])
32434cd6a3aeSmrg    else
32444cd6a3aeSmrg      AC_MSG_RESULT([no])
32454cd6a3aeSmrg    fi
32464cd6a3aeSmrg    ;;
32474cd6a3aeSmrg  *)
32484cd6a3aeSmrg    AC_MSG_RESULT([no])
32498c9fbc29Smrg    ;;
32508c9fbc29Smrg  esac
32518c9fbc29Smrgfi
32524cd6a3aeSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
32534cd6a3aeSmrg_LT_DECL([], [striplib], [1])
32544cd6a3aeSmrg])# _LT_CMD_STRIPLIB
32558c9fbc29Smrg
32568c9fbc29Smrg
32574cd6a3aeSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
32588c9fbc29Smrg# -----------------------------
32598c9fbc29Smrg# PORTME Fill in your ld.so characteristics
32604cd6a3aeSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
32614cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
32624cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl
32634cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
32644cd6a3aeSmrgm4_require([_LT_DECL_OBJDUMP])dnl
32654cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl
32664cd6a3aeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
32674e411241SmrgAC_MSG_CHECKING([dynamic linker characteristics])
32684cd6a3aeSmrgm4_if([$1],
32694cd6a3aeSmrg	[], [
32708c9fbc29Smrgif test "$GCC" = yes; then
32714e411241Smrg  case $host_os in
32724e411241Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
32734e411241Smrg    *) lt_awk_arg="/^libraries:/" ;;
32744e411241Smrg  esac
32754cd6a3aeSmrg  case $host_os in
32764cd6a3aeSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
32774cd6a3aeSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
32784cd6a3aeSmrg  esac
32794cd6a3aeSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
32804cd6a3aeSmrg  case $lt_search_path_spec in
32814cd6a3aeSmrg  *\;*)
32828c9fbc29Smrg    # if the path contains ";" then we assume it to be the separator
32838c9fbc29Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
32848c9fbc29Smrg    # assumed that no part of a normal pathname contains ";" but that should
32858c9fbc29Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
32864cd6a3aeSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
32874cd6a3aeSmrg    ;;
32884cd6a3aeSmrg  *)
32894cd6a3aeSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
32904cd6a3aeSmrg    ;;
32914cd6a3aeSmrg  esac
32924e411241Smrg  # Ok, now we have the path, separated by spaces, we can step through it
32934e411241Smrg  # and add multilib dir if necessary.
32944e411241Smrg  lt_tmp_lt_search_path_spec=
32954e411241Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
32964e411241Smrg  for lt_sys_path in $lt_search_path_spec; do
32974e411241Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
32984e411241Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
32994e411241Smrg    else
33004e411241Smrg      test -d "$lt_sys_path" && \
33014e411241Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
33024e411241Smrg    fi
33034e411241Smrg  done
33044cd6a3aeSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
33054e411241SmrgBEGIN {RS=" "; FS="/|\n";} {
33064e411241Smrg  lt_foo="";
33074e411241Smrg  lt_count=0;
33084e411241Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
33094e411241Smrg    if ($lt_i != "" && $lt_i != ".") {
33104e411241Smrg      if ($lt_i == "..") {
33114e411241Smrg        lt_count++;
33124e411241Smrg      } else {
33134e411241Smrg        if (lt_count == 0) {
33144e411241Smrg          lt_foo="/" $lt_i lt_foo;
33154e411241Smrg        } else {
33164e411241Smrg          lt_count--;
33174e411241Smrg        }
33184e411241Smrg      }
33194e411241Smrg    }
33204e411241Smrg  }
33214e411241Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
33224e411241Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
33234e411241Smrg}'`
33244cd6a3aeSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
33254cd6a3aeSmrg  # for these hosts.
33264cd6a3aeSmrg  case $host_os in
33274cd6a3aeSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
33284cd6a3aeSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
33294cd6a3aeSmrg  esac
33304cd6a3aeSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
33318c9fbc29Smrgelse
33328c9fbc29Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
33334e411241Smrgfi])
33344cd6a3aeSmrglibrary_names_spec=
33354cd6a3aeSmrglibname_spec='lib$name'
33364cd6a3aeSmrgsoname_spec=
33374cd6a3aeSmrgshrext_cmds=".so"
33384cd6a3aeSmrgpostinstall_cmds=
33394cd6a3aeSmrgpostuninstall_cmds=
33404cd6a3aeSmrgfinish_cmds=
33414cd6a3aeSmrgfinish_eval=
33424cd6a3aeSmrgshlibpath_var=
33434cd6a3aeSmrgshlibpath_overrides_runpath=unknown
33444cd6a3aeSmrgversion_type=none
33454cd6a3aeSmrgdynamic_linker="$host_os ld.so"
33464cd6a3aeSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
33478c9fbc29Smrgneed_lib_prefix=unknown
33488c9fbc29Smrghardcode_into_libs=no
33498c9fbc29Smrg
33508c9fbc29Smrg# when you set need_version to no, make sure it does not cause -set_version
33518c9fbc29Smrg# flags to be left without arguments
33528c9fbc29Smrgneed_version=unknown
33538c9fbc29Smrg
33548c9fbc29Smrgcase $host_os in
33558c9fbc29Smrgaix3*)
33568c9fbc29Smrg  version_type=linux
33578c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
33588c9fbc29Smrg  shlibpath_var=LIBPATH
33598c9fbc29Smrg
33608c9fbc29Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
33618c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
33628c9fbc29Smrg  ;;
33638c9fbc29Smrg
33644e411241Smrgaix[[4-9]]*)
33658c9fbc29Smrg  version_type=linux
33668c9fbc29Smrg  need_lib_prefix=no
33678c9fbc29Smrg  need_version=no
33688c9fbc29Smrg  hardcode_into_libs=yes
33698c9fbc29Smrg  if test "$host_cpu" = ia64; then
33708c9fbc29Smrg    # AIX 5 supports IA64
33718c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
33728c9fbc29Smrg    shlibpath_var=LD_LIBRARY_PATH
33738c9fbc29Smrg  else
33748c9fbc29Smrg    # With GCC up to 2.95.x, collect2 would create an import file
33758c9fbc29Smrg    # for dependence libraries.  The import file would start with
33768c9fbc29Smrg    # the line `#! .'.  This would cause the generated library to
33778c9fbc29Smrg    # depend on `.', always an invalid library.  This was fixed in
33788c9fbc29Smrg    # development snapshots of GCC prior to 3.0.
33798c9fbc29Smrg    case $host_os in
33808c9fbc29Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
33818c9fbc29Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
33828c9fbc29Smrg	   echo ' yes '
33834cd6a3aeSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
33848c9fbc29Smrg	:
33858c9fbc29Smrg      else
33868c9fbc29Smrg	can_build_shared=no
33878c9fbc29Smrg      fi
33888c9fbc29Smrg      ;;
33898c9fbc29Smrg    esac
33908c9fbc29Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
33918c9fbc29Smrg    # soname into executable. Probably we can add versioning support to
33928c9fbc29Smrg    # collect2, so additional links can be useful in future.
33938c9fbc29Smrg    if test "$aix_use_runtimelinking" = yes; then
33948c9fbc29Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
33958c9fbc29Smrg      # instead of lib<name>.a to let people know that these are not
33968c9fbc29Smrg      # typical AIX shared libraries.
33978c9fbc29Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
33988c9fbc29Smrg    else
33998c9fbc29Smrg      # We preserve .a as extension for shared libraries through AIX4.2
34008c9fbc29Smrg      # and later when we are not doing run time linking.
34018c9fbc29Smrg      library_names_spec='${libname}${release}.a $libname.a'
34028c9fbc29Smrg      soname_spec='${libname}${release}${shared_ext}$major'
34038c9fbc29Smrg    fi
34048c9fbc29Smrg    shlibpath_var=LIBPATH
34058c9fbc29Smrg  fi
34068c9fbc29Smrg  ;;
34078c9fbc29Smrg
34088c9fbc29Smrgamigaos*)
34094cd6a3aeSmrg  case $host_cpu in
34104cd6a3aeSmrg  powerpc)
34114cd6a3aeSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
34124cd6a3aeSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
34134cd6a3aeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34144cd6a3aeSmrg    ;;
34154cd6a3aeSmrg  m68k)
34164cd6a3aeSmrg    library_names_spec='$libname.ixlibrary $libname.a'
34174cd6a3aeSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
34184cd6a3aeSmrg    finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
34194cd6a3aeSmrg    ;;
34204cd6a3aeSmrg  esac
34218c9fbc29Smrg  ;;
34228c9fbc29Smrg
34238c9fbc29Smrgbeos*)
34248c9fbc29Smrg  library_names_spec='${libname}${shared_ext}'
34258c9fbc29Smrg  dynamic_linker="$host_os ld.so"
34268c9fbc29Smrg  shlibpath_var=LIBRARY_PATH
34278c9fbc29Smrg  ;;
34288c9fbc29Smrg
34298c9fbc29Smrgbsdi[[45]]*)
34308c9fbc29Smrg  version_type=linux
34318c9fbc29Smrg  need_version=no
34328c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
34338c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
34348c9fbc29Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
34358c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
34368c9fbc29Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
34378c9fbc29Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
34388c9fbc29Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
34398c9fbc29Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
34408c9fbc29Smrg  # libtool to hard-code these into programs
34418c9fbc29Smrg  ;;
34428c9fbc29Smrg
34434cd6a3aeSmrgcygwin* | mingw* | pw32* | cegcc*)
34448c9fbc29Smrg  version_type=windows
34458c9fbc29Smrg  shrext_cmds=".dll"
34468c9fbc29Smrg  need_version=no
34478c9fbc29Smrg  need_lib_prefix=no
34488c9fbc29Smrg
34494cd6a3aeSmrg  case $GCC,$cc_basename in
34504cd6a3aeSmrg  yes,*)
34514cd6a3aeSmrg    # gcc
34528c9fbc29Smrg    library_names_spec='$libname.dll.a'
34538c9fbc29Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
34548c9fbc29Smrg    postinstall_cmds='base_file=`basename \${file}`~
34554cd6a3aeSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
34568c9fbc29Smrg      dldir=$destdir/`dirname \$dlpath`~
34578c9fbc29Smrg      test -d \$dldir || mkdir -p \$dldir~
34588c9fbc29Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
34594cd6a3aeSmrg      chmod a+x \$dldir/$dlname~
34604cd6a3aeSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
34614cd6a3aeSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
34624cd6a3aeSmrg      fi'
34638c9fbc29Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
34648c9fbc29Smrg      dlpath=$dir/\$dldll~
34654cd6a3aeSmrg       $RM \$dlpath'
34668c9fbc29Smrg    shlibpath_overrides_runpath=yes
34678c9fbc29Smrg
34688c9fbc29Smrg    case $host_os in
34698c9fbc29Smrg    cygwin*)
34708c9fbc29Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
34718c9fbc29Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34724cd6a3aeSmrgm4_if([$1], [],[
34734cd6a3aeSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
34748c9fbc29Smrg      ;;
34754cd6a3aeSmrg    mingw* | cegcc*)
34768c9fbc29Smrg      # MinGW DLLs use traditional 'lib' prefix
34778c9fbc29Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34788c9fbc29Smrg      ;;
34798c9fbc29Smrg    pw32*)
34808c9fbc29Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
34818c9fbc29Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34828c9fbc29Smrg      ;;
34838c9fbc29Smrg    esac
34844cd6a3aeSmrg    dynamic_linker='Win32 ld.exe'
34854cd6a3aeSmrg    ;;
34864cd6a3aeSmrg
34874cd6a3aeSmrg  *,cl*)
34884cd6a3aeSmrg    # Native MSVC
34894cd6a3aeSmrg    libname_spec='$name'
34904cd6a3aeSmrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
34914cd6a3aeSmrg    library_names_spec='${libname}.dll.lib'
34924cd6a3aeSmrg
34934cd6a3aeSmrg    case $build_os in
34944cd6a3aeSmrg    mingw*)
34954cd6a3aeSmrg      sys_lib_search_path_spec=
34964cd6a3aeSmrg      lt_save_ifs=$IFS
34974cd6a3aeSmrg      IFS=';'
34984cd6a3aeSmrg      for lt_path in $LIB
34994cd6a3aeSmrg      do
35004cd6a3aeSmrg        IFS=$lt_save_ifs
35014cd6a3aeSmrg        # Let DOS variable expansion print the short 8.3 style file name.
35024cd6a3aeSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
35034cd6a3aeSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
35044cd6a3aeSmrg      done
35054cd6a3aeSmrg      IFS=$lt_save_ifs
35064cd6a3aeSmrg      # Convert to MSYS style.
35074cd6a3aeSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
35084cd6a3aeSmrg      ;;
35094cd6a3aeSmrg    cygwin*)
35104cd6a3aeSmrg      # Convert to unix form, then to dos form, then back to unix form
35114cd6a3aeSmrg      # but this time dos style (no spaces!) so that the unix form looks
35124cd6a3aeSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
35134cd6a3aeSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
35144cd6a3aeSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
35154cd6a3aeSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
35164cd6a3aeSmrg      ;;
35174cd6a3aeSmrg    *)
35184cd6a3aeSmrg      sys_lib_search_path_spec="$LIB"
35194cd6a3aeSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
35204cd6a3aeSmrg        # It is most probably a Windows format PATH.
35214cd6a3aeSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
35224cd6a3aeSmrg      else
35234cd6a3aeSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
35244cd6a3aeSmrg      fi
35254cd6a3aeSmrg      # FIXME: find the short name or the path components, as spaces are
35264cd6a3aeSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
35274cd6a3aeSmrg      ;;
35284cd6a3aeSmrg    esac
35294cd6a3aeSmrg
35304cd6a3aeSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
35314cd6a3aeSmrg    postinstall_cmds='base_file=`basename \${file}`~
35324cd6a3aeSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
35334cd6a3aeSmrg      dldir=$destdir/`dirname \$dlpath`~
35344cd6a3aeSmrg      test -d \$dldir || mkdir -p \$dldir~
35354cd6a3aeSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
35364cd6a3aeSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
35374cd6a3aeSmrg      dlpath=$dir/\$dldll~
35384cd6a3aeSmrg       $RM \$dlpath'
35394cd6a3aeSmrg    shlibpath_overrides_runpath=yes
35404cd6a3aeSmrg    dynamic_linker='Win32 link.exe'
35418c9fbc29Smrg    ;;
35428c9fbc29Smrg
35438c9fbc29Smrg  *)
35444cd6a3aeSmrg    # Assume MSVC wrapper
35458c9fbc29Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
35464cd6a3aeSmrg    dynamic_linker='Win32 ld.exe'
35478c9fbc29Smrg    ;;
35488c9fbc29Smrg  esac
35498c9fbc29Smrg  # FIXME: first we should search . and the directory the executable is in
35508c9fbc29Smrg  shlibpath_var=PATH
35518c9fbc29Smrg  ;;
35528c9fbc29Smrg
35538c9fbc29Smrgdarwin* | rhapsody*)
35548c9fbc29Smrg  dynamic_linker="$host_os dyld"
35558c9fbc29Smrg  version_type=darwin
35568c9fbc29Smrg  need_lib_prefix=no
35578c9fbc29Smrg  need_version=no
35584cd6a3aeSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
35598c9fbc29Smrg  soname_spec='${libname}${release}${major}$shared_ext'
35608c9fbc29Smrg  shlibpath_overrides_runpath=yes
35618c9fbc29Smrg  shlibpath_var=DYLD_LIBRARY_PATH
35628c9fbc29Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
35634cd6a3aeSmrgm4_if([$1], [],[
35644cd6a3aeSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
35658c9fbc29Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
35668c9fbc29Smrg  ;;
35678c9fbc29Smrg
35688c9fbc29Smrgdgux*)
35698c9fbc29Smrg  version_type=linux
35708c9fbc29Smrg  need_lib_prefix=no
35718c9fbc29Smrg  need_version=no
35728c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
35738c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
35748c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
35758c9fbc29Smrg  ;;
35768c9fbc29Smrg
35778c9fbc29Smrgfreebsd1*)
35788c9fbc29Smrg  dynamic_linker=no
35798c9fbc29Smrg  ;;
35808c9fbc29Smrg
35818c9fbc29Smrgfreebsd* | dragonfly*)
35828c9fbc29Smrg  # DragonFly does not have aout.  When/if they implement a new
35838c9fbc29Smrg  # versioning mechanism, adjust this.
35848c9fbc29Smrg  if test -x /usr/bin/objformat; then
35858c9fbc29Smrg    objformat=`/usr/bin/objformat`
35868c9fbc29Smrg  else
35878c9fbc29Smrg    case $host_os in
35888c9fbc29Smrg    freebsd[[123]]*) objformat=aout ;;
35898c9fbc29Smrg    *) objformat=elf ;;
35908c9fbc29Smrg    esac
35918c9fbc29Smrg  fi
35928c9fbc29Smrg  version_type=freebsd-$objformat
35938c9fbc29Smrg  case $version_type in
35948c9fbc29Smrg    freebsd-elf*)
35958c9fbc29Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
35968c9fbc29Smrg      need_version=no
35978c9fbc29Smrg      need_lib_prefix=no
35988c9fbc29Smrg      ;;
35998c9fbc29Smrg    freebsd-*)
36008c9fbc29Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
36018c9fbc29Smrg      need_version=yes
36028c9fbc29Smrg      ;;
36038c9fbc29Smrg  esac
36048c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
36058c9fbc29Smrg  case $host_os in
36068c9fbc29Smrg  freebsd2*)
36078c9fbc29Smrg    shlibpath_overrides_runpath=yes
36088c9fbc29Smrg    ;;
36098c9fbc29Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
36108c9fbc29Smrg    shlibpath_overrides_runpath=yes
36118c9fbc29Smrg    hardcode_into_libs=yes
36128c9fbc29Smrg    ;;
36138c9fbc29Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
36148c9fbc29Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
36158c9fbc29Smrg    shlibpath_overrides_runpath=no
36168c9fbc29Smrg    hardcode_into_libs=yes
36178c9fbc29Smrg    ;;
36184e411241Smrg  *) # from 4.6 on, and DragonFly
36198c9fbc29Smrg    shlibpath_overrides_runpath=yes
36208c9fbc29Smrg    hardcode_into_libs=yes
36218c9fbc29Smrg    ;;
36228c9fbc29Smrg  esac
36238c9fbc29Smrg  ;;
36248c9fbc29Smrg
36258c9fbc29Smrggnu*)
36268c9fbc29Smrg  version_type=linux
36278c9fbc29Smrg  need_lib_prefix=no
36288c9fbc29Smrg  need_version=no
36298c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
36308c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
36318c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
36328c9fbc29Smrg  hardcode_into_libs=yes
36338c9fbc29Smrg  ;;
36348c9fbc29Smrg
36354cd6a3aeSmrghaiku*)
36364cd6a3aeSmrg  version_type=linux
36374cd6a3aeSmrg  need_lib_prefix=no
36384cd6a3aeSmrg  need_version=no
36394cd6a3aeSmrg  dynamic_linker="$host_os runtime_loader"
36404cd6a3aeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
36414cd6a3aeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
36424cd6a3aeSmrg  shlibpath_var=LIBRARY_PATH
36434cd6a3aeSmrg  shlibpath_overrides_runpath=yes
36444cd6a3aeSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
36454cd6a3aeSmrg  hardcode_into_libs=yes
36464cd6a3aeSmrg  ;;
36474cd6a3aeSmrg
36488c9fbc29Smrghpux9* | hpux10* | hpux11*)
36498c9fbc29Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
36508c9fbc29Smrg  # link against other versions.
36518c9fbc29Smrg  version_type=sunos
36528c9fbc29Smrg  need_lib_prefix=no
36538c9fbc29Smrg  need_version=no
36548c9fbc29Smrg  case $host_cpu in
36558c9fbc29Smrg  ia64*)
36568c9fbc29Smrg    shrext_cmds='.so'
36578c9fbc29Smrg    hardcode_into_libs=yes
36588c9fbc29Smrg    dynamic_linker="$host_os dld.so"
36598c9fbc29Smrg    shlibpath_var=LD_LIBRARY_PATH
36608c9fbc29Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
36618c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36628c9fbc29Smrg    soname_spec='${libname}${release}${shared_ext}$major'
36638c9fbc29Smrg    if test "X$HPUX_IA64_MODE" = X32; then
36648c9fbc29Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
36658c9fbc29Smrg    else
36668c9fbc29Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
36678c9fbc29Smrg    fi
36688c9fbc29Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
36698c9fbc29Smrg    ;;
36704cd6a3aeSmrg  hppa*64*)
36714cd6a3aeSmrg    shrext_cmds='.sl'
36724cd6a3aeSmrg    hardcode_into_libs=yes
36734cd6a3aeSmrg    dynamic_linker="$host_os dld.sl"
36744cd6a3aeSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
36754cd6a3aeSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
36764cd6a3aeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36774cd6a3aeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
36784cd6a3aeSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
36794cd6a3aeSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
36804cd6a3aeSmrg    ;;
36814cd6a3aeSmrg  *)
36828c9fbc29Smrg    shrext_cmds='.sl'
36838c9fbc29Smrg    dynamic_linker="$host_os dld.sl"
36848c9fbc29Smrg    shlibpath_var=SHLIB_PATH
36858c9fbc29Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
36868c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36878c9fbc29Smrg    soname_spec='${libname}${release}${shared_ext}$major'
36888c9fbc29Smrg    ;;
36898c9fbc29Smrg  esac
36904cd6a3aeSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
36918c9fbc29Smrg  postinstall_cmds='chmod 555 $lib'
36924cd6a3aeSmrg  # or fails outright, so override atomically:
36934cd6a3aeSmrg  install_override_mode=555
36948c9fbc29Smrg  ;;
36958c9fbc29Smrg
36964e411241Smrginterix[[3-9]]*)
36978c9fbc29Smrg  version_type=linux
36988c9fbc29Smrg  need_lib_prefix=no
36998c9fbc29Smrg  need_version=no
37008c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
37018c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
37028c9fbc29Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
37038c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
37048c9fbc29Smrg  shlibpath_overrides_runpath=no
37058c9fbc29Smrg  hardcode_into_libs=yes
37068c9fbc29Smrg  ;;
37078c9fbc29Smrg
37088c9fbc29Smrgirix5* | irix6* | nonstopux*)
37098c9fbc29Smrg  case $host_os in
37108c9fbc29Smrg    nonstopux*) version_type=nonstopux ;;
37118c9fbc29Smrg    *)
37128c9fbc29Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
37138c9fbc29Smrg		version_type=linux
37148c9fbc29Smrg	else
37158c9fbc29Smrg		version_type=irix
37168c9fbc29Smrg	fi ;;
37178c9fbc29Smrg  esac
37188c9fbc29Smrg  need_lib_prefix=no
37198c9fbc29Smrg  need_version=no
37208c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
37218c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
37228c9fbc29Smrg  case $host_os in
37238c9fbc29Smrg  irix5* | nonstopux*)
37248c9fbc29Smrg    libsuff= shlibsuff=
37258c9fbc29Smrg    ;;
37268c9fbc29Smrg  *)
37278c9fbc29Smrg    case $LD in # libtool.m4 will add one of these switches to LD
37288c9fbc29Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
37298c9fbc29Smrg      libsuff= shlibsuff= libmagic=32-bit;;
37308c9fbc29Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
37318c9fbc29Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
37328c9fbc29Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
37338c9fbc29Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
37348c9fbc29Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
37358c9fbc29Smrg    esac
37368c9fbc29Smrg    ;;
37378c9fbc29Smrg  esac
37388c9fbc29Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
37398c9fbc29Smrg  shlibpath_overrides_runpath=no
37408c9fbc29Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
37418c9fbc29Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
37428c9fbc29Smrg  hardcode_into_libs=yes
37438c9fbc29Smrg  ;;
37448c9fbc29Smrg
37458c9fbc29Smrg# No shared lib support for Linux oldld, aout, or coff.
37468c9fbc29Smrglinux*oldld* | linux*aout* | linux*coff*)
37478c9fbc29Smrg  dynamic_linker=no
37488c9fbc29Smrg  ;;
37498c9fbc29Smrg
37508c9fbc29Smrg# This must be Linux ELF.
37514cd6a3aeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
37528c9fbc29Smrg  version_type=linux
37538c9fbc29Smrg  need_lib_prefix=no
37548c9fbc29Smrg  need_version=no
37558c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
37568c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
37578c9fbc29Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
37588c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
37598c9fbc29Smrg  shlibpath_overrides_runpath=no
37604cd6a3aeSmrg
37614cd6a3aeSmrg  # Some binutils ld are patched to set DT_RUNPATH
37624cd6a3aeSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
37634cd6a3aeSmrg    [lt_cv_shlibpath_overrides_runpath=no
37644cd6a3aeSmrg    save_LDFLAGS=$LDFLAGS
37654cd6a3aeSmrg    save_libdir=$libdir
37664cd6a3aeSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
37674cd6a3aeSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
37684cd6a3aeSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
37694cd6a3aeSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
37704cd6a3aeSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
37714cd6a3aeSmrg    LDFLAGS=$save_LDFLAGS
37724cd6a3aeSmrg    libdir=$save_libdir
37734cd6a3aeSmrg    ])
37744cd6a3aeSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
37754cd6a3aeSmrg
37768c9fbc29Smrg  # This implies no fast_install, which is unacceptable.
37778c9fbc29Smrg  # Some rework will be needed to allow for fast_install
37788c9fbc29Smrg  # before this can be enabled.
37798c9fbc29Smrg  hardcode_into_libs=yes
37808c9fbc29Smrg
37818c9fbc29Smrg  # Append ld.so.conf contents to the search path
37828c9fbc29Smrg  if test -f /etc/ld.so.conf; then
37834cd6a3aeSmrg    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' ' '`
37848c9fbc29Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
37858c9fbc29Smrg  fi
37868c9fbc29Smrg
37878c9fbc29Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
37888c9fbc29Smrg  # powerpc, because MkLinux only supported shared libraries with the
37898c9fbc29Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
37908c9fbc29Smrg  # most powerpc-linux boxes support dynamic linking these days and
37918c9fbc29Smrg  # people can always --disable-shared, the test was removed, and we
37928c9fbc29Smrg  # assume the GNU/Linux dynamic linker is in use.
37938c9fbc29Smrg  dynamic_linker='GNU/Linux ld.so'
37948c9fbc29Smrg  ;;
37958c9fbc29Smrg
37968c9fbc29Smrgnetbsd*)
37978c9fbc29Smrg  version_type=sunos
37988c9fbc29Smrg  need_lib_prefix=no
37998c9fbc29Smrg  need_version=no
38004cd6a3aeSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
38018c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38028c9fbc29Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38038c9fbc29Smrg    dynamic_linker='NetBSD (a.out) ld.so'
38048c9fbc29Smrg  else
38058c9fbc29Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
38068c9fbc29Smrg    soname_spec='${libname}${release}${shared_ext}$major'
38078c9fbc29Smrg    dynamic_linker='NetBSD ld.elf_so'
38088c9fbc29Smrg  fi
38098c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
38108c9fbc29Smrg  shlibpath_overrides_runpath=yes
38118c9fbc29Smrg  hardcode_into_libs=yes
38128c9fbc29Smrg  ;;
38138c9fbc29Smrg
38148c9fbc29Smrgnewsos6)
38158c9fbc29Smrg  version_type=linux
38168c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38178c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
38188c9fbc29Smrg  shlibpath_overrides_runpath=yes
38198c9fbc29Smrg  ;;
38208c9fbc29Smrg
38214cd6a3aeSmrg*nto* | *qnx*)
38224cd6a3aeSmrg  version_type=qnx
38238c9fbc29Smrg  need_lib_prefix=no
38248c9fbc29Smrg  need_version=no
38258c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38268c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38278c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
38284cd6a3aeSmrg  shlibpath_overrides_runpath=no
38294cd6a3aeSmrg  hardcode_into_libs=yes
38304cd6a3aeSmrg  dynamic_linker='ldqnx.so'
38318c9fbc29Smrg  ;;
38328c9fbc29Smrg
38338c9fbc29Smrgopenbsd*)
38348c9fbc29Smrg  version_type=sunos
38358c9fbc29Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
38368c9fbc29Smrg  need_lib_prefix=no
38378c9fbc29Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
38388c9fbc29Smrg  case $host_os in
38394cd6a3aeSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
38404cd6a3aeSmrg    *)				need_version=no  ;;
38418c9fbc29Smrg  esac
38428c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38438c9fbc29Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
38448c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
38454cd6a3aeSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
38468c9fbc29Smrg    case $host_os in
38478c9fbc29Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
38488c9fbc29Smrg	shlibpath_overrides_runpath=no
38498c9fbc29Smrg	;;
38508c9fbc29Smrg      *)
38518c9fbc29Smrg	shlibpath_overrides_runpath=yes
38528c9fbc29Smrg	;;
38538c9fbc29Smrg      esac
38548c9fbc29Smrg  else
38558c9fbc29Smrg    shlibpath_overrides_runpath=yes
38568c9fbc29Smrg  fi
38578c9fbc29Smrg  ;;
38588c9fbc29Smrg
38598c9fbc29Smrgos2*)
38608c9fbc29Smrg  libname_spec='$name'
38618c9fbc29Smrg  shrext_cmds=".dll"
38628c9fbc29Smrg  need_lib_prefix=no
38638c9fbc29Smrg  library_names_spec='$libname${shared_ext} $libname.a'
38648c9fbc29Smrg  dynamic_linker='OS/2 ld.exe'
38658c9fbc29Smrg  shlibpath_var=LIBPATH
38668c9fbc29Smrg  ;;
38678c9fbc29Smrg
38688c9fbc29Smrgosf3* | osf4* | osf5*)
38698c9fbc29Smrg  version_type=osf
38708c9fbc29Smrg  need_lib_prefix=no
38718c9fbc29Smrg  need_version=no
38728c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38738c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38748c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
38758c9fbc29Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
38768c9fbc29Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
38778c9fbc29Smrg  ;;
38788c9fbc29Smrg
38794e411241Smrgrdos*)
38804e411241Smrg  dynamic_linker=no
38814e411241Smrg  ;;
38824e411241Smrg
38838c9fbc29Smrgsolaris*)
38848c9fbc29Smrg  version_type=linux
38858c9fbc29Smrg  need_lib_prefix=no
38868c9fbc29Smrg  need_version=no
38878c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38888c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38898c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
38908c9fbc29Smrg  shlibpath_overrides_runpath=yes
38918c9fbc29Smrg  hardcode_into_libs=yes
38928c9fbc29Smrg  # ldd complains unless libraries are executable
38938c9fbc29Smrg  postinstall_cmds='chmod +x $lib'
38948c9fbc29Smrg  ;;
38958c9fbc29Smrg
38968c9fbc29Smrgsunos4*)
38978c9fbc29Smrg  version_type=sunos
38988c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
38998c9fbc29Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
39008c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
39018c9fbc29Smrg  shlibpath_overrides_runpath=yes
39028c9fbc29Smrg  if test "$with_gnu_ld" = yes; then
39038c9fbc29Smrg    need_lib_prefix=no
39048c9fbc29Smrg  fi
39058c9fbc29Smrg  need_version=yes
39068c9fbc29Smrg  ;;
39078c9fbc29Smrg
39088c9fbc29Smrgsysv4 | sysv4.3*)
39098c9fbc29Smrg  version_type=linux
39108c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39118c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39128c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
39138c9fbc29Smrg  case $host_vendor in
39148c9fbc29Smrg    sni)
39158c9fbc29Smrg      shlibpath_overrides_runpath=no
39168c9fbc29Smrg      need_lib_prefix=no
39178c9fbc29Smrg      runpath_var=LD_RUN_PATH
39188c9fbc29Smrg      ;;
39198c9fbc29Smrg    siemens)
39208c9fbc29Smrg      need_lib_prefix=no
39218c9fbc29Smrg      ;;
39228c9fbc29Smrg    motorola)
39238c9fbc29Smrg      need_lib_prefix=no
39248c9fbc29Smrg      need_version=no
39258c9fbc29Smrg      shlibpath_overrides_runpath=no
39268c9fbc29Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
39278c9fbc29Smrg      ;;
39288c9fbc29Smrg  esac
39298c9fbc29Smrg  ;;
39308c9fbc29Smrg
39318c9fbc29Smrgsysv4*MP*)
39328c9fbc29Smrg  if test -d /usr/nec ;then
39338c9fbc29Smrg    version_type=linux
39348c9fbc29Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
39358c9fbc29Smrg    soname_spec='$libname${shared_ext}.$major'
39368c9fbc29Smrg    shlibpath_var=LD_LIBRARY_PATH
39378c9fbc29Smrg  fi
39388c9fbc29Smrg  ;;
39398c9fbc29Smrg
39408c9fbc29Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
39418c9fbc29Smrg  version_type=freebsd-elf
39428c9fbc29Smrg  need_lib_prefix=no
39438c9fbc29Smrg  need_version=no
39448c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
39458c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39468c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
39474cd6a3aeSmrg  shlibpath_overrides_runpath=yes
39488c9fbc29Smrg  hardcode_into_libs=yes
39498c9fbc29Smrg  if test "$with_gnu_ld" = yes; then
39508c9fbc29Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
39518c9fbc29Smrg  else
39528c9fbc29Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
39538c9fbc29Smrg    case $host_os in
39548c9fbc29Smrg      sco3.2v5*)
39558c9fbc29Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
39568c9fbc29Smrg	;;
39578c9fbc29Smrg    esac
39588c9fbc29Smrg  fi
39598c9fbc29Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
39608c9fbc29Smrg  ;;
39618c9fbc29Smrg
39624cd6a3aeSmrgtpf*)
39634cd6a3aeSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
39644cd6a3aeSmrg  version_type=linux
39654cd6a3aeSmrg  need_lib_prefix=no
39664cd6a3aeSmrg  need_version=no
39674cd6a3aeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39684cd6a3aeSmrg  shlibpath_var=LD_LIBRARY_PATH
39694cd6a3aeSmrg  shlibpath_overrides_runpath=no
39704cd6a3aeSmrg  hardcode_into_libs=yes
39714cd6a3aeSmrg  ;;
39724cd6a3aeSmrg
39738c9fbc29Smrguts4*)
39748c9fbc29Smrg  version_type=linux
39758c9fbc29Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39768c9fbc29Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39778c9fbc29Smrg  shlibpath_var=LD_LIBRARY_PATH
39788c9fbc29Smrg  ;;
39798c9fbc29Smrg
39808c9fbc29Smrg*)
39818c9fbc29Smrg  dynamic_linker=no
39828c9fbc29Smrg  ;;
39838c9fbc29Smrgesac
39848c9fbc29SmrgAC_MSG_RESULT([$dynamic_linker])
39858c9fbc29Smrgtest "$dynamic_linker" = no && can_build_shared=no
39868c9fbc29Smrg
39878c9fbc29Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
39888c9fbc29Smrgif test "$GCC" = yes; then
39898c9fbc29Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
39908c9fbc29Smrgfi
39918c9fbc29Smrg
39924cd6a3aeSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
39934cd6a3aeSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
39944cd6a3aeSmrgfi
39954cd6a3aeSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
39964cd6a3aeSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
39974cd6a3aeSmrgfi
39988c9fbc29Smrg
39994cd6a3aeSmrg_LT_DECL([], [variables_saved_for_relink], [1],
40004cd6a3aeSmrg    [Variables whose values should be saved in libtool wrapper scripts and
40014cd6a3aeSmrg    restored at link time])
40024cd6a3aeSmrg_LT_DECL([], [need_lib_prefix], [0],
40034cd6a3aeSmrg    [Do we need the "lib" prefix for modules?])
40044cd6a3aeSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
40054cd6a3aeSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
40064cd6a3aeSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
40074cd6a3aeSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
40084cd6a3aeSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
40094cd6a3aeSmrg    [Is shlibpath searched before the hard-coded library search path?])
40104cd6a3aeSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
40114cd6a3aeSmrg_LT_DECL([], [library_names_spec], [1],
40124cd6a3aeSmrg    [[List of archive names.  First name is the real one, the rest are links.
40134cd6a3aeSmrg    The last name is the one that the linker finds with -lNAME]])
40144cd6a3aeSmrg_LT_DECL([], [soname_spec], [1],
40154cd6a3aeSmrg    [[The coded name of the library, if different from the real name]])
40164cd6a3aeSmrg_LT_DECL([], [install_override_mode], [1],
40174cd6a3aeSmrg    [Permission mode override for installation of shared libraries])
40184cd6a3aeSmrg_LT_DECL([], [postinstall_cmds], [2],
40194cd6a3aeSmrg    [Command to use after installation of a shared archive])
40204cd6a3aeSmrg_LT_DECL([], [postuninstall_cmds], [2],
40214cd6a3aeSmrg    [Command to use after uninstallation of a shared archive])
40224cd6a3aeSmrg_LT_DECL([], [finish_cmds], [2],
40234cd6a3aeSmrg    [Commands used to finish a libtool library installation in a directory])
40244cd6a3aeSmrg_LT_DECL([], [finish_eval], [1],
40254cd6a3aeSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
40264cd6a3aeSmrg    not shown]])
40274cd6a3aeSmrg_LT_DECL([], [hardcode_into_libs], [0],
40284cd6a3aeSmrg    [Whether we should hardcode library paths into libraries])
40294cd6a3aeSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
40304cd6a3aeSmrg    [Compile-time system search path for libraries])
40314cd6a3aeSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
40324cd6a3aeSmrg    [Run-time system search path for libraries])
40334cd6a3aeSmrg])# _LT_SYS_DYNAMIC_LINKER
40344cd6a3aeSmrg
40354cd6a3aeSmrg
40364cd6a3aeSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
40374cd6a3aeSmrg# --------------------------
40384cd6a3aeSmrg# find a file program which can recognize shared library
40394cd6a3aeSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
40404cd6a3aeSmrg[m4_require([_LT_DECL_EGREP])dnl
40414cd6a3aeSmrgAC_MSG_CHECKING([for $1])
40424cd6a3aeSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
40434cd6a3aeSmrg[case $MAGIC_CMD in
40444cd6a3aeSmrg[[\\/*] |  ?:[\\/]*])
40454cd6a3aeSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
40464cd6a3aeSmrg  ;;
40474cd6a3aeSmrg*)
40484cd6a3aeSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
40494cd6a3aeSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
40504cd6a3aeSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
40514cd6a3aeSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
40524cd6a3aeSmrgdnl not every word.  This closes a longstanding sh security hole.
40534cd6a3aeSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
40544cd6a3aeSmrg  for ac_dir in $ac_dummy; do
40558c9fbc29Smrg    IFS="$lt_save_ifs"
40564cd6a3aeSmrg    test -z "$ac_dir" && ac_dir=.
40574cd6a3aeSmrg    if test -f $ac_dir/$1; then
40584cd6a3aeSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
40594cd6a3aeSmrg      if test -n "$file_magic_test_file"; then
40604cd6a3aeSmrg	case $deplibs_check_method in
40614cd6a3aeSmrg	"file_magic "*)
40624cd6a3aeSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
40634cd6a3aeSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
40644cd6a3aeSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
40654cd6a3aeSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
40664cd6a3aeSmrg	    :
40674cd6a3aeSmrg	  else
40684cd6a3aeSmrg	    cat <<_LT_EOF 1>&2
40698c9fbc29Smrg
40708c9fbc29Smrg*** Warning: the command libtool uses to detect shared libraries,
40718c9fbc29Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
40728c9fbc29Smrg*** The result is that libtool may fail to recognize shared libraries
40738c9fbc29Smrg*** as such.  This will affect the creation of libtool libraries that
40748c9fbc29Smrg*** depend on shared libraries, but programs linked with such libtool
40758c9fbc29Smrg*** libraries will work regardless of this problem.  Nevertheless, you
40768c9fbc29Smrg*** may want to report the problem to your system manager and/or to
40778c9fbc29Smrg*** bug-libtool@gnu.org
40788c9fbc29Smrg
40794cd6a3aeSmrg_LT_EOF
40808c9fbc29Smrg	  fi ;;
40818c9fbc29Smrg	esac
40828c9fbc29Smrg      fi
40838c9fbc29Smrg      break
40848c9fbc29Smrg    fi
40858c9fbc29Smrg  done
40868c9fbc29Smrg  IFS="$lt_save_ifs"
40878c9fbc29Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
40888c9fbc29Smrg  ;;
40898c9fbc29Smrgesac])
40908c9fbc29SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
40918c9fbc29Smrgif test -n "$MAGIC_CMD"; then
40928c9fbc29Smrg  AC_MSG_RESULT($MAGIC_CMD)
40938c9fbc29Smrgelse
40948c9fbc29Smrg  AC_MSG_RESULT(no)
40958c9fbc29Smrgfi
40964cd6a3aeSmrg_LT_DECL([], [MAGIC_CMD], [0],
40974cd6a3aeSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
40984cd6a3aeSmrg])# _LT_PATH_TOOL_PREFIX
40998c9fbc29Smrg
41004cd6a3aeSmrg# Old name:
41014cd6a3aeSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
41024cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
41034cd6a3aeSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
41048c9fbc29Smrg
41054cd6a3aeSmrg
41064cd6a3aeSmrg# _LT_PATH_MAGIC
41074cd6a3aeSmrg# --------------
41084e411241Smrg# find a file program which can recognize a shared library
41094cd6a3aeSmrgm4_defun([_LT_PATH_MAGIC],
41104cd6a3aeSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
41118c9fbc29Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
41128c9fbc29Smrg  if test -n "$ac_tool_prefix"; then
41134cd6a3aeSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
41148c9fbc29Smrg  else
41158c9fbc29Smrg    MAGIC_CMD=:
41168c9fbc29Smrg  fi
41178c9fbc29Smrgfi
41184cd6a3aeSmrg])# _LT_PATH_MAGIC
41198c9fbc29Smrg
41208c9fbc29Smrg
41214cd6a3aeSmrg# LT_PATH_LD
41228c9fbc29Smrg# ----------
41238c9fbc29Smrg# find the pathname to the GNU or non-GNU linker
41244cd6a3aeSmrgAC_DEFUN([LT_PATH_LD],
41254cd6a3aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl
41268c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
41278c9fbc29SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
41284cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl
41294cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl
41304cd6a3aeSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
41314cd6a3aeSmrg
41324cd6a3aeSmrgAC_ARG_WITH([gnu-ld],
41334cd6a3aeSmrg    [AS_HELP_STRING([--with-gnu-ld],
41344cd6a3aeSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
41354cd6a3aeSmrg    [test "$withval" = no || with_gnu_ld=yes],
41364cd6a3aeSmrg    [with_gnu_ld=no])dnl
41374cd6a3aeSmrg
41388c9fbc29Smrgac_prog=ld
41398c9fbc29Smrgif test "$GCC" = yes; then
41408c9fbc29Smrg  # Check if gcc -print-prog-name=ld gives a path.
41418c9fbc29Smrg  AC_MSG_CHECKING([for ld used by $CC])
41428c9fbc29Smrg  case $host in
41438c9fbc29Smrg  *-*-mingw*)
41448c9fbc29Smrg    # gcc leaves a trailing carriage return which upsets mingw
41458c9fbc29Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
41468c9fbc29Smrg  *)
41478c9fbc29Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
41488c9fbc29Smrg  esac
41498c9fbc29Smrg  case $ac_prog in
41508c9fbc29Smrg    # Accept absolute paths.
41518c9fbc29Smrg    [[\\/]]* | ?:[[\\/]]*)
41528c9fbc29Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
41538c9fbc29Smrg      # Canonicalize the pathname of ld
41544cd6a3aeSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
41554cd6a3aeSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
41564cd6a3aeSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
41578c9fbc29Smrg      done
41588c9fbc29Smrg      test -z "$LD" && LD="$ac_prog"
41598c9fbc29Smrg      ;;
41608c9fbc29Smrg  "")
41618c9fbc29Smrg    # If it fails, then pretend we aren't using GCC.
41628c9fbc29Smrg    ac_prog=ld
41638c9fbc29Smrg    ;;
41648c9fbc29Smrg  *)
41658c9fbc29Smrg    # If it is relative, then search for the first ld in PATH.
41668c9fbc29Smrg    with_gnu_ld=unknown
41678c9fbc29Smrg    ;;
41688c9fbc29Smrg  esac
41698c9fbc29Smrgelif test "$with_gnu_ld" = yes; then
41708c9fbc29Smrg  AC_MSG_CHECKING([for GNU ld])
41718c9fbc29Smrgelse
41728c9fbc29Smrg  AC_MSG_CHECKING([for non-GNU ld])
41738c9fbc29Smrgfi
41748c9fbc29SmrgAC_CACHE_VAL(lt_cv_path_LD,
41758c9fbc29Smrg[if test -z "$LD"; then
41768c9fbc29Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
41778c9fbc29Smrg  for ac_dir in $PATH; do
41788c9fbc29Smrg    IFS="$lt_save_ifs"
41798c9fbc29Smrg    test -z "$ac_dir" && ac_dir=.
41808c9fbc29Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
41818c9fbc29Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
41828c9fbc29Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
41838c9fbc29Smrg      # but apparently some variants of GNU ld only accept -v.
41848c9fbc29Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
41858c9fbc29Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
41868c9fbc29Smrg      *GNU* | *'with BFD'*)
41878c9fbc29Smrg	test "$with_gnu_ld" != no && break
41888c9fbc29Smrg	;;
41898c9fbc29Smrg      *)
41908c9fbc29Smrg	test "$with_gnu_ld" != yes && break
41918c9fbc29Smrg	;;
41928c9fbc29Smrg      esac
41938c9fbc29Smrg    fi
41948c9fbc29Smrg  done
41958c9fbc29Smrg  IFS="$lt_save_ifs"
41968c9fbc29Smrgelse
41978c9fbc29Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
41988c9fbc29Smrgfi])
41998c9fbc29SmrgLD="$lt_cv_path_LD"
42008c9fbc29Smrgif test -n "$LD"; then
42018c9fbc29Smrg  AC_MSG_RESULT($LD)
42028c9fbc29Smrgelse
42038c9fbc29Smrg  AC_MSG_RESULT(no)
42048c9fbc29Smrgfi
42058c9fbc29Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
42064cd6a3aeSmrg_LT_PATH_LD_GNU
42074cd6a3aeSmrgAC_SUBST([LD])
42088c9fbc29Smrg
42094cd6a3aeSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
42104cd6a3aeSmrg])# LT_PATH_LD
42118c9fbc29Smrg
42124cd6a3aeSmrg# Old names:
42134cd6a3aeSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
42144cd6a3aeSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
42154cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
42164cd6a3aeSmrgdnl AC_DEFUN([AM_PROG_LD], [])
42174cd6a3aeSmrgdnl AC_DEFUN([AC_PROG_LD], [])
42184cd6a3aeSmrg
42194cd6a3aeSmrg
42204cd6a3aeSmrg# _LT_PATH_LD_GNU
42214cd6a3aeSmrg#- --------------
42224cd6a3aeSmrgm4_defun([_LT_PATH_LD_GNU],
42234cd6a3aeSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
42248c9fbc29Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
42258c9fbc29Smrgcase `$LD -v 2>&1 </dev/null` in
42268c9fbc29Smrg*GNU* | *'with BFD'*)
42278c9fbc29Smrg  lt_cv_prog_gnu_ld=yes
42288c9fbc29Smrg  ;;
42298c9fbc29Smrg*)
42308c9fbc29Smrg  lt_cv_prog_gnu_ld=no
42318c9fbc29Smrg  ;;
42328c9fbc29Smrgesac])
42338c9fbc29Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
42344cd6a3aeSmrg])# _LT_PATH_LD_GNU
42358c9fbc29Smrg
42368c9fbc29Smrg
42374cd6a3aeSmrg# _LT_CMD_RELOAD
42384cd6a3aeSmrg# --------------
42398c9fbc29Smrg# find reload flag for linker
42408c9fbc29Smrg#   -- PORTME Some linkers may need a different reload flag.
42414cd6a3aeSmrgm4_defun([_LT_CMD_RELOAD],
42428c9fbc29Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
42438c9fbc29Smrg  lt_cv_ld_reload_flag,
42448c9fbc29Smrg  [lt_cv_ld_reload_flag='-r'])
42458c9fbc29Smrgreload_flag=$lt_cv_ld_reload_flag
42468c9fbc29Smrgcase $reload_flag in
42478c9fbc29Smrg"" | " "*) ;;
42488c9fbc29Smrg*) reload_flag=" $reload_flag" ;;
42498c9fbc29Smrgesac
42508c9fbc29Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
42518c9fbc29Smrgcase $host_os in
42524cd6a3aeSmrg  cygwin* | mingw* | pw32* | cegcc*)
42534cd6a3aeSmrg    if test "$GCC" != yes; then
42544cd6a3aeSmrg      reload_cmds=false
42554cd6a3aeSmrg    fi
42564cd6a3aeSmrg    ;;
42578c9fbc29Smrg  darwin*)
42588c9fbc29Smrg    if test "$GCC" = yes; then
42598c9fbc29Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
42608c9fbc29Smrg    else
42618c9fbc29Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
42628c9fbc29Smrg    fi
42638c9fbc29Smrg    ;;
42648c9fbc29Smrgesac
42654cd6a3aeSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
42664cd6a3aeSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
42674cd6a3aeSmrg])# _LT_CMD_RELOAD
42688c9fbc29Smrg
42698c9fbc29Smrg
42704cd6a3aeSmrg# _LT_CHECK_MAGIC_METHOD
42714cd6a3aeSmrg# ----------------------
42728c9fbc29Smrg# how to check for library dependencies
42738c9fbc29Smrg#  -- PORTME fill in with the dynamic library characteristics
42744cd6a3aeSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
42754cd6a3aeSmrg[m4_require([_LT_DECL_EGREP])
42764cd6a3aeSmrgm4_require([_LT_DECL_OBJDUMP])
42774cd6a3aeSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
42788c9fbc29Smrglt_cv_deplibs_check_method,
42798c9fbc29Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
42808c9fbc29Smrglt_cv_file_magic_test_file=
42818c9fbc29Smrglt_cv_deplibs_check_method='unknown'
42828c9fbc29Smrg# Need to set the preceding variable on all platforms that support
42838c9fbc29Smrg# interlibrary dependencies.
42848c9fbc29Smrg# 'none' -- dependencies not supported.
42858c9fbc29Smrg# `unknown' -- same as none, but documents that we really don't know.
42868c9fbc29Smrg# 'pass_all' -- all dependencies passed with no checks.
42878c9fbc29Smrg# 'test_compile' -- check by making test program.
42888c9fbc29Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
42898c9fbc29Smrg# which responds to the $file_magic_cmd with a given extended regex.
42908c9fbc29Smrg# If you have `file' or equivalent on your system and you're not sure
42918c9fbc29Smrg# whether `pass_all' will *always* work, you probably want this one.
42928c9fbc29Smrg
42938c9fbc29Smrgcase $host_os in
42944e411241Smrgaix[[4-9]]*)
42958c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
42968c9fbc29Smrg  ;;
42978c9fbc29Smrg
42988c9fbc29Smrgbeos*)
42998c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
43008c9fbc29Smrg  ;;
43018c9fbc29Smrg
43028c9fbc29Smrgbsdi[[45]]*)
43038c9fbc29Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
43048c9fbc29Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
43058c9fbc29Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
43068c9fbc29Smrg  ;;
43078c9fbc29Smrg
43088c9fbc29Smrgcygwin*)
43098c9fbc29Smrg  # func_win32_libid is a shell function defined in ltmain.sh
43108c9fbc29Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
43118c9fbc29Smrg  lt_cv_file_magic_cmd='func_win32_libid'
43128c9fbc29Smrg  ;;
43138c9fbc29Smrg
43148c9fbc29Smrgmingw* | pw32*)
43158c9fbc29Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
43164e411241Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
43174e411241Smrg  # unless we find 'file', for example because we are cross-compiling.
43184cd6a3aeSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
43194cd6a3aeSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
43204e411241Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
43214e411241Smrg    lt_cv_file_magic_cmd='func_win32_libid'
43224e411241Smrg  else
43234cd6a3aeSmrg    # Keep this pattern in sync with the one in func_win32_libid.
43244cd6a3aeSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
43254e411241Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
43264e411241Smrg  fi
43278c9fbc29Smrg  ;;
43288c9fbc29Smrg
43294cd6a3aeSmrgcegcc*)
43304cd6a3aeSmrg  # use the weaker test based on 'objdump'. See mingw*.
43314cd6a3aeSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
43324cd6a3aeSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
43334cd6a3aeSmrg  ;;
43344cd6a3aeSmrg
43358c9fbc29Smrgdarwin* | rhapsody*)
43368c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
43378c9fbc29Smrg  ;;
43388c9fbc29Smrg
43394e411241Smrgfreebsd* | dragonfly*)
43404cd6a3aeSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
43418c9fbc29Smrg    case $host_cpu in
43428c9fbc29Smrg    i*86 )
43438c9fbc29Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
43448c9fbc29Smrg      # Let's accept both of them until this is cleared up.
43458c9fbc29Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
43468c9fbc29Smrg      lt_cv_file_magic_cmd=/usr/bin/file
43478c9fbc29Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
43488c9fbc29Smrg      ;;
43498c9fbc29Smrg    esac
43508c9fbc29Smrg  else
43518c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
43528c9fbc29Smrg  fi
43538c9fbc29Smrg  ;;
43548c9fbc29Smrg
43558c9fbc29Smrggnu*)
43568c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
43578c9fbc29Smrg  ;;
43588c9fbc29Smrg
43594cd6a3aeSmrghaiku*)
43604cd6a3aeSmrg  lt_cv_deplibs_check_method=pass_all
43614cd6a3aeSmrg  ;;
43624cd6a3aeSmrg
43638c9fbc29Smrghpux10.20* | hpux11*)
43648c9fbc29Smrg  lt_cv_file_magic_cmd=/usr/bin/file
43658c9fbc29Smrg  case $host_cpu in
43668c9fbc29Smrg  ia64*)
43678c9fbc29Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
43688c9fbc29Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
43698c9fbc29Smrg    ;;
43708c9fbc29Smrg  hppa*64*)
43714cd6a3aeSmrg    [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]']
43728c9fbc29Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
43738c9fbc29Smrg    ;;
43748c9fbc29Smrg  *)
43754cd6a3aeSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
43768c9fbc29Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
43778c9fbc29Smrg    ;;
43788c9fbc29Smrg  esac
43798c9fbc29Smrg  ;;
43808c9fbc29Smrg
43814e411241Smrginterix[[3-9]]*)
43828c9fbc29Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
43838c9fbc29Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
43848c9fbc29Smrg  ;;
43858c9fbc29Smrg
43868c9fbc29Smrgirix5* | irix6* | nonstopux*)
43878c9fbc29Smrg  case $LD in
43888c9fbc29Smrg  *-32|*"-32 ") libmagic=32-bit;;
43898c9fbc29Smrg  *-n32|*"-n32 ") libmagic=N32;;
43908c9fbc29Smrg  *-64|*"-64 ") libmagic=64-bit;;
43918c9fbc29Smrg  *) libmagic=never-match;;
43928c9fbc29Smrg  esac
43938c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
43948c9fbc29Smrg  ;;
43958c9fbc29Smrg
43968c9fbc29Smrg# This must be Linux ELF.
43974cd6a3aeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
43988c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
43998c9fbc29Smrg  ;;
44008c9fbc29Smrg
44018c9fbc29Smrgnetbsd*)
44024cd6a3aeSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
44038c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
44048c9fbc29Smrg  else
44058c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
44068c9fbc29Smrg  fi
44078c9fbc29Smrg  ;;
44088c9fbc29Smrg
44098c9fbc29Smrgnewos6*)
44108c9fbc29Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
44118c9fbc29Smrg  lt_cv_file_magic_cmd=/usr/bin/file
44128c9fbc29Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
44138c9fbc29Smrg  ;;
44148c9fbc29Smrg
44154cd6a3aeSmrg*nto* | *qnx*)
44164cd6a3aeSmrg  lt_cv_deplibs_check_method=pass_all
44178c9fbc29Smrg  ;;
44188c9fbc29Smrg
44198c9fbc29Smrgopenbsd*)
44204cd6a3aeSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
44218c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
44228c9fbc29Smrg  else
44238c9fbc29Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
44248c9fbc29Smrg  fi
44258c9fbc29Smrg  ;;
44268c9fbc29Smrg
44278c9fbc29Smrgosf3* | osf4* | osf5*)
44288c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
44298c9fbc29Smrg  ;;
44308c9fbc29Smrg
44314e411241Smrgrdos*)
44324e411241Smrg  lt_cv_deplibs_check_method=pass_all
44334e411241Smrg  ;;
44344e411241Smrg
44358c9fbc29Smrgsolaris*)
44368c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
44378c9fbc29Smrg  ;;
44388c9fbc29Smrg
44394cd6a3aeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
44404cd6a3aeSmrg  lt_cv_deplibs_check_method=pass_all
44414cd6a3aeSmrg  ;;
44424cd6a3aeSmrg
44438c9fbc29Smrgsysv4 | sysv4.3*)
44448c9fbc29Smrg  case $host_vendor in
44458c9fbc29Smrg  motorola)
44468c9fbc29Smrg    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]]'
44478c9fbc29Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
44488c9fbc29Smrg    ;;
44498c9fbc29Smrg  ncr)
44508c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
44518c9fbc29Smrg    ;;
44528c9fbc29Smrg  sequent)
44538c9fbc29Smrg    lt_cv_file_magic_cmd='/bin/file'
44548c9fbc29Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
44558c9fbc29Smrg    ;;
44568c9fbc29Smrg  sni)
44578c9fbc29Smrg    lt_cv_file_magic_cmd='/bin/file'
44588c9fbc29Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
44598c9fbc29Smrg    lt_cv_file_magic_test_file=/lib/libc.so
44608c9fbc29Smrg    ;;
44618c9fbc29Smrg  siemens)
44628c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
44638c9fbc29Smrg    ;;
44648c9fbc29Smrg  pc)
44658c9fbc29Smrg    lt_cv_deplibs_check_method=pass_all
44668c9fbc29Smrg    ;;
44678c9fbc29Smrg  esac
44688c9fbc29Smrg  ;;
44698c9fbc29Smrg
44704cd6a3aeSmrgtpf*)
44718c9fbc29Smrg  lt_cv_deplibs_check_method=pass_all
44728c9fbc29Smrg  ;;
44738c9fbc29Smrgesac
44748c9fbc29Smrg])
44754cd6a3aeSmrg
44764cd6a3aeSmrgfile_magic_glob=
44774cd6a3aeSmrgwant_nocaseglob=no
44784cd6a3aeSmrgif test "$build" = "$host"; then
44794cd6a3aeSmrg  case $host_os in
44804cd6a3aeSmrg  mingw* | pw32*)
44814cd6a3aeSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
44824cd6a3aeSmrg      want_nocaseglob=yes
44834cd6a3aeSmrg    else
44844cd6a3aeSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
44854cd6a3aeSmrg    fi
44864cd6a3aeSmrg    ;;
44874cd6a3aeSmrg  esac
44884cd6a3aeSmrgfi
44894cd6a3aeSmrg
44908c9fbc29Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
44918c9fbc29Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
44928c9fbc29Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
44934cd6a3aeSmrg
44944cd6a3aeSmrg_LT_DECL([], [deplibs_check_method], [1],
44954cd6a3aeSmrg    [Method to check whether dependent libraries are shared objects])
44964cd6a3aeSmrg_LT_DECL([], [file_magic_cmd], [1],
44974cd6a3aeSmrg    [Command to use when deplibs_check_method = "file_magic"])
44984cd6a3aeSmrg_LT_DECL([], [file_magic_glob], [1],
44994cd6a3aeSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
45004cd6a3aeSmrg_LT_DECL([], [want_nocaseglob], [1],
45014cd6a3aeSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
45024cd6a3aeSmrg])# _LT_CHECK_MAGIC_METHOD
45038c9fbc29Smrg
45048c9fbc29Smrg
45054cd6a3aeSmrg# LT_PATH_NM
45068c9fbc29Smrg# ----------
45074cd6a3aeSmrg# find the pathname to a BSD- or MS-compatible name lister
45084cd6a3aeSmrgAC_DEFUN([LT_PATH_NM],
45094cd6a3aeSmrg[AC_REQUIRE([AC_PROG_CC])dnl
45104cd6a3aeSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
45118c9fbc29Smrg[if test -n "$NM"; then
45128c9fbc29Smrg  # Let the user override the test.
45138c9fbc29Smrg  lt_cv_path_NM="$NM"
45148c9fbc29Smrgelse
45158c9fbc29Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
45164e411241Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
45178c9fbc29Smrg    lt_nm_to_check="$lt_nm_to_check nm"
45188c9fbc29Smrg  fi
45198c9fbc29Smrg  for lt_tmp_nm in $lt_nm_to_check; do
45208c9fbc29Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
45218c9fbc29Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
45228c9fbc29Smrg      IFS="$lt_save_ifs"
45238c9fbc29Smrg      test -z "$ac_dir" && ac_dir=.
45248c9fbc29Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
45258c9fbc29Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
45268c9fbc29Smrg	# Check to see if the nm accepts a BSD-compat flag.
45278c9fbc29Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
45288c9fbc29Smrg	#   nm: unknown option "B" ignored
45298c9fbc29Smrg	# Tru64's nm complains that /dev/null is an invalid object file
45308c9fbc29Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
45318c9fbc29Smrg	*/dev/null* | *'Invalid file or object type'*)
45328c9fbc29Smrg	  lt_cv_path_NM="$tmp_nm -B"
45338c9fbc29Smrg	  break
45348c9fbc29Smrg	  ;;
45358c9fbc29Smrg	*)
45368c9fbc29Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
45378c9fbc29Smrg	  */dev/null*)
45388c9fbc29Smrg	    lt_cv_path_NM="$tmp_nm -p"
45398c9fbc29Smrg	    break
45408c9fbc29Smrg	    ;;
45418c9fbc29Smrg	  *)
45428c9fbc29Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
45438c9fbc29Smrg	    continue # so that we can try to find one that supports BSD flags
45448c9fbc29Smrg	    ;;
45458c9fbc29Smrg	  esac
45468c9fbc29Smrg	  ;;
45478c9fbc29Smrg	esac
45488c9fbc29Smrg      fi
45498c9fbc29Smrg    done
45508c9fbc29Smrg    IFS="$lt_save_ifs"
45518c9fbc29Smrg  done
45524cd6a3aeSmrg  : ${lt_cv_path_NM=no}
45538c9fbc29Smrgfi])
45544cd6a3aeSmrgif test "$lt_cv_path_NM" != "no"; then
45554cd6a3aeSmrg  NM="$lt_cv_path_NM"
45564cd6a3aeSmrgelse
45574cd6a3aeSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
45584cd6a3aeSmrg  if test -n "$DUMPBIN"; then :
45594cd6a3aeSmrg    # Let the user override the test.
45604cd6a3aeSmrg  else
45614cd6a3aeSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
45624cd6a3aeSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
45634cd6a3aeSmrg    *COFF*)
45644cd6a3aeSmrg      DUMPBIN="$DUMPBIN -symbols"
45654cd6a3aeSmrg      ;;
45664cd6a3aeSmrg    *)
45674cd6a3aeSmrg      DUMPBIN=:
45684cd6a3aeSmrg      ;;
45694cd6a3aeSmrg    esac
45704cd6a3aeSmrg  fi
45714cd6a3aeSmrg  AC_SUBST([DUMPBIN])
45724cd6a3aeSmrg  if test "$DUMPBIN" != ":"; then
45734cd6a3aeSmrg    NM="$DUMPBIN"
45744cd6a3aeSmrg  fi
45754cd6a3aeSmrgfi
45764cd6a3aeSmrgtest -z "$NM" && NM=nm
45774cd6a3aeSmrgAC_SUBST([NM])
45784cd6a3aeSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
45794cd6a3aeSmrg
45804cd6a3aeSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
45814cd6a3aeSmrg  [lt_cv_nm_interface="BSD nm"
45824cd6a3aeSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
45834cd6a3aeSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
45844cd6a3aeSmrg  (eval "$ac_compile" 2>conftest.err)
45854cd6a3aeSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
45864cd6a3aeSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
45874cd6a3aeSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
45884cd6a3aeSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
45894cd6a3aeSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
45904cd6a3aeSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
45914cd6a3aeSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
45924cd6a3aeSmrg    lt_cv_nm_interface="MS dumpbin"
45934cd6a3aeSmrg  fi
45944cd6a3aeSmrg  rm -f conftest*])
45954cd6a3aeSmrg])# LT_PATH_NM
45964cd6a3aeSmrg
45974cd6a3aeSmrg# Old names:
45984cd6a3aeSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
45994cd6a3aeSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
46004cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
46014cd6a3aeSmrgdnl AC_DEFUN([AM_PROG_NM], [])
46024cd6a3aeSmrgdnl AC_DEFUN([AC_PROG_NM], [])
46034cd6a3aeSmrg
46044cd6a3aeSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
46054cd6a3aeSmrg# --------------------------------
46064cd6a3aeSmrg# how to determine the name of the shared library
46074cd6a3aeSmrg# associated with a specific link library.
46084cd6a3aeSmrg#  -- PORTME fill in with the dynamic library characteristics
46094cd6a3aeSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
46104cd6a3aeSmrg[m4_require([_LT_DECL_EGREP])
46114cd6a3aeSmrgm4_require([_LT_DECL_OBJDUMP])
46124cd6a3aeSmrgm4_require([_LT_DECL_DLLTOOL])
46134cd6a3aeSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
46144cd6a3aeSmrglt_cv_sharedlib_from_linklib_cmd,
46154cd6a3aeSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
46164cd6a3aeSmrg
46174cd6a3aeSmrgcase $host_os in
46184cd6a3aeSmrgcygwin* | mingw* | pw32* | cegcc*)
46194cd6a3aeSmrg  # two different shell functions defined in ltmain.sh
46204cd6a3aeSmrg  # decide which to use based on capabilities of $DLLTOOL
46214cd6a3aeSmrg  case `$DLLTOOL --help 2>&1` in
46224cd6a3aeSmrg  *--identify-strict*)
46234cd6a3aeSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
46244cd6a3aeSmrg    ;;
46254cd6a3aeSmrg  *)
46264cd6a3aeSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
46274cd6a3aeSmrg    ;;
46284cd6a3aeSmrg  esac
46294cd6a3aeSmrg  ;;
46304cd6a3aeSmrg*)
46314cd6a3aeSmrg  # fallback: assume linklib IS sharedlib
46324cd6a3aeSmrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
46334cd6a3aeSmrg  ;;
46344cd6a3aeSmrgesac
46354cd6a3aeSmrg])
46364cd6a3aeSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
46374cd6a3aeSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
46388c9fbc29Smrg
46394cd6a3aeSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
46404cd6a3aeSmrg    [Command to associate shared and link libraries])
46414cd6a3aeSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
46428c9fbc29Smrg
46434cd6a3aeSmrg
46444cd6a3aeSmrg# _LT_PATH_MANIFEST_TOOL
46454cd6a3aeSmrg# ----------------------
46464cd6a3aeSmrg# locate the manifest tool
46474cd6a3aeSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
46484cd6a3aeSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
46494cd6a3aeSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
46504cd6a3aeSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
46514cd6a3aeSmrg  [lt_cv_path_mainfest_tool=no
46524cd6a3aeSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
46534cd6a3aeSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
46544cd6a3aeSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
46554cd6a3aeSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
46564cd6a3aeSmrg    lt_cv_path_mainfest_tool=yes
46574cd6a3aeSmrg  fi
46584cd6a3aeSmrg  rm -f conftest*])
46594cd6a3aeSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
46604cd6a3aeSmrg  MANIFEST_TOOL=:
46614cd6a3aeSmrgfi
46624cd6a3aeSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
46634cd6a3aeSmrg])# _LT_PATH_MANIFEST_TOOL
46644cd6a3aeSmrg
46654cd6a3aeSmrg
46664cd6a3aeSmrg# LT_LIB_M
46674cd6a3aeSmrg# --------
46688c9fbc29Smrg# check for math library
46694cd6a3aeSmrgAC_DEFUN([LT_LIB_M],
46708c9fbc29Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
46718c9fbc29SmrgLIBM=
46728c9fbc29Smrgcase $host in
46734cd6a3aeSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
46748c9fbc29Smrg  # These system don't have libm, or don't need it
46758c9fbc29Smrg  ;;
46768c9fbc29Smrg*-ncr-sysv4.3*)
46778c9fbc29Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
46788c9fbc29Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
46798c9fbc29Smrg  ;;
46808c9fbc29Smrg*)
46818c9fbc29Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
46828c9fbc29Smrg  ;;
46838c9fbc29Smrgesac
46844cd6a3aeSmrgAC_SUBST([LIBM])
46854cd6a3aeSmrg])# LT_LIB_M
46868c9fbc29Smrg
46874cd6a3aeSmrg# Old name:
46884cd6a3aeSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
46894cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
46904cd6a3aeSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
46918c9fbc29Smrg
46928c9fbc29Smrg
46934cd6a3aeSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
46944cd6a3aeSmrg# -------------------------------
46954cd6a3aeSmrgm4_defun([_LT_COMPILER_NO_RTTI],
46964cd6a3aeSmrg[m4_require([_LT_TAG_COMPILER])dnl
46978c9fbc29Smrg
46984cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
46998c9fbc29Smrg
47004cd6a3aeSmrgif test "$GCC" = yes; then
47014cd6a3aeSmrg  case $cc_basename in
47024cd6a3aeSmrg  nvcc*)
47034cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
47044cd6a3aeSmrg  *)
47054cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
47064cd6a3aeSmrg  esac
47078c9fbc29Smrg
47084cd6a3aeSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
47094cd6a3aeSmrg    lt_cv_prog_compiler_rtti_exceptions,
47104cd6a3aeSmrg    [-fno-rtti -fno-exceptions], [],
47114cd6a3aeSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
47124cd6a3aeSmrgfi
47134cd6a3aeSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
47144cd6a3aeSmrg	[Compiler flag to turn off builtin functions])
47154cd6a3aeSmrg])# _LT_COMPILER_NO_RTTI
47168c9fbc29Smrg
47178c9fbc29Smrg
47184cd6a3aeSmrg# _LT_CMD_GLOBAL_SYMBOLS
47194cd6a3aeSmrg# ----------------------
47204cd6a3aeSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
47214cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
47224cd6a3aeSmrgAC_REQUIRE([AC_PROG_CC])dnl
47234cd6a3aeSmrgAC_REQUIRE([AC_PROG_AWK])dnl
47244cd6a3aeSmrgAC_REQUIRE([LT_PATH_NM])dnl
47254cd6a3aeSmrgAC_REQUIRE([LT_PATH_LD])dnl
47264cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl
47274cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl
47284cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl
47298c9fbc29Smrg
47304cd6a3aeSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
47314cd6a3aeSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
47324cd6a3aeSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
47338c9fbc29Smrg[
47344cd6a3aeSmrg# These are sane defaults that work on at least a few old systems.
47354cd6a3aeSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
47368c9fbc29Smrg
47374cd6a3aeSmrg# Character class describing NM global symbol codes.
47384cd6a3aeSmrgsymcode='[[BCDEGRST]]'
47398c9fbc29Smrg
47404cd6a3aeSmrg# Regexp to match symbols that can be accessed directly from C.
47414cd6a3aeSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
47428c9fbc29Smrg
47434cd6a3aeSmrg# Define system-specific variables.
47448c9fbc29Smrgcase $host_os in
47454cd6a3aeSmrgaix*)
47464cd6a3aeSmrg  symcode='[[BCDT]]'
47478c9fbc29Smrg  ;;
47484cd6a3aeSmrgcygwin* | mingw* | pw32* | cegcc*)
47494cd6a3aeSmrg  symcode='[[ABCDGISTW]]'
47504cd6a3aeSmrg  ;;
47514cd6a3aeSmrghpux*)
47524cd6a3aeSmrg  if test "$host_cpu" = ia64; then
47534cd6a3aeSmrg    symcode='[[ABCDEGRST]]'
47548c9fbc29Smrg  fi
47554cd6a3aeSmrg  ;;
47564cd6a3aeSmrgirix* | nonstopux*)
47574cd6a3aeSmrg  symcode='[[BCDEGRST]]'
47584cd6a3aeSmrg  ;;
47594cd6a3aeSmrgosf*)
47604cd6a3aeSmrg  symcode='[[BCDEGQRST]]'
47614cd6a3aeSmrg  ;;
47624cd6a3aeSmrgsolaris*)
47634cd6a3aeSmrg  symcode='[[BDRT]]'
47644cd6a3aeSmrg  ;;
47654cd6a3aeSmrgsco3.2v5*)
47664cd6a3aeSmrg  symcode='[[DT]]'
47674cd6a3aeSmrg  ;;
47684cd6a3aeSmrgsysv4.2uw2*)
47694cd6a3aeSmrg  symcode='[[DT]]'
47704cd6a3aeSmrg  ;;
47714cd6a3aeSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
47724cd6a3aeSmrg  symcode='[[ABDT]]'
47734cd6a3aeSmrg  ;;
47744cd6a3aeSmrgsysv4)
47754cd6a3aeSmrg  symcode='[[DFNSTU]]'
47764cd6a3aeSmrg  ;;
47778c9fbc29Smrgesac
47788c9fbc29Smrg
47794cd6a3aeSmrg# If we're using GNU nm, then use its standard symbol codes.
47804cd6a3aeSmrgcase `$NM -V 2>&1` in
47814cd6a3aeSmrg*GNU* | *'with BFD'*)
47824cd6a3aeSmrg  symcode='[[ABCDGIRSTW]]' ;;
47834cd6a3aeSmrgesac
47848c9fbc29Smrg
47854cd6a3aeSmrg# Transform an extracted symbol line into a proper C declaration.
47864cd6a3aeSmrg# Some systems (esp. on ia64) link data and code symbols differently,
47874cd6a3aeSmrg# so use this general approach.
47884cd6a3aeSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
47898c9fbc29Smrg
47904cd6a3aeSmrg# Transform an extracted symbol line into symbol name and symbol address
47914cd6a3aeSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
47924cd6a3aeSmrglt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"lib\2\", (void *) \&\2},/p'"
47938c9fbc29Smrg
47944cd6a3aeSmrg# Handle CRLF in mingw tool chain
47954cd6a3aeSmrgopt_cr=
47964cd6a3aeSmrgcase $build_os in
47974cd6a3aeSmrgmingw*)
47984cd6a3aeSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
47994cd6a3aeSmrg  ;;
48004cd6a3aeSmrgesac
48018c9fbc29Smrg
48024cd6a3aeSmrg# Try without a prefix underscore, then with it.
48034cd6a3aeSmrgfor ac_symprfx in "" "_"; do
48048c9fbc29Smrg
48054cd6a3aeSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
48064cd6a3aeSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
48078c9fbc29Smrg
48084cd6a3aeSmrg  # Write the raw and C identifiers.
48094cd6a3aeSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
48104cd6a3aeSmrg    # Fake it for dumpbin and say T for any non-static function
48114cd6a3aeSmrg    # and D for any global variable.
48124cd6a3aeSmrg    # Also find C++ and __fastcall symbols from MSVC++,
48134cd6a3aeSmrg    # which start with @ or ?.
48144cd6a3aeSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
48154cd6a3aeSmrg"     {last_section=section; section=\$ 3};"\
48164cd6a3aeSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
48174cd6a3aeSmrg"     \$ 0!~/External *\|/{next};"\
48184cd6a3aeSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
48194cd6a3aeSmrg"     {if(hide[section]) next};"\
48204cd6a3aeSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
48214cd6a3aeSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
48224cd6a3aeSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
48234cd6a3aeSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
48244cd6a3aeSmrg"     ' prfx=^$ac_symprfx]"
48254cd6a3aeSmrg  else
48264cd6a3aeSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
48274cd6a3aeSmrg  fi
48284cd6a3aeSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
48298c9fbc29Smrg
48304cd6a3aeSmrg  # Check to see that the pipe works correctly.
48314cd6a3aeSmrg  pipe_works=no
48328c9fbc29Smrg
48334cd6a3aeSmrg  rm -f conftest*
48344cd6a3aeSmrg  cat > conftest.$ac_ext <<_LT_EOF
48354cd6a3aeSmrg#ifdef __cplusplus
48364cd6a3aeSmrgextern "C" {
48374cd6a3aeSmrg#endif
48384cd6a3aeSmrgchar nm_test_var;
48394cd6a3aeSmrgvoid nm_test_func(void);
48404cd6a3aeSmrgvoid nm_test_func(void){}
48414cd6a3aeSmrg#ifdef __cplusplus
48424cd6a3aeSmrg}
48434cd6a3aeSmrg#endif
48444cd6a3aeSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
48454cd6a3aeSmrg_LT_EOF
48468c9fbc29Smrg
48474cd6a3aeSmrg  if AC_TRY_EVAL(ac_compile); then
48484cd6a3aeSmrg    # Now try to grab the symbols.
48494cd6a3aeSmrg    nlist=conftest.nm
48504cd6a3aeSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
48514cd6a3aeSmrg      # Try sorting and uniquifying the output.
48524cd6a3aeSmrg      if sort "$nlist" | uniq > "$nlist"T; then
48534cd6a3aeSmrg	mv -f "$nlist"T "$nlist"
48544cd6a3aeSmrg      else
48554cd6a3aeSmrg	rm -f "$nlist"T
48564cd6a3aeSmrg      fi
48578c9fbc29Smrg
48584cd6a3aeSmrg      # Make sure that we snagged all the symbols we need.
48594cd6a3aeSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
48604cd6a3aeSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
48614cd6a3aeSmrg	  cat <<_LT_EOF > conftest.$ac_ext
48624cd6a3aeSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
48634cd6a3aeSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
48644cd6a3aeSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
48654cd6a3aeSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
48664cd6a3aeSmrg# define LT@&t@_DLSYM_CONST
48674cd6a3aeSmrg#elif defined(__osf__)
48684cd6a3aeSmrg/* This system does not cope well with relocations in const data.  */
48694cd6a3aeSmrg# define LT@&t@_DLSYM_CONST
48704cd6a3aeSmrg#else
48714cd6a3aeSmrg# define LT@&t@_DLSYM_CONST const
48724cd6a3aeSmrg#endif
48738c9fbc29Smrg
48744cd6a3aeSmrg#ifdef __cplusplus
48754cd6a3aeSmrgextern "C" {
48764cd6a3aeSmrg#endif
48778c9fbc29Smrg
48784cd6a3aeSmrg_LT_EOF
48794cd6a3aeSmrg	  # Now generate the symbol file.
48804cd6a3aeSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
48818c9fbc29Smrg
48824cd6a3aeSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
48838c9fbc29Smrg
48844cd6a3aeSmrg/* The mapping between symbol names and symbols.  */
48854cd6a3aeSmrgLT@&t@_DLSYM_CONST struct {
48864cd6a3aeSmrg  const char *name;
48874cd6a3aeSmrg  void       *address;
48884cd6a3aeSmrg}
48894cd6a3aeSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
48904cd6a3aeSmrg{
48914cd6a3aeSmrg  { "@PROGRAM@", (void *) 0 },
48924cd6a3aeSmrg_LT_EOF
48934cd6a3aeSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
48944cd6a3aeSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
48954cd6a3aeSmrg  {0, (void *) 0}
48964cd6a3aeSmrg};
48978c9fbc29Smrg
48984cd6a3aeSmrg/* This works around a problem in FreeBSD linker */
48994cd6a3aeSmrg#ifdef FREEBSD_WORKAROUND
49004cd6a3aeSmrgstatic const void *lt_preloaded_setup() {
49014cd6a3aeSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
49024cd6a3aeSmrg}
49034cd6a3aeSmrg#endif
49048c9fbc29Smrg
49054cd6a3aeSmrg#ifdef __cplusplus
49064cd6a3aeSmrg}
49074cd6a3aeSmrg#endif
49084cd6a3aeSmrg_LT_EOF
49094cd6a3aeSmrg	  # Now try linking the two files.
49104cd6a3aeSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
49114cd6a3aeSmrg	  lt_globsym_save_LIBS=$LIBS
49124cd6a3aeSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
49134cd6a3aeSmrg	  LIBS="conftstm.$ac_objext"
49144cd6a3aeSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
49154cd6a3aeSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
49164cd6a3aeSmrg	    pipe_works=yes
49174cd6a3aeSmrg	  fi
49184cd6a3aeSmrg	  LIBS=$lt_globsym_save_LIBS
49194cd6a3aeSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
49204cd6a3aeSmrg	else
49214cd6a3aeSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
49224cd6a3aeSmrg	fi
49234cd6a3aeSmrg      else
49244cd6a3aeSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
49254cd6a3aeSmrg      fi
49268c9fbc29Smrg    else
49274cd6a3aeSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
49288c9fbc29Smrg    fi
49298c9fbc29Smrg  else
49304cd6a3aeSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
49314cd6a3aeSmrg    cat conftest.$ac_ext >&5
49328c9fbc29Smrg  fi
49334cd6a3aeSmrg  rm -rf conftest* conftst*
49348c9fbc29Smrg
49354cd6a3aeSmrg  # Do not use the global_symbol_pipe unless it works.
49364cd6a3aeSmrg  if test "$pipe_works" = yes; then
49374cd6a3aeSmrg    break
49384cd6a3aeSmrg  else
49394cd6a3aeSmrg    lt_cv_sys_global_symbol_pipe=
49404cd6a3aeSmrg  fi
49414cd6a3aeSmrgdone
49424cd6a3aeSmrg])
49434cd6a3aeSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
49444cd6a3aeSmrg  lt_cv_sys_global_symbol_to_cdecl=
49454cd6a3aeSmrgfi
49464cd6a3aeSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
49474cd6a3aeSmrg  AC_MSG_RESULT(failed)
49488c9fbc29Smrgelse
49494cd6a3aeSmrg  AC_MSG_RESULT(ok)
49508c9fbc29Smrgfi
49518c9fbc29Smrg
49524cd6a3aeSmrg# Response file support.
49534cd6a3aeSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
49544cd6a3aeSmrg  nm_file_list_spec='@'
49554cd6a3aeSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
49564cd6a3aeSmrg  nm_file_list_spec='@'
49574cd6a3aeSmrgfi
49588c9fbc29Smrg
49594cd6a3aeSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
49604cd6a3aeSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
49614cd6a3aeSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
49624cd6a3aeSmrg    [Transform the output of nm in a proper C declaration])
49634cd6a3aeSmrg_LT_DECL([global_symbol_to_c_name_address],
49644cd6a3aeSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
49654cd6a3aeSmrg    [Transform the output of nm in a C name address pair])
49664cd6a3aeSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
49674cd6a3aeSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
49684cd6a3aeSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
49694cd6a3aeSmrg_LT_DECL([], [nm_file_list_spec], [1],
49704cd6a3aeSmrg    [Specify filename containing input files for $NM])
49714cd6a3aeSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
49724cd6a3aeSmrg
49734cd6a3aeSmrg
49744cd6a3aeSmrg# _LT_COMPILER_PIC([TAGNAME])
49754cd6a3aeSmrg# ---------------------------
49764cd6a3aeSmrgm4_defun([_LT_COMPILER_PIC],
49774cd6a3aeSmrg[m4_require([_LT_TAG_COMPILER])dnl
49784cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
49794cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
49804cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
49818c9fbc29Smrg
49824cd6a3aeSmrgm4_if([$1], [CXX], [
49834cd6a3aeSmrg  # C++ specific cases for pic, static, wl, etc.
49844cd6a3aeSmrg  if test "$GXX" = yes; then
49854cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
49864cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
49878c9fbc29Smrg
49884cd6a3aeSmrg    case $host_os in
49894cd6a3aeSmrg    aix*)
49904cd6a3aeSmrg      # All AIX code is PIC.
49918c9fbc29Smrg      if test "$host_cpu" = ia64; then
49924cd6a3aeSmrg	# AIX 5 now supports IA64 processor
49934cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
49948c9fbc29Smrg      fi
49954cd6a3aeSmrg      ;;
49968c9fbc29Smrg
49974cd6a3aeSmrg    amigaos*)
49984cd6a3aeSmrg      case $host_cpu in
49994cd6a3aeSmrg      powerpc)
50004cd6a3aeSmrg            # see comment about AmigaOS4 .so support
50014cd6a3aeSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50024cd6a3aeSmrg        ;;
50034cd6a3aeSmrg      m68k)
50044cd6a3aeSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
50054cd6a3aeSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
50064cd6a3aeSmrg            # like `-m68040'.
50074cd6a3aeSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
50084cd6a3aeSmrg        ;;
50094cd6a3aeSmrg      esac
50104cd6a3aeSmrg      ;;
50118c9fbc29Smrg
50124cd6a3aeSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
50134cd6a3aeSmrg      # PIC is the default for these OSes.
50148c9fbc29Smrg      ;;
50154cd6a3aeSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
50164cd6a3aeSmrg      # This hack is so that the source file can tell whether it is being
50174cd6a3aeSmrg      # built for inclusion in a dll (and should export symbols for example).
50184cd6a3aeSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
50194cd6a3aeSmrg      # (--disable-auto-import) libraries
50204cd6a3aeSmrg      m4_if([$1], [GCJ], [],
50214cd6a3aeSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
50228c9fbc29Smrg      ;;
50234cd6a3aeSmrg    darwin* | rhapsody*)
50244cd6a3aeSmrg      # PIC is the default on this platform
50254cd6a3aeSmrg      # Common symbols not allowed in MH_DYLIB files
50264cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
50274cd6a3aeSmrg      ;;
50284cd6a3aeSmrg    *djgpp*)
50294cd6a3aeSmrg      # DJGPP does not support shared libraries at all
50304cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
50314cd6a3aeSmrg      ;;
50324cd6a3aeSmrg    haiku*)
50334cd6a3aeSmrg      # PIC is the default for Haiku.
50344cd6a3aeSmrg      # The "-static" flag exists, but is broken.
50354cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
50364cd6a3aeSmrg      ;;
50374cd6a3aeSmrg    interix[[3-9]]*)
50384cd6a3aeSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
50394cd6a3aeSmrg      # Instead, we relocate shared libraries at runtime.
50404cd6a3aeSmrg      ;;
50414cd6a3aeSmrg    sysv4*MP*)
50424cd6a3aeSmrg      if test -d /usr/nec; then
50434cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
50448c9fbc29Smrg      fi
50458c9fbc29Smrg      ;;
50464cd6a3aeSmrg    hpux*)
50474cd6a3aeSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
50484cd6a3aeSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
50494cd6a3aeSmrg      # sets the default TLS model and affects inlining.
50508c9fbc29Smrg      case $host_cpu in
50514cd6a3aeSmrg      hppa*64*)
50524cd6a3aeSmrg	;;
50538c9fbc29Smrg      *)
50544cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50554cd6a3aeSmrg	;;
50568c9fbc29Smrg      esac
50574cd6a3aeSmrg      ;;
50584cd6a3aeSmrg    *qnx* | *nto*)
50594cd6a3aeSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
50604cd6a3aeSmrg      # it will coredump.
50614cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
50628c9fbc29Smrg      ;;
50638c9fbc29Smrg    *)
50644cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
50658c9fbc29Smrg      ;;
50668c9fbc29Smrg    esac
50674cd6a3aeSmrg  else
50684cd6a3aeSmrg    case $host_os in
50694cd6a3aeSmrg      aix[[4-9]]*)
50704cd6a3aeSmrg	# All AIX code is PIC.
50714cd6a3aeSmrg	if test "$host_cpu" = ia64; then
50724cd6a3aeSmrg	  # AIX 5 now supports IA64 processor
50734cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
50744cd6a3aeSmrg	else
50754cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
50764cd6a3aeSmrg	fi
50778c9fbc29Smrg	;;
50784cd6a3aeSmrg      chorus*)
50794cd6a3aeSmrg	case $cc_basename in
50804cd6a3aeSmrg	cxch68*)
50814cd6a3aeSmrg	  # Green Hills C++ Compiler
50824cd6a3aeSmrg	  # _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"
50838c9fbc29Smrg	  ;;
50848c9fbc29Smrg	esac
50858c9fbc29Smrg	;;
50864cd6a3aeSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
50874cd6a3aeSmrg	# This hack is so that the source file can tell whether it is being
50884cd6a3aeSmrg	# built for inclusion in a dll (and should export symbols for example).
50894cd6a3aeSmrg	m4_if([$1], [GCJ], [],
50904cd6a3aeSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
50914cd6a3aeSmrg	;;
50924cd6a3aeSmrg      dgux*)
50934cd6a3aeSmrg	case $cc_basename in
50944cd6a3aeSmrg	  ec++*)
50954cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
50964cd6a3aeSmrg	    ;;
50974cd6a3aeSmrg	  ghcx*)
50984cd6a3aeSmrg	    # Green Hills C++ Compiler
50994cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
51004cd6a3aeSmrg	    ;;
51014cd6a3aeSmrg	  *)
51024cd6a3aeSmrg	    ;;
51034cd6a3aeSmrg	esac
51044cd6a3aeSmrg	;;
51054cd6a3aeSmrg      freebsd* | dragonfly*)
51064cd6a3aeSmrg	# FreeBSD uses GNU C++
51074cd6a3aeSmrg	;;
51084cd6a3aeSmrg      hpux9* | hpux10* | hpux11*)
51094cd6a3aeSmrg	case $cc_basename in
51104cd6a3aeSmrg	  CC*)
51114cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51124cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51134cd6a3aeSmrg	    if test "$host_cpu" != ia64; then
51144cd6a3aeSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51154cd6a3aeSmrg	    fi
51164cd6a3aeSmrg	    ;;
51174cd6a3aeSmrg	  aCC*)
51184cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51194cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
51208c9fbc29Smrg	    case $host_cpu in
51214cd6a3aeSmrg	    hppa*64*|ia64*)
51224cd6a3aeSmrg	      # +Z the default
51238c9fbc29Smrg	      ;;
51248c9fbc29Smrg	    *)
51254cd6a3aeSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
51268c9fbc29Smrg	      ;;
51278c9fbc29Smrg	    esac
51284cd6a3aeSmrg	    ;;
51294cd6a3aeSmrg	  *)
51304cd6a3aeSmrg	    ;;
51314cd6a3aeSmrg	esac
51328c9fbc29Smrg	;;
51334cd6a3aeSmrg      interix*)
51344cd6a3aeSmrg	# This is c89, which is MS Visual C++ (no shared libs)
51354cd6a3aeSmrg	# Anyone wants to do a port?
51368c9fbc29Smrg	;;
51374cd6a3aeSmrg      irix5* | irix6* | nonstopux*)
51384cd6a3aeSmrg	case $cc_basename in
51394cd6a3aeSmrg	  CC*)
51404cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51414cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51424cd6a3aeSmrg	    # CC pic flag -KPIC is the default.
51434cd6a3aeSmrg	    ;;
51444cd6a3aeSmrg	  *)
51454cd6a3aeSmrg	    ;;
51464cd6a3aeSmrg	esac
51478c9fbc29Smrg	;;
51484cd6a3aeSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
51494cd6a3aeSmrg	case $cc_basename in
51504cd6a3aeSmrg	  KCC*)
51514cd6a3aeSmrg	    # KAI C++ Compiler
51524cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
51534cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51544cd6a3aeSmrg	    ;;
51554cd6a3aeSmrg	  ecpc* )
51564cd6a3aeSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
51574cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51584cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51594cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
51604cd6a3aeSmrg	    ;;
51614cd6a3aeSmrg	  icpc* )
51624cd6a3aeSmrg	    # Intel C++, used to be incompatible with GCC.
51634cd6a3aeSmrg	    # ICC 10 doesn't accept -KPIC any more.
51644cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51654cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
51664cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
51674cd6a3aeSmrg	    ;;
51684cd6a3aeSmrg	  pgCC* | pgcpp*)
51694cd6a3aeSmrg	    # Portland Group C++ compiler
51704cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51714cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
51724cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51734cd6a3aeSmrg	    ;;
51744cd6a3aeSmrg	  cxx*)
51754cd6a3aeSmrg	    # Compaq C++
51764cd6a3aeSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
51774cd6a3aeSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
51784cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
51794cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
51804cd6a3aeSmrg	    ;;
51814cd6a3aeSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
51824cd6a3aeSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
51834cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
51844cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
51854cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
51864cd6a3aeSmrg	    ;;
51874cd6a3aeSmrg	  *)
51884cd6a3aeSmrg	    case `$CC -V 2>&1 | sed 5q` in
51894cd6a3aeSmrg	    *Sun\ C*)
51904cd6a3aeSmrg	      # Sun C++ 5.9
51914cd6a3aeSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51924cd6a3aeSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51934cd6a3aeSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
51944cd6a3aeSmrg	      ;;
51954cd6a3aeSmrg	    esac
51964cd6a3aeSmrg	    ;;
51974cd6a3aeSmrg	esac
51988c9fbc29Smrg	;;
51994cd6a3aeSmrg      lynxos*)
52004cd6a3aeSmrg	;;
52014cd6a3aeSmrg      m88k*)
52024cd6a3aeSmrg	;;
52034cd6a3aeSmrg      mvs*)
52044cd6a3aeSmrg	case $cc_basename in
52054cd6a3aeSmrg	  cxx*)
52064cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
52074cd6a3aeSmrg	    ;;
52084cd6a3aeSmrg	  *)
52094cd6a3aeSmrg	    ;;
52108c9fbc29Smrg	esac
52118c9fbc29Smrg	;;
52124cd6a3aeSmrg      netbsd*)
52134cd6a3aeSmrg	;;
52144cd6a3aeSmrg      *qnx* | *nto*)
52154cd6a3aeSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
52164cd6a3aeSmrg        # it will coredump.
52174cd6a3aeSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
52188c9fbc29Smrg        ;;
52194cd6a3aeSmrg      osf3* | osf4* | osf5*)
52204cd6a3aeSmrg	case $cc_basename in
52214cd6a3aeSmrg	  KCC*)
52224cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
52234cd6a3aeSmrg	    ;;
52244cd6a3aeSmrg	  RCC*)
52254cd6a3aeSmrg	    # Rational C++ 2.4.1
52264cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52274cd6a3aeSmrg	    ;;
52284cd6a3aeSmrg	  cxx*)
52294cd6a3aeSmrg	    # Digital/Compaq C++
52304cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52314cd6a3aeSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
52324cd6a3aeSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
52334cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
52344cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
52354cd6a3aeSmrg	    ;;
52364cd6a3aeSmrg	  *)
52374cd6a3aeSmrg	    ;;
52384cd6a3aeSmrg	esac
52398c9fbc29Smrg	;;
52404cd6a3aeSmrg      psos*)
52414cd6a3aeSmrg	;;
52424cd6a3aeSmrg      solaris*)
52434cd6a3aeSmrg	case $cc_basename in
52444cd6a3aeSmrg	  CC* | sunCC*)
52454cd6a3aeSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
52464cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52474cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52484cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52494cd6a3aeSmrg	    ;;
52504cd6a3aeSmrg	  gcx*)
52514cd6a3aeSmrg	    # Green Hills C++ Compiler
52524cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
52534cd6a3aeSmrg	    ;;
52544cd6a3aeSmrg	  *)
52554cd6a3aeSmrg	    ;;
52564e411241Smrg	esac
52574e411241Smrg	;;
52584cd6a3aeSmrg      sunos4*)
52594cd6a3aeSmrg	case $cc_basename in
52604cd6a3aeSmrg	  CC*)
52614cd6a3aeSmrg	    # Sun C++ 4.x
52624cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52634cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52644cd6a3aeSmrg	    ;;
52654cd6a3aeSmrg	  lcc*)
52664cd6a3aeSmrg	    # Lucid
52674cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
52684cd6a3aeSmrg	    ;;
52694cd6a3aeSmrg	  *)
52704cd6a3aeSmrg	    ;;
52714cd6a3aeSmrg	esac
52724cd6a3aeSmrg	;;
52734cd6a3aeSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
52744cd6a3aeSmrg	case $cc_basename in
52754cd6a3aeSmrg	  CC*)
52764cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52774cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52784cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52794cd6a3aeSmrg	    ;;
52804cd6a3aeSmrg	esac
52814cd6a3aeSmrg	;;
52824cd6a3aeSmrg      tandem*)
52834cd6a3aeSmrg	case $cc_basename in
52844cd6a3aeSmrg	  NCC*)
52854cd6a3aeSmrg	    # NonStop-UX NCC 3.20
52864cd6a3aeSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52874cd6a3aeSmrg	    ;;
52884cd6a3aeSmrg	  *)
52894cd6a3aeSmrg	    ;;
52904cd6a3aeSmrg	esac
52914cd6a3aeSmrg	;;
52924cd6a3aeSmrg      vxworks*)
52938c9fbc29Smrg	;;
52948c9fbc29Smrg      *)
52954cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
52968c9fbc29Smrg	;;
52978c9fbc29Smrg    esac
52984cd6a3aeSmrg  fi
52994cd6a3aeSmrg],
53004cd6a3aeSmrg[
53014cd6a3aeSmrg  if test "$GCC" = yes; then
53024cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53034cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
53044cd6a3aeSmrg
53054cd6a3aeSmrg    case $host_os in
53064cd6a3aeSmrg      aix*)
53074cd6a3aeSmrg      # All AIX code is PIC.
53084cd6a3aeSmrg      if test "$host_cpu" = ia64; then
53094cd6a3aeSmrg	# AIX 5 now supports IA64 processor
53104cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53114e411241Smrg      fi
53124cd6a3aeSmrg      ;;
53134cd6a3aeSmrg
53144cd6a3aeSmrg    amigaos*)
53154cd6a3aeSmrg      case $host_cpu in
53164cd6a3aeSmrg      powerpc)
53174cd6a3aeSmrg            # see comment about AmigaOS4 .so support
53184cd6a3aeSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53194cd6a3aeSmrg        ;;
53204cd6a3aeSmrg      m68k)
53214cd6a3aeSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
53224cd6a3aeSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
53234cd6a3aeSmrg            # like `-m68040'.
53244cd6a3aeSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
53254cd6a3aeSmrg        ;;
53264cd6a3aeSmrg      esac
53274cd6a3aeSmrg      ;;
53288c9fbc29Smrg
53294cd6a3aeSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
53304cd6a3aeSmrg      # PIC is the default for these OSes.
53314cd6a3aeSmrg      ;;
53324cd6a3aeSmrg
53334cd6a3aeSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
53344cd6a3aeSmrg      # This hack is so that the source file can tell whether it is being
53354cd6a3aeSmrg      # built for inclusion in a dll (and should export symbols for example).
53364cd6a3aeSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
53374cd6a3aeSmrg      # (--disable-auto-import) libraries
53384cd6a3aeSmrg      m4_if([$1], [GCJ], [],
53394cd6a3aeSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
53404cd6a3aeSmrg      ;;
53418c9fbc29Smrg
53424cd6a3aeSmrg    darwin* | rhapsody*)
53434cd6a3aeSmrg      # PIC is the default on this platform
53444cd6a3aeSmrg      # Common symbols not allowed in MH_DYLIB files
53454cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
53464cd6a3aeSmrg      ;;
53478c9fbc29Smrg
53484cd6a3aeSmrg    haiku*)
53494cd6a3aeSmrg      # PIC is the default for Haiku.
53504cd6a3aeSmrg      # The "-static" flag exists, but is broken.
53514cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
53524cd6a3aeSmrg      ;;
53538c9fbc29Smrg
53544cd6a3aeSmrg    hpux*)
53554cd6a3aeSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
53564cd6a3aeSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
53574cd6a3aeSmrg      # sets the default TLS model and affects inlining.
53584cd6a3aeSmrg      case $host_cpu in
53594cd6a3aeSmrg      hppa*64*)
53604cd6a3aeSmrg	# +Z the default
53618c9fbc29Smrg	;;
53628c9fbc29Smrg      *)
53634cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53644cd6a3aeSmrg	;;
53654cd6a3aeSmrg      esac
53664cd6a3aeSmrg      ;;
53674cd6a3aeSmrg
53684cd6a3aeSmrg    interix[[3-9]]*)
53694cd6a3aeSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
53704cd6a3aeSmrg      # Instead, we relocate shared libraries at runtime.
53714cd6a3aeSmrg      ;;
53728c9fbc29Smrg
53734cd6a3aeSmrg    msdosdjgpp*)
53744cd6a3aeSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
53754cd6a3aeSmrg      # on systems that don't support them.
53764cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
53774cd6a3aeSmrg      enable_shared=no
53784cd6a3aeSmrg      ;;
53798c9fbc29Smrg
53804cd6a3aeSmrg    *nto* | *qnx*)
53814cd6a3aeSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
53824cd6a3aeSmrg      # it will coredump.
53834cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
53844cd6a3aeSmrg      ;;
53858c9fbc29Smrg
53864cd6a3aeSmrg    sysv4*MP*)
53874cd6a3aeSmrg      if test -d /usr/nec; then
53884cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
53894cd6a3aeSmrg      fi
53904cd6a3aeSmrg      ;;
53914cd6a3aeSmrg
53924cd6a3aeSmrg    *)
53934cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53944cd6a3aeSmrg      ;;
53958c9fbc29Smrg    esac
53968c9fbc29Smrg
53974cd6a3aeSmrg    case $cc_basename in
53984cd6a3aeSmrg    nvcc*) # Cuda Compiler Driver 2.2
53994cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
54004cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
54014cd6a3aeSmrg      ;;
54024cd6a3aeSmrg    esac
54034cd6a3aeSmrg  else
54044cd6a3aeSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
54054cd6a3aeSmrg    case $host_os in
54064cd6a3aeSmrg    aix*)
54074cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54084cd6a3aeSmrg      if test "$host_cpu" = ia64; then
54094cd6a3aeSmrg	# AIX 5 now supports IA64 processor
54104cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54114cd6a3aeSmrg      else
54124cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
54134cd6a3aeSmrg      fi
54144cd6a3aeSmrg      ;;
54158c9fbc29Smrg
54164cd6a3aeSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
54174cd6a3aeSmrg      # This hack is so that the source file can tell whether it is being
54184cd6a3aeSmrg      # built for inclusion in a dll (and should export symbols for example).
54194cd6a3aeSmrg      m4_if([$1], [GCJ], [],
54204cd6a3aeSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
54214cd6a3aeSmrg      ;;
54228c9fbc29Smrg
54234cd6a3aeSmrg    hpux9* | hpux10* | hpux11*)
54244cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54254cd6a3aeSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
54264cd6a3aeSmrg      # not for PA HP-UX.
54274cd6a3aeSmrg      case $host_cpu in
54284cd6a3aeSmrg      hppa*64*|ia64*)
54294cd6a3aeSmrg	# +Z the default
54308c9fbc29Smrg	;;
54318c9fbc29Smrg      *)
54324cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
54334cd6a3aeSmrg	;;
54344cd6a3aeSmrg      esac
54354cd6a3aeSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
54364cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
54374cd6a3aeSmrg      ;;
54388c9fbc29Smrg
54394cd6a3aeSmrg    irix5* | irix6* | nonstopux*)
54404cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54414cd6a3aeSmrg      # PIC (with -KPIC) is the default.
54424cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54434cd6a3aeSmrg      ;;
54448c9fbc29Smrg
54454cd6a3aeSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
54464cd6a3aeSmrg      case $cc_basename in
54474cd6a3aeSmrg      # old Intel for x86_64 which still supported -KPIC.
54484cd6a3aeSmrg      ecc*)
54494cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54504cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54514cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
54524cd6a3aeSmrg        ;;
54534cd6a3aeSmrg      # icc used to be incompatible with GCC.
54544cd6a3aeSmrg      # ICC 10 doesn't accept -KPIC any more.
54554cd6a3aeSmrg      icc* | ifort*)
54564cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54574cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
54584cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
54594cd6a3aeSmrg        ;;
54604cd6a3aeSmrg      # Lahey Fortran 8.1.
54614cd6a3aeSmrg      lf95*)
54624cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54634cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
54644cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
54658c9fbc29Smrg	;;
54664cd6a3aeSmrg      nagfor*)
54674cd6a3aeSmrg	# NAG Fortran compiler
54684cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
54694cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
54704cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54718c9fbc29Smrg	;;
54724cd6a3aeSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
54734cd6a3aeSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
54744cd6a3aeSmrg	# which looks to be a dead project)
54754cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54764cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
54774cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54784cd6a3aeSmrg        ;;
54794cd6a3aeSmrg      ccc*)
54804cd6a3aeSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54814cd6a3aeSmrg        # All Alpha code is PIC.
54824cd6a3aeSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54834cd6a3aeSmrg        ;;
54844cd6a3aeSmrg      xl* | bgxl* | bgf* | mpixl*)
54854cd6a3aeSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
54864cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54874cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
54884cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
54898c9fbc29Smrg	;;
54908c9fbc29Smrg      *)
54914cd6a3aeSmrg	case `$CC -V 2>&1 | sed 5q` in
54924cd6a3aeSmrg	*Sun\ F* | *Sun*Fortran*)
54934cd6a3aeSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
54944cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54954cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54964cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
54974cd6a3aeSmrg	  ;;
54984cd6a3aeSmrg	*Sun\ C*)
54994cd6a3aeSmrg	  # Sun C 5.9
55004cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55014cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55024cd6a3aeSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55034cd6a3aeSmrg	  ;;
55048c9fbc29Smrg	esac
55054cd6a3aeSmrg	;;
55064cd6a3aeSmrg      esac
55074cd6a3aeSmrg      ;;
55084cd6a3aeSmrg
55094cd6a3aeSmrg    newsos6)
55104cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55114cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55124cd6a3aeSmrg      ;;
55138c9fbc29Smrg
55144cd6a3aeSmrg    *nto* | *qnx*)
55154cd6a3aeSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
55164cd6a3aeSmrg      # it will coredump.
55174cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
55184cd6a3aeSmrg      ;;
55198c9fbc29Smrg
55204cd6a3aeSmrg    osf3* | osf4* | osf5*)
55214cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55224cd6a3aeSmrg      # All OSF/1 code is PIC.
55234cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55244cd6a3aeSmrg      ;;
55258c9fbc29Smrg
55264cd6a3aeSmrg    rdos*)
55274cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55284cd6a3aeSmrg      ;;
55294cd6a3aeSmrg
55304cd6a3aeSmrg    solaris*)
55314cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55324cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55334cd6a3aeSmrg      case $cc_basename in
55344cd6a3aeSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
55354cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
55368c9fbc29Smrg      *)
55374cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
55384cd6a3aeSmrg      esac
55394cd6a3aeSmrg      ;;
55408c9fbc29Smrg
55414cd6a3aeSmrg    sunos4*)
55424cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
55434cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
55444cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55454cd6a3aeSmrg      ;;
55468c9fbc29Smrg
55474cd6a3aeSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
55484cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55494cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55504cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55514cd6a3aeSmrg      ;;
55528c9fbc29Smrg
55534cd6a3aeSmrg    sysv4*MP*)
55544cd6a3aeSmrg      if test -d /usr/nec ;then
55554cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
55564cd6a3aeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55574cd6a3aeSmrg      fi
55584cd6a3aeSmrg      ;;
55598c9fbc29Smrg
55604cd6a3aeSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
55614cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55624cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55634cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55644cd6a3aeSmrg      ;;
55658c9fbc29Smrg
55664cd6a3aeSmrg    unicos*)
55674cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55684cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55694cd6a3aeSmrg      ;;
55704cd6a3aeSmrg
55714cd6a3aeSmrg    uts4*)
55724cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
55734cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55744cd6a3aeSmrg      ;;
55754cd6a3aeSmrg
55764cd6a3aeSmrg    *)
55774cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55784cd6a3aeSmrg      ;;
55798c9fbc29Smrg    esac
55804cd6a3aeSmrg  fi
55814cd6a3aeSmrg])
55824cd6a3aeSmrgcase $host_os in
55834cd6a3aeSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
55844cd6a3aeSmrg  *djgpp*)
55854cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
55868c9fbc29Smrg    ;;
55878c9fbc29Smrg  *)
55884cd6a3aeSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
55898c9fbc29Smrg    ;;
55908c9fbc29Smrgesac
55918c9fbc29Smrg
55924cd6a3aeSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
55934cd6a3aeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
55944cd6a3aeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
55954cd6a3aeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
55968c9fbc29Smrg
55974cd6a3aeSmrg#
55984cd6a3aeSmrg# Check to make sure the PIC flag actually works.
55994cd6a3aeSmrg#
56004cd6a3aeSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
56014cd6a3aeSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
56024cd6a3aeSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
56034cd6a3aeSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
56044cd6a3aeSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
56054cd6a3aeSmrg     "" | " "*) ;;
56064cd6a3aeSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
56074cd6a3aeSmrg     esac],
56084cd6a3aeSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
56094cd6a3aeSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
56104cd6a3aeSmrgfi
56114cd6a3aeSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
56124cd6a3aeSmrg	[Additional compiler flags for building library objects])
56138c9fbc29Smrg
56144cd6a3aeSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
56154cd6a3aeSmrg	[How to pass a linker flag through the compiler])
56164cd6a3aeSmrg#
56174cd6a3aeSmrg# Check to make sure the static flag actually works.
56184cd6a3aeSmrg#
56194cd6a3aeSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
56204cd6a3aeSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
56214cd6a3aeSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
56224cd6a3aeSmrg  $lt_tmp_static_flag,
56234cd6a3aeSmrg  [],
56244cd6a3aeSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
56254cd6a3aeSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
56264cd6a3aeSmrg	[Compiler flag to prevent dynamic linking])
56274cd6a3aeSmrg])# _LT_COMPILER_PIC
56288c9fbc29Smrg
56298c9fbc29Smrg
56304cd6a3aeSmrg# _LT_LINKER_SHLIBS([TAGNAME])
56314cd6a3aeSmrg# ----------------------------
56324cd6a3aeSmrg# See if the linker supports building shared libraries.
56334cd6a3aeSmrgm4_defun([_LT_LINKER_SHLIBS],
56344cd6a3aeSmrg[AC_REQUIRE([LT_PATH_LD])dnl
56354cd6a3aeSmrgAC_REQUIRE([LT_PATH_NM])dnl
56364cd6a3aeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
56374cd6a3aeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
56384cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl
56394cd6a3aeSmrgm4_require([_LT_DECL_SED])dnl
56404cd6a3aeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
56414cd6a3aeSmrgm4_require([_LT_TAG_COMPILER])dnl
56424cd6a3aeSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
56434cd6a3aeSmrgm4_if([$1], [CXX], [
56444cd6a3aeSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56454cd6a3aeSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
56464cd6a3aeSmrg  case $host_os in
56474cd6a3aeSmrg  aix[[4-9]]*)
56484cd6a3aeSmrg    # If we're using GNU nm, then we don't want the "-C" option.
56494cd6a3aeSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
56504cd6a3aeSmrg    # Also, AIX nm treats weak defined symbols like other global defined
56514cd6a3aeSmrg    # symbols, whereas GNU nm marks them as "W".
56524cd6a3aeSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
56534cd6a3aeSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
56544cd6a3aeSmrg    else
56554cd6a3aeSmrg      _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
56564e411241Smrg    fi
56574e411241Smrg    ;;
56584cd6a3aeSmrg  pw32*)
56594cd6a3aeSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
56604cd6a3aeSmrg    ;;
56614cd6a3aeSmrg  cygwin* | mingw* | cegcc*)
56624cd6a3aeSmrg    case $cc_basename in
56634cd6a3aeSmrg    cl*) ;;
56644cd6a3aeSmrg    *)
56654cd6a3aeSmrg      _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'
56664cd6a3aeSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
56674e411241Smrg      ;;
56684e411241Smrg    esac
56694cd6a3aeSmrg    ;;
56704cd6a3aeSmrg  *)
56714cd6a3aeSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56724cd6a3aeSmrg    ;;
56734cd6a3aeSmrg  esac
56744cd6a3aeSmrg], [
56754cd6a3aeSmrg  runpath_var=
56764cd6a3aeSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
56774cd6a3aeSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
56784cd6a3aeSmrg  _LT_TAGVAR(archive_cmds, $1)=
56794cd6a3aeSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
56804cd6a3aeSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
56814cd6a3aeSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
56824cd6a3aeSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
56834cd6a3aeSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
56844cd6a3aeSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
56854cd6a3aeSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
56864cd6a3aeSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
56874cd6a3aeSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
56884cd6a3aeSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
56894cd6a3aeSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
56904cd6a3aeSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
56914cd6a3aeSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
56924cd6a3aeSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
56934cd6a3aeSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
56944cd6a3aeSmrg  _LT_TAGVAR(module_cmds, $1)=
56954cd6a3aeSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
56964cd6a3aeSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
56974cd6a3aeSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
56984cd6a3aeSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
56994cd6a3aeSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
57004cd6a3aeSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
57014cd6a3aeSmrg  # included in the symbol list
57024cd6a3aeSmrg  _LT_TAGVAR(include_expsyms, $1)=
57034cd6a3aeSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
57044cd6a3aeSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
57054cd6a3aeSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
57064cd6a3aeSmrg  # as well as any symbol that contains `d'.
57074cd6a3aeSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
57084cd6a3aeSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
57094cd6a3aeSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
57104cd6a3aeSmrg  # the symbol is explicitly referenced.  Since portable code cannot
57114cd6a3aeSmrg  # rely on this symbol name, it's probably fine to never include it in
57124cd6a3aeSmrg  # preloaded symbol tables.
57134cd6a3aeSmrg  # Exclude shared library initialization/finalization symbols.
57144cd6a3aeSmrgdnl Note also adjust exclude_expsyms for C++ above.
57154cd6a3aeSmrg  extract_expsyms_cmds=
57164e411241Smrg
57174cd6a3aeSmrg  case $host_os in
57184cd6a3aeSmrg  cygwin* | mingw* | pw32* | cegcc*)
57194cd6a3aeSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
57204cd6a3aeSmrg    # When not using gcc, we currently assume that we are using
57214cd6a3aeSmrg    # Microsoft Visual C++.
57224cd6a3aeSmrg    if test "$GCC" != yes; then
57234cd6a3aeSmrg      with_gnu_ld=no
57244e411241Smrg    fi
57258c9fbc29Smrg    ;;
57264cd6a3aeSmrg  interix*)
57274cd6a3aeSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
57284cd6a3aeSmrg    with_gnu_ld=yes
57294cd6a3aeSmrg    ;;
57304cd6a3aeSmrg  openbsd*)
57314cd6a3aeSmrg    with_gnu_ld=no
57324cd6a3aeSmrg    ;;
57338c9fbc29Smrg  esac
57348c9fbc29Smrg
57354cd6a3aeSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
57368c9fbc29Smrg
57374cd6a3aeSmrg  # On some targets, GNU ld is compatible enough with the native linker
57384cd6a3aeSmrg  # that we're better off using the native interface for both.
57394cd6a3aeSmrg  lt_use_gnu_ld_interface=no
57404cd6a3aeSmrg  if test "$with_gnu_ld" = yes; then
57414cd6a3aeSmrg    case $host_os in
57424cd6a3aeSmrg      aix*)
57434cd6a3aeSmrg	# The AIX port of GNU ld has always aspired to compatibility
57444cd6a3aeSmrg	# with the native linker.  However, as the warning in the GNU ld
57454cd6a3aeSmrg	# block says, versions before 2.19.5* couldn't really create working
57464cd6a3aeSmrg	# shared libraries, regardless of the interface used.
57474cd6a3aeSmrg	case `$LD -v 2>&1` in
57484cd6a3aeSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
57494cd6a3aeSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
57504cd6a3aeSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
57514cd6a3aeSmrg	  *)
57524cd6a3aeSmrg	    lt_use_gnu_ld_interface=yes
57534cd6a3aeSmrg	    ;;
57544cd6a3aeSmrg	esac
57554cd6a3aeSmrg	;;
57564cd6a3aeSmrg      *)
57574cd6a3aeSmrg	lt_use_gnu_ld_interface=yes
57584cd6a3aeSmrg	;;
57594cd6a3aeSmrg    esac
57604cd6a3aeSmrg  fi
57618c9fbc29Smrg
57624cd6a3aeSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
57634cd6a3aeSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
57644cd6a3aeSmrg    wlarc='${wl}'
57658c9fbc29Smrg
57664cd6a3aeSmrg    # Set some defaults for GNU ld with shared library support. These
57674cd6a3aeSmrg    # are reset later if shared libraries are not supported. Putting them
57684cd6a3aeSmrg    # here allows them to be overridden if necessary.
57694cd6a3aeSmrg    runpath_var=LD_RUN_PATH
57704cd6a3aeSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
57714cd6a3aeSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
57724cd6a3aeSmrg    # ancient GNU ld didn't support --whole-archive et. al.
57734cd6a3aeSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
57744cd6a3aeSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
57754cd6a3aeSmrg    else
57764cd6a3aeSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
57774cd6a3aeSmrg    fi
57784cd6a3aeSmrg    supports_anon_versioning=no
57794cd6a3aeSmrg    case `$LD -v 2>&1` in
57804cd6a3aeSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
57814cd6a3aeSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
57824cd6a3aeSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
57834cd6a3aeSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
57844cd6a3aeSmrg      *\ 2.11.*) ;; # other 2.11 versions
57854cd6a3aeSmrg      *) supports_anon_versioning=yes ;;
57864cd6a3aeSmrg    esac
57878c9fbc29Smrg
57884cd6a3aeSmrg    # See if GNU ld supports shared libraries.
57894cd6a3aeSmrg    case $host_os in
57904cd6a3aeSmrg    aix[[3-9]]*)
57914cd6a3aeSmrg      # On AIX/PPC, the GNU linker is very broken
57924cd6a3aeSmrg      if test "$host_cpu" != ia64; then
57934cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
57944cd6a3aeSmrg	cat <<_LT_EOF 1>&2
57958c9fbc29Smrg
57964cd6a3aeSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
57974cd6a3aeSmrg*** to be unable to reliably create shared libraries on AIX.
57984cd6a3aeSmrg*** Therefore, libtool is disabling shared libraries support.  If you
57994cd6a3aeSmrg*** really care for shared libraries, you may want to install binutils
58004cd6a3aeSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
58014cd6a3aeSmrg*** You will then need to restart the configuration process.
58028c9fbc29Smrg
58034cd6a3aeSmrg_LT_EOF
58044cd6a3aeSmrg      fi
58054cd6a3aeSmrg      ;;
58068c9fbc29Smrg
58074cd6a3aeSmrg    amigaos*)
58084cd6a3aeSmrg      case $host_cpu in
58094cd6a3aeSmrg      powerpc)
58104cd6a3aeSmrg            # see comment about AmigaOS4 .so support
58114cd6a3aeSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58124cd6a3aeSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
58134cd6a3aeSmrg        ;;
58144cd6a3aeSmrg      m68k)
58154cd6a3aeSmrg            _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)'
58164cd6a3aeSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58174cd6a3aeSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
58184cd6a3aeSmrg        ;;
58194cd6a3aeSmrg      esac
58204cd6a3aeSmrg      ;;
58218c9fbc29Smrg
58224cd6a3aeSmrg    beos*)
58234cd6a3aeSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
58244cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58254cd6a3aeSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
58264cd6a3aeSmrg	# support --undefined.  This deserves some investigation.  FIXME
58274cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58284cd6a3aeSmrg      else
58294cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58304cd6a3aeSmrg      fi
58314cd6a3aeSmrg      ;;
58328c9fbc29Smrg
58334cd6a3aeSmrg    cygwin* | mingw* | pw32* | cegcc*)
58344cd6a3aeSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
58354cd6a3aeSmrg      # as there is no search path for DLLs.
58364cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
58374cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
58384cd6a3aeSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
58394cd6a3aeSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
58404cd6a3aeSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
58414cd6a3aeSmrg      _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'
58424cd6a3aeSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
58434cd6a3aeSmrg
58444cd6a3aeSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
58454cd6a3aeSmrg        _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'
58464cd6a3aeSmrg	# If the export-symbols file already is a .def file (1st line
58474cd6a3aeSmrg	# is EXPORTS), use it as is; otherwise, prepend...
58484cd6a3aeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
58494cd6a3aeSmrg	  cp $export_symbols $output_objdir/$soname.def;
58504cd6a3aeSmrg	else
58514cd6a3aeSmrg	  echo EXPORTS > $output_objdir/$soname.def;
58524cd6a3aeSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
58534cd6a3aeSmrg	fi~
58544cd6a3aeSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
58554cd6a3aeSmrg      else
58564cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
58574cd6a3aeSmrg      fi
58584cd6a3aeSmrg      ;;
58598c9fbc29Smrg
58604cd6a3aeSmrg    haiku*)
58614cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
58624cd6a3aeSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
58634cd6a3aeSmrg      ;;
58648c9fbc29Smrg
58654cd6a3aeSmrg    interix[[3-9]]*)
58664cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
58674cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
58684cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
58694cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
58704cd6a3aeSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
58714cd6a3aeSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
58724cd6a3aeSmrg      # default) and relocated if they conflict, which is a slow very memory
58734cd6a3aeSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
58744cd6a3aeSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
58754cd6a3aeSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
58764cd6a3aeSmrg      _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'
58774cd6a3aeSmrg      _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'
58784cd6a3aeSmrg      ;;
58798c9fbc29Smrg
58804cd6a3aeSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
58814cd6a3aeSmrg      tmp_diet=no
58824cd6a3aeSmrg      if test "$host_os" = linux-dietlibc; then
58834cd6a3aeSmrg	case $cc_basename in
58844cd6a3aeSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
58854cd6a3aeSmrg	esac
58864cd6a3aeSmrg      fi
58874cd6a3aeSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
58884cd6a3aeSmrg	 && test "$tmp_diet" = no
58894cd6a3aeSmrg      then
58904cd6a3aeSmrg	tmp_addflag=' $pic_flag'
58914cd6a3aeSmrg	tmp_sharedflag='-shared'
58924cd6a3aeSmrg	case $cc_basename,$host_cpu in
58934cd6a3aeSmrg        pgcc*)				# Portland Group C compiler
58944cd6a3aeSmrg	  _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'
58954cd6a3aeSmrg	  tmp_addflag=' $pic_flag'
58964cd6a3aeSmrg	  ;;
58974cd6a3aeSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
58984cd6a3aeSmrg					# Portland Group f77 and f90 compilers
58994cd6a3aeSmrg	  _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'
59004cd6a3aeSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
59014cd6a3aeSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
59024cd6a3aeSmrg	  tmp_addflag=' -i_dynamic' ;;
59034cd6a3aeSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
59044cd6a3aeSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
59054cd6a3aeSmrg	ifc* | ifort*)			# Intel Fortran compiler
59064cd6a3aeSmrg	  tmp_addflag=' -nofor_main' ;;
59074cd6a3aeSmrg	lf95*)				# Lahey Fortran 8.1
59084cd6a3aeSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
59094cd6a3aeSmrg	  tmp_sharedflag='--shared' ;;
59104cd6a3aeSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
59114cd6a3aeSmrg	  tmp_sharedflag='-qmkshrobj'
59124cd6a3aeSmrg	  tmp_addflag= ;;
59134cd6a3aeSmrg	nvcc*)	# Cuda Compiler Driver 2.2
59144cd6a3aeSmrg	  _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'
59154cd6a3aeSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
59164cd6a3aeSmrg	  ;;
59174cd6a3aeSmrg	esac
59184cd6a3aeSmrg	case `$CC -V 2>&1 | sed 5q` in
59194cd6a3aeSmrg	*Sun\ C*)			# Sun C 5.9
59204cd6a3aeSmrg	  _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'
59214cd6a3aeSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
59224cd6a3aeSmrg	  tmp_sharedflag='-G' ;;
59234cd6a3aeSmrg	*Sun\ F*)			# Sun Fortran 8.3
59244cd6a3aeSmrg	  tmp_sharedflag='-G' ;;
59254cd6a3aeSmrg	esac
59264cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59278c9fbc29Smrg
59284cd6a3aeSmrg        if test "x$supports_anon_versioning" = xyes; then
59294cd6a3aeSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59304cd6a3aeSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59314cd6a3aeSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
59324cd6a3aeSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
59334cd6a3aeSmrg        fi
59348c9fbc29Smrg
59354cd6a3aeSmrg	case $cc_basename in
59364cd6a3aeSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
59374cd6a3aeSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
59384cd6a3aeSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
59394cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
59404cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
59414cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
59424cd6a3aeSmrg	  if test "x$supports_anon_versioning" = xyes; then
59434cd6a3aeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
59444cd6a3aeSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
59454cd6a3aeSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
59464cd6a3aeSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
59474cd6a3aeSmrg	  fi
59484cd6a3aeSmrg	  ;;
59494cd6a3aeSmrg	esac
59504cd6a3aeSmrg      else
59514cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
59524cd6a3aeSmrg      fi
59534cd6a3aeSmrg      ;;
59548c9fbc29Smrg
59554cd6a3aeSmrg    netbsd*)
59564cd6a3aeSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
59574cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
59584cd6a3aeSmrg	wlarc=
59594cd6a3aeSmrg      else
59604cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59614cd6a3aeSmrg	_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'
59624cd6a3aeSmrg      fi
59634cd6a3aeSmrg      ;;
59648c9fbc29Smrg
59654cd6a3aeSmrg    solaris*)
59664cd6a3aeSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
59674cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
59684cd6a3aeSmrg	cat <<_LT_EOF 1>&2
59698c9fbc29Smrg
59704cd6a3aeSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
59714cd6a3aeSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
59724cd6a3aeSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
59734cd6a3aeSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
59744cd6a3aeSmrg*** your PATH or compiler configuration so that the native linker is
59754cd6a3aeSmrg*** used, and then restart.
59768c9fbc29Smrg
59774cd6a3aeSmrg_LT_EOF
59784cd6a3aeSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
59794cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
59804cd6a3aeSmrg	_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'
59814cd6a3aeSmrg      else
59824cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
59834cd6a3aeSmrg      fi
59844cd6a3aeSmrg      ;;
59858c9fbc29Smrg
59864cd6a3aeSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
59874cd6a3aeSmrg      case `$LD -v 2>&1` in
59884cd6a3aeSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
59894cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
59904cd6a3aeSmrg	cat <<_LT_EOF 1>&2
59918c9fbc29Smrg
59924cd6a3aeSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
59934cd6a3aeSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
59944cd6a3aeSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
59954cd6a3aeSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
59964cd6a3aeSmrg*** your PATH or compiler configuration so that the native linker is
59974cd6a3aeSmrg*** used, and then restart.
59988c9fbc29Smrg
59994cd6a3aeSmrg_LT_EOF
60004cd6a3aeSmrg	;;
60014cd6a3aeSmrg	*)
60024cd6a3aeSmrg	  # For security reasons, it is highly recommended that you always
60034cd6a3aeSmrg	  # use absolute paths for naming shared libraries, and exclude the
60044cd6a3aeSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
60054cd6a3aeSmrg	  # requires that you compile everything twice, which is a pain.
60064cd6a3aeSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60074cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60084cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60094cd6a3aeSmrg	    _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'
60104cd6a3aeSmrg	  else
60114cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
60124cd6a3aeSmrg	  fi
60134cd6a3aeSmrg	;;
60144cd6a3aeSmrg      esac
60154cd6a3aeSmrg      ;;
60168c9fbc29Smrg
60174cd6a3aeSmrg    sunos4*)
60184cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
60194cd6a3aeSmrg      wlarc=
60204cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
60214cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60224cd6a3aeSmrg      ;;
60238c9fbc29Smrg
60244cd6a3aeSmrg    *)
60254cd6a3aeSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60264cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60274cd6a3aeSmrg	_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'
60284cd6a3aeSmrg      else
60294cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
60304cd6a3aeSmrg      fi
60314cd6a3aeSmrg      ;;
60324cd6a3aeSmrg    esac
60338c9fbc29Smrg
60344cd6a3aeSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
60354cd6a3aeSmrg      runpath_var=
60364cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
60374cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
60384cd6a3aeSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
60394cd6a3aeSmrg    fi
60404cd6a3aeSmrg  else
60414cd6a3aeSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
60424cd6a3aeSmrg    case $host_os in
60434cd6a3aeSmrg    aix3*)
60444cd6a3aeSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
60454cd6a3aeSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
60464cd6a3aeSmrg      _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'
60474cd6a3aeSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
60484cd6a3aeSmrg      # are no directories specified by -L.
60494cd6a3aeSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
60504cd6a3aeSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
60514cd6a3aeSmrg	# Neither direct hardcoding nor static linking is supported with a
60524cd6a3aeSmrg	# broken collect2.
60534cd6a3aeSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
60544cd6a3aeSmrg      fi
60554cd6a3aeSmrg      ;;
60568c9fbc29Smrg
60574cd6a3aeSmrg    aix[[4-9]]*)
60584cd6a3aeSmrg      if test "$host_cpu" = ia64; then
60594cd6a3aeSmrg	# On IA64, the linker does run time linking by default, so we don't
60604cd6a3aeSmrg	# have to do anything special.
60614cd6a3aeSmrg	aix_use_runtimelinking=no
60624cd6a3aeSmrg	exp_sym_flag='-Bexport'
60634cd6a3aeSmrg	no_entry_flag=""
60644cd6a3aeSmrg      else
60654cd6a3aeSmrg	# If we're using GNU nm, then we don't want the "-C" option.
60664cd6a3aeSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
60674cd6a3aeSmrg	# Also, AIX nm treats weak defined symbols like other global
60684cd6a3aeSmrg	# defined symbols, whereas GNU nm marks them as "W".
60694cd6a3aeSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
60704cd6a3aeSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
60714cd6a3aeSmrg	else
60724cd6a3aeSmrg	  _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
60734cd6a3aeSmrg	fi
60744cd6a3aeSmrg	aix_use_runtimelinking=no
60758c9fbc29Smrg
60764cd6a3aeSmrg	# Test if we are trying to use run time linking or normal
60774cd6a3aeSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
60784cd6a3aeSmrg	# need to do runtime linking.
60794cd6a3aeSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
60804cd6a3aeSmrg	  for ld_flag in $LDFLAGS; do
60814cd6a3aeSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
60824cd6a3aeSmrg	    aix_use_runtimelinking=yes
60834cd6a3aeSmrg	    break
60844cd6a3aeSmrg	  fi
60854cd6a3aeSmrg	  done
60864cd6a3aeSmrg	  ;;
60874cd6a3aeSmrg	esac
60888c9fbc29Smrg
60894cd6a3aeSmrg	exp_sym_flag='-bexport'
60904cd6a3aeSmrg	no_entry_flag='-bnoentry'
60914cd6a3aeSmrg      fi
60928c9fbc29Smrg
60934cd6a3aeSmrg      # When large executables or shared objects are built, AIX ld can
60944cd6a3aeSmrg      # have problems creating the table of contents.  If linking a library
60954cd6a3aeSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
60964cd6a3aeSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
60974cd6a3aeSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
60988c9fbc29Smrg
60994cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)=''
61004cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
61014cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
61024cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
61034cd6a3aeSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
61044cd6a3aeSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
61058c9fbc29Smrg
61064cd6a3aeSmrg      if test "$GCC" = yes; then
61074cd6a3aeSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
61084cd6a3aeSmrg	# We only want to do this on AIX 4.2 and lower, the check
61094cd6a3aeSmrg	# below for broken collect2 doesn't work under 4.3+
61104cd6a3aeSmrg	  collect2name=`${CC} -print-prog-name=collect2`
61114cd6a3aeSmrg	  if test -f "$collect2name" &&
61124cd6a3aeSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
61134cd6a3aeSmrg	  then
61144cd6a3aeSmrg	  # We have reworked collect2
61154cd6a3aeSmrg	  :
61164cd6a3aeSmrg	  else
61174cd6a3aeSmrg	  # We have old collect2
61184cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
61194cd6a3aeSmrg	  # It fails to find uninstalled libraries when the uninstalled
61204cd6a3aeSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
61214cd6a3aeSmrg	  # to unsupported forces relinking
61224cd6a3aeSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
61234cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61244cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
61254cd6a3aeSmrg	  fi
61264cd6a3aeSmrg	  ;;
61274cd6a3aeSmrg	esac
61284cd6a3aeSmrg	shared_flag='-shared'
61294cd6a3aeSmrg	if test "$aix_use_runtimelinking" = yes; then
61304cd6a3aeSmrg	  shared_flag="$shared_flag "'${wl}-G'
61314cd6a3aeSmrg	fi
61324cd6a3aeSmrg      else
61334cd6a3aeSmrg	# not using gcc
61344cd6a3aeSmrg	if test "$host_cpu" = ia64; then
61354cd6a3aeSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
61364cd6a3aeSmrg	# chokes on -Wl,-G. The following line is correct:
61374cd6a3aeSmrg	  shared_flag='-G'
61384cd6a3aeSmrg	else
61394cd6a3aeSmrg	  if test "$aix_use_runtimelinking" = yes; then
61404cd6a3aeSmrg	    shared_flag='${wl}-G'
61414cd6a3aeSmrg	  else
61424cd6a3aeSmrg	    shared_flag='${wl}-bM:SRE'
61434cd6a3aeSmrg	  fi
61444cd6a3aeSmrg	fi
61454cd6a3aeSmrg      fi
61468c9fbc29Smrg
61474cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
61484cd6a3aeSmrg      # It seems that -bexpall does not export symbols beginning with
61494cd6a3aeSmrg      # underscore (_), so it is better to generate a list of symbols to export.
61504cd6a3aeSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
61514cd6a3aeSmrg      if test "$aix_use_runtimelinking" = yes; then
61524cd6a3aeSmrg	# Warning - without using the other runtime loading flags (-brtl),
61534cd6a3aeSmrg	# -berok will link without error, but may produce a broken library.
61544cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
61554cd6a3aeSmrg        # Determine the default libpath from the value encoded in an
61564cd6a3aeSmrg        # empty executable.
61574cd6a3aeSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
61584cd6a3aeSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
61594cd6a3aeSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
61604cd6a3aeSmrg      else
61614cd6a3aeSmrg	if test "$host_cpu" = ia64; then
61624cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
61634cd6a3aeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
61644cd6a3aeSmrg	  _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"
61654cd6a3aeSmrg	else
61664cd6a3aeSmrg	 # Determine the default libpath from the value encoded in an
61674cd6a3aeSmrg	 # empty executable.
61684cd6a3aeSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
61694cd6a3aeSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
61704cd6a3aeSmrg	  # Warning - without using the other run time loading flags,
61714cd6a3aeSmrg	  # -berok will link without error, but may produce a broken library.
61724cd6a3aeSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
61734cd6a3aeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
61744cd6a3aeSmrg	  if test "$with_gnu_ld" = yes; then
61754cd6a3aeSmrg	    # We only use this code for GNU lds that support --whole-archive.
61764cd6a3aeSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
61774cd6a3aeSmrg	  else
61784cd6a3aeSmrg	    # Exported symbols can be pulled into shared objects from archives
61794cd6a3aeSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
61804cd6a3aeSmrg	  fi
61814cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
61824cd6a3aeSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
61834cd6a3aeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
61844cd6a3aeSmrg	fi
61854cd6a3aeSmrg      fi
61864cd6a3aeSmrg      ;;
61878c9fbc29Smrg
61884cd6a3aeSmrg    amigaos*)
61894cd6a3aeSmrg      case $host_cpu in
61904cd6a3aeSmrg      powerpc)
61914cd6a3aeSmrg            # see comment about AmigaOS4 .so support
61924cd6a3aeSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
61934cd6a3aeSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
61944cd6a3aeSmrg        ;;
61954cd6a3aeSmrg      m68k)
61964cd6a3aeSmrg            _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)'
61974cd6a3aeSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
61984cd6a3aeSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
61994cd6a3aeSmrg        ;;
62004cd6a3aeSmrg      esac
62014cd6a3aeSmrg      ;;
62028c9fbc29Smrg
62034cd6a3aeSmrg    bsdi[[45]]*)
62044cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
62054cd6a3aeSmrg      ;;
62068c9fbc29Smrg
62074cd6a3aeSmrg    cygwin* | mingw* | pw32* | cegcc*)
62084cd6a3aeSmrg      # When not using gcc, we currently assume that we are using
62094cd6a3aeSmrg      # Microsoft Visual C++.
62104cd6a3aeSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
62114cd6a3aeSmrg      # no search path for DLLs.
62124cd6a3aeSmrg      case $cc_basename in
62134cd6a3aeSmrg      cl*)
62144cd6a3aeSmrg	# Native MSVC
62154cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
62164cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
62174cd6a3aeSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
62184cd6a3aeSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
62194cd6a3aeSmrg	# Tell ltmain to make .lib files, not .a files.
62204cd6a3aeSmrg	libext=lib
62214cd6a3aeSmrg	# Tell ltmain to make .dll files, not .so files.
62224cd6a3aeSmrg	shrext_cmds=".dll"
62234cd6a3aeSmrg	# FIXME: Setting linknames here is a bad hack.
62244cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
62254cd6a3aeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
62264cd6a3aeSmrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
62274cd6a3aeSmrg	  else
62284cd6a3aeSmrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
62294cd6a3aeSmrg	  fi~
62304cd6a3aeSmrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
62314cd6a3aeSmrg	  linknames='
62324cd6a3aeSmrg	# The linker will not automatically build a static lib if we build a DLL.
62334cd6a3aeSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
62344cd6a3aeSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
62354cd6a3aeSmrg	_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'
62364cd6a3aeSmrg	# Don't use ranlib
62374cd6a3aeSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
62384cd6a3aeSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
62394cd6a3aeSmrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
62404cd6a3aeSmrg	  case $lt_outputfile in
62414cd6a3aeSmrg	    *.exe|*.EXE) ;;
62424cd6a3aeSmrg	    *)
62434cd6a3aeSmrg	      lt_outputfile="$lt_outputfile.exe"
62444cd6a3aeSmrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
62454cd6a3aeSmrg	      ;;
62464cd6a3aeSmrg	  esac~
62474cd6a3aeSmrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
62484cd6a3aeSmrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
62494cd6a3aeSmrg	    $RM "$lt_outputfile.manifest";
62504cd6a3aeSmrg	  fi'
62514cd6a3aeSmrg	;;
62524cd6a3aeSmrg      *)
62534cd6a3aeSmrg	# Assume MSVC wrapper
62544cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
62554cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
62564cd6a3aeSmrg	# Tell ltmain to make .lib files, not .a files.
62574cd6a3aeSmrg	libext=lib
62584cd6a3aeSmrg	# Tell ltmain to make .dll files, not .so files.
62594cd6a3aeSmrg	shrext_cmds=".dll"
62604cd6a3aeSmrg	# FIXME: Setting linknames here is a bad hack.
62614cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
62624cd6a3aeSmrg	# The linker will automatically build a .lib file if we build a DLL.
62634cd6a3aeSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
62644cd6a3aeSmrg	# FIXME: Should let the user specify the lib program.
62654cd6a3aeSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
62664cd6a3aeSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
62674cd6a3aeSmrg	;;
62684cd6a3aeSmrg      esac
62694cd6a3aeSmrg      ;;
62708c9fbc29Smrg
62714cd6a3aeSmrg    darwin* | rhapsody*)
62724cd6a3aeSmrg      _LT_DARWIN_LINKER_FEATURES($1)
62734cd6a3aeSmrg      ;;
62748c9fbc29Smrg
62754cd6a3aeSmrg    dgux*)
62764cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
62774cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
62784cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62794cd6a3aeSmrg      ;;
62808c9fbc29Smrg
62814cd6a3aeSmrg    freebsd1*)
62824cd6a3aeSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
62834cd6a3aeSmrg      ;;
62848c9fbc29Smrg
62854cd6a3aeSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
62864cd6a3aeSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
62874cd6a3aeSmrg    # does not break anything, and helps significantly (at the cost of a little
62884cd6a3aeSmrg    # extra space).
62894cd6a3aeSmrg    freebsd2.2*)
62904cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
62914cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
62924cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
62934cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62948c9fbc29Smrg      ;;
62954cd6a3aeSmrg
62964cd6a3aeSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
62974cd6a3aeSmrg    freebsd2*)
62984cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
62994cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63004cd6a3aeSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
63014cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63028c9fbc29Smrg      ;;
63038c9fbc29Smrg
63044cd6a3aeSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
63054cd6a3aeSmrg    freebsd* | dragonfly*)
63064cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
63074cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
63084cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63094cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63104cd6a3aeSmrg      ;;
63118c9fbc29Smrg
63124cd6a3aeSmrg    hpux9*)
63134cd6a3aeSmrg      if test "$GCC" = yes; then
63144cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
63154cd6a3aeSmrg      else
63164cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
63174cd6a3aeSmrg      fi
63184cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63194cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
63204cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63218c9fbc29Smrg
63224cd6a3aeSmrg      # hardcode_minus_L: Not really in the search PATH,
63234cd6a3aeSmrg      # but as the default location of the library.
63244cd6a3aeSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
63254cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63264cd6a3aeSmrg      ;;
63278c9fbc29Smrg
63284cd6a3aeSmrg    hpux10*)
63294cd6a3aeSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
63304cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
63314cd6a3aeSmrg      else
63324cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
63334cd6a3aeSmrg      fi
63344cd6a3aeSmrg      if test "$with_gnu_ld" = no; then
63354cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63364cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
63374cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
63384cd6a3aeSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
63394cd6a3aeSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63404cd6a3aeSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63414cd6a3aeSmrg	# hardcode_minus_L: Not really in the search PATH,
63424cd6a3aeSmrg	# but as the default location of the library.
63434cd6a3aeSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
63444cd6a3aeSmrg      fi
63454cd6a3aeSmrg      ;;
63468c9fbc29Smrg
63474cd6a3aeSmrg    hpux11*)
63484cd6a3aeSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
63494cd6a3aeSmrg	case $host_cpu in
63504cd6a3aeSmrg	hppa*64*)
63514cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
63524cd6a3aeSmrg	  ;;
63534cd6a3aeSmrg	ia64*)
63544cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
63554cd6a3aeSmrg	  ;;
63564cd6a3aeSmrg	*)
63574cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
63584cd6a3aeSmrg	  ;;
63594cd6a3aeSmrg	esac
63604cd6a3aeSmrg      else
63614cd6a3aeSmrg	case $host_cpu in
63624cd6a3aeSmrg	hppa*64*)
63634cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
63644cd6a3aeSmrg	  ;;
63654cd6a3aeSmrg	ia64*)
63664cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
63674cd6a3aeSmrg	  ;;
63684cd6a3aeSmrg	*)
63694cd6a3aeSmrg	m4_if($1, [], [
63704cd6a3aeSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
63714cd6a3aeSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
63724cd6a3aeSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
63734cd6a3aeSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
63744cd6a3aeSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
63754cd6a3aeSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
63764cd6a3aeSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
63774cd6a3aeSmrg	  ;;
63784cd6a3aeSmrg	esac
63794cd6a3aeSmrg      fi
63804cd6a3aeSmrg      if test "$with_gnu_ld" = no; then
63814cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
63824cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
63838c9fbc29Smrg
63844cd6a3aeSmrg	case $host_cpu in
63854cd6a3aeSmrg	hppa*64*|ia64*)
63864cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
63874cd6a3aeSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
63884cd6a3aeSmrg	  ;;
63894cd6a3aeSmrg	*)
63904cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
63914cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63924cd6a3aeSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63938c9fbc29Smrg
63944cd6a3aeSmrg	  # hardcode_minus_L: Not really in the search PATH,
63954cd6a3aeSmrg	  # but as the default location of the library.
63964cd6a3aeSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
63974cd6a3aeSmrg	  ;;
63984cd6a3aeSmrg	esac
63994cd6a3aeSmrg      fi
64004cd6a3aeSmrg      ;;
64018c9fbc29Smrg
64024cd6a3aeSmrg    irix5* | irix6* | nonstopux*)
64034cd6a3aeSmrg      if test "$GCC" = yes; then
64044cd6a3aeSmrg	_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'
64054cd6a3aeSmrg	# Try to use the -exported_symbol ld option, if it does not
64064cd6a3aeSmrg	# work, assume that -exports_file does not work either and
64074cd6a3aeSmrg	# implicitly export all symbols.
64084cd6a3aeSmrg	# This should be the same for all languages, so no per-tag cache variable.
64094cd6a3aeSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
64104cd6a3aeSmrg	  [lt_cv_irix_exported_symbol],
64114cd6a3aeSmrg	  [save_LDFLAGS="$LDFLAGS"
64124cd6a3aeSmrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
64134cd6a3aeSmrg	   AC_LINK_IFELSE(
64144cd6a3aeSmrg	     [AC_LANG_SOURCE(
64154cd6a3aeSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
64164cd6a3aeSmrg			      [C++], [[int foo (void) { return 0; }]],
64174cd6a3aeSmrg			      [Fortran 77], [[
64184cd6a3aeSmrg      subroutine foo
64194cd6a3aeSmrg      end]],
64204cd6a3aeSmrg			      [Fortran], [[
64214cd6a3aeSmrg      subroutine foo
64224cd6a3aeSmrg      end]])])],
64234cd6a3aeSmrg	      [lt_cv_irix_exported_symbol=yes],
64244cd6a3aeSmrg	      [lt_cv_irix_exported_symbol=no])
64254cd6a3aeSmrg           LDFLAGS="$save_LDFLAGS"])
64264cd6a3aeSmrg	if test "$lt_cv_irix_exported_symbol" = yes; then
64274cd6a3aeSmrg          _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'
64284cd6a3aeSmrg	fi
64294cd6a3aeSmrg      else
64304cd6a3aeSmrg	_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'
64314cd6a3aeSmrg	_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'
64324cd6a3aeSmrg      fi
64334cd6a3aeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
64344cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
64354cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64364cd6a3aeSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
64374cd6a3aeSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
64384cd6a3aeSmrg      ;;
64398c9fbc29Smrg
64404cd6a3aeSmrg    netbsd*)
64414cd6a3aeSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
64424cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
64434cd6a3aeSmrg      else
64444cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
64454cd6a3aeSmrg      fi
64464cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
64474cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
64484cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64494cd6a3aeSmrg      ;;
64508c9fbc29Smrg
64514cd6a3aeSmrg    newsos6)
64524cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
64534cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
64544cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
64554cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
64564cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64574cd6a3aeSmrg      ;;
64588c9fbc29Smrg
64594cd6a3aeSmrg    *nto* | *qnx*)
64604cd6a3aeSmrg      ;;
64618c9fbc29Smrg
64624cd6a3aeSmrg    openbsd*)
64634cd6a3aeSmrg      if test -f /usr/libexec/ld.so; then
64644cd6a3aeSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
64654cd6a3aeSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
64664cd6a3aeSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
64674cd6a3aeSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
64684cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
64694cd6a3aeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
64704cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64714cd6a3aeSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
64724cd6a3aeSmrg	else
64734cd6a3aeSmrg	  case $host_os in
64744cd6a3aeSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
64754cd6a3aeSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
64764cd6a3aeSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
64774cd6a3aeSmrg	     ;;
64784cd6a3aeSmrg	   *)
64794cd6a3aeSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
64804cd6a3aeSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
64814cd6a3aeSmrg	     ;;
64824cd6a3aeSmrg	  esac
64834cd6a3aeSmrg	fi
64844cd6a3aeSmrg      else
64854cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
64864cd6a3aeSmrg      fi
64874cd6a3aeSmrg      ;;
64888c9fbc29Smrg
64894cd6a3aeSmrg    os2*)
64904cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
64914cd6a3aeSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
64924cd6a3aeSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
64934cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
64944cd6a3aeSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
64954cd6a3aeSmrg      ;;
64968c9fbc29Smrg
64974cd6a3aeSmrg    osf3*)
64984cd6a3aeSmrg      if test "$GCC" = yes; then
64994cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
65004cd6a3aeSmrg	_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'
65014cd6a3aeSmrg      else
65024cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
65034cd6a3aeSmrg	_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'
65044cd6a3aeSmrg      fi
65054cd6a3aeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
65064cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65074cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
65084cd6a3aeSmrg      ;;
65098c9fbc29Smrg
65104cd6a3aeSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
65114cd6a3aeSmrg      if test "$GCC" = yes; then
65124cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
65134cd6a3aeSmrg	_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'
65144cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
65154cd6a3aeSmrg      else
65164cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
65174cd6a3aeSmrg	_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'
65184cd6a3aeSmrg	_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~
65194cd6a3aeSmrg	$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'
65208c9fbc29Smrg
65214cd6a3aeSmrg	# Both c and cxx compiler support -rpath directly
65224cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
65234cd6a3aeSmrg      fi
65244cd6a3aeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
65254cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
65264cd6a3aeSmrg      ;;
65278c9fbc29Smrg
65284cd6a3aeSmrg    solaris*)
65294cd6a3aeSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
65304cd6a3aeSmrg      if test "$GCC" = yes; then
65314cd6a3aeSmrg	wlarc='${wl}'
65324cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
65334cd6a3aeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65344cd6a3aeSmrg	  $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'
65354cd6a3aeSmrg      else
65364cd6a3aeSmrg	case `$CC -V 2>&1` in
65374cd6a3aeSmrg	*"Compilers 5.0"*)
65384cd6a3aeSmrg	  wlarc=''
65394cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
65404cd6a3aeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65414cd6a3aeSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
65424cd6a3aeSmrg	  ;;
65434cd6a3aeSmrg	*)
65444cd6a3aeSmrg	  wlarc='${wl}'
65454cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
65464cd6a3aeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
65474cd6a3aeSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
65484cd6a3aeSmrg	  ;;
65494cd6a3aeSmrg	esac
65504cd6a3aeSmrg      fi
65514cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
65524cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65534cd6a3aeSmrg      case $host_os in
65544cd6a3aeSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
65554cd6a3aeSmrg      *)
65564cd6a3aeSmrg	# The compiler driver will combine and reorder linker options,
65574cd6a3aeSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
65584cd6a3aeSmrg	# but is careful enough not to reorder.
65594cd6a3aeSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
65604cd6a3aeSmrg	if test "$GCC" = yes; then
65614cd6a3aeSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
65624cd6a3aeSmrg	else
65634cd6a3aeSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
65644cd6a3aeSmrg	fi
65654cd6a3aeSmrg	;;
65664cd6a3aeSmrg      esac
65674cd6a3aeSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
65684cd6a3aeSmrg      ;;
65698c9fbc29Smrg
65704cd6a3aeSmrg    sunos4*)
65714cd6a3aeSmrg      if test "x$host_vendor" = xsequent; then
65724cd6a3aeSmrg	# Use $CC to link under sequent, because it throws in some extra .o
65734cd6a3aeSmrg	# files that make .init and .fini sections work.
65744cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
65754cd6a3aeSmrg      else
65764cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
65774cd6a3aeSmrg      fi
65784cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65794cd6a3aeSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65804cd6a3aeSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
65814cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65824cd6a3aeSmrg      ;;
65838c9fbc29Smrg
65844cd6a3aeSmrg    sysv4)
65854cd6a3aeSmrg      case $host_vendor in
65864cd6a3aeSmrg	sni)
65874cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65884cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
65894cd6a3aeSmrg	;;
65904cd6a3aeSmrg	siemens)
65914cd6a3aeSmrg	  ## LD is ld it makes a PLAMLIB
65924cd6a3aeSmrg	  ## CC just makes a GrossModule.
65934cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
65944cd6a3aeSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
65954cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
65964cd6a3aeSmrg        ;;
65974cd6a3aeSmrg	motorola)
65984cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65994cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
66004cd6a3aeSmrg	;;
66014cd6a3aeSmrg      esac
66024cd6a3aeSmrg      runpath_var='LD_RUN_PATH'
66034cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66044cd6a3aeSmrg      ;;
66058c9fbc29Smrg
66064cd6a3aeSmrg    sysv4.3*)
66074cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66084cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66094cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
66104cd6a3aeSmrg      ;;
66118c9fbc29Smrg
66124cd6a3aeSmrg    sysv4*MP*)
66134cd6a3aeSmrg      if test -d /usr/nec; then
66144cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66154cd6a3aeSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66164cd6a3aeSmrg	runpath_var=LD_RUN_PATH
66174cd6a3aeSmrg	hardcode_runpath_var=yes
66184cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
66194cd6a3aeSmrg      fi
66204cd6a3aeSmrg      ;;
66218c9fbc29Smrg
66224cd6a3aeSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
66234cd6a3aeSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
66244cd6a3aeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
66254cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66264cd6a3aeSmrg      runpath_var='LD_RUN_PATH'
66278c9fbc29Smrg
66284cd6a3aeSmrg      if test "$GCC" = yes; then
66294cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66304cd6a3aeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66314cd6a3aeSmrg      else
66324cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66334cd6a3aeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66344cd6a3aeSmrg      fi
66354cd6a3aeSmrg      ;;
66368c9fbc29Smrg
66374cd6a3aeSmrg    sysv5* | sco3.2v5* | sco5v6*)
66384cd6a3aeSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
66394cd6a3aeSmrg      # link with -lc, and that would cause any symbols used from libc to
66404cd6a3aeSmrg      # always be unresolved, which means just about no library would
66414cd6a3aeSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
66424cd6a3aeSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
66434cd6a3aeSmrg      # as -z defs.
66444cd6a3aeSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
66454cd6a3aeSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
66464cd6a3aeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
66474cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66484cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
66494cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
66504cd6a3aeSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
66514cd6a3aeSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
66524cd6a3aeSmrg      runpath_var='LD_RUN_PATH'
66538c9fbc29Smrg
66544cd6a3aeSmrg      if test "$GCC" = yes; then
66554cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66564cd6a3aeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66574cd6a3aeSmrg      else
66584cd6a3aeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66594cd6a3aeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
66604cd6a3aeSmrg      fi
66614cd6a3aeSmrg      ;;
66628c9fbc29Smrg
66634cd6a3aeSmrg    uts4*)
66644cd6a3aeSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66654cd6a3aeSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
66664cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66674cd6a3aeSmrg      ;;
66688c9fbc29Smrg
66694cd6a3aeSmrg    *)
66704cd6a3aeSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
66714cd6a3aeSmrg      ;;
66724cd6a3aeSmrg    esac
66738c9fbc29Smrg
66744cd6a3aeSmrg    if test x$host_vendor = xsni; then
66754cd6a3aeSmrg      case $host in
66764cd6a3aeSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
66774cd6a3aeSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
66784cd6a3aeSmrg	;;
66794cd6a3aeSmrg      esac
66804cd6a3aeSmrg    fi
66814cd6a3aeSmrg  fi
66824cd6a3aeSmrg])
66834cd6a3aeSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
66844cd6a3aeSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
66858c9fbc29Smrg
66864cd6a3aeSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
66878c9fbc29Smrg
66884cd6a3aeSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
66894cd6a3aeSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
66904cd6a3aeSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
66914cd6a3aeSmrg    [The commands to extract the exported symbol list from a shared archive])
66928c9fbc29Smrg
66934cd6a3aeSmrg#
66944cd6a3aeSmrg# Do we need to explicitly link libc?
66954cd6a3aeSmrg#
66964cd6a3aeSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
66974cd6a3aeSmrgx|xyes)
66984cd6a3aeSmrg  # Assume -lc should be added
66994cd6a3aeSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
67008c9fbc29Smrg
67014cd6a3aeSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
67024cd6a3aeSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
67034cd6a3aeSmrg    *'~'*)
67044cd6a3aeSmrg      # FIXME: we may have to deal with multi-command sequences.
67054cd6a3aeSmrg      ;;
67064cd6a3aeSmrg    '$CC '*)
67074cd6a3aeSmrg      # Test whether the compiler implicitly links with -lc since on some
67084cd6a3aeSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
67094cd6a3aeSmrg      # to ld, don't add -lc before -lgcc.
67104cd6a3aeSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
67114cd6a3aeSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
67124cd6a3aeSmrg	[$RM conftest*
67134cd6a3aeSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
67144cd6a3aeSmrg
67154cd6a3aeSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
67164cd6a3aeSmrg	  soname=conftest
67174cd6a3aeSmrg	  lib=conftest
67184cd6a3aeSmrg	  libobjs=conftest.$ac_objext
67194cd6a3aeSmrg	  deplibs=
67204cd6a3aeSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
67214cd6a3aeSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
67224cd6a3aeSmrg	  compiler_flags=-v
67234cd6a3aeSmrg	  linker_flags=-v
67244cd6a3aeSmrg	  verstring=
67254cd6a3aeSmrg	  output_objdir=.
67264cd6a3aeSmrg	  libname=conftest
67274cd6a3aeSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
67284cd6a3aeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
67294cd6a3aeSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
67304cd6a3aeSmrg	  then
67314cd6a3aeSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
67324cd6a3aeSmrg	  else
67334cd6a3aeSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
67344cd6a3aeSmrg	  fi
67354cd6a3aeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
67364cd6a3aeSmrg	else
67374cd6a3aeSmrg	  cat conftest.err 1>&5
67384cd6a3aeSmrg	fi
67394cd6a3aeSmrg	$RM conftest*
67404cd6a3aeSmrg	])
67414cd6a3aeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
67424cd6a3aeSmrg      ;;
67434cd6a3aeSmrg    esac
67444cd6a3aeSmrg  fi
67454cd6a3aeSmrg  ;;
67464cd6a3aeSmrgesac
67478c9fbc29Smrg
67484cd6a3aeSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
67494cd6a3aeSmrg    [Whether or not to add -lc for building shared libraries])
67504cd6a3aeSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
67514cd6a3aeSmrg    [enable_shared_with_static_runtimes], [0],
67524cd6a3aeSmrg    [Whether or not to disallow shared libs when runtime libs are static])
67534cd6a3aeSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
67544cd6a3aeSmrg    [Compiler flag to allow reflexive dlopens])
67554cd6a3aeSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
67564cd6a3aeSmrg    [Compiler flag to generate shared objects directly from archives])
67574cd6a3aeSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
67584cd6a3aeSmrg    [Whether the compiler copes with passing no objects directly])
67594cd6a3aeSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
67604cd6a3aeSmrg    [Create an old-style archive from a shared archive])
67614cd6a3aeSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
67624cd6a3aeSmrg    [Create a temporary old-style archive to link instead of a shared archive])
67634cd6a3aeSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
67644cd6a3aeSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
67654cd6a3aeSmrg_LT_TAGDECL([], [module_cmds], [2],
67664cd6a3aeSmrg    [Commands used to build a loadable module if different from building
67674cd6a3aeSmrg    a shared archive.])
67684cd6a3aeSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
67694cd6a3aeSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
67704cd6a3aeSmrg    [Whether we are building with GNU ld or not])
67714cd6a3aeSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
67724cd6a3aeSmrg    [Flag that allows shared libraries with undefined symbols to be built])
67734cd6a3aeSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
67744cd6a3aeSmrg    [Flag that enforces no undefined symbols])
67754cd6a3aeSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
67764cd6a3aeSmrg    [Flag to hardcode $libdir into a binary during linking.
67774cd6a3aeSmrg    This must work even if $libdir does not exist])
67784cd6a3aeSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
67794cd6a3aeSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
67804cd6a3aeSmrg    during linking.  This must work even if $libdir does not exist]])
67814cd6a3aeSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
67824cd6a3aeSmrg    [Whether we need a single "-rpath" flag with a separated argument])
67834cd6a3aeSmrg_LT_TAGDECL([], [hardcode_direct], [0],
67844cd6a3aeSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
67854cd6a3aeSmrg    DIR into the resulting binary])
67864cd6a3aeSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
67874cd6a3aeSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
67884cd6a3aeSmrg    DIR into the resulting binary and the resulting library dependency is
67894cd6a3aeSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
67904cd6a3aeSmrg    library is relocated])
67914cd6a3aeSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
67924cd6a3aeSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
67934cd6a3aeSmrg    into the resulting binary])
67944cd6a3aeSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
67954cd6a3aeSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
67964cd6a3aeSmrg    into the resulting binary])
67974cd6a3aeSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
67984cd6a3aeSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
67994cd6a3aeSmrg    into the library and all subsequent libraries and executables linked
68004cd6a3aeSmrg    against it])
68014cd6a3aeSmrg_LT_TAGDECL([], [inherit_rpath], [0],
68024cd6a3aeSmrg    [Set to yes if linker adds runtime paths of dependent libraries
68034cd6a3aeSmrg    to runtime path list])
68044cd6a3aeSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
68054cd6a3aeSmrg    [Whether libtool must link a program against all its dependency libraries])
68064cd6a3aeSmrg_LT_TAGDECL([], [always_export_symbols], [0],
68074cd6a3aeSmrg    [Set to "yes" if exported symbols are required])
68084cd6a3aeSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
68094cd6a3aeSmrg    [The commands to list exported symbols])
68104cd6a3aeSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
68114cd6a3aeSmrg    [Symbols that should not be listed in the preloaded symbols])
68124cd6a3aeSmrg_LT_TAGDECL([], [include_expsyms], [1],
68134cd6a3aeSmrg    [Symbols that must always be exported])
68144cd6a3aeSmrg_LT_TAGDECL([], [prelink_cmds], [2],
68154cd6a3aeSmrg    [Commands necessary for linking programs (against libraries) with templates])
68164cd6a3aeSmrg_LT_TAGDECL([], [postlink_cmds], [2],
68174cd6a3aeSmrg    [Commands necessary for finishing linking programs])
68184cd6a3aeSmrg_LT_TAGDECL([], [file_list_spec], [1],
68194cd6a3aeSmrg    [Specify filename containing input files])
68204cd6a3aeSmrgdnl FIXME: Not yet implemented
68214cd6a3aeSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
68224cd6a3aeSmrgdnl    [Compiler flag to generate thread safe objects])
68234cd6a3aeSmrg])# _LT_LINKER_SHLIBS
68244cd6a3aeSmrg
68254cd6a3aeSmrg
68264cd6a3aeSmrg# _LT_LANG_C_CONFIG([TAG])
68274cd6a3aeSmrg# ------------------------
68284cd6a3aeSmrg# Ensure that the configuration variables for a C compiler are suitably
68294cd6a3aeSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
68304cd6a3aeSmrg# the compiler configuration to `libtool'.
68314cd6a3aeSmrgm4_defun([_LT_LANG_C_CONFIG],
68324cd6a3aeSmrg[m4_require([_LT_DECL_EGREP])dnl
68334cd6a3aeSmrglt_save_CC="$CC"
68344cd6a3aeSmrgAC_LANG_PUSH(C)
68358c9fbc29Smrg
68364cd6a3aeSmrg# Source file extension for C test sources.
68374cd6a3aeSmrgac_ext=c
68388c9fbc29Smrg
68394cd6a3aeSmrg# Object file extension for compiled C test sources.
68404cd6a3aeSmrgobjext=o
68414cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext
68428c9fbc29Smrg
68434cd6a3aeSmrg# Code to be used in simple compile tests
68444cd6a3aeSmrglt_simple_compile_test_code="int some_variable = 0;"
68458c9fbc29Smrg
68464cd6a3aeSmrg# Code to be used in simple link tests
68474cd6a3aeSmrglt_simple_link_test_code='int main(){return(0);}'
68488c9fbc29Smrg
68494cd6a3aeSmrg_LT_TAG_COMPILER
68504cd6a3aeSmrg# Save the default compiler, since it gets overwritten when the other
68514cd6a3aeSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
68524cd6a3aeSmrgcompiler_DEFAULT=$CC
68538c9fbc29Smrg
68544cd6a3aeSmrg# save warnings/boilerplate of simple test code
68554cd6a3aeSmrg_LT_COMPILER_BOILERPLATE
68564cd6a3aeSmrg_LT_LINKER_BOILERPLATE
68578c9fbc29Smrg
68584cd6a3aeSmrgif test -n "$compiler"; then
68594cd6a3aeSmrg  _LT_COMPILER_NO_RTTI($1)
68604cd6a3aeSmrg  _LT_COMPILER_PIC($1)
68614cd6a3aeSmrg  _LT_COMPILER_C_O($1)
68624cd6a3aeSmrg  _LT_COMPILER_FILE_LOCKS($1)
68634cd6a3aeSmrg  _LT_LINKER_SHLIBS($1)
68644cd6a3aeSmrg  _LT_SYS_DYNAMIC_LINKER($1)
68654cd6a3aeSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
68664cd6a3aeSmrg  LT_SYS_DLOPEN_SELF
68674cd6a3aeSmrg  _LT_CMD_STRIPLIB
68684cd6a3aeSmrg
68694cd6a3aeSmrg  # Report which library types will actually be built
68704cd6a3aeSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
68714cd6a3aeSmrg  AC_MSG_RESULT([$can_build_shared])
68724cd6a3aeSmrg
68734cd6a3aeSmrg  AC_MSG_CHECKING([whether to build shared libraries])
68744cd6a3aeSmrg  test "$can_build_shared" = "no" && enable_shared=no
68754cd6a3aeSmrg
68764cd6a3aeSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
68774cd6a3aeSmrg  # are all built from PIC.
68784cd6a3aeSmrg  case $host_os in
68794cd6a3aeSmrg  aix3*)
68804cd6a3aeSmrg    test "$enable_shared" = yes && enable_static=no
68814cd6a3aeSmrg    if test -n "$RANLIB"; then
68824cd6a3aeSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
68834cd6a3aeSmrg      postinstall_cmds='$RANLIB $lib'
68844cd6a3aeSmrg    fi
68854cd6a3aeSmrg    ;;
68868c9fbc29Smrg
68874cd6a3aeSmrg  aix[[4-9]]*)
68884cd6a3aeSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
68894cd6a3aeSmrg      test "$enable_shared" = yes && enable_static=no
68904cd6a3aeSmrg    fi
68914cd6a3aeSmrg    ;;
68924cd6a3aeSmrg  esac
68934cd6a3aeSmrg  AC_MSG_RESULT([$enable_shared])
68948c9fbc29Smrg
68954cd6a3aeSmrg  AC_MSG_CHECKING([whether to build static libraries])
68964cd6a3aeSmrg  # Make sure either enable_shared or enable_static is yes.
68974cd6a3aeSmrg  test "$enable_shared" = yes || enable_static=yes
68984cd6a3aeSmrg  AC_MSG_RESULT([$enable_static])
68998c9fbc29Smrg
69004cd6a3aeSmrg  _LT_CONFIG($1)
69014cd6a3aeSmrgfi
69024cd6a3aeSmrgAC_LANG_POP
69034cd6a3aeSmrgCC="$lt_save_CC"
69044cd6a3aeSmrg])# _LT_LANG_C_CONFIG
69058c9fbc29Smrg
69068c9fbc29Smrg
69074cd6a3aeSmrg# _LT_LANG_CXX_CONFIG([TAG])
69084cd6a3aeSmrg# --------------------------
69094cd6a3aeSmrg# Ensure that the configuration variables for a C++ compiler are suitably
69104cd6a3aeSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
69114cd6a3aeSmrg# the compiler configuration to `libtool'.
69124cd6a3aeSmrgm4_defun([_LT_LANG_CXX_CONFIG],
69134cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
69144cd6a3aeSmrgm4_require([_LT_DECL_EGREP])dnl
69154cd6a3aeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
69164cd6a3aeSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
69174cd6a3aeSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
69184cd6a3aeSmrg    (test "X$CXX" != "Xg++"))) ; then
69194cd6a3aeSmrg  AC_PROG_CXXCPP
69204cd6a3aeSmrgelse
69214cd6a3aeSmrg  _lt_caught_CXX_error=yes
69224cd6a3aeSmrgfi
69238c9fbc29Smrg
69244cd6a3aeSmrgAC_LANG_PUSH(C++)
69254cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
69264cd6a3aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
69274cd6a3aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no
69284cd6a3aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
69294cd6a3aeSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
69304cd6a3aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
69314cd6a3aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no
69324cd6a3aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
69334cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
69344cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
69354cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
69364cd6a3aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
69374cd6a3aeSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
69384cd6a3aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
69394cd6a3aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no
69404cd6a3aeSmrg_LT_TAGVAR(module_cmds, $1)=
69414cd6a3aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
69424cd6a3aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
69434cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
69444cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
69454cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
69464cd6a3aeSmrg_LT_TAGVAR(no_undefined_flag, $1)=
69474cd6a3aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
69484cd6a3aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
69498c9fbc29Smrg
69504cd6a3aeSmrg# Source file extension for C++ test sources.
69514cd6a3aeSmrgac_ext=cpp
69528c9fbc29Smrg
69534cd6a3aeSmrg# Object file extension for compiled C++ test sources.
69544cd6a3aeSmrgobjext=o
69554cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext
69564cd6a3aeSmrg
69574cd6a3aeSmrg# No sense in running all these tests if we already determined that
69584cd6a3aeSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
69594cd6a3aeSmrg# are currently assumed to apply to all compilers on this platform,
69604cd6a3aeSmrg# and will be corrupted by setting them based on a non-working compiler.
69614cd6a3aeSmrgif test "$_lt_caught_CXX_error" != yes; then
69624cd6a3aeSmrg  # Code to be used in simple compile tests
69634cd6a3aeSmrg  lt_simple_compile_test_code="int some_variable = 0;"
69644cd6a3aeSmrg
69654cd6a3aeSmrg  # Code to be used in simple link tests
69664cd6a3aeSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
69674cd6a3aeSmrg
69684cd6a3aeSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
69694cd6a3aeSmrg  _LT_TAG_COMPILER
69704cd6a3aeSmrg
69714cd6a3aeSmrg  # save warnings/boilerplate of simple test code
69724cd6a3aeSmrg  _LT_COMPILER_BOILERPLATE
69734cd6a3aeSmrg  _LT_LINKER_BOILERPLATE
69744cd6a3aeSmrg
69754cd6a3aeSmrg  # Allow CC to be a program name with arguments.
69764cd6a3aeSmrg  lt_save_CC=$CC
69774cd6a3aeSmrg  lt_save_CFLAGS=$CFLAGS
69784cd6a3aeSmrg  lt_save_LD=$LD
69794cd6a3aeSmrg  lt_save_GCC=$GCC
69804cd6a3aeSmrg  GCC=$GXX
69814cd6a3aeSmrg  lt_save_with_gnu_ld=$with_gnu_ld
69824cd6a3aeSmrg  lt_save_path_LD=$lt_cv_path_LD
69834cd6a3aeSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
69844cd6a3aeSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
69854cd6a3aeSmrg  else
69864cd6a3aeSmrg    $as_unset lt_cv_prog_gnu_ld
69874cd6a3aeSmrg  fi
69884cd6a3aeSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
69894cd6a3aeSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
69904cd6a3aeSmrg  else
69914cd6a3aeSmrg    $as_unset lt_cv_path_LD
69924cd6a3aeSmrg  fi
69934cd6a3aeSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
69944cd6a3aeSmrg  CC=${CXX-"c++"}
69954cd6a3aeSmrg  CFLAGS=$CXXFLAGS
69964cd6a3aeSmrg  compiler=$CC
69974cd6a3aeSmrg  _LT_TAGVAR(compiler, $1)=$CC
69984cd6a3aeSmrg  _LT_CC_BASENAME([$compiler])
69998c9fbc29Smrg
70004cd6a3aeSmrg  if test -n "$compiler"; then
70014cd6a3aeSmrg    # We don't want -fno-exception when compiling C++ code, so set the
70024cd6a3aeSmrg    # no_builtin_flag separately
70034cd6a3aeSmrg    if test "$GXX" = yes; then
70044cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
70054cd6a3aeSmrg    else
70064cd6a3aeSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
70074cd6a3aeSmrg    fi
70088c9fbc29Smrg
70094cd6a3aeSmrg    if test "$GXX" = yes; then
70104cd6a3aeSmrg      # Set up default GNU C++ configuration
70118c9fbc29Smrg
70124cd6a3aeSmrg      LT_PATH_LD
70138c9fbc29Smrg
70144cd6a3aeSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
70154cd6a3aeSmrg      # archiving commands below assume that GNU ld is being used.
70164cd6a3aeSmrg      if test "$with_gnu_ld" = yes; then
70174cd6a3aeSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
70184cd6a3aeSmrg        _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'
70198c9fbc29Smrg
70204cd6a3aeSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
70214cd6a3aeSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
70228c9fbc29Smrg
70234cd6a3aeSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
70244cd6a3aeSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
70254cd6a3aeSmrg        #     investigate it a little bit more. (MM)
70264cd6a3aeSmrg        wlarc='${wl}'
70278c9fbc29Smrg
70284cd6a3aeSmrg        # ancient GNU ld didn't support --whole-archive et. al.
70294cd6a3aeSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
70304cd6a3aeSmrg	  $GREP 'no-whole-archive' > /dev/null; then
70314cd6a3aeSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
70324cd6a3aeSmrg        else
70334cd6a3aeSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
70344cd6a3aeSmrg        fi
70354cd6a3aeSmrg      else
70364cd6a3aeSmrg        with_gnu_ld=no
70374cd6a3aeSmrg        wlarc=
70384cd6a3aeSmrg
70394cd6a3aeSmrg        # A generic and very simple default shared library creation
70404cd6a3aeSmrg        # command for GNU C++ for the case where it uses the native
70414cd6a3aeSmrg        # linker, instead of GNU ld.  If possible, this setting should
70424cd6a3aeSmrg        # overridden to take advantage of the native linker features on
70434cd6a3aeSmrg        # the platform it is being used on.
70444cd6a3aeSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
70454cd6a3aeSmrg      fi
70468c9fbc29Smrg
70474cd6a3aeSmrg      # Commands to make compiler produce verbose output that lists
70484cd6a3aeSmrg      # what "hidden" libraries, object files and flags are used when
70494cd6a3aeSmrg      # linking a shared library.
70504cd6a3aeSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
70518c9fbc29Smrg
70524cd6a3aeSmrg    else
70534cd6a3aeSmrg      GXX=no
70544cd6a3aeSmrg      with_gnu_ld=no
70554cd6a3aeSmrg      wlarc=
70564cd6a3aeSmrg    fi
70578c9fbc29Smrg
70584cd6a3aeSmrg    # PORTME: fill in a description of your system's C++ link characteristics
70594cd6a3aeSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
70604cd6a3aeSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
70614cd6a3aeSmrg    case $host_os in
70624cd6a3aeSmrg      aix3*)
70634cd6a3aeSmrg        # FIXME: insert proper C++ library support
70644cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
70654cd6a3aeSmrg        ;;
70664cd6a3aeSmrg      aix[[4-9]]*)
70674cd6a3aeSmrg        if test "$host_cpu" = ia64; then
70684cd6a3aeSmrg          # On IA64, the linker does run time linking by default, so we don't
70694cd6a3aeSmrg          # have to do anything special.
70704cd6a3aeSmrg          aix_use_runtimelinking=no
70714cd6a3aeSmrg          exp_sym_flag='-Bexport'
70724cd6a3aeSmrg          no_entry_flag=""
70734cd6a3aeSmrg        else
70744cd6a3aeSmrg          aix_use_runtimelinking=no
70754cd6a3aeSmrg
70764cd6a3aeSmrg          # Test if we are trying to use run time linking or normal
70774cd6a3aeSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
70784cd6a3aeSmrg          # need to do runtime linking.
70794cd6a3aeSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
70804cd6a3aeSmrg	    for ld_flag in $LDFLAGS; do
70814cd6a3aeSmrg	      case $ld_flag in
70824cd6a3aeSmrg	      *-brtl*)
70834cd6a3aeSmrg	        aix_use_runtimelinking=yes
70844cd6a3aeSmrg	        break
70854cd6a3aeSmrg	        ;;
70864cd6a3aeSmrg	      esac
70874cd6a3aeSmrg	    done
70884cd6a3aeSmrg	    ;;
70894cd6a3aeSmrg          esac
70908c9fbc29Smrg
70914cd6a3aeSmrg          exp_sym_flag='-bexport'
70924cd6a3aeSmrg          no_entry_flag='-bnoentry'
70934cd6a3aeSmrg        fi
70948c9fbc29Smrg
70954cd6a3aeSmrg        # When large executables or shared objects are built, AIX ld can
70964cd6a3aeSmrg        # have problems creating the table of contents.  If linking a library
70974cd6a3aeSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
70984cd6a3aeSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
70994cd6a3aeSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
71004cd6a3aeSmrg
71014cd6a3aeSmrg        _LT_TAGVAR(archive_cmds, $1)=''
71024cd6a3aeSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
71034cd6a3aeSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
71044cd6a3aeSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
71054cd6a3aeSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
71064cd6a3aeSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
71074cd6a3aeSmrg
71084cd6a3aeSmrg        if test "$GXX" = yes; then
71094cd6a3aeSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
71104cd6a3aeSmrg          # We only want to do this on AIX 4.2 and lower, the check
71114cd6a3aeSmrg          # below for broken collect2 doesn't work under 4.3+
71124cd6a3aeSmrg	  collect2name=`${CC} -print-prog-name=collect2`
71134cd6a3aeSmrg	  if test -f "$collect2name" &&
71144cd6a3aeSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
71154cd6a3aeSmrg	  then
71164cd6a3aeSmrg	    # We have reworked collect2
71174cd6a3aeSmrg	    :
71184cd6a3aeSmrg	  else
71194cd6a3aeSmrg	    # We have old collect2
71204cd6a3aeSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
71214cd6a3aeSmrg	    # It fails to find uninstalled libraries when the uninstalled
71224cd6a3aeSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
71234cd6a3aeSmrg	    # to unsupported forces relinking
71244cd6a3aeSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
71254cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
71264cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
71274cd6a3aeSmrg	  fi
71284cd6a3aeSmrg          esac
71294cd6a3aeSmrg          shared_flag='-shared'
71304cd6a3aeSmrg	  if test "$aix_use_runtimelinking" = yes; then
71314cd6a3aeSmrg	    shared_flag="$shared_flag "'${wl}-G'
71324cd6a3aeSmrg	  fi
71334cd6a3aeSmrg        else
71344cd6a3aeSmrg          # not using gcc
71354cd6a3aeSmrg          if test "$host_cpu" = ia64; then
71364cd6a3aeSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
71374cd6a3aeSmrg	  # chokes on -Wl,-G. The following line is correct:
71384cd6a3aeSmrg	  shared_flag='-G'
71394cd6a3aeSmrg          else
71404cd6a3aeSmrg	    if test "$aix_use_runtimelinking" = yes; then
71414cd6a3aeSmrg	      shared_flag='${wl}-G'
71424cd6a3aeSmrg	    else
71434cd6a3aeSmrg	      shared_flag='${wl}-bM:SRE'
71444cd6a3aeSmrg	    fi
71454cd6a3aeSmrg          fi
71464cd6a3aeSmrg        fi
71478c9fbc29Smrg
71484cd6a3aeSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
71494cd6a3aeSmrg        # It seems that -bexpall does not export symbols beginning with
71504cd6a3aeSmrg        # underscore (_), so it is better to generate a list of symbols to
71514cd6a3aeSmrg	# export.
71524cd6a3aeSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
71534cd6a3aeSmrg        if test "$aix_use_runtimelinking" = yes; then
71544cd6a3aeSmrg          # Warning - without using the other runtime loading flags (-brtl),
71554cd6a3aeSmrg          # -berok will link without error, but may produce a broken library.
71564cd6a3aeSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
71574cd6a3aeSmrg          # Determine the default libpath from the value encoded in an empty
71584cd6a3aeSmrg          # executable.
71594cd6a3aeSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
71604cd6a3aeSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
71614cd6a3aeSmrg
71624cd6a3aeSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
71634cd6a3aeSmrg        else
71644cd6a3aeSmrg          if test "$host_cpu" = ia64; then
71654cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
71664cd6a3aeSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
71674cd6a3aeSmrg	    _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"
71684cd6a3aeSmrg          else
71694cd6a3aeSmrg	    # Determine the default libpath from the value encoded in an
71704cd6a3aeSmrg	    # empty executable.
71714cd6a3aeSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
71724cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
71734cd6a3aeSmrg	    # Warning - without using the other run time loading flags,
71744cd6a3aeSmrg	    # -berok will link without error, but may produce a broken library.
71754cd6a3aeSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
71764cd6a3aeSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
71774cd6a3aeSmrg	    if test "$with_gnu_ld" = yes; then
71784cd6a3aeSmrg	      # We only use this code for GNU lds that support --whole-archive.
71794cd6a3aeSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
71804cd6a3aeSmrg	    else
71814cd6a3aeSmrg	      # Exported symbols can be pulled into shared objects from archives
71824cd6a3aeSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
71834cd6a3aeSmrg	    fi
71844cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
71854cd6a3aeSmrg	    # This is similar to how AIX traditionally builds its shared
71864cd6a3aeSmrg	    # libraries.
71874cd6a3aeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
71884cd6a3aeSmrg          fi
71894cd6a3aeSmrg        fi
71904cd6a3aeSmrg        ;;
71914e411241Smrg
71924cd6a3aeSmrg      beos*)
71934cd6a3aeSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
71944cd6a3aeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
71954cd6a3aeSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
71964cd6a3aeSmrg	  # support --undefined.  This deserves some investigation.  FIXME
71974cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
71984cd6a3aeSmrg	else
71994cd6a3aeSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
72004cd6a3aeSmrg	fi
72014cd6a3aeSmrg	;;
72028c9fbc29Smrg
72034cd6a3aeSmrg      chorus*)
72044cd6a3aeSmrg        case $cc_basename in
72054cd6a3aeSmrg          *)
72064cd6a3aeSmrg	  # FIXME: insert proper C++ library support
72074cd6a3aeSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
72084cd6a3aeSmrg	  ;;
72094cd6a3aeSmrg        esac
72104cd6a3aeSmrg        ;;
72118c9fbc29Smrg
72124cd6a3aeSmrg      cygwin* | mingw* | pw32* | cegcc*)
72134cd6a3aeSmrg	case $GXX,$cc_basename in
72144cd6a3aeSmrg	,cl* | no,cl*)
72154cd6a3aeSmrg	  # Native MSVC
72164cd6a3aeSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
72174cd6a3aeSmrg	  # no search path for DLLs.
72184cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
72194cd6a3aeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
72204cd6a3aeSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
72214cd6a3aeSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
72224cd6a3aeSmrg	  # Tell ltmain to make .lib files, not .a files.
72234cd6a3aeSmrg	  libext=lib
72244cd6a3aeSmrg	  # Tell ltmain to make .dll files, not .so files.
72254cd6a3aeSmrg	  shrext_cmds=".dll"
72264cd6a3aeSmrg	  # FIXME: Setting linknames here is a bad hack.
72274cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
72284cd6a3aeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
72294cd6a3aeSmrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
72304cd6a3aeSmrg	    else
72314cd6a3aeSmrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
72324cd6a3aeSmrg	    fi~
72334cd6a3aeSmrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
72344cd6a3aeSmrg	    linknames='
72354cd6a3aeSmrg	  # The linker will not automatically build a static lib if we build a DLL.
72364cd6a3aeSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
72374cd6a3aeSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
72384cd6a3aeSmrg	  # Don't use ranlib
72394cd6a3aeSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
72404cd6a3aeSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
72414cd6a3aeSmrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
72424cd6a3aeSmrg	    case $lt_outputfile in
72434cd6a3aeSmrg	      *.exe|*.EXE) ;;
72444cd6a3aeSmrg	      *)
72454cd6a3aeSmrg		lt_outputfile="$lt_outputfile.exe"
72464cd6a3aeSmrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
72474cd6a3aeSmrg		;;
72484cd6a3aeSmrg	    esac~
72494cd6a3aeSmrg	    func_to_tool_file "$lt_outputfile"~
72504cd6a3aeSmrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
72514cd6a3aeSmrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
72524cd6a3aeSmrg	      $RM "$lt_outputfile.manifest";
72534cd6a3aeSmrg	    fi'
72544cd6a3aeSmrg	  ;;
72554cd6a3aeSmrg	*)
72564cd6a3aeSmrg	  # g++
72574cd6a3aeSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
72584cd6a3aeSmrg	  # as there is no search path for DLLs.
72594cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
72604cd6a3aeSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
72614cd6a3aeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
72624cd6a3aeSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
72634cd6a3aeSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
72644cd6a3aeSmrg
72654cd6a3aeSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
72664cd6a3aeSmrg	    _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'
72674cd6a3aeSmrg	    # If the export-symbols file already is a .def file (1st line
72684cd6a3aeSmrg	    # is EXPORTS), use it as is; otherwise, prepend...
72694cd6a3aeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
72704cd6a3aeSmrg	      cp $export_symbols $output_objdir/$soname.def;
72714cd6a3aeSmrg	    else
72724cd6a3aeSmrg	      echo EXPORTS > $output_objdir/$soname.def;
72734cd6a3aeSmrg	      cat $export_symbols >> $output_objdir/$soname.def;
72744cd6a3aeSmrg	    fi~
72754cd6a3aeSmrg	    $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'
72764cd6a3aeSmrg	  else
72774cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72784cd6a3aeSmrg	  fi
72794cd6a3aeSmrg	  ;;
72804cd6a3aeSmrg	esac
72814cd6a3aeSmrg	;;
72824cd6a3aeSmrg      darwin* | rhapsody*)
72834cd6a3aeSmrg        _LT_DARWIN_LINKER_FEATURES($1)
72844cd6a3aeSmrg	;;
72858c9fbc29Smrg
72864cd6a3aeSmrg      dgux*)
72874cd6a3aeSmrg        case $cc_basename in
72884cd6a3aeSmrg          ec++*)
72894cd6a3aeSmrg	    # FIXME: insert proper C++ library support
72904cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72914cd6a3aeSmrg	    ;;
72924cd6a3aeSmrg          ghcx*)
72934cd6a3aeSmrg	    # Green Hills C++ Compiler
72944cd6a3aeSmrg	    # FIXME: insert proper C++ library support
72954cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
72964cd6a3aeSmrg	    ;;
72974cd6a3aeSmrg          *)
72984cd6a3aeSmrg	    # FIXME: insert proper C++ library support
72994cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73004cd6a3aeSmrg	    ;;
73014cd6a3aeSmrg        esac
73024cd6a3aeSmrg        ;;
73038c9fbc29Smrg
73044cd6a3aeSmrg      freebsd[[12]]*)
73054cd6a3aeSmrg        # C++ shared libraries reported to be fairly broken before
73064cd6a3aeSmrg	# switch to ELF
73074cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
73084cd6a3aeSmrg        ;;
73098c9fbc29Smrg
73104cd6a3aeSmrg      freebsd-elf*)
73114cd6a3aeSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
73124cd6a3aeSmrg        ;;
73138c9fbc29Smrg
73144cd6a3aeSmrg      freebsd* | dragonfly*)
73154cd6a3aeSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
73164cd6a3aeSmrg        # conventions
73174cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
73184cd6a3aeSmrg        ;;
73198c9fbc29Smrg
73204cd6a3aeSmrg      gnu*)
73214cd6a3aeSmrg        ;;
73228c9fbc29Smrg
73234cd6a3aeSmrg      haiku*)
73244cd6a3aeSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
73254cd6a3aeSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
73264cd6a3aeSmrg        ;;
73278c9fbc29Smrg
73284cd6a3aeSmrg      hpux9*)
73294cd6a3aeSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
73304cd6a3aeSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
73314cd6a3aeSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73324cd6a3aeSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
73334cd6a3aeSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
73344cd6a3aeSmrg				             # but as the default
73354cd6a3aeSmrg				             # location of the library.
73364cd6a3aeSmrg
73374cd6a3aeSmrg        case $cc_basename in
73384cd6a3aeSmrg          CC*)
73394cd6a3aeSmrg            # FIXME: insert proper C++ library support
73404cd6a3aeSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
73414cd6a3aeSmrg            ;;
73424cd6a3aeSmrg          aCC*)
73434cd6a3aeSmrg            _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
73444cd6a3aeSmrg            # Commands to make compiler produce verbose output that lists
73454cd6a3aeSmrg            # what "hidden" libraries, object files and flags are used when
73464cd6a3aeSmrg            # linking a shared library.
73474cd6a3aeSmrg            #
73484cd6a3aeSmrg            # There doesn't appear to be a way to prevent this compiler from
73494cd6a3aeSmrg            # explicitly linking system object files so we need to strip them
73504cd6a3aeSmrg            # from the output so that they don't get included in the library
73514cd6a3aeSmrg            # dependencies.
73524cd6a3aeSmrg            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"'
73534cd6a3aeSmrg            ;;
73544cd6a3aeSmrg          *)
73554cd6a3aeSmrg            if test "$GXX" = yes; then
73564cd6a3aeSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
73574cd6a3aeSmrg            else
73584cd6a3aeSmrg              # FIXME: insert proper C++ library support
73594cd6a3aeSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
73604cd6a3aeSmrg            fi
73614cd6a3aeSmrg            ;;
73624cd6a3aeSmrg        esac
73634cd6a3aeSmrg        ;;
73648c9fbc29Smrg
73654cd6a3aeSmrg      hpux10*|hpux11*)
73664cd6a3aeSmrg        if test $with_gnu_ld = no; then
73674cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
73684cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
73694cd6a3aeSmrg
73704cd6a3aeSmrg          case $host_cpu in
73714cd6a3aeSmrg            hppa*64*|ia64*)
73724cd6a3aeSmrg              ;;
73734cd6a3aeSmrg            *)
73744cd6a3aeSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
73754cd6a3aeSmrg              ;;
73764cd6a3aeSmrg          esac
73774cd6a3aeSmrg        fi
73784cd6a3aeSmrg        case $host_cpu in
73794cd6a3aeSmrg          hppa*64*|ia64*)
73804cd6a3aeSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
73814cd6a3aeSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
73824cd6a3aeSmrg            ;;
73834cd6a3aeSmrg          *)
73844cd6a3aeSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
73854cd6a3aeSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
73864cd6a3aeSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
73874cd6a3aeSmrg					         # but as the default
73884cd6a3aeSmrg					         # location of the library.
73894cd6a3aeSmrg            ;;
73904cd6a3aeSmrg        esac
73914cd6a3aeSmrg
73924cd6a3aeSmrg        case $cc_basename in
73934cd6a3aeSmrg          CC*)
73944cd6a3aeSmrg	    # FIXME: insert proper C++ library support
73954cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
73964cd6a3aeSmrg	    ;;
73974cd6a3aeSmrg          aCC*)
73984cd6a3aeSmrg	    case $host_cpu in
73994cd6a3aeSmrg	      hppa*64*)
74004cd6a3aeSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74014cd6a3aeSmrg	        ;;
74024cd6a3aeSmrg	      ia64*)
74034cd6a3aeSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74044cd6a3aeSmrg	        ;;
74054cd6a3aeSmrg	      *)
74064cd6a3aeSmrg	        _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'
74074cd6a3aeSmrg	        ;;
74084cd6a3aeSmrg	    esac
74094cd6a3aeSmrg	    # Commands to make compiler produce verbose output that lists
74104cd6a3aeSmrg	    # what "hidden" libraries, object files and flags are used when
74114cd6a3aeSmrg	    # linking a shared library.
74124cd6a3aeSmrg	    #
74134cd6a3aeSmrg	    # There doesn't appear to be a way to prevent this compiler from
74144cd6a3aeSmrg	    # explicitly linking system object files so we need to strip them
74154cd6a3aeSmrg	    # from the output so that they don't get included in the library
74164cd6a3aeSmrg	    # dependencies.
74174cd6a3aeSmrg	    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"'
74184cd6a3aeSmrg	    ;;
74194cd6a3aeSmrg          *)
74204cd6a3aeSmrg	    if test "$GXX" = yes; then
74214cd6a3aeSmrg	      if test $with_gnu_ld = no; then
74224cd6a3aeSmrg	        case $host_cpu in
74234cd6a3aeSmrg	          hppa*64*)
74244cd6a3aeSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
74254cd6a3aeSmrg	            ;;
74264cd6a3aeSmrg	          ia64*)
74274cd6a3aeSmrg	            _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'
74284cd6a3aeSmrg	            ;;
74294cd6a3aeSmrg	          *)
74304cd6a3aeSmrg	            _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'
74314cd6a3aeSmrg	            ;;
74324cd6a3aeSmrg	        esac
74334cd6a3aeSmrg	      fi
74344cd6a3aeSmrg	    else
74354cd6a3aeSmrg	      # FIXME: insert proper C++ library support
74364cd6a3aeSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
74374cd6a3aeSmrg	    fi
74384cd6a3aeSmrg	    ;;
74394cd6a3aeSmrg        esac
74404cd6a3aeSmrg        ;;
74418c9fbc29Smrg
74424cd6a3aeSmrg      interix[[3-9]]*)
74434cd6a3aeSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
74444cd6a3aeSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
74454cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
74464cd6a3aeSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
74474cd6a3aeSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
74484cd6a3aeSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
74494cd6a3aeSmrg	# default) and relocated if they conflict, which is a slow very memory
74504cd6a3aeSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
74514cd6a3aeSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
74524cd6a3aeSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
74534cd6a3aeSmrg	_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'
74544cd6a3aeSmrg	_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'
74554cd6a3aeSmrg	;;
74564cd6a3aeSmrg      irix5* | irix6*)
74574cd6a3aeSmrg        case $cc_basename in
74584cd6a3aeSmrg          CC*)
74594cd6a3aeSmrg	    # SGI C++
74604cd6a3aeSmrg	    _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'
74614cd6a3aeSmrg
74624cd6a3aeSmrg	    # Archives containing C++ object files must be created using
74634cd6a3aeSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
74644cd6a3aeSmrg	    # necessary to make sure instantiated templates are included
74654cd6a3aeSmrg	    # in the archive.
74664cd6a3aeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
74674cd6a3aeSmrg	    ;;
74684cd6a3aeSmrg          *)
74694cd6a3aeSmrg	    if test "$GXX" = yes; then
74704cd6a3aeSmrg	      if test "$with_gnu_ld" = no; then
74714cd6a3aeSmrg	        _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'
74724cd6a3aeSmrg	      else
74734cd6a3aeSmrg	        _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'
74744cd6a3aeSmrg	      fi
74754cd6a3aeSmrg	    fi
74764cd6a3aeSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
74774cd6a3aeSmrg	    ;;
74784cd6a3aeSmrg        esac
74794cd6a3aeSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
74804cd6a3aeSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
74814cd6a3aeSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
74824cd6a3aeSmrg        ;;
74838c9fbc29Smrg
74844cd6a3aeSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
74854cd6a3aeSmrg        case $cc_basename in
74864cd6a3aeSmrg          KCC*)
74874cd6a3aeSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
74888c9fbc29Smrg
74894cd6a3aeSmrg	    # KCC will only create a shared library if the output file
74904cd6a3aeSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
74914cd6a3aeSmrg	    # to its proper name (with version) after linking.
74924cd6a3aeSmrg	    _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'
74934cd6a3aeSmrg	    _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'
74944cd6a3aeSmrg	    # Commands to make compiler produce verbose output that lists
74954cd6a3aeSmrg	    # what "hidden" libraries, object files and flags are used when
74964cd6a3aeSmrg	    # linking a shared library.
74974cd6a3aeSmrg	    #
74984cd6a3aeSmrg	    # There doesn't appear to be a way to prevent this compiler from
74994cd6a3aeSmrg	    # explicitly linking system object files so we need to strip them
75004cd6a3aeSmrg	    # from the output so that they don't get included in the library
75014cd6a3aeSmrg	    # dependencies.
75024cd6a3aeSmrg	    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"'
75034cd6a3aeSmrg
75044cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
75054cd6a3aeSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75064cd6a3aeSmrg
75074cd6a3aeSmrg	    # Archives containing C++ object files must be created using
75084cd6a3aeSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
75094cd6a3aeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
75104cd6a3aeSmrg	    ;;
75114cd6a3aeSmrg	  icpc* | ecpc* )
75124cd6a3aeSmrg	    # Intel C++
75134cd6a3aeSmrg	    with_gnu_ld=yes
75144cd6a3aeSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
75154cd6a3aeSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
75164cd6a3aeSmrg	    # earlier do not add the objects themselves.
75174cd6a3aeSmrg	    case `$CC -V 2>&1` in
75184cd6a3aeSmrg	      *"Version 7."*)
75194cd6a3aeSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
75204cd6a3aeSmrg		_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'
75214cd6a3aeSmrg		;;
75224cd6a3aeSmrg	      *)  # Version 8.0 or newer
75234cd6a3aeSmrg	        tmp_idyn=
75244cd6a3aeSmrg	        case $host_cpu in
75254cd6a3aeSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
75264cd6a3aeSmrg		esac
75274cd6a3aeSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
75284cd6a3aeSmrg		_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'
75294cd6a3aeSmrg		;;
75304cd6a3aeSmrg	    esac
75314cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
75324cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
75334cd6a3aeSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75344cd6a3aeSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
75354cd6a3aeSmrg	    ;;
75364cd6a3aeSmrg          pgCC* | pgcpp*)
75374cd6a3aeSmrg            # Portland Group C++ compiler
75384cd6a3aeSmrg	    case `$CC -V` in
75394cd6a3aeSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
75404cd6a3aeSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
75414cd6a3aeSmrg		rm -rf $tpldir~
75424cd6a3aeSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
75434cd6a3aeSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
75444cd6a3aeSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
75454cd6a3aeSmrg		rm -rf $tpldir~
75464cd6a3aeSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
75474cd6a3aeSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
75484cd6a3aeSmrg		$RANLIB $oldlib'
75494cd6a3aeSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
75504cd6a3aeSmrg		rm -rf $tpldir~
75514cd6a3aeSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
75524cd6a3aeSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
75534cd6a3aeSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
75544cd6a3aeSmrg		rm -rf $tpldir~
75554cd6a3aeSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
75564cd6a3aeSmrg		$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'
75574cd6a3aeSmrg	      ;;
75584cd6a3aeSmrg	    *) # Version 6 and above use weak symbols
75594cd6a3aeSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
75604cd6a3aeSmrg	      _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'
75614cd6a3aeSmrg	      ;;
75624cd6a3aeSmrg	    esac
75638c9fbc29Smrg
75644cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
75654cd6a3aeSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75664cd6a3aeSmrg	    _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'
75674cd6a3aeSmrg            ;;
75684cd6a3aeSmrg	  cxx*)
75694cd6a3aeSmrg	    # Compaq C++
75704cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
75714cd6a3aeSmrg	    _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'
75728c9fbc29Smrg
75734cd6a3aeSmrg	    runpath_var=LD_RUN_PATH
75744cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
75754cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
75768c9fbc29Smrg
75774cd6a3aeSmrg	    # Commands to make compiler produce verbose output that lists
75784cd6a3aeSmrg	    # what "hidden" libraries, object files and flags are used when
75794cd6a3aeSmrg	    # linking a shared library.
75804cd6a3aeSmrg	    #
75814cd6a3aeSmrg	    # There doesn't appear to be a way to prevent this compiler from
75824cd6a3aeSmrg	    # explicitly linking system object files so we need to strip them
75834cd6a3aeSmrg	    # from the output so that they don't get included in the library
75844cd6a3aeSmrg	    # dependencies.
75854cd6a3aeSmrg	    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'
75864cd6a3aeSmrg	    ;;
75874cd6a3aeSmrg	  xl* | mpixl* | bgxl*)
75884cd6a3aeSmrg	    # IBM XL 8.0 on PPC, with GNU ld
75894cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
75904cd6a3aeSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
75914cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
75924cd6a3aeSmrg	    if test "x$supports_anon_versioning" = xyes; then
75934cd6a3aeSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
75944cd6a3aeSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
75954cd6a3aeSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
75964cd6a3aeSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
75974cd6a3aeSmrg	    fi
75984cd6a3aeSmrg	    ;;
75994cd6a3aeSmrg	  *)
76004cd6a3aeSmrg	    case `$CC -V 2>&1 | sed 5q` in
76014cd6a3aeSmrg	    *Sun\ C*)
76024cd6a3aeSmrg	      # Sun C++ 5.9
76034cd6a3aeSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
76044cd6a3aeSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
76054cd6a3aeSmrg	      _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'
76064cd6a3aeSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
76074cd6a3aeSmrg	      _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'
76084cd6a3aeSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
76094cd6a3aeSmrg
76104cd6a3aeSmrg	      # Not sure whether something based on
76114cd6a3aeSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
76124cd6a3aeSmrg	      # would be better.
76134cd6a3aeSmrg	      output_verbose_link_cmd='func_echo_all'
76144cd6a3aeSmrg
76154cd6a3aeSmrg	      # Archives containing C++ object files must be created using
76164cd6a3aeSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
76174cd6a3aeSmrg	      # necessary to make sure instantiated templates are included
76184cd6a3aeSmrg	      # in the archive.
76194cd6a3aeSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
76204cd6a3aeSmrg	      ;;
76214cd6a3aeSmrg	    esac
76224cd6a3aeSmrg	    ;;
76234cd6a3aeSmrg	esac
76244cd6a3aeSmrg	;;
76258c9fbc29Smrg
76264cd6a3aeSmrg      lynxos*)
76274cd6a3aeSmrg        # FIXME: insert proper C++ library support
76284cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
76294cd6a3aeSmrg	;;
76308c9fbc29Smrg
76314cd6a3aeSmrg      m88k*)
76324cd6a3aeSmrg        # FIXME: insert proper C++ library support
76334cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
76344cd6a3aeSmrg	;;
76358c9fbc29Smrg
76364cd6a3aeSmrg      mvs*)
76374cd6a3aeSmrg        case $cc_basename in
76384cd6a3aeSmrg          cxx*)
76394cd6a3aeSmrg	    # FIXME: insert proper C++ library support
76404cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76414cd6a3aeSmrg	    ;;
76424cd6a3aeSmrg	  *)
76434cd6a3aeSmrg	    # FIXME: insert proper C++ library support
76444cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76454cd6a3aeSmrg	    ;;
76464cd6a3aeSmrg	esac
76474cd6a3aeSmrg	;;
76488c9fbc29Smrg
76494cd6a3aeSmrg      netbsd*)
76504cd6a3aeSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
76514cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
76524cd6a3aeSmrg	  wlarc=
76534cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
76544cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
76554cd6a3aeSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
76564cd6a3aeSmrg	fi
76574cd6a3aeSmrg	# Workaround some broken pre-1.5 toolchains
76584cd6a3aeSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
76594cd6a3aeSmrg	;;
76608c9fbc29Smrg
76614cd6a3aeSmrg      *nto* | *qnx*)
76624cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
76634cd6a3aeSmrg	;;
76648c9fbc29Smrg
76654cd6a3aeSmrg      openbsd2*)
76664cd6a3aeSmrg        # C++ shared libraries are fairly broken
76674cd6a3aeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
76684cd6a3aeSmrg	;;
76698c9fbc29Smrg
76704cd6a3aeSmrg      openbsd*)
76714cd6a3aeSmrg	if test -f /usr/libexec/ld.so; then
76724cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
76734cd6a3aeSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
76744cd6a3aeSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
76754cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
76764cd6a3aeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
76774cd6a3aeSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
76784cd6a3aeSmrg	    _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'
76794cd6a3aeSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
76804cd6a3aeSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
76814cd6a3aeSmrg	  fi
76824cd6a3aeSmrg	  output_verbose_link_cmd=func_echo_all
76834cd6a3aeSmrg	else
76844cd6a3aeSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
76854cd6a3aeSmrg	fi
76864cd6a3aeSmrg	;;
76878c9fbc29Smrg
76884cd6a3aeSmrg      osf3* | osf4* | osf5*)
76894cd6a3aeSmrg        case $cc_basename in
76904cd6a3aeSmrg          KCC*)
76914cd6a3aeSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
76924cd6a3aeSmrg
76934cd6a3aeSmrg	    # KCC will only create a shared library if the output file
76944cd6a3aeSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
76954cd6a3aeSmrg	    # to its proper name (with version) after linking.
76964cd6a3aeSmrg	    _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'
76974cd6a3aeSmrg
76984cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
76994cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77004cd6a3aeSmrg
77014cd6a3aeSmrg	    # Archives containing C++ object files must be created using
77024cd6a3aeSmrg	    # the KAI C++ compiler.
77034cd6a3aeSmrg	    case $host in
77044cd6a3aeSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
77054cd6a3aeSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
77064cd6a3aeSmrg	    esac
77074cd6a3aeSmrg	    ;;
77084cd6a3aeSmrg          RCC*)
77094cd6a3aeSmrg	    # Rational C++ 2.4.1
77104cd6a3aeSmrg	    # FIXME: insert proper C++ library support
77114cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77124cd6a3aeSmrg	    ;;
77134cd6a3aeSmrg          cxx*)
77144cd6a3aeSmrg	    case $host in
77154cd6a3aeSmrg	      osf3*)
77164cd6a3aeSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
77174cd6a3aeSmrg	        _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'
77184cd6a3aeSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
77194cd6a3aeSmrg		;;
77204cd6a3aeSmrg	      *)
77214cd6a3aeSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
77224cd6a3aeSmrg	        _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'
77234cd6a3aeSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
77244cd6a3aeSmrg	          echo "-hidden">> $lib.exp~
77254cd6a3aeSmrg	          $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~
77264cd6a3aeSmrg	          $RM $lib.exp'
77274cd6a3aeSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
77284cd6a3aeSmrg		;;
77294cd6a3aeSmrg	    esac
77308c9fbc29Smrg
77314cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77328c9fbc29Smrg
77334cd6a3aeSmrg	    # Commands to make compiler produce verbose output that lists
77344cd6a3aeSmrg	    # what "hidden" libraries, object files and flags are used when
77354cd6a3aeSmrg	    # linking a shared library.
77364cd6a3aeSmrg	    #
77374cd6a3aeSmrg	    # There doesn't appear to be a way to prevent this compiler from
77384cd6a3aeSmrg	    # explicitly linking system object files so we need to strip them
77394cd6a3aeSmrg	    # from the output so that they don't get included in the library
77404cd6a3aeSmrg	    # dependencies.
77414cd6a3aeSmrg	    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"'
77424cd6a3aeSmrg	    ;;
77434cd6a3aeSmrg	  *)
77444cd6a3aeSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
77454cd6a3aeSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
77464cd6a3aeSmrg	      case $host in
77474cd6a3aeSmrg	        osf3*)
77484cd6a3aeSmrg	          _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'
77494cd6a3aeSmrg		  ;;
77504cd6a3aeSmrg	        *)
77514cd6a3aeSmrg	          _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'
77524cd6a3aeSmrg		  ;;
77534cd6a3aeSmrg	      esac
77544cd6a3aeSmrg
77554cd6a3aeSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
77564cd6a3aeSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77574cd6a3aeSmrg
77584cd6a3aeSmrg	      # Commands to make compiler produce verbose output that lists
77594cd6a3aeSmrg	      # what "hidden" libraries, object files and flags are used when
77604cd6a3aeSmrg	      # linking a shared library.
77614cd6a3aeSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
77624cd6a3aeSmrg
77634cd6a3aeSmrg	    else
77644cd6a3aeSmrg	      # FIXME: insert proper C++ library support
77654cd6a3aeSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
77664cd6a3aeSmrg	    fi
77674cd6a3aeSmrg	    ;;
77684cd6a3aeSmrg        esac
77694cd6a3aeSmrg        ;;
77708c9fbc29Smrg
77714cd6a3aeSmrg      psos*)
77724cd6a3aeSmrg        # FIXME: insert proper C++ library support
77734cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
77744cd6a3aeSmrg        ;;
77758c9fbc29Smrg
77764cd6a3aeSmrg      sunos4*)
77774cd6a3aeSmrg        case $cc_basename in
77784cd6a3aeSmrg          CC*)
77794cd6a3aeSmrg	    # Sun C++ 4.x
77804cd6a3aeSmrg	    # FIXME: insert proper C++ library support
77814cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77824cd6a3aeSmrg	    ;;
77834cd6a3aeSmrg          lcc*)
77844cd6a3aeSmrg	    # Lucid
77854cd6a3aeSmrg	    # FIXME: insert proper C++ library support
77864cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77874cd6a3aeSmrg	    ;;
77884cd6a3aeSmrg          *)
77894cd6a3aeSmrg	    # FIXME: insert proper C++ library support
77904cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
77914cd6a3aeSmrg	    ;;
77924cd6a3aeSmrg        esac
77934cd6a3aeSmrg        ;;
77948c9fbc29Smrg
77954cd6a3aeSmrg      solaris*)
77964cd6a3aeSmrg        case $cc_basename in
77974cd6a3aeSmrg          CC* | sunCC*)
77984cd6a3aeSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
77994cd6a3aeSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
78004cd6a3aeSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
78014cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
78024cd6a3aeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78034cd6a3aeSmrg	      $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'
78044cd6a3aeSmrg
78054cd6a3aeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
78064cd6a3aeSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78074cd6a3aeSmrg	    case $host_os in
78084cd6a3aeSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
78094cd6a3aeSmrg	      *)
78104cd6a3aeSmrg		# The compiler driver will combine and reorder linker options,
78114cd6a3aeSmrg		# but understands `-z linker_flag'.
78124cd6a3aeSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
78134cd6a3aeSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
78144cd6a3aeSmrg	        ;;
78154cd6a3aeSmrg	    esac
78164cd6a3aeSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
78178c9fbc29Smrg
78184cd6a3aeSmrg	    output_verbose_link_cmd='func_echo_all'
78198c9fbc29Smrg
78204cd6a3aeSmrg	    # Archives containing C++ object files must be created using
78214cd6a3aeSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
78224cd6a3aeSmrg	    # necessary to make sure instantiated templates are included
78234cd6a3aeSmrg	    # in the archive.
78244cd6a3aeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
78254cd6a3aeSmrg	    ;;
78264cd6a3aeSmrg          gcx*)
78274cd6a3aeSmrg	    # Green Hills C++ Compiler
78284cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78298c9fbc29Smrg
78304cd6a3aeSmrg	    # The C++ compiler must be used to create the archive.
78314cd6a3aeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
78324cd6a3aeSmrg	    ;;
78334cd6a3aeSmrg          *)
78344cd6a3aeSmrg	    # GNU C++ compiler with Solaris linker
78354cd6a3aeSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
78364cd6a3aeSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
78374cd6a3aeSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
78384cd6a3aeSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78394cd6a3aeSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78404cd6a3aeSmrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
78414cd6a3aeSmrg
78424cd6a3aeSmrg	        # Commands to make compiler produce verbose output that lists
78434cd6a3aeSmrg	        # what "hidden" libraries, object files and flags are used when
78444cd6a3aeSmrg	        # linking a shared library.
78454cd6a3aeSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
78464cd6a3aeSmrg	      else
78474cd6a3aeSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
78484cd6a3aeSmrg	        # platform.
78494cd6a3aeSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
78504cd6a3aeSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
78514cd6a3aeSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
78524cd6a3aeSmrg
78534cd6a3aeSmrg	        # Commands to make compiler produce verbose output that lists
78544cd6a3aeSmrg	        # what "hidden" libraries, object files and flags are used when
78554cd6a3aeSmrg	        # linking a shared library.
78564cd6a3aeSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
78574cd6a3aeSmrg	      fi
78584cd6a3aeSmrg
78594cd6a3aeSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
78604cd6a3aeSmrg	      case $host_os in
78614cd6a3aeSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
78624cd6a3aeSmrg		*)
78634cd6a3aeSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
78644cd6a3aeSmrg		  ;;
78654cd6a3aeSmrg	      esac
78664cd6a3aeSmrg	    fi
78674cd6a3aeSmrg	    ;;
78684cd6a3aeSmrg        esac
78694cd6a3aeSmrg        ;;
78708c9fbc29Smrg
78714cd6a3aeSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
78724cd6a3aeSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
78734cd6a3aeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
78744cd6a3aeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78754cd6a3aeSmrg      runpath_var='LD_RUN_PATH'
78768c9fbc29Smrg
78774cd6a3aeSmrg      case $cc_basename in
78784cd6a3aeSmrg        CC*)
78794cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78804cd6a3aeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78814cd6a3aeSmrg	  ;;
78824cd6a3aeSmrg	*)
78834cd6a3aeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78844cd6a3aeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
78854cd6a3aeSmrg	  ;;
78864cd6a3aeSmrg      esac
78874cd6a3aeSmrg      ;;
78888c9fbc29Smrg
78894cd6a3aeSmrg      sysv5* | sco3.2v5* | sco5v6*)
78904cd6a3aeSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
78914cd6a3aeSmrg	# link with -lc, and that would cause any symbols used from libc to
78924cd6a3aeSmrg	# always be unresolved, which means just about no library would
78934cd6a3aeSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
78944cd6a3aeSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
78954cd6a3aeSmrg	# as -z defs.
78964cd6a3aeSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
78974cd6a3aeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
78984cd6a3aeSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
78994cd6a3aeSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
79004cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
79014cd6a3aeSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
79024cd6a3aeSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
79034cd6a3aeSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
79044cd6a3aeSmrg	runpath_var='LD_RUN_PATH'
79058c9fbc29Smrg
79064cd6a3aeSmrg	case $cc_basename in
79074cd6a3aeSmrg          CC*)
79084cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79094cd6a3aeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79104cd6a3aeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
79114cd6a3aeSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
79124cd6a3aeSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
79134cd6a3aeSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
79144cd6a3aeSmrg	    ;;
79154cd6a3aeSmrg	  *)
79164cd6a3aeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79174cd6a3aeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
79184cd6a3aeSmrg	    ;;
79194cd6a3aeSmrg	esac
79204cd6a3aeSmrg      ;;
79218c9fbc29Smrg
79224cd6a3aeSmrg      tandem*)
79234cd6a3aeSmrg        case $cc_basename in
79244cd6a3aeSmrg          NCC*)
79254cd6a3aeSmrg	    # NonStop-UX NCC 3.20
79264cd6a3aeSmrg	    # FIXME: insert proper C++ library support
79274cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
79284cd6a3aeSmrg	    ;;
79294cd6a3aeSmrg          *)
79304cd6a3aeSmrg	    # FIXME: insert proper C++ library support
79314cd6a3aeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
79324cd6a3aeSmrg	    ;;
79334cd6a3aeSmrg        esac
79344cd6a3aeSmrg        ;;
79358c9fbc29Smrg
79364cd6a3aeSmrg      vxworks*)
79374cd6a3aeSmrg        # FIXME: insert proper C++ library support
79384cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
79394cd6a3aeSmrg        ;;
79408c9fbc29Smrg
79414cd6a3aeSmrg      *)
79424cd6a3aeSmrg        # FIXME: insert proper C++ library support
79434cd6a3aeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
79444cd6a3aeSmrg        ;;
79454cd6a3aeSmrg    esac
79468c9fbc29Smrg
79474cd6a3aeSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
79484cd6a3aeSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
79494cd6a3aeSmrg
79504cd6a3aeSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
79514cd6a3aeSmrg    _LT_TAGVAR(LD, $1)="$LD"
79524cd6a3aeSmrg
79534cd6a3aeSmrg    ## CAVEAT EMPTOR:
79544cd6a3aeSmrg    ## There is no encapsulation within the following macros, do not change
79554cd6a3aeSmrg    ## the running order or otherwise move them around unless you know exactly
79564cd6a3aeSmrg    ## what you are doing...
79574cd6a3aeSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
79584cd6a3aeSmrg    _LT_COMPILER_PIC($1)
79594cd6a3aeSmrg    _LT_COMPILER_C_O($1)
79604cd6a3aeSmrg    _LT_COMPILER_FILE_LOCKS($1)
79614cd6a3aeSmrg    _LT_LINKER_SHLIBS($1)
79624cd6a3aeSmrg    _LT_SYS_DYNAMIC_LINKER($1)
79634cd6a3aeSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
79644cd6a3aeSmrg
79654cd6a3aeSmrg    _LT_CONFIG($1)
79664cd6a3aeSmrg  fi # test -n "$compiler"
79674cd6a3aeSmrg
79684cd6a3aeSmrg  CC=$lt_save_CC
79694cd6a3aeSmrg  CFLAGS=$lt_save_CFLAGS
79704cd6a3aeSmrg  LDCXX=$LD
79714cd6a3aeSmrg  LD=$lt_save_LD
79724cd6a3aeSmrg  GCC=$lt_save_GCC
79734cd6a3aeSmrg  with_gnu_ld=$lt_save_with_gnu_ld
79744cd6a3aeSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
79754cd6a3aeSmrg  lt_cv_path_LD=$lt_save_path_LD
79764cd6a3aeSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
79774cd6a3aeSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
79784cd6a3aeSmrgfi # test "$_lt_caught_CXX_error" != yes
79798c9fbc29Smrg
79804cd6a3aeSmrgAC_LANG_POP
79814cd6a3aeSmrg])# _LT_LANG_CXX_CONFIG
79828c9fbc29Smrg
79838c9fbc29Smrg
79844cd6a3aeSmrg# _LT_FUNC_STRIPNAME_CNF
79854cd6a3aeSmrg# ----------------------
79864cd6a3aeSmrg# func_stripname_cnf prefix suffix name
79874cd6a3aeSmrg# strip PREFIX and SUFFIX off of NAME.
79884cd6a3aeSmrg# PREFIX and SUFFIX must not contain globbing or regex special
79894cd6a3aeSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
79904cd6a3aeSmrg# dot (in which case that matches only a dot).
79914cd6a3aeSmrg#
79924cd6a3aeSmrg# This function is identical to the (non-XSI) version of func_stripname,
79934cd6a3aeSmrg# except this one can be used by m4 code that may be executed by configure,
79944cd6a3aeSmrg# rather than the libtool script.
79954cd6a3aeSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
79964cd6a3aeSmrgAC_REQUIRE([_LT_DECL_SED])
79974cd6a3aeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
79984cd6a3aeSmrgfunc_stripname_cnf ()
79994cd6a3aeSmrg{
80004cd6a3aeSmrg  case ${2} in
80014cd6a3aeSmrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
80024cd6a3aeSmrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
80034cd6a3aeSmrg  esac
80044cd6a3aeSmrg} # func_stripname_cnf
80054cd6a3aeSmrg])# _LT_FUNC_STRIPNAME_CNF
80068c9fbc29Smrg
80074cd6a3aeSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
80088c9fbc29Smrg# ---------------------------------
80094cd6a3aeSmrg# Figure out "hidden" library dependencies from verbose
80104cd6a3aeSmrg# compiler output when linking a shared library.
80114cd6a3aeSmrg# Parse the compiler output and extract the necessary
80124cd6a3aeSmrg# objects, libraries and library flags.
80134cd6a3aeSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
80144cd6a3aeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
80154cd6a3aeSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
80164cd6a3aeSmrg# Dependencies to place before and after the object being linked:
80174cd6a3aeSmrg_LT_TAGVAR(predep_objects, $1)=
80184cd6a3aeSmrg_LT_TAGVAR(postdep_objects, $1)=
80194cd6a3aeSmrg_LT_TAGVAR(predeps, $1)=
80204cd6a3aeSmrg_LT_TAGVAR(postdeps, $1)=
80214cd6a3aeSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
80228c9fbc29Smrg
80234cd6a3aeSmrgdnl we can't use the lt_simple_compile_test_code here,
80244cd6a3aeSmrgdnl because it contains code intended for an executable,
80254cd6a3aeSmrgdnl not a library.  It's possible we should let each
80264cd6a3aeSmrgdnl tag define a new lt_????_link_test_code variable,
80274cd6a3aeSmrgdnl but it's only used here...
80284cd6a3aeSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
80294cd6a3aeSmrgint a;
80304cd6a3aeSmrgvoid foo (void) { a = 0; }
80314cd6a3aeSmrg_LT_EOF
80324cd6a3aeSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
80334cd6a3aeSmrgclass Foo
80344cd6a3aeSmrg{
80354cd6a3aeSmrgpublic:
80364cd6a3aeSmrg  Foo (void) { a = 0; }
80374cd6a3aeSmrgprivate:
80384cd6a3aeSmrg  int a;
80394cd6a3aeSmrg};
80404cd6a3aeSmrg_LT_EOF
80414cd6a3aeSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
80424cd6a3aeSmrg      subroutine foo
80434cd6a3aeSmrg      implicit none
80444cd6a3aeSmrg      integer*4 a
80454cd6a3aeSmrg      a=0
80464cd6a3aeSmrg      return
80474cd6a3aeSmrg      end
80484cd6a3aeSmrg_LT_EOF
80494cd6a3aeSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
80504cd6a3aeSmrg      subroutine foo
80514cd6a3aeSmrg      implicit none
80524cd6a3aeSmrg      integer a
80534cd6a3aeSmrg      a=0
80544cd6a3aeSmrg      return
80554cd6a3aeSmrg      end
80564cd6a3aeSmrg_LT_EOF
80574cd6a3aeSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
80584cd6a3aeSmrgpublic class foo {
80594cd6a3aeSmrg  private int a;
80604cd6a3aeSmrg  public void bar (void) {
80614cd6a3aeSmrg    a = 0;
80624cd6a3aeSmrg  }
80634cd6a3aeSmrg};
80644cd6a3aeSmrg_LT_EOF
80654cd6a3aeSmrg])
80668c9fbc29Smrg
80674cd6a3aeSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
80684cd6a3aeSmrgcase "$CC $CFLAGS " in #(
80694cd6a3aeSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
80704cd6a3aeSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
80718c9fbc29Smrgesac
80728c9fbc29Smrg
80734cd6a3aeSmrgdnl Parse the compiler output and extract the necessary
80744cd6a3aeSmrgdnl objects, libraries and library flags.
80754cd6a3aeSmrgif AC_TRY_EVAL(ac_compile); then
80764cd6a3aeSmrg  # Parse the compiler output and extract the necessary
80774cd6a3aeSmrg  # objects, libraries and library flags.
80788c9fbc29Smrg
80794cd6a3aeSmrg  # Sentinel used to keep track of whether or not we are before
80804cd6a3aeSmrg  # the conftest object file.
80814cd6a3aeSmrg  pre_test_object_deps_done=no
80828c9fbc29Smrg
80834cd6a3aeSmrg  for p in `eval "$output_verbose_link_cmd"`; do
80844cd6a3aeSmrg    case ${prev}${p} in
80858c9fbc29Smrg
80864cd6a3aeSmrg    -L* | -R* | -l*)
80874cd6a3aeSmrg       # Some compilers place space between "-{L,R}" and the path.
80884cd6a3aeSmrg       # Remove the space.
80894cd6a3aeSmrg       if test $p = "-L" ||
80904cd6a3aeSmrg          test $p = "-R"; then
80914cd6a3aeSmrg	 prev=$p
80924cd6a3aeSmrg	 continue
80934cd6a3aeSmrg       fi
80948c9fbc29Smrg
80954cd6a3aeSmrg       # Expand the sysroot to ease extracting the directories later.
80964cd6a3aeSmrg       if test -z "$prev"; then
80974cd6a3aeSmrg         case $p in
80984cd6a3aeSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
80994cd6a3aeSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
81004cd6a3aeSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
81014cd6a3aeSmrg         esac
81024cd6a3aeSmrg       fi
81034cd6a3aeSmrg       case $p in
81044cd6a3aeSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
81054cd6a3aeSmrg       esac
81064cd6a3aeSmrg       if test "$pre_test_object_deps_done" = no; then
81074cd6a3aeSmrg	 case ${prev} in
81084cd6a3aeSmrg	 -L | -R)
81094cd6a3aeSmrg	   # Internal compiler library paths should come after those
81104cd6a3aeSmrg	   # provided the user.  The postdeps already come after the
81114cd6a3aeSmrg	   # user supplied libs so there is no need to process them.
81124cd6a3aeSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
81134cd6a3aeSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
81144cd6a3aeSmrg	   else
81154cd6a3aeSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
81164cd6a3aeSmrg	   fi
81174cd6a3aeSmrg	   ;;
81184cd6a3aeSmrg	 # The "-l" case would never come before the object being
81194cd6a3aeSmrg	 # linked, so don't bother handling this case.
81204cd6a3aeSmrg	 esac
81214cd6a3aeSmrg       else
81224cd6a3aeSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
81234cd6a3aeSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
81244cd6a3aeSmrg	 else
81254cd6a3aeSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
81264cd6a3aeSmrg	 fi
81274cd6a3aeSmrg       fi
81284cd6a3aeSmrg       prev=
81294cd6a3aeSmrg       ;;
81308c9fbc29Smrg
81314cd6a3aeSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
81324cd6a3aeSmrg    *.$objext)
81334cd6a3aeSmrg       # This assumes that the test object file only shows up
81344cd6a3aeSmrg       # once in the compiler output.
81354cd6a3aeSmrg       if test "$p" = "conftest.$objext"; then
81364cd6a3aeSmrg	 pre_test_object_deps_done=yes
81374cd6a3aeSmrg	 continue
81384cd6a3aeSmrg       fi
81398c9fbc29Smrg
81404cd6a3aeSmrg       if test "$pre_test_object_deps_done" = no; then
81414cd6a3aeSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
81424cd6a3aeSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
81434cd6a3aeSmrg	 else
81444cd6a3aeSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
81454cd6a3aeSmrg	 fi
81464cd6a3aeSmrg       else
81474cd6a3aeSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
81484cd6a3aeSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
81494cd6a3aeSmrg	 else
81504cd6a3aeSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
81514cd6a3aeSmrg	 fi
81524cd6a3aeSmrg       fi
81534cd6a3aeSmrg       ;;
81548c9fbc29Smrg
81554cd6a3aeSmrg    *) ;; # Ignore the rest.
81568c9fbc29Smrg
81574cd6a3aeSmrg    esac
81584cd6a3aeSmrg  done
81598c9fbc29Smrg
81604cd6a3aeSmrg  # Clean up.
81614cd6a3aeSmrg  rm -f a.out a.exe
81628c9fbc29Smrgelse
81634cd6a3aeSmrg  echo "libtool.m4: error: problem compiling $1 test program"
81648c9fbc29Smrgfi
81658c9fbc29Smrg
81664cd6a3aeSmrg$RM -f confest.$objext
81674cd6a3aeSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
81688c9fbc29Smrg
81694cd6a3aeSmrg# PORTME: override above test on systems where it is broken
81704cd6a3aeSmrgm4_if([$1], [CXX],
81714cd6a3aeSmrg[case $host_os in
81724cd6a3aeSmrginterix[[3-9]]*)
81734cd6a3aeSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
81744cd6a3aeSmrg  # hack all around it, let's just trust "g++" to DTRT.
81754cd6a3aeSmrg  _LT_TAGVAR(predep_objects,$1)=
81764cd6a3aeSmrg  _LT_TAGVAR(postdep_objects,$1)=
81774cd6a3aeSmrg  _LT_TAGVAR(postdeps,$1)=
81784cd6a3aeSmrg  ;;
81798c9fbc29Smrg
81804cd6a3aeSmrglinux*)
81814cd6a3aeSmrg  case `$CC -V 2>&1 | sed 5q` in
81824cd6a3aeSmrg  *Sun\ C*)
81834cd6a3aeSmrg    # Sun C++ 5.9
81848c9fbc29Smrg
81854cd6a3aeSmrg    # The more standards-conforming stlport4 library is
81864cd6a3aeSmrg    # incompatible with the Cstd library. Avoid specifying
81874cd6a3aeSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
81884cd6a3aeSmrg    # -library=stlport4 depends on it.
81894cd6a3aeSmrg    case " $CXX $CXXFLAGS " in
81904cd6a3aeSmrg    *" -library=stlport4 "*)
81914cd6a3aeSmrg      solaris_use_stlport4=yes
81928c9fbc29Smrg      ;;
81934cd6a3aeSmrg    esac
81944cd6a3aeSmrg
81954cd6a3aeSmrg    if test "$solaris_use_stlport4" != yes; then
81964cd6a3aeSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
81974cd6a3aeSmrg    fi
81984cd6a3aeSmrg    ;;
81994cd6a3aeSmrg  esac
82004cd6a3aeSmrg  ;;
82014cd6a3aeSmrg
82024cd6a3aeSmrgsolaris*)
82034cd6a3aeSmrg  case $cc_basename in
82044cd6a3aeSmrg  CC* | sunCC*)
82054cd6a3aeSmrg    # The more standards-conforming stlport4 library is
82064cd6a3aeSmrg    # incompatible with the Cstd library. Avoid specifying
82074cd6a3aeSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
82084cd6a3aeSmrg    # -library=stlport4 depends on it.
82094cd6a3aeSmrg    case " $CXX $CXXFLAGS " in
82104cd6a3aeSmrg    *" -library=stlport4 "*)
82114cd6a3aeSmrg      solaris_use_stlport4=yes
82128c9fbc29Smrg      ;;
82138c9fbc29Smrg    esac
82144cd6a3aeSmrg
82154cd6a3aeSmrg    # Adding this requires a known-good setup of shared libraries for
82164cd6a3aeSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
82174cd6a3aeSmrg    # archive will be linked into the output, leading to subtle bugs.
82184cd6a3aeSmrg    if test "$solaris_use_stlport4" != yes; then
82194cd6a3aeSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
82204cd6a3aeSmrg    fi
82214cd6a3aeSmrg    ;;
82224cd6a3aeSmrg  esac
82234cd6a3aeSmrg  ;;
82244cd6a3aeSmrgesac
82254cd6a3aeSmrg])
82264cd6a3aeSmrg
82274cd6a3aeSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
82284cd6a3aeSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
82294cd6a3aeSmrgesac
82304cd6a3aeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
82314cd6a3aeSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
82324cd6a3aeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
82334cd6a3aeSmrgfi
82344cd6a3aeSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
82354cd6a3aeSmrg    [The directories searched by this compiler when creating a shared library])
82364cd6a3aeSmrg_LT_TAGDECL([], [predep_objects], [1],
82374cd6a3aeSmrg    [Dependencies to place before and after the objects being linked to
82384cd6a3aeSmrg    create a shared library])
82394cd6a3aeSmrg_LT_TAGDECL([], [postdep_objects], [1])
82404cd6a3aeSmrg_LT_TAGDECL([], [predeps], [1])
82414cd6a3aeSmrg_LT_TAGDECL([], [postdeps], [1])
82424cd6a3aeSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
82434cd6a3aeSmrg    [The library search path used internally by the compiler when linking
82444cd6a3aeSmrg    a shared library])
82454cd6a3aeSmrg])# _LT_SYS_HIDDEN_LIBDEPS
82464cd6a3aeSmrg
82474cd6a3aeSmrg
82484cd6a3aeSmrg# _LT_LANG_F77_CONFIG([TAG])
82494cd6a3aeSmrg# --------------------------
82504cd6a3aeSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
82514cd6a3aeSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
82524cd6a3aeSmrg# to write the compiler configuration to `libtool'.
82534cd6a3aeSmrgm4_defun([_LT_LANG_F77_CONFIG],
82544cd6a3aeSmrg[AC_LANG_PUSH(Fortran 77)
82554cd6a3aeSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
82564cd6a3aeSmrg  _lt_disable_F77=yes
82574cd6a3aeSmrgfi
82584cd6a3aeSmrg
82594cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
82604cd6a3aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
82614cd6a3aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no
82624cd6a3aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
82634cd6a3aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
82644cd6a3aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no
82654cd6a3aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
82664cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
82674cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
82684cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
82694cd6a3aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
82704cd6a3aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
82714cd6a3aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no
82724cd6a3aeSmrg_LT_TAGVAR(module_cmds, $1)=
82734cd6a3aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
82744cd6a3aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
82754cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
82764cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
82774cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
82784cd6a3aeSmrg_LT_TAGVAR(no_undefined_flag, $1)=
82794cd6a3aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
82804cd6a3aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
82814cd6a3aeSmrg
82824cd6a3aeSmrg# Source file extension for f77 test sources.
82834cd6a3aeSmrgac_ext=f
82844cd6a3aeSmrg
82854cd6a3aeSmrg# Object file extension for compiled f77 test sources.
82864cd6a3aeSmrgobjext=o
82874cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext
82884cd6a3aeSmrg
82894cd6a3aeSmrg# No sense in running all these tests if we already determined that
82904cd6a3aeSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
82914cd6a3aeSmrg# are currently assumed to apply to all compilers on this platform,
82924cd6a3aeSmrg# and will be corrupted by setting them based on a non-working compiler.
82934cd6a3aeSmrgif test "$_lt_disable_F77" != yes; then
82944cd6a3aeSmrg  # Code to be used in simple compile tests
82954cd6a3aeSmrg  lt_simple_compile_test_code="\
82964cd6a3aeSmrg      subroutine t
82974cd6a3aeSmrg      return
82984cd6a3aeSmrg      end
82994cd6a3aeSmrg"
83004cd6a3aeSmrg
83014cd6a3aeSmrg  # Code to be used in simple link tests
83024cd6a3aeSmrg  lt_simple_link_test_code="\
83034cd6a3aeSmrg      program t
83044cd6a3aeSmrg      end
83054cd6a3aeSmrg"
83064cd6a3aeSmrg
83074cd6a3aeSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
83084cd6a3aeSmrg  _LT_TAG_COMPILER
83094cd6a3aeSmrg
83104cd6a3aeSmrg  # save warnings/boilerplate of simple test code
83114cd6a3aeSmrg  _LT_COMPILER_BOILERPLATE
83124cd6a3aeSmrg  _LT_LINKER_BOILERPLATE
83134cd6a3aeSmrg
83144cd6a3aeSmrg  # Allow CC to be a program name with arguments.
83154cd6a3aeSmrg  lt_save_CC="$CC"
83164cd6a3aeSmrg  lt_save_GCC=$GCC
83174cd6a3aeSmrg  lt_save_CFLAGS=$CFLAGS
83184cd6a3aeSmrg  CC=${F77-"f77"}
83194cd6a3aeSmrg  CFLAGS=$FFLAGS
83204cd6a3aeSmrg  compiler=$CC
83214cd6a3aeSmrg  _LT_TAGVAR(compiler, $1)=$CC
83224cd6a3aeSmrg  _LT_CC_BASENAME([$compiler])
83234cd6a3aeSmrg  GCC=$G77
83244cd6a3aeSmrg  if test -n "$compiler"; then
83254cd6a3aeSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
83264cd6a3aeSmrg    AC_MSG_RESULT([$can_build_shared])
83274cd6a3aeSmrg
83284cd6a3aeSmrg    AC_MSG_CHECKING([whether to build shared libraries])
83294cd6a3aeSmrg    test "$can_build_shared" = "no" && enable_shared=no
83304cd6a3aeSmrg
83314cd6a3aeSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
83324cd6a3aeSmrg    # are all built from PIC.
83338c9fbc29Smrg    case $host_os in
83344cd6a3aeSmrg      aix3*)
83354cd6a3aeSmrg        test "$enable_shared" = yes && enable_static=no
83364cd6a3aeSmrg        if test -n "$RANLIB"; then
83374cd6a3aeSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
83384cd6a3aeSmrg          postinstall_cmds='$RANLIB $lib'
83394cd6a3aeSmrg        fi
83404cd6a3aeSmrg        ;;
83414e411241Smrg      aix[[4-9]]*)
83424cd6a3aeSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
83434cd6a3aeSmrg	  test "$enable_shared" = yes && enable_static=no
83448c9fbc29Smrg	fi
83454cd6a3aeSmrg        ;;
83468c9fbc29Smrg    esac
83474cd6a3aeSmrg    AC_MSG_RESULT([$enable_shared])
83484cd6a3aeSmrg
83494cd6a3aeSmrg    AC_MSG_CHECKING([whether to build static libraries])
83504cd6a3aeSmrg    # Make sure either enable_shared or enable_static is yes.
83514cd6a3aeSmrg    test "$enable_shared" = yes || enable_static=yes
83524cd6a3aeSmrg    AC_MSG_RESULT([$enable_static])
83534cd6a3aeSmrg
83544cd6a3aeSmrg    _LT_TAGVAR(GCC, $1)="$G77"
83554cd6a3aeSmrg    _LT_TAGVAR(LD, $1)="$LD"
83564cd6a3aeSmrg
83574cd6a3aeSmrg    ## CAVEAT EMPTOR:
83584cd6a3aeSmrg    ## There is no encapsulation within the following macros, do not change
83594cd6a3aeSmrg    ## the running order or otherwise move them around unless you know exactly
83604cd6a3aeSmrg    ## what you are doing...
83614cd6a3aeSmrg    _LT_COMPILER_PIC($1)
83624cd6a3aeSmrg    _LT_COMPILER_C_O($1)
83634cd6a3aeSmrg    _LT_COMPILER_FILE_LOCKS($1)
83644cd6a3aeSmrg    _LT_LINKER_SHLIBS($1)
83654cd6a3aeSmrg    _LT_SYS_DYNAMIC_LINKER($1)
83664cd6a3aeSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
83674cd6a3aeSmrg
83684cd6a3aeSmrg    _LT_CONFIG($1)
83694cd6a3aeSmrg  fi # test -n "$compiler"
83704cd6a3aeSmrg
83714cd6a3aeSmrg  GCC=$lt_save_GCC
83724cd6a3aeSmrg  CC="$lt_save_CC"
83734cd6a3aeSmrg  CFLAGS="$lt_save_CFLAGS"
83744cd6a3aeSmrgfi # test "$_lt_disable_F77" != yes
83754cd6a3aeSmrg
83764cd6a3aeSmrgAC_LANG_POP
83774cd6a3aeSmrg])# _LT_LANG_F77_CONFIG
83784cd6a3aeSmrg
83794cd6a3aeSmrg
83804cd6a3aeSmrg# _LT_LANG_FC_CONFIG([TAG])
83814cd6a3aeSmrg# -------------------------
83824cd6a3aeSmrg# Ensure that the configuration variables for a Fortran compiler are
83834cd6a3aeSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
83844cd6a3aeSmrg# to write the compiler configuration to `libtool'.
83854cd6a3aeSmrgm4_defun([_LT_LANG_FC_CONFIG],
83864cd6a3aeSmrg[AC_LANG_PUSH(Fortran)
83874cd6a3aeSmrg
83884cd6a3aeSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
83894cd6a3aeSmrg  _lt_disable_FC=yes
83904cd6a3aeSmrgfi
83914cd6a3aeSmrg
83924cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
83934cd6a3aeSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
83944cd6a3aeSmrg_LT_TAGVAR(always_export_symbols, $1)=no
83954cd6a3aeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
83964cd6a3aeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
83974cd6a3aeSmrg_LT_TAGVAR(hardcode_direct, $1)=no
83984cd6a3aeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
83994cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
84004cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
84014cd6a3aeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
84024cd6a3aeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
84034cd6a3aeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
84044cd6a3aeSmrg_LT_TAGVAR(inherit_rpath, $1)=no
84054cd6a3aeSmrg_LT_TAGVAR(module_cmds, $1)=
84064cd6a3aeSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
84074cd6a3aeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
84084cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
84094cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
84104cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
84114cd6a3aeSmrg_LT_TAGVAR(no_undefined_flag, $1)=
84124cd6a3aeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
84134cd6a3aeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
84144cd6a3aeSmrg
84154cd6a3aeSmrg# Source file extension for fc test sources.
84164cd6a3aeSmrgac_ext=${ac_fc_srcext-f}
84174cd6a3aeSmrg
84184cd6a3aeSmrg# Object file extension for compiled fc test sources.
84194cd6a3aeSmrgobjext=o
84204cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext
84214cd6a3aeSmrg
84224cd6a3aeSmrg# No sense in running all these tests if we already determined that
84234cd6a3aeSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
84244cd6a3aeSmrg# are currently assumed to apply to all compilers on this platform,
84254cd6a3aeSmrg# and will be corrupted by setting them based on a non-working compiler.
84264cd6a3aeSmrgif test "$_lt_disable_FC" != yes; then
84274cd6a3aeSmrg  # Code to be used in simple compile tests
84284cd6a3aeSmrg  lt_simple_compile_test_code="\
84294cd6a3aeSmrg      subroutine t
84304cd6a3aeSmrg      return
84314cd6a3aeSmrg      end
84324cd6a3aeSmrg"
84334cd6a3aeSmrg
84344cd6a3aeSmrg  # Code to be used in simple link tests
84354cd6a3aeSmrg  lt_simple_link_test_code="\
84364cd6a3aeSmrg      program t
84374cd6a3aeSmrg      end
84384cd6a3aeSmrg"
84394cd6a3aeSmrg
84404cd6a3aeSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
84414cd6a3aeSmrg  _LT_TAG_COMPILER
84424cd6a3aeSmrg
84434cd6a3aeSmrg  # save warnings/boilerplate of simple test code
84444cd6a3aeSmrg  _LT_COMPILER_BOILERPLATE
84454cd6a3aeSmrg  _LT_LINKER_BOILERPLATE
84464cd6a3aeSmrg
84474cd6a3aeSmrg  # Allow CC to be a program name with arguments.
84484cd6a3aeSmrg  lt_save_CC="$CC"
84494cd6a3aeSmrg  lt_save_GCC=$GCC
84504cd6a3aeSmrg  lt_save_CFLAGS=$CFLAGS
84514cd6a3aeSmrg  CC=${FC-"f95"}
84524cd6a3aeSmrg  CFLAGS=$FCFLAGS
84534cd6a3aeSmrg  compiler=$CC
84544cd6a3aeSmrg  GCC=$ac_cv_fc_compiler_gnu
84554cd6a3aeSmrg
84564cd6a3aeSmrg  _LT_TAGVAR(compiler, $1)=$CC
84574cd6a3aeSmrg  _LT_CC_BASENAME([$compiler])
84584cd6a3aeSmrg
84594cd6a3aeSmrg  if test -n "$compiler"; then
84604cd6a3aeSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
84614cd6a3aeSmrg    AC_MSG_RESULT([$can_build_shared])
84624cd6a3aeSmrg
84634cd6a3aeSmrg    AC_MSG_CHECKING([whether to build shared libraries])
84644cd6a3aeSmrg    test "$can_build_shared" = "no" && enable_shared=no
84654cd6a3aeSmrg
84664cd6a3aeSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
84674cd6a3aeSmrg    # are all built from PIC.
84684cd6a3aeSmrg    case $host_os in
84694cd6a3aeSmrg      aix3*)
84704cd6a3aeSmrg        test "$enable_shared" = yes && enable_static=no
84714cd6a3aeSmrg        if test -n "$RANLIB"; then
84724cd6a3aeSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
84734cd6a3aeSmrg          postinstall_cmds='$RANLIB $lib'
84744cd6a3aeSmrg        fi
84754cd6a3aeSmrg        ;;
84764cd6a3aeSmrg      aix[[4-9]]*)
84774cd6a3aeSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
84784cd6a3aeSmrg	  test "$enable_shared" = yes && enable_static=no
84794cd6a3aeSmrg	fi
84804cd6a3aeSmrg        ;;
84814cd6a3aeSmrg    esac
84824cd6a3aeSmrg    AC_MSG_RESULT([$enable_shared])
84834cd6a3aeSmrg
84844cd6a3aeSmrg    AC_MSG_CHECKING([whether to build static libraries])
84854cd6a3aeSmrg    # Make sure either enable_shared or enable_static is yes.
84864cd6a3aeSmrg    test "$enable_shared" = yes || enable_static=yes
84874cd6a3aeSmrg    AC_MSG_RESULT([$enable_static])
84884cd6a3aeSmrg
84894cd6a3aeSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
84904cd6a3aeSmrg    _LT_TAGVAR(LD, $1)="$LD"
84914cd6a3aeSmrg
84924cd6a3aeSmrg    ## CAVEAT EMPTOR:
84934cd6a3aeSmrg    ## There is no encapsulation within the following macros, do not change
84944cd6a3aeSmrg    ## the running order or otherwise move them around unless you know exactly
84954cd6a3aeSmrg    ## what you are doing...
84964cd6a3aeSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
84974cd6a3aeSmrg    _LT_COMPILER_PIC($1)
84984cd6a3aeSmrg    _LT_COMPILER_C_O($1)
84994cd6a3aeSmrg    _LT_COMPILER_FILE_LOCKS($1)
85004cd6a3aeSmrg    _LT_LINKER_SHLIBS($1)
85014cd6a3aeSmrg    _LT_SYS_DYNAMIC_LINKER($1)
85024cd6a3aeSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
85034cd6a3aeSmrg
85044cd6a3aeSmrg    _LT_CONFIG($1)
85054cd6a3aeSmrg  fi # test -n "$compiler"
85064cd6a3aeSmrg
85074cd6a3aeSmrg  GCC=$lt_save_GCC
85084cd6a3aeSmrg  CC=$lt_save_CC
85094cd6a3aeSmrg  CFLAGS=$lt_save_CFLAGS
85104cd6a3aeSmrgfi # test "$_lt_disable_FC" != yes
85114cd6a3aeSmrg
85124cd6a3aeSmrgAC_LANG_POP
85134cd6a3aeSmrg])# _LT_LANG_FC_CONFIG
85144cd6a3aeSmrg
85154cd6a3aeSmrg
85164cd6a3aeSmrg# _LT_LANG_GCJ_CONFIG([TAG])
85174cd6a3aeSmrg# --------------------------
85184cd6a3aeSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
85194cd6a3aeSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
85204cd6a3aeSmrg# to write the compiler configuration to `libtool'.
85214cd6a3aeSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
85224cd6a3aeSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
85234cd6a3aeSmrgAC_LANG_SAVE
85244cd6a3aeSmrg
85254cd6a3aeSmrg# Source file extension for Java test sources.
85264cd6a3aeSmrgac_ext=java
85274cd6a3aeSmrg
85284cd6a3aeSmrg# Object file extension for compiled Java test sources.
85294cd6a3aeSmrgobjext=o
85304cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext
85314cd6a3aeSmrg
85324cd6a3aeSmrg# Code to be used in simple compile tests
85334cd6a3aeSmrglt_simple_compile_test_code="class foo {}"
85344cd6a3aeSmrg
85354cd6a3aeSmrg# Code to be used in simple link tests
85364cd6a3aeSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
85374cd6a3aeSmrg
85384cd6a3aeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
85394cd6a3aeSmrg_LT_TAG_COMPILER
85404cd6a3aeSmrg
85414cd6a3aeSmrg# save warnings/boilerplate of simple test code
85424cd6a3aeSmrg_LT_COMPILER_BOILERPLATE
85434cd6a3aeSmrg_LT_LINKER_BOILERPLATE
85444cd6a3aeSmrg
85454cd6a3aeSmrg# Allow CC to be a program name with arguments.
85464cd6a3aeSmrglt_save_CC=$CC
85474cd6a3aeSmrglt_save_CFLAGS=$CFLAGS
85484cd6a3aeSmrglt_save_GCC=$GCC
85494cd6a3aeSmrgGCC=yes
85504cd6a3aeSmrgCC=${GCJ-"gcj"}
85514cd6a3aeSmrgCFLAGS=$GCJFLAGS
85524cd6a3aeSmrgcompiler=$CC
85534cd6a3aeSmrg_LT_TAGVAR(compiler, $1)=$CC
85544cd6a3aeSmrg_LT_TAGVAR(LD, $1)="$LD"
85554cd6a3aeSmrg_LT_CC_BASENAME([$compiler])
85564cd6a3aeSmrg
85574cd6a3aeSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
85584cd6a3aeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
85594cd6a3aeSmrg
85604cd6a3aeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
85614cd6a3aeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
85624cd6a3aeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
85634cd6a3aeSmrg
85644cd6a3aeSmrgif test -n "$compiler"; then
85654cd6a3aeSmrg  _LT_COMPILER_NO_RTTI($1)
85664cd6a3aeSmrg  _LT_COMPILER_PIC($1)
85674cd6a3aeSmrg  _LT_COMPILER_C_O($1)
85684cd6a3aeSmrg  _LT_COMPILER_FILE_LOCKS($1)
85694cd6a3aeSmrg  _LT_LINKER_SHLIBS($1)
85704cd6a3aeSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
85714cd6a3aeSmrg
85724cd6a3aeSmrg  _LT_CONFIG($1)
85734cd6a3aeSmrgfi
85744cd6a3aeSmrg
85754cd6a3aeSmrgAC_LANG_RESTORE
85764cd6a3aeSmrg
85774cd6a3aeSmrgGCC=$lt_save_GCC
85784cd6a3aeSmrgCC=$lt_save_CC
85794cd6a3aeSmrgCFLAGS=$lt_save_CFLAGS
85804cd6a3aeSmrg])# _LT_LANG_GCJ_CONFIG
85814cd6a3aeSmrg
85824cd6a3aeSmrg
85834cd6a3aeSmrg# _LT_LANG_RC_CONFIG([TAG])
85844cd6a3aeSmrg# -------------------------
85854cd6a3aeSmrg# Ensure that the configuration variables for the Windows resource compiler
85864cd6a3aeSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
85874cd6a3aeSmrg# to write the compiler configuration to `libtool'.
85884cd6a3aeSmrgm4_defun([_LT_LANG_RC_CONFIG],
85894cd6a3aeSmrg[AC_REQUIRE([LT_PROG_RC])dnl
85904cd6a3aeSmrgAC_LANG_SAVE
85914cd6a3aeSmrg
85924cd6a3aeSmrg# Source file extension for RC test sources.
85934cd6a3aeSmrgac_ext=rc
85944cd6a3aeSmrg
85954cd6a3aeSmrg# Object file extension for compiled RC test sources.
85964cd6a3aeSmrgobjext=o
85974cd6a3aeSmrg_LT_TAGVAR(objext, $1)=$objext
85984cd6a3aeSmrg
85994cd6a3aeSmrg# Code to be used in simple compile tests
86004cd6a3aeSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
86014cd6a3aeSmrg
86024cd6a3aeSmrg# Code to be used in simple link tests
86034cd6a3aeSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
86044cd6a3aeSmrg
86054cd6a3aeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
86064cd6a3aeSmrg_LT_TAG_COMPILER
86074cd6a3aeSmrg
86084cd6a3aeSmrg# save warnings/boilerplate of simple test code
86094cd6a3aeSmrg_LT_COMPILER_BOILERPLATE
86104cd6a3aeSmrg_LT_LINKER_BOILERPLATE
86114cd6a3aeSmrg
86124cd6a3aeSmrg# Allow CC to be a program name with arguments.
86134cd6a3aeSmrglt_save_CC="$CC"
86144cd6a3aeSmrglt_save_CFLAGS=$CFLAGS
86154cd6a3aeSmrglt_save_GCC=$GCC
86164cd6a3aeSmrgGCC=
86174cd6a3aeSmrgCC=${RC-"windres"}
86184cd6a3aeSmrgCFLAGS=
86194cd6a3aeSmrgcompiler=$CC
86204cd6a3aeSmrg_LT_TAGVAR(compiler, $1)=$CC
86214cd6a3aeSmrg_LT_CC_BASENAME([$compiler])
86224cd6a3aeSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
86234cd6a3aeSmrg
86244cd6a3aeSmrgif test -n "$compiler"; then
86254cd6a3aeSmrg  :
86264cd6a3aeSmrg  _LT_CONFIG($1)
86274cd6a3aeSmrgfi
86284cd6a3aeSmrg
86294cd6a3aeSmrgGCC=$lt_save_GCC
86304cd6a3aeSmrgAC_LANG_RESTORE
86314cd6a3aeSmrgCC=$lt_save_CC
86324cd6a3aeSmrgCFLAGS=$lt_save_CFLAGS
86334cd6a3aeSmrg])# _LT_LANG_RC_CONFIG
86344cd6a3aeSmrg
86354cd6a3aeSmrg
86364cd6a3aeSmrg# LT_PROG_GCJ
86374cd6a3aeSmrg# -----------
86384cd6a3aeSmrgAC_DEFUN([LT_PROG_GCJ],
86394cd6a3aeSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
86404cd6a3aeSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
86414cd6a3aeSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
86424cd6a3aeSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
86434cd6a3aeSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
86444cd6a3aeSmrg])
86454cd6a3aeSmrg
86464cd6a3aeSmrg# Old name:
86474cd6a3aeSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
86484cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
86494cd6a3aeSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
86504cd6a3aeSmrg
86514cd6a3aeSmrg
86524cd6a3aeSmrg# LT_PROG_RC
86534cd6a3aeSmrg# ----------
86544cd6a3aeSmrgAC_DEFUN([LT_PROG_RC],
86554cd6a3aeSmrg[AC_CHECK_TOOL(RC, windres,)
86564cd6a3aeSmrg])
86574cd6a3aeSmrg
86584cd6a3aeSmrg# Old name:
86594cd6a3aeSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
86604cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
86614cd6a3aeSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
86624cd6a3aeSmrg
86634cd6a3aeSmrg
86644cd6a3aeSmrg# _LT_DECL_EGREP
86654cd6a3aeSmrg# --------------
86664cd6a3aeSmrg# If we don't have a new enough Autoconf to choose the best grep
86674cd6a3aeSmrg# available, choose the one first in the user's PATH.
86684cd6a3aeSmrgm4_defun([_LT_DECL_EGREP],
86694cd6a3aeSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
86704cd6a3aeSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
86714cd6a3aeSmrgtest -z "$GREP" && GREP=grep
86724cd6a3aeSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
86734cd6a3aeSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
86744cd6a3aeSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
86754cd6a3aeSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
86764cd6a3aeSmrgAC_SUBST([GREP])
86774cd6a3aeSmrg])
86784cd6a3aeSmrg
86794cd6a3aeSmrg
86804cd6a3aeSmrg# _LT_DECL_OBJDUMP
86814cd6a3aeSmrg# --------------
86824cd6a3aeSmrg# If we don't have a new enough Autoconf to choose the best objdump
86834cd6a3aeSmrg# available, choose the one first in the user's PATH.
86844cd6a3aeSmrgm4_defun([_LT_DECL_OBJDUMP],
86854cd6a3aeSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
86864cd6a3aeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
86874cd6a3aeSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
86884cd6a3aeSmrgAC_SUBST([OBJDUMP])
86894cd6a3aeSmrg])
86904cd6a3aeSmrg
86914cd6a3aeSmrg# _LT_DECL_DLLTOOL
86924cd6a3aeSmrg# ----------------
86934cd6a3aeSmrg# Ensure DLLTOOL variable is set.
86944cd6a3aeSmrgm4_defun([_LT_DECL_DLLTOOL],
86954cd6a3aeSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
86964cd6a3aeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
86974cd6a3aeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
86984cd6a3aeSmrgAC_SUBST([DLLTOOL])
86994cd6a3aeSmrg])
87004cd6a3aeSmrg
87014cd6a3aeSmrg# _LT_DECL_SED
87024cd6a3aeSmrg# ------------
87034cd6a3aeSmrg# Check for a fully-functional sed program, that truncates
87044cd6a3aeSmrg# as few characters as possible.  Prefer GNU sed if found.
87054cd6a3aeSmrgm4_defun([_LT_DECL_SED],
87064cd6a3aeSmrg[AC_PROG_SED
87074cd6a3aeSmrgtest -z "$SED" && SED=sed
87084cd6a3aeSmrgXsed="$SED -e 1s/^X//"
87094cd6a3aeSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
87104cd6a3aeSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
87114cd6a3aeSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
87124cd6a3aeSmrg])# _LT_DECL_SED
87134cd6a3aeSmrg
87144cd6a3aeSmrgm4_ifndef([AC_PROG_SED], [
87154cd6a3aeSmrg# NOTE: This macro has been submitted for inclusion into   #
87164cd6a3aeSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
87174cd6a3aeSmrg#  a released version of Autoconf we should remove this    #
87184cd6a3aeSmrg#  macro and use it instead.                               #
87194cd6a3aeSmrg
87204cd6a3aeSmrgm4_defun([AC_PROG_SED],
87214cd6a3aeSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
87224cd6a3aeSmrgAC_CACHE_VAL(lt_cv_path_SED,
87234cd6a3aeSmrg[# Loop through the user's path and test for sed and gsed.
87244cd6a3aeSmrg# Then use that list of sed's as ones to test for truncation.
87254cd6a3aeSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
87264cd6a3aeSmrgfor as_dir in $PATH
87274cd6a3aeSmrgdo
87284cd6a3aeSmrg  IFS=$as_save_IFS
87294cd6a3aeSmrg  test -z "$as_dir" && as_dir=.
87304cd6a3aeSmrg  for lt_ac_prog in sed gsed; do
87314cd6a3aeSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
87324cd6a3aeSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
87334cd6a3aeSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
87344cd6a3aeSmrg      fi
87354cd6a3aeSmrg    done
87364cd6a3aeSmrg  done
87374cd6a3aeSmrgdone
87384cd6a3aeSmrgIFS=$as_save_IFS
87394cd6a3aeSmrglt_ac_max=0
87404cd6a3aeSmrglt_ac_count=0
87414cd6a3aeSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
87424cd6a3aeSmrg# along with /bin/sed that truncates output.
87434cd6a3aeSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
87444cd6a3aeSmrg  test ! -f $lt_ac_sed && continue
87454cd6a3aeSmrg  cat /dev/null > conftest.in
87464cd6a3aeSmrg  lt_ac_count=0
87474cd6a3aeSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
87484cd6a3aeSmrg  # Check for GNU sed and select it if it is found.
87494cd6a3aeSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
87504cd6a3aeSmrg    lt_cv_path_SED=$lt_ac_sed
87514cd6a3aeSmrg    break
87528c9fbc29Smrg  fi
87534cd6a3aeSmrg  while true; do
87544cd6a3aeSmrg    cat conftest.in conftest.in >conftest.tmp
87554cd6a3aeSmrg    mv conftest.tmp conftest.in
87564cd6a3aeSmrg    cp conftest.in conftest.nl
87574cd6a3aeSmrg    echo >>conftest.nl
87584cd6a3aeSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
87594cd6a3aeSmrg    cmp -s conftest.out conftest.nl || break
87604cd6a3aeSmrg    # 10000 chars as input seems more than enough
87614cd6a3aeSmrg    test $lt_ac_count -gt 10 && break
87624cd6a3aeSmrg    lt_ac_count=`expr $lt_ac_count + 1`
87634cd6a3aeSmrg    if test $lt_ac_count -gt $lt_ac_max; then
87644cd6a3aeSmrg      lt_ac_max=$lt_ac_count
87654cd6a3aeSmrg      lt_cv_path_SED=$lt_ac_sed
87664cd6a3aeSmrg    fi
87674cd6a3aeSmrg  done
87684cd6a3aeSmrgdone
87694cd6a3aeSmrg])
87704cd6a3aeSmrgSED=$lt_cv_path_SED
87714cd6a3aeSmrgAC_SUBST([SED])
87724cd6a3aeSmrgAC_MSG_RESULT([$SED])
87734cd6a3aeSmrg])#AC_PROG_SED
87744cd6a3aeSmrg])#m4_ifndef
87754cd6a3aeSmrg
87764cd6a3aeSmrg# Old name:
87774cd6a3aeSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
87784cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
87794cd6a3aeSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
87804cd6a3aeSmrg
87814cd6a3aeSmrg
87824cd6a3aeSmrg# _LT_CHECK_SHELL_FEATURES
87834cd6a3aeSmrg# ------------------------
87844cd6a3aeSmrg# Find out whether the shell is Bourne or XSI compatible,
87854cd6a3aeSmrg# or has some other useful features.
87864cd6a3aeSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
87874cd6a3aeSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
87884cd6a3aeSmrg# Try some XSI features
87894cd6a3aeSmrgxsi_shell=no
87904cd6a3aeSmrg( _lt_dummy="a/b/c"
87914cd6a3aeSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
87924cd6a3aeSmrg      = c,a/b,b/c, \
87934cd6a3aeSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
87944cd6a3aeSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
87954cd6a3aeSmrg  && xsi_shell=yes
87964cd6a3aeSmrgAC_MSG_RESULT([$xsi_shell])
87974cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
87984cd6a3aeSmrg
87994cd6a3aeSmrgAC_MSG_CHECKING([whether the shell understands "+="])
88004cd6a3aeSmrglt_shell_append=no
88014cd6a3aeSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
88024cd6a3aeSmrg    >/dev/null 2>&1 \
88034cd6a3aeSmrg  && lt_shell_append=yes
88044cd6a3aeSmrgAC_MSG_RESULT([$lt_shell_append])
88054cd6a3aeSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
88064cd6a3aeSmrg
88074cd6a3aeSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
88084cd6a3aeSmrg  lt_unset=unset
88094cd6a3aeSmrgelse
88104cd6a3aeSmrg  lt_unset=false
88114cd6a3aeSmrgfi
88124cd6a3aeSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
88134cd6a3aeSmrg
88144cd6a3aeSmrg# test EBCDIC or ASCII
88154cd6a3aeSmrgcase `echo X|tr X '\101'` in
88164cd6a3aeSmrg A) # ASCII based system
88174cd6a3aeSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
88184cd6a3aeSmrg  lt_SP2NL='tr \040 \012'
88194cd6a3aeSmrg  lt_NL2SP='tr \015\012 \040\040'
88204cd6a3aeSmrg  ;;
88214cd6a3aeSmrg *) # EBCDIC based system
88224cd6a3aeSmrg  lt_SP2NL='tr \100 \n'
88234cd6a3aeSmrg  lt_NL2SP='tr \r\n \100\100'
88244cd6a3aeSmrg  ;;
88254cd6a3aeSmrgesac
88264cd6a3aeSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
88274cd6a3aeSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
88284cd6a3aeSmrg])# _LT_CHECK_SHELL_FEATURES
88294cd6a3aeSmrg
88304cd6a3aeSmrg
88314cd6a3aeSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
88324cd6a3aeSmrg# ------------------------------------------------------
88334cd6a3aeSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
88344cd6a3aeSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
88354cd6a3aeSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
88364cd6a3aeSmrg[dnl {
88374cd6a3aeSmrgsed -e '/^$1 ()$/,/^} # $1 /c\
88384cd6a3aeSmrg$1 ()\
88394cd6a3aeSmrg{\
88404cd6a3aeSmrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
88414cd6a3aeSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
88424cd6a3aeSmrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
88434cd6a3aeSmrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
88444cd6a3aeSmrgtest 0 -eq $? || _lt_function_replace_fail=:
88454cd6a3aeSmrg])
88464cd6a3aeSmrg
88474cd6a3aeSmrg
88484cd6a3aeSmrg# _LT_PROG_REPLACE_SHELLFNS
88494cd6a3aeSmrg# -------------------------
88504cd6a3aeSmrg# Replace existing portable implementations of several shell functions with
88514cd6a3aeSmrg# equivalent extended shell implementations where those features are available..
88524cd6a3aeSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
88534cd6a3aeSmrg[if test x"$xsi_shell" = xyes; then
88544cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
88554cd6a3aeSmrg    case ${1} in
88564cd6a3aeSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
88574cd6a3aeSmrg      *  ) func_dirname_result="${3}" ;;
88584cd6a3aeSmrg    esac])
88594cd6a3aeSmrg
88604cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
88614cd6a3aeSmrg    func_basename_result="${1##*/}"])
88624cd6a3aeSmrg
88634cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
88644cd6a3aeSmrg    case ${1} in
88654cd6a3aeSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
88664cd6a3aeSmrg      *  ) func_dirname_result="${3}" ;;
88674cd6a3aeSmrg    esac
88684cd6a3aeSmrg    func_basename_result="${1##*/}"])
88694cd6a3aeSmrg
88704cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
88714cd6a3aeSmrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
88724cd6a3aeSmrg    # positional parameters, so assign one to ordinary parameter first.
88734cd6a3aeSmrg    func_stripname_result=${3}
88744cd6a3aeSmrg    func_stripname_result=${func_stripname_result#"${1}"}
88754cd6a3aeSmrg    func_stripname_result=${func_stripname_result%"${2}"}])
88764cd6a3aeSmrg
88774cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
88784cd6a3aeSmrg    func_split_long_opt_name=${1%%=*}
88794cd6a3aeSmrg    func_split_long_opt_arg=${1#*=}])
88804cd6a3aeSmrg
88814cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
88824cd6a3aeSmrg    func_split_short_opt_arg=${1#??}
88834cd6a3aeSmrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
88844cd6a3aeSmrg
88854cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
88864cd6a3aeSmrg    case ${1} in
88874cd6a3aeSmrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
88884cd6a3aeSmrg      *)    func_lo2o_result=${1} ;;
88894cd6a3aeSmrg    esac])
88904cd6a3aeSmrg
88914cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
88924cd6a3aeSmrg
88934cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
88944cd6a3aeSmrg
88954cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
88964cd6a3aeSmrgfi
88974cd6a3aeSmrg
88984cd6a3aeSmrgif test x"$lt_shell_append" = xyes; then
88994cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
89004cd6a3aeSmrg
89014cd6a3aeSmrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
89024cd6a3aeSmrg    func_quote_for_eval "${2}"
89034cd6a3aeSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
89044cd6a3aeSmrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
89054cd6a3aeSmrg
89064cd6a3aeSmrg  # Save a `func_append' function call where possible by direct use of '+='
89074cd6a3aeSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
89084cd6a3aeSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
89094cd6a3aeSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
89104cd6a3aeSmrg  test 0 -eq $? || _lt_function_replace_fail=:
89114cd6a3aeSmrgelse
89124cd6a3aeSmrg  # Save a `func_append' function call even when '+=' is not available
89134cd6a3aeSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
89144cd6a3aeSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
89154cd6a3aeSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
89164cd6a3aeSmrg  test 0 -eq $? || _lt_function_replace_fail=:
89174cd6a3aeSmrgfi
89184cd6a3aeSmrg
89194cd6a3aeSmrgif test x"$_lt_function_replace_fail" = x":"; then
89204cd6a3aeSmrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
89214cd6a3aeSmrgfi
89224cd6a3aeSmrg])
89234cd6a3aeSmrg
89244cd6a3aeSmrg# _LT_PATH_CONVERSION_FUNCTIONS
89254cd6a3aeSmrg# -----------------------------
89264cd6a3aeSmrg# Determine which file name conversion functions should be used by
89274cd6a3aeSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
89284cd6a3aeSmrg# for certain cross-compile configurations and native mingw.
89294cd6a3aeSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
89304cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
89314cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
89324cd6a3aeSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
89334cd6a3aeSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
89344cd6a3aeSmrg[case $host in
89354cd6a3aeSmrg  *-*-mingw* )
89364cd6a3aeSmrg    case $build in
89374cd6a3aeSmrg      *-*-mingw* ) # actually msys
89384cd6a3aeSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
89394cd6a3aeSmrg        ;;
89404cd6a3aeSmrg      *-*-cygwin* )
89414cd6a3aeSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
89424cd6a3aeSmrg        ;;
89434cd6a3aeSmrg      * ) # otherwise, assume *nix
89444cd6a3aeSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
89454cd6a3aeSmrg        ;;
89464cd6a3aeSmrg    esac
89474cd6a3aeSmrg    ;;
89484cd6a3aeSmrg  *-*-cygwin* )
89494cd6a3aeSmrg    case $build in
89504cd6a3aeSmrg      *-*-mingw* ) # actually msys
89514cd6a3aeSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
89524cd6a3aeSmrg        ;;
89534cd6a3aeSmrg      *-*-cygwin* )
89544cd6a3aeSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
89554cd6a3aeSmrg        ;;
89564cd6a3aeSmrg      * ) # otherwise, assume *nix
89574cd6a3aeSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
89584cd6a3aeSmrg        ;;
89594cd6a3aeSmrg    esac
89604cd6a3aeSmrg    ;;
89614cd6a3aeSmrg  * ) # unhandled hosts (and "normal" native builds)
89624cd6a3aeSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
89634cd6a3aeSmrg    ;;
89644cd6a3aeSmrgesac
89654cd6a3aeSmrg])
89664cd6a3aeSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
89674cd6a3aeSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
89684cd6a3aeSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
89694cd6a3aeSmrg         [0], [convert $build file names to $host format])dnl
89704cd6a3aeSmrg
89714cd6a3aeSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
89724cd6a3aeSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
89734cd6a3aeSmrg[#assume ordinary cross tools, or native build.
89744cd6a3aeSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
89754cd6a3aeSmrgcase $host in
89764cd6a3aeSmrg  *-*-mingw* )
89774cd6a3aeSmrg    case $build in
89784cd6a3aeSmrg      *-*-mingw* ) # actually msys
89794cd6a3aeSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
89804cd6a3aeSmrg        ;;
89814cd6a3aeSmrg    esac
89824cd6a3aeSmrg    ;;
89834cd6a3aeSmrgesac
89844cd6a3aeSmrg])
89854cd6a3aeSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
89864cd6a3aeSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
89874cd6a3aeSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
89884cd6a3aeSmrg         [0], [convert $build files to toolchain format])dnl
89894cd6a3aeSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
89904cd6a3aeSmrg
89914cd6a3aeSmrg# Helper functions for option handling.                    -*- Autoconf -*-
89924cd6a3aeSmrg#
89934cd6a3aeSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
89944cd6a3aeSmrg#   Inc.
89954cd6a3aeSmrg#   Written by Gary V. Vaughan, 2004
89964cd6a3aeSmrg#
89974cd6a3aeSmrg# This file is free software; the Free Software Foundation gives
89984cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without
89994cd6a3aeSmrg# modifications, as long as this notice is preserved.
90004cd6a3aeSmrg
90014cd6a3aeSmrg# serial 7 ltoptions.m4
90024cd6a3aeSmrg
90034cd6a3aeSmrg# This is to help aclocal find these macros, as it can't see m4_define.
90044cd6a3aeSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
90054cd6a3aeSmrg
90068c9fbc29Smrg
90074cd6a3aeSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
90084cd6a3aeSmrg# ------------------------------------------
90094cd6a3aeSmrgm4_define([_LT_MANGLE_OPTION],
90104cd6a3aeSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
90118c9fbc29Smrg
90128c9fbc29Smrg
90134cd6a3aeSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
90144cd6a3aeSmrg# ---------------------------------------
90154cd6a3aeSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
90164cd6a3aeSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
90174cd6a3aeSmrg# saved as a flag.
90184cd6a3aeSmrgm4_define([_LT_SET_OPTION],
90194cd6a3aeSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
90204cd6a3aeSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
90214cd6a3aeSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
90224cd6a3aeSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
90234cd6a3aeSmrg])
90248c9fbc29Smrg
90258c9fbc29Smrg
90264cd6a3aeSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
90274cd6a3aeSmrg# ------------------------------------------------------------
90284cd6a3aeSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
90294cd6a3aeSmrgm4_define([_LT_IF_OPTION],
90304cd6a3aeSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
90314cd6a3aeSmrg
90324cd6a3aeSmrg
90334cd6a3aeSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
90344cd6a3aeSmrg# -------------------------------------------------------
90354cd6a3aeSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
90364cd6a3aeSmrg# are set.
90374cd6a3aeSmrgm4_define([_LT_UNLESS_OPTIONS],
90384cd6a3aeSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
90394cd6a3aeSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
90404cd6a3aeSmrg		      [m4_define([$0_found])])])[]dnl
90414cd6a3aeSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
90424cd6a3aeSmrg])[]dnl
90434cd6a3aeSmrg])
90448c9fbc29Smrg
90458c9fbc29Smrg
90464cd6a3aeSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
90474cd6a3aeSmrg# ----------------------------------------
90484cd6a3aeSmrg# OPTION-LIST is a space-separated list of Libtool options associated
90494cd6a3aeSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
90504cd6a3aeSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
90514cd6a3aeSmrg# the unknown option and exit.
90524cd6a3aeSmrgm4_defun([_LT_SET_OPTIONS],
90534cd6a3aeSmrg[# Set options
90544cd6a3aeSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
90554cd6a3aeSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
90564cd6a3aeSmrg
90574cd6a3aeSmrgm4_if([$1],[LT_INIT],[
90584cd6a3aeSmrg  dnl
90594cd6a3aeSmrg  dnl Simply set some default values (i.e off) if boolean options were not
90604cd6a3aeSmrg  dnl specified:
90614cd6a3aeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
90624cd6a3aeSmrg  ])
90634cd6a3aeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
90644cd6a3aeSmrg  ])
90654cd6a3aeSmrg  dnl
90664cd6a3aeSmrg  dnl If no reference was made to various pairs of opposing options, then
90674cd6a3aeSmrg  dnl we run the default mode handler for the pair.  For example, if neither
90684cd6a3aeSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
90694cd6a3aeSmrg  dnl archives by default:
90704cd6a3aeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
90714cd6a3aeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
90724cd6a3aeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
90734cd6a3aeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
90744cd6a3aeSmrg  		   [_LT_ENABLE_FAST_INSTALL])
90754cd6a3aeSmrg  ])
90764cd6a3aeSmrg])# _LT_SET_OPTIONS
90774cd6a3aeSmrg
90784cd6a3aeSmrg
90794cd6a3aeSmrg
90804cd6a3aeSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
90814cd6a3aeSmrg# -----------------------------------------
90824cd6a3aeSmrgm4_define([_LT_MANGLE_DEFUN],
90834cd6a3aeSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
90844cd6a3aeSmrg
90854cd6a3aeSmrg
90864cd6a3aeSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
90874cd6a3aeSmrg# -----------------------------------------------
90884cd6a3aeSmrgm4_define([LT_OPTION_DEFINE],
90894cd6a3aeSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
90904cd6a3aeSmrg])# LT_OPTION_DEFINE
90914cd6a3aeSmrg
90924cd6a3aeSmrg
90934cd6a3aeSmrg# dlopen
90944cd6a3aeSmrg# ------
90954cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
90964cd6a3aeSmrg])
90974cd6a3aeSmrg
90984cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
90994cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
91004cd6a3aeSmrgAC_DIAGNOSE([obsolete],
91014cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
91024cd6a3aeSmrgput the `dlopen' option into LT_INIT's first parameter.])
91034cd6a3aeSmrg])
91044cd6a3aeSmrg
91054cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
91064cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
91074cd6a3aeSmrg
91084cd6a3aeSmrg
91094cd6a3aeSmrg# win32-dll
91104cd6a3aeSmrg# ---------
91114cd6a3aeSmrg# Declare package support for building win32 dll's.
91124cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
91134cd6a3aeSmrg[enable_win32_dll=yes
91144cd6a3aeSmrg
91154cd6a3aeSmrgcase $host in
91164cd6a3aeSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
91174cd6a3aeSmrg  AC_CHECK_TOOL(AS, as, false)
91184cd6a3aeSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
91194cd6a3aeSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
91204cd6a3aeSmrg  ;;
91214cd6a3aeSmrgesac
91224cd6a3aeSmrg
91234cd6a3aeSmrgtest -z "$AS" && AS=as
91244cd6a3aeSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
91254cd6a3aeSmrg
91264cd6a3aeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
91274cd6a3aeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
91284cd6a3aeSmrg
91294cd6a3aeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
91304cd6a3aeSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
91314cd6a3aeSmrg])# win32-dll
91324cd6a3aeSmrg
91334cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
91344cd6a3aeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
91354cd6a3aeSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
91364cd6a3aeSmrgAC_DIAGNOSE([obsolete],
91374cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
91384cd6a3aeSmrgput the `win32-dll' option into LT_INIT's first parameter.])
91394cd6a3aeSmrg])
91404cd6a3aeSmrg
91414cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
91424cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
91434cd6a3aeSmrg
91444cd6a3aeSmrg
91454cd6a3aeSmrg# _LT_ENABLE_SHARED([DEFAULT])
91464cd6a3aeSmrg# ----------------------------
91474cd6a3aeSmrg# implement the --enable-shared flag, and supports the `shared' and
91484cd6a3aeSmrg# `disable-shared' LT_INIT options.
91494cd6a3aeSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
91504cd6a3aeSmrgm4_define([_LT_ENABLE_SHARED],
91514cd6a3aeSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
91524cd6a3aeSmrgAC_ARG_ENABLE([shared],
91534cd6a3aeSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
91544cd6a3aeSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
91554cd6a3aeSmrg    [p=${PACKAGE-default}
91564cd6a3aeSmrg    case $enableval in
91574cd6a3aeSmrg    yes) enable_shared=yes ;;
91584cd6a3aeSmrg    no) enable_shared=no ;;
91594cd6a3aeSmrg    *)
91608c9fbc29Smrg      enable_shared=no
91614cd6a3aeSmrg      # Look at the argument we got.  We use all the common list separators.
91624cd6a3aeSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
91634cd6a3aeSmrg      for pkg in $enableval; do
91644cd6a3aeSmrg	IFS="$lt_save_ifs"
91654cd6a3aeSmrg	if test "X$pkg" = "X$p"; then
91664cd6a3aeSmrg	  enable_shared=yes
91674cd6a3aeSmrg	fi
91684cd6a3aeSmrg      done
91694cd6a3aeSmrg      IFS="$lt_save_ifs"
91708c9fbc29Smrg      ;;
91714cd6a3aeSmrg    esac],
91724cd6a3aeSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
91738c9fbc29Smrg
91744cd6a3aeSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
91754cd6a3aeSmrg	[Whether or not to build shared libraries])
91764cd6a3aeSmrg])# _LT_ENABLE_SHARED
91778c9fbc29Smrg
91784cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
91794cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
91804cd6a3aeSmrg
91814cd6a3aeSmrg# Old names:
91824cd6a3aeSmrgAC_DEFUN([AC_ENABLE_SHARED],
91834cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
91844cd6a3aeSmrg])
91854cd6a3aeSmrg
91864cd6a3aeSmrgAC_DEFUN([AC_DISABLE_SHARED],
91874cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
91884cd6a3aeSmrg])
91894cd6a3aeSmrg
91904cd6a3aeSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
91914cd6a3aeSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
91924cd6a3aeSmrg
91934cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
91944cd6a3aeSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
91954cd6a3aeSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
91968c9fbc29Smrg
91974cd6a3aeSmrg
91984cd6a3aeSmrg
91994cd6a3aeSmrg# _LT_ENABLE_STATIC([DEFAULT])
92004cd6a3aeSmrg# ----------------------------
92014cd6a3aeSmrg# implement the --enable-static flag, and support the `static' and
92024cd6a3aeSmrg# `disable-static' LT_INIT options.
92034cd6a3aeSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
92044cd6a3aeSmrgm4_define([_LT_ENABLE_STATIC],
92054cd6a3aeSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
92064cd6a3aeSmrgAC_ARG_ENABLE([static],
92074cd6a3aeSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
92084cd6a3aeSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
92094cd6a3aeSmrg    [p=${PACKAGE-default}
92104cd6a3aeSmrg    case $enableval in
92114cd6a3aeSmrg    yes) enable_static=yes ;;
92124cd6a3aeSmrg    no) enable_static=no ;;
92138c9fbc29Smrg    *)
92144cd6a3aeSmrg     enable_static=no
92154cd6a3aeSmrg      # Look at the argument we got.  We use all the common list separators.
92164cd6a3aeSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
92174cd6a3aeSmrg      for pkg in $enableval; do
92184cd6a3aeSmrg	IFS="$lt_save_ifs"
92194cd6a3aeSmrg	if test "X$pkg" = "X$p"; then
92204cd6a3aeSmrg	  enable_static=yes
92214cd6a3aeSmrg	fi
92224cd6a3aeSmrg      done
92234cd6a3aeSmrg      IFS="$lt_save_ifs"
92248c9fbc29Smrg      ;;
92254cd6a3aeSmrg    esac],
92264cd6a3aeSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
92278c9fbc29Smrg
92284cd6a3aeSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
92294cd6a3aeSmrg	[Whether or not to build static libraries])
92304cd6a3aeSmrg])# _LT_ENABLE_STATIC
92318c9fbc29Smrg
92324cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
92334cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
92348c9fbc29Smrg
92354cd6a3aeSmrg# Old names:
92364cd6a3aeSmrgAC_DEFUN([AC_ENABLE_STATIC],
92374cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
92384cd6a3aeSmrg])
92398c9fbc29Smrg
92404cd6a3aeSmrgAC_DEFUN([AC_DISABLE_STATIC],
92414cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
92424cd6a3aeSmrg])
92438c9fbc29Smrg
92444cd6a3aeSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
92454cd6a3aeSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
92468c9fbc29Smrg
92474cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
92484cd6a3aeSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
92494cd6a3aeSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
92508c9fbc29Smrg
92514e411241Smrg
92528c9fbc29Smrg
92534cd6a3aeSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
92544cd6a3aeSmrg# ----------------------------------
92554cd6a3aeSmrg# implement the --enable-fast-install flag, and support the `fast-install'
92564cd6a3aeSmrg# and `disable-fast-install' LT_INIT options.
92574cd6a3aeSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
92584cd6a3aeSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
92594cd6a3aeSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
92604cd6a3aeSmrgAC_ARG_ENABLE([fast-install],
92614cd6a3aeSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
92624cd6a3aeSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
92634cd6a3aeSmrg    [p=${PACKAGE-default}
92644cd6a3aeSmrg    case $enableval in
92654cd6a3aeSmrg    yes) enable_fast_install=yes ;;
92664cd6a3aeSmrg    no) enable_fast_install=no ;;
92674cd6a3aeSmrg    *)
92684cd6a3aeSmrg      enable_fast_install=no
92694cd6a3aeSmrg      # Look at the argument we got.  We use all the common list separators.
92704cd6a3aeSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
92714cd6a3aeSmrg      for pkg in $enableval; do
92724cd6a3aeSmrg	IFS="$lt_save_ifs"
92734cd6a3aeSmrg	if test "X$pkg" = "X$p"; then
92744cd6a3aeSmrg	  enable_fast_install=yes
92754cd6a3aeSmrg	fi
92764cd6a3aeSmrg      done
92774cd6a3aeSmrg      IFS="$lt_save_ifs"
92788c9fbc29Smrg      ;;
92794cd6a3aeSmrg    esac],
92804cd6a3aeSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
92818c9fbc29Smrg
92824cd6a3aeSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
92834cd6a3aeSmrg	 [Whether or not to optimize for fast installation])dnl
92844cd6a3aeSmrg])# _LT_ENABLE_FAST_INSTALL
92854cd6a3aeSmrg
92864cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
92874cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
92884cd6a3aeSmrg
92894cd6a3aeSmrg# Old names:
92904cd6a3aeSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
92914cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
92924cd6a3aeSmrgAC_DIAGNOSE([obsolete],
92934cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
92944cd6a3aeSmrgthe `fast-install' option into LT_INIT's first parameter.])
92954cd6a3aeSmrg])
92964cd6a3aeSmrg
92974cd6a3aeSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
92984cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
92994cd6a3aeSmrgAC_DIAGNOSE([obsolete],
93004cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
93014cd6a3aeSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
93024cd6a3aeSmrg])
93034cd6a3aeSmrg
93044cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
93054cd6a3aeSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
93064cd6a3aeSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
93074cd6a3aeSmrg
93084cd6a3aeSmrg
93094cd6a3aeSmrg# _LT_WITH_PIC([MODE])
93104cd6a3aeSmrg# --------------------
93114cd6a3aeSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
93124cd6a3aeSmrg# LT_INIT options.
93134cd6a3aeSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
93144cd6a3aeSmrgm4_define([_LT_WITH_PIC],
93154cd6a3aeSmrg[AC_ARG_WITH([pic],
93164cd6a3aeSmrg    [AS_HELP_STRING([--with-pic],
93174cd6a3aeSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
93184cd6a3aeSmrg    [pic_mode="$withval"],
93194cd6a3aeSmrg    [pic_mode=default])
93204cd6a3aeSmrg
93214cd6a3aeSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
93224cd6a3aeSmrg
93234cd6a3aeSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
93244cd6a3aeSmrg])# _LT_WITH_PIC
93254cd6a3aeSmrg
93264cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
93274cd6a3aeSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
93284cd6a3aeSmrg
93294cd6a3aeSmrg# Old name:
93304cd6a3aeSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
93314cd6a3aeSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
93324cd6a3aeSmrgAC_DIAGNOSE([obsolete],
93334cd6a3aeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
93344cd6a3aeSmrgput the `pic-only' option into LT_INIT's first parameter.])
93354cd6a3aeSmrg])
93364cd6a3aeSmrg
93374cd6a3aeSmrgdnl aclocal-1.4 backwards compatibility:
93384cd6a3aeSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
93394cd6a3aeSmrg
93404cd6a3aeSmrg
93414cd6a3aeSmrgm4_define([_LTDL_MODE], [])
93424cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
93434cd6a3aeSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
93444cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
93454cd6a3aeSmrg		 [m4_define([_LTDL_MODE], [recursive])])
93464cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
93474cd6a3aeSmrg		 [m4_define([_LTDL_MODE], [subproject])])
93484cd6a3aeSmrg
93494cd6a3aeSmrgm4_define([_LTDL_TYPE], [])
93504cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
93514cd6a3aeSmrg		 [m4_define([_LTDL_TYPE], [installable])])
93524cd6a3aeSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
93534cd6a3aeSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
93544cd6a3aeSmrg
93554cd6a3aeSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
93564cd6a3aeSmrg#
93574cd6a3aeSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
93584cd6a3aeSmrg# Written by Gary V. Vaughan, 2004
93594cd6a3aeSmrg#
93604cd6a3aeSmrg# This file is free software; the Free Software Foundation gives
93614cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without
93624cd6a3aeSmrg# modifications, as long as this notice is preserved.
93634cd6a3aeSmrg
93644cd6a3aeSmrg# serial 6 ltsugar.m4
93654cd6a3aeSmrg
93664cd6a3aeSmrg# This is to help aclocal find these macros, as it can't see m4_define.
93674cd6a3aeSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
93684cd6a3aeSmrg
93694cd6a3aeSmrg
93704cd6a3aeSmrg# lt_join(SEP, ARG1, [ARG2...])
93714cd6a3aeSmrg# -----------------------------
93724cd6a3aeSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
93734cd6a3aeSmrg# associated separator.
93744cd6a3aeSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
93754cd6a3aeSmrg# versions in m4sugar had bugs.
93764cd6a3aeSmrgm4_define([lt_join],
93774cd6a3aeSmrg[m4_if([$#], [1], [],
93784cd6a3aeSmrg       [$#], [2], [[$2]],
93794cd6a3aeSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
93804cd6a3aeSmrgm4_define([_lt_join],
93814cd6a3aeSmrg[m4_if([$#$2], [2], [],
93824cd6a3aeSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
93834cd6a3aeSmrg
93844cd6a3aeSmrg
93854cd6a3aeSmrg# lt_car(LIST)
93864cd6a3aeSmrg# lt_cdr(LIST)
93874cd6a3aeSmrg# ------------
93884cd6a3aeSmrg# Manipulate m4 lists.
93894cd6a3aeSmrg# These macros are necessary as long as will still need to support
93904cd6a3aeSmrg# Autoconf-2.59 which quotes differently.
93914cd6a3aeSmrgm4_define([lt_car], [[$1]])
93924cd6a3aeSmrgm4_define([lt_cdr],
93934cd6a3aeSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
93944cd6a3aeSmrg       [$#], 1, [],
93954cd6a3aeSmrg       [m4_dquote(m4_shift($@))])])
93964cd6a3aeSmrgm4_define([lt_unquote], $1)
93974cd6a3aeSmrg
93984cd6a3aeSmrg
93994cd6a3aeSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
94004cd6a3aeSmrg# ------------------------------------------
94014cd6a3aeSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
94024cd6a3aeSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
94034cd6a3aeSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
94044cd6a3aeSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
94054cd6a3aeSmrg# than defined and empty).
94064cd6a3aeSmrg#
94074cd6a3aeSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
94084cd6a3aeSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
94094cd6a3aeSmrgm4_define([lt_append],
94104cd6a3aeSmrg[m4_define([$1],
94114cd6a3aeSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
94124cd6a3aeSmrg
94134cd6a3aeSmrg
94144cd6a3aeSmrg
94154cd6a3aeSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
94164cd6a3aeSmrg# ----------------------------------------------------------
94174cd6a3aeSmrg# Produce a SEP delimited list of all paired combinations of elements of
94184cd6a3aeSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
94194cd6a3aeSmrg# has the form PREFIXmINFIXSUFFIXn.
94204cd6a3aeSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
94214cd6a3aeSmrgm4_define([lt_combine],
94224cd6a3aeSmrg[m4_if(m4_eval([$# > 3]), [1],
94234cd6a3aeSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
94244cd6a3aeSmrg[[m4_foreach([_Lt_prefix], [$2],
94254cd6a3aeSmrg	     [m4_foreach([_Lt_suffix],
94264cd6a3aeSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
94274cd6a3aeSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
94284cd6a3aeSmrg
94294cd6a3aeSmrg
94304cd6a3aeSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
94314cd6a3aeSmrg# -----------------------------------------------------------------------
94324cd6a3aeSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
94334cd6a3aeSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
94344cd6a3aeSmrgm4_define([lt_if_append_uniq],
94354cd6a3aeSmrg[m4_ifdef([$1],
94364cd6a3aeSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
94374cd6a3aeSmrg		 [lt_append([$1], [$2], [$3])$4],
94384cd6a3aeSmrg		 [$5])],
94394cd6a3aeSmrg	  [lt_append([$1], [$2], [$3])$4])])
94404cd6a3aeSmrg
94414cd6a3aeSmrg
94424cd6a3aeSmrg# lt_dict_add(DICT, KEY, VALUE)
94434cd6a3aeSmrg# -----------------------------
94444cd6a3aeSmrgm4_define([lt_dict_add],
94454cd6a3aeSmrg[m4_define([$1($2)], [$3])])
94468c9fbc29Smrg
94478c9fbc29Smrg
94484cd6a3aeSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
94494cd6a3aeSmrg# --------------------------------------------
94504cd6a3aeSmrgm4_define([lt_dict_add_subkey],
94514cd6a3aeSmrg[m4_define([$1($2:$3)], [$4])])
94528c9fbc29Smrg
94538c9fbc29Smrg
94544cd6a3aeSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
94554cd6a3aeSmrg# ----------------------------------
94564cd6a3aeSmrgm4_define([lt_dict_fetch],
94574cd6a3aeSmrg[m4_ifval([$3],
94584cd6a3aeSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
94594cd6a3aeSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
94608c9fbc29Smrg
94614cd6a3aeSmrg
94624cd6a3aeSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
94634cd6a3aeSmrg# -----------------------------------------------------------------
94644cd6a3aeSmrgm4_define([lt_if_dict_fetch],
94654cd6a3aeSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
94664cd6a3aeSmrg	[$5],
94674cd6a3aeSmrg    [$6])])
94684cd6a3aeSmrg
94694cd6a3aeSmrg
94704cd6a3aeSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
94714cd6a3aeSmrg# --------------------------------------------------------------
94724cd6a3aeSmrgm4_define([lt_dict_filter],
94734cd6a3aeSmrg[m4_if([$5], [], [],
94744cd6a3aeSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
94754cd6a3aeSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
94764cd6a3aeSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
94778c9fbc29Smrg])
94788c9fbc29Smrg
94794cd6a3aeSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
94808c9fbc29Smrg#
94814cd6a3aeSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
94824cd6a3aeSmrg#   Written by Scott James Remnant, 2004
94838c9fbc29Smrg#
94844cd6a3aeSmrg# This file is free software; the Free Software Foundation gives
94854cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without
94864cd6a3aeSmrg# modifications, as long as this notice is preserved.
94878c9fbc29Smrg
94884cd6a3aeSmrg# @configure_input@
94898c9fbc29Smrg
94904cd6a3aeSmrg# serial 3293 ltversion.m4
94914cd6a3aeSmrg# This file is part of GNU Libtool
94928c9fbc29Smrg
94934cd6a3aeSmrgm4_define([LT_PACKAGE_VERSION], [2.4])
94944cd6a3aeSmrgm4_define([LT_PACKAGE_REVISION], [1.3293])
94958c9fbc29Smrg
94964cd6a3aeSmrgAC_DEFUN([LTVERSION_VERSION],
94974cd6a3aeSmrg[macro_version='2.4'
94984cd6a3aeSmrgmacro_revision='1.3293'
94994cd6a3aeSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
95004cd6a3aeSmrg_LT_DECL(, macro_revision, 0)
95014cd6a3aeSmrg])
95028c9fbc29Smrg
95034cd6a3aeSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
95044cd6a3aeSmrg#
95054cd6a3aeSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
95064cd6a3aeSmrg#   Written by Scott James Remnant, 2004.
95074cd6a3aeSmrg#
95084cd6a3aeSmrg# This file is free software; the Free Software Foundation gives
95094cd6a3aeSmrg# unlimited permission to copy and/or distribute it, with or without
95104cd6a3aeSmrg# modifications, as long as this notice is preserved.
95118c9fbc29Smrg
95124cd6a3aeSmrg# serial 5 lt~obsolete.m4
95138c9fbc29Smrg
95144cd6a3aeSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
95154cd6a3aeSmrg#
95164cd6a3aeSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
95174cd6a3aeSmrg# which have later been changed to m4_define as they aren't part of the
95184cd6a3aeSmrg# exported API, or moved to Autoconf or Automake where they belong.
95194cd6a3aeSmrg#
95204cd6a3aeSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
95214cd6a3aeSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
95224cd6a3aeSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
95234cd6a3aeSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
95244cd6a3aeSmrg# and doesn't know about Autoconf macros at all.)
95254cd6a3aeSmrg#
95264cd6a3aeSmrg# So we provide this file, which has a silly filename so it's always
95274cd6a3aeSmrg# included after everything else.  This provides aclocal with the
95284cd6a3aeSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
95294cd6a3aeSmrg# because those macros already exist, or will be overwritten later.
95304cd6a3aeSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
95314cd6a3aeSmrg#
95324cd6a3aeSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
95334cd6a3aeSmrg# Yes, that means every name once taken will need to remain here until
95344cd6a3aeSmrg# we give up compatibility with versions before 1.7, at which point
95354cd6a3aeSmrg# we need to keep only those names which we still refer to.
95364cd6a3aeSmrg
95374cd6a3aeSmrg# This is to help aclocal find these macros, as it can't see m4_define.
95384cd6a3aeSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
95394cd6a3aeSmrg
95404cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
95414cd6a3aeSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
95424cd6a3aeSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
95434cd6a3aeSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
95444cd6a3aeSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
95454cd6a3aeSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
95464cd6a3aeSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
95474cd6a3aeSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
95484cd6a3aeSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
95494cd6a3aeSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
95504cd6a3aeSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
95514cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
95524cd6a3aeSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
95534cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
95544cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
95554cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
95564cd6a3aeSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
95574cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
95584cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
95594cd6a3aeSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
95604cd6a3aeSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
95614cd6a3aeSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
95624cd6a3aeSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
95634cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
95644cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
95654cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
95664cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
95674cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
95684cd6a3aeSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
95694cd6a3aeSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
95704cd6a3aeSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
95714cd6a3aeSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
95724cd6a3aeSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
95734cd6a3aeSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
95744cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
95754cd6a3aeSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
95764cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
95774cd6a3aeSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
95784cd6a3aeSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
95794cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
95804cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
95814cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
95824cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
95834cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
95844cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
95854cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
95864cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
95874cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
95884cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
95894cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
95904cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
95914cd6a3aeSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
95924cd6a3aeSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
95934cd6a3aeSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
95944cd6a3aeSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
95954cd6a3aeSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
95964cd6a3aeSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
95974cd6a3aeSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
95984cd6a3aeSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
95994cd6a3aeSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
96004cd6a3aeSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
96018c9fbc29Smrg
96024cd6a3aeSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
96034cd6a3aeSmrgdnl
96044cd6a3aeSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
96054cd6a3aeSmrgdnl 
96064cd6a3aeSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
96074cd6a3aeSmrgdnl copy of this software and associated documentation files (the "Software"),
96084cd6a3aeSmrgdnl to deal in the Software without restriction, including without limitation
96094cd6a3aeSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
96104cd6a3aeSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
96114cd6a3aeSmrgdnl Software is furnished to do so, subject to the following conditions:
96124cd6a3aeSmrgdnl
96134cd6a3aeSmrgdnl The above copyright notice and this permission notice (including the next
96144cd6a3aeSmrgdnl paragraph) shall be included in all copies or substantial portions of the
96154cd6a3aeSmrgdnl Software.
96164cd6a3aeSmrgdnl
96174cd6a3aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
96184cd6a3aeSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
96194cd6a3aeSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
96204cd6a3aeSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
96214cd6a3aeSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
96224cd6a3aeSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
96234cd6a3aeSmrgdnl DEALINGS IN THE SOFTWARE.
96248c9fbc29Smrg
96254cd6a3aeSmrg# XORG_MACROS_VERSION(required-version)
96264cd6a3aeSmrg# -------------------------------------
96274cd6a3aeSmrg# Minimum version: 1.1.0
96284cd6a3aeSmrg#
96294cd6a3aeSmrg# If you're using a macro added in Version 1.1 or newer, include this in
96304cd6a3aeSmrg# your configure.ac with the minimum required version, such as:
96314cd6a3aeSmrg# XORG_MACROS_VERSION(1.1)
96324cd6a3aeSmrg#
96334cd6a3aeSmrg# To ensure that this macro is defined, also add:
96344cd6a3aeSmrg# m4_ifndef([XORG_MACROS_VERSION],
96354cd6a3aeSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
96364cd6a3aeSmrg#
96374cd6a3aeSmrg#
96384cd6a3aeSmrg# See the "minimum version" comment for each macro you use to see what 
96394cd6a3aeSmrg# version you require.
96404cd6a3aeSmrgm4_defun([XORG_MACROS_VERSION],[
96414cd6a3aeSmrgm4_define([vers_have], [1.16.2])
96424cd6a3aeSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
96434cd6a3aeSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
96444cd6a3aeSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
96454cd6a3aeSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
96464cd6a3aeSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
96474cd6a3aeSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
96484cd6a3aeSmrgm4_undefine([vers_have])
96494cd6a3aeSmrgm4_undefine([maj_have])
96504cd6a3aeSmrgm4_undefine([maj_needed])
96514cd6a3aeSmrg]) # XORG_MACROS_VERSION
96528c9fbc29Smrg
96534cd6a3aeSmrg# XORG_PROG_RAWCPP()
96544cd6a3aeSmrg# ------------------
96554cd6a3aeSmrg# Minimum version: 1.0.0
96564cd6a3aeSmrg#
96574cd6a3aeSmrg# Find cpp program and necessary flags for use in pre-processing text files
96584cd6a3aeSmrg# such as man pages and config files
96594cd6a3aeSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
96604cd6a3aeSmrgAC_REQUIRE([AC_PROG_CPP])
96614cd6a3aeSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
96624cd6a3aeSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
96638c9fbc29Smrg
96644cd6a3aeSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
96654cd6a3aeSmrg# which is not the best choice for supporting other OS'es, but covers most
96664cd6a3aeSmrg# of the ones we need for now.
96674cd6a3aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
96684cd6a3aeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
96694cd6a3aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
96704cd6a3aeSmrg	AC_MSG_RESULT([no])
96714cd6a3aeSmrgelse
96724cd6a3aeSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
96734cd6a3aeSmrg		RAWCPPFLAGS=-undef
96744cd6a3aeSmrg		AC_MSG_RESULT([yes])
96754cd6a3aeSmrg	# under Cygwin unix is still defined even with -undef
96764cd6a3aeSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
96774cd6a3aeSmrg		RAWCPPFLAGS="-undef -ansi"
96784cd6a3aeSmrg		AC_MSG_RESULT([yes, with -ansi])
96798c9fbc29Smrg	else
96804cd6a3aeSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
96818c9fbc29Smrg	fi
96824cd6a3aeSmrgfi
96834cd6a3aeSmrgrm -f conftest.$ac_ext
96848c9fbc29Smrg
96854cd6a3aeSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
96864cd6a3aeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
96874cd6a3aeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
96884cd6a3aeSmrg	AC_MSG_RESULT([no])
96894cd6a3aeSmrgelse
96904cd6a3aeSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
96914cd6a3aeSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
96924cd6a3aeSmrg		AC_MSG_RESULT([yes])
96934cd6a3aeSmrg	else
96944cd6a3aeSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
96954cd6a3aeSmrg	fi
96964cd6a3aeSmrgfi
96974cd6a3aeSmrgrm -f conftest.$ac_ext
96984cd6a3aeSmrgAC_SUBST(RAWCPPFLAGS)
96994cd6a3aeSmrg]) # XORG_PROG_RAWCPP
97008c9fbc29Smrg
97014cd6a3aeSmrg# XORG_MANPAGE_SECTIONS()
97024cd6a3aeSmrg# -----------------------
97034cd6a3aeSmrg# Minimum version: 1.0.0
97044cd6a3aeSmrg#
97054cd6a3aeSmrg# Determine which sections man pages go in for the different man page types
97064cd6a3aeSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
97074cd6a3aeSmrg# Not sure if there's any better way than just hardcoding by OS name.
97084cd6a3aeSmrg# Override default settings by setting environment variables
97094cd6a3aeSmrg# Added MAN_SUBSTS in version 1.8
97104cd6a3aeSmrg# Added AC_PROG_SED in version 1.8
97118c9fbc29Smrg
97124cd6a3aeSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
97134cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_HOST])
97144cd6a3aeSmrgAC_REQUIRE([AC_PROG_SED])
97158c9fbc29Smrg
97164cd6a3aeSmrgif test x$APP_MAN_SUFFIX = x    ; then
97174cd6a3aeSmrg    APP_MAN_SUFFIX=1
97184cd6a3aeSmrgfi
97194cd6a3aeSmrgif test x$APP_MAN_DIR = x    ; then
97204cd6a3aeSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
97214cd6a3aeSmrgfi
97228c9fbc29Smrg
97234cd6a3aeSmrgif test x$LIB_MAN_SUFFIX = x    ; then
97244cd6a3aeSmrg    LIB_MAN_SUFFIX=3
97254cd6a3aeSmrgfi
97264cd6a3aeSmrgif test x$LIB_MAN_DIR = x    ; then
97274cd6a3aeSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
97284cd6a3aeSmrgfi
97298c9fbc29Smrg
97304cd6a3aeSmrgif test x$FILE_MAN_SUFFIX = x    ; then
97314cd6a3aeSmrg    case $host_os in
97324cd6a3aeSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
97334cd6a3aeSmrg	*)		FILE_MAN_SUFFIX=5  ;;
97344cd6a3aeSmrg    esac
97354cd6a3aeSmrgfi
97364cd6a3aeSmrgif test x$FILE_MAN_DIR = x    ; then
97374cd6a3aeSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
97384cd6a3aeSmrgfi
97398c9fbc29Smrg
97404cd6a3aeSmrgif test x$MISC_MAN_SUFFIX = x    ; then
97414cd6a3aeSmrg    case $host_os in
97424cd6a3aeSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
97434cd6a3aeSmrg	*)		MISC_MAN_SUFFIX=7  ;;
97444cd6a3aeSmrg    esac
97454cd6a3aeSmrgfi
97464cd6a3aeSmrgif test x$MISC_MAN_DIR = x    ; then
97474cd6a3aeSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
97484cd6a3aeSmrgfi
97498c9fbc29Smrg
97504cd6a3aeSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
97514cd6a3aeSmrg    case $host_os in
97524cd6a3aeSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
97534cd6a3aeSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
97548c9fbc29Smrg    esac
97554cd6a3aeSmrgfi
97564cd6a3aeSmrgif test x$DRIVER_MAN_DIR = x    ; then
97574cd6a3aeSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
97584cd6a3aeSmrgfi
97598c9fbc29Smrg
97604cd6a3aeSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
97618c9fbc29Smrg    case $host_os in
97624cd6a3aeSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
97634cd6a3aeSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
97644cd6a3aeSmrg    esac
97654cd6a3aeSmrgfi
97664cd6a3aeSmrgif test x$ADMIN_MAN_DIR = x    ; then
97674cd6a3aeSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
97684cd6a3aeSmrgfi
97698c9fbc29Smrg
97708c9fbc29Smrg
97714cd6a3aeSmrgAC_SUBST([APP_MAN_SUFFIX])
97724cd6a3aeSmrgAC_SUBST([LIB_MAN_SUFFIX])
97734cd6a3aeSmrgAC_SUBST([FILE_MAN_SUFFIX])
97744cd6a3aeSmrgAC_SUBST([MISC_MAN_SUFFIX])
97754cd6a3aeSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
97764cd6a3aeSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
97774cd6a3aeSmrgAC_SUBST([APP_MAN_DIR])
97784cd6a3aeSmrgAC_SUBST([LIB_MAN_DIR])
97794cd6a3aeSmrgAC_SUBST([FILE_MAN_DIR])
97804cd6a3aeSmrgAC_SUBST([MISC_MAN_DIR])
97814cd6a3aeSmrgAC_SUBST([DRIVER_MAN_DIR])
97824cd6a3aeSmrgAC_SUBST([ADMIN_MAN_DIR])
97838c9fbc29Smrg
97844cd6a3aeSmrgXORG_MAN_PAGE="X Version 11"
97854cd6a3aeSmrgAC_SUBST([XORG_MAN_PAGE])
97864cd6a3aeSmrgMAN_SUBSTS="\
97874cd6a3aeSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
97884cd6a3aeSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
97894cd6a3aeSmrg	-e 's|__xservername__|Xorg|g' \
97904cd6a3aeSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
97914cd6a3aeSmrg	-e 's|__projectroot__|\$(prefix)|g' \
97924cd6a3aeSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
97934cd6a3aeSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
97944cd6a3aeSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
97954cd6a3aeSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
97964cd6a3aeSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
97974cd6a3aeSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
97984cd6a3aeSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
97994cd6a3aeSmrgAC_SUBST([MAN_SUBSTS])
98008c9fbc29Smrg
98014cd6a3aeSmrg]) # XORG_MANPAGE_SECTIONS
98028c9fbc29Smrg
98034cd6a3aeSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
98044cd6a3aeSmrg# ------------------------
98054cd6a3aeSmrg# Minimum version: 1.7.0
98064cd6a3aeSmrg#
98074cd6a3aeSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
98084cd6a3aeSmrg# provided by xorg-sgml-doctools, if installed.
98094cd6a3aeSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
98104cd6a3aeSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
98114cd6a3aeSmrgXORG_SGML_PATH=
98124cd6a3aeSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
98134cd6a3aeSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
98144cd6a3aeSmrg    [m4_ifval([$1],[:],
98154cd6a3aeSmrg        [if test x"$cross_compiling" != x"yes" ; then
98164cd6a3aeSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
98174cd6a3aeSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
98184cd6a3aeSmrg         fi])
98194cd6a3aeSmrg    ])
98208c9fbc29Smrg
98214cd6a3aeSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
98224cd6a3aeSmrg# the path and the name of the doc stylesheet
98234cd6a3aeSmrgif test "x$XORG_SGML_PATH" != "x" ; then
98244cd6a3aeSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
98254cd6a3aeSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
98264cd6a3aeSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
98274cd6a3aeSmrgelse
98284cd6a3aeSmrg   AC_MSG_RESULT([no])
98294cd6a3aeSmrgfi
98308c9fbc29Smrg
98314cd6a3aeSmrgAC_SUBST(XORG_SGML_PATH)
98324cd6a3aeSmrgAC_SUBST(STYLESHEET_SRCDIR)
98334cd6a3aeSmrgAC_SUBST(XSL_STYLESHEET)
98344cd6a3aeSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
98354cd6a3aeSmrg]) # XORG_CHECK_SGML_DOCTOOLS
98368c9fbc29Smrg
98374cd6a3aeSmrg# XORG_CHECK_LINUXDOC
98384cd6a3aeSmrg# -------------------
98394cd6a3aeSmrg# Minimum version: 1.0.0
98404cd6a3aeSmrg#
98414cd6a3aeSmrg# Defines the variable MAKE_TEXT if the necessary tools and
98424cd6a3aeSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
98434cd6a3aeSmrg# Whether or not the necessary tools and files are found can be checked
98444cd6a3aeSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
98454cd6a3aeSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
98464cd6a3aeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
98474cd6a3aeSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
98488c9fbc29Smrg
98494cd6a3aeSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
98508c9fbc29Smrg
98514cd6a3aeSmrgAC_MSG_CHECKING([whether to build documentation])
98528c9fbc29Smrg
98534cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
98544cd6a3aeSmrg   BUILDDOC=yes
98554cd6a3aeSmrgelse
98564cd6a3aeSmrg   BUILDDOC=no
98574cd6a3aeSmrgfi
98588c9fbc29Smrg
98594cd6a3aeSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
98608c9fbc29Smrg
98614cd6a3aeSmrgAC_MSG_RESULT([$BUILDDOC])
98628c9fbc29Smrg
98634cd6a3aeSmrgAC_MSG_CHECKING([whether to build pdf documentation])
98648c9fbc29Smrg
98654cd6a3aeSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
98664cd6a3aeSmrg   BUILDPDFDOC=yes
98674cd6a3aeSmrgelse
98684cd6a3aeSmrg   BUILDPDFDOC=no
98694cd6a3aeSmrgfi
98708c9fbc29Smrg
98714cd6a3aeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
98728c9fbc29Smrg
98734cd6a3aeSmrgAC_MSG_RESULT([$BUILDPDFDOC])
98744cd6a3aeSmrg
98754cd6a3aeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
98764cd6a3aeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
98774cd6a3aeSmrgMAKE_PDF="$PS2PDF"
98784cd6a3aeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
98794cd6a3aeSmrg
98804cd6a3aeSmrgAC_SUBST(MAKE_TEXT)
98814cd6a3aeSmrgAC_SUBST(MAKE_PS)
98824cd6a3aeSmrgAC_SUBST(MAKE_PDF)
98834cd6a3aeSmrgAC_SUBST(MAKE_HTML)
98844cd6a3aeSmrg]) # XORG_CHECK_LINUXDOC
98854cd6a3aeSmrg
98864cd6a3aeSmrg# XORG_CHECK_DOCBOOK
98874cd6a3aeSmrg# -------------------
98884cd6a3aeSmrg# Minimum version: 1.0.0
98894cd6a3aeSmrg#
98904cd6a3aeSmrg# Checks for the ability to build output formats from SGML DocBook source.
98914cd6a3aeSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
98924cd6a3aeSmrg# indicates whether the necessary tools and files are found and, if set,
98934cd6a3aeSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
98944cd6a3aeSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
98954cd6a3aeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
98968c9fbc29Smrg
98974cd6a3aeSmrgBUILDTXTDOC=no
98984cd6a3aeSmrgBUILDPDFDOC=no
98994cd6a3aeSmrgBUILDPSDOC=no
99004cd6a3aeSmrgBUILDHTMLDOC=no
99018c9fbc29Smrg
99024cd6a3aeSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
99034cd6a3aeSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
99044cd6a3aeSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
99054cd6a3aeSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
99068c9fbc29Smrg
99074cd6a3aeSmrgAC_MSG_CHECKING([whether to build text documentation])
99084cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
99094cd6a3aeSmrg   test x$BUILD_TXTDOC != xno; then
99104cd6a3aeSmrg	BUILDTXTDOC=yes
99114cd6a3aeSmrgfi
99124cd6a3aeSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
99134cd6a3aeSmrgAC_MSG_RESULT([$BUILDTXTDOC])
99148c9fbc29Smrg
99154cd6a3aeSmrgAC_MSG_CHECKING([whether to build PDF documentation])
99164cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
99174cd6a3aeSmrg   test x$BUILD_PDFDOC != xno; then
99184cd6a3aeSmrg	BUILDPDFDOC=yes
99194cd6a3aeSmrgfi
99204cd6a3aeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
99214cd6a3aeSmrgAC_MSG_RESULT([$BUILDPDFDOC])
99228c9fbc29Smrg
99234cd6a3aeSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
99244cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
99254cd6a3aeSmrg   test x$BUILD_PSDOC != xno; then
99264cd6a3aeSmrg	BUILDPSDOC=yes
99274cd6a3aeSmrgfi
99284cd6a3aeSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
99294cd6a3aeSmrgAC_MSG_RESULT([$BUILDPSDOC])
99308c9fbc29Smrg
99314cd6a3aeSmrgAC_MSG_CHECKING([whether to build HTML documentation])
99324cd6a3aeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
99334cd6a3aeSmrg   test x$BUILD_HTMLDOC != xno; then
99344cd6a3aeSmrg	BUILDHTMLDOC=yes
99354cd6a3aeSmrgfi
99364cd6a3aeSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
99374cd6a3aeSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
99388c9fbc29Smrg
99394cd6a3aeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
99404cd6a3aeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
99414cd6a3aeSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
99424cd6a3aeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
99438c9fbc29Smrg
99444cd6a3aeSmrgAC_SUBST(MAKE_TEXT)
99454cd6a3aeSmrgAC_SUBST(MAKE_PS)
99464cd6a3aeSmrgAC_SUBST(MAKE_PDF)
99474cd6a3aeSmrgAC_SUBST(MAKE_HTML)
99484cd6a3aeSmrg]) # XORG_CHECK_DOCBOOK
99498c9fbc29Smrg
99504cd6a3aeSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
99514cd6a3aeSmrg# ----------------
99524cd6a3aeSmrg# Minimum version: 1.5.0
99534cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
99544cd6a3aeSmrg#
99554cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes
99564cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the
99574cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
99584cd6a3aeSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
99594cd6a3aeSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
99604cd6a3aeSmrg# --with-xmlto assumes 'auto'.
99614cd6a3aeSmrg#
99624cd6a3aeSmrg# Interface to module:
99634cd6a3aeSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
99644cd6a3aeSmrg# XMLTO:	returns the path of the xmlto program found
99654cd6a3aeSmrg#		returns the path set by the user in the environment
99664cd6a3aeSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
99674cd6a3aeSmrg#		'no' user instructs the module not to use xmlto
99684cd6a3aeSmrg#
99694cd6a3aeSmrg# Added in version 1.10.0
99704cd6a3aeSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
99714cd6a3aeSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
99724cd6a3aeSmrg#
99734cd6a3aeSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
99744cd6a3aeSmrg#
99754cd6a3aeSmrgAC_DEFUN([XORG_WITH_XMLTO],[
99764cd6a3aeSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
99774cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto]))
99784cd6a3aeSmrgAC_ARG_WITH(xmlto,
99794cd6a3aeSmrg	AS_HELP_STRING([--with-xmlto],
99804cd6a3aeSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
99814cd6a3aeSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
99824cd6a3aeSmrgm4_undefine([_defopt])
99834cd6a3aeSmrg
99844cd6a3aeSmrgif test "x$use_xmlto" = x"auto"; then
99854cd6a3aeSmrg   AC_PATH_PROG([XMLTO], [xmlto])
99864cd6a3aeSmrg   if test "x$XMLTO" = "x"; then
99874cd6a3aeSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
99884cd6a3aeSmrg	have_xmlto=no
99894cd6a3aeSmrg   else
99904cd6a3aeSmrg        have_xmlto=yes
99914cd6a3aeSmrg   fi
99924cd6a3aeSmrgelif test "x$use_xmlto" = x"yes" ; then
99934cd6a3aeSmrg   AC_PATH_PROG([XMLTO], [xmlto])
99944cd6a3aeSmrg   if test "x$XMLTO" = "x"; then
99954cd6a3aeSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
99964cd6a3aeSmrg   fi
99974cd6a3aeSmrg   have_xmlto=yes
99984cd6a3aeSmrgelif test "x$use_xmlto" = x"no" ; then
99994cd6a3aeSmrg   if test "x$XMLTO" != "x"; then
100004cd6a3aeSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
100014cd6a3aeSmrg   fi
100024cd6a3aeSmrg   have_xmlto=no
100034cd6a3aeSmrgelse
100044cd6a3aeSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
100054cd6a3aeSmrgfi
100068c9fbc29Smrg
100074cd6a3aeSmrg# Test for a minimum version of xmlto, if provided.
100084cd6a3aeSmrgm4_ifval([$1],
100094cd6a3aeSmrg[if test "$have_xmlto" = yes; then
100104cd6a3aeSmrg    # scrape the xmlto version
100114cd6a3aeSmrg    AC_MSG_CHECKING([the xmlto version])
100124cd6a3aeSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
100134cd6a3aeSmrg    AC_MSG_RESULT([$xmlto_version])
100144cd6a3aeSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
100154cd6a3aeSmrg        [if test "x$use_xmlto" = xauto; then
100164cd6a3aeSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
100174cd6a3aeSmrg            have_xmlto=no
100184cd6a3aeSmrg        else
100194cd6a3aeSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
100204cd6a3aeSmrg        fi])
100214cd6a3aeSmrgfi])
100228c9fbc29Smrg
100234cd6a3aeSmrg# Test for the ability of xmlto to generate a text target
100244cd6a3aeSmrghave_xmlto_text=no
100254cd6a3aeSmrgcat > conftest.xml << "EOF"
100264cd6a3aeSmrgEOF
100274cd6a3aeSmrgAS_IF([test "$have_xmlto" = yes],
100284cd6a3aeSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
100294cd6a3aeSmrg             [have_xmlto_text=yes],
100304cd6a3aeSmrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
100314cd6a3aeSmrgrm -f conftest.xml
100324cd6a3aeSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
100334cd6a3aeSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
100344cd6a3aeSmrg]) # XORG_WITH_XMLTO
100354cd6a3aeSmrg
100364cd6a3aeSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
100374cd6a3aeSmrg# --------------------------------------------
100384cd6a3aeSmrg# Minimum version: 1.12.0
100394cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.12.0
100404cd6a3aeSmrg#
100414cd6a3aeSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
100424cd6a3aeSmrg# XML-based language used for the transformation of XML documents.
100434cd6a3aeSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
100444cd6a3aeSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
100454cd6a3aeSmrg# The XSLT processor is often used as a standalone tool for transformations.
100464cd6a3aeSmrg# It should not be assumed that this tool is used only to work with documnetation.
100474cd6a3aeSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
100484cd6a3aeSmrg#
100494cd6a3aeSmrg# Interface to module:
100504cd6a3aeSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
100514cd6a3aeSmrg# XSLTPROC:	 returns the path of the xsltproc program found
100524cd6a3aeSmrg#		 returns the path set by the user in the environment
100534cd6a3aeSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
100544cd6a3aeSmrg#		  'no' user instructs the module not to use xsltproc
100554cd6a3aeSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
100564cd6a3aeSmrg#
100574cd6a3aeSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
100584cd6a3aeSmrg#
100594cd6a3aeSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
100604cd6a3aeSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
100614cd6a3aeSmrg# Preserves the interface, should it be implemented later
100624cd6a3aeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
100634cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto]))
100644cd6a3aeSmrgAC_ARG_WITH(xsltproc,
100654cd6a3aeSmrg	AS_HELP_STRING([--with-xsltproc],
100664cd6a3aeSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
100674cd6a3aeSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
100684cd6a3aeSmrgm4_undefine([_defopt])
100694cd6a3aeSmrg
100704cd6a3aeSmrgif test "x$use_xsltproc" = x"auto"; then
100714cd6a3aeSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
100724cd6a3aeSmrg   if test "x$XSLTPROC" = "x"; then
100734cd6a3aeSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
100744cd6a3aeSmrg	have_xsltproc=no
100754cd6a3aeSmrg   else
100764cd6a3aeSmrg        have_xsltproc=yes
100774cd6a3aeSmrg   fi
100784cd6a3aeSmrgelif test "x$use_xsltproc" = x"yes" ; then
100794cd6a3aeSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
100804cd6a3aeSmrg   if test "x$XSLTPROC" = "x"; then
100814cd6a3aeSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
100824cd6a3aeSmrg   fi
100834cd6a3aeSmrg   have_xsltproc=yes
100844cd6a3aeSmrgelif test "x$use_xsltproc" = x"no" ; then
100854cd6a3aeSmrg   if test "x$XSLTPROC" != "x"; then
100864cd6a3aeSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
100874cd6a3aeSmrg   fi
100884cd6a3aeSmrg   have_xsltproc=no
100894cd6a3aeSmrgelse
100904cd6a3aeSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
100914cd6a3aeSmrgfi
100928c9fbc29Smrg
100934cd6a3aeSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
100944cd6a3aeSmrg]) # XORG_WITH_XSLTPROC
100958c9fbc29Smrg
100964cd6a3aeSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
100974cd6a3aeSmrg# ----------------------------------------
100984cd6a3aeSmrg# Minimum version: 1.15.0
100994cd6a3aeSmrg#
101004cd6a3aeSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
101014cd6a3aeSmrg# scanning arbitrary text files, extracting information from those text files,
101024cd6a3aeSmrg# and printing reports based on that information.
101034cd6a3aeSmrg#
101044cd6a3aeSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
101054cd6a3aeSmrg#
101064cd6a3aeSmrg# Interface to module:
101074cd6a3aeSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
101084cd6a3aeSmrg# PERL:	     returns the path of the perl program found
101094cd6a3aeSmrg#	     returns the path set by the user in the environment
101104cd6a3aeSmrg# --with-perl: 'yes' user instructs the module to use perl
101114cd6a3aeSmrg#	       'no' user instructs the module not to use perl
101124cd6a3aeSmrg# have_perl: returns yes if perl found in PATH or no
101134cd6a3aeSmrg#
101144cd6a3aeSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
101154cd6a3aeSmrg#
101164cd6a3aeSmrgAC_DEFUN([XORG_WITH_PERL],[
101174cd6a3aeSmrgAC_ARG_VAR([PERL], [Path to perl command])
101184cd6a3aeSmrg# Preserves the interface, should it be implemented later
101194cd6a3aeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
101204cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto]))
101214cd6a3aeSmrgAC_ARG_WITH(perl,
101224cd6a3aeSmrg	AS_HELP_STRING([--with-perl],
101234cd6a3aeSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
101244cd6a3aeSmrg	   [use_perl=$withval], [use_perl=]_defopt)
101254cd6a3aeSmrgm4_undefine([_defopt])
101264cd6a3aeSmrg
101274cd6a3aeSmrgif test "x$use_perl" = x"auto"; then
101284cd6a3aeSmrg   AC_PATH_PROG([PERL], [perl])
101294cd6a3aeSmrg   if test "x$PERL" = "x"; then
101304cd6a3aeSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
101314cd6a3aeSmrg	have_perl=no
101324cd6a3aeSmrg   else
101334cd6a3aeSmrg        have_perl=yes
101344cd6a3aeSmrg   fi
101354cd6a3aeSmrgelif test "x$use_perl" = x"yes" ; then
101364cd6a3aeSmrg   AC_PATH_PROG([PERL], [perl])
101374cd6a3aeSmrg   if test "x$PERL" = "x"; then
101384cd6a3aeSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
101394cd6a3aeSmrg   fi
101404cd6a3aeSmrg   have_perl=yes
101414cd6a3aeSmrgelif test "x$use_perl" = x"no" ; then
101424cd6a3aeSmrg   if test "x$PERL" != "x"; then
101434cd6a3aeSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
101444cd6a3aeSmrg   fi
101454cd6a3aeSmrg   have_perl=no
101464cd6a3aeSmrgelse
101474cd6a3aeSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
101484cd6a3aeSmrgfi
101498c9fbc29Smrg
101504cd6a3aeSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
101514cd6a3aeSmrg]) # XORG_WITH_PERL
101528c9fbc29Smrg
101534cd6a3aeSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
101544cd6a3aeSmrg# ----------------
101554cd6a3aeSmrg# Minimum version: 1.5.0
101564cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
101574cd6a3aeSmrg#
101584cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes
101594cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the
101604cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
101614cd6a3aeSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
101624cd6a3aeSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
101634cd6a3aeSmrg# --with-asciidoc assumes 'auto'.
101644cd6a3aeSmrg#
101654cd6a3aeSmrg# Interface to module:
101664cd6a3aeSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
101674cd6a3aeSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
101684cd6a3aeSmrg#		 returns the path set by the user in the environment
101694cd6a3aeSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
101704cd6a3aeSmrg#		  'no' user instructs the module not to use asciidoc
101714cd6a3aeSmrg#
101724cd6a3aeSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
101734cd6a3aeSmrg#
101744cd6a3aeSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
101754cd6a3aeSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
101764cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto]))
101774cd6a3aeSmrgAC_ARG_WITH(asciidoc,
101784cd6a3aeSmrg	AS_HELP_STRING([--with-asciidoc],
101794cd6a3aeSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
101804cd6a3aeSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
101814cd6a3aeSmrgm4_undefine([_defopt])
101824cd6a3aeSmrg
101834cd6a3aeSmrgif test "x$use_asciidoc" = x"auto"; then
101844cd6a3aeSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
101854cd6a3aeSmrg   if test "x$ASCIIDOC" = "x"; then
101864cd6a3aeSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
101874cd6a3aeSmrg	have_asciidoc=no
101884cd6a3aeSmrg   else
101894cd6a3aeSmrg        have_asciidoc=yes
101904cd6a3aeSmrg   fi
101914cd6a3aeSmrgelif test "x$use_asciidoc" = x"yes" ; then
101924cd6a3aeSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
101934cd6a3aeSmrg   if test "x$ASCIIDOC" = "x"; then
101944cd6a3aeSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
101954cd6a3aeSmrg   fi
101964cd6a3aeSmrg   have_asciidoc=yes
101974cd6a3aeSmrgelif test "x$use_asciidoc" = x"no" ; then
101984cd6a3aeSmrg   if test "x$ASCIIDOC" != "x"; then
101994cd6a3aeSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
102004cd6a3aeSmrg   fi
102014cd6a3aeSmrg   have_asciidoc=no
102024cd6a3aeSmrgelse
102034cd6a3aeSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
102044cd6a3aeSmrgfi
102054cd6a3aeSmrgm4_ifval([$1],
102064cd6a3aeSmrg[if test "$have_asciidoc" = yes; then
102074cd6a3aeSmrg    # scrape the asciidoc version
102084cd6a3aeSmrg    AC_MSG_CHECKING([the asciidoc version])
102094cd6a3aeSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
102104cd6a3aeSmrg    AC_MSG_RESULT([$asciidoc_version])
102114cd6a3aeSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
102124cd6a3aeSmrg        [if test "x$use_asciidoc" = xauto; then
102134cd6a3aeSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
102144cd6a3aeSmrg            have_asciidoc=no
102154cd6a3aeSmrg        else
102164cd6a3aeSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
102174cd6a3aeSmrg        fi])
102184cd6a3aeSmrgfi])
102194cd6a3aeSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
102204cd6a3aeSmrg]) # XORG_WITH_ASCIIDOC
102218c9fbc29Smrg
102224cd6a3aeSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
102234cd6a3aeSmrg# --------------------------------
102244cd6a3aeSmrg# Minimum version: 1.5.0
102254cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
102264cd6a3aeSmrg#
102274cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes
102284cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the
102294cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
102304cd6a3aeSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
102314cd6a3aeSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
102324cd6a3aeSmrg# --with-doxygen assumes 'auto'.
102334cd6a3aeSmrg#
102344cd6a3aeSmrg# Interface to module:
102354cd6a3aeSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
102364cd6a3aeSmrg# DOXYGEN:	 returns the path of the doxygen program found
102374cd6a3aeSmrg#		 returns the path set by the user in the environment
102384cd6a3aeSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
102394cd6a3aeSmrg#		  'no' user instructs the module not to use doxygen
102404cd6a3aeSmrg#
102414cd6a3aeSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
102424cd6a3aeSmrg#
102434cd6a3aeSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
102444cd6a3aeSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
102454cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto]))
102464cd6a3aeSmrgAC_ARG_WITH(doxygen,
102474cd6a3aeSmrg	AS_HELP_STRING([--with-doxygen],
102484cd6a3aeSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
102494cd6a3aeSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
102504cd6a3aeSmrgm4_undefine([_defopt])
102514cd6a3aeSmrg
102524cd6a3aeSmrgif test "x$use_doxygen" = x"auto"; then
102534cd6a3aeSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
102544cd6a3aeSmrg   if test "x$DOXYGEN" = "x"; then
102554cd6a3aeSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
102564cd6a3aeSmrg	have_doxygen=no
102574cd6a3aeSmrg   else
102584cd6a3aeSmrg        have_doxygen=yes
102594cd6a3aeSmrg   fi
102604cd6a3aeSmrgelif test "x$use_doxygen" = x"yes" ; then
102614cd6a3aeSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
102624cd6a3aeSmrg   if test "x$DOXYGEN" = "x"; then
102634cd6a3aeSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
102644cd6a3aeSmrg   fi
102654cd6a3aeSmrg   have_doxygen=yes
102664cd6a3aeSmrgelif test "x$use_doxygen" = x"no" ; then
102674cd6a3aeSmrg   if test "x$DOXYGEN" != "x"; then
102684cd6a3aeSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
102694cd6a3aeSmrg   fi
102704cd6a3aeSmrg   have_doxygen=no
102714cd6a3aeSmrgelse
102724cd6a3aeSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
102734cd6a3aeSmrgfi
102744cd6a3aeSmrgm4_ifval([$1],
102754cd6a3aeSmrg[if test "$have_doxygen" = yes; then
102764cd6a3aeSmrg    # scrape the doxygen version
102774cd6a3aeSmrg    AC_MSG_CHECKING([the doxygen version])
102784cd6a3aeSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
102794cd6a3aeSmrg    AC_MSG_RESULT([$doxygen_version])
102804cd6a3aeSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
102814cd6a3aeSmrg        [if test "x$use_doxygen" = xauto; then
102824cd6a3aeSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
102834cd6a3aeSmrg            have_doxygen=no
102844cd6a3aeSmrg        else
102854cd6a3aeSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
102864cd6a3aeSmrg        fi])
102874cd6a3aeSmrgfi])
102884cd6a3aeSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
102894cd6a3aeSmrg]) # XORG_WITH_DOXYGEN
102908c9fbc29Smrg
102914cd6a3aeSmrg# XORG_WITH_GROFF([DEFAULT])
102924cd6a3aeSmrg# ----------------
102934cd6a3aeSmrg# Minimum version: 1.6.0
102944cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
102954cd6a3aeSmrg#
102964cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes
102974cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the
102984cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
102994cd6a3aeSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
103004cd6a3aeSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
103014cd6a3aeSmrg# --with-groff assumes 'auto'.
103024cd6a3aeSmrg#
103034cd6a3aeSmrg# Interface to module:
103044cd6a3aeSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
103054cd6a3aeSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
103064cd6a3aeSmrg# HAVE_GROFF_MS: the -ms macros package
103074cd6a3aeSmrg# GROFF:	 returns the path of the groff program found
103084cd6a3aeSmrg#		 returns the path set by the user in the environment
103094cd6a3aeSmrg# --with-groff:	 'yes' user instructs the module to use groff
103104cd6a3aeSmrg#		 'no' user instructs the module not to use groff
103114cd6a3aeSmrg#
103124cd6a3aeSmrg# Added in version 1.9.0:
103134cd6a3aeSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
103144cd6a3aeSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
103154cd6a3aeSmrg#		   psselect from the psutils package.
103164cd6a3aeSmrg#		   the ghostcript package. Refer to the grohtml man pages
103174cd6a3aeSmrg#
103184cd6a3aeSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
103194cd6a3aeSmrg#
103204cd6a3aeSmrg# OS and distros often splits groff in a basic and full package, the former
103214cd6a3aeSmrg# having the groff program and the later having devices, fonts and macros
103224cd6a3aeSmrg# Checking for the groff executable is not enough.
103234cd6a3aeSmrg#
103244cd6a3aeSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
103254cd6a3aeSmrg# unset HAVE_GROFF or GROFF env variables.
103264cd6a3aeSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
103274cd6a3aeSmrg#
103284cd6a3aeSmrgAC_DEFUN([XORG_WITH_GROFF],[
103294cd6a3aeSmrgAC_ARG_VAR([GROFF], [Path to groff command])
103304cd6a3aeSmrgm4_define([_defopt], m4_default([$1], [auto]))
103314cd6a3aeSmrgAC_ARG_WITH(groff,
103324cd6a3aeSmrg	AS_HELP_STRING([--with-groff],
103334cd6a3aeSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
103344cd6a3aeSmrg	   [use_groff=$withval], [use_groff=]_defopt)
103354cd6a3aeSmrgm4_undefine([_defopt])
103364cd6a3aeSmrg
103374cd6a3aeSmrgif test "x$use_groff" = x"auto"; then
103384cd6a3aeSmrg   AC_PATH_PROG([GROFF], [groff])
103394cd6a3aeSmrg   if test "x$GROFF" = "x"; then
103404cd6a3aeSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
103414cd6a3aeSmrg	have_groff=no
103424cd6a3aeSmrg   else
103434cd6a3aeSmrg        have_groff=yes
103444cd6a3aeSmrg   fi
103454cd6a3aeSmrgelif test "x$use_groff" = x"yes" ; then
103464cd6a3aeSmrg   AC_PATH_PROG([GROFF], [groff])
103474cd6a3aeSmrg   if test "x$GROFF" = "x"; then
103484cd6a3aeSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
103494cd6a3aeSmrg   fi
103504cd6a3aeSmrg   have_groff=yes
103514cd6a3aeSmrgelif test "x$use_groff" = x"no" ; then
103524cd6a3aeSmrg   if test "x$GROFF" != "x"; then
103534cd6a3aeSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
103544cd6a3aeSmrg   fi
103554cd6a3aeSmrg   have_groff=no
103564cd6a3aeSmrgelse
103574cd6a3aeSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
103584cd6a3aeSmrgfi
103598c9fbc29Smrg
103604cd6a3aeSmrg# We have groff, test for the presence of the macro packages
103614cd6a3aeSmrgif test "x$have_groff" = x"yes"; then
103624cd6a3aeSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
103634cd6a3aeSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
103644cd6a3aeSmrg        groff_ms_works=yes
103654cd6a3aeSmrg    else
103664cd6a3aeSmrg        groff_ms_works=no
103674cd6a3aeSmrg    fi
103684cd6a3aeSmrg    AC_MSG_RESULT([$groff_ms_works])
103694cd6a3aeSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
103704cd6a3aeSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
103714cd6a3aeSmrg        groff_mm_works=yes
103724cd6a3aeSmrg    else
103734cd6a3aeSmrg        groff_mm_works=no
103744cd6a3aeSmrg    fi
103754cd6a3aeSmrg    AC_MSG_RESULT([$groff_mm_works])
103764cd6a3aeSmrgfi
103778c9fbc29Smrg
103784cd6a3aeSmrg# We have groff, test for HTML dependencies, one command per package
103794cd6a3aeSmrgif test "x$have_groff" = x"yes"; then
103804cd6a3aeSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
103814cd6a3aeSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
103824cd6a3aeSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
103834cd6a3aeSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
103844cd6a3aeSmrg      have_groff_html=yes
103854cd6a3aeSmrg   else
103864cd6a3aeSmrg      have_groff_html=no
103874cd6a3aeSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
103884cd6a3aeSmrg   fi
103894cd6a3aeSmrgfi
103908c9fbc29Smrg
103914cd6a3aeSmrg# Set Automake conditionals for Makefiles
103924cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
103934cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
103944cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
103954cd6a3aeSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
103964cd6a3aeSmrg]) # XORG_WITH_GROFF
103974cd6a3aeSmrg
103984cd6a3aeSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
103994cd6a3aeSmrg# ---------------------------------------
104004cd6a3aeSmrg# Minimum version: 1.6.0
104014cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
104024cd6a3aeSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
104034cd6a3aeSmrg#
104044cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes
104054cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the
104064cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
104074cd6a3aeSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
104084cd6a3aeSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
104094cd6a3aeSmrg# --with-fop assumes 'auto'.
104104cd6a3aeSmrg#
104114cd6a3aeSmrg# Interface to module:
104124cd6a3aeSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
104134cd6a3aeSmrg# FOP:	 	returns the path of the fop program found
104144cd6a3aeSmrg#		returns the path set by the user in the environment
104154cd6a3aeSmrg# --with-fop: 	'yes' user instructs the module to use fop
104164cd6a3aeSmrg#		'no' user instructs the module not to use fop
104174cd6a3aeSmrg#
104184cd6a3aeSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
104194cd6a3aeSmrg#
104204cd6a3aeSmrgAC_DEFUN([XORG_WITH_FOP],[
104214cd6a3aeSmrgAC_ARG_VAR([FOP], [Path to fop command])
104224cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto]))
104234cd6a3aeSmrgAC_ARG_WITH(fop,
104244cd6a3aeSmrg	AS_HELP_STRING([--with-fop],
104254cd6a3aeSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
104264cd6a3aeSmrg	   [use_fop=$withval], [use_fop=]_defopt)
104274cd6a3aeSmrgm4_undefine([_defopt])
104284cd6a3aeSmrg
104294cd6a3aeSmrgif test "x$use_fop" = x"auto"; then
104304cd6a3aeSmrg   AC_PATH_PROG([FOP], [fop])
104314cd6a3aeSmrg   if test "x$FOP" = "x"; then
104324cd6a3aeSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
104334cd6a3aeSmrg	have_fop=no
104344cd6a3aeSmrg   else
104354cd6a3aeSmrg        have_fop=yes
104364cd6a3aeSmrg   fi
104374cd6a3aeSmrgelif test "x$use_fop" = x"yes" ; then
104384cd6a3aeSmrg   AC_PATH_PROG([FOP], [fop])
104394cd6a3aeSmrg   if test "x$FOP" = "x"; then
104404cd6a3aeSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
104414cd6a3aeSmrg   fi
104424cd6a3aeSmrg   have_fop=yes
104434cd6a3aeSmrgelif test "x$use_fop" = x"no" ; then
104444cd6a3aeSmrg   if test "x$FOP" != "x"; then
104454cd6a3aeSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
104464cd6a3aeSmrg   fi
104474cd6a3aeSmrg   have_fop=no
104484cd6a3aeSmrgelse
104494cd6a3aeSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
104504cd6a3aeSmrgfi
104518c9fbc29Smrg
104524cd6a3aeSmrg# Test for a minimum version of fop, if provided.
104534cd6a3aeSmrgm4_ifval([$1],
104544cd6a3aeSmrg[if test "$have_fop" = yes; then
104554cd6a3aeSmrg    # scrape the fop version
104564cd6a3aeSmrg    AC_MSG_CHECKING([for fop minimum version])
104574cd6a3aeSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
104584cd6a3aeSmrg    AC_MSG_RESULT([$fop_version])
104594cd6a3aeSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
104604cd6a3aeSmrg        [if test "x$use_fop" = xauto; then
104614cd6a3aeSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
104624cd6a3aeSmrg            have_fop=no
104634cd6a3aeSmrg        else
104644cd6a3aeSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
104654cd6a3aeSmrg        fi])
104664cd6a3aeSmrgfi])
104674cd6a3aeSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
104684cd6a3aeSmrg]) # XORG_WITH_FOP
104698c9fbc29Smrg
104704cd6a3aeSmrg# XORG_WITH_PS2PDF([DEFAULT])
104714cd6a3aeSmrg# ----------------
104724cd6a3aeSmrg# Minimum version: 1.6.0
104734cd6a3aeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
104744cd6a3aeSmrg#
104754cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes
104764cd6a3aeSmrg# not at the appropriate level. This macro enables a module to test for the
104774cd6a3aeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
104784cd6a3aeSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
104794cd6a3aeSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
104804cd6a3aeSmrg# --with-ps2pdf assumes 'auto'.
104814cd6a3aeSmrg#
104824cd6a3aeSmrg# Interface to module:
104834cd6a3aeSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
104844cd6a3aeSmrg# PS2PDF:	returns the path of the ps2pdf program found
104854cd6a3aeSmrg#		returns the path set by the user in the environment
104864cd6a3aeSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
104874cd6a3aeSmrg#		 'no' user instructs the module not to use ps2pdf
104884cd6a3aeSmrg#
104894cd6a3aeSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
104904cd6a3aeSmrg#
104914cd6a3aeSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
104924cd6a3aeSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
104934cd6a3aeSmrgm4_define([_defopt], m4_default([$1], [auto]))
104944cd6a3aeSmrgAC_ARG_WITH(ps2pdf,
104954cd6a3aeSmrg	AS_HELP_STRING([--with-ps2pdf],
104964cd6a3aeSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
104974cd6a3aeSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
104984cd6a3aeSmrgm4_undefine([_defopt])
104994cd6a3aeSmrg
105004cd6a3aeSmrgif test "x$use_ps2pdf" = x"auto"; then
105014cd6a3aeSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
105024cd6a3aeSmrg   if test "x$PS2PDF" = "x"; then
105034cd6a3aeSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
105044cd6a3aeSmrg	have_ps2pdf=no
105054cd6a3aeSmrg   else
105064cd6a3aeSmrg        have_ps2pdf=yes
105074cd6a3aeSmrg   fi
105084cd6a3aeSmrgelif test "x$use_ps2pdf" = x"yes" ; then
105094cd6a3aeSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
105104cd6a3aeSmrg   if test "x$PS2PDF" = "x"; then
105114cd6a3aeSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
105124cd6a3aeSmrg   fi
105134cd6a3aeSmrg   have_ps2pdf=yes
105144cd6a3aeSmrgelif test "x$use_ps2pdf" = x"no" ; then
105154cd6a3aeSmrg   if test "x$PS2PDF" != "x"; then
105164cd6a3aeSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
105174cd6a3aeSmrg   fi
105184cd6a3aeSmrg   have_ps2pdf=no
105194cd6a3aeSmrgelse
105204cd6a3aeSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
105214cd6a3aeSmrgfi
105224cd6a3aeSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
105234cd6a3aeSmrg]) # XORG_WITH_PS2PDF
105248c9fbc29Smrg
105254cd6a3aeSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
105264cd6a3aeSmrg# ----------------
105274cd6a3aeSmrg# Minimum version: 1.6.0
105284cd6a3aeSmrg#
105294cd6a3aeSmrg# Documentation tools are not always available on all platforms and sometimes
105304cd6a3aeSmrg# not at the appropriate level. This macro enables a builder to skip all
105314cd6a3aeSmrg# documentation targets except traditional man pages.
105324cd6a3aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
105334cd6a3aeSmrg# maximum flexibilty in controlling documentation building.
105344cd6a3aeSmrg# Refer to:
105354cd6a3aeSmrg# XORG_WITH_XMLTO         --with-xmlto
105364cd6a3aeSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
105374cd6a3aeSmrg# XORG_WITH_DOXYGEN       --with-doxygen
105384cd6a3aeSmrg# XORG_WITH_FOP           --with-fop
105394cd6a3aeSmrg# XORG_WITH_GROFF         --with-groff
105404cd6a3aeSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
105414cd6a3aeSmrg#
105424cd6a3aeSmrg# Interface to module:
105434cd6a3aeSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
105444cd6a3aeSmrg# --enable-docs: 'yes' user instructs the module to generate docs
105454cd6a3aeSmrg#		 'no' user instructs the module not to generate docs
105464cd6a3aeSmrg# parm1:	specify the default value, yes or no.
105474cd6a3aeSmrg#
105484cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
105494cd6a3aeSmrgm4_define([docs_default], m4_default([$1], [yes]))
105504cd6a3aeSmrgAC_ARG_ENABLE(docs,
105514cd6a3aeSmrg	AS_HELP_STRING([--enable-docs],
105524cd6a3aeSmrg	   [Enable building the documentation (default: ]docs_default[)]),
105534cd6a3aeSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
105544cd6a3aeSmrgm4_undefine([docs_default])
105554cd6a3aeSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
105564cd6a3aeSmrgAC_MSG_CHECKING([whether to build documentation])
105574cd6a3aeSmrgAC_MSG_RESULT([$build_docs])
105584cd6a3aeSmrg]) # XORG_ENABLE_DOCS
105594cd6a3aeSmrg
105604cd6a3aeSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
105614cd6a3aeSmrg# ----------------
105624cd6a3aeSmrg# Minimum version: 1.6.0
105634cd6a3aeSmrg#
105644cd6a3aeSmrg# This macro enables a builder to skip all developer documentation.
105654cd6a3aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
105664cd6a3aeSmrg# maximum flexibilty in controlling documentation building.
105674cd6a3aeSmrg# Refer to:
105684cd6a3aeSmrg# XORG_WITH_XMLTO         --with-xmlto
105694cd6a3aeSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
105704cd6a3aeSmrg# XORG_WITH_DOXYGEN       --with-doxygen
105714cd6a3aeSmrg# XORG_WITH_FOP           --with-fop
105724cd6a3aeSmrg# XORG_WITH_GROFF         --with-groff
105734cd6a3aeSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
105744cd6a3aeSmrg#
105754cd6a3aeSmrg# Interface to module:
105764cd6a3aeSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
105774cd6a3aeSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
105784cd6a3aeSmrg#			'no' user instructs the module not to generate developer docs
105794cd6a3aeSmrg# parm1:		specify the default value, yes or no.
105804cd6a3aeSmrg#
105814cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
105824cd6a3aeSmrgm4_define([devel_default], m4_default([$1], [yes]))
105834cd6a3aeSmrgAC_ARG_ENABLE(devel-docs,
105844cd6a3aeSmrg	AS_HELP_STRING([--enable-devel-docs],
105854cd6a3aeSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
105864cd6a3aeSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
105874cd6a3aeSmrgm4_undefine([devel_default])
105884cd6a3aeSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
105894cd6a3aeSmrgAC_MSG_CHECKING([whether to build developer documentation])
105904cd6a3aeSmrgAC_MSG_RESULT([$build_devel_docs])
105914cd6a3aeSmrg]) # XORG_ENABLE_DEVEL_DOCS
105924cd6a3aeSmrg
105934cd6a3aeSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
105944cd6a3aeSmrg# ----------------
105954cd6a3aeSmrg# Minimum version: 1.6.0
105964cd6a3aeSmrg#
105974cd6a3aeSmrg# This macro enables a builder to skip all functional specification targets.
105984cd6a3aeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
105994cd6a3aeSmrg# maximum flexibilty in controlling documentation building.
106004cd6a3aeSmrg# Refer to:
106014cd6a3aeSmrg# XORG_WITH_XMLTO         --with-xmlto
106024cd6a3aeSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
106034cd6a3aeSmrg# XORG_WITH_DOXYGEN       --with-doxygen
106044cd6a3aeSmrg# XORG_WITH_FOP           --with-fop
106054cd6a3aeSmrg# XORG_WITH_GROFF         --with-groff
106064cd6a3aeSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
106074cd6a3aeSmrg#
106084cd6a3aeSmrg# Interface to module:
106094cd6a3aeSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
106104cd6a3aeSmrg# --enable-specs:	'yes' user instructs the module to generate specs
106114cd6a3aeSmrg#			'no' user instructs the module not to generate specs
106124cd6a3aeSmrg# parm1:		specify the default value, yes or no.
106134cd6a3aeSmrg#
106144cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
106154cd6a3aeSmrgm4_define([spec_default], m4_default([$1], [yes]))
106164cd6a3aeSmrgAC_ARG_ENABLE(specs,
106174cd6a3aeSmrg	AS_HELP_STRING([--enable-specs],
106184cd6a3aeSmrg	   [Enable building the specs (default: ]spec_default[)]),
106194cd6a3aeSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
106204cd6a3aeSmrgm4_undefine([spec_default])
106214cd6a3aeSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
106224cd6a3aeSmrgAC_MSG_CHECKING([whether to build functional specifications])
106234cd6a3aeSmrgAC_MSG_RESULT([$build_specs])
106244cd6a3aeSmrg]) # XORG_ENABLE_SPECS
106254cd6a3aeSmrg
106264cd6a3aeSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
106274cd6a3aeSmrg# ----------------------------------------------
106284cd6a3aeSmrg# Minimum version: 1.13.0
106294cd6a3aeSmrg#
106304cd6a3aeSmrg# This macro enables a builder to enable/disable unit testing
106314cd6a3aeSmrg# It makes no assumption about the test cases implementation
106324cd6a3aeSmrg# Test cases may or may not use Automake "Support for test suites"
106334cd6a3aeSmrg# They may or may not use the software utility library GLib
106344cd6a3aeSmrg#
106354cd6a3aeSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
106364cd6a3aeSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
106374cd6a3aeSmrg# The variable enable_unit_tests is used by other macros in this file.
106384cd6a3aeSmrg#
106394cd6a3aeSmrg# Interface to module:
106404cd6a3aeSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
106414cd6a3aeSmrg# enable_unit_tests:    used in configure.ac for additional configuration
106424cd6a3aeSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
106434cd6a3aeSmrg#			'no' user instructs the module not to build tests
106444cd6a3aeSmrg# parm1:		specify the default value, yes or no.
106454cd6a3aeSmrg#
106464cd6a3aeSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
106474cd6a3aeSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
106484cd6a3aeSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
106494cd6a3aeSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
106504cd6a3aeSmrgm4_define([_defopt], m4_default([$1], [auto]))
106514cd6a3aeSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
106524cd6a3aeSmrg	[Enable building unit test cases (default: ]_defopt[)]),
106534cd6a3aeSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
106544cd6a3aeSmrgm4_undefine([_defopt])
106554cd6a3aeSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
106564cd6a3aeSmrgAC_MSG_CHECKING([whether to build unit test cases])
106574cd6a3aeSmrgAC_MSG_RESULT([$enable_unit_tests])
106584cd6a3aeSmrg]) # XORG_ENABLE_UNIT_TESTS
106594cd6a3aeSmrg
106604cd6a3aeSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
106614cd6a3aeSmrg# ----------------------------------------
106624cd6a3aeSmrg# Minimum version: 1.13.0
106634cd6a3aeSmrg#
106644cd6a3aeSmrg# GLib is a library which provides advanced data structures and functions.
106654cd6a3aeSmrg# This macro enables a module to test for the presence of Glib.
106664cd6a3aeSmrg#
106674cd6a3aeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
106684cd6a3aeSmrg# Otherwise the value of $enable_unit_tests is blank.
106694cd6a3aeSmrg#
106704cd6a3aeSmrg# Interface to module:
106714cd6a3aeSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
106724cd6a3aeSmrg# with_glib: used in configure.ac to know if GLib has been found
106734cd6a3aeSmrg# --with-glib:	'yes' user instructs the module to use glib
106744cd6a3aeSmrg#		'no' user instructs the module not to use glib
106754cd6a3aeSmrg#
106764cd6a3aeSmrgAC_DEFUN([XORG_WITH_GLIB],[
106774cd6a3aeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
106784cd6a3aeSmrgm4_define([_defopt], m4_default([$2], [auto]))
106794cd6a3aeSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
106804cd6a3aeSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
106814cd6a3aeSmrg	[with_glib=$withval], [with_glib=]_defopt)
106824cd6a3aeSmrgm4_undefine([_defopt])
106834cd6a3aeSmrg
106844cd6a3aeSmrghave_glib=no
106854cd6a3aeSmrg# Do not probe GLib if user explicitly disabled unit testing
106864cd6a3aeSmrgif test "x$enable_unit_tests" != x"no"; then
106874cd6a3aeSmrg  # Do not probe GLib if user explicitly disabled it
106884cd6a3aeSmrg  if test "x$with_glib" != x"no"; then
106894cd6a3aeSmrg    m4_ifval(
106904cd6a3aeSmrg      [$1],
106914cd6a3aeSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
106924cd6a3aeSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
106934cd6a3aeSmrg    )
106944cd6a3aeSmrg  fi
106954cd6a3aeSmrgfi
106968c9fbc29Smrg
106974cd6a3aeSmrg# Not having GLib when unit testing has been explicitly requested is an error
106984cd6a3aeSmrgif test "x$enable_unit_tests" = x"yes"; then
106994cd6a3aeSmrg  if test "x$have_glib" = x"no"; then
107004cd6a3aeSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
107014cd6a3aeSmrg  fi
107024cd6a3aeSmrgfi
107038c9fbc29Smrg
107044cd6a3aeSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
107054cd6a3aeSmrgif test "x$enable_unit_tests" = x"no"; then
107064cd6a3aeSmrg  if test "x$with_glib" = x"yes"; then
107074cd6a3aeSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
107084cd6a3aeSmrg  fi
107094cd6a3aeSmrgfi
107108c9fbc29Smrg
107114cd6a3aeSmrg# Not having GLib when it has been explicitly requested is an error
107124cd6a3aeSmrgif test "x$with_glib" = x"yes"; then
107134cd6a3aeSmrg  if test "x$have_glib" = x"no"; then
107144cd6a3aeSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
107158c9fbc29Smrg  fi
107164cd6a3aeSmrgfi
107178c9fbc29Smrg
107184cd6a3aeSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
107194cd6a3aeSmrg]) # XORG_WITH_GLIB
107204cd6a3aeSmrg
107214cd6a3aeSmrg# XORG_LD_WRAP([required|optional])
107224cd6a3aeSmrg# ---------------------------------
107234cd6a3aeSmrg# Minimum version: 1.13.0
107248c9fbc29Smrg#
107254cd6a3aeSmrg# Check if linker supports -wrap, passed via compiler flags
107268c9fbc29Smrg#
107274cd6a3aeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
107284cd6a3aeSmrg# Otherwise the value of $enable_unit_tests is blank.
107294cd6a3aeSmrg#
107304cd6a3aeSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior
107314cd6a3aeSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
107324cd6a3aeSmrg# available, an argument of "optional" allows use when some unit tests require
107334cd6a3aeSmrg# ld -wrap and others do not.
107344cd6a3aeSmrg#
107354cd6a3aeSmrgAC_DEFUN([XORG_LD_WRAP],[
107364cd6a3aeSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
107374cd6a3aeSmrg    [AC_LANG_PROGRAM([#include <stdlib.h>
107384cd6a3aeSmrg                      void __wrap_exit(int status) { return; }],
107394cd6a3aeSmrg                     [exit(0);])])
107404cd6a3aeSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
107414cd6a3aeSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
107424cd6a3aeSmrg  if test "x$have_ld_wrap" = x"no"; then
107434cd6a3aeSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
107448c9fbc29Smrg  fi
107454cd6a3aeSmrgfi
107464cd6a3aeSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
107474cd6a3aeSmrg#
107484cd6a3aeSmrg]) # XORG_LD_WRAP
107498c9fbc29Smrg
107504cd6a3aeSmrg# XORG_CHECK_LINKER_FLAGS
107514cd6a3aeSmrg# -----------------------
107524cd6a3aeSmrg# SYNOPSIS
107534cd6a3aeSmrg#
107544cd6a3aeSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
107554cd6a3aeSmrg#
107564cd6a3aeSmrg# DESCRIPTION
107574cd6a3aeSmrg#
107584cd6a3aeSmrg#   Check whether the given linker FLAGS work with the current language's
107594cd6a3aeSmrg#   linker, or whether they give an error.
107604cd6a3aeSmrg#
107614cd6a3aeSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
107624cd6a3aeSmrg#   success/failure.
107634cd6a3aeSmrg#
107644cd6a3aeSmrg#   PROGRAM-SOURCE is the program source to link with, if needed
107654cd6a3aeSmrg#
107664cd6a3aeSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
107674cd6a3aeSmrg#
107684cd6a3aeSmrg# LICENSE
107694cd6a3aeSmrg#
107704cd6a3aeSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
107714cd6a3aeSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
107724cd6a3aeSmrg#   Copyright (c) 2009 Matteo Frigo
107734cd6a3aeSmrg#
107744cd6a3aeSmrg#   This program is free software: you can redistribute it and/or modify it
107754cd6a3aeSmrg#   under the terms of the GNU General Public License as published by the
107764cd6a3aeSmrg#   Free Software Foundation, either version 3 of the License, or (at your
107774cd6a3aeSmrg#   option) any later version.
107784cd6a3aeSmrg#
107794cd6a3aeSmrg#   This program is distributed in the hope that it will be useful, but
107804cd6a3aeSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
107814cd6a3aeSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
107824cd6a3aeSmrg#   Public License for more details.
107834cd6a3aeSmrg#
107844cd6a3aeSmrg#   You should have received a copy of the GNU General Public License along
107854cd6a3aeSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
107864cd6a3aeSmrg#
107874cd6a3aeSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
107884cd6a3aeSmrg#   gives unlimited permission to copy, distribute and modify the configure
107894cd6a3aeSmrg#   scripts that are the output of Autoconf when processing the Macro. You
107904cd6a3aeSmrg#   need not follow the terms of the GNU General Public License when using
107914cd6a3aeSmrg#   or distributing such scripts, even though portions of the text of the
107924cd6a3aeSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
107934cd6a3aeSmrg#   all other use of the material that constitutes the Autoconf Macro.
107944cd6a3aeSmrg#
107954cd6a3aeSmrg#   This special exception to the GPL applies to versions of the Autoconf
107964cd6a3aeSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
107974cd6a3aeSmrg#   modified version of the Autoconf Macro, you may extend this special
107984cd6a3aeSmrg#   exception to the GPL to apply to your modified version as well.#
107994cd6a3aeSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
108004cd6a3aeSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
108014cd6a3aeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
108024cd6a3aeSmrgAS_LITERAL_IF([$1],
108034cd6a3aeSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
108044cd6a3aeSmrg      ax_save_FLAGS=$LDFLAGS
108054cd6a3aeSmrg      LDFLAGS="$1"
108064cd6a3aeSmrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
108074cd6a3aeSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
108084cd6a3aeSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
108094cd6a3aeSmrg      LDFLAGS=$ax_save_FLAGS])],
108104cd6a3aeSmrg  [ax_save_FLAGS=$LDFLAGS
108114cd6a3aeSmrg   LDFLAGS="$1"
108124cd6a3aeSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
108134cd6a3aeSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
108144cd6a3aeSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
108154cd6a3aeSmrg   LDFLAGS=$ax_save_FLAGS])
108164cd6a3aeSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
108174cd6a3aeSmrgAC_MSG_RESULT($xorg_check_linker_flags)
108184cd6a3aeSmrgif test "x$xorg_check_linker_flags" = xyes; then
108194cd6a3aeSmrg	m4_default([$2], :)
108204cd6a3aeSmrgelse
108214cd6a3aeSmrg	m4_default([$3], :)
108224cd6a3aeSmrgfi
108234cd6a3aeSmrg]) # XORG_CHECK_LINKER_FLAGS
108248c9fbc29Smrg
108254cd6a3aeSmrg# XORG_MEMORY_CHECK_FLAGS
108264cd6a3aeSmrg# -----------------------
108274cd6a3aeSmrg# Minimum version: 1.16.0
108284cd6a3aeSmrg#
108294cd6a3aeSmrg# This macro attempts to find appropriate memory checking functionality
108304cd6a3aeSmrg# for various platforms which unit testing code may use to catch various
108314cd6a3aeSmrg# forms of memory allocation and access errors in testing.
108324cd6a3aeSmrg#
108334cd6a3aeSmrg# Interface to module:
108344cd6a3aeSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
108354cd6a3aeSmrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
108364cd6a3aeSmrg#
108374cd6a3aeSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
108384cd6a3aeSmrg#
108394cd6a3aeSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
108408c9fbc29Smrg
108414cd6a3aeSmrgAC_REQUIRE([AC_CANONICAL_HOST])
108424cd6a3aeSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
108434cd6a3aeSmrg           [Environment variables to enable memory checking in tests])
108448c9fbc29Smrg
108454cd6a3aeSmrg# Check for different types of support on different platforms
108464cd6a3aeSmrgcase $host_os in
108474cd6a3aeSmrg    solaris*)
108484cd6a3aeSmrg        AC_CHECK_LIB([umem], [umem_alloc],
108494cd6a3aeSmrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
108504cd6a3aeSmrg        ;;
108514cd6a3aeSmrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
108524cd6a3aeSmrg        # both directly and inverted, so should not be 0 or 255.
108534cd6a3aeSmrg        malloc_debug_env='MALLOC_PERTURB_=15'
108544cd6a3aeSmrg        ;;
108554cd6a3aeSmrg    darwin*)
108564cd6a3aeSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
108574cd6a3aeSmrg        ;;
108584cd6a3aeSmrg    *bsd*)
108594cd6a3aeSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
108604cd6a3aeSmrg        ;;
108614cd6a3aeSmrgesac
108628c9fbc29Smrg
108634cd6a3aeSmrg# User supplied flags override default flags
108644cd6a3aeSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
108654cd6a3aeSmrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
108664cd6a3aeSmrgfi
108678c9fbc29Smrg
108684cd6a3aeSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
108694cd6a3aeSmrg]) # XORG_WITH_LINT
108708c9fbc29Smrg
108714cd6a3aeSmrg# XORG_CHECK_MALLOC_ZERO
108724cd6a3aeSmrg# ----------------------
108734cd6a3aeSmrg# Minimum version: 1.0.0
108744cd6a3aeSmrg#
108754cd6a3aeSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
108764cd6a3aeSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
108774cd6a3aeSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
108784cd6a3aeSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
108794cd6a3aeSmrgAC_ARG_ENABLE(malloc0returnsnull,
108804cd6a3aeSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
108814cd6a3aeSmrg		       [malloc(0) returns NULL (default: auto)]),
108824cd6a3aeSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
108834cd6a3aeSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
108844cd6a3aeSmrg
108854cd6a3aeSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
108864cd6a3aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
108874cd6a3aeSmrg	AC_RUN_IFELSE([AC_LANG_PROGRAM([
108884cd6a3aeSmrg#include <stdlib.h>
108894cd6a3aeSmrg],[
108904cd6a3aeSmrg    char *m0, *r0, *c0, *p;
108914cd6a3aeSmrg    m0 = malloc(0);
108924cd6a3aeSmrg    p = malloc(10);
108934cd6a3aeSmrg    r0 = realloc(p,0);
108944cd6a3aeSmrg    c0 = calloc(0,10);
108954cd6a3aeSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
108964cd6a3aeSmrg])],
108974cd6a3aeSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
108984cd6a3aeSmrg		[MALLOC_ZERO_RETURNS_NULL=no],
108994cd6a3aeSmrg		[MALLOC_ZERO_RETURNS_NULL=yes])
109004cd6a3aeSmrgfi
109014cd6a3aeSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
109028c9fbc29Smrg
109034cd6a3aeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
109044cd6a3aeSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
109054cd6a3aeSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
109064cd6a3aeSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
109074cd6a3aeSmrgelse
109084cd6a3aeSmrg	MALLOC_ZERO_CFLAGS=""
109094cd6a3aeSmrg	XMALLOC_ZERO_CFLAGS=""
109104cd6a3aeSmrg	XTMALLOC_ZERO_CFLAGS=""
109114cd6a3aeSmrgfi
109124e411241Smrg
109134cd6a3aeSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
109144cd6a3aeSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
109154cd6a3aeSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
109164cd6a3aeSmrg]) # XORG_CHECK_MALLOC_ZERO
109174e411241Smrg
109184cd6a3aeSmrg# XORG_WITH_LINT()
109194e411241Smrg# ----------------
109204cd6a3aeSmrg# Minimum version: 1.1.0
109214cd6a3aeSmrg#
109224cd6a3aeSmrg# This macro enables the use of a tool that flags some suspicious and
109234cd6a3aeSmrg# non-portable constructs (likely to be bugs) in C language source code.
109244cd6a3aeSmrg# It will attempt to locate the tool and use appropriate options.
109254cd6a3aeSmrg# There are various lint type tools on different platforms.
109264cd6a3aeSmrg#
109274cd6a3aeSmrg# Interface to module:
109284cd6a3aeSmrg# LINT:		returns the path to the tool found on the platform
109294cd6a3aeSmrg#		or the value set to LINT on the configure cmd line
109304cd6a3aeSmrg#		also an Automake conditional
109314cd6a3aeSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
109324cd6a3aeSmrg#
109334cd6a3aeSmrg# --with-lint:	'yes' user instructs the module to use lint
109344cd6a3aeSmrg#		'no' user instructs the module not to use lint (default)
109354cd6a3aeSmrg#
109364cd6a3aeSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
109374cd6a3aeSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
109384cd6a3aeSmrg#
109394cd6a3aeSmrgAC_DEFUN([XORG_WITH_LINT],[
109404cd6a3aeSmrg
109414cd6a3aeSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
109424cd6a3aeSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
109434cd6a3aeSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
109444cd6a3aeSmrg		[Use a lint-style source code checker (default: disabled)])],
109454cd6a3aeSmrg		[use_lint=$withval], [use_lint=no])
109464cd6a3aeSmrg
109474cd6a3aeSmrg# Obtain platform specific info like program name and options
109484cd6a3aeSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
109494cd6a3aeSmrgcase $host_os in
109504cd6a3aeSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
109514cd6a3aeSmrg	lint_name=splint
109524cd6a3aeSmrg	lint_options="-badflag"
109534cd6a3aeSmrg	;;
109544cd6a3aeSmrg  *freebsd* | *netbsd*)
109554cd6a3aeSmrg	lint_name=lint
109564cd6a3aeSmrg	lint_options="-u -b"
109574cd6a3aeSmrg	;;
109584cd6a3aeSmrg  *solaris*)
109594cd6a3aeSmrg	lint_name=lint
109604cd6a3aeSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
109614cd6a3aeSmrg	;;
109624cd6a3aeSmrgesac
109634cd6a3aeSmrg
109644cd6a3aeSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
109654cd6a3aeSmrgif test "x$use_lint" = x"yes" ; then
109664cd6a3aeSmrg   AC_PATH_PROG([LINT], [$lint_name])
109674cd6a3aeSmrg   if test "x$LINT" = "x"; then
109684cd6a3aeSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
109694cd6a3aeSmrg   fi
109704cd6a3aeSmrgelif test "x$use_lint" = x"no" ; then
109714cd6a3aeSmrg   if test "x$LINT" != "x"; then
109724cd6a3aeSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
109734cd6a3aeSmrg   fi
109744e411241Smrgelse
109754cd6a3aeSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
109764e411241Smrgfi
109774e411241Smrg
109784cd6a3aeSmrg# User supplied flags override default flags
109794cd6a3aeSmrgif test "x$LINT_FLAGS" != "x"; then
109804cd6a3aeSmrg   lint_options=$LINT_FLAGS
109814cd6a3aeSmrgfi
109824e411241Smrg
109834cd6a3aeSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
109844cd6a3aeSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
109854cd6a3aeSmrg
109864cd6a3aeSmrg]) # XORG_WITH_LINT
109874cd6a3aeSmrg
109884cd6a3aeSmrg# XORG_LINT_LIBRARY(LIBNAME)
109894cd6a3aeSmrg# --------------------------
109904cd6a3aeSmrg# Minimum version: 1.1.0
109914cd6a3aeSmrg#
109924cd6a3aeSmrg# Sets up flags for building lint libraries for checking programs that call
109934cd6a3aeSmrg# functions in the library.
109944cd6a3aeSmrg#
109954cd6a3aeSmrg# Interface to module:
109964cd6a3aeSmrg# LINTLIB		- Automake variable with the name of lint library file to make
109974cd6a3aeSmrg# MAKE_LINT_LIB		- Automake conditional
109984cd6a3aeSmrg#
109994cd6a3aeSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
110004cd6a3aeSmrg#			  - 'no' user instructs the module not to create a lint library (default)
110018c9fbc29Smrg
110024cd6a3aeSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
110034cd6a3aeSmrgAC_REQUIRE([XORG_WITH_LINT])
110044cd6a3aeSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
110054cd6a3aeSmrg	[Create lint library (default: disabled)])],
110064cd6a3aeSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
110074cd6a3aeSmrg
110084cd6a3aeSmrgif test "x$make_lint_lib" = x"yes" ; then
110094cd6a3aeSmrg   LINTLIB=llib-l$1.ln
110104cd6a3aeSmrg   if test "x$LINT" = "x"; then
110114cd6a3aeSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
110124cd6a3aeSmrg   fi
110134cd6a3aeSmrgelif test "x$make_lint_lib" != x"no" ; then
110144cd6a3aeSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
110154cd6a3aeSmrgfi
110164cd6a3aeSmrg
110174cd6a3aeSmrgAC_SUBST(LINTLIB)
110184cd6a3aeSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
110194cd6a3aeSmrg
110204cd6a3aeSmrg]) # XORG_LINT_LIBRARY
110214cd6a3aeSmrg
110224cd6a3aeSmrg# XORG_COMPILER_BRAND
110234cd6a3aeSmrg# -------------------
110244cd6a3aeSmrg# Minimum version: 1.14.0
110258c9fbc29Smrg#
110264cd6a3aeSmrg# Checks for various brands of compilers and sets flags as appropriate:
110274cd6a3aeSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
110284cd6a3aeSmrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
110294cd6a3aeSmrg#   clang compiler - sets CLANGCC to "yes"
110304cd6a3aeSmrg#   Intel compiler - sets INTELCC to "yes"
110314cd6a3aeSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
110328c9fbc29Smrg#
110334cd6a3aeSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
110344cd6a3aeSmrgAC_LANG_CASE(
110354cd6a3aeSmrg	[C], [
110364cd6a3aeSmrg		AC_REQUIRE([AC_PROG_CC_C99])
110374cd6a3aeSmrg	],
110384cd6a3aeSmrg	[C++], [
110394cd6a3aeSmrg		AC_REQUIRE([AC_PROG_CXX])
110404cd6a3aeSmrg	]
110414cd6a3aeSmrg)
110424cd6a3aeSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
110434cd6a3aeSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
110444cd6a3aeSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
110454cd6a3aeSmrg]) # XORG_COMPILER_BRAND
110464cd6a3aeSmrg
110474cd6a3aeSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
110484cd6a3aeSmrg# ---------------
110494cd6a3aeSmrg# Minimum version: 1.16.0
110508c9fbc29Smrg#
110514cd6a3aeSmrg# Test if the compiler works when passed the given flag as a command line argument.
110524cd6a3aeSmrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
110534cd6a3aeSmrg# next flag in the list until there are no more options.
110548c9fbc29Smrg#
110554cd6a3aeSmrg# Note that this does not guarantee that the compiler supports the flag as some
110564cd6a3aeSmrg# compilers will simply ignore arguments that they do not understand, but we do
110574cd6a3aeSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
110584cd6a3aeSmrg# -Werror=unused-command-line-argument
110594cd6a3aeSmrg#
110604cd6a3aeSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
110614cd6a3aeSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
110624cd6a3aeSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
110634cd6a3aeSmrg
110644cd6a3aeSmrgAC_LANG_COMPILER_REQUIRE
110654cd6a3aeSmrg
110664cd6a3aeSmrgAC_LANG_CASE(
110674cd6a3aeSmrg	[C], [
110684cd6a3aeSmrg		AC_REQUIRE([AC_PROG_CC_C99])
110694cd6a3aeSmrg		define([PREFIX], [C])
110704cd6a3aeSmrg	],
110714cd6a3aeSmrg	[C++], [
110724cd6a3aeSmrg		define([PREFIX], [CXX])
110734cd6a3aeSmrg	]
110744cd6a3aeSmrg)
110758c9fbc29Smrg
110764cd6a3aeSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
110774cd6a3aeSmrg
110784cd6a3aeSmrgif test "x$xorg_testset_unknown_warning_option" = "x" ; then
110794cd6a3aeSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
110804cd6a3aeSmrg	AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option],
110814cd6a3aeSmrg			xorg_cv_compiler_flag_unknown_warning_option,
110824cd6a3aeSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
110834cd6a3aeSmrg					  [xorg_cv_compiler_flag_unknown_warning_option=yes],
110844cd6a3aeSmrg					  [xorg_cv_compiler_flag_unknown_warning_option=no]))
110854cd6a3aeSmrg	xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
110864cd6a3aeSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
110878c9fbc29Smrgfi
110884cd6a3aeSmrg
110894cd6a3aeSmrgif test "x$xorg_testset_unused_command_line_argument" = "x" ; then
110904cd6a3aeSmrg	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
110914cd6a3aeSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
110928c9fbc29Smrg	fi
110934cd6a3aeSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
110944cd6a3aeSmrg	AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument],
110954cd6a3aeSmrg			xorg_cv_compiler_flag_unused_command_line_argument,
110964cd6a3aeSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
110974cd6a3aeSmrg					  [xorg_cv_compiler_flag_unused_command_line_argument=yes],
110984cd6a3aeSmrg					  [xorg_cv_compiler_flag_unused_command_line_argument=no]))
110994cd6a3aeSmrg	xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
111004cd6a3aeSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
111014cd6a3aeSmrgfi
111028c9fbc29Smrg
111034cd6a3aeSmrgfound="no"
111044cd6a3aeSmrgm4_foreach([flag], m4_cdr($@), [
111054cd6a3aeSmrg	if test $found = "no" ; then
111064cd6a3aeSmrg		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
111074cd6a3aeSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
111084cd6a3aeSmrg		fi
111094cd6a3aeSmrg
111104cd6a3aeSmrg		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
111114cd6a3aeSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
111124cd6a3aeSmrg		fi
111134cd6a3aeSmrg
111144cd6a3aeSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
111154cd6a3aeSmrg
111164cd6a3aeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
111174cd6a3aeSmrg		AC_MSG_CHECKING([if $CC supports ]flag[])
111184cd6a3aeSmrg		cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
111194cd6a3aeSmrg		AC_CACHE_VAL(AS_TR_SH($cacheid),
111204cd6a3aeSmrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
111214cd6a3aeSmrg					     [eval AS_TR_SH($cacheid)=yes],
111224cd6a3aeSmrg					     [eval AS_TR_SH($cacheid)=no])])
111234cd6a3aeSmrg
111244cd6a3aeSmrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
111254cd6a3aeSmrg
111264cd6a3aeSmrg		eval supported=$AS_TR_SH($cacheid)
111274cd6a3aeSmrg		AC_MSG_RESULT([$supported])
111284cd6a3aeSmrg		if test "$supported" = "yes" ; then
111294cd6a3aeSmrg			$1="$$1 ]flag["
111304cd6a3aeSmrg			found="yes"
111314cd6a3aeSmrg		fi
111324cd6a3aeSmrg	fi
111334cd6a3aeSmrg])
111344cd6a3aeSmrg]) # XORG_TESTSET_CFLAG
111354cd6a3aeSmrg
111364cd6a3aeSmrg# XORG_COMPILER_FLAGS
111374cd6a3aeSmrg# ---------------
111384cd6a3aeSmrg# Minimum version: 1.16.0
111398c9fbc29Smrg#
111404cd6a3aeSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
111414cd6a3aeSmrg# arguments supported by the selected compiler which do NOT alter the generated
111424cd6a3aeSmrg# code.  These arguments will cause the compiler to print various warnings
111434cd6a3aeSmrg# during compilation AND turn a conservative set of warnings into errors.
111448c9fbc29Smrg#
111454cd6a3aeSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
111464cd6a3aeSmrg# future versions of util-macros as options are added to new compilers.
111478c9fbc29Smrg#
111484cd6a3aeSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
111494cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
111504cd6a3aeSmrg
111514cd6a3aeSmrgAC_ARG_ENABLE(selective-werror,
111524cd6a3aeSmrg              AS_HELP_STRING([--disable-selective-werror],
111534cd6a3aeSmrg                             [Turn off selective compiler errors. (default: enabled)]),
111544cd6a3aeSmrg              [SELECTIVE_WERROR=$enableval],
111554cd6a3aeSmrg              [SELECTIVE_WERROR=yes])
111564cd6a3aeSmrg
111574cd6a3aeSmrgAC_LANG_CASE(
111584cd6a3aeSmrg        [C], [
111594cd6a3aeSmrg                define([PREFIX], [C])
111604cd6a3aeSmrg        ],
111614cd6a3aeSmrg        [C++], [
111624cd6a3aeSmrg                define([PREFIX], [CXX])
111634cd6a3aeSmrg        ]
111644cd6a3aeSmrg)
111654cd6a3aeSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
111664cd6a3aeSmrgif test "x$SUNCC" = "xyes"; then
111674cd6a3aeSmrg    [BASE_]PREFIX[FLAGS]="-v"
111684cd6a3aeSmrgelse
111694cd6a3aeSmrg    [BASE_]PREFIX[FLAGS]=""
111704cd6a3aeSmrgfi
111718c9fbc29Smrg
111724cd6a3aeSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
111734cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
111744cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
111754cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
111764cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
111774cd6a3aeSmrg
111784cd6a3aeSmrgAC_LANG_CASE(
111794cd6a3aeSmrg	[C], [
111804cd6a3aeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
111814cd6a3aeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
111824cd6a3aeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
111834cd6a3aeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
111844cd6a3aeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
111854cd6a3aeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
111864cd6a3aeSmrg	]
111874cd6a3aeSmrg)
111888c9fbc29Smrg
111894cd6a3aeSmrg# This chunk adds additional warnings that could catch undesired effects.
111904cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
111914cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
111924cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
111934cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
111944cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
111954cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
111964cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
111974cd6a3aeSmrg
111984cd6a3aeSmrg# These are currently disabled because they are noisy.  They will be enabled
111994cd6a3aeSmrg# in the future once the codebase is sufficiently modernized to silence
112004cd6a3aeSmrg# them.  For now, I don't want them to drown out the other warnings.
112014cd6a3aeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
112024cd6a3aeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
112034cd6a3aeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
112044cd6a3aeSmrg
112054cd6a3aeSmrg# Turn some warnings into errors, so we don't accidently get successful builds
112064cd6a3aeSmrg# when there are problems that should be fixed.
112074cd6a3aeSmrg
112084cd6a3aeSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
112094cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
112104cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
112114cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
112124cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
112134cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
112144cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
112154cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
112164cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
112174cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
112184cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
112194cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
112204cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
112214cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
112224e411241Smrgelse
112234cd6a3aeSmrgAC_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])
112244cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
112254cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
112264cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
112274cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
112284cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
112294cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
112304cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
112314cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
112324cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
112334cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
112344cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
112354cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
112364cd6a3aeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
112374cd6a3aeSmrgfi
112384e411241Smrg
112394cd6a3aeSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
112404cd6a3aeSmrg]) # XORG_COMPILER_FLAGS
112414e411241Smrg
112424cd6a3aeSmrg# XORG_CWARNFLAGS
112434cd6a3aeSmrg# ---------------
112444cd6a3aeSmrg# Minimum version: 1.2.0
112454cd6a3aeSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
112468c9fbc29Smrg#
112474cd6a3aeSmrg# Defines CWARNFLAGS to enable C compiler warnings.
112488c9fbc29Smrg#
112494cd6a3aeSmrg# This function is deprecated because it defines -fno-strict-aliasing
112504cd6a3aeSmrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
112514cd6a3aeSmrg# is needed, then it should be added explicitly in the module when
112524cd6a3aeSmrg# it is updated to use BASE_CFLAGS.
112538c9fbc29Smrg#
112544cd6a3aeSmrgAC_DEFUN([XORG_CWARNFLAGS], [
112554cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
112564cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
112574cd6a3aeSmrgAC_LANG_CASE(
112584cd6a3aeSmrg	[C], [
112594cd6a3aeSmrg		CWARNFLAGS="$BASE_CFLAGS"
112604cd6a3aeSmrg		if  test "x$GCC" = xyes ; then
112614cd6a3aeSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
112624cd6a3aeSmrg		fi
112634cd6a3aeSmrg		AC_SUBST(CWARNFLAGS)
112644cd6a3aeSmrg	]
112654cd6a3aeSmrg)
112664cd6a3aeSmrg]) # XORG_CWARNFLAGS
112678c9fbc29Smrg
112684cd6a3aeSmrg# XORG_STRICT_OPTION
112694cd6a3aeSmrg# -----------------------
112704cd6a3aeSmrg# Minimum version: 1.3.0
112714cd6a3aeSmrg#
112724cd6a3aeSmrg# Add configure option to enable strict compilation flags, such as treating
112734cd6a3aeSmrg# warnings as fatal errors.
112744cd6a3aeSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
112754cd6a3aeSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
112764cd6a3aeSmrg#
112774cd6a3aeSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
112784cd6a3aeSmrg# when strict compilation is unconditionally desired.
112794cd6a3aeSmrgAC_DEFUN([XORG_STRICT_OPTION], [
112804cd6a3aeSmrgAC_REQUIRE([XORG_CWARNFLAGS])
112814cd6a3aeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
112828c9fbc29Smrg
112834cd6a3aeSmrgAC_ARG_ENABLE(strict-compilation,
112844cd6a3aeSmrg			  AS_HELP_STRING([--enable-strict-compilation],
112854cd6a3aeSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
112864cd6a3aeSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
112878c9fbc29Smrg
112884cd6a3aeSmrgAC_LANG_CASE(
112894cd6a3aeSmrg        [C], [
112904cd6a3aeSmrg                define([PREFIX], [C])
112914cd6a3aeSmrg        ],
112924cd6a3aeSmrg        [C++], [
112934cd6a3aeSmrg                define([PREFIX], [CXX])
112944cd6a3aeSmrg        ]
112954cd6a3aeSmrg)
112964e411241Smrg
112974cd6a3aeSmrg[STRICT_]PREFIX[FLAGS]=""
112984cd6a3aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
112994cd6a3aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
113008c9fbc29Smrg
113014cd6a3aeSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
113024cd6a3aeSmrg# activate it with -Werror, so we add it here explicitly.
113034cd6a3aeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
113044e411241Smrg
113054cd6a3aeSmrgif test "x$STRICT_COMPILE" = "xyes"; then
113064cd6a3aeSmrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
113074cd6a3aeSmrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
113084cd6a3aeSmrgfi
113094cd6a3aeSmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
113104cd6a3aeSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
113114cd6a3aeSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
113124cd6a3aeSmrg]) # XORG_STRICT_OPTION
113134e411241Smrg
113144cd6a3aeSmrg# XORG_DEFAULT_OPTIONS
113154cd6a3aeSmrg# --------------------
113164cd6a3aeSmrg# Minimum version: 1.3.0
113174cd6a3aeSmrg#
113184cd6a3aeSmrg# Defines default options for X.Org modules.
113194cd6a3aeSmrg#
113204cd6a3aeSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
113214cd6a3aeSmrgAC_REQUIRE([AC_PROG_INSTALL])
113224cd6a3aeSmrgXORG_COMPILER_FLAGS
113234cd6a3aeSmrgXORG_CWARNFLAGS
113244cd6a3aeSmrgXORG_STRICT_OPTION
113254cd6a3aeSmrgXORG_RELEASE_VERSION
113264cd6a3aeSmrgXORG_CHANGELOG
113274cd6a3aeSmrgXORG_INSTALL
113284cd6a3aeSmrgXORG_MANPAGE_SECTIONS
113294cd6a3aeSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
113304cd6a3aeSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
113314cd6a3aeSmrg]) # XORG_DEFAULT_OPTIONS
113328c9fbc29Smrg
113334cd6a3aeSmrg# XORG_INSTALL()
113344cd6a3aeSmrg# ----------------
113354cd6a3aeSmrg# Minimum version: 1.4.0
113364cd6a3aeSmrg#
113374cd6a3aeSmrg# Defines the variable INSTALL_CMD as the command to copy
113384cd6a3aeSmrg# INSTALL from $prefix/share/util-macros.
113394cd6a3aeSmrg#
113404cd6a3aeSmrgAC_DEFUN([XORG_INSTALL], [
113414cd6a3aeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
113424cd6a3aeSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
113434cd6a3aeSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
113444cd6a3aeSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
113454cd6a3aeSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
113464cd6a3aeSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
113474cd6a3aeSmrgAC_SUBST([INSTALL_CMD])
113484cd6a3aeSmrg]) # XORG_INSTALL
113494cd6a3aeSmrgdnl Copyright 2005 Red Hat, Inc
113504cd6a3aeSmrgdnl
113514cd6a3aeSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
113524cd6a3aeSmrgdnl documentation for any purpose is hereby granted without fee, provided that
113534cd6a3aeSmrgdnl the above copyright notice appear in all copies and that both that
113544cd6a3aeSmrgdnl copyright notice and this permission notice appear in supporting
113554cd6a3aeSmrgdnl documentation.
113564cd6a3aeSmrgdnl
113574cd6a3aeSmrgdnl The above copyright notice and this permission notice shall be included
113584cd6a3aeSmrgdnl in all copies or substantial portions of the Software.
113594cd6a3aeSmrgdnl
113604cd6a3aeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
113614cd6a3aeSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
113624cd6a3aeSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
113634cd6a3aeSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
113644cd6a3aeSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
113654cd6a3aeSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
113664cd6a3aeSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
113674cd6a3aeSmrgdnl
113684cd6a3aeSmrgdnl Except as contained in this notice, the name of the copyright holders shall
113694cd6a3aeSmrgdnl not be used in advertising or otherwise to promote the sale, use or
113704cd6a3aeSmrgdnl other dealings in this Software without prior written authorization
113714cd6a3aeSmrgdnl from the copyright holders.
113724cd6a3aeSmrgdnl
113738c9fbc29Smrg
113744cd6a3aeSmrg# XORG_RELEASE_VERSION
113754cd6a3aeSmrg# --------------------
113764cd6a3aeSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
113774cd6a3aeSmrg 
113784cd6a3aeSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
113794cd6a3aeSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
113804cd6a3aeSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
113814cd6a3aeSmrg		[Major version of this package])
113824cd6a3aeSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
113834cd6a3aeSmrg	if test "x$PVM" = "x"; then
113844cd6a3aeSmrg		PVM="0"
113854cd6a3aeSmrg	fi
113864cd6a3aeSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
113874cd6a3aeSmrg		[$PVM],
113884cd6a3aeSmrg		[Minor version of this package])
113894cd6a3aeSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
113904cd6a3aeSmrg	if test "x$PVP" = "x"; then
113914cd6a3aeSmrg		PVP="0"
113924cd6a3aeSmrg	fi
113934cd6a3aeSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
113944cd6a3aeSmrg		[$PVP],
113954cd6a3aeSmrg		[Patch version of this package])
113964cd6a3aeSmrg])
113978c9fbc29Smrg
113984cd6a3aeSmrg# XORG_CHANGELOG()
113994cd6a3aeSmrg# ----------------
114004cd6a3aeSmrg# Minimum version: 1.2.0
114014cd6a3aeSmrg#
114024cd6a3aeSmrg# Defines the variable CHANGELOG_CMD as the command to generate
114034cd6a3aeSmrg# ChangeLog from git.
114044cd6a3aeSmrg#
114054cd6a3aeSmrg#
114064cd6a3aeSmrgAC_DEFUN([XORG_CHANGELOG], [
114074cd6a3aeSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
114084cd6a3aeSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
114094cd6a3aeSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
114104cd6a3aeSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
114114cd6a3aeSmrgAC_SUBST([CHANGELOG_CMD])
114124cd6a3aeSmrg]) # XORG_CHANGELOG
114138c9fbc29Smrg
11414