aclocal.m4 revision 06f32fbe
125b89263Smrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
2a253d6aeSmrg
3a253d6aeSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4ea133fd7Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
5a253d6aeSmrg# This file is free software; the Free Software Foundation
6a253d6aeSmrg# gives unlimited permission to copy and/or distribute it,
7a253d6aeSmrg# with or without modifications, as long as this notice is preserved.
8a253d6aeSmrg
9a253d6aeSmrg# This program is distributed in the hope that it will be useful,
10a253d6aeSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11a253d6aeSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12a253d6aeSmrg# PARTICULAR PURPOSE.
13a253d6aeSmrg
14ea133fd7Smrgm4_ifndef([AC_AUTOCONF_VERSION],
15ea133fd7Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1625b89263Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
1725b89263Smrg[m4_warning([this file was generated for autoconf 2.68.
18ea133fd7SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
19ea133fd7SmrgIf you have problems, you may need to regenerate the build system entirely.
20ea133fd7SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
21a253d6aeSmrg
2225b89263Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
23a253d6aeSmrg#
2425b89263Smrg# This file is free software; the Free Software Foundation
2525b89263Smrg# gives unlimited permission to copy and/or distribute it,
2625b89263Smrg# with or without modifications, as long as this notice is preserved.
2725b89263Smrg
2825b89263Smrg# AM_AUTOMAKE_VERSION(VERSION)
2925b89263Smrg# ----------------------------
3025b89263Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
3125b89263Smrg# generated from the m4 files accompanying Automake X.Y.
3225b89263Smrg# (This private macro should not be called outside this file.)
3325b89263SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
3425b89263Smrg[am__api_version='1.11'
3525b89263Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3625b89263Smrgdnl require some minimum version.  Point them to the right macro.
3725b89263Smrgm4_if([$1], [1.11.1], [],
3825b89263Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3925b89263Smrg])
4025b89263Smrg
4125b89263Smrg# _AM_AUTOCONF_VERSION(VERSION)
4225b89263Smrg# -----------------------------
4325b89263Smrg# aclocal traces this macro to find the Autoconf version.
4425b89263Smrg# This is a private macro too.  Using m4_define simplifies
4525b89263Smrg# the logic in aclocal, which can simply ignore this definition.
4625b89263Smrgm4_define([_AM_AUTOCONF_VERSION], [])
4725b89263Smrg
4825b89263Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
4925b89263Smrg# -------------------------------
5025b89263Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5125b89263Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5225b89263SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5325b89263Smrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
5425b89263Smrgm4_ifndef([AC_AUTOCONF_VERSION],
5525b89263Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5625b89263Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5725b89263Smrg
5825b89263Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
5925b89263Smrg
6025b89263Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
61a253d6aeSmrg#
6225b89263Smrg# This file is free software; the Free Software Foundation
6325b89263Smrg# gives unlimited permission to copy and/or distribute it,
6425b89263Smrg# with or without modifications, as long as this notice is preserved.
65ea133fd7Smrg
6625b89263Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6725b89263Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6825b89263Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
69a253d6aeSmrg#
7025b89263Smrg# Of course, Automake must honor this variable whenever it calls a
7125b89263Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7225b89263Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7325b89263Smrg# depending on how configure is run.  This is pretty annoying, since
7425b89263Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7525b89263Smrg# source directory, any form will work fine, but in subdirectories a
7625b89263Smrg# relative path needs to be adjusted first.
77a253d6aeSmrg#
7825b89263Smrg# $ac_aux_dir/missing
7925b89263Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8025b89263Smrg# $top_srcdir/$ac_aux_dir/missing
8125b89263Smrg#    fails if $ac_aux_dir is absolute,
8225b89263Smrg#    fails when called from a subdirectory in a VPATH build with
8325b89263Smrg#          a relative $ac_aux_dir
84a253d6aeSmrg#
8525b89263Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8625b89263Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8725b89263Smrg# harmless because $srcdir is `.', but things will broke when you
8825b89263Smrg# start a VPATH build or use an absolute $srcdir.
89a253d6aeSmrg#
9025b89263Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9125b89263Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9225b89263Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9325b89263Smrg# and then we would define $MISSING as
9425b89263Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
9525b89263Smrg# This will work as long as MISSING is not called from configure, because
9625b89263Smrg# unfortunately $(top_srcdir) has no meaning in configure.
9725b89263Smrg# However there are other variables, like CC, which are often used in
9825b89263Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
99a253d6aeSmrg#
10025b89263Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
10125b89263Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
10225b89263Smrg# configured tree to be moved without reconfiguration.
103a253d6aeSmrg
10425b89263SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
10525b89263Smrg[dnl Rely on autoconf to set up CDPATH properly.
10625b89263SmrgAC_PREREQ([2.50])dnl
10725b89263Smrg# expand $ac_aux_dir to an absolute path
10825b89263Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
109ea133fd7Smrg])
110a253d6aeSmrg
11125b89263Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
112a253d6aeSmrg
11325b89263Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
11425b89263Smrg# Free Software Foundation, Inc.
11525b89263Smrg#
11625b89263Smrg# This file is free software; the Free Software Foundation
11725b89263Smrg# gives unlimited permission to copy and/or distribute it,
11825b89263Smrg# with or without modifications, as long as this notice is preserved.
119a253d6aeSmrg
12025b89263Smrg# serial 9
121a253d6aeSmrg
12225b89263Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
12325b89263Smrg# -------------------------------------
12425b89263Smrg# Define a conditional.
12525b89263SmrgAC_DEFUN([AM_CONDITIONAL],
12625b89263Smrg[AC_PREREQ(2.52)dnl
12725b89263Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
12825b89263Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
12925b89263SmrgAC_SUBST([$1_TRUE])dnl
13025b89263SmrgAC_SUBST([$1_FALSE])dnl
13125b89263Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
13225b89263Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
13325b89263Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
13425b89263Smrgif $2; then
13525b89263Smrg  $1_TRUE=
13625b89263Smrg  $1_FALSE='#'
13725b89263Smrgelse
13825b89263Smrg  $1_TRUE='#'
13925b89263Smrg  $1_FALSE=
14025b89263Smrgfi
14125b89263SmrgAC_CONFIG_COMMANDS_PRE(
14225b89263Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
14325b89263Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
14425b89263SmrgUsually this means the macro was only invoked conditionally.]])
14525b89263Smrgfi])])
146a253d6aeSmrg
14725b89263Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
14825b89263Smrg# Free Software Foundation, Inc.
14925b89263Smrg#
15025b89263Smrg# This file is free software; the Free Software Foundation
15125b89263Smrg# gives unlimited permission to copy and/or distribute it,
15225b89263Smrg# with or without modifications, as long as this notice is preserved.
153a253d6aeSmrg
15425b89263Smrg# serial 10
155a253d6aeSmrg
15625b89263Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
15725b89263Smrg# written in clear, in which case automake, when reading aclocal.m4,
15825b89263Smrg# will think it sees a *use*, and therefore will trigger all it's
15925b89263Smrg# C support machinery.  Also note that it means that autoscan, seeing
16025b89263Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
161ea133fd7Smrg
162ea133fd7Smrg
16325b89263Smrg# _AM_DEPENDENCIES(NAME)
164ea133fd7Smrg# ----------------------
16525b89263Smrg# See how the compiler implements dependency checking.
16625b89263Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
16725b89263Smrg# We try a few techniques and use that to set a single cache variable.
16825b89263Smrg#
16925b89263Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
17025b89263Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
17125b89263Smrg# dependency, and given that the user is not expected to run this macro,
17225b89263Smrg# just rely on AC_PROG_CC.
17325b89263SmrgAC_DEFUN([_AM_DEPENDENCIES],
17425b89263Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
17525b89263SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
17625b89263SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
17725b89263SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
178ea133fd7Smrg
17925b89263Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
18025b89263Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
18125b89263Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
18225b89263Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
18325b89263Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
18425b89263Smrg                   [depcc="$$1"   am_compiler_list=])
185ea133fd7Smrg
18625b89263SmrgAC_CACHE_CHECK([dependency style of $depcc],
18725b89263Smrg               [am_cv_$1_dependencies_compiler_type],
18825b89263Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18925b89263Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
19025b89263Smrg  # making bogus files that we don't know about and never remove.  For
19125b89263Smrg  # instance it was reported that on HP-UX the gcc test will end up
19225b89263Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
19325b89263Smrg  # in D'.
19425b89263Smrg  mkdir conftest.dir
19525b89263Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
19625b89263Smrg  # using a relative directory.
19725b89263Smrg  cp "$am_depcomp" conftest.dir
19825b89263Smrg  cd conftest.dir
19925b89263Smrg  # We will build objects and dependencies in a subdirectory because
20025b89263Smrg  # it helps to detect inapplicable dependency modes.  For instance
20125b89263Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
20225b89263Smrg  # side effect of compilation, but ICC will put the dependencies in
20325b89263Smrg  # the current directory while Tru64 will put them in the object
20425b89263Smrg  # directory.
20525b89263Smrg  mkdir sub
206a253d6aeSmrg
20725b89263Smrg  am_cv_$1_dependencies_compiler_type=none
20825b89263Smrg  if test "$am_compiler_list" = ""; then
20925b89263Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
210ea133fd7Smrg  fi
21125b89263Smrg  am__universal=false
21225b89263Smrg  m4_case([$1], [CC],
21325b89263Smrg    [case " $depcc " in #(
21425b89263Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21525b89263Smrg     esac],
21625b89263Smrg    [CXX],
21725b89263Smrg    [case " $depcc " in #(
21825b89263Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21925b89263Smrg     esac])
220a253d6aeSmrg
22125b89263Smrg  for depmode in $am_compiler_list; do
22225b89263Smrg    # Setup a source with many dependencies, because some compilers
22325b89263Smrg    # like to wrap large dependency lists on column 80 (with \), and
22425b89263Smrg    # we should not choose a depcomp mode which is confused by this.
22525b89263Smrg    #
22625b89263Smrg    # We need to recreate these files for each test, as the compiler may
22725b89263Smrg    # overwrite some of them when testing with obscure command lines.
22825b89263Smrg    # This happens at least with the AIX C compiler.
22925b89263Smrg    : > sub/conftest.c
23025b89263Smrg    for i in 1 2 3 4 5 6; do
23125b89263Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
23225b89263Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23325b89263Smrg      # Solaris 8's {/usr,}/bin/sh.
23425b89263Smrg      touch sub/conftst$i.h
23525b89263Smrg    done
23625b89263Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
237a253d6aeSmrg
23825b89263Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
23925b89263Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
24025b89263Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
24125b89263Smrg    # versions had trouble with output in subdirs
24225b89263Smrg    am__obj=sub/conftest.${OBJEXT-o}
24325b89263Smrg    am__minus_obj="-o $am__obj"
24425b89263Smrg    case $depmode in
24525b89263Smrg    gcc)
24625b89263Smrg      # This depmode causes a compiler race in universal mode.
24725b89263Smrg      test "$am__universal" = false || continue
24825b89263Smrg      ;;
24925b89263Smrg    nosideeffect)
25025b89263Smrg      # after this tag, mechanisms are not by side-effect, so they'll
25125b89263Smrg      # only be used when explicitly requested
25225b89263Smrg      if test "x$enable_dependency_tracking" = xyes; then
25325b89263Smrg	continue
25425b89263Smrg      else
25525b89263Smrg	break
25625b89263Smrg      fi
25725b89263Smrg      ;;
25825b89263Smrg    msvisualcpp | msvcmsys)
25925b89263Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
26025b89263Smrg      # not run yet.  These depmodes are late enough in the game, and
26125b89263Smrg      # so weak that their functioning should not be impacted.
26225b89263Smrg      am__obj=conftest.${OBJEXT-o}
26325b89263Smrg      am__minus_obj=
26425b89263Smrg      ;;
26525b89263Smrg    none) break ;;
26625b89263Smrg    esac
26725b89263Smrg    if depmode=$depmode \
26825b89263Smrg       source=sub/conftest.c object=$am__obj \
26925b89263Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27025b89263Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27125b89263Smrg         >/dev/null 2>conftest.err &&
27225b89263Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27325b89263Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27425b89263Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27525b89263Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27625b89263Smrg      # icc doesn't choke on unknown options, it will just issue warnings
27725b89263Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
27825b89263Smrg      # that says an option was ignored or not supported.
27925b89263Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
28025b89263Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
28125b89263Smrg      # The diagnosis changed in icc 8.0:
28225b89263Smrg      #   icc: Command line remark: option '-MP' not supported
28325b89263Smrg      if (grep 'ignoring option' conftest.err ||
28425b89263Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28525b89263Smrg        am_cv_$1_dependencies_compiler_type=$depmode
28625b89263Smrg        break
28725b89263Smrg      fi
28825b89263Smrg    fi
28925b89263Smrg  done
290a253d6aeSmrg
29125b89263Smrg  cd ..
29225b89263Smrg  rm -rf conftest.dir
29325b89263Smrgelse
29425b89263Smrg  am_cv_$1_dependencies_compiler_type=none
29525b89263Smrgfi
29625b89263Smrg])
29725b89263SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
29825b89263SmrgAM_CONDITIONAL([am__fastdep$1], [
29925b89263Smrg  test "x$enable_dependency_tracking" != xno \
30025b89263Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
30125b89263Smrg])
302a253d6aeSmrg
303a253d6aeSmrg
30425b89263Smrg# AM_SET_DEPDIR
30525b89263Smrg# -------------
30625b89263Smrg# Choose a directory name for dependency files.
30725b89263Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
30825b89263SmrgAC_DEFUN([AM_SET_DEPDIR],
30925b89263Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
31025b89263SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
31125b89263Smrg])
312a253d6aeSmrg
313a253d6aeSmrg
31425b89263Smrg# AM_DEP_TRACK
31525b89263Smrg# ------------
31625b89263SmrgAC_DEFUN([AM_DEP_TRACK],
31725b89263Smrg[AC_ARG_ENABLE(dependency-tracking,
31825b89263Smrg[  --disable-dependency-tracking  speeds up one-time build
31925b89263Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
32025b89263Smrgif test "x$enable_dependency_tracking" != xno; then
32125b89263Smrg  am_depcomp="$ac_aux_dir/depcomp"
32225b89263Smrg  AMDEPBACKSLASH='\'
32325b89263Smrgfi
32425b89263SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
32525b89263SmrgAC_SUBST([AMDEPBACKSLASH])dnl
32625b89263Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
32725b89263Smrg])
328a253d6aeSmrg
32925b89263Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
330a253d6aeSmrg
33125b89263Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
33225b89263Smrg# Free Software Foundation, Inc.
33325b89263Smrg#
33425b89263Smrg# This file is free software; the Free Software Foundation
33525b89263Smrg# gives unlimited permission to copy and/or distribute it,
33625b89263Smrg# with or without modifications, as long as this notice is preserved.
337a253d6aeSmrg
33825b89263Smrg#serial 5
339ea133fd7Smrg
34025b89263Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
341ea133fd7Smrg# ------------------------------
34225b89263SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
34325b89263Smrg[{
34425b89263Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
34525b89263Smrg  # are listed without --file.  Let's play safe and only enable the eval
34625b89263Smrg  # if we detect the quoting.
34725b89263Smrg  case $CONFIG_FILES in
34825b89263Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
34925b89263Smrg  *)   set x $CONFIG_FILES ;;
35025b89263Smrg  esac
35125b89263Smrg  shift
35225b89263Smrg  for mf
35325b89263Smrg  do
35425b89263Smrg    # Strip MF so we end up with the name of the file.
35525b89263Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
35625b89263Smrg    # Check whether this is an Automake generated Makefile or not.
35725b89263Smrg    # We used to match only the files named `Makefile.in', but
35825b89263Smrg    # some people rename them; so instead we look at the file content.
35925b89263Smrg    # Grep'ing the first line is not enough: some people post-process
36025b89263Smrg    # each Makefile.in and add a new line on top of each file to say so.
36125b89263Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
36225b89263Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
36325b89263Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
36425b89263Smrg      dirpart=`AS_DIRNAME("$mf")`
36525b89263Smrg    else
36625b89263Smrg      continue
36725b89263Smrg    fi
36825b89263Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
36925b89263Smrg    # from the Makefile without running `make'.
37025b89263Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37125b89263Smrg    test -z "$DEPDIR" && continue
37225b89263Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
37325b89263Smrg    test -z "am__include" && continue
37425b89263Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37525b89263Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
37625b89263Smrg    U=`sed -n 's/^U = //p' < "$mf"`
37725b89263Smrg    # Find all dependency output files, they are included files with
37825b89263Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
37925b89263Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
38025b89263Smrg    # expansion.
38125b89263Smrg    for file in `sed -n "
38225b89263Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
38325b89263Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
38425b89263Smrg      # Make sure the directory exists.
38525b89263Smrg      test -f "$dirpart/$file" && continue
38625b89263Smrg      fdir=`AS_DIRNAME(["$file"])`
38725b89263Smrg      AS_MKDIR_P([$dirpart/$fdir])
38825b89263Smrg      # echo "creating $dirpart/$file"
38925b89263Smrg      echo '# dummy' > "$dirpart/$file"
39025b89263Smrg    done
39125b89263Smrg  done
39225b89263Smrg}
39325b89263Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
394ea133fd7Smrg
395ea133fd7Smrg
39625b89263Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
39725b89263Smrg# -----------------------------
39825b89263Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
39925b89263Smrg#
40025b89263Smrg# This code is only required when automatic dependency tracking
40125b89263Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
40225b89263Smrg# need in order to bootstrap the dependency handling code.
40325b89263SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
40425b89263Smrg[AC_CONFIG_COMMANDS([depfiles],
40525b89263Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
40625b89263Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
407a253d6aeSmrg])
408ea133fd7Smrg
40925b89263Smrg# Do all the work for Automake.                             -*- Autoconf -*-
410ea133fd7Smrg
41125b89263Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
41225b89263Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
41325b89263Smrg#
41425b89263Smrg# This file is free software; the Free Software Foundation
41525b89263Smrg# gives unlimited permission to copy and/or distribute it,
41625b89263Smrg# with or without modifications, as long as this notice is preserved.
417ea133fd7Smrg
41825b89263Smrg# serial 16
419a253d6aeSmrg
42025b89263Smrg# This macro actually does too much.  Some checks are only needed if
42125b89263Smrg# your package does certain things.  But this isn't really a big deal.
422a253d6aeSmrg
42325b89263Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
42425b89263Smrg# AM_INIT_AUTOMAKE([OPTIONS])
42525b89263Smrg# -----------------------------------------------
42625b89263Smrg# The call with PACKAGE and VERSION arguments is the old style
42725b89263Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
42825b89263Smrg# and VERSION should now be passed to AC_INIT and removed from
42925b89263Smrg# the call to AM_INIT_AUTOMAKE.
43025b89263Smrg# We support both call styles for the transition.  After
43125b89263Smrg# the next Automake release, Autoconf can make the AC_INIT
43225b89263Smrg# arguments mandatory, and then we can depend on a new Autoconf
43325b89263Smrg# release and drop the old call support.
43425b89263SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
43525b89263Smrg[AC_PREREQ([2.62])dnl
43625b89263Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
43725b89263Smrgdnl the ones we care about.
43825b89263Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
43925b89263SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
44025b89263SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
44125b89263Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
44225b89263Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
44325b89263Smrg  # is not polluted with repeated "-I."
44425b89263Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
44525b89263Smrg  # test to see if srcdir already configured
44625b89263Smrg  if test -f $srcdir/config.status; then
44725b89263Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
44825b89263Smrg  fi
44925b89263Smrgfi
450a253d6aeSmrg
45125b89263Smrg# test whether we have cygpath
45225b89263Smrgif test -z "$CYGPATH_W"; then
45325b89263Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
45425b89263Smrg    CYGPATH_W='cygpath -w'
45525b89263Smrg  else
45625b89263Smrg    CYGPATH_W=echo
45725b89263Smrg  fi
45825b89263Smrgfi
45925b89263SmrgAC_SUBST([CYGPATH_W])
460a253d6aeSmrg
46125b89263Smrg# Define the identity of the package.
46225b89263Smrgdnl Distinguish between old-style and new-style calls.
46325b89263Smrgm4_ifval([$2],
46425b89263Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
46525b89263Smrg AC_SUBST([PACKAGE], [$1])dnl
46625b89263Smrg AC_SUBST([VERSION], [$2])],
46725b89263Smrg[_AM_SET_OPTIONS([$1])dnl
46825b89263Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
46925b89263Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
47025b89263Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
47125b89263Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
47225b89263Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
473a253d6aeSmrg
47425b89263Smrg_AM_IF_OPTION([no-define],,
47525b89263Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
47625b89263Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
477a253d6aeSmrg
47825b89263Smrg# Some tools Automake needs.
47925b89263SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
48025b89263SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
48125b89263SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
48225b89263SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
48325b89263SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
48425b89263SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
48525b89263SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
48625b89263SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
48725b89263SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
48825b89263SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
48925b89263Smrg# We need awk for the "check" target.  The system "awk" is bad on
49025b89263Smrg# some platforms.
49125b89263SmrgAC_REQUIRE([AC_PROG_AWK])dnl
49225b89263SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
49325b89263SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
49425b89263Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
49525b89263Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
49625b89263Smrg			     [_AM_PROG_TAR([v7])])])
49725b89263Smrg_AM_IF_OPTION([no-dependencies],,
49825b89263Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
49925b89263Smrg		  [_AM_DEPENDENCIES(CC)],
50025b89263Smrg		  [define([AC_PROG_CC],
50125b89263Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
50225b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
50325b89263Smrg		  [_AM_DEPENDENCIES(CXX)],
50425b89263Smrg		  [define([AC_PROG_CXX],
50525b89263Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
50625b89263SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
50725b89263Smrg		  [_AM_DEPENDENCIES(OBJC)],
50825b89263Smrg		  [define([AC_PROG_OBJC],
50925b89263Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
51025b89263Smrg])
51125b89263Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
51225b89263Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
51325b89263Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
51425b89263Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
51525b89263SmrgAC_CONFIG_COMMANDS_PRE(dnl
51625b89263Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
51725b89263Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
518ea133fd7Smrg])
519a253d6aeSmrg
52025b89263Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
52125b89263Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
52225b89263Smrgdnl mangled by Autoconf and run in a shell conditional statement.
52325b89263Smrgm4_define([_AC_COMPILER_EXEEXT],
52425b89263Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
525a253d6aeSmrg
526a253d6aeSmrg
52725b89263Smrg# When config.status generates a header, we must update the stamp-h file.
52825b89263Smrg# This file resides in the same directory as the config header
52925b89263Smrg# that is generated.  The stamp files are numbered to have different names.
530a253d6aeSmrg
53125b89263Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
53225b89263Smrg# loop where config.status creates the headers, so we can generate
53325b89263Smrg# our stamp files there.
53425b89263SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
53525b89263Smrg[# Compute $1's index in $config_headers.
53625b89263Smrg_am_arg=$1
53725b89263Smrg_am_stamp_count=1
53825b89263Smrgfor _am_header in $config_headers :; do
53925b89263Smrg  case $_am_header in
54025b89263Smrg    $_am_arg | $_am_arg:* )
54125b89263Smrg      break ;;
54225b89263Smrg    * )
54325b89263Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
54425b89263Smrg  esac
54525b89263Smrgdone
54625b89263Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
547a253d6aeSmrg
54825b89263Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
54925b89263Smrg#
55025b89263Smrg# This file is free software; the Free Software Foundation
55125b89263Smrg# gives unlimited permission to copy and/or distribute it,
55225b89263Smrg# with or without modifications, as long as this notice is preserved.
553a253d6aeSmrg
55425b89263Smrg# AM_PROG_INSTALL_SH
55525b89263Smrg# ------------------
55625b89263Smrg# Define $install_sh.
55725b89263SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
55825b89263Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
55925b89263Smrgif test x"${install_sh}" != xset; then
56025b89263Smrg  case $am_aux_dir in
56125b89263Smrg  *\ * | *\	*)
56225b89263Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
56325b89263Smrg  *)
56425b89263Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
56525b89263Smrg  esac
56625b89263Smrgfi
56725b89263SmrgAC_SUBST(install_sh)])
568a253d6aeSmrg
56925b89263Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
57025b89263Smrg#
57125b89263Smrg# This file is free software; the Free Software Foundation
57225b89263Smrg# gives unlimited permission to copy and/or distribute it,
57325b89263Smrg# with or without modifications, as long as this notice is preserved.
574a253d6aeSmrg
57525b89263Smrg# serial 2
576a253d6aeSmrg
57725b89263Smrg# Check whether the underlying file-system supports filenames
57825b89263Smrg# with a leading dot.  For instance MS-DOS doesn't.
57925b89263SmrgAC_DEFUN([AM_SET_LEADING_DOT],
58025b89263Smrg[rm -rf .tst 2>/dev/null
58125b89263Smrgmkdir .tst 2>/dev/null
58225b89263Smrgif test -d .tst; then
58325b89263Smrg  am__leading_dot=.
58425b89263Smrgelse
58525b89263Smrg  am__leading_dot=_
58625b89263Smrgfi
58725b89263Smrgrmdir .tst 2>/dev/null
58825b89263SmrgAC_SUBST([am__leading_dot])])
589a253d6aeSmrg
59025b89263Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
59125b89263Smrg# From Jim Meyering
592ea133fd7Smrg
59325b89263Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
59425b89263Smrg# Free Software Foundation, Inc.
595ea133fd7Smrg#
59625b89263Smrg# This file is free software; the Free Software Foundation
59725b89263Smrg# gives unlimited permission to copy and/or distribute it,
59825b89263Smrg# with or without modifications, as long as this notice is preserved.
599ea133fd7Smrg
60025b89263Smrg# serial 5
601ea133fd7Smrg
60225b89263Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
60325b89263Smrg# ----------------------------------
60425b89263Smrg# Control maintainer-specific portions of Makefiles.
60525b89263Smrg# Default is to disable them, unless `enable' is passed literally.
60625b89263Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
60725b89263Smrg# can override the default with the --enable/--disable switch.
60825b89263SmrgAC_DEFUN([AM_MAINTAINER_MODE],
60925b89263Smrg[m4_case(m4_default([$1], [disable]),
61025b89263Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
61125b89263Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
61225b89263Smrg       [m4_define([am_maintainer_other], [enable])
61325b89263Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
61425b89263SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
61525b89263Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
61625b89263Smrg  AC_ARG_ENABLE([maintainer-mode],
61725b89263Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
61825b89263Smrg			  (and sometimes confusing) to the casual installer],
61925b89263Smrg      [USE_MAINTAINER_MODE=$enableval],
62025b89263Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
62125b89263Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
62225b89263Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
62325b89263Smrg  MAINT=$MAINTAINER_MODE_TRUE
62425b89263Smrg  AC_SUBST([MAINT])dnl
62525b89263Smrg]
62625b89263Smrg)
627a253d6aeSmrg
62825b89263SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
629a253d6aeSmrg
63025b89263Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
63125b89263Smrg
63225b89263Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
633a253d6aeSmrg#
63425b89263Smrg# This file is free software; the Free Software Foundation
63525b89263Smrg# gives unlimited permission to copy and/or distribute it,
63625b89263Smrg# with or without modifications, as long as this notice is preserved.
637a253d6aeSmrg
63825b89263Smrg# serial 4
639a253d6aeSmrg
64025b89263Smrg# AM_MAKE_INCLUDE()
64125b89263Smrg# -----------------
64225b89263Smrg# Check to see how make treats includes.
64325b89263SmrgAC_DEFUN([AM_MAKE_INCLUDE],
64425b89263Smrg[am_make=${MAKE-make}
64525b89263Smrgcat > confinc << 'END'
64625b89263Smrgam__doit:
64725b89263Smrg	@echo this is the am__doit target
64825b89263Smrg.PHONY: am__doit
64925b89263SmrgEND
65025b89263Smrg# If we don't find an include directive, just comment out the code.
65125b89263SmrgAC_MSG_CHECKING([for style of include used by $am_make])
65225b89263Smrgam__include="#"
65325b89263Smrgam__quote=
65425b89263Smrg_am_result=none
65525b89263Smrg# First try GNU make style include.
65625b89263Smrgecho "include confinc" > confmf
65725b89263Smrg# Ignore all kinds of additional output from `make'.
65825b89263Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
65925b89263Smrg*the\ am__doit\ target*)
66025b89263Smrg  am__include=include
66125b89263Smrg  am__quote=
66225b89263Smrg  _am_result=GNU
66325b89263Smrg  ;;
66425b89263Smrgesac
66525b89263Smrg# Now try BSD make style include.
66625b89263Smrgif test "$am__include" = "#"; then
66725b89263Smrg   echo '.include "confinc"' > confmf
66825b89263Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
66925b89263Smrg   *the\ am__doit\ target*)
67025b89263Smrg     am__include=.include
67125b89263Smrg     am__quote="\""
67225b89263Smrg     _am_result=BSD
67325b89263Smrg     ;;
67425b89263Smrg   esac
67525b89263Smrgfi
67625b89263SmrgAC_SUBST([am__include])
67725b89263SmrgAC_SUBST([am__quote])
67825b89263SmrgAC_MSG_RESULT([$_am_result])
67925b89263Smrgrm -f confinc confmf
68025b89263Smrg])
681ea133fd7Smrg
68225b89263Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
683ea133fd7Smrg
68425b89263Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
68525b89263Smrg# Free Software Foundation, Inc.
68625b89263Smrg#
68725b89263Smrg# This file is free software; the Free Software Foundation
68825b89263Smrg# gives unlimited permission to copy and/or distribute it,
68925b89263Smrg# with or without modifications, as long as this notice is preserved.
690ea133fd7Smrg
69125b89263Smrg# serial 6
692ea133fd7Smrg
69325b89263Smrg# AM_MISSING_PROG(NAME, PROGRAM)
694a253d6aeSmrg# ------------------------------
69525b89263SmrgAC_DEFUN([AM_MISSING_PROG],
69625b89263Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
69725b89263Smrg$1=${$1-"${am_missing_run}$2"}
69825b89263SmrgAC_SUBST($1)])
699ea133fd7Smrg
700ea133fd7Smrg
70125b89263Smrg# AM_MISSING_HAS_RUN
70225b89263Smrg# ------------------
70325b89263Smrg# Define MISSING if not defined so far and test if it supports --run.
70425b89263Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
70525b89263SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
70625b89263Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
70725b89263SmrgAC_REQUIRE_AUX_FILE([missing])dnl
70825b89263Smrgif test x"${MISSING+set}" != xset; then
70925b89263Smrg  case $am_aux_dir in
71025b89263Smrg  *\ * | *\	*)
71125b89263Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
71225b89263Smrg  *)
71325b89263Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
71425b89263Smrg  esac
71525b89263Smrgfi
71625b89263Smrg# Use eval to expand $SHELL
71725b89263Smrgif eval "$MISSING --run true"; then
71825b89263Smrg  am_missing_run="$MISSING --run "
71925b89263Smrgelse
72025b89263Smrg  am_missing_run=
72125b89263Smrg  AC_MSG_WARN([`missing' script is too old or missing])
72225b89263Smrgfi
72325b89263Smrg])
724ea133fd7Smrg
72525b89263Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
72625b89263Smrg#
72725b89263Smrg# This file is free software; the Free Software Foundation
72825b89263Smrg# gives unlimited permission to copy and/or distribute it,
72925b89263Smrg# with or without modifications, as long as this notice is preserved.
730ea133fd7Smrg
73125b89263Smrg# AM_PROG_MKDIR_P
73225b89263Smrg# ---------------
73325b89263Smrg# Check for `mkdir -p'.
73425b89263SmrgAC_DEFUN([AM_PROG_MKDIR_P],
73525b89263Smrg[AC_PREREQ([2.60])dnl
73625b89263SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
73725b89263Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
73825b89263Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
73925b89263Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
74025b89263Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
74125b89263Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
74225b89263Smrgdnl adjustment using top_builddir (which is defined more often than
74325b89263Smrgdnl MKDIR_P).
74425b89263SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
74525b89263Smrgcase $mkdir_p in
74625b89263Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
74725b89263Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
748a253d6aeSmrgesac
749a253d6aeSmrg])
750a253d6aeSmrg
75125b89263Smrg# Helper functions for option handling.                     -*- Autoconf -*-
752a253d6aeSmrg
75325b89263Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
75425b89263Smrg#
75525b89263Smrg# This file is free software; the Free Software Foundation
75625b89263Smrg# gives unlimited permission to copy and/or distribute it,
75725b89263Smrg# with or without modifications, as long as this notice is preserved.
758ea133fd7Smrg
75925b89263Smrg# serial 4
760ea133fd7Smrg
76125b89263Smrg# _AM_MANGLE_OPTION(NAME)
76225b89263Smrg# -----------------------
76325b89263SmrgAC_DEFUN([_AM_MANGLE_OPTION],
76425b89263Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
765a253d6aeSmrg
76625b89263Smrg# _AM_SET_OPTION(NAME)
76725b89263Smrg# ------------------------------
76825b89263Smrg# Set option NAME.  Presently that only means defining a flag for this option.
76925b89263SmrgAC_DEFUN([_AM_SET_OPTION],
77025b89263Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
771a253d6aeSmrg
77225b89263Smrg# _AM_SET_OPTIONS(OPTIONS)
77325b89263Smrg# ----------------------------------
77425b89263Smrg# OPTIONS is a space-separated list of Automake options.
77525b89263SmrgAC_DEFUN([_AM_SET_OPTIONS],
77625b89263Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
777a253d6aeSmrg
77825b89263Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
77925b89263Smrg# -------------------------------------------
78025b89263Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
78125b89263SmrgAC_DEFUN([_AM_IF_OPTION],
78225b89263Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
783a253d6aeSmrg
78425b89263Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
785a253d6aeSmrg
78625b89263Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
78725b89263Smrg# Free Software Foundation, Inc.
78825b89263Smrg#
78925b89263Smrg# This file is free software; the Free Software Foundation
79025b89263Smrg# gives unlimited permission to copy and/or distribute it,
79125b89263Smrg# with or without modifications, as long as this notice is preserved.
792a253d6aeSmrg
79325b89263Smrg# serial 5
794a253d6aeSmrg
79525b89263Smrg# AM_SANITY_CHECK
79625b89263Smrg# ---------------
79725b89263SmrgAC_DEFUN([AM_SANITY_CHECK],
79825b89263Smrg[AC_MSG_CHECKING([whether build environment is sane])
79925b89263Smrg# Just in case
80025b89263Smrgsleep 1
80125b89263Smrgecho timestamp > conftest.file
80225b89263Smrg# Reject unsafe characters in $srcdir or the absolute working directory
80325b89263Smrg# name.  Accept space and tab only in the latter.
80425b89263Smrgam_lf='
80525b89263Smrg'
80625b89263Smrgcase `pwd` in
80725b89263Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
80825b89263Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
80925b89263Smrgesac
81025b89263Smrgcase $srcdir in
81125b89263Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
81225b89263Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
81325b89263Smrgesac
814ea133fd7Smrg
81525b89263Smrg# Do `set' in a subshell so we don't clobber the current shell's
81625b89263Smrg# arguments.  Must try -L first in case configure is actually a
81725b89263Smrg# symlink; some systems play weird games with the mod time of symlinks
81825b89263Smrg# (eg FreeBSD returns the mod time of the symlink's containing
81925b89263Smrg# directory).
82025b89263Smrgif (
82125b89263Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
82225b89263Smrg   if test "$[*]" = "X"; then
82325b89263Smrg      # -L didn't work.
82425b89263Smrg      set X `ls -t "$srcdir/configure" conftest.file`
82525b89263Smrg   fi
82625b89263Smrg   rm -f conftest.file
82725b89263Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
82825b89263Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
829ea133fd7Smrg
83025b89263Smrg      # If neither matched, then we have a broken ls.  This can happen
83125b89263Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
83225b89263Smrg      # broken ls alias from the environment.  This has actually
83325b89263Smrg      # happened.  Such a system could not be considered "sane".
83425b89263Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
83525b89263Smrgalias in your environment])
83625b89263Smrg   fi
837a253d6aeSmrg
83825b89263Smrg   test "$[2]" = conftest.file
83925b89263Smrg   )
84025b89263Smrgthen
84125b89263Smrg   # Ok.
84225b89263Smrg   :
84325b89263Smrgelse
84425b89263Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
84525b89263SmrgCheck your system clock])
846ea133fd7Smrgfi
84725b89263SmrgAC_MSG_RESULT(yes)])
848ea133fd7Smrg
84925b89263Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
85025b89263Smrg#
85125b89263Smrg# This file is free software; the Free Software Foundation
85225b89263Smrg# gives unlimited permission to copy and/or distribute it,
85325b89263Smrg# with or without modifications, as long as this notice is preserved.
854a253d6aeSmrg
85525b89263Smrg# serial 1
856ea133fd7Smrg
85725b89263Smrg# AM_SILENT_RULES([DEFAULT])
85825b89263Smrg# --------------------------
85925b89263Smrg# Enable less verbose build rules; with the default set to DEFAULT
86025b89263Smrg# (`yes' being less verbose, `no' or empty being verbose).
86125b89263SmrgAC_DEFUN([AM_SILENT_RULES],
86225b89263Smrg[AC_ARG_ENABLE([silent-rules],
86325b89263Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
86425b89263Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
86525b89263Smrgcase $enable_silent_rules in
86625b89263Smrgyes) AM_DEFAULT_VERBOSITY=0;;
86725b89263Smrgno)  AM_DEFAULT_VERBOSITY=1;;
86825b89263Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
86925b89263Smrgesac
87025b89263SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
87125b89263SmrgAM_BACKSLASH='\'
87225b89263SmrgAC_SUBST([AM_BACKSLASH])dnl
87325b89263Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
87425b89263Smrg])
875a253d6aeSmrg
87625b89263Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
877a253d6aeSmrg#
87825b89263Smrg# This file is free software; the Free Software Foundation
87925b89263Smrg# gives unlimited permission to copy and/or distribute it,
88025b89263Smrg# with or without modifications, as long as this notice is preserved.
881ea133fd7Smrg
88225b89263Smrg# AM_PROG_INSTALL_STRIP
88325b89263Smrg# ---------------------
88425b89263Smrg# One issue with vendor `install' (even GNU) is that you can't
88525b89263Smrg# specify the program used to strip binaries.  This is especially
88625b89263Smrg# annoying in cross-compiling environments, where the build's strip
88725b89263Smrg# is unlikely to handle the host's binaries.
88825b89263Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
88925b89263Smrg# always use install-sh in `make install-strip', and initialize
89025b89263Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
89125b89263SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
89225b89263Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
89325b89263Smrg# Installed binaries are usually stripped using `strip' when the user
89425b89263Smrg# run `make install-strip'.  However `strip' might not be the right
89525b89263Smrg# tool to use in cross-compilation environments, therefore Automake
89625b89263Smrg# will honor the `STRIP' environment variable to overrule this program.
89725b89263Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
89825b89263Smrgif test "$cross_compiling" != no; then
89925b89263Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
900a253d6aeSmrgfi
90125b89263SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
90225b89263SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
903a253d6aeSmrg
90425b89263Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
90525b89263Smrg#
90625b89263Smrg# This file is free software; the Free Software Foundation
90725b89263Smrg# gives unlimited permission to copy and/or distribute it,
90825b89263Smrg# with or without modifications, as long as this notice is preserved.
909a253d6aeSmrg
91025b89263Smrg# serial 2
911a253d6aeSmrg
91225b89263Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
91325b89263Smrg# ---------------------------
91425b89263Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
91525b89263Smrg# This macro is traced by Automake.
91625b89263SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
917a253d6aeSmrg
91825b89263Smrg# AM_SUBST_NOTMAKE(VARIABLE)
91925b89263Smrg# ---------------------------
92025b89263Smrg# Public sister of _AM_SUBST_NOTMAKE.
92125b89263SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
922a253d6aeSmrg
92325b89263Smrg# Check how to create a tarball.                            -*- Autoconf -*-
924a253d6aeSmrg
92525b89263Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
92625b89263Smrg#
92725b89263Smrg# This file is free software; the Free Software Foundation
92825b89263Smrg# gives unlimited permission to copy and/or distribute it,
92925b89263Smrg# with or without modifications, as long as this notice is preserved.
930a253d6aeSmrg
93125b89263Smrg# serial 2
932a253d6aeSmrg
93325b89263Smrg# _AM_PROG_TAR(FORMAT)
93425b89263Smrg# --------------------
93525b89263Smrg# Check how to create a tarball in format FORMAT.
93625b89263Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
93725b89263Smrg#
93825b89263Smrg# Substitute a variable $(am__tar) that is a command
93925b89263Smrg# writing to stdout a FORMAT-tarball containing the directory
94025b89263Smrg# $tardir.
94125b89263Smrg#     tardir=directory && $(am__tar) > result.tar
94225b89263Smrg#
94325b89263Smrg# Substitute a variable $(am__untar) that extract such
94425b89263Smrg# a tarball read from stdin.
94525b89263Smrg#     $(am__untar) < result.tar
94625b89263SmrgAC_DEFUN([_AM_PROG_TAR],
94725b89263Smrg[# Always define AMTAR for backward compatibility.
94825b89263SmrgAM_MISSING_PROG([AMTAR], [tar])
94925b89263Smrgm4_if([$1], [v7],
95025b89263Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
95125b89263Smrg     [m4_case([$1], [ustar],, [pax],,
95225b89263Smrg              [m4_fatal([Unknown tar format])])
95325b89263SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
95425b89263Smrg# Loop over all known methods to create a tar archive until one works.
95525b89263Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
95625b89263Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
95725b89263Smrg# Do not fold the above two line into one, because Tru64 sh and
95825b89263Smrg# Solaris sh will not grok spaces in the rhs of `-'.
95925b89263Smrgfor _am_tool in $_am_tools
96025b89263Smrgdo
96125b89263Smrg  case $_am_tool in
96225b89263Smrg  gnutar)
96325b89263Smrg    for _am_tar in tar gnutar gtar;
96425b89263Smrg    do
96525b89263Smrg      AM_RUN_LOG([$_am_tar --version]) && break
96625b89263Smrg    done
96725b89263Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
96825b89263Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
96925b89263Smrg    am__untar="$_am_tar -xf -"
97025b89263Smrg    ;;
97125b89263Smrg  plaintar)
97225b89263Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
97325b89263Smrg    # ustar tarball either.
97425b89263Smrg    (tar --version) >/dev/null 2>&1 && continue
97525b89263Smrg    am__tar='tar chf - "$$tardir"'
97625b89263Smrg    am__tar_='tar chf - "$tardir"'
97725b89263Smrg    am__untar='tar xf -'
97825b89263Smrg    ;;
97925b89263Smrg  pax)
98025b89263Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
98125b89263Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
98225b89263Smrg    am__untar='pax -r'
98325b89263Smrg    ;;
98425b89263Smrg  cpio)
98525b89263Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
98625b89263Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
98725b89263Smrg    am__untar='cpio -i -H $1 -d'
98825b89263Smrg    ;;
98925b89263Smrg  none)
99025b89263Smrg    am__tar=false
99125b89263Smrg    am__tar_=false
99225b89263Smrg    am__untar=false
99325b89263Smrg    ;;
99425b89263Smrg  esac
995a253d6aeSmrg
99625b89263Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
99725b89263Smrg  # and am__untar set.
99825b89263Smrg  test -n "${am_cv_prog_tar_$1}" && break
999a253d6aeSmrg
100025b89263Smrg  # tar/untar a dummy directory, and stop if the command works
100125b89263Smrg  rm -rf conftest.dir
100225b89263Smrg  mkdir conftest.dir
100325b89263Smrg  echo GrepMe > conftest.dir/file
100425b89263Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
100525b89263Smrg  rm -rf conftest.dir
100625b89263Smrg  if test -s conftest.tar; then
100725b89263Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
100825b89263Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
100925b89263Smrg  fi
101025b89263Smrgdone
101125b89263Smrgrm -rf conftest.dir
1012a253d6aeSmrg
101325b89263SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
101425b89263SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
101525b89263SmrgAC_SUBST([am__tar])
101625b89263SmrgAC_SUBST([am__untar])
101725b89263Smrg]) # _AM_PROG_TAR
1018ea133fd7Smrg
101906f32fbeSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
102006f32fbeSmrg# 
102106f32fbeSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
102225b89263Smrg#
102306f32fbeSmrg# This program is free software; you can redistribute it and/or modify
102406f32fbeSmrg# it under the terms of the GNU General Public License as published by
102506f32fbeSmrg# the Free Software Foundation; either version 2 of the License, or
102606f32fbeSmrg# (at your option) any later version.
102725b89263Smrg#
102806f32fbeSmrg# This program is distributed in the hope that it will be useful, but
102906f32fbeSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
103006f32fbeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
103106f32fbeSmrg# General Public License for more details.
103225b89263Smrg#
103306f32fbeSmrg# You should have received a copy of the GNU General Public License
103406f32fbeSmrg# along with this program; if not, write to the Free Software
103506f32fbeSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
103625b89263Smrg#
103706f32fbeSmrg# As a special exception to the GNU General Public License, if you
103806f32fbeSmrg# distribute this file as part of a program that contains a
103906f32fbeSmrg# configuration script generated by Autoconf, you may include it under
104006f32fbeSmrg# the same distribution terms that you use for the rest of that program.
1041a253d6aeSmrg
104206f32fbeSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
104306f32fbeSmrg# ----------------------------------
104406f32fbeSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
104506f32fbeSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
104606f32fbeSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
104706f32fbeSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
104806f32fbeSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
104906f32fbeSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
105025b89263Smrgfi
105106f32fbeSmrgif test -n "$PKG_CONFIG"; then
105206f32fbeSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
105306f32fbeSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
105406f32fbeSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
105525b89263Smrg		AC_MSG_RESULT([yes])
105625b89263Smrg	else
105706f32fbeSmrg		AC_MSG_RESULT([no])
105806f32fbeSmrg		PKG_CONFIG=""
105925b89263Smrg	fi
106006f32fbeSmrg		
106106f32fbeSmrgfi[]dnl
106206f32fbeSmrg])# PKG_PROG_PKG_CONFIG
1063ea133fd7Smrg
106406f32fbeSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
106525b89263Smrg#
106606f32fbeSmrg# Check to see whether a particular set of modules exists.  Similar
106706f32fbeSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
106806f32fbeSmrg#
106906f32fbeSmrg#
107006f32fbeSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
107106f32fbeSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
107206f32fbeSmrg# PKG_CHECK_EXISTS manually
107306f32fbeSmrg# --------------------------------------------------------------
107406f32fbeSmrgAC_DEFUN([PKG_CHECK_EXISTS],
107506f32fbeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
107606f32fbeSmrgif test -n "$PKG_CONFIG" && \
107706f32fbeSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
107806f32fbeSmrg  m4_ifval([$2], [$2], [:])
107906f32fbeSmrgm4_ifvaln([$3], [else
108006f32fbeSmrg  $3])dnl
108106f32fbeSmrgfi])
1082ea133fd7Smrg
1083ea133fd7Smrg
108406f32fbeSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
108506f32fbeSmrg# ---------------------------------------------
108606f32fbeSmrgm4_define([_PKG_CONFIG],
108706f32fbeSmrg[if test -n "$$1"; then
108806f32fbeSmrg    pkg_cv_[]$1="$$1"
108906f32fbeSmrg elif test -n "$PKG_CONFIG"; then
109006f32fbeSmrg    PKG_CHECK_EXISTS([$3],
109106f32fbeSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
109206f32fbeSmrg		     [pkg_failed=yes])
109306f32fbeSmrg else
109406f32fbeSmrg    pkg_failed=untried
109506f32fbeSmrgfi[]dnl
109606f32fbeSmrg])# _PKG_CONFIG
1097ea133fd7Smrg
109806f32fbeSmrg# _PKG_SHORT_ERRORS_SUPPORTED
109906f32fbeSmrg# -----------------------------
110006f32fbeSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
110106f32fbeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
110206f32fbeSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
110306f32fbeSmrg        _pkg_short_errors_supported=yes
110406f32fbeSmrgelse
110506f32fbeSmrg        _pkg_short_errors_supported=no
110606f32fbeSmrgfi[]dnl
110706f32fbeSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
1108ea133fd7Smrg
1109ea133fd7Smrg
111006f32fbeSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
111106f32fbeSmrg# [ACTION-IF-NOT-FOUND])
111206f32fbeSmrg#
111306f32fbeSmrg#
111406f32fbeSmrg# Note that if there is a possibility the first call to
111506f32fbeSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
111606f32fbeSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
111706f32fbeSmrg#
111806f32fbeSmrg#
111906f32fbeSmrg# --------------------------------------------------------------
112006f32fbeSmrgAC_DEFUN([PKG_CHECK_MODULES],
112106f32fbeSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
112206f32fbeSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
112306f32fbeSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
1124a253d6aeSmrg
112506f32fbeSmrgpkg_failed=no
112606f32fbeSmrgAC_MSG_CHECKING([for $1])
1127a253d6aeSmrg
112806f32fbeSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
112906f32fbeSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
1130a253d6aeSmrg
113106f32fbeSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
113206f32fbeSmrgand $1[]_LIBS to avoid the need to call pkg-config.
113306f32fbeSmrgSee the pkg-config man page for more details.])
1134a253d6aeSmrg
113506f32fbeSmrgif test $pkg_failed = yes; then
113606f32fbeSmrg        _PKG_SHORT_ERRORS_SUPPORTED
113706f32fbeSmrg        if test $_pkg_short_errors_supported = yes; then
113806f32fbeSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
113906f32fbeSmrg        else 
114006f32fbeSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
114106f32fbeSmrg        fi
114206f32fbeSmrg	# Put the nasty error message in config.log where it belongs
114306f32fbeSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
1144a253d6aeSmrg
114506f32fbeSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
114606f32fbeSmrg[Package requirements ($2) were not met:
1147a253d6aeSmrg
114806f32fbeSmrg$$1_PKG_ERRORS
114925b89263Smrg
115006f32fbeSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
115106f32fbeSmrginstalled software in a non-standard prefix.
1152a253d6aeSmrg
115306f32fbeSmrg_PKG_TEXT
115406f32fbeSmrg])],
115506f32fbeSmrg		[AC_MSG_RESULT([no])
115606f32fbeSmrg                $4])
115706f32fbeSmrgelif test $pkg_failed = untried; then
115806f32fbeSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
115906f32fbeSmrg[The pkg-config script could not be found or is too old.  Make sure it
116006f32fbeSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
116106f32fbeSmrgpath to pkg-config.
116206f32fbeSmrg
116306f32fbeSmrg_PKG_TEXT
116406f32fbeSmrg
116506f32fbeSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
116606f32fbeSmrg		[$4])
116725b89263Smrgelse
116806f32fbeSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
116906f32fbeSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
117006f32fbeSmrg        AC_MSG_RESULT([yes])
117106f32fbeSmrg	ifelse([$3], , :, [$3])
117206f32fbeSmrgfi[]dnl
117306f32fbeSmrg])# PKG_CHECK_MODULES
1174ea133fd7Smrg
117506f32fbeSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
117606f32fbeSmrg#
117706f32fbeSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
117806f32fbeSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
117906f32fbeSmrg#                 Inc.
118006f32fbeSmrg#   Written by Gordon Matzigkeit, 1996
118106f32fbeSmrg#
118206f32fbeSmrg# This file is free software; the Free Software Foundation gives
118306f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without
118406f32fbeSmrg# modifications, as long as this notice is preserved.
1185ea133fd7Smrg
118606f32fbeSmrgm4_define([_LT_COPYING], [dnl
118706f32fbeSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
118806f32fbeSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
118906f32fbeSmrg#                 Inc.
119006f32fbeSmrg#   Written by Gordon Matzigkeit, 1996
119125b89263Smrg#
119206f32fbeSmrg#   This file is part of GNU Libtool.
119306f32fbeSmrg#
119406f32fbeSmrg# GNU Libtool is free software; you can redistribute it and/or
119506f32fbeSmrg# modify it under the terms of the GNU General Public License as
119606f32fbeSmrg# published by the Free Software Foundation; either version 2 of
119706f32fbeSmrg# the License, or (at your option) any later version.
119806f32fbeSmrg#
119906f32fbeSmrg# As a special exception to the GNU General Public License,
120006f32fbeSmrg# if you distribute this file as part of a program or library that
120106f32fbeSmrg# is built using GNU Libtool, you may include this file under the
120206f32fbeSmrg# same distribution terms that you use for the rest of that program.
120306f32fbeSmrg#
120406f32fbeSmrg# GNU Libtool is distributed in the hope that it will be useful,
120506f32fbeSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
120606f32fbeSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
120706f32fbeSmrg# GNU General Public License for more details.
120806f32fbeSmrg#
120906f32fbeSmrg# You should have received a copy of the GNU General Public License
121006f32fbeSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
121106f32fbeSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
121206f32fbeSmrg# obtained by writing to the Free Software Foundation, Inc.,
121306f32fbeSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
121406f32fbeSmrg])
1215ea133fd7Smrg
121606f32fbeSmrg# serial 57 LT_INIT
1217a253d6aeSmrg
1218a253d6aeSmrg
121906f32fbeSmrg# LT_PREREQ(VERSION)
122006f32fbeSmrg# ------------------
122106f32fbeSmrg# Complain and exit if this libtool version is less that VERSION.
122206f32fbeSmrgm4_defun([LT_PREREQ],
122306f32fbeSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
122406f32fbeSmrg       [m4_default([$3],
122506f32fbeSmrg		   [m4_fatal([Libtool version $1 or higher is required],
122606f32fbeSmrg		             63)])],
122706f32fbeSmrg       [$2])])
1228a253d6aeSmrg
1229a253d6aeSmrg
123006f32fbeSmrg# _LT_CHECK_BUILDDIR
123106f32fbeSmrg# ------------------
123206f32fbeSmrg# Complain if the absolute build directory name contains unusual characters
123306f32fbeSmrgm4_defun([_LT_CHECK_BUILDDIR],
123406f32fbeSmrg[case `pwd` in
123506f32fbeSmrg  *\ * | *\	*)
123606f32fbeSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
123706f32fbeSmrgesac
123806f32fbeSmrg])
1239a253d6aeSmrg
1240a253d6aeSmrg
124106f32fbeSmrg# LT_INIT([OPTIONS])
124206f32fbeSmrg# ------------------
124306f32fbeSmrgAC_DEFUN([LT_INIT],
124406f32fbeSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
124506f32fbeSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
124606f32fbeSmrgAC_BEFORE([$0], [LT_LANG])dnl
124706f32fbeSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
124806f32fbeSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
124906f32fbeSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
1250a253d6aeSmrg
125106f32fbeSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
125206f32fbeSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
125306f32fbeSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
125406f32fbeSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
125506f32fbeSmrgdnl unless we require an AC_DEFUNed macro:
125606f32fbeSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
125706f32fbeSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
125806f32fbeSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
125906f32fbeSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
126006f32fbeSmrgm4_require([_LT_PROG_LTMAIN])dnl
1261a253d6aeSmrg
126206f32fbeSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
1263a253d6aeSmrg
126406f32fbeSmrgdnl Parse OPTIONS
126506f32fbeSmrg_LT_SET_OPTIONS([$0], [$1])
1266a253d6aeSmrg
126706f32fbeSmrg# This can be used to rebuild libtool when needed
126806f32fbeSmrgLIBTOOL_DEPS="$ltmain"
1269a253d6aeSmrg
127006f32fbeSmrg# Always use our own libtool.
127106f32fbeSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
127206f32fbeSmrgAC_SUBST(LIBTOOL)dnl
1273a253d6aeSmrg
127406f32fbeSmrg_LT_SETUP
1275a253d6aeSmrg
127606f32fbeSmrg# Only expand once:
127706f32fbeSmrgm4_define([LT_INIT])
127806f32fbeSmrg])# LT_INIT
1279a253d6aeSmrg
128006f32fbeSmrg# Old names:
128106f32fbeSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
128206f32fbeSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
128306f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
128406f32fbeSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
128506f32fbeSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
1286a253d6aeSmrg
1287a253d6aeSmrg
128806f32fbeSmrg# _LT_CC_BASENAME(CC)
128906f32fbeSmrg# -------------------
129006f32fbeSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
129106f32fbeSmrgm4_defun([_LT_CC_BASENAME],
129206f32fbeSmrg[for cc_temp in $1""; do
129306f32fbeSmrg  case $cc_temp in
129406f32fbeSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
129506f32fbeSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
129606f32fbeSmrg    \-*) ;;
129706f32fbeSmrg    *) break;;
129806f32fbeSmrg  esac
129906f32fbeSmrgdone
130006f32fbeSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
130106f32fbeSmrg])
1302a253d6aeSmrg
1303a253d6aeSmrg
130406f32fbeSmrg# _LT_FILEUTILS_DEFAULTS
130506f32fbeSmrg# ----------------------
130606f32fbeSmrg# It is okay to use these file commands and assume they have been set
130706f32fbeSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
130806f32fbeSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
130906f32fbeSmrg[: ${CP="cp -f"}
131006f32fbeSmrg: ${MV="mv -f"}
131106f32fbeSmrg: ${RM="rm -f"}
131206f32fbeSmrg])# _LT_FILEUTILS_DEFAULTS
1313a253d6aeSmrg
1314a253d6aeSmrg
131506f32fbeSmrg# _LT_SETUP
131606f32fbeSmrg# ---------
131706f32fbeSmrgm4_defun([_LT_SETUP],
131806f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
131906f32fbeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
132006f32fbeSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
132106f32fbeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
132225b89263Smrg
132306f32fbeSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
132406f32fbeSmrg_LT_DECL([], [host], [0])dnl
132506f32fbeSmrg_LT_DECL([], [host_os], [0])dnl
132606f32fbeSmrgdnl
132706f32fbeSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
132806f32fbeSmrg_LT_DECL([], [build], [0])dnl
132906f32fbeSmrg_LT_DECL([], [build_os], [0])dnl
133006f32fbeSmrgdnl
133106f32fbeSmrgAC_REQUIRE([AC_PROG_CC])dnl
133206f32fbeSmrgAC_REQUIRE([LT_PATH_LD])dnl
133306f32fbeSmrgAC_REQUIRE([LT_PATH_NM])dnl
133406f32fbeSmrgdnl
133506f32fbeSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
133606f32fbeSmrgtest -z "$LN_S" && LN_S="ln -s"
133706f32fbeSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
133806f32fbeSmrgdnl
133906f32fbeSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
134006f32fbeSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
134106f32fbeSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
134206f32fbeSmrgdnl
134306f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
134406f32fbeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
134506f32fbeSmrgm4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl
134606f32fbeSmrgm4_require([_LT_CMD_RELOAD])dnl
134706f32fbeSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
134806f32fbeSmrgm4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl
134906f32fbeSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
135006f32fbeSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
135106f32fbeSmrgm4_require([_LT_WITH_SYSROOT])dnl
135206f32fbeSmrg
135306f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([
135406f32fbeSmrg# See if we are running on zsh, and set the options which allow our
135506f32fbeSmrg# commands through without removal of \ escapes INIT.
135606f32fbeSmrgif test -n "\${ZSH_VERSION+set}" ; then
135706f32fbeSmrg   setopt NO_GLOB_SUBST
135806f32fbeSmrgfi
135906f32fbeSmrg])
136006f32fbeSmrgif test -n "${ZSH_VERSION+set}" ; then
136106f32fbeSmrg   setopt NO_GLOB_SUBST
136225b89263Smrgfi
1363a253d6aeSmrg
136406f32fbeSmrg_LT_CHECK_OBJDIR
1365a253d6aeSmrg
136606f32fbeSmrgm4_require([_LT_TAG_COMPILER])dnl
136725b89263Smrg
136806f32fbeSmrgcase $host_os in
136906f32fbeSmrgaix3*)
137006f32fbeSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
137106f32fbeSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
137206f32fbeSmrg  # vanish in a puff of smoke.
137306f32fbeSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
137406f32fbeSmrg    COLLECT_NAMES=
137506f32fbeSmrg    export COLLECT_NAMES
137606f32fbeSmrg  fi
137706f32fbeSmrg  ;;
137806f32fbeSmrgesac
137925b89263Smrg
138006f32fbeSmrg# Global variables:
138106f32fbeSmrgofile=libtool
138206f32fbeSmrgcan_build_shared=yes
1383a253d6aeSmrg
138406f32fbeSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
138506f32fbeSmrg# which needs '.lib').
138606f32fbeSmrglibext=a
138725b89263Smrg
138806f32fbeSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
1389a253d6aeSmrg
139006f32fbeSmrgold_CC="$CC"
139106f32fbeSmrgold_CFLAGS="$CFLAGS"
139225b89263Smrg
139306f32fbeSmrg# Set sane defaults for various variables
139406f32fbeSmrgtest -z "$CC" && CC=cc
139506f32fbeSmrgtest -z "$LTCC" && LTCC=$CC
139606f32fbeSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
139706f32fbeSmrgtest -z "$LD" && LD=ld
139806f32fbeSmrgtest -z "$ac_objext" && ac_objext=o
1399a253d6aeSmrg
140006f32fbeSmrg_LT_CC_BASENAME([$compiler])
1401a253d6aeSmrg
140206f32fbeSmrg# Only perform the check for file, if the check method requires it
140306f32fbeSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
140406f32fbeSmrgcase $deplibs_check_method in
140506f32fbeSmrgfile_magic*)
140606f32fbeSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
140706f32fbeSmrg    _LT_PATH_MAGIC
140806f32fbeSmrg  fi
140906f32fbeSmrg  ;;
141006f32fbeSmrgesac
1411a253d6aeSmrg
141206f32fbeSmrg# Use C for the default configuration in the libtool script
141306f32fbeSmrgLT_SUPPORTED_TAG([CC])
141406f32fbeSmrg_LT_LANG_C_CONFIG
141506f32fbeSmrg_LT_LANG_DEFAULT_CONFIG
141606f32fbeSmrg_LT_CONFIG_COMMANDS
141706f32fbeSmrg])# _LT_SETUP
1418a253d6aeSmrg
141925b89263Smrg
142006f32fbeSmrg# _LT_PREPARE_SED_QUOTE_VARS
142106f32fbeSmrg# --------------------------
142206f32fbeSmrg# Define a few sed substitution that help us do robust quoting.
142306f32fbeSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
142406f32fbeSmrg[# Backslashify metacharacters that are still active within
142506f32fbeSmrg# double-quoted strings.
142606f32fbeSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
1427a253d6aeSmrg
142806f32fbeSmrg# Same as above, but do not quote variable references.
142906f32fbeSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
143025b89263Smrg
143106f32fbeSmrg# Sed substitution to delay expansion of an escaped shell variable in a
143206f32fbeSmrg# double_quote_subst'ed string.
143306f32fbeSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
1434a253d6aeSmrg
143506f32fbeSmrg# Sed substitution to delay expansion of an escaped single quote.
143606f32fbeSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
143725b89263Smrg
143806f32fbeSmrg# Sed substitution to avoid accidental globbing in evaled expressions
143906f32fbeSmrgno_glob_subst='s/\*/\\\*/g'
144006f32fbeSmrg])
144125b89263Smrg
144206f32fbeSmrg# _LT_PROG_LTMAIN
144306f32fbeSmrg# ---------------
144406f32fbeSmrg# Note that this code is called both from `configure', and `config.status'
144506f32fbeSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
144606f32fbeSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
144706f32fbeSmrg# so we pass a copy along to make sure it has a sensible value anyway.
144806f32fbeSmrgm4_defun([_LT_PROG_LTMAIN],
144906f32fbeSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
145006f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
145106f32fbeSmrgltmain="$ac_aux_dir/ltmain.sh"
145206f32fbeSmrg])# _LT_PROG_LTMAIN
1453a253d6aeSmrg
1454a253d6aeSmrg
1455a253d6aeSmrg
145606f32fbeSmrg# So that we can recreate a full libtool script including additional
145706f32fbeSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
145806f32fbeSmrg# in macros and then make a single call at the end using the `libtool'
145906f32fbeSmrg# label.
1460a253d6aeSmrg
1461a253d6aeSmrg
146206f32fbeSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
146306f32fbeSmrg# ----------------------------------------
146406f32fbeSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
146506f32fbeSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
146606f32fbeSmrg[m4_ifval([$1],
146706f32fbeSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
146806f32fbeSmrg                     [$1
146906f32fbeSmrg])])])
1470a253d6aeSmrg
147106f32fbeSmrg# Initialize.
147206f32fbeSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
1473a253d6aeSmrg
1474a253d6aeSmrg
147506f32fbeSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
147606f32fbeSmrg# ------------------------------
147706f32fbeSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
147806f32fbeSmrgm4_define([_LT_CONFIG_LIBTOOL],
147906f32fbeSmrg[m4_ifval([$1],
148006f32fbeSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
148106f32fbeSmrg                     [$1
148206f32fbeSmrg])])])
1483a253d6aeSmrg
148406f32fbeSmrg# Initialize.
148506f32fbeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
1486a253d6aeSmrg
1487a253d6aeSmrg
148806f32fbeSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
148906f32fbeSmrg# -----------------------------------------------------
149006f32fbeSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
149106f32fbeSmrg[_LT_CONFIG_LIBTOOL([$1])
149206f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
149306f32fbeSmrg])
1494a253d6aeSmrg
1495a253d6aeSmrg
149606f32fbeSmrg# _LT_FORMAT_COMMENT([COMMENT])
149706f32fbeSmrg# -----------------------------
149806f32fbeSmrg# Add leading comment marks to the start of each line, and a trailing
149906f32fbeSmrg# full-stop to the whole comment if one is not present already.
150006f32fbeSmrgm4_define([_LT_FORMAT_COMMENT],
150106f32fbeSmrg[m4_ifval([$1], [
150206f32fbeSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
150306f32fbeSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
150406f32fbeSmrg)])
1505a253d6aeSmrg
1506a253d6aeSmrg
1507a253d6aeSmrg
1508a253d6aeSmrg
1509a253d6aeSmrg
151006f32fbeSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
151106f32fbeSmrg# -------------------------------------------------------------------
151206f32fbeSmrg# CONFIGNAME is the name given to the value in the libtool script.
151306f32fbeSmrg# VARNAME is the (base) name used in the configure script.
151406f32fbeSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
151506f32fbeSmrg# VARNAME.  Any other value will be used directly.
151606f32fbeSmrgm4_define([_LT_DECL],
151706f32fbeSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
151806f32fbeSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
151906f32fbeSmrg	[m4_ifval([$1], [$1], [$2])])
152006f32fbeSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
152106f32fbeSmrg    m4_ifval([$4],
152206f32fbeSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
152306f32fbeSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
152406f32fbeSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
152506f32fbeSmrg])
1526a253d6aeSmrg
1527a253d6aeSmrg
152806f32fbeSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
152906f32fbeSmrg# --------------------------------------------------------
153006f32fbeSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
1531a253d6aeSmrg
1532a253d6aeSmrg
153306f32fbeSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
153406f32fbeSmrg# ------------------------------------------------
153506f32fbeSmrgm4_define([lt_decl_tag_varnames],
153606f32fbeSmrg[_lt_decl_filter([tagged?], [yes], $@)])
153706f32fbeSmrg
153806f32fbeSmrg
153906f32fbeSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
154006f32fbeSmrg# ---------------------------------------------------------
154106f32fbeSmrgm4_define([_lt_decl_filter],
154206f32fbeSmrg[m4_case([$#],
154306f32fbeSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
154406f32fbeSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
154506f32fbeSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
154606f32fbeSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
154706f32fbeSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
154825b89263Smrg])
1549a253d6aeSmrg
1550a253d6aeSmrg
155106f32fbeSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
155206f32fbeSmrg# --------------------------------------------------
155306f32fbeSmrgm4_define([lt_decl_quote_varnames],
155406f32fbeSmrg[_lt_decl_filter([value], [1], $@)])
1555a253d6aeSmrg
1556a253d6aeSmrg
155706f32fbeSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
155806f32fbeSmrg# ---------------------------------------------------
155906f32fbeSmrgm4_define([lt_decl_dquote_varnames],
156006f32fbeSmrg[_lt_decl_filter([value], [2], $@)])
1561a253d6aeSmrg
1562a253d6aeSmrg
156306f32fbeSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
156406f32fbeSmrg# ---------------------------------------------------
156506f32fbeSmrgm4_define([lt_decl_varnames_tagged],
156606f32fbeSmrg[m4_assert([$# <= 2])dnl
156706f32fbeSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
156806f32fbeSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
156906f32fbeSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
157006f32fbeSmrgm4_define([_lt_decl_varnames_tagged],
157106f32fbeSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
1572a253d6aeSmrg
1573a253d6aeSmrg
157406f32fbeSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
157506f32fbeSmrg# ------------------------------------------------
157606f32fbeSmrgm4_define([lt_decl_all_varnames],
157706f32fbeSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
157806f32fbeSmrg     m4_if([$2], [],
157906f32fbeSmrg	   m4_quote(lt_decl_varnames),
158006f32fbeSmrg	m4_quote(m4_shift($@))))[]dnl
158106f32fbeSmrg])
158206f32fbeSmrgm4_define([_lt_decl_all_varnames],
158306f32fbeSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
158406f32fbeSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
158506f32fbeSmrg])
1586a253d6aeSmrg
1587a253d6aeSmrg
158806f32fbeSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
158906f32fbeSmrg# ------------------------------------
159006f32fbeSmrg# Quote a variable value, and forward it to `config.status' so that its
159106f32fbeSmrg# declaration there will have the same value as in `configure'.  VARNAME
159206f32fbeSmrg# must have a single quote delimited value for this to work.
159306f32fbeSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
159406f32fbeSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
1595a253d6aeSmrg
1596ea133fd7Smrg
159706f32fbeSmrg# _LT_CONFIG_STATUS_DECLARATIONS
159806f32fbeSmrg# ------------------------------
159906f32fbeSmrg# We delimit libtool config variables with single quotes, so when
160006f32fbeSmrg# we write them to config.status, we have to be sure to quote all
160106f32fbeSmrg# embedded single quotes properly.  In configure, this macro expands
160206f32fbeSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
160306f32fbeSmrg#
160406f32fbeSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
160506f32fbeSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
160606f32fbeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
160706f32fbeSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
1608ea133fd7Smrg
160925b89263Smrg
161006f32fbeSmrg# _LT_LIBTOOL_TAGS
161106f32fbeSmrg# ----------------
161206f32fbeSmrg# Output comment and list of tags supported by the script
161306f32fbeSmrgm4_defun([_LT_LIBTOOL_TAGS],
161406f32fbeSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
161506f32fbeSmrgavailable_tags="_LT_TAGS"dnl
161606f32fbeSmrg])
1617a253d6aeSmrg
1618ea133fd7Smrg
161906f32fbeSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
162006f32fbeSmrg# -----------------------------------
162106f32fbeSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
162206f32fbeSmrg# expand to a commented shell variable setting:
162325b89263Smrg#
162406f32fbeSmrg#    # Some comment about what VAR is for.
162506f32fbeSmrg#    visible_name=$lt_internal_name
162606f32fbeSmrgm4_define([_LT_LIBTOOL_DECLARE],
162706f32fbeSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
162806f32fbeSmrg					   [description])))[]dnl
162906f32fbeSmrgm4_pushdef([_libtool_name],
163006f32fbeSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
163106f32fbeSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
163206f32fbeSmrg    [0], [_libtool_name=[$]$1],
163306f32fbeSmrg    [1], [_libtool_name=$lt_[]$1],
163406f32fbeSmrg    [2], [_libtool_name=$lt_[]$1],
163506f32fbeSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
163606f32fbeSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
163725b89263Smrg])
1638a253d6aeSmrg
1639a253d6aeSmrg
164006f32fbeSmrg# _LT_LIBTOOL_CONFIG_VARS
164106f32fbeSmrg# -----------------------
164206f32fbeSmrg# Produce commented declarations of non-tagged libtool config variables
164306f32fbeSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
164406f32fbeSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
164506f32fbeSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
164606f32fbeSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
164706f32fbeSmrg[m4_foreach([_lt_var],
164806f32fbeSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
164906f32fbeSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
1650a253d6aeSmrg
1651a253d6aeSmrg
165206f32fbeSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
165306f32fbeSmrg# -------------------------
165406f32fbeSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
165506f32fbeSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
165606f32fbeSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
1657ea133fd7Smrg
1658ea133fd7Smrg
165906f32fbeSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
166006f32fbeSmrg# ------------------------------
166106f32fbeSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
1662ea133fd7Smrg
1663ea133fd7Smrg
166406f32fbeSmrg# _LT_CONFIG_COMMANDS
166506f32fbeSmrg# -------------------
166606f32fbeSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
166706f32fbeSmrg# variables for single and double quote escaping we saved from calls
166806f32fbeSmrg# to _LT_DECL, we can put quote escaped variables declarations
166906f32fbeSmrg# into `config.status', and then the shell code to quote escape them in
167006f32fbeSmrg# for loops in `config.status'.  Finally, any additional code accumulated
167106f32fbeSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
167206f32fbeSmrgm4_defun([_LT_CONFIG_COMMANDS],
167306f32fbeSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
167406f32fbeSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
167506f32fbeSmrg	dnl instead of duplicating it all over again into config.status,
167606f32fbeSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
167706f32fbeSmrg	dnl needs to know what name is stored there:
167806f32fbeSmrg        [AC_CONFIG_COMMANDS([libtool],
167906f32fbeSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
168006f32fbeSmrg    dnl If the libtool generation code is destined for config.status,
168106f32fbeSmrg    dnl expand the accumulated commands and init code now:
168206f32fbeSmrg    [AC_CONFIG_COMMANDS([libtool],
168306f32fbeSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
168406f32fbeSmrg])#_LT_CONFIG_COMMANDS
1685a253d6aeSmrg
1686a253d6aeSmrg
168706f32fbeSmrg# Initialize.
168806f32fbeSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
168906f32fbeSmrg[
169025b89263Smrg
169106f32fbeSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
169206f32fbeSmrg# if CDPATH is set.
169306f32fbeSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
169425b89263Smrg
169506f32fbeSmrgsed_quote_subst='$sed_quote_subst'
169606f32fbeSmrgdouble_quote_subst='$double_quote_subst'
169706f32fbeSmrgdelay_variable_subst='$delay_variable_subst'
169806f32fbeSmrg_LT_CONFIG_STATUS_DECLARATIONS
169906f32fbeSmrgLTCC='$LTCC'
170006f32fbeSmrgLTCFLAGS='$LTCFLAGS'
170106f32fbeSmrgcompiler='$compiler_DEFAULT'
170225b89263Smrg
170306f32fbeSmrg# A function that is used when there is no print builtin or printf.
170406f32fbeSmrgfunc_fallback_echo ()
170506f32fbeSmrg{
170606f32fbeSmrg  eval 'cat <<_LTECHO_EOF
170706f32fbeSmrg\$[]1
170806f32fbeSmrg_LTECHO_EOF'
170906f32fbeSmrg}
171025b89263Smrg
171106f32fbeSmrg# Quote evaled strings.
171206f32fbeSmrgfor var in lt_decl_all_varnames([[ \
171306f32fbeSmrg]], lt_decl_quote_varnames); do
171406f32fbeSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
171506f32fbeSmrg    *[[\\\\\\\`\\"\\\$]]*)
171606f32fbeSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
171706f32fbeSmrg      ;;
171806f32fbeSmrg    *)
171906f32fbeSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
172006f32fbeSmrg      ;;
172106f32fbeSmrg    esac
172225b89263Smrgdone
1723ea133fd7Smrg
172406f32fbeSmrg# Double-quote double-evaled strings.
172506f32fbeSmrgfor var in lt_decl_all_varnames([[ \
172606f32fbeSmrg]], lt_decl_dquote_varnames); do
172706f32fbeSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
172806f32fbeSmrg    *[[\\\\\\\`\\"\\\$]]*)
172906f32fbeSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
173006f32fbeSmrg      ;;
173106f32fbeSmrg    *)
173206f32fbeSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
173306f32fbeSmrg      ;;
173406f32fbeSmrg    esac
173506f32fbeSmrgdone
1736a253d6aeSmrg
173706f32fbeSmrg_LT_OUTPUT_LIBTOOL_INIT
173806f32fbeSmrg])
1739a253d6aeSmrg
174006f32fbeSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
174106f32fbeSmrg# ------------------------------------
174206f32fbeSmrg# Generate a child script FILE with all initialization necessary to
174306f32fbeSmrg# reuse the environment learned by the parent script, and make the
174406f32fbeSmrg# file executable.  If COMMENT is supplied, it is inserted after the
174506f32fbeSmrg# `#!' sequence but before initialization text begins.  After this
174606f32fbeSmrg# macro, additional text can be appended to FILE to form the body of
174706f32fbeSmrg# the child script.  The macro ends with non-zero status if the
174806f32fbeSmrg# file could not be fully written (such as if the disk is full).
174906f32fbeSmrgm4_ifdef([AS_INIT_GENERATED],
175006f32fbeSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
175106f32fbeSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
175206f32fbeSmrg[m4_require([AS_PREPARE])]dnl
175306f32fbeSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
175406f32fbeSmrg[lt_write_fail=0
175506f32fbeSmrgcat >$1 <<_ASEOF || lt_write_fail=1
175606f32fbeSmrg#! $SHELL
175706f32fbeSmrg# Generated by $as_me.
175806f32fbeSmrg$2
175906f32fbeSmrgSHELL=\${CONFIG_SHELL-$SHELL}
176006f32fbeSmrgexport SHELL
176106f32fbeSmrg_ASEOF
176206f32fbeSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
176306f32fbeSmrgAS_SHELL_SANITIZE
176406f32fbeSmrg_AS_PREPARE
176506f32fbeSmrgexec AS_MESSAGE_FD>&1
176606f32fbeSmrg_ASEOF
176706f32fbeSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
176806f32fbeSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
1769a253d6aeSmrg
177006f32fbeSmrg# LT_OUTPUT
177125b89263Smrg# ---------
177206f32fbeSmrg# This macro allows early generation of the libtool script (before
177306f32fbeSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
177406f32fbeSmrg# tests.
177506f32fbeSmrgAC_DEFUN([LT_OUTPUT],
177606f32fbeSmrg[: ${CONFIG_LT=./config.lt}
177706f32fbeSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
177806f32fbeSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
177906f32fbeSmrg[# Run this file to recreate a libtool stub with the current configuration.])
1780a253d6aeSmrg
178106f32fbeSmrgcat >>"$CONFIG_LT" <<\_LTEOF
178206f32fbeSmrglt_cl_silent=false
178306f32fbeSmrgexec AS_MESSAGE_LOG_FD>>config.log
178406f32fbeSmrg{
178506f32fbeSmrg  echo
178606f32fbeSmrg  AS_BOX([Running $as_me.])
178706f32fbeSmrg} >&AS_MESSAGE_LOG_FD
1788a253d6aeSmrg
178906f32fbeSmrglt_cl_help="\
179006f32fbeSmrg\`$as_me' creates a local libtool stub from the current configuration,
179106f32fbeSmrgfor use in further configure time tests before the real libtool is
179206f32fbeSmrggenerated.
1793a253d6aeSmrg
179406f32fbeSmrgUsage: $[0] [[OPTIONS]]
1795a253d6aeSmrg
179606f32fbeSmrg  -h, --help      print this help, then exit
179706f32fbeSmrg  -V, --version   print version number, then exit
179806f32fbeSmrg  -q, --quiet     do not print progress messages
179906f32fbeSmrg  -d, --debug     don't remove temporary files
1800a253d6aeSmrg
180106f32fbeSmrgReport bugs to <bug-libtool@gnu.org>."
1802a253d6aeSmrg
180306f32fbeSmrglt_cl_version="\
180406f32fbeSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
180506f32fbeSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
180606f32fbeSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
1807a253d6aeSmrg
180806f32fbeSmrgCopyright (C) 2010 Free Software Foundation, Inc.
180906f32fbeSmrgThis config.lt script is free software; the Free Software Foundation
181006f32fbeSmrggives unlimited permision to copy, distribute and modify it."
1811a253d6aeSmrg
181206f32fbeSmrgwhile test $[#] != 0
181306f32fbeSmrgdo
181406f32fbeSmrg  case $[1] in
181506f32fbeSmrg    --version | --v* | -V )
181606f32fbeSmrg      echo "$lt_cl_version"; exit 0 ;;
181706f32fbeSmrg    --help | --h* | -h )
181806f32fbeSmrg      echo "$lt_cl_help"; exit 0 ;;
181906f32fbeSmrg    --debug | --d* | -d )
182006f32fbeSmrg      debug=: ;;
182106f32fbeSmrg    --quiet | --q* | --silent | --s* | -q )
182206f32fbeSmrg      lt_cl_silent=: ;;
1823a253d6aeSmrg
182406f32fbeSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
182506f32fbeSmrgTry \`$[0] --help' for more information.]) ;;
1826a253d6aeSmrg
182706f32fbeSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
182806f32fbeSmrgTry \`$[0] --help' for more information.]) ;;
182906f32fbeSmrg  esac
183006f32fbeSmrg  shift
183106f32fbeSmrgdone
1832a253d6aeSmrg
183306f32fbeSmrgif $lt_cl_silent; then
183406f32fbeSmrg  exec AS_MESSAGE_FD>/dev/null
183506f32fbeSmrgfi
183606f32fbeSmrg_LTEOF
1837a253d6aeSmrg
183806f32fbeSmrgcat >>"$CONFIG_LT" <<_LTEOF
183906f32fbeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
184006f32fbeSmrg_LTEOF
1841a253d6aeSmrg
184206f32fbeSmrgcat >>"$CONFIG_LT" <<\_LTEOF
184306f32fbeSmrgAC_MSG_NOTICE([creating $ofile])
184406f32fbeSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
184506f32fbeSmrgAS_EXIT(0)
184606f32fbeSmrg_LTEOF
184706f32fbeSmrgchmod +x "$CONFIG_LT"
1848a253d6aeSmrg
184906f32fbeSmrg# configure is writing to config.log, but config.lt does its own redirection,
185006f32fbeSmrg# appending to config.log, which fails on DOS, as config.log is still kept
185106f32fbeSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
185206f32fbeSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
185306f32fbeSmrglt_cl_success=:
185406f32fbeSmrgtest "$silent" = yes &&
185506f32fbeSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
185606f32fbeSmrgexec AS_MESSAGE_LOG_FD>/dev/null
185706f32fbeSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
185806f32fbeSmrgexec AS_MESSAGE_LOG_FD>>config.log
185906f32fbeSmrg$lt_cl_success || AS_EXIT(1)
186006f32fbeSmrg])# LT_OUTPUT
1861a253d6aeSmrg
1862a253d6aeSmrg
186306f32fbeSmrg# _LT_CONFIG(TAG)
186425b89263Smrg# ---------------
186506f32fbeSmrg# If TAG is the built-in tag, create an initial libtool script with a
186606f32fbeSmrg# default configuration from the untagged config vars.  Otherwise add code
186706f32fbeSmrg# to config.status for appending the configuration named by TAG from the
186806f32fbeSmrg# matching tagged config vars.
186906f32fbeSmrgm4_defun([_LT_CONFIG],
187006f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
187106f32fbeSmrg_LT_CONFIG_SAVE_COMMANDS([
187206f32fbeSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
187306f32fbeSmrg  m4_if(_LT_TAG, [C], [
187406f32fbeSmrg    # See if we are running on zsh, and set the options which allow our
187506f32fbeSmrg    # commands through without removal of \ escapes.
187606f32fbeSmrg    if test -n "${ZSH_VERSION+set}" ; then
187706f32fbeSmrg      setopt NO_GLOB_SUBST
187806f32fbeSmrg    fi
1879a253d6aeSmrg
188006f32fbeSmrg    cfgfile="${ofile}T"
188106f32fbeSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
188206f32fbeSmrg    $RM "$cfgfile"
1883a253d6aeSmrg
188406f32fbeSmrg    cat <<_LT_EOF >> "$cfgfile"
188506f32fbeSmrg#! $SHELL
1886a253d6aeSmrg
188706f32fbeSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
188806f32fbeSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
188906f32fbeSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
189006f32fbeSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
189106f32fbeSmrg#
189206f32fbeSmrg_LT_COPYING
189306f32fbeSmrg_LT_LIBTOOL_TAGS
1894a253d6aeSmrg
189506f32fbeSmrg# ### BEGIN LIBTOOL CONFIG
189606f32fbeSmrg_LT_LIBTOOL_CONFIG_VARS
189706f32fbeSmrg_LT_LIBTOOL_TAG_VARS
189806f32fbeSmrg# ### END LIBTOOL CONFIG
1899a253d6aeSmrg
190006f32fbeSmrg_LT_EOF
1901a253d6aeSmrg
190206f32fbeSmrg  case $host_os in
190306f32fbeSmrg  aix3*)
190406f32fbeSmrg    cat <<\_LT_EOF >> "$cfgfile"
190506f32fbeSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
190606f32fbeSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
190706f32fbeSmrg# vanish in a puff of smoke.
190806f32fbeSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
190906f32fbeSmrg  COLLECT_NAMES=
191006f32fbeSmrg  export COLLECT_NAMES
191106f32fbeSmrgfi
191206f32fbeSmrg_LT_EOF
191306f32fbeSmrg    ;;
191406f32fbeSmrg  esac
1915a253d6aeSmrg
191606f32fbeSmrg  _LT_PROG_LTMAIN
1917a253d6aeSmrg
191806f32fbeSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
191906f32fbeSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
192006f32fbeSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
192106f32fbeSmrg  # is reportedly fixed, but why not run on old versions too?
192206f32fbeSmrg  sed '$q' "$ltmain" >> "$cfgfile" \
192306f32fbeSmrg     || (rm -f "$cfgfile"; exit 1)
1924a253d6aeSmrg
192506f32fbeSmrg  _LT_PROG_REPLACE_SHELLFNS
1926a253d6aeSmrg
192706f32fbeSmrg   mv -f "$cfgfile" "$ofile" ||
192806f32fbeSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
192906f32fbeSmrg  chmod +x "$ofile"
193006f32fbeSmrg],
193106f32fbeSmrg[cat <<_LT_EOF >> "$ofile"
1932a253d6aeSmrg
193306f32fbeSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
193406f32fbeSmrgdnl in a comment (ie after a #).
193506f32fbeSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
193606f32fbeSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
193706f32fbeSmrg# ### END LIBTOOL TAG CONFIG: $1
193806f32fbeSmrg_LT_EOF
193906f32fbeSmrg])dnl /m4_if
194006f32fbeSmrg],
194106f32fbeSmrg[m4_if([$1], [], [
194206f32fbeSmrg    PACKAGE='$PACKAGE'
194306f32fbeSmrg    VERSION='$VERSION'
194406f32fbeSmrg    TIMESTAMP='$TIMESTAMP'
194506f32fbeSmrg    RM='$RM'
194606f32fbeSmrg    ofile='$ofile'], [])
194706f32fbeSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
194806f32fbeSmrg])# _LT_CONFIG
1949a253d6aeSmrg
1950a253d6aeSmrg
195106f32fbeSmrg# LT_SUPPORTED_TAG(TAG)
195206f32fbeSmrg# ---------------------
195306f32fbeSmrg# Trace this macro to discover what tags are supported by the libtool
195406f32fbeSmrg# --tag option, using:
195506f32fbeSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
195606f32fbeSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
1957ea133fd7Smrg
1958ea133fd7Smrg
195906f32fbeSmrg# C support is built-in for now
196006f32fbeSmrgm4_define([_LT_LANG_C_enabled], [])
196106f32fbeSmrgm4_define([_LT_TAGS], [])
1962ea133fd7Smrg
1963a253d6aeSmrg
196406f32fbeSmrg# LT_LANG(LANG)
196506f32fbeSmrg# -------------
196606f32fbeSmrg# Enable libtool support for the given language if not already enabled.
196706f32fbeSmrgAC_DEFUN([LT_LANG],
196806f32fbeSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
196906f32fbeSmrgm4_case([$1],
197006f32fbeSmrg  [C],			[_LT_LANG(C)],
197106f32fbeSmrg  [C++],		[_LT_LANG(CXX)],
197206f32fbeSmrg  [Java],		[_LT_LANG(GCJ)],
197306f32fbeSmrg  [Fortran 77],		[_LT_LANG(F77)],
197406f32fbeSmrg  [Fortran],		[_LT_LANG(FC)],
197506f32fbeSmrg  [Windows Resource],	[_LT_LANG(RC)],
197606f32fbeSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
197706f32fbeSmrg    [_LT_LANG($1)],
197806f32fbeSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
197906f32fbeSmrg])# LT_LANG
1980a253d6aeSmrg
1981a253d6aeSmrg
198206f32fbeSmrg# _LT_LANG(LANGNAME)
198306f32fbeSmrg# ------------------
198406f32fbeSmrgm4_defun([_LT_LANG],
198506f32fbeSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
198606f32fbeSmrg  [LT_SUPPORTED_TAG([$1])dnl
198706f32fbeSmrg  m4_append([_LT_TAGS], [$1 ])dnl
198806f32fbeSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
198906f32fbeSmrg  _LT_LANG_$1_CONFIG($1)])dnl
199006f32fbeSmrg])# _LT_LANG
1991a253d6aeSmrg
1992a253d6aeSmrg
199306f32fbeSmrg# _LT_LANG_DEFAULT_CONFIG
199406f32fbeSmrg# -----------------------
199506f32fbeSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
199606f32fbeSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
199706f32fbeSmrg  [LT_LANG(CXX)],
199806f32fbeSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
1999a253d6aeSmrg
200006f32fbeSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
200106f32fbeSmrg  [LT_LANG(F77)],
200206f32fbeSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
2003ea133fd7Smrg
200406f32fbeSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
200506f32fbeSmrg  [LT_LANG(FC)],
200606f32fbeSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
2007ea133fd7Smrg
200806f32fbeSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
200906f32fbeSmrgdnl pulling things in needlessly.
201006f32fbeSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
201106f32fbeSmrg  [LT_LANG(GCJ)],
201206f32fbeSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
201306f32fbeSmrg    [LT_LANG(GCJ)],
201406f32fbeSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
201506f32fbeSmrg      [LT_LANG(GCJ)],
201606f32fbeSmrg      [m4_ifdef([AC_PROG_GCJ],
201706f32fbeSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
201806f32fbeSmrg       m4_ifdef([A][M_PROG_GCJ],
201906f32fbeSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
202006f32fbeSmrg       m4_ifdef([LT_PROG_GCJ],
202106f32fbeSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
2022a253d6aeSmrg
202306f32fbeSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
202406f32fbeSmrg  [LT_LANG(RC)],
202506f32fbeSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
202606f32fbeSmrg])# _LT_LANG_DEFAULT_CONFIG
2027a253d6aeSmrg
202806f32fbeSmrg# Obsolete macros:
202906f32fbeSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
203006f32fbeSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
203106f32fbeSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
203206f32fbeSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
203306f32fbeSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
203406f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
203506f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
203606f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
203706f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
203806f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
203906f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
2040a253d6aeSmrg
2041a253d6aeSmrg
204206f32fbeSmrg# _LT_TAG_COMPILER
204325b89263Smrg# ----------------
204406f32fbeSmrgm4_defun([_LT_TAG_COMPILER],
204506f32fbeSmrg[AC_REQUIRE([AC_PROG_CC])dnl
2046a253d6aeSmrg
204706f32fbeSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
204806f32fbeSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
204906f32fbeSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
205006f32fbeSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
2051a253d6aeSmrg
205206f32fbeSmrg# If no C compiler was specified, use CC.
205306f32fbeSmrgLTCC=${LTCC-"$CC"}
2054a253d6aeSmrg
205506f32fbeSmrg# If no C compiler flags were specified, use CFLAGS.
205606f32fbeSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
2057a253d6aeSmrg
205806f32fbeSmrg# Allow CC to be a program name with arguments.
205906f32fbeSmrgcompiler=$CC
206006f32fbeSmrg])# _LT_TAG_COMPILER
2061a253d6aeSmrg
2062a253d6aeSmrg
206306f32fbeSmrg# _LT_COMPILER_BOILERPLATE
206406f32fbeSmrg# ------------------------
206506f32fbeSmrg# Check for compiler boilerplate output or warnings with
206606f32fbeSmrg# the simple compiler test code.
206706f32fbeSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
206806f32fbeSmrg[m4_require([_LT_DECL_SED])dnl
206906f32fbeSmrgac_outfile=conftest.$ac_objext
207006f32fbeSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
207106f32fbeSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
207206f32fbeSmrg_lt_compiler_boilerplate=`cat conftest.err`
207306f32fbeSmrg$RM conftest*
207406f32fbeSmrg])# _LT_COMPILER_BOILERPLATE
2075a253d6aeSmrg
2076a253d6aeSmrg
207706f32fbeSmrg# _LT_LINKER_BOILERPLATE
207806f32fbeSmrg# ----------------------
207906f32fbeSmrg# Check for linker boilerplate output or warnings with
208006f32fbeSmrg# the simple link test code.
208106f32fbeSmrgm4_defun([_LT_LINKER_BOILERPLATE],
208206f32fbeSmrg[m4_require([_LT_DECL_SED])dnl
208306f32fbeSmrgac_outfile=conftest.$ac_objext
208406f32fbeSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
208506f32fbeSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
208606f32fbeSmrg_lt_linker_boilerplate=`cat conftest.err`
208706f32fbeSmrg$RM -r conftest*
208806f32fbeSmrg])# _LT_LINKER_BOILERPLATE
2089a253d6aeSmrg
209006f32fbeSmrg# _LT_REQUIRED_DARWIN_CHECKS
209106f32fbeSmrg# -------------------------
209206f32fbeSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
209306f32fbeSmrg  case $host_os in
209406f32fbeSmrg    rhapsody* | darwin*)
209506f32fbeSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
209606f32fbeSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
209706f32fbeSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
209806f32fbeSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
209906f32fbeSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
210006f32fbeSmrg    _LT_DECL([], [DSYMUTIL], [1],
210106f32fbeSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
210206f32fbeSmrg    _LT_DECL([], [NMEDIT], [1],
210306f32fbeSmrg      [Tool to change global to local symbols on Mac OS X])
210406f32fbeSmrg    _LT_DECL([], [LIPO], [1],
210506f32fbeSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
210606f32fbeSmrg    _LT_DECL([], [OTOOL], [1],
210706f32fbeSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
210806f32fbeSmrg    _LT_DECL([], [OTOOL64], [1],
210906f32fbeSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
2110a253d6aeSmrg
211106f32fbeSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
211206f32fbeSmrg      [lt_cv_apple_cc_single_mod=no
211306f32fbeSmrg      if test -z "${LT_MULTI_MODULE}"; then
211406f32fbeSmrg	# By default we will add the -single_module flag. You can override
211506f32fbeSmrg	# by either setting the environment variable LT_MULTI_MODULE
211606f32fbeSmrg	# non-empty at configure time, or by adding -multi_module to the
211706f32fbeSmrg	# link flags.
211806f32fbeSmrg	rm -rf libconftest.dylib*
211906f32fbeSmrg	echo "int foo(void){return 1;}" > conftest.c
212006f32fbeSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
212106f32fbeSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
212206f32fbeSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
212306f32fbeSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
212406f32fbeSmrg        _lt_result=$?
212506f32fbeSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
212606f32fbeSmrg	  lt_cv_apple_cc_single_mod=yes
212706f32fbeSmrg	else
212806f32fbeSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
212906f32fbeSmrg	fi
213006f32fbeSmrg	rm -rf libconftest.dylib*
213106f32fbeSmrg	rm -f conftest.*
213206f32fbeSmrg      fi])
213306f32fbeSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
213406f32fbeSmrg      [lt_cv_ld_exported_symbols_list],
213506f32fbeSmrg      [lt_cv_ld_exported_symbols_list=no
213606f32fbeSmrg      save_LDFLAGS=$LDFLAGS
213706f32fbeSmrg      echo "_main" > conftest.sym
213806f32fbeSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
213906f32fbeSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
214006f32fbeSmrg	[lt_cv_ld_exported_symbols_list=yes],
214106f32fbeSmrg	[lt_cv_ld_exported_symbols_list=no])
214206f32fbeSmrg	LDFLAGS="$save_LDFLAGS"
214306f32fbeSmrg    ])
214406f32fbeSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
214506f32fbeSmrg      [lt_cv_ld_force_load=no
214606f32fbeSmrg      cat > conftest.c << _LT_EOF
214706f32fbeSmrgint forced_loaded() { return 2;}
214806f32fbeSmrg_LT_EOF
214906f32fbeSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
215006f32fbeSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
215106f32fbeSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
215206f32fbeSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
215306f32fbeSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
215406f32fbeSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
215506f32fbeSmrg      cat > conftest.c << _LT_EOF
215606f32fbeSmrgint main() { return 0;}
215706f32fbeSmrg_LT_EOF
215806f32fbeSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
215906f32fbeSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
216006f32fbeSmrg      _lt_result=$?
216106f32fbeSmrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
216206f32fbeSmrg	lt_cv_ld_force_load=yes
216306f32fbeSmrg      else
216406f32fbeSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
216506f32fbeSmrg      fi
216606f32fbeSmrg        rm -f conftest.err libconftest.a conftest conftest.c
216706f32fbeSmrg        rm -rf conftest.dSYM
216806f32fbeSmrg    ])
216906f32fbeSmrg    case $host_os in
217006f32fbeSmrg    rhapsody* | darwin1.[[012]])
217106f32fbeSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
217206f32fbeSmrg    darwin1.*)
217306f32fbeSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
217406f32fbeSmrg    darwin*) # darwin 5.x on
217506f32fbeSmrg      # if running on 10.5 or later, the deployment target defaults
217606f32fbeSmrg      # to the OS version, if on x86, and 10.4, the deployment
217706f32fbeSmrg      # target defaults to 10.4. Don't you love it?
217806f32fbeSmrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
217906f32fbeSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
218006f32fbeSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
218106f32fbeSmrg	10.[[012]]*)
218206f32fbeSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
218306f32fbeSmrg	10.*)
218406f32fbeSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
218506f32fbeSmrg      esac
218606f32fbeSmrg    ;;
218706f32fbeSmrg  esac
218806f32fbeSmrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
218906f32fbeSmrg      _lt_dar_single_mod='$single_module'
219006f32fbeSmrg    fi
219106f32fbeSmrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
219206f32fbeSmrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
219306f32fbeSmrg    else
219406f32fbeSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
219506f32fbeSmrg    fi
219606f32fbeSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
219706f32fbeSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
219806f32fbeSmrg    else
219906f32fbeSmrg      _lt_dsymutil=
220006f32fbeSmrg    fi
220106f32fbeSmrg    ;;
220206f32fbeSmrg  esac
220306f32fbeSmrg])
2204a253d6aeSmrg
2205a253d6aeSmrg
220606f32fbeSmrg# _LT_DARWIN_LINKER_FEATURES
220706f32fbeSmrg# --------------------------
220806f32fbeSmrg# Checks for linker and compiler features on darwin
220906f32fbeSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
221006f32fbeSmrg[
221106f32fbeSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
221206f32fbeSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
221306f32fbeSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
221406f32fbeSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
221506f32fbeSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
221606f32fbeSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
221706f32fbeSmrg    _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\"`'
221806f32fbeSmrg  else
221906f32fbeSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
222006f32fbeSmrg  fi
222106f32fbeSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
222206f32fbeSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
222306f32fbeSmrg  case $cc_basename in
222406f32fbeSmrg     ifort*) _lt_dar_can_shared=yes ;;
222506f32fbeSmrg     *) _lt_dar_can_shared=$GCC ;;
222606f32fbeSmrg  esac
222706f32fbeSmrg  if test "$_lt_dar_can_shared" = "yes"; then
222806f32fbeSmrg    output_verbose_link_cmd=func_echo_all
222906f32fbeSmrg    _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}"
223006f32fbeSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
223106f32fbeSmrg    _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}"
223206f32fbeSmrg    _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}"
223306f32fbeSmrg    m4_if([$1], [CXX],
223406f32fbeSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
223506f32fbeSmrg      _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}"
223606f32fbeSmrg      _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}"
223706f32fbeSmrg    fi
223806f32fbeSmrg],[])
223906f32fbeSmrg  else
224006f32fbeSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
224106f32fbeSmrg  fi
2242ea133fd7Smrg])
2243a253d6aeSmrg
224406f32fbeSmrg# _LT_SYS_MODULE_PATH_AIX([TAGNAME])
224506f32fbeSmrg# ----------------------------------
224606f32fbeSmrg# Links a minimal program and checks the executable
224706f32fbeSmrg# for the system default hardcoded library path. In most cases,
224806f32fbeSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
224906f32fbeSmrg# the location of the communication and MPI libs are included too.
225006f32fbeSmrg# If we don't find anything, use the default library path according
225106f32fbeSmrg# to the aix ld manual.
225206f32fbeSmrg# Store the results from the different compilers for each TAGNAME.
225306f32fbeSmrg# Allow to override them for all tags through lt_cv_aix_libpath.
225406f32fbeSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
225506f32fbeSmrg[m4_require([_LT_DECL_SED])dnl
225606f32fbeSmrgif test "${lt_cv_aix_libpath+set}" = set; then
225706f32fbeSmrg  aix_libpath=$lt_cv_aix_libpath
225806f32fbeSmrgelse
225906f32fbeSmrg  AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])],
226006f32fbeSmrg  [AC_LINK_IFELSE([AC_LANG_PROGRAM],[
226106f32fbeSmrg  lt_aix_libpath_sed='[
226206f32fbeSmrg      /Import File Strings/,/^$/ {
226306f32fbeSmrg	  /^0/ {
226406f32fbeSmrg	      s/^0  *\([^ ]*\) *$/\1/
226506f32fbeSmrg	      p
226606f32fbeSmrg	  }
226706f32fbeSmrg      }]'
226806f32fbeSmrg  _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
226906f32fbeSmrg  # Check for a 64-bit object if we didn't find anything.
227006f32fbeSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
227106f32fbeSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
227206f32fbeSmrg  fi],[])
227306f32fbeSmrg  if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then
227406f32fbeSmrg    _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib"
227506f32fbeSmrg  fi
227606f32fbeSmrg  ])
227706f32fbeSmrg  aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])
227806f32fbeSmrgfi
227906f32fbeSmrg])# _LT_SYS_MODULE_PATH_AIX
2280ea133fd7Smrg
2281ea133fd7Smrg
228206f32fbeSmrg# _LT_SHELL_INIT(ARG)
228306f32fbeSmrg# -------------------
228406f32fbeSmrgm4_define([_LT_SHELL_INIT],
228506f32fbeSmrg[m4_divert_text([M4SH-INIT], [$1
228606f32fbeSmrg])])# _LT_SHELL_INIT
2287ea133fd7Smrg
2288ea133fd7Smrg
2289a253d6aeSmrg
229006f32fbeSmrg# _LT_PROG_ECHO_BACKSLASH
229106f32fbeSmrg# -----------------------
229206f32fbeSmrg# Find how we can fake an echo command that does not interpret backslash.
229306f32fbeSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
229406f32fbeSmrg# of the generated configure script which will find a shell with a builtin
229506f32fbeSmrg# printf (which we can use as an echo command).
229606f32fbeSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
229706f32fbeSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
229806f32fbeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
229906f32fbeSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
2300a253d6aeSmrg
230106f32fbeSmrgAC_MSG_CHECKING([how to print strings])
230206f32fbeSmrg# Test print first, because it will be a builtin if present.
230306f32fbeSmrgif test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \
230406f32fbeSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
230506f32fbeSmrg  ECHO='print -r --'
230606f32fbeSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
230706f32fbeSmrg  ECHO='printf %s\n'
230806f32fbeSmrgelse
230906f32fbeSmrg  # Use this function as a fallback that always works.
231006f32fbeSmrg  func_fallback_echo ()
231106f32fbeSmrg  {
231206f32fbeSmrg    eval 'cat <<_LTECHO_EOF
231306f32fbeSmrg$[]1
231406f32fbeSmrg_LTECHO_EOF'
231506f32fbeSmrg  }
231606f32fbeSmrg  ECHO='func_fallback_echo'
231706f32fbeSmrgfi
2318a253d6aeSmrg
231906f32fbeSmrg# func_echo_all arg...
232006f32fbeSmrg# Invoke $ECHO with all args, space-separated.
232106f32fbeSmrgfunc_echo_all ()
232206f32fbeSmrg{
232306f32fbeSmrg    $ECHO "$*" 
232406f32fbeSmrg}
2325a253d6aeSmrg
232606f32fbeSmrgcase "$ECHO" in
232706f32fbeSmrg  printf*) AC_MSG_RESULT([printf]) ;;
232806f32fbeSmrg  print*) AC_MSG_RESULT([print -r]) ;;
232906f32fbeSmrg  *) AC_MSG_RESULT([cat]) ;;
233006f32fbeSmrgesac
2331a253d6aeSmrg
233206f32fbeSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
233306f32fbeSmrg[_AS_DETECT_SUGGESTED([
233406f32fbeSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
233506f32fbeSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
233606f32fbeSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
233706f32fbeSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
233806f32fbeSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
233906f32fbeSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
234006f32fbeSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
2341a253d6aeSmrg
234206f32fbeSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
234306f32fbeSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
234406f32fbeSmrg])# _LT_PROG_ECHO_BACKSLASH
2345a253d6aeSmrg
2346a253d6aeSmrg
234706f32fbeSmrg# _LT_WITH_SYSROOT
234806f32fbeSmrg# ----------------
234906f32fbeSmrgAC_DEFUN([_LT_WITH_SYSROOT],
235006f32fbeSmrg[AC_MSG_CHECKING([for sysroot])
235106f32fbeSmrgAC_ARG_WITH([sysroot],
235206f32fbeSmrg[  --with-sysroot[=DIR] Search for dependent libraries within DIR
235306f32fbeSmrg                        (or the compiler's sysroot if not specified).],
235406f32fbeSmrg[], [with_sysroot=no])
235506f32fbeSmrg
235606f32fbeSmrgdnl lt_sysroot will always be passed unquoted.  We quote it here
235706f32fbeSmrgdnl in case the user passed a directory name.
235806f32fbeSmrglt_sysroot=
235906f32fbeSmrgcase ${with_sysroot} in #(
236006f32fbeSmrg yes)
236106f32fbeSmrg   if test "$GCC" = yes; then
236206f32fbeSmrg     lt_sysroot=`$CC --print-sysroot 2>/dev/null`
236306f32fbeSmrg   fi
236406f32fbeSmrg   ;; #(
236506f32fbeSmrg /*)
236606f32fbeSmrg   lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"`
236706f32fbeSmrg   ;; #(
236806f32fbeSmrg no|'')
236906f32fbeSmrg   ;; #(
237006f32fbeSmrg *)
237106f32fbeSmrg   AC_MSG_RESULT([${with_sysroot}])
237206f32fbeSmrg   AC_MSG_ERROR([The sysroot must be an absolute path.])
237306f32fbeSmrg   ;;
237406f32fbeSmrgesac
2375a253d6aeSmrg
237606f32fbeSmrg AC_MSG_RESULT([${lt_sysroot:-no}])
237706f32fbeSmrg_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl
237806f32fbeSmrg[dependent libraries, and in which our libraries should be installed.])])
2379a253d6aeSmrg
238006f32fbeSmrg# _LT_ENABLE_LOCK
238106f32fbeSmrg# ---------------
238206f32fbeSmrgm4_defun([_LT_ENABLE_LOCK],
238306f32fbeSmrg[AC_ARG_ENABLE([libtool-lock],
238406f32fbeSmrg  [AS_HELP_STRING([--disable-libtool-lock],
238506f32fbeSmrg    [avoid locking (might break parallel builds)])])
238606f32fbeSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
2387a253d6aeSmrg
238806f32fbeSmrg# Some flags need to be propagated to the compiler or linker for good
238906f32fbeSmrg# libtool support.
239006f32fbeSmrgcase $host in
239106f32fbeSmrgia64-*-hpux*)
239206f32fbeSmrg  # Find out which ABI we are using.
239306f32fbeSmrg  echo 'int i;' > conftest.$ac_ext
239406f32fbeSmrg  if AC_TRY_EVAL(ac_compile); then
239506f32fbeSmrg    case `/usr/bin/file conftest.$ac_objext` in
239606f32fbeSmrg      *ELF-32*)
239706f32fbeSmrg	HPUX_IA64_MODE="32"
239806f32fbeSmrg	;;
239906f32fbeSmrg      *ELF-64*)
240006f32fbeSmrg	HPUX_IA64_MODE="64"
240106f32fbeSmrg	;;
240206f32fbeSmrg    esac
240306f32fbeSmrg  fi
240406f32fbeSmrg  rm -rf conftest*
240506f32fbeSmrg  ;;
240606f32fbeSmrg*-*-irix6*)
240706f32fbeSmrg  # Find out which ABI we are using.
240806f32fbeSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
240906f32fbeSmrg  if AC_TRY_EVAL(ac_compile); then
241006f32fbeSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
241106f32fbeSmrg      case `/usr/bin/file conftest.$ac_objext` in
241206f32fbeSmrg	*32-bit*)
241306f32fbeSmrg	  LD="${LD-ld} -melf32bsmip"
241406f32fbeSmrg	  ;;
241506f32fbeSmrg	*N32*)
241606f32fbeSmrg	  LD="${LD-ld} -melf32bmipn32"
241706f32fbeSmrg	  ;;
241806f32fbeSmrg	*64-bit*)
241906f32fbeSmrg	  LD="${LD-ld} -melf64bmip"
242006f32fbeSmrg	;;
242106f32fbeSmrg      esac
242206f32fbeSmrg    else
242306f32fbeSmrg      case `/usr/bin/file conftest.$ac_objext` in
242406f32fbeSmrg	*32-bit*)
242506f32fbeSmrg	  LD="${LD-ld} -32"
242606f32fbeSmrg	  ;;
242706f32fbeSmrg	*N32*)
242806f32fbeSmrg	  LD="${LD-ld} -n32"
242906f32fbeSmrg	  ;;
243006f32fbeSmrg	*64-bit*)
243106f32fbeSmrg	  LD="${LD-ld} -64"
243206f32fbeSmrg	  ;;
243306f32fbeSmrg      esac
243406f32fbeSmrg    fi
243506f32fbeSmrg  fi
243606f32fbeSmrg  rm -rf conftest*
243706f32fbeSmrg  ;;
2438a253d6aeSmrg
243906f32fbeSmrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
244006f32fbeSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
244106f32fbeSmrg  # Find out which ABI we are using.
244206f32fbeSmrg  echo 'int i;' > conftest.$ac_ext
244306f32fbeSmrg  if AC_TRY_EVAL(ac_compile); then
244406f32fbeSmrg    case `/usr/bin/file conftest.o` in
244506f32fbeSmrg      *32-bit*)
244606f32fbeSmrg	case $host in
244706f32fbeSmrg	  x86_64-*kfreebsd*-gnu)
244806f32fbeSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
244906f32fbeSmrg	    ;;
245006f32fbeSmrg	  x86_64-*linux*)
245106f32fbeSmrg	    LD="${LD-ld} -m elf_i386"
245206f32fbeSmrg	    ;;
245306f32fbeSmrg	  ppc64-*linux*|powerpc64-*linux*)
245406f32fbeSmrg	    LD="${LD-ld} -m elf32ppclinux"
245506f32fbeSmrg	    ;;
245606f32fbeSmrg	  s390x-*linux*)
245706f32fbeSmrg	    LD="${LD-ld} -m elf_s390"
245806f32fbeSmrg	    ;;
245906f32fbeSmrg	  sparc64-*linux*)
246006f32fbeSmrg	    LD="${LD-ld} -m elf32_sparc"
246106f32fbeSmrg	    ;;
246206f32fbeSmrg	esac
246306f32fbeSmrg	;;
246406f32fbeSmrg      *64-bit*)
246506f32fbeSmrg	case $host in
246606f32fbeSmrg	  x86_64-*kfreebsd*-gnu)
246706f32fbeSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
246806f32fbeSmrg	    ;;
246906f32fbeSmrg	  x86_64-*linux*)
247006f32fbeSmrg	    LD="${LD-ld} -m elf_x86_64"
247106f32fbeSmrg	    ;;
247206f32fbeSmrg	  ppc*-*linux*|powerpc*-*linux*)
247306f32fbeSmrg	    LD="${LD-ld} -m elf64ppc"
247406f32fbeSmrg	    ;;
247506f32fbeSmrg	  s390*-*linux*|s390*-*tpf*)
247606f32fbeSmrg	    LD="${LD-ld} -m elf64_s390"
247706f32fbeSmrg	    ;;
247806f32fbeSmrg	  sparc*-*linux*)
247906f32fbeSmrg	    LD="${LD-ld} -m elf64_sparc"
248006f32fbeSmrg	    ;;
248106f32fbeSmrg	esac
248206f32fbeSmrg	;;
248306f32fbeSmrg    esac
248406f32fbeSmrg  fi
248506f32fbeSmrg  rm -rf conftest*
248606f32fbeSmrg  ;;
2487a253d6aeSmrg
248806f32fbeSmrg*-*-sco3.2v5*)
248906f32fbeSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
249006f32fbeSmrg  SAVE_CFLAGS="$CFLAGS"
249106f32fbeSmrg  CFLAGS="$CFLAGS -belf"
249206f32fbeSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
249306f32fbeSmrg    [AC_LANG_PUSH(C)
249406f32fbeSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
249506f32fbeSmrg     AC_LANG_POP])
249606f32fbeSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
249706f32fbeSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
249806f32fbeSmrg    CFLAGS="$SAVE_CFLAGS"
249906f32fbeSmrg  fi
250006f32fbeSmrg  ;;
250106f32fbeSmrgsparc*-*solaris*)
250206f32fbeSmrg  # Find out which ABI we are using.
250306f32fbeSmrg  echo 'int i;' > conftest.$ac_ext
250406f32fbeSmrg  if AC_TRY_EVAL(ac_compile); then
250506f32fbeSmrg    case `/usr/bin/file conftest.o` in
250606f32fbeSmrg    *64-bit*)
250706f32fbeSmrg      case $lt_cv_prog_gnu_ld in
250806f32fbeSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
250906f32fbeSmrg      *)
251006f32fbeSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
251106f32fbeSmrg	  LD="${LD-ld} -64"
251206f32fbeSmrg	fi
251306f32fbeSmrg	;;
251406f32fbeSmrg      esac
251506f32fbeSmrg      ;;
251606f32fbeSmrg    esac
251706f32fbeSmrg  fi
251806f32fbeSmrg  rm -rf conftest*
251906f32fbeSmrg  ;;
252006f32fbeSmrgesac
2521a253d6aeSmrg
252206f32fbeSmrgneed_locks="$enable_libtool_lock"
252306f32fbeSmrg])# _LT_ENABLE_LOCK
2524a253d6aeSmrg
2525a253d6aeSmrg
252606f32fbeSmrg# _LT_PROG_AR
252706f32fbeSmrg# -----------
252806f32fbeSmrgm4_defun([_LT_PROG_AR],
252906f32fbeSmrg[AC_CHECK_TOOLS(AR, [ar], false)
253006f32fbeSmrg: ${AR=ar}
253106f32fbeSmrg: ${AR_FLAGS=cru}
253206f32fbeSmrg_LT_DECL([], [AR], [1], [The archiver])
253306f32fbeSmrg_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive])
253406f32fbeSmrg
253506f32fbeSmrgAC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file],
253606f32fbeSmrg  [lt_cv_ar_at_file=no
253706f32fbeSmrg   AC_COMPILE_IFELSE([AC_LANG_PROGRAM],
253806f32fbeSmrg     [echo conftest.$ac_objext > conftest.lst
253906f32fbeSmrg      lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD'
254006f32fbeSmrg      AC_TRY_EVAL([lt_ar_try])
254106f32fbeSmrg      if test "$ac_status" -eq 0; then
254206f32fbeSmrg	# Ensure the archiver fails upon bogus file names.
254306f32fbeSmrg	rm -f conftest.$ac_objext libconftest.a
254406f32fbeSmrg	AC_TRY_EVAL([lt_ar_try])
254506f32fbeSmrg	if test "$ac_status" -ne 0; then
254606f32fbeSmrg          lt_cv_ar_at_file=@
254706f32fbeSmrg        fi
254806f32fbeSmrg      fi
254906f32fbeSmrg      rm -f conftest.* libconftest.a
255006f32fbeSmrg     ])
255106f32fbeSmrg  ])
2552a253d6aeSmrg
255306f32fbeSmrgif test "x$lt_cv_ar_at_file" = xno; then
255406f32fbeSmrg  archiver_list_spec=
255506f32fbeSmrgelse
255606f32fbeSmrg  archiver_list_spec=$lt_cv_ar_at_file
255706f32fbeSmrgfi
255806f32fbeSmrg_LT_DECL([], [archiver_list_spec], [1],
255906f32fbeSmrg  [How to feed a file listing to the archiver])
256006f32fbeSmrg])# _LT_PROG_AR
2561a253d6aeSmrg
2562a253d6aeSmrg
256306f32fbeSmrg# _LT_CMD_OLD_ARCHIVE
256406f32fbeSmrg# -------------------
256506f32fbeSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
256606f32fbeSmrg[_LT_PROG_AR
2567a253d6aeSmrg
256806f32fbeSmrgAC_CHECK_TOOL(STRIP, strip, :)
256906f32fbeSmrgtest -z "$STRIP" && STRIP=:
257006f32fbeSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
2571a253d6aeSmrg
257206f32fbeSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
257306f32fbeSmrgtest -z "$RANLIB" && RANLIB=:
257406f32fbeSmrg_LT_DECL([], [RANLIB], [1],
257506f32fbeSmrg    [Commands used to install an old-style archive])
2576a253d6aeSmrg
257706f32fbeSmrg# Determine commands to create old-style static archives.
257806f32fbeSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
257906f32fbeSmrgold_postinstall_cmds='chmod 644 $oldlib'
258006f32fbeSmrgold_postuninstall_cmds=
2581a253d6aeSmrg
258206f32fbeSmrgif test -n "$RANLIB"; then
258306f32fbeSmrg  case $host_os in
258406f32fbeSmrg  openbsd*)
258506f32fbeSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
258606f32fbeSmrg    ;;
258706f32fbeSmrg  *)
258806f32fbeSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
258906f32fbeSmrg    ;;
259006f32fbeSmrg  esac
259106f32fbeSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
259206f32fbeSmrgfi
2593a253d6aeSmrg
259406f32fbeSmrgcase $host_os in
259506f32fbeSmrg  darwin*)
259606f32fbeSmrg    lock_old_archive_extraction=yes ;;
259706f32fbeSmrg  *)
259806f32fbeSmrg    lock_old_archive_extraction=no ;;
259906f32fbeSmrgesac
260006f32fbeSmrg_LT_DECL([], [old_postinstall_cmds], [2])
260106f32fbeSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
260206f32fbeSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
260306f32fbeSmrg    [Commands used to build an old-style archive])
260406f32fbeSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
260506f32fbeSmrg    [Whether to use a lock for old archive extraction])
260606f32fbeSmrg])# _LT_CMD_OLD_ARCHIVE
2607a253d6aeSmrg
2608a253d6aeSmrg
260906f32fbeSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
261006f32fbeSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
261106f32fbeSmrg# ----------------------------------------------------------------
261206f32fbeSmrg# Check whether the given compiler option works
261306f32fbeSmrgAC_DEFUN([_LT_COMPILER_OPTION],
261406f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
261506f32fbeSmrgm4_require([_LT_DECL_SED])dnl
261606f32fbeSmrgAC_CACHE_CHECK([$1], [$2],
261706f32fbeSmrg  [$2=no
261806f32fbeSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
261906f32fbeSmrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
262006f32fbeSmrg   lt_compiler_flag="$3"
262106f32fbeSmrg   # Insert the option either (1) after the last *FLAGS variable, or
262206f32fbeSmrg   # (2) before a word containing "conftest.", or (3) at the end.
262306f32fbeSmrg   # Note that $ac_compile itself does not contain backslashes and begins
262406f32fbeSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
262506f32fbeSmrg   # The option is referenced via a variable to avoid confusing sed.
262606f32fbeSmrg   lt_compile=`echo "$ac_compile" | $SED \
262706f32fbeSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
262806f32fbeSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
262906f32fbeSmrg   -e 's:$: $lt_compiler_flag:'`
263006f32fbeSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
263106f32fbeSmrg   (eval "$lt_compile" 2>conftest.err)
263206f32fbeSmrg   ac_status=$?
263306f32fbeSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
263406f32fbeSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
263506f32fbeSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
263606f32fbeSmrg     # The compiler can only warn and ignore the option if not recognized
263706f32fbeSmrg     # So say no if there are warnings other than the usual output.
263806f32fbeSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
263906f32fbeSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
264006f32fbeSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
264106f32fbeSmrg       $2=yes
264206f32fbeSmrg     fi
264306f32fbeSmrg   fi
264406f32fbeSmrg   $RM conftest*
264506f32fbeSmrg])
2646a253d6aeSmrg
264706f32fbeSmrgif test x"[$]$2" = xyes; then
264806f32fbeSmrg    m4_if([$5], , :, [$5])
264906f32fbeSmrgelse
265006f32fbeSmrg    m4_if([$6], , :, [$6])
265106f32fbeSmrgfi
265206f32fbeSmrg])# _LT_COMPILER_OPTION
2653a253d6aeSmrg
265406f32fbeSmrg# Old name:
265506f32fbeSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
265606f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
265706f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
2658a253d6aeSmrg
2659a253d6aeSmrg
266006f32fbeSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
266106f32fbeSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
266206f32fbeSmrg# ----------------------------------------------------
266306f32fbeSmrg# Check whether the given linker option works
266406f32fbeSmrgAC_DEFUN([_LT_LINKER_OPTION],
266506f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
266606f32fbeSmrgm4_require([_LT_DECL_SED])dnl
266706f32fbeSmrgAC_CACHE_CHECK([$1], [$2],
266806f32fbeSmrg  [$2=no
266906f32fbeSmrg   save_LDFLAGS="$LDFLAGS"
267006f32fbeSmrg   LDFLAGS="$LDFLAGS $3"
267106f32fbeSmrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
267206f32fbeSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
267306f32fbeSmrg     # The linker can only warn and ignore the option if not recognized
267406f32fbeSmrg     # So say no if there are warnings
267506f32fbeSmrg     if test -s conftest.err; then
267606f32fbeSmrg       # Append any errors to the config.log.
267706f32fbeSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
267806f32fbeSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
267906f32fbeSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
268006f32fbeSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
268106f32fbeSmrg         $2=yes
268206f32fbeSmrg       fi
268306f32fbeSmrg     else
268406f32fbeSmrg       $2=yes
268506f32fbeSmrg     fi
268606f32fbeSmrg   fi
268706f32fbeSmrg   $RM -r conftest*
268806f32fbeSmrg   LDFLAGS="$save_LDFLAGS"
268906f32fbeSmrg])
2690a253d6aeSmrg
269106f32fbeSmrgif test x"[$]$2" = xyes; then
269206f32fbeSmrg    m4_if([$4], , :, [$4])
269306f32fbeSmrgelse
269406f32fbeSmrg    m4_if([$5], , :, [$5])
269506f32fbeSmrgfi
269606f32fbeSmrg])# _LT_LINKER_OPTION
2697a253d6aeSmrg
269806f32fbeSmrg# Old name:
269906f32fbeSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
270006f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
270106f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
2702a253d6aeSmrg
2703a253d6aeSmrg
270406f32fbeSmrg# LT_CMD_MAX_LEN
270506f32fbeSmrg#---------------
270606f32fbeSmrgAC_DEFUN([LT_CMD_MAX_LEN],
270706f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
270806f32fbeSmrg# find the maximum length of command line arguments
270906f32fbeSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
271006f32fbeSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
271106f32fbeSmrg  i=0
271206f32fbeSmrg  teststring="ABCD"
2713a253d6aeSmrg
271406f32fbeSmrg  case $build_os in
271506f32fbeSmrg  msdosdjgpp*)
271606f32fbeSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
271706f32fbeSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
271806f32fbeSmrg    # during glob expansion).  Even if it were fixed, the result of this
271906f32fbeSmrg    # check would be larger than it should be.
272006f32fbeSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
272106f32fbeSmrg    ;;
2722a253d6aeSmrg
272306f32fbeSmrg  gnu*)
272406f32fbeSmrg    # Under GNU Hurd, this test is not required because there is
272506f32fbeSmrg    # no limit to the length of command line arguments.
272606f32fbeSmrg    # Libtool will interpret -1 as no limit whatsoever
272706f32fbeSmrg    lt_cv_sys_max_cmd_len=-1;
272806f32fbeSmrg    ;;
272925b89263Smrg
273006f32fbeSmrg  cygwin* | mingw* | cegcc*)
273106f32fbeSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
273206f32fbeSmrg    # about 5 minutes as the teststring grows exponentially.
273306f32fbeSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
273406f32fbeSmrg    # you end up with a "frozen" computer, even though with patience
273506f32fbeSmrg    # the test eventually succeeds (with a max line length of 256k).
273606f32fbeSmrg    # Instead, let's just punt: use the minimum linelength reported by
273706f32fbeSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
273806f32fbeSmrg    lt_cv_sys_max_cmd_len=8192;
273906f32fbeSmrg    ;;
274025b89263Smrg
274106f32fbeSmrg  mint*)
274206f32fbeSmrg    # On MiNT this can take a long time and run out of memory.
274306f32fbeSmrg    lt_cv_sys_max_cmd_len=8192;
274406f32fbeSmrg    ;;
274525b89263Smrg
274606f32fbeSmrg  amigaos*)
274706f32fbeSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
274806f32fbeSmrg    # So we just punt and use a minimum line length of 8192.
274906f32fbeSmrg    lt_cv_sys_max_cmd_len=8192;
275006f32fbeSmrg    ;;
275125b89263Smrg
275206f32fbeSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
275306f32fbeSmrg    # This has been around since 386BSD, at least.  Likely further.
275406f32fbeSmrg    if test -x /sbin/sysctl; then
275506f32fbeSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
275606f32fbeSmrg    elif test -x /usr/sbin/sysctl; then
275706f32fbeSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
275806f32fbeSmrg    else
275906f32fbeSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
276006f32fbeSmrg    fi
276106f32fbeSmrg    # And add a safety zone
276206f32fbeSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
276306f32fbeSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
276406f32fbeSmrg    ;;
276525b89263Smrg
276606f32fbeSmrg  interix*)
276706f32fbeSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
276806f32fbeSmrg    lt_cv_sys_max_cmd_len=196608
276906f32fbeSmrg    ;;
277025b89263Smrg
277106f32fbeSmrg  osf*)
277206f32fbeSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
277306f32fbeSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
277406f32fbeSmrg    # nice to cause kernel panics so lets avoid the loop below.
277506f32fbeSmrg    # First set a reasonable default.
277606f32fbeSmrg    lt_cv_sys_max_cmd_len=16384
277706f32fbeSmrg    #
277806f32fbeSmrg    if test -x /sbin/sysconfig; then
277906f32fbeSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
278006f32fbeSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
278125b89263Smrg      esac
278225b89263Smrg    fi
278306f32fbeSmrg    ;;
278406f32fbeSmrg  sco3.2v5*)
278506f32fbeSmrg    lt_cv_sys_max_cmd_len=102400
278606f32fbeSmrg    ;;
278706f32fbeSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
278806f32fbeSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
278906f32fbeSmrg    if test -n "$kargmax"; then
279006f32fbeSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
279125b89263Smrg    else
279206f32fbeSmrg      lt_cv_sys_max_cmd_len=32768
279325b89263Smrg    fi
279406f32fbeSmrg    ;;
279506f32fbeSmrg  *)
279606f32fbeSmrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
279706f32fbeSmrg    if test -n "$lt_cv_sys_max_cmd_len"; then
279806f32fbeSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
279906f32fbeSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
280025b89263Smrg    else
280106f32fbeSmrg      # Make teststring a little bigger before we do anything with it.
280206f32fbeSmrg      # a 1K string should be a reasonable start.
280306f32fbeSmrg      for i in 1 2 3 4 5 6 7 8 ; do
280406f32fbeSmrg        teststring=$teststring$teststring
280506f32fbeSmrg      done
280606f32fbeSmrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
280706f32fbeSmrg      # If test is not a shell built-in, we'll probably end up computing a
280806f32fbeSmrg      # maximum length that is only half of the actual maximum length, but
280906f32fbeSmrg      # we can't tell.
281006f32fbeSmrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
281106f32fbeSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
281206f32fbeSmrg	      test $i != 17 # 1/2 MB should be enough
281306f32fbeSmrg      do
281406f32fbeSmrg        i=`expr $i + 1`
281506f32fbeSmrg        teststring=$teststring$teststring
281606f32fbeSmrg      done
281706f32fbeSmrg      # Only check the string length outside the loop.
281806f32fbeSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
281906f32fbeSmrg      teststring=
282006f32fbeSmrg      # Add a significant safety factor because C++ compilers can tack on
282106f32fbeSmrg      # massive amounts of additional arguments before passing them to the
282206f32fbeSmrg      # linker.  It appears as though 1/2 is a usable value.
282306f32fbeSmrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
282425b89263Smrg    fi
282525b89263Smrg    ;;
282625b89263Smrg  esac
282725b89263Smrg])
282806f32fbeSmrgif test -n $lt_cv_sys_max_cmd_len ; then
282906f32fbeSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
283006f32fbeSmrgelse
283106f32fbeSmrg  AC_MSG_RESULT(none)
283206f32fbeSmrgfi
283306f32fbeSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
283406f32fbeSmrg_LT_DECL([], [max_cmd_len], [0],
283506f32fbeSmrg    [What is the maximum length of a command?])
283606f32fbeSmrg])# LT_CMD_MAX_LEN
283725b89263Smrg
283806f32fbeSmrg# Old name:
283906f32fbeSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
284006f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
284106f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
284225b89263Smrg
284325b89263Smrg
284406f32fbeSmrg# _LT_HEADER_DLFCN
284506f32fbeSmrg# ----------------
284606f32fbeSmrgm4_defun([_LT_HEADER_DLFCN],
284706f32fbeSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
284806f32fbeSmrg])# _LT_HEADER_DLFCN
284925b89263Smrg
285025b89263Smrg
285106f32fbeSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
285206f32fbeSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
285306f32fbeSmrg# ----------------------------------------------------------------
285406f32fbeSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
285506f32fbeSmrg[m4_require([_LT_HEADER_DLFCN])dnl
285606f32fbeSmrgif test "$cross_compiling" = yes; then :
285706f32fbeSmrg  [$4]
285806f32fbeSmrgelse
285906f32fbeSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
286006f32fbeSmrg  lt_status=$lt_dlunknown
286106f32fbeSmrg  cat > conftest.$ac_ext <<_LT_EOF
286206f32fbeSmrg[#line $LINENO "configure"
286306f32fbeSmrg#include "confdefs.h"
286425b89263Smrg
286506f32fbeSmrg#if HAVE_DLFCN_H
286606f32fbeSmrg#include <dlfcn.h>
286706f32fbeSmrg#endif
286825b89263Smrg
286906f32fbeSmrg#include <stdio.h>
287025b89263Smrg
287106f32fbeSmrg#ifdef RTLD_GLOBAL
287206f32fbeSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
287306f32fbeSmrg#else
287406f32fbeSmrg#  ifdef DL_GLOBAL
287506f32fbeSmrg#    define LT_DLGLOBAL		DL_GLOBAL
287606f32fbeSmrg#  else
287706f32fbeSmrg#    define LT_DLGLOBAL		0
287806f32fbeSmrg#  endif
287906f32fbeSmrg#endif
288025b89263Smrg
288106f32fbeSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
288206f32fbeSmrg   find out it does not work in some platform. */
288306f32fbeSmrg#ifndef LT_DLLAZY_OR_NOW
288406f32fbeSmrg#  ifdef RTLD_LAZY
288506f32fbeSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
288606f32fbeSmrg#  else
288706f32fbeSmrg#    ifdef DL_LAZY
288806f32fbeSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
288906f32fbeSmrg#    else
289006f32fbeSmrg#      ifdef RTLD_NOW
289106f32fbeSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
289206f32fbeSmrg#      else
289306f32fbeSmrg#        ifdef DL_NOW
289406f32fbeSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
289506f32fbeSmrg#        else
289606f32fbeSmrg#          define LT_DLLAZY_OR_NOW	0
289706f32fbeSmrg#        endif
289806f32fbeSmrg#      endif
289906f32fbeSmrg#    endif
290006f32fbeSmrg#  endif
290106f32fbeSmrg#endif
290225b89263Smrg
290306f32fbeSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
290406f32fbeSmrg   correspondingly for the symbols needed.  */
290506f32fbeSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
290606f32fbeSmrgint fnord () __attribute__((visibility("default")));
290706f32fbeSmrg#endif
290806f32fbeSmrg
290906f32fbeSmrgint fnord () { return 42; }
291006f32fbeSmrgint main ()
291125b89263Smrg{
291206f32fbeSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
291306f32fbeSmrg  int status = $lt_dlunknown;
291425b89263Smrg
291506f32fbeSmrg  if (self)
291606f32fbeSmrg    {
291706f32fbeSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
291806f32fbeSmrg      else
291906f32fbeSmrg        {
292006f32fbeSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
292106f32fbeSmrg          else puts (dlerror ());
292206f32fbeSmrg	}
292306f32fbeSmrg      /* dlclose (self); */
292406f32fbeSmrg    }
292506f32fbeSmrg  else
292606f32fbeSmrg    puts (dlerror ());
292725b89263Smrg
292806f32fbeSmrg  return status;
292906f32fbeSmrg}]
293006f32fbeSmrg_LT_EOF
293106f32fbeSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
293206f32fbeSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
293306f32fbeSmrg    lt_status=$?
293406f32fbeSmrg    case x$lt_status in
293506f32fbeSmrg      x$lt_dlno_uscore) $1 ;;
293606f32fbeSmrg      x$lt_dlneed_uscore) $2 ;;
293706f32fbeSmrg      x$lt_dlunknown|x*) $3 ;;
293806f32fbeSmrg    esac
293906f32fbeSmrg  else :
294006f32fbeSmrg    # compilation failed
294106f32fbeSmrg    $3
294206f32fbeSmrg  fi
294306f32fbeSmrgfi
294406f32fbeSmrgrm -fr conftest*
294506f32fbeSmrg])# _LT_TRY_DLOPEN_SELF
294625b89263Smrg
294725b89263Smrg
294806f32fbeSmrg# LT_SYS_DLOPEN_SELF
294906f32fbeSmrg# ------------------
295006f32fbeSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
295106f32fbeSmrg[m4_require([_LT_HEADER_DLFCN])dnl
295206f32fbeSmrgif test "x$enable_dlopen" != xyes; then
295306f32fbeSmrg  enable_dlopen=unknown
295406f32fbeSmrg  enable_dlopen_self=unknown
295506f32fbeSmrg  enable_dlopen_self_static=unknown
295606f32fbeSmrgelse
295706f32fbeSmrg  lt_cv_dlopen=no
295806f32fbeSmrg  lt_cv_dlopen_libs=
295925b89263Smrg
296006f32fbeSmrg  case $host_os in
296106f32fbeSmrg  beos*)
296206f32fbeSmrg    lt_cv_dlopen="load_add_on"
296306f32fbeSmrg    lt_cv_dlopen_libs=
296406f32fbeSmrg    lt_cv_dlopen_self=yes
296506f32fbeSmrg    ;;
296625b89263Smrg
296706f32fbeSmrg  mingw* | pw32* | cegcc*)
296806f32fbeSmrg    lt_cv_dlopen="LoadLibrary"
296906f32fbeSmrg    lt_cv_dlopen_libs=
297006f32fbeSmrg    ;;
297125b89263Smrg
297206f32fbeSmrg  cygwin*)
297306f32fbeSmrg    lt_cv_dlopen="dlopen"
297406f32fbeSmrg    lt_cv_dlopen_libs=
297506f32fbeSmrg    ;;
297625b89263Smrg
297706f32fbeSmrg  darwin*)
297806f32fbeSmrg  # if libdl is installed we need to link against it
297906f32fbeSmrg    AC_CHECK_LIB([dl], [dlopen],
298006f32fbeSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
298106f32fbeSmrg    lt_cv_dlopen="dyld"
298206f32fbeSmrg    lt_cv_dlopen_libs=
298306f32fbeSmrg    lt_cv_dlopen_self=yes
298406f32fbeSmrg    ])
298506f32fbeSmrg    ;;
298625b89263Smrg
298706f32fbeSmrg  *)
298806f32fbeSmrg    AC_CHECK_FUNC([shl_load],
298906f32fbeSmrg	  [lt_cv_dlopen="shl_load"],
299006f32fbeSmrg      [AC_CHECK_LIB([dld], [shl_load],
299106f32fbeSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
299206f32fbeSmrg	[AC_CHECK_FUNC([dlopen],
299306f32fbeSmrg	      [lt_cv_dlopen="dlopen"],
299406f32fbeSmrg	  [AC_CHECK_LIB([dl], [dlopen],
299506f32fbeSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
299606f32fbeSmrg	    [AC_CHECK_LIB([svld], [dlopen],
299706f32fbeSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
299806f32fbeSmrg	      [AC_CHECK_LIB([dld], [dld_link],
299906f32fbeSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
300006f32fbeSmrg	      ])
300106f32fbeSmrg	    ])
300206f32fbeSmrg	  ])
300306f32fbeSmrg	])
300406f32fbeSmrg      ])
300506f32fbeSmrg    ;;
300606f32fbeSmrg  esac
300725b89263Smrg
300806f32fbeSmrg  if test "x$lt_cv_dlopen" != xno; then
300906f32fbeSmrg    enable_dlopen=yes
301006f32fbeSmrg  else
301106f32fbeSmrg    enable_dlopen=no
301206f32fbeSmrg  fi
301325b89263Smrg
301406f32fbeSmrg  case $lt_cv_dlopen in
301506f32fbeSmrg  dlopen)
301606f32fbeSmrg    save_CPPFLAGS="$CPPFLAGS"
301706f32fbeSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
301825b89263Smrg
301906f32fbeSmrg    save_LDFLAGS="$LDFLAGS"
302006f32fbeSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
302125b89263Smrg
302206f32fbeSmrg    save_LIBS="$LIBS"
302306f32fbeSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
302425b89263Smrg
302506f32fbeSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
302606f32fbeSmrg	  lt_cv_dlopen_self, [dnl
302706f32fbeSmrg	  _LT_TRY_DLOPEN_SELF(
302806f32fbeSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
302906f32fbeSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
303006f32fbeSmrg    ])
303125b89263Smrg
303206f32fbeSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
303306f32fbeSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
303406f32fbeSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
303506f32fbeSmrg	  lt_cv_dlopen_self_static, [dnl
303606f32fbeSmrg	  _LT_TRY_DLOPEN_SELF(
303706f32fbeSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
303806f32fbeSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
303906f32fbeSmrg      ])
304006f32fbeSmrg    fi
304106f32fbeSmrg
304206f32fbeSmrg    CPPFLAGS="$save_CPPFLAGS"
304306f32fbeSmrg    LDFLAGS="$save_LDFLAGS"
304406f32fbeSmrg    LIBS="$save_LIBS"
304525b89263Smrg    ;;
304625b89263Smrg  esac
304706f32fbeSmrg
304806f32fbeSmrg  case $lt_cv_dlopen_self in
304906f32fbeSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
305006f32fbeSmrg  *) enable_dlopen_self=unknown ;;
305106f32fbeSmrg  esac
305206f32fbeSmrg
305306f32fbeSmrg  case $lt_cv_dlopen_self_static in
305406f32fbeSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
305506f32fbeSmrg  *) enable_dlopen_self_static=unknown ;;
305606f32fbeSmrg  esac
305725b89263Smrgfi
305806f32fbeSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
305906f32fbeSmrg	 [Whether dlopen is supported])
306006f32fbeSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
306106f32fbeSmrg	 [Whether dlopen of programs is supported])
306206f32fbeSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
306306f32fbeSmrg	 [Whether dlopen of statically linked programs is supported])
306406f32fbeSmrg])# LT_SYS_DLOPEN_SELF
306525b89263Smrg
306606f32fbeSmrg# Old name:
306706f32fbeSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
306806f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
306906f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
307025b89263Smrg
307125b89263Smrg
307206f32fbeSmrg# _LT_COMPILER_C_O([TAGNAME])
307306f32fbeSmrg# ---------------------------
307406f32fbeSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
307506f32fbeSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
307606f32fbeSmrgm4_defun([_LT_COMPILER_C_O],
307706f32fbeSmrg[m4_require([_LT_DECL_SED])dnl
307806f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
307906f32fbeSmrgm4_require([_LT_TAG_COMPILER])dnl
308006f32fbeSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
308106f32fbeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
308206f32fbeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
308306f32fbeSmrg   $RM -r conftest 2>/dev/null
308406f32fbeSmrg   mkdir conftest
308506f32fbeSmrg   cd conftest
308606f32fbeSmrg   mkdir out
308725b89263Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
308806f32fbeSmrg
308906f32fbeSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
309025b89263Smrg   # Insert the option either (1) after the last *FLAGS variable, or
309125b89263Smrg   # (2) before a word containing "conftest.", or (3) at the end.
309225b89263Smrg   # Note that $ac_compile itself does not contain backslashes and begins
309325b89263Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
309425b89263Smrg   lt_compile=`echo "$ac_compile" | $SED \
309525b89263Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
309625b89263Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
309725b89263Smrg   -e 's:$: $lt_compiler_flag:'`
309825b89263Smrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
309906f32fbeSmrg   (eval "$lt_compile" 2>out/conftest.err)
310025b89263Smrg   ac_status=$?
310106f32fbeSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
310225b89263Smrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
310306f32fbeSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
310406f32fbeSmrg   then
310525b89263Smrg     # The compiler can only warn and ignore the option if not recognized
310606f32fbeSmrg     # So say no if there are warnings
310706f32fbeSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
310806f32fbeSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
310906f32fbeSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
311006f32fbeSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
311125b89263Smrg     fi
311225b89263Smrg   fi
311306f32fbeSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
311406f32fbeSmrg   $RM conftest*
311506f32fbeSmrg   # SGI C++ compiler will create directory out/ii_files/ for
311606f32fbeSmrg   # template instantiation
311706f32fbeSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
311806f32fbeSmrg   $RM out/* && rmdir out
311906f32fbeSmrg   cd ..
312006f32fbeSmrg   $RM -r conftest
312125b89263Smrg   $RM conftest*
312225b89263Smrg])
312306f32fbeSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
312406f32fbeSmrg	[Does compiler simultaneously support -c and -o options?])
312506f32fbeSmrg])# _LT_COMPILER_C_O
312625b89263Smrg
312725b89263Smrg
312806f32fbeSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
312906f32fbeSmrg# ----------------------------------
313006f32fbeSmrg# Check to see if we can do hard links to lock some files if needed
313106f32fbeSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
313206f32fbeSmrg[m4_require([_LT_ENABLE_LOCK])dnl
313306f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
313406f32fbeSmrg_LT_COMPILER_C_O([$1])
313525b89263Smrg
313606f32fbeSmrghard_links="nottested"
313706f32fbeSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
313806f32fbeSmrg  # do not overwrite the value of need_locks provided by the user
313906f32fbeSmrg  AC_MSG_CHECKING([if we can lock with hard links])
314006f32fbeSmrg  hard_links=yes
314106f32fbeSmrg  $RM conftest*
314206f32fbeSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
314306f32fbeSmrg  touch conftest.a
314406f32fbeSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
314506f32fbeSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
314606f32fbeSmrg  AC_MSG_RESULT([$hard_links])
314706f32fbeSmrg  if test "$hard_links" = no; then
314806f32fbeSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
314906f32fbeSmrg    need_locks=warn
315006f32fbeSmrg  fi
315125b89263Smrgelse
315206f32fbeSmrg  need_locks=no
315325b89263Smrgfi
315406f32fbeSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
315506f32fbeSmrg])# _LT_COMPILER_FILE_LOCKS
315625b89263Smrg
315725b89263Smrg
315806f32fbeSmrg# _LT_CHECK_OBJDIR
315906f32fbeSmrg# ----------------
316006f32fbeSmrgm4_defun([_LT_CHECK_OBJDIR],
316106f32fbeSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
316206f32fbeSmrg[rm -f .libs 2>/dev/null
316306f32fbeSmrgmkdir .libs 2>/dev/null
316406f32fbeSmrgif test -d .libs; then
316506f32fbeSmrg  lt_cv_objdir=.libs
316606f32fbeSmrgelse
316706f32fbeSmrg  # MS-DOS does not allow filenames that begin with a dot.
316806f32fbeSmrg  lt_cv_objdir=_libs
316906f32fbeSmrgfi
317006f32fbeSmrgrmdir .libs 2>/dev/null])
317106f32fbeSmrgobjdir=$lt_cv_objdir
317206f32fbeSmrg_LT_DECL([], [objdir], [0],
317306f32fbeSmrg         [The name of the directory that contains temporary libtool files])dnl
317406f32fbeSmrgm4_pattern_allow([LT_OBJDIR])dnl
317506f32fbeSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
317606f32fbeSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
317706f32fbeSmrg])# _LT_CHECK_OBJDIR
317825b89263Smrg
317925b89263Smrg
318006f32fbeSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
318106f32fbeSmrg# --------------------------------------
318206f32fbeSmrg# Check hardcoding attributes.
318306f32fbeSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
318406f32fbeSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
318506f32fbeSmrg_LT_TAGVAR(hardcode_action, $1)=
318606f32fbeSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
318706f32fbeSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
318806f32fbeSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
318925b89263Smrg
319006f32fbeSmrg  # We can hardcode non-existent directories.
319106f32fbeSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
319206f32fbeSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
319306f32fbeSmrg     # have to relink, otherwise we might link with an installed library
319406f32fbeSmrg     # when we should be linking with a yet-to-be-installed one
319506f32fbeSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
319606f32fbeSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
319706f32fbeSmrg    # Linking always hardcodes the temporary library directory.
319806f32fbeSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
319906f32fbeSmrg  else
320006f32fbeSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
320106f32fbeSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
320206f32fbeSmrg  fi
320306f32fbeSmrgelse
320406f32fbeSmrg  # We cannot hardcode anything, or else we can only hardcode existing
320506f32fbeSmrg  # directories.
320606f32fbeSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
320706f32fbeSmrgfi
320806f32fbeSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
320925b89263Smrg
321006f32fbeSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
321106f32fbeSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
321206f32fbeSmrg  # Fast installation is not supported
321306f32fbeSmrg  enable_fast_install=no
321406f32fbeSmrgelif test "$shlibpath_overrides_runpath" = yes ||
321506f32fbeSmrg     test "$enable_shared" = no; then
321606f32fbeSmrg  # Fast installation is not necessary
321706f32fbeSmrg  enable_fast_install=needless
321806f32fbeSmrgfi
321906f32fbeSmrg_LT_TAGDECL([], [hardcode_action], [0],
322006f32fbeSmrg    [How to hardcode a shared library path into an executable])
322106f32fbeSmrg])# _LT_LINKER_HARDCODE_LIBPATH
322225b89263Smrg
322325b89263Smrg
322406f32fbeSmrg# _LT_CMD_STRIPLIB
322506f32fbeSmrg# ----------------
322606f32fbeSmrgm4_defun([_LT_CMD_STRIPLIB],
322706f32fbeSmrg[m4_require([_LT_DECL_EGREP])
322806f32fbeSmrgstriplib=
322906f32fbeSmrgold_striplib=
323006f32fbeSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
323106f32fbeSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
323206f32fbeSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
323306f32fbeSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
323406f32fbeSmrg  AC_MSG_RESULT([yes])
323506f32fbeSmrgelse
323606f32fbeSmrg# FIXME - insert some real tests, host_os isn't really good enough
323706f32fbeSmrg  case $host_os in
323806f32fbeSmrg  darwin*)
323906f32fbeSmrg    if test -n "$STRIP" ; then
324006f32fbeSmrg      striplib="$STRIP -x"
324106f32fbeSmrg      old_striplib="$STRIP -S"
324206f32fbeSmrg      AC_MSG_RESULT([yes])
324325b89263Smrg    else
324406f32fbeSmrg      AC_MSG_RESULT([no])
324525b89263Smrg    fi
324625b89263Smrg    ;;
324706f32fbeSmrg  *)
324806f32fbeSmrg    AC_MSG_RESULT([no])
324925b89263Smrg    ;;
325006f32fbeSmrg  esac
325106f32fbeSmrgfi
325206f32fbeSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
325306f32fbeSmrg_LT_DECL([], [striplib], [1])
325406f32fbeSmrg])# _LT_CMD_STRIPLIB
325525b89263Smrg
325606f32fbeSmrg
325706f32fbeSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
325806f32fbeSmrg# -----------------------------
325906f32fbeSmrg# PORTME Fill in your ld.so characteristics
326006f32fbeSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
326106f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
326206f32fbeSmrgm4_require([_LT_DECL_EGREP])dnl
326306f32fbeSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
326406f32fbeSmrgm4_require([_LT_DECL_OBJDUMP])dnl
326506f32fbeSmrgm4_require([_LT_DECL_SED])dnl
326606f32fbeSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
326706f32fbeSmrgAC_MSG_CHECKING([dynamic linker characteristics])
326806f32fbeSmrgm4_if([$1],
326906f32fbeSmrg	[], [
327006f32fbeSmrgif test "$GCC" = yes; then
327106f32fbeSmrg  case $host_os in
327206f32fbeSmrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
327306f32fbeSmrg    *) lt_awk_arg="/^libraries:/" ;;
327406f32fbeSmrg  esac
327506f32fbeSmrg  case $host_os in
327606f32fbeSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
327706f32fbeSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
327806f32fbeSmrg  esac
327906f32fbeSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
328006f32fbeSmrg  case $lt_search_path_spec in
328106f32fbeSmrg  *\;*)
328206f32fbeSmrg    # if the path contains ";" then we assume it to be the separator
328306f32fbeSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
328406f32fbeSmrg    # assumed that no part of a normal pathname contains ";" but that should
328506f32fbeSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
328606f32fbeSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
328725b89263Smrg    ;;
328825b89263Smrg  *)
328906f32fbeSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
329006f32fbeSmrg    ;;
329106f32fbeSmrg  esac
329206f32fbeSmrg  # Ok, now we have the path, separated by spaces, we can step through it
329306f32fbeSmrg  # and add multilib dir if necessary.
329406f32fbeSmrg  lt_tmp_lt_search_path_spec=
329506f32fbeSmrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
329606f32fbeSmrg  for lt_sys_path in $lt_search_path_spec; do
329706f32fbeSmrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
329806f32fbeSmrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
329925b89263Smrg    else
330006f32fbeSmrg      test -d "$lt_sys_path" && \
330106f32fbeSmrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
330225b89263Smrg    fi
330306f32fbeSmrg  done
330406f32fbeSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
330506f32fbeSmrgBEGIN {RS=" "; FS="/|\n";} {
330606f32fbeSmrg  lt_foo="";
330706f32fbeSmrg  lt_count=0;
330806f32fbeSmrg  for (lt_i = NF; lt_i > 0; lt_i--) {
330906f32fbeSmrg    if ($lt_i != "" && $lt_i != ".") {
331006f32fbeSmrg      if ($lt_i == "..") {
331106f32fbeSmrg        lt_count++;
331206f32fbeSmrg      } else {
331306f32fbeSmrg        if (lt_count == 0) {
331406f32fbeSmrg          lt_foo="/" $lt_i lt_foo;
331506f32fbeSmrg        } else {
331606f32fbeSmrg          lt_count--;
331706f32fbeSmrg        }
331806f32fbeSmrg      }
331906f32fbeSmrg    }
332006f32fbeSmrg  }
332106f32fbeSmrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
332206f32fbeSmrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
332306f32fbeSmrg}'`
332406f32fbeSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
332506f32fbeSmrg  # for these hosts.
332606f32fbeSmrg  case $host_os in
332706f32fbeSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
332806f32fbeSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
332925b89263Smrg  esac
333006f32fbeSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
333125b89263Smrgelse
333206f32fbeSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
333306f32fbeSmrgfi])
333406f32fbeSmrglibrary_names_spec=
333506f32fbeSmrglibname_spec='lib$name'
333606f32fbeSmrgsoname_spec=
333706f32fbeSmrgshrext_cmds=".so"
333806f32fbeSmrgpostinstall_cmds=
333906f32fbeSmrgpostuninstall_cmds=
334006f32fbeSmrgfinish_cmds=
334106f32fbeSmrgfinish_eval=
334206f32fbeSmrgshlibpath_var=
334306f32fbeSmrgshlibpath_overrides_runpath=unknown
334406f32fbeSmrgversion_type=none
334506f32fbeSmrgdynamic_linker="$host_os ld.so"
334606f32fbeSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
334706f32fbeSmrgneed_lib_prefix=unknown
334806f32fbeSmrghardcode_into_libs=no
334925b89263Smrg
335006f32fbeSmrg# when you set need_version to no, make sure it does not cause -set_version
335106f32fbeSmrg# flags to be left without arguments
335206f32fbeSmrgneed_version=unknown
335325b89263Smrg
335406f32fbeSmrgcase $host_os in
335506f32fbeSmrgaix3*)
335606f32fbeSmrg  version_type=linux
335706f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
335806f32fbeSmrg  shlibpath_var=LIBPATH
335925b89263Smrg
336006f32fbeSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
336106f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
336206f32fbeSmrg  ;;
336325b89263Smrg
336406f32fbeSmrgaix[[4-9]]*)
336506f32fbeSmrg  version_type=linux
336606f32fbeSmrg  need_lib_prefix=no
336706f32fbeSmrg  need_version=no
336806f32fbeSmrg  hardcode_into_libs=yes
336906f32fbeSmrg  if test "$host_cpu" = ia64; then
337006f32fbeSmrg    # AIX 5 supports IA64
337106f32fbeSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
337206f32fbeSmrg    shlibpath_var=LD_LIBRARY_PATH
337306f32fbeSmrg  else
337406f32fbeSmrg    # With GCC up to 2.95.x, collect2 would create an import file
337506f32fbeSmrg    # for dependence libraries.  The import file would start with
337606f32fbeSmrg    # the line `#! .'.  This would cause the generated library to
337706f32fbeSmrg    # depend on `.', always an invalid library.  This was fixed in
337806f32fbeSmrg    # development snapshots of GCC prior to 3.0.
337906f32fbeSmrg    case $host_os in
338006f32fbeSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
338106f32fbeSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
338206f32fbeSmrg	   echo ' yes '
338306f32fbeSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
338406f32fbeSmrg	:
338506f32fbeSmrg      else
338606f32fbeSmrg	can_build_shared=no
338706f32fbeSmrg      fi
338806f32fbeSmrg      ;;
338906f32fbeSmrg    esac
339006f32fbeSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
339106f32fbeSmrg    # soname into executable. Probably we can add versioning support to
339206f32fbeSmrg    # collect2, so additional links can be useful in future.
339306f32fbeSmrg    if test "$aix_use_runtimelinking" = yes; then
339406f32fbeSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
339506f32fbeSmrg      # instead of lib<name>.a to let people know that these are not
339606f32fbeSmrg      # typical AIX shared libraries.
339706f32fbeSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
339806f32fbeSmrg    else
339906f32fbeSmrg      # We preserve .a as extension for shared libraries through AIX4.2
340006f32fbeSmrg      # and later when we are not doing run time linking.
340106f32fbeSmrg      library_names_spec='${libname}${release}.a $libname.a'
340206f32fbeSmrg      soname_spec='${libname}${release}${shared_ext}$major'
340306f32fbeSmrg    fi
340406f32fbeSmrg    shlibpath_var=LIBPATH
340506f32fbeSmrg  fi
340606f32fbeSmrg  ;;
340725b89263Smrg
340806f32fbeSmrgamigaos*)
340906f32fbeSmrg  case $host_cpu in
341006f32fbeSmrg  powerpc)
341106f32fbeSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
341206f32fbeSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
341306f32fbeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
341406f32fbeSmrg    ;;
341506f32fbeSmrg  m68k)
341606f32fbeSmrg    library_names_spec='$libname.ixlibrary $libname.a'
341706f32fbeSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
341806f32fbeSmrg    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'
341906f32fbeSmrg    ;;
342006f32fbeSmrg  esac
342106f32fbeSmrg  ;;
342225b89263Smrg
342306f32fbeSmrgbeos*)
342406f32fbeSmrg  library_names_spec='${libname}${shared_ext}'
342506f32fbeSmrg  dynamic_linker="$host_os ld.so"
342606f32fbeSmrg  shlibpath_var=LIBRARY_PATH
342706f32fbeSmrg  ;;
342825b89263Smrg
342906f32fbeSmrgbsdi[[45]]*)
343006f32fbeSmrg  version_type=linux
343106f32fbeSmrg  need_version=no
343206f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
343306f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
343406f32fbeSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
343506f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
343606f32fbeSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
343706f32fbeSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
343806f32fbeSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
343906f32fbeSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
344006f32fbeSmrg  # libtool to hard-code these into programs
344106f32fbeSmrg  ;;
344225b89263Smrg
344306f32fbeSmrgcygwin* | mingw* | pw32* | cegcc*)
344406f32fbeSmrg  version_type=windows
344506f32fbeSmrg  shrext_cmds=".dll"
344606f32fbeSmrg  need_version=no
344706f32fbeSmrg  need_lib_prefix=no
344825b89263Smrg
344906f32fbeSmrg  case $GCC,$cc_basename in
345006f32fbeSmrg  yes,*)
345106f32fbeSmrg    # gcc
345206f32fbeSmrg    library_names_spec='$libname.dll.a'
345306f32fbeSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
345406f32fbeSmrg    postinstall_cmds='base_file=`basename \${file}`~
345506f32fbeSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
345606f32fbeSmrg      dldir=$destdir/`dirname \$dlpath`~
345706f32fbeSmrg      test -d \$dldir || mkdir -p \$dldir~
345806f32fbeSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
345906f32fbeSmrg      chmod a+x \$dldir/$dlname~
346006f32fbeSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
346106f32fbeSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
346206f32fbeSmrg      fi'
346306f32fbeSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
346406f32fbeSmrg      dlpath=$dir/\$dldll~
346506f32fbeSmrg       $RM \$dlpath'
346606f32fbeSmrg    shlibpath_overrides_runpath=yes
346725b89263Smrg
346806f32fbeSmrg    case $host_os in
346906f32fbeSmrg    cygwin*)
347006f32fbeSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
347106f32fbeSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
347206f32fbeSmrgm4_if([$1], [],[
347306f32fbeSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
347406f32fbeSmrg      ;;
347506f32fbeSmrg    mingw* | cegcc*)
347606f32fbeSmrg      # MinGW DLLs use traditional 'lib' prefix
347706f32fbeSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
347806f32fbeSmrg      ;;
347906f32fbeSmrg    pw32*)
348006f32fbeSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
348106f32fbeSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
348206f32fbeSmrg      ;;
348306f32fbeSmrg    esac
348406f32fbeSmrg    dynamic_linker='Win32 ld.exe'
348506f32fbeSmrg    ;;
348625b89263Smrg
348706f32fbeSmrg  *,cl*)
348806f32fbeSmrg    # Native MSVC
348906f32fbeSmrg    libname_spec='$name'
349006f32fbeSmrg    soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
349106f32fbeSmrg    library_names_spec='${libname}.dll.lib'
349206f32fbeSmrg
349306f32fbeSmrg    case $build_os in
349406f32fbeSmrg    mingw*)
349506f32fbeSmrg      sys_lib_search_path_spec=
349606f32fbeSmrg      lt_save_ifs=$IFS
349706f32fbeSmrg      IFS=';'
349806f32fbeSmrg      for lt_path in $LIB
349906f32fbeSmrg      do
350006f32fbeSmrg        IFS=$lt_save_ifs
350106f32fbeSmrg        # Let DOS variable expansion print the short 8.3 style file name.
350206f32fbeSmrg        lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"`
350306f32fbeSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path"
350406f32fbeSmrg      done
350506f32fbeSmrg      IFS=$lt_save_ifs
350606f32fbeSmrg      # Convert to MSYS style.
350706f32fbeSmrg      sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'`
350806f32fbeSmrg      ;;
350906f32fbeSmrg    cygwin*)
351006f32fbeSmrg      # Convert to unix form, then to dos form, then back to unix form
351106f32fbeSmrg      # but this time dos style (no spaces!) so that the unix form looks
351206f32fbeSmrg      # like /cygdrive/c/PROGRA~1:/cygdr...
351306f32fbeSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$LIB"`
351406f32fbeSmrg      sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null`
351506f32fbeSmrg      sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
351606f32fbeSmrg      ;;
351706f32fbeSmrg    *)
351806f32fbeSmrg      sys_lib_search_path_spec="$LIB"
351906f32fbeSmrg      if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
352006f32fbeSmrg        # It is most probably a Windows format PATH.
352106f32fbeSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
352225b89263Smrg      else
352306f32fbeSmrg        sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
352406f32fbeSmrg      fi
352506f32fbeSmrg      # FIXME: find the short name or the path components, as spaces are
352606f32fbeSmrg      # common. (e.g. "Program Files" -> "PROGRA~1")
352706f32fbeSmrg      ;;
3528ea133fd7Smrg    esac
3529a253d6aeSmrg
353006f32fbeSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
353106f32fbeSmrg    postinstall_cmds='base_file=`basename \${file}`~
353206f32fbeSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
353306f32fbeSmrg      dldir=$destdir/`dirname \$dlpath`~
353406f32fbeSmrg      test -d \$dldir || mkdir -p \$dldir~
353506f32fbeSmrg      $install_prog $dir/$dlname \$dldir/$dlname'
353606f32fbeSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
353706f32fbeSmrg      dlpath=$dir/\$dldll~
353806f32fbeSmrg       $RM \$dlpath'
353906f32fbeSmrg    shlibpath_overrides_runpath=yes
354006f32fbeSmrg    dynamic_linker='Win32 link.exe'
354125b89263Smrg    ;;
3542a253d6aeSmrg
354306f32fbeSmrg  *)
354406f32fbeSmrg    # Assume MSVC wrapper
354506f32fbeSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
354606f32fbeSmrg    dynamic_linker='Win32 ld.exe'
354725b89263Smrg    ;;
354806f32fbeSmrg  esac
354906f32fbeSmrg  # FIXME: first we should search . and the directory the executable is in
355006f32fbeSmrg  shlibpath_var=PATH
355106f32fbeSmrg  ;;
3552a253d6aeSmrg
355306f32fbeSmrgdarwin* | rhapsody*)
355406f32fbeSmrg  dynamic_linker="$host_os dyld"
355506f32fbeSmrg  version_type=darwin
355606f32fbeSmrg  need_lib_prefix=no
355706f32fbeSmrg  need_version=no
355806f32fbeSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
355906f32fbeSmrg  soname_spec='${libname}${release}${major}$shared_ext'
356006f32fbeSmrg  shlibpath_overrides_runpath=yes
356106f32fbeSmrg  shlibpath_var=DYLD_LIBRARY_PATH
356206f32fbeSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
356306f32fbeSmrgm4_if([$1], [],[
356406f32fbeSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
356506f32fbeSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
356606f32fbeSmrg  ;;
3567a253d6aeSmrg
356806f32fbeSmrgdgux*)
356906f32fbeSmrg  version_type=linux
357006f32fbeSmrg  need_lib_prefix=no
357106f32fbeSmrg  need_version=no
357206f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
357306f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
357406f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
357506f32fbeSmrg  ;;
3576a253d6aeSmrg
357706f32fbeSmrgfreebsd1*)
357806f32fbeSmrg  dynamic_linker=no
357906f32fbeSmrg  ;;
3580a253d6aeSmrg
358106f32fbeSmrgfreebsd* | dragonfly*)
358206f32fbeSmrg  # DragonFly does not have aout.  When/if they implement a new
358306f32fbeSmrg  # versioning mechanism, adjust this.
358406f32fbeSmrg  if test -x /usr/bin/objformat; then
358506f32fbeSmrg    objformat=`/usr/bin/objformat`
358625b89263Smrg  else
358706f32fbeSmrg    case $host_os in
358806f32fbeSmrg    freebsd[[123]]*) objformat=aout ;;
358906f32fbeSmrg    *) objformat=elf ;;
359006f32fbeSmrg    esac
359125b89263Smrg  fi
359206f32fbeSmrg  version_type=freebsd-$objformat
359306f32fbeSmrg  case $version_type in
359406f32fbeSmrg    freebsd-elf*)
359506f32fbeSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
359606f32fbeSmrg      need_version=no
359706f32fbeSmrg      need_lib_prefix=no
359806f32fbeSmrg      ;;
359906f32fbeSmrg    freebsd-*)
360006f32fbeSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
360106f32fbeSmrg      need_version=yes
360206f32fbeSmrg      ;;
360306f32fbeSmrg  esac
360406f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
360506f32fbeSmrg  case $host_os in
360606f32fbeSmrg  freebsd2*)
360706f32fbeSmrg    shlibpath_overrides_runpath=yes
360806f32fbeSmrg    ;;
360906f32fbeSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
361006f32fbeSmrg    shlibpath_overrides_runpath=yes
361106f32fbeSmrg    hardcode_into_libs=yes
361206f32fbeSmrg    ;;
361306f32fbeSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
361406f32fbeSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
361506f32fbeSmrg    shlibpath_overrides_runpath=no
361606f32fbeSmrg    hardcode_into_libs=yes
361706f32fbeSmrg    ;;
361806f32fbeSmrg  *) # from 4.6 on, and DragonFly
361906f32fbeSmrg    shlibpath_overrides_runpath=yes
362006f32fbeSmrg    hardcode_into_libs=yes
362106f32fbeSmrg    ;;
362206f32fbeSmrg  esac
362306f32fbeSmrg  ;;
3624a253d6aeSmrg
362506f32fbeSmrggnu*)
362606f32fbeSmrg  version_type=linux
362706f32fbeSmrg  need_lib_prefix=no
362806f32fbeSmrg  need_version=no
362906f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
363006f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
363106f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
363206f32fbeSmrg  hardcode_into_libs=yes
363306f32fbeSmrg  ;;
3634a253d6aeSmrg
363506f32fbeSmrghaiku*)
363606f32fbeSmrg  version_type=linux
363706f32fbeSmrg  need_lib_prefix=no
363806f32fbeSmrg  need_version=no
363906f32fbeSmrg  dynamic_linker="$host_os runtime_loader"
364006f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
364106f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
364206f32fbeSmrg  shlibpath_var=LIBRARY_PATH
364306f32fbeSmrg  shlibpath_overrides_runpath=yes
364406f32fbeSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
364506f32fbeSmrg  hardcode_into_libs=yes
364606f32fbeSmrg  ;;
3647a253d6aeSmrg
364806f32fbeSmrghpux9* | hpux10* | hpux11*)
364906f32fbeSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
365006f32fbeSmrg  # link against other versions.
365106f32fbeSmrg  version_type=sunos
365206f32fbeSmrg  need_lib_prefix=no
365306f32fbeSmrg  need_version=no
365406f32fbeSmrg  case $host_cpu in
365506f32fbeSmrg  ia64*)
365606f32fbeSmrg    shrext_cmds='.so'
365706f32fbeSmrg    hardcode_into_libs=yes
365806f32fbeSmrg    dynamic_linker="$host_os dld.so"
365906f32fbeSmrg    shlibpath_var=LD_LIBRARY_PATH
366006f32fbeSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
366106f32fbeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
366206f32fbeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
366306f32fbeSmrg    if test "X$HPUX_IA64_MODE" = X32; then
366406f32fbeSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
366506f32fbeSmrg    else
366606f32fbeSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
366725b89263Smrg    fi
366806f32fbeSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
366906f32fbeSmrg    ;;
367006f32fbeSmrg  hppa*64*)
367106f32fbeSmrg    shrext_cmds='.sl'
367206f32fbeSmrg    hardcode_into_libs=yes
367306f32fbeSmrg    dynamic_linker="$host_os dld.sl"
367406f32fbeSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
367506f32fbeSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
367606f32fbeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
367706f32fbeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
367806f32fbeSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
367906f32fbeSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
368006f32fbeSmrg    ;;
368106f32fbeSmrg  *)
368206f32fbeSmrg    shrext_cmds='.sl'
368306f32fbeSmrg    dynamic_linker="$host_os dld.sl"
368406f32fbeSmrg    shlibpath_var=SHLIB_PATH
368506f32fbeSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
368606f32fbeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
368706f32fbeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
368825b89263Smrg    ;;
368925b89263Smrg  esac
369006f32fbeSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
369106f32fbeSmrg  postinstall_cmds='chmod 555 $lib'
369206f32fbeSmrg  # or fails outright, so override atomically:
369306f32fbeSmrg  install_override_mode=555
369406f32fbeSmrg  ;;
3695a253d6aeSmrg
369606f32fbeSmrginterix[[3-9]]*)
369706f32fbeSmrg  version_type=linux
369806f32fbeSmrg  need_lib_prefix=no
369906f32fbeSmrg  need_version=no
370006f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
370106f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
370206f32fbeSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
370306f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
370406f32fbeSmrg  shlibpath_overrides_runpath=no
370506f32fbeSmrg  hardcode_into_libs=yes
370606f32fbeSmrg  ;;
3707a253d6aeSmrg
370806f32fbeSmrgirix5* | irix6* | nonstopux*)
370906f32fbeSmrg  case $host_os in
371006f32fbeSmrg    nonstopux*) version_type=nonstopux ;;
371106f32fbeSmrg    *)
371206f32fbeSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
371306f32fbeSmrg		version_type=linux
371406f32fbeSmrg	else
371506f32fbeSmrg		version_type=irix
371606f32fbeSmrg	fi ;;
371725b89263Smrg  esac
371806f32fbeSmrg  need_lib_prefix=no
371906f32fbeSmrg  need_version=no
372006f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
372106f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
372206f32fbeSmrg  case $host_os in
372306f32fbeSmrg  irix5* | nonstopux*)
372406f32fbeSmrg    libsuff= shlibsuff=
372506f32fbeSmrg    ;;
372606f32fbeSmrg  *)
372706f32fbeSmrg    case $LD in # libtool.m4 will add one of these switches to LD
372806f32fbeSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
372906f32fbeSmrg      libsuff= shlibsuff= libmagic=32-bit;;
373006f32fbeSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
373106f32fbeSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
373206f32fbeSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
373306f32fbeSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
373406f32fbeSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
373506f32fbeSmrg    esac
373606f32fbeSmrg    ;;
373706f32fbeSmrg  esac
373806f32fbeSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
373906f32fbeSmrg  shlibpath_overrides_runpath=no
374006f32fbeSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
374106f32fbeSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
374206f32fbeSmrg  hardcode_into_libs=yes
374306f32fbeSmrg  ;;
3744a253d6aeSmrg
374506f32fbeSmrg# No shared lib support for Linux oldld, aout, or coff.
374606f32fbeSmrglinux*oldld* | linux*aout* | linux*coff*)
374706f32fbeSmrg  dynamic_linker=no
374806f32fbeSmrg  ;;
3749a253d6aeSmrg
375006f32fbeSmrg# This must be Linux ELF.
375106f32fbeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
375206f32fbeSmrg  version_type=linux
375306f32fbeSmrg  need_lib_prefix=no
375406f32fbeSmrg  need_version=no
375506f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
375606f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
375706f32fbeSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
375806f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
375906f32fbeSmrg  shlibpath_overrides_runpath=no
3760a253d6aeSmrg
376106f32fbeSmrg  # Some binutils ld are patched to set DT_RUNPATH
376206f32fbeSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
376306f32fbeSmrg    [lt_cv_shlibpath_overrides_runpath=no
376406f32fbeSmrg    save_LDFLAGS=$LDFLAGS
376506f32fbeSmrg    save_libdir=$libdir
376606f32fbeSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
376706f32fbeSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
376806f32fbeSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
376906f32fbeSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
377006f32fbeSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
377106f32fbeSmrg    LDFLAGS=$save_LDFLAGS
377206f32fbeSmrg    libdir=$save_libdir
377306f32fbeSmrg    ])
377406f32fbeSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
3775a253d6aeSmrg
377606f32fbeSmrg  # This implies no fast_install, which is unacceptable.
377706f32fbeSmrg  # Some rework will be needed to allow for fast_install
377806f32fbeSmrg  # before this can be enabled.
377906f32fbeSmrg  hardcode_into_libs=yes
3780a253d6aeSmrg
378106f32fbeSmrg  # Append ld.so.conf contents to the search path
378206f32fbeSmrg  if test -f /etc/ld.so.conf; then
378306f32fbeSmrg    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' ' '`
378406f32fbeSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
378525b89263Smrg  fi
3786a253d6aeSmrg
378706f32fbeSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
378806f32fbeSmrg  # powerpc, because MkLinux only supported shared libraries with the
378906f32fbeSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
379006f32fbeSmrg  # most powerpc-linux boxes support dynamic linking these days and
379106f32fbeSmrg  # people can always --disable-shared, the test was removed, and we
379206f32fbeSmrg  # assume the GNU/Linux dynamic linker is in use.
379306f32fbeSmrg  dynamic_linker='GNU/Linux ld.so'
379406f32fbeSmrg  ;;
3795a253d6aeSmrg
379606f32fbeSmrgnetbsd*)
379706f32fbeSmrg  version_type=sunos
379806f32fbeSmrg  need_lib_prefix=no
379906f32fbeSmrg  need_version=no
380006f32fbeSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
380106f32fbeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
380206f32fbeSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
380306f32fbeSmrg    dynamic_linker='NetBSD (a.out) ld.so'
380425b89263Smrg  else
380506f32fbeSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
380606f32fbeSmrg    soname_spec='${libname}${release}${shared_ext}$major'
380706f32fbeSmrg    dynamic_linker='NetBSD ld.elf_so'
380825b89263Smrg  fi
380906f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
381006f32fbeSmrg  shlibpath_overrides_runpath=yes
381106f32fbeSmrg  hardcode_into_libs=yes
381206f32fbeSmrg  ;;
3813a253d6aeSmrg
381406f32fbeSmrgnewsos6)
381506f32fbeSmrg  version_type=linux
381606f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
381706f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
381806f32fbeSmrg  shlibpath_overrides_runpath=yes
381906f32fbeSmrg  ;;
3820a253d6aeSmrg
382106f32fbeSmrg*nto* | *qnx*)
382206f32fbeSmrg  version_type=qnx
382306f32fbeSmrg  need_lib_prefix=no
382406f32fbeSmrg  need_version=no
382506f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
382606f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
382706f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
382806f32fbeSmrg  shlibpath_overrides_runpath=no
382906f32fbeSmrg  hardcode_into_libs=yes
383006f32fbeSmrg  dynamic_linker='ldqnx.so'
383106f32fbeSmrg  ;;
3832a253d6aeSmrg
383306f32fbeSmrgopenbsd*)
383406f32fbeSmrg  version_type=sunos
383506f32fbeSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
383606f32fbeSmrg  need_lib_prefix=no
383706f32fbeSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
3838ea133fd7Smrg  case $host_os in
383906f32fbeSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
384006f32fbeSmrg    *)				need_version=no  ;;
3841ea133fd7Smrg  esac
384206f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
384306f32fbeSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
384406f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
384506f32fbeSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
384606f32fbeSmrg    case $host_os in
384706f32fbeSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
384806f32fbeSmrg	shlibpath_overrides_runpath=no
384906f32fbeSmrg	;;
385006f32fbeSmrg      *)
385106f32fbeSmrg	shlibpath_overrides_runpath=yes
385206f32fbeSmrg	;;
385306f32fbeSmrg      esac
385406f32fbeSmrg  else
385506f32fbeSmrg    shlibpath_overrides_runpath=yes
385606f32fbeSmrg  fi
385706f32fbeSmrg  ;;
3858a253d6aeSmrg
385906f32fbeSmrgos2*)
386006f32fbeSmrg  libname_spec='$name'
386106f32fbeSmrg  shrext_cmds=".dll"
386206f32fbeSmrg  need_lib_prefix=no
386306f32fbeSmrg  library_names_spec='$libname${shared_ext} $libname.a'
386406f32fbeSmrg  dynamic_linker='OS/2 ld.exe'
386506f32fbeSmrg  shlibpath_var=LIBPATH
386606f32fbeSmrg  ;;
3867a253d6aeSmrg
386806f32fbeSmrgosf3* | osf4* | osf5*)
386906f32fbeSmrg  version_type=osf
387006f32fbeSmrg  need_lib_prefix=no
387106f32fbeSmrg  need_version=no
387206f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
387306f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
387406f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
387506f32fbeSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
387606f32fbeSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
387706f32fbeSmrg  ;;
387806f32fbeSmrg
387906f32fbeSmrgrdos*)
388006f32fbeSmrg  dynamic_linker=no
388106f32fbeSmrg  ;;
388206f32fbeSmrg
388306f32fbeSmrgsolaris*)
388406f32fbeSmrg  version_type=linux
388506f32fbeSmrg  need_lib_prefix=no
388606f32fbeSmrg  need_version=no
388706f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
388806f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
388906f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
389006f32fbeSmrg  shlibpath_overrides_runpath=yes
389106f32fbeSmrg  hardcode_into_libs=yes
389206f32fbeSmrg  # ldd complains unless libraries are executable
389306f32fbeSmrg  postinstall_cmds='chmod +x $lib'
389406f32fbeSmrg  ;;
389506f32fbeSmrg
389606f32fbeSmrgsunos4*)
389706f32fbeSmrg  version_type=sunos
389806f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
389906f32fbeSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
390006f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
390106f32fbeSmrg  shlibpath_overrides_runpath=yes
390206f32fbeSmrg  if test "$with_gnu_ld" = yes; then
390306f32fbeSmrg    need_lib_prefix=no
390406f32fbeSmrg  fi
390506f32fbeSmrg  need_version=yes
390606f32fbeSmrg  ;;
390706f32fbeSmrg
390806f32fbeSmrgsysv4 | sysv4.3*)
390906f32fbeSmrg  version_type=linux
391006f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
391106f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
391206f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
391306f32fbeSmrg  case $host_vendor in
391406f32fbeSmrg    sni)
391506f32fbeSmrg      shlibpath_overrides_runpath=no
391606f32fbeSmrg      need_lib_prefix=no
391706f32fbeSmrg      runpath_var=LD_RUN_PATH
391806f32fbeSmrg      ;;
391906f32fbeSmrg    siemens)
392006f32fbeSmrg      need_lib_prefix=no
392106f32fbeSmrg      ;;
392206f32fbeSmrg    motorola)
392306f32fbeSmrg      need_lib_prefix=no
392406f32fbeSmrg      need_version=no
392506f32fbeSmrg      shlibpath_overrides_runpath=no
392606f32fbeSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
392706f32fbeSmrg      ;;
392825b89263Smrg  esac
392906f32fbeSmrg  ;;
393025b89263Smrg
393106f32fbeSmrgsysv4*MP*)
393206f32fbeSmrg  if test -d /usr/nec ;then
393306f32fbeSmrg    version_type=linux
393406f32fbeSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
393506f32fbeSmrg    soname_spec='$libname${shared_ext}.$major'
393606f32fbeSmrg    shlibpath_var=LD_LIBRARY_PATH
393706f32fbeSmrg  fi
393825b89263Smrg  ;;
393925b89263Smrg
394006f32fbeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
394106f32fbeSmrg  version_type=freebsd-elf
394225b89263Smrg  need_lib_prefix=no
394325b89263Smrg  need_version=no
394406f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
394506f32fbeSmrg  soname_spec='${libname}${release}${shared_ext}$major'
394606f32fbeSmrg  shlibpath_var=LD_LIBRARY_PATH
394706f32fbeSmrg  shlibpath_overrides_runpath=yes
394825b89263Smrg  hardcode_into_libs=yes
394906f32fbeSmrg  if test "$with_gnu_ld" = yes; then
395006f32fbeSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
395125b89263Smrg  else
395206f32fbeSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
395325b89263Smrg    case $host_os in
395406f32fbeSmrg      sco3.2v5*)
395506f32fbeSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
395606f32fbeSmrg	;;
395725b89263Smrg    esac
395825b89263Smrg  fi
395906f32fbeSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
396025b89263Smrg  ;;
3961a253d6aeSmrg
396206f32fbeSmrgtpf*)
396306f32fbeSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
396425b89263Smrg  version_type=linux
396506f32fbeSmrg  need_lib_prefix=no
396625b89263Smrg  need_version=no
396725b89263Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
396825b89263Smrg  shlibpath_var=LD_LIBRARY_PATH
396906f32fbeSmrg  shlibpath_overrides_runpath=no
397006f32fbeSmrg  hardcode_into_libs=yes
397125b89263Smrg  ;;
3972ea133fd7Smrg
397306f32fbeSmrguts4*)
397425b89263Smrg  version_type=linux
397506f32fbeSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
397625b89263Smrg  soname_spec='${libname}${release}${shared_ext}$major'
397725b89263Smrg  shlibpath_var=LD_LIBRARY_PATH
397825b89263Smrg  ;;
397925b89263Smrg
398006f32fbeSmrg*)
398125b89263Smrg  dynamic_linker=no
398225b89263Smrg  ;;
398306f32fbeSmrgesac
398406f32fbeSmrgAC_MSG_RESULT([$dynamic_linker])
398506f32fbeSmrgtest "$dynamic_linker" = no && can_build_shared=no
398625b89263Smrg
398706f32fbeSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
398806f32fbeSmrgif test "$GCC" = yes; then
398906f32fbeSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
399006f32fbeSmrgfi
399125b89263Smrg
399206f32fbeSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
399306f32fbeSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
399406f32fbeSmrgfi
399506f32fbeSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
399606f32fbeSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
399706f32fbeSmrgfi
3998ea133fd7Smrg
399906f32fbeSmrg_LT_DECL([], [variables_saved_for_relink], [1],
400006f32fbeSmrg    [Variables whose values should be saved in libtool wrapper scripts and
400106f32fbeSmrg    restored at link time])
400206f32fbeSmrg_LT_DECL([], [need_lib_prefix], [0],
400306f32fbeSmrg    [Do we need the "lib" prefix for modules?])
400406f32fbeSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
400506f32fbeSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
400606f32fbeSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
400706f32fbeSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
400806f32fbeSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
400906f32fbeSmrg    [Is shlibpath searched before the hard-coded library search path?])
401006f32fbeSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
401106f32fbeSmrg_LT_DECL([], [library_names_spec], [1],
401206f32fbeSmrg    [[List of archive names.  First name is the real one, the rest are links.
401306f32fbeSmrg    The last name is the one that the linker finds with -lNAME]])
401406f32fbeSmrg_LT_DECL([], [soname_spec], [1],
401506f32fbeSmrg    [[The coded name of the library, if different from the real name]])
401606f32fbeSmrg_LT_DECL([], [install_override_mode], [1],
401706f32fbeSmrg    [Permission mode override for installation of shared libraries])
401806f32fbeSmrg_LT_DECL([], [postinstall_cmds], [2],
401906f32fbeSmrg    [Command to use after installation of a shared archive])
402006f32fbeSmrg_LT_DECL([], [postuninstall_cmds], [2],
402106f32fbeSmrg    [Command to use after uninstallation of a shared archive])
402206f32fbeSmrg_LT_DECL([], [finish_cmds], [2],
402306f32fbeSmrg    [Commands used to finish a libtool library installation in a directory])
402406f32fbeSmrg_LT_DECL([], [finish_eval], [1],
402506f32fbeSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
402606f32fbeSmrg    not shown]])
402706f32fbeSmrg_LT_DECL([], [hardcode_into_libs], [0],
402806f32fbeSmrg    [Whether we should hardcode library paths into libraries])
402906f32fbeSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
403006f32fbeSmrg    [Compile-time system search path for libraries])
403106f32fbeSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
403206f32fbeSmrg    [Run-time system search path for libraries])
403306f32fbeSmrg])# _LT_SYS_DYNAMIC_LINKER
403425b89263Smrg
403525b89263Smrg
403606f32fbeSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
403706f32fbeSmrg# --------------------------
403806f32fbeSmrg# find a file program which can recognize shared library
403906f32fbeSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
404006f32fbeSmrg[m4_require([_LT_DECL_EGREP])dnl
404106f32fbeSmrgAC_MSG_CHECKING([for $1])
404206f32fbeSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
404306f32fbeSmrg[case $MAGIC_CMD in
404406f32fbeSmrg[[\\/*] |  ?:[\\/]*])
404506f32fbeSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
404625b89263Smrg  ;;
404706f32fbeSmrg*)
404806f32fbeSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
404906f32fbeSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
405006f32fbeSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
405106f32fbeSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
405206f32fbeSmrgdnl not every word.  This closes a longstanding sh security hole.
405306f32fbeSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
405406f32fbeSmrg  for ac_dir in $ac_dummy; do
405506f32fbeSmrg    IFS="$lt_save_ifs"
405606f32fbeSmrg    test -z "$ac_dir" && ac_dir=.
405706f32fbeSmrg    if test -f $ac_dir/$1; then
405806f32fbeSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
405906f32fbeSmrg      if test -n "$file_magic_test_file"; then
406006f32fbeSmrg	case $deplibs_check_method in
406106f32fbeSmrg	"file_magic "*)
406206f32fbeSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
406306f32fbeSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
406406f32fbeSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
406506f32fbeSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
406606f32fbeSmrg	    :
406706f32fbeSmrg	  else
406806f32fbeSmrg	    cat <<_LT_EOF 1>&2
4069ea133fd7Smrg
407006f32fbeSmrg*** Warning: the command libtool uses to detect shared libraries,
407106f32fbeSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
407206f32fbeSmrg*** The result is that libtool may fail to recognize shared libraries
407306f32fbeSmrg*** as such.  This will affect the creation of libtool libraries that
407406f32fbeSmrg*** depend on shared libraries, but programs linked with such libtool
407506f32fbeSmrg*** libraries will work regardless of this problem.  Nevertheless, you
407606f32fbeSmrg*** may want to report the problem to your system manager and/or to
407706f32fbeSmrg*** bug-libtool@gnu.org
4078a253d6aeSmrg
407906f32fbeSmrg_LT_EOF
408006f32fbeSmrg	  fi ;;
408106f32fbeSmrg	esac
408206f32fbeSmrg      fi
408306f32fbeSmrg      break
408406f32fbeSmrg    fi
408506f32fbeSmrg  done
408606f32fbeSmrg  IFS="$lt_save_ifs"
408706f32fbeSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
408825b89263Smrg  ;;
408906f32fbeSmrgesac])
409006f32fbeSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
409106f32fbeSmrgif test -n "$MAGIC_CMD"; then
409206f32fbeSmrg  AC_MSG_RESULT($MAGIC_CMD)
409306f32fbeSmrgelse
409406f32fbeSmrg  AC_MSG_RESULT(no)
409506f32fbeSmrgfi
409606f32fbeSmrg_LT_DECL([], [MAGIC_CMD], [0],
409706f32fbeSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
409806f32fbeSmrg])# _LT_PATH_TOOL_PREFIX
4099a253d6aeSmrg
410006f32fbeSmrg# Old name:
410106f32fbeSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
410206f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
410306f32fbeSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
4104ea133fd7Smrg
4105a253d6aeSmrg
410606f32fbeSmrg# _LT_PATH_MAGIC
410706f32fbeSmrg# --------------
410806f32fbeSmrg# find a file program which can recognize a shared library
410906f32fbeSmrgm4_defun([_LT_PATH_MAGIC],
411006f32fbeSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
411106f32fbeSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
411206f32fbeSmrg  if test -n "$ac_tool_prefix"; then
411306f32fbeSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
411425b89263Smrg  else
411506f32fbeSmrg    MAGIC_CMD=:
411625b89263Smrg  fi
411706f32fbeSmrgfi
411806f32fbeSmrg])# _LT_PATH_MAGIC
4119a253d6aeSmrg
4120a253d6aeSmrg
412106f32fbeSmrg# LT_PATH_LD
412206f32fbeSmrg# ----------
412306f32fbeSmrg# find the pathname to the GNU or non-GNU linker
412406f32fbeSmrgAC_DEFUN([LT_PATH_LD],
412506f32fbeSmrg[AC_REQUIRE([AC_PROG_CC])dnl
412606f32fbeSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
412706f32fbeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
412806f32fbeSmrgm4_require([_LT_DECL_SED])dnl
412906f32fbeSmrgm4_require([_LT_DECL_EGREP])dnl
413006f32fbeSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
413125b89263Smrg
413206f32fbeSmrgAC_ARG_WITH([gnu-ld],
413306f32fbeSmrg    [AS_HELP_STRING([--with-gnu-ld],
413406f32fbeSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
413506f32fbeSmrg    [test "$withval" = no || with_gnu_ld=yes],
413606f32fbeSmrg    [with_gnu_ld=no])dnl
413706f32fbeSmrg
413806f32fbeSmrgac_prog=ld
413906f32fbeSmrgif test "$GCC" = yes; then
414006f32fbeSmrg  # Check if gcc -print-prog-name=ld gives a path.
414106f32fbeSmrg  AC_MSG_CHECKING([for ld used by $CC])
414206f32fbeSmrg  case $host in
414306f32fbeSmrg  *-*-mingw*)
414406f32fbeSmrg    # gcc leaves a trailing carriage return which upsets mingw
414506f32fbeSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
414606f32fbeSmrg  *)
414706f32fbeSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
414825b89263Smrg  esac
414906f32fbeSmrg  case $ac_prog in
415006f32fbeSmrg    # Accept absolute paths.
415106f32fbeSmrg    [[\\/]]* | ?:[[\\/]]*)
415206f32fbeSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
415306f32fbeSmrg      # Canonicalize the pathname of ld
415406f32fbeSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
415506f32fbeSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
415606f32fbeSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
415706f32fbeSmrg      done
415806f32fbeSmrg      test -z "$LD" && LD="$ac_prog"
415906f32fbeSmrg      ;;
416006f32fbeSmrg  "")
416106f32fbeSmrg    # If it fails, then pretend we aren't using GCC.
416206f32fbeSmrg    ac_prog=ld
416306f32fbeSmrg    ;;
416406f32fbeSmrg  *)
416506f32fbeSmrg    # If it is relative, then search for the first ld in PATH.
416606f32fbeSmrg    with_gnu_ld=unknown
416706f32fbeSmrg    ;;
416806f32fbeSmrg  esac
416906f32fbeSmrgelif test "$with_gnu_ld" = yes; then
417006f32fbeSmrg  AC_MSG_CHECKING([for GNU ld])
417106f32fbeSmrgelse
417206f32fbeSmrg  AC_MSG_CHECKING([for non-GNU ld])
417306f32fbeSmrgfi
417406f32fbeSmrgAC_CACHE_VAL(lt_cv_path_LD,
417506f32fbeSmrg[if test -z "$LD"; then
417606f32fbeSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
417706f32fbeSmrg  for ac_dir in $PATH; do
417806f32fbeSmrg    IFS="$lt_save_ifs"
417906f32fbeSmrg    test -z "$ac_dir" && ac_dir=.
418006f32fbeSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
418106f32fbeSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
418206f32fbeSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
418306f32fbeSmrg      # but apparently some variants of GNU ld only accept -v.
418406f32fbeSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
418506f32fbeSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
418606f32fbeSmrg      *GNU* | *'with BFD'*)
418706f32fbeSmrg	test "$with_gnu_ld" != no && break
418825b89263Smrg	;;
418925b89263Smrg      *)
419006f32fbeSmrg	test "$with_gnu_ld" != yes && break
419125b89263Smrg	;;
4192ea133fd7Smrg      esac
419306f32fbeSmrg    fi
419406f32fbeSmrg  done
419506f32fbeSmrg  IFS="$lt_save_ifs"
419606f32fbeSmrgelse
419706f32fbeSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
419806f32fbeSmrgfi])
419906f32fbeSmrgLD="$lt_cv_path_LD"
420006f32fbeSmrgif test -n "$LD"; then
420106f32fbeSmrg  AC_MSG_RESULT($LD)
420206f32fbeSmrgelse
420306f32fbeSmrg  AC_MSG_RESULT(no)
420406f32fbeSmrgfi
420506f32fbeSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
420606f32fbeSmrg_LT_PATH_LD_GNU
420706f32fbeSmrgAC_SUBST([LD])
4208a253d6aeSmrg
420906f32fbeSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
421006f32fbeSmrg])# LT_PATH_LD
4211a253d6aeSmrg
421206f32fbeSmrg# Old names:
421306f32fbeSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
421406f32fbeSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
421506f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
421606f32fbeSmrgdnl AC_DEFUN([AM_PROG_LD], [])
421706f32fbeSmrgdnl AC_DEFUN([AC_PROG_LD], [])
4218a253d6aeSmrg
4219a253d6aeSmrg
422006f32fbeSmrg# _LT_PATH_LD_GNU
422106f32fbeSmrg#- --------------
422206f32fbeSmrgm4_defun([_LT_PATH_LD_GNU],
422306f32fbeSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
422406f32fbeSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
422506f32fbeSmrgcase `$LD -v 2>&1 </dev/null` in
422606f32fbeSmrg*GNU* | *'with BFD'*)
422706f32fbeSmrg  lt_cv_prog_gnu_ld=yes
422825b89263Smrg  ;;
422906f32fbeSmrg*)
423006f32fbeSmrg  lt_cv_prog_gnu_ld=no
423125b89263Smrg  ;;
423206f32fbeSmrgesac])
423306f32fbeSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
423406f32fbeSmrg])# _LT_PATH_LD_GNU
4235a253d6aeSmrg
423606f32fbeSmrg
423706f32fbeSmrg# _LT_CMD_RELOAD
423806f32fbeSmrg# --------------
423906f32fbeSmrg# find reload flag for linker
424006f32fbeSmrg#   -- PORTME Some linkers may need a different reload flag.
424106f32fbeSmrgm4_defun([_LT_CMD_RELOAD],
424206f32fbeSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
424306f32fbeSmrg  lt_cv_ld_reload_flag,
424406f32fbeSmrg  [lt_cv_ld_reload_flag='-r'])
424506f32fbeSmrgreload_flag=$lt_cv_ld_reload_flag
424606f32fbeSmrgcase $reload_flag in
424706f32fbeSmrg"" | " "*) ;;
424806f32fbeSmrg*) reload_flag=" $reload_flag" ;;
424906f32fbeSmrgesac
425006f32fbeSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
425106f32fbeSmrgcase $host_os in
425206f32fbeSmrg  cygwin* | mingw* | pw32* | cegcc*)
425306f32fbeSmrg    if test "$GCC" != yes; then
425406f32fbeSmrg      reload_cmds=false
425506f32fbeSmrg    fi
425606f32fbeSmrg    ;;
425706f32fbeSmrg  darwin*)
425806f32fbeSmrg    if test "$GCC" = yes; then
425906f32fbeSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
426006f32fbeSmrg    else
426106f32fbeSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
426206f32fbeSmrg    fi
426306f32fbeSmrg    ;;
426406f32fbeSmrgesac
426506f32fbeSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
426606f32fbeSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
426706f32fbeSmrg])# _LT_CMD_RELOAD
426806f32fbeSmrg
426906f32fbeSmrg
427006f32fbeSmrg# _LT_CHECK_MAGIC_METHOD
427106f32fbeSmrg# ----------------------
427206f32fbeSmrg# how to check for library dependencies
427306f32fbeSmrg#  -- PORTME fill in with the dynamic library characteristics
427406f32fbeSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
427506f32fbeSmrg[m4_require([_LT_DECL_EGREP])
427606f32fbeSmrgm4_require([_LT_DECL_OBJDUMP])
427706f32fbeSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
427806f32fbeSmrglt_cv_deplibs_check_method,
427906f32fbeSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
428006f32fbeSmrglt_cv_file_magic_test_file=
428106f32fbeSmrglt_cv_deplibs_check_method='unknown'
428206f32fbeSmrg# Need to set the preceding variable on all platforms that support
428306f32fbeSmrg# interlibrary dependencies.
428406f32fbeSmrg# 'none' -- dependencies not supported.
428506f32fbeSmrg# `unknown' -- same as none, but documents that we really don't know.
428606f32fbeSmrg# 'pass_all' -- all dependencies passed with no checks.
428706f32fbeSmrg# 'test_compile' -- check by making test program.
428806f32fbeSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
428906f32fbeSmrg# which responds to the $file_magic_cmd with a given extended regex.
429006f32fbeSmrg# If you have `file' or equivalent on your system and you're not sure
429106f32fbeSmrg# whether `pass_all' will *always* work, you probably want this one.
429206f32fbeSmrg
429306f32fbeSmrgcase $host_os in
429406f32fbeSmrgaix[[4-9]]*)
429506f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
429625b89263Smrg  ;;
4297a253d6aeSmrg
429806f32fbeSmrgbeos*)
429906f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
430025b89263Smrg  ;;
4301a253d6aeSmrg
430206f32fbeSmrgbsdi[[45]]*)
430306f32fbeSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
430406f32fbeSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
430506f32fbeSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
430606f32fbeSmrg  ;;
430706f32fbeSmrg
430806f32fbeSmrgcygwin*)
430906f32fbeSmrg  # func_win32_libid is a shell function defined in ltmain.sh
431006f32fbeSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
431106f32fbeSmrg  lt_cv_file_magic_cmd='func_win32_libid'
431206f32fbeSmrg  ;;
431306f32fbeSmrg
431406f32fbeSmrgmingw* | pw32*)
431506f32fbeSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
431606f32fbeSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
431706f32fbeSmrg  # unless we find 'file', for example because we are cross-compiling.
431806f32fbeSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
431906f32fbeSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
432006f32fbeSmrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
432106f32fbeSmrg    lt_cv_file_magic_cmd='func_win32_libid'
432225b89263Smrg  else
432306f32fbeSmrg    # Keep this pattern in sync with the one in func_win32_libid.
432406f32fbeSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
432506f32fbeSmrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
432625b89263Smrg  fi
432725b89263Smrg  ;;
4328a253d6aeSmrg
432906f32fbeSmrgcegcc*)
433006f32fbeSmrg  # use the weaker test based on 'objdump'. See mingw*.
433106f32fbeSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
433206f32fbeSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
433325b89263Smrg  ;;
4334a253d6aeSmrg
433506f32fbeSmrgdarwin* | rhapsody*)
433606f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
433725b89263Smrg  ;;
4338a253d6aeSmrg
433906f32fbeSmrgfreebsd* | dragonfly*)
434006f32fbeSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
434106f32fbeSmrg    case $host_cpu in
434206f32fbeSmrg    i*86 )
434306f32fbeSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
434406f32fbeSmrg      # Let's accept both of them until this is cleared up.
434506f32fbeSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
434606f32fbeSmrg      lt_cv_file_magic_cmd=/usr/bin/file
434706f32fbeSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
434806f32fbeSmrg      ;;
434906f32fbeSmrg    esac
435006f32fbeSmrg  else
435106f32fbeSmrg    lt_cv_deplibs_check_method=pass_all
435206f32fbeSmrg  fi
435325b89263Smrg  ;;
4354a253d6aeSmrg
435506f32fbeSmrggnu*)
435606f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
435706f32fbeSmrg  ;;
4358a253d6aeSmrg
435906f32fbeSmrghaiku*)
436006f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
436106f32fbeSmrg  ;;
4362a253d6aeSmrg
436306f32fbeSmrghpux10.20* | hpux11*)
436406f32fbeSmrg  lt_cv_file_magic_cmd=/usr/bin/file
436506f32fbeSmrg  case $host_cpu in
436606f32fbeSmrg  ia64*)
436706f32fbeSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
436806f32fbeSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
436906f32fbeSmrg    ;;
437006f32fbeSmrg  hppa*64*)
437106f32fbeSmrg    [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]']
437206f32fbeSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
437306f32fbeSmrg    ;;
437406f32fbeSmrg  *)
437506f32fbeSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
437606f32fbeSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
437706f32fbeSmrg    ;;
437806f32fbeSmrg  esac
437906f32fbeSmrg  ;;
4380a253d6aeSmrg
438106f32fbeSmrginterix[[3-9]]*)
438206f32fbeSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
438306f32fbeSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
438425b89263Smrg  ;;
4385a253d6aeSmrg
438606f32fbeSmrgirix5* | irix6* | nonstopux*)
438706f32fbeSmrg  case $LD in
438806f32fbeSmrg  *-32|*"-32 ") libmagic=32-bit;;
438906f32fbeSmrg  *-n32|*"-n32 ") libmagic=N32;;
439006f32fbeSmrg  *-64|*"-64 ") libmagic=64-bit;;
439106f32fbeSmrg  *) libmagic=never-match;;
439206f32fbeSmrg  esac
439306f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
439406f32fbeSmrg  ;;
439525b89263Smrg
439606f32fbeSmrg# This must be Linux ELF.
439706f32fbeSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
439806f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
439925b89263Smrg  ;;
440025b89263Smrg
440106f32fbeSmrgnetbsd*)
440206f32fbeSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
440306f32fbeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
440406f32fbeSmrg  else
440506f32fbeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
440606f32fbeSmrg  fi
440706f32fbeSmrg  ;;
4408a253d6aeSmrg
440906f32fbeSmrgnewos6*)
441006f32fbeSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
441106f32fbeSmrg  lt_cv_file_magic_cmd=/usr/bin/file
441206f32fbeSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
441306f32fbeSmrg  ;;
4414a253d6aeSmrg
441506f32fbeSmrg*nto* | *qnx*)
441606f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
441706f32fbeSmrg  ;;
441806f32fbeSmrg
441906f32fbeSmrgopenbsd*)
442006f32fbeSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
442106f32fbeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
442225b89263Smrg  else
442306f32fbeSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
442425b89263Smrg  fi
442506f32fbeSmrg  ;;
4426a253d6aeSmrg
442706f32fbeSmrgosf3* | osf4* | osf5*)
442806f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
442906f32fbeSmrg  ;;
4430a253d6aeSmrg
443106f32fbeSmrgrdos*)
443206f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
443306f32fbeSmrg  ;;
4434a253d6aeSmrg
443506f32fbeSmrgsolaris*)
443606f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
443706f32fbeSmrg  ;;
4438a253d6aeSmrg
443906f32fbeSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
444006f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
444106f32fbeSmrg  ;;
444206f32fbeSmrg
444306f32fbeSmrgsysv4 | sysv4.3*)
444406f32fbeSmrg  case $host_vendor in
444506f32fbeSmrg  motorola)
444606f32fbeSmrg    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]]'
444706f32fbeSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
444825b89263Smrg    ;;
444906f32fbeSmrg  ncr)
445006f32fbeSmrg    lt_cv_deplibs_check_method=pass_all
445106f32fbeSmrg    ;;
445206f32fbeSmrg  sequent)
445306f32fbeSmrg    lt_cv_file_magic_cmd='/bin/file'
445406f32fbeSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
445506f32fbeSmrg    ;;
445606f32fbeSmrg  sni)
445706f32fbeSmrg    lt_cv_file_magic_cmd='/bin/file'
445806f32fbeSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
445906f32fbeSmrg    lt_cv_file_magic_test_file=/lib/libc.so
446006f32fbeSmrg    ;;
446106f32fbeSmrg  siemens)
446206f32fbeSmrg    lt_cv_deplibs_check_method=pass_all
446306f32fbeSmrg    ;;
446406f32fbeSmrg  pc)
446506f32fbeSmrg    lt_cv_deplibs_check_method=pass_all
446625b89263Smrg    ;;
446725b89263Smrg  esac
446825b89263Smrg  ;;
446925b89263Smrg
447006f32fbeSmrgtpf*)
447106f32fbeSmrg  lt_cv_deplibs_check_method=pass_all
447206f32fbeSmrg  ;;
447325b89263Smrgesac
447406f32fbeSmrg])
447506f32fbeSmrg
447606f32fbeSmrgfile_magic_glob=
447706f32fbeSmrgwant_nocaseglob=no
447806f32fbeSmrgif test "$build" = "$host"; then
447906f32fbeSmrg  case $host_os in
448006f32fbeSmrg  mingw* | pw32*)
448106f32fbeSmrg    if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then
448206f32fbeSmrg      want_nocaseglob=yes
448325b89263Smrg    else
448406f32fbeSmrg      file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"`
448525b89263Smrg    fi
448625b89263Smrg    ;;
448706f32fbeSmrg  esac
448806f32fbeSmrgfi
4489a253d6aeSmrg
449006f32fbeSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
449106f32fbeSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
449206f32fbeSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
4493a253d6aeSmrg
449425b89263Smrg_LT_DECL([], [deplibs_check_method], [1],
449525b89263Smrg    [Method to check whether dependent libraries are shared objects])
449625b89263Smrg_LT_DECL([], [file_magic_cmd], [1],
449706f32fbeSmrg    [Command to use when deplibs_check_method = "file_magic"])
449806f32fbeSmrg_LT_DECL([], [file_magic_glob], [1],
449906f32fbeSmrg    [How to find potential files when deplibs_check_method = "file_magic"])
450006f32fbeSmrg_LT_DECL([], [want_nocaseglob], [1],
450106f32fbeSmrg    [Find potential files using nocaseglob when deplibs_check_method = "file_magic"])
450225b89263Smrg])# _LT_CHECK_MAGIC_METHOD
4503a253d6aeSmrg
4504a253d6aeSmrg
450525b89263Smrg# LT_PATH_NM
450625b89263Smrg# ----------
450725b89263Smrg# find the pathname to a BSD- or MS-compatible name lister
450825b89263SmrgAC_DEFUN([LT_PATH_NM],
450925b89263Smrg[AC_REQUIRE([AC_PROG_CC])dnl
451025b89263SmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
451125b89263Smrg[if test -n "$NM"; then
451225b89263Smrg  # Let the user override the test.
451325b89263Smrg  lt_cv_path_NM="$NM"
4514ea133fd7Smrgelse
451525b89263Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
451625b89263Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
451725b89263Smrg    lt_nm_to_check="$lt_nm_to_check nm"
451825b89263Smrg  fi
451925b89263Smrg  for lt_tmp_nm in $lt_nm_to_check; do
452025b89263Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
452125b89263Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
452225b89263Smrg      IFS="$lt_save_ifs"
452325b89263Smrg      test -z "$ac_dir" && ac_dir=.
452425b89263Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
452525b89263Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
452625b89263Smrg	# Check to see if the nm accepts a BSD-compat flag.
452725b89263Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
452825b89263Smrg	#   nm: unknown option "B" ignored
452925b89263Smrg	# Tru64's nm complains that /dev/null is an invalid object file
453025b89263Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
453125b89263Smrg	*/dev/null* | *'Invalid file or object type'*)
453225b89263Smrg	  lt_cv_path_NM="$tmp_nm -B"
453325b89263Smrg	  break
453425b89263Smrg	  ;;
453525b89263Smrg	*)
453625b89263Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
453725b89263Smrg	  */dev/null*)
453825b89263Smrg	    lt_cv_path_NM="$tmp_nm -p"
453925b89263Smrg	    break
454025b89263Smrg	    ;;
454125b89263Smrg	  *)
454225b89263Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
454325b89263Smrg	    continue # so that we can try to find one that supports BSD flags
454425b89263Smrg	    ;;
454525b89263Smrg	  esac
454625b89263Smrg	  ;;
454725b89263Smrg	esac
454825b89263Smrg      fi
454925b89263Smrg    done
455025b89263Smrg    IFS="$lt_save_ifs"
455125b89263Smrg  done
455225b89263Smrg  : ${lt_cv_path_NM=no}
455325b89263Smrgfi])
455425b89263Smrgif test "$lt_cv_path_NM" != "no"; then
455525b89263Smrg  NM="$lt_cv_path_NM"
455625b89263Smrgelse
455725b89263Smrg  # Didn't find any BSD compatible name lister, look for dumpbin.
455825b89263Smrg  if test -n "$DUMPBIN"; then :
455925b89263Smrg    # Let the user override the test.
456025b89263Smrg  else
456125b89263Smrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
456225b89263Smrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
456325b89263Smrg    *COFF*)
456425b89263Smrg      DUMPBIN="$DUMPBIN -symbols"
456525b89263Smrg      ;;
456625b89263Smrg    *)
456725b89263Smrg      DUMPBIN=:
456825b89263Smrg      ;;
456925b89263Smrg    esac
457025b89263Smrg  fi
457125b89263Smrg  AC_SUBST([DUMPBIN])
457225b89263Smrg  if test "$DUMPBIN" != ":"; then
457325b89263Smrg    NM="$DUMPBIN"
457425b89263Smrg  fi
4575ea133fd7Smrgfi
457625b89263Smrgtest -z "$NM" && NM=nm
457725b89263SmrgAC_SUBST([NM])
457825b89263Smrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
457925b89263Smrg
458025b89263SmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
458125b89263Smrg  [lt_cv_nm_interface="BSD nm"
458225b89263Smrg  echo "int some_variable = 0;" > conftest.$ac_ext
458325b89263Smrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
458425b89263Smrg  (eval "$ac_compile" 2>conftest.err)
458525b89263Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
458625b89263Smrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
458725b89263Smrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
458825b89263Smrg  cat conftest.err >&AS_MESSAGE_LOG_FD
458925b89263Smrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
459025b89263Smrg  cat conftest.out >&AS_MESSAGE_LOG_FD
459125b89263Smrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
459225b89263Smrg    lt_cv_nm_interface="MS dumpbin"
459325b89263Smrg  fi
459425b89263Smrg  rm -f conftest*])
459525b89263Smrg])# LT_PATH_NM
4596a253d6aeSmrg
459725b89263Smrg# Old names:
459825b89263SmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
459925b89263SmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
4600ea133fd7Smrgdnl aclocal-1.4 backwards compatibility:
460125b89263Smrgdnl AC_DEFUN([AM_PROG_NM], [])
460225b89263Smrgdnl AC_DEFUN([AC_PROG_NM], [])
4603a253d6aeSmrg
460406f32fbeSmrg# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
460506f32fbeSmrg# --------------------------------
460606f32fbeSmrg# how to determine the name of the shared library
460706f32fbeSmrg# associated with a specific link library.
460806f32fbeSmrg#  -- PORTME fill in with the dynamic library characteristics
460906f32fbeSmrgm4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB],
461006f32fbeSmrg[m4_require([_LT_DECL_EGREP])
461106f32fbeSmrgm4_require([_LT_DECL_OBJDUMP])
461206f32fbeSmrgm4_require([_LT_DECL_DLLTOOL])
461306f32fbeSmrgAC_CACHE_CHECK([how to associate runtime and link libraries],
461406f32fbeSmrglt_cv_sharedlib_from_linklib_cmd,
461506f32fbeSmrg[lt_cv_sharedlib_from_linklib_cmd='unknown'
461606f32fbeSmrg
461706f32fbeSmrgcase $host_os in
461806f32fbeSmrgcygwin* | mingw* | pw32* | cegcc*)
461906f32fbeSmrg  # two different shell functions defined in ltmain.sh
462006f32fbeSmrg  # decide which to use based on capabilities of $DLLTOOL
462106f32fbeSmrg  case `$DLLTOOL --help 2>&1` in
462206f32fbeSmrg  *--identify-strict*)
462306f32fbeSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib
462406f32fbeSmrg    ;;
462506f32fbeSmrg  *)
462606f32fbeSmrg    lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback
462706f32fbeSmrg    ;;
462806f32fbeSmrg  esac
462906f32fbeSmrg  ;;
463006f32fbeSmrg*)
463106f32fbeSmrg  # fallback: assume linklib IS sharedlib
463206f32fbeSmrg  lt_cv_sharedlib_from_linklib_cmd="$ECHO"
463306f32fbeSmrg  ;;
463406f32fbeSmrgesac
463506f32fbeSmrg])
463606f32fbeSmrgsharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd
463706f32fbeSmrgtest -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO
463806f32fbeSmrg
463906f32fbeSmrg_LT_DECL([], [sharedlib_from_linklib_cmd], [1],
464006f32fbeSmrg    [Command to associate shared and link libraries])
464106f32fbeSmrg])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB
464206f32fbeSmrg
464306f32fbeSmrg
464406f32fbeSmrg# _LT_PATH_MANIFEST_TOOL
464506f32fbeSmrg# ----------------------
464606f32fbeSmrg# locate the manifest tool
464706f32fbeSmrgm4_defun([_LT_PATH_MANIFEST_TOOL],
464806f32fbeSmrg[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :)
464906f32fbeSmrgtest -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt
465006f32fbeSmrgAC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool],
465106f32fbeSmrg  [lt_cv_path_mainfest_tool=no
465206f32fbeSmrg  echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD
465306f32fbeSmrg  $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out
465406f32fbeSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
465506f32fbeSmrg  if $GREP 'Manifest Tool' conftest.out > /dev/null; then
465606f32fbeSmrg    lt_cv_path_mainfest_tool=yes
465706f32fbeSmrg  fi
465806f32fbeSmrg  rm -f conftest*])
465906f32fbeSmrgif test "x$lt_cv_path_mainfest_tool" != xyes; then
466006f32fbeSmrg  MANIFEST_TOOL=:
466106f32fbeSmrgfi
466206f32fbeSmrg_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl
466306f32fbeSmrg])# _LT_PATH_MANIFEST_TOOL
466406f32fbeSmrg
4665a253d6aeSmrg
466625b89263Smrg# LT_LIB_M
466725b89263Smrg# --------
466825b89263Smrg# check for math library
466925b89263SmrgAC_DEFUN([LT_LIB_M],
467025b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
467125b89263SmrgLIBM=
467225b89263Smrgcase $host in
467325b89263Smrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
467425b89263Smrg  # These system don't have libm, or don't need it
467525b89263Smrg  ;;
467625b89263Smrg*-ncr-sysv4.3*)
467725b89263Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
467825b89263Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
467925b89263Smrg  ;;
468025b89263Smrg*)
468125b89263Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
468225b89263Smrg  ;;
468325b89263Smrgesac
468425b89263SmrgAC_SUBST([LIBM])
468525b89263Smrg])# LT_LIB_M
468625b89263Smrg
468725b89263Smrg# Old name:
468825b89263SmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
468925b89263Smrgdnl aclocal-1.4 backwards compatibility:
469025b89263Smrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
4691ea133fd7Smrg
4692a253d6aeSmrg
469325b89263Smrg# _LT_COMPILER_NO_RTTI([TAGNAME])
469425b89263Smrg# -------------------------------
469525b89263Smrgm4_defun([_LT_COMPILER_NO_RTTI],
469625b89263Smrg[m4_require([_LT_TAG_COMPILER])dnl
4697a253d6aeSmrg
469825b89263Smrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4699ea133fd7Smrg
470025b89263Smrgif test "$GCC" = yes; then
470125b89263Smrg  case $cc_basename in
470225b89263Smrg  nvcc*)
470325b89263Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
470425b89263Smrg  *)
470525b89263Smrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
470625b89263Smrg  esac
4707ea133fd7Smrg
470825b89263Smrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
470925b89263Smrg    lt_cv_prog_compiler_rtti_exceptions,
471025b89263Smrg    [-fno-rtti -fno-exceptions], [],
471125b89263Smrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
471225b89263Smrgfi
471325b89263Smrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
471425b89263Smrg	[Compiler flag to turn off builtin functions])
471525b89263Smrg])# _LT_COMPILER_NO_RTTI
4716ea133fd7Smrg
4717ea133fd7Smrg
471825b89263Smrg# _LT_CMD_GLOBAL_SYMBOLS
471925b89263Smrg# ----------------------
472025b89263Smrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
472125b89263Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
472225b89263SmrgAC_REQUIRE([AC_PROG_CC])dnl
472325b89263SmrgAC_REQUIRE([AC_PROG_AWK])dnl
472425b89263SmrgAC_REQUIRE([LT_PATH_NM])dnl
472525b89263SmrgAC_REQUIRE([LT_PATH_LD])dnl
472625b89263Smrgm4_require([_LT_DECL_SED])dnl
472725b89263Smrgm4_require([_LT_DECL_EGREP])dnl
472825b89263Smrgm4_require([_LT_TAG_COMPILER])dnl
4729ea133fd7Smrg
473025b89263Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
473125b89263SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
473225b89263SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
473325b89263Smrg[
473425b89263Smrg# These are sane defaults that work on at least a few old systems.
473525b89263Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4736a253d6aeSmrg
473725b89263Smrg# Character class describing NM global symbol codes.
473825b89263Smrgsymcode='[[BCDEGRST]]'
4739a253d6aeSmrg
474025b89263Smrg# Regexp to match symbols that can be accessed directly from C.
474125b89263Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4742a253d6aeSmrg
474325b89263Smrg# Define system-specific variables.
474425b89263Smrgcase $host_os in
474525b89263Smrgaix*)
474625b89263Smrg  symcode='[[BCDT]]'
474725b89263Smrg  ;;
474825b89263Smrgcygwin* | mingw* | pw32* | cegcc*)
474925b89263Smrg  symcode='[[ABCDGISTW]]'
475025b89263Smrg  ;;
475125b89263Smrghpux*)
475225b89263Smrg  if test "$host_cpu" = ia64; then
475325b89263Smrg    symcode='[[ABCDEGRST]]'
475425b89263Smrg  fi
475525b89263Smrg  ;;
475625b89263Smrgirix* | nonstopux*)
475725b89263Smrg  symcode='[[BCDEGRST]]'
475825b89263Smrg  ;;
475925b89263Smrgosf*)
476025b89263Smrg  symcode='[[BCDEGQRST]]'
476125b89263Smrg  ;;
476225b89263Smrgsolaris*)
476325b89263Smrg  symcode='[[BDRT]]'
476425b89263Smrg  ;;
476525b89263Smrgsco3.2v5*)
476625b89263Smrg  symcode='[[DT]]'
476725b89263Smrg  ;;
476825b89263Smrgsysv4.2uw2*)
476925b89263Smrg  symcode='[[DT]]'
477025b89263Smrg  ;;
477125b89263Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
477225b89263Smrg  symcode='[[ABDT]]'
477325b89263Smrg  ;;
477425b89263Smrgsysv4)
477525b89263Smrg  symcode='[[DFNSTU]]'
477625b89263Smrg  ;;
477725b89263Smrgesac
4778a253d6aeSmrg
477925b89263Smrg# If we're using GNU nm, then use its standard symbol codes.
478025b89263Smrgcase `$NM -V 2>&1` in
478125b89263Smrg*GNU* | *'with BFD'*)
478225b89263Smrg  symcode='[[ABCDGIRSTW]]' ;;
478325b89263Smrgesac
4784a253d6aeSmrg
478525b89263Smrg# Transform an extracted symbol line into a proper C declaration.
478625b89263Smrg# Some systems (esp. on ia64) link data and code symbols differently,
478725b89263Smrg# so use this general approach.
478825b89263Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4789a253d6aeSmrg
479025b89263Smrg# Transform an extracted symbol line into symbol name and symbol address
479106f32fbeSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
479206f32fbeSmrglt_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'"
4793a253d6aeSmrg
479425b89263Smrg# Handle CRLF in mingw tool chain
479525b89263Smrgopt_cr=
479625b89263Smrgcase $build_os in
479725b89263Smrgmingw*)
479825b89263Smrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
479925b89263Smrg  ;;
480025b89263Smrgesac
4801ea133fd7Smrg
480225b89263Smrg# Try without a prefix underscore, then with it.
480325b89263Smrgfor ac_symprfx in "" "_"; do
4804a253d6aeSmrg
480525b89263Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
480625b89263Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4807a253d6aeSmrg
480825b89263Smrg  # Write the raw and C identifiers.
480925b89263Smrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
481025b89263Smrg    # Fake it for dumpbin and say T for any non-static function
481125b89263Smrg    # and D for any global variable.
481225b89263Smrg    # Also find C++ and __fastcall symbols from MSVC++,
481325b89263Smrg    # which start with @ or ?.
481425b89263Smrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
481525b89263Smrg"     {last_section=section; section=\$ 3};"\
481625b89263Smrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
481725b89263Smrg"     \$ 0!~/External *\|/{next};"\
481825b89263Smrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
481925b89263Smrg"     {if(hide[section]) next};"\
482025b89263Smrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
482125b89263Smrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
482225b89263Smrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
482325b89263Smrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
482425b89263Smrg"     ' prfx=^$ac_symprfx]"
482525b89263Smrg  else
482625b89263Smrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
482725b89263Smrg  fi
482806f32fbeSmrg  lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'"
4829a253d6aeSmrg
483025b89263Smrg  # Check to see that the pipe works correctly.
483125b89263Smrg  pipe_works=no
4832ea133fd7Smrg
483325b89263Smrg  rm -f conftest*
483425b89263Smrg  cat > conftest.$ac_ext <<_LT_EOF
483525b89263Smrg#ifdef __cplusplus
483625b89263Smrgextern "C" {
483725b89263Smrg#endif
483825b89263Smrgchar nm_test_var;
483925b89263Smrgvoid nm_test_func(void);
484025b89263Smrgvoid nm_test_func(void){}
484125b89263Smrg#ifdef __cplusplus
484225b89263Smrg}
484325b89263Smrg#endif
484425b89263Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
484525b89263Smrg_LT_EOF
4846a253d6aeSmrg
484725b89263Smrg  if AC_TRY_EVAL(ac_compile); then
484825b89263Smrg    # Now try to grab the symbols.
484925b89263Smrg    nlist=conftest.nm
485025b89263Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
485125b89263Smrg      # Try sorting and uniquifying the output.
485225b89263Smrg      if sort "$nlist" | uniq > "$nlist"T; then
485325b89263Smrg	mv -f "$nlist"T "$nlist"
485425b89263Smrg      else
485525b89263Smrg	rm -f "$nlist"T
485625b89263Smrg      fi
4857a253d6aeSmrg
485825b89263Smrg      # Make sure that we snagged all the symbols we need.
485925b89263Smrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
486025b89263Smrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
486125b89263Smrg	  cat <<_LT_EOF > conftest.$ac_ext
486206f32fbeSmrg/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests.  */
486306f32fbeSmrg#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE)
486406f32fbeSmrg/* DATA imports from DLLs on WIN32 con't be const, because runtime
486506f32fbeSmrg   relocations are performed -- see ld's documentation on pseudo-relocs.  */
486606f32fbeSmrg# define LT@&t@_DLSYM_CONST
486706f32fbeSmrg#elif defined(__osf__)
486806f32fbeSmrg/* This system does not cope well with relocations in const data.  */
486906f32fbeSmrg# define LT@&t@_DLSYM_CONST
487006f32fbeSmrg#else
487106f32fbeSmrg# define LT@&t@_DLSYM_CONST const
487206f32fbeSmrg#endif
487306f32fbeSmrg
487425b89263Smrg#ifdef __cplusplus
487525b89263Smrgextern "C" {
487625b89263Smrg#endif
4877ea133fd7Smrg
487825b89263Smrg_LT_EOF
487925b89263Smrg	  # Now generate the symbol file.
488025b89263Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
4881ea133fd7Smrg
488225b89263Smrg	  cat <<_LT_EOF >> conftest.$ac_ext
4883a253d6aeSmrg
488425b89263Smrg/* The mapping between symbol names and symbols.  */
488506f32fbeSmrgLT@&t@_DLSYM_CONST struct {
488625b89263Smrg  const char *name;
488725b89263Smrg  void       *address;
488825b89263Smrg}
488925b89263Smrglt__PROGRAM__LTX_preloaded_symbols[[]] =
489025b89263Smrg{
489125b89263Smrg  { "@PROGRAM@", (void *) 0 },
489225b89263Smrg_LT_EOF
489325b89263Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
489425b89263Smrg	  cat <<\_LT_EOF >> conftest.$ac_ext
489525b89263Smrg  {0, (void *) 0}
489625b89263Smrg};
4897ea133fd7Smrg
489825b89263Smrg/* This works around a problem in FreeBSD linker */
489925b89263Smrg#ifdef FREEBSD_WORKAROUND
490025b89263Smrgstatic const void *lt_preloaded_setup() {
490125b89263Smrg  return lt__PROGRAM__LTX_preloaded_symbols;
490225b89263Smrg}
490325b89263Smrg#endif
4904a253d6aeSmrg
490525b89263Smrg#ifdef __cplusplus
490625b89263Smrg}
490725b89263Smrg#endif
490825b89263Smrg_LT_EOF
490925b89263Smrg	  # Now try linking the two files.
491025b89263Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
491106f32fbeSmrg	  lt_globsym_save_LIBS=$LIBS
491206f32fbeSmrg	  lt_globsym_save_CFLAGS=$CFLAGS
491325b89263Smrg	  LIBS="conftstm.$ac_objext"
491425b89263Smrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
491525b89263Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
491625b89263Smrg	    pipe_works=yes
491725b89263Smrg	  fi
491806f32fbeSmrg	  LIBS=$lt_globsym_save_LIBS
491906f32fbeSmrg	  CFLAGS=$lt_globsym_save_CFLAGS
4920ea133fd7Smrg	else
492125b89263Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4922ea133fd7Smrg	fi
492325b89263Smrg      else
492425b89263Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
492525b89263Smrg      fi
492625b89263Smrg    else
492725b89263Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
492825b89263Smrg    fi
492925b89263Smrg  else
493025b89263Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
493125b89263Smrg    cat conftest.$ac_ext >&5
493225b89263Smrg  fi
493325b89263Smrg  rm -rf conftest* conftst*
4934a253d6aeSmrg
493525b89263Smrg  # Do not use the global_symbol_pipe unless it works.
493625b89263Smrg  if test "$pipe_works" = yes; then
493725b89263Smrg    break
493825b89263Smrg  else
493925b89263Smrg    lt_cv_sys_global_symbol_pipe=
494025b89263Smrg  fi
494125b89263Smrgdone
494225b89263Smrg])
494325b89263Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
494425b89263Smrg  lt_cv_sys_global_symbol_to_cdecl=
494525b89263Smrgfi
494625b89263Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
494725b89263Smrg  AC_MSG_RESULT(failed)
494825b89263Smrgelse
494925b89263Smrg  AC_MSG_RESULT(ok)
495025b89263Smrgfi
4951a253d6aeSmrg
495206f32fbeSmrg# Response file support.
495306f32fbeSmrgif test "$lt_cv_nm_interface" = "MS dumpbin"; then
495406f32fbeSmrg  nm_file_list_spec='@'
495506f32fbeSmrgelif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then
495606f32fbeSmrg  nm_file_list_spec='@'
495706f32fbeSmrgfi
495806f32fbeSmrg
495925b89263Smrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
496025b89263Smrg    [Take the output of nm and produce a listing of raw symbols and C names])
496125b89263Smrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
496225b89263Smrg    [Transform the output of nm in a proper C declaration])
496325b89263Smrg_LT_DECL([global_symbol_to_c_name_address],
496425b89263Smrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
496525b89263Smrg    [Transform the output of nm in a C name address pair])
496625b89263Smrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
496725b89263Smrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
496825b89263Smrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
496906f32fbeSmrg_LT_DECL([], [nm_file_list_spec], [1],
497006f32fbeSmrg    [Specify filename containing input files for $NM])
497125b89263Smrg]) # _LT_CMD_GLOBAL_SYMBOLS
4972a253d6aeSmrg
4973a253d6aeSmrg
497425b89263Smrg# _LT_COMPILER_PIC([TAGNAME])
497525b89263Smrg# ---------------------------
497625b89263Smrgm4_defun([_LT_COMPILER_PIC],
497725b89263Smrg[m4_require([_LT_TAG_COMPILER])dnl
497825b89263Smrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
497925b89263Smrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
498025b89263Smrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
4981a253d6aeSmrg
498225b89263Smrgm4_if([$1], [CXX], [
498325b89263Smrg  # C++ specific cases for pic, static, wl, etc.
498425b89263Smrg  if test "$GXX" = yes; then
498525b89263Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
498625b89263Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
4987a253d6aeSmrg
498825b89263Smrg    case $host_os in
498925b89263Smrg    aix*)
499025b89263Smrg      # All AIX code is PIC.
499125b89263Smrg      if test "$host_cpu" = ia64; then
499225b89263Smrg	# AIX 5 now supports IA64 processor
499325b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
499425b89263Smrg      fi
499525b89263Smrg      ;;
4996ea133fd7Smrg
499725b89263Smrg    amigaos*)
499825b89263Smrg      case $host_cpu in
499925b89263Smrg      powerpc)
500025b89263Smrg            # see comment about AmigaOS4 .so support
500125b89263Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5002ea133fd7Smrg        ;;
500325b89263Smrg      m68k)
500425b89263Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
500525b89263Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
500625b89263Smrg            # like `-m68040'.
500725b89263Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5008ea133fd7Smrg        ;;
500925b89263Smrg      esac
501025b89263Smrg      ;;
5011a253d6aeSmrg
501225b89263Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
501325b89263Smrg      # PIC is the default for these OSes.
501425b89263Smrg      ;;
501525b89263Smrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
501625b89263Smrg      # This hack is so that the source file can tell whether it is being
501725b89263Smrg      # built for inclusion in a dll (and should export symbols for example).
501825b89263Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
501925b89263Smrg      # (--disable-auto-import) libraries
502025b89263Smrg      m4_if([$1], [GCJ], [],
502125b89263Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
502225b89263Smrg      ;;
502325b89263Smrg    darwin* | rhapsody*)
502425b89263Smrg      # PIC is the default on this platform
502525b89263Smrg      # Common symbols not allowed in MH_DYLIB files
502625b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
502725b89263Smrg      ;;
502825b89263Smrg    *djgpp*)
502925b89263Smrg      # DJGPP does not support shared libraries at all
503025b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
503125b89263Smrg      ;;
503225b89263Smrg    haiku*)
503325b89263Smrg      # PIC is the default for Haiku.
503425b89263Smrg      # The "-static" flag exists, but is broken.
503525b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
503625b89263Smrg      ;;
503725b89263Smrg    interix[[3-9]]*)
503825b89263Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
503925b89263Smrg      # Instead, we relocate shared libraries at runtime.
504025b89263Smrg      ;;
504125b89263Smrg    sysv4*MP*)
504225b89263Smrg      if test -d /usr/nec; then
504325b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
504425b89263Smrg      fi
504525b89263Smrg      ;;
504625b89263Smrg    hpux*)
504725b89263Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
504825b89263Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
504925b89263Smrg      # sets the default TLS model and affects inlining.
505025b89263Smrg      case $host_cpu in
505125b89263Smrg      hppa*64*)
5052ea133fd7Smrg	;;
505325b89263Smrg      *)
505425b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
505525b89263Smrg	;;
505625b89263Smrg      esac
505725b89263Smrg      ;;
505825b89263Smrg    *qnx* | *nto*)
505925b89263Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
506025b89263Smrg      # it will coredump.
506125b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
506225b89263Smrg      ;;
506325b89263Smrg    *)
506425b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
506525b89263Smrg      ;;
506625b89263Smrg    esac
506725b89263Smrg  else
506825b89263Smrg    case $host_os in
506925b89263Smrg      aix[[4-9]]*)
507025b89263Smrg	# All AIX code is PIC.
507125b89263Smrg	if test "$host_cpu" = ia64; then
507225b89263Smrg	  # AIX 5 now supports IA64 processor
507325b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
507425b89263Smrg	else
507525b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
507625b89263Smrg	fi
507725b89263Smrg	;;
507825b89263Smrg      chorus*)
507925b89263Smrg	case $cc_basename in
508025b89263Smrg	cxch68*)
508125b89263Smrg	  # Green Hills C++ Compiler
508225b89263Smrg	  # _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"
508325b89263Smrg	  ;;
508425b89263Smrg	esac
508525b89263Smrg	;;
508606f32fbeSmrg      mingw* | cygwin* | os2* | pw32* | cegcc*)
508706f32fbeSmrg	# This hack is so that the source file can tell whether it is being
508806f32fbeSmrg	# built for inclusion in a dll (and should export symbols for example).
508906f32fbeSmrg	m4_if([$1], [GCJ], [],
509006f32fbeSmrg	  [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
509106f32fbeSmrg	;;
509225b89263Smrg      dgux*)
509325b89263Smrg	case $cc_basename in
509425b89263Smrg	  ec++*)
509525b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5096ea133fd7Smrg	    ;;
509725b89263Smrg	  ghcx*)
509825b89263Smrg	    # Green Hills C++ Compiler
509925b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5100ea133fd7Smrg	    ;;
510125b89263Smrg	  *)
5102ea133fd7Smrg	    ;;
510325b89263Smrg	esac
510425b89263Smrg	;;
510525b89263Smrg      freebsd* | dragonfly*)
510625b89263Smrg	# FreeBSD uses GNU C++
510725b89263Smrg	;;
510825b89263Smrg      hpux9* | hpux10* | hpux11*)
510925b89263Smrg	case $cc_basename in
511025b89263Smrg	  CC*)
511125b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
511225b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
511325b89263Smrg	    if test "$host_cpu" != ia64; then
511425b89263Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
511525b89263Smrg	    fi
5116ea133fd7Smrg	    ;;
511725b89263Smrg	  aCC*)
511825b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
511925b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
512025b89263Smrg	    case $host_cpu in
512125b89263Smrg	    hppa*64*|ia64*)
512225b89263Smrg	      # +Z the default
5123ea133fd7Smrg	      ;;
512425b89263Smrg	    *)
512525b89263Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5126ea133fd7Smrg	      ;;
5127ea133fd7Smrg	    esac
512825b89263Smrg	    ;;
512925b89263Smrg	  *)
513025b89263Smrg	    ;;
513125b89263Smrg	esac
513225b89263Smrg	;;
513325b89263Smrg      interix*)
513425b89263Smrg	# This is c89, which is MS Visual C++ (no shared libs)
513525b89263Smrg	# Anyone wants to do a port?
513625b89263Smrg	;;
513725b89263Smrg      irix5* | irix6* | nonstopux*)
513825b89263Smrg	case $cc_basename in
513925b89263Smrg	  CC*)
514025b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
514125b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
514225b89263Smrg	    # CC pic flag -KPIC is the default.
514325b89263Smrg	    ;;
514425b89263Smrg	  *)
514525b89263Smrg	    ;;
514625b89263Smrg	esac
514725b89263Smrg	;;
514825b89263Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
514925b89263Smrg	case $cc_basename in
515025b89263Smrg	  KCC*)
515125b89263Smrg	    # KAI C++ Compiler
515225b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
515325b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
515425b89263Smrg	    ;;
515525b89263Smrg	  ecpc* )
515625b89263Smrg	    # old Intel C++ for x86_64 which still supported -KPIC.
515725b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
515825b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
515925b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
516025b89263Smrg	    ;;
516125b89263Smrg	  icpc* )
516225b89263Smrg	    # Intel C++, used to be incompatible with GCC.
516325b89263Smrg	    # ICC 10 doesn't accept -KPIC any more.
516425b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
516525b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
516625b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
516725b89263Smrg	    ;;
516825b89263Smrg	  pgCC* | pgcpp*)
516925b89263Smrg	    # Portland Group C++ compiler
517025b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
517125b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
517225b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
517325b89263Smrg	    ;;
5174ea133fd7Smrg	  cxx*)
5175ea133fd7Smrg	    # Compaq C++
517625b89263Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
517725b89263Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
517825b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
517925b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5180ea133fd7Smrg	    ;;
518125b89263Smrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
518225b89263Smrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
518325b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
518425b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
518525b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
5186ea133fd7Smrg	    ;;
5187ea133fd7Smrg	  *)
5188ea133fd7Smrg	    case `$CC -V 2>&1 | sed 5q` in
5189ea133fd7Smrg	    *Sun\ C*)
5190ea133fd7Smrg	      # Sun C++ 5.9
519125b89263Smrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
519225b89263Smrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
519325b89263Smrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5194ea133fd7Smrg	      ;;
5195ea133fd7Smrg	    esac
5196ea133fd7Smrg	    ;;
5197ea133fd7Smrg	esac
5198ea133fd7Smrg	;;
519925b89263Smrg      lynxos*)
520025b89263Smrg	;;
520125b89263Smrg      m88k*)
520225b89263Smrg	;;
520325b89263Smrg      mvs*)
520425b89263Smrg	case $cc_basename in
520525b89263Smrg	  cxx*)
520625b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
520725b89263Smrg	    ;;
520825b89263Smrg	  *)
520925b89263Smrg	    ;;
521025b89263Smrg	esac
521125b89263Smrg	;;
521225b89263Smrg      netbsd*)
521325b89263Smrg	;;
521425b89263Smrg      *qnx* | *nto*)
521525b89263Smrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
521625b89263Smrg        # it will coredump.
521725b89263Smrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
521825b89263Smrg        ;;
521925b89263Smrg      osf3* | osf4* | osf5*)
522025b89263Smrg	case $cc_basename in
522125b89263Smrg	  KCC*)
522225b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
522325b89263Smrg	    ;;
522425b89263Smrg	  RCC*)
522525b89263Smrg	    # Rational C++ 2.4.1
522625b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
522725b89263Smrg	    ;;
522825b89263Smrg	  cxx*)
522925b89263Smrg	    # Digital/Compaq C++
523025b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
523125b89263Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
523225b89263Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
523325b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
523425b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
523525b89263Smrg	    ;;
523625b89263Smrg	  *)
523725b89263Smrg	    ;;
523825b89263Smrg	esac
523925b89263Smrg	;;
524025b89263Smrg      psos*)
5241ea133fd7Smrg	;;
524225b89263Smrg      solaris*)
524325b89263Smrg	case $cc_basename in
524425b89263Smrg	  CC* | sunCC*)
524525b89263Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
524625b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
524725b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
524825b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
524925b89263Smrg	    ;;
525025b89263Smrg	  gcx*)
525125b89263Smrg	    # Green Hills C++ Compiler
525225b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
525325b89263Smrg	    ;;
525425b89263Smrg	  *)
525525b89263Smrg	    ;;
525625b89263Smrg	esac
5257ea133fd7Smrg	;;
525825b89263Smrg      sunos4*)
525925b89263Smrg	case $cc_basename in
526025b89263Smrg	  CC*)
526125b89263Smrg	    # Sun C++ 4.x
526225b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
526325b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
526425b89263Smrg	    ;;
526525b89263Smrg	  lcc*)
526625b89263Smrg	    # Lucid
526725b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5268ea133fd7Smrg	    ;;
5269ea133fd7Smrg	  *)
5270ea133fd7Smrg	    ;;
5271ea133fd7Smrg	esac
5272ea133fd7Smrg	;;
527325b89263Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
527425b89263Smrg	case $cc_basename in
527525b89263Smrg	  CC*)
527625b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
527725b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
527825b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
527925b89263Smrg	    ;;
528025b89263Smrg	esac
5281ea133fd7Smrg	;;
528225b89263Smrg      tandem*)
528325b89263Smrg	case $cc_basename in
528425b89263Smrg	  NCC*)
528525b89263Smrg	    # NonStop-UX NCC 3.20
528625b89263Smrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
528725b89263Smrg	    ;;
528825b89263Smrg	  *)
528925b89263Smrg	    ;;
529025b89263Smrg	esac
5291ea133fd7Smrg	;;
529225b89263Smrg      vxworks*)
5293ea133fd7Smrg	;;
529425b89263Smrg      *)
529525b89263Smrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5296ea133fd7Smrg	;;
529725b89263Smrg    esac
529825b89263Smrg  fi
529925b89263Smrg],
530025b89263Smrg[
530125b89263Smrg  if test "$GCC" = yes; then
530225b89263Smrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
530325b89263Smrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
5304a253d6aeSmrg
530525b89263Smrg    case $host_os in
530625b89263Smrg      aix*)
530725b89263Smrg      # All AIX code is PIC.
530825b89263Smrg      if test "$host_cpu" = ia64; then
530925b89263Smrg	# AIX 5 now supports IA64 processor
531025b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
531125b89263Smrg      fi
531225b89263Smrg      ;;
5313a253d6aeSmrg
531425b89263Smrg    amigaos*)
531525b89263Smrg      case $host_cpu in
531625b89263Smrg      powerpc)
531725b89263Smrg            # see comment about AmigaOS4 .so support
531825b89263Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
531925b89263Smrg        ;;
532025b89263Smrg      m68k)
532125b89263Smrg            # FIXME: we need at least 68020 code to build shared libraries, but
532225b89263Smrg            # adding the `-m68020' flag to GCC prevents building anything better,
532325b89263Smrg            # like `-m68040'.
532425b89263Smrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
532525b89263Smrg        ;;
532625b89263Smrg      esac
532725b89263Smrg      ;;
5328ea133fd7Smrg
532925b89263Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
533025b89263Smrg      # PIC is the default for these OSes.
533125b89263Smrg      ;;
5332ea133fd7Smrg
533325b89263Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
533425b89263Smrg      # This hack is so that the source file can tell whether it is being
533525b89263Smrg      # built for inclusion in a dll (and should export symbols for example).
533625b89263Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
533725b89263Smrg      # (--disable-auto-import) libraries
533825b89263Smrg      m4_if([$1], [GCJ], [],
533925b89263Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
534025b89263Smrg      ;;
5341ea133fd7Smrg
534225b89263Smrg    darwin* | rhapsody*)
534325b89263Smrg      # PIC is the default on this platform
534425b89263Smrg      # Common symbols not allowed in MH_DYLIB files
534525b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
534625b89263Smrg      ;;
5347a253d6aeSmrg
534825b89263Smrg    haiku*)
534925b89263Smrg      # PIC is the default for Haiku.
535025b89263Smrg      # The "-static" flag exists, but is broken.
535125b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
535225b89263Smrg      ;;
5353a253d6aeSmrg
535425b89263Smrg    hpux*)
535525b89263Smrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
535625b89263Smrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
535725b89263Smrg      # sets the default TLS model and affects inlining.
535825b89263Smrg      case $host_cpu in
535925b89263Smrg      hppa*64*)
536025b89263Smrg	# +Z the default
536125b89263Smrg	;;
536225b89263Smrg      *)
536325b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
536425b89263Smrg	;;
536525b89263Smrg      esac
536625b89263Smrg      ;;
5367a253d6aeSmrg
536825b89263Smrg    interix[[3-9]]*)
536925b89263Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
537025b89263Smrg      # Instead, we relocate shared libraries at runtime.
537125b89263Smrg      ;;
5372ea133fd7Smrg
537325b89263Smrg    msdosdjgpp*)
537425b89263Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
537525b89263Smrg      # on systems that don't support them.
537625b89263Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
537725b89263Smrg      enable_shared=no
537825b89263Smrg      ;;
5379a253d6aeSmrg
538025b89263Smrg    *nto* | *qnx*)
538125b89263Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
538225b89263Smrg      # it will coredump.
538325b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
538425b89263Smrg      ;;
5385a253d6aeSmrg
538625b89263Smrg    sysv4*MP*)
538725b89263Smrg      if test -d /usr/nec; then
538825b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
538925b89263Smrg      fi
539025b89263Smrg      ;;
5391a253d6aeSmrg
539225b89263Smrg    *)
539325b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
539425b89263Smrg      ;;
539525b89263Smrg    esac
5396ea133fd7Smrg
539725b89263Smrg    case $cc_basename in
539825b89263Smrg    nvcc*) # Cuda Compiler Driver 2.2
539925b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
540025b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
540125b89263Smrg      ;;
540225b89263Smrg    esac
540325b89263Smrg  else
540425b89263Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
540525b89263Smrg    case $host_os in
540625b89263Smrg    aix*)
540725b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
540825b89263Smrg      if test "$host_cpu" = ia64; then
540925b89263Smrg	# AIX 5 now supports IA64 processor
541025b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
541125b89263Smrg      else
541225b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
541325b89263Smrg      fi
541425b89263Smrg      ;;
5415ea133fd7Smrg
541625b89263Smrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
541725b89263Smrg      # This hack is so that the source file can tell whether it is being
541825b89263Smrg      # built for inclusion in a dll (and should export symbols for example).
541925b89263Smrg      m4_if([$1], [GCJ], [],
542025b89263Smrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
542125b89263Smrg      ;;
5422ea133fd7Smrg
542325b89263Smrg    hpux9* | hpux10* | hpux11*)
542425b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
542525b89263Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
542625b89263Smrg      # not for PA HP-UX.
542725b89263Smrg      case $host_cpu in
542825b89263Smrg      hppa*64*|ia64*)
542925b89263Smrg	# +Z the default
543025b89263Smrg	;;
543125b89263Smrg      *)
543225b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
543325b89263Smrg	;;
543425b89263Smrg      esac
543525b89263Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
543625b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
543725b89263Smrg      ;;
5438a253d6aeSmrg
543925b89263Smrg    irix5* | irix6* | nonstopux*)
544025b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
544125b89263Smrg      # PIC (with -KPIC) is the default.
544225b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
544325b89263Smrg      ;;
5444a253d6aeSmrg
544525b89263Smrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
5446ea133fd7Smrg      case $cc_basename in
544725b89263Smrg      # old Intel for x86_64 which still supported -KPIC.
544825b89263Smrg      ecc*)
544925b89263Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
545025b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
545125b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
545225b89263Smrg        ;;
545325b89263Smrg      # icc used to be incompatible with GCC.
545425b89263Smrg      # ICC 10 doesn't accept -KPIC any more.
545525b89263Smrg      icc* | ifort*)
545625b89263Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
545725b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
545825b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
545925b89263Smrg        ;;
546025b89263Smrg      # Lahey Fortran 8.1.
546125b89263Smrg      lf95*)
546225b89263Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
546325b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
546425b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
546525b89263Smrg	;;
546606f32fbeSmrg      nagfor*)
546706f32fbeSmrg	# NAG Fortran compiler
546806f32fbeSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,'
546906f32fbeSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
547006f32fbeSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
547106f32fbeSmrg	;;
547225b89263Smrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
547325b89263Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
547425b89263Smrg	# which looks to be a dead project)
547525b89263Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
547625b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
547725b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
547825b89263Smrg        ;;
547925b89263Smrg      ccc*)
548025b89263Smrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
548125b89263Smrg        # All Alpha code is PIC.
548225b89263Smrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
548325b89263Smrg        ;;
548425b89263Smrg      xl* | bgxl* | bgf* | mpixl*)
548525b89263Smrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
548625b89263Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
548725b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
548825b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
548925b89263Smrg	;;
549025b89263Smrg      *)
549125b89263Smrg	case `$CC -V 2>&1 | sed 5q` in
549225b89263Smrg	*Sun\ F* | *Sun*Fortran*)
549325b89263Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
549425b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
549525b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
549625b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
5497ea133fd7Smrg	  ;;
549825b89263Smrg	*Sun\ C*)
549925b89263Smrg	  # Sun C 5.9
550025b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
550125b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
550225b89263Smrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5503ea133fd7Smrg	  ;;
550425b89263Smrg	esac
550525b89263Smrg	;;
5506ea133fd7Smrg      esac
5507ea133fd7Smrg      ;;
5508a253d6aeSmrg
550925b89263Smrg    newsos6)
551025b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
551125b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
551225b89263Smrg      ;;
5513a253d6aeSmrg
551425b89263Smrg    *nto* | *qnx*)
551525b89263Smrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
551625b89263Smrg      # it will coredump.
551725b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
5518ea133fd7Smrg      ;;
5519a253d6aeSmrg
552025b89263Smrg    osf3* | osf4* | osf5*)
552125b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
552225b89263Smrg      # All OSF/1 code is PIC.
552325b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
552425b89263Smrg      ;;
5525a253d6aeSmrg
552625b89263Smrg    rdos*)
552725b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
552825b89263Smrg      ;;
5529a253d6aeSmrg
553025b89263Smrg    solaris*)
553125b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
553225b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
553325b89263Smrg      case $cc_basename in
553425b89263Smrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
553525b89263Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5536ea133fd7Smrg      *)
553725b89263Smrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
553825b89263Smrg      esac
553925b89263Smrg      ;;
5540a253d6aeSmrg
554125b89263Smrg    sunos4*)
554225b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
554325b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
554425b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
554525b89263Smrg      ;;
5546ea133fd7Smrg
554725b89263Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
554825b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
554925b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
555025b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
555125b89263Smrg      ;;
5552ea133fd7Smrg
555325b89263Smrg    sysv4*MP*)
555425b89263Smrg      if test -d /usr/nec ;then
555525b89263Smrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
555625b89263Smrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
555725b89263Smrg      fi
555825b89263Smrg      ;;
5559ea133fd7Smrg
556025b89263Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
556125b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
556225b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
556325b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
556425b89263Smrg      ;;
5565ea133fd7Smrg
556625b89263Smrg    unicos*)
556725b89263Smrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
556825b89263Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
556925b89263Smrg      ;;
5570a253d6aeSmrg
557125b89263Smrg    uts4*)
557225b89263Smrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
557325b89263Smrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
557425b89263Smrg      ;;
5575a253d6aeSmrg
557625b89263Smrg    *)
557725b89263Smrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
557825b89263Smrg      ;;
557925b89263Smrg    esac
558025b89263Smrg  fi
558125b89263Smrg])
558225b89263Smrgcase $host_os in
558325b89263Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
558425b89263Smrg  *djgpp*)
558525b89263Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
558625b89263Smrg    ;;
558725b89263Smrg  *)
558825b89263Smrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
558925b89263Smrg    ;;
559025b89263Smrgesac
559106f32fbeSmrg
559206f32fbeSmrgAC_CACHE_CHECK([for $compiler option to produce PIC],
559306f32fbeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)],
559406f32fbeSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
559506f32fbeSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)
5596a253d6aeSmrg
559725b89263Smrg#
559825b89263Smrg# Check to make sure the PIC flag actually works.
559925b89263Smrg#
560025b89263Smrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
560125b89263Smrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
560225b89263Smrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
560325b89263Smrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
560425b89263Smrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
560525b89263Smrg     "" | " "*) ;;
560625b89263Smrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
560725b89263Smrg     esac],
560825b89263Smrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
560925b89263Smrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
561025b89263Smrgfi
561125b89263Smrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
561225b89263Smrg	[Additional compiler flags for building library objects])
5613a253d6aeSmrg
561406f32fbeSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
561506f32fbeSmrg	[How to pass a linker flag through the compiler])
561625b89263Smrg#
561725b89263Smrg# Check to make sure the static flag actually works.
561825b89263Smrg#
561925b89263Smrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
562025b89263Smrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
562125b89263Smrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
562225b89263Smrg  $lt_tmp_static_flag,
562325b89263Smrg  [],
562425b89263Smrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
562525b89263Smrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
562625b89263Smrg	[Compiler flag to prevent dynamic linking])
562725b89263Smrg])# _LT_COMPILER_PIC
5628a253d6aeSmrg
5629a253d6aeSmrg
563025b89263Smrg# _LT_LINKER_SHLIBS([TAGNAME])
563125b89263Smrg# ----------------------------
563225b89263Smrg# See if the linker supports building shared libraries.
563325b89263Smrgm4_defun([_LT_LINKER_SHLIBS],
563425b89263Smrg[AC_REQUIRE([LT_PATH_LD])dnl
563525b89263SmrgAC_REQUIRE([LT_PATH_NM])dnl
563606f32fbeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
563725b89263Smrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
563825b89263Smrgm4_require([_LT_DECL_EGREP])dnl
563925b89263Smrgm4_require([_LT_DECL_SED])dnl
564025b89263Smrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
564125b89263Smrgm4_require([_LT_TAG_COMPILER])dnl
564225b89263SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
564325b89263Smrgm4_if([$1], [CXX], [
564425b89263Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
564506f32fbeSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
564625b89263Smrg  case $host_os in
564725b89263Smrg  aix[[4-9]]*)
564825b89263Smrg    # If we're using GNU nm, then we don't want the "-C" option.
564925b89263Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
565025b89263Smrg    # Also, AIX nm treats weak defined symbols like other global defined
565125b89263Smrg    # symbols, whereas GNU nm marks them as "W".
565225b89263Smrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
565325b89263Smrg      _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'
565425b89263Smrg    else
565525b89263Smrg      _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'
565625b89263Smrg    fi
565725b89263Smrg    ;;
565825b89263Smrg  pw32*)
565925b89263Smrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
566006f32fbeSmrg    ;;
566125b89263Smrg  cygwin* | mingw* | cegcc*)
566206f32fbeSmrg    case $cc_basename in
566306f32fbeSmrg    cl*) ;;
566406f32fbeSmrg    *)
566506f32fbeSmrg      _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'
566606f32fbeSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
566706f32fbeSmrg      ;;
566806f32fbeSmrg    esac
566906f32fbeSmrg    ;;
567025b89263Smrg  *)
567125b89263Smrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
567206f32fbeSmrg    ;;
567325b89263Smrg  esac
567425b89263Smrg], [
567525b89263Smrg  runpath_var=
567625b89263Smrg  _LT_TAGVAR(allow_undefined_flag, $1)=
567725b89263Smrg  _LT_TAGVAR(always_export_symbols, $1)=no
567825b89263Smrg  _LT_TAGVAR(archive_cmds, $1)=
567925b89263Smrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
568025b89263Smrg  _LT_TAGVAR(compiler_needs_object, $1)=no
568125b89263Smrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
568225b89263Smrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
568325b89263Smrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
568425b89263Smrg  _LT_TAGVAR(hardcode_automatic, $1)=no
568525b89263Smrg  _LT_TAGVAR(hardcode_direct, $1)=no
568625b89263Smrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
568725b89263Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
568825b89263Smrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
568925b89263Smrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
569025b89263Smrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
569125b89263Smrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
569225b89263Smrg  _LT_TAGVAR(inherit_rpath, $1)=no
569325b89263Smrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
569425b89263Smrg  _LT_TAGVAR(module_cmds, $1)=
569525b89263Smrg  _LT_TAGVAR(module_expsym_cmds, $1)=
569625b89263Smrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
569725b89263Smrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
569825b89263Smrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
569925b89263Smrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
570025b89263Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
570125b89263Smrg  # included in the symbol list
570225b89263Smrg  _LT_TAGVAR(include_expsyms, $1)=
570325b89263Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
570425b89263Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
570525b89263Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
570625b89263Smrg  # as well as any symbol that contains `d'.
570725b89263Smrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
570825b89263Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
570925b89263Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
571025b89263Smrg  # the symbol is explicitly referenced.  Since portable code cannot
571125b89263Smrg  # rely on this symbol name, it's probably fine to never include it in
571225b89263Smrg  # preloaded symbol tables.
571325b89263Smrg  # Exclude shared library initialization/finalization symbols.
571425b89263Smrgdnl Note also adjust exclude_expsyms for C++ above.
571525b89263Smrg  extract_expsyms_cmds=
571625b89263Smrg
571725b89263Smrg  case $host_os in
571825b89263Smrg  cygwin* | mingw* | pw32* | cegcc*)
571925b89263Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
572025b89263Smrg    # When not using gcc, we currently assume that we are using
572125b89263Smrg    # Microsoft Visual C++.
572225b89263Smrg    if test "$GCC" != yes; then
572325b89263Smrg      with_gnu_ld=no
572425b89263Smrg    fi
572525b89263Smrg    ;;
572625b89263Smrg  interix*)
572725b89263Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
572825b89263Smrg    with_gnu_ld=yes
572925b89263Smrg    ;;
573025b89263Smrg  openbsd*)
573125b89263Smrg    with_gnu_ld=no
573225b89263Smrg    ;;
573325b89263Smrg  esac
5734a253d6aeSmrg
573525b89263Smrg  _LT_TAGVAR(ld_shlibs, $1)=yes
5736a253d6aeSmrg
573725b89263Smrg  # On some targets, GNU ld is compatible enough with the native linker
573825b89263Smrg  # that we're better off using the native interface for both.
573925b89263Smrg  lt_use_gnu_ld_interface=no
574025b89263Smrg  if test "$with_gnu_ld" = yes; then
574125b89263Smrg    case $host_os in
574225b89263Smrg      aix*)
574325b89263Smrg	# The AIX port of GNU ld has always aspired to compatibility
574425b89263Smrg	# with the native linker.  However, as the warning in the GNU ld
574525b89263Smrg	# block says, versions before 2.19.5* couldn't really create working
574625b89263Smrg	# shared libraries, regardless of the interface used.
574725b89263Smrg	case `$LD -v 2>&1` in
574825b89263Smrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
574925b89263Smrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
575025b89263Smrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
575125b89263Smrg	  *)
575225b89263Smrg	    lt_use_gnu_ld_interface=yes
575325b89263Smrg	    ;;
575425b89263Smrg	esac
575525b89263Smrg	;;
575625b89263Smrg      *)
575725b89263Smrg	lt_use_gnu_ld_interface=yes
575825b89263Smrg	;;
575925b89263Smrg    esac
576025b89263Smrg  fi
5761a253d6aeSmrg
576225b89263Smrg  if test "$lt_use_gnu_ld_interface" = yes; then
576325b89263Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
576425b89263Smrg    wlarc='${wl}'
5765a253d6aeSmrg
576625b89263Smrg    # Set some defaults for GNU ld with shared library support. These
576725b89263Smrg    # are reset later if shared libraries are not supported. Putting them
576825b89263Smrg    # here allows them to be overridden if necessary.
576925b89263Smrg    runpath_var=LD_RUN_PATH
577025b89263Smrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
577125b89263Smrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
577225b89263Smrg    # ancient GNU ld didn't support --whole-archive et. al.
577325b89263Smrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
577425b89263Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
577525b89263Smrg    else
577625b89263Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
577725b89263Smrg    fi
577825b89263Smrg    supports_anon_versioning=no
577925b89263Smrg    case `$LD -v 2>&1` in
578025b89263Smrg      *GNU\ gold*) supports_anon_versioning=yes ;;
578125b89263Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
578225b89263Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
578325b89263Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
578425b89263Smrg      *\ 2.11.*) ;; # other 2.11 versions
578525b89263Smrg      *) supports_anon_versioning=yes ;;
578625b89263Smrg    esac
5787a253d6aeSmrg
578825b89263Smrg    # See if GNU ld supports shared libraries.
578925b89263Smrg    case $host_os in
579025b89263Smrg    aix[[3-9]]*)
579125b89263Smrg      # On AIX/PPC, the GNU linker is very broken
579225b89263Smrg      if test "$host_cpu" != ia64; then
579325b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
579425b89263Smrg	cat <<_LT_EOF 1>&2
5795a253d6aeSmrg
579625b89263Smrg*** Warning: the GNU linker, at least up to release 2.19, is reported
579725b89263Smrg*** to be unable to reliably create shared libraries on AIX.
579825b89263Smrg*** Therefore, libtool is disabling shared libraries support.  If you
579925b89263Smrg*** really care for shared libraries, you may want to install binutils
580025b89263Smrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
580125b89263Smrg*** You will then need to restart the configuration process.
5802a253d6aeSmrg
580325b89263Smrg_LT_EOF
580425b89263Smrg      fi
580525b89263Smrg      ;;
5806a253d6aeSmrg
580725b89263Smrg    amigaos*)
580825b89263Smrg      case $host_cpu in
580925b89263Smrg      powerpc)
581025b89263Smrg            # see comment about AmigaOS4 .so support
581125b89263Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
581225b89263Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
581325b89263Smrg        ;;
581425b89263Smrg      m68k)
581525b89263Smrg            _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)'
581625b89263Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
581725b89263Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
581825b89263Smrg        ;;
581925b89263Smrg      esac
582025b89263Smrg      ;;
5821a253d6aeSmrg
582225b89263Smrg    beos*)
582325b89263Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
582425b89263Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
582525b89263Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
582625b89263Smrg	# support --undefined.  This deserves some investigation.  FIXME
582725b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
582825b89263Smrg      else
582925b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
583025b89263Smrg      fi
583125b89263Smrg      ;;
5832a253d6aeSmrg
583325b89263Smrg    cygwin* | mingw* | pw32* | cegcc*)
583425b89263Smrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
583525b89263Smrg      # as there is no search path for DLLs.
583625b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
583725b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
583825b89263Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
583925b89263Smrg      _LT_TAGVAR(always_export_symbols, $1)=no
584025b89263Smrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
584106f32fbeSmrg      _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'
584206f32fbeSmrg      _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname']
5843ea133fd7Smrg
584425b89263Smrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
584525b89263Smrg        _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'
584625b89263Smrg	# If the export-symbols file already is a .def file (1st line
584725b89263Smrg	# is EXPORTS), use it as is; otherwise, prepend...
584825b89263Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
584925b89263Smrg	  cp $export_symbols $output_objdir/$soname.def;
585025b89263Smrg	else
585125b89263Smrg	  echo EXPORTS > $output_objdir/$soname.def;
585225b89263Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
585325b89263Smrg	fi~
585425b89263Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
585525b89263Smrg      else
585625b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
585725b89263Smrg      fi
5858ea133fd7Smrg      ;;
5859a253d6aeSmrg
586025b89263Smrg    haiku*)
586125b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
586225b89263Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
586325b89263Smrg      ;;
5864a253d6aeSmrg
586525b89263Smrg    interix[[3-9]]*)
586625b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=no
586725b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
586825b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
586925b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
587025b89263Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
587125b89263Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
587225b89263Smrg      # default) and relocated if they conflict, which is a slow very memory
587325b89263Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
587425b89263Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
587525b89263Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
587625b89263Smrg      _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'
587725b89263Smrg      _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'
5878ea133fd7Smrg      ;;
5879a253d6aeSmrg
588025b89263Smrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
588125b89263Smrg      tmp_diet=no
588225b89263Smrg      if test "$host_os" = linux-dietlibc; then
588325b89263Smrg	case $cc_basename in
588425b89263Smrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
588525b89263Smrg	esac
588625b89263Smrg      fi
588725b89263Smrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
588825b89263Smrg	 && test "$tmp_diet" = no
588925b89263Smrg      then
589006f32fbeSmrg	tmp_addflag=' $pic_flag'
589125b89263Smrg	tmp_sharedflag='-shared'
589225b89263Smrg	case $cc_basename,$host_cpu in
589325b89263Smrg        pgcc*)				# Portland Group C compiler
589425b89263Smrg	  _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'
589525b89263Smrg	  tmp_addflag=' $pic_flag'
589625b89263Smrg	  ;;
589725b89263Smrg	pgf77* | pgf90* | pgf95* | pgfortran*)
589825b89263Smrg					# Portland Group f77 and f90 compilers
589925b89263Smrg	  _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'
590025b89263Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
590125b89263Smrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
590225b89263Smrg	  tmp_addflag=' -i_dynamic' ;;
590325b89263Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
590425b89263Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
590525b89263Smrg	ifc* | ifort*)			# Intel Fortran compiler
590625b89263Smrg	  tmp_addflag=' -nofor_main' ;;
590725b89263Smrg	lf95*)				# Lahey Fortran 8.1
590825b89263Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
590925b89263Smrg	  tmp_sharedflag='--shared' ;;
591025b89263Smrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
591125b89263Smrg	  tmp_sharedflag='-qmkshrobj'
591225b89263Smrg	  tmp_addflag= ;;
591325b89263Smrg	nvcc*)	# Cuda Compiler Driver 2.2
591425b89263Smrg	  _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'
591525b89263Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
591625b89263Smrg	  ;;
591725b89263Smrg	esac
591825b89263Smrg	case `$CC -V 2>&1 | sed 5q` in
591925b89263Smrg	*Sun\ C*)			# Sun C 5.9
592025b89263Smrg	  _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'
592125b89263Smrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
592225b89263Smrg	  tmp_sharedflag='-G' ;;
592325b89263Smrg	*Sun\ F*)			# Sun Fortran 8.3
592425b89263Smrg	  tmp_sharedflag='-G' ;;
592525b89263Smrg	esac
592625b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5927a253d6aeSmrg
592825b89263Smrg        if test "x$supports_anon_versioning" = xyes; then
592925b89263Smrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
593025b89263Smrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
593125b89263Smrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
593225b89263Smrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
593325b89263Smrg        fi
5934ea133fd7Smrg
593525b89263Smrg	case $cc_basename in
593625b89263Smrg	xlf* | bgf* | bgxlf* | mpixlf*)
593725b89263Smrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
593825b89263Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
593925b89263Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
594025b89263Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
594125b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
594225b89263Smrg	  if test "x$supports_anon_versioning" = xyes; then
594325b89263Smrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
594425b89263Smrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
594525b89263Smrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
594625b89263Smrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
594725b89263Smrg	  fi
594825b89263Smrg	  ;;
594925b89263Smrg	esac
595025b89263Smrg      else
595125b89263Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
595225b89263Smrg      fi
595325b89263Smrg      ;;
5954ea133fd7Smrg
595525b89263Smrg    netbsd*)
595625b89263Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
595725b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
595825b89263Smrg	wlarc=
595925b89263Smrg      else
596006f32fbeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
596106f32fbeSmrg	_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'
596225b89263Smrg      fi
596325b89263Smrg      ;;
5964a253d6aeSmrg
596525b89263Smrg    solaris*)
596625b89263Smrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
596725b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
596825b89263Smrg	cat <<_LT_EOF 1>&2
5969a253d6aeSmrg
597025b89263Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
597125b89263Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
597225b89263Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
597325b89263Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
597425b89263Smrg*** your PATH or compiler configuration so that the native linker is
597525b89263Smrg*** used, and then restart.
5976a253d6aeSmrg
597725b89263Smrg_LT_EOF
597825b89263Smrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
597906f32fbeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
598006f32fbeSmrg	_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'
598125b89263Smrg      else
598225b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
598325b89263Smrg      fi
598425b89263Smrg      ;;
5985a253d6aeSmrg
598625b89263Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
598725b89263Smrg      case `$LD -v 2>&1` in
598825b89263Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
598925b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
599025b89263Smrg	cat <<_LT_EOF 1>&2
5991a253d6aeSmrg
599225b89263Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
599325b89263Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
599425b89263Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
599525b89263Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
599625b89263Smrg*** your PATH or compiler configuration so that the native linker is
599725b89263Smrg*** used, and then restart.
5998a253d6aeSmrg
599925b89263Smrg_LT_EOF
600025b89263Smrg	;;
600125b89263Smrg	*)
600225b89263Smrg	  # For security reasons, it is highly recommended that you always
600325b89263Smrg	  # use absolute paths for naming shared libraries, and exclude the
600425b89263Smrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
600525b89263Smrg	  # requires that you compile everything twice, which is a pain.
600625b89263Smrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
600725b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
600825b89263Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
600925b89263Smrg	    _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'
601025b89263Smrg	  else
601125b89263Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
601225b89263Smrg	  fi
601325b89263Smrg	;;
601425b89263Smrg      esac
601525b89263Smrg      ;;
6016ea133fd7Smrg
601725b89263Smrg    sunos4*)
601825b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
601925b89263Smrg      wlarc=
602025b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
602125b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
602225b89263Smrg      ;;
6023a253d6aeSmrg
602425b89263Smrg    *)
602525b89263Smrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
602606f32fbeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
602706f32fbeSmrg	_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'
602825b89263Smrg      else
602925b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
603025b89263Smrg      fi
603125b89263Smrg      ;;
603225b89263Smrg    esac
6033a253d6aeSmrg
603425b89263Smrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
603525b89263Smrg      runpath_var=
603625b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
603725b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
603825b89263Smrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
603925b89263Smrg    fi
604025b89263Smrg  else
604125b89263Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
604225b89263Smrg    case $host_os in
604325b89263Smrg    aix3*)
604425b89263Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
604525b89263Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
604625b89263Smrg      _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'
604725b89263Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
604825b89263Smrg      # are no directories specified by -L.
604925b89263Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
605025b89263Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
605125b89263Smrg	# Neither direct hardcoding nor static linking is supported with a
605225b89263Smrg	# broken collect2.
605325b89263Smrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
605425b89263Smrg      fi
605525b89263Smrg      ;;
6056a253d6aeSmrg
605725b89263Smrg    aix[[4-9]]*)
605825b89263Smrg      if test "$host_cpu" = ia64; then
605925b89263Smrg	# On IA64, the linker does run time linking by default, so we don't
606025b89263Smrg	# have to do anything special.
606125b89263Smrg	aix_use_runtimelinking=no
606225b89263Smrg	exp_sym_flag='-Bexport'
606325b89263Smrg	no_entry_flag=""
606425b89263Smrg      else
606525b89263Smrg	# If we're using GNU nm, then we don't want the "-C" option.
606625b89263Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
606725b89263Smrg	# Also, AIX nm treats weak defined symbols like other global
606825b89263Smrg	# defined symbols, whereas GNU nm marks them as "W".
606925b89263Smrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
607025b89263Smrg	  _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'
607125b89263Smrg	else
607225b89263Smrg	  _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'
607325b89263Smrg	fi
607425b89263Smrg	aix_use_runtimelinking=no
6075a253d6aeSmrg
607625b89263Smrg	# Test if we are trying to use run time linking or normal
607725b89263Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
607825b89263Smrg	# need to do runtime linking.
607925b89263Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
608025b89263Smrg	  for ld_flag in $LDFLAGS; do
608125b89263Smrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
608225b89263Smrg	    aix_use_runtimelinking=yes
608325b89263Smrg	    break
608425b89263Smrg	  fi
608525b89263Smrg	  done
608625b89263Smrg	  ;;
608725b89263Smrg	esac
6088a253d6aeSmrg
608925b89263Smrg	exp_sym_flag='-bexport'
609025b89263Smrg	no_entry_flag='-bnoentry'
609125b89263Smrg      fi
6092a253d6aeSmrg
609325b89263Smrg      # When large executables or shared objects are built, AIX ld can
609425b89263Smrg      # have problems creating the table of contents.  If linking a library
609525b89263Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
609625b89263Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
609725b89263Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
6098ea133fd7Smrg
609925b89263Smrg      _LT_TAGVAR(archive_cmds, $1)=''
610025b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
610125b89263Smrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
610225b89263Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
610325b89263Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
610425b89263Smrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
6105ea133fd7Smrg
610625b89263Smrg      if test "$GCC" = yes; then
610725b89263Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
610825b89263Smrg	# We only want to do this on AIX 4.2 and lower, the check
610925b89263Smrg	# below for broken collect2 doesn't work under 4.3+
611025b89263Smrg	  collect2name=`${CC} -print-prog-name=collect2`
611125b89263Smrg	  if test -f "$collect2name" &&
611225b89263Smrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
611325b89263Smrg	  then
611425b89263Smrg	  # We have reworked collect2
611525b89263Smrg	  :
611625b89263Smrg	  else
611725b89263Smrg	  # We have old collect2
611825b89263Smrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
611925b89263Smrg	  # It fails to find uninstalled libraries when the uninstalled
612025b89263Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
612125b89263Smrg	  # to unsupported forces relinking
612225b89263Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
612325b89263Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
612425b89263Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
612525b89263Smrg	  fi
612625b89263Smrg	  ;;
612725b89263Smrg	esac
612825b89263Smrg	shared_flag='-shared'
612925b89263Smrg	if test "$aix_use_runtimelinking" = yes; then
613025b89263Smrg	  shared_flag="$shared_flag "'${wl}-G'
613125b89263Smrg	fi
613225b89263Smrg      else
613325b89263Smrg	# not using gcc
613425b89263Smrg	if test "$host_cpu" = ia64; then
613525b89263Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
613625b89263Smrg	# chokes on -Wl,-G. The following line is correct:
613725b89263Smrg	  shared_flag='-G'
613825b89263Smrg	else
613925b89263Smrg	  if test "$aix_use_runtimelinking" = yes; then
614025b89263Smrg	    shared_flag='${wl}-G'
614125b89263Smrg	  else
614225b89263Smrg	    shared_flag='${wl}-bM:SRE'
614325b89263Smrg	  fi
614425b89263Smrg	fi
614525b89263Smrg      fi
6146ea133fd7Smrg
614725b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
614825b89263Smrg      # It seems that -bexpall does not export symbols beginning with
614925b89263Smrg      # underscore (_), so it is better to generate a list of symbols to export.
615025b89263Smrg      _LT_TAGVAR(always_export_symbols, $1)=yes
615125b89263Smrg      if test "$aix_use_runtimelinking" = yes; then
615225b89263Smrg	# Warning - without using the other runtime loading flags (-brtl),
615325b89263Smrg	# -berok will link without error, but may produce a broken library.
615425b89263Smrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
615525b89263Smrg        # Determine the default libpath from the value encoded in an
615625b89263Smrg        # empty executable.
615706f32fbeSmrg        _LT_SYS_MODULE_PATH_AIX([$1])
615825b89263Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
615925b89263Smrg        _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"
616025b89263Smrg      else
616125b89263Smrg	if test "$host_cpu" = ia64; then
616225b89263Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
616325b89263Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
616425b89263Smrg	  _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"
616525b89263Smrg	else
616625b89263Smrg	 # Determine the default libpath from the value encoded in an
616725b89263Smrg	 # empty executable.
616806f32fbeSmrg	 _LT_SYS_MODULE_PATH_AIX([$1])
616925b89263Smrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
617025b89263Smrg	  # Warning - without using the other run time loading flags,
617125b89263Smrg	  # -berok will link without error, but may produce a broken library.
617225b89263Smrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
617325b89263Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
617425b89263Smrg	  if test "$with_gnu_ld" = yes; then
617525b89263Smrg	    # We only use this code for GNU lds that support --whole-archive.
617625b89263Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
617725b89263Smrg	  else
617825b89263Smrg	    # Exported symbols can be pulled into shared objects from archives
617925b89263Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
618025b89263Smrg	  fi
618125b89263Smrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
618225b89263Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
618325b89263Smrg	  _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'
618425b89263Smrg	fi
618525b89263Smrg      fi
618625b89263Smrg      ;;
6187ea133fd7Smrg
618825b89263Smrg    amigaos*)
618925b89263Smrg      case $host_cpu in
619025b89263Smrg      powerpc)
619125b89263Smrg            # see comment about AmigaOS4 .so support
619225b89263Smrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
619325b89263Smrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
619425b89263Smrg        ;;
619525b89263Smrg      m68k)
619625b89263Smrg            _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)'
619725b89263Smrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
619825b89263Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
619925b89263Smrg        ;;
620025b89263Smrg      esac
620125b89263Smrg      ;;
6202ea133fd7Smrg
620325b89263Smrg    bsdi[[45]]*)
620425b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
620525b89263Smrg      ;;
6206a253d6aeSmrg
620725b89263Smrg    cygwin* | mingw* | pw32* | cegcc*)
620825b89263Smrg      # When not using gcc, we currently assume that we are using
620925b89263Smrg      # Microsoft Visual C++.
621025b89263Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
621125b89263Smrg      # no search path for DLLs.
621206f32fbeSmrg      case $cc_basename in
621306f32fbeSmrg      cl*)
621406f32fbeSmrg	# Native MSVC
621506f32fbeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
621606f32fbeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
621706f32fbeSmrg	_LT_TAGVAR(always_export_symbols, $1)=yes
621806f32fbeSmrg	_LT_TAGVAR(file_list_spec, $1)='@'
621906f32fbeSmrg	# Tell ltmain to make .lib files, not .a files.
622006f32fbeSmrg	libext=lib
622106f32fbeSmrg	# Tell ltmain to make .dll files, not .so files.
622206f32fbeSmrg	shrext_cmds=".dll"
622306f32fbeSmrg	# FIXME: Setting linknames here is a bad hack.
622406f32fbeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
622506f32fbeSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
622606f32fbeSmrg	    sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
622706f32fbeSmrg	  else
622806f32fbeSmrg	    sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
622906f32fbeSmrg	  fi~
623006f32fbeSmrg	  $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
623106f32fbeSmrg	  linknames='
623206f32fbeSmrg	# The linker will not automatically build a static lib if we build a DLL.
623306f32fbeSmrg	# _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
623406f32fbeSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
623506f32fbeSmrg	_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'
623606f32fbeSmrg	# Don't use ranlib
623706f32fbeSmrg	_LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
623806f32fbeSmrg	_LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
623906f32fbeSmrg	  lt_tool_outputfile="@TOOL_OUTPUT@"~
624006f32fbeSmrg	  case $lt_outputfile in
624106f32fbeSmrg	    *.exe|*.EXE) ;;
624206f32fbeSmrg	    *)
624306f32fbeSmrg	      lt_outputfile="$lt_outputfile.exe"
624406f32fbeSmrg	      lt_tool_outputfile="$lt_tool_outputfile.exe"
624506f32fbeSmrg	      ;;
624606f32fbeSmrg	  esac~
624706f32fbeSmrg	  if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
624806f32fbeSmrg	    $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
624906f32fbeSmrg	    $RM "$lt_outputfile.manifest";
625006f32fbeSmrg	  fi'
625106f32fbeSmrg	;;
625206f32fbeSmrg      *)
625306f32fbeSmrg	# Assume MSVC wrapper
625406f32fbeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
625506f32fbeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
625606f32fbeSmrg	# Tell ltmain to make .lib files, not .a files.
625706f32fbeSmrg	libext=lib
625806f32fbeSmrg	# Tell ltmain to make .dll files, not .so files.
625906f32fbeSmrg	shrext_cmds=".dll"
626006f32fbeSmrg	# FIXME: Setting linknames here is a bad hack.
626106f32fbeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
626206f32fbeSmrg	# The linker will automatically build a .lib file if we build a DLL.
626306f32fbeSmrg	_LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
626406f32fbeSmrg	# FIXME: Should let the user specify the lib program.
626506f32fbeSmrg	_LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
626606f32fbeSmrg	_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
626706f32fbeSmrg	;;
626806f32fbeSmrg      esac
626925b89263Smrg      ;;
6270a253d6aeSmrg
627125b89263Smrg    darwin* | rhapsody*)
627225b89263Smrg      _LT_DARWIN_LINKER_FEATURES($1)
627325b89263Smrg      ;;
6274a253d6aeSmrg
627525b89263Smrg    dgux*)
627625b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
627725b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
627825b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
627925b89263Smrg      ;;
6280a253d6aeSmrg
628125b89263Smrg    freebsd1*)
628225b89263Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
628325b89263Smrg      ;;
6284a253d6aeSmrg
628525b89263Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
628625b89263Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
628725b89263Smrg    # does not break anything, and helps significantly (at the cost of a little
628825b89263Smrg    # extra space).
628925b89263Smrg    freebsd2.2*)
629025b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
629125b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
629225b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
629325b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
629425b89263Smrg      ;;
6295a253d6aeSmrg
629625b89263Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
629725b89263Smrg    freebsd2*)
629825b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
629925b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
630025b89263Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
630125b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
630225b89263Smrg      ;;
6303ea133fd7Smrg
630425b89263Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
630525b89263Smrg    freebsd* | dragonfly*)
630606f32fbeSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
630725b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
630825b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
630925b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
631025b89263Smrg      ;;
6311ea133fd7Smrg
631225b89263Smrg    hpux9*)
631325b89263Smrg      if test "$GCC" = yes; then
631406f32fbeSmrg	_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'
631525b89263Smrg      else
631625b89263Smrg	_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'
631725b89263Smrg      fi
631825b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
631925b89263Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
632025b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
6321ea133fd7Smrg
632225b89263Smrg      # hardcode_minus_L: Not really in the search PATH,
632325b89263Smrg      # but as the default location of the library.
632425b89263Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
632525b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
632625b89263Smrg      ;;
6327ea133fd7Smrg
632825b89263Smrg    hpux10*)
632925b89263Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
633006f32fbeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
633125b89263Smrg      else
633225b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
633325b89263Smrg      fi
633425b89263Smrg      if test "$with_gnu_ld" = no; then
633525b89263Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
633625b89263Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
633725b89263Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
633825b89263Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
633925b89263Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
634025b89263Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
634125b89263Smrg	# hardcode_minus_L: Not really in the search PATH,
634225b89263Smrg	# but as the default location of the library.
634325b89263Smrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
634425b89263Smrg      fi
634525b89263Smrg      ;;
6346a253d6aeSmrg
634725b89263Smrg    hpux11*)
634825b89263Smrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
634925b89263Smrg	case $host_cpu in
635025b89263Smrg	hppa*64*)
635125b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
635225b89263Smrg	  ;;
635325b89263Smrg	ia64*)
635406f32fbeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
635525b89263Smrg	  ;;
635625b89263Smrg	*)
635706f32fbeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
635825b89263Smrg	  ;;
635925b89263Smrg	esac
636025b89263Smrg      else
636125b89263Smrg	case $host_cpu in
636225b89263Smrg	hppa*64*)
636325b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
636425b89263Smrg	  ;;
636525b89263Smrg	ia64*)
636625b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
636725b89263Smrg	  ;;
636825b89263Smrg	*)
636925b89263Smrg	m4_if($1, [], [
637025b89263Smrg	  # Older versions of the 11.00 compiler do not understand -b yet
637125b89263Smrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
637225b89263Smrg	  _LT_LINKER_OPTION([if $CC understands -b],
637325b89263Smrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
637425b89263Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
637525b89263Smrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
637625b89263Smrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
637725b89263Smrg	  ;;
637825b89263Smrg	esac
637925b89263Smrg      fi
638025b89263Smrg      if test "$with_gnu_ld" = no; then
638125b89263Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
638225b89263Smrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
6383a253d6aeSmrg
638425b89263Smrg	case $host_cpu in
638525b89263Smrg	hppa*64*|ia64*)
638625b89263Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
638725b89263Smrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
638825b89263Smrg	  ;;
638925b89263Smrg	*)
639025b89263Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
639125b89263Smrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
639225b89263Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6393a253d6aeSmrg
639425b89263Smrg	  # hardcode_minus_L: Not really in the search PATH,
639525b89263Smrg	  # but as the default location of the library.
639625b89263Smrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
639725b89263Smrg	  ;;
639825b89263Smrg	esac
639925b89263Smrg      fi
640025b89263Smrg      ;;
6401a253d6aeSmrg
640225b89263Smrg    irix5* | irix6* | nonstopux*)
640325b89263Smrg      if test "$GCC" = yes; then
640406f32fbeSmrg	_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'
640525b89263Smrg	# Try to use the -exported_symbol ld option, if it does not
640625b89263Smrg	# work, assume that -exports_file does not work either and
640725b89263Smrg	# implicitly export all symbols.
640806f32fbeSmrg	# This should be the same for all languages, so no per-tag cache variable.
640906f32fbeSmrg	AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol],
641006f32fbeSmrg	  [lt_cv_irix_exported_symbol],
641106f32fbeSmrg	  [save_LDFLAGS="$LDFLAGS"
641206f32fbeSmrg	   LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
641306f32fbeSmrg	   AC_LINK_IFELSE(
641406f32fbeSmrg	     [AC_LANG_SOURCE(
641506f32fbeSmrg	        [AC_LANG_CASE([C], [[int foo (void) { return 0; }]],
641606f32fbeSmrg			      [C++], [[int foo (void) { return 0; }]],
641706f32fbeSmrg			      [Fortran 77], [[
641806f32fbeSmrg      subroutine foo
641906f32fbeSmrg      end]],
642006f32fbeSmrg			      [Fortran], [[
642106f32fbeSmrg      subroutine foo
642206f32fbeSmrg      end]])])],
642306f32fbeSmrg	      [lt_cv_irix_exported_symbol=yes],
642406f32fbeSmrg	      [lt_cv_irix_exported_symbol=no])
642506f32fbeSmrg           LDFLAGS="$save_LDFLAGS"])
642606f32fbeSmrg	if test "$lt_cv_irix_exported_symbol" = yes; then
642706f32fbeSmrg          _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'
642806f32fbeSmrg	fi
642925b89263Smrg      else
643025b89263Smrg	_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'
643125b89263Smrg	_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'
643225b89263Smrg      fi
643325b89263Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
643425b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
643525b89263Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
643625b89263Smrg      _LT_TAGVAR(inherit_rpath, $1)=yes
643725b89263Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
643825b89263Smrg      ;;
6439a253d6aeSmrg
644025b89263Smrg    netbsd*)
644125b89263Smrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
644225b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
644325b89263Smrg      else
644425b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
644525b89263Smrg      fi
644625b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
644725b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
644825b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
644925b89263Smrg      ;;
6450a253d6aeSmrg
645125b89263Smrg    newsos6)
645225b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
645325b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
645425b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
645525b89263Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
645625b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
645725b89263Smrg      ;;
6458a253d6aeSmrg
645925b89263Smrg    *nto* | *qnx*)
646025b89263Smrg      ;;
6461a253d6aeSmrg
646225b89263Smrg    openbsd*)
646325b89263Smrg      if test -f /usr/libexec/ld.so; then
646425b89263Smrg	_LT_TAGVAR(hardcode_direct, $1)=yes
646525b89263Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
646625b89263Smrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
646725b89263Smrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
646825b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
646925b89263Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
647025b89263Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
647125b89263Smrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
647225b89263Smrg	else
647325b89263Smrg	  case $host_os in
647425b89263Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
647525b89263Smrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
647625b89263Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
647725b89263Smrg	     ;;
647825b89263Smrg	   *)
647925b89263Smrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
648025b89263Smrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
648125b89263Smrg	     ;;
648225b89263Smrg	  esac
6483ea133fd7Smrg	fi
648425b89263Smrg      else
648525b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=no
648625b89263Smrg      fi
648725b89263Smrg      ;;
6488ea133fd7Smrg
648925b89263Smrg    os2*)
649025b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
649125b89263Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
649225b89263Smrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
649325b89263Smrg      _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'
649425b89263Smrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
649525b89263Smrg      ;;
6496ea133fd7Smrg
649725b89263Smrg    osf3*)
649825b89263Smrg      if test "$GCC" = yes; then
649925b89263Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
650025b89263Smrg	_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'
650125b89263Smrg      else
650225b89263Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
650325b89263Smrg	_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'
650425b89263Smrg      fi
650525b89263Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
650625b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
650725b89263Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
650825b89263Smrg      ;;
6509ea133fd7Smrg
651025b89263Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
651125b89263Smrg      if test "$GCC" = yes; then
651225b89263Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
651306f32fbeSmrg	_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'
651425b89263Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
651525b89263Smrg      else
651625b89263Smrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
651725b89263Smrg	_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'
651825b89263Smrg	_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~
651925b89263Smrg	$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'
6520ea133fd7Smrg
652125b89263Smrg	# Both c and cxx compiler support -rpath directly
652225b89263Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
652325b89263Smrg      fi
652425b89263Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
652525b89263Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
652625b89263Smrg      ;;
6527ea133fd7Smrg
652825b89263Smrg    solaris*)
652925b89263Smrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
653025b89263Smrg      if test "$GCC" = yes; then
653125b89263Smrg	wlarc='${wl}'
653206f32fbeSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
653325b89263Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
653406f32fbeSmrg	  $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'
653525b89263Smrg      else
653625b89263Smrg	case `$CC -V 2>&1` in
653725b89263Smrg	*"Compilers 5.0"*)
653825b89263Smrg	  wlarc=''
653925b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
654025b89263Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
654125b89263Smrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
654225b89263Smrg	  ;;
654325b89263Smrg	*)
654425b89263Smrg	  wlarc='${wl}'
654525b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
654625b89263Smrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
654725b89263Smrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
654825b89263Smrg	  ;;
654925b89263Smrg	esac
655025b89263Smrg      fi
655125b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
655225b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
655325b89263Smrg      case $host_os in
655425b89263Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
655525b89263Smrg      *)
655625b89263Smrg	# The compiler driver will combine and reorder linker options,
655725b89263Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
655825b89263Smrg	# but is careful enough not to reorder.
655925b89263Smrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
656025b89263Smrg	if test "$GCC" = yes; then
656125b89263Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
656225b89263Smrg	else
656325b89263Smrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
656425b89263Smrg	fi
656525b89263Smrg	;;
656625b89263Smrg      esac
656725b89263Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
656825b89263Smrg      ;;
6569a253d6aeSmrg
657025b89263Smrg    sunos4*)
657125b89263Smrg      if test "x$host_vendor" = xsequent; then
657225b89263Smrg	# Use $CC to link under sequent, because it throws in some extra .o
657325b89263Smrg	# files that make .init and .fini sections work.
657425b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
657525b89263Smrg      else
657625b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
657725b89263Smrg      fi
657825b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
657925b89263Smrg      _LT_TAGVAR(hardcode_direct, $1)=yes
658025b89263Smrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
658125b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
658225b89263Smrg      ;;
6583a253d6aeSmrg
658425b89263Smrg    sysv4)
658525b89263Smrg      case $host_vendor in
658625b89263Smrg	sni)
658725b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
658825b89263Smrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
658925b89263Smrg	;;
659025b89263Smrg	siemens)
659125b89263Smrg	  ## LD is ld it makes a PLAMLIB
659225b89263Smrg	  ## CC just makes a GrossModule.
659325b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
659425b89263Smrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
659525b89263Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no
659625b89263Smrg        ;;
659725b89263Smrg	motorola)
659825b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
659925b89263Smrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
660025b89263Smrg	;;
660125b89263Smrg      esac
660225b89263Smrg      runpath_var='LD_RUN_PATH'
660325b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
660425b89263Smrg      ;;
6605a253d6aeSmrg
660625b89263Smrg    sysv4.3*)
660725b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
660825b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
660925b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
661025b89263Smrg      ;;
6611a253d6aeSmrg
661225b89263Smrg    sysv4*MP*)
661325b89263Smrg      if test -d /usr/nec; then
661425b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
661525b89263Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
661625b89263Smrg	runpath_var=LD_RUN_PATH
661725b89263Smrg	hardcode_runpath_var=yes
661825b89263Smrg	_LT_TAGVAR(ld_shlibs, $1)=yes
661925b89263Smrg      fi
662025b89263Smrg      ;;
6621ea133fd7Smrg
662225b89263Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
662325b89263Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
662425b89263Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
662525b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
662625b89263Smrg      runpath_var='LD_RUN_PATH'
6627a253d6aeSmrg
662825b89263Smrg      if test "$GCC" = yes; then
662925b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
663025b89263Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
663125b89263Smrg      else
663225b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
663325b89263Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
663425b89263Smrg      fi
663525b89263Smrg      ;;
6636a253d6aeSmrg
663725b89263Smrg    sysv5* | sco3.2v5* | sco5v6*)
663825b89263Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
663925b89263Smrg      # link with -lc, and that would cause any symbols used from libc to
664025b89263Smrg      # always be unresolved, which means just about no library would
664125b89263Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
664225b89263Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
664325b89263Smrg      # as -z defs.
664425b89263Smrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
664525b89263Smrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
664625b89263Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
664725b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
664825b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
664925b89263Smrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
665025b89263Smrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
665125b89263Smrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
665225b89263Smrg      runpath_var='LD_RUN_PATH'
6653a253d6aeSmrg
665425b89263Smrg      if test "$GCC" = yes; then
665525b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
665625b89263Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
665725b89263Smrg      else
665825b89263Smrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
665925b89263Smrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
666025b89263Smrg      fi
666125b89263Smrg      ;;
6662a253d6aeSmrg
666325b89263Smrg    uts4*)
666425b89263Smrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
666525b89263Smrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
666625b89263Smrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
666725b89263Smrg      ;;
6668a253d6aeSmrg
666925b89263Smrg    *)
667025b89263Smrg      _LT_TAGVAR(ld_shlibs, $1)=no
667125b89263Smrg      ;;
667225b89263Smrg    esac
6673ea133fd7Smrg
667425b89263Smrg    if test x$host_vendor = xsni; then
667525b89263Smrg      case $host in
667625b89263Smrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
667725b89263Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
667825b89263Smrg	;;
667925b89263Smrg      esac
668025b89263Smrg    fi
668125b89263Smrg  fi
668225b89263Smrg])
668325b89263SmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
668425b89263Smrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6685ea133fd7Smrg
668625b89263Smrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
6687ea133fd7Smrg
668825b89263Smrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
668925b89263Smrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
669025b89263Smrg_LT_DECL([], [extract_expsyms_cmds], [2],
669125b89263Smrg    [The commands to extract the exported symbol list from a shared archive])
6692ea133fd7Smrg
669325b89263Smrg#
669425b89263Smrg# Do we need to explicitly link libc?
669525b89263Smrg#
669625b89263Smrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
669725b89263Smrgx|xyes)
669825b89263Smrg  # Assume -lc should be added
669925b89263Smrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
6700a253d6aeSmrg
670125b89263Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
670225b89263Smrg    case $_LT_TAGVAR(archive_cmds, $1) in
670325b89263Smrg    *'~'*)
670425b89263Smrg      # FIXME: we may have to deal with multi-command sequences.
670525b89263Smrg      ;;
670625b89263Smrg    '$CC '*)
670725b89263Smrg      # Test whether the compiler implicitly links with -lc since on some
670825b89263Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
670925b89263Smrg      # to ld, don't add -lc before -lgcc.
671025b89263Smrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
671125b89263Smrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
671225b89263Smrg	[$RM conftest*
671325b89263Smrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
671425b89263Smrg
671525b89263Smrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
671625b89263Smrg	  soname=conftest
671725b89263Smrg	  lib=conftest
671825b89263Smrg	  libobjs=conftest.$ac_objext
671925b89263Smrg	  deplibs=
672025b89263Smrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
672125b89263Smrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
672225b89263Smrg	  compiler_flags=-v
672325b89263Smrg	  linker_flags=-v
672425b89263Smrg	  verstring=
672525b89263Smrg	  output_objdir=.
672625b89263Smrg	  libname=conftest
672725b89263Smrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
672825b89263Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
672925b89263Smrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
673025b89263Smrg	  then
673125b89263Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
673225b89263Smrg	  else
673325b89263Smrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
673425b89263Smrg	  fi
673525b89263Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
673625b89263Smrg	else
673725b89263Smrg	  cat conftest.err 1>&5
673825b89263Smrg	fi
673925b89263Smrg	$RM conftest*
674025b89263Smrg	])
674125b89263Smrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
674225b89263Smrg      ;;
674325b89263Smrg    esac
674425b89263Smrg  fi
674525b89263Smrg  ;;
674625b89263Smrgesac
6747a253d6aeSmrg
674825b89263Smrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
674925b89263Smrg    [Whether or not to add -lc for building shared libraries])
675025b89263Smrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
675125b89263Smrg    [enable_shared_with_static_runtimes], [0],
675225b89263Smrg    [Whether or not to disallow shared libs when runtime libs are static])
675325b89263Smrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
675425b89263Smrg    [Compiler flag to allow reflexive dlopens])
675525b89263Smrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
675625b89263Smrg    [Compiler flag to generate shared objects directly from archives])
675725b89263Smrg_LT_TAGDECL([], [compiler_needs_object], [1],
675825b89263Smrg    [Whether the compiler copes with passing no objects directly])
675925b89263Smrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
676025b89263Smrg    [Create an old-style archive from a shared archive])
676125b89263Smrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
676225b89263Smrg    [Create a temporary old-style archive to link instead of a shared archive])
676325b89263Smrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
676425b89263Smrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
676525b89263Smrg_LT_TAGDECL([], [module_cmds], [2],
676625b89263Smrg    [Commands used to build a loadable module if different from building
676725b89263Smrg    a shared archive.])
676825b89263Smrg_LT_TAGDECL([], [module_expsym_cmds], [2])
676925b89263Smrg_LT_TAGDECL([], [with_gnu_ld], [1],
677025b89263Smrg    [Whether we are building with GNU ld or not])
677125b89263Smrg_LT_TAGDECL([], [allow_undefined_flag], [1],
677225b89263Smrg    [Flag that allows shared libraries with undefined symbols to be built])
677325b89263Smrg_LT_TAGDECL([], [no_undefined_flag], [1],
677425b89263Smrg    [Flag that enforces no undefined symbols])
677525b89263Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
677625b89263Smrg    [Flag to hardcode $libdir into a binary during linking.
677725b89263Smrg    This must work even if $libdir does not exist])
677825b89263Smrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
677925b89263Smrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
678025b89263Smrg    during linking.  This must work even if $libdir does not exist]])
678125b89263Smrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
678225b89263Smrg    [Whether we need a single "-rpath" flag with a separated argument])
678325b89263Smrg_LT_TAGDECL([], [hardcode_direct], [0],
678425b89263Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
678525b89263Smrg    DIR into the resulting binary])
678625b89263Smrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
678725b89263Smrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
678825b89263Smrg    DIR into the resulting binary and the resulting library dependency is
678925b89263Smrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
679025b89263Smrg    library is relocated])
679125b89263Smrg_LT_TAGDECL([], [hardcode_minus_L], [0],
679225b89263Smrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
679325b89263Smrg    into the resulting binary])
679425b89263Smrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
679525b89263Smrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
679625b89263Smrg    into the resulting binary])
679725b89263Smrg_LT_TAGDECL([], [hardcode_automatic], [0],
679825b89263Smrg    [Set to "yes" if building a shared library automatically hardcodes DIR
679925b89263Smrg    into the library and all subsequent libraries and executables linked
680025b89263Smrg    against it])
680125b89263Smrg_LT_TAGDECL([], [inherit_rpath], [0],
680225b89263Smrg    [Set to yes if linker adds runtime paths of dependent libraries
680325b89263Smrg    to runtime path list])
680425b89263Smrg_LT_TAGDECL([], [link_all_deplibs], [0],
680525b89263Smrg    [Whether libtool must link a program against all its dependency libraries])
680625b89263Smrg_LT_TAGDECL([], [always_export_symbols], [0],
680725b89263Smrg    [Set to "yes" if exported symbols are required])
680825b89263Smrg_LT_TAGDECL([], [export_symbols_cmds], [2],
680925b89263Smrg    [The commands to list exported symbols])
681025b89263Smrg_LT_TAGDECL([], [exclude_expsyms], [1],
681125b89263Smrg    [Symbols that should not be listed in the preloaded symbols])
681225b89263Smrg_LT_TAGDECL([], [include_expsyms], [1],
681325b89263Smrg    [Symbols that must always be exported])
681425b89263Smrg_LT_TAGDECL([], [prelink_cmds], [2],
681525b89263Smrg    [Commands necessary for linking programs (against libraries) with templates])
681606f32fbeSmrg_LT_TAGDECL([], [postlink_cmds], [2],
681706f32fbeSmrg    [Commands necessary for finishing linking programs])
681825b89263Smrg_LT_TAGDECL([], [file_list_spec], [1],
681925b89263Smrg    [Specify filename containing input files])
682025b89263Smrgdnl FIXME: Not yet implemented
682125b89263Smrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
682225b89263Smrgdnl    [Compiler flag to generate thread safe objects])
682325b89263Smrg])# _LT_LINKER_SHLIBS
6824a253d6aeSmrg
6825a253d6aeSmrg
682625b89263Smrg# _LT_LANG_C_CONFIG([TAG])
682725b89263Smrg# ------------------------
682825b89263Smrg# Ensure that the configuration variables for a C compiler are suitably
682925b89263Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
683025b89263Smrg# the compiler configuration to `libtool'.
683125b89263Smrgm4_defun([_LT_LANG_C_CONFIG],
683225b89263Smrg[m4_require([_LT_DECL_EGREP])dnl
683325b89263Smrglt_save_CC="$CC"
683425b89263SmrgAC_LANG_PUSH(C)
6835a253d6aeSmrg
683625b89263Smrg# Source file extension for C test sources.
683725b89263Smrgac_ext=c
6838a253d6aeSmrg
683925b89263Smrg# Object file extension for compiled C test sources.
6840ea133fd7Smrgobjext=o
6841ea133fd7Smrg_LT_TAGVAR(objext, $1)=$objext
6842a253d6aeSmrg
6843ea133fd7Smrg# Code to be used in simple compile tests
684425b89263Smrglt_simple_compile_test_code="int some_variable = 0;"
6845a253d6aeSmrg
6846ea133fd7Smrg# Code to be used in simple link tests
684725b89263Smrglt_simple_link_test_code='int main(){return(0);}'
6848a253d6aeSmrg
6849ea133fd7Smrg_LT_TAG_COMPILER
685025b89263Smrg# Save the default compiler, since it gets overwritten when the other
685125b89263Smrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
685225b89263Smrgcompiler_DEFAULT=$CC
6853a253d6aeSmrg
6854ea133fd7Smrg# save warnings/boilerplate of simple test code
6855ea133fd7Smrg_LT_COMPILER_BOILERPLATE
6856ea133fd7Smrg_LT_LINKER_BOILERPLATE
6857a253d6aeSmrg
6858ea133fd7Smrgif test -n "$compiler"; then
685925b89263Smrg  _LT_COMPILER_NO_RTTI($1)
686025b89263Smrg  _LT_COMPILER_PIC($1)
686125b89263Smrg  _LT_COMPILER_C_O($1)
686225b89263Smrg  _LT_COMPILER_FILE_LOCKS($1)
686325b89263Smrg  _LT_LINKER_SHLIBS($1)
686425b89263Smrg  _LT_SYS_DYNAMIC_LINKER($1)
686525b89263Smrg  _LT_LINKER_HARDCODE_LIBPATH($1)
686625b89263Smrg  LT_SYS_DLOPEN_SELF
686725b89263Smrg  _LT_CMD_STRIPLIB
6868ea133fd7Smrg
686925b89263Smrg  # Report which library types will actually be built
687025b89263Smrg  AC_MSG_CHECKING([if libtool supports shared libraries])
687125b89263Smrg  AC_MSG_RESULT([$can_build_shared])
6872ea133fd7Smrg
687325b89263Smrg  AC_MSG_CHECKING([whether to build shared libraries])
687425b89263Smrg  test "$can_build_shared" = "no" && enable_shared=no
6875ea133fd7Smrg
687625b89263Smrg  # On AIX, shared libraries and static libraries use the same namespace, and
687725b89263Smrg  # are all built from PIC.
687825b89263Smrg  case $host_os in
687925b89263Smrg  aix3*)
688025b89263Smrg    test "$enable_shared" = yes && enable_static=no
688125b89263Smrg    if test -n "$RANLIB"; then
688225b89263Smrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
688325b89263Smrg      postinstall_cmds='$RANLIB $lib'
688425b89263Smrg    fi
688525b89263Smrg    ;;
6886ea133fd7Smrg
688725b89263Smrg  aix[[4-9]]*)
688825b89263Smrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
688925b89263Smrg      test "$enable_shared" = yes && enable_static=no
689025b89263Smrg    fi
689125b89263Smrg    ;;
6892ea133fd7Smrg  esac
689325b89263Smrg  AC_MSG_RESULT([$enable_shared])
6894ea133fd7Smrg
689525b89263Smrg  AC_MSG_CHECKING([whether to build static libraries])
689625b89263Smrg  # Make sure either enable_shared or enable_static is yes.
689725b89263Smrg  test "$enable_shared" = yes || enable_static=yes
689825b89263Smrg  AC_MSG_RESULT([$enable_static])
6899ea133fd7Smrg
690025b89263Smrg  _LT_CONFIG($1)
690125b89263Smrgfi
690225b89263SmrgAC_LANG_POP
690325b89263SmrgCC="$lt_save_CC"
690425b89263Smrg])# _LT_LANG_C_CONFIG
6905ea133fd7Smrg
6906ea133fd7Smrg
690725b89263Smrg# _LT_LANG_CXX_CONFIG([TAG])
690825b89263Smrg# --------------------------
690925b89263Smrg# Ensure that the configuration variables for a C++ compiler are suitably
691025b89263Smrg# defined.  These variables are subsequently used by _LT_CONFIG to write
691125b89263Smrg# the compiler configuration to `libtool'.
691225b89263Smrgm4_defun([_LT_LANG_CXX_CONFIG],
691325b89263Smrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
691425b89263Smrgm4_require([_LT_DECL_EGREP])dnl
691506f32fbeSmrgm4_require([_LT_PATH_MANIFEST_TOOL])dnl
691625b89263Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
691725b89263Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
691825b89263Smrg    (test "X$CXX" != "Xg++"))) ; then
691925b89263Smrg  AC_PROG_CXXCPP
692025b89263Smrgelse
692125b89263Smrg  _lt_caught_CXX_error=yes
692225b89263Smrgfi
6923ea133fd7Smrg
692425b89263SmrgAC_LANG_PUSH(C++)
692525b89263Smrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
692625b89263Smrg_LT_TAGVAR(allow_undefined_flag, $1)=
692725b89263Smrg_LT_TAGVAR(always_export_symbols, $1)=no
692825b89263Smrg_LT_TAGVAR(archive_expsym_cmds, $1)=
692925b89263Smrg_LT_TAGVAR(compiler_needs_object, $1)=no
693025b89263Smrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
693125b89263Smrg_LT_TAGVAR(hardcode_direct, $1)=no
693225b89263Smrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
693325b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
693425b89263Smrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
693525b89263Smrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
693625b89263Smrg_LT_TAGVAR(hardcode_minus_L, $1)=no
693725b89263Smrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
693825b89263Smrg_LT_TAGVAR(hardcode_automatic, $1)=no
693925b89263Smrg_LT_TAGVAR(inherit_rpath, $1)=no
694025b89263Smrg_LT_TAGVAR(module_cmds, $1)=
694125b89263Smrg_LT_TAGVAR(module_expsym_cmds, $1)=
694225b89263Smrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
694325b89263Smrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
694425b89263Smrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
694525b89263Smrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
694625b89263Smrg_LT_TAGVAR(no_undefined_flag, $1)=
694725b89263Smrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
694825b89263Smrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
6949ea133fd7Smrg
695025b89263Smrg# Source file extension for C++ test sources.
695125b89263Smrgac_ext=cpp
6952ea133fd7Smrg
695325b89263Smrg# Object file extension for compiled C++ test sources.
695425b89263Smrgobjext=o
695525b89263Smrg_LT_TAGVAR(objext, $1)=$objext
6956ea133fd7Smrg
695725b89263Smrg# No sense in running all these tests if we already determined that
695825b89263Smrg# the CXX compiler isn't working.  Some variables (like enable_shared)
695925b89263Smrg# are currently assumed to apply to all compilers on this platform,
696025b89263Smrg# and will be corrupted by setting them based on a non-working compiler.
696125b89263Smrgif test "$_lt_caught_CXX_error" != yes; then
696225b89263Smrg  # Code to be used in simple compile tests
696325b89263Smrg  lt_simple_compile_test_code="int some_variable = 0;"
6964ea133fd7Smrg
696525b89263Smrg  # Code to be used in simple link tests
696625b89263Smrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
6967ea133fd7Smrg
696825b89263Smrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
696925b89263Smrg  _LT_TAG_COMPILER
6970ea133fd7Smrg
697125b89263Smrg  # save warnings/boilerplate of simple test code
697225b89263Smrg  _LT_COMPILER_BOILERPLATE
697325b89263Smrg  _LT_LINKER_BOILERPLATE
6974ea133fd7Smrg
697525b89263Smrg  # Allow CC to be a program name with arguments.
697625b89263Smrg  lt_save_CC=$CC
697706f32fbeSmrg  lt_save_CFLAGS=$CFLAGS
697825b89263Smrg  lt_save_LD=$LD
697925b89263Smrg  lt_save_GCC=$GCC
698025b89263Smrg  GCC=$GXX
698125b89263Smrg  lt_save_with_gnu_ld=$with_gnu_ld
698225b89263Smrg  lt_save_path_LD=$lt_cv_path_LD
698325b89263Smrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
698425b89263Smrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
698525b89263Smrg  else
698625b89263Smrg    $as_unset lt_cv_prog_gnu_ld
698725b89263Smrg  fi
698825b89263Smrg  if test -n "${lt_cv_path_LDCXX+set}"; then
698925b89263Smrg    lt_cv_path_LD=$lt_cv_path_LDCXX
699025b89263Smrg  else
699125b89263Smrg    $as_unset lt_cv_path_LD
699225b89263Smrg  fi
699325b89263Smrg  test -z "${LDCXX+set}" || LD=$LDCXX
699425b89263Smrg  CC=${CXX-"c++"}
699506f32fbeSmrg  CFLAGS=$CXXFLAGS
699625b89263Smrg  compiler=$CC
699725b89263Smrg  _LT_TAGVAR(compiler, $1)=$CC
699825b89263Smrg  _LT_CC_BASENAME([$compiler])
6999ea133fd7Smrg
700025b89263Smrg  if test -n "$compiler"; then
700125b89263Smrg    # We don't want -fno-exception when compiling C++ code, so set the
700225b89263Smrg    # no_builtin_flag separately
700325b89263Smrg    if test "$GXX" = yes; then
700425b89263Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
700525b89263Smrg    else
700625b89263Smrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
700725b89263Smrg    fi
7008ea133fd7Smrg
700925b89263Smrg    if test "$GXX" = yes; then
701025b89263Smrg      # Set up default GNU C++ configuration
7011ea133fd7Smrg
701225b89263Smrg      LT_PATH_LD
7013ea133fd7Smrg
701425b89263Smrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
701525b89263Smrg      # archiving commands below assume that GNU ld is being used.
701625b89263Smrg      if test "$with_gnu_ld" = yes; then
701706f32fbeSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
701806f32fbeSmrg        _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'
7019ea133fd7Smrg
702025b89263Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
702125b89263Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7022ea133fd7Smrg
702325b89263Smrg        # If archive_cmds runs LD, not CC, wlarc should be empty
702425b89263Smrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
702525b89263Smrg        #     investigate it a little bit more. (MM)
702625b89263Smrg        wlarc='${wl}'
7027ea133fd7Smrg
702825b89263Smrg        # ancient GNU ld didn't support --whole-archive et. al.
702925b89263Smrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
703025b89263Smrg	  $GREP 'no-whole-archive' > /dev/null; then
703125b89263Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
703225b89263Smrg        else
703325b89263Smrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
703425b89263Smrg        fi
703525b89263Smrg      else
703625b89263Smrg        with_gnu_ld=no
703725b89263Smrg        wlarc=
7038ea133fd7Smrg
703925b89263Smrg        # A generic and very simple default shared library creation
704025b89263Smrg        # command for GNU C++ for the case where it uses the native
704125b89263Smrg        # linker, instead of GNU ld.  If possible, this setting should
704225b89263Smrg        # overridden to take advantage of the native linker features on
704325b89263Smrg        # the platform it is being used on.
704425b89263Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
704525b89263Smrg      fi
7046ea133fd7Smrg
704725b89263Smrg      # Commands to make compiler produce verbose output that lists
704825b89263Smrg      # what "hidden" libraries, object files and flags are used when
704925b89263Smrg      # linking a shared library.
705025b89263Smrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
7051ea133fd7Smrg
705225b89263Smrg    else
705325b89263Smrg      GXX=no
705425b89263Smrg      with_gnu_ld=no
705525b89263Smrg      wlarc=
705625b89263Smrg    fi
7057ea133fd7Smrg
705825b89263Smrg    # PORTME: fill in a description of your system's C++ link characteristics
705925b89263Smrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
706025b89263Smrg    _LT_TAGVAR(ld_shlibs, $1)=yes
706125b89263Smrg    case $host_os in
706225b89263Smrg      aix3*)
706325b89263Smrg        # FIXME: insert proper C++ library support
706425b89263Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
706525b89263Smrg        ;;
706625b89263Smrg      aix[[4-9]]*)
706725b89263Smrg        if test "$host_cpu" = ia64; then
706825b89263Smrg          # On IA64, the linker does run time linking by default, so we don't
706925b89263Smrg          # have to do anything special.
707025b89263Smrg          aix_use_runtimelinking=no
707125b89263Smrg          exp_sym_flag='-Bexport'
707225b89263Smrg          no_entry_flag=""
707325b89263Smrg        else
707425b89263Smrg          aix_use_runtimelinking=no
7075ea133fd7Smrg
707625b89263Smrg          # Test if we are trying to use run time linking or normal
707725b89263Smrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
707825b89263Smrg          # need to do runtime linking.
707925b89263Smrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
708025b89263Smrg	    for ld_flag in $LDFLAGS; do
708125b89263Smrg	      case $ld_flag in
708225b89263Smrg	      *-brtl*)
708325b89263Smrg	        aix_use_runtimelinking=yes
708425b89263Smrg	        break
708525b89263Smrg	        ;;
708625b89263Smrg	      esac
708725b89263Smrg	    done
708825b89263Smrg	    ;;
708925b89263Smrg          esac
7090ea133fd7Smrg
709125b89263Smrg          exp_sym_flag='-bexport'
709225b89263Smrg          no_entry_flag='-bnoentry'
709325b89263Smrg        fi
7094ea133fd7Smrg
709525b89263Smrg        # When large executables or shared objects are built, AIX ld can
709625b89263Smrg        # have problems creating the table of contents.  If linking a library
709725b89263Smrg        # or program results in "error TOC overflow" add -mminimal-toc to
709825b89263Smrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
709925b89263Smrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
7100ea133fd7Smrg
710125b89263Smrg        _LT_TAGVAR(archive_cmds, $1)=''
710225b89263Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
710325b89263Smrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
710425b89263Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
710525b89263Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
710625b89263Smrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
7107ea133fd7Smrg
710825b89263Smrg        if test "$GXX" = yes; then
710925b89263Smrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
711025b89263Smrg          # We only want to do this on AIX 4.2 and lower, the check
711125b89263Smrg          # below for broken collect2 doesn't work under 4.3+
711225b89263Smrg	  collect2name=`${CC} -print-prog-name=collect2`
711325b89263Smrg	  if test -f "$collect2name" &&
711425b89263Smrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
711525b89263Smrg	  then
711625b89263Smrg	    # We have reworked collect2
711725b89263Smrg	    :
711825b89263Smrg	  else
711925b89263Smrg	    # We have old collect2
712025b89263Smrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
712125b89263Smrg	    # It fails to find uninstalled libraries when the uninstalled
712225b89263Smrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
712325b89263Smrg	    # to unsupported forces relinking
712425b89263Smrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
712525b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
712625b89263Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
712725b89263Smrg	  fi
712825b89263Smrg          esac
712925b89263Smrg          shared_flag='-shared'
713025b89263Smrg	  if test "$aix_use_runtimelinking" = yes; then
713125b89263Smrg	    shared_flag="$shared_flag "'${wl}-G'
713225b89263Smrg	  fi
713325b89263Smrg        else
713425b89263Smrg          # not using gcc
713525b89263Smrg          if test "$host_cpu" = ia64; then
713625b89263Smrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
713725b89263Smrg	  # chokes on -Wl,-G. The following line is correct:
713825b89263Smrg	  shared_flag='-G'
713925b89263Smrg          else
714025b89263Smrg	    if test "$aix_use_runtimelinking" = yes; then
714125b89263Smrg	      shared_flag='${wl}-G'
714225b89263Smrg	    else
714325b89263Smrg	      shared_flag='${wl}-bM:SRE'
714425b89263Smrg	    fi
714525b89263Smrg          fi
714625b89263Smrg        fi
7147ea133fd7Smrg
714825b89263Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
714925b89263Smrg        # It seems that -bexpall does not export symbols beginning with
715025b89263Smrg        # underscore (_), so it is better to generate a list of symbols to
715125b89263Smrg	# export.
715225b89263Smrg        _LT_TAGVAR(always_export_symbols, $1)=yes
715325b89263Smrg        if test "$aix_use_runtimelinking" = yes; then
715425b89263Smrg          # Warning - without using the other runtime loading flags (-brtl),
715525b89263Smrg          # -berok will link without error, but may produce a broken library.
715625b89263Smrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
715725b89263Smrg          # Determine the default libpath from the value encoded in an empty
715825b89263Smrg          # executable.
715906f32fbeSmrg          _LT_SYS_MODULE_PATH_AIX([$1])
716025b89263Smrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
7161ea133fd7Smrg
716225b89263Smrg          _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"
716325b89263Smrg        else
716425b89263Smrg          if test "$host_cpu" = ia64; then
716525b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
716625b89263Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
716725b89263Smrg	    _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"
716825b89263Smrg          else
716925b89263Smrg	    # Determine the default libpath from the value encoded in an
717025b89263Smrg	    # empty executable.
717106f32fbeSmrg	    _LT_SYS_MODULE_PATH_AIX([$1])
717225b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
717325b89263Smrg	    # Warning - without using the other run time loading flags,
717425b89263Smrg	    # -berok will link without error, but may produce a broken library.
717525b89263Smrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
717625b89263Smrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
717725b89263Smrg	    if test "$with_gnu_ld" = yes; then
717825b89263Smrg	      # We only use this code for GNU lds that support --whole-archive.
717925b89263Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
718025b89263Smrg	    else
718125b89263Smrg	      # Exported symbols can be pulled into shared objects from archives
718225b89263Smrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
718325b89263Smrg	    fi
718425b89263Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
718525b89263Smrg	    # This is similar to how AIX traditionally builds its shared
718625b89263Smrg	    # libraries.
718725b89263Smrg	    _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'
718825b89263Smrg          fi
718925b89263Smrg        fi
719025b89263Smrg        ;;
7191ea133fd7Smrg
719225b89263Smrg      beos*)
719325b89263Smrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
719425b89263Smrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
719525b89263Smrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
719625b89263Smrg	  # support --undefined.  This deserves some investigation.  FIXME
719725b89263Smrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
719825b89263Smrg	else
719925b89263Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
720025b89263Smrg	fi
720125b89263Smrg	;;
7202ea133fd7Smrg
720325b89263Smrg      chorus*)
720425b89263Smrg        case $cc_basename in
720525b89263Smrg          *)
720625b89263Smrg	  # FIXME: insert proper C++ library support
720725b89263Smrg	  _LT_TAGVAR(ld_shlibs, $1)=no
720825b89263Smrg	  ;;
720925b89263Smrg        esac
721025b89263Smrg        ;;
7211ea133fd7Smrg
721225b89263Smrg      cygwin* | mingw* | pw32* | cegcc*)
721306f32fbeSmrg	case $GXX,$cc_basename in
721406f32fbeSmrg	,cl* | no,cl*)
721506f32fbeSmrg	  # Native MSVC
721606f32fbeSmrg	  # hardcode_libdir_flag_spec is actually meaningless, as there is
721706f32fbeSmrg	  # no search path for DLLs.
721806f32fbeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
721906f32fbeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
722006f32fbeSmrg	  _LT_TAGVAR(always_export_symbols, $1)=yes
722106f32fbeSmrg	  _LT_TAGVAR(file_list_spec, $1)='@'
722206f32fbeSmrg	  # Tell ltmain to make .lib files, not .a files.
722306f32fbeSmrg	  libext=lib
722406f32fbeSmrg	  # Tell ltmain to make .dll files, not .so files.
722506f32fbeSmrg	  shrext_cmds=".dll"
722606f32fbeSmrg	  # FIXME: Setting linknames here is a bad hack.
722706f32fbeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames='
722806f32fbeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
722906f32fbeSmrg	      $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp;
723006f32fbeSmrg	    else
723106f32fbeSmrg	      $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp;
723206f32fbeSmrg	    fi~
723306f32fbeSmrg	    $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~
723406f32fbeSmrg	    linknames='
723506f32fbeSmrg	  # The linker will not automatically build a static lib if we build a DLL.
723606f32fbeSmrg	  # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
723706f32fbeSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
723806f32fbeSmrg	  # Don't use ranlib
723906f32fbeSmrg	  _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib'
724006f32fbeSmrg	  _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~
724106f32fbeSmrg	    lt_tool_outputfile="@TOOL_OUTPUT@"~
724206f32fbeSmrg	    case $lt_outputfile in
724306f32fbeSmrg	      *.exe|*.EXE) ;;
724406f32fbeSmrg	      *)
724506f32fbeSmrg		lt_outputfile="$lt_outputfile.exe"
724606f32fbeSmrg		lt_tool_outputfile="$lt_tool_outputfile.exe"
724706f32fbeSmrg		;;
724806f32fbeSmrg	    esac~
724906f32fbeSmrg	    func_to_tool_file "$lt_outputfile"~
725006f32fbeSmrg	    if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then
725106f32fbeSmrg	      $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1;
725206f32fbeSmrg	      $RM "$lt_outputfile.manifest";
725306f32fbeSmrg	    fi'
725406f32fbeSmrg	  ;;
725506f32fbeSmrg	*)
725606f32fbeSmrg	  # g++
725706f32fbeSmrg	  # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
725806f32fbeSmrg	  # as there is no search path for DLLs.
725906f32fbeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
726006f32fbeSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
726106f32fbeSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
726206f32fbeSmrg	  _LT_TAGVAR(always_export_symbols, $1)=no
726306f32fbeSmrg	  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
726406f32fbeSmrg
726506f32fbeSmrg	  if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
726606f32fbeSmrg	    _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'
726706f32fbeSmrg	    # If the export-symbols file already is a .def file (1st line
726806f32fbeSmrg	    # is EXPORTS), use it as is; otherwise, prepend...
726906f32fbeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
727006f32fbeSmrg	      cp $export_symbols $output_objdir/$soname.def;
727106f32fbeSmrg	    else
727206f32fbeSmrg	      echo EXPORTS > $output_objdir/$soname.def;
727306f32fbeSmrg	      cat $export_symbols >> $output_objdir/$soname.def;
727406f32fbeSmrg	    fi~
727506f32fbeSmrg	    $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'
727606f32fbeSmrg	  else
727706f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
727806f32fbeSmrg	  fi
727906f32fbeSmrg	  ;;
728006f32fbeSmrg	esac
728106f32fbeSmrg	;;
728225b89263Smrg      darwin* | rhapsody*)
728325b89263Smrg        _LT_DARWIN_LINKER_FEATURES($1)
728425b89263Smrg	;;
7285ea133fd7Smrg
728625b89263Smrg      dgux*)
728725b89263Smrg        case $cc_basename in
728825b89263Smrg          ec++*)
728925b89263Smrg	    # FIXME: insert proper C++ library support
729025b89263Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
729125b89263Smrg	    ;;
729225b89263Smrg          ghcx*)
729325b89263Smrg	    # Green Hills C++ Compiler
729425b89263Smrg	    # FIXME: insert proper C++ library support
729525b89263Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
729625b89263Smrg	    ;;
729725b89263Smrg          *)
729825b89263Smrg	    # FIXME: insert proper C++ library support
729925b89263Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
730025b89263Smrg	    ;;
730125b89263Smrg        esac
730225b89263Smrg        ;;
7303ea133fd7Smrg
730425b89263Smrg      freebsd[[12]]*)
730525b89263Smrg        # C++ shared libraries reported to be fairly broken before
730625b89263Smrg	# switch to ELF
730725b89263Smrg        _LT_TAGVAR(ld_shlibs, $1)=no
730825b89263Smrg        ;;
7309ea133fd7Smrg
731025b89263Smrg      freebsd-elf*)
731125b89263Smrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
731225b89263Smrg        ;;
7313ea133fd7Smrg
731425b89263Smrg      freebsd* | dragonfly*)
731525b89263Smrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
731625b89263Smrg        # conventions
731725b89263Smrg        _LT_TAGVAR(ld_shlibs, $1)=yes
731825b89263Smrg        ;;
7319ea133fd7Smrg
732025b89263Smrg      gnu*)
732125b89263Smrg        ;;
7322ea133fd7Smrg
732325b89263Smrg      haiku*)
732425b89263Smrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
732525b89263Smrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
732625b89263Smrg        ;;
7327ea133fd7Smrg
732825b89263Smrg      hpux9*)
732925b89263Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
733025b89263Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
733125b89263Smrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
733225b89263Smrg        _LT_TAGVAR(hardcode_direct, $1)=yes
733325b89263Smrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
733425b89263Smrg				             # but as the default
733525b89263Smrg				             # location of the library.
7336ea133fd7Smrg
733725b89263Smrg        case $cc_basename in
733825b89263Smrg          CC*)
733925b89263Smrg            # FIXME: insert proper C++ library support
734025b89263Smrg            _LT_TAGVAR(ld_shlibs, $1)=no
734125b89263Smrg            ;;
734225b89263Smrg          aCC*)
734325b89263Smrg            _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'
734425b89263Smrg            # Commands to make compiler produce verbose output that lists
734525b89263Smrg            # what "hidden" libraries, object files and flags are used when
734625b89263Smrg            # linking a shared library.
734725b89263Smrg            #
734825b89263Smrg            # There doesn't appear to be a way to prevent this compiler from
734925b89263Smrg            # explicitly linking system object files so we need to strip them
735025b89263Smrg            # from the output so that they don't get included in the library
735125b89263Smrg            # dependencies.
735225b89263Smrg            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"'
735325b89263Smrg            ;;
735425b89263Smrg          *)
735525b89263Smrg            if test "$GXX" = yes; then
735606f32fbeSmrg              _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'
735725b89263Smrg            else
735825b89263Smrg              # FIXME: insert proper C++ library support
735925b89263Smrg              _LT_TAGVAR(ld_shlibs, $1)=no
736025b89263Smrg            fi
736125b89263Smrg            ;;
736225b89263Smrg        esac
736325b89263Smrg        ;;
7364ea133fd7Smrg
736525b89263Smrg      hpux10*|hpux11*)
736625b89263Smrg        if test $with_gnu_ld = no; then
736725b89263Smrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
736825b89263Smrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7369ea133fd7Smrg
737025b89263Smrg          case $host_cpu in
737125b89263Smrg            hppa*64*|ia64*)
737225b89263Smrg              ;;
737325b89263Smrg            *)
737425b89263Smrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
737525b89263Smrg              ;;
737625b89263Smrg          esac
737725b89263Smrg        fi
737825b89263Smrg        case $host_cpu in
737925b89263Smrg          hppa*64*|ia64*)
738025b89263Smrg            _LT_TAGVAR(hardcode_direct, $1)=no
738125b89263Smrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
738225b89263Smrg            ;;
738325b89263Smrg          *)
738425b89263Smrg            _LT_TAGVAR(hardcode_direct, $1)=yes
738525b89263Smrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
738625b89263Smrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
738725b89263Smrg					         # but as the default
738825b89263Smrg					         # location of the library.
738925b89263Smrg            ;;
739025b89263Smrg        esac
7391ea133fd7Smrg
739225b89263Smrg        case $cc_basename in
739325b89263Smrg          CC*)
739425b89263Smrg	    # FIXME: insert proper C++ library support
739525b89263Smrg	    _LT_TAGVAR(ld_shlibs, $1)=no
739625b89263Smrg	    ;;
739725b89263Smrg          aCC*)
739825b89263Smrg	    case $host_cpu in
739925b89263Smrg	      hppa*64*)
740025b89263Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
740125b89263Smrg	        ;;
740225b89263Smrg	      ia64*)
740325b89263Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
740425b89263Smrg	        ;;
740525b89263Smrg	      *)
740625b89263Smrg	        _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'
740725b89263Smrg	        ;;
740825b89263Smrg	    esac
740925b89263Smrg	    # Commands to make compiler produce verbose output that lists
741025b89263Smrg	    # what "hidden" libraries, object files and flags are used when
741125b89263Smrg	    # linking a shared library.
741225b89263Smrg	    #
741325b89263Smrg	    # There doesn't appear to be a way to prevent this compiler from
741425b89263Smrg	    # explicitly linking system object files so we need to strip them
741525b89263Smrg	    # from the output so that they don't get included in the library
741625b89263Smrg	    # dependencies.
741725b89263Smrg	    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"'
741825b89263Smrg	    ;;
741925b89263Smrg          *)
742025b89263Smrg	    if test "$GXX" = yes; then
742125b89263Smrg	      if test $with_gnu_ld = no; then
742225b89263Smrg	        case $host_cpu in
742325b89263Smrg	          hppa*64*)
742425b89263Smrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
742525b89263Smrg	            ;;
742625b89263Smrg	          ia64*)
742706f32fbeSmrg	            _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'
742825b89263Smrg	            ;;
742925b89263Smrg	          *)
743006f32fbeSmrg	            _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'
743125b89263Smrg	            ;;
743225b89263Smrg	        esac
743325b89263Smrg	      fi
743425b89263Smrg	    else
743525b89263Smrg	      # FIXME: insert proper C++ library support
743625b89263Smrg	      _LT_TAGVAR(ld_shlibs, $1)=no
743725b89263Smrg	    fi
743825b89263Smrg	    ;;
743925b89263Smrg        esac
744025b89263Smrg        ;;
7441ea133fd7Smrg
744225b89263Smrg      interix[[3-9]]*)
744325b89263Smrg	_LT_TAGVAR(hardcode_direct, $1)=no
744425b89263Smrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
744525b89263Smrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
744625b89263Smrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
744725b89263Smrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
744825b89263Smrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
744925b89263Smrg	# default) and relocated if they conflict, which is a slow very memory
745025b89263Smrg	# consuming and fragmenting process.  To avoid this, we pick a random,
745125b89263Smrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
745225b89263Smrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
745325b89263Smrg	_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'
745425b89263Smrg	_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'
745525b89263Smrg	;;
745625b89263Smrg      irix5* | irix6*)
745725b89263Smrg        case $cc_basename in
745825b89263Smrg          CC*)
745925b89263Smrg	    # SGI C++
746025b89263Smrg	    _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'
7461ea133fd7Smrg
746225b89263Smrg	    # Archives containing C++ object files must be created using
746325b89263Smrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
746425b89263Smrg	    # necessary to make sure instantiated templates are included
746525b89263Smrg	    # in the archive.
746625b89263Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
746725b89263Smrg	    ;;
746825b89263Smrg          *)
746925b89263Smrg	    if test "$GXX" = yes; then
747025b89263Smrg	      if test "$with_gnu_ld" = no; then
747106f32fbeSmrg	        _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'
747225b89263Smrg	      else
747306f32fbeSmrg	        _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'
747425b89263Smrg	      fi
747525b89263Smrg	    fi
747625b89263Smrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
747725b89263Smrg	    ;;
747825b89263Smrg        esac
747925b89263Smrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
748025b89263Smrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
748125b89263Smrg        _LT_TAGVAR(inherit_rpath, $1)=yes
748225b89263Smrg        ;;
7483ea133fd7Smrg
748425b89263Smrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
748525b89263Smrg        case $cc_basename in
748625b89263Smrg          KCC*)
748725b89263Smrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
7488ea133fd7Smrg
748925b89263Smrg	    # KCC will only create a shared library if the output file
749025b89263Smrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
749125b89263Smrg	    # to its proper name (with version) after linking.
749225b89263Smrg	    _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'
749325b89263Smrg	    _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'
749425b89263Smrg	    # Commands to make compiler produce verbose output that lists
749525b89263Smrg	    # what "hidden" libraries, object files and flags are used when
749625b89263Smrg	    # linking a shared library.
749725b89263Smrg	    #
749825b89263Smrg	    # There doesn't appear to be a way to prevent this compiler from
749925b89263Smrg	    # explicitly linking system object files so we need to strip them
750025b89263Smrg	    # from the output so that they don't get included in the library
750125b89263Smrg	    # dependencies.
750225b89263Smrg	    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"'
7503ea133fd7Smrg
750425b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
750525b89263Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
7506ea133fd7Smrg
750725b89263Smrg	    # Archives containing C++ object files must be created using
750825b89263Smrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
750925b89263Smrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
751025b89263Smrg	    ;;
751125b89263Smrg	  icpc* | ecpc* )
751225b89263Smrg	    # Intel C++
751325b89263Smrg	    with_gnu_ld=yes
751425b89263Smrg	    # version 8.0 and above of icpc choke on multiply defined symbols
751525b89263Smrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
751625b89263Smrg	    # earlier do not add the objects themselves.
751725b89263Smrg	    case `$CC -V 2>&1` in
751825b89263Smrg	      *"Version 7."*)
751925b89263Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
752025b89263Smrg		_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'
752125b89263Smrg		;;
752225b89263Smrg	      *)  # Version 8.0 or newer
752325b89263Smrg	        tmp_idyn=
752425b89263Smrg	        case $host_cpu in
752525b89263Smrg		  ia64*) tmp_idyn=' -i_dynamic';;
752625b89263Smrg		esac
752725b89263Smrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
752825b89263Smrg		_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'
752925b89263Smrg		;;
753025b89263Smrg	    esac
753125b89263Smrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
753225b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
753325b89263Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
753425b89263Smrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
753525b89263Smrg	    ;;
753625b89263Smrg          pgCC* | pgcpp*)
753725b89263Smrg            # Portland Group C++ compiler
753825b89263Smrg	    case `$CC -V` in
753925b89263Smrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
754025b89263Smrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
754125b89263Smrg		rm -rf $tpldir~
754225b89263Smrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
754325b89263Smrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
754425b89263Smrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
754525b89263Smrg		rm -rf $tpldir~
754625b89263Smrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
754725b89263Smrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
754825b89263Smrg		$RANLIB $oldlib'
754925b89263Smrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
755025b89263Smrg		rm -rf $tpldir~
755125b89263Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
755225b89263Smrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
755325b89263Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
755425b89263Smrg		rm -rf $tpldir~
755525b89263Smrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
755625b89263Smrg		$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'
755725b89263Smrg	      ;;
755825b89263Smrg	    *) # Version 6 and above use weak symbols
755925b89263Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
756025b89263Smrg	      _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'
756125b89263Smrg	      ;;
756225b89263Smrg	    esac
7563ea133fd7Smrg
756425b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
756525b89263Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
756625b89263Smrg	    _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'
756725b89263Smrg            ;;
756825b89263Smrg	  cxx*)
756925b89263Smrg	    # Compaq C++
757025b89263Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
757125b89263Smrg	    _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'
7572ea133fd7Smrg
757325b89263Smrg	    runpath_var=LD_RUN_PATH
757425b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
757525b89263Smrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
7576ea133fd7Smrg
757725b89263Smrg	    # Commands to make compiler produce verbose output that lists
757825b89263Smrg	    # what "hidden" libraries, object files and flags are used when
757925b89263Smrg	    # linking a shared library.
758025b89263Smrg	    #
758125b89263Smrg	    # There doesn't appear to be a way to prevent this compiler from
758225b89263Smrg	    # explicitly linking system object files so we need to strip them
758325b89263Smrg	    # from the output so that they don't get included in the library
758425b89263Smrg	    # dependencies.
758525b89263Smrg	    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'
758625b89263Smrg	    ;;
758725b89263Smrg	  xl* | mpixl* | bgxl*)
758825b89263Smrg	    # IBM XL 8.0 on PPC, with GNU ld
758925b89263Smrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
759025b89263Smrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
759125b89263Smrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
759225b89263Smrg	    if test "x$supports_anon_versioning" = xyes; then
759325b89263Smrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
759425b89263Smrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
759525b89263Smrg		echo "local: *; };" >> $output_objdir/$libname.ver~
759625b89263Smrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
759725b89263Smrg	    fi
759825b89263Smrg	    ;;
759925b89263Smrg	  *)
760025b89263Smrg	    case `$CC -V 2>&1 | sed 5q` in
760125b89263Smrg	    *Sun\ C*)
760225b89263Smrg	      # Sun C++ 5.9
760325b89263Smrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
760425b89263Smrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
760525b89263Smrg	      _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'
760625b89263Smrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
760725b89263Smrg	      _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'
760825b89263Smrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
7609ea133fd7Smrg
761006f32fbeSmrg	      # Not sure whether something based on
761106f32fbeSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
761206f32fbeSmrg	      # would be better.
761306f32fbeSmrg	      output_verbose_link_cmd='func_echo_all'
761406f32fbeSmrg
761506f32fbeSmrg	      # Archives containing C++ object files must be created using
761606f32fbeSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
761706f32fbeSmrg	      # necessary to make sure instantiated templates are included
761806f32fbeSmrg	      # in the archive.
761906f32fbeSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
762006f32fbeSmrg	      ;;
762106f32fbeSmrg	    esac
762206f32fbeSmrg	    ;;
762306f32fbeSmrg	esac
762406f32fbeSmrg	;;
762506f32fbeSmrg
762606f32fbeSmrg      lynxos*)
762706f32fbeSmrg        # FIXME: insert proper C++ library support
762806f32fbeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
762906f32fbeSmrg	;;
763006f32fbeSmrg
763106f32fbeSmrg      m88k*)
763206f32fbeSmrg        # FIXME: insert proper C++ library support
763306f32fbeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
763406f32fbeSmrg	;;
763506f32fbeSmrg
763606f32fbeSmrg      mvs*)
763706f32fbeSmrg        case $cc_basename in
763806f32fbeSmrg          cxx*)
763906f32fbeSmrg	    # FIXME: insert proper C++ library support
764006f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
764106f32fbeSmrg	    ;;
764206f32fbeSmrg	  *)
764306f32fbeSmrg	    # FIXME: insert proper C++ library support
764406f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
764506f32fbeSmrg	    ;;
764606f32fbeSmrg	esac
764706f32fbeSmrg	;;
764806f32fbeSmrg
764906f32fbeSmrg      netbsd*)
765006f32fbeSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
765106f32fbeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
765206f32fbeSmrg	  wlarc=
765306f32fbeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
765406f32fbeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
765506f32fbeSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
765606f32fbeSmrg	fi
765706f32fbeSmrg	# Workaround some broken pre-1.5 toolchains
765806f32fbeSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
765906f32fbeSmrg	;;
766006f32fbeSmrg
766106f32fbeSmrg      *nto* | *qnx*)
766206f32fbeSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
766306f32fbeSmrg	;;
766406f32fbeSmrg
766506f32fbeSmrg      openbsd2*)
766606f32fbeSmrg        # C++ shared libraries are fairly broken
766706f32fbeSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
766806f32fbeSmrg	;;
766906f32fbeSmrg
767006f32fbeSmrg      openbsd*)
767106f32fbeSmrg	if test -f /usr/libexec/ld.so; then
767206f32fbeSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
767306f32fbeSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
767406f32fbeSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
767506f32fbeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
767606f32fbeSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
767706f32fbeSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
767806f32fbeSmrg	    _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'
767906f32fbeSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
768006f32fbeSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
768106f32fbeSmrg	  fi
768206f32fbeSmrg	  output_verbose_link_cmd=func_echo_all
768306f32fbeSmrg	else
768406f32fbeSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
768506f32fbeSmrg	fi
768606f32fbeSmrg	;;
768706f32fbeSmrg
768806f32fbeSmrg      osf3* | osf4* | osf5*)
768906f32fbeSmrg        case $cc_basename in
769006f32fbeSmrg          KCC*)
769106f32fbeSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
769206f32fbeSmrg
769306f32fbeSmrg	    # KCC will only create a shared library if the output file
769406f32fbeSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
769506f32fbeSmrg	    # to its proper name (with version) after linking.
769606f32fbeSmrg	    _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'
769706f32fbeSmrg
769806f32fbeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
769906f32fbeSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
770006f32fbeSmrg
770106f32fbeSmrg	    # Archives containing C++ object files must be created using
770206f32fbeSmrg	    # the KAI C++ compiler.
770306f32fbeSmrg	    case $host in
770406f32fbeSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
770506f32fbeSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
770606f32fbeSmrg	    esac
770706f32fbeSmrg	    ;;
770806f32fbeSmrg          RCC*)
770906f32fbeSmrg	    # Rational C++ 2.4.1
771006f32fbeSmrg	    # FIXME: insert proper C++ library support
771106f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
771206f32fbeSmrg	    ;;
771306f32fbeSmrg          cxx*)
771406f32fbeSmrg	    case $host in
771506f32fbeSmrg	      osf3*)
771606f32fbeSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
771706f32fbeSmrg	        _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'
771806f32fbeSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
771906f32fbeSmrg		;;
772006f32fbeSmrg	      *)
772106f32fbeSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
772206f32fbeSmrg	        _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'
772306f32fbeSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
772406f32fbeSmrg	          echo "-hidden">> $lib.exp~
772506f32fbeSmrg	          $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~
772606f32fbeSmrg	          $RM $lib.exp'
772706f32fbeSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
772806f32fbeSmrg		;;
772906f32fbeSmrg	    esac
773006f32fbeSmrg
773106f32fbeSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
773206f32fbeSmrg
773306f32fbeSmrg	    # Commands to make compiler produce verbose output that lists
773406f32fbeSmrg	    # what "hidden" libraries, object files and flags are used when
773506f32fbeSmrg	    # linking a shared library.
773606f32fbeSmrg	    #
773706f32fbeSmrg	    # There doesn't appear to be a way to prevent this compiler from
773806f32fbeSmrg	    # explicitly linking system object files so we need to strip them
773906f32fbeSmrg	    # from the output so that they don't get included in the library
774006f32fbeSmrg	    # dependencies.
774106f32fbeSmrg	    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"'
774206f32fbeSmrg	    ;;
774306f32fbeSmrg	  *)
774406f32fbeSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
774506f32fbeSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
774606f32fbeSmrg	      case $host in
774706f32fbeSmrg	        osf3*)
774806f32fbeSmrg	          _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'
774906f32fbeSmrg		  ;;
775006f32fbeSmrg	        *)
775106f32fbeSmrg	          _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'
775206f32fbeSmrg		  ;;
775306f32fbeSmrg	      esac
775406f32fbeSmrg
775506f32fbeSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
775606f32fbeSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
775706f32fbeSmrg
775806f32fbeSmrg	      # Commands to make compiler produce verbose output that lists
775906f32fbeSmrg	      # what "hidden" libraries, object files and flags are used when
776006f32fbeSmrg	      # linking a shared library.
776106f32fbeSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
776206f32fbeSmrg
776306f32fbeSmrg	    else
776406f32fbeSmrg	      # FIXME: insert proper C++ library support
776506f32fbeSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
776606f32fbeSmrg	    fi
776706f32fbeSmrg	    ;;
776806f32fbeSmrg        esac
776906f32fbeSmrg        ;;
777006f32fbeSmrg
777106f32fbeSmrg      psos*)
777206f32fbeSmrg        # FIXME: insert proper C++ library support
777306f32fbeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
777406f32fbeSmrg        ;;
777506f32fbeSmrg
777606f32fbeSmrg      sunos4*)
777706f32fbeSmrg        case $cc_basename in
777806f32fbeSmrg          CC*)
777906f32fbeSmrg	    # Sun C++ 4.x
778006f32fbeSmrg	    # FIXME: insert proper C++ library support
778106f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
778206f32fbeSmrg	    ;;
778306f32fbeSmrg          lcc*)
778406f32fbeSmrg	    # Lucid
778506f32fbeSmrg	    # FIXME: insert proper C++ library support
778606f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
778706f32fbeSmrg	    ;;
778806f32fbeSmrg          *)
778906f32fbeSmrg	    # FIXME: insert proper C++ library support
779006f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
779106f32fbeSmrg	    ;;
779206f32fbeSmrg        esac
779306f32fbeSmrg        ;;
779406f32fbeSmrg
779506f32fbeSmrg      solaris*)
779606f32fbeSmrg        case $cc_basename in
779706f32fbeSmrg          CC* | sunCC*)
779806f32fbeSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
779906f32fbeSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
780006f32fbeSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
780106f32fbeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
780206f32fbeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
780306f32fbeSmrg	      $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'
780406f32fbeSmrg
780506f32fbeSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
780606f32fbeSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
780706f32fbeSmrg	    case $host_os in
780806f32fbeSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
780906f32fbeSmrg	      *)
781006f32fbeSmrg		# The compiler driver will combine and reorder linker options,
781106f32fbeSmrg		# but understands `-z linker_flag'.
781206f32fbeSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
781306f32fbeSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
781406f32fbeSmrg	        ;;
781506f32fbeSmrg	    esac
781606f32fbeSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
781706f32fbeSmrg
781806f32fbeSmrg	    output_verbose_link_cmd='func_echo_all'
781906f32fbeSmrg
782006f32fbeSmrg	    # Archives containing C++ object files must be created using
782106f32fbeSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
782206f32fbeSmrg	    # necessary to make sure instantiated templates are included
782306f32fbeSmrg	    # in the archive.
782406f32fbeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
782506f32fbeSmrg	    ;;
782606f32fbeSmrg          gcx*)
782706f32fbeSmrg	    # Green Hills C++ Compiler
782806f32fbeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
782906f32fbeSmrg
783006f32fbeSmrg	    # The C++ compiler must be used to create the archive.
783106f32fbeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
783206f32fbeSmrg	    ;;
783306f32fbeSmrg          *)
783406f32fbeSmrg	    # GNU C++ compiler with Solaris linker
783506f32fbeSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
783606f32fbeSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
783706f32fbeSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
783806f32fbeSmrg	        _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'
783906f32fbeSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
784006f32fbeSmrg		  $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
784106f32fbeSmrg
784206f32fbeSmrg	        # Commands to make compiler produce verbose output that lists
784306f32fbeSmrg	        # what "hidden" libraries, object files and flags are used when
784406f32fbeSmrg	        # linking a shared library.
784506f32fbeSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
784606f32fbeSmrg	      else
784706f32fbeSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
784806f32fbeSmrg	        # platform.
784906f32fbeSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
785006f32fbeSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
785106f32fbeSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
785206f32fbeSmrg
785306f32fbeSmrg	        # Commands to make compiler produce verbose output that lists
785406f32fbeSmrg	        # what "hidden" libraries, object files and flags are used when
785506f32fbeSmrg	        # linking a shared library.
785606f32fbeSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
785706f32fbeSmrg	      fi
785806f32fbeSmrg
785906f32fbeSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
786006f32fbeSmrg	      case $host_os in
786106f32fbeSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
786206f32fbeSmrg		*)
786306f32fbeSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
786406f32fbeSmrg		  ;;
786506f32fbeSmrg	      esac
786606f32fbeSmrg	    fi
786706f32fbeSmrg	    ;;
786806f32fbeSmrg        esac
786906f32fbeSmrg        ;;
787006f32fbeSmrg
787106f32fbeSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
787206f32fbeSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
787306f32fbeSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
787406f32fbeSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
787506f32fbeSmrg      runpath_var='LD_RUN_PATH'
787606f32fbeSmrg
787706f32fbeSmrg      case $cc_basename in
787806f32fbeSmrg        CC*)
787906f32fbeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
788006f32fbeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
788106f32fbeSmrg	  ;;
788206f32fbeSmrg	*)
788306f32fbeSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
788406f32fbeSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
788506f32fbeSmrg	  ;;
788606f32fbeSmrg      esac
788706f32fbeSmrg      ;;
788806f32fbeSmrg
788906f32fbeSmrg      sysv5* | sco3.2v5* | sco5v6*)
789006f32fbeSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
789106f32fbeSmrg	# link with -lc, and that would cause any symbols used from libc to
789206f32fbeSmrg	# always be unresolved, which means just about no library would
789306f32fbeSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
789406f32fbeSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
789506f32fbeSmrg	# as -z defs.
789606f32fbeSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
789706f32fbeSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
789806f32fbeSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
789906f32fbeSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
790006f32fbeSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
790106f32fbeSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
790206f32fbeSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
790306f32fbeSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
790406f32fbeSmrg	runpath_var='LD_RUN_PATH'
790506f32fbeSmrg
790606f32fbeSmrg	case $cc_basename in
790706f32fbeSmrg          CC*)
790806f32fbeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
790906f32fbeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
791006f32fbeSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
791106f32fbeSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
791206f32fbeSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
791306f32fbeSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
791406f32fbeSmrg	    ;;
791506f32fbeSmrg	  *)
791606f32fbeSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
791706f32fbeSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
791806f32fbeSmrg	    ;;
791906f32fbeSmrg	esac
792006f32fbeSmrg      ;;
792106f32fbeSmrg
792206f32fbeSmrg      tandem*)
792306f32fbeSmrg        case $cc_basename in
792406f32fbeSmrg          NCC*)
792506f32fbeSmrg	    # NonStop-UX NCC 3.20
792606f32fbeSmrg	    # FIXME: insert proper C++ library support
792706f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
792806f32fbeSmrg	    ;;
792906f32fbeSmrg          *)
793006f32fbeSmrg	    # FIXME: insert proper C++ library support
793106f32fbeSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
793206f32fbeSmrg	    ;;
793306f32fbeSmrg        esac
793406f32fbeSmrg        ;;
793506f32fbeSmrg
793606f32fbeSmrg      vxworks*)
793706f32fbeSmrg        # FIXME: insert proper C++ library support
793806f32fbeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
793906f32fbeSmrg        ;;
794006f32fbeSmrg
794106f32fbeSmrg      *)
794206f32fbeSmrg        # FIXME: insert proper C++ library support
794306f32fbeSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
794406f32fbeSmrg        ;;
794506f32fbeSmrg    esac
794606f32fbeSmrg
794706f32fbeSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
794806f32fbeSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
794906f32fbeSmrg
795006f32fbeSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
795106f32fbeSmrg    _LT_TAGVAR(LD, $1)="$LD"
795206f32fbeSmrg
795306f32fbeSmrg    ## CAVEAT EMPTOR:
795406f32fbeSmrg    ## There is no encapsulation within the following macros, do not change
795506f32fbeSmrg    ## the running order or otherwise move them around unless you know exactly
795606f32fbeSmrg    ## what you are doing...
795706f32fbeSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
795806f32fbeSmrg    _LT_COMPILER_PIC($1)
795906f32fbeSmrg    _LT_COMPILER_C_O($1)
796006f32fbeSmrg    _LT_COMPILER_FILE_LOCKS($1)
796106f32fbeSmrg    _LT_LINKER_SHLIBS($1)
796206f32fbeSmrg    _LT_SYS_DYNAMIC_LINKER($1)
796306f32fbeSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
796406f32fbeSmrg
796506f32fbeSmrg    _LT_CONFIG($1)
796606f32fbeSmrg  fi # test -n "$compiler"
796706f32fbeSmrg
796806f32fbeSmrg  CC=$lt_save_CC
796906f32fbeSmrg  CFLAGS=$lt_save_CFLAGS
797006f32fbeSmrg  LDCXX=$LD
797106f32fbeSmrg  LD=$lt_save_LD
797206f32fbeSmrg  GCC=$lt_save_GCC
797306f32fbeSmrg  with_gnu_ld=$lt_save_with_gnu_ld
797406f32fbeSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
797506f32fbeSmrg  lt_cv_path_LD=$lt_save_path_LD
797606f32fbeSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
797706f32fbeSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
797806f32fbeSmrgfi # test "$_lt_caught_CXX_error" != yes
797906f32fbeSmrg
798006f32fbeSmrgAC_LANG_POP
798106f32fbeSmrg])# _LT_LANG_CXX_CONFIG
798206f32fbeSmrg
798306f32fbeSmrg
798406f32fbeSmrg# _LT_FUNC_STRIPNAME_CNF
798506f32fbeSmrg# ----------------------
798606f32fbeSmrg# func_stripname_cnf prefix suffix name
798706f32fbeSmrg# strip PREFIX and SUFFIX off of NAME.
798806f32fbeSmrg# PREFIX and SUFFIX must not contain globbing or regex special
798906f32fbeSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
799006f32fbeSmrg# dot (in which case that matches only a dot).
799106f32fbeSmrg#
799206f32fbeSmrg# This function is identical to the (non-XSI) version of func_stripname,
799306f32fbeSmrg# except this one can be used by m4 code that may be executed by configure,
799406f32fbeSmrg# rather than the libtool script.
799506f32fbeSmrgm4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl
799606f32fbeSmrgAC_REQUIRE([_LT_DECL_SED])
799706f32fbeSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])
799806f32fbeSmrgfunc_stripname_cnf ()
799906f32fbeSmrg{
800006f32fbeSmrg  case ${2} in
800106f32fbeSmrg  .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
800206f32fbeSmrg  *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
800306f32fbeSmrg  esac
800406f32fbeSmrg} # func_stripname_cnf
800506f32fbeSmrg])# _LT_FUNC_STRIPNAME_CNF
800606f32fbeSmrg
800706f32fbeSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
800806f32fbeSmrg# ---------------------------------
800906f32fbeSmrg# Figure out "hidden" library dependencies from verbose
801006f32fbeSmrg# compiler output when linking a shared library.
801106f32fbeSmrg# Parse the compiler output and extract the necessary
801206f32fbeSmrg# objects, libraries and library flags.
801306f32fbeSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
801406f32fbeSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
801506f32fbeSmrgAC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl
801606f32fbeSmrg# Dependencies to place before and after the object being linked:
801706f32fbeSmrg_LT_TAGVAR(predep_objects, $1)=
801806f32fbeSmrg_LT_TAGVAR(postdep_objects, $1)=
801906f32fbeSmrg_LT_TAGVAR(predeps, $1)=
802006f32fbeSmrg_LT_TAGVAR(postdeps, $1)=
802106f32fbeSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
802206f32fbeSmrg
802306f32fbeSmrgdnl we can't use the lt_simple_compile_test_code here,
802406f32fbeSmrgdnl because it contains code intended for an executable,
802506f32fbeSmrgdnl not a library.  It's possible we should let each
802606f32fbeSmrgdnl tag define a new lt_????_link_test_code variable,
802706f32fbeSmrgdnl but it's only used here...
802806f32fbeSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
802906f32fbeSmrgint a;
803006f32fbeSmrgvoid foo (void) { a = 0; }
803106f32fbeSmrg_LT_EOF
803206f32fbeSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
803306f32fbeSmrgclass Foo
803406f32fbeSmrg{
803506f32fbeSmrgpublic:
803606f32fbeSmrg  Foo (void) { a = 0; }
803706f32fbeSmrgprivate:
803806f32fbeSmrg  int a;
803906f32fbeSmrg};
804006f32fbeSmrg_LT_EOF
804106f32fbeSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
804206f32fbeSmrg      subroutine foo
804306f32fbeSmrg      implicit none
804406f32fbeSmrg      integer*4 a
804506f32fbeSmrg      a=0
804606f32fbeSmrg      return
804706f32fbeSmrg      end
804806f32fbeSmrg_LT_EOF
804906f32fbeSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
805006f32fbeSmrg      subroutine foo
805106f32fbeSmrg      implicit none
805206f32fbeSmrg      integer a
805306f32fbeSmrg      a=0
805406f32fbeSmrg      return
805506f32fbeSmrg      end
805606f32fbeSmrg_LT_EOF
805706f32fbeSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
805806f32fbeSmrgpublic class foo {
805906f32fbeSmrg  private int a;
806006f32fbeSmrg  public void bar (void) {
806106f32fbeSmrg    a = 0;
806206f32fbeSmrg  }
806306f32fbeSmrg};
806406f32fbeSmrg_LT_EOF
806506f32fbeSmrg])
806606f32fbeSmrg
806706f32fbeSmrg_lt_libdeps_save_CFLAGS=$CFLAGS
806806f32fbeSmrgcase "$CC $CFLAGS " in #(
806906f32fbeSmrg*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;;
807006f32fbeSmrg*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;;
807106f32fbeSmrgesac
807206f32fbeSmrg
807306f32fbeSmrgdnl Parse the compiler output and extract the necessary
807406f32fbeSmrgdnl objects, libraries and library flags.
807506f32fbeSmrgif AC_TRY_EVAL(ac_compile); then
807606f32fbeSmrg  # Parse the compiler output and extract the necessary
807706f32fbeSmrg  # objects, libraries and library flags.
807806f32fbeSmrg
807906f32fbeSmrg  # Sentinel used to keep track of whether or not we are before
808006f32fbeSmrg  # the conftest object file.
808106f32fbeSmrg  pre_test_object_deps_done=no
808206f32fbeSmrg
808306f32fbeSmrg  for p in `eval "$output_verbose_link_cmd"`; do
808406f32fbeSmrg    case ${prev}${p} in
808506f32fbeSmrg
808606f32fbeSmrg    -L* | -R* | -l*)
808706f32fbeSmrg       # Some compilers place space between "-{L,R}" and the path.
808806f32fbeSmrg       # Remove the space.
808906f32fbeSmrg       if test $p = "-L" ||
809006f32fbeSmrg          test $p = "-R"; then
809106f32fbeSmrg	 prev=$p
809206f32fbeSmrg	 continue
809306f32fbeSmrg       fi
809406f32fbeSmrg
809506f32fbeSmrg       # Expand the sysroot to ease extracting the directories later.
809606f32fbeSmrg       if test -z "$prev"; then
809706f32fbeSmrg         case $p in
809806f32fbeSmrg         -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;;
809906f32fbeSmrg         -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;;
810006f32fbeSmrg         -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;;
810106f32fbeSmrg         esac
810206f32fbeSmrg       fi
810306f32fbeSmrg       case $p in
810406f32fbeSmrg       =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;;
810506f32fbeSmrg       esac
810606f32fbeSmrg       if test "$pre_test_object_deps_done" = no; then
810706f32fbeSmrg	 case ${prev} in
810806f32fbeSmrg	 -L | -R)
810906f32fbeSmrg	   # Internal compiler library paths should come after those
811006f32fbeSmrg	   # provided the user.  The postdeps already come after the
811106f32fbeSmrg	   # user supplied libs so there is no need to process them.
811206f32fbeSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
811306f32fbeSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
811406f32fbeSmrg	   else
811506f32fbeSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
811606f32fbeSmrg	   fi
811706f32fbeSmrg	   ;;
811806f32fbeSmrg	 # The "-l" case would never come before the object being
811906f32fbeSmrg	 # linked, so don't bother handling this case.
812006f32fbeSmrg	 esac
812106f32fbeSmrg       else
812206f32fbeSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
812306f32fbeSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
812406f32fbeSmrg	 else
812506f32fbeSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
812606f32fbeSmrg	 fi
812706f32fbeSmrg       fi
812806f32fbeSmrg       prev=
812906f32fbeSmrg       ;;
813006f32fbeSmrg
813106f32fbeSmrg    *.lto.$objext) ;; # Ignore GCC LTO objects
813206f32fbeSmrg    *.$objext)
813306f32fbeSmrg       # This assumes that the test object file only shows up
813406f32fbeSmrg       # once in the compiler output.
813506f32fbeSmrg       if test "$p" = "conftest.$objext"; then
813606f32fbeSmrg	 pre_test_object_deps_done=yes
813706f32fbeSmrg	 continue
813806f32fbeSmrg       fi
813906f32fbeSmrg
814006f32fbeSmrg       if test "$pre_test_object_deps_done" = no; then
814106f32fbeSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
814206f32fbeSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
814306f32fbeSmrg	 else
814406f32fbeSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
814506f32fbeSmrg	 fi
814606f32fbeSmrg       else
814706f32fbeSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
814806f32fbeSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
814906f32fbeSmrg	 else
815006f32fbeSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
815106f32fbeSmrg	 fi
815206f32fbeSmrg       fi
815306f32fbeSmrg       ;;
8154ea133fd7Smrg
815506f32fbeSmrg    *) ;; # Ignore the rest.
8156ea133fd7Smrg
815706f32fbeSmrg    esac
815806f32fbeSmrg  done
8159ea133fd7Smrg
816006f32fbeSmrg  # Clean up.
816106f32fbeSmrg  rm -f a.out a.exe
816206f32fbeSmrgelse
816306f32fbeSmrg  echo "libtool.m4: error: problem compiling $1 test program"
816406f32fbeSmrgfi
8165ea133fd7Smrg
816606f32fbeSmrg$RM -f confest.$objext
816706f32fbeSmrgCFLAGS=$_lt_libdeps_save_CFLAGS
8168ea133fd7Smrg
816906f32fbeSmrg# PORTME: override above test on systems where it is broken
817006f32fbeSmrgm4_if([$1], [CXX],
817106f32fbeSmrg[case $host_os in
817206f32fbeSmrginterix[[3-9]]*)
817306f32fbeSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
817406f32fbeSmrg  # hack all around it, let's just trust "g++" to DTRT.
817506f32fbeSmrg  _LT_TAGVAR(predep_objects,$1)=
817606f32fbeSmrg  _LT_TAGVAR(postdep_objects,$1)=
817706f32fbeSmrg  _LT_TAGVAR(postdeps,$1)=
817806f32fbeSmrg  ;;
8179ea133fd7Smrg
818006f32fbeSmrglinux*)
818106f32fbeSmrg  case `$CC -V 2>&1 | sed 5q` in
818206f32fbeSmrg  *Sun\ C*)
818306f32fbeSmrg    # Sun C++ 5.9
8184ea133fd7Smrg
818506f32fbeSmrg    # The more standards-conforming stlport4 library is
818606f32fbeSmrg    # incompatible with the Cstd library. Avoid specifying
818706f32fbeSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
818806f32fbeSmrg    # -library=stlport4 depends on it.
818906f32fbeSmrg    case " $CXX $CXXFLAGS " in
819006f32fbeSmrg    *" -library=stlport4 "*)
819106f32fbeSmrg      solaris_use_stlport4=yes
819206f32fbeSmrg      ;;
819306f32fbeSmrg    esac
8194ea133fd7Smrg
819506f32fbeSmrg    if test "$solaris_use_stlport4" != yes; then
819606f32fbeSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
819706f32fbeSmrg    fi
819806f32fbeSmrg    ;;
819906f32fbeSmrg  esac
820006f32fbeSmrg  ;;
8201ea133fd7Smrg
820206f32fbeSmrgsolaris*)
820306f32fbeSmrg  case $cc_basename in
820406f32fbeSmrg  CC* | sunCC*)
820506f32fbeSmrg    # The more standards-conforming stlport4 library is
820606f32fbeSmrg    # incompatible with the Cstd library. Avoid specifying
820706f32fbeSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
820806f32fbeSmrg    # -library=stlport4 depends on it.
820906f32fbeSmrg    case " $CXX $CXXFLAGS " in
821006f32fbeSmrg    *" -library=stlport4 "*)
821106f32fbeSmrg      solaris_use_stlport4=yes
821206f32fbeSmrg      ;;
821306f32fbeSmrg    esac
8214ea133fd7Smrg
821506f32fbeSmrg    # Adding this requires a known-good setup of shared libraries for
821606f32fbeSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
821706f32fbeSmrg    # archive will be linked into the output, leading to subtle bugs.
821806f32fbeSmrg    if test "$solaris_use_stlport4" != yes; then
821906f32fbeSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
822006f32fbeSmrg    fi
822106f32fbeSmrg    ;;
822206f32fbeSmrg  esac
822306f32fbeSmrg  ;;
822406f32fbeSmrgesac
822506f32fbeSmrg])
8226ea133fd7Smrg
822706f32fbeSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
822806f32fbeSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
822906f32fbeSmrgesac
823006f32fbeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
823106f32fbeSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
823206f32fbeSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
823306f32fbeSmrgfi
823406f32fbeSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
823506f32fbeSmrg    [The directories searched by this compiler when creating a shared library])
823606f32fbeSmrg_LT_TAGDECL([], [predep_objects], [1],
823706f32fbeSmrg    [Dependencies to place before and after the objects being linked to
823806f32fbeSmrg    create a shared library])
823906f32fbeSmrg_LT_TAGDECL([], [postdep_objects], [1])
824006f32fbeSmrg_LT_TAGDECL([], [predeps], [1])
824106f32fbeSmrg_LT_TAGDECL([], [postdeps], [1])
824206f32fbeSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
824306f32fbeSmrg    [The library search path used internally by the compiler when linking
824406f32fbeSmrg    a shared library])
824506f32fbeSmrg])# _LT_SYS_HIDDEN_LIBDEPS
8246ea133fd7Smrg
8247ea133fd7Smrg
824806f32fbeSmrg# _LT_LANG_F77_CONFIG([TAG])
824906f32fbeSmrg# --------------------------
825006f32fbeSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
825106f32fbeSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
825206f32fbeSmrg# to write the compiler configuration to `libtool'.
825306f32fbeSmrgm4_defun([_LT_LANG_F77_CONFIG],
825406f32fbeSmrg[AC_LANG_PUSH(Fortran 77)
825506f32fbeSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
825606f32fbeSmrg  _lt_disable_F77=yes
825706f32fbeSmrgfi
825806f32fbeSmrg
825906f32fbeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
826006f32fbeSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
826106f32fbeSmrg_LT_TAGVAR(always_export_symbols, $1)=no
826206f32fbeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
826306f32fbeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
826406f32fbeSmrg_LT_TAGVAR(hardcode_direct, $1)=no
826506f32fbeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
826606f32fbeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
826706f32fbeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
826806f32fbeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
826906f32fbeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
827006f32fbeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
827106f32fbeSmrg_LT_TAGVAR(inherit_rpath, $1)=no
827206f32fbeSmrg_LT_TAGVAR(module_cmds, $1)=
827306f32fbeSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
827406f32fbeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
827506f32fbeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
827606f32fbeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
827706f32fbeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
827806f32fbeSmrg_LT_TAGVAR(no_undefined_flag, $1)=
827906f32fbeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
828006f32fbeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
828106f32fbeSmrg
828206f32fbeSmrg# Source file extension for f77 test sources.
828306f32fbeSmrgac_ext=f
828406f32fbeSmrg
828506f32fbeSmrg# Object file extension for compiled f77 test sources.
828606f32fbeSmrgobjext=o
828706f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext
828806f32fbeSmrg
828906f32fbeSmrg# No sense in running all these tests if we already determined that
829006f32fbeSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
829106f32fbeSmrg# are currently assumed to apply to all compilers on this platform,
829206f32fbeSmrg# and will be corrupted by setting them based on a non-working compiler.
829306f32fbeSmrgif test "$_lt_disable_F77" != yes; then
829406f32fbeSmrg  # Code to be used in simple compile tests
829506f32fbeSmrg  lt_simple_compile_test_code="\
829606f32fbeSmrg      subroutine t
829706f32fbeSmrg      return
829806f32fbeSmrg      end
829906f32fbeSmrg"
830006f32fbeSmrg
830106f32fbeSmrg  # Code to be used in simple link tests
830206f32fbeSmrg  lt_simple_link_test_code="\
830306f32fbeSmrg      program t
830406f32fbeSmrg      end
830506f32fbeSmrg"
8306ea133fd7Smrg
830706f32fbeSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
830806f32fbeSmrg  _LT_TAG_COMPILER
8309ea133fd7Smrg
831006f32fbeSmrg  # save warnings/boilerplate of simple test code
831106f32fbeSmrg  _LT_COMPILER_BOILERPLATE
831206f32fbeSmrg  _LT_LINKER_BOILERPLATE
8313ea133fd7Smrg
831406f32fbeSmrg  # Allow CC to be a program name with arguments.
831506f32fbeSmrg  lt_save_CC="$CC"
831606f32fbeSmrg  lt_save_GCC=$GCC
831706f32fbeSmrg  lt_save_CFLAGS=$CFLAGS
831806f32fbeSmrg  CC=${F77-"f77"}
831906f32fbeSmrg  CFLAGS=$FFLAGS
832006f32fbeSmrg  compiler=$CC
832106f32fbeSmrg  _LT_TAGVAR(compiler, $1)=$CC
832206f32fbeSmrg  _LT_CC_BASENAME([$compiler])
832306f32fbeSmrg  GCC=$G77
832406f32fbeSmrg  if test -n "$compiler"; then
832506f32fbeSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
832606f32fbeSmrg    AC_MSG_RESULT([$can_build_shared])
8327ea133fd7Smrg
832806f32fbeSmrg    AC_MSG_CHECKING([whether to build shared libraries])
832906f32fbeSmrg    test "$can_build_shared" = "no" && enable_shared=no
8330ea133fd7Smrg
833106f32fbeSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
833206f32fbeSmrg    # are all built from PIC.
833306f32fbeSmrg    case $host_os in
833406f32fbeSmrg      aix3*)
833506f32fbeSmrg        test "$enable_shared" = yes && enable_static=no
833606f32fbeSmrg        if test -n "$RANLIB"; then
833706f32fbeSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
833806f32fbeSmrg          postinstall_cmds='$RANLIB $lib'
833906f32fbeSmrg        fi
834025b89263Smrg        ;;
834106f32fbeSmrg      aix[[4-9]]*)
834206f32fbeSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
834306f32fbeSmrg	  test "$enable_shared" = yes && enable_static=no
834406f32fbeSmrg	fi
834525b89263Smrg        ;;
834606f32fbeSmrg    esac
834706f32fbeSmrg    AC_MSG_RESULT([$enable_shared])
8348ea133fd7Smrg
834906f32fbeSmrg    AC_MSG_CHECKING([whether to build static libraries])
835006f32fbeSmrg    # Make sure either enable_shared or enable_static is yes.
835106f32fbeSmrg    test "$enable_shared" = yes || enable_static=yes
835206f32fbeSmrg    AC_MSG_RESULT([$enable_static])
8353ea133fd7Smrg
835406f32fbeSmrg    _LT_TAGVAR(GCC, $1)="$G77"
835506f32fbeSmrg    _LT_TAGVAR(LD, $1)="$LD"
8356ea133fd7Smrg
835706f32fbeSmrg    ## CAVEAT EMPTOR:
835806f32fbeSmrg    ## There is no encapsulation within the following macros, do not change
835906f32fbeSmrg    ## the running order or otherwise move them around unless you know exactly
836006f32fbeSmrg    ## what you are doing...
836106f32fbeSmrg    _LT_COMPILER_PIC($1)
836206f32fbeSmrg    _LT_COMPILER_C_O($1)
836306f32fbeSmrg    _LT_COMPILER_FILE_LOCKS($1)
836406f32fbeSmrg    _LT_LINKER_SHLIBS($1)
836506f32fbeSmrg    _LT_SYS_DYNAMIC_LINKER($1)
836606f32fbeSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8367ea133fd7Smrg
836806f32fbeSmrg    _LT_CONFIG($1)
836906f32fbeSmrg  fi # test -n "$compiler"
8370ea133fd7Smrg
837106f32fbeSmrg  GCC=$lt_save_GCC
837206f32fbeSmrg  CC="$lt_save_CC"
837306f32fbeSmrg  CFLAGS="$lt_save_CFLAGS"
837406f32fbeSmrgfi # test "$_lt_disable_F77" != yes
8375ea133fd7Smrg
837606f32fbeSmrgAC_LANG_POP
837706f32fbeSmrg])# _LT_LANG_F77_CONFIG
8378ea133fd7Smrg
8379ea133fd7Smrg
838006f32fbeSmrg# _LT_LANG_FC_CONFIG([TAG])
838106f32fbeSmrg# -------------------------
838206f32fbeSmrg# Ensure that the configuration variables for a Fortran compiler are
838306f32fbeSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
838406f32fbeSmrg# to write the compiler configuration to `libtool'.
838506f32fbeSmrgm4_defun([_LT_LANG_FC_CONFIG],
838606f32fbeSmrg[AC_LANG_PUSH(Fortran)
8387ea133fd7Smrg
838806f32fbeSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
838906f32fbeSmrg  _lt_disable_FC=yes
839006f32fbeSmrgfi
8391ea133fd7Smrg
839206f32fbeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
839306f32fbeSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
839406f32fbeSmrg_LT_TAGVAR(always_export_symbols, $1)=no
839506f32fbeSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
839606f32fbeSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
839706f32fbeSmrg_LT_TAGVAR(hardcode_direct, $1)=no
839806f32fbeSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
839906f32fbeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
840006f32fbeSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
840106f32fbeSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
840206f32fbeSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
840306f32fbeSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
840406f32fbeSmrg_LT_TAGVAR(inherit_rpath, $1)=no
840506f32fbeSmrg_LT_TAGVAR(module_cmds, $1)=
840606f32fbeSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
840706f32fbeSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
840806f32fbeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
840906f32fbeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
841006f32fbeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
841106f32fbeSmrg_LT_TAGVAR(no_undefined_flag, $1)=
841206f32fbeSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
841306f32fbeSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
841406f32fbeSmrg
841506f32fbeSmrg# Source file extension for fc test sources.
841606f32fbeSmrgac_ext=${ac_fc_srcext-f}
841706f32fbeSmrg
841806f32fbeSmrg# Object file extension for compiled fc test sources.
841906f32fbeSmrgobjext=o
842006f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext
842106f32fbeSmrg
842206f32fbeSmrg# No sense in running all these tests if we already determined that
842306f32fbeSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
842406f32fbeSmrg# are currently assumed to apply to all compilers on this platform,
842506f32fbeSmrg# and will be corrupted by setting them based on a non-working compiler.
842606f32fbeSmrgif test "$_lt_disable_FC" != yes; then
842706f32fbeSmrg  # Code to be used in simple compile tests
842806f32fbeSmrg  lt_simple_compile_test_code="\
842906f32fbeSmrg      subroutine t
843006f32fbeSmrg      return
843106f32fbeSmrg      end
843206f32fbeSmrg"
843306f32fbeSmrg
843406f32fbeSmrg  # Code to be used in simple link tests
843506f32fbeSmrg  lt_simple_link_test_code="\
843606f32fbeSmrg      program t
843706f32fbeSmrg      end
843806f32fbeSmrg"
843906f32fbeSmrg
844006f32fbeSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
844106f32fbeSmrg  _LT_TAG_COMPILER
8442ea133fd7Smrg
844306f32fbeSmrg  # save warnings/boilerplate of simple test code
844406f32fbeSmrg  _LT_COMPILER_BOILERPLATE
844506f32fbeSmrg  _LT_LINKER_BOILERPLATE
8446ea133fd7Smrg
844706f32fbeSmrg  # Allow CC to be a program name with arguments.
844806f32fbeSmrg  lt_save_CC="$CC"
844906f32fbeSmrg  lt_save_GCC=$GCC
845006f32fbeSmrg  lt_save_CFLAGS=$CFLAGS
845106f32fbeSmrg  CC=${FC-"f95"}
845206f32fbeSmrg  CFLAGS=$FCFLAGS
845306f32fbeSmrg  compiler=$CC
845406f32fbeSmrg  GCC=$ac_cv_fc_compiler_gnu
8455ea133fd7Smrg
845606f32fbeSmrg  _LT_TAGVAR(compiler, $1)=$CC
845706f32fbeSmrg  _LT_CC_BASENAME([$compiler])
8458ea133fd7Smrg
845906f32fbeSmrg  if test -n "$compiler"; then
846006f32fbeSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
846106f32fbeSmrg    AC_MSG_RESULT([$can_build_shared])
8462ea133fd7Smrg
846306f32fbeSmrg    AC_MSG_CHECKING([whether to build shared libraries])
846406f32fbeSmrg    test "$can_build_shared" = "no" && enable_shared=no
846506f32fbeSmrg
846606f32fbeSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
846706f32fbeSmrg    # are all built from PIC.
846806f32fbeSmrg    case $host_os in
846906f32fbeSmrg      aix3*)
847006f32fbeSmrg        test "$enable_shared" = yes && enable_static=no
847106f32fbeSmrg        if test -n "$RANLIB"; then
847206f32fbeSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
847306f32fbeSmrg          postinstall_cmds='$RANLIB $lib'
847406f32fbeSmrg        fi
847506f32fbeSmrg        ;;
847606f32fbeSmrg      aix[[4-9]]*)
847706f32fbeSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
847806f32fbeSmrg	  test "$enable_shared" = yes && enable_static=no
847906f32fbeSmrg	fi
848025b89263Smrg        ;;
848125b89263Smrg    esac
848206f32fbeSmrg    AC_MSG_RESULT([$enable_shared])
8483ea133fd7Smrg
848406f32fbeSmrg    AC_MSG_CHECKING([whether to build static libraries])
848506f32fbeSmrg    # Make sure either enable_shared or enable_static is yes.
848606f32fbeSmrg    test "$enable_shared" = yes || enable_static=yes
848706f32fbeSmrg    AC_MSG_RESULT([$enable_static])
8488ea133fd7Smrg
848906f32fbeSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
849025b89263Smrg    _LT_TAGVAR(LD, $1)="$LD"
8491ea133fd7Smrg
849225b89263Smrg    ## CAVEAT EMPTOR:
849325b89263Smrg    ## There is no encapsulation within the following macros, do not change
849425b89263Smrg    ## the running order or otherwise move them around unless you know exactly
849525b89263Smrg    ## what you are doing...
849625b89263Smrg    _LT_SYS_HIDDEN_LIBDEPS($1)
849725b89263Smrg    _LT_COMPILER_PIC($1)
849825b89263Smrg    _LT_COMPILER_C_O($1)
849925b89263Smrg    _LT_COMPILER_FILE_LOCKS($1)
850025b89263Smrg    _LT_LINKER_SHLIBS($1)
850125b89263Smrg    _LT_SYS_DYNAMIC_LINKER($1)
850225b89263Smrg    _LT_LINKER_HARDCODE_LIBPATH($1)
8503ea133fd7Smrg
850406f32fbeSmrg    _LT_CONFIG($1)
850506f32fbeSmrg  fi # test -n "$compiler"
850606f32fbeSmrg
850706f32fbeSmrg  GCC=$lt_save_GCC
850806f32fbeSmrg  CC=$lt_save_CC
850906f32fbeSmrg  CFLAGS=$lt_save_CFLAGS
851006f32fbeSmrgfi # test "$_lt_disable_FC" != yes
851106f32fbeSmrg
851206f32fbeSmrgAC_LANG_POP
851306f32fbeSmrg])# _LT_LANG_FC_CONFIG
851406f32fbeSmrg
851506f32fbeSmrg
851606f32fbeSmrg# _LT_LANG_GCJ_CONFIG([TAG])
851706f32fbeSmrg# --------------------------
851806f32fbeSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
851906f32fbeSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
852006f32fbeSmrg# to write the compiler configuration to `libtool'.
852106f32fbeSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
852206f32fbeSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
852306f32fbeSmrgAC_LANG_SAVE
852406f32fbeSmrg
852506f32fbeSmrg# Source file extension for Java test sources.
852606f32fbeSmrgac_ext=java
852706f32fbeSmrg
852806f32fbeSmrg# Object file extension for compiled Java test sources.
852906f32fbeSmrgobjext=o
853006f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext
853106f32fbeSmrg
853206f32fbeSmrg# Code to be used in simple compile tests
853306f32fbeSmrglt_simple_compile_test_code="class foo {}"
853406f32fbeSmrg
853506f32fbeSmrg# Code to be used in simple link tests
853606f32fbeSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
853706f32fbeSmrg
853806f32fbeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
853906f32fbeSmrg_LT_TAG_COMPILER
854006f32fbeSmrg
854106f32fbeSmrg# save warnings/boilerplate of simple test code
854206f32fbeSmrg_LT_COMPILER_BOILERPLATE
854306f32fbeSmrg_LT_LINKER_BOILERPLATE
854406f32fbeSmrg
854506f32fbeSmrg# Allow CC to be a program name with arguments.
854606f32fbeSmrglt_save_CC=$CC
854706f32fbeSmrglt_save_CFLAGS=$CFLAGS
854806f32fbeSmrglt_save_GCC=$GCC
854906f32fbeSmrgGCC=yes
855006f32fbeSmrgCC=${GCJ-"gcj"}
855106f32fbeSmrgCFLAGS=$GCJFLAGS
855206f32fbeSmrgcompiler=$CC
855306f32fbeSmrg_LT_TAGVAR(compiler, $1)=$CC
855406f32fbeSmrg_LT_TAGVAR(LD, $1)="$LD"
855506f32fbeSmrg_LT_CC_BASENAME([$compiler])
855606f32fbeSmrg
855706f32fbeSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
855806f32fbeSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
855906f32fbeSmrg
856006f32fbeSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
856106f32fbeSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
856206f32fbeSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
856306f32fbeSmrg
856406f32fbeSmrgif test -n "$compiler"; then
856506f32fbeSmrg  _LT_COMPILER_NO_RTTI($1)
856606f32fbeSmrg  _LT_COMPILER_PIC($1)
856706f32fbeSmrg  _LT_COMPILER_C_O($1)
856806f32fbeSmrg  _LT_COMPILER_FILE_LOCKS($1)
856906f32fbeSmrg  _LT_LINKER_SHLIBS($1)
857006f32fbeSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
857106f32fbeSmrg
857206f32fbeSmrg  _LT_CONFIG($1)
857306f32fbeSmrgfi
857406f32fbeSmrg
857506f32fbeSmrgAC_LANG_RESTORE
857606f32fbeSmrg
857706f32fbeSmrgGCC=$lt_save_GCC
857806f32fbeSmrgCC=$lt_save_CC
857906f32fbeSmrgCFLAGS=$lt_save_CFLAGS
858006f32fbeSmrg])# _LT_LANG_GCJ_CONFIG
858106f32fbeSmrg
858206f32fbeSmrg
858306f32fbeSmrg# _LT_LANG_RC_CONFIG([TAG])
858406f32fbeSmrg# -------------------------
858506f32fbeSmrg# Ensure that the configuration variables for the Windows resource compiler
858606f32fbeSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
858706f32fbeSmrg# to write the compiler configuration to `libtool'.
858806f32fbeSmrgm4_defun([_LT_LANG_RC_CONFIG],
858906f32fbeSmrg[AC_REQUIRE([LT_PROG_RC])dnl
859006f32fbeSmrgAC_LANG_SAVE
859106f32fbeSmrg
859206f32fbeSmrg# Source file extension for RC test sources.
859306f32fbeSmrgac_ext=rc
859406f32fbeSmrg
859506f32fbeSmrg# Object file extension for compiled RC test sources.
859606f32fbeSmrgobjext=o
859706f32fbeSmrg_LT_TAGVAR(objext, $1)=$objext
859806f32fbeSmrg
859906f32fbeSmrg# Code to be used in simple compile tests
860006f32fbeSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
860106f32fbeSmrg
860206f32fbeSmrg# Code to be used in simple link tests
860306f32fbeSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
860406f32fbeSmrg
860506f32fbeSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
860606f32fbeSmrg_LT_TAG_COMPILER
860706f32fbeSmrg
860806f32fbeSmrg# save warnings/boilerplate of simple test code
860906f32fbeSmrg_LT_COMPILER_BOILERPLATE
861006f32fbeSmrg_LT_LINKER_BOILERPLATE
861106f32fbeSmrg
861206f32fbeSmrg# Allow CC to be a program name with arguments.
861306f32fbeSmrglt_save_CC="$CC"
861406f32fbeSmrglt_save_CFLAGS=$CFLAGS
861506f32fbeSmrglt_save_GCC=$GCC
861606f32fbeSmrgGCC=
861706f32fbeSmrgCC=${RC-"windres"}
861806f32fbeSmrgCFLAGS=
861906f32fbeSmrgcompiler=$CC
862006f32fbeSmrg_LT_TAGVAR(compiler, $1)=$CC
862106f32fbeSmrg_LT_CC_BASENAME([$compiler])
862206f32fbeSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
862306f32fbeSmrg
862406f32fbeSmrgif test -n "$compiler"; then
862506f32fbeSmrg  :
862606f32fbeSmrg  _LT_CONFIG($1)
862706f32fbeSmrgfi
862806f32fbeSmrg
862906f32fbeSmrgGCC=$lt_save_GCC
863006f32fbeSmrgAC_LANG_RESTORE
863106f32fbeSmrgCC=$lt_save_CC
863206f32fbeSmrgCFLAGS=$lt_save_CFLAGS
863306f32fbeSmrg])# _LT_LANG_RC_CONFIG
863406f32fbeSmrg
863506f32fbeSmrg
863606f32fbeSmrg# LT_PROG_GCJ
863706f32fbeSmrg# -----------
863806f32fbeSmrgAC_DEFUN([LT_PROG_GCJ],
863906f32fbeSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
864006f32fbeSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
864106f32fbeSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
864206f32fbeSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
864306f32fbeSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
864406f32fbeSmrg])
864506f32fbeSmrg
864606f32fbeSmrg# Old name:
864706f32fbeSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
864806f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
864906f32fbeSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
865006f32fbeSmrg
865106f32fbeSmrg
865206f32fbeSmrg# LT_PROG_RC
865306f32fbeSmrg# ----------
865406f32fbeSmrgAC_DEFUN([LT_PROG_RC],
865506f32fbeSmrg[AC_CHECK_TOOL(RC, windres,)
865606f32fbeSmrg])
865706f32fbeSmrg
865806f32fbeSmrg# Old name:
865906f32fbeSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
866006f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
866106f32fbeSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
866206f32fbeSmrg
866306f32fbeSmrg
866406f32fbeSmrg# _LT_DECL_EGREP
866506f32fbeSmrg# --------------
866606f32fbeSmrg# If we don't have a new enough Autoconf to choose the best grep
866706f32fbeSmrg# available, choose the one first in the user's PATH.
866806f32fbeSmrgm4_defun([_LT_DECL_EGREP],
866906f32fbeSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
867006f32fbeSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
867106f32fbeSmrgtest -z "$GREP" && GREP=grep
867206f32fbeSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
867306f32fbeSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
867406f32fbeSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
867506f32fbeSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
867606f32fbeSmrgAC_SUBST([GREP])
867706f32fbeSmrg])
867806f32fbeSmrg
8679ea133fd7Smrg
868006f32fbeSmrg# _LT_DECL_OBJDUMP
868106f32fbeSmrg# --------------
868206f32fbeSmrg# If we don't have a new enough Autoconf to choose the best objdump
868306f32fbeSmrg# available, choose the one first in the user's PATH.
868406f32fbeSmrgm4_defun([_LT_DECL_OBJDUMP],
868506f32fbeSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
868606f32fbeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
868706f32fbeSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
868806f32fbeSmrgAC_SUBST([OBJDUMP])
868906f32fbeSmrg])
8690ea133fd7Smrg
869106f32fbeSmrg# _LT_DECL_DLLTOOL
869206f32fbeSmrg# ----------------
869306f32fbeSmrg# Ensure DLLTOOL variable is set.
869406f32fbeSmrgm4_defun([_LT_DECL_DLLTOOL],
869506f32fbeSmrg[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
869606f32fbeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
869706f32fbeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])
869806f32fbeSmrgAC_SUBST([DLLTOOL])
869906f32fbeSmrg])
8700ea133fd7Smrg
870106f32fbeSmrg# _LT_DECL_SED
870206f32fbeSmrg# ------------
870306f32fbeSmrg# Check for a fully-functional sed program, that truncates
870406f32fbeSmrg# as few characters as possible.  Prefer GNU sed if found.
870506f32fbeSmrgm4_defun([_LT_DECL_SED],
870606f32fbeSmrg[AC_PROG_SED
870706f32fbeSmrgtest -z "$SED" && SED=sed
870806f32fbeSmrgXsed="$SED -e 1s/^X//"
870906f32fbeSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
871006f32fbeSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
871106f32fbeSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
871206f32fbeSmrg])# _LT_DECL_SED
8713ea133fd7Smrg
871406f32fbeSmrgm4_ifndef([AC_PROG_SED], [
871506f32fbeSmrg# NOTE: This macro has been submitted for inclusion into   #
871606f32fbeSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
871706f32fbeSmrg#  a released version of Autoconf we should remove this    #
871806f32fbeSmrg#  macro and use it instead.                               #
8719ea133fd7Smrg
872006f32fbeSmrgm4_defun([AC_PROG_SED],
872106f32fbeSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
872206f32fbeSmrgAC_CACHE_VAL(lt_cv_path_SED,
872306f32fbeSmrg[# Loop through the user's path and test for sed and gsed.
872406f32fbeSmrg# Then use that list of sed's as ones to test for truncation.
872506f32fbeSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
872606f32fbeSmrgfor as_dir in $PATH
872706f32fbeSmrgdo
872806f32fbeSmrg  IFS=$as_save_IFS
872906f32fbeSmrg  test -z "$as_dir" && as_dir=.
873006f32fbeSmrg  for lt_ac_prog in sed gsed; do
873106f32fbeSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
873206f32fbeSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
873306f32fbeSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
873406f32fbeSmrg      fi
873506f32fbeSmrg    done
873606f32fbeSmrg  done
873706f32fbeSmrgdone
873806f32fbeSmrgIFS=$as_save_IFS
873906f32fbeSmrglt_ac_max=0
874006f32fbeSmrglt_ac_count=0
874106f32fbeSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
874206f32fbeSmrg# along with /bin/sed that truncates output.
874306f32fbeSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
874406f32fbeSmrg  test ! -f $lt_ac_sed && continue
874506f32fbeSmrg  cat /dev/null > conftest.in
874606f32fbeSmrg  lt_ac_count=0
874706f32fbeSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
874806f32fbeSmrg  # Check for GNU sed and select it if it is found.
874906f32fbeSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
875006f32fbeSmrg    lt_cv_path_SED=$lt_ac_sed
875106f32fbeSmrg    break
875206f32fbeSmrg  fi
875306f32fbeSmrg  while true; do
875406f32fbeSmrg    cat conftest.in conftest.in >conftest.tmp
875506f32fbeSmrg    mv conftest.tmp conftest.in
875606f32fbeSmrg    cp conftest.in conftest.nl
875706f32fbeSmrg    echo >>conftest.nl
875806f32fbeSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
875906f32fbeSmrg    cmp -s conftest.out conftest.nl || break
876006f32fbeSmrg    # 10000 chars as input seems more than enough
876106f32fbeSmrg    test $lt_ac_count -gt 10 && break
876206f32fbeSmrg    lt_ac_count=`expr $lt_ac_count + 1`
876306f32fbeSmrg    if test $lt_ac_count -gt $lt_ac_max; then
876406f32fbeSmrg      lt_ac_max=$lt_ac_count
876506f32fbeSmrg      lt_cv_path_SED=$lt_ac_sed
876606f32fbeSmrg    fi
876706f32fbeSmrg  done
876806f32fbeSmrgdone
876925b89263Smrg])
877006f32fbeSmrgSED=$lt_cv_path_SED
877106f32fbeSmrgAC_SUBST([SED])
877206f32fbeSmrgAC_MSG_RESULT([$SED])
877306f32fbeSmrg])#AC_PROG_SED
877406f32fbeSmrg])#m4_ifndef
8775ea133fd7Smrg
877606f32fbeSmrg# Old name:
877706f32fbeSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
877806f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
877906f32fbeSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
8780ea133fd7Smrg
8781ea133fd7Smrg
878206f32fbeSmrg# _LT_CHECK_SHELL_FEATURES
878306f32fbeSmrg# ------------------------
878406f32fbeSmrg# Find out whether the shell is Bourne or XSI compatible,
878506f32fbeSmrg# or has some other useful features.
878606f32fbeSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
878706f32fbeSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
878806f32fbeSmrg# Try some XSI features
878906f32fbeSmrgxsi_shell=no
879006f32fbeSmrg( _lt_dummy="a/b/c"
879106f32fbeSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
879206f32fbeSmrg      = c,a/b,b/c, \
879306f32fbeSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
879406f32fbeSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
879506f32fbeSmrg  && xsi_shell=yes
879606f32fbeSmrgAC_MSG_RESULT([$xsi_shell])
879706f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
8798ea133fd7Smrg
879906f32fbeSmrgAC_MSG_CHECKING([whether the shell understands "+="])
880006f32fbeSmrglt_shell_append=no
880106f32fbeSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
880206f32fbeSmrg    >/dev/null 2>&1 \
880306f32fbeSmrg  && lt_shell_append=yes
880406f32fbeSmrgAC_MSG_RESULT([$lt_shell_append])
880506f32fbeSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
8806ea133fd7Smrg
880706f32fbeSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
880806f32fbeSmrg  lt_unset=unset
880906f32fbeSmrgelse
881006f32fbeSmrg  lt_unset=false
881106f32fbeSmrgfi
881206f32fbeSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
8813ea133fd7Smrg
881406f32fbeSmrg# test EBCDIC or ASCII
881506f32fbeSmrgcase `echo X|tr X '\101'` in
881606f32fbeSmrg A) # ASCII based system
881706f32fbeSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
881806f32fbeSmrg  lt_SP2NL='tr \040 \012'
881906f32fbeSmrg  lt_NL2SP='tr \015\012 \040\040'
882006f32fbeSmrg  ;;
882106f32fbeSmrg *) # EBCDIC based system
882206f32fbeSmrg  lt_SP2NL='tr \100 \n'
882306f32fbeSmrg  lt_NL2SP='tr \r\n \100\100'
882406f32fbeSmrg  ;;
882506f32fbeSmrgesac
882606f32fbeSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
882706f32fbeSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
882806f32fbeSmrg])# _LT_CHECK_SHELL_FEATURES
882906f32fbeSmrg
883006f32fbeSmrg
883106f32fbeSmrg# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY)
883206f32fbeSmrg# ------------------------------------------------------
883306f32fbeSmrg# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and
883406f32fbeSmrg# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY.
883506f32fbeSmrgm4_defun([_LT_PROG_FUNCTION_REPLACE],
883606f32fbeSmrg[dnl {
883706f32fbeSmrgsed -e '/^$1 ()$/,/^} # $1 /c\
883806f32fbeSmrg$1 ()\
883906f32fbeSmrg{\
884006f32fbeSmrgm4_bpatsubsts([$2], [$], [\\], [^\([	 ]\)], [\\\1])
884106f32fbeSmrg} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \
884206f32fbeSmrg  && mv -f "$cfgfile.tmp" "$cfgfile" \
884306f32fbeSmrg    || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
884406f32fbeSmrgtest 0 -eq $? || _lt_function_replace_fail=:
884506f32fbeSmrg])
8846ea133fd7Smrg
8847ea133fd7Smrg
884806f32fbeSmrg# _LT_PROG_REPLACE_SHELLFNS
884906f32fbeSmrg# -------------------------
885006f32fbeSmrg# Replace existing portable implementations of several shell functions with
885106f32fbeSmrg# equivalent extended shell implementations where those features are available..
885206f32fbeSmrgm4_defun([_LT_PROG_REPLACE_SHELLFNS],
885306f32fbeSmrg[if test x"$xsi_shell" = xyes; then
885406f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl
885506f32fbeSmrg    case ${1} in
885606f32fbeSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
885706f32fbeSmrg      *  ) func_dirname_result="${3}" ;;
885806f32fbeSmrg    esac])
885906f32fbeSmrg
886006f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl
886106f32fbeSmrg    func_basename_result="${1##*/}"])
886206f32fbeSmrg
886306f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl
886406f32fbeSmrg    case ${1} in
886506f32fbeSmrg      */*) func_dirname_result="${1%/*}${2}" ;;
886606f32fbeSmrg      *  ) func_dirname_result="${3}" ;;
886725b89263Smrg    esac
886806f32fbeSmrg    func_basename_result="${1##*/}"])
8869ea133fd7Smrg
887006f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl
887106f32fbeSmrg    # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
887206f32fbeSmrg    # positional parameters, so assign one to ordinary parameter first.
887306f32fbeSmrg    func_stripname_result=${3}
887406f32fbeSmrg    func_stripname_result=${func_stripname_result#"${1}"}
887506f32fbeSmrg    func_stripname_result=${func_stripname_result%"${2}"}])
887606f32fbeSmrg
887706f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl
887806f32fbeSmrg    func_split_long_opt_name=${1%%=*}
887906f32fbeSmrg    func_split_long_opt_arg=${1#*=}])
888006f32fbeSmrg
888106f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl
888206f32fbeSmrg    func_split_short_opt_arg=${1#??}
888306f32fbeSmrg    func_split_short_opt_name=${1%"$func_split_short_opt_arg"}])
888406f32fbeSmrg
888506f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl
888606f32fbeSmrg    case ${1} in
888706f32fbeSmrg      *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
888806f32fbeSmrg      *)    func_lo2o_result=${1} ;;
888906f32fbeSmrg    esac])
889006f32fbeSmrg
889106f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_xform], [    func_xform_result=${1%.*}.lo])
889206f32fbeSmrg
889306f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_arith], [    func_arith_result=$(( $[*] ))])
889406f32fbeSmrg
889506f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_len], [    func_len_result=${#1}])
889625b89263Smrgfi
8897ea133fd7Smrg
889806f32fbeSmrgif test x"$lt_shell_append" = xyes; then
889906f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_append], [    eval "${1}+=\\${2}"])
8900ea133fd7Smrg
890106f32fbeSmrg  _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl
890206f32fbeSmrg    func_quote_for_eval "${2}"
890306f32fbeSmrgdnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \
890406f32fbeSmrg    eval "${1}+=\\\\ \\$func_quote_for_eval_result"])
8905ea133fd7Smrg
890606f32fbeSmrg  # Save a `func_append' function call where possible by direct use of '+='
890706f32fbeSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \
890806f32fbeSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
890906f32fbeSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
891006f32fbeSmrg  test 0 -eq $? || _lt_function_replace_fail=:
891106f32fbeSmrgelse
891206f32fbeSmrg  # Save a `func_append' function call even when '+=' is not available
891306f32fbeSmrg  sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \
891406f32fbeSmrg    && mv -f "$cfgfile.tmp" "$cfgfile" \
891506f32fbeSmrg      || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp")
891606f32fbeSmrg  test 0 -eq $? || _lt_function_replace_fail=:
891706f32fbeSmrgfi
8918ea133fd7Smrg
891906f32fbeSmrgif test x"$_lt_function_replace_fail" = x":"; then
892006f32fbeSmrg  AC_MSG_WARN([Unable to substitute extended shell functions in $ofile])
892106f32fbeSmrgfi
892206f32fbeSmrg])
8923ea133fd7Smrg
892406f32fbeSmrg# _LT_PATH_CONVERSION_FUNCTIONS
892506f32fbeSmrg# -----------------------------
892606f32fbeSmrg# Determine which file name conversion functions should be used by
892706f32fbeSmrg# func_to_host_file (and, implicitly, by func_to_host_path).  These are needed
892806f32fbeSmrg# for certain cross-compile configurations and native mingw.
892906f32fbeSmrgm4_defun([_LT_PATH_CONVERSION_FUNCTIONS],
893006f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
893106f32fbeSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
893206f32fbeSmrgAC_MSG_CHECKING([how to convert $build file names to $host format])
893306f32fbeSmrgAC_CACHE_VAL(lt_cv_to_host_file_cmd,
893406f32fbeSmrg[case $host in
893506f32fbeSmrg  *-*-mingw* )
893606f32fbeSmrg    case $build in
893706f32fbeSmrg      *-*-mingw* ) # actually msys
893806f32fbeSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32
893906f32fbeSmrg        ;;
894006f32fbeSmrg      *-*-cygwin* )
894106f32fbeSmrg        lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32
894206f32fbeSmrg        ;;
894306f32fbeSmrg      * ) # otherwise, assume *nix
894406f32fbeSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32
894506f32fbeSmrg        ;;
894606f32fbeSmrg    esac
894725b89263Smrg    ;;
894806f32fbeSmrg  *-*-cygwin* )
894906f32fbeSmrg    case $build in
895006f32fbeSmrg      *-*-mingw* ) # actually msys
895106f32fbeSmrg        lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin
895206f32fbeSmrg        ;;
895306f32fbeSmrg      *-*-cygwin* )
895406f32fbeSmrg        lt_cv_to_host_file_cmd=func_convert_file_noop
895506f32fbeSmrg        ;;
895606f32fbeSmrg      * ) # otherwise, assume *nix
895706f32fbeSmrg        lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin
895806f32fbeSmrg        ;;
895925b89263Smrg    esac
896025b89263Smrg    ;;
896106f32fbeSmrg  * ) # unhandled hosts (and "normal" native builds)
896206f32fbeSmrg    lt_cv_to_host_file_cmd=func_convert_file_noop
896306f32fbeSmrg    ;;
896425b89263Smrgesac
896525b89263Smrg])
896606f32fbeSmrgto_host_file_cmd=$lt_cv_to_host_file_cmd
896706f32fbeSmrgAC_MSG_RESULT([$lt_cv_to_host_file_cmd])
896806f32fbeSmrg_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd],
896906f32fbeSmrg         [0], [convert $build file names to $host format])dnl
897006f32fbeSmrg
897106f32fbeSmrgAC_MSG_CHECKING([how to convert $build file names to toolchain format])
897206f32fbeSmrgAC_CACHE_VAL(lt_cv_to_tool_file_cmd,
897306f32fbeSmrg[#assume ordinary cross tools, or native build.
897406f32fbeSmrglt_cv_to_tool_file_cmd=func_convert_file_noop
897506f32fbeSmrgcase $host in
897606f32fbeSmrg  *-*-mingw* )
897706f32fbeSmrg    case $build in
897806f32fbeSmrg      *-*-mingw* ) # actually msys
897906f32fbeSmrg        lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32
898006f32fbeSmrg        ;;
898106f32fbeSmrg    esac
898206f32fbeSmrg    ;;
898325b89263Smrgesac
898406f32fbeSmrg])
898506f32fbeSmrgto_tool_file_cmd=$lt_cv_to_tool_file_cmd
898606f32fbeSmrgAC_MSG_RESULT([$lt_cv_to_tool_file_cmd])
898706f32fbeSmrg_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd],
898806f32fbeSmrg         [0], [convert $build files to toolchain format])dnl
898906f32fbeSmrg])# _LT_PATH_CONVERSION_FUNCTIONS
8990ea133fd7Smrg
899106f32fbeSmrg# Helper functions for option handling.                    -*- Autoconf -*-
899206f32fbeSmrg#
899306f32fbeSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
899406f32fbeSmrg#   Inc.
899506f32fbeSmrg#   Written by Gary V. Vaughan, 2004
899606f32fbeSmrg#
899706f32fbeSmrg# This file is free software; the Free Software Foundation gives
899806f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without
899906f32fbeSmrg# modifications, as long as this notice is preserved.
9000ea133fd7Smrg
900106f32fbeSmrg# serial 7 ltoptions.m4
9002ea133fd7Smrg
900306f32fbeSmrg# This is to help aclocal find these macros, as it can't see m4_define.
900406f32fbeSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
9005ea133fd7Smrg
9006ea133fd7Smrg
900706f32fbeSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
900806f32fbeSmrg# ------------------------------------------
900906f32fbeSmrgm4_define([_LT_MANGLE_OPTION],
901006f32fbeSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
9011ea133fd7Smrg
9012ea133fd7Smrg
901306f32fbeSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
901406f32fbeSmrg# ---------------------------------------
901506f32fbeSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
901606f32fbeSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
901706f32fbeSmrg# saved as a flag.
901806f32fbeSmrgm4_define([_LT_SET_OPTION],
901906f32fbeSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
902006f32fbeSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
902106f32fbeSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
902206f32fbeSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
902306f32fbeSmrg])
9024ea133fd7Smrg
902525b89263Smrg
902606f32fbeSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
902706f32fbeSmrg# ------------------------------------------------------------
902806f32fbeSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
902906f32fbeSmrgm4_define([_LT_IF_OPTION],
903006f32fbeSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
903125b89263Smrg
903225b89263Smrg
903306f32fbeSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
903406f32fbeSmrg# -------------------------------------------------------
903506f32fbeSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
903606f32fbeSmrg# are set.
903706f32fbeSmrgm4_define([_LT_UNLESS_OPTIONS],
903806f32fbeSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
903906f32fbeSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
904006f32fbeSmrg		      [m4_define([$0_found])])])[]dnl
904106f32fbeSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
904206f32fbeSmrg])[]dnl
904306f32fbeSmrg])
904406f32fbeSmrg
904506f32fbeSmrg
904606f32fbeSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
904706f32fbeSmrg# ----------------------------------------
904806f32fbeSmrg# OPTION-LIST is a space-separated list of Libtool options associated
904906f32fbeSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
905006f32fbeSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
905106f32fbeSmrg# the unknown option and exit.
905206f32fbeSmrgm4_defun([_LT_SET_OPTIONS],
905306f32fbeSmrg[# Set options
905406f32fbeSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
905506f32fbeSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
905606f32fbeSmrg
905706f32fbeSmrgm4_if([$1],[LT_INIT],[
905806f32fbeSmrg  dnl
905906f32fbeSmrg  dnl Simply set some default values (i.e off) if boolean options were not
906006f32fbeSmrg  dnl specified:
906106f32fbeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
906206f32fbeSmrg  ])
906306f32fbeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
906406f32fbeSmrg  ])
906506f32fbeSmrg  dnl
906606f32fbeSmrg  dnl If no reference was made to various pairs of opposing options, then
906706f32fbeSmrg  dnl we run the default mode handler for the pair.  For example, if neither
906806f32fbeSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
906906f32fbeSmrg  dnl archives by default:
907006f32fbeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
907106f32fbeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
907206f32fbeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
907306f32fbeSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
907406f32fbeSmrg  		   [_LT_ENABLE_FAST_INSTALL])
907506f32fbeSmrg  ])
907606f32fbeSmrg])# _LT_SET_OPTIONS
907706f32fbeSmrg
907825b89263Smrg
9079ea133fd7Smrg
908006f32fbeSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
908106f32fbeSmrg# -----------------------------------------
908206f32fbeSmrgm4_define([_LT_MANGLE_DEFUN],
908306f32fbeSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
9084ea133fd7Smrg
9085ea133fd7Smrg
908606f32fbeSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
908706f32fbeSmrg# -----------------------------------------------
908806f32fbeSmrgm4_define([LT_OPTION_DEFINE],
908906f32fbeSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
909006f32fbeSmrg])# LT_OPTION_DEFINE
9091ea133fd7Smrg
9092ea133fd7Smrg
909306f32fbeSmrg# dlopen
909406f32fbeSmrg# ------
909506f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
909606f32fbeSmrg])
9097ea133fd7Smrg
909806f32fbeSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
909906f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
910006f32fbeSmrgAC_DIAGNOSE([obsolete],
910106f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
910206f32fbeSmrgput the `dlopen' option into LT_INIT's first parameter.])
910306f32fbeSmrg])
9104ea133fd7Smrg
910506f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
910606f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
9107ea133fd7Smrg
9108ea133fd7Smrg
910906f32fbeSmrg# win32-dll
911006f32fbeSmrg# ---------
911106f32fbeSmrg# Declare package support for building win32 dll's.
911206f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
911306f32fbeSmrg[enable_win32_dll=yes
9114ea133fd7Smrg
911506f32fbeSmrgcase $host in
911606f32fbeSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
911706f32fbeSmrg  AC_CHECK_TOOL(AS, as, false)
911806f32fbeSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
911906f32fbeSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
912006f32fbeSmrg  ;;
912106f32fbeSmrgesac
9122ea133fd7Smrg
912306f32fbeSmrgtest -z "$AS" && AS=as
912406f32fbeSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
9125ea133fd7Smrg
912606f32fbeSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
912706f32fbeSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
9128ea133fd7Smrg
912906f32fbeSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
913006f32fbeSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
913106f32fbeSmrg])# win32-dll
9132ea133fd7Smrg
913306f32fbeSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
913406f32fbeSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
913506f32fbeSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
913606f32fbeSmrgAC_DIAGNOSE([obsolete],
913706f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
913806f32fbeSmrgput the `win32-dll' option into LT_INIT's first parameter.])
913906f32fbeSmrg])
9140ea133fd7Smrg
914106f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
914206f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
914325b89263Smrg
9144ea133fd7Smrg
914506f32fbeSmrg# _LT_ENABLE_SHARED([DEFAULT])
914606f32fbeSmrg# ----------------------------
914706f32fbeSmrg# implement the --enable-shared flag, and supports the `shared' and
914806f32fbeSmrg# `disable-shared' LT_INIT options.
914906f32fbeSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
915006f32fbeSmrgm4_define([_LT_ENABLE_SHARED],
915106f32fbeSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
915206f32fbeSmrgAC_ARG_ENABLE([shared],
915306f32fbeSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
915406f32fbeSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
915506f32fbeSmrg    [p=${PACKAGE-default}
915606f32fbeSmrg    case $enableval in
915706f32fbeSmrg    yes) enable_shared=yes ;;
915806f32fbeSmrg    no) enable_shared=no ;;
915906f32fbeSmrg    *)
916006f32fbeSmrg      enable_shared=no
916106f32fbeSmrg      # Look at the argument we got.  We use all the common list separators.
916206f32fbeSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
916306f32fbeSmrg      for pkg in $enableval; do
916406f32fbeSmrg	IFS="$lt_save_ifs"
916506f32fbeSmrg	if test "X$pkg" = "X$p"; then
916606f32fbeSmrg	  enable_shared=yes
916706f32fbeSmrg	fi
916806f32fbeSmrg      done
916906f32fbeSmrg      IFS="$lt_save_ifs"
917006f32fbeSmrg      ;;
917106f32fbeSmrg    esac],
917206f32fbeSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
9173ea133fd7Smrg
917406f32fbeSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
917506f32fbeSmrg	[Whether or not to build shared libraries])
917606f32fbeSmrg])# _LT_ENABLE_SHARED
9177ea133fd7Smrg
917806f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
917906f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
9180ea133fd7Smrg
918106f32fbeSmrg# Old names:
918206f32fbeSmrgAC_DEFUN([AC_ENABLE_SHARED],
918306f32fbeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
918406f32fbeSmrg])
9185ea133fd7Smrg
918606f32fbeSmrgAC_DEFUN([AC_DISABLE_SHARED],
918706f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
918806f32fbeSmrg])
9189ea133fd7Smrg
919006f32fbeSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
919106f32fbeSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
9192ea133fd7Smrg
919306f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
919406f32fbeSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
919506f32fbeSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
9196ea133fd7Smrg
9197ea133fd7Smrg
9198ea133fd7Smrg
919906f32fbeSmrg# _LT_ENABLE_STATIC([DEFAULT])
920006f32fbeSmrg# ----------------------------
920106f32fbeSmrg# implement the --enable-static flag, and support the `static' and
920206f32fbeSmrg# `disable-static' LT_INIT options.
920306f32fbeSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
920406f32fbeSmrgm4_define([_LT_ENABLE_STATIC],
920506f32fbeSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
920606f32fbeSmrgAC_ARG_ENABLE([static],
920706f32fbeSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
920806f32fbeSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
920906f32fbeSmrg    [p=${PACKAGE-default}
921006f32fbeSmrg    case $enableval in
921106f32fbeSmrg    yes) enable_static=yes ;;
921206f32fbeSmrg    no) enable_static=no ;;
921306f32fbeSmrg    *)
921406f32fbeSmrg     enable_static=no
921506f32fbeSmrg      # Look at the argument we got.  We use all the common list separators.
921606f32fbeSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
921706f32fbeSmrg      for pkg in $enableval; do
921806f32fbeSmrg	IFS="$lt_save_ifs"
921906f32fbeSmrg	if test "X$pkg" = "X$p"; then
922006f32fbeSmrg	  enable_static=yes
922106f32fbeSmrg	fi
922206f32fbeSmrg      done
922306f32fbeSmrg      IFS="$lt_save_ifs"
922406f32fbeSmrg      ;;
922506f32fbeSmrg    esac],
922606f32fbeSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
922706f32fbeSmrg
922806f32fbeSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
922906f32fbeSmrg	[Whether or not to build static libraries])
923006f32fbeSmrg])# _LT_ENABLE_STATIC
923106f32fbeSmrg
923206f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
923306f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
9234ea133fd7Smrg
923506f32fbeSmrg# Old names:
923606f32fbeSmrgAC_DEFUN([AC_ENABLE_STATIC],
923706f32fbeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
923806f32fbeSmrg])
9239ea133fd7Smrg
924006f32fbeSmrgAC_DEFUN([AC_DISABLE_STATIC],
924106f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
924206f32fbeSmrg])
9243ea133fd7Smrg
924406f32fbeSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
924506f32fbeSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
9246a253d6aeSmrg
924706f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
924806f32fbeSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
924906f32fbeSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
9250a253d6aeSmrg
9251a253d6aeSmrg
9252a253d6aeSmrg
925306f32fbeSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
925406f32fbeSmrg# ----------------------------------
925506f32fbeSmrg# implement the --enable-fast-install flag, and support the `fast-install'
925606f32fbeSmrg# and `disable-fast-install' LT_INIT options.
925706f32fbeSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
925806f32fbeSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
925906f32fbeSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
926006f32fbeSmrgAC_ARG_ENABLE([fast-install],
926106f32fbeSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
926206f32fbeSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
926306f32fbeSmrg    [p=${PACKAGE-default}
926406f32fbeSmrg    case $enableval in
926506f32fbeSmrg    yes) enable_fast_install=yes ;;
926606f32fbeSmrg    no) enable_fast_install=no ;;
926706f32fbeSmrg    *)
926806f32fbeSmrg      enable_fast_install=no
926906f32fbeSmrg      # Look at the argument we got.  We use all the common list separators.
927006f32fbeSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
927106f32fbeSmrg      for pkg in $enableval; do
927206f32fbeSmrg	IFS="$lt_save_ifs"
927306f32fbeSmrg	if test "X$pkg" = "X$p"; then
927406f32fbeSmrg	  enable_fast_install=yes
927506f32fbeSmrg	fi
927606f32fbeSmrg      done
927706f32fbeSmrg      IFS="$lt_save_ifs"
927806f32fbeSmrg      ;;
927906f32fbeSmrg    esac],
928006f32fbeSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
9281a253d6aeSmrg
928206f32fbeSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
928306f32fbeSmrg	 [Whether or not to optimize for fast installation])dnl
928406f32fbeSmrg])# _LT_ENABLE_FAST_INSTALL
9285a253d6aeSmrg
928606f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
928706f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
9288a253d6aeSmrg
928906f32fbeSmrg# Old names:
929006f32fbeSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
929106f32fbeSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
929206f32fbeSmrgAC_DIAGNOSE([obsolete],
929306f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
929406f32fbeSmrgthe `fast-install' option into LT_INIT's first parameter.])
929506f32fbeSmrg])
9296a253d6aeSmrg
929706f32fbeSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
929806f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
929906f32fbeSmrgAC_DIAGNOSE([obsolete],
930006f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
930106f32fbeSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
930206f32fbeSmrg])
9303a253d6aeSmrg
930406f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
930506f32fbeSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
930606f32fbeSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
9307a253d6aeSmrg
9308a253d6aeSmrg
930906f32fbeSmrg# _LT_WITH_PIC([MODE])
931006f32fbeSmrg# --------------------
931106f32fbeSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
931206f32fbeSmrg# LT_INIT options.
931306f32fbeSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
931406f32fbeSmrgm4_define([_LT_WITH_PIC],
931506f32fbeSmrg[AC_ARG_WITH([pic],
931606f32fbeSmrg    [AS_HELP_STRING([--with-pic],
931706f32fbeSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
931806f32fbeSmrg    [pic_mode="$withval"],
931906f32fbeSmrg    [pic_mode=default])
9320a253d6aeSmrg
932106f32fbeSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
9322a253d6aeSmrg
932306f32fbeSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
932406f32fbeSmrg])# _LT_WITH_PIC
9325ea133fd7Smrg
932606f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
932706f32fbeSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
9328ea133fd7Smrg
932906f32fbeSmrg# Old name:
933006f32fbeSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
933106f32fbeSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
933206f32fbeSmrgAC_DIAGNOSE([obsolete],
933306f32fbeSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
933406f32fbeSmrgput the `pic-only' option into LT_INIT's first parameter.])
933506f32fbeSmrg])
9336ea133fd7Smrg
933706f32fbeSmrgdnl aclocal-1.4 backwards compatibility:
933806f32fbeSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
9339ea133fd7Smrg
9340ea133fd7Smrg
934106f32fbeSmrgm4_define([_LTDL_MODE], [])
934206f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
934306f32fbeSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
934406f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
934506f32fbeSmrg		 [m4_define([_LTDL_MODE], [recursive])])
934606f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
934706f32fbeSmrg		 [m4_define([_LTDL_MODE], [subproject])])
9348ea133fd7Smrg
934906f32fbeSmrgm4_define([_LTDL_TYPE], [])
935006f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
935106f32fbeSmrg		 [m4_define([_LTDL_TYPE], [installable])])
935206f32fbeSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
935306f32fbeSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
9354ea133fd7Smrg
935506f32fbeSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
935606f32fbeSmrg#
935706f32fbeSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
935806f32fbeSmrg# Written by Gary V. Vaughan, 2004
935906f32fbeSmrg#
936006f32fbeSmrg# This file is free software; the Free Software Foundation gives
936106f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without
936206f32fbeSmrg# modifications, as long as this notice is preserved.
9363ea133fd7Smrg
936406f32fbeSmrg# serial 6 ltsugar.m4
936525b89263Smrg
936606f32fbeSmrg# This is to help aclocal find these macros, as it can't see m4_define.
936706f32fbeSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
936825b89263Smrg
936925b89263Smrg
937006f32fbeSmrg# lt_join(SEP, ARG1, [ARG2...])
937106f32fbeSmrg# -----------------------------
937206f32fbeSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
937306f32fbeSmrg# associated separator.
937406f32fbeSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
937506f32fbeSmrg# versions in m4sugar had bugs.
937606f32fbeSmrgm4_define([lt_join],
937706f32fbeSmrg[m4_if([$#], [1], [],
937806f32fbeSmrg       [$#], [2], [[$2]],
937906f32fbeSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
938006f32fbeSmrgm4_define([_lt_join],
938106f32fbeSmrg[m4_if([$#$2], [2], [],
938206f32fbeSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
938325b89263Smrg
938425b89263Smrg
938506f32fbeSmrg# lt_car(LIST)
938606f32fbeSmrg# lt_cdr(LIST)
938706f32fbeSmrg# ------------
938806f32fbeSmrg# Manipulate m4 lists.
938906f32fbeSmrg# These macros are necessary as long as will still need to support
939006f32fbeSmrg# Autoconf-2.59 which quotes differently.
939106f32fbeSmrgm4_define([lt_car], [[$1]])
939206f32fbeSmrgm4_define([lt_cdr],
939306f32fbeSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
939406f32fbeSmrg       [$#], 1, [],
939506f32fbeSmrg       [m4_dquote(m4_shift($@))])])
939606f32fbeSmrgm4_define([lt_unquote], $1)
9397ea133fd7Smrg
9398ea133fd7Smrg
939906f32fbeSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
940006f32fbeSmrg# ------------------------------------------
940106f32fbeSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
940206f32fbeSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
940306f32fbeSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
940406f32fbeSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
940506f32fbeSmrg# than defined and empty).
940606f32fbeSmrg#
940706f32fbeSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
940806f32fbeSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
940906f32fbeSmrgm4_define([lt_append],
941006f32fbeSmrg[m4_define([$1],
941106f32fbeSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
9412a253d6aeSmrg
9413a253d6aeSmrg
9414a253d6aeSmrg
941506f32fbeSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
941606f32fbeSmrg# ----------------------------------------------------------
941706f32fbeSmrg# Produce a SEP delimited list of all paired combinations of elements of
941806f32fbeSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
941906f32fbeSmrg# has the form PREFIXmINFIXSUFFIXn.
942006f32fbeSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
942106f32fbeSmrgm4_define([lt_combine],
942206f32fbeSmrg[m4_if(m4_eval([$# > 3]), [1],
942306f32fbeSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
942406f32fbeSmrg[[m4_foreach([_Lt_prefix], [$2],
942506f32fbeSmrg	     [m4_foreach([_Lt_suffix],
942606f32fbeSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
942706f32fbeSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
9428a253d6aeSmrg
9429a253d6aeSmrg
943006f32fbeSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
943106f32fbeSmrg# -----------------------------------------------------------------------
943206f32fbeSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
943306f32fbeSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
943406f32fbeSmrgm4_define([lt_if_append_uniq],
943506f32fbeSmrg[m4_ifdef([$1],
943606f32fbeSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
943706f32fbeSmrg		 [lt_append([$1], [$2], [$3])$4],
943806f32fbeSmrg		 [$5])],
943906f32fbeSmrg	  [lt_append([$1], [$2], [$3])$4])])
9440a253d6aeSmrg
9441a253d6aeSmrg
944206f32fbeSmrg# lt_dict_add(DICT, KEY, VALUE)
944306f32fbeSmrg# -----------------------------
944406f32fbeSmrgm4_define([lt_dict_add],
944506f32fbeSmrg[m4_define([$1($2)], [$3])])
9446a253d6aeSmrg
9447a253d6aeSmrg
944806f32fbeSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
944906f32fbeSmrg# --------------------------------------------
945006f32fbeSmrgm4_define([lt_dict_add_subkey],
945106f32fbeSmrg[m4_define([$1($2:$3)], [$4])])
9452a253d6aeSmrg
9453a253d6aeSmrg
945406f32fbeSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
945506f32fbeSmrg# ----------------------------------
945606f32fbeSmrgm4_define([lt_dict_fetch],
945706f32fbeSmrg[m4_ifval([$3],
945806f32fbeSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
945906f32fbeSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
9460ea133fd7Smrg
9461ea133fd7Smrg
946206f32fbeSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
946306f32fbeSmrg# -----------------------------------------------------------------
946406f32fbeSmrgm4_define([lt_if_dict_fetch],
946506f32fbeSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
946606f32fbeSmrg	[$5],
946706f32fbeSmrg    [$6])])
9468ea133fd7Smrg
9469ea133fd7Smrg
947006f32fbeSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
947106f32fbeSmrg# --------------------------------------------------------------
947206f32fbeSmrgm4_define([lt_dict_filter],
947306f32fbeSmrg[m4_if([$5], [], [],
947406f32fbeSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
947506f32fbeSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
947606f32fbeSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
947706f32fbeSmrg])
9478a253d6aeSmrg
947906f32fbeSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
948006f32fbeSmrg#
948106f32fbeSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
948206f32fbeSmrg#   Written by Scott James Remnant, 2004
948306f32fbeSmrg#
948406f32fbeSmrg# This file is free software; the Free Software Foundation gives
948506f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without
948606f32fbeSmrg# modifications, as long as this notice is preserved.
9487ea133fd7Smrg
948806f32fbeSmrg# @configure_input@
9489ea133fd7Smrg
949006f32fbeSmrg# serial 3293 ltversion.m4
949106f32fbeSmrg# This file is part of GNU Libtool
9492ea133fd7Smrg
949306f32fbeSmrgm4_define([LT_PACKAGE_VERSION], [2.4])
949406f32fbeSmrgm4_define([LT_PACKAGE_REVISION], [1.3293])
9495a253d6aeSmrg
949606f32fbeSmrgAC_DEFUN([LTVERSION_VERSION],
949706f32fbeSmrg[macro_version='2.4'
949806f32fbeSmrgmacro_revision='1.3293'
949906f32fbeSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
950006f32fbeSmrg_LT_DECL(, macro_revision, 0)
950106f32fbeSmrg])
9502a253d6aeSmrg
950306f32fbeSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
950406f32fbeSmrg#
950506f32fbeSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
950606f32fbeSmrg#   Written by Scott James Remnant, 2004.
950706f32fbeSmrg#
950806f32fbeSmrg# This file is free software; the Free Software Foundation gives
950906f32fbeSmrg# unlimited permission to copy and/or distribute it, with or without
951006f32fbeSmrg# modifications, as long as this notice is preserved.
9511a253d6aeSmrg
951206f32fbeSmrg# serial 5 lt~obsolete.m4
9513ea133fd7Smrg
951406f32fbeSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
951506f32fbeSmrg#
951606f32fbeSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
951706f32fbeSmrg# which have later been changed to m4_define as they aren't part of the
951806f32fbeSmrg# exported API, or moved to Autoconf or Automake where they belong.
951906f32fbeSmrg#
952006f32fbeSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
952106f32fbeSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
952206f32fbeSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
952306f32fbeSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
952406f32fbeSmrg# and doesn't know about Autoconf macros at all.)
952506f32fbeSmrg#
952606f32fbeSmrg# So we provide this file, which has a silly filename so it's always
952706f32fbeSmrg# included after everything else.  This provides aclocal with the
952806f32fbeSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
952906f32fbeSmrg# because those macros already exist, or will be overwritten later.
953006f32fbeSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
953106f32fbeSmrg#
953206f32fbeSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
953306f32fbeSmrg# Yes, that means every name once taken will need to remain here until
953406f32fbeSmrg# we give up compatibility with versions before 1.7, at which point
953506f32fbeSmrg# we need to keep only those names which we still refer to.
9536ea133fd7Smrg
953706f32fbeSmrg# This is to help aclocal find these macros, as it can't see m4_define.
953806f32fbeSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
9539a253d6aeSmrg
954006f32fbeSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
954106f32fbeSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
954206f32fbeSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
954306f32fbeSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
954406f32fbeSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
954506f32fbeSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
954606f32fbeSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
954706f32fbeSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
954806f32fbeSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
954906f32fbeSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
955006f32fbeSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
955106f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
955206f32fbeSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
955306f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
955406f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
955506f32fbeSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
955606f32fbeSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
955706f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
955806f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
955906f32fbeSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
956006f32fbeSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
956106f32fbeSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
956206f32fbeSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
956306f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
956406f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
956506f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
956606f32fbeSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
956706f32fbeSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
956806f32fbeSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
956906f32fbeSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
957006f32fbeSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
957106f32fbeSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
957206f32fbeSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
957306f32fbeSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
957406f32fbeSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
957506f32fbeSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
957606f32fbeSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
957706f32fbeSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
957806f32fbeSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
957906f32fbeSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
958006f32fbeSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
958106f32fbeSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
958206f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
958306f32fbeSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
958406f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
958506f32fbeSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
958606f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
958706f32fbeSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
958806f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
958906f32fbeSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
959006f32fbeSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
959106f32fbeSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
959206f32fbeSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
959306f32fbeSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
959406f32fbeSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
959506f32fbeSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
959606f32fbeSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
959706f32fbeSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
959806f32fbeSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
959906f32fbeSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
960006f32fbeSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
9601a253d6aeSmrg
960206f32fbeSmrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
960306f32fbeSmrgdnl
960406f32fbeSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
960506f32fbeSmrgdnl 
960606f32fbeSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
960706f32fbeSmrgdnl copy of this software and associated documentation files (the "Software"),
960806f32fbeSmrgdnl to deal in the Software without restriction, including without limitation
960906f32fbeSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
961006f32fbeSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
961106f32fbeSmrgdnl Software is furnished to do so, subject to the following conditions:
961206f32fbeSmrgdnl
961306f32fbeSmrgdnl The above copyright notice and this permission notice (including the next
961406f32fbeSmrgdnl paragraph) shall be included in all copies or substantial portions of the
961506f32fbeSmrgdnl Software.
961606f32fbeSmrgdnl
961706f32fbeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
961806f32fbeSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
961906f32fbeSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
962006f32fbeSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
962106f32fbeSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
962206f32fbeSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
962306f32fbeSmrgdnl DEALINGS IN THE SOFTWARE.
962425b89263Smrg
962506f32fbeSmrg# XORG_MACROS_VERSION(required-version)
962606f32fbeSmrg# -------------------------------------
962706f32fbeSmrg# Minimum version: 1.1.0
962806f32fbeSmrg#
962906f32fbeSmrg# If you're using a macro added in Version 1.1 or newer, include this in
963006f32fbeSmrg# your configure.ac with the minimum required version, such as:
963106f32fbeSmrg# XORG_MACROS_VERSION(1.1)
963206f32fbeSmrg#
963306f32fbeSmrg# To ensure that this macro is defined, also add:
963406f32fbeSmrg# m4_ifndef([XORG_MACROS_VERSION],
963506f32fbeSmrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
963606f32fbeSmrg#
963706f32fbeSmrg#
963806f32fbeSmrg# See the "minimum version" comment for each macro you use to see what 
963906f32fbeSmrg# version you require.
964006f32fbeSmrgm4_defun([XORG_MACROS_VERSION],[
964106f32fbeSmrgm4_define([vers_have], [1.16.2])
964206f32fbeSmrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
964306f32fbeSmrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
964406f32fbeSmrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
964506f32fbeSmrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
964606f32fbeSmrgm4_if(m4_version_compare(vers_have, [$1]), -1,
964706f32fbeSmrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
964806f32fbeSmrgm4_undefine([vers_have])
964906f32fbeSmrgm4_undefine([maj_have])
965006f32fbeSmrgm4_undefine([maj_needed])
965106f32fbeSmrg]) # XORG_MACROS_VERSION
965225b89263Smrg
965306f32fbeSmrg# XORG_PROG_RAWCPP()
965406f32fbeSmrg# ------------------
965506f32fbeSmrg# Minimum version: 1.0.0
965606f32fbeSmrg#
965706f32fbeSmrg# Find cpp program and necessary flags for use in pre-processing text files
965806f32fbeSmrg# such as man pages and config files
965906f32fbeSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
966006f32fbeSmrgAC_REQUIRE([AC_PROG_CPP])
966106f32fbeSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
966206f32fbeSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
9663a253d6aeSmrg
966406f32fbeSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
966506f32fbeSmrg# which is not the best choice for supporting other OS'es, but covers most
966606f32fbeSmrg# of the ones we need for now.
966706f32fbeSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
966806f32fbeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp redefine unix ?]])])
966906f32fbeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
967006f32fbeSmrg	AC_MSG_RESULT([no])
967106f32fbeSmrgelse
967206f32fbeSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
967306f32fbeSmrg		RAWCPPFLAGS=-undef
967406f32fbeSmrg		AC_MSG_RESULT([yes])
967506f32fbeSmrg	# under Cygwin unix is still defined even with -undef
967606f32fbeSmrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
967706f32fbeSmrg		RAWCPPFLAGS="-undef -ansi"
967806f32fbeSmrg		AC_MSG_RESULT([yes, with -ansi])
967906f32fbeSmrg	else
968006f32fbeSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
968106f32fbeSmrg	fi
968206f32fbeSmrgfi
968306f32fbeSmrgrm -f conftest.$ac_ext
9684a253d6aeSmrg
968506f32fbeSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
968606f32fbeSmrgAC_LANG_CONFTEST([AC_LANG_SOURCE([[Does cpp preserve   "whitespace"?]])])
968706f32fbeSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
968806f32fbeSmrg	AC_MSG_RESULT([no])
968906f32fbeSmrgelse
969006f32fbeSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
969106f32fbeSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
969206f32fbeSmrg		AC_MSG_RESULT([yes])
969306f32fbeSmrg	else
969406f32fbeSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
969506f32fbeSmrg	fi
969606f32fbeSmrgfi
969706f32fbeSmrgrm -f conftest.$ac_ext
969806f32fbeSmrgAC_SUBST(RAWCPPFLAGS)
969906f32fbeSmrg]) # XORG_PROG_RAWCPP
9700a253d6aeSmrg
970106f32fbeSmrg# XORG_MANPAGE_SECTIONS()
970206f32fbeSmrg# -----------------------
970306f32fbeSmrg# Minimum version: 1.0.0
970406f32fbeSmrg#
970506f32fbeSmrg# Determine which sections man pages go in for the different man page types
970606f32fbeSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
970706f32fbeSmrg# Not sure if there's any better way than just hardcoding by OS name.
970806f32fbeSmrg# Override default settings by setting environment variables
970906f32fbeSmrg# Added MAN_SUBSTS in version 1.8
971006f32fbeSmrg# Added AC_PROG_SED in version 1.8
9711a253d6aeSmrg
971206f32fbeSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
971306f32fbeSmrgAC_REQUIRE([AC_CANONICAL_HOST])
971406f32fbeSmrgAC_REQUIRE([AC_PROG_SED])
9715a253d6aeSmrg
971606f32fbeSmrgif test x$APP_MAN_SUFFIX = x    ; then
971706f32fbeSmrg    APP_MAN_SUFFIX=1
971806f32fbeSmrgfi
971906f32fbeSmrgif test x$APP_MAN_DIR = x    ; then
972006f32fbeSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
972106f32fbeSmrgfi
9722a253d6aeSmrg
972306f32fbeSmrgif test x$LIB_MAN_SUFFIX = x    ; then
972406f32fbeSmrg    LIB_MAN_SUFFIX=3
972506f32fbeSmrgfi
972606f32fbeSmrgif test x$LIB_MAN_DIR = x    ; then
972706f32fbeSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
972806f32fbeSmrgfi
972925b89263Smrg
973006f32fbeSmrgif test x$FILE_MAN_SUFFIX = x    ; then
973106f32fbeSmrg    case $host_os in
973206f32fbeSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
973306f32fbeSmrg	*)		FILE_MAN_SUFFIX=5  ;;
973406f32fbeSmrg    esac
973506f32fbeSmrgfi
973606f32fbeSmrgif test x$FILE_MAN_DIR = x    ; then
973706f32fbeSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
973806f32fbeSmrgfi
973925b89263Smrg
974006f32fbeSmrgif test x$MISC_MAN_SUFFIX = x    ; then
974106f32fbeSmrg    case $host_os in
974206f32fbeSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
974306f32fbeSmrg	*)		MISC_MAN_SUFFIX=7  ;;
974406f32fbeSmrg    esac
974506f32fbeSmrgfi
974606f32fbeSmrgif test x$MISC_MAN_DIR = x    ; then
974706f32fbeSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
974806f32fbeSmrgfi
974925b89263Smrg
975006f32fbeSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
975106f32fbeSmrg    case $host_os in
975206f32fbeSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
975306f32fbeSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
975406f32fbeSmrg    esac
975506f32fbeSmrgfi
975606f32fbeSmrgif test x$DRIVER_MAN_DIR = x    ; then
975706f32fbeSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
975806f32fbeSmrgfi
975925b89263Smrg
976006f32fbeSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
976106f32fbeSmrg    case $host_os in
976206f32fbeSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
976306f32fbeSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
976406f32fbeSmrg    esac
976506f32fbeSmrgfi
976606f32fbeSmrgif test x$ADMIN_MAN_DIR = x    ; then
976706f32fbeSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
976806f32fbeSmrgfi
976925b89263Smrg
977025b89263Smrg
977106f32fbeSmrgAC_SUBST([APP_MAN_SUFFIX])
977206f32fbeSmrgAC_SUBST([LIB_MAN_SUFFIX])
977306f32fbeSmrgAC_SUBST([FILE_MAN_SUFFIX])
977406f32fbeSmrgAC_SUBST([MISC_MAN_SUFFIX])
977506f32fbeSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
977606f32fbeSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
977706f32fbeSmrgAC_SUBST([APP_MAN_DIR])
977806f32fbeSmrgAC_SUBST([LIB_MAN_DIR])
977906f32fbeSmrgAC_SUBST([FILE_MAN_DIR])
978006f32fbeSmrgAC_SUBST([MISC_MAN_DIR])
978106f32fbeSmrgAC_SUBST([DRIVER_MAN_DIR])
978206f32fbeSmrgAC_SUBST([ADMIN_MAN_DIR])
978325b89263Smrg
978406f32fbeSmrgXORG_MAN_PAGE="X Version 11"
978506f32fbeSmrgAC_SUBST([XORG_MAN_PAGE])
978606f32fbeSmrgMAN_SUBSTS="\
978706f32fbeSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
978806f32fbeSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
978906f32fbeSmrg	-e 's|__xservername__|Xorg|g' \
979006f32fbeSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
979106f32fbeSmrg	-e 's|__projectroot__|\$(prefix)|g' \
979206f32fbeSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
979306f32fbeSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
979406f32fbeSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
979506f32fbeSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
979606f32fbeSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
979706f32fbeSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
979806f32fbeSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
979906f32fbeSmrgAC_SUBST([MAN_SUBSTS])
980025b89263Smrg
980106f32fbeSmrg]) # XORG_MANPAGE_SECTIONS
9802a253d6aeSmrg
980306f32fbeSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
980406f32fbeSmrg# ------------------------
980506f32fbeSmrg# Minimum version: 1.7.0
980625b89263Smrg#
980706f32fbeSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
980806f32fbeSmrg# provided by xorg-sgml-doctools, if installed.
980906f32fbeSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
981006f32fbeSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
981106f32fbeSmrgXORG_SGML_PATH=
981206f32fbeSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
981306f32fbeSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
981406f32fbeSmrg    [m4_ifval([$1],[:],
981506f32fbeSmrg        [if test x"$cross_compiling" != x"yes" ; then
981606f32fbeSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
981706f32fbeSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
981806f32fbeSmrg         fi])
981906f32fbeSmrg    ])
9820a253d6aeSmrg
982106f32fbeSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
982206f32fbeSmrg# the path and the name of the doc stylesheet
982306f32fbeSmrgif test "x$XORG_SGML_PATH" != "x" ; then
982406f32fbeSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
982506f32fbeSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
982606f32fbeSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
982706f32fbeSmrgelse
982806f32fbeSmrg   AC_MSG_RESULT([no])
982906f32fbeSmrgfi
9830a253d6aeSmrg
983106f32fbeSmrgAC_SUBST(XORG_SGML_PATH)
983206f32fbeSmrgAC_SUBST(STYLESHEET_SRCDIR)
983306f32fbeSmrgAC_SUBST(XSL_STYLESHEET)
983406f32fbeSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
983506f32fbeSmrg]) # XORG_CHECK_SGML_DOCTOOLS
9836a253d6aeSmrg
983706f32fbeSmrg# XORG_CHECK_LINUXDOC
983806f32fbeSmrg# -------------------
983906f32fbeSmrg# Minimum version: 1.0.0
984006f32fbeSmrg#
984106f32fbeSmrg# Defines the variable MAKE_TEXT if the necessary tools and
984206f32fbeSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
984306f32fbeSmrg# Whether or not the necessary tools and files are found can be checked
984406f32fbeSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
984506f32fbeSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
984606f32fbeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
984706f32fbeSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
9848a253d6aeSmrg
984906f32fbeSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
9850a253d6aeSmrg
985106f32fbeSmrgAC_MSG_CHECKING([whether to build documentation])
9852a253d6aeSmrg
985306f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
985406f32fbeSmrg   BUILDDOC=yes
985506f32fbeSmrgelse
985606f32fbeSmrg   BUILDDOC=no
985706f32fbeSmrgfi
9858a253d6aeSmrg
985906f32fbeSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
9860a253d6aeSmrg
986106f32fbeSmrgAC_MSG_RESULT([$BUILDDOC])
9862a253d6aeSmrg
986306f32fbeSmrgAC_MSG_CHECKING([whether to build pdf documentation])
9864a253d6aeSmrg
986506f32fbeSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
986606f32fbeSmrg   BUILDPDFDOC=yes
986706f32fbeSmrgelse
986806f32fbeSmrg   BUILDPDFDOC=no
986906f32fbeSmrgfi
9870a253d6aeSmrg
987106f32fbeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
9872a253d6aeSmrg
987306f32fbeSmrgAC_MSG_RESULT([$BUILDPDFDOC])
9874a253d6aeSmrg
987506f32fbeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
987606f32fbeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
987706f32fbeSmrgMAKE_PDF="$PS2PDF"
987806f32fbeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
9879a253d6aeSmrg
988006f32fbeSmrgAC_SUBST(MAKE_TEXT)
988106f32fbeSmrgAC_SUBST(MAKE_PS)
988206f32fbeSmrgAC_SUBST(MAKE_PDF)
988306f32fbeSmrgAC_SUBST(MAKE_HTML)
988406f32fbeSmrg]) # XORG_CHECK_LINUXDOC
9885a253d6aeSmrg
988606f32fbeSmrg# XORG_CHECK_DOCBOOK
988706f32fbeSmrg# -------------------
988806f32fbeSmrg# Minimum version: 1.0.0
988906f32fbeSmrg#
989006f32fbeSmrg# Checks for the ability to build output formats from SGML DocBook source.
989106f32fbeSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
989206f32fbeSmrg# indicates whether the necessary tools and files are found and, if set,
989306f32fbeSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
989406f32fbeSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
989506f32fbeSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
9896a253d6aeSmrg
989706f32fbeSmrgBUILDTXTDOC=no
989806f32fbeSmrgBUILDPDFDOC=no
989906f32fbeSmrgBUILDPSDOC=no
990006f32fbeSmrgBUILDHTMLDOC=no
9901a253d6aeSmrg
990206f32fbeSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
990306f32fbeSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
990406f32fbeSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
990506f32fbeSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
990625b89263Smrg
990706f32fbeSmrgAC_MSG_CHECKING([whether to build text documentation])
990806f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
990906f32fbeSmrg   test x$BUILD_TXTDOC != xno; then
991006f32fbeSmrg	BUILDTXTDOC=yes
991106f32fbeSmrgfi
991206f32fbeSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
991306f32fbeSmrgAC_MSG_RESULT([$BUILDTXTDOC])
991425b89263Smrg
991506f32fbeSmrgAC_MSG_CHECKING([whether to build PDF documentation])
991606f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
991706f32fbeSmrg   test x$BUILD_PDFDOC != xno; then
991806f32fbeSmrg	BUILDPDFDOC=yes
991906f32fbeSmrgfi
992006f32fbeSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
992106f32fbeSmrgAC_MSG_RESULT([$BUILDPDFDOC])
9922a253d6aeSmrg
992306f32fbeSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
992406f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
992506f32fbeSmrg   test x$BUILD_PSDOC != xno; then
992606f32fbeSmrg	BUILDPSDOC=yes
992706f32fbeSmrgfi
992806f32fbeSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
992906f32fbeSmrgAC_MSG_RESULT([$BUILDPSDOC])
9930a253d6aeSmrg
993106f32fbeSmrgAC_MSG_CHECKING([whether to build HTML documentation])
993206f32fbeSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
993306f32fbeSmrg   test x$BUILD_HTMLDOC != xno; then
993406f32fbeSmrg	BUILDHTMLDOC=yes
993506f32fbeSmrgfi
993606f32fbeSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
993706f32fbeSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
9938a253d6aeSmrg
993906f32fbeSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
994006f32fbeSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
994106f32fbeSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
994206f32fbeSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
9943a253d6aeSmrg
994406f32fbeSmrgAC_SUBST(MAKE_TEXT)
994506f32fbeSmrgAC_SUBST(MAKE_PS)
994606f32fbeSmrgAC_SUBST(MAKE_PDF)
994706f32fbeSmrgAC_SUBST(MAKE_HTML)
994806f32fbeSmrg]) # XORG_CHECK_DOCBOOK
9949a253d6aeSmrg
995006f32fbeSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
995106f32fbeSmrg# ----------------
995206f32fbeSmrg# Minimum version: 1.5.0
995306f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
995406f32fbeSmrg#
995506f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes
995606f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the
995706f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
995806f32fbeSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
995906f32fbeSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
996006f32fbeSmrg# --with-xmlto assumes 'auto'.
996106f32fbeSmrg#
996206f32fbeSmrg# Interface to module:
996306f32fbeSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
996406f32fbeSmrg# XMLTO:	returns the path of the xmlto program found
996506f32fbeSmrg#		returns the path set by the user in the environment
996606f32fbeSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
996706f32fbeSmrg#		'no' user instructs the module not to use xmlto
996806f32fbeSmrg#
996906f32fbeSmrg# Added in version 1.10.0
997006f32fbeSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
997106f32fbeSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
997206f32fbeSmrg#
997306f32fbeSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
997406f32fbeSmrg#
997506f32fbeSmrgAC_DEFUN([XORG_WITH_XMLTO],[
997606f32fbeSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
997706f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto]))
997806f32fbeSmrgAC_ARG_WITH(xmlto,
997906f32fbeSmrg	AS_HELP_STRING([--with-xmlto],
998006f32fbeSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
998106f32fbeSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
998206f32fbeSmrgm4_undefine([_defopt])
9983a253d6aeSmrg
998406f32fbeSmrgif test "x$use_xmlto" = x"auto"; then
998506f32fbeSmrg   AC_PATH_PROG([XMLTO], [xmlto])
998606f32fbeSmrg   if test "x$XMLTO" = "x"; then
998706f32fbeSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
998806f32fbeSmrg	have_xmlto=no
998906f32fbeSmrg   else
999006f32fbeSmrg        have_xmlto=yes
999106f32fbeSmrg   fi
999206f32fbeSmrgelif test "x$use_xmlto" = x"yes" ; then
999306f32fbeSmrg   AC_PATH_PROG([XMLTO], [xmlto])
999406f32fbeSmrg   if test "x$XMLTO" = "x"; then
999506f32fbeSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
999606f32fbeSmrg   fi
999706f32fbeSmrg   have_xmlto=yes
999806f32fbeSmrgelif test "x$use_xmlto" = x"no" ; then
999906f32fbeSmrg   if test "x$XMLTO" != "x"; then
1000006f32fbeSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
1000106f32fbeSmrg   fi
1000206f32fbeSmrg   have_xmlto=no
1000306f32fbeSmrgelse
1000406f32fbeSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
1000506f32fbeSmrgfi
10006a253d6aeSmrg
1000706f32fbeSmrg# Test for a minimum version of xmlto, if provided.
1000806f32fbeSmrgm4_ifval([$1],
1000906f32fbeSmrg[if test "$have_xmlto" = yes; then
1001006f32fbeSmrg    # scrape the xmlto version
1001106f32fbeSmrg    AC_MSG_CHECKING([the xmlto version])
1001206f32fbeSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
1001306f32fbeSmrg    AC_MSG_RESULT([$xmlto_version])
1001406f32fbeSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
1001506f32fbeSmrg        [if test "x$use_xmlto" = xauto; then
1001606f32fbeSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
1001706f32fbeSmrg            have_xmlto=no
1001806f32fbeSmrg        else
1001906f32fbeSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
1002006f32fbeSmrg        fi])
1002106f32fbeSmrgfi])
10022a253d6aeSmrg
1002306f32fbeSmrg# Test for the ability of xmlto to generate a text target
1002406f32fbeSmrghave_xmlto_text=no
1002506f32fbeSmrgcat > conftest.xml << "EOF"
1002606f32fbeSmrgEOF
1002706f32fbeSmrgAS_IF([test "$have_xmlto" = yes],
1002806f32fbeSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
1002906f32fbeSmrg             [have_xmlto_text=yes],
1003006f32fbeSmrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
1003106f32fbeSmrgrm -f conftest.xml
1003206f32fbeSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
1003306f32fbeSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
1003406f32fbeSmrg]) # XORG_WITH_XMLTO
10035a253d6aeSmrg
1003606f32fbeSmrg# XORG_WITH_XSLTPROC([MIN-VERSION], [DEFAULT])
1003706f32fbeSmrg# --------------------------------------------
1003806f32fbeSmrg# Minimum version: 1.12.0
1003906f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.12.0
1004006f32fbeSmrg#
1004106f32fbeSmrg# XSLT (Extensible Stylesheet Language Transformations) is a declarative,
1004206f32fbeSmrg# XML-based language used for the transformation of XML documents.
1004306f32fbeSmrg# The xsltproc command line tool is for applying XSLT stylesheets to XML documents.
1004406f32fbeSmrg# It is used under the cover by xmlto to generate html files from DocBook/XML.
1004506f32fbeSmrg# The XSLT processor is often used as a standalone tool for transformations.
1004606f32fbeSmrg# It should not be assumed that this tool is used only to work with documnetation.
1004706f32fbeSmrg# When DEFAULT is not specified, --with-xsltproc assumes 'auto'.
1004806f32fbeSmrg#
1004906f32fbeSmrg# Interface to module:
1005006f32fbeSmrg# HAVE_XSLTPROC: used in makefiles to conditionally generate documentation
1005106f32fbeSmrg# XSLTPROC:	 returns the path of the xsltproc program found
1005206f32fbeSmrg#		 returns the path set by the user in the environment
1005306f32fbeSmrg# --with-xsltproc: 'yes' user instructs the module to use xsltproc
1005406f32fbeSmrg#		  'no' user instructs the module not to use xsltproc
1005506f32fbeSmrg# have_xsltproc: returns yes if xsltproc found in PATH or no
1005606f32fbeSmrg#
1005706f32fbeSmrg# If the user sets the value of XSLTPROC, AC_PATH_PROG skips testing the path.
1005806f32fbeSmrg#
1005906f32fbeSmrgAC_DEFUN([XORG_WITH_XSLTPROC],[
1006006f32fbeSmrgAC_ARG_VAR([XSLTPROC], [Path to xsltproc command])
1006106f32fbeSmrg# Preserves the interface, should it be implemented later
1006206f32fbeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for xsltproc MIN-VERSION is not implemented])])
1006306f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto]))
1006406f32fbeSmrgAC_ARG_WITH(xsltproc,
1006506f32fbeSmrg	AS_HELP_STRING([--with-xsltproc],
1006606f32fbeSmrg	   [Use xsltproc for the transformation of XML documents (default: ]_defopt[)]),
1006706f32fbeSmrg	   [use_xsltproc=$withval], [use_xsltproc=]_defopt)
1006806f32fbeSmrgm4_undefine([_defopt])
10069a253d6aeSmrg
1007006f32fbeSmrgif test "x$use_xsltproc" = x"auto"; then
1007106f32fbeSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
1007206f32fbeSmrg   if test "x$XSLTPROC" = "x"; then
1007306f32fbeSmrg        AC_MSG_WARN([xsltproc not found - cannot transform XML documents])
1007406f32fbeSmrg	have_xsltproc=no
1007506f32fbeSmrg   else
1007606f32fbeSmrg        have_xsltproc=yes
1007706f32fbeSmrg   fi
1007806f32fbeSmrgelif test "x$use_xsltproc" = x"yes" ; then
1007906f32fbeSmrg   AC_PATH_PROG([XSLTPROC], [xsltproc])
1008006f32fbeSmrg   if test "x$XSLTPROC" = "x"; then
1008106f32fbeSmrg        AC_MSG_ERROR([--with-xsltproc=yes specified but xsltproc not found in PATH])
1008206f32fbeSmrg   fi
1008306f32fbeSmrg   have_xsltproc=yes
1008406f32fbeSmrgelif test "x$use_xsltproc" = x"no" ; then
1008506f32fbeSmrg   if test "x$XSLTPROC" != "x"; then
1008606f32fbeSmrg      AC_MSG_WARN([ignoring XSLTPROC environment variable since --with-xsltproc=no was specified])
1008706f32fbeSmrg   fi
1008806f32fbeSmrg   have_xsltproc=no
1008906f32fbeSmrgelse
1009006f32fbeSmrg   AC_MSG_ERROR([--with-xsltproc expects 'yes' or 'no'])
1009106f32fbeSmrgfi
10092a253d6aeSmrg
1009306f32fbeSmrgAM_CONDITIONAL([HAVE_XSLTPROC], [test "$have_xsltproc" = yes])
1009406f32fbeSmrg]) # XORG_WITH_XSLTPROC
10095a253d6aeSmrg
1009606f32fbeSmrg# XORG_WITH_PERL([MIN-VERSION], [DEFAULT])
1009706f32fbeSmrg# ----------------------------------------
1009806f32fbeSmrg# Minimum version: 1.15.0
1009906f32fbeSmrg#
1010006f32fbeSmrg# PERL (Practical Extraction and Report Language) is a language optimized for
1010106f32fbeSmrg# scanning arbitrary text files, extracting information from those text files,
1010206f32fbeSmrg# and printing reports based on that information.
1010306f32fbeSmrg#
1010406f32fbeSmrg# When DEFAULT is not specified, --with-perl assumes 'auto'.
1010506f32fbeSmrg#
1010606f32fbeSmrg# Interface to module:
1010706f32fbeSmrg# HAVE_PERL: used in makefiles to conditionally scan text files
1010806f32fbeSmrg# PERL:	     returns the path of the perl program found
1010906f32fbeSmrg#	     returns the path set by the user in the environment
1011006f32fbeSmrg# --with-perl: 'yes' user instructs the module to use perl
1011106f32fbeSmrg#	       'no' user instructs the module not to use perl
1011206f32fbeSmrg# have_perl: returns yes if perl found in PATH or no
1011306f32fbeSmrg#
1011406f32fbeSmrg# If the user sets the value of PERL, AC_PATH_PROG skips testing the path.
1011506f32fbeSmrg#
1011606f32fbeSmrgAC_DEFUN([XORG_WITH_PERL],[
1011706f32fbeSmrgAC_ARG_VAR([PERL], [Path to perl command])
1011806f32fbeSmrg# Preserves the interface, should it be implemented later
1011906f32fbeSmrgm4_ifval([$1], [m4_warn([syntax], [Checking for perl MIN-VERSION is not implemented])])
1012006f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto]))
1012106f32fbeSmrgAC_ARG_WITH(perl,
1012206f32fbeSmrg	AS_HELP_STRING([--with-perl],
1012306f32fbeSmrg	   [Use perl for extracting information from files (default: ]_defopt[)]),
1012406f32fbeSmrg	   [use_perl=$withval], [use_perl=]_defopt)
1012506f32fbeSmrgm4_undefine([_defopt])
1012625b89263Smrg
1012706f32fbeSmrgif test "x$use_perl" = x"auto"; then
1012806f32fbeSmrg   AC_PATH_PROG([PERL], [perl])
1012906f32fbeSmrg   if test "x$PERL" = "x"; then
1013006f32fbeSmrg        AC_MSG_WARN([perl not found - cannot extract information and report])
1013106f32fbeSmrg	have_perl=no
1013206f32fbeSmrg   else
1013306f32fbeSmrg        have_perl=yes
1013406f32fbeSmrg   fi
1013506f32fbeSmrgelif test "x$use_perl" = x"yes" ; then
1013606f32fbeSmrg   AC_PATH_PROG([PERL], [perl])
1013706f32fbeSmrg   if test "x$PERL" = "x"; then
1013806f32fbeSmrg        AC_MSG_ERROR([--with-perl=yes specified but perl not found in PATH])
1013906f32fbeSmrg   fi
1014006f32fbeSmrg   have_perl=yes
1014106f32fbeSmrgelif test "x$use_perl" = x"no" ; then
1014206f32fbeSmrg   if test "x$PERL" != "x"; then
1014306f32fbeSmrg      AC_MSG_WARN([ignoring PERL environment variable since --with-perl=no was specified])
1014406f32fbeSmrg   fi
1014506f32fbeSmrg   have_perl=no
1014606f32fbeSmrgelse
1014706f32fbeSmrg   AC_MSG_ERROR([--with-perl expects 'yes' or 'no'])
1014806f32fbeSmrgfi
1014925b89263Smrg
1015006f32fbeSmrgAM_CONDITIONAL([HAVE_PERL], [test "$have_perl" = yes])
1015106f32fbeSmrg]) # XORG_WITH_PERL
1015225b89263Smrg
1015306f32fbeSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
1015406f32fbeSmrg# ----------------
1015506f32fbeSmrg# Minimum version: 1.5.0
1015606f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1015706f32fbeSmrg#
1015806f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes
1015906f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the
1016006f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1016106f32fbeSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
1016206f32fbeSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
1016306f32fbeSmrg# --with-asciidoc assumes 'auto'.
1016406f32fbeSmrg#
1016506f32fbeSmrg# Interface to module:
1016606f32fbeSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
1016706f32fbeSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
1016806f32fbeSmrg#		 returns the path set by the user in the environment
1016906f32fbeSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
1017006f32fbeSmrg#		  'no' user instructs the module not to use asciidoc
1017106f32fbeSmrg#
1017206f32fbeSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
1017306f32fbeSmrg#
1017406f32fbeSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
1017506f32fbeSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
1017606f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto]))
1017706f32fbeSmrgAC_ARG_WITH(asciidoc,
1017806f32fbeSmrg	AS_HELP_STRING([--with-asciidoc],
1017906f32fbeSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
1018006f32fbeSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
1018106f32fbeSmrgm4_undefine([_defopt])
10182a253d6aeSmrg
1018306f32fbeSmrgif test "x$use_asciidoc" = x"auto"; then
1018406f32fbeSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1018506f32fbeSmrg   if test "x$ASCIIDOC" = "x"; then
1018606f32fbeSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
1018706f32fbeSmrg	have_asciidoc=no
1018806f32fbeSmrg   else
1018906f32fbeSmrg        have_asciidoc=yes
1019006f32fbeSmrg   fi
1019106f32fbeSmrgelif test "x$use_asciidoc" = x"yes" ; then
1019206f32fbeSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
1019306f32fbeSmrg   if test "x$ASCIIDOC" = "x"; then
1019406f32fbeSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
1019506f32fbeSmrg   fi
1019606f32fbeSmrg   have_asciidoc=yes
1019706f32fbeSmrgelif test "x$use_asciidoc" = x"no" ; then
1019806f32fbeSmrg   if test "x$ASCIIDOC" != "x"; then
1019906f32fbeSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
1020006f32fbeSmrg   fi
1020106f32fbeSmrg   have_asciidoc=no
1020206f32fbeSmrgelse
1020306f32fbeSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
1020406f32fbeSmrgfi
1020506f32fbeSmrgm4_ifval([$1],
1020606f32fbeSmrg[if test "$have_asciidoc" = yes; then
1020706f32fbeSmrg    # scrape the asciidoc version
1020806f32fbeSmrg    AC_MSG_CHECKING([the asciidoc version])
1020906f32fbeSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
1021006f32fbeSmrg    AC_MSG_RESULT([$asciidoc_version])
1021106f32fbeSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
1021206f32fbeSmrg        [if test "x$use_asciidoc" = xauto; then
1021306f32fbeSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
1021406f32fbeSmrg            have_asciidoc=no
1021506f32fbeSmrg        else
1021606f32fbeSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
1021706f32fbeSmrg        fi])
1021806f32fbeSmrgfi])
1021906f32fbeSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
1022006f32fbeSmrg]) # XORG_WITH_ASCIIDOC
10221a253d6aeSmrg
1022206f32fbeSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
1022306f32fbeSmrg# --------------------------------
1022406f32fbeSmrg# Minimum version: 1.5.0
1022506f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1022606f32fbeSmrg#
1022706f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes
1022806f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the
1022906f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1023006f32fbeSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
1023106f32fbeSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
1023206f32fbeSmrg# --with-doxygen assumes 'auto'.
1023306f32fbeSmrg#
1023406f32fbeSmrg# Interface to module:
1023506f32fbeSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
1023606f32fbeSmrg# DOXYGEN:	 returns the path of the doxygen program found
1023706f32fbeSmrg#		 returns the path set by the user in the environment
1023806f32fbeSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
1023906f32fbeSmrg#		  'no' user instructs the module not to use doxygen
1024006f32fbeSmrg#
1024106f32fbeSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
1024206f32fbeSmrg#
1024306f32fbeSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
1024406f32fbeSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
1024506f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto]))
1024606f32fbeSmrgAC_ARG_WITH(doxygen,
1024706f32fbeSmrg	AS_HELP_STRING([--with-doxygen],
1024806f32fbeSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
1024906f32fbeSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
1025006f32fbeSmrgm4_undefine([_defopt])
10251a253d6aeSmrg
1025206f32fbeSmrgif test "x$use_doxygen" = x"auto"; then
1025306f32fbeSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
1025406f32fbeSmrg   if test "x$DOXYGEN" = "x"; then
1025506f32fbeSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
1025606f32fbeSmrg	have_doxygen=no
1025706f32fbeSmrg   else
1025806f32fbeSmrg        have_doxygen=yes
1025906f32fbeSmrg   fi
1026006f32fbeSmrgelif test "x$use_doxygen" = x"yes" ; then
1026106f32fbeSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
1026206f32fbeSmrg   if test "x$DOXYGEN" = "x"; then
1026306f32fbeSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
1026406f32fbeSmrg   fi
1026506f32fbeSmrg   have_doxygen=yes
1026606f32fbeSmrgelif test "x$use_doxygen" = x"no" ; then
1026706f32fbeSmrg   if test "x$DOXYGEN" != "x"; then
1026806f32fbeSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
1026906f32fbeSmrg   fi
1027006f32fbeSmrg   have_doxygen=no
1027106f32fbeSmrgelse
1027206f32fbeSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
1027306f32fbeSmrgfi
1027406f32fbeSmrgm4_ifval([$1],
1027506f32fbeSmrg[if test "$have_doxygen" = yes; then
1027606f32fbeSmrg    # scrape the doxygen version
1027706f32fbeSmrg    AC_MSG_CHECKING([the doxygen version])
1027806f32fbeSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
1027906f32fbeSmrg    AC_MSG_RESULT([$doxygen_version])
1028006f32fbeSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
1028106f32fbeSmrg        [if test "x$use_doxygen" = xauto; then
1028206f32fbeSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
1028306f32fbeSmrg            have_doxygen=no
1028406f32fbeSmrg        else
1028506f32fbeSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
1028606f32fbeSmrg        fi])
1028706f32fbeSmrgfi])
1028806f32fbeSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
1028906f32fbeSmrg]) # XORG_WITH_DOXYGEN
10290a253d6aeSmrg
1029106f32fbeSmrg# XORG_WITH_GROFF([DEFAULT])
1029206f32fbeSmrg# ----------------
1029306f32fbeSmrg# Minimum version: 1.6.0
1029406f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1029506f32fbeSmrg#
1029606f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes
1029706f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the
1029806f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1029906f32fbeSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
1030006f32fbeSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
1030106f32fbeSmrg# --with-groff assumes 'auto'.
1030206f32fbeSmrg#
1030306f32fbeSmrg# Interface to module:
1030406f32fbeSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
1030506f32fbeSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
1030606f32fbeSmrg# HAVE_GROFF_MS: the -ms macros package
1030706f32fbeSmrg# GROFF:	 returns the path of the groff program found
1030806f32fbeSmrg#		 returns the path set by the user in the environment
1030906f32fbeSmrg# --with-groff:	 'yes' user instructs the module to use groff
1031006f32fbeSmrg#		 'no' user instructs the module not to use groff
1031106f32fbeSmrg#
1031206f32fbeSmrg# Added in version 1.9.0:
1031306f32fbeSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
1031406f32fbeSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
1031506f32fbeSmrg#		   psselect from the psutils package.
1031606f32fbeSmrg#		   the ghostcript package. Refer to the grohtml man pages
1031706f32fbeSmrg#
1031806f32fbeSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
1031906f32fbeSmrg#
1032006f32fbeSmrg# OS and distros often splits groff in a basic and full package, the former
1032106f32fbeSmrg# having the groff program and the later having devices, fonts and macros
1032206f32fbeSmrg# Checking for the groff executable is not enough.
1032306f32fbeSmrg#
1032406f32fbeSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
1032506f32fbeSmrg# unset HAVE_GROFF or GROFF env variables.
1032606f32fbeSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
1032706f32fbeSmrg#
1032806f32fbeSmrgAC_DEFUN([XORG_WITH_GROFF],[
1032906f32fbeSmrgAC_ARG_VAR([GROFF], [Path to groff command])
1033006f32fbeSmrgm4_define([_defopt], m4_default([$1], [auto]))
1033106f32fbeSmrgAC_ARG_WITH(groff,
1033206f32fbeSmrg	AS_HELP_STRING([--with-groff],
1033306f32fbeSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
1033406f32fbeSmrg	   [use_groff=$withval], [use_groff=]_defopt)
1033506f32fbeSmrgm4_undefine([_defopt])
10336a253d6aeSmrg
1033706f32fbeSmrgif test "x$use_groff" = x"auto"; then
1033806f32fbeSmrg   AC_PATH_PROG([GROFF], [groff])
1033906f32fbeSmrg   if test "x$GROFF" = "x"; then
1034006f32fbeSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
1034106f32fbeSmrg	have_groff=no
1034206f32fbeSmrg   else
1034306f32fbeSmrg        have_groff=yes
1034406f32fbeSmrg   fi
1034506f32fbeSmrgelif test "x$use_groff" = x"yes" ; then
1034606f32fbeSmrg   AC_PATH_PROG([GROFF], [groff])
1034706f32fbeSmrg   if test "x$GROFF" = "x"; then
1034806f32fbeSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
1034906f32fbeSmrg   fi
1035006f32fbeSmrg   have_groff=yes
1035106f32fbeSmrgelif test "x$use_groff" = x"no" ; then
1035206f32fbeSmrg   if test "x$GROFF" != "x"; then
1035306f32fbeSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
1035406f32fbeSmrg   fi
1035506f32fbeSmrg   have_groff=no
1035606f32fbeSmrgelse
1035706f32fbeSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
1035806f32fbeSmrgfi
10359a253d6aeSmrg
1036006f32fbeSmrg# We have groff, test for the presence of the macro packages
1036106f32fbeSmrgif test "x$have_groff" = x"yes"; then
1036206f32fbeSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
1036306f32fbeSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
1036406f32fbeSmrg        groff_ms_works=yes
1036506f32fbeSmrg    else
1036606f32fbeSmrg        groff_ms_works=no
1036706f32fbeSmrg    fi
1036806f32fbeSmrg    AC_MSG_RESULT([$groff_ms_works])
1036906f32fbeSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
1037006f32fbeSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
1037106f32fbeSmrg        groff_mm_works=yes
1037206f32fbeSmrg    else
1037306f32fbeSmrg        groff_mm_works=no
1037406f32fbeSmrg    fi
1037506f32fbeSmrg    AC_MSG_RESULT([$groff_mm_works])
1037606f32fbeSmrgfi
10377a253d6aeSmrg
1037806f32fbeSmrg# We have groff, test for HTML dependencies, one command per package
1037906f32fbeSmrgif test "x$have_groff" = x"yes"; then
1038006f32fbeSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
1038106f32fbeSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
1038206f32fbeSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
1038306f32fbeSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
1038406f32fbeSmrg      have_groff_html=yes
1038506f32fbeSmrg   else
1038606f32fbeSmrg      have_groff_html=no
1038706f32fbeSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
1038806f32fbeSmrg   fi
1038906f32fbeSmrgfi
10390a253d6aeSmrg
1039106f32fbeSmrg# Set Automake conditionals for Makefiles
1039206f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
1039306f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
1039406f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
1039506f32fbeSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
1039606f32fbeSmrg]) # XORG_WITH_GROFF
10397a253d6aeSmrg
1039806f32fbeSmrg# XORG_WITH_FOP([MIN-VERSION], [DEFAULT])
1039906f32fbeSmrg# ---------------------------------------
1040006f32fbeSmrg# Minimum version: 1.6.0
1040106f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1040206f32fbeSmrg# Minimum version for optional MIN-VERSION argument: 1.15.0
1040306f32fbeSmrg#
1040406f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes
1040506f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the
1040606f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1040706f32fbeSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
1040806f32fbeSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
1040906f32fbeSmrg# --with-fop assumes 'auto'.
1041006f32fbeSmrg#
1041106f32fbeSmrg# Interface to module:
1041206f32fbeSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
1041306f32fbeSmrg# FOP:	 	returns the path of the fop program found
1041406f32fbeSmrg#		returns the path set by the user in the environment
1041506f32fbeSmrg# --with-fop: 	'yes' user instructs the module to use fop
1041606f32fbeSmrg#		'no' user instructs the module not to use fop
1041706f32fbeSmrg#
1041806f32fbeSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
1041906f32fbeSmrg#
1042006f32fbeSmrgAC_DEFUN([XORG_WITH_FOP],[
1042106f32fbeSmrgAC_ARG_VAR([FOP], [Path to fop command])
1042206f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto]))
1042306f32fbeSmrgAC_ARG_WITH(fop,
1042406f32fbeSmrg	AS_HELP_STRING([--with-fop],
1042506f32fbeSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
1042606f32fbeSmrg	   [use_fop=$withval], [use_fop=]_defopt)
1042706f32fbeSmrgm4_undefine([_defopt])
10428a253d6aeSmrg
1042906f32fbeSmrgif test "x$use_fop" = x"auto"; then
1043006f32fbeSmrg   AC_PATH_PROG([FOP], [fop])
1043106f32fbeSmrg   if test "x$FOP" = "x"; then
1043206f32fbeSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
1043306f32fbeSmrg	have_fop=no
1043406f32fbeSmrg   else
1043506f32fbeSmrg        have_fop=yes
1043606f32fbeSmrg   fi
1043706f32fbeSmrgelif test "x$use_fop" = x"yes" ; then
1043806f32fbeSmrg   AC_PATH_PROG([FOP], [fop])
1043906f32fbeSmrg   if test "x$FOP" = "x"; then
1044006f32fbeSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
1044106f32fbeSmrg   fi
1044206f32fbeSmrg   have_fop=yes
1044306f32fbeSmrgelif test "x$use_fop" = x"no" ; then
1044406f32fbeSmrg   if test "x$FOP" != "x"; then
1044506f32fbeSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
1044606f32fbeSmrg   fi
1044706f32fbeSmrg   have_fop=no
1044806f32fbeSmrgelse
1044906f32fbeSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
1045006f32fbeSmrgfi
10451a253d6aeSmrg
1045206f32fbeSmrg# Test for a minimum version of fop, if provided.
1045306f32fbeSmrgm4_ifval([$1],
1045406f32fbeSmrg[if test "$have_fop" = yes; then
1045506f32fbeSmrg    # scrape the fop version
1045606f32fbeSmrg    AC_MSG_CHECKING([for fop minimum version])
1045706f32fbeSmrg    fop_version=`$FOP -version 2>/dev/null | cut -d' ' -f3`
1045806f32fbeSmrg    AC_MSG_RESULT([$fop_version])
1045906f32fbeSmrg    AS_VERSION_COMPARE([$fop_version], [$1],
1046006f32fbeSmrg        [if test "x$use_fop" = xauto; then
1046106f32fbeSmrg            AC_MSG_WARN([fop version $fop_version found, but $1 needed])
1046206f32fbeSmrg            have_fop=no
1046306f32fbeSmrg        else
1046406f32fbeSmrg            AC_MSG_ERROR([fop version $fop_version found, but $1 needed])
1046506f32fbeSmrg        fi])
1046606f32fbeSmrgfi])
1046706f32fbeSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
1046806f32fbeSmrg]) # XORG_WITH_FOP
10469a253d6aeSmrg
1047006f32fbeSmrg# XORG_WITH_PS2PDF([DEFAULT])
1047106f32fbeSmrg# ----------------
1047206f32fbeSmrg# Minimum version: 1.6.0
1047306f32fbeSmrg# Minimum version for optional DEFAULT argument: 1.11.0
1047406f32fbeSmrg#
1047506f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes
1047606f32fbeSmrg# not at the appropriate level. This macro enables a module to test for the
1047706f32fbeSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
1047806f32fbeSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
1047906f32fbeSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
1048006f32fbeSmrg# --with-ps2pdf assumes 'auto'.
1048106f32fbeSmrg#
1048206f32fbeSmrg# Interface to module:
1048306f32fbeSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
1048406f32fbeSmrg# PS2PDF:	returns the path of the ps2pdf program found
1048506f32fbeSmrg#		returns the path set by the user in the environment
1048606f32fbeSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
1048706f32fbeSmrg#		 'no' user instructs the module not to use ps2pdf
1048806f32fbeSmrg#
1048906f32fbeSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
1049006f32fbeSmrg#
1049106f32fbeSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
1049206f32fbeSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
1049306f32fbeSmrgm4_define([_defopt], m4_default([$1], [auto]))
1049406f32fbeSmrgAC_ARG_WITH(ps2pdf,
1049506f32fbeSmrg	AS_HELP_STRING([--with-ps2pdf],
1049606f32fbeSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
1049706f32fbeSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
1049806f32fbeSmrgm4_undefine([_defopt])
10499a253d6aeSmrg
1050006f32fbeSmrgif test "x$use_ps2pdf" = x"auto"; then
1050106f32fbeSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
1050206f32fbeSmrg   if test "x$PS2PDF" = "x"; then
1050306f32fbeSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
1050406f32fbeSmrg	have_ps2pdf=no
1050506f32fbeSmrg   else
1050606f32fbeSmrg        have_ps2pdf=yes
1050706f32fbeSmrg   fi
1050806f32fbeSmrgelif test "x$use_ps2pdf" = x"yes" ; then
1050906f32fbeSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
1051006f32fbeSmrg   if test "x$PS2PDF" = "x"; then
1051106f32fbeSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
1051206f32fbeSmrg   fi
1051306f32fbeSmrg   have_ps2pdf=yes
1051406f32fbeSmrgelif test "x$use_ps2pdf" = x"no" ; then
1051506f32fbeSmrg   if test "x$PS2PDF" != "x"; then
1051606f32fbeSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
1051706f32fbeSmrg   fi
1051806f32fbeSmrg   have_ps2pdf=no
1051906f32fbeSmrgelse
1052006f32fbeSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
1052106f32fbeSmrgfi
1052206f32fbeSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
1052306f32fbeSmrg]) # XORG_WITH_PS2PDF
10524a253d6aeSmrg
1052506f32fbeSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
1052606f32fbeSmrg# ----------------
1052706f32fbeSmrg# Minimum version: 1.6.0
1052806f32fbeSmrg#
1052906f32fbeSmrg# Documentation tools are not always available on all platforms and sometimes
1053006f32fbeSmrg# not at the appropriate level. This macro enables a builder to skip all
1053106f32fbeSmrg# documentation targets except traditional man pages.
1053206f32fbeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1053306f32fbeSmrg# maximum flexibilty in controlling documentation building.
1053406f32fbeSmrg# Refer to:
1053506f32fbeSmrg# XORG_WITH_XMLTO         --with-xmlto
1053606f32fbeSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1053706f32fbeSmrg# XORG_WITH_DOXYGEN       --with-doxygen
1053806f32fbeSmrg# XORG_WITH_FOP           --with-fop
1053906f32fbeSmrg# XORG_WITH_GROFF         --with-groff
1054006f32fbeSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
1054106f32fbeSmrg#
1054206f32fbeSmrg# Interface to module:
1054306f32fbeSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
1054406f32fbeSmrg# --enable-docs: 'yes' user instructs the module to generate docs
1054506f32fbeSmrg#		 'no' user instructs the module not to generate docs
1054606f32fbeSmrg# parm1:	specify the default value, yes or no.
1054706f32fbeSmrg#
1054806f32fbeSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
1054906f32fbeSmrgm4_define([docs_default], m4_default([$1], [yes]))
1055006f32fbeSmrgAC_ARG_ENABLE(docs,
1055106f32fbeSmrg	AS_HELP_STRING([--enable-docs],
1055206f32fbeSmrg	   [Enable building the documentation (default: ]docs_default[)]),
1055306f32fbeSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
1055406f32fbeSmrgm4_undefine([docs_default])
1055506f32fbeSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
1055606f32fbeSmrgAC_MSG_CHECKING([whether to build documentation])
1055706f32fbeSmrgAC_MSG_RESULT([$build_docs])
1055806f32fbeSmrg]) # XORG_ENABLE_DOCS
10559a253d6aeSmrg
1056006f32fbeSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
1056106f32fbeSmrg# ----------------
1056206f32fbeSmrg# Minimum version: 1.6.0
1056306f32fbeSmrg#
1056406f32fbeSmrg# This macro enables a builder to skip all developer documentation.
1056506f32fbeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1056606f32fbeSmrg# maximum flexibilty in controlling documentation building.
1056706f32fbeSmrg# Refer to:
1056806f32fbeSmrg# XORG_WITH_XMLTO         --with-xmlto
1056906f32fbeSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1057006f32fbeSmrg# XORG_WITH_DOXYGEN       --with-doxygen
1057106f32fbeSmrg# XORG_WITH_FOP           --with-fop
1057206f32fbeSmrg# XORG_WITH_GROFF         --with-groff
1057306f32fbeSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
1057406f32fbeSmrg#
1057506f32fbeSmrg# Interface to module:
1057606f32fbeSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
1057706f32fbeSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
1057806f32fbeSmrg#			'no' user instructs the module not to generate developer docs
1057906f32fbeSmrg# parm1:		specify the default value, yes or no.
1058006f32fbeSmrg#
1058106f32fbeSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
1058206f32fbeSmrgm4_define([devel_default], m4_default([$1], [yes]))
1058306f32fbeSmrgAC_ARG_ENABLE(devel-docs,
1058406f32fbeSmrg	AS_HELP_STRING([--enable-devel-docs],
1058506f32fbeSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
1058606f32fbeSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
1058706f32fbeSmrgm4_undefine([devel_default])
1058806f32fbeSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
1058906f32fbeSmrgAC_MSG_CHECKING([whether to build developer documentation])
1059006f32fbeSmrgAC_MSG_RESULT([$build_devel_docs])
1059106f32fbeSmrg]) # XORG_ENABLE_DEVEL_DOCS
1059225b89263Smrg
1059306f32fbeSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
1059406f32fbeSmrg# ----------------
1059506f32fbeSmrg# Minimum version: 1.6.0
1059606f32fbeSmrg#
1059706f32fbeSmrg# This macro enables a builder to skip all functional specification targets.
1059806f32fbeSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
1059906f32fbeSmrg# maximum flexibilty in controlling documentation building.
1060006f32fbeSmrg# Refer to:
1060106f32fbeSmrg# XORG_WITH_XMLTO         --with-xmlto
1060206f32fbeSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
1060306f32fbeSmrg# XORG_WITH_DOXYGEN       --with-doxygen
1060406f32fbeSmrg# XORG_WITH_FOP           --with-fop
1060506f32fbeSmrg# XORG_WITH_GROFF         --with-groff
1060606f32fbeSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
1060706f32fbeSmrg#
1060806f32fbeSmrg# Interface to module:
1060906f32fbeSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
1061006f32fbeSmrg# --enable-specs:	'yes' user instructs the module to generate specs
1061106f32fbeSmrg#			'no' user instructs the module not to generate specs
1061206f32fbeSmrg# parm1:		specify the default value, yes or no.
1061306f32fbeSmrg#
1061406f32fbeSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
1061506f32fbeSmrgm4_define([spec_default], m4_default([$1], [yes]))
1061606f32fbeSmrgAC_ARG_ENABLE(specs,
1061706f32fbeSmrg	AS_HELP_STRING([--enable-specs],
1061806f32fbeSmrg	   [Enable building the specs (default: ]spec_default[)]),
1061906f32fbeSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
1062006f32fbeSmrgm4_undefine([spec_default])
1062106f32fbeSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
1062206f32fbeSmrgAC_MSG_CHECKING([whether to build functional specifications])
1062306f32fbeSmrgAC_MSG_RESULT([$build_specs])
1062406f32fbeSmrg]) # XORG_ENABLE_SPECS
10625a253d6aeSmrg
1062606f32fbeSmrg# XORG_ENABLE_UNIT_TESTS (enable_unit_tests=auto)
1062706f32fbeSmrg# ----------------------------------------------
1062806f32fbeSmrg# Minimum version: 1.13.0
1062906f32fbeSmrg#
1063006f32fbeSmrg# This macro enables a builder to enable/disable unit testing
1063106f32fbeSmrg# It makes no assumption about the test cases implementation
1063206f32fbeSmrg# Test cases may or may not use Automake "Support for test suites"
1063306f32fbeSmrg# They may or may not use the software utility library GLib
1063406f32fbeSmrg#
1063506f32fbeSmrg# When used in conjunction with XORG_WITH_GLIB, use both AM_CONDITIONAL
1063606f32fbeSmrg# ENABLE_UNIT_TESTS and HAVE_GLIB. Not all unit tests may use glib.
1063706f32fbeSmrg# The variable enable_unit_tests is used by other macros in this file.
1063806f32fbeSmrg#
1063906f32fbeSmrg# Interface to module:
1064006f32fbeSmrg# ENABLE_UNIT_TESTS:	used in makefiles to conditionally build tests
1064106f32fbeSmrg# enable_unit_tests:    used in configure.ac for additional configuration
1064206f32fbeSmrg# --enable-unit-tests:	'yes' user instructs the module to build tests
1064306f32fbeSmrg#			'no' user instructs the module not to build tests
1064406f32fbeSmrg# parm1:		specify the default value, yes or no.
1064506f32fbeSmrg#
1064606f32fbeSmrgAC_DEFUN([XORG_ENABLE_UNIT_TESTS],[
1064706f32fbeSmrgAC_BEFORE([$0], [XORG_WITH_GLIB])
1064806f32fbeSmrgAC_BEFORE([$0], [XORG_LD_WRAP])
1064906f32fbeSmrgAC_REQUIRE([XORG_MEMORY_CHECK_FLAGS])
1065006f32fbeSmrgm4_define([_defopt], m4_default([$1], [auto]))
1065106f32fbeSmrgAC_ARG_ENABLE(unit-tests, AS_HELP_STRING([--enable-unit-tests],
1065206f32fbeSmrg	[Enable building unit test cases (default: ]_defopt[)]),
1065306f32fbeSmrg	[enable_unit_tests=$enableval], [enable_unit_tests=]_defopt)
1065406f32fbeSmrgm4_undefine([_defopt])
1065506f32fbeSmrgAM_CONDITIONAL(ENABLE_UNIT_TESTS, [test "x$enable_unit_tests" != xno])
1065606f32fbeSmrgAC_MSG_CHECKING([whether to build unit test cases])
1065706f32fbeSmrgAC_MSG_RESULT([$enable_unit_tests])
1065806f32fbeSmrg]) # XORG_ENABLE_UNIT_TESTS
10659a253d6aeSmrg
1066006f32fbeSmrg# XORG_WITH_GLIB([MIN-VERSION], [DEFAULT])
1066106f32fbeSmrg# ----------------------------------------
1066206f32fbeSmrg# Minimum version: 1.13.0
1066306f32fbeSmrg#
1066406f32fbeSmrg# GLib is a library which provides advanced data structures and functions.
1066506f32fbeSmrg# This macro enables a module to test for the presence of Glib.
1066606f32fbeSmrg#
1066706f32fbeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed GLib is used for unit testing.
1066806f32fbeSmrg# Otherwise the value of $enable_unit_tests is blank.
1066906f32fbeSmrg#
1067006f32fbeSmrg# Interface to module:
1067106f32fbeSmrg# HAVE_GLIB: used in makefiles to conditionally build targets
1067206f32fbeSmrg# with_glib: used in configure.ac to know if GLib has been found
1067306f32fbeSmrg# --with-glib:	'yes' user instructs the module to use glib
1067406f32fbeSmrg#		'no' user instructs the module not to use glib
1067506f32fbeSmrg#
1067606f32fbeSmrgAC_DEFUN([XORG_WITH_GLIB],[
1067706f32fbeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
1067806f32fbeSmrgm4_define([_defopt], m4_default([$2], [auto]))
1067906f32fbeSmrgAC_ARG_WITH(glib, AS_HELP_STRING([--with-glib],
1068006f32fbeSmrg	[Use GLib library for unit testing (default: ]_defopt[)]),
1068106f32fbeSmrg	[with_glib=$withval], [with_glib=]_defopt)
1068206f32fbeSmrgm4_undefine([_defopt])
10683a253d6aeSmrg
1068406f32fbeSmrghave_glib=no
1068506f32fbeSmrg# Do not probe GLib if user explicitly disabled unit testing
1068606f32fbeSmrgif test "x$enable_unit_tests" != x"no"; then
1068706f32fbeSmrg  # Do not probe GLib if user explicitly disabled it
1068806f32fbeSmrg  if test "x$with_glib" != x"no"; then
1068906f32fbeSmrg    m4_ifval(
1069006f32fbeSmrg      [$1],
1069106f32fbeSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0 >= $1], [have_glib=yes], [have_glib=no])],
1069206f32fbeSmrg      [PKG_CHECK_MODULES([GLIB], [glib-2.0], [have_glib=yes], [have_glib=no])]
1069306f32fbeSmrg    )
1069406f32fbeSmrg  fi
1069506f32fbeSmrgfi
10696a253d6aeSmrg
1069706f32fbeSmrg# Not having GLib when unit testing has been explicitly requested is an error
1069806f32fbeSmrgif test "x$enable_unit_tests" = x"yes"; then
1069906f32fbeSmrg  if test "x$have_glib" = x"no"; then
1070006f32fbeSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1070106f32fbeSmrg  fi
1070206f32fbeSmrgfi
10703a253d6aeSmrg
1070406f32fbeSmrg# Having unit testing disabled when GLib has been explicitly requested is an error
1070506f32fbeSmrgif test "x$enable_unit_tests" = x"no"; then
1070606f32fbeSmrg  if test "x$with_glib" = x"yes"; then
1070706f32fbeSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but glib-2.0 not found])
1070806f32fbeSmrg  fi
1070906f32fbeSmrgfi
10710a253d6aeSmrg
1071106f32fbeSmrg# Not having GLib when it has been explicitly requested is an error
1071206f32fbeSmrgif test "x$with_glib" = x"yes"; then
1071306f32fbeSmrg  if test "x$have_glib" = x"no"; then
1071406f32fbeSmrg    AC_MSG_ERROR([--with-glib=yes specified but glib-2.0 not found])
1071506f32fbeSmrg  fi
1071606f32fbeSmrgfi
10717a253d6aeSmrg
1071806f32fbeSmrgAM_CONDITIONAL([HAVE_GLIB], [test "$have_glib" = yes])
1071906f32fbeSmrg]) # XORG_WITH_GLIB
10720a253d6aeSmrg
1072106f32fbeSmrg# XORG_LD_WRAP([required|optional])
1072206f32fbeSmrg# ---------------------------------
1072306f32fbeSmrg# Minimum version: 1.13.0
1072406f32fbeSmrg#
1072506f32fbeSmrg# Check if linker supports -wrap, passed via compiler flags
1072606f32fbeSmrg#
1072706f32fbeSmrg# When used with ENABLE_UNIT_TESTS, it is assumed -wrap is used for unit testing.
1072806f32fbeSmrg# Otherwise the value of $enable_unit_tests is blank.
1072906f32fbeSmrg#
1073006f32fbeSmrg# Argument added in 1.16.0 - default is "required", to match existing behavior
1073106f32fbeSmrg# of returning an error if enable_unit_tests is yes, and ld -wrap is not
1073206f32fbeSmrg# available, an argument of "optional" allows use when some unit tests require
1073306f32fbeSmrg# ld -wrap and others do not.
1073406f32fbeSmrg#
1073506f32fbeSmrgAC_DEFUN([XORG_LD_WRAP],[
1073606f32fbeSmrgXORG_CHECK_LINKER_FLAGS([-Wl,-wrap,exit],[have_ld_wrap=yes],[have_ld_wrap=no],
1073706f32fbeSmrg    [AC_LANG_PROGRAM([#include <stdlib.h>
1073806f32fbeSmrg                      void __wrap_exit(int status) { return; }],
1073906f32fbeSmrg                     [exit(0);])])
1074006f32fbeSmrg# Not having ld wrap when unit testing has been explicitly requested is an error
1074106f32fbeSmrgif test "x$enable_unit_tests" = x"yes" -a "x$1" != "xoptional"; then
1074206f32fbeSmrg  if test "x$have_ld_wrap" = x"no"; then
1074306f32fbeSmrg    AC_MSG_ERROR([--enable-unit-tests=yes specified but ld -wrap support is not available])
1074406f32fbeSmrg  fi
1074506f32fbeSmrgfi
1074606f32fbeSmrgAM_CONDITIONAL([HAVE_LD_WRAP], [test "$have_ld_wrap" = yes])
1074706f32fbeSmrg#
1074806f32fbeSmrg]) # XORG_LD_WRAP
10749a253d6aeSmrg
1075006f32fbeSmrg# XORG_CHECK_LINKER_FLAGS
1075106f32fbeSmrg# -----------------------
1075206f32fbeSmrg# SYNOPSIS
1075306f32fbeSmrg#
1075406f32fbeSmrg#   XORG_CHECK_LINKER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE], [PROGRAM-SOURCE])
1075506f32fbeSmrg#
1075606f32fbeSmrg# DESCRIPTION
1075706f32fbeSmrg#
1075806f32fbeSmrg#   Check whether the given linker FLAGS work with the current language's
1075906f32fbeSmrg#   linker, or whether they give an error.
1076006f32fbeSmrg#
1076106f32fbeSmrg#   ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
1076206f32fbeSmrg#   success/failure.
1076306f32fbeSmrg#
1076406f32fbeSmrg#   PROGRAM-SOURCE is the program source to link with, if needed
1076506f32fbeSmrg#
1076606f32fbeSmrg#   NOTE: Based on AX_CHECK_COMPILER_FLAGS.
1076706f32fbeSmrg#
1076806f32fbeSmrg# LICENSE
1076906f32fbeSmrg#
1077006f32fbeSmrg#   Copyright (c) 2009 Mike Frysinger <vapier@gentoo.org>
1077106f32fbeSmrg#   Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
1077206f32fbeSmrg#   Copyright (c) 2009 Matteo Frigo
1077306f32fbeSmrg#
1077406f32fbeSmrg#   This program is free software: you can redistribute it and/or modify it
1077506f32fbeSmrg#   under the terms of the GNU General Public License as published by the
1077606f32fbeSmrg#   Free Software Foundation, either version 3 of the License, or (at your
1077706f32fbeSmrg#   option) any later version.
1077806f32fbeSmrg#
1077906f32fbeSmrg#   This program is distributed in the hope that it will be useful, but
1078006f32fbeSmrg#   WITHOUT ANY WARRANTY; without even the implied warranty of
1078106f32fbeSmrg#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
1078206f32fbeSmrg#   Public License for more details.
1078306f32fbeSmrg#
1078406f32fbeSmrg#   You should have received a copy of the GNU General Public License along
1078506f32fbeSmrg#   with this program. If not, see <http://www.gnu.org/licenses/>.
1078606f32fbeSmrg#
1078706f32fbeSmrg#   As a special exception, the respective Autoconf Macro's copyright owner
1078806f32fbeSmrg#   gives unlimited permission to copy, distribute and modify the configure
1078906f32fbeSmrg#   scripts that are the output of Autoconf when processing the Macro. You
1079006f32fbeSmrg#   need not follow the terms of the GNU General Public License when using
1079106f32fbeSmrg#   or distributing such scripts, even though portions of the text of the
1079206f32fbeSmrg#   Macro appear in them. The GNU General Public License (GPL) does govern
1079306f32fbeSmrg#   all other use of the material that constitutes the Autoconf Macro.
1079406f32fbeSmrg#
1079506f32fbeSmrg#   This special exception to the GPL applies to versions of the Autoconf
1079606f32fbeSmrg#   Macro released by the Autoconf Archive. When you make and distribute a
1079706f32fbeSmrg#   modified version of the Autoconf Macro, you may extend this special
1079806f32fbeSmrg#   exception to the GPL to apply to your modified version as well.#
1079906f32fbeSmrgAC_DEFUN([XORG_CHECK_LINKER_FLAGS],
1080006f32fbeSmrg[AC_MSG_CHECKING([whether the linker accepts $1])
1080106f32fbeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
1080206f32fbeSmrgAS_LITERAL_IF([$1],
1080306f32fbeSmrg  [AC_CACHE_VAL(AS_TR_SH(xorg_cv_linker_flags_[$1]), [
1080406f32fbeSmrg      ax_save_FLAGS=$LDFLAGS
1080506f32fbeSmrg      LDFLAGS="$1"
1080606f32fbeSmrg      AC_LINK_IFELSE([m4_default([$4],[AC_LANG_PROGRAM()])],
1080706f32fbeSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
1080806f32fbeSmrg        AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
1080906f32fbeSmrg      LDFLAGS=$ax_save_FLAGS])],
1081006f32fbeSmrg  [ax_save_FLAGS=$LDFLAGS
1081106f32fbeSmrg   LDFLAGS="$1"
1081206f32fbeSmrg   AC_LINK_IFELSE([AC_LANG_PROGRAM()],
1081306f32fbeSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=yes,
1081406f32fbeSmrg     eval AS_TR_SH(xorg_cv_linker_flags_[$1])=no)
1081506f32fbeSmrg   LDFLAGS=$ax_save_FLAGS])
1081606f32fbeSmrgeval xorg_check_linker_flags=$AS_TR_SH(xorg_cv_linker_flags_[$1])
1081706f32fbeSmrgAC_MSG_RESULT($xorg_check_linker_flags)
1081806f32fbeSmrgif test "x$xorg_check_linker_flags" = xyes; then
1081906f32fbeSmrg	m4_default([$2], :)
1082006f32fbeSmrgelse
1082106f32fbeSmrg	m4_default([$3], :)
1082206f32fbeSmrgfi
1082306f32fbeSmrg]) # XORG_CHECK_LINKER_FLAGS
10824a253d6aeSmrg
1082506f32fbeSmrg# XORG_MEMORY_CHECK_FLAGS
1082606f32fbeSmrg# -----------------------
1082706f32fbeSmrg# Minimum version: 1.16.0
1082806f32fbeSmrg#
1082906f32fbeSmrg# This macro attempts to find appropriate memory checking functionality
1083006f32fbeSmrg# for various platforms which unit testing code may use to catch various
1083106f32fbeSmrg# forms of memory allocation and access errors in testing.
1083206f32fbeSmrg#
1083306f32fbeSmrg# Interface to module:
1083406f32fbeSmrg# XORG_MALLOC_DEBUG_ENV - environment variables to set to enable debugging
1083506f32fbeSmrg#                         Usually added to TESTS_ENVIRONMENT in Makefile.am
1083606f32fbeSmrg#
1083706f32fbeSmrg# If the user sets the value of XORG_MALLOC_DEBUG_ENV, it is used verbatim.
1083806f32fbeSmrg#
1083906f32fbeSmrgAC_DEFUN([XORG_MEMORY_CHECK_FLAGS],[
10840a253d6aeSmrg
1084106f32fbeSmrgAC_REQUIRE([AC_CANONICAL_HOST])
1084206f32fbeSmrgAC_ARG_VAR([XORG_MALLOC_DEBUG_ENV],
1084306f32fbeSmrg           [Environment variables to enable memory checking in tests])
10844a253d6aeSmrg
1084506f32fbeSmrg# Check for different types of support on different platforms
1084606f32fbeSmrgcase $host_os in
1084706f32fbeSmrg    solaris*)
1084806f32fbeSmrg        AC_CHECK_LIB([umem], [umem_alloc],
1084906f32fbeSmrg            [malloc_debug_env='LD_PRELOAD=libumem.so UMEM_DEBUG=default'])
1085006f32fbeSmrg        ;;
1085106f32fbeSmrg    *-gnu*) # GNU libc - Value is used as a single byte bit pattern,
1085206f32fbeSmrg        # both directly and inverted, so should not be 0 or 255.
1085306f32fbeSmrg        malloc_debug_env='MALLOC_PERTURB_=15'
1085406f32fbeSmrg        ;;
1085506f32fbeSmrg    darwin*)
1085606f32fbeSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1 DYLD_INSERT_LIBRARIES=/usr/lib/libgmalloc.dylib'
1085706f32fbeSmrg        ;;
1085806f32fbeSmrg    *bsd*)
1085906f32fbeSmrg        malloc_debug_env='MallocPreScribble=1 MallocScribble=1'
1086006f32fbeSmrg        ;;
1086106f32fbeSmrgesac
10862ea133fd7Smrg
1086306f32fbeSmrg# User supplied flags override default flags
1086406f32fbeSmrgif test "x$XORG_MALLOC_DEBUG_ENV" != "x"; then
1086506f32fbeSmrg    malloc_debug_env="$XORG_MALLOC_DEBUG_ENV"
1086606f32fbeSmrgfi
10867a253d6aeSmrg
1086806f32fbeSmrgAC_SUBST([XORG_MALLOC_DEBUG_ENV],[$malloc_debug_env])
1086906f32fbeSmrg]) # XORG_WITH_LINT
10870a253d6aeSmrg
1087106f32fbeSmrg# XORG_CHECK_MALLOC_ZERO
1087206f32fbeSmrg# ----------------------
1087306f32fbeSmrg# Minimum version: 1.0.0
1087425b89263Smrg#
1087506f32fbeSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
1087606f32fbeSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
1087706f32fbeSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
1087806f32fbeSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
1087906f32fbeSmrgAC_ARG_ENABLE(malloc0returnsnull,
1088006f32fbeSmrg	AS_HELP_STRING([--enable-malloc0returnsnull],
1088106f32fbeSmrg		       [malloc(0) returns NULL (default: auto)]),
1088206f32fbeSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
1088306f32fbeSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
10884a253d6aeSmrg
1088506f32fbeSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
1088606f32fbeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
1088706f32fbeSmrg	AC_RUN_IFELSE([AC_LANG_PROGRAM([
1088806f32fbeSmrg#include <stdlib.h>
1088906f32fbeSmrg],[
1089006f32fbeSmrg    char *m0, *r0, *c0, *p;
1089106f32fbeSmrg    m0 = malloc(0);
1089206f32fbeSmrg    p = malloc(10);
1089306f32fbeSmrg    r0 = realloc(p,0);
1089406f32fbeSmrg    c0 = calloc(0,10);
1089506f32fbeSmrg    exit((m0 == 0 || r0 == 0 || c0 == 0) ? 0 : 1);
1089606f32fbeSmrg])],
1089706f32fbeSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
1089806f32fbeSmrg		[MALLOC_ZERO_RETURNS_NULL=no],
1089906f32fbeSmrg		[MALLOC_ZERO_RETURNS_NULL=yes])
1090006f32fbeSmrgfi
1090106f32fbeSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
10902a253d6aeSmrg
1090306f32fbeSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
1090406f32fbeSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
1090506f32fbeSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
1090606f32fbeSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
1090706f32fbeSmrgelse
1090806f32fbeSmrg	MALLOC_ZERO_CFLAGS=""
1090906f32fbeSmrg	XMALLOC_ZERO_CFLAGS=""
1091006f32fbeSmrg	XTMALLOC_ZERO_CFLAGS=""
1091106f32fbeSmrgfi
10912a253d6aeSmrg
1091306f32fbeSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
1091406f32fbeSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
1091506f32fbeSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
1091606f32fbeSmrg]) # XORG_CHECK_MALLOC_ZERO
10917a253d6aeSmrg
1091806f32fbeSmrg# XORG_WITH_LINT()
1091906f32fbeSmrg# ----------------
1092006f32fbeSmrg# Minimum version: 1.1.0
1092106f32fbeSmrg#
1092206f32fbeSmrg# This macro enables the use of a tool that flags some suspicious and
1092306f32fbeSmrg# non-portable constructs (likely to be bugs) in C language source code.
1092406f32fbeSmrg# It will attempt to locate the tool and use appropriate options.
1092506f32fbeSmrg# There are various lint type tools on different platforms.
1092606f32fbeSmrg#
1092706f32fbeSmrg# Interface to module:
1092806f32fbeSmrg# LINT:		returns the path to the tool found on the platform
1092906f32fbeSmrg#		or the value set to LINT on the configure cmd line
1093006f32fbeSmrg#		also an Automake conditional
1093106f32fbeSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
1093206f32fbeSmrg#
1093306f32fbeSmrg# --with-lint:	'yes' user instructs the module to use lint
1093406f32fbeSmrg#		'no' user instructs the module not to use lint (default)
1093506f32fbeSmrg#
1093606f32fbeSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
1093706f32fbeSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
1093806f32fbeSmrg#
1093906f32fbeSmrgAC_DEFUN([XORG_WITH_LINT],[
10940a253d6aeSmrg
1094106f32fbeSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
1094206f32fbeSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
1094306f32fbeSmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
1094406f32fbeSmrg		[Use a lint-style source code checker (default: disabled)])],
1094506f32fbeSmrg		[use_lint=$withval], [use_lint=no])
10946a253d6aeSmrg
1094706f32fbeSmrg# Obtain platform specific info like program name and options
1094806f32fbeSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
1094906f32fbeSmrgcase $host_os in
1095006f32fbeSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
1095106f32fbeSmrg	lint_name=splint
1095206f32fbeSmrg	lint_options="-badflag"
1095306f32fbeSmrg	;;
1095406f32fbeSmrg  *freebsd* | *netbsd*)
1095506f32fbeSmrg	lint_name=lint
1095606f32fbeSmrg	lint_options="-u -b"
1095706f32fbeSmrg	;;
1095806f32fbeSmrg  *solaris*)
1095906f32fbeSmrg	lint_name=lint
1096006f32fbeSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
1096106f32fbeSmrg	;;
1096206f32fbeSmrgesac
10963a253d6aeSmrg
1096406f32fbeSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
1096506f32fbeSmrgif test "x$use_lint" = x"yes" ; then
1096606f32fbeSmrg   AC_PATH_PROG([LINT], [$lint_name])
1096706f32fbeSmrg   if test "x$LINT" = "x"; then
1096806f32fbeSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
1096906f32fbeSmrg   fi
1097006f32fbeSmrgelif test "x$use_lint" = x"no" ; then
1097106f32fbeSmrg   if test "x$LINT" != "x"; then
1097206f32fbeSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
1097306f32fbeSmrg   fi
1097406f32fbeSmrgelse
1097506f32fbeSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
1097606f32fbeSmrgfi
10977a253d6aeSmrg
1097806f32fbeSmrg# User supplied flags override default flags
1097906f32fbeSmrgif test "x$LINT_FLAGS" != "x"; then
1098006f32fbeSmrg   lint_options=$LINT_FLAGS
1098106f32fbeSmrgfi
10982a253d6aeSmrg
1098306f32fbeSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
1098406f32fbeSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
10985a253d6aeSmrg
1098606f32fbeSmrg]) # XORG_WITH_LINT
10987ea133fd7Smrg
1098806f32fbeSmrg# XORG_LINT_LIBRARY(LIBNAME)
1098906f32fbeSmrg# --------------------------
1099006f32fbeSmrg# Minimum version: 1.1.0
1099106f32fbeSmrg#
1099206f32fbeSmrg# Sets up flags for building lint libraries for checking programs that call
1099306f32fbeSmrg# functions in the library.
1099406f32fbeSmrg#
1099506f32fbeSmrg# Interface to module:
1099606f32fbeSmrg# LINTLIB		- Automake variable with the name of lint library file to make
1099706f32fbeSmrg# MAKE_LINT_LIB		- Automake conditional
1099806f32fbeSmrg#
1099906f32fbeSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
1100006f32fbeSmrg#			  - 'no' user instructs the module not to create a lint library (default)
11001ea133fd7Smrg
1100206f32fbeSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
1100306f32fbeSmrgAC_REQUIRE([XORG_WITH_LINT])
1100406f32fbeSmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
1100506f32fbeSmrg	[Create lint library (default: disabled)])],
1100606f32fbeSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
11007a253d6aeSmrg
1100806f32fbeSmrgif test "x$make_lint_lib" = x"yes" ; then
1100906f32fbeSmrg   LINTLIB=llib-l$1.ln
1101006f32fbeSmrg   if test "x$LINT" = "x"; then
1101106f32fbeSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
1101206f32fbeSmrg   fi
1101306f32fbeSmrgelif test "x$make_lint_lib" != x"no" ; then
1101406f32fbeSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
1101506f32fbeSmrgfi
1101625b89263Smrg
1101706f32fbeSmrgAC_SUBST(LINTLIB)
1101806f32fbeSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
1101925b89263Smrg
1102006f32fbeSmrg]) # XORG_LINT_LIBRARY
1102106f32fbeSmrg
1102206f32fbeSmrg# XORG_COMPILER_BRAND
1102306f32fbeSmrg# -------------------
1102406f32fbeSmrg# Minimum version: 1.14.0
1102506f32fbeSmrg#
1102606f32fbeSmrg# Checks for various brands of compilers and sets flags as appropriate:
1102706f32fbeSmrg#   GNU gcc - relies on AC_PROG_CC (via AC_PROG_CC_C99) to set GCC to "yes"
1102806f32fbeSmrg#   GNU g++ - relies on AC_PROG_CXX to set GXX to "yes"
1102906f32fbeSmrg#   clang compiler - sets CLANGCC to "yes"
1103006f32fbeSmrg#   Intel compiler - sets INTELCC to "yes"
1103106f32fbeSmrg#   Sun/Oracle Solaris Studio cc - sets SUNCC to "yes"
1103206f32fbeSmrg#
1103306f32fbeSmrgAC_DEFUN([XORG_COMPILER_BRAND], [
1103406f32fbeSmrgAC_LANG_CASE(
1103506f32fbeSmrg	[C], [
1103606f32fbeSmrg		AC_REQUIRE([AC_PROG_CC_C99])
1103706f32fbeSmrg	],
1103806f32fbeSmrg	[C++], [
1103906f32fbeSmrg		AC_REQUIRE([AC_PROG_CXX])
1104006f32fbeSmrg	]
1104106f32fbeSmrg)
1104206f32fbeSmrgAC_CHECK_DECL([__clang__], [CLANGCC="yes"], [CLANGCC="no"])
1104306f32fbeSmrgAC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
1104406f32fbeSmrgAC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
1104506f32fbeSmrg]) # XORG_COMPILER_BRAND
1104625b89263Smrg
1104706f32fbeSmrg# XORG_TESTSET_CFLAG(<variable>, <flag>, [<alternative flag>, ...])
1104806f32fbeSmrg# ---------------
1104906f32fbeSmrg# Minimum version: 1.16.0
1105006f32fbeSmrg#
1105106f32fbeSmrg# Test if the compiler works when passed the given flag as a command line argument.
1105206f32fbeSmrg# If it succeeds, the flag is appeneded to the given variable.  If not, it tries the
1105306f32fbeSmrg# next flag in the list until there are no more options.
1105406f32fbeSmrg#
1105506f32fbeSmrg# Note that this does not guarantee that the compiler supports the flag as some
1105606f32fbeSmrg# compilers will simply ignore arguments that they do not understand, but we do
1105706f32fbeSmrg# attempt to weed out false positives by using -Werror=unknown-warning-option and
1105806f32fbeSmrg# -Werror=unused-command-line-argument
1105906f32fbeSmrg#
1106006f32fbeSmrgAC_DEFUN([XORG_TESTSET_CFLAG], [
1106106f32fbeSmrgm4_if([$#], 0, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
1106206f32fbeSmrgm4_if([$#], 1, [m4_fatal([XORG_TESTSET_CFLAG was given with an unsupported number of arguments])])
1106306f32fbeSmrg
1106406f32fbeSmrgAC_LANG_COMPILER_REQUIRE
1106506f32fbeSmrg
1106606f32fbeSmrgAC_LANG_CASE(
1106706f32fbeSmrg	[C], [
1106806f32fbeSmrg		AC_REQUIRE([AC_PROG_CC_C99])
1106906f32fbeSmrg		define([PREFIX], [C])
1107006f32fbeSmrg	],
1107106f32fbeSmrg	[C++], [
1107206f32fbeSmrg		define([PREFIX], [CXX])
1107306f32fbeSmrg	]
1107406f32fbeSmrg)
11075a253d6aeSmrg
1107606f32fbeSmrg[xorg_testset_save_]PREFIX[FLAGS]="$PREFIX[FLAGS]"
1107706f32fbeSmrg
1107806f32fbeSmrgif test "x$xorg_testset_unknown_warning_option" = "x" ; then
1107906f32fbeSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
1108006f32fbeSmrg	AC_CACHE_CHECK([if compiler supports -Werror=unknown-warning-option],
1108106f32fbeSmrg			xorg_cv_compiler_flag_unknown_warning_option,
1108206f32fbeSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
1108306f32fbeSmrg					  [xorg_cv_compiler_flag_unknown_warning_option=yes],
1108406f32fbeSmrg					  [xorg_cv_compiler_flag_unknown_warning_option=no]))
1108506f32fbeSmrg	xorg_testset_unknown_warning_option=$xorg_cv_compiler_flag_unknown_warning_option
1108606f32fbeSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
1108706f32fbeSmrgfi
11088ea133fd7Smrg
1108906f32fbeSmrgif test "x$xorg_testset_unused_command_line_argument" = "x" ; then
1109006f32fbeSmrg	if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
1109106f32fbeSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
1109206f32fbeSmrg	fi
1109306f32fbeSmrg	PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
1109406f32fbeSmrg	AC_CACHE_CHECK([if compiler supports -Werror=unused-command-line-argument],
1109506f32fbeSmrg			xorg_cv_compiler_flag_unused_command_line_argument,
1109606f32fbeSmrg			AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
1109706f32fbeSmrg					  [xorg_cv_compiler_flag_unused_command_line_argument=yes],
1109806f32fbeSmrg					  [xorg_cv_compiler_flag_unused_command_line_argument=no]))
1109906f32fbeSmrg	xorg_testset_unused_command_line_argument=$xorg_cv_compiler_flag_unused_command_line_argument
1110006f32fbeSmrg	PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
1110106f32fbeSmrgfi
11102ea133fd7Smrg
1110306f32fbeSmrgfound="no"
1110406f32fbeSmrgm4_foreach([flag], m4_cdr($@), [
1110506f32fbeSmrg	if test $found = "no" ; then
1110606f32fbeSmrg		if test "x$xorg_testset_unknown_warning_option" = "xyes" ; then
1110706f32fbeSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unknown-warning-option"
1110806f32fbeSmrg		fi
1110906f32fbeSmrg
1111006f32fbeSmrg		if test "x$xorg_testset_unused_command_line_argument" = "xyes" ; then
1111106f32fbeSmrg			PREFIX[FLAGS]="$PREFIX[FLAGS] -Werror=unused-command-line-argument"
1111206f32fbeSmrg		fi
1111306f32fbeSmrg
1111406f32fbeSmrg		PREFIX[FLAGS]="$PREFIX[FLAGS] ]flag["
1111506f32fbeSmrg
1111606f32fbeSmrgdnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname
1111706f32fbeSmrg		AC_MSG_CHECKING([if $CC supports ]flag[])
1111806f32fbeSmrg		cacheid=`AS_ECHO([xorg_cv_cc_flag_]flag[])`
1111906f32fbeSmrg		AC_CACHE_VAL(AS_TR_SH($cacheid),
1112006f32fbeSmrg			     [AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
1112106f32fbeSmrg					     [eval AS_TR_SH($cacheid)=yes],
1112206f32fbeSmrg					     [eval AS_TR_SH($cacheid)=no])])
1112306f32fbeSmrg
1112406f32fbeSmrg		PREFIX[FLAGS]="$[xorg_testset_save_]PREFIX[FLAGS]"
1112506f32fbeSmrg
1112606f32fbeSmrg		eval supported=$AS_TR_SH($cacheid)
1112706f32fbeSmrg		AC_MSG_RESULT([$supported])
1112806f32fbeSmrg		if test "$supported" = "yes" ; then
1112906f32fbeSmrg			$1="$$1 ]flag["
1113006f32fbeSmrg			found="yes"
1113106f32fbeSmrg		fi
1113206f32fbeSmrg	fi
1113306f32fbeSmrg])
1113406f32fbeSmrg]) # XORG_TESTSET_CFLAG
11135a253d6aeSmrg
1113606f32fbeSmrg# XORG_COMPILER_FLAGS
1113706f32fbeSmrg# ---------------
1113806f32fbeSmrg# Minimum version: 1.16.0
1113906f32fbeSmrg#
1114006f32fbeSmrg# Defines BASE_CFLAGS or BASE_CXXFLAGS to contain a set of command line
1114106f32fbeSmrg# arguments supported by the selected compiler which do NOT alter the generated
1114206f32fbeSmrg# code.  These arguments will cause the compiler to print various warnings
1114306f32fbeSmrg# during compilation AND turn a conservative set of warnings into errors.
1114406f32fbeSmrg#
1114506f32fbeSmrg# The set of flags supported by BASE_CFLAGS and BASE_CXXFLAGS will grow in
1114606f32fbeSmrg# future versions of util-macros as options are added to new compilers.
1114706f32fbeSmrg#
1114806f32fbeSmrgAC_DEFUN([XORG_COMPILER_FLAGS], [
1114906f32fbeSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
1115006f32fbeSmrg
1115106f32fbeSmrgAC_ARG_ENABLE(selective-werror,
1115206f32fbeSmrg              AS_HELP_STRING([--disable-selective-werror],
1115306f32fbeSmrg                             [Turn off selective compiler errors. (default: enabled)]),
1115406f32fbeSmrg              [SELECTIVE_WERROR=$enableval],
1115506f32fbeSmrg              [SELECTIVE_WERROR=yes])
1115606f32fbeSmrg
1115706f32fbeSmrgAC_LANG_CASE(
1115806f32fbeSmrg        [C], [
1115906f32fbeSmrg                define([PREFIX], [C])
1116006f32fbeSmrg        ],
1116106f32fbeSmrg        [C++], [
1116206f32fbeSmrg                define([PREFIX], [CXX])
1116306f32fbeSmrg        ]
1116406f32fbeSmrg)
1116506f32fbeSmrg# -v is too short to test reliably with XORG_TESTSET_CFLAG
1116606f32fbeSmrgif test "x$SUNCC" = "xyes"; then
1116706f32fbeSmrg    [BASE_]PREFIX[FLAGS]="-v"
1116806f32fbeSmrgelse
1116906f32fbeSmrg    [BASE_]PREFIX[FLAGS]=""
1117006f32fbeSmrgfi
11171a253d6aeSmrg
1117206f32fbeSmrg# This chunk of warnings were those that existed in the legacy CWARNFLAGS
1117306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wall])
1117406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-arith])
1117506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-declarations])
1117606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wformat=2], [-Wformat])
1117706f32fbeSmrg
1117806f32fbeSmrgAC_LANG_CASE(
1117906f32fbeSmrg	[C], [
1118006f32fbeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wstrict-prototypes])
1118106f32fbeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-prototypes])
1118206f32fbeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnested-externs])
1118306f32fbeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wbad-function-cast])
1118406f32fbeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wold-style-definition])
1118506f32fbeSmrg		XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wdeclaration-after-statement])
1118606f32fbeSmrg	]
1118706f32fbeSmrg)
11188a253d6aeSmrg
1118906f32fbeSmrg# This chunk adds additional warnings that could catch undesired effects.
1119006f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wunused])
1119106f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wuninitialized])
1119206f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wshadow])
1119306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-qual])
1119406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-noreturn])
1119506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-format-attribute])
1119606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wredundant-decls])
1119706f32fbeSmrg
1119806f32fbeSmrg# These are currently disabled because they are noisy.  They will be enabled
1119906f32fbeSmrg# in the future once the codebase is sufficiently modernized to silence
1120006f32fbeSmrg# them.  For now, I don't want them to drown out the other warnings.
1120106f32fbeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wlogical-op])
1120206f32fbeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wparentheses])
1120306f32fbeSmrg# XORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wcast-align])
1120406f32fbeSmrg
1120506f32fbeSmrg# Turn some warnings into errors, so we don't accidently get successful builds
1120606f32fbeSmrg# when there are problems that should be fixed.
1120706f32fbeSmrg
1120806f32fbeSmrgif test "x$SELECTIVE_WERROR" = "xyes" ; then
1120906f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=implicit], [-errwarn=E_NO_EXPLICIT_TYPE_GIVEN -errwarn=E_NO_IMPLICIT_DECL_ALLOWED])
1121006f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=nonnull])
1121106f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=init-self])
1121206f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=main])
1121306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=missing-braces])
1121406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=sequence-point])
1121506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=return-type], [-errwarn=E_FUNC_HAS_NO_RETURN_STMT])
1121606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=trigraphs])
1121706f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=array-bounds])
1121806f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=write-strings])
1121906f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=address])
1122006f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=int-to-pointer-cast], [-errwarn=E_BAD_PTR_INT_COMBINATION])
1122106f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Werror=pointer-to-int-cast]) # Also -errwarn=E_BAD_PTR_INT_COMBINATION
1122206f32fbeSmrgelse
1122306f32fbeSmrgAC_MSG_WARN([You have chosen not to turn some select compiler warnings into errors.  This should not be necessary.  Please report why you needed to do so in a bug report at $PACKAGE_BUGREPORT])
1122406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wimplicit])
1122506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wnonnull])
1122606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Winit-self])
1122706f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmain])
1122806f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wmissing-braces])
1122906f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wsequence-point])
1123006f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wreturn-type])
1123106f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wtrigraphs])
1123206f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Warray-bounds])
1123306f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wwrite-strings])
1123406f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Waddress])
1123506f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wint-to-pointer-cast])
1123606f32fbeSmrgXORG_TESTSET_CFLAG([[BASE_]PREFIX[FLAGS]], [-Wpointer-to-int-cast])
1123706f32fbeSmrgfi
1123825b89263Smrg
1123906f32fbeSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
1124006f32fbeSmrg]) # XORG_COMPILER_FLAGS
1124125b89263Smrg
1124206f32fbeSmrg# XORG_CWARNFLAGS
1124306f32fbeSmrg# ---------------
1124406f32fbeSmrg# Minimum version: 1.2.0
1124506f32fbeSmrg# Deprecated since: 1.16.0 (Use XORG_COMPILER_FLAGS instead)
11246ea133fd7Smrg#
1124706f32fbeSmrg# Defines CWARNFLAGS to enable C compiler warnings.
11248ea133fd7Smrg#
1124906f32fbeSmrg# This function is deprecated because it defines -fno-strict-aliasing
1125006f32fbeSmrg# which alters the code generated by the compiler.  If -fno-strict-aliasing
1125106f32fbeSmrg# is needed, then it should be added explicitly in the module when
1125206f32fbeSmrg# it is updated to use BASE_CFLAGS.
1125306f32fbeSmrg#
1125406f32fbeSmrgAC_DEFUN([XORG_CWARNFLAGS], [
1125506f32fbeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
1125606f32fbeSmrgAC_REQUIRE([XORG_COMPILER_BRAND])
1125706f32fbeSmrgAC_LANG_CASE(
1125806f32fbeSmrg	[C], [
1125906f32fbeSmrg		CWARNFLAGS="$BASE_CFLAGS"
1126006f32fbeSmrg		if  test "x$GCC" = xyes ; then
1126106f32fbeSmrg		    CWARNFLAGS="$CWARNFLAGS -fno-strict-aliasing"
1126206f32fbeSmrg		fi
1126306f32fbeSmrg		AC_SUBST(CWARNFLAGS)
1126406f32fbeSmrg	]
1126506f32fbeSmrg)
1126606f32fbeSmrg]) # XORG_CWARNFLAGS
11267a253d6aeSmrg
1126806f32fbeSmrg# XORG_STRICT_OPTION
1126906f32fbeSmrg# -----------------------
1127006f32fbeSmrg# Minimum version: 1.3.0
1127106f32fbeSmrg#
1127206f32fbeSmrg# Add configure option to enable strict compilation flags, such as treating
1127306f32fbeSmrg# warnings as fatal errors.
1127406f32fbeSmrg# If --enable-strict-compilation is passed to configure, adds strict flags to
1127506f32fbeSmrg# $BASE_CFLAGS or $BASE_CXXFLAGS and the deprecated $CWARNFLAGS.
1127606f32fbeSmrg#
1127706f32fbeSmrg# Starting in 1.14.0 also exports $STRICT_CFLAGS for use in other tests or
1127806f32fbeSmrg# when strict compilation is unconditionally desired.
1127906f32fbeSmrgAC_DEFUN([XORG_STRICT_OPTION], [
1128006f32fbeSmrgAC_REQUIRE([XORG_CWARNFLAGS])
1128106f32fbeSmrgAC_REQUIRE([XORG_COMPILER_FLAGS])
11282ea133fd7Smrg
1128306f32fbeSmrgAC_ARG_ENABLE(strict-compilation,
1128406f32fbeSmrg			  AS_HELP_STRING([--enable-strict-compilation],
1128506f32fbeSmrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
1128606f32fbeSmrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
11287a253d6aeSmrg
1128806f32fbeSmrgAC_LANG_CASE(
1128906f32fbeSmrg        [C], [
1129006f32fbeSmrg                define([PREFIX], [C])
1129106f32fbeSmrg        ],
1129206f32fbeSmrg        [C++], [
1129306f32fbeSmrg                define([PREFIX], [CXX])
1129406f32fbeSmrg        ]
1129506f32fbeSmrg)
1129625b89263Smrg
1129706f32fbeSmrg[STRICT_]PREFIX[FLAGS]=""
1129806f32fbeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-pedantic])
1129906f32fbeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror], [-errwarn])
1130025b89263Smrg
1130106f32fbeSmrg# Earlier versions of gcc (eg: 4.2) support -Werror=attributes, but do not
1130206f32fbeSmrg# activate it with -Werror, so we add it here explicitly.
1130306f32fbeSmrgXORG_TESTSET_CFLAG([[STRICT_]PREFIX[FLAGS]], [-Werror=attributes])
11304a253d6aeSmrg
1130506f32fbeSmrgif test "x$STRICT_COMPILE" = "xyes"; then
1130606f32fbeSmrg    [BASE_]PREFIX[FLAGS]="$[BASE_]PREFIX[FLAGS] $[STRICT_]PREFIX[FLAGS]"
1130706f32fbeSmrg    AC_LANG_CASE([C], [CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"])
1130806f32fbeSmrgfi
1130906f32fbeSmrgAC_SUBST([STRICT_]PREFIX[FLAGS])
1131006f32fbeSmrgAC_SUBST([BASE_]PREFIX[FLAGS])
1131106f32fbeSmrgAC_LANG_CASE([C], AC_SUBST([CWARNFLAGS]))
1131206f32fbeSmrg]) # XORG_STRICT_OPTION
11313a253d6aeSmrg
1131406f32fbeSmrg# XORG_DEFAULT_OPTIONS
1131506f32fbeSmrg# --------------------
1131606f32fbeSmrg# Minimum version: 1.3.0
11317ea133fd7Smrg#
1131806f32fbeSmrg# Defines default options for X.Org modules.
11319ea133fd7Smrg#
1132006f32fbeSmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
1132106f32fbeSmrgAC_REQUIRE([AC_PROG_INSTALL])
1132206f32fbeSmrgXORG_COMPILER_FLAGS
1132306f32fbeSmrgXORG_CWARNFLAGS
1132406f32fbeSmrgXORG_STRICT_OPTION
1132506f32fbeSmrgXORG_RELEASE_VERSION
1132606f32fbeSmrgXORG_CHANGELOG
1132706f32fbeSmrgXORG_INSTALL
1132806f32fbeSmrgXORG_MANPAGE_SECTIONS
1132906f32fbeSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
1133006f32fbeSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
1133106f32fbeSmrg]) # XORG_DEFAULT_OPTIONS
1133206f32fbeSmrg
1133306f32fbeSmrg# XORG_INSTALL()
1133406f32fbeSmrg# ----------------
1133506f32fbeSmrg# Minimum version: 1.4.0
11336ea133fd7Smrg#
1133706f32fbeSmrg# Defines the variable INSTALL_CMD as the command to copy
1133806f32fbeSmrg# INSTALL from $prefix/share/util-macros.
1133925b89263Smrg#
1134006f32fbeSmrgAC_DEFUN([XORG_INSTALL], [
1134106f32fbeSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
1134206f32fbeSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
1134306f32fbeSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
1134406f32fbeSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
1134506f32fbeSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
1134606f32fbeSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
1134706f32fbeSmrgAC_SUBST([INSTALL_CMD])
1134806f32fbeSmrg]) # XORG_INSTALL
1134906f32fbeSmrgdnl Copyright 2005 Red Hat, Inc
1135006f32fbeSmrgdnl
1135106f32fbeSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
1135206f32fbeSmrgdnl documentation for any purpose is hereby granted without fee, provided that
1135306f32fbeSmrgdnl the above copyright notice appear in all copies and that both that
1135406f32fbeSmrgdnl copyright notice and this permission notice appear in supporting
1135506f32fbeSmrgdnl documentation.
1135606f32fbeSmrgdnl
1135706f32fbeSmrgdnl The above copyright notice and this permission notice shall be included
1135806f32fbeSmrgdnl in all copies or substantial portions of the Software.
1135906f32fbeSmrgdnl
1136006f32fbeSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1136106f32fbeSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
1136206f32fbeSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
1136306f32fbeSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
1136406f32fbeSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1136506f32fbeSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
1136606f32fbeSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
1136706f32fbeSmrgdnl
1136806f32fbeSmrgdnl Except as contained in this notice, the name of the copyright holders shall
1136906f32fbeSmrgdnl not be used in advertising or otherwise to promote the sale, use or
1137006f32fbeSmrgdnl other dealings in this Software without prior written authorization
1137106f32fbeSmrgdnl from the copyright holders.
1137206f32fbeSmrgdnl
1137325b89263Smrg
1137406f32fbeSmrg# XORG_RELEASE_VERSION
1137506f32fbeSmrg# --------------------
1137606f32fbeSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
1137706f32fbeSmrg 
1137806f32fbeSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
1137906f32fbeSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
1138006f32fbeSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
1138106f32fbeSmrg		[Major version of this package])
1138206f32fbeSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
1138306f32fbeSmrg	if test "x$PVM" = "x"; then
1138406f32fbeSmrg		PVM="0"
1138506f32fbeSmrg	fi
1138606f32fbeSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
1138706f32fbeSmrg		[$PVM],
1138806f32fbeSmrg		[Minor version of this package])
1138906f32fbeSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
1139006f32fbeSmrg	if test "x$PVP" = "x"; then
1139106f32fbeSmrg		PVP="0"
1139206f32fbeSmrg	fi
1139306f32fbeSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
1139406f32fbeSmrg		[$PVP],
1139506f32fbeSmrg		[Patch version of this package])
1139606f32fbeSmrg])
1139725b89263Smrg
1139806f32fbeSmrg# XORG_CHANGELOG()
1139906f32fbeSmrg# ----------------
1140006f32fbeSmrg# Minimum version: 1.2.0
1140106f32fbeSmrg#
1140206f32fbeSmrg# Defines the variable CHANGELOG_CMD as the command to generate
1140306f32fbeSmrg# ChangeLog from git.
1140406f32fbeSmrg#
1140506f32fbeSmrg#
1140606f32fbeSmrgAC_DEFUN([XORG_CHANGELOG], [
1140706f32fbeSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
1140806f32fbeSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
1140906f32fbeSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
1141006f32fbeSmrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
1141106f32fbeSmrgAC_SUBST([CHANGELOG_CMD])
1141206f32fbeSmrg]) # XORG_CHANGELOG
11413a253d6aeSmrg
11414