aclocal.m4 revision 8223e2f2
16747b715Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
205b261ecSmrg
305b261ecSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4b1d344b3Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
505b261ecSmrg# This file is free software; the Free Software Foundation
605b261ecSmrg# gives unlimited permission to copy and/or distribute it,
705b261ecSmrg# with or without modifications, as long as this notice is preserved.
805b261ecSmrg
905b261ecSmrg# This program is distributed in the hope that it will be useful,
1005b261ecSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1105b261ecSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1205b261ecSmrg# PARTICULAR PURPOSE.
1305b261ecSmrg
1405b261ecSmrgm4_ifndef([AC_AUTOCONF_VERSION],
1505b261ecSmrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
166747b715Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
176747b715Smrg[m4_warning([this file was generated for autoconf 2.68.
1805b261ecSmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
1905b261ecSmrgIf you have problems, you may need to regenerate the build system entirely.
2005b261ecSmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
2105b261ecSmrg
226747b715Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
234642e01fSmrg#
246747b715Smrg# This file is free software; the Free Software Foundation
256747b715Smrg# gives unlimited permission to copy and/or distribute it,
266747b715Smrg# with or without modifications, as long as this notice is preserved.
274642e01fSmrg
286747b715Smrg# AM_AUTOMAKE_VERSION(VERSION)
296747b715Smrg# ----------------------------
306747b715Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
316747b715Smrg# generated from the m4 files accompanying Automake X.Y.
326747b715Smrg# (This private macro should not be called outside this file.)
336747b715SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
346747b715Smrg[am__api_version='1.11'
356747b715Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
366747b715Smrgdnl require some minimum version.  Point them to the right macro.
376747b715Smrgm4_if([$1], [1.11.1], [],
386747b715Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
394642e01fSmrg])
4005b261ecSmrg
416747b715Smrg# _AM_AUTOCONF_VERSION(VERSION)
426747b715Smrg# -----------------------------
436747b715Smrg# aclocal traces this macro to find the Autoconf version.
446747b715Smrg# This is a private macro too.  Using m4_define simplifies
456747b715Smrg# the logic in aclocal, which can simply ignore this definition.
466747b715Smrgm4_define([_AM_AUTOCONF_VERSION], [])
4705b261ecSmrg
486747b715Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
496747b715Smrg# -------------------------------
506747b715Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
516747b715Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
526747b715SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
536747b715Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
546747b715Smrgm4_ifndef([AC_AUTOCONF_VERSION],
556747b715Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
566747b715Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5705b261ecSmrg
586747b715Smrg# Figure out how to run the assembler.                      -*- Autoconf -*-
5905b261ecSmrg
606747b715Smrg# Copyright (C) 2001, 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
616747b715Smrg#
626747b715Smrg# This file is free software; the Free Software Foundation
636747b715Smrg# gives unlimited permission to copy and/or distribute it,
646747b715Smrg# with or without modifications, as long as this notice is preserved.
6505b261ecSmrg
666747b715Smrg# serial 5
676747b715Smrg
686747b715Smrg# AM_PROG_AS
696747b715Smrg# ----------
706747b715SmrgAC_DEFUN([AM_PROG_AS],
716747b715Smrg[# By default we simply use the C compiler to build assembly code.
726747b715SmrgAC_REQUIRE([AC_PROG_CC])
736747b715Smrgtest "${CCAS+set}" = set || CCAS=$CC
746747b715Smrgtest "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
756747b715SmrgAC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
766747b715SmrgAC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
776747b715Smrg_AM_IF_OPTION([no-dependencies],, [_AM_DEPENDENCIES([CCAS])])dnl
784642e01fSmrg])
794642e01fSmrg
806747b715Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
814642e01fSmrg
826747b715Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
836747b715Smrg#
846747b715Smrg# This file is free software; the Free Software Foundation
856747b715Smrg# gives unlimited permission to copy and/or distribute it,
866747b715Smrg# with or without modifications, as long as this notice is preserved.
874642e01fSmrg
886747b715Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
896747b715Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
906747b715Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
916747b715Smrg#
926747b715Smrg# Of course, Automake must honor this variable whenever it calls a
936747b715Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
946747b715Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
956747b715Smrg# depending on how configure is run.  This is pretty annoying, since
966747b715Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
976747b715Smrg# source directory, any form will work fine, but in subdirectories a
986747b715Smrg# relative path needs to be adjusted first.
996747b715Smrg#
1006747b715Smrg# $ac_aux_dir/missing
1016747b715Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
1026747b715Smrg# $top_srcdir/$ac_aux_dir/missing
1036747b715Smrg#    fails if $ac_aux_dir is absolute,
1046747b715Smrg#    fails when called from a subdirectory in a VPATH build with
1056747b715Smrg#          a relative $ac_aux_dir
1066747b715Smrg#
1076747b715Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
1086747b715Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
1096747b715Smrg# harmless because $srcdir is `.', but things will broke when you
1106747b715Smrg# start a VPATH build or use an absolute $srcdir.
1116747b715Smrg#
1126747b715Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
1136747b715Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
1146747b715Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
1156747b715Smrg# and then we would define $MISSING as
1166747b715Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
1176747b715Smrg# This will work as long as MISSING is not called from configure, because
1186747b715Smrg# unfortunately $(top_srcdir) has no meaning in configure.
1196747b715Smrg# However there are other variables, like CC, which are often used in
1206747b715Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
1216747b715Smrg#
1226747b715Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
1236747b715Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
1246747b715Smrg# configured tree to be moved without reconfiguration.
1254642e01fSmrg
1266747b715SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
1276747b715Smrg[dnl Rely on autoconf to set up CDPATH properly.
1286747b715SmrgAC_PREREQ([2.50])dnl
1296747b715Smrg# expand $ac_aux_dir to an absolute path
1306747b715Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
1316747b715Smrg])
13205b261ecSmrg
1336747b715Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
13405b261ecSmrg
1356747b715Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
1366747b715Smrg# Free Software Foundation, Inc.
1376747b715Smrg#
1386747b715Smrg# This file is free software; the Free Software Foundation
1396747b715Smrg# gives unlimited permission to copy and/or distribute it,
1406747b715Smrg# with or without modifications, as long as this notice is preserved.
14105b261ecSmrg
1426747b715Smrg# serial 9
14305b261ecSmrg
1446747b715Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
1456747b715Smrg# -------------------------------------
1466747b715Smrg# Define a conditional.
1476747b715SmrgAC_DEFUN([AM_CONDITIONAL],
1486747b715Smrg[AC_PREREQ(2.52)dnl
1496747b715Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
1506747b715Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
1516747b715SmrgAC_SUBST([$1_TRUE])dnl
1526747b715SmrgAC_SUBST([$1_FALSE])dnl
1536747b715Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
1546747b715Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
1556747b715Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
1566747b715Smrgif $2; then
1576747b715Smrg  $1_TRUE=
1586747b715Smrg  $1_FALSE='#'
1596747b715Smrgelse
1606747b715Smrg  $1_TRUE='#'
1616747b715Smrg  $1_FALSE=
1626747b715Smrgfi
1636747b715SmrgAC_CONFIG_COMMANDS_PRE(
1646747b715Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
1656747b715Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
1666747b715SmrgUsually this means the macro was only invoked conditionally.]])
1676747b715Smrgfi])])
16805b261ecSmrg
1696747b715Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
1706747b715Smrg# Free Software Foundation, Inc.
1716747b715Smrg#
1726747b715Smrg# This file is free software; the Free Software Foundation
1736747b715Smrg# gives unlimited permission to copy and/or distribute it,
1746747b715Smrg# with or without modifications, as long as this notice is preserved.
1754642e01fSmrg
1766747b715Smrg# serial 10
1774642e01fSmrg
1786747b715Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
1796747b715Smrg# written in clear, in which case automake, when reading aclocal.m4,
1806747b715Smrg# will think it sees a *use*, and therefore will trigger all it's
1816747b715Smrg# C support machinery.  Also note that it means that autoscan, seeing
1826747b715Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
1834642e01fSmrg
1844642e01fSmrg
1856747b715Smrg# _AM_DEPENDENCIES(NAME)
1864642e01fSmrg# ----------------------
1876747b715Smrg# See how the compiler implements dependency checking.
1886747b715Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
1896747b715Smrg# We try a few techniques and use that to set a single cache variable.
1906747b715Smrg#
1916747b715Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
1926747b715Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
1936747b715Smrg# dependency, and given that the user is not expected to run this macro,
1946747b715Smrg# just rely on AC_PROG_CC.
1956747b715SmrgAC_DEFUN([_AM_DEPENDENCIES],
1966747b715Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
1976747b715SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
1986747b715SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
1996747b715SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
2004642e01fSmrg
2016747b715Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
2026747b715Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
2036747b715Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
2046747b715Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
2056747b715Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
2066747b715Smrg                   [depcc="$$1"   am_compiler_list=])
20705b261ecSmrg
2086747b715SmrgAC_CACHE_CHECK([dependency style of $depcc],
2096747b715Smrg               [am_cv_$1_dependencies_compiler_type],
2106747b715Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
2116747b715Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
2126747b715Smrg  # making bogus files that we don't know about and never remove.  For
2136747b715Smrg  # instance it was reported that on HP-UX the gcc test will end up
2146747b715Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
2156747b715Smrg  # in D'.
2166747b715Smrg  mkdir conftest.dir
2176747b715Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
2186747b715Smrg  # using a relative directory.
2196747b715Smrg  cp "$am_depcomp" conftest.dir
2206747b715Smrg  cd conftest.dir
2216747b715Smrg  # We will build objects and dependencies in a subdirectory because
2226747b715Smrg  # it helps to detect inapplicable dependency modes.  For instance
2236747b715Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
2246747b715Smrg  # side effect of compilation, but ICC will put the dependencies in
2256747b715Smrg  # the current directory while Tru64 will put them in the object
2266747b715Smrg  # directory.
2276747b715Smrg  mkdir sub
22805b261ecSmrg
2296747b715Smrg  am_cv_$1_dependencies_compiler_type=none
2306747b715Smrg  if test "$am_compiler_list" = ""; then
2316747b715Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
23205b261ecSmrg  fi
2336747b715Smrg  am__universal=false
2346747b715Smrg  m4_case([$1], [CC],
2356747b715Smrg    [case " $depcc " in #(
2366747b715Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2376747b715Smrg     esac],
2386747b715Smrg    [CXX],
2396747b715Smrg    [case " $depcc " in #(
2406747b715Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
2416747b715Smrg     esac])
2424642e01fSmrg
2436747b715Smrg  for depmode in $am_compiler_list; do
2446747b715Smrg    # Setup a source with many dependencies, because some compilers
2456747b715Smrg    # like to wrap large dependency lists on column 80 (with \), and
2466747b715Smrg    # we should not choose a depcomp mode which is confused by this.
2476747b715Smrg    #
2486747b715Smrg    # We need to recreate these files for each test, as the compiler may
2496747b715Smrg    # overwrite some of them when testing with obscure command lines.
2506747b715Smrg    # This happens at least with the AIX C compiler.
2516747b715Smrg    : > sub/conftest.c
2526747b715Smrg    for i in 1 2 3 4 5 6; do
2536747b715Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
2546747b715Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
2556747b715Smrg      # Solaris 8's {/usr,}/bin/sh.
2566747b715Smrg      touch sub/conftst$i.h
2576747b715Smrg    done
2586747b715Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
25905b261ecSmrg
2606747b715Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
2616747b715Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
2626747b715Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
2636747b715Smrg    # versions had trouble with output in subdirs
2646747b715Smrg    am__obj=sub/conftest.${OBJEXT-o}
2656747b715Smrg    am__minus_obj="-o $am__obj"
2666747b715Smrg    case $depmode in
2676747b715Smrg    gcc)
2686747b715Smrg      # This depmode causes a compiler race in universal mode.
2696747b715Smrg      test "$am__universal" = false || continue
2706747b715Smrg      ;;
2716747b715Smrg    nosideeffect)
2726747b715Smrg      # after this tag, mechanisms are not by side-effect, so they'll
2736747b715Smrg      # only be used when explicitly requested
2746747b715Smrg      if test "x$enable_dependency_tracking" = xyes; then
2756747b715Smrg	continue
2766747b715Smrg      else
2776747b715Smrg	break
2786747b715Smrg      fi
2796747b715Smrg      ;;
2806747b715Smrg    msvisualcpp | msvcmsys)
2816747b715Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
2826747b715Smrg      # not run yet.  These depmodes are late enough in the game, and
2836747b715Smrg      # so weak that their functioning should not be impacted.
2846747b715Smrg      am__obj=conftest.${OBJEXT-o}
2856747b715Smrg      am__minus_obj=
2866747b715Smrg      ;;
2876747b715Smrg    none) break ;;
2886747b715Smrg    esac
2896747b715Smrg    if depmode=$depmode \
2906747b715Smrg       source=sub/conftest.c object=$am__obj \
2916747b715Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
2926747b715Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
2936747b715Smrg         >/dev/null 2>conftest.err &&
2946747b715Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
2956747b715Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
2966747b715Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
2976747b715Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
2986747b715Smrg      # icc doesn't choke on unknown options, it will just issue warnings
2996747b715Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
3006747b715Smrg      # that says an option was ignored or not supported.
3016747b715Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
3026747b715Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
3036747b715Smrg      # The diagnosis changed in icc 8.0:
3046747b715Smrg      #   icc: Command line remark: option '-MP' not supported
3056747b715Smrg      if (grep 'ignoring option' conftest.err ||
3066747b715Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
3076747b715Smrg        am_cv_$1_dependencies_compiler_type=$depmode
3086747b715Smrg        break
3096747b715Smrg      fi
3106747b715Smrg    fi
3116747b715Smrg  done
31205b261ecSmrg
3136747b715Smrg  cd ..
3146747b715Smrg  rm -rf conftest.dir
3156747b715Smrgelse
3166747b715Smrg  am_cv_$1_dependencies_compiler_type=none
3176747b715Smrgfi
3186747b715Smrg])
3196747b715SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
3206747b715SmrgAM_CONDITIONAL([am__fastdep$1], [
3216747b715Smrg  test "x$enable_dependency_tracking" != xno \
3226747b715Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
3236747b715Smrg])
32405b261ecSmrg
32505b261ecSmrg
3266747b715Smrg# AM_SET_DEPDIR
3276747b715Smrg# -------------
3286747b715Smrg# Choose a directory name for dependency files.
3296747b715Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
3306747b715SmrgAC_DEFUN([AM_SET_DEPDIR],
3316747b715Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
3326747b715SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
3336747b715Smrg])
33405b261ecSmrg
33505b261ecSmrg
3366747b715Smrg# AM_DEP_TRACK
3376747b715Smrg# ------------
3386747b715SmrgAC_DEFUN([AM_DEP_TRACK],
3396747b715Smrg[AC_ARG_ENABLE(dependency-tracking,
3406747b715Smrg[  --disable-dependency-tracking  speeds up one-time build
3416747b715Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
3426747b715Smrgif test "x$enable_dependency_tracking" != xno; then
3436747b715Smrg  am_depcomp="$ac_aux_dir/depcomp"
3446747b715Smrg  AMDEPBACKSLASH='\'
3456747b715Smrgfi
3466747b715SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
3476747b715SmrgAC_SUBST([AMDEPBACKSLASH])dnl
3486747b715Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
3496747b715Smrg])
35005b261ecSmrg
3516747b715Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
35205b261ecSmrg
3536747b715Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
3546747b715Smrg# Free Software Foundation, Inc.
3556747b715Smrg#
3566747b715Smrg# This file is free software; the Free Software Foundation
3576747b715Smrg# gives unlimited permission to copy and/or distribute it,
3586747b715Smrg# with or without modifications, as long as this notice is preserved.
35905b261ecSmrg
3606747b715Smrg#serial 5
36105b261ecSmrg
3626747b715Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
3636747b715Smrg# ------------------------------
3646747b715SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
3656747b715Smrg[{
3666747b715Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
3676747b715Smrg  # are listed without --file.  Let's play safe and only enable the eval
3686747b715Smrg  # if we detect the quoting.
3696747b715Smrg  case $CONFIG_FILES in
3706747b715Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
3716747b715Smrg  *)   set x $CONFIG_FILES ;;
3726747b715Smrg  esac
3736747b715Smrg  shift
3746747b715Smrg  for mf
3756747b715Smrg  do
3766747b715Smrg    # Strip MF so we end up with the name of the file.
3776747b715Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
3786747b715Smrg    # Check whether this is an Automake generated Makefile or not.
3796747b715Smrg    # We used to match only the files named `Makefile.in', but
3806747b715Smrg    # some people rename them; so instead we look at the file content.
3816747b715Smrg    # Grep'ing the first line is not enough: some people post-process
3826747b715Smrg    # each Makefile.in and add a new line on top of each file to say so.
3836747b715Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
3846747b715Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
3856747b715Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
3866747b715Smrg      dirpart=`AS_DIRNAME("$mf")`
3876747b715Smrg    else
3886747b715Smrg      continue
3896747b715Smrg    fi
3906747b715Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
3916747b715Smrg    # from the Makefile without running `make'.
3926747b715Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
3936747b715Smrg    test -z "$DEPDIR" && continue
3946747b715Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
3956747b715Smrg    test -z "am__include" && continue
3966747b715Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
3976747b715Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
3986747b715Smrg    U=`sed -n 's/^U = //p' < "$mf"`
3996747b715Smrg    # Find all dependency output files, they are included files with
4006747b715Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
4016747b715Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
4026747b715Smrg    # expansion.
4036747b715Smrg    for file in `sed -n "
4046747b715Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
4056747b715Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
4066747b715Smrg      # Make sure the directory exists.
4076747b715Smrg      test -f "$dirpart/$file" && continue
4086747b715Smrg      fdir=`AS_DIRNAME(["$file"])`
4096747b715Smrg      AS_MKDIR_P([$dirpart/$fdir])
4106747b715Smrg      # echo "creating $dirpart/$file"
4116747b715Smrg      echo '# dummy' > "$dirpart/$file"
4126747b715Smrg    done
4136747b715Smrg  done
4146747b715Smrg}
4156747b715Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
41605b261ecSmrg
41705b261ecSmrg
4186747b715Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
4196747b715Smrg# -----------------------------
4206747b715Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
4216747b715Smrg#
4226747b715Smrg# This code is only required when automatic dependency tracking
4236747b715Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
4246747b715Smrg# need in order to bootstrap the dependency handling code.
4256747b715SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
4266747b715Smrg[AC_CONFIG_COMMANDS([depfiles],
4276747b715Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
4286747b715Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
4296747b715Smrg])
4304642e01fSmrg
4316747b715Smrg# Do all the work for Automake.                             -*- Autoconf -*-
4324642e01fSmrg
4336747b715Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4346747b715Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
4356747b715Smrg#
4366747b715Smrg# This file is free software; the Free Software Foundation
4376747b715Smrg# gives unlimited permission to copy and/or distribute it,
4386747b715Smrg# with or without modifications, as long as this notice is preserved.
4394642e01fSmrg
4406747b715Smrg# serial 16
4414642e01fSmrg
4426747b715Smrg# This macro actually does too much.  Some checks are only needed if
4436747b715Smrg# your package does certain things.  But this isn't really a big deal.
4444642e01fSmrg
4456747b715Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
4466747b715Smrg# AM_INIT_AUTOMAKE([OPTIONS])
4476747b715Smrg# -----------------------------------------------
4486747b715Smrg# The call with PACKAGE and VERSION arguments is the old style
4496747b715Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
4506747b715Smrg# and VERSION should now be passed to AC_INIT and removed from
4516747b715Smrg# the call to AM_INIT_AUTOMAKE.
4526747b715Smrg# We support both call styles for the transition.  After
4536747b715Smrg# the next Automake release, Autoconf can make the AC_INIT
4546747b715Smrg# arguments mandatory, and then we can depend on a new Autoconf
4556747b715Smrg# release and drop the old call support.
4566747b715SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
4576747b715Smrg[AC_PREREQ([2.62])dnl
4586747b715Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
4596747b715Smrgdnl the ones we care about.
4606747b715Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
4616747b715SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
4626747b715SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
4636747b715Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
4646747b715Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4656747b715Smrg  # is not polluted with repeated "-I."
4666747b715Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
4676747b715Smrg  # test to see if srcdir already configured
4686747b715Smrg  if test -f $srcdir/config.status; then
4696747b715Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
4706747b715Smrg  fi
4716747b715Smrgfi
4724642e01fSmrg
4736747b715Smrg# test whether we have cygpath
4746747b715Smrgif test -z "$CYGPATH_W"; then
4756747b715Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
4766747b715Smrg    CYGPATH_W='cygpath -w'
4776747b715Smrg  else
4786747b715Smrg    CYGPATH_W=echo
4796747b715Smrg  fi
4806747b715Smrgfi
4816747b715SmrgAC_SUBST([CYGPATH_W])
4824642e01fSmrg
4836747b715Smrg# Define the identity of the package.
4846747b715Smrgdnl Distinguish between old-style and new-style calls.
4856747b715Smrgm4_ifval([$2],
4866747b715Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
4876747b715Smrg AC_SUBST([PACKAGE], [$1])dnl
4886747b715Smrg AC_SUBST([VERSION], [$2])],
4896747b715Smrg[_AM_SET_OPTIONS([$1])dnl
4906747b715Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
4916747b715Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
4926747b715Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
4936747b715Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
4946747b715Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
4954642e01fSmrg
4966747b715Smrg_AM_IF_OPTION([no-define],,
4976747b715Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
4986747b715Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
4994642e01fSmrg
5006747b715Smrg# Some tools Automake needs.
5016747b715SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
5026747b715SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
5036747b715SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
5046747b715SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
5056747b715SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
5066747b715SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
5076747b715SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
5086747b715SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
5096747b715SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
5106747b715SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
5116747b715Smrg# We need awk for the "check" target.  The system "awk" is bad on
5126747b715Smrg# some platforms.
5136747b715SmrgAC_REQUIRE([AC_PROG_AWK])dnl
5146747b715SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
5156747b715SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
5166747b715Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
5176747b715Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
5186747b715Smrg			     [_AM_PROG_TAR([v7])])])
5196747b715Smrg_AM_IF_OPTION([no-dependencies],,
5206747b715Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
5216747b715Smrg		  [_AM_DEPENDENCIES(CC)],
5226747b715Smrg		  [define([AC_PROG_CC],
5236747b715Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
5246747b715SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
5256747b715Smrg		  [_AM_DEPENDENCIES(CXX)],
5266747b715Smrg		  [define([AC_PROG_CXX],
5276747b715Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
5286747b715SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
5296747b715Smrg		  [_AM_DEPENDENCIES(OBJC)],
5306747b715Smrg		  [define([AC_PROG_OBJC],
5316747b715Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
5326747b715Smrg])
5336747b715Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
5346747b715Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
5356747b715Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
5366747b715Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
5376747b715SmrgAC_CONFIG_COMMANDS_PRE(dnl
5386747b715Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
5396747b715Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
5404642e01fSmrg])
5414642e01fSmrg
5426747b715Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
5436747b715Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
5446747b715Smrgdnl mangled by Autoconf and run in a shell conditional statement.
5456747b715Smrgm4_define([_AC_COMPILER_EXEEXT],
5466747b715Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
5474642e01fSmrg
5484642e01fSmrg
5496747b715Smrg# When config.status generates a header, we must update the stamp-h file.
5506747b715Smrg# This file resides in the same directory as the config header
5516747b715Smrg# that is generated.  The stamp files are numbered to have different names.
5524642e01fSmrg
5536747b715Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
5546747b715Smrg# loop where config.status creates the headers, so we can generate
5556747b715Smrg# our stamp files there.
5566747b715SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
5576747b715Smrg[# Compute $1's index in $config_headers.
5586747b715Smrg_am_arg=$1
5596747b715Smrg_am_stamp_count=1
5606747b715Smrgfor _am_header in $config_headers :; do
5616747b715Smrg  case $_am_header in
5626747b715Smrg    $_am_arg | $_am_arg:* )
5636747b715Smrg      break ;;
5646747b715Smrg    * )
5656747b715Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
5666747b715Smrg  esac
5676747b715Smrgdone
5686747b715Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
5694642e01fSmrg
5706747b715Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
5716747b715Smrg#
5726747b715Smrg# This file is free software; the Free Software Foundation
5736747b715Smrg# gives unlimited permission to copy and/or distribute it,
5746747b715Smrg# with or without modifications, as long as this notice is preserved.
5754642e01fSmrg
5766747b715Smrg# AM_PROG_INSTALL_SH
5776747b715Smrg# ------------------
5786747b715Smrg# Define $install_sh.
5796747b715SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
5806747b715Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
5816747b715Smrgif test x"${install_sh}" != xset; then
5826747b715Smrg  case $am_aux_dir in
5836747b715Smrg  *\ * | *\	*)
5846747b715Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5856747b715Smrg  *)
5866747b715Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
5876747b715Smrg  esac
5886747b715Smrgfi
5896747b715SmrgAC_SUBST(install_sh)])
5904642e01fSmrg
5916747b715Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
5926747b715Smrg#
5936747b715Smrg# This file is free software; the Free Software Foundation
5946747b715Smrg# gives unlimited permission to copy and/or distribute it,
5956747b715Smrg# with or without modifications, as long as this notice is preserved.
5964642e01fSmrg
5976747b715Smrg# serial 2
5984642e01fSmrg
5996747b715Smrg# Check whether the underlying file-system supports filenames
6006747b715Smrg# with a leading dot.  For instance MS-DOS doesn't.
6016747b715SmrgAC_DEFUN([AM_SET_LEADING_DOT],
6026747b715Smrg[rm -rf .tst 2>/dev/null
6036747b715Smrgmkdir .tst 2>/dev/null
6046747b715Smrgif test -d .tst; then
6056747b715Smrg  am__leading_dot=.
6066747b715Smrgelse
6076747b715Smrg  am__leading_dot=_
6086747b715Smrgfi
6096747b715Smrgrmdir .tst 2>/dev/null
6106747b715SmrgAC_SUBST([am__leading_dot])])
6114642e01fSmrg
6126747b715Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
6136747b715Smrg# From Jim Meyering
6144642e01fSmrg
6156747b715Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
6166747b715Smrg# Free Software Foundation, Inc.
6176747b715Smrg#
6186747b715Smrg# This file is free software; the Free Software Foundation
6196747b715Smrg# gives unlimited permission to copy and/or distribute it,
6206747b715Smrg# with or without modifications, as long as this notice is preserved.
6214642e01fSmrg
6226747b715Smrg# serial 5
6234642e01fSmrg
6246747b715Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
6256747b715Smrg# ----------------------------------
6266747b715Smrg# Control maintainer-specific portions of Makefiles.
6276747b715Smrg# Default is to disable them, unless `enable' is passed literally.
6286747b715Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
6296747b715Smrg# can override the default with the --enable/--disable switch.
6306747b715SmrgAC_DEFUN([AM_MAINTAINER_MODE],
6316747b715Smrg[m4_case(m4_default([$1], [disable]),
6326747b715Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
6336747b715Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
6346747b715Smrg       [m4_define([am_maintainer_other], [enable])
6356747b715Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
6366747b715SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
6376747b715Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
6386747b715Smrg  AC_ARG_ENABLE([maintainer-mode],
6396747b715Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
6406747b715Smrg			  (and sometimes confusing) to the casual installer],
6416747b715Smrg      [USE_MAINTAINER_MODE=$enableval],
6426747b715Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
6436747b715Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
6446747b715Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
6456747b715Smrg  MAINT=$MAINTAINER_MODE_TRUE
6466747b715Smrg  AC_SUBST([MAINT])dnl
6476747b715Smrg]
6486747b715Smrg)
6494642e01fSmrg
6506747b715SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
6514642e01fSmrg
6526747b715Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6534642e01fSmrg
6546747b715Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
6556747b715Smrg#
6566747b715Smrg# This file is free software; the Free Software Foundation
6576747b715Smrg# gives unlimited permission to copy and/or distribute it,
6586747b715Smrg# with or without modifications, as long as this notice is preserved.
6594642e01fSmrg
6606747b715Smrg# serial 4
6614642e01fSmrg
6626747b715Smrg# AM_MAKE_INCLUDE()
6636747b715Smrg# -----------------
6646747b715Smrg# Check to see how make treats includes.
6656747b715SmrgAC_DEFUN([AM_MAKE_INCLUDE],
6666747b715Smrg[am_make=${MAKE-make}
6676747b715Smrgcat > confinc << 'END'
6686747b715Smrgam__doit:
6696747b715Smrg	@echo this is the am__doit target
6706747b715Smrg.PHONY: am__doit
6716747b715SmrgEND
6726747b715Smrg# If we don't find an include directive, just comment out the code.
6736747b715SmrgAC_MSG_CHECKING([for style of include used by $am_make])
6746747b715Smrgam__include="#"
6756747b715Smrgam__quote=
6766747b715Smrg_am_result=none
6776747b715Smrg# First try GNU make style include.
6786747b715Smrgecho "include confinc" > confmf
6796747b715Smrg# Ignore all kinds of additional output from `make'.
6806747b715Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
6816747b715Smrg*the\ am__doit\ target*)
6826747b715Smrg  am__include=include
6836747b715Smrg  am__quote=
6846747b715Smrg  _am_result=GNU
6856747b715Smrg  ;;
6866747b715Smrgesac
6876747b715Smrg# Now try BSD make style include.
6886747b715Smrgif test "$am__include" = "#"; then
6896747b715Smrg   echo '.include "confinc"' > confmf
6906747b715Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
6916747b715Smrg   *the\ am__doit\ target*)
6926747b715Smrg     am__include=.include
6936747b715Smrg     am__quote="\""
6946747b715Smrg     _am_result=BSD
6956747b715Smrg     ;;
6966747b715Smrg   esac
6976747b715Smrgfi
6986747b715SmrgAC_SUBST([am__include])
6996747b715SmrgAC_SUBST([am__quote])
7006747b715SmrgAC_MSG_RESULT([$_am_result])
7016747b715Smrgrm -f confinc confmf
7026747b715Smrg])
7034642e01fSmrg
7046747b715Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7054642e01fSmrg
7066747b715Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
7076747b715Smrg# Free Software Foundation, Inc.
7086747b715Smrg#
7096747b715Smrg# This file is free software; the Free Software Foundation
7106747b715Smrg# gives unlimited permission to copy and/or distribute it,
7116747b715Smrg# with or without modifications, as long as this notice is preserved.
7124642e01fSmrg
7136747b715Smrg# serial 6
7144642e01fSmrg
7156747b715Smrg# AM_MISSING_PROG(NAME, PROGRAM)
7166747b715Smrg# ------------------------------
7176747b715SmrgAC_DEFUN([AM_MISSING_PROG],
7186747b715Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7196747b715Smrg$1=${$1-"${am_missing_run}$2"}
7206747b715SmrgAC_SUBST($1)])
7214642e01fSmrg
7224642e01fSmrg
7236747b715Smrg# AM_MISSING_HAS_RUN
7246747b715Smrg# ------------------
7256747b715Smrg# Define MISSING if not defined so far and test if it supports --run.
7266747b715Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
7276747b715SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7286747b715Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7296747b715SmrgAC_REQUIRE_AUX_FILE([missing])dnl
7306747b715Smrgif test x"${MISSING+set}" != xset; then
7316747b715Smrg  case $am_aux_dir in
7326747b715Smrg  *\ * | *\	*)
7336747b715Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
7346747b715Smrg  *)
7356747b715Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
7366747b715Smrg  esac
7376747b715Smrgfi
7386747b715Smrg# Use eval to expand $SHELL
7396747b715Smrgif eval "$MISSING --run true"; then
7406747b715Smrg  am_missing_run="$MISSING --run "
7416747b715Smrgelse
7426747b715Smrg  am_missing_run=
7436747b715Smrg  AC_MSG_WARN([`missing' script is too old or missing])
7446747b715Smrgfi
7456747b715Smrg])
7464642e01fSmrg
7476747b715Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
7484642e01fSmrg#
7496747b715Smrg# This file is free software; the Free Software Foundation
7506747b715Smrg# gives unlimited permission to copy and/or distribute it,
7516747b715Smrg# with or without modifications, as long as this notice is preserved.
75205b261ecSmrg
7536747b715Smrg# AM_PROG_MKDIR_P
7546747b715Smrg# ---------------
7556747b715Smrg# Check for `mkdir -p'.
7566747b715SmrgAC_DEFUN([AM_PROG_MKDIR_P],
7576747b715Smrg[AC_PREREQ([2.60])dnl
7586747b715SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
7596747b715Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
7606747b715Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
7616747b715Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
7626747b715Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
7636747b715Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
7646747b715Smrgdnl adjustment using top_builddir (which is defined more often than
7656747b715Smrgdnl MKDIR_P).
7666747b715SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
7676747b715Smrgcase $mkdir_p in
7686747b715Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
7696747b715Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
7706747b715Smrgesac
7714642e01fSmrg])
7724642e01fSmrg
7736747b715Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7744642e01fSmrg
7756747b715Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
7764642e01fSmrg#
7776747b715Smrg# This file is free software; the Free Software Foundation
7786747b715Smrg# gives unlimited permission to copy and/or distribute it,
7796747b715Smrg# with or without modifications, as long as this notice is preserved.
7804642e01fSmrg
7816747b715Smrg# serial 4
7824642e01fSmrg
7836747b715Smrg# _AM_MANGLE_OPTION(NAME)
7844642e01fSmrg# -----------------------
7856747b715SmrgAC_DEFUN([_AM_MANGLE_OPTION],
7866747b715Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7874642e01fSmrg
7886747b715Smrg# _AM_SET_OPTION(NAME)
7896747b715Smrg# ------------------------------
7906747b715Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7916747b715SmrgAC_DEFUN([_AM_SET_OPTION],
7926747b715Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7934642e01fSmrg
7946747b715Smrg# _AM_SET_OPTIONS(OPTIONS)
7956747b715Smrg# ----------------------------------
7966747b715Smrg# OPTIONS is a space-separated list of Automake options.
7976747b715SmrgAC_DEFUN([_AM_SET_OPTIONS],
7986747b715Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7994642e01fSmrg
8006747b715Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
8016747b715Smrg# -------------------------------------------
8026747b715Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
8036747b715SmrgAC_DEFUN([_AM_IF_OPTION],
8046747b715Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
8054642e01fSmrg
8066747b715Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
8074642e01fSmrg
8086747b715Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
8096747b715Smrg# Free Software Foundation, Inc.
8106747b715Smrg#
8116747b715Smrg# This file is free software; the Free Software Foundation
8126747b715Smrg# gives unlimited permission to copy and/or distribute it,
8136747b715Smrg# with or without modifications, as long as this notice is preserved.
8144642e01fSmrg
8156747b715Smrg# serial 5
8164642e01fSmrg
8176747b715Smrg# AM_SANITY_CHECK
8186747b715Smrg# ---------------
8196747b715SmrgAC_DEFUN([AM_SANITY_CHECK],
8206747b715Smrg[AC_MSG_CHECKING([whether build environment is sane])
8216747b715Smrg# Just in case
8226747b715Smrgsleep 1
8236747b715Smrgecho timestamp > conftest.file
8246747b715Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8256747b715Smrg# name.  Accept space and tab only in the latter.
8266747b715Smrgam_lf='
8276747b715Smrg'
8286747b715Smrgcase `pwd` in
8296747b715Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8306747b715Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8316747b715Smrgesac
8326747b715Smrgcase $srcdir in
8336747b715Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8346747b715Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8356747b715Smrgesac
8364642e01fSmrg
8376747b715Smrg# Do `set' in a subshell so we don't clobber the current shell's
8386747b715Smrg# arguments.  Must try -L first in case configure is actually a
8396747b715Smrg# symlink; some systems play weird games with the mod time of symlinks
8406747b715Smrg# (eg FreeBSD returns the mod time of the symlink's containing
8416747b715Smrg# directory).
8426747b715Smrgif (
8436747b715Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
8446747b715Smrg   if test "$[*]" = "X"; then
8456747b715Smrg      # -L didn't work.
8466747b715Smrg      set X `ls -t "$srcdir/configure" conftest.file`
8476747b715Smrg   fi
8486747b715Smrg   rm -f conftest.file
8496747b715Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
8506747b715Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8514642e01fSmrg
8526747b715Smrg      # If neither matched, then we have a broken ls.  This can happen
8536747b715Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
8546747b715Smrg      # broken ls alias from the environment.  This has actually
8556747b715Smrg      # happened.  Such a system could not be considered "sane".
8566747b715Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
8576747b715Smrgalias in your environment])
8586747b715Smrg   fi
8594642e01fSmrg
8606747b715Smrg   test "$[2]" = conftest.file
8616747b715Smrg   )
8626747b715Smrgthen
8636747b715Smrg   # Ok.
8646747b715Smrg   :
8656747b715Smrgelse
8666747b715Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
8676747b715SmrgCheck your system clock])
8686747b715Smrgfi
8696747b715SmrgAC_MSG_RESULT(yes)])
8704642e01fSmrg
8716747b715Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
8726747b715Smrg#
8736747b715Smrg# This file is free software; the Free Software Foundation
8746747b715Smrg# gives unlimited permission to copy and/or distribute it,
8756747b715Smrg# with or without modifications, as long as this notice is preserved.
8764642e01fSmrg
8776747b715Smrg# serial 1
8784642e01fSmrg
8796747b715Smrg# AM_SILENT_RULES([DEFAULT])
8806747b715Smrg# --------------------------
8816747b715Smrg# Enable less verbose build rules; with the default set to DEFAULT
8826747b715Smrg# (`yes' being less verbose, `no' or empty being verbose).
8836747b715SmrgAC_DEFUN([AM_SILENT_RULES],
8846747b715Smrg[AC_ARG_ENABLE([silent-rules],
8856747b715Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
8866747b715Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
8876747b715Smrgcase $enable_silent_rules in
8886747b715Smrgyes) AM_DEFAULT_VERBOSITY=0;;
8896747b715Smrgno)  AM_DEFAULT_VERBOSITY=1;;
8906747b715Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
8914642e01fSmrgesac
8926747b715SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
8936747b715SmrgAM_BACKSLASH='\'
8946747b715SmrgAC_SUBST([AM_BACKSLASH])dnl
8956747b715Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
8964642e01fSmrg])
8974642e01fSmrg
8986747b715Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8996747b715Smrg#
9006747b715Smrg# This file is free software; the Free Software Foundation
9016747b715Smrg# gives unlimited permission to copy and/or distribute it,
9026747b715Smrg# with or without modifications, as long as this notice is preserved.
9034642e01fSmrg
9046747b715Smrg# AM_PROG_INSTALL_STRIP
9056747b715Smrg# ---------------------
9066747b715Smrg# One issue with vendor `install' (even GNU) is that you can't
9076747b715Smrg# specify the program used to strip binaries.  This is especially
9086747b715Smrg# annoying in cross-compiling environments, where the build's strip
9096747b715Smrg# is unlikely to handle the host's binaries.
9106747b715Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
9116747b715Smrg# always use install-sh in `make install-strip', and initialize
9126747b715Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
9136747b715SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
9146747b715Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
9156747b715Smrg# Installed binaries are usually stripped using `strip' when the user
9166747b715Smrg# run `make install-strip'.  However `strip' might not be the right
9176747b715Smrg# tool to use in cross-compilation environments, therefore Automake
9186747b715Smrg# will honor the `STRIP' environment variable to overrule this program.
9196747b715Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
9206747b715Smrgif test "$cross_compiling" != no; then
9216747b715Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
9226747b715Smrgfi
9236747b715SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
9246747b715SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
9254642e01fSmrg
9266747b715Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
9276747b715Smrg#
9286747b715Smrg# This file is free software; the Free Software Foundation
9296747b715Smrg# gives unlimited permission to copy and/or distribute it,
9306747b715Smrg# with or without modifications, as long as this notice is preserved.
9314642e01fSmrg
9326747b715Smrg# serial 2
9334642e01fSmrg
9346747b715Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
9356747b715Smrg# ---------------------------
9366747b715Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
9376747b715Smrg# This macro is traced by Automake.
9386747b715SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
9394642e01fSmrg
9406747b715Smrg# AM_SUBST_NOTMAKE(VARIABLE)
9416747b715Smrg# ---------------------------
9426747b715Smrg# Public sister of _AM_SUBST_NOTMAKE.
9436747b715SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
9444642e01fSmrg
9456747b715Smrg# Check how to create a tarball.                            -*- Autoconf -*-
9464642e01fSmrg
9476747b715Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
9486747b715Smrg#
9496747b715Smrg# This file is free software; the Free Software Foundation
9506747b715Smrg# gives unlimited permission to copy and/or distribute it,
9516747b715Smrg# with or without modifications, as long as this notice is preserved.
9524642e01fSmrg
9536747b715Smrg# serial 2
9544642e01fSmrg
9556747b715Smrg# _AM_PROG_TAR(FORMAT)
9566747b715Smrg# --------------------
9576747b715Smrg# Check how to create a tarball in format FORMAT.
9586747b715Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
9596747b715Smrg#
9606747b715Smrg# Substitute a variable $(am__tar) that is a command
9616747b715Smrg# writing to stdout a FORMAT-tarball containing the directory
9626747b715Smrg# $tardir.
9636747b715Smrg#     tardir=directory && $(am__tar) > result.tar
9646747b715Smrg#
9656747b715Smrg# Substitute a variable $(am__untar) that extract such
9666747b715Smrg# a tarball read from stdin.
9676747b715Smrg#     $(am__untar) < result.tar
9686747b715SmrgAC_DEFUN([_AM_PROG_TAR],
9696747b715Smrg[# Always define AMTAR for backward compatibility.
9706747b715SmrgAM_MISSING_PROG([AMTAR], [tar])
9716747b715Smrgm4_if([$1], [v7],
9726747b715Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
9736747b715Smrg     [m4_case([$1], [ustar],, [pax],,
9746747b715Smrg              [m4_fatal([Unknown tar format])])
9756747b715SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
9766747b715Smrg# Loop over all known methods to create a tar archive until one works.
9776747b715Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
9786747b715Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
9796747b715Smrg# Do not fold the above two line into one, because Tru64 sh and
9806747b715Smrg# Solaris sh will not grok spaces in the rhs of `-'.
9816747b715Smrgfor _am_tool in $_am_tools
9826747b715Smrgdo
9836747b715Smrg  case $_am_tool in
9846747b715Smrg  gnutar)
9856747b715Smrg    for _am_tar in tar gnutar gtar;
9866747b715Smrg    do
9876747b715Smrg      AM_RUN_LOG([$_am_tar --version]) && break
9886747b715Smrg    done
9896747b715Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
9906747b715Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
9916747b715Smrg    am__untar="$_am_tar -xf -"
9926747b715Smrg    ;;
9936747b715Smrg  plaintar)
9946747b715Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
9956747b715Smrg    # ustar tarball either.
9966747b715Smrg    (tar --version) >/dev/null 2>&1 && continue
9976747b715Smrg    am__tar='tar chf - "$$tardir"'
9986747b715Smrg    am__tar_='tar chf - "$tardir"'
9996747b715Smrg    am__untar='tar xf -'
10006747b715Smrg    ;;
10016747b715Smrg  pax)
10026747b715Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
10036747b715Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
10046747b715Smrg    am__untar='pax -r'
10056747b715Smrg    ;;
10066747b715Smrg  cpio)
10076747b715Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
10086747b715Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
10096747b715Smrg    am__untar='cpio -i -H $1 -d'
10106747b715Smrg    ;;
10116747b715Smrg  none)
10126747b715Smrg    am__tar=false
10136747b715Smrg    am__tar_=false
10146747b715Smrg    am__untar=false
10156747b715Smrg    ;;
10166747b715Smrg  esac
10174642e01fSmrg
10186747b715Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
10196747b715Smrg  # and am__untar set.
10206747b715Smrg  test -n "${am_cv_prog_tar_$1}" && break
10214642e01fSmrg
10226747b715Smrg  # tar/untar a dummy directory, and stop if the command works
10236747b715Smrg  rm -rf conftest.dir
10246747b715Smrg  mkdir conftest.dir
10256747b715Smrg  echo GrepMe > conftest.dir/file
10266747b715Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
10276747b715Smrg  rm -rf conftest.dir
10286747b715Smrg  if test -s conftest.tar; then
10296747b715Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
10306747b715Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
10316747b715Smrg  fi
10324642e01fSmrgdone
10336747b715Smrgrm -rf conftest.dir
10344642e01fSmrg
10356747b715SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
10366747b715SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
10376747b715SmrgAC_SUBST([am__tar])
10386747b715SmrgAC_SUBST([am__untar])
10396747b715Smrg]) # _AM_PROG_TAR
10404642e01fSmrg
10416747b715Smrgm4_include([m4/ac_define_dir.m4])
10426747b715Smrgm4_include([m4/dolt.m4])
10436747b715Smrgdnl fontutil.m4.  Generated from fontutil.m4.in by configure.
10446747b715Smrgdnl
10456747b715Smrgdnl This file comes from X.Org's font-util 1.2.0
10466747b715Smrgdnl
10476747b715Smrgdnl Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
10486747b715Smrgdnl
10496747b715Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
10506747b715Smrgdnl copy of this software and associated documentation files (the "Software"),
10516747b715Smrgdnl to deal in the Software without restriction, including without limitation
10526747b715Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
10536747b715Smrgdnl and/or sell copies of the Software, and to permit persons to whom the
10546747b715Smrgdnl Software is furnished to do so, subject to the following conditions:
10556747b715Smrgdnl
10566747b715Smrgdnl The above copyright notice and this permission notice (including the next
10576747b715Smrgdnl paragraph) shall be included in all copies or substantial portions of the
10586747b715Smrgdnl Software.
10596747b715Smrgdnl
10606747b715Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
10616747b715Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
10626747b715Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
10636747b715Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
10646747b715Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
10656747b715Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
10666747b715Smrgdnl DEALINGS IN THE SOFTWARE.
10676747b715Smrgdnl
10686747b715Smrgdnl --------------------------------------------------------------------
10696747b715Smrgdnl
10706747b715Smrgdnl Copyright 2005 Red Hat, Inc
10716747b715Smrgdnl
10726747b715Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
10736747b715Smrgdnl documentation for any purpose is hereby granted without fee, provided that
10746747b715Smrgdnl the above copyright notice appear in all copies and that both that
10756747b715Smrgdnl copyright notice and this permission notice appear in supporting
10766747b715Smrgdnl documentation.
10776747b715Smrgdnl
10786747b715Smrgdnl The above copyright notice and this permission notice shall be included
10796747b715Smrgdnl in all copies or substantial portions of the Software.
10806747b715Smrgdnl
10816747b715Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
10826747b715Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10836747b715Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10846747b715Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
10856747b715Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
10866747b715Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
10876747b715Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
10886747b715Smrgdnl
10896747b715Smrgdnl Except as contained in this notice, the name of the copyright holders shall
10906747b715Smrgdnl not be used in advertising or otherwise to promote the sale, use or
10916747b715Smrgdnl other dealings in this Software without prior written authorization
10926747b715Smrgdnl from the copyright holders.
10934642e01fSmrg
10946747b715Smrg# XORG_FONT_MACROS_VERSION(required-version)
10956747b715Smrg# ------------------------------------------
10966747b715Smrg# Minimum version: 1.1.0
10976747b715Smrg#
10986747b715Smrg# If you're using a macro added in Version 1.1 or newer, include this in
10996747b715Smrg# your configure.ac with the minimum required version, such as:
11006747b715Smrg# XORG_FONT_MACROS_VERSION(1.1)
11016747b715Smrg#
11026747b715Smrg# To ensure that this macro is defined, also add:
11036747b715Smrg# m4_ifndef([XORG_FONT_MACROS_VERSION],
11046747b715Smrg#     [m4_fatal([must install X.Org font-util 1.1 or later before running autoconf/autogen])])
11056747b715Smrg#
11066747b715Smrg#
11076747b715Smrg# See the "minimum version" comment for each macro you use to see what
11086747b715Smrg# version you require.
11096747b715Smrgm4_defun([XORG_FONT_MACROS_VERSION],[
11106747b715Smrgm4_define([vers_have], [1.2.0])
11116747b715Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
11126747b715Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
11136747b715Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
11146747b715Smrg    [m4_fatal([font-util major version ]maj_needed[ is required but ]vers_have[ found])])
11156747b715Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
11166747b715Smrg    [m4_fatal([font-util version $1 or higher is required but ]vers_have[ found])])
11176747b715Smrgm4_undefine([vers_have])
11186747b715Smrgm4_undefine([maj_have])
11196747b715Smrgm4_undefine([maj_needed])
11206747b715Smrg]) # XORG_FONT_MACROS_VERSION
11214642e01fSmrg
11226747b715Smrg# XORG_FONT_CHECK_{maps}()
11236747b715Smrg# ------------------------
11246747b715Smrg# Minimum version: 1.0.0
11256747b715Smrg# These macros add --enable/disable-{maps} where {maps} are ISO8859-*,
11266747b715Smrg# JISX0201 or KOI8_R.  By default, they are all enabled.
11276747b715Smrg
11286747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_1], [XORG_FONT_CHECK_ENCODING(ISO8859-1)])
11296747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_2], [XORG_FONT_CHECK_ENCODING(ISO8859-2)])
11306747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_3], [XORG_FONT_CHECK_ENCODING(ISO8859-3)])
11316747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_4], [XORG_FONT_CHECK_ENCODING(ISO8859-4)])
11326747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_5], [XORG_FONT_CHECK_ENCODING(ISO8859-5)])
11336747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_6], [XORG_FONT_CHECK_ENCODING(ISO8859-6)])
11346747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_7], [XORG_FONT_CHECK_ENCODING(ISO8859-7)])
11356747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_8], [XORG_FONT_CHECK_ENCODING(ISO8859-8)])
11366747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_9], [XORG_FONT_CHECK_ENCODING(ISO8859-9)])
11376747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_10],[XORG_FONT_CHECK_ENCODING(ISO8859-10)])
11386747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_11],[XORG_FONT_CHECK_ENCODING(ISO8859-11)])
11396747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_12],[XORG_FONT_CHECK_ENCODING(ISO8859-12)])
11406747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_13],[XORG_FONT_CHECK_ENCODING(ISO8859-13)])
11416747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_14],[XORG_FONT_CHECK_ENCODING(ISO8859-14)])
11426747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_15],[XORG_FONT_CHECK_ENCODING(ISO8859-15)])
11436747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ISO8859_16],[XORG_FONT_CHECK_ENCODING(ISO8859-16)])
11446747b715SmrgAC_DEFUN([XORG_FONT_CHECK_JISX0201],  [XORG_FONT_CHECK_ENCODING(JISX0201)])
11456747b715SmrgAC_DEFUN([XORG_FONT_CHECK_KOI8_R],    [XORG_FONT_CHECK_ENCODING(KOI8-R)])
11466747b715Smrg
11476747b715Smrg# XORG_FONT_CHECK_ENCODING(encoding)
11486747b715Smrg# ----------------------------------
11496747b715Smrg# Minimum version: 1.1.0
11506747b715Smrg# This macro adds --enable/disable-<encoding>, enabled by default.
11516747b715Smrg# It replaced individual copies of this code in the above macros in 1.1.
11526747b715Smrg# Currently assumes encoding names will be all upper-case - add m4_toupper
11536747b715Smrg# calls if this is not true in the future.
11546747b715Smrg
11556747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING],[
11566747b715Smrg	AC_ARG_ENABLE(m4_tolower($1),
11576747b715Smrg		AS_HELP_STRING(m4_join([-], [--disable], m4_tolower($1)),
11586747b715Smrg				[Build $1 fonts (default: yes)]),
11596747b715Smrg		[AS_TR_SH($1)=$enableval])
11606747b715Smrg	AC_MSG_CHECKING([whether to build $1 fonts])
11616747b715Smrg	AC_MSG_RESULT($[AS_TR_SH($1)])
11626747b715Smrg	AM_CONDITIONAL(AS_TR_SH($1), [test "x$AS_TR_SH($1)" = xyes])
11636747b715Smrg]) # XORG_FONT_CHECK_ENCODING
11646747b715Smrg
11656747b715Smrg# XORG_FONT_CHECK_ENCODING_LIST(encoding1 encoding2....)
11666747b715Smrg# -----------------------------------------------------
11676747b715Smrg# Minimum version: 1.1.0
11686747b715Smrg# Call XORG_FONT_CHECK_ENCODING for multiple encodings at once.
11696747b715Smrg# Add a shorthand --enable/disable-all-encodings option.
11706747b715Smrg
11716747b715SmrgAC_DEFUN([XORG_FONT_CHECK_ENCODING_LIST],[
11726747b715Smrg	AC_ARG_ENABLE([all-encodings],
11736747b715Smrg		AS_HELP_STRING([--disable-all-encodings],
11746747b715Smrg				[Disable building of all font encodings]),
11756747b715Smrg		[m4_foreach_w([enc], [$1], [
11766747b715Smrg			AS_TR_SH(enc)=$enableval
11776747b715Smrg		])],
11786747b715Smrg		[m4_foreach_w([enc], [$1], [
11796747b715Smrg			AS_TR_SH(enc)=yes
11806747b715Smrg		])])
11816747b715Smrg	m4_foreach_w([enc], [$1], [XORG_FONT_CHECK_ENCODING(enc)])
11826747b715Smrg]) # XORG_FONT_CHECK_ENCODING_LIST
11836747b715Smrg
11846747b715Smrg# XORG_FONT_REQUIRED_PROG(VARNAME, progname)
11856747b715Smrg# ------------------------------------------
11866747b715Smrg# Minimum version: 1.1.0
11876747b715Smrg#
11886747b715Smrg# Simple wrapper around AC_PATH_PROG that errors if not found
11896747b715Smrg#
11904642e01fSmrg
11916747b715SmrgAC_DEFUN([XORG_FONT_REQUIRED_PROG],[
11926747b715Smrg	AC_PATH_PROG($1, $2)
11936747b715Smrg	if test x"$$1" = x; then
11946747b715Smrg		AC_MSG_ERROR([$2 is required to build $PACKAGE_NAME.])
11956747b715Smrg	fi
11966747b715Smrg])
11974642e01fSmrg
11984642e01fSmrg
11996747b715Smrg# XORG_FONT_FCCACHE()
12006747b715Smrg# -------------------
12016747b715Smrg# Minimum version: 1.1.0
12026747b715Smrg#
12036747b715Smrg# Set FCCACHE to path to fc-cache (fontconfig cache builder) if found
12046747b715Smrg# Set RUN_FCCACHE to a rule suitable for substituting into a makefile
12056747b715Smrg# to run fc-cache if found and not installing to $DESTDIR
12066747b715Smrg#
12076747b715Smrg# fc-cache is optional, not required, and should be skipped when making
12086747b715Smrg# packages (installing to $DESTDIR).
12096747b715Smrg#
12106747b715SmrgAC_DEFUN([XORG_FONT_FCCACHE],[
12116747b715Smrg	AC_PATH_PROG(FCCACHE, fc-cache)
12126747b715Smrg	FCCACHE_WARN='echo "** Warning: fonts.cache not built" ; echo "** Generate this file manually on host system using fc-cache"'
12136747b715Smrg	if test x"$FCCACHE" = x ; then
12146747b715Smrg		RUN_FCCACHE="${FCCACHE_WARN}"
12156747b715Smrg	else
12166747b715Smrg		RUN_FCCACHE='@(if test -z "$(DESTDIR)"; then echo $(FCCACHE) $(fontdir); $(FCCACHE) $(fontdir); else'
12176747b715Smrg		RUN_FCCACHE="${RUN_FCCACHE} ${FCCACHE_WARN} ; fi)"
12186747b715Smrg	fi
12196747b715Smrg	AC_SUBST([RUN_FCCACHE])
12206747b715Smrg])
12214642e01fSmrg
12224642e01fSmrg
12236747b715Smrg# XORG_FONT_COMMON_UTILS()
12246747b715Smrg# ------------------------
12256747b715Smrg# Minimum version: 1.1.0
12264642e01fSmrg#
12276747b715Smrg# Call XORG_FONT_REQUIRED_PROG for programs needed for all font types
12284642e01fSmrg
12296747b715SmrgAC_DEFUN([XORG_FONT_COMMON_UTILS],[
12306747b715Smrg	XORG_FONT_FCCACHE
12316747b715Smrg	XORG_FONT_REQUIRED_PROG(MKFONTDIR, mkfontdir)
12326747b715Smrg])
12334642e01fSmrg
12346747b715Smrg# XORG_FONT_SCALED_UTILS()
12356747b715Smrg# ------------------------
12366747b715Smrg# Minimum version: 1.1.0
12376747b715Smrg#
12386747b715Smrg# Call XORG_FONT_REQUIRED_PROG for programs needed for scalable fonts
12396747b715Smrg# (TrueType, OpenType, Type1)
12404642e01fSmrg
12416747b715SmrgAC_DEFUN([XORG_FONT_SCALED_UTILS],[
12426747b715Smrg	XORG_FONT_COMMON_UTILS
12436747b715Smrg	XORG_FONT_REQUIRED_PROG(MKFONTSCALE, mkfontscale)
12446747b715Smrg])
12454642e01fSmrg
12466747b715Smrg# XORG_FONT_BDF_UTILS()
12476747b715Smrg# ---------------------
12486747b715Smrg# Minimum version: 1.1.0
12496747b715Smrg#
12506747b715Smrg# Call XORG_FONT_REQUIRED_PROG for programs needed for BDF format bitmap fonts
12516747b715Smrg# Also call XORG_FONT_CHECK_COMPRESSION to determine how to compress the
12526747b715Smrg# PCF output files created by bdftopcf
12536747b715Smrg
12546747b715SmrgAC_DEFUN([XORG_FONT_BDF_UTILS],[
12556747b715Smrg	XORG_FONT_COMMON_UTILS
12566747b715Smrg	XORG_FONT_REQUIRED_PROG(BDFTOPCF, bdftopcf)
12576747b715Smrg	XORG_FONT_CHECK_COMPRESSION
12586747b715Smrg])
12594642e01fSmrg
12606747b715Smrg# XORG_FONT_CHECK_COMPRESSION()
12616747b715Smrg# -----------------------------
12626747b715Smrg# Minimum version: 1.1.0
12636747b715Smrg#
12646747b715Smrg# Offer a --with-compression flag to control what compression method is
12656747b715Smrg# used for pcf font files.   Offers all the methods currently supported
12666747b715Smrg# by libXfont, including no compression.
12676747b715Smrg
12686747b715SmrgAC_DEFUN([XORG_FONT_CHECK_COMPRESSION],[
12696747b715Smrg	AC_MSG_CHECKING([font compression method])
12706747b715Smrg	AC_ARG_WITH(compression,
12716747b715Smrg	 [AS_HELP_STRING([--with-compression=<no|compress|gzip|bzip2>],
12726747b715Smrg			 [compression method to use on pcf fonts])],
12736747b715Smrg         [compression="$withval"], [compression="yes"])
12746747b715Smrg	if test x"$compression" = "xyes" ; then
12756747b715Smrg		compression="gzip"
12766747b715Smrg	fi
12776747b715Smrg	AC_MSG_RESULT([${compression}])
12786747b715Smrg	case ${compression} in
12796747b715Smrg	 *compress)	COMPRESS_SUFFIX=".Z" ;;
12806747b715Smrg	 *gzip)		COMPRESS_SUFFIX=".gz" ;;
12816747b715Smrg	 *bzip2)	COMPRESS_SUFFIX=".bz2" ;;
12826747b715Smrg	 no|none)	COMPRESS_SUFFIX="" ; COMPRESS="cat" ;;
12836747b715Smrg	 *) AC_MSG_ERROR([${compression} is not a supported compression method]) ;;
12846747b715Smrg	esac
12856747b715Smrg	if test x"$COMPRESS_SUFFIX" != "x" ; then
12866747b715Smrg	   XORG_FONT_REQUIRED_PROG(COMPRESS, ${compression})
12876747b715Smrg	fi
12886747b715Smrg	AC_SUBST([COMPRESS_SUFFIX])
12896747b715Smrg])
12904642e01fSmrg
12916747b715Smrg# XORG_FONT_UCS2ANY()
12926747b715Smrg# -------------------
12936747b715Smrg# Minimum version: 1.1.0
12946747b715Smrg#
12956747b715Smrg# Call XORG_FONT_REQUIRED_PROG for ucs2any program needed for splitting
12966747b715Smrg# Unicode-encoded BDF format bitmap fonts into subsets for older encodings.
12976747b715Smrg# Also call pkg-config to find the directory with the encoding files needed
12986747b715Smrg# by ucs2any, and export it as MAPFILES_PATH to the Makefiles
12996747b715Smrg
13006747b715SmrgAC_DEFUN([XORG_FONT_UCS2ANY],[
13016747b715Smrg	XORG_FONT_REQUIRED_PROG(UCS2ANY, ucs2any)
13026747b715Smrg	PKG_CHECK_MODULES(MAPS, [fontutil])
13036747b715Smrg	AC_MSG_CHECKING([for ucs2any encoding data files])
13046747b715Smrg	MAPFILES_PATH=`pkg-config --variable=mapdir fontutil`
13056747b715Smrg	AC_SUBST(MAPFILES_PATH)
13066747b715Smrg	AC_MSG_RESULT([${MAPFILES_PATH}])
13076747b715Smrg])
13084642e01fSmrg
13094642e01fSmrg
13104642e01fSmrg
13116747b715Smrg# XORG_FONT_FC_CONFDIR()
13126747b715Smrg# --------------------
13136747b715Smrg# Minimum version: 1.2.0
13146747b715Smrg#
13156747b715Smrg# Sets FC_CONFDIR to the fontconfig config directory
13166747b715Smrg# (which should be --with-confdir=... when building fontconfig)
13176747b715Smrg# found from:
13186747b715Smrg#	--with-fc-confdir=...
13196747b715Smrg#	pkg-config --variable=confdir fontconfig
13206747b715Smrg#	${sysconfdir}/fonts
13216747b715Smrg
13226747b715SmrgAC_DEFUN([XORG_FONT_FC_CONFDIR],[
13236747b715Smrg	dnl Ensure $PKG_CONFIG is set first
13246747b715Smrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
13256747b715Smrg
13266747b715Smrg	AC_MSG_CHECKING([for fontconfig's configuration directory])
13276747b715Smrg	AC_ARG_WITH(fc-confdir,
13286747b715Smrg		    AS_HELP_STRING([--with-fc-confdir=DIR],
13296747b715Smrg			   [Path to fontconfig's configuration directory]),
13306747b715Smrg		    [FC_CONFDIR="$withval"])
13316747b715Smrg	# if --with-fc-confdir was not specified
13326747b715Smrg	if test "x${FC_CONFDIR}" = "x"; then
13336747b715Smrg		FC_CONFDIR=`$PKG_CONFIG --variable=confdir fontconfig`
13346747b715Smrg	fi
13356747b715Smrg	# ...and if pkg-config didn't find confdir in fontconfig.pc...
13366747b715Smrg	if test "x${FC_CONFDIR}" = "x"; then
13376747b715Smrg		FC_CONFDIR="${sysconfdir}/fonts"
13386747b715Smrg	fi
13396747b715Smrg	AC_SUBST(FC_CONFDIR)
13406747b715Smrg	AC_MSG_RESULT([${FC_CONFDIR}])
13416747b715Smrg])
13424642e01fSmrg
13434642e01fSmrg
13444642e01fSmrg
13456747b715Smrg# XORG_FONTROOTDIR()
13466747b715Smrg# --------------------
13476747b715Smrg# Minimum version: 1.1.0
13486747b715Smrg#
13496747b715Smrg# Sets FONTROOTDIR to the root directory for font files.  Uses the first
13506747b715Smrg# found from:
13516747b715Smrg#	--with-fontrootdir
13526747b715Smrg#	pkg-config --variable=fontrootdir fontutil
13536747b715Smrg#	${datadir}/fonts/X11
13546747b715Smrg
13556747b715SmrgAC_DEFUN([XORG_FONTROOTDIR],[
13566747b715Smrg	dnl Ensure $PKG_CONFIG is set first
13576747b715Smrg	AC_REQUIRE([PKG_PROG_PKG_CONFIG])
13586747b715Smrg
13596747b715Smrg	AC_MSG_CHECKING([for root directory for font files])
13606747b715Smrg	AC_ARG_WITH(fontrootdir,
13616747b715Smrg		    AS_HELP_STRING([--with-fontrootdir=DIR],
13626747b715Smrg			   [Path to root directory for font files]),
13636747b715Smrg		    [FONTROOTDIR="$withval"])
13646747b715Smrg	# if --with-fontrootdir not specified...
13656747b715Smrg	if test "x${FONTROOTDIR}" = "x"; then
13666747b715Smrg		FONTROOTDIR=`$PKG_CONFIG --variable=fontrootdir fontutil`
13676747b715Smrg	fi
13686747b715Smrg	# ...and if pkg-config didn't find fontdir in fontutil.pc...
13696747b715Smrg	if test "x${FONTROOTDIR}" = "x"; then
13706747b715Smrg		FONTROOTDIR="${datadir}/fonts/X11"
13716747b715Smrg	fi
13726747b715Smrg	AC_SUBST(FONTROOTDIR)
13736747b715Smrg	AC_MSG_RESULT([${FONTROOTDIR}])
13746747b715Smrg])
13754642e01fSmrg
13766747b715Smrg# XORG_FONTSUBDIR(variable, flag, subdir)
13776747b715Smrg# ---------------------------------------
13786747b715Smrg# Minimum version: 1.1.0
13796747b715Smrg#
13806747b715Smrg# Offer a --with-<flag> flag to control directory for font installation
13816747b715Smrg# Default is the specified <subdir> of the font root directory.
13826747b715Smrg# Sets <variable> to the selected directory
13836747b715Smrg
13846747b715SmrgAC_DEFUN([XORG_FONTSUBDIR],[
13856747b715Smrg	AC_REQUIRE([XORG_FONTROOTDIR])
13866747b715Smrg
13876747b715Smrg	AC_MSG_CHECKING([for directory for $3 files])
13886747b715Smrg	AC_ARG_WITH($2,
13896747b715Smrg		    [AS_HELP_STRING([--with-$2=DIR],
13906747b715Smrg				    [Path to $3 files [FONTROOTDIR/$3]])],
13916747b715Smrg		    [$1="${withval}"], [$1='${FONTROOTDIR}/$3'])
13926747b715Smrg	AC_SUBST($1)
13936747b715Smrg	AC_MSG_RESULT([${$1}])
13946747b715Smrg]) # XORG_FONTSUBDIR
13956747b715Smrg
13966747b715Smrg# XORG_FONTDIR(subdir)
13976747b715Smrg# --------------------
13986747b715Smrg# Minimum version: 1.1.0
13996747b715Smrg#
14006747b715Smrg# Offer a --with-fontdir flag to control directory for font installation
14016747b715Smrg# Default is the specified subdir of the font root directory.
14026747b715Smrg# Sets FONTDIR to the selected directory
14034642e01fSmrg
14046747b715SmrgAC_DEFUN([XORG_FONTDIR],[XORG_FONTSUBDIR([FONTDIR], [fontdir], [$1])])
14054642e01fSmrg
14066747b715Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
14076747b715Smrg#
14086747b715Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14096747b715Smrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
14106747b715Smrg#                 Inc.
14116747b715Smrg#   Written by Gordon Matzigkeit, 1996
14126747b715Smrg#
14136747b715Smrg# This file is free software; the Free Software Foundation gives
14146747b715Smrg# unlimited permission to copy and/or distribute it, with or without
14156747b715Smrg# modifications, as long as this notice is preserved.
14164642e01fSmrg
14176747b715Smrgm4_define([_LT_COPYING], [dnl
14186747b715Smrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
14196747b715Smrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
14206747b715Smrg#                 Inc.
14216747b715Smrg#   Written by Gordon Matzigkeit, 1996
14226747b715Smrg#
14236747b715Smrg#   This file is part of GNU Libtool.
14246747b715Smrg#
14256747b715Smrg# GNU Libtool is free software; you can redistribute it and/or
14266747b715Smrg# modify it under the terms of the GNU General Public License as
14276747b715Smrg# published by the Free Software Foundation; either version 2 of
14286747b715Smrg# the License, or (at your option) any later version.
14296747b715Smrg#
14306747b715Smrg# As a special exception to the GNU General Public License,
14316747b715Smrg# if you distribute this file as part of a program or library that
14326747b715Smrg# is built using GNU Libtool, you may include this file under the
14336747b715Smrg# same distribution terms that you use for the rest of that program.
14346747b715Smrg#
14356747b715Smrg# GNU Libtool is distributed in the hope that it will be useful,
14366747b715Smrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
14376747b715Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14386747b715Smrg# GNU General Public License for more details.
14396747b715Smrg#
14406747b715Smrg# You should have received a copy of the GNU General Public License
14416747b715Smrg# along with GNU Libtool; see the file COPYING.  If not, a copy
14426747b715Smrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
14436747b715Smrg# obtained by writing to the Free Software Foundation, Inc.,
14446747b715Smrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
14456747b715Smrg])
14464642e01fSmrg
14476747b715Smrg# serial 57 LT_INIT
14484642e01fSmrg
14494642e01fSmrg
14506747b715Smrg# LT_PREREQ(VERSION)
14516747b715Smrg# ------------------
14526747b715Smrg# Complain and exit if this libtool version is less that VERSION.
14536747b715Smrgm4_defun([LT_PREREQ],
14546747b715Smrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
14556747b715Smrg       [m4_default([$3],
14566747b715Smrg		   [m4_fatal([Libtool version $1 or higher is required],
14576747b715Smrg		             63)])],
14586747b715Smrg       [$2])])
14594642e01fSmrg
14604642e01fSmrg
14616747b715Smrg# _LT_CHECK_BUILDDIR
14626747b715Smrg# ------------------
14636747b715Smrg# Complain if the absolute build directory name contains unusual characters
14646747b715Smrgm4_defun([_LT_CHECK_BUILDDIR],
14656747b715Smrg[case `pwd` in
14666747b715Smrg  *\ * | *\	*)
14676747b715Smrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
14686747b715Smrgesac
14696747b715Smrg])
14704642e01fSmrg
14714642e01fSmrg
14726747b715Smrg# LT_INIT([OPTIONS])
14736747b715Smrg# ------------------
14746747b715SmrgAC_DEFUN([LT_INIT],
14756747b715Smrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
14766747b715SmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
14776747b715SmrgAC_BEFORE([$0], [LT_LANG])dnl
14786747b715SmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
14796747b715SmrgAC_BEFORE([$0], [LTDL_INIT])dnl
14806747b715Smrgm4_require([_LT_CHECK_BUILDDIR])dnl
14814642e01fSmrg
14826747b715Smrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
14836747b715Smrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
14846747b715Smrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
14856747b715Smrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
14866747b715Smrgdnl unless we require an AC_DEFUNed macro:
14876747b715SmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
14886747b715SmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
14896747b715SmrgAC_REQUIRE([LTVERSION_VERSION])dnl
14906747b715SmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
14916747b715Smrgm4_require([_LT_PROG_LTMAIN])dnl
14924642e01fSmrg
14936747b715Smrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
14944642e01fSmrg
14956747b715Smrgdnl Parse OPTIONS
14966747b715Smrg_LT_SET_OPTIONS([$0], [$1])
149705b261ecSmrg
14986747b715Smrg# This can be used to rebuild libtool when needed
14996747b715SmrgLIBTOOL_DEPS="$ltmain"
15004642e01fSmrg
15016747b715Smrg# Always use our own libtool.
15026747b715SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
15036747b715SmrgAC_SUBST(LIBTOOL)dnl
150405b261ecSmrg
15056747b715Smrg_LT_SETUP
150605b261ecSmrg
15076747b715Smrg# Only expand once:
15086747b715Smrgm4_define([LT_INIT])
15096747b715Smrg])# LT_INIT
151005b261ecSmrg
15116747b715Smrg# Old names:
15126747b715SmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
15136747b715SmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
15146747b715Smrgdnl aclocal-1.4 backwards compatibility:
15156747b715Smrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
15166747b715Smrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
151705b261ecSmrg
151805b261ecSmrg
15196747b715Smrg# _LT_CC_BASENAME(CC)
15206747b715Smrg# -------------------
15216747b715Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
15226747b715Smrgm4_defun([_LT_CC_BASENAME],
15236747b715Smrg[for cc_temp in $1""; do
15246747b715Smrg  case $cc_temp in
15256747b715Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
15266747b715Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
15276747b715Smrg    \-*) ;;
15286747b715Smrg    *) break;;
15296747b715Smrg  esac
15306747b715Smrgdone
15316747b715Smrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
15326747b715Smrg])
153305b261ecSmrg
153405b261ecSmrg
15356747b715Smrg# _LT_FILEUTILS_DEFAULTS
15366747b715Smrg# ----------------------
15376747b715Smrg# It is okay to use these file commands and assume they have been set
15386747b715Smrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
15396747b715Smrgm4_defun([_LT_FILEUTILS_DEFAULTS],
15406747b715Smrg[: ${CP="cp -f"}
15416747b715Smrg: ${MV="mv -f"}
15426747b715Smrg: ${RM="rm -f"}
15436747b715Smrg])# _LT_FILEUTILS_DEFAULTS
154405b261ecSmrg
15454642e01fSmrg
15466747b715Smrg# _LT_SETUP
15476747b715Smrg# ---------
15486747b715Smrgm4_defun([_LT_SETUP],
15496747b715Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
15506747b715SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
15516747b715SmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
15526747b715SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
15534642e01fSmrg
15546747b715Smrg_LT_DECL([], [host_alias], [0], [The host system])dnl
15556747b715Smrg_LT_DECL([], [host], [0])dnl
15566747b715Smrg_LT_DECL([], [host_os], [0])dnl
15576747b715Smrgdnl
15586747b715Smrg_LT_DECL([], [build_alias], [0], [The build system])dnl
15596747b715Smrg_LT_DECL([], [build], [0])dnl
15606747b715Smrg_LT_DECL([], [build_os], [0])dnl
15616747b715Smrgdnl
15626747b715SmrgAC_REQUIRE([AC_PROG_CC])dnl
15636747b715SmrgAC_REQUIRE([LT_PATH_LD])dnl
15646747b715SmrgAC_REQUIRE([LT_PATH_NM])dnl
15656747b715Smrgdnl
15666747b715SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
15676747b715Smrgtest -z "$LN_S" && LN_S="ln -s"
15686747b715Smrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
15696747b715Smrgdnl
15706747b715SmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
15716747b715Smrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
15726747b715Smrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
15736747b715Smrgdnl
15746747b715Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
15756747b715Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
15766747b715Smrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
15776747b715Smrgm4_require([_LT_CMD_RELOAD])dnl
15786747b715Smrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
15796747b715Smrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
15806747b715Smrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
15816747b715Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
15826747b715Smrgm4_require([_LT_WITH_SYSROOT])dnl
158305b261ecSmrg
15846747b715Smrg_LT_CONFIG_LIBTOOL_INIT([
15856747b715Smrg# See if we are running on zsh, and set the options which allow our
15866747b715Smrg# commands through without removal of \ escapes INIT.
15876747b715Smrgif test -n "\${ZSH_VERSION+set}" ; then
15886747b715Smrg   setopt NO_GLOB_SUBST
15896747b715Smrgfi
15906747b715Smrg])
15916747b715Smrgif test -n "${ZSH_VERSION+set}" ; then
15926747b715Smrg   setopt NO_GLOB_SUBST
15936747b715Smrgfi
159405b261ecSmrg
15956747b715Smrg_LT_CHECK_OBJDIR
159605b261ecSmrg
15976747b715Smrgm4_require([_LT_TAG_COMPILER])dnl
159805b261ecSmrg
15996747b715Smrgcase $host_os in
16006747b715Smrgaix3*)
16016747b715Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
16026747b715Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
16036747b715Smrg  # vanish in a puff of smoke.
16046747b715Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
16056747b715Smrg    COLLECT_NAMES=
16066747b715Smrg    export COLLECT_NAMES
16076747b715Smrg  fi
160805b261ecSmrg  ;;
160905b261ecSmrgesac
161005b261ecSmrg
16116747b715Smrg# Global variables:
16126747b715Smrgofile=libtool
16136747b715Smrgcan_build_shared=yes
161405b261ecSmrg
16156747b715Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
16166747b715Smrg# which needs '.lib').
16176747b715Smrglibext=a
161805b261ecSmrg
16196747b715Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
162005b261ecSmrg
16216747b715Smrgold_CC="$CC"
16226747b715Smrgold_CFLAGS="$CFLAGS"
16236747b715Smrg
16246747b715Smrg# Set sane defaults for various variables
16256747b715Smrgtest -z "$CC" && CC=cc
16266747b715Smrgtest -z "$LTCC" && LTCC=$CC
16276747b715Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
16286747b715Smrgtest -z "$LD" && LD=ld
16296747b715Smrgtest -z "$ac_objext" && ac_objext=o
16306747b715Smrg
16316747b715Smrg_LT_CC_BASENAME([$compiler])
16326747b715Smrg
16336747b715Smrg# Only perform the check for file, if the check method requires it
16346747b715Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
16356747b715Smrgcase $deplibs_check_method in
16366747b715Smrgfile_magic*)
16376747b715Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
16386747b715Smrg    _LT_PATH_MAGIC
16394642e01fSmrg  fi
16406747b715Smrg  ;;
16416747b715Smrgesac
164205b261ecSmrg
16436747b715Smrg# Use C for the default configuration in the libtool script
16446747b715SmrgLT_SUPPORTED_TAG([CC])
16456747b715Smrg_LT_LANG_C_CONFIG
16466747b715Smrg_LT_LANG_DEFAULT_CONFIG
16476747b715Smrg_LT_CONFIG_COMMANDS
16486747b715Smrg])# _LT_SETUP
164905b261ecSmrg
165005b261ecSmrg
16516747b715Smrg# _LT_PREPARE_SED_QUOTE_VARS
16526747b715Smrg# --------------------------
16536747b715Smrg# Define a few sed substitution that help us do robust quoting.
16546747b715Smrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
16556747b715Smrg[# Backslashify metacharacters that are still active within
16566747b715Smrg# double-quoted strings.
16576747b715Smrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
165805b261ecSmrg
16596747b715Smrg# Same as above, but do not quote variable references.
16606747b715Smrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
166105b261ecSmrg
16626747b715Smrg# Sed substitution to delay expansion of an escaped shell variable in a
16636747b715Smrg# double_quote_subst'ed string.
16646747b715Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
166505b261ecSmrg
16666747b715Smrg# Sed substitution to delay expansion of an escaped single quote.
16676747b715Smrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
166805b261ecSmrg
16696747b715Smrg# Sed substitution to avoid accidental globbing in evaled expressions
16706747b715Smrgno_glob_subst='s/\*/\\\*/g'
16714642e01fSmrg])
167205b261ecSmrg
16736747b715Smrg# _LT_PROG_LTMAIN
16744642e01fSmrg# ---------------
16756747b715Smrg# Note that this code is called both from `configure', and `config.status'
16766747b715Smrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
16776747b715Smrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
16786747b715Smrg# so we pass a copy along to make sure it has a sensible value anyway.
16796747b715Smrgm4_defun([_LT_PROG_LTMAIN],
16806747b715Smrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
16816747b715Smrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
16826747b715Smrgltmain="$ac_aux_dir/ltmain.sh"
16836747b715Smrg])# _LT_PROG_LTMAIN
168405b261ecSmrg
168505b261ecSmrg
168605b261ecSmrg
16876747b715Smrg# So that we can recreate a full libtool script including additional
16886747b715Smrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
16896747b715Smrg# in macros and then make a single call at the end using the `libtool'
16906747b715Smrg# label.
169105b261ecSmrg
16924642e01fSmrg
16936747b715Smrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
16946747b715Smrg# ----------------------------------------
16956747b715Smrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
16966747b715Smrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
16976747b715Smrg[m4_ifval([$1],
16986747b715Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
16996747b715Smrg                     [$1
17006747b715Smrg])])])
17014642e01fSmrg
17026747b715Smrg# Initialize.
17036747b715Smrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
17044642e01fSmrg
17054642e01fSmrg
17066747b715Smrg# _LT_CONFIG_LIBTOOL([COMMANDS])
17076747b715Smrg# ------------------------------
17086747b715Smrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
17096747b715Smrgm4_define([_LT_CONFIG_LIBTOOL],
17106747b715Smrg[m4_ifval([$1],
17116747b715Smrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
17126747b715Smrg                     [$1
17136747b715Smrg])])])
17144642e01fSmrg
17156747b715Smrg# Initialize.
17166747b715Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
171705b261ecSmrg
171805b261ecSmrg
17196747b715Smrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
17206747b715Smrg# -----------------------------------------------------
17216747b715Smrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
17226747b715Smrg[_LT_CONFIG_LIBTOOL([$1])
17236747b715Smrg_LT_CONFIG_LIBTOOL_INIT([$2])
17246747b715Smrg])
172505b261ecSmrg
172605b261ecSmrg
17276747b715Smrg# _LT_FORMAT_COMMENT([COMMENT])
17286747b715Smrg# -----------------------------
17296747b715Smrg# Add leading comment marks to the start of each line, and a trailing
17306747b715Smrg# full-stop to the whole comment if one is not present already.
17316747b715Smrgm4_define([_LT_FORMAT_COMMENT],
17326747b715Smrg[m4_ifval([$1], [
17336747b715Smrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
17346747b715Smrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
17356747b715Smrg)])
173605b261ecSmrg
173705b261ecSmrg
17384642e01fSmrg
17396747b715Smrg
17406747b715Smrg
17416747b715Smrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
17426747b715Smrg# -------------------------------------------------------------------
17436747b715Smrg# CONFIGNAME is the name given to the value in the libtool script.
17446747b715Smrg# VARNAME is the (base) name used in the configure script.
17456747b715Smrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
17466747b715Smrg# VARNAME.  Any other value will be used directly.
17476747b715Smrgm4_define([_LT_DECL],
17486747b715Smrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
17496747b715Smrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
17506747b715Smrg	[m4_ifval([$1], [$1], [$2])])
17516747b715Smrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
17526747b715Smrg    m4_ifval([$4],
17536747b715Smrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
17546747b715Smrg    lt_dict_add_subkey([lt_decl_dict], [$2],
17556747b715Smrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
175605b261ecSmrg])
175705b261ecSmrg
175805b261ecSmrg
17596747b715Smrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
17606747b715Smrg# --------------------------------------------------------
17616747b715Smrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
176205b261ecSmrg
17634642e01fSmrg
17646747b715Smrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
17656747b715Smrg# ------------------------------------------------
17666747b715Smrgm4_define([lt_decl_tag_varnames],
17676747b715Smrg[_lt_decl_filter([tagged?], [yes], $@)])
176805b261ecSmrg
176905b261ecSmrg
17706747b715Smrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
17716747b715Smrg# ---------------------------------------------------------
17726747b715Smrgm4_define([_lt_decl_filter],
17736747b715Smrg[m4_case([$#],
17746747b715Smrg  [0], [m4_fatal([$0: too few arguments: $#])],
17756747b715Smrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
17766747b715Smrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
17776747b715Smrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
17786747b715Smrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
17796747b715Smrg])
178005b261ecSmrg
178105b261ecSmrg
17826747b715Smrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
17836747b715Smrg# --------------------------------------------------
17846747b715Smrgm4_define([lt_decl_quote_varnames],
17856747b715Smrg[_lt_decl_filter([value], [1], $@)])
178605b261ecSmrg
178705b261ecSmrg
17886747b715Smrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
17896747b715Smrg# ---------------------------------------------------
17906747b715Smrgm4_define([lt_decl_dquote_varnames],
17916747b715Smrg[_lt_decl_filter([value], [2], $@)])
179205b261ecSmrg
179305b261ecSmrg
17946747b715Smrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
17956747b715Smrg# ---------------------------------------------------
17966747b715Smrgm4_define([lt_decl_varnames_tagged],
17976747b715Smrg[m4_assert([$# <= 2])dnl
17986747b715Smrg_$0(m4_quote(m4_default([$1], [[, ]])),
17996747b715Smrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
18006747b715Smrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
18016747b715Smrgm4_define([_lt_decl_varnames_tagged],
18026747b715Smrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
180305b261ecSmrg
18044642e01fSmrg
18056747b715Smrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
18066747b715Smrg# ------------------------------------------------
18076747b715Smrgm4_define([lt_decl_all_varnames],
18086747b715Smrg[_$0(m4_quote(m4_default([$1], [[, ]])),
18096747b715Smrg     m4_if([$2], [],
18106747b715Smrg	   m4_quote(lt_decl_varnames),
18116747b715Smrg	m4_quote(m4_shift($@))))[]dnl
18126747b715Smrg])
18136747b715Smrgm4_define([_lt_decl_all_varnames],
18146747b715Smrg[lt_join($@, lt_decl_varnames_tagged([$1],
18156747b715Smrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
18166747b715Smrg])
181705b261ecSmrg
181805b261ecSmrg
18196747b715Smrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
18206747b715Smrg# ------------------------------------
18216747b715Smrg# Quote a variable value, and forward it to `config.status' so that its
18226747b715Smrg# declaration there will have the same value as in `configure'.  VARNAME
18236747b715Smrg# must have a single quote delimited value for this to work.
18246747b715Smrgm4_define([_LT_CONFIG_STATUS_DECLARE],
18256747b715Smrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
182605b261ecSmrg
182705b261ecSmrg
18286747b715Smrg# _LT_CONFIG_STATUS_DECLARATIONS
18296747b715Smrg# ------------------------------
18306747b715Smrg# We delimit libtool config variables with single quotes, so when
18316747b715Smrg# we write them to config.status, we have to be sure to quote all
18326747b715Smrg# embedded single quotes properly.  In configure, this macro expands
18336747b715Smrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
18346747b715Smrg#
18356747b715Smrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
18366747b715Smrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
18376747b715Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
18386747b715Smrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
183905b261ecSmrg
184005b261ecSmrg
18416747b715Smrg# _LT_LIBTOOL_TAGS
18426747b715Smrg# ----------------
18436747b715Smrg# Output comment and list of tags supported by the script
18446747b715Smrgm4_defun([_LT_LIBTOOL_TAGS],
18456747b715Smrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
18466747b715Smrgavailable_tags="_LT_TAGS"dnl
18476747b715Smrg])
184805b261ecSmrg
184905b261ecSmrg
18506747b715Smrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
18516747b715Smrg# -----------------------------------
18526747b715Smrg# Extract the dictionary values for VARNAME (optionally with TAG) and
18536747b715Smrg# expand to a commented shell variable setting:
18546747b715Smrg#
18556747b715Smrg#    # Some comment about what VAR is for.
18566747b715Smrg#    visible_name=$lt_internal_name
18576747b715Smrgm4_define([_LT_LIBTOOL_DECLARE],
18586747b715Smrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
18596747b715Smrg					   [description])))[]dnl
18606747b715Smrgm4_pushdef([_libtool_name],
18616747b715Smrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
18626747b715Smrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
18636747b715Smrg    [0], [_libtool_name=[$]$1],
18646747b715Smrg    [1], [_libtool_name=$lt_[]$1],
18656747b715Smrg    [2], [_libtool_name=$lt_[]$1],
18666747b715Smrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
18676747b715Smrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
18686747b715Smrg])
186905b261ecSmrg
187005b261ecSmrg
18716747b715Smrg# _LT_LIBTOOL_CONFIG_VARS
18726747b715Smrg# -----------------------
18736747b715Smrg# Produce commented declarations of non-tagged libtool config variables
18746747b715Smrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
18756747b715Smrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
18766747b715Smrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
18776747b715Smrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
18786747b715Smrg[m4_foreach([_lt_var],
18796747b715Smrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
18806747b715Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
188105b261ecSmrg
188205b261ecSmrg
18836747b715Smrg# _LT_LIBTOOL_TAG_VARS(TAG)
18846747b715Smrg# -------------------------
18856747b715Smrgm4_define([_LT_LIBTOOL_TAG_VARS],
18866747b715Smrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
18876747b715Smrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
188805b261ecSmrg
188905b261ecSmrg
18906747b715Smrg# _LT_TAGVAR(VARNAME, [TAGNAME])
18916747b715Smrg# ------------------------------
18926747b715Smrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
189305b261ecSmrg
189405b261ecSmrg
18956747b715Smrg# _LT_CONFIG_COMMANDS
18966747b715Smrg# -------------------
18976747b715Smrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
18986747b715Smrg# variables for single and double quote escaping we saved from calls
18996747b715Smrg# to _LT_DECL, we can put quote escaped variables declarations
19006747b715Smrg# into `config.status', and then the shell code to quote escape them in
19016747b715Smrg# for loops in `config.status'.  Finally, any additional code accumulated
19026747b715Smrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
19036747b715Smrgm4_defun([_LT_CONFIG_COMMANDS],
19046747b715Smrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
19056747b715Smrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
19066747b715Smrg	dnl instead of duplicating it all over again into config.status,
19076747b715Smrg	dnl then we will have config.status run $CONFIG_LT later, so it
19086747b715Smrg	dnl needs to know what name is stored there:
19096747b715Smrg        [AC_CONFIG_COMMANDS([libtool],
19106747b715Smrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
19116747b715Smrg    dnl If the libtool generation code is destined for config.status,
19126747b715Smrg    dnl expand the accumulated commands and init code now:
19136747b715Smrg    [AC_CONFIG_COMMANDS([libtool],
19146747b715Smrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
19156747b715Smrg])#_LT_CONFIG_COMMANDS
191605b261ecSmrg
191705b261ecSmrg
19186747b715Smrg# Initialize.
19196747b715Smrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
19206747b715Smrg[
192105b261ecSmrg
19226747b715Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
19236747b715Smrg# if CDPATH is set.
19246747b715Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
192505b261ecSmrg
19266747b715Smrgsed_quote_subst='$sed_quote_subst'
19276747b715Smrgdouble_quote_subst='$double_quote_subst'
19286747b715Smrgdelay_variable_subst='$delay_variable_subst'
19296747b715Smrg_LT_CONFIG_STATUS_DECLARATIONS
19306747b715SmrgLTCC='$LTCC'
19316747b715SmrgLTCFLAGS='$LTCFLAGS'
19326747b715Smrgcompiler='$compiler_DEFAULT'
193305b261ecSmrg
19346747b715Smrg# A function that is used when there is no print builtin or printf.
19356747b715Smrgfunc_fallback_echo ()
19366747b715Smrg{
19376747b715Smrg  eval 'cat <<_LTECHO_EOF
19386747b715Smrg\$[]1
19396747b715Smrg_LTECHO_EOF'
19406747b715Smrg}
194105b261ecSmrg
19426747b715Smrg# Quote evaled strings.
19436747b715Smrgfor var in lt_decl_all_varnames([[ \
19446747b715Smrg]], lt_decl_quote_varnames); do
19456747b715Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19466747b715Smrg    *[[\\\\\\\`\\"\\\$]]*)
19476747b715Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
19486747b715Smrg      ;;
19496747b715Smrg    *)
19506747b715Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19516747b715Smrg      ;;
19526747b715Smrg    esac
19536747b715Smrgdone
195405b261ecSmrg
19556747b715Smrg# Double-quote double-evaled strings.
19566747b715Smrgfor var in lt_decl_all_varnames([[ \
19576747b715Smrg]], lt_decl_dquote_varnames); do
19586747b715Smrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
19596747b715Smrg    *[[\\\\\\\`\\"\\\$]]*)
19606747b715Smrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
19616747b715Smrg      ;;
19626747b715Smrg    *)
19636747b715Smrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
19646747b715Smrg      ;;
19656747b715Smrg    esac
19666747b715Smrgdone
196705b261ecSmrg
19686747b715Smrg_LT_OUTPUT_LIBTOOL_INIT
19696747b715Smrg])
197005b261ecSmrg
19716747b715Smrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
19726747b715Smrg# ------------------------------------
19736747b715Smrg# Generate a child script FILE with all initialization necessary to
19746747b715Smrg# reuse the environment learned by the parent script, and make the
19756747b715Smrg# file executable.  If COMMENT is supplied, it is inserted after the
19766747b715Smrg# `#!' sequence but before initialization text begins.  After this
19776747b715Smrg# macro, additional text can be appended to FILE to form the body of
19786747b715Smrg# the child script.  The macro ends with non-zero status if the
19796747b715Smrg# file could not be fully written (such as if the disk is full).
19806747b715Smrgm4_ifdef([AS_INIT_GENERATED],
19816747b715Smrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
19826747b715Smrg[m4_defun([_LT_GENERATED_FILE_INIT],
19836747b715Smrg[m4_require([AS_PREPARE])]dnl
19846747b715Smrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
19856747b715Smrg[lt_write_fail=0
19866747b715Smrgcat >$1 <<_ASEOF || lt_write_fail=1
19876747b715Smrg#! $SHELL
19886747b715Smrg# Generated by $as_me.
19896747b715Smrg$2
19906747b715SmrgSHELL=\${CONFIG_SHELL-$SHELL}
19916747b715Smrgexport SHELL
19926747b715Smrg_ASEOF
19936747b715Smrgcat >>$1 <<\_ASEOF || lt_write_fail=1
19946747b715SmrgAS_SHELL_SANITIZE
19956747b715Smrg_AS_PREPARE
19966747b715Smrgexec AS_MESSAGE_FD>&1
19976747b715Smrg_ASEOF
19986747b715Smrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
19996747b715Smrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
200005b261ecSmrg
20016747b715Smrg# LT_OUTPUT
20026747b715Smrg# ---------
20036747b715Smrg# This macro allows early generation of the libtool script (before
20046747b715Smrg# AC_OUTPUT is called), incase it is used in configure for compilation
20056747b715Smrg# tests.
20066747b715SmrgAC_DEFUN([LT_OUTPUT],
20076747b715Smrg[: ${CONFIG_LT=./config.lt}
20086747b715SmrgAC_MSG_NOTICE([creating $CONFIG_LT])
20096747b715Smrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
20106747b715Smrg[# Run this file to recreate a libtool stub with the current configuration.])
20114642e01fSmrg
20126747b715Smrgcat >>"$CONFIG_LT" <<\_LTEOF
20136747b715Smrglt_cl_silent=false
20146747b715Smrgexec AS_MESSAGE_LOG_FD>>config.log
20156747b715Smrg{
20166747b715Smrg  echo
20176747b715Smrg  AS_BOX([Running $as_me.])
20186747b715Smrg} >&AS_MESSAGE_LOG_FD
201905b261ecSmrg
20206747b715Smrglt_cl_help="\
20216747b715Smrg\`$as_me' creates a local libtool stub from the current configuration,
20226747b715Smrgfor use in further configure time tests before the real libtool is
20236747b715Smrggenerated.
202405b261ecSmrg
20256747b715SmrgUsage: $[0] [[OPTIONS]]
202605b261ecSmrg
20276747b715Smrg  -h, --help      print this help, then exit
20286747b715Smrg  -V, --version   print version number, then exit
20296747b715Smrg  -q, --quiet     do not print progress messages
20306747b715Smrg  -d, --debug     don't remove temporary files
203105b261ecSmrg
20326747b715SmrgReport bugs to <bug-libtool@gnu.org>."
203305b261ecSmrg
20346747b715Smrglt_cl_version="\
20356747b715Smrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
20366747b715Smrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
20376747b715Smrgconfigured by $[0], generated by m4_PACKAGE_STRING.
203805b261ecSmrg
20396747b715SmrgCopyright (C) 2010 Free Software Foundation, Inc.
20406747b715SmrgThis config.lt script is free software; the Free Software Foundation
20416747b715Smrggives unlimited permision to copy, distribute and modify it."
204205b261ecSmrg
20436747b715Smrgwhile test $[#] != 0
20446747b715Smrgdo
20456747b715Smrg  case $[1] in
20466747b715Smrg    --version | --v* | -V )
20476747b715Smrg      echo "$lt_cl_version"; exit 0 ;;
20486747b715Smrg    --help | --h* | -h )
20496747b715Smrg      echo "$lt_cl_help"; exit 0 ;;
20506747b715Smrg    --debug | --d* | -d )
20516747b715Smrg      debug=: ;;
20526747b715Smrg    --quiet | --q* | --silent | --s* | -q )
20536747b715Smrg      lt_cl_silent=: ;;
205405b261ecSmrg
20556747b715Smrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
20566747b715SmrgTry \`$[0] --help' for more information.]) ;;
205705b261ecSmrg
20586747b715Smrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
20596747b715SmrgTry \`$[0] --help' for more information.]) ;;
20606747b715Smrg  esac
20616747b715Smrg  shift
20626747b715Smrgdone
206305b261ecSmrg
20646747b715Smrgif $lt_cl_silent; then
20656747b715Smrg  exec AS_MESSAGE_FD>/dev/null
206605b261ecSmrgfi
20676747b715Smrg_LTEOF
206805b261ecSmrg
20696747b715Smrgcat >>"$CONFIG_LT" <<_LTEOF
20706747b715Smrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
20716747b715Smrg_LTEOF
207205b261ecSmrg
20736747b715Smrgcat >>"$CONFIG_LT" <<\_LTEOF
20746747b715SmrgAC_MSG_NOTICE([creating $ofile])
20756747b715Smrg_LT_OUTPUT_LIBTOOL_COMMANDS
20766747b715SmrgAS_EXIT(0)
20776747b715Smrg_LTEOF
20786747b715Smrgchmod +x "$CONFIG_LT"
207905b261ecSmrg
20806747b715Smrg# configure is writing to config.log, but config.lt does its own redirection,
20816747b715Smrg# appending to config.log, which fails on DOS, as config.log is still kept
20826747b715Smrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
20836747b715Smrg# config.log, so it can be properly (re)opened and appended to by config.lt.
20846747b715Smrglt_cl_success=:
20856747b715Smrgtest "$silent" = yes &&
20866747b715Smrg  lt_config_lt_args="$lt_config_lt_args --quiet"
20876747b715Smrgexec AS_MESSAGE_LOG_FD>/dev/null
20886747b715Smrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
20896747b715Smrgexec AS_MESSAGE_LOG_FD>>config.log
20906747b715Smrg$lt_cl_success || AS_EXIT(1)
20916747b715Smrg])# LT_OUTPUT
209205b261ecSmrg
20936747b715Smrg
20946747b715Smrg# _LT_CONFIG(TAG)
20956747b715Smrg# ---------------
20966747b715Smrg# If TAG is the built-in tag, create an initial libtool script with a
20976747b715Smrg# default configuration from the untagged config vars.  Otherwise add code
20986747b715Smrg# to config.status for appending the configuration named by TAG from the
20996747b715Smrg# matching tagged config vars.
21006747b715Smrgm4_defun([_LT_CONFIG],
21016747b715Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
21026747b715Smrg_LT_CONFIG_SAVE_COMMANDS([
21036747b715Smrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
21046747b715Smrg  m4_if(_LT_TAG, [C], [
21056747b715Smrg    # See if we are running on zsh, and set the options which allow our
21066747b715Smrg    # commands through without removal of \ escapes.
21076747b715Smrg    if test -n "${ZSH_VERSION+set}" ; then
21086747b715Smrg      setopt NO_GLOB_SUBST
210905b261ecSmrg    fi
211005b261ecSmrg
21116747b715Smrg    cfgfile="${ofile}T"
21126747b715Smrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
21136747b715Smrg    $RM "$cfgfile"
211405b261ecSmrg
21156747b715Smrg    cat <<_LT_EOF >> "$cfgfile"
21166747b715Smrg#! $SHELL
211705b261ecSmrg
21186747b715Smrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
21196747b715Smrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
21206747b715Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
21216747b715Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
21226747b715Smrg#
21236747b715Smrg_LT_COPYING
21246747b715Smrg_LT_LIBTOOL_TAGS
212505b261ecSmrg
21266747b715Smrg# ### BEGIN LIBTOOL CONFIG
21276747b715Smrg_LT_LIBTOOL_CONFIG_VARS
21286747b715Smrg_LT_LIBTOOL_TAG_VARS
21296747b715Smrg# ### END LIBTOOL CONFIG
213005b261ecSmrg
21316747b715Smrg_LT_EOF
21326747b715Smrg
21336747b715Smrg  case $host_os in
21346747b715Smrg  aix3*)
21356747b715Smrg    cat <<\_LT_EOF >> "$cfgfile"
21366747b715Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
21376747b715Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
21386747b715Smrg# vanish in a puff of smoke.
21396747b715Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
21406747b715Smrg  COLLECT_NAMES=
21416747b715Smrg  export COLLECT_NAMES
21426747b715Smrgfi
21436747b715Smrg_LT_EOF
21444642e01fSmrg    ;;
21454642e01fSmrg  esac
214605b261ecSmrg
21476747b715Smrg  _LT_PROG_LTMAIN
214805b261ecSmrg
21496747b715Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
21506747b715Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
21516747b715Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
21526747b715Smrg  # is reportedly fixed, but why not run on old versions too?
21536747b715Smrg  sed '$q' "$ltmain" >> "$cfgfile" \
21546747b715Smrg     || (rm -f "$cfgfile"; exit 1)
215505b261ecSmrg
21566747b715Smrg  _LT_PROG_REPLACE_SHELLFNS
215705b261ecSmrg
21586747b715Smrg   mv -f "$cfgfile" "$ofile" ||
21596747b715Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
21606747b715Smrg  chmod +x "$ofile"
21616747b715Smrg],
21626747b715Smrg[cat <<_LT_EOF >> "$ofile"
216305b261ecSmrg
21646747b715Smrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
21656747b715Smrgdnl in a comment (ie after a #).
21666747b715Smrg# ### BEGIN LIBTOOL TAG CONFIG: $1
21676747b715Smrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
21686747b715Smrg# ### END LIBTOOL TAG CONFIG: $1
21696747b715Smrg_LT_EOF
21706747b715Smrg])dnl /m4_if
21716747b715Smrg],
21726747b715Smrg[m4_if([$1], [], [
21736747b715Smrg    PACKAGE='$PACKAGE'
21746747b715Smrg    VERSION='$VERSION'
21756747b715Smrg    TIMESTAMP='$TIMESTAMP'
21766747b715Smrg    RM='$RM'
21776747b715Smrg    ofile='$ofile'], [])
21786747b715Smrg])dnl /_LT_CONFIG_SAVE_COMMANDS
21796747b715Smrg])# _LT_CONFIG
218005b261ecSmrg
218105b261ecSmrg
21826747b715Smrg# LT_SUPPORTED_TAG(TAG)
21836747b715Smrg# ---------------------
21846747b715Smrg# Trace this macro to discover what tags are supported by the libtool
21856747b715Smrg# --tag option, using:
21866747b715Smrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
21876747b715SmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
218805b261ecSmrg
218905b261ecSmrg
21906747b715Smrg# C support is built-in for now
21916747b715Smrgm4_define([_LT_LANG_C_enabled], [])
21926747b715Smrgm4_define([_LT_TAGS], [])
219305b261ecSmrg
219405b261ecSmrg
21956747b715Smrg# LT_LANG(LANG)
21966747b715Smrg# -------------
21976747b715Smrg# Enable libtool support for the given language if not already enabled.
21986747b715SmrgAC_DEFUN([LT_LANG],
21996747b715Smrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
22006747b715Smrgm4_case([$1],
22016747b715Smrg  [C],			[_LT_LANG(C)],
22026747b715Smrg  [C++],		[_LT_LANG(CXX)],
22036747b715Smrg  [Java],		[_LT_LANG(GCJ)],
22046747b715Smrg  [Fortran 77],		[_LT_LANG(F77)],
22056747b715Smrg  [Fortran],		[_LT_LANG(FC)],
22066747b715Smrg  [Windows Resource],	[_LT_LANG(RC)],
22076747b715Smrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
22086747b715Smrg    [_LT_LANG($1)],
22096747b715Smrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
22106747b715Smrg])# LT_LANG
221105b261ecSmrg
221205b261ecSmrg
22136747b715Smrg# _LT_LANG(LANGNAME)
22146747b715Smrg# ------------------
22156747b715Smrgm4_defun([_LT_LANG],
22166747b715Smrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
22176747b715Smrg  [LT_SUPPORTED_TAG([$1])dnl
22186747b715Smrg  m4_append([_LT_TAGS], [$1 ])dnl
22196747b715Smrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
22206747b715Smrg  _LT_LANG_$1_CONFIG($1)])dnl
22216747b715Smrg])# _LT_LANG
222205b261ecSmrg
222305b261ecSmrg
22246747b715Smrg# _LT_LANG_DEFAULT_CONFIG
22256747b715Smrg# -----------------------
22266747b715Smrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
22276747b715Smrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
22286747b715Smrg  [LT_LANG(CXX)],
22296747b715Smrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
223005b261ecSmrg
22316747b715SmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
22326747b715Smrg  [LT_LANG(F77)],
22336747b715Smrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
223405b261ecSmrg
22356747b715SmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
22366747b715Smrg  [LT_LANG(FC)],
22376747b715Smrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
223805b261ecSmrg
22396747b715Smrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
22406747b715Smrgdnl pulling things in needlessly.
22416747b715SmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
22426747b715Smrg  [LT_LANG(GCJ)],
22436747b715Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
22446747b715Smrg    [LT_LANG(GCJ)],
22456747b715Smrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
22466747b715Smrg      [LT_LANG(GCJ)],
22476747b715Smrg      [m4_ifdef([AC_PROG_GCJ],
22486747b715Smrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
22496747b715Smrg       m4_ifdef([A][M_PROG_GCJ],
22506747b715Smrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
22516747b715Smrg       m4_ifdef([LT_PROG_GCJ],
22526747b715Smrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
225305b261ecSmrg
22546747b715SmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
22556747b715Smrg  [LT_LANG(RC)],
22566747b715Smrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
22576747b715Smrg])# _LT_LANG_DEFAULT_CONFIG
225805b261ecSmrg
22596747b715Smrg# Obsolete macros:
22606747b715SmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
22616747b715SmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
22626747b715SmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
22636747b715SmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
22646747b715SmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
22656747b715Smrgdnl aclocal-1.4 backwards compatibility:
22666747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
22676747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
22686747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
22696747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
22706747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
227105b261ecSmrg
227205b261ecSmrg
22736747b715Smrg# _LT_TAG_COMPILER
22746747b715Smrg# ----------------
22756747b715Smrgm4_defun([_LT_TAG_COMPILER],
22766747b715Smrg[AC_REQUIRE([AC_PROG_CC])dnl
227705b261ecSmrg
22786747b715Smrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
22796747b715Smrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
22806747b715Smrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
22816747b715Smrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
228205b261ecSmrg
22836747b715Smrg# If no C compiler was specified, use CC.
22846747b715SmrgLTCC=${LTCC-"$CC"}
228505b261ecSmrg
22866747b715Smrg# If no C compiler flags were specified, use CFLAGS.
22876747b715SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
228805b261ecSmrg
22896747b715Smrg# Allow CC to be a program name with arguments.
22906747b715Smrgcompiler=$CC
22916747b715Smrg])# _LT_TAG_COMPILER
229205b261ecSmrg
229305b261ecSmrg
22946747b715Smrg# _LT_COMPILER_BOILERPLATE
22956747b715Smrg# ------------------------
22966747b715Smrg# Check for compiler boilerplate output or warnings with
22976747b715Smrg# the simple compiler test code.
22986747b715Smrgm4_defun([_LT_COMPILER_BOILERPLATE],
22996747b715Smrg[m4_require([_LT_DECL_SED])dnl
23006747b715Smrgac_outfile=conftest.$ac_objext
23016747b715Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
23026747b715Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
23036747b715Smrg_lt_compiler_boilerplate=`cat conftest.err`
23046747b715Smrg$RM conftest*
23056747b715Smrg])# _LT_COMPILER_BOILERPLATE
230605b261ecSmrg
230705b261ecSmrg
23086747b715Smrg# _LT_LINKER_BOILERPLATE
23096747b715Smrg# ----------------------
23106747b715Smrg# Check for linker boilerplate output or warnings with
23116747b715Smrg# the simple link test code.
23126747b715Smrgm4_defun([_LT_LINKER_BOILERPLATE],
23136747b715Smrg[m4_require([_LT_DECL_SED])dnl
23146747b715Smrgac_outfile=conftest.$ac_objext
23156747b715Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
23166747b715Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
23176747b715Smrg_lt_linker_boilerplate=`cat conftest.err`
23186747b715Smrg$RM -r conftest*
23196747b715Smrg])# _LT_LINKER_BOILERPLATE
232005b261ecSmrg
23216747b715Smrg# _LT_REQUIRED_DARWIN_CHECKS
23226747b715Smrg# -------------------------
23236747b715Smrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
23246747b715Smrg  case $host_os in
23256747b715Smrg    rhapsody* | darwin*)
23266747b715Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
23276747b715Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
23286747b715Smrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
23296747b715Smrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
23306747b715Smrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
23316747b715Smrg    _LT_DECL([], [DSYMUTIL], [1],
23326747b715Smrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
23336747b715Smrg    _LT_DECL([], [NMEDIT], [1],
23346747b715Smrg      [Tool to change global to local symbols on Mac OS X])
23356747b715Smrg    _LT_DECL([], [LIPO], [1],
23366747b715Smrg      [Tool to manipulate fat objects and archives on Mac OS X])
23376747b715Smrg    _LT_DECL([], [OTOOL], [1],
23386747b715Smrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
23396747b715Smrg    _LT_DECL([], [OTOOL64], [1],
23406747b715Smrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
234105b261ecSmrg
23426747b715Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
23436747b715Smrg      [lt_cv_apple_cc_single_mod=no
23446747b715Smrg      if test -z "${LT_MULTI_MODULE}"; then
23456747b715Smrg	# By default we will add the -single_module flag. You can override
23466747b715Smrg	# by either setting the environment variable LT_MULTI_MODULE
23476747b715Smrg	# non-empty at configure time, or by adding -multi_module to the
23486747b715Smrg	# link flags.
23496747b715Smrg	rm -rf libconftest.dylib*
23506747b715Smrg	echo "int foo(void){return 1;}" > conftest.c
23516747b715Smrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
23526747b715Smrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
23536747b715Smrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
23546747b715Smrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
23556747b715Smrg        _lt_result=$?
23566747b715Smrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
23576747b715Smrg	  lt_cv_apple_cc_single_mod=yes
23586747b715Smrg	else
23596747b715Smrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
23606747b715Smrg	fi
23616747b715Smrg	rm -rf libconftest.dylib*
23626747b715Smrg	rm -f conftest.*
23636747b715Smrg      fi])
23646747b715Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
23656747b715Smrg      [lt_cv_ld_exported_symbols_list],
23666747b715Smrg      [lt_cv_ld_exported_symbols_list=no
23676747b715Smrg      save_LDFLAGS=$LDFLAGS
23686747b715Smrg      echo "_main" > conftest.sym
23696747b715Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
23706747b715Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
23716747b715Smrg	[lt_cv_ld_exported_symbols_list=yes],
23726747b715Smrg	[lt_cv_ld_exported_symbols_list=no])
23736747b715Smrg	LDFLAGS="$save_LDFLAGS"
23746747b715Smrg    ])
23756747b715Smrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
23766747b715Smrg      [lt_cv_ld_force_load=no
23776747b715Smrg      cat > conftest.c << _LT_EOF
23786747b715Smrgint forced_loaded() { return 2;}
23796747b715Smrg_LT_EOF
23806747b715Smrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
23816747b715Smrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
23826747b715Smrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
23836747b715Smrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
23846747b715Smrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
23856747b715Smrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
23866747b715Smrg      cat > conftest.c << _LT_EOF
23876747b715Smrgint main() { return 0;}
23886747b715Smrg_LT_EOF
23896747b715Smrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
23906747b715Smrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
23916747b715Smrg      _lt_result=$?
23926747b715Smrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
23936747b715Smrg	lt_cv_ld_force_load=yes
23946747b715Smrg      else
23956747b715Smrg	cat conftest.err >&AS_MESSAGE_LOG_FD
23966747b715Smrg      fi
23976747b715Smrg        rm -f conftest.err libconftest.a conftest conftest.c
23986747b715Smrg        rm -rf conftest.dSYM
23996747b715Smrg    ])
24006747b715Smrg    case $host_os in
24016747b715Smrg    rhapsody* | darwin1.[[012]])
24026747b715Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
24036747b715Smrg    darwin1.*)
24046747b715Smrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
24056747b715Smrg    darwin*) # darwin 5.x on
24066747b715Smrg      # if running on 10.5 or later, the deployment target defaults
24076747b715Smrg      # to the OS version, if on x86, and 10.4, the deployment
24086747b715Smrg      # target defaults to 10.4. Don't you love it?
24096747b715Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
24106747b715Smrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
24116747b715Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
24126747b715Smrg	10.[[012]]*)
24136747b715Smrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
24146747b715Smrg	10.*)
24156747b715Smrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
24166747b715Smrg      esac
24176747b715Smrg    ;;
24186747b715Smrg  esac
24196747b715Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
24206747b715Smrg      _lt_dar_single_mod='$single_module'
24216747b715Smrg    fi
24226747b715Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
24236747b715Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
24246747b715Smrg    else
24256747b715Smrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
24266747b715Smrg    fi
24276747b715Smrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
24286747b715Smrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
24296747b715Smrg    else
24306747b715Smrg      _lt_dsymutil=
24316747b715Smrg    fi
24326747b715Smrg    ;;
24336747b715Smrg  esac
24346747b715Smrg])
24354642e01fSmrg
243605b261ecSmrg
24376747b715Smrg# _LT_DARWIN_LINKER_FEATURES
24386747b715Smrg# --------------------------
24396747b715Smrg# Checks for linker and compiler features on darwin
24406747b715Smrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
24416747b715Smrg[
24426747b715Smrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
24436747b715Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
24446747b715Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
24456747b715Smrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
24466747b715Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
24476747b715Smrg  if test "$lt_cv_ld_force_load" = "yes"; then
24486747b715Smrg    _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\"`'
24496747b715Smrg  else
24506747b715Smrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
24516747b715Smrg  fi
24526747b715Smrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
24536747b715Smrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
24546747b715Smrg  case $cc_basename in
24556747b715Smrg     ifort*) _lt_dar_can_shared=yes ;;
24566747b715Smrg     *) _lt_dar_can_shared=$GCC ;;
24576747b715Smrg  esac
24586747b715Smrg  if test "$_lt_dar_can_shared" = "yes"; then
24596747b715Smrg    output_verbose_link_cmd=func_echo_all
24606747b715Smrg    _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}"
24616747b715Smrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
24626747b715Smrg    _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}"
24636747b715Smrg    _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}"
24646747b715Smrg    m4_if([$1], [CXX],
24656747b715Smrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
24666747b715Smrg      _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}"
24676747b715Smrg      _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}"
24686747b715Smrg    fi
24696747b715Smrg],[])
24706747b715Smrg  else
24716747b715Smrg  _LT_TAGVAR(ld_shlibs, $1)=no
24726747b715Smrg  fi
24736747b715Smrg])
247405b261ecSmrg
24756747b715Smrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
24766747b715Smrg# ----------------------------------
24776747b715Smrg# Links a minimal program and checks the executable
24786747b715Smrg# for the system default hardcoded library path. In most cases,
24796747b715Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
24806747b715Smrg# the location of the communication and MPI libs are included too.
24816747b715Smrg# If we don't find anything, use the default library path according
24826747b715Smrg# to the aix ld manual.
24836747b715Smrg# Store the results from the different compilers for each TAGNAME.
24846747b715Smrg# Allow to override them for all tags through lt_cv_aix_libpath.
24856747b715Smrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
24866747b715Smrg[m4_require([_LT_DECL_SED])dnl
24876747b715Smrgif test "${lt_cv_aix_libpath+set}" = set; then
24886747b715Smrg  aix_libpath=$lt_cv_aix_libpath
24896747b715Smrgelse
24906747b715Smrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
24916747b715Smrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
24926747b715Smrg  lt_aix_libpath_sed='[
24936747b715Smrg      /Import File Strings/,/^$/ {
24946747b715Smrg	  /^0/ {
24956747b715Smrg	      s/^0  *\([^ ]*\) *$/\1/
24966747b715Smrg	      p
24976747b715Smrg	  }
24986747b715Smrg      }]'
24996747b715Smrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
25006747b715Smrg  # Check for a 64-bit object if we didn't find anything.
25016747b715Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
25026747b715Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
25036747b715Smrg  fi],[])
25046747b715Smrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
25056747b715Smrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
25066747b715Smrg  fi
25076747b715Smrg  ])
25086747b715Smrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
250905b261ecSmrgfi
25106747b715Smrg])# _LT_SYS_MODULE_PATH_AIX
251105b261ecSmrg
251205b261ecSmrg
25136747b715Smrg# _LT_SHELL_INIT(ARG)
25146747b715Smrg# -------------------
25156747b715Smrgm4_define([_LT_SHELL_INIT],
25166747b715Smrg[m4_divert_text([M4SH-INIT], [$1
25176747b715Smrg])])# _LT_SHELL_INIT
25184642e01fSmrg
25194642e01fSmrg
252005b261ecSmrg
25216747b715Smrg# _LT_PROG_ECHO_BACKSLASH
25226747b715Smrg# -----------------------
25236747b715Smrg# Find how we can fake an echo command that does not interpret backslash.
25246747b715Smrg# In particular, with Autoconf 2.60 or later we add some code to the start
25256747b715Smrg# of the generated configure script which will find a shell with a builtin
25266747b715Smrg# printf (which we can use as an echo command).
25276747b715Smrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
25286747b715Smrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25296747b715SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
25306747b715SmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
25316747b715Smrg
25326747b715SmrgAC_MSG_CHECKING([how to print strings])
25336747b715Smrg# Test print first, because it will be a builtin if present.
25346747b715Smrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
25356747b715Smrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
25366747b715Smrg  ECHO='print -r --'
25376747b715Smrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
25386747b715Smrg  ECHO='printf %s\n'
25396747b715Smrgelse
25406747b715Smrg  # Use this function as a fallback that always works.
25416747b715Smrg  func_fallback_echo ()
25426747b715Smrg  {
25436747b715Smrg    eval 'cat <<_LTECHO_EOF
25446747b715Smrg$[]1
25456747b715Smrg_LTECHO_EOF'
25466747b715Smrg  }
25476747b715Smrg  ECHO='func_fallback_echo'
25486747b715Smrgfi
254905b261ecSmrg
25506747b715Smrg# func_echo_all arg...
25516747b715Smrg# Invoke $ECHO with all args, space-separated.
25526747b715Smrgfunc_echo_all ()
25536747b715Smrg{
25546747b715Smrg    $ECHO "$*" 
25556747b715Smrg}
255605b261ecSmrg
25576747b715Smrgcase "$ECHO" in
25586747b715Smrg  printf*) AC_MSG_RESULT([printf]) ;;
25596747b715Smrg  print*) AC_MSG_RESULT([print -r]) ;;
25606747b715Smrg  *) AC_MSG_RESULT([cat]) ;;
25616747b715Smrgesac
256205b261ecSmrg
25636747b715Smrgm4_ifdef([_AS_DETECT_SUGGESTED],
25646747b715Smrg[_AS_DETECT_SUGGESTED([
25656747b715Smrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
25666747b715Smrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
25676747b715Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
25686747b715Smrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
25696747b715Smrg    PATH=/empty FPATH=/empty; export PATH FPATH
25706747b715Smrg    test "X`printf %s $ECHO`" = "X$ECHO" \
25716747b715Smrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
25724642e01fSmrg
25736747b715Smrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
25746747b715Smrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
25756747b715Smrg])# _LT_PROG_ECHO_BACKSLASH
257605b261ecSmrg
257705b261ecSmrg
25786747b715Smrg# _LT_WITH_SYSROOT
25796747b715Smrg# ----------------
25806747b715SmrgAC_DEFUN([_LT_WITH_SYSROOT],
25816747b715Smrg[AC_MSG_CHECKING([for sysroot])
25826747b715SmrgAC_ARG_WITH([sysroot],
25836747b715Smrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
25846747b715Smrg                        (or the compiler's sysroot if not specified).],
25856747b715Smrg[], [with_sysroot=no])
25866747b715Smrg
25876747b715Smrgdnl lt_sysroot will always be passed unquoted.  We quote it here
25886747b715Smrgdnl in case the user passed a directory name.
25896747b715Smrglt_sysroot=
25906747b715Smrgcase ${with_sysroot} in #(
25916747b715Smrg yes)
25926747b715Smrg   if test "$GCC" = yes; then
25936747b715Smrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
25946747b715Smrg   fi
25956747b715Smrg   ;; #(
25966747b715Smrg /*)
25976747b715Smrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
25986747b715Smrg   ;; #(
25996747b715Smrg no|'')
26006747b715Smrg   ;; #(
26016747b715Smrg *)
26026747b715Smrg   AC_MSG_RESULT([${with_sysroot}])
26036747b715Smrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
26046747b715Smrg   ;;
26056747b715Smrgesac
26064642e01fSmrg
26076747b715Smrg AC_MSG_RESULT([${lt_sysroot:-no}])
26086747b715Smrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
26096747b715Smrg[dependent libraries, and in which our libraries should be installed.])])
26104642e01fSmrg
26116747b715Smrg# _LT_ENABLE_LOCK
26126747b715Smrg# ---------------
26136747b715Smrgm4_defun([_LT_ENABLE_LOCK],
26146747b715Smrg[AC_ARG_ENABLE([libtool-lock],
26156747b715Smrg  [AS_HELP_STRING([--disable-libtool-lock],
26166747b715Smrg    [avoid locking (might break parallel builds)])])
26176747b715Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
26186747b715Smrg
26196747b715Smrg# Some flags need to be propagated to the compiler or linker for good
26206747b715Smrg# libtool support.
26216747b715Smrgcase $host in
26226747b715Smrgia64-*-hpux*)
26236747b715Smrg  # Find out which ABI we are using.
26246747b715Smrg  echo 'int i;' > conftest.$ac_ext
26256747b715Smrg  if AC_TRY_EVAL(ac_compile); then
26266747b715Smrg    case `/usr/bin/file conftest.$ac_objext` in
26276747b715Smrg      *ELF-32*)
26286747b715Smrg	HPUX_IA64_MODE="32"
262905b261ecSmrg	;;
26306747b715Smrg      *ELF-64*)
26316747b715Smrg	HPUX_IA64_MODE="64"
263205b261ecSmrg	;;
26336747b715Smrg    esac
26346747b715Smrg  fi
26356747b715Smrg  rm -rf conftest*
263605b261ecSmrg  ;;
26376747b715Smrg*-*-irix6*)
26386747b715Smrg  # Find out which ABI we are using.
26396747b715Smrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
26406747b715Smrg  if AC_TRY_EVAL(ac_compile); then
26416747b715Smrg    if test "$lt_cv_prog_gnu_ld" = yes; then
26426747b715Smrg      case `/usr/bin/file conftest.$ac_objext` in
26436747b715Smrg	*32-bit*)
26446747b715Smrg	  LD="${LD-ld} -melf32bsmip"
26456747b715Smrg	  ;;
26466747b715Smrg	*N32*)
26476747b715Smrg	  LD="${LD-ld} -melf32bmipn32"
26486747b715Smrg	  ;;
26496747b715Smrg	*64-bit*)
26506747b715Smrg	  LD="${LD-ld} -melf64bmip"
26516747b715Smrg	;;
26526747b715Smrg      esac
265305b261ecSmrg    else
26546747b715Smrg      case `/usr/bin/file conftest.$ac_objext` in
26556747b715Smrg	*32-bit*)
26566747b715Smrg	  LD="${LD-ld} -32"
26576747b715Smrg	  ;;
26586747b715Smrg	*N32*)
26596747b715Smrg	  LD="${LD-ld} -n32"
26606747b715Smrg	  ;;
26616747b715Smrg	*64-bit*)
26626747b715Smrg	  LD="${LD-ld} -64"
26636747b715Smrg	  ;;
26646747b715Smrg      esac
266505b261ecSmrg    fi
26666747b715Smrg  fi
26676747b715Smrg  rm -rf conftest*
266805b261ecSmrg  ;;
266905b261ecSmrg
26706747b715Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
26716747b715Smrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
26726747b715Smrg  # Find out which ABI we are using.
26736747b715Smrg  echo 'int i;' > conftest.$ac_ext
26746747b715Smrg  if AC_TRY_EVAL(ac_compile); then
26756747b715Smrg    case `/usr/bin/file conftest.o` in
26766747b715Smrg      *32-bit*)
26776747b715Smrg	case $host in
26786747b715Smrg	  x86_64-*kfreebsd*-gnu)
26796747b715Smrg	    LD="${LD-ld} -m elf_i386_fbsd"
26806747b715Smrg	    ;;
26816747b715Smrg	  x86_64-*linux*)
26826747b715Smrg	    LD="${LD-ld} -m elf_i386"
26836747b715Smrg	    ;;
26846747b715Smrg	  ppc64-*linux*|powerpc64-*linux*)
26856747b715Smrg	    LD="${LD-ld} -m elf32ppclinux"
26866747b715Smrg	    ;;
26876747b715Smrg	  s390x-*linux*)
26886747b715Smrg	    LD="${LD-ld} -m elf_s390"
26896747b715Smrg	    ;;
26906747b715Smrg	  sparc64-*linux*)
26916747b715Smrg	    LD="${LD-ld} -m elf32_sparc"
26926747b715Smrg	    ;;
26936747b715Smrg	esac
26946747b715Smrg	;;
26956747b715Smrg      *64-bit*)
26966747b715Smrg	case $host in
26976747b715Smrg	  x86_64-*kfreebsd*-gnu)
26986747b715Smrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
26996747b715Smrg	    ;;
27006747b715Smrg	  x86_64-*linux*)
27016747b715Smrg	    LD="${LD-ld} -m elf_x86_64"
27026747b715Smrg	    ;;
27036747b715Smrg	  ppc*-*linux*|powerpc*-*linux*)
27046747b715Smrg	    LD="${LD-ld} -m elf64ppc"
27056747b715Smrg	    ;;
27066747b715Smrg	  s390*-*linux*|s390*-*tpf*)
27076747b715Smrg	    LD="${LD-ld} -m elf64_s390"
27086747b715Smrg	    ;;
27096747b715Smrg	  sparc*-*linux*)
27106747b715Smrg	    LD="${LD-ld} -m elf64_sparc"
27116747b715Smrg	    ;;
27126747b715Smrg	esac
27136747b715Smrg	;;
27146747b715Smrg    esac
271505b261ecSmrg  fi
27166747b715Smrg  rm -rf conftest*
271705b261ecSmrg  ;;
271805b261ecSmrg
27196747b715Smrg*-*-sco3.2v5*)
27206747b715Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
27216747b715Smrg  SAVE_CFLAGS="$CFLAGS"
27226747b715Smrg  CFLAGS="$CFLAGS -belf"
27236747b715Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
27246747b715Smrg    [AC_LANG_PUSH(C)
27256747b715Smrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
27266747b715Smrg     AC_LANG_POP])
27276747b715Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
27286747b715Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
27296747b715Smrg    CFLAGS="$SAVE_CFLAGS"
27306747b715Smrg  fi
273105b261ecSmrg  ;;
27326747b715Smrgsparc*-*solaris*)
27336747b715Smrg  # Find out which ABI we are using.
27346747b715Smrg  echo 'int i;' > conftest.$ac_ext
27356747b715Smrg  if AC_TRY_EVAL(ac_compile); then
27366747b715Smrg    case `/usr/bin/file conftest.o` in
27376747b715Smrg    *64-bit*)
27386747b715Smrg      case $lt_cv_prog_gnu_ld in
27396747b715Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
27406747b715Smrg      *)
27416747b715Smrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
27426747b715Smrg	  LD="${LD-ld} -64"
27436747b715Smrg	fi
27446747b715Smrg	;;
27456747b715Smrg      esac
274605b261ecSmrg      ;;
274705b261ecSmrg    esac
274805b261ecSmrg  fi
27496747b715Smrg  rm -rf conftest*
275005b261ecSmrg  ;;
27516747b715Smrgesac
275205b261ecSmrg
27536747b715Smrgneed_locks="$enable_libtool_lock"
27546747b715Smrg])# _LT_ENABLE_LOCK
275505b261ecSmrg
275605b261ecSmrg
27576747b715Smrg# _LT_PROG_AR
27586747b715Smrg# -----------
27596747b715Smrgm4_defun([_LT_PROG_AR],
27606747b715Smrg[AC_CHECK_TOOLS(AR, [ar], false)
27616747b715Smrg: ${AR=ar}
27626747b715Smrg: ${AR_FLAGS=cru}
27636747b715Smrg_LT_DECL([], [AR], [1], [The archiver])
27646747b715Smrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
27656747b715Smrg
27666747b715SmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
27676747b715Smrg  [lt_cv_ar_at_file=no
27686747b715Smrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
27696747b715Smrg     [echo conftest.$ac_objext > conftest.lst
27706747b715Smrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
27716747b715Smrg      AC_TRY_EVAL([lt_ar_try])
27726747b715Smrg      if test "$ac_status" -eq 0; then
27736747b715Smrg	# Ensure the archiver fails upon bogus file names.
27746747b715Smrg	rm -f conftest.$ac_objext libconftest.a
27756747b715Smrg	AC_TRY_EVAL([lt_ar_try])
27766747b715Smrg	if test "$ac_status" -ne 0; then
27776747b715Smrg          lt_cv_ar_at_file=@
27786747b715Smrg        fi
27796747b715Smrg      fi
27806747b715Smrg      rm -f conftest.* libconftest.a
27816747b715Smrg     ])
27826747b715Smrg  ])
278305b261ecSmrg
27846747b715Smrgif test "x$lt_cv_ar_at_file" = xno; then
27856747b715Smrg  archiver_list_spec=
27866747b715Smrgelse
27876747b715Smrg  archiver_list_spec=$lt_cv_ar_at_file
27886747b715Smrgfi
27896747b715Smrg_LT_DECL([], [archiver_list_spec], [1],
27906747b715Smrg  [How to feed a file listing to the archiver])
27916747b715Smrg])# _LT_PROG_AR
279205b261ecSmrg
279305b261ecSmrg
27946747b715Smrg# _LT_CMD_OLD_ARCHIVE
27956747b715Smrg# -------------------
27966747b715Smrgm4_defun([_LT_CMD_OLD_ARCHIVE],
27976747b715Smrg[_LT_PROG_AR
279805b261ecSmrg
27996747b715SmrgAC_CHECK_TOOL(STRIP, strip, :)
28006747b715Smrgtest -z "$STRIP" && STRIP=:
28016747b715Smrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
280205b261ecSmrg
28036747b715SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
28046747b715Smrgtest -z "$RANLIB" && RANLIB=:
28056747b715Smrg_LT_DECL([], [RANLIB], [1],
28066747b715Smrg    [Commands used to install an old-style archive])
280705b261ecSmrg
28086747b715Smrg# Determine commands to create old-style static archives.
28096747b715Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
28106747b715Smrgold_postinstall_cmds='chmod 644 $oldlib'
28116747b715Smrgold_postuninstall_cmds=
28124642e01fSmrg
28136747b715Smrgif test -n "$RANLIB"; then
28146747b715Smrg  case $host_os in
28156747b715Smrg  openbsd*)
28166747b715Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
281705b261ecSmrg    ;;
28186747b715Smrg  *)
28196747b715Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
282005b261ecSmrg    ;;
282105b261ecSmrg  esac
28226747b715Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
28236747b715Smrgfi
282405b261ecSmrg
28256747b715Smrgcase $host_os in
28266747b715Smrg  darwin*)
28276747b715Smrg    lock_old_archive_extraction=yes ;;
28286747b715Smrg  *)
28296747b715Smrg    lock_old_archive_extraction=no ;;
283005b261ecSmrgesac
28316747b715Smrg_LT_DECL([], [old_postinstall_cmds], [2])
28326747b715Smrg_LT_DECL([], [old_postuninstall_cmds], [2])
28336747b715Smrg_LT_TAGDECL([], [old_archive_cmds], [2],
28346747b715Smrg    [Commands used to build an old-style archive])
28356747b715Smrg_LT_DECL([], [lock_old_archive_extraction], [0],
28366747b715Smrg    [Whether to use a lock for old archive extraction])
28376747b715Smrg])# _LT_CMD_OLD_ARCHIVE
283805b261ecSmrg
28394642e01fSmrg
28406747b715Smrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
28416747b715Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
28426747b715Smrg# ----------------------------------------------------------------
28436747b715Smrg# Check whether the given compiler option works
28446747b715SmrgAC_DEFUN([_LT_COMPILER_OPTION],
28456747b715Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
28466747b715Smrgm4_require([_LT_DECL_SED])dnl
28476747b715SmrgAC_CACHE_CHECK([$1], [$2],
28486747b715Smrg  [$2=no
28496747b715Smrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
28506747b715Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
28516747b715Smrg   lt_compiler_flag="$3"
28526747b715Smrg   # Insert the option either (1) after the last *FLAGS variable, or
28536747b715Smrg   # (2) before a word containing "conftest.", or (3) at the end.
28546747b715Smrg   # Note that $ac_compile itself does not contain backslashes and begins
28556747b715Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
28566747b715Smrg   # The option is referenced via a variable to avoid confusing sed.
28576747b715Smrg   lt_compile=`echo "$ac_compile" | $SED \
28586747b715Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
28596747b715Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
28606747b715Smrg   -e 's:$: $lt_compiler_flag:'`
28616747b715Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
28626747b715Smrg   (eval "$lt_compile" 2>conftest.err)
28636747b715Smrg   ac_status=$?
28646747b715Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
28656747b715Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
28666747b715Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
28676747b715Smrg     # The compiler can only warn and ignore the option if not recognized
28686747b715Smrg     # So say no if there are warnings other than the usual output.
28696747b715Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
28706747b715Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
28716747b715Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
28726747b715Smrg       $2=yes
28736747b715Smrg     fi
28746747b715Smrg   fi
28756747b715Smrg   $RM conftest*
28766747b715Smrg])
28776747b715Smrg
28786747b715Smrgif test x"[$]$2" = xyes; then
28796747b715Smrg    m4_if([$5], , :, [$5])
28804642e01fSmrgelse
28816747b715Smrg    m4_if([$6], , :, [$6])
28824642e01fSmrgfi
28836747b715Smrg])# _LT_COMPILER_OPTION
288405b261ecSmrg
28856747b715Smrg# Old name:
28866747b715SmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
28874642e01fSmrgdnl aclocal-1.4 backwards compatibility:
28886747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
288905b261ecSmrg
28904642e01fSmrg
28916747b715Smrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
28926747b715Smrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
28936747b715Smrg# ----------------------------------------------------
28946747b715Smrg# Check whether the given linker option works
28956747b715SmrgAC_DEFUN([_LT_LINKER_OPTION],
28966747b715Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
28976747b715Smrgm4_require([_LT_DECL_SED])dnl
28986747b715SmrgAC_CACHE_CHECK([$1], [$2],
28996747b715Smrg  [$2=no
29006747b715Smrg   save_LDFLAGS="$LDFLAGS"
29016747b715Smrg   LDFLAGS="$LDFLAGS $3"
29026747b715Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
29036747b715Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
29046747b715Smrg     # The linker can only warn and ignore the option if not recognized
29056747b715Smrg     # So say no if there are warnings
29066747b715Smrg     if test -s conftest.err; then
29076747b715Smrg       # Append any errors to the config.log.
29086747b715Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
29096747b715Smrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
29106747b715Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
29116747b715Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
29126747b715Smrg         $2=yes
29136747b715Smrg       fi
29146747b715Smrg     else
29156747b715Smrg       $2=yes
29166747b715Smrg     fi
29176747b715Smrg   fi
29186747b715Smrg   $RM -r conftest*
29196747b715Smrg   LDFLAGS="$save_LDFLAGS"
29206747b715Smrg])
29216747b715Smrg
29226747b715Smrgif test x"[$]$2" = xyes; then
29236747b715Smrg    m4_if([$4], , :, [$4])
29246747b715Smrgelse
29256747b715Smrg    m4_if([$5], , :, [$5])
29266747b715Smrgfi
29276747b715Smrg])# _LT_LINKER_OPTION
292805b261ecSmrg
29294642e01fSmrg# Old name:
29306747b715SmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
29314642e01fSmrgdnl aclocal-1.4 backwards compatibility:
29326747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
293305b261ecSmrg
293405b261ecSmrg
29356747b715Smrg# LT_CMD_MAX_LEN
29366747b715Smrg#---------------
29376747b715SmrgAC_DEFUN([LT_CMD_MAX_LEN],
29386747b715Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
29396747b715Smrg# find the maximum length of command line arguments
29406747b715SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
29416747b715SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
29426747b715Smrg  i=0
29436747b715Smrg  teststring="ABCD"
294405b261ecSmrg
29456747b715Smrg  case $build_os in
29466747b715Smrg  msdosdjgpp*)
29476747b715Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
29486747b715Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
29496747b715Smrg    # during glob expansion).  Even if it were fixed, the result of this
29506747b715Smrg    # check would be larger than it should be.
29516747b715Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
29526747b715Smrg    ;;
295305b261ecSmrg
29546747b715Smrg  gnu*)
29556747b715Smrg    # Under GNU Hurd, this test is not required because there is
29566747b715Smrg    # no limit to the length of command line arguments.
29576747b715Smrg    # Libtool will interpret -1 as no limit whatsoever
29586747b715Smrg    lt_cv_sys_max_cmd_len=-1;
29596747b715Smrg    ;;
296005b261ecSmrg
29616747b715Smrg  cygwin* | mingw* | cegcc*)
29626747b715Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
29636747b715Smrg    # about 5 minutes as the teststring grows exponentially.
29646747b715Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
29656747b715Smrg    # you end up with a "frozen" computer, even though with patience
29666747b715Smrg    # the test eventually succeeds (with a max line length of 256k).
29676747b715Smrg    # Instead, let's just punt: use the minimum linelength reported by
29686747b715Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
29696747b715Smrg    lt_cv_sys_max_cmd_len=8192;
29706747b715Smrg    ;;
297105b261ecSmrg
29726747b715Smrg  mint*)
29736747b715Smrg    # On MiNT this can take a long time and run out of memory.
29746747b715Smrg    lt_cv_sys_max_cmd_len=8192;
29756747b715Smrg    ;;
297605b261ecSmrg
29776747b715Smrg  amigaos*)
29786747b715Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
29796747b715Smrg    # So we just punt and use a minimum line length of 8192.
29806747b715Smrg    lt_cv_sys_max_cmd_len=8192;
29816747b715Smrg    ;;
298205b261ecSmrg
29836747b715Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
29846747b715Smrg    # This has been around since 386BSD, at least.  Likely further.
29856747b715Smrg    if test -x /sbin/sysctl; then
29866747b715Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
29876747b715Smrg    elif test -x /usr/sbin/sysctl; then
29886747b715Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
29896747b715Smrg    else
29906747b715Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
29916747b715Smrg    fi
29926747b715Smrg    # And add a safety zone
29936747b715Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
29946747b715Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
29956747b715Smrg    ;;
299605b261ecSmrg
29976747b715Smrg  interix*)
29986747b715Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
29996747b715Smrg    lt_cv_sys_max_cmd_len=196608
30006747b715Smrg    ;;
300105b261ecSmrg
30026747b715Smrg  osf*)
30036747b715Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
30046747b715Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
30056747b715Smrg    # nice to cause kernel panics so lets avoid the loop below.
30066747b715Smrg    # First set a reasonable default.
30076747b715Smrg    lt_cv_sys_max_cmd_len=16384
30086747b715Smrg    #
30096747b715Smrg    if test -x /sbin/sysconfig; then
30106747b715Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
30116747b715Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
30126747b715Smrg      esac
30136747b715Smrg    fi
30146747b715Smrg    ;;
30156747b715Smrg  sco3.2v5*)
30166747b715Smrg    lt_cv_sys_max_cmd_len=102400
30176747b715Smrg    ;;
30186747b715Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
30196747b715Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
30206747b715Smrg    if test -n "$kargmax"; then
30216747b715Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
30226747b715Smrg    else
30236747b715Smrg      lt_cv_sys_max_cmd_len=32768
30246747b715Smrg    fi
30256747b715Smrg    ;;
30266747b715Smrg  *)
30276747b715Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
30286747b715Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
30296747b715Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
30306747b715Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
30316747b715Smrg    else
30326747b715Smrg      # Make teststring a little bigger before we do anything with it.
30336747b715Smrg      # a 1K string should be a reasonable start.
30346747b715Smrg      for i in 1 2 3 4 5 6 7 8 ; do
30356747b715Smrg        teststring=$teststring$teststring
30366747b715Smrg      done
30376747b715Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
30386747b715Smrg      # If test is not a shell built-in, we'll probably end up computing a
30396747b715Smrg      # maximum length that is only half of the actual maximum length, but
30406747b715Smrg      # we can't tell.
30416747b715Smrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
30426747b715Smrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
30436747b715Smrg	      test $i != 17 # 1/2 MB should be enough
30446747b715Smrg      do
30456747b715Smrg        i=`expr $i + 1`
30466747b715Smrg        teststring=$teststring$teststring
30476747b715Smrg      done
30486747b715Smrg      # Only check the string length outside the loop.
30496747b715Smrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
30506747b715Smrg      teststring=
30516747b715Smrg      # Add a significant safety factor because C++ compilers can tack on
30526747b715Smrg      # massive amounts of additional arguments before passing them to the
30536747b715Smrg      # linker.  It appears as though 1/2 is a usable value.
30546747b715Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
30556747b715Smrg    fi
30566747b715Smrg    ;;
30576747b715Smrg  esac
30586747b715Smrg])
30596747b715Smrgif test -n $lt_cv_sys_max_cmd_len ; then
30606747b715Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
30616747b715Smrgelse
30626747b715Smrg  AC_MSG_RESULT(none)
30636747b715Smrgfi
30646747b715Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
30656747b715Smrg_LT_DECL([], [max_cmd_len], [0],
30666747b715Smrg    [What is the maximum length of a command?])
30676747b715Smrg])# LT_CMD_MAX_LEN
306805b261ecSmrg
30696747b715Smrg# Old name:
30706747b715SmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
30716747b715Smrgdnl aclocal-1.4 backwards compatibility:
30726747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
307305b261ecSmrg
307405b261ecSmrg
30756747b715Smrg# _LT_HEADER_DLFCN
30766747b715Smrg# ----------------
30776747b715Smrgm4_defun([_LT_HEADER_DLFCN],
30786747b715Smrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
30796747b715Smrg])# _LT_HEADER_DLFCN
308005b261ecSmrg
308105b261ecSmrg
30826747b715Smrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
30836747b715Smrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
30846747b715Smrg# ----------------------------------------------------------------
30856747b715Smrgm4_defun([_LT_TRY_DLOPEN_SELF],
30866747b715Smrg[m4_require([_LT_HEADER_DLFCN])dnl
30876747b715Smrgif test "$cross_compiling" = yes; then :
30886747b715Smrg  [$4]
30896747b715Smrgelse
30906747b715Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
30916747b715Smrg  lt_status=$lt_dlunknown
30926747b715Smrg  cat > conftest.$ac_ext <<_LT_EOF
30936747b715Smrg[#line $LINENO "configure"
30946747b715Smrg#include "confdefs.h"
309505b261ecSmrg
30966747b715Smrg#if HAVE_DLFCN_H
30976747b715Smrg#include <dlfcn.h>
30986747b715Smrg#endif
309905b261ecSmrg
31006747b715Smrg#include <stdio.h>
310105b261ecSmrg
31026747b715Smrg#ifdef RTLD_GLOBAL
31036747b715Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
31046747b715Smrg#else
31056747b715Smrg#  ifdef DL_GLOBAL
31066747b715Smrg#    define LT_DLGLOBAL		DL_GLOBAL
31076747b715Smrg#  else
31086747b715Smrg#    define LT_DLGLOBAL		0
31096747b715Smrg#  endif
31104642e01fSmrg#endif
311105b261ecSmrg
31126747b715Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
31136747b715Smrg   find out it does not work in some platform. */
31146747b715Smrg#ifndef LT_DLLAZY_OR_NOW
31156747b715Smrg#  ifdef RTLD_LAZY
31166747b715Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
31176747b715Smrg#  else
31186747b715Smrg#    ifdef DL_LAZY
31196747b715Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
31206747b715Smrg#    else
31216747b715Smrg#      ifdef RTLD_NOW
31226747b715Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
31236747b715Smrg#      else
31246747b715Smrg#        ifdef DL_NOW
31256747b715Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
31266747b715Smrg#        else
31276747b715Smrg#          define LT_DLLAZY_OR_NOW	0
31286747b715Smrg#        endif
31296747b715Smrg#      endif
31306747b715Smrg#    endif
31316747b715Smrg#  endif
31324642e01fSmrg#endif
313305b261ecSmrg
31346747b715Smrg/* When -fvisbility=hidden is used, assume the code has been annotated
31356747b715Smrg   correspondingly for the symbols needed.  */
31366747b715Smrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
31376747b715Smrgint fnord () __attribute__((visibility("default")));
31386747b715Smrg#endif
313905b261ecSmrg
31406747b715Smrgint fnord () { return 42; }
31416747b715Smrgint main ()
31426747b715Smrg{
31436747b715Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
31446747b715Smrg  int status = $lt_dlunknown;
314505b261ecSmrg
31466747b715Smrg  if (self)
31476747b715Smrg    {
31486747b715Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
31494642e01fSmrg      else
31506747b715Smrg        {
31516747b715Smrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
31526747b715Smrg          else puts (dlerror ());
31536747b715Smrg	}
31546747b715Smrg      /* dlclose (self); */
31556747b715Smrg    }
315605b261ecSmrg  else
31576747b715Smrg    puts (dlerror ());
315805b261ecSmrg
31596747b715Smrg  return status;
31606747b715Smrg}]
31616747b715Smrg_LT_EOF
31626747b715Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
31636747b715Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
31646747b715Smrg    lt_status=$?
31656747b715Smrg    case x$lt_status in
31666747b715Smrg      x$lt_dlno_uscore) $1 ;;
31676747b715Smrg      x$lt_dlneed_uscore) $2 ;;
31686747b715Smrg      x$lt_dlunknown|x*) $3 ;;
31696747b715Smrg    esac
31706747b715Smrg  else :
31716747b715Smrg    # compilation failed
31726747b715Smrg    $3
31734642e01fSmrg  fi
317405b261ecSmrgfi
31756747b715Smrgrm -fr conftest*
31766747b715Smrg])# _LT_TRY_DLOPEN_SELF
317705b261ecSmrg
317805b261ecSmrg
31796747b715Smrg# LT_SYS_DLOPEN_SELF
31806747b715Smrg# ------------------
31816747b715SmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
31826747b715Smrg[m4_require([_LT_HEADER_DLFCN])dnl
31836747b715Smrgif test "x$enable_dlopen" != xyes; then
31846747b715Smrg  enable_dlopen=unknown
31856747b715Smrg  enable_dlopen_self=unknown
31866747b715Smrg  enable_dlopen_self_static=unknown
31876747b715Smrgelse
31886747b715Smrg  lt_cv_dlopen=no
31896747b715Smrg  lt_cv_dlopen_libs=
319005b261ecSmrg
31916747b715Smrg  case $host_os in
31926747b715Smrg  beos*)
31936747b715Smrg    lt_cv_dlopen="load_add_on"
31946747b715Smrg    lt_cv_dlopen_libs=
31956747b715Smrg    lt_cv_dlopen_self=yes
31966747b715Smrg    ;;
319705b261ecSmrg
31986747b715Smrg  mingw* | pw32* | cegcc*)
31996747b715Smrg    lt_cv_dlopen="LoadLibrary"
32006747b715Smrg    lt_cv_dlopen_libs=
32016747b715Smrg    ;;
320205b261ecSmrg
32036747b715Smrg  cygwin*)
32046747b715Smrg    lt_cv_dlopen="dlopen"
32056747b715Smrg    lt_cv_dlopen_libs=
32066747b715Smrg    ;;
320705b261ecSmrg
32086747b715Smrg  darwin*)
32096747b715Smrg  # if libdl is installed we need to link against it
32106747b715Smrg    AC_CHECK_LIB([dl], [dlopen],
32116747b715Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
32126747b715Smrg    lt_cv_dlopen="dyld"
32136747b715Smrg    lt_cv_dlopen_libs=
32146747b715Smrg    lt_cv_dlopen_self=yes
32156747b715Smrg    ])
32166747b715Smrg    ;;
321705b261ecSmrg
32186747b715Smrg  *)
32196747b715Smrg    AC_CHECK_FUNC([shl_load],
32206747b715Smrg	  [lt_cv_dlopen="shl_load"],
32216747b715Smrg      [AC_CHECK_LIB([dld], [shl_load],
32226747b715Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
32236747b715Smrg	[AC_CHECK_FUNC([dlopen],
32246747b715Smrg	      [lt_cv_dlopen="dlopen"],
32256747b715Smrg	  [AC_CHECK_LIB([dl], [dlopen],
32266747b715Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
32276747b715Smrg	    [AC_CHECK_LIB([svld], [dlopen],
32286747b715Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
32296747b715Smrg	      [AC_CHECK_LIB([dld], [dld_link],
32306747b715Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
32316747b715Smrg	      ])
32326747b715Smrg	    ])
32336747b715Smrg	  ])
32346747b715Smrg	])
32356747b715Smrg      ])
32366747b715Smrg    ;;
32376747b715Smrg  esac
32386747b715Smrg
32396747b715Smrg  if test "x$lt_cv_dlopen" != xno; then
32406747b715Smrg    enable_dlopen=yes
32414642e01fSmrg  else
32426747b715Smrg    enable_dlopen=no
32434642e01fSmrg  fi
324405b261ecSmrg
32456747b715Smrg  case $lt_cv_dlopen in
32466747b715Smrg  dlopen)
32476747b715Smrg    save_CPPFLAGS="$CPPFLAGS"
32486747b715Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
324905b261ecSmrg
32506747b715Smrg    save_LDFLAGS="$LDFLAGS"
32516747b715Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
325205b261ecSmrg
32536747b715Smrg    save_LIBS="$LIBS"
32546747b715Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
325505b261ecSmrg
32566747b715Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
32576747b715Smrg	  lt_cv_dlopen_self, [dnl
32586747b715Smrg	  _LT_TRY_DLOPEN_SELF(
32596747b715Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
32606747b715Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
32616747b715Smrg    ])
326205b261ecSmrg
32636747b715Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
32646747b715Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
32656747b715Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
32666747b715Smrg	  lt_cv_dlopen_self_static, [dnl
32676747b715Smrg	  _LT_TRY_DLOPEN_SELF(
32686747b715Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
32696747b715Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
32706747b715Smrg      ])
32716747b715Smrg    fi
327205b261ecSmrg
32736747b715Smrg    CPPFLAGS="$save_CPPFLAGS"
32746747b715Smrg    LDFLAGS="$save_LDFLAGS"
32756747b715Smrg    LIBS="$save_LIBS"
32766747b715Smrg    ;;
32776747b715Smrg  esac
327805b261ecSmrg
32796747b715Smrg  case $lt_cv_dlopen_self in
32806747b715Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
32816747b715Smrg  *) enable_dlopen_self=unknown ;;
32826747b715Smrg  esac
32836747b715Smrg
32846747b715Smrg  case $lt_cv_dlopen_self_static in
32856747b715Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
32866747b715Smrg  *) enable_dlopen_self_static=unknown ;;
32876747b715Smrg  esac
32886747b715Smrgfi
32896747b715Smrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
32906747b715Smrg	 [Whether dlopen is supported])
32916747b715Smrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
32926747b715Smrg	 [Whether dlopen of programs is supported])
32936747b715Smrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
32946747b715Smrg	 [Whether dlopen of statically linked programs is supported])
32956747b715Smrg])# LT_SYS_DLOPEN_SELF
32966747b715Smrg
32976747b715Smrg# Old name:
32986747b715SmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
32996747b715Smrgdnl aclocal-1.4 backwards compatibility:
33006747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
33016747b715Smrg
33026747b715Smrg
33036747b715Smrg# _LT_COMPILER_C_O([TAGNAME])
33046747b715Smrg# ---------------------------
33056747b715Smrg# Check to see if options -c and -o are simultaneously supported by compiler.
33066747b715Smrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
33076747b715Smrgm4_defun([_LT_COMPILER_C_O],
33086747b715Smrg[m4_require([_LT_DECL_SED])dnl
33096747b715Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
33106747b715Smrgm4_require([_LT_TAG_COMPILER])dnl
33116747b715SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
33126747b715Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
33136747b715Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
33146747b715Smrg   $RM -r conftest 2>/dev/null
33156747b715Smrg   mkdir conftest
33166747b715Smrg   cd conftest
33176747b715Smrg   mkdir out
33186747b715Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
33196747b715Smrg
33206747b715Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
33216747b715Smrg   # Insert the option either (1) after the last *FLAGS variable, or
33226747b715Smrg   # (2) before a word containing "conftest.", or (3) at the end.
33236747b715Smrg   # Note that $ac_compile itself does not contain backslashes and begins
33246747b715Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
33256747b715Smrg   lt_compile=`echo "$ac_compile" | $SED \
33266747b715Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
33276747b715Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
33286747b715Smrg   -e 's:$: $lt_compiler_flag:'`
33296747b715Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
33306747b715Smrg   (eval "$lt_compile" 2>out/conftest.err)
33316747b715Smrg   ac_status=$?
33326747b715Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
33336747b715Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
33346747b715Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
33356747b715Smrg   then
33366747b715Smrg     # The compiler can only warn and ignore the option if not recognized
33376747b715Smrg     # So say no if there are warnings
33386747b715Smrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
33396747b715Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
33406747b715Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
33416747b715Smrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
33426747b715Smrg     fi
33436747b715Smrg   fi
33446747b715Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
33456747b715Smrg   $RM conftest*
33466747b715Smrg   # SGI C++ compiler will create directory out/ii_files/ for
33476747b715Smrg   # template instantiation
33486747b715Smrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
33496747b715Smrg   $RM out/* && rmdir out
33506747b715Smrg   cd ..
33516747b715Smrg   $RM -r conftest
33526747b715Smrg   $RM conftest*
33536747b715Smrg])
33546747b715Smrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
33556747b715Smrg	[Does compiler simultaneously support -c and -o options?])
33566747b715Smrg])# _LT_COMPILER_C_O
33576747b715Smrg
33586747b715Smrg
33596747b715Smrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
33606747b715Smrg# ----------------------------------
33616747b715Smrg# Check to see if we can do hard links to lock some files if needed
33626747b715Smrgm4_defun([_LT_COMPILER_FILE_LOCKS],
33636747b715Smrg[m4_require([_LT_ENABLE_LOCK])dnl
33646747b715Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
33656747b715Smrg_LT_COMPILER_C_O([$1])
33666747b715Smrg
33676747b715Smrghard_links="nottested"
33686747b715Smrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
33696747b715Smrg  # do not overwrite the value of need_locks provided by the user
33706747b715Smrg  AC_MSG_CHECKING([if we can lock with hard links])
33716747b715Smrg  hard_links=yes
33726747b715Smrg  $RM conftest*
33736747b715Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
33746747b715Smrg  touch conftest.a
33756747b715Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
33766747b715Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
33776747b715Smrg  AC_MSG_RESULT([$hard_links])
33786747b715Smrg  if test "$hard_links" = no; then
33796747b715Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
33806747b715Smrg    need_locks=warn
33816747b715Smrg  fi
33826747b715Smrgelse
33836747b715Smrg  need_locks=no
33846747b715Smrgfi
33856747b715Smrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
33866747b715Smrg])# _LT_COMPILER_FILE_LOCKS
33876747b715Smrg
33886747b715Smrg
33896747b715Smrg# _LT_CHECK_OBJDIR
33906747b715Smrg# ----------------
33916747b715Smrgm4_defun([_LT_CHECK_OBJDIR],
33926747b715Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
33936747b715Smrg[rm -f .libs 2>/dev/null
33946747b715Smrgmkdir .libs 2>/dev/null
33956747b715Smrgif test -d .libs; then
33966747b715Smrg  lt_cv_objdir=.libs
33976747b715Smrgelse
33986747b715Smrg  # MS-DOS does not allow filenames that begin with a dot.
33996747b715Smrg  lt_cv_objdir=_libs
34006747b715Smrgfi
34016747b715Smrgrmdir .libs 2>/dev/null])
34026747b715Smrgobjdir=$lt_cv_objdir
34036747b715Smrg_LT_DECL([], [objdir], [0],
34046747b715Smrg         [The name of the directory that contains temporary libtool files])dnl
34056747b715Smrgm4_pattern_allow([LT_OBJDIR])dnl
34066747b715SmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
34076747b715Smrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
34086747b715Smrg])# _LT_CHECK_OBJDIR
34096747b715Smrg
34106747b715Smrg
34116747b715Smrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
34126747b715Smrg# --------------------------------------
34136747b715Smrg# Check hardcoding attributes.
34146747b715Smrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
34156747b715Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
34166747b715Smrg_LT_TAGVAR(hardcode_action, $1)=
34176747b715Smrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
34186747b715Smrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
34196747b715Smrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
34206747b715Smrg
34216747b715Smrg  # We can hardcode non-existent directories.
34226747b715Smrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
34236747b715Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
34246747b715Smrg     # have to relink, otherwise we might link with an installed library
34256747b715Smrg     # when we should be linking with a yet-to-be-installed one
34266747b715Smrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
34276747b715Smrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
34286747b715Smrg    # Linking always hardcodes the temporary library directory.
34296747b715Smrg    _LT_TAGVAR(hardcode_action, $1)=relink
34306747b715Smrg  else
34316747b715Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
34326747b715Smrg    _LT_TAGVAR(hardcode_action, $1)=immediate
34336747b715Smrg  fi
34346747b715Smrgelse
34356747b715Smrg  # We cannot hardcode anything, or else we can only hardcode existing
34366747b715Smrg  # directories.
34376747b715Smrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
34386747b715Smrgfi
34396747b715SmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
34406747b715Smrg
34416747b715Smrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
34426747b715Smrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
34436747b715Smrg  # Fast installation is not supported
34446747b715Smrg  enable_fast_install=no
34456747b715Smrgelif test "$shlibpath_overrides_runpath" = yes ||
34466747b715Smrg     test "$enable_shared" = no; then
34476747b715Smrg  # Fast installation is not necessary
34486747b715Smrg  enable_fast_install=needless
34496747b715Smrgfi
34506747b715Smrg_LT_TAGDECL([], [hardcode_action], [0],
34516747b715Smrg    [How to hardcode a shared library path into an executable])
34526747b715Smrg])# _LT_LINKER_HARDCODE_LIBPATH
34536747b715Smrg
34546747b715Smrg
34556747b715Smrg# _LT_CMD_STRIPLIB
34566747b715Smrg# ----------------
34576747b715Smrgm4_defun([_LT_CMD_STRIPLIB],
34586747b715Smrg[m4_require([_LT_DECL_EGREP])
34596747b715Smrgstriplib=
34606747b715Smrgold_striplib=
34616747b715SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
34626747b715Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
34636747b715Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
34646747b715Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
34656747b715Smrg  AC_MSG_RESULT([yes])
34666747b715Smrgelse
34676747b715Smrg# FIXME - insert some real tests, host_os isn't really good enough
34686747b715Smrg  case $host_os in
34696747b715Smrg  darwin*)
34706747b715Smrg    if test -n "$STRIP" ; then
34716747b715Smrg      striplib="$STRIP -x"
34726747b715Smrg      old_striplib="$STRIP -S"
34736747b715Smrg      AC_MSG_RESULT([yes])
34746747b715Smrg    else
34756747b715Smrg      AC_MSG_RESULT([no])
34766747b715Smrg    fi
34776747b715Smrg    ;;
34786747b715Smrg  *)
34796747b715Smrg    AC_MSG_RESULT([no])
34806747b715Smrg    ;;
34816747b715Smrg  esac
34826747b715Smrgfi
34836747b715Smrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
34846747b715Smrg_LT_DECL([], [striplib], [1])
34856747b715Smrg])# _LT_CMD_STRIPLIB
34866747b715Smrg
34876747b715Smrg
34886747b715Smrg# _LT_SYS_DYNAMIC_LINKER([TAG])
34896747b715Smrg# -----------------------------
34906747b715Smrg# PORTME Fill in your ld.so characteristics
34916747b715Smrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
34926747b715Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
34936747b715Smrgm4_require([_LT_DECL_EGREP])dnl
34946747b715Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
34956747b715Smrgm4_require([_LT_DECL_OBJDUMP])dnl
34966747b715Smrgm4_require([_LT_DECL_SED])dnl
34976747b715Smrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
34986747b715SmrgAC_MSG_CHECKING([dynamic linker characteristics])
34996747b715Smrgm4_if([$1],
35006747b715Smrg	[], [
35016747b715Smrgif test "$GCC" = yes; then
35026747b715Smrg  case $host_os in
35036747b715Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
35046747b715Smrg    *) lt_awk_arg="/^libraries:/" ;;
35056747b715Smrg  esac
35066747b715Smrg  case $host_os in
35076747b715Smrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
35086747b715Smrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
35096747b715Smrg  esac
35106747b715Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
35116747b715Smrg  case $lt_search_path_spec in
35126747b715Smrg  *\;*)
35136747b715Smrg    # if the path contains ";" then we assume it to be the separator
35146747b715Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
35156747b715Smrg    # assumed that no part of a normal pathname contains ";" but that should
35166747b715Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
35176747b715Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
35186747b715Smrg    ;;
35196747b715Smrg  *)
35206747b715Smrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
35216747b715Smrg    ;;
35226747b715Smrg  esac
35236747b715Smrg  # Ok, now we have the path, separated by spaces, we can step through it
35246747b715Smrg  # and add multilib dir if necessary.
35256747b715Smrg  lt_tmp_lt_search_path_spec=
35266747b715Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
35276747b715Smrg  for lt_sys_path in $lt_search_path_spec; do
35286747b715Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
35296747b715Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
35306747b715Smrg    else
35316747b715Smrg      test -d "$lt_sys_path" && \
35326747b715Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
35336747b715Smrg    fi
35346747b715Smrg  done
35356747b715Smrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
35366747b715SmrgBEGIN {RS=" "; FS="/|\n";} {
35376747b715Smrg  lt_foo="";
35386747b715Smrg  lt_count=0;
35396747b715Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
35406747b715Smrg    if ($lt_i != "" && $lt_i != ".") {
35416747b715Smrg      if ($lt_i == "..") {
35426747b715Smrg        lt_count++;
35436747b715Smrg      } else {
35446747b715Smrg        if (lt_count == 0) {
35456747b715Smrg          lt_foo="/" $lt_i lt_foo;
35466747b715Smrg        } else {
35476747b715Smrg          lt_count--;
35486747b715Smrg        }
35496747b715Smrg      }
35506747b715Smrg    }
35516747b715Smrg  }
35526747b715Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
35536747b715Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
35546747b715Smrg}'`
35556747b715Smrg  # AWK program above erroneously prepends '/' to C:/dos/paths
35566747b715Smrg  # for these hosts.
35576747b715Smrg  case $host_os in
35586747b715Smrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
35596747b715Smrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
35606747b715Smrg  esac
35616747b715Smrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
35626747b715Smrgelse
35636747b715Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
35646747b715Smrgfi])
35656747b715Smrglibrary_names_spec=
35666747b715Smrglibname_spec='lib$name'
35676747b715Smrgsoname_spec=
35686747b715Smrgshrext_cmds=".so"
35696747b715Smrgpostinstall_cmds=
35706747b715Smrgpostuninstall_cmds=
35716747b715Smrgfinish_cmds=
35726747b715Smrgfinish_eval=
35736747b715Smrgshlibpath_var=
35746747b715Smrgshlibpath_overrides_runpath=unknown
35756747b715Smrgversion_type=none
35766747b715Smrgdynamic_linker="$host_os ld.so"
35776747b715Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
35786747b715Smrgneed_lib_prefix=unknown
35796747b715Smrghardcode_into_libs=no
358005b261ecSmrg
35816747b715Smrg# when you set need_version to no, make sure it does not cause -set_version
35826747b715Smrg# flags to be left without arguments
35836747b715Smrgneed_version=unknown
358405b261ecSmrg
35856747b715Smrgcase $host_os in
35866747b715Smrgaix3*)
35876747b715Smrg  version_type=linux
35886747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
35896747b715Smrg  shlibpath_var=LIBPATH
359005b261ecSmrg
35916747b715Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
35926747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
35936747b715Smrg  ;;
359405b261ecSmrg
35956747b715Smrgaix[[4-9]]*)
35966747b715Smrg  version_type=linux
35976747b715Smrg  need_lib_prefix=no
35986747b715Smrg  need_version=no
35996747b715Smrg  hardcode_into_libs=yes
36006747b715Smrg  if test "$host_cpu" = ia64; then
36016747b715Smrg    # AIX 5 supports IA64
36026747b715Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
36036747b715Smrg    shlibpath_var=LD_LIBRARY_PATH
36044642e01fSmrg  else
36056747b715Smrg    # With GCC up to 2.95.x, collect2 would create an import file
36066747b715Smrg    # for dependence libraries.  The import file would start with
36076747b715Smrg    # the line `#! .'.  This would cause the generated library to
36086747b715Smrg    # depend on `.', always an invalid library.  This was fixed in
36096747b715Smrg    # development snapshots of GCC prior to 3.0.
36104642e01fSmrg    case $host_os in
36116747b715Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
36126747b715Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
36136747b715Smrg	   echo ' yes '
36146747b715Smrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
36156747b715Smrg	:
36164642e01fSmrg      else
36176747b715Smrg	can_build_shared=no
36184642e01fSmrg      fi
36194642e01fSmrg      ;;
36206747b715Smrg    esac
36216747b715Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
36226747b715Smrg    # soname into executable. Probably we can add versioning support to
36236747b715Smrg    # collect2, so additional links can be useful in future.
36246747b715Smrg    if test "$aix_use_runtimelinking" = yes; then
36256747b715Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
36266747b715Smrg      # instead of lib<name>.a to let people know that these are not
36276747b715Smrg      # typical AIX shared libraries.
36286747b715Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36296747b715Smrg    else
36306747b715Smrg      # We preserve .a as extension for shared libraries through AIX4.2
36316747b715Smrg      # and later when we are not doing run time linking.
36326747b715Smrg      library_names_spec='${libname}${release}.a $libname.a'
36336747b715Smrg      soname_spec='${libname}${release}${shared_ext}$major'
36346747b715Smrg    fi
36356747b715Smrg    shlibpath_var=LIBPATH
36366747b715Smrg  fi
36376747b715Smrg  ;;
363805b261ecSmrg
36396747b715Smrgamigaos*)
36406747b715Smrg  case $host_cpu in
36416747b715Smrg  powerpc)
36426747b715Smrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
36436747b715Smrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
36446747b715Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36456747b715Smrg    ;;
36466747b715Smrg  m68k)
36476747b715Smrg    library_names_spec='$libname.ixlibrary $libname.a'
36486747b715Smrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
36496747b715Smrg    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'
36506747b715Smrg    ;;
36516747b715Smrg  esac
36526747b715Smrg  ;;
365305b261ecSmrg
36546747b715Smrgbeos*)
36556747b715Smrg  library_names_spec='${libname}${shared_ext}'
36566747b715Smrg  dynamic_linker="$host_os ld.so"
36576747b715Smrg  shlibpath_var=LIBRARY_PATH
36586747b715Smrg  ;;
365905b261ecSmrg
36606747b715Smrgbsdi[[45]]*)
36616747b715Smrg  version_type=linux
36626747b715Smrg  need_version=no
36636747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
36646747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
36656747b715Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
36666747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
36676747b715Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
36686747b715Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
36696747b715Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
36706747b715Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
36716747b715Smrg  # libtool to hard-code these into programs
36726747b715Smrg  ;;
367305b261ecSmrg
36746747b715Smrgcygwin* | mingw* | pw32* | cegcc*)
36756747b715Smrg  version_type=windows
36766747b715Smrg  shrext_cmds=".dll"
36776747b715Smrg  need_version=no
36786747b715Smrg  need_lib_prefix=no
367905b261ecSmrg
36806747b715Smrg  case $GCC,$cc_basename in
36816747b715Smrg  yes,*)
36826747b715Smrg    # gcc
36836747b715Smrg    library_names_spec='$libname.dll.a'
36846747b715Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
36856747b715Smrg    postinstall_cmds='base_file=`basename \${file}`~
36866747b715Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
36876747b715Smrg      dldir=$destdir/`dirname \$dlpath`~
36886747b715Smrg      test -d \$dldir || mkdir -p \$dldir~
36896747b715Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
36906747b715Smrg      chmod a+x \$dldir/$dlname~
36916747b715Smrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
36926747b715Smrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
36936747b715Smrg      fi'
36946747b715Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
36956747b715Smrg      dlpath=$dir/\$dldll~
36966747b715Smrg       $RM \$dlpath'
36976747b715Smrg    shlibpath_overrides_runpath=yes
369805b261ecSmrg
36996747b715Smrg    case $host_os in
37006747b715Smrg    cygwin*)
37016747b715Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
37026747b715Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
37036747b715Smrgm4_if([$1], [],[
37046747b715Smrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
37054642e01fSmrg      ;;
37066747b715Smrg    mingw* | cegcc*)
37076747b715Smrg      # MinGW DLLs use traditional 'lib' prefix
37086747b715Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
37094642e01fSmrg      ;;
37106747b715Smrg    pw32*)
37116747b715Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
37126747b715Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
37134642e01fSmrg      ;;
37146747b715Smrg    esac
37156747b715Smrg    dynamic_linker='Win32 ld.exe'
37166747b715Smrg    ;;
371705b261ecSmrg
37186747b715Smrg  *,cl*)
37196747b715Smrg    # Native MSVC
37206747b715Smrg    libname_spec='$name'
37216747b715Smrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
37226747b715Smrg    library_names_spec='${libname}.dll.lib'
37236747b715Smrg
37246747b715Smrg    case $build_os in
37256747b715Smrg    mingw*)
37266747b715Smrg      sys_lib_search_path_spec=
37276747b715Smrg      lt_save_ifs=$IFS
37286747b715Smrg      IFS=';'
37296747b715Smrg      for lt_path in $LIB
37306747b715Smrg      do
37316747b715Smrg        IFS=$lt_save_ifs
37326747b715Smrg        # Let DOS variable expansion print the short 8.3 style file name.
37336747b715Smrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
37346747b715Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
37356747b715Smrg      done
37366747b715Smrg      IFS=$lt_save_ifs
37376747b715Smrg      # Convert to MSYS style.
37386747b715Smrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
37396747b715Smrg      ;;
37406747b715Smrg    cygwin*)
37416747b715Smrg      # Convert to unix form, then to dos form, then back to unix form
37426747b715Smrg      # but this time dos style (no spaces!) so that the unix form looks
37436747b715Smrg      # like /cygdrive/c/PROGRA~1:/cygdr...
37446747b715Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
37456747b715Smrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
37466747b715Smrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
37474642e01fSmrg      ;;
37484642e01fSmrg    *)
37496747b715Smrg      sys_lib_search_path_spec="$LIB"
37506747b715Smrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
37516747b715Smrg        # It is most probably a Windows format PATH.
37526747b715Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
37536747b715Smrg      else
37546747b715Smrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
37556747b715Smrg      fi
37566747b715Smrg      # FIXME: find the short name or the path components, as spaces are
37576747b715Smrg      # common. (e.g. "Program Files" -> "PROGRA~1")
37584642e01fSmrg      ;;
37594642e01fSmrg    esac
376005b261ecSmrg
37616747b715Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
37626747b715Smrg    postinstall_cmds='base_file=`basename \${file}`~
37636747b715Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
37646747b715Smrg      dldir=$destdir/`dirname \$dlpath`~
37656747b715Smrg      test -d \$dldir || mkdir -p \$dldir~
37666747b715Smrg      $install_prog $dir/$dlname \$dldir/$dlname'
37676747b715Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
37686747b715Smrg      dlpath=$dir/\$dldll~
37696747b715Smrg       $RM \$dlpath'
37706747b715Smrg    shlibpath_overrides_runpath=yes
37716747b715Smrg    dynamic_linker='Win32 link.exe'
37726747b715Smrg    ;;
377305b261ecSmrg
37746747b715Smrg  *)
37756747b715Smrg    # Assume MSVC wrapper
37766747b715Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
37776747b715Smrg    dynamic_linker='Win32 ld.exe'
37784642e01fSmrg    ;;
37796747b715Smrg  esac
37806747b715Smrg  # FIXME: first we should search . and the directory the executable is in
37816747b715Smrg  shlibpath_var=PATH
378205b261ecSmrg  ;;
37836747b715Smrg
37846747b715Smrgdarwin* | rhapsody*)
37856747b715Smrg  dynamic_linker="$host_os dyld"
37866747b715Smrg  version_type=darwin
37876747b715Smrg  need_lib_prefix=no
37886747b715Smrg  need_version=no
37896747b715Smrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
37906747b715Smrg  soname_spec='${libname}${release}${major}$shared_ext'
37916747b715Smrg  shlibpath_overrides_runpath=yes
37926747b715Smrg  shlibpath_var=DYLD_LIBRARY_PATH
37936747b715Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
37946747b715Smrgm4_if([$1], [],[
37956747b715Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
37966747b715Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
379705b261ecSmrg  ;;
37986747b715Smrg
37996747b715Smrgdgux*)
38006747b715Smrg  version_type=linux
38016747b715Smrg  need_lib_prefix=no
38026747b715Smrg  need_version=no
38036747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
38046747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38056747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
38064642e01fSmrg  ;;
38076747b715Smrg
38086747b715Smrgfreebsd1*)
38096747b715Smrg  dynamic_linker=no
38104642e01fSmrg  ;;
381105b261ecSmrg
38126747b715Smrgfreebsd* | dragonfly*)
38136747b715Smrg  # DragonFly does not have aout.  When/if they implement a new
38146747b715Smrg  # versioning mechanism, adjust this.
38156747b715Smrg  if test -x /usr/bin/objformat; then
38166747b715Smrg    objformat=`/usr/bin/objformat`
38176747b715Smrg  else
38186747b715Smrg    case $host_os in
38196747b715Smrg    freebsd[[123]]*) objformat=aout ;;
38206747b715Smrg    *) objformat=elf ;;
38216747b715Smrg    esac
38226747b715Smrg  fi
38236747b715Smrg  version_type=freebsd-$objformat
38246747b715Smrg  case $version_type in
38256747b715Smrg    freebsd-elf*)
38266747b715Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
38276747b715Smrg      need_version=no
38286747b715Smrg      need_lib_prefix=no
38296747b715Smrg      ;;
38306747b715Smrg    freebsd-*)
38316747b715Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
38326747b715Smrg      need_version=yes
38336747b715Smrg      ;;
38346747b715Smrg  esac
38356747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
38364642e01fSmrg  case $host_os in
38376747b715Smrg  freebsd2*)
38386747b715Smrg    shlibpath_overrides_runpath=yes
38394642e01fSmrg    ;;
38406747b715Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
38416747b715Smrg    shlibpath_overrides_runpath=yes
38426747b715Smrg    hardcode_into_libs=yes
38434642e01fSmrg    ;;
38446747b715Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
38456747b715Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
38466747b715Smrg    shlibpath_overrides_runpath=no
38476747b715Smrg    hardcode_into_libs=yes
38484642e01fSmrg    ;;
38496747b715Smrg  *) # from 4.6 on, and DragonFly
38506747b715Smrg    shlibpath_overrides_runpath=yes
38516747b715Smrg    hardcode_into_libs=yes
38524642e01fSmrg    ;;
38534642e01fSmrg  esac
38546747b715Smrg  ;;
385505b261ecSmrg
38566747b715Smrggnu*)
38576747b715Smrg  version_type=linux
38586747b715Smrg  need_lib_prefix=no
38596747b715Smrg  need_version=no
38606747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
38616747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38626747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
38636747b715Smrg  hardcode_into_libs=yes
38646747b715Smrg  ;;
386505b261ecSmrg
38666747b715Smrghaiku*)
38676747b715Smrg  version_type=linux
38686747b715Smrg  need_lib_prefix=no
38696747b715Smrg  need_version=no
38706747b715Smrg  dynamic_linker="$host_os runtime_loader"
38716747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
38726747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
38736747b715Smrg  shlibpath_var=LIBRARY_PATH
38746747b715Smrg  shlibpath_overrides_runpath=yes
38756747b715Smrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
38766747b715Smrg  hardcode_into_libs=yes
38776747b715Smrg  ;;
38786747b715Smrg
38796747b715Smrghpux9* | hpux10* | hpux11*)
38806747b715Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
38816747b715Smrg  # link against other versions.
38826747b715Smrg  version_type=sunos
38836747b715Smrg  need_lib_prefix=no
38846747b715Smrg  need_version=no
38856747b715Smrg  case $host_cpu in
38866747b715Smrg  ia64*)
38876747b715Smrg    shrext_cmds='.so'
38886747b715Smrg    hardcode_into_libs=yes
38896747b715Smrg    dynamic_linker="$host_os dld.so"
38906747b715Smrg    shlibpath_var=LD_LIBRARY_PATH
38916747b715Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
38926747b715Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
38936747b715Smrg    soname_spec='${libname}${release}${shared_ext}$major'
38946747b715Smrg    if test "X$HPUX_IA64_MODE" = X32; then
38956747b715Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
38964642e01fSmrg    else
38976747b715Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
38984642e01fSmrg    fi
38996747b715Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
39006747b715Smrg    ;;
39016747b715Smrg  hppa*64*)
39026747b715Smrg    shrext_cmds='.sl'
39036747b715Smrg    hardcode_into_libs=yes
39046747b715Smrg    dynamic_linker="$host_os dld.sl"
39056747b715Smrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
39066747b715Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
39076747b715Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39086747b715Smrg    soname_spec='${libname}${release}${shared_ext}$major'
39096747b715Smrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
39106747b715Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
39116747b715Smrg    ;;
39126747b715Smrg  *)
39136747b715Smrg    shrext_cmds='.sl'
39146747b715Smrg    dynamic_linker="$host_os dld.sl"
39156747b715Smrg    shlibpath_var=SHLIB_PATH
39166747b715Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
39176747b715Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39186747b715Smrg    soname_spec='${libname}${release}${shared_ext}$major'
39196747b715Smrg    ;;
39206747b715Smrg  esac
39216747b715Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
39226747b715Smrg  postinstall_cmds='chmod 555 $lib'
39236747b715Smrg  # or fails outright, so override atomically:
39246747b715Smrg  install_override_mode=555
39256747b715Smrg  ;;
39266747b715Smrg
39276747b715Smrginterix[[3-9]]*)
39286747b715Smrg  version_type=linux
39296747b715Smrg  need_lib_prefix=no
39306747b715Smrg  need_version=no
39316747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
39326747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39336747b715Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
39346747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
39356747b715Smrg  shlibpath_overrides_runpath=no
39366747b715Smrg  hardcode_into_libs=yes
39376747b715Smrg  ;;
39386747b715Smrg
39396747b715Smrgirix5* | irix6* | nonstopux*)
39406747b715Smrg  case $host_os in
39416747b715Smrg    nonstopux*) version_type=nonstopux ;;
39426747b715Smrg    *)
39436747b715Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
39446747b715Smrg		version_type=linux
39456747b715Smrg	else
39466747b715Smrg		version_type=irix
39476747b715Smrg	fi ;;
39486747b715Smrg  esac
39496747b715Smrg  need_lib_prefix=no
39506747b715Smrg  need_version=no
39516747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39526747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
39536747b715Smrg  case $host_os in
39546747b715Smrg  irix5* | nonstopux*)
39556747b715Smrg    libsuff= shlibsuff=
39566747b715Smrg    ;;
39576747b715Smrg  *)
39586747b715Smrg    case $LD in # libtool.m4 will add one of these switches to LD
39596747b715Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
39606747b715Smrg      libsuff= shlibsuff= libmagic=32-bit;;
39616747b715Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
39626747b715Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
39636747b715Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
39646747b715Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
39656747b715Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
39664642e01fSmrg    esac
39676747b715Smrg    ;;
39686747b715Smrg  esac
39696747b715Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
39706747b715Smrg  shlibpath_overrides_runpath=no
39716747b715Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
39726747b715Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
39736747b715Smrg  hardcode_into_libs=yes
39746747b715Smrg  ;;
397505b261ecSmrg
39766747b715Smrg# No shared lib support for Linux oldld, aout, or coff.
39776747b715Smrglinux*oldld* | linux*aout* | linux*coff*)
39786747b715Smrg  dynamic_linker=no
39796747b715Smrg  ;;
39806747b715Smrg
39816747b715Smrg# This must be Linux ELF.
39826747b715Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
39836747b715Smrg  version_type=linux
39846747b715Smrg  need_lib_prefix=no
39856747b715Smrg  need_version=no
39866747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
39876747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
39886747b715Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
39896747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
39906747b715Smrg  shlibpath_overrides_runpath=no
39916747b715Smrg
39926747b715Smrg  # Some binutils ld are patched to set DT_RUNPATH
39936747b715Smrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
39946747b715Smrg    [lt_cv_shlibpath_overrides_runpath=no
39956747b715Smrg    save_LDFLAGS=$LDFLAGS
39966747b715Smrg    save_libdir=$libdir
39976747b715Smrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
39986747b715Smrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
39996747b715Smrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
40006747b715Smrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
40016747b715Smrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
40026747b715Smrg    LDFLAGS=$save_LDFLAGS
40036747b715Smrg    libdir=$save_libdir
40046747b715Smrg    ])
40056747b715Smrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
40066747b715Smrg
40076747b715Smrg  # This implies no fast_install, which is unacceptable.
40086747b715Smrg  # Some rework will be needed to allow for fast_install
40096747b715Smrg  # before this can be enabled.
40106747b715Smrg  hardcode_into_libs=yes
40116747b715Smrg
40126747b715Smrg  # Append ld.so.conf contents to the search path
40136747b715Smrg  if test -f /etc/ld.so.conf; then
40146747b715Smrg    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' ' '`
40156747b715Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
40166747b715Smrg  fi
40176747b715Smrg
40186747b715Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
40196747b715Smrg  # powerpc, because MkLinux only supported shared libraries with the
40206747b715Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
40216747b715Smrg  # most powerpc-linux boxes support dynamic linking these days and
40226747b715Smrg  # people can always --disable-shared, the test was removed, and we
40236747b715Smrg  # assume the GNU/Linux dynamic linker is in use.
40246747b715Smrg  dynamic_linker='GNU/Linux ld.so'
40256747b715Smrg  ;;
40266747b715Smrg
40276747b715Smrgnetbsd*)
40286747b715Smrg  version_type=sunos
40296747b715Smrg  need_lib_prefix=no
40306747b715Smrg  need_version=no
40316747b715Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
40326747b715Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
40336747b715Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
40346747b715Smrg    dynamic_linker='NetBSD (a.out) ld.so'
40356747b715Smrg  else
40366747b715Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
40376747b715Smrg    soname_spec='${libname}${release}${shared_ext}$major'
40386747b715Smrg    dynamic_linker='NetBSD ld.elf_so'
40396747b715Smrg  fi
40406747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
40416747b715Smrg  shlibpath_overrides_runpath=yes
40426747b715Smrg  hardcode_into_libs=yes
40436747b715Smrg  ;;
40446747b715Smrg
40456747b715Smrgnewsos6)
40466747b715Smrg  version_type=linux
40476747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
40486747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
40496747b715Smrg  shlibpath_overrides_runpath=yes
40506747b715Smrg  ;;
40516747b715Smrg
40526747b715Smrg*nto* | *qnx*)
40536747b715Smrg  version_type=qnx
40546747b715Smrg  need_lib_prefix=no
40556747b715Smrg  need_version=no
40566747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
40576747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
40586747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
40596747b715Smrg  shlibpath_overrides_runpath=no
40606747b715Smrg  hardcode_into_libs=yes
40616747b715Smrg  dynamic_linker='ldqnx.so'
40626747b715Smrg  ;;
40636747b715Smrg
40646747b715Smrgopenbsd*)
40656747b715Smrg  version_type=sunos
40666747b715Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
40676747b715Smrg  need_lib_prefix=no
40686747b715Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
40696747b715Smrg  case $host_os in
40706747b715Smrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
40716747b715Smrg    *)				need_version=no  ;;
40726747b715Smrg  esac
40736747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
40746747b715Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
40756747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
40766747b715Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
40774642e01fSmrg    case $host_os in
40786747b715Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
40796747b715Smrg	shlibpath_overrides_runpath=no
40806747b715Smrg	;;
40816747b715Smrg      *)
40826747b715Smrg	shlibpath_overrides_runpath=yes
40836747b715Smrg	;;
40846747b715Smrg      esac
40856747b715Smrg  else
40866747b715Smrg    shlibpath_overrides_runpath=yes
40876747b715Smrg  fi
40886747b715Smrg  ;;
408905b261ecSmrg
40906747b715Smrgos2*)
40916747b715Smrg  libname_spec='$name'
40926747b715Smrg  shrext_cmds=".dll"
40936747b715Smrg  need_lib_prefix=no
40946747b715Smrg  library_names_spec='$libname${shared_ext} $libname.a'
40956747b715Smrg  dynamic_linker='OS/2 ld.exe'
40966747b715Smrg  shlibpath_var=LIBPATH
40976747b715Smrg  ;;
409805b261ecSmrg
40996747b715Smrgosf3* | osf4* | osf5*)
41006747b715Smrg  version_type=osf
41016747b715Smrg  need_lib_prefix=no
41026747b715Smrg  need_version=no
41036747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
41046747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
41056747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
41066747b715Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
41076747b715Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
41086747b715Smrg  ;;
410905b261ecSmrg
41106747b715Smrgrdos*)
41116747b715Smrg  dynamic_linker=no
41126747b715Smrg  ;;
411305b261ecSmrg
41146747b715Smrgsolaris*)
41156747b715Smrg  version_type=linux
41166747b715Smrg  need_lib_prefix=no
41176747b715Smrg  need_version=no
41186747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
41196747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
41206747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
41216747b715Smrg  shlibpath_overrides_runpath=yes
41226747b715Smrg  hardcode_into_libs=yes
41236747b715Smrg  # ldd complains unless libraries are executable
41246747b715Smrg  postinstall_cmds='chmod +x $lib'
41256747b715Smrg  ;;
412605b261ecSmrg
41276747b715Smrgsunos4*)
41286747b715Smrg  version_type=sunos
41296747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
41306747b715Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
41316747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
41326747b715Smrg  shlibpath_overrides_runpath=yes
41336747b715Smrg  if test "$with_gnu_ld" = yes; then
41346747b715Smrg    need_lib_prefix=no
41356747b715Smrg  fi
41366747b715Smrg  need_version=yes
41376747b715Smrg  ;;
41384642e01fSmrg
41396747b715Smrgsysv4 | sysv4.3*)
41406747b715Smrg  version_type=linux
41416747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
41426747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
41436747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
41446747b715Smrg  case $host_vendor in
41456747b715Smrg    sni)
41466747b715Smrg      shlibpath_overrides_runpath=no
41476747b715Smrg      need_lib_prefix=no
41486747b715Smrg      runpath_var=LD_RUN_PATH
41494642e01fSmrg      ;;
41506747b715Smrg    siemens)
41516747b715Smrg      need_lib_prefix=no
41524642e01fSmrg      ;;
41536747b715Smrg    motorola)
41546747b715Smrg      need_lib_prefix=no
41556747b715Smrg      need_version=no
41566747b715Smrg      shlibpath_overrides_runpath=no
41576747b715Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
41586747b715Smrg      ;;
41596747b715Smrg  esac
41606747b715Smrg  ;;
416105b261ecSmrg
41626747b715Smrgsysv4*MP*)
41636747b715Smrg  if test -d /usr/nec ;then
41646747b715Smrg    version_type=linux
41656747b715Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
41666747b715Smrg    soname_spec='$libname${shared_ext}.$major'
41676747b715Smrg    shlibpath_var=LD_LIBRARY_PATH
41686747b715Smrg  fi
41696747b715Smrg  ;;
417005b261ecSmrg
41716747b715Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
41726747b715Smrg  version_type=freebsd-elf
41736747b715Smrg  need_lib_prefix=no
41746747b715Smrg  need_version=no
41756747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
41766747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
41776747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
41786747b715Smrg  shlibpath_overrides_runpath=yes
41796747b715Smrg  hardcode_into_libs=yes
41806747b715Smrg  if test "$with_gnu_ld" = yes; then
41816747b715Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
41826747b715Smrg  else
41836747b715Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
41846747b715Smrg    case $host_os in
41856747b715Smrg      sco3.2v5*)
41866747b715Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
41876747b715Smrg	;;
41886747b715Smrg    esac
41896747b715Smrg  fi
41906747b715Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
41916747b715Smrg  ;;
419205b261ecSmrg
41936747b715Smrgtpf*)
41946747b715Smrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
41956747b715Smrg  version_type=linux
41966747b715Smrg  need_lib_prefix=no
41976747b715Smrg  need_version=no
41986747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
41996747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
42006747b715Smrg  shlibpath_overrides_runpath=no
42016747b715Smrg  hardcode_into_libs=yes
42026747b715Smrg  ;;
420305b261ecSmrg
42046747b715Smrguts4*)
42056747b715Smrg  version_type=linux
42066747b715Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
42076747b715Smrg  soname_spec='${libname}${release}${shared_ext}$major'
42086747b715Smrg  shlibpath_var=LD_LIBRARY_PATH
42096747b715Smrg  ;;
421005b261ecSmrg
42116747b715Smrg*)
42126747b715Smrg  dynamic_linker=no
42136747b715Smrg  ;;
42146747b715Smrgesac
42156747b715SmrgAC_MSG_RESULT([$dynamic_linker])
42166747b715Smrgtest "$dynamic_linker" = no && can_build_shared=no
421705b261ecSmrg
42186747b715Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
42196747b715Smrgif test "$GCC" = yes; then
42206747b715Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
42216747b715Smrgfi
422205b261ecSmrg
42236747b715Smrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
42246747b715Smrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
42256747b715Smrgfi
42266747b715Smrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
42276747b715Smrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
42286747b715Smrgfi
422905b261ecSmrg
42306747b715Smrg_LT_DECL([], [variables_saved_for_relink], [1],
42316747b715Smrg    [Variables whose values should be saved in libtool wrapper scripts and
42326747b715Smrg    restored at link time])
42336747b715Smrg_LT_DECL([], [need_lib_prefix], [0],
42346747b715Smrg    [Do we need the "lib" prefix for modules?])
42356747b715Smrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
42366747b715Smrg_LT_DECL([], [version_type], [0], [Library versioning type])
42376747b715Smrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
42386747b715Smrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
42396747b715Smrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
42406747b715Smrg    [Is shlibpath searched before the hard-coded library search path?])
42416747b715Smrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
42426747b715Smrg_LT_DECL([], [library_names_spec], [1],
42436747b715Smrg    [[List of archive names.  First name is the real one, the rest are links.
42446747b715Smrg    The last name is the one that the linker finds with -lNAME]])
42456747b715Smrg_LT_DECL([], [soname_spec], [1],
42466747b715Smrg    [[The coded name of the library, if different from the real name]])
42476747b715Smrg_LT_DECL([], [install_override_mode], [1],
42486747b715Smrg    [Permission mode override for installation of shared libraries])
42496747b715Smrg_LT_DECL([], [postinstall_cmds], [2],
42506747b715Smrg    [Command to use after installation of a shared archive])
42516747b715Smrg_LT_DECL([], [postuninstall_cmds], [2],
42526747b715Smrg    [Command to use after uninstallation of a shared archive])
42536747b715Smrg_LT_DECL([], [finish_cmds], [2],
42546747b715Smrg    [Commands used to finish a libtool library installation in a directory])
42556747b715Smrg_LT_DECL([], [finish_eval], [1],
42566747b715Smrg    [[As "finish_cmds", except a single script fragment to be evaled but
42576747b715Smrg    not shown]])
42586747b715Smrg_LT_DECL([], [hardcode_into_libs], [0],
42596747b715Smrg    [Whether we should hardcode library paths into libraries])
42606747b715Smrg_LT_DECL([], [sys_lib_search_path_spec], [2],
42616747b715Smrg    [Compile-time system search path for libraries])
42626747b715Smrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
42636747b715Smrg    [Run-time system search path for libraries])
42646747b715Smrg])# _LT_SYS_DYNAMIC_LINKER
426505b261ecSmrg
42666747b715Smrg
42676747b715Smrg# _LT_PATH_TOOL_PREFIX(TOOL)
42686747b715Smrg# --------------------------
42696747b715Smrg# find a file program which can recognize shared library
42706747b715SmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
42716747b715Smrg[m4_require([_LT_DECL_EGREP])dnl
42726747b715SmrgAC_MSG_CHECKING([for $1])
42736747b715SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
42746747b715Smrg[case $MAGIC_CMD in
42756747b715Smrg[[\\/*] |  ?:[\\/]*])
42766747b715Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
42776747b715Smrg  ;;
42786747b715Smrg*)
42796747b715Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
42806747b715Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
42816747b715Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
42826747b715Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
42836747b715Smrgdnl not every word.  This closes a longstanding sh security hole.
42846747b715Smrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
42856747b715Smrg  for ac_dir in $ac_dummy; do
42866747b715Smrg    IFS="$lt_save_ifs"
42876747b715Smrg    test -z "$ac_dir" && ac_dir=.
42886747b715Smrg    if test -f $ac_dir/$1; then
42896747b715Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
42906747b715Smrg      if test -n "$file_magic_test_file"; then
42916747b715Smrg	case $deplibs_check_method in
42926747b715Smrg	"file_magic "*)
42936747b715Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
42946747b715Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
42956747b715Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
42966747b715Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
42976747b715Smrg	    :
42984642e01fSmrg	  else
42996747b715Smrg	    cat <<_LT_EOF 1>&2
430005b261ecSmrg
43016747b715Smrg*** Warning: the command libtool uses to detect shared libraries,
43026747b715Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
43036747b715Smrg*** The result is that libtool may fail to recognize shared libraries
43046747b715Smrg*** as such.  This will affect the creation of libtool libraries that
43056747b715Smrg*** depend on shared libraries, but programs linked with such libtool
43066747b715Smrg*** libraries will work regardless of this problem.  Nevertheless, you
43076747b715Smrg*** may want to report the problem to your system manager and/or to
43086747b715Smrg*** bug-libtool@gnu.org
43094642e01fSmrg
43106747b715Smrg_LT_EOF
43116747b715Smrg	  fi ;;
43126747b715Smrg	esac
43134642e01fSmrg      fi
43146747b715Smrg      break
43154642e01fSmrg    fi
43166747b715Smrg  done
43176747b715Smrg  IFS="$lt_save_ifs"
43186747b715Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
43196747b715Smrg  ;;
43206747b715Smrgesac])
43216747b715SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
43226747b715Smrgif test -n "$MAGIC_CMD"; then
43236747b715Smrg  AC_MSG_RESULT($MAGIC_CMD)
43246747b715Smrgelse
43256747b715Smrg  AC_MSG_RESULT(no)
43266747b715Smrgfi
43276747b715Smrg_LT_DECL([], [MAGIC_CMD], [0],
43286747b715Smrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
43296747b715Smrg])# _LT_PATH_TOOL_PREFIX
433005b261ecSmrg
43316747b715Smrg# Old name:
43326747b715SmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
43336747b715Smrgdnl aclocal-1.4 backwards compatibility:
43346747b715Smrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
433505b261ecSmrg
433605b261ecSmrg
43376747b715Smrg# _LT_PATH_MAGIC
43386747b715Smrg# --------------
43396747b715Smrg# find a file program which can recognize a shared library
43406747b715Smrgm4_defun([_LT_PATH_MAGIC],
43416747b715Smrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
43426747b715Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
43436747b715Smrg  if test -n "$ac_tool_prefix"; then
43446747b715Smrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
43456747b715Smrg  else
43466747b715Smrg    MAGIC_CMD=:
43476747b715Smrg  fi
43486747b715Smrgfi
43496747b715Smrg])# _LT_PATH_MAGIC
435005b261ecSmrg
435105b261ecSmrg
43526747b715Smrg# LT_PATH_LD
43536747b715Smrg# ----------
43546747b715Smrg# find the pathname to the GNU or non-GNU linker
43556747b715SmrgAC_DEFUN([LT_PATH_LD],
43566747b715Smrg[AC_REQUIRE([AC_PROG_CC])dnl
43576747b715SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
43586747b715SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
43596747b715Smrgm4_require([_LT_DECL_SED])dnl
43606747b715Smrgm4_require([_LT_DECL_EGREP])dnl
43616747b715Smrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
436205b261ecSmrg
43636747b715SmrgAC_ARG_WITH([gnu-ld],
43646747b715Smrg    [AS_HELP_STRING([--with-gnu-ld],
43656747b715Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
43666747b715Smrg    [test "$withval" = no || with_gnu_ld=yes],
43676747b715Smrg    [with_gnu_ld=no])dnl
436805b261ecSmrg
43696747b715Smrgac_prog=ld
43706747b715Smrgif test "$GCC" = yes; then
43716747b715Smrg  # Check if gcc -print-prog-name=ld gives a path.
43726747b715Smrg  AC_MSG_CHECKING([for ld used by $CC])
43736747b715Smrg  case $host in
43746747b715Smrg  *-*-mingw*)
43756747b715Smrg    # gcc leaves a trailing carriage return which upsets mingw
43766747b715Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
43776747b715Smrg  *)
43786747b715Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
43796747b715Smrg  esac
43806747b715Smrg  case $ac_prog in
43816747b715Smrg    # Accept absolute paths.
43826747b715Smrg    [[\\/]]* | ?:[[\\/]]*)
43836747b715Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
43846747b715Smrg      # Canonicalize the pathname of ld
43856747b715Smrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
43866747b715Smrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
43876747b715Smrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
43886747b715Smrg      done
43896747b715Smrg      test -z "$LD" && LD="$ac_prog"
43904642e01fSmrg      ;;
43916747b715Smrg  "")
43926747b715Smrg    # If it fails, then pretend we aren't using GCC.
43936747b715Smrg    ac_prog=ld
43946747b715Smrg    ;;
43956747b715Smrg  *)
43966747b715Smrg    # If it is relative, then search for the first ld in PATH.
43976747b715Smrg    with_gnu_ld=unknown
43986747b715Smrg    ;;
43996747b715Smrg  esac
44006747b715Smrgelif test "$with_gnu_ld" = yes; then
44016747b715Smrg  AC_MSG_CHECKING([for GNU ld])
44026747b715Smrgelse
44036747b715Smrg  AC_MSG_CHECKING([for non-GNU ld])
44046747b715Smrgfi
44056747b715SmrgAC_CACHE_VAL(lt_cv_path_LD,
44066747b715Smrg[if test -z "$LD"; then
44076747b715Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
44086747b715Smrg  for ac_dir in $PATH; do
44096747b715Smrg    IFS="$lt_save_ifs"
44106747b715Smrg    test -z "$ac_dir" && ac_dir=.
44116747b715Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
44126747b715Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
44136747b715Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
44146747b715Smrg      # but apparently some variants of GNU ld only accept -v.
44156747b715Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
44166747b715Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
44176747b715Smrg      *GNU* | *'with BFD'*)
44186747b715Smrg	test "$with_gnu_ld" != no && break
44196747b715Smrg	;;
44206747b715Smrg      *)
44216747b715Smrg	test "$with_gnu_ld" != yes && break
44226747b715Smrg	;;
44234642e01fSmrg      esac
44246747b715Smrg    fi
44256747b715Smrg  done
44266747b715Smrg  IFS="$lt_save_ifs"
44276747b715Smrgelse
44286747b715Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
44296747b715Smrgfi])
44306747b715SmrgLD="$lt_cv_path_LD"
44316747b715Smrgif test -n "$LD"; then
44326747b715Smrg  AC_MSG_RESULT($LD)
44336747b715Smrgelse
44346747b715Smrg  AC_MSG_RESULT(no)
44356747b715Smrgfi
44366747b715Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
44376747b715Smrg_LT_PATH_LD_GNU
44386747b715SmrgAC_SUBST([LD])
443905b261ecSmrg
44406747b715Smrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
44416747b715Smrg])# LT_PATH_LD
444205b261ecSmrg
44436747b715Smrg# Old names:
44446747b715SmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
44456747b715SmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
44466747b715Smrgdnl aclocal-1.4 backwards compatibility:
44476747b715Smrgdnl AC_DEFUN([AM_PROG_LD], [])
44486747b715Smrgdnl AC_DEFUN([AC_PROG_LD], [])
444905b261ecSmrg
445005b261ecSmrg
44516747b715Smrg# _LT_PATH_LD_GNU
44526747b715Smrg#- --------------
44536747b715Smrgm4_defun([_LT_PATH_LD_GNU],
44546747b715Smrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
44556747b715Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
44566747b715Smrgcase `$LD -v 2>&1 </dev/null` in
44576747b715Smrg*GNU* | *'with BFD'*)
44586747b715Smrg  lt_cv_prog_gnu_ld=yes
44596747b715Smrg  ;;
44606747b715Smrg*)
44616747b715Smrg  lt_cv_prog_gnu_ld=no
44626747b715Smrg  ;;
44636747b715Smrgesac])
44646747b715Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
44656747b715Smrg])# _LT_PATH_LD_GNU
446605b261ecSmrg
446705b261ecSmrg
44686747b715Smrg# _LT_CMD_RELOAD
44696747b715Smrg# --------------
44706747b715Smrg# find reload flag for linker
44716747b715Smrg#   -- PORTME Some linkers may need a different reload flag.
44726747b715Smrgm4_defun([_LT_CMD_RELOAD],
44736747b715Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
44746747b715Smrg  lt_cv_ld_reload_flag,
44756747b715Smrg  [lt_cv_ld_reload_flag='-r'])
44766747b715Smrgreload_flag=$lt_cv_ld_reload_flag
44776747b715Smrgcase $reload_flag in
44786747b715Smrg"" | " "*) ;;
44796747b715Smrg*) reload_flag=" $reload_flag" ;;
44806747b715Smrgesac
44816747b715Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
44826747b715Smrgcase $host_os in
44836747b715Smrg  cygwin* | mingw* | pw32* | cegcc*)
44846747b715Smrg    if test "$GCC" != yes; then
44856747b715Smrg      reload_cmds=false
44866747b715Smrg    fi
44876747b715Smrg    ;;
44886747b715Smrg  darwin*)
44896747b715Smrg    if test "$GCC" = yes; then
44906747b715Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
44916747b715Smrg    else
44926747b715Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
44936747b715Smrg    fi
44946747b715Smrg    ;;
44956747b715Smrgesac
44966747b715Smrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
44976747b715Smrg_LT_TAGDECL([], [reload_cmds], [2])dnl
44986747b715Smrg])# _LT_CMD_RELOAD
44996747b715Smrg
45006747b715Smrg
45016747b715Smrg# _LT_CHECK_MAGIC_METHOD
45026747b715Smrg# ----------------------
45036747b715Smrg# how to check for library dependencies
45046747b715Smrg#  -- PORTME fill in with the dynamic library characteristics
45056747b715Smrgm4_defun([_LT_CHECK_MAGIC_METHOD],
45066747b715Smrg[m4_require([_LT_DECL_EGREP])
45076747b715Smrgm4_require([_LT_DECL_OBJDUMP])
45086747b715SmrgAC_CACHE_CHECK([how to recognize dependent libraries],
45096747b715Smrglt_cv_deplibs_check_method,
45106747b715Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
45116747b715Smrglt_cv_file_magic_test_file=
45126747b715Smrglt_cv_deplibs_check_method='unknown'
45136747b715Smrg# Need to set the preceding variable on all platforms that support
45146747b715Smrg# interlibrary dependencies.
45156747b715Smrg# 'none' -- dependencies not supported.
45166747b715Smrg# `unknown' -- same as none, but documents that we really don't know.
45176747b715Smrg# 'pass_all' -- all dependencies passed with no checks.
45186747b715Smrg# 'test_compile' -- check by making test program.
45196747b715Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
45206747b715Smrg# which responds to the $file_magic_cmd with a given extended regex.
45216747b715Smrg# If you have `file' or equivalent on your system and you're not sure
45226747b715Smrg# whether `pass_all' will *always* work, you probably want this one.
452305b261ecSmrg
45246747b715Smrgcase $host_os in
45256747b715Smrgaix[[4-9]]*)
45266747b715Smrg  lt_cv_deplibs_check_method=pass_all
45276747b715Smrg  ;;
452805b261ecSmrg
45296747b715Smrgbeos*)
45306747b715Smrg  lt_cv_deplibs_check_method=pass_all
45316747b715Smrg  ;;
453205b261ecSmrg
45336747b715Smrgbsdi[[45]]*)
45346747b715Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
45356747b715Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
45366747b715Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
45376747b715Smrg  ;;
453805b261ecSmrg
45396747b715Smrgcygwin*)
45406747b715Smrg  # func_win32_libid is a shell function defined in ltmain.sh
45416747b715Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
45426747b715Smrg  lt_cv_file_magic_cmd='func_win32_libid'
45436747b715Smrg  ;;
454405b261ecSmrg
45456747b715Smrgmingw* | pw32*)
45466747b715Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
45476747b715Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
45486747b715Smrg  # unless we find 'file', for example because we are cross-compiling.
45496747b715Smrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
45506747b715Smrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
45516747b715Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
45526747b715Smrg    lt_cv_file_magic_cmd='func_win32_libid'
45536747b715Smrg  else
45546747b715Smrg    # Keep this pattern in sync with the one in func_win32_libid.
45556747b715Smrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
45566747b715Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
45576747b715Smrg  fi
45586747b715Smrg  ;;
455905b261ecSmrg
45606747b715Smrgcegcc*)
45616747b715Smrg  # use the weaker test based on 'objdump'. See mingw*.
45626747b715Smrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
45636747b715Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
45646747b715Smrg  ;;
456505b261ecSmrg
45666747b715Smrgdarwin* | rhapsody*)
45676747b715Smrg  lt_cv_deplibs_check_method=pass_all
45686747b715Smrg  ;;
456905b261ecSmrg
45706747b715Smrgfreebsd* | dragonfly*)
45716747b715Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
45726747b715Smrg    case $host_cpu in
45736747b715Smrg    i*86 )
45746747b715Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
45756747b715Smrg      # Let's accept both of them until this is cleared up.
45766747b715Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
45776747b715Smrg      lt_cv_file_magic_cmd=/usr/bin/file
45786747b715Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
45794642e01fSmrg      ;;
45806747b715Smrg    esac
45816747b715Smrg  else
45826747b715Smrg    lt_cv_deplibs_check_method=pass_all
45836747b715Smrg  fi
45846747b715Smrg  ;;
458505b261ecSmrg
45866747b715Smrggnu*)
45876747b715Smrg  lt_cv_deplibs_check_method=pass_all
45886747b715Smrg  ;;
458905b261ecSmrg
45906747b715Smrghaiku*)
45916747b715Smrg  lt_cv_deplibs_check_method=pass_all
45926747b715Smrg  ;;
459305b261ecSmrg
45946747b715Smrghpux10.20* | hpux11*)
45956747b715Smrg  lt_cv_file_magic_cmd=/usr/bin/file
45966747b715Smrg  case $host_cpu in
45976747b715Smrg  ia64*)
45986747b715Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
45996747b715Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
46006747b715Smrg    ;;
46016747b715Smrg  hppa*64*)
46026747b715Smrg    [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]']
46036747b715Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
46046747b715Smrg    ;;
46056747b715Smrg  *)
46066747b715Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
46076747b715Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
46086747b715Smrg    ;;
46096747b715Smrg  esac
46106747b715Smrg  ;;
461105b261ecSmrg
46126747b715Smrginterix[[3-9]]*)
46136747b715Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
46146747b715Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
46156747b715Smrg  ;;
461605b261ecSmrg
46176747b715Smrgirix5* | irix6* | nonstopux*)
46186747b715Smrg  case $LD in
46196747b715Smrg  *-32|*"-32 ") libmagic=32-bit;;
46206747b715Smrg  *-n32|*"-n32 ") libmagic=N32;;
46216747b715Smrg  *-64|*"-64 ") libmagic=64-bit;;
46226747b715Smrg  *) libmagic=never-match;;
46236747b715Smrg  esac
46246747b715Smrg  lt_cv_deplibs_check_method=pass_all
46256747b715Smrg  ;;
462605b261ecSmrg
46276747b715Smrg# This must be Linux ELF.
46286747b715Smrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
46296747b715Smrg  lt_cv_deplibs_check_method=pass_all
46306747b715Smrg  ;;
463105b261ecSmrg
46326747b715Smrgnetbsd*)
46336747b715Smrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
46346747b715Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
46356747b715Smrg  else
46366747b715Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
46376747b715Smrg  fi
46386747b715Smrg  ;;
463905b261ecSmrg
46406747b715Smrgnewos6*)
46416747b715Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
46426747b715Smrg  lt_cv_file_magic_cmd=/usr/bin/file
46436747b715Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
46446747b715Smrg  ;;
464505b261ecSmrg
46466747b715Smrg*nto* | *qnx*)
46476747b715Smrg  lt_cv_deplibs_check_method=pass_all
46486747b715Smrg  ;;
464905b261ecSmrg
46506747b715Smrgopenbsd*)
46516747b715Smrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
46526747b715Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
46536747b715Smrg  else
46546747b715Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
46556747b715Smrg  fi
46566747b715Smrg  ;;
465705b261ecSmrg
46586747b715Smrgosf3* | osf4* | osf5*)
46596747b715Smrg  lt_cv_deplibs_check_method=pass_all
46606747b715Smrg  ;;
466105b261ecSmrg
46626747b715Smrgrdos*)
46636747b715Smrg  lt_cv_deplibs_check_method=pass_all
46646747b715Smrg  ;;
466505b261ecSmrg
46666747b715Smrgsolaris*)
46676747b715Smrg  lt_cv_deplibs_check_method=pass_all
46686747b715Smrg  ;;
466905b261ecSmrg
46706747b715Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
46716747b715Smrg  lt_cv_deplibs_check_method=pass_all
46726747b715Smrg  ;;
467305b261ecSmrg
46746747b715Smrgsysv4 | sysv4.3*)
46756747b715Smrg  case $host_vendor in
46766747b715Smrg  motorola)
46776747b715Smrg    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]]'
46786747b715Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
46796747b715Smrg    ;;
46806747b715Smrg  ncr)
46816747b715Smrg    lt_cv_deplibs_check_method=pass_all
46826747b715Smrg    ;;
46836747b715Smrg  sequent)
46846747b715Smrg    lt_cv_file_magic_cmd='/bin/file'
46856747b715Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
46866747b715Smrg    ;;
46876747b715Smrg  sni)
46886747b715Smrg    lt_cv_file_magic_cmd='/bin/file'
46896747b715Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
46906747b715Smrg    lt_cv_file_magic_test_file=/lib/libc.so
46916747b715Smrg    ;;
46926747b715Smrg  siemens)
46936747b715Smrg    lt_cv_deplibs_check_method=pass_all
46946747b715Smrg    ;;
46956747b715Smrg  pc)
46966747b715Smrg    lt_cv_deplibs_check_method=pass_all
46976747b715Smrg    ;;
46986747b715Smrg  esac
46996747b715Smrg  ;;
470005b261ecSmrg
47016747b715Smrgtpf*)
47026747b715Smrg  lt_cv_deplibs_check_method=pass_all
47036747b715Smrg  ;;
47046747b715Smrgesac
47056747b715Smrg])
470605b261ecSmrg
47076747b715Smrgfile_magic_glob=
47086747b715Smrgwant_nocaseglob=no
47096747b715Smrgif test "$build" = "$host"; then
47106747b715Smrg  case $host_os in
47116747b715Smrg  mingw* | pw32*)
47126747b715Smrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
47136747b715Smrg      want_nocaseglob=yes
47146747b715Smrg    else
47156747b715Smrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
47166747b715Smrg    fi
47176747b715Smrg    ;;
47186747b715Smrg  esac
47196747b715Smrgfi
472005b261ecSmrg
47216747b715Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
47226747b715Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
47236747b715Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
472405b261ecSmrg
47256747b715Smrg_LT_DECL([], [deplibs_check_method], [1],
47266747b715Smrg    [Method to check whether dependent libraries are shared objects])
47276747b715Smrg_LT_DECL([], [file_magic_cmd], [1],
47286747b715Smrg    [Command to use when deplibs_check_method = "file_magic"])
47296747b715Smrg_LT_DECL([], [file_magic_glob], [1],
47306747b715Smrg    [How to find potential files when deplibs_check_method = "file_magic"])
47316747b715Smrg_LT_DECL([], [want_nocaseglob], [1],
47326747b715Smrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
47336747b715Smrg])# _LT_CHECK_MAGIC_METHOD
47346747b715Smrg
47356747b715Smrg
47366747b715Smrg# LT_PATH_NM
47376747b715Smrg# ----------
47386747b715Smrg# find the pathname to a BSD- or MS-compatible name lister
47396747b715SmrgAC_DEFUN([LT_PATH_NM],
47406747b715Smrg[AC_REQUIRE([AC_PROG_CC])dnl
47416747b715SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
47426747b715Smrg[if test -n "$NM"; then
47436747b715Smrg  # Let the user override the test.
47446747b715Smrg  lt_cv_path_NM="$NM"
47456747b715Smrgelse
47466747b715Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
47476747b715Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
47486747b715Smrg    lt_nm_to_check="$lt_nm_to_check nm"
47496747b715Smrg  fi
47506747b715Smrg  for lt_tmp_nm in $lt_nm_to_check; do
47516747b715Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
47526747b715Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
47536747b715Smrg      IFS="$lt_save_ifs"
47546747b715Smrg      test -z "$ac_dir" && ac_dir=.
47556747b715Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
47566747b715Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
47576747b715Smrg	# Check to see if the nm accepts a BSD-compat flag.
47586747b715Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
47596747b715Smrg	#   nm: unknown option "B" ignored
47606747b715Smrg	# Tru64's nm complains that /dev/null is an invalid object file
47616747b715Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
47626747b715Smrg	*/dev/null* | *'Invalid file or object type'*)
47636747b715Smrg	  lt_cv_path_NM="$tmp_nm -B"
47646747b715Smrg	  break
47656747b715Smrg	  ;;
47666747b715Smrg	*)
47676747b715Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
47686747b715Smrg	  */dev/null*)
47696747b715Smrg	    lt_cv_path_NM="$tmp_nm -p"
47706747b715Smrg	    break
47716747b715Smrg	    ;;
47726747b715Smrg	  *)
47736747b715Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
47746747b715Smrg	    continue # so that we can try to find one that supports BSD flags
47756747b715Smrg	    ;;
47766747b715Smrg	  esac
47776747b715Smrg	  ;;
47786747b715Smrg	esac
47796747b715Smrg      fi
47806747b715Smrg    done
47816747b715Smrg    IFS="$lt_save_ifs"
47826747b715Smrg  done
47836747b715Smrg  : ${lt_cv_path_NM=no}
47846747b715Smrgfi])
47856747b715Smrgif test "$lt_cv_path_NM" != "no"; then
47866747b715Smrg  NM="$lt_cv_path_NM"
47876747b715Smrgelse
47886747b715Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
47896747b715Smrg  if test -n "$DUMPBIN"; then :
47906747b715Smrg    # Let the user override the test.
47916747b715Smrg  else
47926747b715Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
47936747b715Smrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
47946747b715Smrg    *COFF*)
47956747b715Smrg      DUMPBIN="$DUMPBIN -symbols"
47964642e01fSmrg      ;;
47974642e01fSmrg    *)
47986747b715Smrg      DUMPBIN=:
47994642e01fSmrg      ;;
48004642e01fSmrg    esac
48016747b715Smrg  fi
48026747b715Smrg  AC_SUBST([DUMPBIN])
48036747b715Smrg  if test "$DUMPBIN" != ":"; then
48046747b715Smrg    NM="$DUMPBIN"
48056747b715Smrg  fi
48066747b715Smrgfi
48076747b715Smrgtest -z "$NM" && NM=nm
48086747b715SmrgAC_SUBST([NM])
48096747b715Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
481005b261ecSmrg
48116747b715SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
48126747b715Smrg  [lt_cv_nm_interface="BSD nm"
48136747b715Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
48146747b715Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
48156747b715Smrg  (eval "$ac_compile" 2>conftest.err)
48166747b715Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
48176747b715Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
48186747b715Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
48196747b715Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
48206747b715Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
48216747b715Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
48226747b715Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
48236747b715Smrg    lt_cv_nm_interface="MS dumpbin"
48244642e01fSmrg  fi
48256747b715Smrg  rm -f conftest*])
48266747b715Smrg])# LT_PATH_NM
482705b261ecSmrg
48286747b715Smrg# Old names:
48296747b715SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
48306747b715SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
48316747b715Smrgdnl aclocal-1.4 backwards compatibility:
48326747b715Smrgdnl AC_DEFUN([AM_PROG_NM], [])
48336747b715Smrgdnl AC_DEFUN([AC_PROG_NM], [])
483405b261ecSmrg
48356747b715Smrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
48366747b715Smrg# --------------------------------
48376747b715Smrg# how to determine the name of the shared library
48386747b715Smrg# associated with a specific link library.
48396747b715Smrg#  -- PORTME fill in with the dynamic library characteristics
48406747b715Smrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
48416747b715Smrg[m4_require([_LT_DECL_EGREP])
48426747b715Smrgm4_require([_LT_DECL_OBJDUMP])
48436747b715Smrgm4_require([_LT_DECL_DLLTOOL])
48446747b715SmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
48456747b715Smrglt_cv_sharedlib_from_linklib_cmd,
48466747b715Smrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
484705b261ecSmrg
48486747b715Smrgcase $host_os in
48496747b715Smrgcygwin* | mingw* | pw32* | cegcc*)
48506747b715Smrg  # two different shell functions defined in ltmain.sh
48516747b715Smrg  # decide which to use based on capabilities of $DLLTOOL
48526747b715Smrg  case `$DLLTOOL --help 2>&1` in
48536747b715Smrg  *--identify-strict*)
48546747b715Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
48556747b715Smrg    ;;
48566747b715Smrg  *)
48576747b715Smrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
48586747b715Smrg    ;;
48596747b715Smrg  esac
48606747b715Smrg  ;;
48616747b715Smrg*)
48626747b715Smrg  # fallback: assume linklib IS sharedlib
48636747b715Smrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
48646747b715Smrg  ;;
48656747b715Smrgesac
48666747b715Smrg])
48676747b715Smrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
48686747b715Smrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
486905b261ecSmrg
48706747b715Smrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
48716747b715Smrg    [Command to associate shared and link libraries])
48726747b715Smrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
48736747b715Smrg
48746747b715Smrg
48756747b715Smrg# _LT_PATH_MANIFEST_TOOL
48766747b715Smrg# ----------------------
48776747b715Smrg# locate the manifest tool
48786747b715Smrgm4_defun([_LT_PATH_MANIFEST_TOOL],
48796747b715Smrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
48806747b715Smrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
48816747b715SmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
48826747b715Smrg  [lt_cv_path_mainfest_tool=no
48836747b715Smrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
48846747b715Smrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
48856747b715Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
48866747b715Smrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
48876747b715Smrg    lt_cv_path_mainfest_tool=yes
48884642e01fSmrg  fi
48896747b715Smrg  rm -f conftest*])
48906747b715Smrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
48916747b715Smrg  MANIFEST_TOOL=:
48926747b715Smrgfi
48936747b715Smrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
48946747b715Smrg])# _LT_PATH_MANIFEST_TOOL
48956747b715Smrg
48966747b715Smrg
48976747b715Smrg# LT_LIB_M
48986747b715Smrg# --------
48996747b715Smrg# check for math library
49006747b715SmrgAC_DEFUN([LT_LIB_M],
49016747b715Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
49026747b715SmrgLIBM=
49036747b715Smrgcase $host in
49046747b715Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
49056747b715Smrg  # These system don't have libm, or don't need it
49066747b715Smrg  ;;
49076747b715Smrg*-ncr-sysv4.3*)
49086747b715Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
49096747b715Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
49106747b715Smrg  ;;
49116747b715Smrg*)
49126747b715Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
49134642e01fSmrg  ;;
49144642e01fSmrgesac
49156747b715SmrgAC_SUBST([LIBM])
49166747b715Smrg])# LT_LIB_M
491705b261ecSmrg
49186747b715Smrg# Old name:
49196747b715SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
49206747b715Smrgdnl aclocal-1.4 backwards compatibility:
49216747b715Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
49224642e01fSmrg
49234642e01fSmrg
49246747b715Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
49256747b715Smrg# -------------------------------
49266747b715Smrgm4_defun([_LT_COMPILER_NO_RTTI],
49276747b715Smrg[m4_require([_LT_TAG_COMPILER])dnl
492805b261ecSmrg
49296747b715Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
49306747b715Smrg
49316747b715Smrgif test "$GCC" = yes; then
49326747b715Smrg  case $cc_basename in
49336747b715Smrg  nvcc*)
49346747b715Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
49356747b715Smrg  *)
49366747b715Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
49376747b715Smrg  esac
49386747b715Smrg
49396747b715Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
49406747b715Smrg    lt_cv_prog_compiler_rtti_exceptions,
49416747b715Smrg    [-fno-rtti -fno-exceptions], [],
49426747b715Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
49436747b715Smrgfi
49446747b715Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
49456747b715Smrg	[Compiler flag to turn off builtin functions])
49466747b715Smrg])# _LT_COMPILER_NO_RTTI
49476747b715Smrg
49486747b715Smrg
49496747b715Smrg# _LT_CMD_GLOBAL_SYMBOLS
49506747b715Smrg# ----------------------
49516747b715Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
49526747b715Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
49536747b715SmrgAC_REQUIRE([AC_PROG_CC])dnl
49546747b715SmrgAC_REQUIRE([AC_PROG_AWK])dnl
49556747b715SmrgAC_REQUIRE([LT_PATH_NM])dnl
49566747b715SmrgAC_REQUIRE([LT_PATH_LD])dnl
49576747b715Smrgm4_require([_LT_DECL_SED])dnl
49586747b715Smrgm4_require([_LT_DECL_EGREP])dnl
49596747b715Smrgm4_require([_LT_TAG_COMPILER])dnl
49606747b715Smrg
49616747b715Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
49626747b715SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
49636747b715SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
49646747b715Smrg[
49656747b715Smrg# These are sane defaults that work on at least a few old systems.
49666747b715Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
49676747b715Smrg
49686747b715Smrg# Character class describing NM global symbol codes.
49696747b715Smrgsymcode='[[BCDEGRST]]'
49706747b715Smrg
49716747b715Smrg# Regexp to match symbols that can be accessed directly from C.
49726747b715Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
49736747b715Smrg
49746747b715Smrg# Define system-specific variables.
49756747b715Smrgcase $host_os in
49766747b715Smrgaix*)
49776747b715Smrg  symcode='[[BCDT]]'
49786747b715Smrg  ;;
49796747b715Smrgcygwin* | mingw* | pw32* | cegcc*)
49806747b715Smrg  symcode='[[ABCDGISTW]]'
49816747b715Smrg  ;;
49826747b715Smrghpux*)
49836747b715Smrg  if test "$host_cpu" = ia64; then
49846747b715Smrg    symcode='[[ABCDEGRST]]'
49856747b715Smrg  fi
49866747b715Smrg  ;;
49876747b715Smrgirix* | nonstopux*)
49886747b715Smrg  symcode='[[BCDEGRST]]'
49896747b715Smrg  ;;
49906747b715Smrgosf*)
49916747b715Smrg  symcode='[[BCDEGQRST]]'
49926747b715Smrg  ;;
49936747b715Smrgsolaris*)
49946747b715Smrg  symcode='[[BDRT]]'
49956747b715Smrg  ;;
49966747b715Smrgsco3.2v5*)
49976747b715Smrg  symcode='[[DT]]'
49986747b715Smrg  ;;
49996747b715Smrgsysv4.2uw2*)
50006747b715Smrg  symcode='[[DT]]'
50016747b715Smrg  ;;
50026747b715Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
50036747b715Smrg  symcode='[[ABDT]]'
50046747b715Smrg  ;;
50056747b715Smrgsysv4)
50066747b715Smrg  symcode='[[DFNSTU]]'
50076747b715Smrg  ;;
50086747b715Smrgesac
500905b261ecSmrg
50106747b715Smrg# If we're using GNU nm, then use its standard symbol codes.
50116747b715Smrgcase `$NM -V 2>&1` in
50126747b715Smrg*GNU* | *'with BFD'*)
50136747b715Smrg  symcode='[[ABCDGIRSTW]]' ;;
50146747b715Smrgesac
501505b261ecSmrg
50166747b715Smrg# Transform an extracted symbol line into a proper C declaration.
50176747b715Smrg# Some systems (esp. on ia64) link data and code symbols differently,
50186747b715Smrg# so use this general approach.
50196747b715Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
502005b261ecSmrg
50216747b715Smrg# Transform an extracted symbol line into symbol name and symbol address
50226747b715Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
50236747b715Smrglt_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'"
502405b261ecSmrg
50256747b715Smrg# Handle CRLF in mingw tool chain
50266747b715Smrgopt_cr=
50276747b715Smrgcase $build_os in
50286747b715Smrgmingw*)
50296747b715Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
50306747b715Smrg  ;;
50316747b715Smrgesac
503205b261ecSmrg
50336747b715Smrg# Try without a prefix underscore, then with it.
50346747b715Smrgfor ac_symprfx in "" "_"; do
503505b261ecSmrg
50366747b715Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
50376747b715Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
50384642e01fSmrg
50396747b715Smrg  # Write the raw and C identifiers.
50406747b715Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
50416747b715Smrg    # Fake it for dumpbin and say T for any non-static function
50426747b715Smrg    # and D for any global variable.
50436747b715Smrg    # Also find C++ and __fastcall symbols from MSVC++,
50446747b715Smrg    # which start with @ or ?.
50456747b715Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
50466747b715Smrg"     {last_section=section; section=\$ 3};"\
50476747b715Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
50486747b715Smrg"     \$ 0!~/External *\|/{next};"\
50496747b715Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
50506747b715Smrg"     {if(hide[section]) next};"\
50516747b715Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
50526747b715Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
50536747b715Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
50546747b715Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
50556747b715Smrg"     ' prfx=^$ac_symprfx]"
50566747b715Smrg  else
50576747b715Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
50586747b715Smrg  fi
50596747b715Smrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
50604642e01fSmrg
50616747b715Smrg  # Check to see that the pipe works correctly.
50626747b715Smrg  pipe_works=no
50634642e01fSmrg
50646747b715Smrg  rm -f conftest*
50656747b715Smrg  cat > conftest.$ac_ext <<_LT_EOF
50666747b715Smrg#ifdef __cplusplus
50676747b715Smrgextern "C" {
50686747b715Smrg#endif
50696747b715Smrgchar nm_test_var;
50706747b715Smrgvoid nm_test_func(void);
50716747b715Smrgvoid nm_test_func(void){}
50726747b715Smrg#ifdef __cplusplus
50736747b715Smrg}
50746747b715Smrg#endif
50756747b715Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
50766747b715Smrg_LT_EOF
507705b261ecSmrg
50786747b715Smrg  if AC_TRY_EVAL(ac_compile); then
50796747b715Smrg    # Now try to grab the symbols.
50806747b715Smrg    nlist=conftest.nm
50816747b715Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
50826747b715Smrg      # Try sorting and uniquifying the output.
50836747b715Smrg      if sort "$nlist" | uniq > "$nlist"T; then
50846747b715Smrg	mv -f "$nlist"T "$nlist"
50856747b715Smrg      else
50866747b715Smrg	rm -f "$nlist"T
50876747b715Smrg      fi
508805b261ecSmrg
50896747b715Smrg      # Make sure that we snagged all the symbols we need.
50906747b715Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
50916747b715Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
50926747b715Smrg	  cat <<_LT_EOF > conftest.$ac_ext
50936747b715Smrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
50946747b715Smrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
50956747b715Smrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
50966747b715Smrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
50976747b715Smrg# define LT@&t@_DLSYM_CONST
50986747b715Smrg#elif defined(__osf__)
50996747b715Smrg/* This system does not cope well with relocations in const data.  */
51006747b715Smrg# define LT@&t@_DLSYM_CONST
51016747b715Smrg#else
51026747b715Smrg# define LT@&t@_DLSYM_CONST const
51036747b715Smrg#endif
510405b261ecSmrg
51056747b715Smrg#ifdef __cplusplus
51066747b715Smrgextern "C" {
51076747b715Smrg#endif
510805b261ecSmrg
51096747b715Smrg_LT_EOF
51106747b715Smrg	  # Now generate the symbol file.
51116747b715Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
511205b261ecSmrg
51136747b715Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
511405b261ecSmrg
51156747b715Smrg/* The mapping between symbol names and symbols.  */
51166747b715SmrgLT@&t@_DLSYM_CONST struct {
51176747b715Smrg  const char *name;
51186747b715Smrg  void       *address;
51196747b715Smrg}
51206747b715Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
51216747b715Smrg{
51226747b715Smrg  { "@PROGRAM@", (void *) 0 },
51236747b715Smrg_LT_EOF
51246747b715Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
51256747b715Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
51266747b715Smrg  {0, (void *) 0}
51276747b715Smrg};
512805b261ecSmrg
51296747b715Smrg/* This works around a problem in FreeBSD linker */
51306747b715Smrg#ifdef FREEBSD_WORKAROUND
51316747b715Smrgstatic const void *lt_preloaded_setup() {
51326747b715Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
51336747b715Smrg}
51346747b715Smrg#endif
513505b261ecSmrg
51366747b715Smrg#ifdef __cplusplus
51376747b715Smrg}
51386747b715Smrg#endif
51396747b715Smrg_LT_EOF
51406747b715Smrg	  # Now try linking the two files.
51416747b715Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
51426747b715Smrg	  lt_globsym_save_LIBS=$LIBS
51436747b715Smrg	  lt_globsym_save_CFLAGS=$CFLAGS
51446747b715Smrg	  LIBS="conftstm.$ac_objext"
51456747b715Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
51466747b715Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
51476747b715Smrg	    pipe_works=yes
51486747b715Smrg	  fi
51496747b715Smrg	  LIBS=$lt_globsym_save_LIBS
51506747b715Smrg	  CFLAGS=$lt_globsym_save_CFLAGS
51516747b715Smrg	else
51526747b715Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
51536747b715Smrg	fi
51546747b715Smrg      else
51556747b715Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
51566747b715Smrg      fi
51576747b715Smrg    else
51586747b715Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
51596747b715Smrg    fi
51606747b715Smrg  else
51616747b715Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
51626747b715Smrg    cat conftest.$ac_ext >&5
51636747b715Smrg  fi
51646747b715Smrg  rm -rf conftest* conftst*
51654642e01fSmrg
51666747b715Smrg  # Do not use the global_symbol_pipe unless it works.
51676747b715Smrg  if test "$pipe_works" = yes; then
51686747b715Smrg    break
51696747b715Smrg  else
51706747b715Smrg    lt_cv_sys_global_symbol_pipe=
51716747b715Smrg  fi
51726747b715Smrgdone
51736747b715Smrg])
51746747b715Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
51756747b715Smrg  lt_cv_sys_global_symbol_to_cdecl=
51766747b715Smrgfi
51776747b715Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
51786747b715Smrg  AC_MSG_RESULT(failed)
51796747b715Smrgelse
51806747b715Smrg  AC_MSG_RESULT(ok)
51816747b715Smrgfi
518205b261ecSmrg
51836747b715Smrg# Response file support.
51846747b715Smrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
51856747b715Smrg  nm_file_list_spec='@'
51866747b715Smrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
51876747b715Smrg  nm_file_list_spec='@'
51886747b715Smrgfi
518905b261ecSmrg
51906747b715Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
51916747b715Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
51926747b715Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
51936747b715Smrg    [Transform the output of nm in a proper C declaration])
51946747b715Smrg_LT_DECL([global_symbol_to_c_name_address],
51956747b715Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
51966747b715Smrg    [Transform the output of nm in a C name address pair])
51976747b715Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
51986747b715Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
51996747b715Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
52006747b715Smrg_LT_DECL([], [nm_file_list_spec], [1],
52016747b715Smrg    [Specify filename containing input files for $NM])
52026747b715Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
52034642e01fSmrg
52044642e01fSmrg
52056747b715Smrg# _LT_COMPILER_PIC([TAGNAME])
52066747b715Smrg# ---------------------------
52076747b715Smrgm4_defun([_LT_COMPILER_PIC],
52086747b715Smrg[m4_require([_LT_TAG_COMPILER])dnl
52096747b715Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
52106747b715Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
52116747b715Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
52124642e01fSmrg
52136747b715Smrgm4_if([$1], [CXX], [
52146747b715Smrg  # C++ specific cases for pic, static, wl, etc.
52156747b715Smrg  if test "$GXX" = yes; then
52166747b715Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
52176747b715Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
52184642e01fSmrg
52196747b715Smrg    case $host_os in
52206747b715Smrg    aix*)
52216747b715Smrg      # All AIX code is PIC.
52226747b715Smrg      if test "$host_cpu" = ia64; then
52236747b715Smrg	# AIX 5 now supports IA64 processor
52246747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52256747b715Smrg      fi
52266747b715Smrg      ;;
52274642e01fSmrg
52286747b715Smrg    amigaos*)
52296747b715Smrg      case $host_cpu in
52306747b715Smrg      powerpc)
52316747b715Smrg            # see comment about AmigaOS4 .so support
52326747b715Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
52336747b715Smrg        ;;
52346747b715Smrg      m68k)
52356747b715Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
52366747b715Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
52376747b715Smrg            # like `-m68040'.
52386747b715Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
52396747b715Smrg        ;;
52406747b715Smrg      esac
52416747b715Smrg      ;;
52426747b715Smrg
52436747b715Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
52446747b715Smrg      # PIC is the default for these OSes.
52456747b715Smrg      ;;
52466747b715Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
52476747b715Smrg      # This hack is so that the source file can tell whether it is being
52486747b715Smrg      # built for inclusion in a dll (and should export symbols for example).
52496747b715Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
52506747b715Smrg      # (--disable-auto-import) libraries
52516747b715Smrg      m4_if([$1], [GCJ], [],
52526747b715Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
52536747b715Smrg      ;;
52546747b715Smrg    darwin* | rhapsody*)
52556747b715Smrg      # PIC is the default on this platform
52566747b715Smrg      # Common symbols not allowed in MH_DYLIB files
52576747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
52586747b715Smrg      ;;
52596747b715Smrg    *djgpp*)
52606747b715Smrg      # DJGPP does not support shared libraries at all
52616747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
52626747b715Smrg      ;;
52636747b715Smrg    haiku*)
52646747b715Smrg      # PIC is the default for Haiku.
52656747b715Smrg      # The "-static" flag exists, but is broken.
52666747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
52676747b715Smrg      ;;
52686747b715Smrg    interix[[3-9]]*)
52696747b715Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
52706747b715Smrg      # Instead, we relocate shared libraries at runtime.
52716747b715Smrg      ;;
52726747b715Smrg    sysv4*MP*)
52736747b715Smrg      if test -d /usr/nec; then
52746747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
52756747b715Smrg      fi
52766747b715Smrg      ;;
52776747b715Smrg    hpux*)
52786747b715Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
52796747b715Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
52806747b715Smrg      # sets the default TLS model and affects inlining.
52816747b715Smrg      case $host_cpu in
52826747b715Smrg      hppa*64*)
52836747b715Smrg	;;
52846747b715Smrg      *)
52856747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
52866747b715Smrg	;;
52876747b715Smrg      esac
52886747b715Smrg      ;;
52896747b715Smrg    *qnx* | *nto*)
52906747b715Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
52916747b715Smrg      # it will coredump.
52926747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
52936747b715Smrg      ;;
52946747b715Smrg    *)
52956747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
52966747b715Smrg      ;;
52976747b715Smrg    esac
52984642e01fSmrg  else
52996747b715Smrg    case $host_os in
53006747b715Smrg      aix[[4-9]]*)
53016747b715Smrg	# All AIX code is PIC.
53026747b715Smrg	if test "$host_cpu" = ia64; then
53036747b715Smrg	  # AIX 5 now supports IA64 processor
53046747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53056747b715Smrg	else
53066747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
53076747b715Smrg	fi
53086747b715Smrg	;;
53096747b715Smrg      chorus*)
53106747b715Smrg	case $cc_basename in
53116747b715Smrg	cxch68*)
53126747b715Smrg	  # Green Hills C++ Compiler
53136747b715Smrg	  # _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"
53146747b715Smrg	  ;;
53156747b715Smrg	esac
53166747b715Smrg	;;
53176747b715Smrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
53186747b715Smrg	# This hack is so that the source file can tell whether it is being
53196747b715Smrg	# built for inclusion in a dll (and should export symbols for example).
53206747b715Smrg	m4_if([$1], [GCJ], [],
53216747b715Smrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
53226747b715Smrg	;;
53236747b715Smrg      dgux*)
53246747b715Smrg	case $cc_basename in
53256747b715Smrg	  ec++*)
53266747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
53276747b715Smrg	    ;;
53286747b715Smrg	  ghcx*)
53296747b715Smrg	    # Green Hills C++ Compiler
53306747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
53316747b715Smrg	    ;;
53326747b715Smrg	  *)
53336747b715Smrg	    ;;
53346747b715Smrg	esac
53356747b715Smrg	;;
53366747b715Smrg      freebsd* | dragonfly*)
53376747b715Smrg	# FreeBSD uses GNU C++
53386747b715Smrg	;;
53396747b715Smrg      hpux9* | hpux10* | hpux11*)
53406747b715Smrg	case $cc_basename in
53416747b715Smrg	  CC*)
53426747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53436747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
53446747b715Smrg	    if test "$host_cpu" != ia64; then
53456747b715Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
53466747b715Smrg	    fi
53476747b715Smrg	    ;;
53486747b715Smrg	  aCC*)
53496747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53506747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
53516747b715Smrg	    case $host_cpu in
53526747b715Smrg	    hppa*64*|ia64*)
53536747b715Smrg	      # +Z the default
53546747b715Smrg	      ;;
53556747b715Smrg	    *)
53566747b715Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
53576747b715Smrg	      ;;
53586747b715Smrg	    esac
53596747b715Smrg	    ;;
53606747b715Smrg	  *)
53616747b715Smrg	    ;;
53626747b715Smrg	esac
53636747b715Smrg	;;
53646747b715Smrg      interix*)
53656747b715Smrg	# This is c89, which is MS Visual C++ (no shared libs)
53666747b715Smrg	# Anyone wants to do a port?
53676747b715Smrg	;;
53686747b715Smrg      irix5* | irix6* | nonstopux*)
53696747b715Smrg	case $cc_basename in
53706747b715Smrg	  CC*)
53716747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53726747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
53736747b715Smrg	    # CC pic flag -KPIC is the default.
53746747b715Smrg	    ;;
53756747b715Smrg	  *)
53766747b715Smrg	    ;;
53776747b715Smrg	esac
53786747b715Smrg	;;
53796747b715Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
53806747b715Smrg	case $cc_basename in
53816747b715Smrg	  KCC*)
53826747b715Smrg	    # KAI C++ Compiler
53836747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
53846747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53856747b715Smrg	    ;;
53866747b715Smrg	  ecpc* )
53876747b715Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
53886747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53896747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
53906747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
53916747b715Smrg	    ;;
53926747b715Smrg	  icpc* )
53936747b715Smrg	    # Intel C++, used to be incompatible with GCC.
53946747b715Smrg	    # ICC 10 doesn't accept -KPIC any more.
53956747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53966747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
53976747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
53986747b715Smrg	    ;;
53996747b715Smrg	  pgCC* | pgcpp*)
54006747b715Smrg	    # Portland Group C++ compiler
54016747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54026747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
54036747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54046747b715Smrg	    ;;
54056747b715Smrg	  cxx*)
54066747b715Smrg	    # Compaq C++
54076747b715Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
54086747b715Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
54096747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
54106747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54116747b715Smrg	    ;;
54126747b715Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
54136747b715Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
54146747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54156747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
54166747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
54176747b715Smrg	    ;;
54186747b715Smrg	  *)
54196747b715Smrg	    case `$CC -V 2>&1 | sed 5q` in
54206747b715Smrg	    *Sun\ C*)
54216747b715Smrg	      # Sun C++ 5.9
54226747b715Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54236747b715Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54246747b715Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
54256747b715Smrg	      ;;
54266747b715Smrg	    esac
54276747b715Smrg	    ;;
54286747b715Smrg	esac
54296747b715Smrg	;;
54306747b715Smrg      lynxos*)
54316747b715Smrg	;;
54326747b715Smrg      m88k*)
54336747b715Smrg	;;
54346747b715Smrg      mvs*)
54356747b715Smrg	case $cc_basename in
54366747b715Smrg	  cxx*)
54376747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
54386747b715Smrg	    ;;
54396747b715Smrg	  *)
54406747b715Smrg	    ;;
54416747b715Smrg	esac
54426747b715Smrg	;;
54436747b715Smrg      netbsd*)
54446747b715Smrg	;;
54456747b715Smrg      *qnx* | *nto*)
54466747b715Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
54476747b715Smrg        # it will coredump.
54486747b715Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
54496747b715Smrg        ;;
54506747b715Smrg      osf3* | osf4* | osf5*)
54516747b715Smrg	case $cc_basename in
54526747b715Smrg	  KCC*)
54536747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
54546747b715Smrg	    ;;
54556747b715Smrg	  RCC*)
54566747b715Smrg	    # Rational C++ 2.4.1
54576747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
54586747b715Smrg	    ;;
54596747b715Smrg	  cxx*)
54606747b715Smrg	    # Digital/Compaq C++
54616747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54626747b715Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
54636747b715Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
54646747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
54656747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54666747b715Smrg	    ;;
54676747b715Smrg	  *)
54686747b715Smrg	    ;;
54696747b715Smrg	esac
54706747b715Smrg	;;
54716747b715Smrg      psos*)
54726747b715Smrg	;;
54736747b715Smrg      solaris*)
54746747b715Smrg	case $cc_basename in
54756747b715Smrg	  CC* | sunCC*)
54766747b715Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
54776747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54786747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54796747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
54806747b715Smrg	    ;;
54816747b715Smrg	  gcx*)
54826747b715Smrg	    # Green Hills C++ Compiler
54836747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
54846747b715Smrg	    ;;
54856747b715Smrg	  *)
54866747b715Smrg	    ;;
54876747b715Smrg	esac
54886747b715Smrg	;;
54896747b715Smrg      sunos4*)
54906747b715Smrg	case $cc_basename in
54916747b715Smrg	  CC*)
54926747b715Smrg	    # Sun C++ 4.x
54936747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
54946747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54956747b715Smrg	    ;;
54966747b715Smrg	  lcc*)
54976747b715Smrg	    # Lucid
54986747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
54996747b715Smrg	    ;;
55006747b715Smrg	  *)
55016747b715Smrg	    ;;
55026747b715Smrg	esac
55036747b715Smrg	;;
55046747b715Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
55056747b715Smrg	case $cc_basename in
55066747b715Smrg	  CC*)
55076747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55086747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55096747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55106747b715Smrg	    ;;
55116747b715Smrg	esac
55126747b715Smrg	;;
55136747b715Smrg      tandem*)
55146747b715Smrg	case $cc_basename in
55156747b715Smrg	  NCC*)
55166747b715Smrg	    # NonStop-UX NCC 3.20
55176747b715Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55186747b715Smrg	    ;;
55196747b715Smrg	  *)
55206747b715Smrg	    ;;
55216747b715Smrg	esac
55226747b715Smrg	;;
55236747b715Smrg      vxworks*)
55246747b715Smrg	;;
55256747b715Smrg      *)
55266747b715Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
55276747b715Smrg	;;
55286747b715Smrg    esac
55294642e01fSmrg  fi
55306747b715Smrg],
55316747b715Smrg[
55326747b715Smrg  if test "$GCC" = yes; then
55336747b715Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55346747b715Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
553505b261ecSmrg
55366747b715Smrg    case $host_os in
55376747b715Smrg      aix*)
55386747b715Smrg      # All AIX code is PIC.
55396747b715Smrg      if test "$host_cpu" = ia64; then
55406747b715Smrg	# AIX 5 now supports IA64 processor
55416747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55426747b715Smrg      fi
55436747b715Smrg      ;;
554405b261ecSmrg
55456747b715Smrg    amigaos*)
55466747b715Smrg      case $host_cpu in
55476747b715Smrg      powerpc)
55486747b715Smrg            # see comment about AmigaOS4 .so support
55496747b715Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
55506747b715Smrg        ;;
55516747b715Smrg      m68k)
55526747b715Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
55536747b715Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
55546747b715Smrg            # like `-m68040'.
55556747b715Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
55566747b715Smrg        ;;
55576747b715Smrg      esac
55586747b715Smrg      ;;
555905b261ecSmrg
55606747b715Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
55616747b715Smrg      # PIC is the default for these OSes.
55626747b715Smrg      ;;
55634642e01fSmrg
55646747b715Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
55656747b715Smrg      # This hack is so that the source file can tell whether it is being
55666747b715Smrg      # built for inclusion in a dll (and should export symbols for example).
55676747b715Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
55686747b715Smrg      # (--disable-auto-import) libraries
55696747b715Smrg      m4_if([$1], [GCJ], [],
55706747b715Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
55716747b715Smrg      ;;
557205b261ecSmrg
55736747b715Smrg    darwin* | rhapsody*)
55746747b715Smrg      # PIC is the default on this platform
55756747b715Smrg      # Common symbols not allowed in MH_DYLIB files
55766747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
55776747b715Smrg      ;;
557805b261ecSmrg
55796747b715Smrg    haiku*)
55806747b715Smrg      # PIC is the default for Haiku.
55816747b715Smrg      # The "-static" flag exists, but is broken.
55826747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
55836747b715Smrg      ;;
558405b261ecSmrg
55856747b715Smrg    hpux*)
55866747b715Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
55876747b715Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
55886747b715Smrg      # sets the default TLS model and affects inlining.
55896747b715Smrg      case $host_cpu in
55906747b715Smrg      hppa*64*)
55916747b715Smrg	# +Z the default
55926747b715Smrg	;;
55936747b715Smrg      *)
55946747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
55956747b715Smrg	;;
55966747b715Smrg      esac
55976747b715Smrg      ;;
55984642e01fSmrg
55996747b715Smrg    interix[[3-9]]*)
56006747b715Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
56016747b715Smrg      # Instead, we relocate shared libraries at runtime.
56026747b715Smrg      ;;
560305b261ecSmrg
56046747b715Smrg    msdosdjgpp*)
56056747b715Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
56066747b715Smrg      # on systems that don't support them.
56076747b715Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
56086747b715Smrg      enable_shared=no
56096747b715Smrg      ;;
561005b261ecSmrg
56116747b715Smrg    *nto* | *qnx*)
56126747b715Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
56136747b715Smrg      # it will coredump.
56146747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
56156747b715Smrg      ;;
56164642e01fSmrg
56176747b715Smrg    sysv4*MP*)
56186747b715Smrg      if test -d /usr/nec; then
56196747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
56206747b715Smrg      fi
56216747b715Smrg      ;;
56224642e01fSmrg
56236747b715Smrg    *)
56246747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
56256747b715Smrg      ;;
56266747b715Smrg    esac
562705b261ecSmrg
56286747b715Smrg    case $cc_basename in
56296747b715Smrg    nvcc*) # Cuda Compiler Driver 2.2
56306747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
56316747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
56326747b715Smrg      ;;
56336747b715Smrg    esac
56346747b715Smrg  else
56356747b715Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
56366747b715Smrg    case $host_os in
56376747b715Smrg    aix*)
56386747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56396747b715Smrg      if test "$host_cpu" = ia64; then
56406747b715Smrg	# AIX 5 now supports IA64 processor
56416747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
56426747b715Smrg      else
56436747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
56446747b715Smrg      fi
56456747b715Smrg      ;;
56464642e01fSmrg
56476747b715Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
56486747b715Smrg      # This hack is so that the source file can tell whether it is being
56496747b715Smrg      # built for inclusion in a dll (and should export symbols for example).
56506747b715Smrg      m4_if([$1], [GCJ], [],
56516747b715Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
56526747b715Smrg      ;;
565305b261ecSmrg
56546747b715Smrg    hpux9* | hpux10* | hpux11*)
56556747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56566747b715Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
56576747b715Smrg      # not for PA HP-UX.
56586747b715Smrg      case $host_cpu in
56596747b715Smrg      hppa*64*|ia64*)
56606747b715Smrg	# +Z the default
56614642e01fSmrg	;;
56626747b715Smrg      *)
56636747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
56646747b715Smrg	;;
56656747b715Smrg      esac
56666747b715Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
56676747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
56686747b715Smrg      ;;
566905b261ecSmrg
56706747b715Smrg    irix5* | irix6* | nonstopux*)
56716747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56726747b715Smrg      # PIC (with -KPIC) is the default.
56736747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
56746747b715Smrg      ;;
567505b261ecSmrg
56766747b715Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
56776747b715Smrg      case $cc_basename in
56786747b715Smrg      # old Intel for x86_64 which still supported -KPIC.
56796747b715Smrg      ecc*)
56806747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56816747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
56826747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
56834642e01fSmrg        ;;
56846747b715Smrg      # icc used to be incompatible with GCC.
56856747b715Smrg      # ICC 10 doesn't accept -KPIC any more.
56866747b715Smrg      icc* | ifort*)
56876747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56886747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
56896747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
56906747b715Smrg        ;;
56916747b715Smrg      # Lahey Fortran 8.1.
56926747b715Smrg      lf95*)
56936747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
56946747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
56956747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
56964642e01fSmrg	;;
56976747b715Smrg      nagfor*)
56986747b715Smrg	# NAG Fortran compiler
56996747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
57006747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
57016747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57026747b715Smrg	;;
57036747b715Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
57046747b715Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
57056747b715Smrg	# which looks to be a dead project)
57066747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57076747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
57086747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57094642e01fSmrg        ;;
57106747b715Smrg      ccc*)
57116747b715Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57126747b715Smrg        # All Alpha code is PIC.
57136747b715Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
57146747b715Smrg        ;;
57156747b715Smrg      xl* | bgxl* | bgf* | mpixl*)
57166747b715Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
57176747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57186747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
57196747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
57206747b715Smrg	;;
57216747b715Smrg      *)
57226747b715Smrg	case `$CC -V 2>&1 | sed 5q` in
57236747b715Smrg	*Sun\ F* | *Sun*Fortran*)
57246747b715Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
57256747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
57266747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57276747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
57286747b715Smrg	  ;;
57296747b715Smrg	*Sun\ C*)
57306747b715Smrg	  # Sun C 5.9
57316747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
57326747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57336747b715Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57346747b715Smrg	  ;;
57356747b715Smrg	esac
57366747b715Smrg	;;
57376747b715Smrg      esac
57386747b715Smrg      ;;
57396747b715Smrg
57406747b715Smrg    newsos6)
57416747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
57426747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57436747b715Smrg      ;;
57446747b715Smrg
57456747b715Smrg    *nto* | *qnx*)
57466747b715Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
57476747b715Smrg      # it will coredump.
57486747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
57496747b715Smrg      ;;
57506747b715Smrg
57516747b715Smrg    osf3* | osf4* | osf5*)
57526747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57536747b715Smrg      # All OSF/1 code is PIC.
57546747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
57556747b715Smrg      ;;
57566747b715Smrg
57576747b715Smrg    rdos*)
57586747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
57596747b715Smrg      ;;
57606747b715Smrg
57616747b715Smrg    solaris*)
57626747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
57636747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57646747b715Smrg      case $cc_basename in
57656747b715Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
57666747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
57676747b715Smrg      *)
57686747b715Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
57696747b715Smrg      esac
57706747b715Smrg      ;;
577105b261ecSmrg
57726747b715Smrg    sunos4*)
57736747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
57746747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
57756747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57766747b715Smrg      ;;
577705b261ecSmrg
57786747b715Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
57796747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57806747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
57816747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57826747b715Smrg      ;;
578305b261ecSmrg
57846747b715Smrg    sysv4*MP*)
57856747b715Smrg      if test -d /usr/nec ;then
57866747b715Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
57876747b715Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57886747b715Smrg      fi
57896747b715Smrg      ;;
579005b261ecSmrg
57916747b715Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
57926747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57936747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
57946747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
57956747b715Smrg      ;;
579605b261ecSmrg
57976747b715Smrg    unicos*)
57986747b715Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
57996747b715Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
58006747b715Smrg      ;;
58014642e01fSmrg
58026747b715Smrg    uts4*)
58036747b715Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
58046747b715Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
58056747b715Smrg      ;;
580605b261ecSmrg
58076747b715Smrg    *)
58086747b715Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
58096747b715Smrg      ;;
58106747b715Smrg    esac
58116747b715Smrg  fi
58126747b715Smrg])
58136747b715Smrgcase $host_os in
58146747b715Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
58156747b715Smrg  *djgpp*)
58166747b715Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
58176747b715Smrg    ;;
58186747b715Smrg  *)
58196747b715Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
58206747b715Smrg    ;;
58216747b715Smrgesac
58224642e01fSmrg
58236747b715SmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
58246747b715Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
58256747b715Smrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
58266747b715Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
58274642e01fSmrg
58286747b715Smrg#
58296747b715Smrg# Check to make sure the PIC flag actually works.
58306747b715Smrg#
58316747b715Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
58326747b715Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
58336747b715Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
58346747b715Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
58356747b715Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
58366747b715Smrg     "" | " "*) ;;
58376747b715Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
58386747b715Smrg     esac],
58396747b715Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
58406747b715Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
58416747b715Smrgfi
58426747b715Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
58436747b715Smrg	[Additional compiler flags for building library objects])
584405b261ecSmrg
58456747b715Smrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
58466747b715Smrg	[How to pass a linker flag through the compiler])
58476747b715Smrg#
58486747b715Smrg# Check to make sure the static flag actually works.
58496747b715Smrg#
58506747b715Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
58516747b715Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
58526747b715Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
58536747b715Smrg  $lt_tmp_static_flag,
58546747b715Smrg  [],
58556747b715Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
58566747b715Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
58576747b715Smrg	[Compiler flag to prevent dynamic linking])
58586747b715Smrg])# _LT_COMPILER_PIC
58594642e01fSmrg
586005b261ecSmrg
58616747b715Smrg# _LT_LINKER_SHLIBS([TAGNAME])
58626747b715Smrg# ----------------------------
58636747b715Smrg# See if the linker supports building shared libraries.
58646747b715Smrgm4_defun([_LT_LINKER_SHLIBS],
58656747b715Smrg[AC_REQUIRE([LT_PATH_LD])dnl
58666747b715SmrgAC_REQUIRE([LT_PATH_NM])dnl
58676747b715Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
58686747b715Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
58696747b715Smrgm4_require([_LT_DECL_EGREP])dnl
58706747b715Smrgm4_require([_LT_DECL_SED])dnl
58716747b715Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
58726747b715Smrgm4_require([_LT_TAG_COMPILER])dnl
58736747b715SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
58746747b715Smrgm4_if([$1], [CXX], [
58756747b715Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
58766747b715Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
58776747b715Smrg  case $host_os in
58786747b715Smrg  aix[[4-9]]*)
58796747b715Smrg    # If we're using GNU nm, then we don't want the "-C" option.
58806747b715Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
58816747b715Smrg    # Also, AIX nm treats weak defined symbols like other global defined
58826747b715Smrg    # symbols, whereas GNU nm marks them as "W".
58836747b715Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
58846747b715Smrg      _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'
58856747b715Smrg    else
58866747b715Smrg      _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'
58876747b715Smrg    fi
58886747b715Smrg    ;;
58896747b715Smrg  pw32*)
58906747b715Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
58916747b715Smrg    ;;
58926747b715Smrg  cygwin* | mingw* | cegcc*)
58936747b715Smrg    case $cc_basename in
58946747b715Smrg    cl*) ;;
58956747b715Smrg    *)
58966747b715Smrg      _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'
58976747b715Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
58986747b715Smrg      ;;
58996747b715Smrg    esac
59006747b715Smrg    ;;
59016747b715Smrg  *)
59026747b715Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
59036747b715Smrg    ;;
59046747b715Smrg  esac
59056747b715Smrg], [
59066747b715Smrg  runpath_var=
59076747b715Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
59086747b715Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
59096747b715Smrg  _LT_TAGVAR(archive_cmds, $1)=
59106747b715Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
59116747b715Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
59126747b715Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
59136747b715Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
59146747b715Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
59156747b715Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
59166747b715Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
59176747b715Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
59186747b715Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
59196747b715Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
59206747b715Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
59216747b715Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
59226747b715Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
59236747b715Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
59246747b715Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
59256747b715Smrg  _LT_TAGVAR(module_cmds, $1)=
59266747b715Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
59276747b715Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
59286747b715Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
59296747b715Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
59306747b715Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
59316747b715Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
59326747b715Smrg  # included in the symbol list
59336747b715Smrg  _LT_TAGVAR(include_expsyms, $1)=
59346747b715Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
59356747b715Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
59366747b715Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
59376747b715Smrg  # as well as any symbol that contains `d'.
59386747b715Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
59396747b715Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
59406747b715Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
59416747b715Smrg  # the symbol is explicitly referenced.  Since portable code cannot
59426747b715Smrg  # rely on this symbol name, it's probably fine to never include it in
59436747b715Smrg  # preloaded symbol tables.
59446747b715Smrg  # Exclude shared library initialization/finalization symbols.
59456747b715Smrgdnl Note also adjust exclude_expsyms for C++ above.
59466747b715Smrg  extract_expsyms_cmds=
59474642e01fSmrg
59486747b715Smrg  case $host_os in
59496747b715Smrg  cygwin* | mingw* | pw32* | cegcc*)
59506747b715Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
59516747b715Smrg    # When not using gcc, we currently assume that we are using
59526747b715Smrg    # Microsoft Visual C++.
59536747b715Smrg    if test "$GCC" != yes; then
59546747b715Smrg      with_gnu_ld=no
59556747b715Smrg    fi
59566747b715Smrg    ;;
59576747b715Smrg  interix*)
59586747b715Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
59596747b715Smrg    with_gnu_ld=yes
59606747b715Smrg    ;;
59616747b715Smrg  openbsd*)
59626747b715Smrg    with_gnu_ld=no
59636747b715Smrg    ;;
59646747b715Smrg  esac
59654642e01fSmrg
59666747b715Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
59674642e01fSmrg
59686747b715Smrg  # On some targets, GNU ld is compatible enough with the native linker
59696747b715Smrg  # that we're better off using the native interface for both.
59706747b715Smrg  lt_use_gnu_ld_interface=no
59716747b715Smrg  if test "$with_gnu_ld" = yes; then
59726747b715Smrg    case $host_os in
59736747b715Smrg      aix*)
59746747b715Smrg	# The AIX port of GNU ld has always aspired to compatibility
59756747b715Smrg	# with the native linker.  However, as the warning in the GNU ld
59766747b715Smrg	# block says, versions before 2.19.5* couldn't really create working
59776747b715Smrg	# shared libraries, regardless of the interface used.
59786747b715Smrg	case `$LD -v 2>&1` in
59796747b715Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
59806747b715Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
59816747b715Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
59826747b715Smrg	  *)
59836747b715Smrg	    lt_use_gnu_ld_interface=yes
59844642e01fSmrg	    ;;
59856747b715Smrg	esac
59866747b715Smrg	;;
59876747b715Smrg      *)
59886747b715Smrg	lt_use_gnu_ld_interface=yes
59896747b715Smrg	;;
59906747b715Smrg    esac
59916747b715Smrg  fi
599205b261ecSmrg
59936747b715Smrg  if test "$lt_use_gnu_ld_interface" = yes; then
59946747b715Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
59956747b715Smrg    wlarc='${wl}'
599605b261ecSmrg
59976747b715Smrg    # Set some defaults for GNU ld with shared library support. These
59986747b715Smrg    # are reset later if shared libraries are not supported. Putting them
59996747b715Smrg    # here allows them to be overridden if necessary.
60006747b715Smrg    runpath_var=LD_RUN_PATH
60016747b715Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
60026747b715Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
60036747b715Smrg    # ancient GNU ld didn't support --whole-archive et. al.
60046747b715Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
60056747b715Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
60066747b715Smrg    else
60076747b715Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
60086747b715Smrg    fi
60096747b715Smrg    supports_anon_versioning=no
60106747b715Smrg    case `$LD -v 2>&1` in
60116747b715Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
60126747b715Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
60136747b715Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
60146747b715Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
60156747b715Smrg      *\ 2.11.*) ;; # other 2.11 versions
60166747b715Smrg      *) supports_anon_versioning=yes ;;
60176747b715Smrg    esac
601805b261ecSmrg
60196747b715Smrg    # See if GNU ld supports shared libraries.
60206747b715Smrg    case $host_os in
60216747b715Smrg    aix[[3-9]]*)
60226747b715Smrg      # On AIX/PPC, the GNU linker is very broken
60236747b715Smrg      if test "$host_cpu" != ia64; then
60246747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
60256747b715Smrg	cat <<_LT_EOF 1>&2
60264642e01fSmrg
60276747b715Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
60286747b715Smrg*** to be unable to reliably create shared libraries on AIX.
60296747b715Smrg*** Therefore, libtool is disabling shared libraries support.  If you
60306747b715Smrg*** really care for shared libraries, you may want to install binutils
60316747b715Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
60326747b715Smrg*** You will then need to restart the configuration process.
60334642e01fSmrg
60346747b715Smrg_LT_EOF
60356747b715Smrg      fi
60366747b715Smrg      ;;
60376747b715Smrg
60386747b715Smrg    amigaos*)
60396747b715Smrg      case $host_cpu in
60406747b715Smrg      powerpc)
60416747b715Smrg            # see comment about AmigaOS4 .so support
60426747b715Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60436747b715Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
60446747b715Smrg        ;;
60456747b715Smrg      m68k)
60466747b715Smrg            _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)'
60476747b715Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60486747b715Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
60496747b715Smrg        ;;
60506747b715Smrg      esac
60516747b715Smrg      ;;
605205b261ecSmrg
60536747b715Smrg    beos*)
60546747b715Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
60556747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
60566747b715Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
60576747b715Smrg	# support --undefined.  This deserves some investigation.  FIXME
60586747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60596747b715Smrg      else
60604642e01fSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
60616747b715Smrg      fi
60626747b715Smrg      ;;
606305b261ecSmrg
60646747b715Smrg    cygwin* | mingw* | pw32* | cegcc*)
60656747b715Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
60666747b715Smrg      # as there is no search path for DLLs.
60676747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
60686747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
60696747b715Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
60706747b715Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
60716747b715Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
60726747b715Smrg      _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'
60736747b715Smrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
607405b261ecSmrg
60756747b715Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
60766747b715Smrg        _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'
60776747b715Smrg	# If the export-symbols file already is a .def file (1st line
60786747b715Smrg	# is EXPORTS), use it as is; otherwise, prepend...
60796747b715Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
60806747b715Smrg	  cp $export_symbols $output_objdir/$soname.def;
60816747b715Smrg	else
60826747b715Smrg	  echo EXPORTS > $output_objdir/$soname.def;
60836747b715Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
60846747b715Smrg	fi~
60856747b715Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
60866747b715Smrg      else
60876747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
60886747b715Smrg      fi
60896747b715Smrg      ;;
609005b261ecSmrg
60916747b715Smrg    haiku*)
60926747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
60936747b715Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
60946747b715Smrg      ;;
609505b261ecSmrg
60966747b715Smrg    interix[[3-9]]*)
60976747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
60986747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
60996747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
61006747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
61016747b715Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
61026747b715Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
61036747b715Smrg      # default) and relocated if they conflict, which is a slow very memory
61046747b715Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
61056747b715Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
61066747b715Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
61076747b715Smrg      _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'
61086747b715Smrg      _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'
61096747b715Smrg      ;;
611005b261ecSmrg
61116747b715Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
61126747b715Smrg      tmp_diet=no
61136747b715Smrg      if test "$host_os" = linux-dietlibc; then
61146747b715Smrg	case $cc_basename in
61156747b715Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
61166747b715Smrg	esac
61176747b715Smrg      fi
61186747b715Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
61196747b715Smrg	 && test "$tmp_diet" = no
61206747b715Smrg      then
61216747b715Smrg	tmp_addflag=' $pic_flag'
61226747b715Smrg	tmp_sharedflag='-shared'
61236747b715Smrg	case $cc_basename,$host_cpu in
61246747b715Smrg        pgcc*)				# Portland Group C compiler
61256747b715Smrg	  _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'
61266747b715Smrg	  tmp_addflag=' $pic_flag'
61276747b715Smrg	  ;;
61286747b715Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
61296747b715Smrg					# Portland Group f77 and f90 compilers
61306747b715Smrg	  _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'
61316747b715Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
61326747b715Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
61336747b715Smrg	  tmp_addflag=' -i_dynamic' ;;
61346747b715Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
61356747b715Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
61366747b715Smrg	ifc* | ifort*)			# Intel Fortran compiler
61376747b715Smrg	  tmp_addflag=' -nofor_main' ;;
61386747b715Smrg	lf95*)				# Lahey Fortran 8.1
61396747b715Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
61406747b715Smrg	  tmp_sharedflag='--shared' ;;
61416747b715Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
61426747b715Smrg	  tmp_sharedflag='-qmkshrobj'
61436747b715Smrg	  tmp_addflag= ;;
61446747b715Smrg	nvcc*)	# Cuda Compiler Driver 2.2
61456747b715Smrg	  _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'
61466747b715Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
61476747b715Smrg	  ;;
61486747b715Smrg	esac
61496747b715Smrg	case `$CC -V 2>&1 | sed 5q` in
61506747b715Smrg	*Sun\ C*)			# Sun C 5.9
61516747b715Smrg	  _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'
61526747b715Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
61536747b715Smrg	  tmp_sharedflag='-G' ;;
61546747b715Smrg	*Sun\ F*)			# Sun Fortran 8.3
61556747b715Smrg	  tmp_sharedflag='-G' ;;
61566747b715Smrg	esac
61576747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
615805b261ecSmrg
61596747b715Smrg        if test "x$supports_anon_versioning" = xyes; then
61606747b715Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
61616747b715Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
61626747b715Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
61636747b715Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
61646747b715Smrg        fi
616505b261ecSmrg
61666747b715Smrg	case $cc_basename in
61676747b715Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
61686747b715Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
61696747b715Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
61706747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
61716747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
61726747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
61736747b715Smrg	  if test "x$supports_anon_versioning" = xyes; then
61746747b715Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
61756747b715Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
61766747b715Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
61776747b715Smrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
61786747b715Smrg	  fi
61796747b715Smrg	  ;;
61806747b715Smrg	esac
61816747b715Smrg      else
61826747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
61836747b715Smrg      fi
61846747b715Smrg      ;;
61854642e01fSmrg
61866747b715Smrg    netbsd*)
61876747b715Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
61886747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
61896747b715Smrg	wlarc=
61906747b715Smrg      else
61916747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
61926747b715Smrg	_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'
61936747b715Smrg      fi
61946747b715Smrg      ;;
61954642e01fSmrg
61966747b715Smrg    solaris*)
61976747b715Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
61986747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
61996747b715Smrg	cat <<_LT_EOF 1>&2
62004642e01fSmrg
62016747b715Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
62026747b715Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
62036747b715Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
62046747b715Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
62056747b715Smrg*** your PATH or compiler configuration so that the native linker is
62066747b715Smrg*** used, and then restart.
620705b261ecSmrg
62086747b715Smrg_LT_EOF
62096747b715Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
62106747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
62116747b715Smrg	_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'
62126747b715Smrg      else
62136747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
62146747b715Smrg      fi
62156747b715Smrg      ;;
621605b261ecSmrg
62176747b715Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
62186747b715Smrg      case `$LD -v 2>&1` in
62196747b715Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
62206747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
62216747b715Smrg	cat <<_LT_EOF 1>&2
62224642e01fSmrg
62236747b715Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
62246747b715Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
62256747b715Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
62266747b715Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
62276747b715Smrg*** your PATH or compiler configuration so that the native linker is
62286747b715Smrg*** used, and then restart.
62294642e01fSmrg
62306747b715Smrg_LT_EOF
62316747b715Smrg	;;
62326747b715Smrg	*)
62336747b715Smrg	  # For security reasons, it is highly recommended that you always
62346747b715Smrg	  # use absolute paths for naming shared libraries, and exclude the
62356747b715Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
62366747b715Smrg	  # requires that you compile everything twice, which is a pain.
62376747b715Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
62386747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
62396747b715Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
62406747b715Smrg	    _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'
62416747b715Smrg	  else
62426747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
62436747b715Smrg	  fi
62446747b715Smrg	;;
62456747b715Smrg      esac
62466747b715Smrg      ;;
62474642e01fSmrg
62486747b715Smrg    sunos4*)
62496747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
62506747b715Smrg      wlarc=
62516747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
62526747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
62536747b715Smrg      ;;
625405b261ecSmrg
62556747b715Smrg    *)
62566747b715Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
62576747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
62586747b715Smrg	_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'
62596747b715Smrg      else
62606747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
62616747b715Smrg      fi
62626747b715Smrg      ;;
62636747b715Smrg    esac
626405b261ecSmrg
62656747b715Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
62666747b715Smrg      runpath_var=
62676747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
62686747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
62696747b715Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
62706747b715Smrg    fi
62716747b715Smrg  else
62726747b715Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
62736747b715Smrg    case $host_os in
62746747b715Smrg    aix3*)
62756747b715Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
62766747b715Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
62776747b715Smrg      _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'
62786747b715Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
62796747b715Smrg      # are no directories specified by -L.
62806747b715Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
62816747b715Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
62826747b715Smrg	# Neither direct hardcoding nor static linking is supported with a
62836747b715Smrg	# broken collect2.
62846747b715Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
62856747b715Smrg      fi
62866747b715Smrg      ;;
62874642e01fSmrg
62886747b715Smrg    aix[[4-9]]*)
62896747b715Smrg      if test "$host_cpu" = ia64; then
62906747b715Smrg	# On IA64, the linker does run time linking by default, so we don't
62916747b715Smrg	# have to do anything special.
62926747b715Smrg	aix_use_runtimelinking=no
62936747b715Smrg	exp_sym_flag='-Bexport'
62946747b715Smrg	no_entry_flag=""
62956747b715Smrg      else
62966747b715Smrg	# If we're using GNU nm, then we don't want the "-C" option.
62976747b715Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
62986747b715Smrg	# Also, AIX nm treats weak defined symbols like other global
62996747b715Smrg	# defined symbols, whereas GNU nm marks them as "W".
63006747b715Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
63016747b715Smrg	  _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'
63026747b715Smrg	else
63036747b715Smrg	  _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'
63046747b715Smrg	fi
63056747b715Smrg	aix_use_runtimelinking=no
63064642e01fSmrg
63076747b715Smrg	# Test if we are trying to use run time linking or normal
63086747b715Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
63096747b715Smrg	# need to do runtime linking.
63106747b715Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
63116747b715Smrg	  for ld_flag in $LDFLAGS; do
63126747b715Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
63136747b715Smrg	    aix_use_runtimelinking=yes
63146747b715Smrg	    break
63156747b715Smrg	  fi
63166747b715Smrg	  done
63176747b715Smrg	  ;;
63186747b715Smrg	esac
63194642e01fSmrg
63206747b715Smrg	exp_sym_flag='-bexport'
63216747b715Smrg	no_entry_flag='-bnoentry'
63226747b715Smrg      fi
63234642e01fSmrg
63246747b715Smrg      # When large executables or shared objects are built, AIX ld can
63256747b715Smrg      # have problems creating the table of contents.  If linking a library
63266747b715Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
63276747b715Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
63286747b715Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
63294642e01fSmrg
63306747b715Smrg      _LT_TAGVAR(archive_cmds, $1)=''
63316747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
63326747b715Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
63336747b715Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
63346747b715Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
63356747b715Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
63364642e01fSmrg
63376747b715Smrg      if test "$GCC" = yes; then
63386747b715Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
63396747b715Smrg	# We only want to do this on AIX 4.2 and lower, the check
63406747b715Smrg	# below for broken collect2 doesn't work under 4.3+
63416747b715Smrg	  collect2name=`${CC} -print-prog-name=collect2`
63426747b715Smrg	  if test -f "$collect2name" &&
63436747b715Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
63446747b715Smrg	  then
63456747b715Smrg	  # We have reworked collect2
63466747b715Smrg	  :
63476747b715Smrg	  else
63486747b715Smrg	  # We have old collect2
63496747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
63506747b715Smrg	  # It fails to find uninstalled libraries when the uninstalled
63516747b715Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
63526747b715Smrg	  # to unsupported forces relinking
63536747b715Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
63546747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
63556747b715Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
63566747b715Smrg	  fi
63576747b715Smrg	  ;;
63586747b715Smrg	esac
63596747b715Smrg	shared_flag='-shared'
63606747b715Smrg	if test "$aix_use_runtimelinking" = yes; then
63616747b715Smrg	  shared_flag="$shared_flag "'${wl}-G'
63626747b715Smrg	fi
63636747b715Smrg      else
63646747b715Smrg	# not using gcc
63656747b715Smrg	if test "$host_cpu" = ia64; then
63666747b715Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
63676747b715Smrg	# chokes on -Wl,-G. The following line is correct:
63686747b715Smrg	  shared_flag='-G'
63696747b715Smrg	else
63706747b715Smrg	  if test "$aix_use_runtimelinking" = yes; then
63716747b715Smrg	    shared_flag='${wl}-G'
63726747b715Smrg	  else
63736747b715Smrg	    shared_flag='${wl}-bM:SRE'
63746747b715Smrg	  fi
63756747b715Smrg	fi
63766747b715Smrg      fi
63774642e01fSmrg
63786747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
63796747b715Smrg      # It seems that -bexpall does not export symbols beginning with
63806747b715Smrg      # underscore (_), so it is better to generate a list of symbols to export.
63816747b715Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
63826747b715Smrg      if test "$aix_use_runtimelinking" = yes; then
63836747b715Smrg	# Warning - without using the other runtime loading flags (-brtl),
63846747b715Smrg	# -berok will link without error, but may produce a broken library.
63856747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
63866747b715Smrg        # Determine the default libpath from the value encoded in an
63876747b715Smrg        # empty executable.
63886747b715Smrg        _LT_SYS_MODULE_PATH_AIX([$1])
63896747b715Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
63906747b715Smrg        _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"
63916747b715Smrg      else
63926747b715Smrg	if test "$host_cpu" = ia64; then
63936747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
63946747b715Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
63956747b715Smrg	  _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"
63966747b715Smrg	else
63976747b715Smrg	 # Determine the default libpath from the value encoded in an
63986747b715Smrg	 # empty executable.
63996747b715Smrg	 _LT_SYS_MODULE_PATH_AIX([$1])
64006747b715Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
64016747b715Smrg	  # Warning - without using the other run time loading flags,
64026747b715Smrg	  # -berok will link without error, but may produce a broken library.
64036747b715Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
64046747b715Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
64056747b715Smrg	  if test "$with_gnu_ld" = yes; then
64066747b715Smrg	    # We only use this code for GNU lds that support --whole-archive.
64076747b715Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
64086747b715Smrg	  else
64096747b715Smrg	    # Exported symbols can be pulled into shared objects from archives
64106747b715Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
64116747b715Smrg	  fi
64126747b715Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
64136747b715Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
64146747b715Smrg	  _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'
64156747b715Smrg	fi
64166747b715Smrg      fi
64176747b715Smrg      ;;
64184642e01fSmrg
64196747b715Smrg    amigaos*)
64206747b715Smrg      case $host_cpu in
64216747b715Smrg      powerpc)
64226747b715Smrg            # see comment about AmigaOS4 .so support
64236747b715Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
64246747b715Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
64256747b715Smrg        ;;
64266747b715Smrg      m68k)
64276747b715Smrg            _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)'
64286747b715Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
64296747b715Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
64304642e01fSmrg        ;;
64316747b715Smrg      esac
64326747b715Smrg      ;;
64334642e01fSmrg
64346747b715Smrg    bsdi[[45]]*)
64356747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
64366747b715Smrg      ;;
64374642e01fSmrg
64386747b715Smrg    cygwin* | mingw* | pw32* | cegcc*)
64396747b715Smrg      # When not using gcc, we currently assume that we are using
64406747b715Smrg      # Microsoft Visual C++.
64416747b715Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
64426747b715Smrg      # no search path for DLLs.
64434642e01fSmrg      case $cc_basename in
64446747b715Smrg      cl*)
64456747b715Smrg	# Native MSVC
64466747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
64476747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
64486747b715Smrg	_LT_TAGVAR(always_export_symbols, $1)=yes
64496747b715Smrg	_LT_TAGVAR(file_list_spec, $1)='@'
64506747b715Smrg	# Tell ltmain to make .lib files, not .a files.
64516747b715Smrg	libext=lib
64526747b715Smrg	# Tell ltmain to make .dll files, not .so files.
64536747b715Smrg	shrext_cmds=".dll"
64546747b715Smrg	# FIXME: Setting linknames here is a bad hack.
64556747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
64566747b715Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
64576747b715Smrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
64586747b715Smrg	  else
64596747b715Smrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
64606747b715Smrg	  fi~
64616747b715Smrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
64626747b715Smrg	  linknames='
64636747b715Smrg	# The linker will not automatically build a static lib if we build a DLL.
64646747b715Smrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
64656747b715Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
64666747b715Smrg	_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'
64676747b715Smrg	# Don't use ranlib
64686747b715Smrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
64696747b715Smrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
64706747b715Smrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
64716747b715Smrg	  case $lt_outputfile in
64726747b715Smrg	    *.exe|*.EXE) ;;
64736747b715Smrg	    *)
64746747b715Smrg	      lt_outputfile="$lt_outputfile.exe"
64756747b715Smrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
64766747b715Smrg	      ;;
64776747b715Smrg	  esac~
64786747b715Smrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
64796747b715Smrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
64806747b715Smrg	    $RM "$lt_outputfile.manifest";
64816747b715Smrg	  fi'
64826747b715Smrg	;;
64836747b715Smrg      *)
64846747b715Smrg	# Assume MSVC wrapper
64856747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
64866747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
64876747b715Smrg	# Tell ltmain to make .lib files, not .a files.
64886747b715Smrg	libext=lib
64896747b715Smrg	# Tell ltmain to make .dll files, not .so files.
64906747b715Smrg	shrext_cmds=".dll"
64916747b715Smrg	# FIXME: Setting linknames here is a bad hack.
64926747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
64936747b715Smrg	# The linker will automatically build a .lib file if we build a DLL.
64946747b715Smrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
64956747b715Smrg	# FIXME: Should let the user specify the lib program.
64966747b715Smrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
64976747b715Smrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
64986747b715Smrg	;;
64994642e01fSmrg      esac
65004642e01fSmrg      ;;
65014642e01fSmrg
65026747b715Smrg    darwin* | rhapsody*)
65036747b715Smrg      _LT_DARWIN_LINKER_FEATURES($1)
65044642e01fSmrg      ;;
65054642e01fSmrg
65066747b715Smrg    dgux*)
65076747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
65086747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
65096747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65106747b715Smrg      ;;
65114642e01fSmrg
65126747b715Smrg    freebsd1*)
65136747b715Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
65146747b715Smrg      ;;
651505b261ecSmrg
65166747b715Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
65176747b715Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
65186747b715Smrg    # does not break anything, and helps significantly (at the cost of a little
65196747b715Smrg    # extra space).
65206747b715Smrg    freebsd2.2*)
65216747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
65226747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
65236747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65246747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65256747b715Smrg      ;;
65264642e01fSmrg
65276747b715Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
65286747b715Smrg    freebsd2*)
65296747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
65306747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65316747b715Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
65326747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65336747b715Smrg      ;;
65344642e01fSmrg
65356747b715Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
65366747b715Smrg    freebsd* | dragonfly*)
65376747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
65386747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
65396747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65406747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
65416747b715Smrg      ;;
65424642e01fSmrg
65436747b715Smrg    hpux9*)
65446747b715Smrg      if test "$GCC" = yes; then
65456747b715Smrg	_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'
65466747b715Smrg      else
65476747b715Smrg	_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'
65486747b715Smrg      fi
65496747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
65506747b715Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
65516747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
65524642e01fSmrg
65536747b715Smrg      # hardcode_minus_L: Not really in the search PATH,
65546747b715Smrg      # but as the default location of the library.
65556747b715Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
65566747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
65576747b715Smrg      ;;
655805b261ecSmrg
65596747b715Smrg    hpux10*)
65606747b715Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
65616747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
65626747b715Smrg      else
65636747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
65646747b715Smrg      fi
65656747b715Smrg      if test "$with_gnu_ld" = no; then
65666747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
65676747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
65686747b715Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
65696747b715Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
65706747b715Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
65716747b715Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
65726747b715Smrg	# hardcode_minus_L: Not really in the search PATH,
65736747b715Smrg	# but as the default location of the library.
65746747b715Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
65756747b715Smrg      fi
65766747b715Smrg      ;;
657705b261ecSmrg
65786747b715Smrg    hpux11*)
65796747b715Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
65806747b715Smrg	case $host_cpu in
65816747b715Smrg	hppa*64*)
65826747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
65836747b715Smrg	  ;;
65846747b715Smrg	ia64*)
65856747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
65866747b715Smrg	  ;;
65876747b715Smrg	*)
65886747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
65896747b715Smrg	  ;;
65906747b715Smrg	esac
65916747b715Smrg      else
65926747b715Smrg	case $host_cpu in
65936747b715Smrg	hppa*64*)
65946747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
65956747b715Smrg	  ;;
65966747b715Smrg	ia64*)
65976747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
65986747b715Smrg	  ;;
65996747b715Smrg	*)
66006747b715Smrg	m4_if($1, [], [
66016747b715Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
66026747b715Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
66036747b715Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
66046747b715Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
66056747b715Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
66066747b715Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
66076747b715Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
66086747b715Smrg	  ;;
66096747b715Smrg	esac
66106747b715Smrg      fi
66116747b715Smrg      if test "$with_gnu_ld" = no; then
66126747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
66136747b715Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
661405b261ecSmrg
66156747b715Smrg	case $host_cpu in
66166747b715Smrg	hppa*64*|ia64*)
66176747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
66186747b715Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66196747b715Smrg	  ;;
66206747b715Smrg	*)
66216747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
66226747b715Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
66236747b715Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
662405b261ecSmrg
66256747b715Smrg	  # hardcode_minus_L: Not really in the search PATH,
66266747b715Smrg	  # but as the default location of the library.
66276747b715Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
66286747b715Smrg	  ;;
66296747b715Smrg	esac
66306747b715Smrg      fi
66316747b715Smrg      ;;
66326747b715Smrg
66336747b715Smrg    irix5* | irix6* | nonstopux*)
66346747b715Smrg      if test "$GCC" = yes; then
66356747b715Smrg	_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'
66366747b715Smrg	# Try to use the -exported_symbol ld option, if it does not
66376747b715Smrg	# work, assume that -exports_file does not work either and
66386747b715Smrg	# implicitly export all symbols.
66396747b715Smrg	# This should be the same for all languages, so no per-tag cache variable.
66406747b715Smrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
66416747b715Smrg	  [lt_cv_irix_exported_symbol],
66426747b715Smrg	  [save_LDFLAGS="$LDFLAGS"
66436747b715Smrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
66446747b715Smrg	   AC_LINK_IFELSE(
66456747b715Smrg	     [AC_LANG_SOURCE(
66466747b715Smrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
66476747b715Smrg			      [C++], [[int foo (void) { return 0; }]],
66486747b715Smrg			      [Fortran 77], [[
66494642e01fSmrg      subroutine foo
66506747b715Smrg      end]],
66516747b715Smrg			      [Fortran], [[
66524642e01fSmrg      subroutine foo
66536747b715Smrg      end]])])],
66546747b715Smrg	      [lt_cv_irix_exported_symbol=yes],
66556747b715Smrg	      [lt_cv_irix_exported_symbol=no])
66566747b715Smrg           LDFLAGS="$save_LDFLAGS"])
66576747b715Smrg	if test "$lt_cv_irix_exported_symbol" = yes; then
66586747b715Smrg          _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'
66596747b715Smrg	fi
66606747b715Smrg      else
66616747b715Smrg	_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'
66626747b715Smrg	_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'
66636747b715Smrg      fi
66646747b715Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
66656747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
66666747b715Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66676747b715Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
66686747b715Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
66696747b715Smrg      ;;
667005b261ecSmrg
66716747b715Smrg    netbsd*)
66726747b715Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
66736747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
66746747b715Smrg      else
66756747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
66766747b715Smrg      fi
66776747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
66786747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
66796747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66806747b715Smrg      ;;
668105b261ecSmrg
66826747b715Smrg    newsos6)
66836747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
66846747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
66856747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
66866747b715Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
66876747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66886747b715Smrg      ;;
668905b261ecSmrg
66906747b715Smrg    *nto* | *qnx*)
66916747b715Smrg      ;;
669205b261ecSmrg
66936747b715Smrg    openbsd*)
66946747b715Smrg      if test -f /usr/libexec/ld.so; then
66956747b715Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
66966747b715Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
66976747b715Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
66986747b715Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
66996747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
67006747b715Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
67016747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
67026747b715Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
67036747b715Smrg	else
67046747b715Smrg	  case $host_os in
67056747b715Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
67066747b715Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
67076747b715Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
67086747b715Smrg	     ;;
67096747b715Smrg	   *)
67106747b715Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
67116747b715Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
67126747b715Smrg	     ;;
67136747b715Smrg	  esac
67146747b715Smrg	fi
67156747b715Smrg      else
67166747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
67176747b715Smrg      fi
67186747b715Smrg      ;;
671905b261ecSmrg
67206747b715Smrg    os2*)
67216747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
67226747b715Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
67236747b715Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
67246747b715Smrg      _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'
67256747b715Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
67266747b715Smrg      ;;
672705b261ecSmrg
67286747b715Smrg    osf3*)
67296747b715Smrg      if test "$GCC" = yes; then
67306747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
67316747b715Smrg	_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'
67326747b715Smrg      else
67336747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
67346747b715Smrg	_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'
67356747b715Smrg      fi
67366747b715Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
67376747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
67386747b715Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
67396747b715Smrg      ;;
674005b261ecSmrg
67416747b715Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
67426747b715Smrg      if test "$GCC" = yes; then
67436747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
67446747b715Smrg	_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'
67456747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
67466747b715Smrg      else
67476747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
67486747b715Smrg	_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'
67496747b715Smrg	_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~
67506747b715Smrg	$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'
675105b261ecSmrg
67526747b715Smrg	# Both c and cxx compiler support -rpath directly
67536747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
67546747b715Smrg      fi
67556747b715Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
67566747b715Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
67576747b715Smrg      ;;
67586747b715Smrg
67596747b715Smrg    solaris*)
67606747b715Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
67616747b715Smrg      if test "$GCC" = yes; then
67626747b715Smrg	wlarc='${wl}'
67636747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
67646747b715Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
67656747b715Smrg	  $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'
67666747b715Smrg      else
67676747b715Smrg	case `$CC -V 2>&1` in
67686747b715Smrg	*"Compilers 5.0"*)
67696747b715Smrg	  wlarc=''
67706747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
67716747b715Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
67726747b715Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
67736747b715Smrg	  ;;
67746747b715Smrg	*)
67756747b715Smrg	  wlarc='${wl}'
67766747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
67776747b715Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
67786747b715Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
67796747b715Smrg	  ;;
67806747b715Smrg	esac
67816747b715Smrg      fi
67826747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
67836747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
67846747b715Smrg      case $host_os in
67856747b715Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
67866747b715Smrg      *)
67876747b715Smrg	# The compiler driver will combine and reorder linker options,
67886747b715Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
67896747b715Smrg	# but is careful enough not to reorder.
67906747b715Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
67916747b715Smrg	if test "$GCC" = yes; then
67926747b715Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
67936747b715Smrg	else
67946747b715Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
67956747b715Smrg	fi
67966747b715Smrg	;;
67976747b715Smrg      esac
67986747b715Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
67996747b715Smrg      ;;
68006747b715Smrg
68016747b715Smrg    sunos4*)
68026747b715Smrg      if test "x$host_vendor" = xsequent; then
68036747b715Smrg	# Use $CC to link under sequent, because it throws in some extra .o
68046747b715Smrg	# files that make .init and .fini sections work.
68056747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
68066747b715Smrg      else
68076747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
68086747b715Smrg      fi
68096747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
68106747b715Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
68116747b715Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
68126747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68136747b715Smrg      ;;
68146747b715Smrg
68156747b715Smrg    sysv4)
68166747b715Smrg      case $host_vendor in
68176747b715Smrg	sni)
68186747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
68196747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
68206747b715Smrg	;;
68216747b715Smrg	siemens)
68226747b715Smrg	  ## LD is ld it makes a PLAMLIB
68236747b715Smrg	  ## CC just makes a GrossModule.
68246747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
68256747b715Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
68266747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
68276747b715Smrg        ;;
68286747b715Smrg	motorola)
68296747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
68306747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
68316747b715Smrg	;;
68326747b715Smrg      esac
68336747b715Smrg      runpath_var='LD_RUN_PATH'
68346747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68356747b715Smrg      ;;
68366747b715Smrg
68376747b715Smrg    sysv4.3*)
68386747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
68396747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68406747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
68416747b715Smrg      ;;
684205b261ecSmrg
68436747b715Smrg    sysv4*MP*)
68446747b715Smrg      if test -d /usr/nec; then
68456747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
68466747b715Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68476747b715Smrg	runpath_var=LD_RUN_PATH
68486747b715Smrg	hardcode_runpath_var=yes
68496747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
68506747b715Smrg      fi
68516747b715Smrg      ;;
685205b261ecSmrg
68536747b715Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
68546747b715Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
68556747b715Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
68566747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68576747b715Smrg      runpath_var='LD_RUN_PATH'
685805b261ecSmrg
68596747b715Smrg      if test "$GCC" = yes; then
68606747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68616747b715Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68626747b715Smrg      else
68636747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68646747b715Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68656747b715Smrg      fi
68666747b715Smrg      ;;
686705b261ecSmrg
68686747b715Smrg    sysv5* | sco3.2v5* | sco5v6*)
68696747b715Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
68706747b715Smrg      # link with -lc, and that would cause any symbols used from libc to
68716747b715Smrg      # always be unresolved, which means just about no library would
68726747b715Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
68736747b715Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
68746747b715Smrg      # as -z defs.
68756747b715Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
68766747b715Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
68776747b715Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
68786747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68796747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
68806747b715Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
68816747b715Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
68826747b715Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
68836747b715Smrg      runpath_var='LD_RUN_PATH'
688405b261ecSmrg
68856747b715Smrg      if test "$GCC" = yes; then
68866747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68876747b715Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68886747b715Smrg      else
68896747b715Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68906747b715Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
68916747b715Smrg      fi
689205b261ecSmrg      ;;
689305b261ecSmrg
68946747b715Smrg    uts4*)
68956747b715Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
68966747b715Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
68976747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
68986747b715Smrg      ;;
68994642e01fSmrg
69006747b715Smrg    *)
69016747b715Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
690205b261ecSmrg      ;;
69034642e01fSmrg    esac
690405b261ecSmrg
69056747b715Smrg    if test x$host_vendor = xsni; then
69066747b715Smrg      case $host in
69076747b715Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
69086747b715Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
69096747b715Smrg	;;
69106747b715Smrg      esac
69114642e01fSmrg    fi
69126747b715Smrg  fi
69134642e01fSmrg])
69146747b715SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
69156747b715Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
691605b261ecSmrg
69176747b715Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
691805b261ecSmrg
69196747b715Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
69206747b715Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
69216747b715Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
69226747b715Smrg    [The commands to extract the exported symbol list from a shared archive])
692305b261ecSmrg
69246747b715Smrg#
69256747b715Smrg# Do we need to explicitly link libc?
69266747b715Smrg#
69276747b715Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
69286747b715Smrgx|xyes)
69296747b715Smrg  # Assume -lc should be added
69306747b715Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
693105b261ecSmrg
69326747b715Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
69336747b715Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
69346747b715Smrg    *'~'*)
69356747b715Smrg      # FIXME: we may have to deal with multi-command sequences.
69366747b715Smrg      ;;
69376747b715Smrg    '$CC '*)
69386747b715Smrg      # Test whether the compiler implicitly links with -lc since on some
69396747b715Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
69406747b715Smrg      # to ld, don't add -lc before -lgcc.
69416747b715Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
69426747b715Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
69436747b715Smrg	[$RM conftest*
69446747b715Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
69456747b715Smrg
69466747b715Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
69476747b715Smrg	  soname=conftest
69486747b715Smrg	  lib=conftest
69496747b715Smrg	  libobjs=conftest.$ac_objext
69506747b715Smrg	  deplibs=
69516747b715Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
69526747b715Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
69536747b715Smrg	  compiler_flags=-v
69546747b715Smrg	  linker_flags=-v
69556747b715Smrg	  verstring=
69566747b715Smrg	  output_objdir=.
69576747b715Smrg	  libname=conftest
69586747b715Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
69596747b715Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
69606747b715Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
69616747b715Smrg	  then
69626747b715Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
69636747b715Smrg	  else
69646747b715Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
69656747b715Smrg	  fi
69666747b715Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
69676747b715Smrg	else
69686747b715Smrg	  cat conftest.err 1>&5
69696747b715Smrg	fi
69706747b715Smrg	$RM conftest*
69716747b715Smrg	])
69726747b715Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
69736747b715Smrg      ;;
69746747b715Smrg    esac
69756747b715Smrg  fi
69766747b715Smrg  ;;
69776747b715Smrgesac
697805b261ecSmrg
69796747b715Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
69806747b715Smrg    [Whether or not to add -lc for building shared libraries])
69816747b715Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
69826747b715Smrg    [enable_shared_with_static_runtimes], [0],
69836747b715Smrg    [Whether or not to disallow shared libs when runtime libs are static])
69846747b715Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
69856747b715Smrg    [Compiler flag to allow reflexive dlopens])
69866747b715Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
69876747b715Smrg    [Compiler flag to generate shared objects directly from archives])
69886747b715Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
69896747b715Smrg    [Whether the compiler copes with passing no objects directly])
69906747b715Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
69916747b715Smrg    [Create an old-style archive from a shared archive])
69926747b715Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
69936747b715Smrg    [Create a temporary old-style archive to link instead of a shared archive])
69946747b715Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
69956747b715Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
69966747b715Smrg_LT_TAGDECL([], [module_cmds], [2],
69976747b715Smrg    [Commands used to build a loadable module if different from building
69986747b715Smrg    a shared archive.])
69996747b715Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
70006747b715Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
70016747b715Smrg    [Whether we are building with GNU ld or not])
70026747b715Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
70036747b715Smrg    [Flag that allows shared libraries with undefined symbols to be built])
70046747b715Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
70056747b715Smrg    [Flag that enforces no undefined symbols])
70066747b715Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
70076747b715Smrg    [Flag to hardcode $libdir into a binary during linking.
70086747b715Smrg    This must work even if $libdir does not exist])
70096747b715Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
70106747b715Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
70116747b715Smrg    during linking.  This must work even if $libdir does not exist]])
70126747b715Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
70136747b715Smrg    [Whether we need a single "-rpath" flag with a separated argument])
70146747b715Smrg_LT_TAGDECL([], [hardcode_direct], [0],
70156747b715Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
70166747b715Smrg    DIR into the resulting binary])
70176747b715Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
70186747b715Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
70196747b715Smrg    DIR into the resulting binary and the resulting library dependency is
70206747b715Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
70216747b715Smrg    library is relocated])
70226747b715Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
70236747b715Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
70246747b715Smrg    into the resulting binary])
70256747b715Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
70266747b715Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
70276747b715Smrg    into the resulting binary])
70286747b715Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
70296747b715Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
70306747b715Smrg    into the library and all subsequent libraries and executables linked
70316747b715Smrg    against it])
70326747b715Smrg_LT_TAGDECL([], [inherit_rpath], [0],
70336747b715Smrg    [Set to yes if linker adds runtime paths of dependent libraries
70346747b715Smrg    to runtime path list])
70356747b715Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
70366747b715Smrg    [Whether libtool must link a program against all its dependency libraries])
70376747b715Smrg_LT_TAGDECL([], [always_export_symbols], [0],
70386747b715Smrg    [Set to "yes" if exported symbols are required])
70396747b715Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
70406747b715Smrg    [The commands to list exported symbols])
70416747b715Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
70426747b715Smrg    [Symbols that should not be listed in the preloaded symbols])
70436747b715Smrg_LT_TAGDECL([], [include_expsyms], [1],
70446747b715Smrg    [Symbols that must always be exported])
70456747b715Smrg_LT_TAGDECL([], [prelink_cmds], [2],
70466747b715Smrg    [Commands necessary for linking programs (against libraries) with templates])
70476747b715Smrg_LT_TAGDECL([], [postlink_cmds], [2],
70486747b715Smrg    [Commands necessary for finishing linking programs])
70496747b715Smrg_LT_TAGDECL([], [file_list_spec], [1],
70506747b715Smrg    [Specify filename containing input files])
70516747b715Smrgdnl FIXME: Not yet implemented
70526747b715Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
70536747b715Smrgdnl    [Compiler flag to generate thread safe objects])
70546747b715Smrg])# _LT_LINKER_SHLIBS
705505b261ecSmrg
705605b261ecSmrg
70576747b715Smrg# _LT_LANG_C_CONFIG([TAG])
70586747b715Smrg# ------------------------
70596747b715Smrg# Ensure that the configuration variables for a C compiler are suitably
70606747b715Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
70616747b715Smrg# the compiler configuration to `libtool'.
70626747b715Smrgm4_defun([_LT_LANG_C_CONFIG],
70636747b715Smrg[m4_require([_LT_DECL_EGREP])dnl
70646747b715Smrglt_save_CC="$CC"
70656747b715SmrgAC_LANG_PUSH(C)
70664642e01fSmrg
70676747b715Smrg# Source file extension for C test sources.
70686747b715Smrgac_ext=c
706905b261ecSmrg
70706747b715Smrg# Object file extension for compiled C test sources.
70716747b715Smrgobjext=o
70726747b715Smrg_LT_TAGVAR(objext, $1)=$objext
70734642e01fSmrg
70746747b715Smrg# Code to be used in simple compile tests
70756747b715Smrglt_simple_compile_test_code="int some_variable = 0;"
70764642e01fSmrg
70776747b715Smrg# Code to be used in simple link tests
70786747b715Smrglt_simple_link_test_code='int main(){return(0);}'
70794642e01fSmrg
70806747b715Smrg_LT_TAG_COMPILER
70816747b715Smrg# Save the default compiler, since it gets overwritten when the other
70826747b715Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
70836747b715Smrgcompiler_DEFAULT=$CC
708405b261ecSmrg
70856747b715Smrg# save warnings/boilerplate of simple test code
70866747b715Smrg_LT_COMPILER_BOILERPLATE
70876747b715Smrg_LT_LINKER_BOILERPLATE
708805b261ecSmrg
70896747b715Smrgif test -n "$compiler"; then
70906747b715Smrg  _LT_COMPILER_NO_RTTI($1)
70916747b715Smrg  _LT_COMPILER_PIC($1)
70926747b715Smrg  _LT_COMPILER_C_O($1)
70936747b715Smrg  _LT_COMPILER_FILE_LOCKS($1)
70946747b715Smrg  _LT_LINKER_SHLIBS($1)
70956747b715Smrg  _LT_SYS_DYNAMIC_LINKER($1)
70966747b715Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
70976747b715Smrg  LT_SYS_DLOPEN_SELF
70986747b715Smrg  _LT_CMD_STRIPLIB
70994642e01fSmrg
71006747b715Smrg  # Report which library types will actually be built
71016747b715Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
71026747b715Smrg  AC_MSG_RESULT([$can_build_shared])
71034642e01fSmrg
71046747b715Smrg  AC_MSG_CHECKING([whether to build shared libraries])
71056747b715Smrg  test "$can_build_shared" = "no" && enable_shared=no
71064642e01fSmrg
71076747b715Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
71086747b715Smrg  # are all built from PIC.
71096747b715Smrg  case $host_os in
71106747b715Smrg  aix3*)
71116747b715Smrg    test "$enable_shared" = yes && enable_static=no
71126747b715Smrg    if test -n "$RANLIB"; then
71136747b715Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
71146747b715Smrg      postinstall_cmds='$RANLIB $lib'
71156747b715Smrg    fi
71166747b715Smrg    ;;
71174642e01fSmrg
71186747b715Smrg  aix[[4-9]]*)
71196747b715Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
71206747b715Smrg      test "$enable_shared" = yes && enable_static=no
71216747b715Smrg    fi
71226747b715Smrg    ;;
71236747b715Smrg  esac
71246747b715Smrg  AC_MSG_RESULT([$enable_shared])
71254642e01fSmrg
71266747b715Smrg  AC_MSG_CHECKING([whether to build static libraries])
71276747b715Smrg  # Make sure either enable_shared or enable_static is yes.
71286747b715Smrg  test "$enable_shared" = yes || enable_static=yes
71296747b715Smrg  AC_MSG_RESULT([$enable_static])
713005b261ecSmrg
71316747b715Smrg  _LT_CONFIG($1)
71326747b715Smrgfi
71334642e01fSmrgAC_LANG_POP
71346747b715SmrgCC="$lt_save_CC"
71356747b715Smrg])# _LT_LANG_C_CONFIG
713605b261ecSmrg
713705b261ecSmrg
71386747b715Smrg# _LT_LANG_CXX_CONFIG([TAG])
71396747b715Smrg# --------------------------
71406747b715Smrg# Ensure that the configuration variables for a C++ compiler are suitably
71416747b715Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
71426747b715Smrg# the compiler configuration to `libtool'.
71436747b715Smrgm4_defun([_LT_LANG_CXX_CONFIG],
71446747b715Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
71456747b715Smrgm4_require([_LT_DECL_EGREP])dnl
71466747b715Smrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
71476747b715Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
71486747b715Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
71496747b715Smrg    (test "X$CXX" != "Xg++"))) ; then
71506747b715Smrg  AC_PROG_CXXCPP
71516747b715Smrgelse
71526747b715Smrg  _lt_caught_CXX_error=yes
71534642e01fSmrgfi
71544642e01fSmrg
71556747b715SmrgAC_LANG_PUSH(C++)
71564642e01fSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
71574642e01fSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
71584642e01fSmrg_LT_TAGVAR(always_export_symbols, $1)=no
71594642e01fSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
71606747b715Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
71614642e01fSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
71624642e01fSmrg_LT_TAGVAR(hardcode_direct, $1)=no
71634642e01fSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
71644642e01fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
71654642e01fSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
71664642e01fSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
71674642e01fSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
71686747b715Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
71694642e01fSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
71704642e01fSmrg_LT_TAGVAR(inherit_rpath, $1)=no
71714642e01fSmrg_LT_TAGVAR(module_cmds, $1)=
71724642e01fSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
71734642e01fSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
71744642e01fSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
71756747b715Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
71766747b715Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
71774642e01fSmrg_LT_TAGVAR(no_undefined_flag, $1)=
71784642e01fSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
71794642e01fSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
71804642e01fSmrg
71816747b715Smrg# Source file extension for C++ test sources.
71826747b715Smrgac_ext=cpp
71834642e01fSmrg
71846747b715Smrg# Object file extension for compiled C++ test sources.
71854642e01fSmrgobjext=o
71864642e01fSmrg_LT_TAGVAR(objext, $1)=$objext
71874642e01fSmrg
71884642e01fSmrg# No sense in running all these tests if we already determined that
71896747b715Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
71904642e01fSmrg# are currently assumed to apply to all compilers on this platform,
71914642e01fSmrg# and will be corrupted by setting them based on a non-working compiler.
71926747b715Smrgif test "$_lt_caught_CXX_error" != yes; then
71934642e01fSmrg  # Code to be used in simple compile tests
71946747b715Smrg  lt_simple_compile_test_code="int some_variable = 0;"
719505b261ecSmrg
71964642e01fSmrg  # Code to be used in simple link tests
71976747b715Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
719805b261ecSmrg
71994642e01fSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
72004642e01fSmrg  _LT_TAG_COMPILER
720105b261ecSmrg
72024642e01fSmrg  # save warnings/boilerplate of simple test code
72034642e01fSmrg  _LT_COMPILER_BOILERPLATE
72044642e01fSmrg  _LT_LINKER_BOILERPLATE
720505b261ecSmrg
72064642e01fSmrg  # Allow CC to be a program name with arguments.
72076747b715Smrg  lt_save_CC=$CC
72086747b715Smrg  lt_save_CFLAGS=$CFLAGS
72096747b715Smrg  lt_save_LD=$LD
72104642e01fSmrg  lt_save_GCC=$GCC
72116747b715Smrg  GCC=$GXX
72126747b715Smrg  lt_save_with_gnu_ld=$with_gnu_ld
72136747b715Smrg  lt_save_path_LD=$lt_cv_path_LD
72146747b715Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
72156747b715Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
72166747b715Smrg  else
72176747b715Smrg    $as_unset lt_cv_prog_gnu_ld
72186747b715Smrg  fi
72196747b715Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
72206747b715Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
72216747b715Smrg  else
72226747b715Smrg    $as_unset lt_cv_path_LD
72236747b715Smrg  fi
72246747b715Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
72256747b715Smrg  CC=${CXX-"c++"}
72266747b715Smrg  CFLAGS=$CXXFLAGS
72274642e01fSmrg  compiler=$CC
72286747b715Smrg  _LT_TAGVAR(compiler, $1)=$CC
72296747b715Smrg  _LT_CC_BASENAME([$compiler])
72306747b715Smrg
72316747b715Smrg  if test -n "$compiler"; then
72326747b715Smrg    # We don't want -fno-exception when compiling C++ code, so set the
72336747b715Smrg    # no_builtin_flag separately
72346747b715Smrg    if test "$GXX" = yes; then
72356747b715Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
72366747b715Smrg    else
72376747b715Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
72386747b715Smrg    fi
72396747b715Smrg
72406747b715Smrg    if test "$GXX" = yes; then
72416747b715Smrg      # Set up default GNU C++ configuration
72426747b715Smrg
72436747b715Smrg      LT_PATH_LD
72446747b715Smrg
72456747b715Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
72466747b715Smrg      # archiving commands below assume that GNU ld is being used.
72476747b715Smrg      if test "$with_gnu_ld" = yes; then
72486747b715Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
72496747b715Smrg        _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'
72506747b715Smrg
72516747b715Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
72526747b715Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
72536747b715Smrg
72546747b715Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
72556747b715Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
72566747b715Smrg        #     investigate it a little bit more. (MM)
72576747b715Smrg        wlarc='${wl}'
725805b261ecSmrg
72596747b715Smrg        # ancient GNU ld didn't support --whole-archive et. al.
72606747b715Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
72616747b715Smrg	  $GREP 'no-whole-archive' > /dev/null; then
72626747b715Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
72636747b715Smrg        else
72646747b715Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
72656747b715Smrg        fi
72666747b715Smrg      else
72676747b715Smrg        with_gnu_ld=no
72686747b715Smrg        wlarc=
726905b261ecSmrg
72706747b715Smrg        # A generic and very simple default shared library creation
72716747b715Smrg        # command for GNU C++ for the case where it uses the native
72726747b715Smrg        # linker, instead of GNU ld.  If possible, this setting should
72736747b715Smrg        # overridden to take advantage of the native linker features on
72746747b715Smrg        # the platform it is being used on.
72756747b715Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
72766747b715Smrg      fi
727705b261ecSmrg
72786747b715Smrg      # Commands to make compiler produce verbose output that lists
72796747b715Smrg      # what "hidden" libraries, object files and flags are used when
72806747b715Smrg      # linking a shared library.
72816747b715Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
728205b261ecSmrg
72836747b715Smrg    else
72846747b715Smrg      GXX=no
72856747b715Smrg      with_gnu_ld=no
72866747b715Smrg      wlarc=
72876747b715Smrg    fi
72886747b715Smrg
72896747b715Smrg    # PORTME: fill in a description of your system's C++ link characteristics
72906747b715Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
72916747b715Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
72924642e01fSmrg    case $host_os in
72934642e01fSmrg      aix3*)
72946747b715Smrg        # FIXME: insert proper C++ library support
72956747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
72964642e01fSmrg        ;;
72974642e01fSmrg      aix[[4-9]]*)
72986747b715Smrg        if test "$host_cpu" = ia64; then
72996747b715Smrg          # On IA64, the linker does run time linking by default, so we don't
73006747b715Smrg          # have to do anything special.
73016747b715Smrg          aix_use_runtimelinking=no
73026747b715Smrg          exp_sym_flag='-Bexport'
73036747b715Smrg          no_entry_flag=""
73046747b715Smrg        else
73056747b715Smrg          aix_use_runtimelinking=no
73064642e01fSmrg
73076747b715Smrg          # Test if we are trying to use run time linking or normal
73086747b715Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
73096747b715Smrg          # need to do runtime linking.
73106747b715Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
73116747b715Smrg	    for ld_flag in $LDFLAGS; do
73126747b715Smrg	      case $ld_flag in
73136747b715Smrg	      *-brtl*)
73146747b715Smrg	        aix_use_runtimelinking=yes
73156747b715Smrg	        break
73166747b715Smrg	        ;;
73176747b715Smrg	      esac
73186747b715Smrg	    done
73196747b715Smrg	    ;;
73206747b715Smrg          esac
73214642e01fSmrg
73226747b715Smrg          exp_sym_flag='-bexport'
73236747b715Smrg          no_entry_flag='-bnoentry'
73246747b715Smrg        fi
73254642e01fSmrg
73266747b715Smrg        # When large executables or shared objects are built, AIX ld can
73276747b715Smrg        # have problems creating the table of contents.  If linking a library
73286747b715Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
73296747b715Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
73306747b715Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
73314642e01fSmrg
73326747b715Smrg        _LT_TAGVAR(archive_cmds, $1)=''
73336747b715Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
73346747b715Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
73356747b715Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
73366747b715Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
73376747b715Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
73384642e01fSmrg
73396747b715Smrg        if test "$GXX" = yes; then
73406747b715Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
73416747b715Smrg          # We only want to do this on AIX 4.2 and lower, the check
73426747b715Smrg          # below for broken collect2 doesn't work under 4.3+
73436747b715Smrg	  collect2name=`${CC} -print-prog-name=collect2`
73446747b715Smrg	  if test -f "$collect2name" &&
73456747b715Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
73466747b715Smrg	  then
73476747b715Smrg	    # We have reworked collect2
73486747b715Smrg	    :
73496747b715Smrg	  else
73506747b715Smrg	    # We have old collect2
73516747b715Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
73526747b715Smrg	    # It fails to find uninstalled libraries when the uninstalled
73536747b715Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
73546747b715Smrg	    # to unsupported forces relinking
73556747b715Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
73566747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
73576747b715Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
73586747b715Smrg	  fi
73596747b715Smrg          esac
73606747b715Smrg          shared_flag='-shared'
73616747b715Smrg	  if test "$aix_use_runtimelinking" = yes; then
73626747b715Smrg	    shared_flag="$shared_flag "'${wl}-G'
73636747b715Smrg	  fi
73646747b715Smrg        else
73656747b715Smrg          # not using gcc
73666747b715Smrg          if test "$host_cpu" = ia64; then
73676747b715Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
73686747b715Smrg	  # chokes on -Wl,-G. The following line is correct:
73696747b715Smrg	  shared_flag='-G'
73706747b715Smrg          else
73716747b715Smrg	    if test "$aix_use_runtimelinking" = yes; then
73726747b715Smrg	      shared_flag='${wl}-G'
73736747b715Smrg	    else
73746747b715Smrg	      shared_flag='${wl}-bM:SRE'
73756747b715Smrg	    fi
73766747b715Smrg          fi
73776747b715Smrg        fi
737805b261ecSmrg
73796747b715Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
73806747b715Smrg        # It seems that -bexpall does not export symbols beginning with
73816747b715Smrg        # underscore (_), so it is better to generate a list of symbols to
73826747b715Smrg	# export.
73836747b715Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
73846747b715Smrg        if test "$aix_use_runtimelinking" = yes; then
73856747b715Smrg          # Warning - without using the other runtime loading flags (-brtl),
73866747b715Smrg          # -berok will link without error, but may produce a broken library.
73876747b715Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
73886747b715Smrg          # Determine the default libpath from the value encoded in an empty
73896747b715Smrg          # executable.
73906747b715Smrg          _LT_SYS_MODULE_PATH_AIX([$1])
73916747b715Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
739205b261ecSmrg
73936747b715Smrg          _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"
73946747b715Smrg        else
73956747b715Smrg          if test "$host_cpu" = ia64; then
73966747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
73976747b715Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
73986747b715Smrg	    _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"
73996747b715Smrg          else
74006747b715Smrg	    # Determine the default libpath from the value encoded in an
74016747b715Smrg	    # empty executable.
74026747b715Smrg	    _LT_SYS_MODULE_PATH_AIX([$1])
74036747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
74046747b715Smrg	    # Warning - without using the other run time loading flags,
74056747b715Smrg	    # -berok will link without error, but may produce a broken library.
74066747b715Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
74076747b715Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
74086747b715Smrg	    if test "$with_gnu_ld" = yes; then
74096747b715Smrg	      # We only use this code for GNU lds that support --whole-archive.
74106747b715Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
74116747b715Smrg	    else
74126747b715Smrg	      # Exported symbols can be pulled into shared objects from archives
74136747b715Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
74146747b715Smrg	    fi
74156747b715Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
74166747b715Smrg	    # This is similar to how AIX traditionally builds its shared
74176747b715Smrg	    # libraries.
74186747b715Smrg	    _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'
74196747b715Smrg          fi
74206747b715Smrg        fi
74216747b715Smrg        ;;
742205b261ecSmrg
74236747b715Smrg      beos*)
74246747b715Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
74256747b715Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
74266747b715Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
74276747b715Smrg	  # support --undefined.  This deserves some investigation.  FIXME
74286747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
74296747b715Smrg	else
74306747b715Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
74316747b715Smrg	fi
74326747b715Smrg	;;
74336747b715Smrg
74346747b715Smrg      chorus*)
74356747b715Smrg        case $cc_basename in
74366747b715Smrg          *)
74376747b715Smrg	  # FIXME: insert proper C++ library support
74386747b715Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
74396747b715Smrg	  ;;
74406747b715Smrg        esac
74416747b715Smrg        ;;
74426747b715Smrg
74436747b715Smrg      cygwin* | mingw* | pw32* | cegcc*)
74446747b715Smrg	case $GXX,$cc_basename in
74456747b715Smrg	,cl* | no,cl*)
74466747b715Smrg	  # Native MSVC
74476747b715Smrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
74486747b715Smrg	  # no search path for DLLs.
74496747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
74506747b715Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
74516747b715Smrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
74526747b715Smrg	  _LT_TAGVAR(file_list_spec, $1)='@'
74536747b715Smrg	  # Tell ltmain to make .lib files, not .a files.
74546747b715Smrg	  libext=lib
74556747b715Smrg	  # Tell ltmain to make .dll files, not .so files.
74566747b715Smrg	  shrext_cmds=".dll"
74576747b715Smrg	  # FIXME: Setting linknames here is a bad hack.
74586747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
74596747b715Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
74606747b715Smrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
74616747b715Smrg	    else
74626747b715Smrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
74636747b715Smrg	    fi~
74646747b715Smrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
74656747b715Smrg	    linknames='
74666747b715Smrg	  # The linker will not automatically build a static lib if we build a DLL.
74676747b715Smrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
74686747b715Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
74696747b715Smrg	  # Don't use ranlib
74706747b715Smrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
74716747b715Smrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
74726747b715Smrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
74736747b715Smrg	    case $lt_outputfile in
74746747b715Smrg	      *.exe|*.EXE) ;;
74756747b715Smrg	      *)
74766747b715Smrg		lt_outputfile="$lt_outputfile.exe"
74776747b715Smrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
74786747b715Smrg		;;
74796747b715Smrg	    esac~
74806747b715Smrg	    func_to_tool_file "$lt_outputfile"~
74816747b715Smrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
74826747b715Smrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
74836747b715Smrg	      $RM "$lt_outputfile.manifest";
74846747b715Smrg	    fi'
74856747b715Smrg	  ;;
74866747b715Smrg	*)
74876747b715Smrg	  # g++
74886747b715Smrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
74896747b715Smrg	  # as there is no search path for DLLs.
74906747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
74916747b715Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
74926747b715Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
74936747b715Smrg	  _LT_TAGVAR(always_export_symbols, $1)=no
74946747b715Smrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
74956747b715Smrg
74966747b715Smrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
74976747b715Smrg	    _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'
74986747b715Smrg	    # If the export-symbols file already is a .def file (1st line
74996747b715Smrg	    # is EXPORTS), use it as is; otherwise, prepend...
75006747b715Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
75016747b715Smrg	      cp $export_symbols $output_objdir/$soname.def;
75026747b715Smrg	    else
75036747b715Smrg	      echo EXPORTS > $output_objdir/$soname.def;
75046747b715Smrg	      cat $export_symbols >> $output_objdir/$soname.def;
75056747b715Smrg	    fi~
75066747b715Smrg	    $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'
75076747b715Smrg	  else
75086747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75096747b715Smrg	  fi
75106747b715Smrg	  ;;
75116747b715Smrg	esac
75126747b715Smrg	;;
75136747b715Smrg      darwin* | rhapsody*)
75146747b715Smrg        _LT_DARWIN_LINKER_FEATURES($1)
75156747b715Smrg	;;
75166747b715Smrg
75176747b715Smrg      dgux*)
75186747b715Smrg        case $cc_basename in
75196747b715Smrg          ec++*)
75206747b715Smrg	    # FIXME: insert proper C++ library support
75216747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75226747b715Smrg	    ;;
75236747b715Smrg          ghcx*)
75246747b715Smrg	    # Green Hills C++ Compiler
75256747b715Smrg	    # FIXME: insert proper C++ library support
75266747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75276747b715Smrg	    ;;
75286747b715Smrg          *)
75296747b715Smrg	    # FIXME: insert proper C++ library support
75306747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
75316747b715Smrg	    ;;
75326747b715Smrg        esac
75336747b715Smrg        ;;
75346747b715Smrg
75356747b715Smrg      freebsd[[12]]*)
75366747b715Smrg        # C++ shared libraries reported to be fairly broken before
75376747b715Smrg	# switch to ELF
75386747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
75396747b715Smrg        ;;
754005b261ecSmrg
75416747b715Smrg      freebsd-elf*)
75426747b715Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
75436747b715Smrg        ;;
754405b261ecSmrg
75456747b715Smrg      freebsd* | dragonfly*)
75466747b715Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
75476747b715Smrg        # conventions
75486747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
75496747b715Smrg        ;;
755005b261ecSmrg
75516747b715Smrg      gnu*)
75526747b715Smrg        ;;
755305b261ecSmrg
75546747b715Smrg      haiku*)
75556747b715Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
75566747b715Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
75576747b715Smrg        ;;
755805b261ecSmrg
75596747b715Smrg      hpux9*)
75606747b715Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
75616747b715Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
75626747b715Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
75636747b715Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
75646747b715Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
75656747b715Smrg				             # but as the default
75666747b715Smrg				             # location of the library.
756705b261ecSmrg
75686747b715Smrg        case $cc_basename in
75696747b715Smrg          CC*)
75706747b715Smrg            # FIXME: insert proper C++ library support
75716747b715Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
75726747b715Smrg            ;;
75736747b715Smrg          aCC*)
75746747b715Smrg            _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'
75756747b715Smrg            # Commands to make compiler produce verbose output that lists
75766747b715Smrg            # what "hidden" libraries, object files and flags are used when
75776747b715Smrg            # linking a shared library.
75786747b715Smrg            #
75796747b715Smrg            # There doesn't appear to be a way to prevent this compiler from
75806747b715Smrg            # explicitly linking system object files so we need to strip them
75816747b715Smrg            # from the output so that they don't get included in the library
75826747b715Smrg            # dependencies.
75836747b715Smrg            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"'
75846747b715Smrg            ;;
75856747b715Smrg          *)
75866747b715Smrg            if test "$GXX" = yes; then
75876747b715Smrg              _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'
75886747b715Smrg            else
75896747b715Smrg              # FIXME: insert proper C++ library support
75906747b715Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
75916747b715Smrg            fi
75926747b715Smrg            ;;
75936747b715Smrg        esac
75946747b715Smrg        ;;
759505b261ecSmrg
75966747b715Smrg      hpux10*|hpux11*)
75976747b715Smrg        if test $with_gnu_ld = no; then
75986747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
75996747b715Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
760005b261ecSmrg
76016747b715Smrg          case $host_cpu in
76026747b715Smrg            hppa*64*|ia64*)
76036747b715Smrg              ;;
76046747b715Smrg            *)
76056747b715Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
76066747b715Smrg              ;;
76076747b715Smrg          esac
76086747b715Smrg        fi
76096747b715Smrg        case $host_cpu in
76106747b715Smrg          hppa*64*|ia64*)
76116747b715Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
76126747b715Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
76136747b715Smrg            ;;
76146747b715Smrg          *)
76156747b715Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
76166747b715Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
76176747b715Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
76186747b715Smrg					         # but as the default
76196747b715Smrg					         # location of the library.
76206747b715Smrg            ;;
76216747b715Smrg        esac
762205b261ecSmrg
76236747b715Smrg        case $cc_basename in
76246747b715Smrg          CC*)
76256747b715Smrg	    # FIXME: insert proper C++ library support
76266747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
76276747b715Smrg	    ;;
76286747b715Smrg          aCC*)
76296747b715Smrg	    case $host_cpu in
76306747b715Smrg	      hppa*64*)
76316747b715Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
76326747b715Smrg	        ;;
76336747b715Smrg	      ia64*)
76346747b715Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
76356747b715Smrg	        ;;
76366747b715Smrg	      *)
76376747b715Smrg	        _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'
76386747b715Smrg	        ;;
76396747b715Smrg	    esac
76406747b715Smrg	    # Commands to make compiler produce verbose output that lists
76416747b715Smrg	    # what "hidden" libraries, object files and flags are used when
76426747b715Smrg	    # linking a shared library.
76436747b715Smrg	    #
76446747b715Smrg	    # There doesn't appear to be a way to prevent this compiler from
76456747b715Smrg	    # explicitly linking system object files so we need to strip them
76466747b715Smrg	    # from the output so that they don't get included in the library
76476747b715Smrg	    # dependencies.
76486747b715Smrg	    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"'
76496747b715Smrg	    ;;
76506747b715Smrg          *)
76516747b715Smrg	    if test "$GXX" = yes; then
76526747b715Smrg	      if test $with_gnu_ld = no; then
76536747b715Smrg	        case $host_cpu in
76546747b715Smrg	          hppa*64*)
76556747b715Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
76566747b715Smrg	            ;;
76576747b715Smrg	          ia64*)
76586747b715Smrg	            _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'
76596747b715Smrg	            ;;
76606747b715Smrg	          *)
76616747b715Smrg	            _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'
76626747b715Smrg	            ;;
76636747b715Smrg	        esac
76646747b715Smrg	      fi
76656747b715Smrg	    else
76666747b715Smrg	      # FIXME: insert proper C++ library support
76676747b715Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
76686747b715Smrg	    fi
76696747b715Smrg	    ;;
76706747b715Smrg        esac
76716747b715Smrg        ;;
767205b261ecSmrg
76736747b715Smrg      interix[[3-9]]*)
76746747b715Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
76756747b715Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
76766747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
76776747b715Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
76786747b715Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
76796747b715Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
76806747b715Smrg	# default) and relocated if they conflict, which is a slow very memory
76816747b715Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
76826747b715Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
76836747b715Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
76846747b715Smrg	_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'
76856747b715Smrg	_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'
76866747b715Smrg	;;
76876747b715Smrg      irix5* | irix6*)
76886747b715Smrg        case $cc_basename in
76896747b715Smrg          CC*)
76906747b715Smrg	    # SGI C++
76916747b715Smrg	    _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'
769205b261ecSmrg
76936747b715Smrg	    # Archives containing C++ object files must be created using
76946747b715Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
76956747b715Smrg	    # necessary to make sure instantiated templates are included
76966747b715Smrg	    # in the archive.
76976747b715Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
76986747b715Smrg	    ;;
76996747b715Smrg          *)
77006747b715Smrg	    if test "$GXX" = yes; then
77016747b715Smrg	      if test "$with_gnu_ld" = no; then
77026747b715Smrg	        _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'
77036747b715Smrg	      else
77046747b715Smrg	        _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'
77056747b715Smrg	      fi
77066747b715Smrg	    fi
77076747b715Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
77086747b715Smrg	    ;;
77096747b715Smrg        esac
77106747b715Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
77116747b715Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
77126747b715Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
77136747b715Smrg        ;;
771405b261ecSmrg
77156747b715Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
77166747b715Smrg        case $cc_basename in
77176747b715Smrg          KCC*)
77186747b715Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
771905b261ecSmrg
77206747b715Smrg	    # KCC will only create a shared library if the output file
77216747b715Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
77226747b715Smrg	    # to its proper name (with version) after linking.
77236747b715Smrg	    _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'
77246747b715Smrg	    _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'
77256747b715Smrg	    # Commands to make compiler produce verbose output that lists
77266747b715Smrg	    # what "hidden" libraries, object files and flags are used when
77276747b715Smrg	    # linking a shared library.
77286747b715Smrg	    #
77296747b715Smrg	    # There doesn't appear to be a way to prevent this compiler from
77306747b715Smrg	    # explicitly linking system object files so we need to strip them
77316747b715Smrg	    # from the output so that they don't get included in the library
77326747b715Smrg	    # dependencies.
77336747b715Smrg	    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"'
77346747b715Smrg
77356747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
77366747b715Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
773705b261ecSmrg
77386747b715Smrg	    # Archives containing C++ object files must be created using
77396747b715Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
77406747b715Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
77416747b715Smrg	    ;;
77426747b715Smrg	  icpc* | ecpc* )
77436747b715Smrg	    # Intel C++
77446747b715Smrg	    with_gnu_ld=yes
77456747b715Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
77466747b715Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
77476747b715Smrg	    # earlier do not add the objects themselves.
77486747b715Smrg	    case `$CC -V 2>&1` in
77496747b715Smrg	      *"Version 7."*)
77506747b715Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
77516747b715Smrg		_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'
77526747b715Smrg		;;
77536747b715Smrg	      *)  # Version 8.0 or newer
77546747b715Smrg	        tmp_idyn=
77556747b715Smrg	        case $host_cpu in
77566747b715Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
77576747b715Smrg		esac
77586747b715Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
77596747b715Smrg		_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'
77606747b715Smrg		;;
77616747b715Smrg	    esac
77626747b715Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
77636747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
77646747b715Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
77656747b715Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
77666747b715Smrg	    ;;
77676747b715Smrg          pgCC* | pgcpp*)
77686747b715Smrg            # Portland Group C++ compiler
77696747b715Smrg	    case `$CC -V` in
77706747b715Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
77716747b715Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
77726747b715Smrg		rm -rf $tpldir~
77736747b715Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
77746747b715Smrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
77756747b715Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
77766747b715Smrg		rm -rf $tpldir~
77776747b715Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
77786747b715Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
77796747b715Smrg		$RANLIB $oldlib'
77806747b715Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
77816747b715Smrg		rm -rf $tpldir~
77826747b715Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
77836747b715Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
77846747b715Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
77856747b715Smrg		rm -rf $tpldir~
77866747b715Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
77876747b715Smrg		$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'
77886747b715Smrg	      ;;
77896747b715Smrg	    *) # Version 6 and above use weak symbols
77906747b715Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
77916747b715Smrg	      _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'
77926747b715Smrg	      ;;
77936747b715Smrg	    esac
779405b261ecSmrg
77956747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
77966747b715Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
77976747b715Smrg	    _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'
77986747b715Smrg            ;;
77996747b715Smrg	  cxx*)
78006747b715Smrg	    # Compaq C++
78016747b715Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
78026747b715Smrg	    _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'
780305b261ecSmrg
78046747b715Smrg	    runpath_var=LD_RUN_PATH
78056747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
78066747b715Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
780705b261ecSmrg
78086747b715Smrg	    # Commands to make compiler produce verbose output that lists
78096747b715Smrg	    # what "hidden" libraries, object files and flags are used when
78106747b715Smrg	    # linking a shared library.
78116747b715Smrg	    #
78126747b715Smrg	    # There doesn't appear to be a way to prevent this compiler from
78136747b715Smrg	    # explicitly linking system object files so we need to strip them
78146747b715Smrg	    # from the output so that they don't get included in the library
78156747b715Smrg	    # dependencies.
78166747b715Smrg	    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'
78176747b715Smrg	    ;;
78186747b715Smrg	  xl* | mpixl* | bgxl*)
78196747b715Smrg	    # IBM XL 8.0 on PPC, with GNU ld
78206747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
78216747b715Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
78226747b715Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
78236747b715Smrg	    if test "x$supports_anon_versioning" = xyes; then
78246747b715Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
78256747b715Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
78266747b715Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
78276747b715Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
78286747b715Smrg	    fi
78296747b715Smrg	    ;;
78306747b715Smrg	  *)
78316747b715Smrg	    case `$CC -V 2>&1 | sed 5q` in
78326747b715Smrg	    *Sun\ C*)
78336747b715Smrg	      # Sun C++ 5.9
78346747b715Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
78356747b715Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
78366747b715Smrg	      _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'
78376747b715Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
78386747b715Smrg	      _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'
78396747b715Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
784005b261ecSmrg
78416747b715Smrg	      # Not sure whether something based on
78426747b715Smrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
78436747b715Smrg	      # would be better.
78446747b715Smrg	      output_verbose_link_cmd='func_echo_all'
784505b261ecSmrg
78466747b715Smrg	      # Archives containing C++ object files must be created using
78476747b715Smrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
78486747b715Smrg	      # necessary to make sure instantiated templates are included
78496747b715Smrg	      # in the archive.
78506747b715Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
78516747b715Smrg	      ;;
78526747b715Smrg	    esac
78536747b715Smrg	    ;;
78546747b715Smrg	esac
78556747b715Smrg	;;
785605b261ecSmrg
78576747b715Smrg      lynxos*)
78586747b715Smrg        # FIXME: insert proper C++ library support
78596747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
78606747b715Smrg	;;
786105b261ecSmrg
78626747b715Smrg      m88k*)
78636747b715Smrg        # FIXME: insert proper C++ library support
78646747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
78656747b715Smrg	;;
786605b261ecSmrg
78676747b715Smrg      mvs*)
78686747b715Smrg        case $cc_basename in
78696747b715Smrg          cxx*)
78706747b715Smrg	    # FIXME: insert proper C++ library support
78716747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
78726747b715Smrg	    ;;
78736747b715Smrg	  *)
78746747b715Smrg	    # FIXME: insert proper C++ library support
78756747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
78766747b715Smrg	    ;;
78776747b715Smrg	esac
78786747b715Smrg	;;
787905b261ecSmrg
78806747b715Smrg      netbsd*)
78816747b715Smrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
78826747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
78836747b715Smrg	  wlarc=
78846747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
78856747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
78866747b715Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
78876747b715Smrg	fi
78886747b715Smrg	# Workaround some broken pre-1.5 toolchains
78896747b715Smrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
78906747b715Smrg	;;
789105b261ecSmrg
78926747b715Smrg      *nto* | *qnx*)
78936747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
78946747b715Smrg	;;
789505b261ecSmrg
78966747b715Smrg      openbsd2*)
78976747b715Smrg        # C++ shared libraries are fairly broken
78986747b715Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
78996747b715Smrg	;;
790005b261ecSmrg
79016747b715Smrg      openbsd*)
79026747b715Smrg	if test -f /usr/libexec/ld.so; then
79036747b715Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
79046747b715Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
79056747b715Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
79066747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
79076747b715Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
79086747b715Smrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
79096747b715Smrg	    _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'
79106747b715Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
79116747b715Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
79126747b715Smrg	  fi
79136747b715Smrg	  output_verbose_link_cmd=func_echo_all
79146747b715Smrg	else
79156747b715Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
79166747b715Smrg	fi
79176747b715Smrg	;;
791805b261ecSmrg
79196747b715Smrg      osf3* | osf4* | osf5*)
79206747b715Smrg        case $cc_basename in
79216747b715Smrg          KCC*)
79226747b715Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
792305b261ecSmrg
79246747b715Smrg	    # KCC will only create a shared library if the output file
79256747b715Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
79266747b715Smrg	    # to its proper name (with version) after linking.
79276747b715Smrg	    _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'
792805b261ecSmrg
79296747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
79306747b715Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
793105b261ecSmrg
79326747b715Smrg	    # Archives containing C++ object files must be created using
79336747b715Smrg	    # the KAI C++ compiler.
79346747b715Smrg	    case $host in
79356747b715Smrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
79366747b715Smrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
79376747b715Smrg	    esac
79386747b715Smrg	    ;;
79396747b715Smrg          RCC*)
79406747b715Smrg	    # Rational C++ 2.4.1
79416747b715Smrg	    # FIXME: insert proper C++ library support
79426747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
79436747b715Smrg	    ;;
79446747b715Smrg          cxx*)
79456747b715Smrg	    case $host in
79466747b715Smrg	      osf3*)
79476747b715Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
79486747b715Smrg	        _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'
79496747b715Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
79506747b715Smrg		;;
79516747b715Smrg	      *)
79526747b715Smrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
79536747b715Smrg	        _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'
79546747b715Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
79556747b715Smrg	          echo "-hidden">> $lib.exp~
79566747b715Smrg	          $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~
79576747b715Smrg	          $RM $lib.exp'
79586747b715Smrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
79596747b715Smrg		;;
79606747b715Smrg	    esac
796105b261ecSmrg
79626747b715Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
796305b261ecSmrg
79646747b715Smrg	    # Commands to make compiler produce verbose output that lists
79656747b715Smrg	    # what "hidden" libraries, object files and flags are used when
79666747b715Smrg	    # linking a shared library.
79676747b715Smrg	    #
79686747b715Smrg	    # There doesn't appear to be a way to prevent this compiler from
79696747b715Smrg	    # explicitly linking system object files so we need to strip them
79706747b715Smrg	    # from the output so that they don't get included in the library
79716747b715Smrg	    # dependencies.
79726747b715Smrg	    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"'
79736747b715Smrg	    ;;
79746747b715Smrg	  *)
79756747b715Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
79766747b715Smrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
79776747b715Smrg	      case $host in
79786747b715Smrg	        osf3*)
79796747b715Smrg	          _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'
79806747b715Smrg		  ;;
79816747b715Smrg	        *)
79826747b715Smrg	          _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'
79836747b715Smrg		  ;;
79846747b715Smrg	      esac
798505b261ecSmrg
79866747b715Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
79876747b715Smrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
798805b261ecSmrg
79896747b715Smrg	      # Commands to make compiler produce verbose output that lists
79906747b715Smrg	      # what "hidden" libraries, object files and flags are used when
79916747b715Smrg	      # linking a shared library.
79926747b715Smrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
799305b261ecSmrg
79946747b715Smrg	    else
79956747b715Smrg	      # FIXME: insert proper C++ library support
79966747b715Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
79976747b715Smrg	    fi
79986747b715Smrg	    ;;
79996747b715Smrg        esac
80006747b715Smrg        ;;
800105b261ecSmrg
80026747b715Smrg      psos*)
80036747b715Smrg        # FIXME: insert proper C++ library support
80046747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
80056747b715Smrg        ;;
800605b261ecSmrg
80076747b715Smrg      sunos4*)
80086747b715Smrg        case $cc_basename in
80096747b715Smrg          CC*)
80106747b715Smrg	    # Sun C++ 4.x
80116747b715Smrg	    # FIXME: insert proper C++ library support
80126747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
80136747b715Smrg	    ;;
80146747b715Smrg          lcc*)
80156747b715Smrg	    # Lucid
80166747b715Smrg	    # FIXME: insert proper C++ library support
80176747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
80186747b715Smrg	    ;;
80196747b715Smrg          *)
80206747b715Smrg	    # FIXME: insert proper C++ library support
80216747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
80226747b715Smrg	    ;;
80236747b715Smrg        esac
80246747b715Smrg        ;;
80254642e01fSmrg
80266747b715Smrg      solaris*)
80276747b715Smrg        case $cc_basename in
80286747b715Smrg          CC* | sunCC*)
80296747b715Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
80306747b715Smrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
80316747b715Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
80326747b715Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
80336747b715Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
80346747b715Smrg	      $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'
803505b261ecSmrg
80366747b715Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
80376747b715Smrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
80386747b715Smrg	    case $host_os in
80396747b715Smrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
80406747b715Smrg	      *)
80416747b715Smrg		# The compiler driver will combine and reorder linker options,
80426747b715Smrg		# but understands `-z linker_flag'.
80436747b715Smrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
80446747b715Smrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
80456747b715Smrg	        ;;
80466747b715Smrg	    esac
80476747b715Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
804805b261ecSmrg
80496747b715Smrg	    output_verbose_link_cmd='func_echo_all'
80504642e01fSmrg
80516747b715Smrg	    # Archives containing C++ object files must be created using
80526747b715Smrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
80536747b715Smrg	    # necessary to make sure instantiated templates are included
80546747b715Smrg	    # in the archive.
80556747b715Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
80566747b715Smrg	    ;;
80576747b715Smrg          gcx*)
80586747b715Smrg	    # Green Hills C++ Compiler
80596747b715Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
80604642e01fSmrg
80616747b715Smrg	    # The C++ compiler must be used to create the archive.
80626747b715Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
80636747b715Smrg	    ;;
80646747b715Smrg          *)
80656747b715Smrg	    # GNU C++ compiler with Solaris linker
80666747b715Smrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
80676747b715Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
80686747b715Smrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
80696747b715Smrg	        _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'
80706747b715Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
80716747b715Smrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
80724642e01fSmrg
80736747b715Smrg	        # Commands to make compiler produce verbose output that lists
80746747b715Smrg	        # what "hidden" libraries, object files and flags are used when
80756747b715Smrg	        # linking a shared library.
80766747b715Smrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
80776747b715Smrg	      else
80786747b715Smrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
80796747b715Smrg	        # platform.
80806747b715Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
80816747b715Smrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
80826747b715Smrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
80834642e01fSmrg
80846747b715Smrg	        # Commands to make compiler produce verbose output that lists
80856747b715Smrg	        # what "hidden" libraries, object files and flags are used when
80866747b715Smrg	        # linking a shared library.
80876747b715Smrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
80886747b715Smrg	      fi
808905b261ecSmrg
80906747b715Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
80916747b715Smrg	      case $host_os in
80926747b715Smrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
80936747b715Smrg		*)
80946747b715Smrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
80956747b715Smrg		  ;;
80966747b715Smrg	      esac
80976747b715Smrg	    fi
80986747b715Smrg	    ;;
80996747b715Smrg        esac
81006747b715Smrg        ;;
810105b261ecSmrg
81026747b715Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
81036747b715Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
81046747b715Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
81056747b715Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
81066747b715Smrg      runpath_var='LD_RUN_PATH'
810705b261ecSmrg
81086747b715Smrg      case $cc_basename in
81096747b715Smrg        CC*)
81106747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81116747b715Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81126747b715Smrg	  ;;
81136747b715Smrg	*)
81146747b715Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81156747b715Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81166747b715Smrg	  ;;
81176747b715Smrg      esac
81186747b715Smrg      ;;
811905b261ecSmrg
81206747b715Smrg      sysv5* | sco3.2v5* | sco5v6*)
81216747b715Smrg	# Note: We can NOT use -z defs as we might desire, because we do not
81226747b715Smrg	# link with -lc, and that would cause any symbols used from libc to
81236747b715Smrg	# always be unresolved, which means just about no library would
81246747b715Smrg	# ever link correctly.  If we're not using GNU ld we use -z text
81256747b715Smrg	# though, which does catch some bad symbols but isn't as heavy-handed
81266747b715Smrg	# as -z defs.
81276747b715Smrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
81286747b715Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
81296747b715Smrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
81306747b715Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
81316747b715Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
81326747b715Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
81336747b715Smrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
81346747b715Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
81356747b715Smrg	runpath_var='LD_RUN_PATH'
81366747b715Smrg
81376747b715Smrg	case $cc_basename in
81386747b715Smrg          CC*)
81396747b715Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81406747b715Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81416747b715Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
81426747b715Smrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
81436747b715Smrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
81446747b715Smrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
81456747b715Smrg	    ;;
81466747b715Smrg	  *)
81476747b715Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81486747b715Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
81496747b715Smrg	    ;;
81506747b715Smrg	esac
81516747b715Smrg      ;;
815205b261ecSmrg
81536747b715Smrg      tandem*)
81546747b715Smrg        case $cc_basename in
81556747b715Smrg          NCC*)
81566747b715Smrg	    # NonStop-UX NCC 3.20
81576747b715Smrg	    # FIXME: insert proper C++ library support
81586747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
81596747b715Smrg	    ;;
81606747b715Smrg          *)
81616747b715Smrg	    # FIXME: insert proper C++ library support
81626747b715Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
81636747b715Smrg	    ;;
81646747b715Smrg        esac
81656747b715Smrg        ;;
816605b261ecSmrg
81676747b715Smrg      vxworks*)
81686747b715Smrg        # FIXME: insert proper C++ library support
81696747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
81706747b715Smrg        ;;
817105b261ecSmrg
81726747b715Smrg      *)
81736747b715Smrg        # FIXME: insert proper C++ library support
81746747b715Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
81756747b715Smrg        ;;
81766747b715Smrg    esac
817705b261ecSmrg
81786747b715Smrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
81796747b715Smrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
818005b261ecSmrg
81816747b715Smrg    _LT_TAGVAR(GCC, $1)="$GXX"
81826747b715Smrg    _LT_TAGVAR(LD, $1)="$LD"
818305b261ecSmrg
81846747b715Smrg    ## CAVEAT EMPTOR:
81856747b715Smrg    ## There is no encapsulation within the following macros, do not change
81866747b715Smrg    ## the running order or otherwise move them around unless you know exactly
81876747b715Smrg    ## what you are doing...
81886747b715Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
81896747b715Smrg    _LT_COMPILER_PIC($1)
81906747b715Smrg    _LT_COMPILER_C_O($1)
81916747b715Smrg    _LT_COMPILER_FILE_LOCKS($1)
81926747b715Smrg    _LT_LINKER_SHLIBS($1)
81936747b715Smrg    _LT_SYS_DYNAMIC_LINKER($1)
81946747b715Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
819505b261ecSmrg
81966747b715Smrg    _LT_CONFIG($1)
81976747b715Smrg  fi # test -n "$compiler"
819805b261ecSmrg
81996747b715Smrg  CC=$lt_save_CC
82006747b715Smrg  CFLAGS=$lt_save_CFLAGS
82016747b715Smrg  LDCXX=$LD
82026747b715Smrg  LD=$lt_save_LD
82036747b715Smrg  GCC=$lt_save_GCC
82046747b715Smrg  with_gnu_ld=$lt_save_with_gnu_ld
82056747b715Smrg  lt_cv_path_LDCXX=$lt_cv_path_LD
82066747b715Smrg  lt_cv_path_LD=$lt_save_path_LD
82076747b715Smrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
82086747b715Smrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
82096747b715Smrgfi # test "$_lt_caught_CXX_error" != yes
821005b261ecSmrg
82116747b715SmrgAC_LANG_POP
82126747b715Smrg])# _LT_LANG_CXX_CONFIG
821305b261ecSmrg
82144642e01fSmrg
82156747b715Smrg# _LT_FUNC_STRIPNAME_CNF
82166747b715Smrg# ----------------------
82176747b715Smrg# func_stripname_cnf prefix suffix name
82184642e01fSmrg# strip PREFIX and SUFFIX off of NAME.
82194642e01fSmrg# PREFIX and SUFFIX must not contain globbing or regex special
82204642e01fSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
82214642e01fSmrg# dot (in which case that matches only a dot).
82226747b715Smrg#
82236747b715Smrg# This function is identical to the (non-XSI) version of func_stripname,
82246747b715Smrg# except this one can be used by m4 code that may be executed by configure,
82256747b715Smrg# rather than the libtool script.
82266747b715Smrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
82276747b715SmrgAC_REQUIRE([_LT_DECL_SED])
82286747b715SmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
82296747b715Smrgfunc_stripname_cnf ()
82304642e01fSmrg{
82314642e01fSmrg  case ${2} in
82326747b715Smrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
82336747b715Smrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
82344642e01fSmrg  esac
82356747b715Smrg} # func_stripname_cnf
82366747b715Smrg])# _LT_FUNC_STRIPNAME_CNF
82374642e01fSmrg
82386747b715Smrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
82396747b715Smrg# ---------------------------------
82406747b715Smrg# Figure out "hidden" library dependencies from verbose
82416747b715Smrg# compiler output when linking a shared library.
82426747b715Smrg# Parse the compiler output and extract the necessary
82436747b715Smrg# objects, libraries and library flags.
82446747b715Smrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
82456747b715Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
82466747b715SmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
82476747b715Smrg# Dependencies to place before and after the object being linked:
82486747b715Smrg_LT_TAGVAR(predep_objects, $1)=
82496747b715Smrg_LT_TAGVAR(postdep_objects, $1)=
82506747b715Smrg_LT_TAGVAR(predeps, $1)=
82516747b715Smrg_LT_TAGVAR(postdeps, $1)=
82526747b715Smrg_LT_TAGVAR(compiler_lib_search_path, $1)=
82534642e01fSmrg
82546747b715Smrgdnl we can't use the lt_simple_compile_test_code here,
82556747b715Smrgdnl because it contains code intended for an executable,
82566747b715Smrgdnl not a library.  It's possible we should let each
82576747b715Smrgdnl tag define a new lt_????_link_test_code variable,
82586747b715Smrgdnl but it's only used here...
82596747b715Smrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
82606747b715Smrgint a;
82616747b715Smrgvoid foo (void) { a = 0; }
82624642e01fSmrg_LT_EOF
82636747b715Smrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
82646747b715Smrgclass Foo
82654642e01fSmrg{
82666747b715Smrgpublic:
82676747b715Smrg  Foo (void) { a = 0; }
82686747b715Smrgprivate:
82696747b715Smrg  int a;
82706747b715Smrg};
82714642e01fSmrg_LT_EOF
82726747b715Smrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
82736747b715Smrg      subroutine foo
82746747b715Smrg      implicit none
82756747b715Smrg      integer*4 a
82766747b715Smrg      a=0
82776747b715Smrg      return
82786747b715Smrg      end
82796747b715Smrg_LT_EOF
82806747b715Smrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
82816747b715Smrg      subroutine foo
82826747b715Smrg      implicit none
82836747b715Smrg      integer a
82846747b715Smrg      a=0
82856747b715Smrg      return
82866747b715Smrg      end
82876747b715Smrg_LT_EOF
82886747b715Smrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
82896747b715Smrgpublic class foo {
82906747b715Smrg  private int a;
82916747b715Smrg  public void bar (void) {
82926747b715Smrg    a = 0;
82936747b715Smrg  }
82946747b715Smrg};
82954642e01fSmrg_LT_EOF
82964642e01fSmrg])
829705b261ecSmrg
82986747b715Smrg_lt_libdeps_save_CFLAGS=$CFLAGS
82996747b715Smrgcase "$CC $CFLAGS " in #(
83006747b715Smrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
83016747b715Smrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
83026747b715Smrgesac
830305b261ecSmrg
83046747b715Smrgdnl Parse the compiler output and extract the necessary
83056747b715Smrgdnl objects, libraries and library flags.
83066747b715Smrgif AC_TRY_EVAL(ac_compile); then
83076747b715Smrg  # Parse the compiler output and extract the necessary
83086747b715Smrg  # objects, libraries and library flags.
830905b261ecSmrg
83106747b715Smrg  # Sentinel used to keep track of whether or not we are before
83116747b715Smrg  # the conftest object file.
83126747b715Smrg  pre_test_object_deps_done=no
83134642e01fSmrg
83146747b715Smrg  for p in `eval "$output_verbose_link_cmd"`; do
83156747b715Smrg    case ${prev}${p} in
831605b261ecSmrg
83176747b715Smrg    -L* | -R* | -l*)
83186747b715Smrg       # Some compilers place space between "-{L,R}" and the path.
83196747b715Smrg       # Remove the space.
83206747b715Smrg       if test $p = "-L" ||
83216747b715Smrg          test $p = "-R"; then
83226747b715Smrg	 prev=$p
83236747b715Smrg	 continue
83246747b715Smrg       fi
832505b261ecSmrg
83266747b715Smrg       # Expand the sysroot to ease extracting the directories later.
83276747b715Smrg       if test -z "$prev"; then
83286747b715Smrg         case $p in
83296747b715Smrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
83306747b715Smrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
83316747b715Smrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
83326747b715Smrg         esac
83336747b715Smrg       fi
83346747b715Smrg       case $p in
83356747b715Smrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
83366747b715Smrg       esac
83376747b715Smrg       if test "$pre_test_object_deps_done" = no; then
83386747b715Smrg	 case ${prev} in
83396747b715Smrg	 -L | -R)
83406747b715Smrg	   # Internal compiler library paths should come after those
83416747b715Smrg	   # provided the user.  The postdeps already come after the
83426747b715Smrg	   # user supplied libs so there is no need to process them.
83436747b715Smrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
83446747b715Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
83456747b715Smrg	   else
83466747b715Smrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
83476747b715Smrg	   fi
83486747b715Smrg	   ;;
83496747b715Smrg	 # The "-l" case would never come before the object being
83506747b715Smrg	 # linked, so don't bother handling this case.
83516747b715Smrg	 esac
83526747b715Smrg       else
83536747b715Smrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
83546747b715Smrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
83556747b715Smrg	 else
83566747b715Smrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
83576747b715Smrg	 fi
83586747b715Smrg       fi
83596747b715Smrg       prev=
83606747b715Smrg       ;;
836105b261ecSmrg
83626747b715Smrg    *.lto.$objext) ;; # Ignore GCC LTO objects
83636747b715Smrg    *.$objext)
83646747b715Smrg       # This assumes that the test object file only shows up
83656747b715Smrg       # once in the compiler output.
83666747b715Smrg       if test "$p" = "conftest.$objext"; then
83676747b715Smrg	 pre_test_object_deps_done=yes
83686747b715Smrg	 continue
83696747b715Smrg       fi
83706747b715Smrg
83716747b715Smrg       if test "$pre_test_object_deps_done" = no; then
83726747b715Smrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
83736747b715Smrg	   _LT_TAGVAR(predep_objects, $1)="$p"
83746747b715Smrg	 else
83756747b715Smrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
83766747b715Smrg	 fi
83776747b715Smrg       else
83786747b715Smrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
83796747b715Smrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
83806747b715Smrg	 else
83816747b715Smrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
83826747b715Smrg	 fi
83836747b715Smrg       fi
83846747b715Smrg       ;;
838505b261ecSmrg
83866747b715Smrg    *) ;; # Ignore the rest.
838705b261ecSmrg
83886747b715Smrg    esac
83896747b715Smrg  done
839005b261ecSmrg
83916747b715Smrg  # Clean up.
83926747b715Smrg  rm -f a.out a.exe
83936747b715Smrgelse
83946747b715Smrg  echo "libtool.m4: error: problem compiling $1 test program"
83956747b715Smrgfi
839605b261ecSmrg
83976747b715Smrg$RM -f confest.$objext
83986747b715SmrgCFLAGS=$_lt_libdeps_save_CFLAGS
839905b261ecSmrg
84006747b715Smrg# PORTME: override above test on systems where it is broken
84016747b715Smrgm4_if([$1], [CXX],
84026747b715Smrg[case $host_os in
84036747b715Smrginterix[[3-9]]*)
84046747b715Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
84056747b715Smrg  # hack all around it, let's just trust "g++" to DTRT.
84066747b715Smrg  _LT_TAGVAR(predep_objects,$1)=
84076747b715Smrg  _LT_TAGVAR(postdep_objects,$1)=
84086747b715Smrg  _LT_TAGVAR(postdeps,$1)=
84096747b715Smrg  ;;
841005b261ecSmrg
84116747b715Smrglinux*)
84126747b715Smrg  case `$CC -V 2>&1 | sed 5q` in
84136747b715Smrg  *Sun\ C*)
84146747b715Smrg    # Sun C++ 5.9
841505b261ecSmrg
84166747b715Smrg    # The more standards-conforming stlport4 library is
84176747b715Smrg    # incompatible with the Cstd library. Avoid specifying
84186747b715Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
84196747b715Smrg    # -library=stlport4 depends on it.
84206747b715Smrg    case " $CXX $CXXFLAGS " in
84216747b715Smrg    *" -library=stlport4 "*)
84226747b715Smrg      solaris_use_stlport4=yes
84236747b715Smrg      ;;
84246747b715Smrg    esac
842505b261ecSmrg
84266747b715Smrg    if test "$solaris_use_stlport4" != yes; then
84276747b715Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
84286747b715Smrg    fi
84296747b715Smrg    ;;
84306747b715Smrg  esac
84316747b715Smrg  ;;
843205b261ecSmrg
84336747b715Smrgsolaris*)
84346747b715Smrg  case $cc_basename in
84356747b715Smrg  CC* | sunCC*)
84366747b715Smrg    # The more standards-conforming stlport4 library is
84376747b715Smrg    # incompatible with the Cstd library. Avoid specifying
84386747b715Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
84396747b715Smrg    # -library=stlport4 depends on it.
84406747b715Smrg    case " $CXX $CXXFLAGS " in
84416747b715Smrg    *" -library=stlport4 "*)
84426747b715Smrg      solaris_use_stlport4=yes
84436747b715Smrg      ;;
84446747b715Smrg    esac
84456747b715Smrg
84466747b715Smrg    # Adding this requires a known-good setup of shared libraries for
84476747b715Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
84486747b715Smrg    # archive will be linked into the output, leading to subtle bugs.
84496747b715Smrg    if test "$solaris_use_stlport4" != yes; then
84506747b715Smrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
84516747b715Smrg    fi
84526747b715Smrg    ;;
84536747b715Smrg  esac
84544642e01fSmrg  ;;
84554642e01fSmrgesac
84566747b715Smrg])
845705b261ecSmrg
84586747b715Smrgcase " $_LT_TAGVAR(postdeps, $1) " in
84596747b715Smrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
84606747b715Smrgesac
84616747b715Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
84626747b715Smrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
84636747b715Smrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
84646747b715Smrgfi
84656747b715Smrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
84666747b715Smrg    [The directories searched by this compiler when creating a shared library])
84676747b715Smrg_LT_TAGDECL([], [predep_objects], [1],
84686747b715Smrg    [Dependencies to place before and after the objects being linked to
84696747b715Smrg    create a shared library])
84706747b715Smrg_LT_TAGDECL([], [postdep_objects], [1])
84716747b715Smrg_LT_TAGDECL([], [predeps], [1])
84726747b715Smrg_LT_TAGDECL([], [postdeps], [1])
84736747b715Smrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
84746747b715Smrg    [The library search path used internally by the compiler when linking
84756747b715Smrg    a shared library])
84766747b715Smrg])# _LT_SYS_HIDDEN_LIBDEPS
847705b261ecSmrg
847805b261ecSmrg
84796747b715Smrg# _LT_LANG_F77_CONFIG([TAG])
84806747b715Smrg# --------------------------
84816747b715Smrg# Ensure that the configuration variables for a Fortran 77 compiler are
84826747b715Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
84836747b715Smrg# to write the compiler configuration to `libtool'.
84846747b715Smrgm4_defun([_LT_LANG_F77_CONFIG],
84856747b715Smrg[AC_LANG_PUSH(Fortran 77)
84866747b715Smrgif test -z "$F77" || test "X$F77" = "Xno"; then
84876747b715Smrg  _lt_disable_F77=yes
84886747b715Smrgfi
848905b261ecSmrg
84906747b715Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
84916747b715Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
84926747b715Smrg_LT_TAGVAR(always_export_symbols, $1)=no
84936747b715Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
84946747b715Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
84956747b715Smrg_LT_TAGVAR(hardcode_direct, $1)=no
84966747b715Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
84976747b715Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
84986747b715Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
84996747b715Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
85006747b715Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
85016747b715Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
85026747b715Smrg_LT_TAGVAR(inherit_rpath, $1)=no
85036747b715Smrg_LT_TAGVAR(module_cmds, $1)=
85046747b715Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
85056747b715Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
85066747b715Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
85076747b715Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
85086747b715Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
85096747b715Smrg_LT_TAGVAR(no_undefined_flag, $1)=
85106747b715Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
85116747b715Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
851205b261ecSmrg
85136747b715Smrg# Source file extension for f77 test sources.
85146747b715Smrgac_ext=f
851505b261ecSmrg
85166747b715Smrg# Object file extension for compiled f77 test sources.
85176747b715Smrgobjext=o
85186747b715Smrg_LT_TAGVAR(objext, $1)=$objext
851905b261ecSmrg
85206747b715Smrg# No sense in running all these tests if we already determined that
85216747b715Smrg# the F77 compiler isn't working.  Some variables (like enable_shared)
85226747b715Smrg# are currently assumed to apply to all compilers on this platform,
85236747b715Smrg# and will be corrupted by setting them based on a non-working compiler.
85246747b715Smrgif test "$_lt_disable_F77" != yes; then
85256747b715Smrg  # Code to be used in simple compile tests
85266747b715Smrg  lt_simple_compile_test_code="\
85276747b715Smrg      subroutine t
85286747b715Smrg      return
85296747b715Smrg      end
85306747b715Smrg"
85316747b715Smrg
85326747b715Smrg  # Code to be used in simple link tests
85336747b715Smrg  lt_simple_link_test_code="\
85346747b715Smrg      program t
85356747b715Smrg      end
85366747b715Smrg"
85376747b715Smrg
85386747b715Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
85396747b715Smrg  _LT_TAG_COMPILER
854005b261ecSmrg
85416747b715Smrg  # save warnings/boilerplate of simple test code
85426747b715Smrg  _LT_COMPILER_BOILERPLATE
85436747b715Smrg  _LT_LINKER_BOILERPLATE
854405b261ecSmrg
85456747b715Smrg  # Allow CC to be a program name with arguments.
85466747b715Smrg  lt_save_CC="$CC"
85476747b715Smrg  lt_save_GCC=$GCC
85486747b715Smrg  lt_save_CFLAGS=$CFLAGS
85496747b715Smrg  CC=${F77-"f77"}
85506747b715Smrg  CFLAGS=$FFLAGS
85516747b715Smrg  compiler=$CC
85526747b715Smrg  _LT_TAGVAR(compiler, $1)=$CC
85536747b715Smrg  _LT_CC_BASENAME([$compiler])
85546747b715Smrg  GCC=$G77
85556747b715Smrg  if test -n "$compiler"; then
85566747b715Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
85576747b715Smrg    AC_MSG_RESULT([$can_build_shared])
855805b261ecSmrg
85596747b715Smrg    AC_MSG_CHECKING([whether to build shared libraries])
85606747b715Smrg    test "$can_build_shared" = "no" && enable_shared=no
856105b261ecSmrg
85626747b715Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
85636747b715Smrg    # are all built from PIC.
85646747b715Smrg    case $host_os in
85656747b715Smrg      aix3*)
85666747b715Smrg        test "$enable_shared" = yes && enable_static=no
85676747b715Smrg        if test -n "$RANLIB"; then
85686747b715Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
85696747b715Smrg          postinstall_cmds='$RANLIB $lib'
85706747b715Smrg        fi
85716747b715Smrg        ;;
85726747b715Smrg      aix[[4-9]]*)
85736747b715Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
85746747b715Smrg	  test "$enable_shared" = yes && enable_static=no
85756747b715Smrg	fi
85766747b715Smrg        ;;
85776747b715Smrg    esac
85786747b715Smrg    AC_MSG_RESULT([$enable_shared])
857905b261ecSmrg
85806747b715Smrg    AC_MSG_CHECKING([whether to build static libraries])
85816747b715Smrg    # Make sure either enable_shared or enable_static is yes.
85826747b715Smrg    test "$enable_shared" = yes || enable_static=yes
85836747b715Smrg    AC_MSG_RESULT([$enable_static])
858405b261ecSmrg
85856747b715Smrg    _LT_TAGVAR(GCC, $1)="$G77"
85866747b715Smrg    _LT_TAGVAR(LD, $1)="$LD"
858705b261ecSmrg
85886747b715Smrg    ## CAVEAT EMPTOR:
85896747b715Smrg    ## There is no encapsulation within the following macros, do not change
85906747b715Smrg    ## the running order or otherwise move them around unless you know exactly
85916747b715Smrg    ## what you are doing...
85926747b715Smrg    _LT_COMPILER_PIC($1)
85936747b715Smrg    _LT_COMPILER_C_O($1)
85946747b715Smrg    _LT_COMPILER_FILE_LOCKS($1)
85956747b715Smrg    _LT_LINKER_SHLIBS($1)
85966747b715Smrg    _LT_SYS_DYNAMIC_LINKER($1)
85976747b715Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
859805b261ecSmrg
85996747b715Smrg    _LT_CONFIG($1)
86006747b715Smrg  fi # test -n "$compiler"
860105b261ecSmrg
86026747b715Smrg  GCC=$lt_save_GCC
86036747b715Smrg  CC="$lt_save_CC"
86046747b715Smrg  CFLAGS="$lt_save_CFLAGS"
86056747b715Smrgfi # test "$_lt_disable_F77" != yes
860605b261ecSmrg
86076747b715SmrgAC_LANG_POP
86086747b715Smrg])# _LT_LANG_F77_CONFIG
860905b261ecSmrg
861005b261ecSmrg
86116747b715Smrg# _LT_LANG_FC_CONFIG([TAG])
86126747b715Smrg# -------------------------
86136747b715Smrg# Ensure that the configuration variables for a Fortran compiler are
86146747b715Smrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
86156747b715Smrg# to write the compiler configuration to `libtool'.
86166747b715Smrgm4_defun([_LT_LANG_FC_CONFIG],
86176747b715Smrg[AC_LANG_PUSH(Fortran)
861805b261ecSmrg
86196747b715Smrgif test -z "$FC" || test "X$FC" = "Xno"; then
86206747b715Smrg  _lt_disable_FC=yes
86216747b715Smrgfi
862205b261ecSmrg
86236747b715Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
86246747b715Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
86256747b715Smrg_LT_TAGVAR(always_export_symbols, $1)=no
86266747b715Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
86276747b715Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
86286747b715Smrg_LT_TAGVAR(hardcode_direct, $1)=no
86296747b715Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
86306747b715Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
86316747b715Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
86326747b715Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
86336747b715Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
86346747b715Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
86356747b715Smrg_LT_TAGVAR(inherit_rpath, $1)=no
86366747b715Smrg_LT_TAGVAR(module_cmds, $1)=
86376747b715Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
86386747b715Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
86396747b715Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
86406747b715Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
86416747b715Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
86426747b715Smrg_LT_TAGVAR(no_undefined_flag, $1)=
86436747b715Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
86446747b715Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
864505b261ecSmrg
86466747b715Smrg# Source file extension for fc test sources.
86476747b715Smrgac_ext=${ac_fc_srcext-f}
864805b261ecSmrg
86496747b715Smrg# Object file extension for compiled fc test sources.
86506747b715Smrgobjext=o
86516747b715Smrg_LT_TAGVAR(objext, $1)=$objext
86524642e01fSmrg
86536747b715Smrg# No sense in running all these tests if we already determined that
86546747b715Smrg# the FC compiler isn't working.  Some variables (like enable_shared)
86556747b715Smrg# are currently assumed to apply to all compilers on this platform,
86566747b715Smrg# and will be corrupted by setting them based on a non-working compiler.
86576747b715Smrgif test "$_lt_disable_FC" != yes; then
86586747b715Smrg  # Code to be used in simple compile tests
86596747b715Smrg  lt_simple_compile_test_code="\
86606747b715Smrg      subroutine t
86616747b715Smrg      return
86626747b715Smrg      end
86636747b715Smrg"
86644642e01fSmrg
86656747b715Smrg  # Code to be used in simple link tests
86666747b715Smrg  lt_simple_link_test_code="\
86676747b715Smrg      program t
86686747b715Smrg      end
86696747b715Smrg"
867005b261ecSmrg
86716747b715Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
86726747b715Smrg  _LT_TAG_COMPILER
867305b261ecSmrg
86746747b715Smrg  # save warnings/boilerplate of simple test code
86756747b715Smrg  _LT_COMPILER_BOILERPLATE
86766747b715Smrg  _LT_LINKER_BOILERPLATE
867705b261ecSmrg
86786747b715Smrg  # Allow CC to be a program name with arguments.
86796747b715Smrg  lt_save_CC="$CC"
86806747b715Smrg  lt_save_GCC=$GCC
86816747b715Smrg  lt_save_CFLAGS=$CFLAGS
86826747b715Smrg  CC=${FC-"f95"}
86836747b715Smrg  CFLAGS=$FCFLAGS
86846747b715Smrg  compiler=$CC
86856747b715Smrg  GCC=$ac_cv_fc_compiler_gnu
86864642e01fSmrg
86876747b715Smrg  _LT_TAGVAR(compiler, $1)=$CC
86886747b715Smrg  _LT_CC_BASENAME([$compiler])
86894642e01fSmrg
86906747b715Smrg  if test -n "$compiler"; then
86916747b715Smrg    AC_MSG_CHECKING([if libtool supports shared libraries])
86926747b715Smrg    AC_MSG_RESULT([$can_build_shared])
86934642e01fSmrg
86946747b715Smrg    AC_MSG_CHECKING([whether to build shared libraries])
86956747b715Smrg    test "$can_build_shared" = "no" && enable_shared=no
86964642e01fSmrg
86976747b715Smrg    # On AIX, shared libraries and static libraries use the same namespace, and
86986747b715Smrg    # are all built from PIC.
86996747b715Smrg    case $host_os in
87006747b715Smrg      aix3*)
87016747b715Smrg        test "$enable_shared" = yes && enable_static=no
87026747b715Smrg        if test -n "$RANLIB"; then
87036747b715Smrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
87046747b715Smrg          postinstall_cmds='$RANLIB $lib'
87056747b715Smrg        fi
87066747b715Smrg        ;;
87076747b715Smrg      aix[[4-9]]*)
87086747b715Smrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
87096747b715Smrg	  test "$enable_shared" = yes && enable_static=no
87106747b715Smrg	fi
87116747b715Smrg        ;;
87126747b715Smrg    esac
87136747b715Smrg    AC_MSG_RESULT([$enable_shared])
87144642e01fSmrg
87156747b715Smrg    AC_MSG_CHECKING([whether to build static libraries])
87166747b715Smrg    # Make sure either enable_shared or enable_static is yes.
87176747b715Smrg    test "$enable_shared" = yes || enable_static=yes
87186747b715Smrg    AC_MSG_RESULT([$enable_static])
87194642e01fSmrg
87206747b715Smrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
87216747b715Smrg    _LT_TAGVAR(LD, $1)="$LD"
87224642e01fSmrg
87236747b715Smrg    ## CAVEAT EMPTOR:
87246747b715Smrg    ## There is no encapsulation within the following macros, do not change
87256747b715Smrg    ## the running order or otherwise move them around unless you know exactly
87266747b715Smrg    ## what you are doing...
87276747b715Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
87286747b715Smrg    _LT_COMPILER_PIC($1)
87296747b715Smrg    _LT_COMPILER_C_O($1)
87306747b715Smrg    _LT_COMPILER_FILE_LOCKS($1)
87316747b715Smrg    _LT_LINKER_SHLIBS($1)
87326747b715Smrg    _LT_SYS_DYNAMIC_LINKER($1)
87336747b715Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
87344642e01fSmrg
87356747b715Smrg    _LT_CONFIG($1)
87366747b715Smrg  fi # test -n "$compiler"
873705b261ecSmrg
87386747b715Smrg  GCC=$lt_save_GCC
87396747b715Smrg  CC=$lt_save_CC
87406747b715Smrg  CFLAGS=$lt_save_CFLAGS
87416747b715Smrgfi # test "$_lt_disable_FC" != yes
874205b261ecSmrg
87436747b715SmrgAC_LANG_POP
87446747b715Smrg])# _LT_LANG_FC_CONFIG
874505b261ecSmrg
874605b261ecSmrg
87476747b715Smrg# _LT_LANG_GCJ_CONFIG([TAG])
87486747b715Smrg# --------------------------
87496747b715Smrg# Ensure that the configuration variables for the GNU Java Compiler compiler
87506747b715Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
87516747b715Smrg# to write the compiler configuration to `libtool'.
87526747b715Smrgm4_defun([_LT_LANG_GCJ_CONFIG],
87536747b715Smrg[AC_REQUIRE([LT_PROG_GCJ])dnl
87546747b715SmrgAC_LANG_SAVE
875505b261ecSmrg
87566747b715Smrg# Source file extension for Java test sources.
87576747b715Smrgac_ext=java
875805b261ecSmrg
87596747b715Smrg# Object file extension for compiled Java test sources.
87606747b715Smrgobjext=o
87616747b715Smrg_LT_TAGVAR(objext, $1)=$objext
876205b261ecSmrg
87636747b715Smrg# Code to be used in simple compile tests
87646747b715Smrglt_simple_compile_test_code="class foo {}"
876505b261ecSmrg
87666747b715Smrg# Code to be used in simple link tests
87676747b715Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
876805b261ecSmrg
87696747b715Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
87706747b715Smrg_LT_TAG_COMPILER
87714642e01fSmrg
87726747b715Smrg# save warnings/boilerplate of simple test code
87736747b715Smrg_LT_COMPILER_BOILERPLATE
87746747b715Smrg_LT_LINKER_BOILERPLATE
87754642e01fSmrg
87766747b715Smrg# Allow CC to be a program name with arguments.
87776747b715Smrglt_save_CC=$CC
87786747b715Smrglt_save_CFLAGS=$CFLAGS
87796747b715Smrglt_save_GCC=$GCC
87806747b715SmrgGCC=yes
87816747b715SmrgCC=${GCJ-"gcj"}
87826747b715SmrgCFLAGS=$GCJFLAGS
87836747b715Smrgcompiler=$CC
87846747b715Smrg_LT_TAGVAR(compiler, $1)=$CC
87856747b715Smrg_LT_TAGVAR(LD, $1)="$LD"
87866747b715Smrg_LT_CC_BASENAME([$compiler])
87874642e01fSmrg
87886747b715Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
87896747b715Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
87904642e01fSmrg
87916747b715Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
87926747b715Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
87936747b715Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
87944642e01fSmrg
87956747b715Smrgif test -n "$compiler"; then
87966747b715Smrg  _LT_COMPILER_NO_RTTI($1)
87976747b715Smrg  _LT_COMPILER_PIC($1)
87986747b715Smrg  _LT_COMPILER_C_O($1)
87996747b715Smrg  _LT_COMPILER_FILE_LOCKS($1)
88006747b715Smrg  _LT_LINKER_SHLIBS($1)
88016747b715Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
88024642e01fSmrg
88036747b715Smrg  _LT_CONFIG($1)
88046747b715Smrgfi
88054642e01fSmrg
88066747b715SmrgAC_LANG_RESTORE
88074642e01fSmrg
88086747b715SmrgGCC=$lt_save_GCC
88096747b715SmrgCC=$lt_save_CC
88106747b715SmrgCFLAGS=$lt_save_CFLAGS
88116747b715Smrg])# _LT_LANG_GCJ_CONFIG
88124642e01fSmrg
88134642e01fSmrg
88146747b715Smrg# _LT_LANG_RC_CONFIG([TAG])
88156747b715Smrg# -------------------------
88166747b715Smrg# Ensure that the configuration variables for the Windows resource compiler
88176747b715Smrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
88186747b715Smrg# to write the compiler configuration to `libtool'.
88196747b715Smrgm4_defun([_LT_LANG_RC_CONFIG],
88206747b715Smrg[AC_REQUIRE([LT_PROG_RC])dnl
88216747b715SmrgAC_LANG_SAVE
88224642e01fSmrg
88236747b715Smrg# Source file extension for RC test sources.
88246747b715Smrgac_ext=rc
88254642e01fSmrg
88266747b715Smrg# Object file extension for compiled RC test sources.
88276747b715Smrgobjext=o
88286747b715Smrg_LT_TAGVAR(objext, $1)=$objext
88294642e01fSmrg
88306747b715Smrg# Code to be used in simple compile tests
88316747b715Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
88324642e01fSmrg
88336747b715Smrg# Code to be used in simple link tests
88346747b715Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
88354642e01fSmrg
88366747b715Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
88376747b715Smrg_LT_TAG_COMPILER
88384642e01fSmrg
88396747b715Smrg# save warnings/boilerplate of simple test code
88406747b715Smrg_LT_COMPILER_BOILERPLATE
88416747b715Smrg_LT_LINKER_BOILERPLATE
88424642e01fSmrg
88436747b715Smrg# Allow CC to be a program name with arguments.
88446747b715Smrglt_save_CC="$CC"
88456747b715Smrglt_save_CFLAGS=$CFLAGS
88466747b715Smrglt_save_GCC=$GCC
88476747b715SmrgGCC=
88486747b715SmrgCC=${RC-"windres"}
88496747b715SmrgCFLAGS=
88506747b715Smrgcompiler=$CC
88516747b715Smrg_LT_TAGVAR(compiler, $1)=$CC
88526747b715Smrg_LT_CC_BASENAME([$compiler])
88536747b715Smrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
88544642e01fSmrg
88556747b715Smrgif test -n "$compiler"; then
88566747b715Smrg  :
88576747b715Smrg  _LT_CONFIG($1)
88586747b715Smrgfi
88594642e01fSmrg
88606747b715SmrgGCC=$lt_save_GCC
88616747b715SmrgAC_LANG_RESTORE
88626747b715SmrgCC=$lt_save_CC
88636747b715SmrgCFLAGS=$lt_save_CFLAGS
88646747b715Smrg])# _LT_LANG_RC_CONFIG
88654642e01fSmrg
88664642e01fSmrg
88676747b715Smrg# LT_PROG_GCJ
88686747b715Smrg# -----------
88696747b715SmrgAC_DEFUN([LT_PROG_GCJ],
88706747b715Smrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
88716747b715Smrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
88726747b715Smrg    [AC_CHECK_TOOL(GCJ, gcj,)
88736747b715Smrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
88746747b715Smrg      AC_SUBST(GCJFLAGS)])])[]dnl
88756747b715Smrg])
88764642e01fSmrg
88776747b715Smrg# Old name:
88786747b715SmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
88796747b715Smrgdnl aclocal-1.4 backwards compatibility:
88806747b715Smrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
88814642e01fSmrg
88824642e01fSmrg
88836747b715Smrg# LT_PROG_RC
88846747b715Smrg# ----------
88856747b715SmrgAC_DEFUN([LT_PROG_RC],
88866747b715Smrg[AC_CHECK_TOOL(RC, windres,)
88874642e01fSmrg])
88884642e01fSmrg
88896747b715Smrg# Old name:
88906747b715SmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
88916747b715Smrgdnl aclocal-1.4 backwards compatibility:
88926747b715Smrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
88934642e01fSmrg
88944642e01fSmrg
88956747b715Smrg# _LT_DECL_EGREP
88966747b715Smrg# --------------
88976747b715Smrg# If we don't have a new enough Autoconf to choose the best grep
88986747b715Smrg# available, choose the one first in the user's PATH.
88996747b715Smrgm4_defun([_LT_DECL_EGREP],
89006747b715Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
89016747b715SmrgAC_REQUIRE([AC_PROG_FGREP])dnl
89026747b715Smrgtest -z "$GREP" && GREP=grep
89036747b715Smrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
89046747b715Smrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
89056747b715Smrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
89066747b715Smrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
89076747b715SmrgAC_SUBST([GREP])
89086747b715Smrg])
89094642e01fSmrg
89104642e01fSmrg
89116747b715Smrg# _LT_DECL_OBJDUMP
89126747b715Smrg# --------------
89136747b715Smrg# If we don't have a new enough Autoconf to choose the best objdump
89146747b715Smrg# available, choose the one first in the user's PATH.
89156747b715Smrgm4_defun([_LT_DECL_OBJDUMP],
89166747b715Smrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
89176747b715Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
89186747b715Smrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
89196747b715SmrgAC_SUBST([OBJDUMP])
89206747b715Smrg])
89214642e01fSmrg
89226747b715Smrg# _LT_DECL_DLLTOOL
89236747b715Smrg# ----------------
89246747b715Smrg# Ensure DLLTOOL variable is set.
89256747b715Smrgm4_defun([_LT_DECL_DLLTOOL],
89266747b715Smrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
89276747b715Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
89286747b715Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
89296747b715SmrgAC_SUBST([DLLTOOL])
89306747b715Smrg])
89314642e01fSmrg
89326747b715Smrg# _LT_DECL_SED
89336747b715Smrg# ------------
89346747b715Smrg# Check for a fully-functional sed program, that truncates
89356747b715Smrg# as few characters as possible.  Prefer GNU sed if found.
89366747b715Smrgm4_defun([_LT_DECL_SED],
89376747b715Smrg[AC_PROG_SED
89386747b715Smrgtest -z "$SED" && SED=sed
89396747b715SmrgXsed="$SED -e 1s/^X//"
89406747b715Smrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
89416747b715Smrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
89426747b715Smrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
89436747b715Smrg])# _LT_DECL_SED
89444642e01fSmrg
89456747b715Smrgm4_ifndef([AC_PROG_SED], [
89466747b715Smrg# NOTE: This macro has been submitted for inclusion into   #
89476747b715Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
89486747b715Smrg#  a released version of Autoconf we should remove this    #
89496747b715Smrg#  macro and use it instead.                               #
89506747b715Smrg
89516747b715Smrgm4_defun([AC_PROG_SED],
89526747b715Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
89536747b715SmrgAC_CACHE_VAL(lt_cv_path_SED,
89546747b715Smrg[# Loop through the user's path and test for sed and gsed.
89556747b715Smrg# Then use that list of sed's as ones to test for truncation.
89566747b715Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
89576747b715Smrgfor as_dir in $PATH
89586747b715Smrgdo
89596747b715Smrg  IFS=$as_save_IFS
89606747b715Smrg  test -z "$as_dir" && as_dir=.
89616747b715Smrg  for lt_ac_prog in sed gsed; do
89626747b715Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
89636747b715Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
89646747b715Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
89656747b715Smrg      fi
89666747b715Smrg    done
89676747b715Smrg  done
89686747b715Smrgdone
89696747b715SmrgIFS=$as_save_IFS
89706747b715Smrglt_ac_max=0
89716747b715Smrglt_ac_count=0
89726747b715Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
89736747b715Smrg# along with /bin/sed that truncates output.
89746747b715Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
89756747b715Smrg  test ! -f $lt_ac_sed && continue
89766747b715Smrg  cat /dev/null > conftest.in
89776747b715Smrg  lt_ac_count=0
89786747b715Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
89796747b715Smrg  # Check for GNU sed and select it if it is found.
89806747b715Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
89816747b715Smrg    lt_cv_path_SED=$lt_ac_sed
89826747b715Smrg    break
89836747b715Smrg  fi
89846747b715Smrg  while true; do
89856747b715Smrg    cat conftest.in conftest.in >conftest.tmp
89866747b715Smrg    mv conftest.tmp conftest.in
89876747b715Smrg    cp conftest.in conftest.nl
89886747b715Smrg    echo >>conftest.nl
89896747b715Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
89906747b715Smrg    cmp -s conftest.out conftest.nl || break
89916747b715Smrg    # 10000 chars as input seems more than enough
89926747b715Smrg    test $lt_ac_count -gt 10 && break
89936747b715Smrg    lt_ac_count=`expr $lt_ac_count + 1`
89946747b715Smrg    if test $lt_ac_count -gt $lt_ac_max; then
89956747b715Smrg      lt_ac_max=$lt_ac_count
89966747b715Smrg      lt_cv_path_SED=$lt_ac_sed
89976747b715Smrg    fi
89986747b715Smrg  done
89996747b715Smrgdone
90006747b715Smrg])
90016747b715SmrgSED=$lt_cv_path_SED
90026747b715SmrgAC_SUBST([SED])
90036747b715SmrgAC_MSG_RESULT([$SED])
90046747b715Smrg])#AC_PROG_SED
90056747b715Smrg])#m4_ifndef
90064642e01fSmrg
90076747b715Smrg# Old name:
90086747b715SmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
90096747b715Smrgdnl aclocal-1.4 backwards compatibility:
90106747b715Smrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
90114642e01fSmrg
90124642e01fSmrg
90136747b715Smrg# _LT_CHECK_SHELL_FEATURES
90146747b715Smrg# ------------------------
90156747b715Smrg# Find out whether the shell is Bourne or XSI compatible,
90166747b715Smrg# or has some other useful features.
90176747b715Smrgm4_defun([_LT_CHECK_SHELL_FEATURES],
90186747b715Smrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
90196747b715Smrg# Try some XSI features
90206747b715Smrgxsi_shell=no
90216747b715Smrg( _lt_dummy="a/b/c"
90226747b715Smrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
90236747b715Smrg      = c,a/b,b/c, \
90246747b715Smrg    && eval 'test $(( 1 + 1 )) -eq 2 \
90256747b715Smrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
90266747b715Smrg  && xsi_shell=yes
90276747b715SmrgAC_MSG_RESULT([$xsi_shell])
90286747b715Smrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
90296747b715Smrg
90306747b715SmrgAC_MSG_CHECKING([whether the shell understands "+="])
90316747b715Smrglt_shell_append=no
90326747b715Smrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
90336747b715Smrg    >/dev/null 2>&1 \
90346747b715Smrg  && lt_shell_append=yes
90356747b715SmrgAC_MSG_RESULT([$lt_shell_append])
90366747b715Smrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
90376747b715Smrg
90386747b715Smrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
90396747b715Smrg  lt_unset=unset
90404642e01fSmrgelse
90416747b715Smrg  lt_unset=false
90426747b715Smrgfi
90436747b715Smrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
90444642e01fSmrg
90456747b715Smrg# test EBCDIC or ASCII
90466747b715Smrgcase `echo X|tr X '\101'` in
90476747b715Smrg A) # ASCII based system
90486747b715Smrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
90496747b715Smrg  lt_SP2NL='tr \040 \012'
90506747b715Smrg  lt_NL2SP='tr \015\012 \040\040'
90516747b715Smrg  ;;
90526747b715Smrg *) # EBCDIC based system
90536747b715Smrg  lt_SP2NL='tr \100 \n'
90546747b715Smrg  lt_NL2SP='tr \r\n \100\100'
90556747b715Smrg  ;;
90566747b715Smrgesac
90576747b715Smrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
90586747b715Smrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
90596747b715Smrg])# _LT_CHECK_SHELL_FEATURES
90604642e01fSmrg
90614642e01fSmrg
90626747b715Smrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
90636747b715Smrg# ------------------------------------------------------
90646747b715Smrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
90656747b715Smrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
90666747b715Smrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
90676747b715Smrg[dnl {
90686747b715Smrgsed -e '/^$1 ()$/,/^} # $1 /c\
90696747b715Smrg$1 ()\
90706747b715Smrg{\
90716747b715Smrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
90726747b715Smrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
90736747b715Smrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
90746747b715Smrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
90756747b715Smrgtest 0 -eq $? || _lt_function_replace_fail=:
90766747b715Smrg])
90774642e01fSmrg
90784642e01fSmrg
90796747b715Smrg# _LT_PROG_REPLACE_SHELLFNS
90806747b715Smrg# -------------------------
90816747b715Smrg# Replace existing portable implementations of several shell functions with
90826747b715Smrg# equivalent extended shell implementations where those features are available..
90836747b715Smrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
90846747b715Smrg[if test x"$xsi_shell" = xyes; then
90856747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
90866747b715Smrg    case ${1} in
90876747b715Smrg      */*) func_dirname_result="${1%/*}${2}" ;;
90886747b715Smrg      *  ) func_dirname_result="${3}" ;;
90896747b715Smrg    esac])
90906747b715Smrg
90916747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
90926747b715Smrg    func_basename_result="${1##*/}"])
90936747b715Smrg
90946747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
90956747b715Smrg    case ${1} in
90966747b715Smrg      */*) func_dirname_result="${1%/*}${2}" ;;
90976747b715Smrg      *  ) func_dirname_result="${3}" ;;
90986747b715Smrg    esac
90996747b715Smrg    func_basename_result="${1##*/}"])
91004642e01fSmrg
91016747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
91026747b715Smrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
91036747b715Smrg    # positional parameters, so assign one to ordinary parameter first.
91046747b715Smrg    func_stripname_result=${3}
91056747b715Smrg    func_stripname_result=${func_stripname_result#"${1}"}
91066747b715Smrg    func_stripname_result=${func_stripname_result%"${2}"}])
91074642e01fSmrg
91086747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
91096747b715Smrg    func_split_long_opt_name=${1%%=*}
91106747b715Smrg    func_split_long_opt_arg=${1#*=}])
91114642e01fSmrg
91126747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
91136747b715Smrg    func_split_short_opt_arg=${1#??}
91146747b715Smrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
911505b261ecSmrg
91166747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
91176747b715Smrg    case ${1} in
91186747b715Smrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
91196747b715Smrg      *)    func_lo2o_result=${1} ;;
91206747b715Smrg    esac])
91214642e01fSmrg
91226747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
91234642e01fSmrg
91246747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
91254642e01fSmrg
91266747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
91276747b715Smrgfi
912805b261ecSmrg
91296747b715Smrgif test x"$lt_shell_append" = xyes; then
91306747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
913105b261ecSmrg
91326747b715Smrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
91336747b715Smrg    func_quote_for_eval "${2}"
91346747b715Smrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
91356747b715Smrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
91366747b715Smrg
91376747b715Smrg  # Save a `func_append' function call where possible by direct use of '+='
91386747b715Smrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
91396747b715Smrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
91406747b715Smrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
91416747b715Smrg  test 0 -eq $? || _lt_function_replace_fail=:
91426747b715Smrgelse
91436747b715Smrg  # Save a `func_append' function call even when '+=' is not available
91446747b715Smrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
91456747b715Smrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
91466747b715Smrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
91476747b715Smrg  test 0 -eq $? || _lt_function_replace_fail=:
91486747b715Smrgfi
91496747b715Smrg
91506747b715Smrgif test x"$_lt_function_replace_fail" = x":"; then
91516747b715Smrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
91526747b715Smrgfi
915305b261ecSmrg])
915405b261ecSmrg
91556747b715Smrg# _LT_PATH_CONVERSION_FUNCTIONS
915605b261ecSmrg# -----------------------------
91576747b715Smrg# Determine which file name conversion functions should be used by
91586747b715Smrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
91596747b715Smrg# for certain cross-compile configurations and native mingw.
91606747b715Smrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
91616747b715Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
91626747b715SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
91636747b715SmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
91646747b715SmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
91656747b715Smrg[case $host in
91666747b715Smrg  *-*-mingw* )
91676747b715Smrg    case $build in
91686747b715Smrg      *-*-mingw* ) # actually msys
91696747b715Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
91706747b715Smrg        ;;
91716747b715Smrg      *-*-cygwin* )
91726747b715Smrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
91736747b715Smrg        ;;
91746747b715Smrg      * ) # otherwise, assume *nix
91756747b715Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
91766747b715Smrg        ;;
91776747b715Smrg    esac
91786747b715Smrg    ;;
91796747b715Smrg  *-*-cygwin* )
91806747b715Smrg    case $build in
91816747b715Smrg      *-*-mingw* ) # actually msys
91826747b715Smrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
91836747b715Smrg        ;;
91846747b715Smrg      *-*-cygwin* )
91856747b715Smrg        lt_cv_to_host_file_cmd=func_convert_file_noop
91866747b715Smrg        ;;
91876747b715Smrg      * ) # otherwise, assume *nix
91886747b715Smrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
91896747b715Smrg        ;;
91906747b715Smrg    esac
91916747b715Smrg    ;;
91926747b715Smrg  * ) # unhandled hosts (and "normal" native builds)
91936747b715Smrg    lt_cv_to_host_file_cmd=func_convert_file_noop
91946747b715Smrg    ;;
91956747b715Smrgesac
91966747b715Smrg])
91976747b715Smrgto_host_file_cmd=$lt_cv_to_host_file_cmd
91986747b715SmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
91996747b715Smrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
92006747b715Smrg         [0], [convert $build file names to $host format])dnl
92016747b715Smrg
92026747b715SmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
92036747b715SmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
92046747b715Smrg[#assume ordinary cross tools, or native build.
92056747b715Smrglt_cv_to_tool_file_cmd=func_convert_file_noop
92066747b715Smrgcase $host in
92076747b715Smrg  *-*-mingw* )
92086747b715Smrg    case $build in
92096747b715Smrg      *-*-mingw* ) # actually msys
92106747b715Smrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
92116747b715Smrg        ;;
92126747b715Smrg    esac
92136747b715Smrg    ;;
92146747b715Smrgesac
92156747b715Smrg])
92166747b715Smrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
92176747b715SmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
92186747b715Smrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
92196747b715Smrg         [0], [convert $build files to toolchain format])dnl
92206747b715Smrg])# _LT_PATH_CONVERSION_FUNCTIONS
922105b261ecSmrg
92226747b715Smrg# Helper functions for option handling.                    -*- Autoconf -*-
92236747b715Smrg#
92246747b715Smrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
92256747b715Smrg#   Inc.
92266747b715Smrg#   Written by Gary V. Vaughan, 2004
92276747b715Smrg#
92286747b715Smrg# This file is free software; the Free Software Foundation gives
92296747b715Smrg# unlimited permission to copy and/or distribute it, with or without
92306747b715Smrg# modifications, as long as this notice is preserved.
923105b261ecSmrg
92326747b715Smrg# serial 7 ltoptions.m4
923305b261ecSmrg
92346747b715Smrg# This is to help aclocal find these macros, as it can't see m4_define.
92356747b715SmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
923605b261ecSmrg
923705b261ecSmrg
92386747b715Smrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
92396747b715Smrg# ------------------------------------------
92406747b715Smrgm4_define([_LT_MANGLE_OPTION],
92416747b715Smrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
92426747b715Smrg
92436747b715Smrg
92446747b715Smrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
92456747b715Smrg# ---------------------------------------
92466747b715Smrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
92476747b715Smrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
92486747b715Smrg# saved as a flag.
92496747b715Smrgm4_define([_LT_SET_OPTION],
92506747b715Smrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
92516747b715Smrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
92526747b715Smrg        _LT_MANGLE_DEFUN([$1], [$2]),
92536747b715Smrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
92546747b715Smrg])
92556747b715Smrg
92566747b715Smrg
92576747b715Smrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
92586747b715Smrg# ------------------------------------------------------------
92596747b715Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
92606747b715Smrgm4_define([_LT_IF_OPTION],
92616747b715Smrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
92626747b715Smrg
92636747b715Smrg
92646747b715Smrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
92656747b715Smrg# -------------------------------------------------------
92666747b715Smrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
92676747b715Smrg# are set.
92686747b715Smrgm4_define([_LT_UNLESS_OPTIONS],
92696747b715Smrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
92706747b715Smrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
92716747b715Smrg		      [m4_define([$0_found])])])[]dnl
92726747b715Smrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
92736747b715Smrg])[]dnl
927405b261ecSmrg])
927505b261ecSmrg
927605b261ecSmrg
92776747b715Smrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
92786747b715Smrg# ----------------------------------------
92796747b715Smrg# OPTION-LIST is a space-separated list of Libtool options associated
92806747b715Smrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
92816747b715Smrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
92826747b715Smrg# the unknown option and exit.
92836747b715Smrgm4_defun([_LT_SET_OPTIONS],
92846747b715Smrg[# Set options
92856747b715Smrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
92866747b715Smrg    [_LT_SET_OPTION([$1], _LT_Option)])
92876747b715Smrg
92886747b715Smrgm4_if([$1],[LT_INIT],[
92896747b715Smrg  dnl
92906747b715Smrg  dnl Simply set some default values (i.e off) if boolean options were not
92916747b715Smrg  dnl specified:
92926747b715Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
92936747b715Smrg  ])
92946747b715Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
92956747b715Smrg  ])
92966747b715Smrg  dnl
92976747b715Smrg  dnl If no reference was made to various pairs of opposing options, then
92986747b715Smrg  dnl we run the default mode handler for the pair.  For example, if neither
92996747b715Smrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
93006747b715Smrg  dnl archives by default:
93016747b715Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
93026747b715Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
93036747b715Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
93046747b715Smrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
93056747b715Smrg  		   [_LT_ENABLE_FAST_INSTALL])
93066747b715Smrg  ])
93076747b715Smrg])# _LT_SET_OPTIONS
93086747b715Smrg
93096747b715Smrg
931005b261ecSmrg
93116747b715Smrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
93126747b715Smrg# -----------------------------------------
93136747b715Smrgm4_define([_LT_MANGLE_DEFUN],
93146747b715Smrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
931505b261ecSmrg
931605b261ecSmrg
93176747b715Smrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
93186747b715Smrg# -----------------------------------------------
93196747b715Smrgm4_define([LT_OPTION_DEFINE],
93206747b715Smrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
93216747b715Smrg])# LT_OPTION_DEFINE
932205b261ecSmrg
932305b261ecSmrg
93246747b715Smrg# dlopen
93256747b715Smrg# ------
93266747b715SmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
93276747b715Smrg])
932805b261ecSmrg
93296747b715SmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
93306747b715Smrg[_LT_SET_OPTION([LT_INIT], [dlopen])
93316747b715SmrgAC_DIAGNOSE([obsolete],
93326747b715Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
93336747b715Smrgput the `dlopen' option into LT_INIT's first parameter.])
93346747b715Smrg])
933505b261ecSmrg
93366747b715Smrgdnl aclocal-1.4 backwards compatibility:
93376747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
933805b261ecSmrg
933905b261ecSmrg
93406747b715Smrg# win32-dll
93416747b715Smrg# ---------
93426747b715Smrg# Declare package support for building win32 dll's.
93436747b715SmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
93446747b715Smrg[enable_win32_dll=yes
93456747b715Smrg
93466747b715Smrgcase $host in
93476747b715Smrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
93486747b715Smrg  AC_CHECK_TOOL(AS, as, false)
93496747b715Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
93506747b715Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
93516747b715Smrg  ;;
93526747b715Smrgesac
935305b261ecSmrg
93546747b715Smrgtest -z "$AS" && AS=as
93556747b715Smrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
935605b261ecSmrg
93576747b715Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
93586747b715Smrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
935905b261ecSmrg
93606747b715Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
93616747b715Smrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
93626747b715Smrg])# win32-dll
936305b261ecSmrg
93646747b715SmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
93656747b715Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
93666747b715Smrg_LT_SET_OPTION([LT_INIT], [win32-dll])
93676747b715SmrgAC_DIAGNOSE([obsolete],
93686747b715Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
93696747b715Smrgput the `win32-dll' option into LT_INIT's first parameter.])
93706747b715Smrg])
937105b261ecSmrg
93726747b715Smrgdnl aclocal-1.4 backwards compatibility:
93736747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
9374b1d344b3Smrg
937505b261ecSmrg
93766747b715Smrg# _LT_ENABLE_SHARED([DEFAULT])
93776747b715Smrg# ----------------------------
93786747b715Smrg# implement the --enable-shared flag, and supports the `shared' and
93796747b715Smrg# `disable-shared' LT_INIT options.
93806747b715Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
93816747b715Smrgm4_define([_LT_ENABLE_SHARED],
93826747b715Smrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
93836747b715SmrgAC_ARG_ENABLE([shared],
93846747b715Smrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
93856747b715Smrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
93866747b715Smrg    [p=${PACKAGE-default}
93876747b715Smrg    case $enableval in
93886747b715Smrg    yes) enable_shared=yes ;;
93896747b715Smrg    no) enable_shared=no ;;
93906747b715Smrg    *)
93916747b715Smrg      enable_shared=no
93926747b715Smrg      # Look at the argument we got.  We use all the common list separators.
93936747b715Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
93946747b715Smrg      for pkg in $enableval; do
93956747b715Smrg	IFS="$lt_save_ifs"
93966747b715Smrg	if test "X$pkg" = "X$p"; then
93976747b715Smrg	  enable_shared=yes
93986747b715Smrg	fi
93996747b715Smrg      done
94006747b715Smrg      IFS="$lt_save_ifs"
9401b1d344b3Smrg      ;;
94026747b715Smrg    esac],
94036747b715Smrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
940405b261ecSmrg
94056747b715Smrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
94066747b715Smrg	[Whether or not to build shared libraries])
94076747b715Smrg])# _LT_ENABLE_SHARED
94086747b715Smrg
94096747b715SmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
94106747b715SmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
94116747b715Smrg
94126747b715Smrg# Old names:
94136747b715SmrgAC_DEFUN([AC_ENABLE_SHARED],
94146747b715Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
941505b261ecSmrg])
94166747b715Smrg
94176747b715SmrgAC_DEFUN([AC_DISABLE_SHARED],
94186747b715Smrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
941905b261ecSmrg])
942005b261ecSmrg
94216747b715SmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
94226747b715SmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
942305b261ecSmrg
94246747b715Smrgdnl aclocal-1.4 backwards compatibility:
94256747b715Smrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
94266747b715Smrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
94276747b715Smrg
94286747b715Smrg
94296747b715Smrg
94306747b715Smrg# _LT_ENABLE_STATIC([DEFAULT])
94316747b715Smrg# ----------------------------
94326747b715Smrg# implement the --enable-static flag, and support the `static' and
94336747b715Smrg# `disable-static' LT_INIT options.
94346747b715Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
94356747b715Smrgm4_define([_LT_ENABLE_STATIC],
94366747b715Smrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
94376747b715SmrgAC_ARG_ENABLE([static],
94386747b715Smrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
94396747b715Smrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
94406747b715Smrg    [p=${PACKAGE-default}
94416747b715Smrg    case $enableval in
94426747b715Smrg    yes) enable_static=yes ;;
94436747b715Smrg    no) enable_static=no ;;
94446747b715Smrg    *)
94456747b715Smrg     enable_static=no
94466747b715Smrg      # Look at the argument we got.  We use all the common list separators.
94476747b715Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
94486747b715Smrg      for pkg in $enableval; do
94496747b715Smrg	IFS="$lt_save_ifs"
94506747b715Smrg	if test "X$pkg" = "X$p"; then
94516747b715Smrg	  enable_static=yes
94526747b715Smrg	fi
94536747b715Smrg      done
94546747b715Smrg      IFS="$lt_save_ifs"
94556747b715Smrg      ;;
94566747b715Smrg    esac],
94576747b715Smrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
94586747b715Smrg
94596747b715Smrg    _LT_DECL([build_old_libs], [enable_static], [0],
94606747b715Smrg	[Whether or not to build static libraries])
94616747b715Smrg])# _LT_ENABLE_STATIC
94626747b715Smrg
94636747b715SmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
94646747b715SmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
94656747b715Smrg
94666747b715Smrg# Old names:
94676747b715SmrgAC_DEFUN([AC_ENABLE_STATIC],
94686747b715Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
946905b261ecSmrg])
947005b261ecSmrg
94716747b715SmrgAC_DEFUN([AC_DISABLE_STATIC],
94726747b715Smrg[_LT_SET_OPTION([LT_INIT], [disable-static])
94736747b715Smrg])
947405b261ecSmrg
94756747b715SmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
94766747b715SmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
94776747b715Smrg
94786747b715Smrgdnl aclocal-1.4 backwards compatibility:
94796747b715Smrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
94806747b715Smrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
94816747b715Smrg
94826747b715Smrg
94836747b715Smrg
94846747b715Smrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
94856747b715Smrg# ----------------------------------
94866747b715Smrg# implement the --enable-fast-install flag, and support the `fast-install'
94876747b715Smrg# and `disable-fast-install' LT_INIT options.
94886747b715Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
94896747b715Smrgm4_define([_LT_ENABLE_FAST_INSTALL],
94906747b715Smrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
94916747b715SmrgAC_ARG_ENABLE([fast-install],
94926747b715Smrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
94936747b715Smrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
94946747b715Smrg    [p=${PACKAGE-default}
94956747b715Smrg    case $enableval in
94966747b715Smrg    yes) enable_fast_install=yes ;;
94976747b715Smrg    no) enable_fast_install=no ;;
94986747b715Smrg    *)
94996747b715Smrg      enable_fast_install=no
95006747b715Smrg      # Look at the argument we got.  We use all the common list separators.
95016747b715Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
95026747b715Smrg      for pkg in $enableval; do
95036747b715Smrg	IFS="$lt_save_ifs"
95046747b715Smrg	if test "X$pkg" = "X$p"; then
95056747b715Smrg	  enable_fast_install=yes
95066747b715Smrg	fi
95076747b715Smrg      done
95086747b715Smrg      IFS="$lt_save_ifs"
95096747b715Smrg      ;;
95106747b715Smrg    esac],
95116747b715Smrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
95126747b715Smrg
95136747b715Smrg_LT_DECL([fast_install], [enable_fast_install], [0],
95146747b715Smrg	 [Whether or not to optimize for fast installation])dnl
95156747b715Smrg])# _LT_ENABLE_FAST_INSTALL
95166747b715Smrg
95176747b715SmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
95186747b715SmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
95196747b715Smrg
95206747b715Smrg# Old names:
95216747b715SmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
95226747b715Smrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
95236747b715SmrgAC_DIAGNOSE([obsolete],
95246747b715Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
95256747b715Smrgthe `fast-install' option into LT_INIT's first parameter.])
952605b261ecSmrg])
952705b261ecSmrg
95286747b715SmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
95296747b715Smrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
95306747b715SmrgAC_DIAGNOSE([obsolete],
95316747b715Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
95326747b715Smrgthe `disable-fast-install' option into LT_INIT's first parameter.])
95336747b715Smrg])
953405b261ecSmrg
95356747b715Smrgdnl aclocal-1.4 backwards compatibility:
95366747b715Smrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
95376747b715Smrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
953805b261ecSmrg
953905b261ecSmrg
95406747b715Smrg# _LT_WITH_PIC([MODE])
95416747b715Smrg# --------------------
95426747b715Smrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
95436747b715Smrg# LT_INIT options.
95446747b715Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
95456747b715Smrgm4_define([_LT_WITH_PIC],
95466747b715Smrg[AC_ARG_WITH([pic],
95476747b715Smrg    [AS_HELP_STRING([--with-pic],
95486747b715Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
95496747b715Smrg    [pic_mode="$withval"],
95506747b715Smrg    [pic_mode=default])
955105b261ecSmrg
95526747b715Smrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
955305b261ecSmrg
95546747b715Smrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
95556747b715Smrg])# _LT_WITH_PIC
955605b261ecSmrg
95576747b715SmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
95586747b715SmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
955905b261ecSmrg
95606747b715Smrg# Old name:
95616747b715SmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
95626747b715Smrg[_LT_SET_OPTION([LT_INIT], [pic-only])
95636747b715SmrgAC_DIAGNOSE([obsolete],
95646747b715Smrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
95656747b715Smrgput the `pic-only' option into LT_INIT's first parameter.])
95666747b715Smrg])
956705b261ecSmrg
95686747b715Smrgdnl aclocal-1.4 backwards compatibility:
95696747b715Smrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
957005b261ecSmrg
957105b261ecSmrg
95726747b715Smrgm4_define([_LTDL_MODE], [])
95736747b715SmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
95746747b715Smrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
95756747b715SmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
95766747b715Smrg		 [m4_define([_LTDL_MODE], [recursive])])
95776747b715SmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
95786747b715Smrg		 [m4_define([_LTDL_MODE], [subproject])])
957905b261ecSmrg
95806747b715Smrgm4_define([_LTDL_TYPE], [])
95816747b715SmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
95826747b715Smrg		 [m4_define([_LTDL_TYPE], [installable])])
95836747b715SmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
95846747b715Smrg		 [m4_define([_LTDL_TYPE], [convenience])])
958505b261ecSmrg
95866747b715Smrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
95876747b715Smrg#
95886747b715Smrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
95896747b715Smrg# Written by Gary V. Vaughan, 2004
95906747b715Smrg#
95916747b715Smrg# This file is free software; the Free Software Foundation gives
95926747b715Smrg# unlimited permission to copy and/or distribute it, with or without
95936747b715Smrg# modifications, as long as this notice is preserved.
959405b261ecSmrg
95956747b715Smrg# serial 6 ltsugar.m4
959605b261ecSmrg
95976747b715Smrg# This is to help aclocal find these macros, as it can't see m4_define.
95986747b715SmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
959905b261ecSmrg
9600b1d344b3Smrg
96016747b715Smrg# lt_join(SEP, ARG1, [ARG2...])
96026747b715Smrg# -----------------------------
96036747b715Smrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
96046747b715Smrg# associated separator.
96056747b715Smrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
96066747b715Smrg# versions in m4sugar had bugs.
96076747b715Smrgm4_define([lt_join],
96086747b715Smrg[m4_if([$#], [1], [],
96096747b715Smrg       [$#], [2], [[$2]],
96106747b715Smrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
96116747b715Smrgm4_define([_lt_join],
96126747b715Smrg[m4_if([$#$2], [2], [],
96136747b715Smrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
961405b261ecSmrg
961505b261ecSmrg
96166747b715Smrg# lt_car(LIST)
96176747b715Smrg# lt_cdr(LIST)
96186747b715Smrg# ------------
96196747b715Smrg# Manipulate m4 lists.
96206747b715Smrg# These macros are necessary as long as will still need to support
96216747b715Smrg# Autoconf-2.59 which quotes differently.
96226747b715Smrgm4_define([lt_car], [[$1]])
96236747b715Smrgm4_define([lt_cdr],
96246747b715Smrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
96256747b715Smrg       [$#], 1, [],
96266747b715Smrg       [m4_dquote(m4_shift($@))])])
96276747b715Smrgm4_define([lt_unquote], $1)
962805b261ecSmrg
96296747b715Smrg
96306747b715Smrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
96316747b715Smrg# ------------------------------------------
96326747b715Smrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
96336747b715Smrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
96346747b715Smrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
96356747b715Smrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
96366747b715Smrg# than defined and empty).
963705b261ecSmrg#
96386747b715Smrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
96396747b715Smrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
96406747b715Smrgm4_define([lt_append],
96416747b715Smrg[m4_define([$1],
96426747b715Smrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
964305b261ecSmrg
964405b261ecSmrg
964505b261ecSmrg
96466747b715Smrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
96476747b715Smrg# ----------------------------------------------------------
96486747b715Smrg# Produce a SEP delimited list of all paired combinations of elements of
96496747b715Smrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
96506747b715Smrg# has the form PREFIXmINFIXSUFFIXn.
96516747b715Smrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
96526747b715Smrgm4_define([lt_combine],
96536747b715Smrg[m4_if(m4_eval([$# > 3]), [1],
96546747b715Smrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
96556747b715Smrg[[m4_foreach([_Lt_prefix], [$2],
96566747b715Smrg	     [m4_foreach([_Lt_suffix],
96576747b715Smrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
96586747b715Smrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
96596747b715Smrg
966005b261ecSmrg
96616747b715Smrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
96626747b715Smrg# -----------------------------------------------------------------------
96636747b715Smrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
96646747b715Smrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
96656747b715Smrgm4_define([lt_if_append_uniq],
96666747b715Smrg[m4_ifdef([$1],
96676747b715Smrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
96686747b715Smrg		 [lt_append([$1], [$2], [$3])$4],
96696747b715Smrg		 [$5])],
96706747b715Smrg	  [lt_append([$1], [$2], [$3])$4])])
967105b261ecSmrg
967205b261ecSmrg
96736747b715Smrg# lt_dict_add(DICT, KEY, VALUE)
96746747b715Smrg# -----------------------------
96756747b715Smrgm4_define([lt_dict_add],
96766747b715Smrg[m4_define([$1($2)], [$3])])
967705b261ecSmrg
967805b261ecSmrg
96796747b715Smrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
96806747b715Smrg# --------------------------------------------
96816747b715Smrgm4_define([lt_dict_add_subkey],
96826747b715Smrg[m4_define([$1($2:$3)], [$4])])
96836747b715Smrg
96846747b715Smrg
96856747b715Smrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
9686b1d344b3Smrg# ----------------------------------
96876747b715Smrgm4_define([lt_dict_fetch],
96886747b715Smrg[m4_ifval([$3],
96896747b715Smrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
96906747b715Smrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
969105b261ecSmrg
969205b261ecSmrg
96936747b715Smrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
96946747b715Smrg# -----------------------------------------------------------------
96956747b715Smrgm4_define([lt_if_dict_fetch],
96966747b715Smrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
96976747b715Smrg	[$5],
96986747b715Smrg    [$6])])
969905b261ecSmrg
97006747b715Smrg
97016747b715Smrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
97026747b715Smrg# --------------------------------------------------------------
97036747b715Smrgm4_define([lt_dict_filter],
97046747b715Smrg[m4_if([$5], [], [],
97056747b715Smrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
97066747b715Smrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
97076747b715Smrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
97086747b715Smrg])
97096747b715Smrg
97106747b715Smrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
971105b261ecSmrg#
97126747b715Smrg#   Copyright (C) 2004 Free Software Foundation, Inc.
97136747b715Smrg#   Written by Scott James Remnant, 2004
97146747b715Smrg#
97156747b715Smrg# This file is free software; the Free Software Foundation gives
97166747b715Smrg# unlimited permission to copy and/or distribute it, with or without
97176747b715Smrg# modifications, as long as this notice is preserved.
971805b261ecSmrg
97196747b715Smrg# @configure_input@
972005b261ecSmrg
97216747b715Smrg# serial 3293 ltversion.m4
97226747b715Smrg# This file is part of GNU Libtool
972305b261ecSmrg
97246747b715Smrgm4_define([LT_PACKAGE_VERSION], [2.4])
97256747b715Smrgm4_define([LT_PACKAGE_REVISION], [1.3293])
972605b261ecSmrg
97276747b715SmrgAC_DEFUN([LTVERSION_VERSION],
97286747b715Smrg[macro_version='2.4'
97296747b715Smrgmacro_revision='1.3293'
97306747b715Smrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
97316747b715Smrg_LT_DECL(, macro_revision, 0)
97326747b715Smrg])
97336747b715Smrg
97346747b715Smrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
973505b261ecSmrg#
97366747b715Smrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
97376747b715Smrg#   Written by Scott James Remnant, 2004.
97386747b715Smrg#
97396747b715Smrg# This file is free software; the Free Software Foundation gives
97406747b715Smrg# unlimited permission to copy and/or distribute it, with or without
97416747b715Smrg# modifications, as long as this notice is preserved.
974205b261ecSmrg
97436747b715Smrg# serial 5 lt~obsolete.m4
974405b261ecSmrg
97456747b715Smrg# These exist entirely to fool aclocal when bootstrapping libtool.
97466747b715Smrg#
97476747b715Smrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
97486747b715Smrg# which have later been changed to m4_define as they aren't part of the
97496747b715Smrg# exported API, or moved to Autoconf or Automake where they belong.
97506747b715Smrg#
97516747b715Smrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
97526747b715Smrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
97536747b715Smrg# using a macro with the same name in our local m4/libtool.m4 it'll
97546747b715Smrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
97556747b715Smrg# and doesn't know about Autoconf macros at all.)
97566747b715Smrg#
97576747b715Smrg# So we provide this file, which has a silly filename so it's always
97586747b715Smrg# included after everything else.  This provides aclocal with the
97596747b715Smrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
97606747b715Smrg# because those macros already exist, or will be overwritten later.
97616747b715Smrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
97626747b715Smrg#
97636747b715Smrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
97646747b715Smrg# Yes, that means every name once taken will need to remain here until
97656747b715Smrg# we give up compatibility with versions before 1.7, at which point
97666747b715Smrg# we need to keep only those names which we still refer to.
976705b261ecSmrg
97686747b715Smrg# This is to help aclocal find these macros, as it can't see m4_define.
97696747b715SmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
977005b261ecSmrg
97716747b715Smrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
97726747b715Smrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
97736747b715Smrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
97746747b715Smrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
97756747b715Smrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
97766747b715Smrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
97776747b715Smrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
97786747b715Smrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
97796747b715Smrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
97806747b715Smrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
97816747b715Smrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
97826747b715Smrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
97836747b715Smrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
97846747b715Smrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
97856747b715Smrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
97866747b715Smrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
97876747b715Smrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
97886747b715Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
97896747b715Smrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
97906747b715Smrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
97916747b715Smrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
97926747b715Smrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
97936747b715Smrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
97946747b715Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
97956747b715Smrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
97966747b715Smrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
97976747b715Smrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
97986747b715Smrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
97996747b715Smrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
98006747b715Smrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
98016747b715Smrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
98026747b715Smrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
98036747b715Smrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
98046747b715Smrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
98056747b715Smrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
98066747b715Smrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
98076747b715Smrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
98086747b715Smrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
98096747b715Smrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
98106747b715Smrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
98116747b715Smrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
98126747b715Smrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
98136747b715Smrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
98146747b715Smrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
98156747b715Smrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
98166747b715Smrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
98176747b715Smrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
98186747b715Smrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
98196747b715Smrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
98206747b715Smrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
98216747b715Smrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
98226747b715Smrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
98236747b715Smrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
98246747b715Smrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
98256747b715Smrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
98266747b715Smrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
98276747b715Smrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
98286747b715Smrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
98296747b715Smrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
98306747b715Smrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
98316747b715Smrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
983205b261ecSmrg
98336747b715Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
98346747b715Smrg# serial 1 (pkg-config-0.24)
98356747b715Smrg# 
98366747b715Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
983705b261ecSmrg#
98386747b715Smrg# This program is free software; you can redistribute it and/or modify
98396747b715Smrg# it under the terms of the GNU General Public License as published by
98406747b715Smrg# the Free Software Foundation; either version 2 of the License, or
98416747b715Smrg# (at your option) any later version.
984205b261ecSmrg#
98436747b715Smrg# This program is distributed in the hope that it will be useful, but
98446747b715Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
98456747b715Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
98466747b715Smrg# General Public License for more details.
98476747b715Smrg#
98486747b715Smrg# You should have received a copy of the GNU General Public License
98496747b715Smrg# along with this program; if not, write to the Free Software
98506747b715Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
98516747b715Smrg#
98526747b715Smrg# As a special exception to the GNU General Public License, if you
98536747b715Smrg# distribute this file as part of a program that contains a
98546747b715Smrg# configuration script generated by Autoconf, you may include it under
98556747b715Smrg# the same distribution terms that you use for the rest of that program.
985605b261ecSmrg
98576747b715Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
985805b261ecSmrg# ----------------------------------
98596747b715SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
98606747b715Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
98616747b715Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
98626747b715SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
98636747b715SmrgAC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
98646747b715SmrgAC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
986505b261ecSmrg
98666747b715Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
98676747b715Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
98686747b715Smrgfi
98696747b715Smrgif test -n "$PKG_CONFIG"; then
98706747b715Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
98716747b715Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
98726747b715Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
98736747b715Smrg		AC_MSG_RESULT([yes])
98746747b715Smrg	else
98756747b715Smrg		AC_MSG_RESULT([no])
98766747b715Smrg		PKG_CONFIG=""
98776747b715Smrg	fi
98786747b715Smrgfi[]dnl
98796747b715Smrg])# PKG_PROG_PKG_CONFIG
988005b261ecSmrg
98816747b715Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
988205b261ecSmrg#
98836747b715Smrg# Check to see whether a particular set of modules exists.  Similar
98846747b715Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
98856747b715Smrg#
98866747b715Smrg# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
98876747b715Smrg# only at the first occurence in configure.ac, so if the first place
98886747b715Smrg# it's called might be skipped (such as if it is within an "if", you
98896747b715Smrg# have to call PKG_CHECK_EXISTS manually
98906747b715Smrg# --------------------------------------------------------------
98916747b715SmrgAC_DEFUN([PKG_CHECK_EXISTS],
98926747b715Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
98936747b715Smrgif test -n "$PKG_CONFIG" && \
98946747b715Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
98956747b715Smrg  m4_default([$2], [:])
98966747b715Smrgm4_ifvaln([$3], [else
98976747b715Smrg  $3])dnl
98986747b715Smrgfi])
989905b261ecSmrg
99006747b715Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
99016747b715Smrg# ---------------------------------------------
99026747b715Smrgm4_define([_PKG_CONFIG],
99036747b715Smrg[if test -n "$$1"; then
99046747b715Smrg    pkg_cv_[]$1="$$1"
99056747b715Smrg elif test -n "$PKG_CONFIG"; then
99066747b715Smrg    PKG_CHECK_EXISTS([$3],
99076747b715Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
99086747b715Smrg		     [pkg_failed=yes])
99096747b715Smrg else
99106747b715Smrg    pkg_failed=untried
99116747b715Smrgfi[]dnl
99126747b715Smrg])# _PKG_CONFIG
991305b261ecSmrg
99146747b715Smrg# _PKG_SHORT_ERRORS_SUPPORTED
99156747b715Smrg# -----------------------------
99166747b715SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
99176747b715Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
99186747b715Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
99196747b715Smrg        _pkg_short_errors_supported=yes
992005b261ecSmrgelse
99216747b715Smrg        _pkg_short_errors_supported=no
99226747b715Smrgfi[]dnl
99236747b715Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
992405b261ecSmrg
992505b261ecSmrg
99266747b715Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
99276747b715Smrg# [ACTION-IF-NOT-FOUND])
992805b261ecSmrg#
99296747b715Smrg#
99306747b715Smrg# Note that if there is a possibility the first call to
99316747b715Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
99326747b715Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
99336747b715Smrg#
99346747b715Smrg#
99356747b715Smrg# --------------------------------------------------------------
99366747b715SmrgAC_DEFUN([PKG_CHECK_MODULES],
99376747b715Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
99386747b715SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
99396747b715SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
994005b261ecSmrg
99416747b715Smrgpkg_failed=no
99426747b715SmrgAC_MSG_CHECKING([for $1])
9943b1d344b3Smrg
99446747b715Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
99456747b715Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
994605b261ecSmrg
99476747b715Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
99486747b715Smrgand $1[]_LIBS to avoid the need to call pkg-config.
99496747b715SmrgSee the pkg-config man page for more details.])
9950b1d344b3Smrg
99516747b715Smrgif test $pkg_failed = yes; then
99526747b715Smrg   	AC_MSG_RESULT([no])
99536747b715Smrg        _PKG_SHORT_ERRORS_SUPPORTED
99546747b715Smrg        if test $_pkg_short_errors_supported = yes; then
99556747b715Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
99566747b715Smrg        else 
99576747b715Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
99586747b715Smrg        fi
99596747b715Smrg	# Put the nasty error message in config.log where it belongs
99606747b715Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
996105b261ecSmrg
99626747b715Smrg	m4_default([$4], [AC_MSG_ERROR(
99636747b715Smrg[Package requirements ($2) were not met:
996405b261ecSmrg
99656747b715Smrg$$1_PKG_ERRORS
996605b261ecSmrg
99676747b715SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
99686747b715Smrginstalled software in a non-standard prefix.
996905b261ecSmrg
99706747b715Smrg_PKG_TEXT])[]dnl
99716747b715Smrg        ])
99726747b715Smrgelif test $pkg_failed = untried; then
99736747b715Smrg     	AC_MSG_RESULT([no])
99746747b715Smrg	m4_default([$4], [AC_MSG_FAILURE(
99756747b715Smrg[The pkg-config script could not be found or is too old.  Make sure it
99766747b715Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
99776747b715Smrgpath to pkg-config.
997805b261ecSmrg
99796747b715Smrg_PKG_TEXT
998005b261ecSmrg
99816747b715SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])dnl
99826747b715Smrg        ])
99836747b715Smrgelse
99846747b715Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
99856747b715Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
99866747b715Smrg        AC_MSG_RESULT([yes])
99876747b715Smrg	$3
99886747b715Smrgfi[]dnl
99896747b715Smrg])# PKG_CHECK_MODULES
999005b261ecSmrg
99914642e01fSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
99924642e01fSmrgdnl
99936747b715Smrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
99944642e01fSmrgdnl 
99954642e01fSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
99966747b715Smrgdnl copy of this software and associated documentation files (the "Software"),
99976747b715Smrgdnl to deal in the Software without restriction, including without limitation
99986747b715Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
99996747b715Smrgdnl and/or sell copies of the Software, and to permit persons to whom the
100006747b715Smrgdnl Software is furnished to do so, subject to the following conditions:
100014642e01fSmrgdnl
100026747b715Smrgdnl The above copyright notice and this permission notice (including the next
100036747b715Smrgdnl paragraph) shall be included in all copies or substantial portions of the
100046747b715Smrgdnl Software.
100054642e01fSmrgdnl
100066747b715Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
100076747b715Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
100086747b715Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
100096747b715Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
100106747b715Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
100116747b715Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
100126747b715Smrgdnl DEALINGS IN THE SOFTWARE.
100134642e01fSmrg
100144642e01fSmrg# XORG_MACROS_VERSION(required-version)
100154642e01fSmrg# -------------------------------------
100164642e01fSmrg# Minimum version: 1.1.0
100174642e01fSmrg#
100184642e01fSmrg# If you're using a macro added in Version 1.1 or newer, include this in
100194642e01fSmrg# your configure.ac with the minimum required version, such as:
100204642e01fSmrg# XORG_MACROS_VERSION(1.1)
100214642e01fSmrg#
1002252397711Smrg# To ensure that this macro is defined, also add:
1002352397711Smrg# m4_ifndef([XORG_MACROS_VERSION],
1002452397711Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
100254642e01fSmrg#
100264642e01fSmrg#
100274642e01fSmrg# See the "minimum version" comment for each macro you use to see what 
100284642e01fSmrg# version you require.
1002952397711Smrgm4_defun([XORG_MACROS_VERSION],[
100308223e2f2Smrgm4_define([vers_have], [1.12.0])
1003152397711Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
1003252397711Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
1003352397711Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
1003452397711Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
1003552397711Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
1003652397711Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
1003752397711Smrgm4_undefine([vers_have])
1003852397711Smrgm4_undefine([maj_have])
1003952397711Smrgm4_undefine([maj_needed])
100404642e01fSmrg]) # XORG_MACROS_VERSION
100414642e01fSmrg
100424642e01fSmrg# XORG_PROG_RAWCPP()
100434642e01fSmrg# ------------------
100444642e01fSmrg# Minimum version: 1.0.0
100454642e01fSmrg#
100464642e01fSmrg# Find cpp program and necessary flags for use in pre-processing text files
100474642e01fSmrg# such as man pages and config files
100484642e01fSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
100494642e01fSmrgAC_REQUIRE([AC_PROG_CPP])
100504642e01fSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
100514642e01fSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
100524642e01fSmrg
100534642e01fSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
100544642e01fSmrg# which is not the best choice for supporting other OS'es, but covers most
100554642e01fSmrg# of the ones we need for now.
100564642e01fSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
100574642e01fSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
100584642e01fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
100594642e01fSmrg	AC_MSG_RESULT([no])
100604642e01fSmrgelse
100614642e01fSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
100624642e01fSmrg		RAWCPPFLAGS=-undef
100634642e01fSmrg		AC_MSG_RESULT([yes])
100644642e01fSmrg	# under Cygwin unix is still defined even with -undef
100654642e01fSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
100664642e01fSmrg		RAWCPPFLAGS="-undef -ansi"
100674642e01fSmrg		AC_MSG_RESULT([yes, with -ansi])
100684642e01fSmrg	else
100694642e01fSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
100704642e01fSmrg	fi
100714642e01fSmrgfi
100724642e01fSmrgrm -f conftest.$ac_ext
100734642e01fSmrg
100744642e01fSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
100754642e01fSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
100764642e01fSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
100774642e01fSmrg	AC_MSG_RESULT([no])
100784642e01fSmrgelse
100794642e01fSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
100804642e01fSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
100814642e01fSmrg		AC_MSG_RESULT([yes])
100824642e01fSmrg	else
100834642e01fSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
100844642e01fSmrg	fi
100854642e01fSmrgfi
100864642e01fSmrgrm -f conftest.$ac_ext
100874642e01fSmrgAC_SUBST(RAWCPPFLAGS)
100884642e01fSmrg]) # XORG_PROG_RAWCPP
100894642e01fSmrg
100904642e01fSmrg# XORG_MANPAGE_SECTIONS()
100914642e01fSmrg# -----------------------
100924642e01fSmrg# Minimum version: 1.0.0
100934642e01fSmrg#
100944642e01fSmrg# Determine which sections man pages go in for the different man page types
100954642e01fSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
100964642e01fSmrg# Not sure if there's any better way than just hardcoding by OS name.
100974642e01fSmrg# Override default settings by setting environment variables
100986747b715Smrg# Added MAN_SUBSTS in version 1.8
100996747b715Smrg# Added AC_PROG_SED in version 1.8
101004642e01fSmrg
101014642e01fSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
101024642e01fSmrgAC_REQUIRE([AC_CANONICAL_HOST])
101036747b715SmrgAC_REQUIRE([AC_PROG_SED])
101044642e01fSmrg
101054642e01fSmrgif test x$APP_MAN_SUFFIX = x    ; then
101064642e01fSmrg    APP_MAN_SUFFIX=1
101074642e01fSmrgfi
101084642e01fSmrgif test x$APP_MAN_DIR = x    ; then
101094642e01fSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
101104642e01fSmrgfi
101114642e01fSmrg
101124642e01fSmrgif test x$LIB_MAN_SUFFIX = x    ; then
101134642e01fSmrg    LIB_MAN_SUFFIX=3
101144642e01fSmrgfi
101154642e01fSmrgif test x$LIB_MAN_DIR = x    ; then
101164642e01fSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
101174642e01fSmrgfi
101184642e01fSmrg
101194642e01fSmrgif test x$FILE_MAN_SUFFIX = x    ; then
101204642e01fSmrg    case $host_os in
101214642e01fSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
101224642e01fSmrg	*)		FILE_MAN_SUFFIX=5  ;;
101234642e01fSmrg    esac
101244642e01fSmrgfi
101254642e01fSmrgif test x$FILE_MAN_DIR = x    ; then
101264642e01fSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
101274642e01fSmrgfi
101284642e01fSmrg
101294642e01fSmrgif test x$MISC_MAN_SUFFIX = x    ; then
101304642e01fSmrg    case $host_os in
101314642e01fSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
101324642e01fSmrg	*)		MISC_MAN_SUFFIX=7  ;;
101334642e01fSmrg    esac
101344642e01fSmrgfi
101354642e01fSmrgif test x$MISC_MAN_DIR = x    ; then
101364642e01fSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
101374642e01fSmrgfi
101384642e01fSmrg
101394642e01fSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
101404642e01fSmrg    case $host_os in
101414642e01fSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
101424642e01fSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
101434642e01fSmrg    esac
101444642e01fSmrgfi
101454642e01fSmrgif test x$DRIVER_MAN_DIR = x    ; then
101464642e01fSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
101474642e01fSmrgfi
101484642e01fSmrg
101494642e01fSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
101504642e01fSmrg    case $host_os in
101514642e01fSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
101524642e01fSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
101534642e01fSmrg    esac
101544642e01fSmrgfi
101554642e01fSmrgif test x$ADMIN_MAN_DIR = x    ; then
101564642e01fSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
101574642e01fSmrgfi
101584642e01fSmrg
101594642e01fSmrg
101604642e01fSmrgAC_SUBST([APP_MAN_SUFFIX])
101614642e01fSmrgAC_SUBST([LIB_MAN_SUFFIX])
101624642e01fSmrgAC_SUBST([FILE_MAN_SUFFIX])
101634642e01fSmrgAC_SUBST([MISC_MAN_SUFFIX])
101644642e01fSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
101654642e01fSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
101664642e01fSmrgAC_SUBST([APP_MAN_DIR])
101674642e01fSmrgAC_SUBST([LIB_MAN_DIR])
101684642e01fSmrgAC_SUBST([FILE_MAN_DIR])
101694642e01fSmrgAC_SUBST([MISC_MAN_DIR])
101704642e01fSmrgAC_SUBST([DRIVER_MAN_DIR])
101714642e01fSmrgAC_SUBST([ADMIN_MAN_DIR])
101726747b715Smrg
101736747b715SmrgXORG_MAN_PAGE="X Version 11"
101746747b715SmrgAC_SUBST([XORG_MAN_PAGE])
101756747b715SmrgMAN_SUBSTS="\
101766747b715Smrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
101776747b715Smrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
101786747b715Smrg	-e 's|__xservername__|Xorg|g' \
101796747b715Smrg	-e 's|__xconfigfile__|xorg.conf|g' \
101806747b715Smrg	-e 's|__projectroot__|\$(prefix)|g' \
101816747b715Smrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
101826747b715Smrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
101836747b715Smrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
101846747b715Smrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
101856747b715Smrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
101866747b715Smrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
101876747b715Smrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
101886747b715SmrgAC_SUBST([MAN_SUBSTS])
101896747b715Smrg
101904642e01fSmrg]) # XORG_MANPAGE_SECTIONS
101914642e01fSmrg
101926747b715Smrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
101936747b715Smrg# ------------------------
101946747b715Smrg# Minimum version: 1.7.0
101956747b715Smrg#
101966747b715Smrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
101976747b715Smrg# provided by xorg-sgml-doctools, if installed.
101986747b715SmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
101996747b715SmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
102006747b715SmrgXORG_SGML_PATH=
102016747b715SmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
102026747b715Smrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
102036747b715Smrg    [m4_ifval([$1],[:],
102046747b715Smrg        [if test x"$cross_compiling" != x"yes" ; then
102056747b715Smrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
102066747b715Smrg                          [XORG_SGML_PATH=$prefix/share/sgml])
102076747b715Smrg         fi])
102086747b715Smrg    ])
102096747b715Smrg
102106747b715Smrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
102116747b715Smrg# the path and the name of the doc stylesheet
102126747b715Smrgif test "x$XORG_SGML_PATH" != "x" ; then
102136747b715Smrg   AC_MSG_RESULT([$XORG_SGML_PATH])
102146747b715Smrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
102156747b715Smrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
102166747b715Smrgelse
102176747b715Smrg   AC_MSG_RESULT([no])
102186747b715Smrgfi
102196747b715Smrg
102206747b715SmrgAC_SUBST(XORG_SGML_PATH)
102216747b715SmrgAC_SUBST(STYLESHEET_SRCDIR)
102226747b715SmrgAC_SUBST(XSL_STYLESHEET)
102236747b715SmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
102246747b715Smrg]) # XORG_CHECK_SGML_DOCTOOLS
102256747b715Smrg
102264642e01fSmrg# XORG_CHECK_LINUXDOC
102274642e01fSmrg# -------------------
102284642e01fSmrg# Minimum version: 1.0.0
102294642e01fSmrg#
102304642e01fSmrg# Defines the variable MAKE_TEXT if the necessary tools and
102314642e01fSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
102324642e01fSmrg# Whether or not the necessary tools and files are found can be checked
102334642e01fSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
102344642e01fSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
102356747b715SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
102366747b715SmrgAC_REQUIRE([XORG_WITH_PS2PDF])
102374642e01fSmrg
102384642e01fSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
102394642e01fSmrg
102406747b715SmrgAC_MSG_CHECKING([whether to build documentation])
102414642e01fSmrg
102426747b715Smrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
102434642e01fSmrg   BUILDDOC=yes
102444642e01fSmrgelse
102454642e01fSmrg   BUILDDOC=no
102464642e01fSmrgfi
102474642e01fSmrg
102484642e01fSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
102494642e01fSmrg
102504642e01fSmrgAC_MSG_RESULT([$BUILDDOC])
102514642e01fSmrg
102526747b715SmrgAC_MSG_CHECKING([whether to build pdf documentation])
102534642e01fSmrg
102546747b715Smrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
102554642e01fSmrg   BUILDPDFDOC=yes
102564642e01fSmrgelse
102574642e01fSmrg   BUILDPDFDOC=no
102584642e01fSmrgfi
102594642e01fSmrg
102604642e01fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
102614642e01fSmrg
102624642e01fSmrgAC_MSG_RESULT([$BUILDPDFDOC])
102634642e01fSmrg
102646747b715SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
102654642e01fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
102664642e01fSmrgMAKE_PDF="$PS2PDF"
102674642e01fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
102684642e01fSmrg
102694642e01fSmrgAC_SUBST(MAKE_TEXT)
102704642e01fSmrgAC_SUBST(MAKE_PS)
102714642e01fSmrgAC_SUBST(MAKE_PDF)
102724642e01fSmrgAC_SUBST(MAKE_HTML)
102734642e01fSmrg]) # XORG_CHECK_LINUXDOC
102744642e01fSmrg
102754642e01fSmrg# XORG_CHECK_DOCBOOK
102764642e01fSmrg# -------------------
102774642e01fSmrg# Minimum version: 1.0.0
102784642e01fSmrg#
102794642e01fSmrg# Checks for the ability to build output formats from SGML DocBook source.
102804642e01fSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
102814642e01fSmrg# indicates whether the necessary tools and files are found and, if set,
102824642e01fSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
102834642e01fSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
102846747b715SmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
102856747b715Smrg
102864642e01fSmrgBUILDTXTDOC=no
102874642e01fSmrgBUILDPDFDOC=no
102884642e01fSmrgBUILDPSDOC=no
102894642e01fSmrgBUILDHTMLDOC=no
102904642e01fSmrg
102914642e01fSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
102924642e01fSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
102934642e01fSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
102944642e01fSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
102954642e01fSmrg
102966747b715SmrgAC_MSG_CHECKING([whether to build text documentation])
102976747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
102984642e01fSmrg   test x$BUILD_TXTDOC != xno; then
102994642e01fSmrg	BUILDTXTDOC=yes
103004642e01fSmrgfi
103014642e01fSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
103024642e01fSmrgAC_MSG_RESULT([$BUILDTXTDOC])
103034642e01fSmrg
103046747b715SmrgAC_MSG_CHECKING([whether to build PDF documentation])
103056747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
103064642e01fSmrg   test x$BUILD_PDFDOC != xno; then
103074642e01fSmrg	BUILDPDFDOC=yes
103084642e01fSmrgfi
103094642e01fSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
103104642e01fSmrgAC_MSG_RESULT([$BUILDPDFDOC])
103114642e01fSmrg
103126747b715SmrgAC_MSG_CHECKING([whether to build PostScript documentation])
103136747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
103144642e01fSmrg   test x$BUILD_PSDOC != xno; then
103154642e01fSmrg	BUILDPSDOC=yes
103164642e01fSmrgfi
103174642e01fSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
103184642e01fSmrgAC_MSG_RESULT([$BUILDPSDOC])
103194642e01fSmrg
103206747b715SmrgAC_MSG_CHECKING([whether to build HTML documentation])
103216747b715Smrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
103224642e01fSmrg   test x$BUILD_HTMLDOC != xno; then
103234642e01fSmrg	BUILDHTMLDOC=yes
103244642e01fSmrgfi
103254642e01fSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
103264642e01fSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
103274642e01fSmrg
103284642e01fSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
103294642e01fSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
103304642e01fSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
103314642e01fSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
103324642e01fSmrg
103334642e01fSmrgAC_SUBST(MAKE_TEXT)
103344642e01fSmrgAC_SUBST(MAKE_PS)
103354642e01fSmrgAC_SUBST(MAKE_PDF)
103364642e01fSmrgAC_SUBST(MAKE_HTML)
103374642e01fSmrg]) # XORG_CHECK_DOCBOOK
103384642e01fSmrg
103396747b715Smrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
103406747b715Smrg# ----------------
103416747b715Smrg# Minimum version: 1.5.0
103426747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0
103436747b715Smrg#
103446747b715Smrg# Documentation tools are not always available on all platforms and sometimes
103456747b715Smrg# not at the appropriate level. This macro enables a module to test for the
103466747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
103476747b715Smrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
103486747b715Smrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
103496747b715Smrg# --with-xmlto assumes 'auto'.
103506747b715Smrg#
103516747b715Smrg# Interface to module:
103526747b715Smrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
103536747b715Smrg# XMLTO:	returns the path of the xmlto program found
103546747b715Smrg#		returns the path set by the user in the environment
103556747b715Smrg# --with-xmlto:	'yes' user instructs the module to use xmlto
103566747b715Smrg#		'no' user instructs the module not to use xmlto
103576747b715Smrg#
103586747b715Smrg# Added in version 1.10.0
103596747b715Smrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
103606747b715Smrg#                  xmlto for text output requires either lynx, links, or w3m browsers
103616747b715Smrg#
103626747b715Smrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
103636747b715Smrg#
103646747b715SmrgAC_DEFUN([XORG_WITH_XMLTO],[
103656747b715SmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
103666747b715Smrgm4_define([_defopt], m4_default([$2], [auto]))
103676747b715SmrgAC_ARG_WITH(xmlto,
103686747b715Smrg	AS_HELP_STRING([--with-xmlto],
103696747b715Smrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
103706747b715Smrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
103716747b715Smrgm4_undefine([_defopt])
103726747b715Smrg
103736747b715Smrgif test "x$use_xmlto" = x"auto"; then
103746747b715Smrg   AC_PATH_PROG([XMLTO], [xmlto])
103756747b715Smrg   if test "x$XMLTO" = "x"; then
103766747b715Smrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
103776747b715Smrg	have_xmlto=no
103786747b715Smrg   else
103796747b715Smrg        have_xmlto=yes
103806747b715Smrg   fi
103816747b715Smrgelif test "x$use_xmlto" = x"yes" ; then
103826747b715Smrg   AC_PATH_PROG([XMLTO], [xmlto])
103836747b715Smrg   if test "x$XMLTO" = "x"; then
103846747b715Smrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
103856747b715Smrg   fi
103866747b715Smrg   have_xmlto=yes
103876747b715Smrgelif test "x$use_xmlto" = x"no" ; then
103886747b715Smrg   if test "x$XMLTO" != "x"; then
103896747b715Smrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
103906747b715Smrg   fi
103916747b715Smrg   have_xmlto=no
103926747b715Smrgelse
103936747b715Smrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
103946747b715Smrgfi
103956747b715Smrg
103966747b715Smrg# Test for a minimum version of xmlto, if provided.
103976747b715Smrgm4_ifval([$1],
103986747b715Smrg[if test "$have_xmlto" = yes; then
103996747b715Smrg    # scrape the xmlto version
104006747b715Smrg    AC_MSG_CHECKING([the xmlto version])
104016747b715Smrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
104026747b715Smrg    AC_MSG_RESULT([$xmlto_version])
104036747b715Smrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
104046747b715Smrg        [if test "x$use_xmlto" = xauto; then
104056747b715Smrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
104066747b715Smrg            have_xmlto=no
104076747b715Smrg        else
104086747b715Smrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
104096747b715Smrg        fi])
104106747b715Smrgfi])
104116747b715Smrg
104126747b715Smrg# Test for the ability of xmlto to generate a text target
104136747b715Smrghave_xmlto_text=no
104146747b715Smrgcat > conftest.xml << "EOF"
104156747b715SmrgEOF
104166747b715SmrgAS_IF([test "$have_xmlto" = yes],
104176747b715Smrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
104186747b715Smrg             [have_xmlto_text=yes],
104196747b715Smrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
104206747b715Smrgrm -f conftest.xml
104216747b715SmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
104226747b715SmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
104236747b715Smrg]) # XORG_WITH_XMLTO
104246747b715Smrg
104258223e2f2Smrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
104268223e2f2Smrg# --------------------------------------------
104278223e2f2Smrg# Minimum version: 1.12.0
104288223e2f2Smrg# Minimum version for optional DEFAULT argument: 1.12.0
104298223e2f2Smrg#
104308223e2f2Smrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
104318223e2f2Smrg# XML-based language used for the transformation of XML documents.
104328223e2f2Smrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
104338223e2f2Smrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
104348223e2f2Smrg# The XSLT processor is often used as a standalone tool for transformations.
104358223e2f2Smrg# It should not be assumed that this tool is used only to work with documnetation.
104368223e2f2Smrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
104378223e2f2Smrg#
104388223e2f2Smrg# Interface to module:
104398223e2f2Smrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
104408223e2f2Smrg# XSLTPROC:	 returns the path of the xsltproc program found
104418223e2f2Smrg#		 returns the path set by the user in the environment
104428223e2f2Smrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
104438223e2f2Smrg#		  'no' user instructs the module not to use xsltproc
104448223e2f2Smrg# have_xsltproc: returns yes if xsltproc found in PATH or no
104458223e2f2Smrg#
104468223e2f2Smrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
104478223e2f2Smrg#
104488223e2f2SmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
104498223e2f2SmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
104508223e2f2Smrgm4_define([_defopt], m4_default([$2], [auto]))
104518223e2f2SmrgAC_ARG_WITH(xsltproc,
104528223e2f2Smrg	AS_HELP_STRING([--with-xsltproc],
104538223e2f2Smrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
104548223e2f2Smrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
104558223e2f2Smrgm4_undefine([_defopt])
104568223e2f2Smrg
104578223e2f2Smrgif test "x$use_xsltproc" = x"auto"; then
104588223e2f2Smrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
104598223e2f2Smrg   if test "x$XSLTPROC" = "x"; then
104608223e2f2Smrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
104618223e2f2Smrg	have_xsltproc=no
104628223e2f2Smrg   else
104638223e2f2Smrg        have_xsltproc=yes
104648223e2f2Smrg   fi
104658223e2f2Smrgelif test "x$use_xsltproc" = x"yes" ; then
104668223e2f2Smrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
104678223e2f2Smrg   if test "x$XSLTPROC" = "x"; then
104688223e2f2Smrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
104698223e2f2Smrg   fi
104708223e2f2Smrg   have_xsltproc=yes
104718223e2f2Smrgelif test "x$use_xsltproc" = x"no" ; then
104728223e2f2Smrg   if test "x$XSLTPROC" != "x"; then
104738223e2f2Smrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
104748223e2f2Smrg   fi
104758223e2f2Smrg   have_xsltproc=no
104768223e2f2Smrgelse
104778223e2f2Smrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
104788223e2f2Smrgfi
104798223e2f2Smrg
104808223e2f2Smrg# Checking for minimum version is not implemented
104818223e2f2Smrg# but we want to keep the interface consistent with other commands
104828223e2f2Smrgm4_ifval([$1],[AC_MSG_WARN(Checking for MIN-VERSION is not implemented.)])
104838223e2f2Smrg
104848223e2f2SmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
104858223e2f2Smrg]) # XORG_WITH_XSLTPROC
104868223e2f2Smrg
104878223e2f2Smrg
104886747b715Smrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
104896747b715Smrg# ----------------
104906747b715Smrg# Minimum version: 1.5.0
104916747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0
104926747b715Smrg#
104936747b715Smrg# Documentation tools are not always available on all platforms and sometimes
104946747b715Smrg# not at the appropriate level. This macro enables a module to test for the
104956747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
104966747b715Smrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
104976747b715Smrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
104986747b715Smrg# --with-asciidoc assumes 'auto'.
104996747b715Smrg#
105006747b715Smrg# Interface to module:
105016747b715Smrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
105026747b715Smrg# ASCIIDOC:	 returns the path of the asciidoc program found
105036747b715Smrg#		 returns the path set by the user in the environment
105046747b715Smrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
105056747b715Smrg#		  'no' user instructs the module not to use asciidoc
105066747b715Smrg#
105076747b715Smrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
105086747b715Smrg#
105096747b715SmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
105106747b715SmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
105116747b715Smrgm4_define([_defopt], m4_default([$2], [auto]))
105126747b715SmrgAC_ARG_WITH(asciidoc,
105136747b715Smrg	AS_HELP_STRING([--with-asciidoc],
105146747b715Smrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
105156747b715Smrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
105166747b715Smrgm4_undefine([_defopt])
105176747b715Smrg
105186747b715Smrgif test "x$use_asciidoc" = x"auto"; then
105196747b715Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
105206747b715Smrg   if test "x$ASCIIDOC" = "x"; then
105216747b715Smrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
105226747b715Smrg	have_asciidoc=no
105236747b715Smrg   else
105246747b715Smrg        have_asciidoc=yes
105256747b715Smrg   fi
105266747b715Smrgelif test "x$use_asciidoc" = x"yes" ; then
105276747b715Smrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
105286747b715Smrg   if test "x$ASCIIDOC" = "x"; then
105296747b715Smrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
105306747b715Smrg   fi
105316747b715Smrg   have_asciidoc=yes
105326747b715Smrgelif test "x$use_asciidoc" = x"no" ; then
105336747b715Smrg   if test "x$ASCIIDOC" != "x"; then
105346747b715Smrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
105356747b715Smrg   fi
105366747b715Smrg   have_asciidoc=no
105376747b715Smrgelse
105386747b715Smrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
105396747b715Smrgfi
105406747b715Smrgm4_ifval([$1],
105416747b715Smrg[if test "$have_asciidoc" = yes; then
105426747b715Smrg    # scrape the asciidoc version
105436747b715Smrg    AC_MSG_CHECKING([the asciidoc version])
105446747b715Smrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
105456747b715Smrg    AC_MSG_RESULT([$asciidoc_version])
105466747b715Smrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
105476747b715Smrg        [if test "x$use_asciidoc" = xauto; then
105486747b715Smrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
105496747b715Smrg            have_asciidoc=no
105506747b715Smrg        else
105516747b715Smrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
105526747b715Smrg        fi])
105536747b715Smrgfi])
105546747b715SmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
105556747b715Smrg]) # XORG_WITH_ASCIIDOC
105566747b715Smrg
105576747b715Smrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
105586747b715Smrg# --------------------------------
105596747b715Smrg# Minimum version: 1.5.0
105606747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0
105616747b715Smrg#
105626747b715Smrg# Documentation tools are not always available on all platforms and sometimes
105636747b715Smrg# not at the appropriate level. This macro enables a module to test for the
105646747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
105656747b715Smrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
105666747b715Smrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
105676747b715Smrg# --with-doxygen assumes 'auto'.
105686747b715Smrg#
105696747b715Smrg# Interface to module:
105706747b715Smrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
105716747b715Smrg# DOXYGEN:	 returns the path of the doxygen program found
105726747b715Smrg#		 returns the path set by the user in the environment
105736747b715Smrg# --with-doxygen: 'yes' user instructs the module to use doxygen
105746747b715Smrg#		  'no' user instructs the module not to use doxygen
105756747b715Smrg#
105766747b715Smrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
105776747b715Smrg#
105786747b715SmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
105796747b715SmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
105806747b715Smrgm4_define([_defopt], m4_default([$2], [auto]))
105816747b715SmrgAC_ARG_WITH(doxygen,
105826747b715Smrg	AS_HELP_STRING([--with-doxygen],
105836747b715Smrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
105846747b715Smrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
105856747b715Smrgm4_undefine([_defopt])
105866747b715Smrg
105876747b715Smrgif test "x$use_doxygen" = x"auto"; then
105886747b715Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
105896747b715Smrg   if test "x$DOXYGEN" = "x"; then
105906747b715Smrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
105916747b715Smrg	have_doxygen=no
105926747b715Smrg   else
105936747b715Smrg        have_doxygen=yes
105946747b715Smrg   fi
105956747b715Smrgelif test "x$use_doxygen" = x"yes" ; then
105966747b715Smrg   AC_PATH_PROG([DOXYGEN], [doxygen])
105976747b715Smrg   if test "x$DOXYGEN" = "x"; then
105986747b715Smrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
105996747b715Smrg   fi
106006747b715Smrg   have_doxygen=yes
106016747b715Smrgelif test "x$use_doxygen" = x"no" ; then
106026747b715Smrg   if test "x$DOXYGEN" != "x"; then
106036747b715Smrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
106046747b715Smrg   fi
106056747b715Smrg   have_doxygen=no
106066747b715Smrgelse
106076747b715Smrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
106086747b715Smrgfi
106096747b715Smrgm4_ifval([$1],
106106747b715Smrg[if test "$have_doxygen" = yes; then
106116747b715Smrg    # scrape the doxygen version
106126747b715Smrg    AC_MSG_CHECKING([the doxygen version])
106136747b715Smrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
106146747b715Smrg    AC_MSG_RESULT([$doxygen_version])
106156747b715Smrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
106166747b715Smrg        [if test "x$use_doxygen" = xauto; then
106176747b715Smrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
106186747b715Smrg            have_doxygen=no
106196747b715Smrg        else
106206747b715Smrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
106216747b715Smrg        fi])
106226747b715Smrgfi])
106236747b715SmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
106246747b715Smrg]) # XORG_WITH_DOXYGEN
106256747b715Smrg
106266747b715Smrg# XORG_WITH_GROFF([DEFAULT])
106276747b715Smrg# ----------------
106286747b715Smrg# Minimum version: 1.6.0
106296747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0
106306747b715Smrg#
106316747b715Smrg# Documentation tools are not always available on all platforms and sometimes
106326747b715Smrg# not at the appropriate level. This macro enables a module to test for the
106336747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
106346747b715Smrg# the --with-groff option, it allows maximum flexibilty in making decisions
106356747b715Smrg# as whether or not to use the groff package. When DEFAULT is not specified,
106366747b715Smrg# --with-groff assumes 'auto'.
106376747b715Smrg#
106386747b715Smrg# Interface to module:
106396747b715Smrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
106406747b715Smrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
106416747b715Smrg# HAVE_GROFF_MS: the -ms macros package
106426747b715Smrg# GROFF:	 returns the path of the groff program found
106436747b715Smrg#		 returns the path set by the user in the environment
106446747b715Smrg# --with-groff:	 'yes' user instructs the module to use groff
106456747b715Smrg#		 'no' user instructs the module not to use groff
106466747b715Smrg#
106476747b715Smrg# Added in version 1.9.0:
106486747b715Smrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
106496747b715Smrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
106506747b715Smrg#		   psselect from the psutils package.
106516747b715Smrg#		   the ghostcript package. Refer to the grohtml man pages
106526747b715Smrg#
106536747b715Smrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
106546747b715Smrg#
106556747b715Smrg# OS and distros often splits groff in a basic and full package, the former
106566747b715Smrg# having the groff program and the later having devices, fonts and macros
106576747b715Smrg# Checking for the groff executable is not enough.
106586747b715Smrg#
106596747b715Smrg# If macros are missing, we cannot assume that groff is useless, so we don't
106606747b715Smrg# unset HAVE_GROFF or GROFF env variables.
106616747b715Smrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
106626747b715Smrg#
106636747b715SmrgAC_DEFUN([XORG_WITH_GROFF],[
106646747b715SmrgAC_ARG_VAR([GROFF], [Path to groff command])
106656747b715Smrgm4_define([_defopt], m4_default([$1], [auto]))
106666747b715SmrgAC_ARG_WITH(groff,
106676747b715Smrg	AS_HELP_STRING([--with-groff],
106686747b715Smrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
106696747b715Smrg	   [use_groff=$withval], [use_groff=]_defopt)
106706747b715Smrgm4_undefine([_defopt])
106716747b715Smrg
106726747b715Smrgif test "x$use_groff" = x"auto"; then
106736747b715Smrg   AC_PATH_PROG([GROFF], [groff])
106746747b715Smrg   if test "x$GROFF" = "x"; then
106756747b715Smrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
106766747b715Smrg	have_groff=no
106776747b715Smrg   else
106786747b715Smrg        have_groff=yes
106796747b715Smrg   fi
106806747b715Smrgelif test "x$use_groff" = x"yes" ; then
106816747b715Smrg   AC_PATH_PROG([GROFF], [groff])
106826747b715Smrg   if test "x$GROFF" = "x"; then
106836747b715Smrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
106846747b715Smrg   fi
106856747b715Smrg   have_groff=yes
106866747b715Smrgelif test "x$use_groff" = x"no" ; then
106876747b715Smrg   if test "x$GROFF" != "x"; then
106886747b715Smrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
106896747b715Smrg   fi
106906747b715Smrg   have_groff=no
106916747b715Smrgelse
106926747b715Smrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
106936747b715Smrgfi
106946747b715Smrg
106956747b715Smrg# We have groff, test for the presence of the macro packages
106966747b715Smrgif test "x$have_groff" = x"yes"; then
106976747b715Smrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
106986747b715Smrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
106996747b715Smrg        groff_ms_works=yes
107006747b715Smrg    else
107016747b715Smrg        groff_ms_works=no
107026747b715Smrg    fi
107036747b715Smrg    AC_MSG_RESULT([$groff_ms_works])
107046747b715Smrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
107056747b715Smrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
107066747b715Smrg        groff_mm_works=yes
107076747b715Smrg    else
107086747b715Smrg        groff_mm_works=no
107096747b715Smrg    fi
107106747b715Smrg    AC_MSG_RESULT([$groff_mm_works])
107116747b715Smrgfi
107126747b715Smrg
107136747b715Smrg# We have groff, test for HTML dependencies, one command per package
107146747b715Smrgif test "x$have_groff" = x"yes"; then
107156747b715Smrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
107166747b715Smrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
107176747b715Smrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
107186747b715Smrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
107196747b715Smrg      have_groff_html=yes
107206747b715Smrg   else
107216747b715Smrg      have_groff_html=no
107226747b715Smrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
107236747b715Smrg   fi
107246747b715Smrgfi
107256747b715Smrg
107266747b715Smrg# Set Automake conditionals for Makefiles
107276747b715SmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
107286747b715SmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
107296747b715SmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
107306747b715SmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
107316747b715Smrg]) # XORG_WITH_GROFF
107326747b715Smrg
107336747b715Smrg# XORG_WITH_FOP([DEFAULT])
107346747b715Smrg# ----------------
107356747b715Smrg# Minimum version: 1.6.0
107366747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0
107376747b715Smrg#
107386747b715Smrg# Documentation tools are not always available on all platforms and sometimes
107396747b715Smrg# not at the appropriate level. This macro enables a module to test for the
107406747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
107416747b715Smrg# the --with-fop option, it allows maximum flexibilty in making decisions
107426747b715Smrg# as whether or not to use the fop package. When DEFAULT is not specified,
107436747b715Smrg# --with-fop assumes 'auto'.
107446747b715Smrg#
107456747b715Smrg# Interface to module:
107466747b715Smrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
107476747b715Smrg# FOP:	 	returns the path of the fop program found
107486747b715Smrg#		returns the path set by the user in the environment
107496747b715Smrg# --with-fop: 	'yes' user instructs the module to use fop
107506747b715Smrg#		'no' user instructs the module not to use fop
107516747b715Smrg#
107526747b715Smrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
107536747b715Smrg#
107546747b715SmrgAC_DEFUN([XORG_WITH_FOP],[
107556747b715SmrgAC_ARG_VAR([FOP], [Path to fop command])
107566747b715Smrgm4_define([_defopt], m4_default([$1], [auto]))
107576747b715SmrgAC_ARG_WITH(fop,
107586747b715Smrg	AS_HELP_STRING([--with-fop],
107596747b715Smrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
107606747b715Smrg	   [use_fop=$withval], [use_fop=]_defopt)
107616747b715Smrgm4_undefine([_defopt])
107626747b715Smrg
107636747b715Smrgif test "x$use_fop" = x"auto"; then
107646747b715Smrg   AC_PATH_PROG([FOP], [fop])
107656747b715Smrg   if test "x$FOP" = "x"; then
107666747b715Smrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
107676747b715Smrg	have_fop=no
107686747b715Smrg   else
107696747b715Smrg        have_fop=yes
107706747b715Smrg   fi
107716747b715Smrgelif test "x$use_fop" = x"yes" ; then
107726747b715Smrg   AC_PATH_PROG([FOP], [fop])
107736747b715Smrg   if test "x$FOP" = "x"; then
107746747b715Smrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
107756747b715Smrg   fi
107766747b715Smrg   have_fop=yes
107776747b715Smrgelif test "x$use_fop" = x"no" ; then
107786747b715Smrg   if test "x$FOP" != "x"; then
107796747b715Smrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
107806747b715Smrg   fi
107816747b715Smrg   have_fop=no
107826747b715Smrgelse
107836747b715Smrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
107846747b715Smrgfi
107856747b715SmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
107866747b715Smrg]) # XORG_WITH_FOP
107876747b715Smrg
107886747b715Smrg# XORG_WITH_PS2PDF([DEFAULT])
107896747b715Smrg# ----------------
107906747b715Smrg# Minimum version: 1.6.0
107916747b715Smrg# Minimum version for optional DEFAULT argument: 1.11.0
107926747b715Smrg#
107936747b715Smrg# Documentation tools are not always available on all platforms and sometimes
107946747b715Smrg# not at the appropriate level. This macro enables a module to test for the
107956747b715Smrg# presence of the tool and obtain it's path in separate variables. Coupled with
107966747b715Smrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
107976747b715Smrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
107986747b715Smrg# --with-ps2pdf assumes 'auto'.
107996747b715Smrg#
108006747b715Smrg# Interface to module:
108016747b715Smrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
108026747b715Smrg# PS2PDF:	returns the path of the ps2pdf program found
108036747b715Smrg#		returns the path set by the user in the environment
108046747b715Smrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
108056747b715Smrg#		 'no' user instructs the module not to use ps2pdf
108066747b715Smrg#
108076747b715Smrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
108086747b715Smrg#
108096747b715SmrgAC_DEFUN([XORG_WITH_PS2PDF],[
108106747b715SmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
108116747b715Smrgm4_define([_defopt], m4_default([$1], [auto]))
108126747b715SmrgAC_ARG_WITH(ps2pdf,
108136747b715Smrg	AS_HELP_STRING([--with-ps2pdf],
108146747b715Smrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
108156747b715Smrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
108166747b715Smrgm4_undefine([_defopt])
108176747b715Smrg
108186747b715Smrgif test "x$use_ps2pdf" = x"auto"; then
108196747b715Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
108206747b715Smrg   if test "x$PS2PDF" = "x"; then
108216747b715Smrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
108226747b715Smrg	have_ps2pdf=no
108236747b715Smrg   else
108246747b715Smrg        have_ps2pdf=yes
108256747b715Smrg   fi
108266747b715Smrgelif test "x$use_ps2pdf" = x"yes" ; then
108276747b715Smrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
108286747b715Smrg   if test "x$PS2PDF" = "x"; then
108296747b715Smrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
108306747b715Smrg   fi
108316747b715Smrg   have_ps2pdf=yes
108326747b715Smrgelif test "x$use_ps2pdf" = x"no" ; then
108336747b715Smrg   if test "x$PS2PDF" != "x"; then
108346747b715Smrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
108356747b715Smrg   fi
108366747b715Smrg   have_ps2pdf=no
108376747b715Smrgelse
108386747b715Smrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
108396747b715Smrgfi
108406747b715SmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
108416747b715Smrg]) # XORG_WITH_PS2PDF
108426747b715Smrg
108436747b715Smrg# XORG_ENABLE_DOCS (enable_docs=yes)
108446747b715Smrg# ----------------
108456747b715Smrg# Minimum version: 1.6.0
108466747b715Smrg#
108476747b715Smrg# Documentation tools are not always available on all platforms and sometimes
108486747b715Smrg# not at the appropriate level. This macro enables a builder to skip all
108496747b715Smrg# documentation targets except traditional man pages.
108506747b715Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
108516747b715Smrg# maximum flexibilty in controlling documentation building.
108526747b715Smrg# Refer to:
108536747b715Smrg# XORG_WITH_XMLTO         --with-xmlto
108546747b715Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
108556747b715Smrg# XORG_WITH_DOXYGEN       --with-doxygen
108566747b715Smrg# XORG_WITH_FOP           --with-fop
108576747b715Smrg# XORG_WITH_GROFF         --with-groff
108586747b715Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
108596747b715Smrg#
108606747b715Smrg# Interface to module:
108616747b715Smrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
108626747b715Smrg# --enable-docs: 'yes' user instructs the module to generate docs
108636747b715Smrg#		 'no' user instructs the module not to generate docs
108646747b715Smrg# parm1:	specify the default value, yes or no.
108656747b715Smrg#
108666747b715SmrgAC_DEFUN([XORG_ENABLE_DOCS],[
108678223e2f2Smrgm4_define([docs_default], m4_default([$1], [yes]))
108686747b715SmrgAC_ARG_ENABLE(docs,
108696747b715Smrg	AS_HELP_STRING([--enable-docs],
108708223e2f2Smrg	   [Enable building the documentation (default: ]docs_default[)]),
108718223e2f2Smrg	   [build_docs=$enableval], [build_docs=]docs_default)
108728223e2f2Smrgm4_undefine([docs_default])
108736747b715SmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
108746747b715SmrgAC_MSG_CHECKING([whether to build documentation])
108756747b715SmrgAC_MSG_RESULT([$build_docs])
108766747b715Smrg]) # XORG_ENABLE_DOCS
108776747b715Smrg
108786747b715Smrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
108796747b715Smrg# ----------------
108806747b715Smrg# Minimum version: 1.6.0
108816747b715Smrg#
108826747b715Smrg# This macro enables a builder to skip all developer documentation.
108836747b715Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
108846747b715Smrg# maximum flexibilty in controlling documentation building.
108856747b715Smrg# Refer to:
108866747b715Smrg# XORG_WITH_XMLTO         --with-xmlto
108876747b715Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
108886747b715Smrg# XORG_WITH_DOXYGEN       --with-doxygen
108896747b715Smrg# XORG_WITH_FOP           --with-fop
108906747b715Smrg# XORG_WITH_GROFF         --with-groff
108916747b715Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
108926747b715Smrg#
108936747b715Smrg# Interface to module:
108946747b715Smrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
108956747b715Smrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
108966747b715Smrg#			'no' user instructs the module not to generate developer docs
108976747b715Smrg# parm1:		specify the default value, yes or no.
108986747b715Smrg#
108996747b715SmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
109006747b715Smrgm4_define([devel_default], m4_default([$1], [yes]))
109016747b715SmrgAC_ARG_ENABLE(devel-docs,
109026747b715Smrg	AS_HELP_STRING([--enable-devel-docs],
109036747b715Smrg	   [Enable building the developer documentation (default: ]devel_default[)]),
109046747b715Smrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
109056747b715Smrgm4_undefine([devel_default])
109066747b715SmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
109076747b715SmrgAC_MSG_CHECKING([whether to build developer documentation])
109086747b715SmrgAC_MSG_RESULT([$build_devel_docs])
109096747b715Smrg]) # XORG_ENABLE_DEVEL_DOCS
109106747b715Smrg
109116747b715Smrg# XORG_ENABLE_SPECS (enable_specs=yes)
109126747b715Smrg# ----------------
109136747b715Smrg# Minimum version: 1.6.0
109146747b715Smrg#
109156747b715Smrg# This macro enables a builder to skip all functional specification targets.
109166747b715Smrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
109176747b715Smrg# maximum flexibilty in controlling documentation building.
109186747b715Smrg# Refer to:
109196747b715Smrg# XORG_WITH_XMLTO         --with-xmlto
109206747b715Smrg# XORG_WITH_ASCIIDOC      --with-asciidoc
109216747b715Smrg# XORG_WITH_DOXYGEN       --with-doxygen
109226747b715Smrg# XORG_WITH_FOP           --with-fop
109236747b715Smrg# XORG_WITH_GROFF         --with-groff
109246747b715Smrg# XORG_WITH_PS2PDF        --with-ps2pdf
109256747b715Smrg#
109266747b715Smrg# Interface to module:
109276747b715Smrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
109286747b715Smrg# --enable-specs:	'yes' user instructs the module to generate specs
109296747b715Smrg#			'no' user instructs the module not to generate specs
109306747b715Smrg# parm1:		specify the default value, yes or no.
109316747b715Smrg#
109326747b715SmrgAC_DEFUN([XORG_ENABLE_SPECS],[
109336747b715Smrgm4_define([spec_default], m4_default([$1], [yes]))
109346747b715SmrgAC_ARG_ENABLE(specs,
109356747b715Smrg	AS_HELP_STRING([--enable-specs],
109366747b715Smrg	   [Enable building the specs (default: ]spec_default[)]),
109376747b715Smrg	   [build_specs=$enableval], [build_specs=]spec_default)
109386747b715Smrgm4_undefine([spec_default])
109396747b715SmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
109406747b715SmrgAC_MSG_CHECKING([whether to build functional specifications])
109416747b715SmrgAC_MSG_RESULT([$build_specs])
109426747b715Smrg]) # XORG_ENABLE_SPECS
109436747b715Smrg
109444642e01fSmrg# XORG_CHECK_MALLOC_ZERO
109454642e01fSmrg# ----------------------
109464642e01fSmrg# Minimum version: 1.0.0
109474642e01fSmrg#
109484642e01fSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
109494642e01fSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
109504642e01fSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
109514642e01fSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
109524642e01fSmrgAC_ARG_ENABLE(malloc0returnsnull,
10953b1d344b3Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
109544642e01fSmrg		       [malloc(0) returns NULL (default: auto)]),
109554642e01fSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
109564642e01fSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
109574642e01fSmrg
109584642e01fSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
109594642e01fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
109608223e2f2Smrg	AC_RUN_IFELSE([AC_LANG_PROGRAM([
109618223e2f2Smrg#include <stdlib.h>
109628223e2f2Smrg],[
109634642e01fSmrg    char *m0, *r0, *c0, *p;
109644642e01fSmrg    m0 = malloc(0);
109654642e01fSmrg    p = malloc(10);
109664642e01fSmrg    r0 = realloc(p,0);
109678223e2f2Smrg    c0 = calloc(0,10);
109688223e2f2Smrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
109698223e2f2Smrg])],
109704642e01fSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
109716747b715Smrg		[MALLOC_ZERO_RETURNS_NULL=no],
109726747b715Smrg		[MALLOC_ZERO_RETURNS_NULL=yes])
109734642e01fSmrgfi
109744642e01fSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
109754642e01fSmrg
109764642e01fSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
109774642e01fSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
109784642e01fSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
109794642e01fSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
109804642e01fSmrgelse
109814642e01fSmrg	MALLOC_ZERO_CFLAGS=""
109824642e01fSmrg	XMALLOC_ZERO_CFLAGS=""
109834642e01fSmrg	XTMALLOC_ZERO_CFLAGS=""
109844642e01fSmrgfi
109854642e01fSmrg
109864642e01fSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
109874642e01fSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
109884642e01fSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
109894642e01fSmrg]) # XORG_CHECK_MALLOC_ZERO
109904642e01fSmrg
109914642e01fSmrg# XORG_WITH_LINT()
109924642e01fSmrg# ----------------
109934642e01fSmrg# Minimum version: 1.1.0
109944642e01fSmrg#
109956747b715Smrg# This macro enables the use of a tool that flags some suspicious and
109966747b715Smrg# non-portable constructs (likely to be bugs) in C language source code.
109976747b715Smrg# It will attempt to locate the tool and use appropriate options.
109986747b715Smrg# There are various lint type tools on different platforms.
109996747b715Smrg#
110006747b715Smrg# Interface to module:
110016747b715Smrg# LINT:		returns the path to the tool found on the platform
110026747b715Smrg#		or the value set to LINT on the configure cmd line
110036747b715Smrg#		also an Automake conditional
110046747b715Smrg# LINT_FLAGS:	an Automake variable with appropriate flags
110056747b715Smrg#
110066747b715Smrg# --with-lint:	'yes' user instructs the module to use lint
110076747b715Smrg#		'no' user instructs the module not to use lint (default)
110086747b715Smrg#
110096747b715Smrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
110106747b715Smrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
110114642e01fSmrg#
110124642e01fSmrgAC_DEFUN([XORG_WITH_LINT],[
110134642e01fSmrg
110146747b715SmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
110156747b715SmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
11016b1d344b3SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
110174642e01fSmrg		[Use a lint-style source code checker (default: disabled)])],
110184642e01fSmrg		[use_lint=$withval], [use_lint=no])
110196747b715Smrg
110206747b715Smrg# Obtain platform specific info like program name and options
110216747b715Smrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
110226747b715Smrgcase $host_os in
110236747b715Smrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
110246747b715Smrg	lint_name=splint
110256747b715Smrg	lint_options="-badflag"
110266747b715Smrg	;;
110276747b715Smrg  *freebsd* | *netbsd*)
110286747b715Smrg	lint_name=lint
110296747b715Smrg	lint_options="-u -b"
110306747b715Smrg	;;
110316747b715Smrg  *solaris*)
110326747b715Smrg	lint_name=lint
110336747b715Smrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
110346747b715Smrg	;;
110356747b715Smrgesac
110366747b715Smrg
110376747b715Smrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
110386747b715Smrgif test "x$use_lint" = x"yes" ; then
110396747b715Smrg   AC_PATH_PROG([LINT], [$lint_name])
110406747b715Smrg   if test "x$LINT" = "x"; then
110416747b715Smrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
110426747b715Smrg   fi
110436747b715Smrgelif test "x$use_lint" = x"no" ; then
110446747b715Smrg   if test "x$LINT" != "x"; then
110456747b715Smrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
110466747b715Smrg   fi
110474642e01fSmrgelse
110486747b715Smrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
110494642e01fSmrgfi
110506747b715Smrg
110516747b715Smrg# User supplied flags override default flags
110526747b715Smrgif test "x$LINT_FLAGS" != "x"; then
110536747b715Smrg   lint_options=$LINT_FLAGS
110544642e01fSmrgfi
110554642e01fSmrg
110566747b715SmrgAC_SUBST([LINT_FLAGS],[$lint_options])
110576747b715SmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
110584642e01fSmrg
110594642e01fSmrg]) # XORG_WITH_LINT
110604642e01fSmrg
110614642e01fSmrg# XORG_LINT_LIBRARY(LIBNAME)
110624642e01fSmrg# --------------------------
110634642e01fSmrg# Minimum version: 1.1.0
110644642e01fSmrg#
110654642e01fSmrg# Sets up flags for building lint libraries for checking programs that call
110664642e01fSmrg# functions in the library.
110674642e01fSmrg#
110686747b715Smrg# Interface to module:
110696747b715Smrg# LINTLIB		- Automake variable with the name of lint library file to make
110706747b715Smrg# MAKE_LINT_LIB		- Automake conditional
110716747b715Smrg#
110726747b715Smrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
110736747b715Smrg#			  - 'no' user instructs the module not to create a lint library (default)
110744642e01fSmrg
110754642e01fSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
110764642e01fSmrgAC_REQUIRE([XORG_WITH_LINT])
11077b1d344b3SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
110784642e01fSmrg	[Create lint library (default: disabled)])],
110794642e01fSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
110806747b715Smrg
110816747b715Smrgif test "x$make_lint_lib" = x"yes" ; then
110826747b715Smrg   LINTLIB=llib-l$1.ln
110836747b715Smrg   if test "x$LINT" = "x"; then
110846747b715Smrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
110856747b715Smrg   fi
110866747b715Smrgelif test "x$make_lint_lib" != x"no" ; then
110876747b715Smrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
110884642e01fSmrgfi
110896747b715Smrg
110904642e01fSmrgAC_SUBST(LINTLIB)
110914642e01fSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
110924642e01fSmrg
110934642e01fSmrg]) # XORG_LINT_LIBRARY
110944642e01fSmrg
110954642e01fSmrg# XORG_CWARNFLAGS
110964642e01fSmrg# ---------------
110974642e01fSmrg# Minimum version: 1.2.0
110984642e01fSmrg#
110994642e01fSmrg# Defines CWARNFLAGS to enable C compiler warnings.
111004642e01fSmrg#
111014642e01fSmrgAC_DEFUN([XORG_CWARNFLAGS], [
111026747b715SmrgAC_REQUIRE([AC_PROG_CC_C99])
111034642e01fSmrgif  test "x$GCC" = xyes ; then
111044642e01fSmrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
111054642e01fSmrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
111066747b715Smrg-Wbad-function-cast -Wformat=2"
1110752397711Smrg    case `$CC -dumpversion` in
111084642e01fSmrg    3.4.* | 4.*)
1110952397711Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
111104642e01fSmrg	;;
111114642e01fSmrg    esac
111124642e01fSmrgelse
111134642e01fSmrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
111144642e01fSmrg    if test "x$SUNCC" = "xyes"; then
111154642e01fSmrg	CWARNFLAGS="-v"
111164642e01fSmrg    fi
111174642e01fSmrgfi
111184642e01fSmrgAC_SUBST(CWARNFLAGS)
111194642e01fSmrg]) # XORG_CWARNFLAGS
11120b1d344b3Smrg
11121b1d344b3Smrg# XORG_STRICT_OPTION
11122b1d344b3Smrg# -----------------------
11123b1d344b3Smrg# Minimum version: 1.3.0
11124b1d344b3Smrg#
11125b1d344b3Smrg# Add configure option to enable strict compilation
11126b1d344b3SmrgAC_DEFUN([XORG_STRICT_OPTION], [
111276747b715Smrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
11128b1d344b3SmrgAC_REQUIRE([AC_PROG_CC_C99])
11129b1d344b3SmrgAC_REQUIRE([XORG_CWARNFLAGS])
11130b1d344b3Smrg
11131b1d344b3SmrgAC_ARG_ENABLE(strict-compilation,
11132b1d344b3Smrg			  AS_HELP_STRING([--enable-strict-compilation],
11133b1d344b3Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
11134b1d344b3Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11135b1d344b3Smrgif test "x$STRICT_COMPILE" = "xyes"; then
11136b1d344b3Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
11137b1d344b3Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
11138b1d344b3Smrg	if test "x$GCC" = xyes ; then
11139b1d344b3Smrg		STRICT_CFLAGS="-pedantic -Werror"
11140b1d344b3Smrg	elif test "x$SUNCC" = "xyes"; then
11141b1d344b3Smrg		STRICT_CFLAGS="-errwarn"
11142b1d344b3Smrg    elif test "x$INTELCC" = "xyes"; then
11143b1d344b3Smrg		STRICT_CFLAGS="-Werror"
11144b1d344b3Smrg	fi
11145b1d344b3Smrgfi
11146b1d344b3SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
11147b1d344b3SmrgAC_SUBST([CWARNFLAGS])
11148b1d344b3Smrg]) # XORG_STRICT_OPTION
11149b1d344b3Smrg
11150b1d344b3Smrg# XORG_DEFAULT_OPTIONS
11151b1d344b3Smrg# --------------------
11152b1d344b3Smrg# Minimum version: 1.3.0
11153b1d344b3Smrg#
11154b1d344b3Smrg# Defines default options for X.Org modules.
11155b1d344b3Smrg#
11156b1d344b3SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
111576747b715SmrgAC_REQUIRE([AC_PROG_INSTALL])
11158b1d344b3SmrgXORG_CWARNFLAGS
11159b1d344b3SmrgXORG_STRICT_OPTION
11160b1d344b3SmrgXORG_RELEASE_VERSION
11161b1d344b3SmrgXORG_CHANGELOG
111626747b715SmrgXORG_INSTALL
11163b1d344b3SmrgXORG_MANPAGE_SECTIONS
111646747b715Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
111656747b715Smrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
11166b1d344b3Smrg]) # XORG_DEFAULT_OPTIONS
111676747b715Smrg
111686747b715Smrg# XORG_INSTALL()
111696747b715Smrg# ----------------
111706747b715Smrg# Minimum version: 1.4.0
111716747b715Smrg#
111726747b715Smrg# Defines the variable INSTALL_CMD as the command to copy
111736747b715Smrg# INSTALL from $prefix/share/util-macros.
111746747b715Smrg#
111756747b715SmrgAC_DEFUN([XORG_INSTALL], [
111766747b715SmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
111776747b715Smrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
111786747b715SmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
111796747b715Smrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
111806747b715Smrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
111816747b715Smrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
111826747b715SmrgAC_SUBST([INSTALL_CMD])
111836747b715Smrg]) # XORG_INSTALL
111844642e01fSmrgdnl Copyright 2005 Red Hat, Inc
111854642e01fSmrgdnl
111864642e01fSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
111874642e01fSmrgdnl documentation for any purpose is hereby granted without fee, provided that
111884642e01fSmrgdnl the above copyright notice appear in all copies and that both that
111894642e01fSmrgdnl copyright notice and this permission notice appear in supporting
111904642e01fSmrgdnl documentation.
111914642e01fSmrgdnl
111924642e01fSmrgdnl The above copyright notice and this permission notice shall be included
111934642e01fSmrgdnl in all copies or substantial portions of the Software.
111944642e01fSmrgdnl
111954642e01fSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
111964642e01fSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
111974642e01fSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
111984642e01fSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
111994642e01fSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
112004642e01fSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
112014642e01fSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
112024642e01fSmrgdnl
112034642e01fSmrgdnl Except as contained in this notice, the name of the copyright holders shall
112044642e01fSmrgdnl not be used in advertising or otherwise to promote the sale, use or
112054642e01fSmrgdnl other dealings in this Software without prior written authorization
112064642e01fSmrgdnl from the copyright holders.
112074642e01fSmrgdnl
112084642e01fSmrg
112094642e01fSmrg# XORG_RELEASE_VERSION
112104642e01fSmrg# --------------------
112116747b715Smrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
112124642e01fSmrg 
112134642e01fSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
112144642e01fSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
112154642e01fSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
112164642e01fSmrg		[Major version of this package])
112174642e01fSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
112184642e01fSmrg	if test "x$PVM" = "x"; then
112194642e01fSmrg		PVM="0"
112204642e01fSmrg	fi
112214642e01fSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
112224642e01fSmrg		[$PVM],
112234642e01fSmrg		[Minor version of this package])
112244642e01fSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
112254642e01fSmrg	if test "x$PVP" = "x"; then
112264642e01fSmrg		PVP="0"
112274642e01fSmrg	fi
112284642e01fSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
112294642e01fSmrg		[$PVP],
112304642e01fSmrg		[Patch version of this package])
112314642e01fSmrg])
112324642e01fSmrg
112334642e01fSmrg# XORG_CHANGELOG()
112344642e01fSmrg# ----------------
112354642e01fSmrg# Minimum version: 1.2.0
112364642e01fSmrg#
112374642e01fSmrg# Defines the variable CHANGELOG_CMD as the command to generate
112384642e01fSmrg# ChangeLog from git.
112394642e01fSmrg#
1124052397711Smrg#
112414642e01fSmrgAC_DEFUN([XORG_CHANGELOG], [
112426747b715SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
112436747b715Smrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
112446747b715Smrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
112454642e01fSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
112464642e01fSmrgAC_SUBST([CHANGELOG_CMD])
112474642e01fSmrg]) # XORG_CHANGELOG
112484642e01fSmrg
112494642e01fSmrgdnl
112508223e2f2Smrgdnl Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
112518223e2f2Smrgdnl
112528223e2f2Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
112538223e2f2Smrgdnl copy of this software and associated documentation files (the "Software"),
112548223e2f2Smrgdnl to deal in the Software without restriction, including without limitation
112558223e2f2Smrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
112568223e2f2Smrgdnl and/or sell copies of the Software, and to permit persons to whom the
112578223e2f2Smrgdnl Software is furnished to do so, subject to the following conditions:
112588223e2f2Smrgdnl
112598223e2f2Smrgdnl The above copyright notice and this permission notice (including the next
112608223e2f2Smrgdnl paragraph) shall be included in all copies or substantial portions of the
112618223e2f2Smrgdnl Software.
112628223e2f2Smrgdnl
112638223e2f2Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
112648223e2f2Smrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
112658223e2f2Smrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
112668223e2f2Smrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
112678223e2f2Smrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
112688223e2f2Smrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
112698223e2f2Smrgdnl DEALINGS IN THE SOFTWARE.
112708223e2f2Smrgdnl
112714642e01fSmrg
112724642e01fSmrg# XTRANS_TCP_FLAGS()
112734642e01fSmrg# ------------------
112744642e01fSmrg# Find needed libraries for TCP sockets, and check for IPv6 support
112754642e01fSmrgAC_DEFUN([XTRANS_TCP_FLAGS],[
112764642e01fSmrg # SVR4 hides these in libraries other than libc
112774642e01fSmrg AC_SEARCH_LIBS(socket, [socket])
112784642e01fSmrg AC_SEARCH_LIBS(gethostbyname, [nsl])
112796747b715Smrg if test "$ac_cv_search_socket$ac_cv_search_gethostbyname" = "nono"; then
112806747b715Smrg   AC_HAVE_LIBRARY([ws2_32])
112816747b715Smrg fi
112824642e01fSmrg
112834642e01fSmrg # Needs to come after above checks for libsocket & libnsl for SVR4 systems
112844642e01fSmrg AC_ARG_ENABLE(ipv6, 
1128552397711Smrg	AC_HELP_STRING([--enable-ipv6],[Enable IPv6 support]),
112864642e01fSmrg	[IPV6CONN=$enableval], 
112874642e01fSmrg	[AC_CHECK_FUNC(getaddrinfo,[IPV6CONN=yes],[IPV6CONN=no])])
112884642e01fSmrg AC_MSG_CHECKING([if IPv6 support should be built])
112894642e01fSmrg if test "$IPV6CONN" = "yes"; then
112904642e01fSmrg	AC_DEFINE(IPv6,1,[Support IPv6 for TCP connections])
112914642e01fSmrg fi
112924642e01fSmrg AC_MSG_RESULT($IPV6CONN)
112934642e01fSmrg
112944642e01fSmrg # 4.3BSD-Reno added a new member to struct sockaddr_in
112954642e01fSmrg AC_CHECK_MEMBER([struct sockaddr_in.sin_len], 
112964642e01fSmrg	AC_DEFINE([BSD44SOCKETS],1,
112974642e01fSmrg 	    [Define to 1 if `struct sockaddr_in' has a `sin_len' member]), [], [
112984642e01fSmrg#include <sys/types.h>
112994642e01fSmrg#include <sys/socket.h>
113004642e01fSmrg#include <netinet/in.h>
113014642e01fSmrg ])
113024642e01fSmrg
113034642e01fSmrg # POSIX.1g changed the type of pointer passed to getsockname/getpeername/etc.
113044642e01fSmrg AC_CHECK_TYPES([socklen_t], [], [], [
113054642e01fSmrgAC_INCLUDES_DEFAULT
113064642e01fSmrg#include <sys/socket.h>])
113074642e01fSmrg 
113084642e01fSmrg]) # XTRANS_TCP_FLAGS
113094642e01fSmrg
113104642e01fSmrg# XTRANS_CONNECTION_FLAGS()
113114642e01fSmrg# -------------------------
113124642e01fSmrg# Standard checks for which Xtrans transports to use by the Xorg packages
113134642e01fSmrg# that use Xtrans functions
113144642e01fSmrgAC_DEFUN([XTRANS_CONNECTION_FLAGS],[
113154642e01fSmrg AC_REQUIRE([AC_CANONICAL_HOST])
113164642e01fSmrg AC_REQUIRE([AC_TYPE_SIGNAL])
113174642e01fSmrg [case $host_os in
113184642e01fSmrg	mingw*)	unixdef="no"   ;;
113194642e01fSmrg	*)	unixdef="yes"  ;;
113204642e01fSmrg esac]
113214642e01fSmrg AC_ARG_ENABLE(unix-transport,
113224642e01fSmrg	AC_HELP_STRING([--enable-unix-transport],[Enable UNIX domain socket transport]),
113234642e01fSmrg	[UNIXCONN=$enableval], [UNIXCONN=$unixdef])
113244642e01fSmrg AC_MSG_CHECKING([if Xtrans should support UNIX socket connections])
113254642e01fSmrg if test "$UNIXCONN" = "yes"; then
113264642e01fSmrg	AC_DEFINE(UNIXCONN,1,[Support UNIX socket connections])
113274642e01fSmrg fi
113284642e01fSmrg AC_MSG_RESULT($UNIXCONN)
113294642e01fSmrg AC_ARG_ENABLE(tcp-transport, 
113304642e01fSmrg	AC_HELP_STRING([--enable-tcp-transport],[Enable TCP socket transport]),
113314642e01fSmrg	[TCPCONN=$enableval], [TCPCONN=yes])
113324642e01fSmrg AC_MSG_CHECKING([if Xtrans should support TCP socket connections])
113334642e01fSmrg AC_MSG_RESULT($TCPCONN)
113344642e01fSmrg if test "$TCPCONN" = "yes"; then
113354642e01fSmrg	AC_DEFINE(TCPCONN,1,[Support TCP socket connections])
113364642e01fSmrg	XTRANS_TCP_FLAGS
113374642e01fSmrg fi
113384642e01fSmrg [case $host_os in
113394642e01fSmrg	solaris*|sco*|sysv4*)	localdef="yes" ;;
113404642e01fSmrg	*)			localdef="no"  ;;
113414642e01fSmrg esac]
113424642e01fSmrg AC_ARG_ENABLE(local-transport,
113434642e01fSmrg	AC_HELP_STRING([--enable-local-transport],[Enable os-specific local transport]),
113444642e01fSmrg	[LOCALCONN=$enableval], [LOCALCONN=$localdef])
113454642e01fSmrg AC_MSG_CHECKING([if Xtrans should support os-specific local connections])
113464642e01fSmrg AC_MSG_RESULT($LOCALCONN)
113474642e01fSmrg if test "$LOCALCONN" = "yes"; then
113484642e01fSmrg	AC_DEFINE(LOCALCONN,1,[Support os-specific local connections])
113494642e01fSmrg fi
113504642e01fSmrg 
113514642e01fSmrg]) # XTRANS_CONNECTION_FLAGS
113524642e01fSmrg
113534642e01fSmrg
113544642e01fSmrg# XTRANS_SECURE_RPC_FLAGS()
113554642e01fSmrg# -------------------------
113564642e01fSmrg# Check for Secure RPC functions - must come after XTRANS_TCP_FLAGS
113574642e01fSmrg# so that any necessary networking libraries are already found
113584642e01fSmrgAC_DEFUN([XTRANS_SECURE_RPC_FLAGS],
113594642e01fSmrg[AC_REQUIRE([XTRANS_TCP_FLAGS])
113604642e01fSmrg AC_ARG_ENABLE(secure-rpc, 
113614642e01fSmrg	AC_HELP_STRING([--enable-secure-rpc],[Enable Secure RPC]),
113624642e01fSmrg        [SECURE_RPC=$enableval], [SECURE_RPC="try"])
113634642e01fSmrg
113644642e01fSmrg if test "x$SECURE_RPC" = "xyes" -o "x$SECURE_RPC" = "xtry" ; then
113654642e01fSmrg	FOUND_SECURE_RPC="no"
113664642e01fSmrg	AC_CHECK_FUNCS([authdes_seccreate authdes_create],
113674642e01fSmrg			[FOUND_SECURE_RPC="yes"])
113684642e01fSmrg	if test "x$FOUND_SECURE_RPC" = "xno" ; then
113694642e01fSmrg		if test "x$SECURE_RPC" = "xyes" ; then
113704642e01fSmrg	AC_MSG_ERROR([Secure RPC requested, but required functions not found])
113714642e01fSmrg		fi	
113724642e01fSmrg		SECURE_RPC="no"
113734642e01fSmrg	else
113744642e01fSmrg		dnl FreeBSD keeps getsecretkey in librpcsvc
113754642e01fSmrg		AC_SEARCH_LIBS(getsecretkey, [rpcsvc])
113764642e01fSmrg		SECURE_RPC="yes"
113774642e01fSmrg	fi
113784642e01fSmrg fi
113794642e01fSmrg AC_MSG_CHECKING([if Secure RPC authentication ("SUN-DES-1") should be supported])
113804642e01fSmrg if test "x$SECURE_RPC" = "xyes" ; then
113814642e01fSmrg	AC_DEFINE(SECURE_RPC, 1, [Support Secure RPC ("SUN-DES-1") authentication for X11 clients])
113824642e01fSmrg fi
113834642e01fSmrg AC_MSG_RESULT($SECURE_RPC)
113844642e01fSmrg]) # XTRANS_SECURE_RPC_FLAGS
113854642e01fSmrg
113864642e01fSmrg
11387