aclocal.m4 revision 11a29bac
111a29bacSmrg# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
241b2f0bdSmrg
341b2f0bdSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
411245024Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
541b2f0bdSmrg# This file is free software; the Free Software Foundation
641b2f0bdSmrg# gives unlimited permission to copy and/or distribute it,
741b2f0bdSmrg# with or without modifications, as long as this notice is preserved.
841b2f0bdSmrg
941b2f0bdSmrg# This program is distributed in the hope that it will be useful,
1041b2f0bdSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1141b2f0bdSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1241b2f0bdSmrg# PARTICULAR PURPOSE.
1341b2f0bdSmrg
1411245024Smrgm4_ifndef([AC_AUTOCONF_VERSION],
1511245024Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
1611a29bacSmrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
1711a29bacSmrg[m4_warning([this file was generated for autoconf 2.68.
1811245024SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
1911245024SmrgIf you have problems, you may need to regenerate the build system entirely.
2011245024SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
2141b2f0bdSmrg
2211245024Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
2311245024Smrg#
2411245024Smrg# This file is free software; the Free Software Foundation
2511245024Smrg# gives unlimited permission to copy and/or distribute it,
2611245024Smrg# with or without modifications, as long as this notice is preserved.
2741b2f0bdSmrg
2811245024Smrg# AM_AUTOMAKE_VERSION(VERSION)
2911245024Smrg# ----------------------------
3011245024Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
3111245024Smrg# generated from the m4 files accompanying Automake X.Y.
3211245024Smrg# (This private macro should not be called outside this file.)
3311245024SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
3411245024Smrg[am__api_version='1.11'
3511245024Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
3611245024Smrgdnl require some minimum version.  Point them to the right macro.
3711a29bacSmrgm4_if([$1], [1.11.1], [],
3811245024Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
3911245024Smrg])
4041b2f0bdSmrg
4111245024Smrg# _AM_AUTOCONF_VERSION(VERSION)
4211245024Smrg# -----------------------------
4311245024Smrg# aclocal traces this macro to find the Autoconf version.
4411245024Smrg# This is a private macro too.  Using m4_define simplifies
4511245024Smrg# the logic in aclocal, which can simply ignore this definition.
4611245024Smrgm4_define([_AM_AUTOCONF_VERSION], [])
4741b2f0bdSmrg
4811245024Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
4911245024Smrg# -------------------------------
5011245024Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
5111245024Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
5211245024SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
5311a29bacSmrg[AM_AUTOMAKE_VERSION([1.11.1])dnl
5411245024Smrgm4_ifndef([AC_AUTOCONF_VERSION],
5511245024Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
5611245024Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
5741b2f0bdSmrg
5811245024Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
5941b2f0bdSmrg
6011245024Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6111245024Smrg#
6211245024Smrg# This file is free software; the Free Software Foundation
6311245024Smrg# gives unlimited permission to copy and/or distribute it,
6411245024Smrg# with or without modifications, as long as this notice is preserved.
6541b2f0bdSmrg
6611245024Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6711245024Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6811245024Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6911245024Smrg#
7011245024Smrg# Of course, Automake must honor this variable whenever it calls a
7111245024Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
7211245024Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
7311245024Smrg# depending on how configure is run.  This is pretty annoying, since
7411245024Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
7511245024Smrg# source directory, any form will work fine, but in subdirectories a
7611245024Smrg# relative path needs to be adjusted first.
7711245024Smrg#
7811245024Smrg# $ac_aux_dir/missing
7911245024Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
8011245024Smrg# $top_srcdir/$ac_aux_dir/missing
8111245024Smrg#    fails if $ac_aux_dir is absolute,
8211245024Smrg#    fails when called from a subdirectory in a VPATH build with
8311245024Smrg#          a relative $ac_aux_dir
8411245024Smrg#
8511245024Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
8611245024Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
8711245024Smrg# harmless because $srcdir is `.', but things will broke when you
8811245024Smrg# start a VPATH build or use an absolute $srcdir.
8911245024Smrg#
9011245024Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
9111245024Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
9211245024Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
9311245024Smrg# and then we would define $MISSING as
9411245024Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
9511245024Smrg# This will work as long as MISSING is not called from configure, because
9611245024Smrg# unfortunately $(top_srcdir) has no meaning in configure.
9711245024Smrg# However there are other variables, like CC, which are often used in
9811245024Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
9911245024Smrg#
10011245024Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
10111245024Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
10211245024Smrg# configured tree to be moved without reconfiguration.
10341b2f0bdSmrg
10411245024SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
10511245024Smrg[dnl Rely on autoconf to set up CDPATH properly.
10611245024SmrgAC_PREREQ([2.50])dnl
10711245024Smrg# expand $ac_aux_dir to an absolute path
10811245024Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
10911245024Smrg])
11041b2f0bdSmrg
11111245024Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
11241b2f0bdSmrg
11311245024Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
11411245024Smrg# Free Software Foundation, Inc.
11511245024Smrg#
11611245024Smrg# This file is free software; the Free Software Foundation
11711245024Smrg# gives unlimited permission to copy and/or distribute it,
11811245024Smrg# with or without modifications, as long as this notice is preserved.
11941b2f0bdSmrg
12011245024Smrg# serial 9
12141b2f0bdSmrg
12211245024Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
12311245024Smrg# -------------------------------------
12411245024Smrg# Define a conditional.
12511245024SmrgAC_DEFUN([AM_CONDITIONAL],
12611245024Smrg[AC_PREREQ(2.52)dnl
12711245024Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
12811245024Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
12911245024SmrgAC_SUBST([$1_TRUE])dnl
13011245024SmrgAC_SUBST([$1_FALSE])dnl
13111245024Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
13211245024Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
13311245024Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
13411245024Smrgif $2; then
13511245024Smrg  $1_TRUE=
13611245024Smrg  $1_FALSE='#'
13711245024Smrgelse
13811245024Smrg  $1_TRUE='#'
13911245024Smrg  $1_FALSE=
14011245024Smrgfi
14111245024SmrgAC_CONFIG_COMMANDS_PRE(
14211245024Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
14311245024Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
14411245024SmrgUsually this means the macro was only invoked conditionally.]])
14511245024Smrgfi])])
14641b2f0bdSmrg
14711245024Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
14811245024Smrg# Free Software Foundation, Inc.
14911245024Smrg#
15011245024Smrg# This file is free software; the Free Software Foundation
15111245024Smrg# gives unlimited permission to copy and/or distribute it,
15211245024Smrg# with or without modifications, as long as this notice is preserved.
15341b2f0bdSmrg
15411245024Smrg# serial 10
15541b2f0bdSmrg
15611245024Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
15711245024Smrg# written in clear, in which case automake, when reading aclocal.m4,
15811245024Smrg# will think it sees a *use*, and therefore will trigger all it's
15911245024Smrg# C support machinery.  Also note that it means that autoscan, seeing
16011245024Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
16141b2f0bdSmrg
16241b2f0bdSmrg
16311245024Smrg# _AM_DEPENDENCIES(NAME)
16411245024Smrg# ----------------------
16511245024Smrg# See how the compiler implements dependency checking.
16611245024Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
16711245024Smrg# We try a few techniques and use that to set a single cache variable.
16811245024Smrg#
16911245024Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
17011245024Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
17111245024Smrg# dependency, and given that the user is not expected to run this macro,
17211245024Smrg# just rely on AC_PROG_CC.
17311245024SmrgAC_DEFUN([_AM_DEPENDENCIES],
17411245024Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
17511245024SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
17611245024SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
17711245024SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
17841b2f0bdSmrg
17911245024Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
18011245024Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
18111245024Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
18211245024Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
18311245024Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
18411245024Smrg                   [depcc="$$1"   am_compiler_list=])
18541b2f0bdSmrg
18611245024SmrgAC_CACHE_CHECK([dependency style of $depcc],
18711245024Smrg               [am_cv_$1_dependencies_compiler_type],
18811245024Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
18911245024Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
19011245024Smrg  # making bogus files that we don't know about and never remove.  For
19111245024Smrg  # instance it was reported that on HP-UX the gcc test will end up
19211245024Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
19311245024Smrg  # in D'.
19411245024Smrg  mkdir conftest.dir
19511245024Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
19611245024Smrg  # using a relative directory.
19711245024Smrg  cp "$am_depcomp" conftest.dir
19811245024Smrg  cd conftest.dir
19911245024Smrg  # We will build objects and dependencies in a subdirectory because
20011245024Smrg  # it helps to detect inapplicable dependency modes.  For instance
20111245024Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
20211245024Smrg  # side effect of compilation, but ICC will put the dependencies in
20311245024Smrg  # the current directory while Tru64 will put them in the object
20411245024Smrg  # directory.
20511245024Smrg  mkdir sub
20641b2f0bdSmrg
20711245024Smrg  am_cv_$1_dependencies_compiler_type=none
20811245024Smrg  if test "$am_compiler_list" = ""; then
20911245024Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
21011245024Smrg  fi
21111245024Smrg  am__universal=false
21211245024Smrg  m4_case([$1], [CC],
21311245024Smrg    [case " $depcc " in #(
21411245024Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21511245024Smrg     esac],
21611245024Smrg    [CXX],
21711245024Smrg    [case " $depcc " in #(
21811245024Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
21911245024Smrg     esac])
22041b2f0bdSmrg
22111245024Smrg  for depmode in $am_compiler_list; do
22211245024Smrg    # Setup a source with many dependencies, because some compilers
22311245024Smrg    # like to wrap large dependency lists on column 80 (with \), and
22411245024Smrg    # we should not choose a depcomp mode which is confused by this.
22511245024Smrg    #
22611245024Smrg    # We need to recreate these files for each test, as the compiler may
22711245024Smrg    # overwrite some of them when testing with obscure command lines.
22811245024Smrg    # This happens at least with the AIX C compiler.
22911245024Smrg    : > sub/conftest.c
23011245024Smrg    for i in 1 2 3 4 5 6; do
23111245024Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
23211245024Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
23311245024Smrg      # Solaris 8's {/usr,}/bin/sh.
23411245024Smrg      touch sub/conftst$i.h
23511245024Smrg    done
23611245024Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
23741b2f0bdSmrg
23811245024Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
23911245024Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
24011245024Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
24111245024Smrg    # versions had trouble with output in subdirs
24211245024Smrg    am__obj=sub/conftest.${OBJEXT-o}
24311245024Smrg    am__minus_obj="-o $am__obj"
24411245024Smrg    case $depmode in
24511245024Smrg    gcc)
24611245024Smrg      # This depmode causes a compiler race in universal mode.
24711245024Smrg      test "$am__universal" = false || continue
24811245024Smrg      ;;
24911245024Smrg    nosideeffect)
25011245024Smrg      # after this tag, mechanisms are not by side-effect, so they'll
25111245024Smrg      # only be used when explicitly requested
25211245024Smrg      if test "x$enable_dependency_tracking" = xyes; then
25311245024Smrg	continue
25411245024Smrg      else
25511245024Smrg	break
25611245024Smrg      fi
25711245024Smrg      ;;
25811245024Smrg    msvisualcpp | msvcmsys)
25911245024Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
26011245024Smrg      # not run yet.  These depmodes are late enough in the game, and
26111245024Smrg      # so weak that their functioning should not be impacted.
26211245024Smrg      am__obj=conftest.${OBJEXT-o}
26311245024Smrg      am__minus_obj=
26411245024Smrg      ;;
26511245024Smrg    none) break ;;
26611245024Smrg    esac
26711245024Smrg    if depmode=$depmode \
26811245024Smrg       source=sub/conftest.c object=$am__obj \
26911245024Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
27011245024Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
27111245024Smrg         >/dev/null 2>conftest.err &&
27211245024Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
27311245024Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
27411245024Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
27511245024Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
27611245024Smrg      # icc doesn't choke on unknown options, it will just issue warnings
27711245024Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
27811245024Smrg      # that says an option was ignored or not supported.
27911245024Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
28011245024Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
28111245024Smrg      # The diagnosis changed in icc 8.0:
28211245024Smrg      #   icc: Command line remark: option '-MP' not supported
28311245024Smrg      if (grep 'ignoring option' conftest.err ||
28411245024Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
28511245024Smrg        am_cv_$1_dependencies_compiler_type=$depmode
28611245024Smrg        break
28711245024Smrg      fi
28811245024Smrg    fi
28911245024Smrg  done
29041b2f0bdSmrg
29111245024Smrg  cd ..
29211245024Smrg  rm -rf conftest.dir
29311245024Smrgelse
29411245024Smrg  am_cv_$1_dependencies_compiler_type=none
29541b2f0bdSmrgfi
29611245024Smrg])
29711245024SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
29811245024SmrgAM_CONDITIONAL([am__fastdep$1], [
29911245024Smrg  test "x$enable_dependency_tracking" != xno \
30011245024Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
30111245024Smrg])
30241b2f0bdSmrg
30341b2f0bdSmrg
30411245024Smrg# AM_SET_DEPDIR
30511245024Smrg# -------------
30611245024Smrg# Choose a directory name for dependency files.
30711245024Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
30811245024SmrgAC_DEFUN([AM_SET_DEPDIR],
30911245024Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
31011245024SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
31111245024Smrg])
31241b2f0bdSmrg
31341b2f0bdSmrg
31411245024Smrg# AM_DEP_TRACK
31511245024Smrg# ------------
31611245024SmrgAC_DEFUN([AM_DEP_TRACK],
31711245024Smrg[AC_ARG_ENABLE(dependency-tracking,
31811245024Smrg[  --disable-dependency-tracking  speeds up one-time build
31911245024Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
32011245024Smrgif test "x$enable_dependency_tracking" != xno; then
32111245024Smrg  am_depcomp="$ac_aux_dir/depcomp"
32211245024Smrg  AMDEPBACKSLASH='\'
32311245024Smrgfi
32411245024SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
32511245024SmrgAC_SUBST([AMDEPBACKSLASH])dnl
32611245024Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
32711245024Smrg])
32841b2f0bdSmrg
32911245024Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
33041b2f0bdSmrg
33111245024Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
33211245024Smrg# Free Software Foundation, Inc.
33311245024Smrg#
33411245024Smrg# This file is free software; the Free Software Foundation
33511245024Smrg# gives unlimited permission to copy and/or distribute it,
33611245024Smrg# with or without modifications, as long as this notice is preserved.
33741b2f0bdSmrg
33811245024Smrg#serial 5
33941b2f0bdSmrg
34011245024Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
34111245024Smrg# ------------------------------
34211245024SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
34311245024Smrg[{
34411245024Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
34511245024Smrg  # are listed without --file.  Let's play safe and only enable the eval
34611245024Smrg  # if we detect the quoting.
34711245024Smrg  case $CONFIG_FILES in
34811245024Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
34911245024Smrg  *)   set x $CONFIG_FILES ;;
35011245024Smrg  esac
35111245024Smrg  shift
35211245024Smrg  for mf
35311245024Smrg  do
35411245024Smrg    # Strip MF so we end up with the name of the file.
35511245024Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
35611245024Smrg    # Check whether this is an Automake generated Makefile or not.
35711245024Smrg    # We used to match only the files named `Makefile.in', but
35811245024Smrg    # some people rename them; so instead we look at the file content.
35911245024Smrg    # Grep'ing the first line is not enough: some people post-process
36011245024Smrg    # each Makefile.in and add a new line on top of each file to say so.
36111245024Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
36211245024Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
36311245024Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
36411245024Smrg      dirpart=`AS_DIRNAME("$mf")`
36511245024Smrg    else
36611245024Smrg      continue
36711245024Smrg    fi
36811245024Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
36911245024Smrg    # from the Makefile without running `make'.
37011245024Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37111245024Smrg    test -z "$DEPDIR" && continue
37211245024Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
37311245024Smrg    test -z "am__include" && continue
37411245024Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37511245024Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
37611245024Smrg    U=`sed -n 's/^U = //p' < "$mf"`
37711245024Smrg    # Find all dependency output files, they are included files with
37811245024Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
37911245024Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
38011245024Smrg    # expansion.
38111245024Smrg    for file in `sed -n "
38211245024Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
38311245024Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
38411245024Smrg      # Make sure the directory exists.
38511245024Smrg      test -f "$dirpart/$file" && continue
38611245024Smrg      fdir=`AS_DIRNAME(["$file"])`
38711245024Smrg      AS_MKDIR_P([$dirpart/$fdir])
38811245024Smrg      # echo "creating $dirpart/$file"
38911245024Smrg      echo '# dummy' > "$dirpart/$file"
39011245024Smrg    done
39111245024Smrg  done
39211245024Smrg}
39311245024Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
39441b2f0bdSmrg
39541b2f0bdSmrg
39611245024Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
39711245024Smrg# -----------------------------
39811245024Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
39911245024Smrg#
40011245024Smrg# This code is only required when automatic dependency tracking
40111245024Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
40211245024Smrg# need in order to bootstrap the dependency handling code.
40311245024SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
40411245024Smrg[AC_CONFIG_COMMANDS([depfiles],
40511245024Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
40611245024Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
40741b2f0bdSmrg])
40841b2f0bdSmrg
40911245024Smrg# Do all the work for Automake.                             -*- Autoconf -*-
41041b2f0bdSmrg
41111245024Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
41211245024Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
41311245024Smrg#
41411245024Smrg# This file is free software; the Free Software Foundation
41511245024Smrg# gives unlimited permission to copy and/or distribute it,
41611245024Smrg# with or without modifications, as long as this notice is preserved.
41741b2f0bdSmrg
41811245024Smrg# serial 16
41941b2f0bdSmrg
42011245024Smrg# This macro actually does too much.  Some checks are only needed if
42111245024Smrg# your package does certain things.  But this isn't really a big deal.
42241b2f0bdSmrg
42311245024Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
42411245024Smrg# AM_INIT_AUTOMAKE([OPTIONS])
42511245024Smrg# -----------------------------------------------
42611245024Smrg# The call with PACKAGE and VERSION arguments is the old style
42711245024Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
42811245024Smrg# and VERSION should now be passed to AC_INIT and removed from
42911245024Smrg# the call to AM_INIT_AUTOMAKE.
43011245024Smrg# We support both call styles for the transition.  After
43111245024Smrg# the next Automake release, Autoconf can make the AC_INIT
43211245024Smrg# arguments mandatory, and then we can depend on a new Autoconf
43311245024Smrg# release and drop the old call support.
43411245024SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
43511245024Smrg[AC_PREREQ([2.62])dnl
43611245024Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
43711245024Smrgdnl the ones we care about.
43811245024Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
43911245024SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
44011245024SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
44111245024Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
44211245024Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
44311245024Smrg  # is not polluted with repeated "-I."
44411245024Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
44511245024Smrg  # test to see if srcdir already configured
44611245024Smrg  if test -f $srcdir/config.status; then
44711245024Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
44811245024Smrg  fi
44911245024Smrgfi
45041b2f0bdSmrg
45111245024Smrg# test whether we have cygpath
45211245024Smrgif test -z "$CYGPATH_W"; then
45311245024Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
45411245024Smrg    CYGPATH_W='cygpath -w'
45511245024Smrg  else
45611245024Smrg    CYGPATH_W=echo
45711245024Smrg  fi
45811245024Smrgfi
45911245024SmrgAC_SUBST([CYGPATH_W])
46041b2f0bdSmrg
46111245024Smrg# Define the identity of the package.
46211245024Smrgdnl Distinguish between old-style and new-style calls.
46311245024Smrgm4_ifval([$2],
46411245024Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
46511245024Smrg AC_SUBST([PACKAGE], [$1])dnl
46611245024Smrg AC_SUBST([VERSION], [$2])],
46711245024Smrg[_AM_SET_OPTIONS([$1])dnl
46811245024Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
46911245024Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
47011245024Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
47111245024Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
47211245024Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
47341b2f0bdSmrg
47411245024Smrg_AM_IF_OPTION([no-define],,
47511245024Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
47611245024Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
47741b2f0bdSmrg
47811245024Smrg# Some tools Automake needs.
47911245024SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
48011245024SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
48111245024SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
48211245024SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
48311245024SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
48411245024SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
48511245024SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
48611245024SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
48711245024SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
48811245024SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
48911245024Smrg# We need awk for the "check" target.  The system "awk" is bad on
49011245024Smrg# some platforms.
49111245024SmrgAC_REQUIRE([AC_PROG_AWK])dnl
49211245024SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
49311245024SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
49411245024Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
49511245024Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
49611245024Smrg			     [_AM_PROG_TAR([v7])])])
49711245024Smrg_AM_IF_OPTION([no-dependencies],,
49811245024Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
49911245024Smrg		  [_AM_DEPENDENCIES(CC)],
50011245024Smrg		  [define([AC_PROG_CC],
50111245024Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
50211245024SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
50311245024Smrg		  [_AM_DEPENDENCIES(CXX)],
50411245024Smrg		  [define([AC_PROG_CXX],
50511245024Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
50611245024SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
50711245024Smrg		  [_AM_DEPENDENCIES(OBJC)],
50811245024Smrg		  [define([AC_PROG_OBJC],
50911245024Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
51011245024Smrg])
51111245024Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
51211245024Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
51311245024Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
51411245024Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
51511245024SmrgAC_CONFIG_COMMANDS_PRE(dnl
51611245024Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
51711245024Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
51811245024Smrg])
51941b2f0bdSmrg
52011245024Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
52111245024Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
52211245024Smrgdnl mangled by Autoconf and run in a shell conditional statement.
52311245024Smrgm4_define([_AC_COMPILER_EXEEXT],
52411245024Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
52541b2f0bdSmrg
52641b2f0bdSmrg
52711245024Smrg# When config.status generates a header, we must update the stamp-h file.
52811245024Smrg# This file resides in the same directory as the config header
52911245024Smrg# that is generated.  The stamp files are numbered to have different names.
53041b2f0bdSmrg
53111245024Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
53211245024Smrg# loop where config.status creates the headers, so we can generate
53311245024Smrg# our stamp files there.
53411245024SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
53511245024Smrg[# Compute $1's index in $config_headers.
53611245024Smrg_am_arg=$1
53711245024Smrg_am_stamp_count=1
53811245024Smrgfor _am_header in $config_headers :; do
53911245024Smrg  case $_am_header in
54011245024Smrg    $_am_arg | $_am_arg:* )
54111245024Smrg      break ;;
54211245024Smrg    * )
54311245024Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
54411245024Smrg  esac
54511245024Smrgdone
54611245024Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
54741b2f0bdSmrg
54811245024Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
54911245024Smrg#
55011245024Smrg# This file is free software; the Free Software Foundation
55111245024Smrg# gives unlimited permission to copy and/or distribute it,
55211245024Smrg# with or without modifications, as long as this notice is preserved.
55341b2f0bdSmrg
55411245024Smrg# AM_PROG_INSTALL_SH
55511245024Smrg# ------------------
55611245024Smrg# Define $install_sh.
55711245024SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
55811245024Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
55911245024Smrgif test x"${install_sh}" != xset; then
56011245024Smrg  case $am_aux_dir in
56111245024Smrg  *\ * | *\	*)
56211245024Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
56311245024Smrg  *)
56411245024Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
56511245024Smrg  esac
56611245024Smrgfi
56711245024SmrgAC_SUBST(install_sh)])
56841b2f0bdSmrg
56911245024Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
57011245024Smrg#
57111245024Smrg# This file is free software; the Free Software Foundation
57211245024Smrg# gives unlimited permission to copy and/or distribute it,
57311245024Smrg# with or without modifications, as long as this notice is preserved.
57441b2f0bdSmrg
57511245024Smrg# serial 2
57641b2f0bdSmrg
57711245024Smrg# Check whether the underlying file-system supports filenames
57811245024Smrg# with a leading dot.  For instance MS-DOS doesn't.
57911245024SmrgAC_DEFUN([AM_SET_LEADING_DOT],
58011245024Smrg[rm -rf .tst 2>/dev/null
58111245024Smrgmkdir .tst 2>/dev/null
58211245024Smrgif test -d .tst; then
58311245024Smrg  am__leading_dot=.
58411245024Smrgelse
58511245024Smrg  am__leading_dot=_
58641b2f0bdSmrgfi
58711245024Smrgrmdir .tst 2>/dev/null
58811245024SmrgAC_SUBST([am__leading_dot])])
58941b2f0bdSmrg
59011245024Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
59111245024Smrg# From Jim Meyering
59241b2f0bdSmrg
59311245024Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
59411245024Smrg# Free Software Foundation, Inc.
59511245024Smrg#
59611245024Smrg# This file is free software; the Free Software Foundation
59711245024Smrg# gives unlimited permission to copy and/or distribute it,
59811245024Smrg# with or without modifications, as long as this notice is preserved.
59941b2f0bdSmrg
60011245024Smrg# serial 5
60141b2f0bdSmrg
60211245024Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
60311245024Smrg# ----------------------------------
60411245024Smrg# Control maintainer-specific portions of Makefiles.
60511245024Smrg# Default is to disable them, unless `enable' is passed literally.
60611245024Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
60711245024Smrg# can override the default with the --enable/--disable switch.
60811245024SmrgAC_DEFUN([AM_MAINTAINER_MODE],
60911245024Smrg[m4_case(m4_default([$1], [disable]),
61011245024Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
61111245024Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
61211245024Smrg       [m4_define([am_maintainer_other], [enable])
61311245024Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
61411245024SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
61511245024Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
61611245024Smrg  AC_ARG_ENABLE([maintainer-mode],
61711245024Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
61811245024Smrg			  (and sometimes confusing) to the casual installer],
61911245024Smrg      [USE_MAINTAINER_MODE=$enableval],
62011245024Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
62111245024Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
62211245024Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
62311245024Smrg  MAINT=$MAINTAINER_MODE_TRUE
62411245024Smrg  AC_SUBST([MAINT])dnl
62511245024Smrg]
62611245024Smrg)
62741b2f0bdSmrg
62811245024SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
62941b2f0bdSmrg
63011245024Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
63111245024Smrg
63211245024Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
63311245024Smrg#
63411245024Smrg# This file is free software; the Free Software Foundation
63511245024Smrg# gives unlimited permission to copy and/or distribute it,
63611245024Smrg# with or without modifications, as long as this notice is preserved.
63711245024Smrg
63811245024Smrg# serial 4
63911245024Smrg
64011245024Smrg# AM_MAKE_INCLUDE()
64111245024Smrg# -----------------
64211245024Smrg# Check to see how make treats includes.
64311245024SmrgAC_DEFUN([AM_MAKE_INCLUDE],
64411245024Smrg[am_make=${MAKE-make}
64511245024Smrgcat > confinc << 'END'
64611245024Smrgam__doit:
64711245024Smrg	@echo this is the am__doit target
64811245024Smrg.PHONY: am__doit
64911245024SmrgEND
65011245024Smrg# If we don't find an include directive, just comment out the code.
65111245024SmrgAC_MSG_CHECKING([for style of include used by $am_make])
65211245024Smrgam__include="#"
65311245024Smrgam__quote=
65411245024Smrg_am_result=none
65511245024Smrg# First try GNU make style include.
65611245024Smrgecho "include confinc" > confmf
65711245024Smrg# Ignore all kinds of additional output from `make'.
65811245024Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
65911245024Smrg*the\ am__doit\ target*)
66011245024Smrg  am__include=include
66111245024Smrg  am__quote=
66211245024Smrg  _am_result=GNU
66341b2f0bdSmrg  ;;
66441b2f0bdSmrgesac
66511245024Smrg# Now try BSD make style include.
66611245024Smrgif test "$am__include" = "#"; then
66711245024Smrg   echo '.include "confinc"' > confmf
66811245024Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
66911245024Smrg   *the\ am__doit\ target*)
67011245024Smrg     am__include=.include
67111245024Smrg     am__quote="\""
67211245024Smrg     _am_result=BSD
67311245024Smrg     ;;
67411245024Smrg   esac
67511245024Smrgfi
67611245024SmrgAC_SUBST([am__include])
67711245024SmrgAC_SUBST([am__quote])
67811245024SmrgAC_MSG_RESULT([$_am_result])
67911245024Smrgrm -f confinc confmf
68011245024Smrg])
68141b2f0bdSmrg
68211245024Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
68341b2f0bdSmrg
68411245024Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
68511245024Smrg# Free Software Foundation, Inc.
68611245024Smrg#
68711245024Smrg# This file is free software; the Free Software Foundation
68811245024Smrg# gives unlimited permission to copy and/or distribute it,
68911245024Smrg# with or without modifications, as long as this notice is preserved.
69041b2f0bdSmrg
69111245024Smrg# serial 6
69241b2f0bdSmrg
69311245024Smrg# AM_MISSING_PROG(NAME, PROGRAM)
69411245024Smrg# ------------------------------
69511245024SmrgAC_DEFUN([AM_MISSING_PROG],
69611245024Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
69711245024Smrg$1=${$1-"${am_missing_run}$2"}
69811245024SmrgAC_SUBST($1)])
69941b2f0bdSmrg
70011245024Smrg
70111245024Smrg# AM_MISSING_HAS_RUN
70211245024Smrg# ------------------
70311245024Smrg# Define MISSING if not defined so far and test if it supports --run.
70411245024Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
70511245024SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
70611245024Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
70711245024SmrgAC_REQUIRE_AUX_FILE([missing])dnl
70811245024Smrgif test x"${MISSING+set}" != xset; then
70911245024Smrg  case $am_aux_dir in
71011245024Smrg  *\ * | *\	*)
71111245024Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
71211245024Smrg  *)
71311245024Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
71411245024Smrg  esac
71511245024Smrgfi
71611245024Smrg# Use eval to expand $SHELL
71711245024Smrgif eval "$MISSING --run true"; then
71811245024Smrg  am_missing_run="$MISSING --run "
71941b2f0bdSmrgelse
72011245024Smrg  am_missing_run=
72111245024Smrg  AC_MSG_WARN([`missing' script is too old or missing])
72241b2f0bdSmrgfi
72311245024Smrg])
72441b2f0bdSmrg
72511245024Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
72611245024Smrg#
72711245024Smrg# This file is free software; the Free Software Foundation
72811245024Smrg# gives unlimited permission to copy and/or distribute it,
72911245024Smrg# with or without modifications, as long as this notice is preserved.
73041b2f0bdSmrg
73111245024Smrg# AM_PROG_MKDIR_P
73211245024Smrg# ---------------
73311245024Smrg# Check for `mkdir -p'.
73411245024SmrgAC_DEFUN([AM_PROG_MKDIR_P],
73511245024Smrg[AC_PREREQ([2.60])dnl
73611245024SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
73711245024Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
73811245024Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
73911245024Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
74011245024Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
74111245024Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
74211245024Smrgdnl adjustment using top_builddir (which is defined more often than
74311245024Smrgdnl MKDIR_P).
74411245024SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
74511245024Smrgcase $mkdir_p in
74611245024Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
74711245024Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
74811245024Smrgesac
74941b2f0bdSmrg])
75041b2f0bdSmrg
75111245024Smrg# Helper functions for option handling.                     -*- Autoconf -*-
75241b2f0bdSmrg
75311245024Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
75411245024Smrg#
75511245024Smrg# This file is free software; the Free Software Foundation
75611245024Smrg# gives unlimited permission to copy and/or distribute it,
75711245024Smrg# with or without modifications, as long as this notice is preserved.
75841b2f0bdSmrg
75911245024Smrg# serial 4
76041b2f0bdSmrg
76111245024Smrg# _AM_MANGLE_OPTION(NAME)
76211245024Smrg# -----------------------
76311245024SmrgAC_DEFUN([_AM_MANGLE_OPTION],
76411245024Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
76541b2f0bdSmrg
76611245024Smrg# _AM_SET_OPTION(NAME)
76711245024Smrg# ------------------------------
76811245024Smrg# Set option NAME.  Presently that only means defining a flag for this option.
76911245024SmrgAC_DEFUN([_AM_SET_OPTION],
77011245024Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
77141b2f0bdSmrg
77211245024Smrg# _AM_SET_OPTIONS(OPTIONS)
77311245024Smrg# ----------------------------------
77411245024Smrg# OPTIONS is a space-separated list of Automake options.
77511245024SmrgAC_DEFUN([_AM_SET_OPTIONS],
77611245024Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
77741b2f0bdSmrg
77811245024Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
77911245024Smrg# -------------------------------------------
78011245024Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
78111245024SmrgAC_DEFUN([_AM_IF_OPTION],
78211245024Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
78341b2f0bdSmrg
78411245024Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
78541b2f0bdSmrg
78611245024Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
78711245024Smrg# Free Software Foundation, Inc.
78811245024Smrg#
78911245024Smrg# This file is free software; the Free Software Foundation
79011245024Smrg# gives unlimited permission to copy and/or distribute it,
79111245024Smrg# with or without modifications, as long as this notice is preserved.
79241b2f0bdSmrg
79311245024Smrg# serial 5
79441b2f0bdSmrg
79511245024Smrg# AM_SANITY_CHECK
79611245024Smrg# ---------------
79711245024SmrgAC_DEFUN([AM_SANITY_CHECK],
79811245024Smrg[AC_MSG_CHECKING([whether build environment is sane])
79911245024Smrg# Just in case
80011245024Smrgsleep 1
80111245024Smrgecho timestamp > conftest.file
80211245024Smrg# Reject unsafe characters in $srcdir or the absolute working directory
80311245024Smrg# name.  Accept space and tab only in the latter.
80411245024Smrgam_lf='
80511245024Smrg'
80611245024Smrgcase `pwd` in
80711245024Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
80811245024Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
80911245024Smrgesac
81011245024Smrgcase $srcdir in
81111245024Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
81211245024Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
81311245024Smrgesac
81441b2f0bdSmrg
81511245024Smrg# Do `set' in a subshell so we don't clobber the current shell's
81611245024Smrg# arguments.  Must try -L first in case configure is actually a
81711245024Smrg# symlink; some systems play weird games with the mod time of symlinks
81811245024Smrg# (eg FreeBSD returns the mod time of the symlink's containing
81911245024Smrg# directory).
82011245024Smrgif (
82111245024Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
82211245024Smrg   if test "$[*]" = "X"; then
82311245024Smrg      # -L didn't work.
82411245024Smrg      set X `ls -t "$srcdir/configure" conftest.file`
82511245024Smrg   fi
82611245024Smrg   rm -f conftest.file
82711245024Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
82811245024Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
82941b2f0bdSmrg
83011245024Smrg      # If neither matched, then we have a broken ls.  This can happen
83111245024Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
83211245024Smrg      # broken ls alias from the environment.  This has actually
83311245024Smrg      # happened.  Such a system could not be considered "sane".
83411245024Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
83511245024Smrgalias in your environment])
83611245024Smrg   fi
83741b2f0bdSmrg
83811245024Smrg   test "$[2]" = conftest.file
83911245024Smrg   )
84011245024Smrgthen
84111245024Smrg   # Ok.
84211245024Smrg   :
84341b2f0bdSmrgelse
84411245024Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
84511245024SmrgCheck your system clock])
84611245024Smrgfi
84711245024SmrgAC_MSG_RESULT(yes)])
84841b2f0bdSmrg
84911245024Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
85011245024Smrg#
85111245024Smrg# This file is free software; the Free Software Foundation
85211245024Smrg# gives unlimited permission to copy and/or distribute it,
85311245024Smrg# with or without modifications, as long as this notice is preserved.
85441b2f0bdSmrg
85511245024Smrg# serial 1
85641b2f0bdSmrg
85711245024Smrg# AM_SILENT_RULES([DEFAULT])
85811245024Smrg# --------------------------
85911245024Smrg# Enable less verbose build rules; with the default set to DEFAULT
86011245024Smrg# (`yes' being less verbose, `no' or empty being verbose).
86111245024SmrgAC_DEFUN([AM_SILENT_RULES],
86211245024Smrg[AC_ARG_ENABLE([silent-rules],
86311245024Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
86411245024Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
86511245024Smrgcase $enable_silent_rules in
86611245024Smrgyes) AM_DEFAULT_VERBOSITY=0;;
86711245024Smrgno)  AM_DEFAULT_VERBOSITY=1;;
86811245024Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
86911245024Smrgesac
87011245024SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
87111245024SmrgAM_BACKSLASH='\'
87211245024SmrgAC_SUBST([AM_BACKSLASH])dnl
87311245024Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
87411245024Smrg])
87541b2f0bdSmrg
87611245024Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
87711245024Smrg#
87811245024Smrg# This file is free software; the Free Software Foundation
87911245024Smrg# gives unlimited permission to copy and/or distribute it,
88011245024Smrg# with or without modifications, as long as this notice is preserved.
88141b2f0bdSmrg
88211245024Smrg# AM_PROG_INSTALL_STRIP
88311245024Smrg# ---------------------
88411245024Smrg# One issue with vendor `install' (even GNU) is that you can't
88511245024Smrg# specify the program used to strip binaries.  This is especially
88611245024Smrg# annoying in cross-compiling environments, where the build's strip
88711245024Smrg# is unlikely to handle the host's binaries.
88811245024Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
88911245024Smrg# always use install-sh in `make install-strip', and initialize
89011245024Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
89111245024SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
89211245024Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
89311245024Smrg# Installed binaries are usually stripped using `strip' when the user
89411245024Smrg# run `make install-strip'.  However `strip' might not be the right
89511245024Smrg# tool to use in cross-compilation environments, therefore Automake
89611245024Smrg# will honor the `STRIP' environment variable to overrule this program.
89711245024Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
89811245024Smrgif test "$cross_compiling" != no; then
89911245024Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
90041b2f0bdSmrgfi
90111245024SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
90211245024SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
90341b2f0bdSmrg
90411245024Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
90511245024Smrg#
90611245024Smrg# This file is free software; the Free Software Foundation
90711245024Smrg# gives unlimited permission to copy and/or distribute it,
90811245024Smrg# with or without modifications, as long as this notice is preserved.
90941b2f0bdSmrg
91011245024Smrg# serial 2
91141b2f0bdSmrg
91211245024Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
91311245024Smrg# ---------------------------
91411245024Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
91511245024Smrg# This macro is traced by Automake.
91611245024SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
91741b2f0bdSmrg
91811245024Smrg# AM_SUBST_NOTMAKE(VARIABLE)
91911245024Smrg# ---------------------------
92011245024Smrg# Public sister of _AM_SUBST_NOTMAKE.
92111245024SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
92241b2f0bdSmrg
92311245024Smrg# Check how to create a tarball.                            -*- Autoconf -*-
92441b2f0bdSmrg
92511245024Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
92611245024Smrg#
92711245024Smrg# This file is free software; the Free Software Foundation
92811245024Smrg# gives unlimited permission to copy and/or distribute it,
92911245024Smrg# with or without modifications, as long as this notice is preserved.
93041b2f0bdSmrg
93111245024Smrg# serial 2
93211245024Smrg
93311245024Smrg# _AM_PROG_TAR(FORMAT)
93411245024Smrg# --------------------
93511245024Smrg# Check how to create a tarball in format FORMAT.
93611245024Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
93711245024Smrg#
93811245024Smrg# Substitute a variable $(am__tar) that is a command
93911245024Smrg# writing to stdout a FORMAT-tarball containing the directory
94011245024Smrg# $tardir.
94111245024Smrg#     tardir=directory && $(am__tar) > result.tar
94211245024Smrg#
94311245024Smrg# Substitute a variable $(am__untar) that extract such
94411245024Smrg# a tarball read from stdin.
94511245024Smrg#     $(am__untar) < result.tar
94611245024SmrgAC_DEFUN([_AM_PROG_TAR],
94711245024Smrg[# Always define AMTAR for backward compatibility.
94811245024SmrgAM_MISSING_PROG([AMTAR], [tar])
94911245024Smrgm4_if([$1], [v7],
95011245024Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
95111245024Smrg     [m4_case([$1], [ustar],, [pax],,
95211245024Smrg              [m4_fatal([Unknown tar format])])
95311245024SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
95411245024Smrg# Loop over all known methods to create a tar archive until one works.
95511245024Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
95611245024Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
95711245024Smrg# Do not fold the above two line into one, because Tru64 sh and
95811245024Smrg# Solaris sh will not grok spaces in the rhs of `-'.
95911245024Smrgfor _am_tool in $_am_tools
96011245024Smrgdo
96111245024Smrg  case $_am_tool in
96211245024Smrg  gnutar)
96311245024Smrg    for _am_tar in tar gnutar gtar;
96411245024Smrg    do
96511245024Smrg      AM_RUN_LOG([$_am_tar --version]) && break
96611245024Smrg    done
96711245024Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
96811245024Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
96911245024Smrg    am__untar="$_am_tar -xf -"
97011245024Smrg    ;;
97111245024Smrg  plaintar)
97211245024Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
97311245024Smrg    # ustar tarball either.
97411245024Smrg    (tar --version) >/dev/null 2>&1 && continue
97511245024Smrg    am__tar='tar chf - "$$tardir"'
97611245024Smrg    am__tar_='tar chf - "$tardir"'
97711245024Smrg    am__untar='tar xf -'
97811245024Smrg    ;;
97911245024Smrg  pax)
98011245024Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
98111245024Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
98211245024Smrg    am__untar='pax -r'
98311245024Smrg    ;;
98411245024Smrg  cpio)
98511245024Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
98611245024Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
98711245024Smrg    am__untar='cpio -i -H $1 -d'
98811245024Smrg    ;;
98911245024Smrg  none)
99011245024Smrg    am__tar=false
99111245024Smrg    am__tar_=false
99211245024Smrg    am__untar=false
99341b2f0bdSmrg    ;;
99441b2f0bdSmrg  esac
99541b2f0bdSmrg
99611245024Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
99711245024Smrg  # and am__untar set.
99811245024Smrg  test -n "${am_cv_prog_tar_$1}" && break
99941b2f0bdSmrg
100011245024Smrg  # tar/untar a dummy directory, and stop if the command works
100111245024Smrg  rm -rf conftest.dir
100211245024Smrg  mkdir conftest.dir
100311245024Smrg  echo GrepMe > conftest.dir/file
100411245024Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
100511245024Smrg  rm -rf conftest.dir
100611245024Smrg  if test -s conftest.tar; then
100711245024Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
100811245024Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
100911245024Smrg  fi
101011245024Smrgdone
101111245024Smrgrm -rf conftest.dir
101241b2f0bdSmrg
101311245024SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
101411245024SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
101511245024SmrgAC_SUBST([am__tar])
101611245024SmrgAC_SUBST([am__untar])
101711245024Smrg]) # _AM_PROG_TAR
101841b2f0bdSmrg
101911245024Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
102011245024Smrgdnl
102111a29bacSmrgdnl Copyright (c) 2005, 2006, Oracle and/or its affiliates. All rights reserved.
102211245024Smrgdnl 
102311245024Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
102411a29bacSmrgdnl copy of this software and associated documentation files (the "Software"),
102511a29bacSmrgdnl to deal in the Software without restriction, including without limitation
102611a29bacSmrgdnl the rights to use, copy, modify, merge, publish, distribute, sublicense,
102711a29bacSmrgdnl and/or sell copies of the Software, and to permit persons to whom the
102811a29bacSmrgdnl Software is furnished to do so, subject to the following conditions:
102911245024Smrgdnl
103011a29bacSmrgdnl The above copyright notice and this permission notice (including the next
103111a29bacSmrgdnl paragraph) shall be included in all copies or substantial portions of the
103211a29bacSmrgdnl Software.
103311245024Smrgdnl
103411a29bacSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
103511a29bacSmrgdnl IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
103611a29bacSmrgdnl FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
103711a29bacSmrgdnl THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
103811a29bacSmrgdnl LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
103911a29bacSmrgdnl FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
104011a29bacSmrgdnl DEALINGS IN THE SOFTWARE.
104141b2f0bdSmrg
104211245024Smrg# XORG_MACROS_VERSION(required-version)
104311245024Smrg# -------------------------------------
104411245024Smrg# Minimum version: 1.1.0
104511245024Smrg#
104611245024Smrg# If you're using a macro added in Version 1.1 or newer, include this in
104711245024Smrg# your configure.ac with the minimum required version, such as:
104811245024Smrg# XORG_MACROS_VERSION(1.1)
104911245024Smrg#
105011245024Smrg# To ensure that this macro is defined, also add:
105111245024Smrg# m4_ifndef([XORG_MACROS_VERSION],
105211245024Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
105311245024Smrg#
105411245024Smrg#
105511245024Smrg# See the "minimum version" comment for each macro you use to see what 
105611245024Smrg# version you require.
105711245024Smrgm4_defun([XORG_MACROS_VERSION],[
105811a29bacSmrgm4_define([vers_have], [1.11.0])
105911245024Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
106011245024Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
106111245024Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
106211245024Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
106311245024Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
106411245024Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
106511245024Smrgm4_undefine([vers_have])
106611245024Smrgm4_undefine([maj_have])
106711245024Smrgm4_undefine([maj_needed])
106811245024Smrg]) # XORG_MACROS_VERSION
106941b2f0bdSmrg
107011245024Smrg# XORG_PROG_RAWCPP()
107111245024Smrg# ------------------
107211245024Smrg# Minimum version: 1.0.0
107311245024Smrg#
107411245024Smrg# Find cpp program and necessary flags for use in pre-processing text files
107511245024Smrg# such as man pages and config files
107611245024SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
107711245024SmrgAC_REQUIRE([AC_PROG_CPP])
107811245024SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
107911245024Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
108041b2f0bdSmrg
108111245024Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
108211245024Smrg# which is not the best choice for supporting other OS'es, but covers most
108311245024Smrg# of the ones we need for now.
108411245024SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
108511245024SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
108611245024Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
108711245024Smrg	AC_MSG_RESULT([no])
108811245024Smrgelse
108911245024Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
109011245024Smrg		RAWCPPFLAGS=-undef
109111245024Smrg		AC_MSG_RESULT([yes])
109211245024Smrg	# under Cygwin unix is still defined even with -undef
109311245024Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
109411245024Smrg		RAWCPPFLAGS="-undef -ansi"
109511245024Smrg		AC_MSG_RESULT([yes, with -ansi])
109611245024Smrg	else
109711245024Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
109811245024Smrg	fi
109941b2f0bdSmrgfi
110011245024Smrgrm -f conftest.$ac_ext
110141b2f0bdSmrg
110211245024SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
110311245024SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
110411245024Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
110511245024Smrg	AC_MSG_RESULT([no])
110611245024Smrgelse
110711245024Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
110811245024Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
110911245024Smrg		AC_MSG_RESULT([yes])
111011245024Smrg	else
111111245024Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
111211245024Smrg	fi
111311245024Smrgfi
111411245024Smrgrm -f conftest.$ac_ext
111511245024SmrgAC_SUBST(RAWCPPFLAGS)
111611245024Smrg]) # XORG_PROG_RAWCPP
111741b2f0bdSmrg
111811245024Smrg# XORG_MANPAGE_SECTIONS()
111911245024Smrg# -----------------------
112011245024Smrg# Minimum version: 1.0.0
112111245024Smrg#
112211245024Smrg# Determine which sections man pages go in for the different man page types
112311245024Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
112411245024Smrg# Not sure if there's any better way than just hardcoding by OS name.
112511245024Smrg# Override default settings by setting environment variables
112611a29bacSmrg# Added MAN_SUBSTS in version 1.8
112711a29bacSmrg# Added AC_PROG_SED in version 1.8
112841b2f0bdSmrg
112911245024SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
113011245024SmrgAC_REQUIRE([AC_CANONICAL_HOST])
113111a29bacSmrgAC_REQUIRE([AC_PROG_SED])
113241b2f0bdSmrg
113311245024Smrgif test x$APP_MAN_SUFFIX = x    ; then
113411245024Smrg    APP_MAN_SUFFIX=1
113511245024Smrgfi
113611245024Smrgif test x$APP_MAN_DIR = x    ; then
113711245024Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
113811245024Smrgfi
113941b2f0bdSmrg
114011245024Smrgif test x$LIB_MAN_SUFFIX = x    ; then
114111245024Smrg    LIB_MAN_SUFFIX=3
114211245024Smrgfi
114311245024Smrgif test x$LIB_MAN_DIR = x    ; then
114411245024Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
114511245024Smrgfi
114641b2f0bdSmrg
114711245024Smrgif test x$FILE_MAN_SUFFIX = x    ; then
114811245024Smrg    case $host_os in
114911245024Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
115011245024Smrg	*)		FILE_MAN_SUFFIX=5  ;;
115111245024Smrg    esac
115211245024Smrgfi
115311245024Smrgif test x$FILE_MAN_DIR = x    ; then
115411245024Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
115511245024Smrgfi
115611245024Smrg
115711245024Smrgif test x$MISC_MAN_SUFFIX = x    ; then
115811245024Smrg    case $host_os in
115911245024Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
116011245024Smrg	*)		MISC_MAN_SUFFIX=7  ;;
116111245024Smrg    esac
116211245024Smrgfi
116311245024Smrgif test x$MISC_MAN_DIR = x    ; then
116411245024Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
116541b2f0bdSmrgfi
116641b2f0bdSmrg
116711245024Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
116811245024Smrg    case $host_os in
116911245024Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
117011245024Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
117111245024Smrg    esac
117211245024Smrgfi
117311245024Smrgif test x$DRIVER_MAN_DIR = x    ; then
117411245024Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
117511245024Smrgfi
117641b2f0bdSmrg
117711245024Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
117811245024Smrg    case $host_os in
117911245024Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
118011245024Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
118111245024Smrg    esac
118211245024Smrgfi
118311245024Smrgif test x$ADMIN_MAN_DIR = x    ; then
118411245024Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
118541b2f0bdSmrgfi
118641b2f0bdSmrg
118741b2f0bdSmrg
118811245024SmrgAC_SUBST([APP_MAN_SUFFIX])
118911245024SmrgAC_SUBST([LIB_MAN_SUFFIX])
119011245024SmrgAC_SUBST([FILE_MAN_SUFFIX])
119111245024SmrgAC_SUBST([MISC_MAN_SUFFIX])
119211245024SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
119311245024SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
119411245024SmrgAC_SUBST([APP_MAN_DIR])
119511245024SmrgAC_SUBST([LIB_MAN_DIR])
119611245024SmrgAC_SUBST([FILE_MAN_DIR])
119711245024SmrgAC_SUBST([MISC_MAN_DIR])
119811245024SmrgAC_SUBST([DRIVER_MAN_DIR])
119911245024SmrgAC_SUBST([ADMIN_MAN_DIR])
120011a29bacSmrg
120111a29bacSmrgXORG_MAN_PAGE="X Version 11"
120211a29bacSmrgAC_SUBST([XORG_MAN_PAGE])
120311a29bacSmrgMAN_SUBSTS="\
120411a29bacSmrg	-e 's|__vendorversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
120511a29bacSmrg	-e 's|__xorgversion__|\"\$(PACKAGE_STRING)\" \"\$(XORG_MAN_PAGE)\"|' \
120611a29bacSmrg	-e 's|__xservername__|Xorg|g' \
120711a29bacSmrg	-e 's|__xconfigfile__|xorg.conf|g' \
120811a29bacSmrg	-e 's|__projectroot__|\$(prefix)|g' \
120911a29bacSmrg	-e 's|__apploaddir__|\$(appdefaultdir)|g' \
121011a29bacSmrg	-e 's|__appmansuffix__|\$(APP_MAN_SUFFIX)|g' \
121111a29bacSmrg	-e 's|__drivermansuffix__|\$(DRIVER_MAN_SUFFIX)|g' \
121211a29bacSmrg	-e 's|__adminmansuffix__|\$(ADMIN_MAN_SUFFIX)|g' \
121311a29bacSmrg	-e 's|__libmansuffix__|\$(LIB_MAN_SUFFIX)|g' \
121411a29bacSmrg	-e 's|__miscmansuffix__|\$(MISC_MAN_SUFFIX)|g' \
121511a29bacSmrg	-e 's|__filemansuffix__|\$(FILE_MAN_SUFFIX)|g'"
121611a29bacSmrgAC_SUBST([MAN_SUBSTS])
121711a29bacSmrg
121811245024Smrg]) # XORG_MANPAGE_SECTIONS
121941b2f0bdSmrg
122011a29bacSmrg# XORG_CHECK_SGML_DOCTOOLS([MIN-VERSION])
122111a29bacSmrg# ------------------------
122211a29bacSmrg# Minimum version: 1.7.0
122311a29bacSmrg#
122411a29bacSmrg# Defines the variable XORG_SGML_PATH containing the location of X11/defs.ent
122511a29bacSmrg# provided by xorg-sgml-doctools, if installed.
122611a29bacSmrgAC_DEFUN([XORG_CHECK_SGML_DOCTOOLS],[
122711a29bacSmrgAC_MSG_CHECKING([for X.Org SGML entities m4_ifval([$1],[>= $1])])
122811a29bacSmrgXORG_SGML_PATH=
122911a29bacSmrgPKG_CHECK_EXISTS([xorg-sgml-doctools m4_ifval([$1],[>= $1])],
123011a29bacSmrg    [XORG_SGML_PATH=`$PKG_CONFIG --variable=sgmlrootdir xorg-sgml-doctools`],
123111a29bacSmrg    [m4_ifval([$1],[:],
123211a29bacSmrg        [if test x"$cross_compiling" != x"yes" ; then
123311a29bacSmrg            AC_CHECK_FILE([$prefix/share/sgml/X11/defs.ent],
123411a29bacSmrg                          [XORG_SGML_PATH=$prefix/share/sgml])
123511a29bacSmrg         fi])
123611a29bacSmrg    ])
123711a29bacSmrg
123811a29bacSmrg# Define variables STYLESHEET_SRCDIR and XSL_STYLESHEET containing
123911a29bacSmrg# the path and the name of the doc stylesheet
124011a29bacSmrgif test "x$XORG_SGML_PATH" != "x" ; then
124111a29bacSmrg   AC_MSG_RESULT([$XORG_SGML_PATH])
124211a29bacSmrg   STYLESHEET_SRCDIR=$XORG_SGML_PATH/X11
124311a29bacSmrg   XSL_STYLESHEET=$STYLESHEET_SRCDIR/xorg.xsl
124411a29bacSmrgelse
124511a29bacSmrg   AC_MSG_RESULT([no])
124611a29bacSmrgfi
124711a29bacSmrg
124811a29bacSmrgAC_SUBST(XORG_SGML_PATH)
124911a29bacSmrgAC_SUBST(STYLESHEET_SRCDIR)
125011a29bacSmrgAC_SUBST(XSL_STYLESHEET)
125111a29bacSmrgAM_CONDITIONAL([HAVE_STYLESHEETS], [test "x$XSL_STYLESHEET" != "x"])
125211a29bacSmrg]) # XORG_CHECK_SGML_DOCTOOLS
125311a29bacSmrg
125411245024Smrg# XORG_CHECK_LINUXDOC
125511245024Smrg# -------------------
125611245024Smrg# Minimum version: 1.0.0
125711245024Smrg#
125811245024Smrg# Defines the variable MAKE_TEXT if the necessary tools and
125911245024Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
126011245024Smrg# Whether or not the necessary tools and files are found can be checked
126111245024Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
126211245024SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
126311a29bacSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
126411a29bacSmrgAC_REQUIRE([XORG_WITH_PS2PDF])
126541b2f0bdSmrg
126611245024SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
126711245024Smrg
126811a29bacSmrgAC_MSG_CHECKING([whether to build documentation])
126941b2f0bdSmrg
127011a29bacSmrgif test x$XORG_SGML_PATH != x && test x$LINUXDOC != x ; then
127111245024Smrg   BUILDDOC=yes
127241b2f0bdSmrgelse
127311245024Smrg   BUILDDOC=no
127441b2f0bdSmrgfi
127541b2f0bdSmrg
127611245024SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
127741b2f0bdSmrg
127811245024SmrgAC_MSG_RESULT([$BUILDDOC])
127911245024Smrg
128011a29bacSmrgAC_MSG_CHECKING([whether to build pdf documentation])
128111245024Smrg
128211a29bacSmrgif test x$have_ps2pdf != xno && test x$BUILD_PDFDOC != xno; then
128311245024Smrg   BUILDPDFDOC=yes
128441b2f0bdSmrgelse
128511245024Smrg   BUILDPDFDOC=no
128641b2f0bdSmrgfi
128741b2f0bdSmrg
128811245024SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
128941b2f0bdSmrg
129011245024SmrgAC_MSG_RESULT([$BUILDPDFDOC])
129141b2f0bdSmrg
129211a29bacSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt -f"
129311245024SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
129411245024SmrgMAKE_PDF="$PS2PDF"
129511245024SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
129641b2f0bdSmrg
129711245024SmrgAC_SUBST(MAKE_TEXT)
129811245024SmrgAC_SUBST(MAKE_PS)
129911245024SmrgAC_SUBST(MAKE_PDF)
130011245024SmrgAC_SUBST(MAKE_HTML)
130111245024Smrg]) # XORG_CHECK_LINUXDOC
130241b2f0bdSmrg
130311245024Smrg# XORG_CHECK_DOCBOOK
130411245024Smrg# -------------------
130511245024Smrg# Minimum version: 1.0.0
130611245024Smrg#
130711245024Smrg# Checks for the ability to build output formats from SGML DocBook source.
130811245024Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
130911245024Smrg# indicates whether the necessary tools and files are found and, if set,
131011245024Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
131111245024SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
131211a29bacSmrgAC_REQUIRE([XORG_CHECK_SGML_DOCTOOLS])
131311a29bacSmrg
131411245024SmrgBUILDTXTDOC=no
131511245024SmrgBUILDPDFDOC=no
131611245024SmrgBUILDPSDOC=no
131711245024SmrgBUILDHTMLDOC=no
131811245024Smrg
131911245024SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
132011245024SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
132111245024SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
132211245024SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
132311245024Smrg
132411a29bacSmrgAC_MSG_CHECKING([whether to build text documentation])
132511a29bacSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKTXT != x &&
132611245024Smrg   test x$BUILD_TXTDOC != xno; then
132711245024Smrg	BUILDTXTDOC=yes
132811245024Smrgfi
132911245024SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
133011245024SmrgAC_MSG_RESULT([$BUILDTXTDOC])
133141b2f0bdSmrg
133211a29bacSmrgAC_MSG_CHECKING([whether to build PDF documentation])
133311a29bacSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPDF != x &&
133411245024Smrg   test x$BUILD_PDFDOC != xno; then
133511245024Smrg	BUILDPDFDOC=yes
133611245024Smrgfi
133711245024SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
133811245024SmrgAC_MSG_RESULT([$BUILDPDFDOC])
133941b2f0bdSmrg
134011a29bacSmrgAC_MSG_CHECKING([whether to build PostScript documentation])
134111a29bacSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKPS != x &&
134211245024Smrg   test x$BUILD_PSDOC != xno; then
134311245024Smrg	BUILDPSDOC=yes
134411245024Smrgfi
134511245024SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
134611245024SmrgAC_MSG_RESULT([$BUILDPSDOC])
134741b2f0bdSmrg
134811a29bacSmrgAC_MSG_CHECKING([whether to build HTML documentation])
134911a29bacSmrgif test x$XORG_SGML_PATH != x && test x$DOCBOOKHTML != x &&
135011245024Smrg   test x$BUILD_HTMLDOC != xno; then
135111245024Smrg	BUILDHTMLDOC=yes
135211245024Smrgfi
135311245024SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
135411245024SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
135541b2f0bdSmrg
135611245024SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
135711245024SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
135811245024SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
135911245024SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
136041b2f0bdSmrg
136111245024SmrgAC_SUBST(MAKE_TEXT)
136211245024SmrgAC_SUBST(MAKE_PS)
136311245024SmrgAC_SUBST(MAKE_PDF)
136411245024SmrgAC_SUBST(MAKE_HTML)
136511245024Smrg]) # XORG_CHECK_DOCBOOK
136641b2f0bdSmrg
136711a29bacSmrg# XORG_WITH_XMLTO([MIN-VERSION], [DEFAULT])
136811a29bacSmrg# ----------------
136911a29bacSmrg# Minimum version: 1.5.0
137011a29bacSmrg# Minimum version for optional DEFAULT argument: 1.11.0
137111a29bacSmrg#
137211a29bacSmrg# Documentation tools are not always available on all platforms and sometimes
137311a29bacSmrg# not at the appropriate level. This macro enables a module to test for the
137411a29bacSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
137511a29bacSmrg# the --with-xmlto option, it allows maximum flexibilty in making decisions
137611a29bacSmrg# as whether or not to use the xmlto package. When DEFAULT is not specified,
137711a29bacSmrg# --with-xmlto assumes 'auto'.
137811a29bacSmrg#
137911a29bacSmrg# Interface to module:
138011a29bacSmrg# HAVE_XMLTO: 	used in makefiles to conditionally generate documentation
138111a29bacSmrg# XMLTO:	returns the path of the xmlto program found
138211a29bacSmrg#		returns the path set by the user in the environment
138311a29bacSmrg# --with-xmlto:	'yes' user instructs the module to use xmlto
138411a29bacSmrg#		'no' user instructs the module not to use xmlto
138511a29bacSmrg#
138611a29bacSmrg# Added in version 1.10.0
138711a29bacSmrg# HAVE_XMLTO_TEXT: used in makefiles to conditionally generate text documentation
138811a29bacSmrg#                  xmlto for text output requires either lynx, links, or w3m browsers
138911a29bacSmrg#
139011a29bacSmrg# If the user sets the value of XMLTO, AC_PATH_PROG skips testing the path.
139111a29bacSmrg#
139211a29bacSmrgAC_DEFUN([XORG_WITH_XMLTO],[
139311a29bacSmrgAC_ARG_VAR([XMLTO], [Path to xmlto command])
139411a29bacSmrgm4_define([_defopt], m4_default([$2], [auto]))
139511a29bacSmrgAC_ARG_WITH(xmlto,
139611a29bacSmrg	AS_HELP_STRING([--with-xmlto],
139711a29bacSmrg	   [Use xmlto to regenerate documentation (default: ]_defopt[)]),
139811a29bacSmrg	   [use_xmlto=$withval], [use_xmlto=]_defopt)
139911a29bacSmrgm4_undefine([_defopt])
140011a29bacSmrg
140111a29bacSmrgif test "x$use_xmlto" = x"auto"; then
140211a29bacSmrg   AC_PATH_PROG([XMLTO], [xmlto])
140311a29bacSmrg   if test "x$XMLTO" = "x"; then
140411a29bacSmrg        AC_MSG_WARN([xmlto not found - documentation targets will be skipped])
140511a29bacSmrg	have_xmlto=no
140611a29bacSmrg   else
140711a29bacSmrg        have_xmlto=yes
140811a29bacSmrg   fi
140911a29bacSmrgelif test "x$use_xmlto" = x"yes" ; then
141011a29bacSmrg   AC_PATH_PROG([XMLTO], [xmlto])
141111a29bacSmrg   if test "x$XMLTO" = "x"; then
141211a29bacSmrg        AC_MSG_ERROR([--with-xmlto=yes specified but xmlto not found in PATH])
141311a29bacSmrg   fi
141411a29bacSmrg   have_xmlto=yes
141511a29bacSmrgelif test "x$use_xmlto" = x"no" ; then
141611a29bacSmrg   if test "x$XMLTO" != "x"; then
141711a29bacSmrg      AC_MSG_WARN([ignoring XMLTO environment variable since --with-xmlto=no was specified])
141811a29bacSmrg   fi
141911a29bacSmrg   have_xmlto=no
142011a29bacSmrgelse
142111a29bacSmrg   AC_MSG_ERROR([--with-xmlto expects 'yes' or 'no'])
142211a29bacSmrgfi
142311a29bacSmrg
142411a29bacSmrg# Test for a minimum version of xmlto, if provided.
142511a29bacSmrgm4_ifval([$1],
142611a29bacSmrg[if test "$have_xmlto" = yes; then
142711a29bacSmrg    # scrape the xmlto version
142811a29bacSmrg    AC_MSG_CHECKING([the xmlto version])
142911a29bacSmrg    xmlto_version=`$XMLTO --version 2>/dev/null | cut -d' ' -f3`
143011a29bacSmrg    AC_MSG_RESULT([$xmlto_version])
143111a29bacSmrg    AS_VERSION_COMPARE([$xmlto_version], [$1],
143211a29bacSmrg        [if test "x$use_xmlto" = xauto; then
143311a29bacSmrg            AC_MSG_WARN([xmlto version $xmlto_version found, but $1 needed])
143411a29bacSmrg            have_xmlto=no
143511a29bacSmrg        else
143611a29bacSmrg            AC_MSG_ERROR([xmlto version $xmlto_version found, but $1 needed])
143711a29bacSmrg        fi])
143811a29bacSmrgfi])
143911a29bacSmrg
144011a29bacSmrg# Test for the ability of xmlto to generate a text target
144111a29bacSmrghave_xmlto_text=no
144211a29bacSmrgcat > conftest.xml << "EOF"
144311a29bacSmrgEOF
144411a29bacSmrgAS_IF([test "$have_xmlto" = yes],
144511a29bacSmrg      [AS_IF([$XMLTO --skip-validation txt conftest.xml >/dev/null 2>&1],
144611a29bacSmrg             [have_xmlto_text=yes],
144711a29bacSmrg             [AC_MSG_WARN([xmlto cannot generate text format, this format skipped])])])
144811a29bacSmrgrm -f conftest.xml
144911a29bacSmrgAM_CONDITIONAL([HAVE_XMLTO_TEXT], [test $have_xmlto_text = yes])
145011a29bacSmrgAM_CONDITIONAL([HAVE_XMLTO], [test "$have_xmlto" = yes])
145111a29bacSmrg]) # XORG_WITH_XMLTO
145211a29bacSmrg
145311a29bacSmrg# XORG_WITH_ASCIIDOC([MIN-VERSION], [DEFAULT])
145411a29bacSmrg# ----------------
145511a29bacSmrg# Minimum version: 1.5.0
145611a29bacSmrg# Minimum version for optional DEFAULT argument: 1.11.0
145711a29bacSmrg#
145811a29bacSmrg# Documentation tools are not always available on all platforms and sometimes
145911a29bacSmrg# not at the appropriate level. This macro enables a module to test for the
146011a29bacSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
146111a29bacSmrg# the --with-asciidoc option, it allows maximum flexibilty in making decisions
146211a29bacSmrg# as whether or not to use the asciidoc package. When DEFAULT is not specified,
146311a29bacSmrg# --with-asciidoc assumes 'auto'.
146411a29bacSmrg#
146511a29bacSmrg# Interface to module:
146611a29bacSmrg# HAVE_ASCIIDOC: used in makefiles to conditionally generate documentation
146711a29bacSmrg# ASCIIDOC:	 returns the path of the asciidoc program found
146811a29bacSmrg#		 returns the path set by the user in the environment
146911a29bacSmrg# --with-asciidoc: 'yes' user instructs the module to use asciidoc
147011a29bacSmrg#		  'no' user instructs the module not to use asciidoc
147111a29bacSmrg#
147211a29bacSmrg# If the user sets the value of ASCIIDOC, AC_PATH_PROG skips testing the path.
147311a29bacSmrg#
147411a29bacSmrgAC_DEFUN([XORG_WITH_ASCIIDOC],[
147511a29bacSmrgAC_ARG_VAR([ASCIIDOC], [Path to asciidoc command])
147611a29bacSmrgm4_define([_defopt], m4_default([$2], [auto]))
147711a29bacSmrgAC_ARG_WITH(asciidoc,
147811a29bacSmrg	AS_HELP_STRING([--with-asciidoc],
147911a29bacSmrg	   [Use asciidoc to regenerate documentation (default: ]_defopt[)]),
148011a29bacSmrg	   [use_asciidoc=$withval], [use_asciidoc=]_defopt)
148111a29bacSmrgm4_undefine([_defopt])
148211a29bacSmrg
148311a29bacSmrgif test "x$use_asciidoc" = x"auto"; then
148411a29bacSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
148511a29bacSmrg   if test "x$ASCIIDOC" = "x"; then
148611a29bacSmrg        AC_MSG_WARN([asciidoc not found - documentation targets will be skipped])
148711a29bacSmrg	have_asciidoc=no
148811a29bacSmrg   else
148911a29bacSmrg        have_asciidoc=yes
149011a29bacSmrg   fi
149111a29bacSmrgelif test "x$use_asciidoc" = x"yes" ; then
149211a29bacSmrg   AC_PATH_PROG([ASCIIDOC], [asciidoc])
149311a29bacSmrg   if test "x$ASCIIDOC" = "x"; then
149411a29bacSmrg        AC_MSG_ERROR([--with-asciidoc=yes specified but asciidoc not found in PATH])
149511a29bacSmrg   fi
149611a29bacSmrg   have_asciidoc=yes
149711a29bacSmrgelif test "x$use_asciidoc" = x"no" ; then
149811a29bacSmrg   if test "x$ASCIIDOC" != "x"; then
149911a29bacSmrg      AC_MSG_WARN([ignoring ASCIIDOC environment variable since --with-asciidoc=no was specified])
150011a29bacSmrg   fi
150111a29bacSmrg   have_asciidoc=no
150211a29bacSmrgelse
150311a29bacSmrg   AC_MSG_ERROR([--with-asciidoc expects 'yes' or 'no'])
150411a29bacSmrgfi
150511a29bacSmrgm4_ifval([$1],
150611a29bacSmrg[if test "$have_asciidoc" = yes; then
150711a29bacSmrg    # scrape the asciidoc version
150811a29bacSmrg    AC_MSG_CHECKING([the asciidoc version])
150911a29bacSmrg    asciidoc_version=`$ASCIIDOC --version 2>/dev/null | cut -d' ' -f2`
151011a29bacSmrg    AC_MSG_RESULT([$asciidoc_version])
151111a29bacSmrg    AS_VERSION_COMPARE([$asciidoc_version], [$1],
151211a29bacSmrg        [if test "x$use_asciidoc" = xauto; then
151311a29bacSmrg            AC_MSG_WARN([asciidoc version $asciidoc_version found, but $1 needed])
151411a29bacSmrg            have_asciidoc=no
151511a29bacSmrg        else
151611a29bacSmrg            AC_MSG_ERROR([asciidoc version $asciidoc_version found, but $1 needed])
151711a29bacSmrg        fi])
151811a29bacSmrgfi])
151911a29bacSmrgAM_CONDITIONAL([HAVE_ASCIIDOC], [test "$have_asciidoc" = yes])
152011a29bacSmrg]) # XORG_WITH_ASCIIDOC
152111a29bacSmrg
152211a29bacSmrg# XORG_WITH_DOXYGEN([MIN-VERSION], [DEFAULT])
152311a29bacSmrg# --------------------------------
152411a29bacSmrg# Minimum version: 1.5.0
152511a29bacSmrg# Minimum version for optional DEFAULT argument: 1.11.0
152611a29bacSmrg#
152711a29bacSmrg# Documentation tools are not always available on all platforms and sometimes
152811a29bacSmrg# not at the appropriate level. This macro enables a module to test for the
152911a29bacSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
153011a29bacSmrg# the --with-doxygen option, it allows maximum flexibilty in making decisions
153111a29bacSmrg# as whether or not to use the doxygen package. When DEFAULT is not specified,
153211a29bacSmrg# --with-doxygen assumes 'auto'.
153311a29bacSmrg#
153411a29bacSmrg# Interface to module:
153511a29bacSmrg# HAVE_DOXYGEN: used in makefiles to conditionally generate documentation
153611a29bacSmrg# DOXYGEN:	 returns the path of the doxygen program found
153711a29bacSmrg#		 returns the path set by the user in the environment
153811a29bacSmrg# --with-doxygen: 'yes' user instructs the module to use doxygen
153911a29bacSmrg#		  'no' user instructs the module not to use doxygen
154011a29bacSmrg#
154111a29bacSmrg# If the user sets the value of DOXYGEN, AC_PATH_PROG skips testing the path.
154211a29bacSmrg#
154311a29bacSmrgAC_DEFUN([XORG_WITH_DOXYGEN],[
154411a29bacSmrgAC_ARG_VAR([DOXYGEN], [Path to doxygen command])
154511a29bacSmrgm4_define([_defopt], m4_default([$2], [auto]))
154611a29bacSmrgAC_ARG_WITH(doxygen,
154711a29bacSmrg	AS_HELP_STRING([--with-doxygen],
154811a29bacSmrg	   [Use doxygen to regenerate documentation (default: ]_defopt[)]),
154911a29bacSmrg	   [use_doxygen=$withval], [use_doxygen=]_defopt)
155011a29bacSmrgm4_undefine([_defopt])
155111a29bacSmrg
155211a29bacSmrgif test "x$use_doxygen" = x"auto"; then
155311a29bacSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
155411a29bacSmrg   if test "x$DOXYGEN" = "x"; then
155511a29bacSmrg        AC_MSG_WARN([doxygen not found - documentation targets will be skipped])
155611a29bacSmrg	have_doxygen=no
155711a29bacSmrg   else
155811a29bacSmrg        have_doxygen=yes
155911a29bacSmrg   fi
156011a29bacSmrgelif test "x$use_doxygen" = x"yes" ; then
156111a29bacSmrg   AC_PATH_PROG([DOXYGEN], [doxygen])
156211a29bacSmrg   if test "x$DOXYGEN" = "x"; then
156311a29bacSmrg        AC_MSG_ERROR([--with-doxygen=yes specified but doxygen not found in PATH])
156411a29bacSmrg   fi
156511a29bacSmrg   have_doxygen=yes
156611a29bacSmrgelif test "x$use_doxygen" = x"no" ; then
156711a29bacSmrg   if test "x$DOXYGEN" != "x"; then
156811a29bacSmrg      AC_MSG_WARN([ignoring DOXYGEN environment variable since --with-doxygen=no was specified])
156911a29bacSmrg   fi
157011a29bacSmrg   have_doxygen=no
157111a29bacSmrgelse
157211a29bacSmrg   AC_MSG_ERROR([--with-doxygen expects 'yes' or 'no'])
157311a29bacSmrgfi
157411a29bacSmrgm4_ifval([$1],
157511a29bacSmrg[if test "$have_doxygen" = yes; then
157611a29bacSmrg    # scrape the doxygen version
157711a29bacSmrg    AC_MSG_CHECKING([the doxygen version])
157811a29bacSmrg    doxygen_version=`$DOXYGEN --version 2>/dev/null`
157911a29bacSmrg    AC_MSG_RESULT([$doxygen_version])
158011a29bacSmrg    AS_VERSION_COMPARE([$doxygen_version], [$1],
158111a29bacSmrg        [if test "x$use_doxygen" = xauto; then
158211a29bacSmrg            AC_MSG_WARN([doxygen version $doxygen_version found, but $1 needed])
158311a29bacSmrg            have_doxygen=no
158411a29bacSmrg        else
158511a29bacSmrg            AC_MSG_ERROR([doxygen version $doxygen_version found, but $1 needed])
158611a29bacSmrg        fi])
158711a29bacSmrgfi])
158811a29bacSmrgAM_CONDITIONAL([HAVE_DOXYGEN], [test "$have_doxygen" = yes])
158911a29bacSmrg]) # XORG_WITH_DOXYGEN
159011a29bacSmrg
159111a29bacSmrg# XORG_WITH_GROFF([DEFAULT])
159211a29bacSmrg# ----------------
159311a29bacSmrg# Minimum version: 1.6.0
159411a29bacSmrg# Minimum version for optional DEFAULT argument: 1.11.0
159511a29bacSmrg#
159611a29bacSmrg# Documentation tools are not always available on all platforms and sometimes
159711a29bacSmrg# not at the appropriate level. This macro enables a module to test for the
159811a29bacSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
159911a29bacSmrg# the --with-groff option, it allows maximum flexibilty in making decisions
160011a29bacSmrg# as whether or not to use the groff package. When DEFAULT is not specified,
160111a29bacSmrg# --with-groff assumes 'auto'.
160211a29bacSmrg#
160311a29bacSmrg# Interface to module:
160411a29bacSmrg# HAVE_GROFF:	 used in makefiles to conditionally generate documentation
160511a29bacSmrg# HAVE_GROFF_MM: the memorandum macros (-mm) package
160611a29bacSmrg# HAVE_GROFF_MS: the -ms macros package
160711a29bacSmrg# GROFF:	 returns the path of the groff program found
160811a29bacSmrg#		 returns the path set by the user in the environment
160911a29bacSmrg# --with-groff:	 'yes' user instructs the module to use groff
161011a29bacSmrg#		 'no' user instructs the module not to use groff
161111a29bacSmrg#
161211a29bacSmrg# Added in version 1.9.0:
161311a29bacSmrg# HAVE_GROFF_HTML: groff has dependencies to output HTML format:
161411a29bacSmrg#		   pnmcut pnmcrop pnmtopng pnmtops from the netpbm package.
161511a29bacSmrg#		   psselect from the psutils package.
161611a29bacSmrg#		   the ghostcript package. Refer to the grohtml man pages
161711a29bacSmrg#
161811a29bacSmrg# If the user sets the value of GROFF, AC_PATH_PROG skips testing the path.
161911a29bacSmrg#
162011a29bacSmrg# OS and distros often splits groff in a basic and full package, the former
162111a29bacSmrg# having the groff program and the later having devices, fonts and macros
162211a29bacSmrg# Checking for the groff executable is not enough.
162311a29bacSmrg#
162411a29bacSmrg# If macros are missing, we cannot assume that groff is useless, so we don't
162511a29bacSmrg# unset HAVE_GROFF or GROFF env variables.
162611a29bacSmrg# HAVE_GROFF_?? can never be true while HAVE_GROFF is false.
162711a29bacSmrg#
162811a29bacSmrgAC_DEFUN([XORG_WITH_GROFF],[
162911a29bacSmrgAC_ARG_VAR([GROFF], [Path to groff command])
163011a29bacSmrgm4_define([_defopt], m4_default([$1], [auto]))
163111a29bacSmrgAC_ARG_WITH(groff,
163211a29bacSmrg	AS_HELP_STRING([--with-groff],
163311a29bacSmrg	   [Use groff to regenerate documentation (default: ]_defopt[)]),
163411a29bacSmrg	   [use_groff=$withval], [use_groff=]_defopt)
163511a29bacSmrgm4_undefine([_defopt])
163611a29bacSmrg
163711a29bacSmrgif test "x$use_groff" = x"auto"; then
163811a29bacSmrg   AC_PATH_PROG([GROFF], [groff])
163911a29bacSmrg   if test "x$GROFF" = "x"; then
164011a29bacSmrg        AC_MSG_WARN([groff not found - documentation targets will be skipped])
164111a29bacSmrg	have_groff=no
164211a29bacSmrg   else
164311a29bacSmrg        have_groff=yes
164411a29bacSmrg   fi
164511a29bacSmrgelif test "x$use_groff" = x"yes" ; then
164611a29bacSmrg   AC_PATH_PROG([GROFF], [groff])
164711a29bacSmrg   if test "x$GROFF" = "x"; then
164811a29bacSmrg        AC_MSG_ERROR([--with-groff=yes specified but groff not found in PATH])
164911a29bacSmrg   fi
165011a29bacSmrg   have_groff=yes
165111a29bacSmrgelif test "x$use_groff" = x"no" ; then
165211a29bacSmrg   if test "x$GROFF" != "x"; then
165311a29bacSmrg      AC_MSG_WARN([ignoring GROFF environment variable since --with-groff=no was specified])
165411a29bacSmrg   fi
165511a29bacSmrg   have_groff=no
165611a29bacSmrgelse
165711a29bacSmrg   AC_MSG_ERROR([--with-groff expects 'yes' or 'no'])
165811a29bacSmrgfi
165911a29bacSmrg
166011a29bacSmrg# We have groff, test for the presence of the macro packages
166111a29bacSmrgif test "x$have_groff" = x"yes"; then
166211a29bacSmrg    AC_MSG_CHECKING([for ${GROFF} -ms macros])
166311a29bacSmrg    if ${GROFF} -ms -I. /dev/null >/dev/null 2>&1 ; then
166411a29bacSmrg        groff_ms_works=yes
166511a29bacSmrg    else
166611a29bacSmrg        groff_ms_works=no
166711a29bacSmrg    fi
166811a29bacSmrg    AC_MSG_RESULT([$groff_ms_works])
166911a29bacSmrg    AC_MSG_CHECKING([for ${GROFF} -mm macros])
167011a29bacSmrg    if ${GROFF} -mm -I. /dev/null >/dev/null 2>&1 ; then
167111a29bacSmrg        groff_mm_works=yes
167211a29bacSmrg    else
167311a29bacSmrg        groff_mm_works=no
167411a29bacSmrg    fi
167511a29bacSmrg    AC_MSG_RESULT([$groff_mm_works])
167611a29bacSmrgfi
167711a29bacSmrg
167811a29bacSmrg# We have groff, test for HTML dependencies, one command per package
167911a29bacSmrgif test "x$have_groff" = x"yes"; then
168011a29bacSmrg   AC_PATH_PROGS(GS_PATH, [gs gswin32c])
168111a29bacSmrg   AC_PATH_PROG(PNMTOPNG_PATH, [pnmtopng])
168211a29bacSmrg   AC_PATH_PROG(PSSELECT_PATH, [psselect])
168311a29bacSmrg   if test "x$GS_PATH" != "x" -a "x$PNMTOPNG_PATH" != "x" -a "x$PSSELECT_PATH" != "x"; then
168411a29bacSmrg      have_groff_html=yes
168511a29bacSmrg   else
168611a29bacSmrg      have_groff_html=no
168711a29bacSmrg      AC_MSG_WARN([grohtml dependencies not found - HTML Documentation skipped. Refer to grohtml man pages])
168811a29bacSmrg   fi
168911a29bacSmrgfi
169011a29bacSmrg
169111a29bacSmrg# Set Automake conditionals for Makefiles
169211a29bacSmrgAM_CONDITIONAL([HAVE_GROFF], [test "$have_groff" = yes])
169311a29bacSmrgAM_CONDITIONAL([HAVE_GROFF_MS], [test "$groff_ms_works" = yes])
169411a29bacSmrgAM_CONDITIONAL([HAVE_GROFF_MM], [test "$groff_mm_works" = yes])
169511a29bacSmrgAM_CONDITIONAL([HAVE_GROFF_HTML], [test "$have_groff_html" = yes])
169611a29bacSmrg]) # XORG_WITH_GROFF
169711a29bacSmrg
169811a29bacSmrg# XORG_WITH_FOP([DEFAULT])
169911a29bacSmrg# ----------------
170011a29bacSmrg# Minimum version: 1.6.0
170111a29bacSmrg# Minimum version for optional DEFAULT argument: 1.11.0
170211a29bacSmrg#
170311a29bacSmrg# Documentation tools are not always available on all platforms and sometimes
170411a29bacSmrg# not at the appropriate level. This macro enables a module to test for the
170511a29bacSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
170611a29bacSmrg# the --with-fop option, it allows maximum flexibilty in making decisions
170711a29bacSmrg# as whether or not to use the fop package. When DEFAULT is not specified,
170811a29bacSmrg# --with-fop assumes 'auto'.
170911a29bacSmrg#
171011a29bacSmrg# Interface to module:
171111a29bacSmrg# HAVE_FOP: 	used in makefiles to conditionally generate documentation
171211a29bacSmrg# FOP:	 	returns the path of the fop program found
171311a29bacSmrg#		returns the path set by the user in the environment
171411a29bacSmrg# --with-fop: 	'yes' user instructs the module to use fop
171511a29bacSmrg#		'no' user instructs the module not to use fop
171611a29bacSmrg#
171711a29bacSmrg# If the user sets the value of FOP, AC_PATH_PROG skips testing the path.
171811a29bacSmrg#
171911a29bacSmrgAC_DEFUN([XORG_WITH_FOP],[
172011a29bacSmrgAC_ARG_VAR([FOP], [Path to fop command])
172111a29bacSmrgm4_define([_defopt], m4_default([$1], [auto]))
172211a29bacSmrgAC_ARG_WITH(fop,
172311a29bacSmrg	AS_HELP_STRING([--with-fop],
172411a29bacSmrg	   [Use fop to regenerate documentation (default: ]_defopt[)]),
172511a29bacSmrg	   [use_fop=$withval], [use_fop=]_defopt)
172611a29bacSmrgm4_undefine([_defopt])
172711a29bacSmrg
172811a29bacSmrgif test "x$use_fop" = x"auto"; then
172911a29bacSmrg   AC_PATH_PROG([FOP], [fop])
173011a29bacSmrg   if test "x$FOP" = "x"; then
173111a29bacSmrg        AC_MSG_WARN([fop not found - documentation targets will be skipped])
173211a29bacSmrg	have_fop=no
173311a29bacSmrg   else
173411a29bacSmrg        have_fop=yes
173511a29bacSmrg   fi
173611a29bacSmrgelif test "x$use_fop" = x"yes" ; then
173711a29bacSmrg   AC_PATH_PROG([FOP], [fop])
173811a29bacSmrg   if test "x$FOP" = "x"; then
173911a29bacSmrg        AC_MSG_ERROR([--with-fop=yes specified but fop not found in PATH])
174011a29bacSmrg   fi
174111a29bacSmrg   have_fop=yes
174211a29bacSmrgelif test "x$use_fop" = x"no" ; then
174311a29bacSmrg   if test "x$FOP" != "x"; then
174411a29bacSmrg      AC_MSG_WARN([ignoring FOP environment variable since --with-fop=no was specified])
174511a29bacSmrg   fi
174611a29bacSmrg   have_fop=no
174711a29bacSmrgelse
174811a29bacSmrg   AC_MSG_ERROR([--with-fop expects 'yes' or 'no'])
174911a29bacSmrgfi
175011a29bacSmrgAM_CONDITIONAL([HAVE_FOP], [test "$have_fop" = yes])
175111a29bacSmrg]) # XORG_WITH_FOP
175211a29bacSmrg
175311a29bacSmrg# XORG_WITH_PS2PDF([DEFAULT])
175411a29bacSmrg# ----------------
175511a29bacSmrg# Minimum version: 1.6.0
175611a29bacSmrg# Minimum version for optional DEFAULT argument: 1.11.0
175711a29bacSmrg#
175811a29bacSmrg# Documentation tools are not always available on all platforms and sometimes
175911a29bacSmrg# not at the appropriate level. This macro enables a module to test for the
176011a29bacSmrg# presence of the tool and obtain it's path in separate variables. Coupled with
176111a29bacSmrg# the --with-ps2pdf option, it allows maximum flexibilty in making decisions
176211a29bacSmrg# as whether or not to use the ps2pdf package. When DEFAULT is not specified,
176311a29bacSmrg# --with-ps2pdf assumes 'auto'.
176411a29bacSmrg#
176511a29bacSmrg# Interface to module:
176611a29bacSmrg# HAVE_PS2PDF: 	used in makefiles to conditionally generate documentation
176711a29bacSmrg# PS2PDF:	returns the path of the ps2pdf program found
176811a29bacSmrg#		returns the path set by the user in the environment
176911a29bacSmrg# --with-ps2pdf: 'yes' user instructs the module to use ps2pdf
177011a29bacSmrg#		 'no' user instructs the module not to use ps2pdf
177111a29bacSmrg#
177211a29bacSmrg# If the user sets the value of PS2PDF, AC_PATH_PROG skips testing the path.
177311a29bacSmrg#
177411a29bacSmrgAC_DEFUN([XORG_WITH_PS2PDF],[
177511a29bacSmrgAC_ARG_VAR([PS2PDF], [Path to ps2pdf command])
177611a29bacSmrgm4_define([_defopt], m4_default([$1], [auto]))
177711a29bacSmrgAC_ARG_WITH(ps2pdf,
177811a29bacSmrg	AS_HELP_STRING([--with-ps2pdf],
177911a29bacSmrg	   [Use ps2pdf to regenerate documentation (default: ]_defopt[)]),
178011a29bacSmrg	   [use_ps2pdf=$withval], [use_ps2pdf=]_defopt)
178111a29bacSmrgm4_undefine([_defopt])
178211a29bacSmrg
178311a29bacSmrgif test "x$use_ps2pdf" = x"auto"; then
178411a29bacSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
178511a29bacSmrg   if test "x$PS2PDF" = "x"; then
178611a29bacSmrg        AC_MSG_WARN([ps2pdf not found - documentation targets will be skipped])
178711a29bacSmrg	have_ps2pdf=no
178811a29bacSmrg   else
178911a29bacSmrg        have_ps2pdf=yes
179011a29bacSmrg   fi
179111a29bacSmrgelif test "x$use_ps2pdf" = x"yes" ; then
179211a29bacSmrg   AC_PATH_PROG([PS2PDF], [ps2pdf])
179311a29bacSmrg   if test "x$PS2PDF" = "x"; then
179411a29bacSmrg        AC_MSG_ERROR([--with-ps2pdf=yes specified but ps2pdf not found in PATH])
179511a29bacSmrg   fi
179611a29bacSmrg   have_ps2pdf=yes
179711a29bacSmrgelif test "x$use_ps2pdf" = x"no" ; then
179811a29bacSmrg   if test "x$PS2PDF" != "x"; then
179911a29bacSmrg      AC_MSG_WARN([ignoring PS2PDF environment variable since --with-ps2pdf=no was specified])
180011a29bacSmrg   fi
180111a29bacSmrg   have_ps2pdf=no
180211a29bacSmrgelse
180311a29bacSmrg   AC_MSG_ERROR([--with-ps2pdf expects 'yes' or 'no'])
180411a29bacSmrgfi
180511a29bacSmrgAM_CONDITIONAL([HAVE_PS2PDF], [test "$have_ps2pdf" = yes])
180611a29bacSmrg]) # XORG_WITH_PS2PDF
180711a29bacSmrg
180811a29bacSmrg# XORG_ENABLE_DOCS (enable_docs=yes)
180911a29bacSmrg# ----------------
181011a29bacSmrg# Minimum version: 1.6.0
181111a29bacSmrg#
181211a29bacSmrg# Documentation tools are not always available on all platforms and sometimes
181311a29bacSmrg# not at the appropriate level. This macro enables a builder to skip all
181411a29bacSmrg# documentation targets except traditional man pages.
181511a29bacSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
181611a29bacSmrg# maximum flexibilty in controlling documentation building.
181711a29bacSmrg# Refer to:
181811a29bacSmrg# XORG_WITH_XMLTO         --with-xmlto
181911a29bacSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
182011a29bacSmrg# XORG_WITH_DOXYGEN       --with-doxygen
182111a29bacSmrg# XORG_WITH_FOP           --with-fop
182211a29bacSmrg# XORG_WITH_GROFF         --with-groff
182311a29bacSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
182411a29bacSmrg#
182511a29bacSmrg# Interface to module:
182611a29bacSmrg# ENABLE_DOCS: 	  used in makefiles to conditionally generate documentation
182711a29bacSmrg# --enable-docs: 'yes' user instructs the module to generate docs
182811a29bacSmrg#		 'no' user instructs the module not to generate docs
182911a29bacSmrg# parm1:	specify the default value, yes or no.
183011a29bacSmrg#
183111a29bacSmrgAC_DEFUN([XORG_ENABLE_DOCS],[
183211a29bacSmrgm4_define([docs_default], m4_default([$1], [yes]))
183311a29bacSmrgAC_ARG_ENABLE(docs,
183411a29bacSmrg	AS_HELP_STRING([--enable-docs],
183511a29bacSmrg	   [Enable building the documentation (default: ]docs_default[)]),
183611a29bacSmrg	   [build_docs=$enableval], [build_docs=]docs_default)
183711a29bacSmrgm4_undefine([docs_default])
183811a29bacSmrgAM_CONDITIONAL(ENABLE_DOCS, [test x$build_docs = xyes])
183911a29bacSmrgAC_MSG_CHECKING([whether to build documentation])
184011a29bacSmrgAC_MSG_RESULT([$build_docs])
184111a29bacSmrg]) # XORG_ENABLE_DOCS
184211a29bacSmrg
184311a29bacSmrg# XORG_ENABLE_DEVEL_DOCS (enable_devel_docs=yes)
184411a29bacSmrg# ----------------
184511a29bacSmrg# Minimum version: 1.6.0
184611a29bacSmrg#
184711a29bacSmrg# This macro enables a builder to skip all developer documentation.
184811a29bacSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
184911a29bacSmrg# maximum flexibilty in controlling documentation building.
185011a29bacSmrg# Refer to:
185111a29bacSmrg# XORG_WITH_XMLTO         --with-xmlto
185211a29bacSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
185311a29bacSmrg# XORG_WITH_DOXYGEN       --with-doxygen
185411a29bacSmrg# XORG_WITH_FOP           --with-fop
185511a29bacSmrg# XORG_WITH_GROFF         --with-groff
185611a29bacSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
185711a29bacSmrg#
185811a29bacSmrg# Interface to module:
185911a29bacSmrg# ENABLE_DEVEL_DOCS:	used in makefiles to conditionally generate developer docs
186011a29bacSmrg# --enable-devel-docs:	'yes' user instructs the module to generate developer docs
186111a29bacSmrg#			'no' user instructs the module not to generate developer docs
186211a29bacSmrg# parm1:		specify the default value, yes or no.
186311a29bacSmrg#
186411a29bacSmrgAC_DEFUN([XORG_ENABLE_DEVEL_DOCS],[
186511a29bacSmrgm4_define([devel_default], m4_default([$1], [yes]))
186611a29bacSmrgAC_ARG_ENABLE(devel-docs,
186711a29bacSmrg	AS_HELP_STRING([--enable-devel-docs],
186811a29bacSmrg	   [Enable building the developer documentation (default: ]devel_default[)]),
186911a29bacSmrg	   [build_devel_docs=$enableval], [build_devel_docs=]devel_default)
187011a29bacSmrgm4_undefine([devel_default])
187111a29bacSmrgAM_CONDITIONAL(ENABLE_DEVEL_DOCS, [test x$build_devel_docs = xyes])
187211a29bacSmrgAC_MSG_CHECKING([whether to build developer documentation])
187311a29bacSmrgAC_MSG_RESULT([$build_devel_docs])
187411a29bacSmrg]) # XORG_ENABLE_DEVEL_DOCS
187511a29bacSmrg
187611a29bacSmrg# XORG_ENABLE_SPECS (enable_specs=yes)
187711a29bacSmrg# ----------------
187811a29bacSmrg# Minimum version: 1.6.0
187911a29bacSmrg#
188011a29bacSmrg# This macro enables a builder to skip all functional specification targets.
188111a29bacSmrg# Combined with the specific tool checking macros XORG_WITH_*, it provides
188211a29bacSmrg# maximum flexibilty in controlling documentation building.
188311a29bacSmrg# Refer to:
188411a29bacSmrg# XORG_WITH_XMLTO         --with-xmlto
188511a29bacSmrg# XORG_WITH_ASCIIDOC      --with-asciidoc
188611a29bacSmrg# XORG_WITH_DOXYGEN       --with-doxygen
188711a29bacSmrg# XORG_WITH_FOP           --with-fop
188811a29bacSmrg# XORG_WITH_GROFF         --with-groff
188911a29bacSmrg# XORG_WITH_PS2PDF        --with-ps2pdf
189011a29bacSmrg#
189111a29bacSmrg# Interface to module:
189211a29bacSmrg# ENABLE_SPECS:		used in makefiles to conditionally generate specs
189311a29bacSmrg# --enable-specs:	'yes' user instructs the module to generate specs
189411a29bacSmrg#			'no' user instructs the module not to generate specs
189511a29bacSmrg# parm1:		specify the default value, yes or no.
189611a29bacSmrg#
189711a29bacSmrgAC_DEFUN([XORG_ENABLE_SPECS],[
189811a29bacSmrgm4_define([spec_default], m4_default([$1], [yes]))
189911a29bacSmrgAC_ARG_ENABLE(specs,
190011a29bacSmrg	AS_HELP_STRING([--enable-specs],
190111a29bacSmrg	   [Enable building the specs (default: ]spec_default[)]),
190211a29bacSmrg	   [build_specs=$enableval], [build_specs=]spec_default)
190311a29bacSmrgm4_undefine([spec_default])
190411a29bacSmrgAM_CONDITIONAL(ENABLE_SPECS, [test x$build_specs = xyes])
190511a29bacSmrgAC_MSG_CHECKING([whether to build functional specifications])
190611a29bacSmrgAC_MSG_RESULT([$build_specs])
190711a29bacSmrg]) # XORG_ENABLE_SPECS
190811a29bacSmrg
190911245024Smrg# XORG_CHECK_MALLOC_ZERO
191011245024Smrg# ----------------------
191111245024Smrg# Minimum version: 1.0.0
191211245024Smrg#
191311245024Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
191411245024Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
191511245024Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
191611245024SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
191711245024SmrgAC_ARG_ENABLE(malloc0returnsnull,
191811245024Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
191911245024Smrg		       [malloc(0) returns NULL (default: auto)]),
192011245024Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
192111245024Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
192241b2f0bdSmrg
192311245024SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
192411245024Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
192511245024Smrg	AC_RUN_IFELSE([
192611245024Smrgchar *malloc();
192711245024Smrgchar *realloc();
192811245024Smrgchar *calloc();
192911245024Smrgmain() {
193011245024Smrg    char *m0, *r0, *c0, *p;
193111245024Smrg    m0 = malloc(0);
193211245024Smrg    p = malloc(10);
193311245024Smrg    r0 = realloc(p,0);
193411245024Smrg    c0 = calloc(0);
193511245024Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
193611245024Smrg}],
193711245024Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
193811a29bacSmrg		[MALLOC_ZERO_RETURNS_NULL=no],
193911a29bacSmrg		[MALLOC_ZERO_RETURNS_NULL=yes])
194011245024Smrgfi
194111245024SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
194241b2f0bdSmrg
194311245024Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
194411245024Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
194511245024Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
194611245024Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
194711245024Smrgelse
194811245024Smrg	MALLOC_ZERO_CFLAGS=""
194911245024Smrg	XMALLOC_ZERO_CFLAGS=""
195011245024Smrg	XTMALLOC_ZERO_CFLAGS=""
195111245024Smrgfi
195241b2f0bdSmrg
195311245024SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
195411245024SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
195511245024SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
195611245024Smrg]) # XORG_CHECK_MALLOC_ZERO
195741b2f0bdSmrg
195811245024Smrg# XORG_WITH_LINT()
195911245024Smrg# ----------------
196011245024Smrg# Minimum version: 1.1.0
196111245024Smrg#
196211a29bacSmrg# This macro enables the use of a tool that flags some suspicious and
196311a29bacSmrg# non-portable constructs (likely to be bugs) in C language source code.
196411a29bacSmrg# It will attempt to locate the tool and use appropriate options.
196511a29bacSmrg# There are various lint type tools on different platforms.
196611a29bacSmrg#
196711a29bacSmrg# Interface to module:
196811a29bacSmrg# LINT:		returns the path to the tool found on the platform
196911a29bacSmrg#		or the value set to LINT on the configure cmd line
197011a29bacSmrg#		also an Automake conditional
197111a29bacSmrg# LINT_FLAGS:	an Automake variable with appropriate flags
197211a29bacSmrg#
197311a29bacSmrg# --with-lint:	'yes' user instructs the module to use lint
197411a29bacSmrg#		'no' user instructs the module not to use lint (default)
197511a29bacSmrg#
197611a29bacSmrg# If the user sets the value of LINT, AC_PATH_PROG skips testing the path.
197711a29bacSmrg# If the user sets the value of LINT_FLAGS, they are used verbatim.
197811245024Smrg#
197911245024SmrgAC_DEFUN([XORG_WITH_LINT],[
198011245024Smrg
198111a29bacSmrgAC_ARG_VAR([LINT], [Path to a lint-style command])
198211a29bacSmrgAC_ARG_VAR([LINT_FLAGS], [Flags for the lint-style command])
198311245024SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
198411245024Smrg		[Use a lint-style source code checker (default: disabled)])],
198511245024Smrg		[use_lint=$withval], [use_lint=no])
198611a29bacSmrg
198711a29bacSmrg# Obtain platform specific info like program name and options
198811a29bacSmrg# The lint program on FreeBSD and NetBSD is different from the one on Solaris
198911a29bacSmrgcase $host_os in
199011a29bacSmrg  *linux* | *openbsd* | kfreebsd*-gnu | darwin* | cygwin*)
199111a29bacSmrg	lint_name=splint
199211a29bacSmrg	lint_options="-badflag"
199311a29bacSmrg	;;
199411a29bacSmrg  *freebsd* | *netbsd*)
199511a29bacSmrg	lint_name=lint
199611a29bacSmrg	lint_options="-u -b"
199711a29bacSmrg	;;
199811a29bacSmrg  *solaris*)
199911a29bacSmrg	lint_name=lint
200011a29bacSmrg	lint_options="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
200111a29bacSmrg	;;
200211a29bacSmrgesac
200311a29bacSmrg
200411a29bacSmrg# Test for the presence of the program (either guessed by the code or spelled out by the user)
200511a29bacSmrgif test "x$use_lint" = x"yes" ; then
200611a29bacSmrg   AC_PATH_PROG([LINT], [$lint_name])
200711a29bacSmrg   if test "x$LINT" = "x"; then
200811a29bacSmrg        AC_MSG_ERROR([--with-lint=yes specified but lint-style tool not found in PATH])
200911a29bacSmrg   fi
201011a29bacSmrgelif test "x$use_lint" = x"no" ; then
201111a29bacSmrg   if test "x$LINT" != "x"; then
201211a29bacSmrg      AC_MSG_WARN([ignoring LINT environment variable since --with-lint=no was specified])
201311a29bacSmrg   fi
201411245024Smrgelse
201511a29bacSmrg   AC_MSG_ERROR([--with-lint expects 'yes' or 'no'. Use LINT variable to specify path.])
201611245024Smrgfi
201711a29bacSmrg
201811a29bacSmrg# User supplied flags override default flags
201911a29bacSmrgif test "x$LINT_FLAGS" != "x"; then
202011a29bacSmrg   lint_options=$LINT_FLAGS
202111245024Smrgfi
202241b2f0bdSmrg
202311a29bacSmrgAC_SUBST([LINT_FLAGS],[$lint_options])
202411a29bacSmrgAM_CONDITIONAL(LINT, [test "x$LINT" != x])
202541b2f0bdSmrg
202611245024Smrg]) # XORG_WITH_LINT
202741b2f0bdSmrg
202811245024Smrg# XORG_LINT_LIBRARY(LIBNAME)
202911245024Smrg# --------------------------
203011245024Smrg# Minimum version: 1.1.0
203111245024Smrg#
203211245024Smrg# Sets up flags for building lint libraries for checking programs that call
203311245024Smrg# functions in the library.
203411245024Smrg#
203511a29bacSmrg# Interface to module:
203611a29bacSmrg# LINTLIB		- Automake variable with the name of lint library file to make
203711a29bacSmrg# MAKE_LINT_LIB		- Automake conditional
203811a29bacSmrg#
203911a29bacSmrg# --enable-lint-library:  - 'yes' user instructs the module to created a lint library
204011a29bacSmrg#			  - 'no' user instructs the module not to create a lint library (default)
204141b2f0bdSmrg
204211245024SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
204311245024SmrgAC_REQUIRE([XORG_WITH_LINT])
204411245024SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
204511245024Smrg	[Create lint library (default: disabled)])],
204611245024Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
204711a29bacSmrg
204811a29bacSmrgif test "x$make_lint_lib" = x"yes" ; then
204911a29bacSmrg   LINTLIB=llib-l$1.ln
205011a29bacSmrg   if test "x$LINT" = "x"; then
205111a29bacSmrg        AC_MSG_ERROR([Cannot make lint library without --with-lint])
205211a29bacSmrg   fi
205311a29bacSmrgelif test "x$make_lint_lib" != x"no" ; then
205411a29bacSmrg   AC_MSG_ERROR([--enable-lint-library expects 'yes' or 'no'.])
205511245024Smrgfi
205611a29bacSmrg
205711245024SmrgAC_SUBST(LINTLIB)
205811245024SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
205911245024Smrg
206011245024Smrg]) # XORG_LINT_LIBRARY
206111245024Smrg
206211245024Smrg# XORG_CWARNFLAGS
206311245024Smrg# ---------------
206411245024Smrg# Minimum version: 1.2.0
206511245024Smrg#
206611245024Smrg# Defines CWARNFLAGS to enable C compiler warnings.
206711245024Smrg#
206811245024SmrgAC_DEFUN([XORG_CWARNFLAGS], [
206911a29bacSmrgAC_REQUIRE([AC_PROG_CC_C99])
207011245024Smrgif  test "x$GCC" = xyes ; then
207111245024Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
207211245024Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
207311a29bacSmrg-Wbad-function-cast -Wformat=2"
207411245024Smrg    case `$CC -dumpversion` in
207511245024Smrg    3.4.* | 4.*)
207611245024Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
207711245024Smrg	;;
207841b2f0bdSmrg    esac
207911245024Smrgelse
208011245024Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
208111245024Smrg    if test "x$SUNCC" = "xyes"; then
208211245024Smrg	CWARNFLAGS="-v"
208311245024Smrg    fi
208411245024Smrgfi
208511245024SmrgAC_SUBST(CWARNFLAGS)
208611245024Smrg]) # XORG_CWARNFLAGS
208741b2f0bdSmrg
208811245024Smrg# XORG_STRICT_OPTION
208911245024Smrg# -----------------------
209011245024Smrg# Minimum version: 1.3.0
209111245024Smrg#
209211245024Smrg# Add configure option to enable strict compilation
209311245024SmrgAC_DEFUN([XORG_STRICT_OPTION], [
209411a29bacSmrg# If the module's configure.ac calls AC_PROG_CC later on, CC gets set to C89
209511245024SmrgAC_REQUIRE([AC_PROG_CC_C99])
209611245024SmrgAC_REQUIRE([XORG_CWARNFLAGS])
209711245024Smrg
209811245024SmrgAC_ARG_ENABLE(strict-compilation,
209911245024Smrg			  AS_HELP_STRING([--enable-strict-compilation],
210011245024Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
210111245024Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
210211245024Smrgif test "x$STRICT_COMPILE" = "xyes"; then
210311245024Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
210411245024Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
210511245024Smrg	if test "x$GCC" = xyes ; then
210611245024Smrg		STRICT_CFLAGS="-pedantic -Werror"
210711245024Smrg	elif test "x$SUNCC" = "xyes"; then
210811245024Smrg		STRICT_CFLAGS="-errwarn"
210911245024Smrg    elif test "x$INTELCC" = "xyes"; then
211011245024Smrg		STRICT_CFLAGS="-Werror"
211111245024Smrg	fi
211211245024Smrgfi
211311245024SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
211411245024SmrgAC_SUBST([CWARNFLAGS])
211511245024Smrg]) # XORG_STRICT_OPTION
211641b2f0bdSmrg
211711245024Smrg# XORG_DEFAULT_OPTIONS
211811245024Smrg# --------------------
211911245024Smrg# Minimum version: 1.3.0
212011245024Smrg#
212111245024Smrg# Defines default options for X.Org modules.
212211245024Smrg#
212311245024SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
212411a29bacSmrgAC_REQUIRE([AC_PROG_INSTALL])
212511245024SmrgXORG_CWARNFLAGS
212611245024SmrgXORG_STRICT_OPTION
212711245024SmrgXORG_RELEASE_VERSION
212811245024SmrgXORG_CHANGELOG
212911a29bacSmrgXORG_INSTALL
213011245024SmrgXORG_MANPAGE_SECTIONS
213111a29bacSmrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])],
213211a29bacSmrg    [AC_SUBST([AM_DEFAULT_VERBOSITY], [1])])
213311245024Smrg]) # XORG_DEFAULT_OPTIONS
213411a29bacSmrg
213511a29bacSmrg# XORG_INSTALL()
213611a29bacSmrg# ----------------
213711a29bacSmrg# Minimum version: 1.4.0
213811a29bacSmrg#
213911a29bacSmrg# Defines the variable INSTALL_CMD as the command to copy
214011a29bacSmrg# INSTALL from $prefix/share/util-macros.
214111a29bacSmrg#
214211a29bacSmrgAC_DEFUN([XORG_INSTALL], [
214311a29bacSmrgAC_REQUIRE([PKG_PROG_PKG_CONFIG])
214411a29bacSmrgmacros_datadir=`$PKG_CONFIG --print-errors --variable=pkgdatadir xorg-macros`
214511a29bacSmrgINSTALL_CMD="(cp -f "$macros_datadir/INSTALL" \$(top_srcdir)/.INSTALL.tmp && \
214611a29bacSmrgmv \$(top_srcdir)/.INSTALL.tmp \$(top_srcdir)/INSTALL) \
214711a29bacSmrg|| (rm -f \$(top_srcdir)/.INSTALL.tmp; touch \$(top_srcdir)/INSTALL; \
214811a29bacSmrgecho 'util-macros \"pkgdatadir\" from xorg-macros.pc not found: installing possibly empty INSTALL.' >&2)"
214911a29bacSmrgAC_SUBST([INSTALL_CMD])
215011a29bacSmrg]) # XORG_INSTALL
215111245024Smrgdnl Copyright 2005 Red Hat, Inc
215211245024Smrgdnl
215311245024Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
215411245024Smrgdnl documentation for any purpose is hereby granted without fee, provided that
215511245024Smrgdnl the above copyright notice appear in all copies and that both that
215611245024Smrgdnl copyright notice and this permission notice appear in supporting
215711245024Smrgdnl documentation.
215811245024Smrgdnl
215911245024Smrgdnl The above copyright notice and this permission notice shall be included
216011245024Smrgdnl in all copies or substantial portions of the Software.
216111245024Smrgdnl
216211245024Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
216311245024Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
216411245024Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
216511245024Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
216611245024Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
216711245024Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
216811245024Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
216911245024Smrgdnl
217011245024Smrgdnl Except as contained in this notice, the name of the copyright holders shall
217111245024Smrgdnl not be used in advertising or otherwise to promote the sale, use or
217211245024Smrgdnl other dealings in this Software without prior written authorization
217311245024Smrgdnl from the copyright holders.
217411245024Smrgdnl
217541b2f0bdSmrg
217611245024Smrg# XORG_RELEASE_VERSION
217711245024Smrg# --------------------
217811a29bacSmrg# Defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
217911245024Smrg 
218011245024SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
218111245024Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
218211245024Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
218311245024Smrg		[Major version of this package])
218411245024Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
218511245024Smrg	if test "x$PVM" = "x"; then
218611245024Smrg		PVM="0"
218711245024Smrg	fi
218811245024Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
218911245024Smrg		[$PVM],
219011245024Smrg		[Minor version of this package])
219111245024Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
219211245024Smrg	if test "x$PVP" = "x"; then
219311245024Smrg		PVP="0"
219411245024Smrg	fi
219511245024Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
219611245024Smrg		[$PVP],
219711245024Smrg		[Patch version of this package])
219811245024Smrg])
219941b2f0bdSmrg
220011245024Smrg# XORG_CHANGELOG()
220111245024Smrg# ----------------
220211245024Smrg# Minimum version: 1.2.0
220311245024Smrg#
220411245024Smrg# Defines the variable CHANGELOG_CMD as the command to generate
220511245024Smrg# ChangeLog from git.
220611245024Smrg#
220711245024Smrg#
220811245024SmrgAC_DEFUN([XORG_CHANGELOG], [
220911a29bacSmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > \$(top_srcdir)/.changelog.tmp && \
221011a29bacSmrgmv \$(top_srcdir)/.changelog.tmp \$(top_srcdir)/ChangeLog) \
221111a29bacSmrg|| (rm -f \$(top_srcdir)/.changelog.tmp; touch \$(top_srcdir)/ChangeLog; \
221211245024Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
221311245024SmrgAC_SUBST([CHANGELOG_CMD])
221411245024Smrg]) # XORG_CHANGELOG
221541b2f0bdSmrg
221611a29bacSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
221711a29bacSmrg# 
221811a29bacSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
221911a29bacSmrg#
222011a29bacSmrg# This program is free software; you can redistribute it and/or modify
222111a29bacSmrg# it under the terms of the GNU General Public License as published by
222211a29bacSmrg# the Free Software Foundation; either version 2 of the License, or
222311a29bacSmrg# (at your option) any later version.
222411a29bacSmrg#
222511a29bacSmrg# This program is distributed in the hope that it will be useful, but
222611a29bacSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
222711a29bacSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
222811a29bacSmrg# General Public License for more details.
222911a29bacSmrg#
223011a29bacSmrg# You should have received a copy of the GNU General Public License
223111a29bacSmrg# along with this program; if not, write to the Free Software
223211a29bacSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
223311a29bacSmrg#
223411a29bacSmrg# As a special exception to the GNU General Public License, if you
223511a29bacSmrg# distribute this file as part of a program that contains a
223611a29bacSmrg# configuration script generated by Autoconf, you may include it under
223711a29bacSmrg# the same distribution terms that you use for the rest of that program.
223841b2f0bdSmrg
223911a29bacSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
224011a29bacSmrg# ----------------------------------
224111a29bacSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
224211a29bacSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
224311a29bacSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
224411a29bacSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
224511a29bacSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
224611a29bacSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
224711a29bacSmrgfi
224811a29bacSmrgif test -n "$PKG_CONFIG"; then
224911a29bacSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
225011a29bacSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
225111a29bacSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
225211a29bacSmrg		AC_MSG_RESULT([yes])
225311a29bacSmrg	else
225411a29bacSmrg		AC_MSG_RESULT([no])
225511a29bacSmrg		PKG_CONFIG=""
225611a29bacSmrg	fi
225711a29bacSmrg		
225811a29bacSmrgfi[]dnl
225911a29bacSmrg])# PKG_PROG_PKG_CONFIG
226041b2f0bdSmrg
226111a29bacSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
226211a29bacSmrg#
226311a29bacSmrg# Check to see whether a particular set of modules exists.  Similar
226411a29bacSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
226511a29bacSmrg#
226611a29bacSmrg#
226711a29bacSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
226811a29bacSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
226911a29bacSmrg# PKG_CHECK_EXISTS manually
227011a29bacSmrg# --------------------------------------------------------------
227111a29bacSmrgAC_DEFUN([PKG_CHECK_EXISTS],
227211a29bacSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
227311a29bacSmrgif test -n "$PKG_CONFIG" && \
227411a29bacSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
227511a29bacSmrg  m4_ifval([$2], [$2], [:])
227611a29bacSmrgm4_ifvaln([$3], [else
227711a29bacSmrg  $3])dnl
227811a29bacSmrgfi])
227941b2f0bdSmrg
228041b2f0bdSmrg
228111a29bacSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
228211a29bacSmrg# ---------------------------------------------
228311a29bacSmrgm4_define([_PKG_CONFIG],
228411a29bacSmrg[if test -n "$$1"; then
228511a29bacSmrg    pkg_cv_[]$1="$$1"
228611a29bacSmrg elif test -n "$PKG_CONFIG"; then
228711a29bacSmrg    PKG_CHECK_EXISTS([$3],
228811a29bacSmrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
228911a29bacSmrg		     [pkg_failed=yes])
229011a29bacSmrg else
229111a29bacSmrg    pkg_failed=untried
229211a29bacSmrgfi[]dnl
229311a29bacSmrg])# _PKG_CONFIG
229441b2f0bdSmrg
229511a29bacSmrg# _PKG_SHORT_ERRORS_SUPPORTED
229611a29bacSmrg# -----------------------------
229711a29bacSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
229811a29bacSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
229911a29bacSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
230011a29bacSmrg        _pkg_short_errors_supported=yes
230111a29bacSmrgelse
230211a29bacSmrg        _pkg_short_errors_supported=no
230311a29bacSmrgfi[]dnl
230411a29bacSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
230541b2f0bdSmrg
230641b2f0bdSmrg
230711a29bacSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
230811a29bacSmrg# [ACTION-IF-NOT-FOUND])
230911a29bacSmrg#
231011a29bacSmrg#
231111a29bacSmrg# Note that if there is a possibility the first call to
231211a29bacSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
231311a29bacSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
231411a29bacSmrg#
231511a29bacSmrg#
231611a29bacSmrg# --------------------------------------------------------------
231711a29bacSmrgAC_DEFUN([PKG_CHECK_MODULES],
231811a29bacSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
231911a29bacSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
232011a29bacSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
232111a29bacSmrg
232211a29bacSmrgpkg_failed=no
232311a29bacSmrgAC_MSG_CHECKING([for $1])
232441b2f0bdSmrg
232511a29bacSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
232611a29bacSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
232741b2f0bdSmrg
232811a29bacSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
232911a29bacSmrgand $1[]_LIBS to avoid the need to call pkg-config.
233011a29bacSmrgSee the pkg-config man page for more details.])
233111a29bacSmrg
233211a29bacSmrgif test $pkg_failed = yes; then
233311a29bacSmrg        _PKG_SHORT_ERRORS_SUPPORTED
233411a29bacSmrg        if test $_pkg_short_errors_supported = yes; then
233511a29bacSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
233611a29bacSmrg        else 
233711a29bacSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
233811a29bacSmrg        fi
233911a29bacSmrg	# Put the nasty error message in config.log where it belongs
234011a29bacSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
234111a29bacSmrg
234211a29bacSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
234311a29bacSmrg[Package requirements ($2) were not met:
234411a29bacSmrg
234511a29bacSmrg$$1_PKG_ERRORS
234611a29bacSmrg
234711a29bacSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
234811a29bacSmrginstalled software in a non-standard prefix.
234911a29bacSmrg
235011a29bacSmrg_PKG_TEXT
235111a29bacSmrg])],
235211a29bacSmrg		[AC_MSG_RESULT([no])
235311a29bacSmrg                $4])
235411a29bacSmrgelif test $pkg_failed = untried; then
235511a29bacSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
235611a29bacSmrg[The pkg-config script could not be found or is too old.  Make sure it
235711a29bacSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
235811a29bacSmrgpath to pkg-config.
235911a29bacSmrg
236011a29bacSmrg_PKG_TEXT
236111a29bacSmrg
236211a29bacSmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
236311a29bacSmrg		[$4])
236411a29bacSmrgelse
236511a29bacSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
236611a29bacSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
236711a29bacSmrg        AC_MSG_RESULT([yes])
236811a29bacSmrg	ifelse([$3], , :, [$3])
236911a29bacSmrgfi[]dnl
237011a29bacSmrg])# PKG_CHECK_MODULES
237111a29bacSmrg
237211a29bacSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
237311a29bacSmrg#
237411a29bacSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
237511a29bacSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
237611a29bacSmrg#                 Inc.
237711a29bacSmrg#   Written by Gordon Matzigkeit, 1996
237811a29bacSmrg#
237911a29bacSmrg# This file is free software; the Free Software Foundation gives
238011a29bacSmrg# unlimited permission to copy and/or distribute it, with or without
238111a29bacSmrg# modifications, as long as this notice is preserved.
238211a29bacSmrg
238311a29bacSmrgm4_define([_LT_COPYING], [dnl
238411a29bacSmrg#   Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
238511a29bacSmrg#                 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
238611a29bacSmrg#                 Inc.
238711a29bacSmrg#   Written by Gordon Matzigkeit, 1996
238811a29bacSmrg#
238911a29bacSmrg#   This file is part of GNU Libtool.
239011a29bacSmrg#
239111a29bacSmrg# GNU Libtool is free software; you can redistribute it and/or
239211a29bacSmrg# modify it under the terms of the GNU General Public License as
239311a29bacSmrg# published by the Free Software Foundation; either version 2 of
239411a29bacSmrg# the License, or (at your option) any later version.
239511a29bacSmrg#
239611a29bacSmrg# As a special exception to the GNU General Public License,
239711a29bacSmrg# if you distribute this file as part of a program or library that
239811a29bacSmrg# is built using GNU Libtool, you may include this file under the
239911a29bacSmrg# same distribution terms that you use for the rest of that program.
240011a29bacSmrg#
240111a29bacSmrg# GNU Libtool is distributed in the hope that it will be useful,
240211a29bacSmrg# but WITHOUT ANY WARRANTY; without even the implied warranty of
240311a29bacSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
240411a29bacSmrg# GNU General Public License for more details.
240511a29bacSmrg#
240611a29bacSmrg# You should have received a copy of the GNU General Public License
240711a29bacSmrg# along with GNU Libtool; see the file COPYING.  If not, a copy
240811a29bacSmrg# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
240911a29bacSmrg# obtained by writing to the Free Software Foundation, Inc.,
241011a29bacSmrg# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
241111a29bacSmrg])
241211a29bacSmrg
241311a29bacSmrg# serial 57 LT_INIT
241411a29bacSmrg
241511a29bacSmrg
241611a29bacSmrg# LT_PREREQ(VERSION)
241711a29bacSmrg# ------------------
241811a29bacSmrg# Complain and exit if this libtool version is less that VERSION.
241911a29bacSmrgm4_defun([LT_PREREQ],
242011a29bacSmrg[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
242111a29bacSmrg       [m4_default([$3],
242211a29bacSmrg		   [m4_fatal([Libtool version $1 or higher is required],
242311a29bacSmrg		             63)])],
242411a29bacSmrg       [$2])])
242511a29bacSmrg
242611a29bacSmrg
242711a29bacSmrg# _LT_CHECK_BUILDDIR
242811a29bacSmrg# ------------------
242911a29bacSmrg# Complain if the absolute build directory name contains unusual characters
243011a29bacSmrgm4_defun([_LT_CHECK_BUILDDIR],
243111a29bacSmrg[case `pwd` in
243211a29bacSmrg  *\ * | *\	*)
243311a29bacSmrg    AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
243411a29bacSmrgesac
243511a29bacSmrg])
243611a29bacSmrg
243711a29bacSmrg
243811a29bacSmrg# LT_INIT([OPTIONS])
243911a29bacSmrg# ------------------
244011a29bacSmrgAC_DEFUN([LT_INIT],
244111a29bacSmrg[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
244211a29bacSmrgAC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl
244311a29bacSmrgAC_BEFORE([$0], [LT_LANG])dnl
244411a29bacSmrgAC_BEFORE([$0], [LT_OUTPUT])dnl
244511a29bacSmrgAC_BEFORE([$0], [LTDL_INIT])dnl
244611a29bacSmrgm4_require([_LT_CHECK_BUILDDIR])dnl
244711a29bacSmrg
244811a29bacSmrgdnl Autoconf doesn't catch unexpanded LT_ macros by default:
244911a29bacSmrgm4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
245011a29bacSmrgm4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
245111a29bacSmrgdnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
245211a29bacSmrgdnl unless we require an AC_DEFUNed macro:
245311a29bacSmrgAC_REQUIRE([LTOPTIONS_VERSION])dnl
245411a29bacSmrgAC_REQUIRE([LTSUGAR_VERSION])dnl
245511a29bacSmrgAC_REQUIRE([LTVERSION_VERSION])dnl
245611a29bacSmrgAC_REQUIRE([LTOBSOLETE_VERSION])dnl
245711a29bacSmrgm4_require([_LT_PROG_LTMAIN])dnl
245811a29bacSmrg
245911a29bacSmrg_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}])
246011a29bacSmrg
246111a29bacSmrgdnl Parse OPTIONS
246211a29bacSmrg_LT_SET_OPTIONS([$0], [$1])
246311a29bacSmrg
246411a29bacSmrg# This can be used to rebuild libtool when needed
246511a29bacSmrgLIBTOOL_DEPS="$ltmain"
246611a29bacSmrg
246711a29bacSmrg# Always use our own libtool.
246811a29bacSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
246911a29bacSmrgAC_SUBST(LIBTOOL)dnl
247011a29bacSmrg
247111a29bacSmrg_LT_SETUP
247211a29bacSmrg
247311a29bacSmrg# Only expand once:
247411a29bacSmrgm4_define([LT_INIT])
247511a29bacSmrg])# LT_INIT
247611a29bacSmrg
247711a29bacSmrg# Old names:
247811a29bacSmrgAU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
247911a29bacSmrgAU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
248011a29bacSmrgdnl aclocal-1.4 backwards compatibility:
248111a29bacSmrgdnl AC_DEFUN([AC_PROG_LIBTOOL], [])
248211a29bacSmrgdnl AC_DEFUN([AM_PROG_LIBTOOL], [])
248311a29bacSmrg
248411a29bacSmrg
248511a29bacSmrg# _LT_CC_BASENAME(CC)
248611a29bacSmrg# -------------------
248711a29bacSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
248811a29bacSmrgm4_defun([_LT_CC_BASENAME],
248911a29bacSmrg[for cc_temp in $1""; do
249011a29bacSmrg  case $cc_temp in
249111a29bacSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
249211a29bacSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
249311a29bacSmrg    \-*) ;;
249411a29bacSmrg    *) break;;
249511a29bacSmrg  esac
249611a29bacSmrgdone
249711a29bacSmrgcc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"`
249811a29bacSmrg])
249911a29bacSmrg
250011a29bacSmrg
250111a29bacSmrg# _LT_FILEUTILS_DEFAULTS
250211a29bacSmrg# ----------------------
250311a29bacSmrg# It is okay to use these file commands and assume they have been set
250411a29bacSmrg# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
250511a29bacSmrgm4_defun([_LT_FILEUTILS_DEFAULTS],
250611a29bacSmrg[: ${CP="cp -f"}
250711a29bacSmrg: ${MV="mv -f"}
250811a29bacSmrg: ${RM="rm -f"}
250911a29bacSmrg])# _LT_FILEUTILS_DEFAULTS
251011a29bacSmrg
251111a29bacSmrg
251211a29bacSmrg# _LT_SETUP
251311a29bacSmrg# ---------
251411a29bacSmrgm4_defun([_LT_SETUP],
251511a29bacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
251611245024SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
251711a29bacSmrgAC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl
251811a29bacSmrgAC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl
251941b2f0bdSmrg
252011a29bacSmrg_LT_DECL([], [host_alias], [0], [The host system])dnl
252111a29bacSmrg_LT_DECL([], [host], [0])dnl
252211a29bacSmrg_LT_DECL([], [host_os], [0])dnl
252311a29bacSmrgdnl
252411a29bacSmrg_LT_DECL([], [build_alias], [0], [The build system])dnl
252511a29bacSmrg_LT_DECL([], [build], [0])dnl
252611a29bacSmrg_LT_DECL([], [build_os], [0])dnl
252711a29bacSmrgdnl
252811a29bacSmrgAC_REQUIRE([AC_PROG_CC])dnl
252911a29bacSmrgAC_REQUIRE([LT_PATH_LD])dnl
253011a29bacSmrgAC_REQUIRE([LT_PATH_NM])dnl
253111a29bacSmrgdnl
253211245024SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
253311a29bacSmrgtest -z "$LN_S" && LN_S="ln -s"
253411a29bacSmrg_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
253511a29bacSmrgdnl
253611a29bacSmrgAC_REQUIRE([LT_CMD_MAX_LEN])dnl
253711a29bacSmrg_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
253811a29bacSmrg_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
253911245024Smrgdnl
254011a29bacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
254111a29bacSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
254211a29bacSmrgm4_require([_LT_CMD_RELOAD])dnl
254311a29bacSmrgm4_require([_LT_CHECK_MAGIC_METHOD])dnl
254411a29bacSmrgm4_require([_LT_CMD_OLD_ARCHIVE])dnl
254511a29bacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
254611a29bacSmrg
254711a29bacSmrg_LT_CONFIG_LIBTOOL_INIT([
254811a29bacSmrg# See if we are running on zsh, and set the options which allow our
254911a29bacSmrg# commands through without removal of \ escapes INIT.
255011a29bacSmrgif test -n "\${ZSH_VERSION+set}" ; then
255111a29bacSmrg   setopt NO_GLOB_SUBST
255211a29bacSmrgfi
255311a29bacSmrg])
255411a29bacSmrgif test -n "${ZSH_VERSION+set}" ; then
255511a29bacSmrg   setopt NO_GLOB_SUBST
255611a29bacSmrgfi
255711a29bacSmrg
255811a29bacSmrg_LT_CHECK_OBJDIR
255941b2f0bdSmrg
256011a29bacSmrgm4_require([_LT_TAG_COMPILER])dnl
256141b2f0bdSmrg
256211245024Smrgcase $host_os in
256311245024Smrgaix3*)
256411245024Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
256511245024Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
256611245024Smrg  # vanish in a puff of smoke.
256711245024Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
256811245024Smrg    COLLECT_NAMES=
256911245024Smrg    export COLLECT_NAMES
257041b2f0bdSmrg  fi
257111245024Smrg  ;;
257211245024Smrgesac
257341b2f0bdSmrg
257411245024Smrg# Global variables:
257511a29bacSmrgofile=libtool
257611245024Smrgcan_build_shared=yes
257741b2f0bdSmrg
257811245024Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
257911245024Smrg# which needs '.lib').
258011245024Smrglibext=a
258141b2f0bdSmrg
258211a29bacSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
258341b2f0bdSmrg
258411245024Smrgold_CC="$CC"
258511245024Smrgold_CFLAGS="$CFLAGS"
258641b2f0bdSmrg
258711245024Smrg# Set sane defaults for various variables
258811245024Smrgtest -z "$CC" && CC=cc
258911245024Smrgtest -z "$LTCC" && LTCC=$CC
259011245024Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
259111245024Smrgtest -z "$LD" && LD=ld
259211245024Smrgtest -z "$ac_objext" && ac_objext=o
259341b2f0bdSmrg
259411245024Smrg_LT_CC_BASENAME([$compiler])
259541b2f0bdSmrg
259611245024Smrg# Only perform the check for file, if the check method requires it
259711a29bacSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
259811245024Smrgcase $deplibs_check_method in
259911245024Smrgfile_magic*)
260011245024Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
260111a29bacSmrg    _LT_PATH_MAGIC
260211245024Smrg  fi
260311245024Smrg  ;;
260411245024Smrgesac
260541b2f0bdSmrg
260611a29bacSmrg# Use C for the default configuration in the libtool script
260711a29bacSmrgLT_SUPPORTED_TAG([CC])
260811a29bacSmrg_LT_LANG_C_CONFIG
260911a29bacSmrg_LT_LANG_DEFAULT_CONFIG
261011a29bacSmrg_LT_CONFIG_COMMANDS
261111a29bacSmrg])# _LT_SETUP
261241b2f0bdSmrg
261341b2f0bdSmrg
261411a29bacSmrg# _LT_PREPARE_SED_QUOTE_VARS
261511a29bacSmrg# --------------------------
261611a29bacSmrg# Define a few sed substitution that help us do robust quoting.
261711a29bacSmrgm4_defun([_LT_PREPARE_SED_QUOTE_VARS],
261811a29bacSmrg[# Backslashify metacharacters that are still active within
261911a29bacSmrg# double-quoted strings.
262011a29bacSmrgsed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
262141b2f0bdSmrg
262211a29bacSmrg# Same as above, but do not quote variable references.
262311a29bacSmrgdouble_quote_subst='s/\([["`\\]]\)/\\\1/g'
262441b2f0bdSmrg
262511a29bacSmrg# Sed substitution to delay expansion of an escaped shell variable in a
262611a29bacSmrg# double_quote_subst'ed string.
262711a29bacSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
262841b2f0bdSmrg
262911a29bacSmrg# Sed substitution to delay expansion of an escaped single quote.
263011a29bacSmrgdelay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
263141b2f0bdSmrg
263211a29bacSmrg# Sed substitution to avoid accidental globbing in evaled expressions
263311a29bacSmrgno_glob_subst='s/\*/\\\*/g'
263411a29bacSmrg])
263541b2f0bdSmrg
263611a29bacSmrg# _LT_PROG_LTMAIN
263711a29bacSmrg# ---------------
263811a29bacSmrg# Note that this code is called both from `configure', and `config.status'
263911a29bacSmrg# now that we use AC_CONFIG_COMMANDS to generate libtool.  Notably,
264011a29bacSmrg# `config.status' has no value for ac_aux_dir unless we are using Automake,
264111a29bacSmrg# so we pass a copy along to make sure it has a sensible value anyway.
264211a29bacSmrgm4_defun([_LT_PROG_LTMAIN],
264311a29bacSmrg[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
264411a29bacSmrg_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
264511a29bacSmrgltmain="$ac_aux_dir/ltmain.sh"
264611a29bacSmrg])# _LT_PROG_LTMAIN
264741b2f0bdSmrg
264841b2f0bdSmrg
264941b2f0bdSmrg
265011a29bacSmrg# So that we can recreate a full libtool script including additional
265111a29bacSmrg# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
265211a29bacSmrg# in macros and then make a single call at the end using the `libtool'
265311a29bacSmrg# label.
265441b2f0bdSmrg
265511a29bacSmrg
265611a29bacSmrg# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
265711a29bacSmrg# ----------------------------------------
265811a29bacSmrg# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
265911a29bacSmrgm4_define([_LT_CONFIG_LIBTOOL_INIT],
266011a29bacSmrg[m4_ifval([$1],
266111a29bacSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
266211a29bacSmrg                     [$1
266311a29bacSmrg])])])
266411a29bacSmrg
266511a29bacSmrg# Initialize.
266611a29bacSmrgm4_define([_LT_OUTPUT_LIBTOOL_INIT])
266711a29bacSmrg
266811a29bacSmrg
266911a29bacSmrg# _LT_CONFIG_LIBTOOL([COMMANDS])
267011a29bacSmrg# ------------------------------
267111a29bacSmrg# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
267211a29bacSmrgm4_define([_LT_CONFIG_LIBTOOL],
267311a29bacSmrg[m4_ifval([$1],
267411a29bacSmrg          [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
267511a29bacSmrg                     [$1
267611a29bacSmrg])])])
267711a29bacSmrg
267811a29bacSmrg# Initialize.
267911a29bacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
268011a29bacSmrg
268111a29bacSmrg
268211a29bacSmrg# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
268311a29bacSmrg# -----------------------------------------------------
268411a29bacSmrgm4_defun([_LT_CONFIG_SAVE_COMMANDS],
268511a29bacSmrg[_LT_CONFIG_LIBTOOL([$1])
268611a29bacSmrg_LT_CONFIG_LIBTOOL_INIT([$2])
268711245024Smrg])
268841b2f0bdSmrg
268941b2f0bdSmrg
269011a29bacSmrg# _LT_FORMAT_COMMENT([COMMENT])
269111a29bacSmrg# -----------------------------
269211a29bacSmrg# Add leading comment marks to the start of each line, and a trailing
269311a29bacSmrg# full-stop to the whole comment if one is not present already.
269411a29bacSmrgm4_define([_LT_FORMAT_COMMENT],
269511a29bacSmrg[m4_ifval([$1], [
269611a29bacSmrgm4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
269711a29bacSmrg              [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
269811a29bacSmrg)])
269911a29bacSmrg
270011a29bacSmrg
270111a29bacSmrg
270211a29bacSmrg
270311a29bacSmrg
270411a29bacSmrg# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
270511a29bacSmrg# -------------------------------------------------------------------
270611a29bacSmrg# CONFIGNAME is the name given to the value in the libtool script.
270711a29bacSmrg# VARNAME is the (base) name used in the configure script.
270811a29bacSmrg# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
270911a29bacSmrg# VARNAME.  Any other value will be used directly.
271011a29bacSmrgm4_define([_LT_DECL],
271111a29bacSmrg[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
271211a29bacSmrg    [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
271311a29bacSmrg	[m4_ifval([$1], [$1], [$2])])
271411a29bacSmrg    lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
271511a29bacSmrg    m4_ifval([$4],
271611a29bacSmrg	[lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
271711a29bacSmrg    lt_dict_add_subkey([lt_decl_dict], [$2],
271811a29bacSmrg	[tagged?], [m4_ifval([$5], [yes], [no])])])
271911a29bacSmrg])
272041b2f0bdSmrg
272141b2f0bdSmrg
272211a29bacSmrg# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
272311a29bacSmrg# --------------------------------------------------------
272411a29bacSmrgm4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
272511245024Smrg
272611245024Smrg
272711a29bacSmrg# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
272811a29bacSmrg# ------------------------------------------------
272911a29bacSmrgm4_define([lt_decl_tag_varnames],
273011a29bacSmrg[_lt_decl_filter([tagged?], [yes], $@)])
273111a29bacSmrg
273211a29bacSmrg
273311a29bacSmrg# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
273411a29bacSmrg# ---------------------------------------------------------
273511a29bacSmrgm4_define([_lt_decl_filter],
273611a29bacSmrg[m4_case([$#],
273711a29bacSmrg  [0], [m4_fatal([$0: too few arguments: $#])],
273811a29bacSmrg  [1], [m4_fatal([$0: too few arguments: $#: $1])],
273911a29bacSmrg  [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
274011a29bacSmrg  [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
274111a29bacSmrg  [lt_dict_filter([lt_decl_dict], $@)])[]dnl
274211a29bacSmrg])
274311a29bacSmrg
274411a29bacSmrg
274511a29bacSmrg# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
274611a29bacSmrg# --------------------------------------------------
274711a29bacSmrgm4_define([lt_decl_quote_varnames],
274811a29bacSmrg[_lt_decl_filter([value], [1], $@)])
274911a29bacSmrg
275011a29bacSmrg
275111a29bacSmrg# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
275211a29bacSmrg# ---------------------------------------------------
275311a29bacSmrgm4_define([lt_decl_dquote_varnames],
275411a29bacSmrg[_lt_decl_filter([value], [2], $@)])
275511a29bacSmrg
275611a29bacSmrg
275711a29bacSmrg# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
275811a29bacSmrg# ---------------------------------------------------
275911a29bacSmrgm4_define([lt_decl_varnames_tagged],
276011a29bacSmrg[m4_assert([$# <= 2])dnl
276111a29bacSmrg_$0(m4_quote(m4_default([$1], [[, ]])),
276211a29bacSmrg    m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
276311a29bacSmrg    m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
276411a29bacSmrgm4_define([_lt_decl_varnames_tagged],
276511a29bacSmrg[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
276611a29bacSmrg
276711a29bacSmrg
276811a29bacSmrg# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
276911a29bacSmrg# ------------------------------------------------
277011a29bacSmrgm4_define([lt_decl_all_varnames],
277111a29bacSmrg[_$0(m4_quote(m4_default([$1], [[, ]])),
277211a29bacSmrg     m4_if([$2], [],
277311a29bacSmrg	   m4_quote(lt_decl_varnames),
277411a29bacSmrg	m4_quote(m4_shift($@))))[]dnl
277511a29bacSmrg])
277611a29bacSmrgm4_define([_lt_decl_all_varnames],
277711a29bacSmrg[lt_join($@, lt_decl_varnames_tagged([$1],
277811a29bacSmrg			lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
277911a29bacSmrg])
278011a29bacSmrg
278111a29bacSmrg
278211a29bacSmrg# _LT_CONFIG_STATUS_DECLARE([VARNAME])
278311a29bacSmrg# ------------------------------------
278411a29bacSmrg# Quote a variable value, and forward it to `config.status' so that its
278511a29bacSmrg# declaration there will have the same value as in `configure'.  VARNAME
278611a29bacSmrg# must have a single quote delimited value for this to work.
278711a29bacSmrgm4_define([_LT_CONFIG_STATUS_DECLARE],
278811a29bacSmrg[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`'])
278911a29bacSmrg
279011a29bacSmrg
279111a29bacSmrg# _LT_CONFIG_STATUS_DECLARATIONS
279211a29bacSmrg# ------------------------------
279311a29bacSmrg# We delimit libtool config variables with single quotes, so when
279411a29bacSmrg# we write them to config.status, we have to be sure to quote all
279511a29bacSmrg# embedded single quotes properly.  In configure, this macro expands
279611a29bacSmrg# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
279711a29bacSmrg#
279811a29bacSmrg#    <var>='`$ECHO "$<var>" | $SED "$delay_single_quote_subst"`'
279911a29bacSmrgm4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
280011a29bacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
280111a29bacSmrg    [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
280211a29bacSmrg
280311a29bacSmrg
280411a29bacSmrg# _LT_LIBTOOL_TAGS
280511a29bacSmrg# ----------------
280611a29bacSmrg# Output comment and list of tags supported by the script
280711a29bacSmrgm4_defun([_LT_LIBTOOL_TAGS],
280811a29bacSmrg[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
280911a29bacSmrgavailable_tags="_LT_TAGS"dnl
281011a29bacSmrg])
281111a29bacSmrg
281211a29bacSmrg
281311a29bacSmrg# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
281411a29bacSmrg# -----------------------------------
281511a29bacSmrg# Extract the dictionary values for VARNAME (optionally with TAG) and
281611a29bacSmrg# expand to a commented shell variable setting:
281711a29bacSmrg#
281811a29bacSmrg#    # Some comment about what VAR is for.
281911a29bacSmrg#    visible_name=$lt_internal_name
282011a29bacSmrgm4_define([_LT_LIBTOOL_DECLARE],
282111a29bacSmrg[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
282211a29bacSmrg					   [description])))[]dnl
282311a29bacSmrgm4_pushdef([_libtool_name],
282411a29bacSmrg    m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
282511a29bacSmrgm4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
282611a29bacSmrg    [0], [_libtool_name=[$]$1],
282711a29bacSmrg    [1], [_libtool_name=$lt_[]$1],
282811a29bacSmrg    [2], [_libtool_name=$lt_[]$1],
282911a29bacSmrg    [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
283011a29bacSmrgm4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
283111a29bacSmrg])
283211a29bacSmrg
283311a29bacSmrg
283411a29bacSmrg# _LT_LIBTOOL_CONFIG_VARS
283511a29bacSmrg# -----------------------
283611a29bacSmrg# Produce commented declarations of non-tagged libtool config variables
283711a29bacSmrg# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
283811a29bacSmrg# script.  Tagged libtool config variables (even for the LIBTOOL CONFIG
283911a29bacSmrg# section) are produced by _LT_LIBTOOL_TAG_VARS.
284011a29bacSmrgm4_defun([_LT_LIBTOOL_CONFIG_VARS],
284111a29bacSmrg[m4_foreach([_lt_var],
284211a29bacSmrg    m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
284311a29bacSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
284411a29bacSmrg
284511a29bacSmrg
284611a29bacSmrg# _LT_LIBTOOL_TAG_VARS(TAG)
284711a29bacSmrg# -------------------------
284811a29bacSmrgm4_define([_LT_LIBTOOL_TAG_VARS],
284911a29bacSmrg[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
285011a29bacSmrg    [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
285111a29bacSmrg
285211a29bacSmrg
285311a29bacSmrg# _LT_TAGVAR(VARNAME, [TAGNAME])
285411a29bacSmrg# ------------------------------
285511a29bacSmrgm4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
285611a29bacSmrg
285711a29bacSmrg
285811a29bacSmrg# _LT_CONFIG_COMMANDS
285911a29bacSmrg# -------------------
286011a29bacSmrg# Send accumulated output to $CONFIG_STATUS.  Thanks to the lists of
286111a29bacSmrg# variables for single and double quote escaping we saved from calls
286211a29bacSmrg# to _LT_DECL, we can put quote escaped variables declarations
286311a29bacSmrg# into `config.status', and then the shell code to quote escape them in
286411a29bacSmrg# for loops in `config.status'.  Finally, any additional code accumulated
286511a29bacSmrg# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
286611a29bacSmrgm4_defun([_LT_CONFIG_COMMANDS],
286711a29bacSmrg[AC_PROVIDE_IFELSE([LT_OUTPUT],
286811a29bacSmrg	dnl If the libtool generation code has been placed in $CONFIG_LT,
286911a29bacSmrg	dnl instead of duplicating it all over again into config.status,
287011a29bacSmrg	dnl then we will have config.status run $CONFIG_LT later, so it
287111a29bacSmrg	dnl needs to know what name is stored there:
287211a29bacSmrg        [AC_CONFIG_COMMANDS([libtool],
287311a29bacSmrg            [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
287411a29bacSmrg    dnl If the libtool generation code is destined for config.status,
287511a29bacSmrg    dnl expand the accumulated commands and init code now:
287611a29bacSmrg    [AC_CONFIG_COMMANDS([libtool],
287711a29bacSmrg        [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
287811a29bacSmrg])#_LT_CONFIG_COMMANDS
287911a29bacSmrg
288011a29bacSmrg
288111a29bacSmrg# Initialize.
288211a29bacSmrgm4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
288311a29bacSmrg[
288411a29bacSmrg
288511a29bacSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
288611a29bacSmrg# if CDPATH is set.
288711a29bacSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
288811a29bacSmrg
288911a29bacSmrgsed_quote_subst='$sed_quote_subst'
289011a29bacSmrgdouble_quote_subst='$double_quote_subst'
289111a29bacSmrgdelay_variable_subst='$delay_variable_subst'
289211a29bacSmrg_LT_CONFIG_STATUS_DECLARATIONS
289311a29bacSmrgLTCC='$LTCC'
289411a29bacSmrgLTCFLAGS='$LTCFLAGS'
289511a29bacSmrgcompiler='$compiler_DEFAULT'
289611a29bacSmrg
289711a29bacSmrg# A function that is used when there is no print builtin or printf.
289811a29bacSmrgfunc_fallback_echo ()
289911a29bacSmrg{
290011a29bacSmrg  eval 'cat <<_LTECHO_EOF
290111a29bacSmrg\$[]1
290211a29bacSmrg_LTECHO_EOF'
290311a29bacSmrg}
290411a29bacSmrg
290511a29bacSmrg# Quote evaled strings.
290611a29bacSmrgfor var in lt_decl_all_varnames([[ \
290711a29bacSmrg]], lt_decl_quote_varnames); do
290811a29bacSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
290911a29bacSmrg    *[[\\\\\\\`\\"\\\$]]*)
291011a29bacSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
291111a29bacSmrg      ;;
291211a29bacSmrg    *)
291311a29bacSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
291411a29bacSmrg      ;;
291511a29bacSmrg    esac
291611a29bacSmrgdone
291711a29bacSmrg
291811a29bacSmrg# Double-quote double-evaled strings.
291911a29bacSmrgfor var in lt_decl_all_varnames([[ \
292011a29bacSmrg]], lt_decl_dquote_varnames); do
292111a29bacSmrg    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in
292211a29bacSmrg    *[[\\\\\\\`\\"\\\$]]*)
292311a29bacSmrg      eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
292411a29bacSmrg      ;;
292511a29bacSmrg    *)
292611a29bacSmrg      eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
292711a29bacSmrg      ;;
292811a29bacSmrg    esac
292911a29bacSmrgdone
293011a29bacSmrg
293111a29bacSmrg_LT_OUTPUT_LIBTOOL_INIT
293211a29bacSmrg])
293311a29bacSmrg
293411a29bacSmrg# _LT_GENERATED_FILE_INIT(FILE, [COMMENT])
293511a29bacSmrg# ------------------------------------
293611a29bacSmrg# Generate a child script FILE with all initialization necessary to
293711a29bacSmrg# reuse the environment learned by the parent script, and make the
293811a29bacSmrg# file executable.  If COMMENT is supplied, it is inserted after the
293911a29bacSmrg# `#!' sequence but before initialization text begins.  After this
294011a29bacSmrg# macro, additional text can be appended to FILE to form the body of
294111a29bacSmrg# the child script.  The macro ends with non-zero status if the
294211a29bacSmrg# file could not be fully written (such as if the disk is full).
294311a29bacSmrgm4_ifdef([AS_INIT_GENERATED],
294411a29bacSmrg[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])],
294511a29bacSmrg[m4_defun([_LT_GENERATED_FILE_INIT],
294611a29bacSmrg[m4_require([AS_PREPARE])]dnl
294711a29bacSmrg[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl
294811a29bacSmrg[lt_write_fail=0
294911a29bacSmrgcat >$1 <<_ASEOF || lt_write_fail=1
295011a29bacSmrg#! $SHELL
295111a29bacSmrg# Generated by $as_me.
295211a29bacSmrg$2
295311a29bacSmrgSHELL=\${CONFIG_SHELL-$SHELL}
295411a29bacSmrgexport SHELL
295511a29bacSmrg_ASEOF
295611a29bacSmrgcat >>$1 <<\_ASEOF || lt_write_fail=1
295711a29bacSmrgAS_SHELL_SANITIZE
295811a29bacSmrg_AS_PREPARE
295911a29bacSmrgexec AS_MESSAGE_FD>&1
296011a29bacSmrg_ASEOF
296111a29bacSmrgtest $lt_write_fail = 0 && chmod +x $1[]dnl
296211a29bacSmrgm4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT
296311a29bacSmrg
296411a29bacSmrg# LT_OUTPUT
296511a29bacSmrg# ---------
296611a29bacSmrg# This macro allows early generation of the libtool script (before
296711a29bacSmrg# AC_OUTPUT is called), incase it is used in configure for compilation
296811a29bacSmrg# tests.
296911a29bacSmrgAC_DEFUN([LT_OUTPUT],
297011a29bacSmrg[: ${CONFIG_LT=./config.lt}
297111a29bacSmrgAC_MSG_NOTICE([creating $CONFIG_LT])
297211a29bacSmrg_LT_GENERATED_FILE_INIT(["$CONFIG_LT"],
297311a29bacSmrg[# Run this file to recreate a libtool stub with the current configuration.])
297411a29bacSmrg
297511a29bacSmrgcat >>"$CONFIG_LT" <<\_LTEOF
297611a29bacSmrglt_cl_silent=false
297711a29bacSmrgexec AS_MESSAGE_LOG_FD>>config.log
297811a29bacSmrg{
297911a29bacSmrg  echo
298011a29bacSmrg  AS_BOX([Running $as_me.])
298111a29bacSmrg} >&AS_MESSAGE_LOG_FD
298211a29bacSmrg
298311a29bacSmrglt_cl_help="\
298411a29bacSmrg\`$as_me' creates a local libtool stub from the current configuration,
298511a29bacSmrgfor use in further configure time tests before the real libtool is
298611a29bacSmrggenerated.
298711a29bacSmrg
298811a29bacSmrgUsage: $[0] [[OPTIONS]]
298911a29bacSmrg
299011a29bacSmrg  -h, --help      print this help, then exit
299111a29bacSmrg  -V, --version   print version number, then exit
299211a29bacSmrg  -q, --quiet     do not print progress messages
299311a29bacSmrg  -d, --debug     don't remove temporary files
299411a29bacSmrg
299511a29bacSmrgReport bugs to <bug-libtool@gnu.org>."
299611a29bacSmrg
299711a29bacSmrglt_cl_version="\
299811a29bacSmrgm4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
299911a29bacSmrgm4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
300011a29bacSmrgconfigured by $[0], generated by m4_PACKAGE_STRING.
300111a29bacSmrg
300211a29bacSmrgCopyright (C) 2010 Free Software Foundation, Inc.
300311a29bacSmrgThis config.lt script is free software; the Free Software Foundation
300411a29bacSmrggives unlimited permision to copy, distribute and modify it."
300511a29bacSmrg
300611a29bacSmrgwhile test $[#] != 0
300711a29bacSmrgdo
300811a29bacSmrg  case $[1] in
300911a29bacSmrg    --version | --v* | -V )
301011a29bacSmrg      echo "$lt_cl_version"; exit 0 ;;
301111a29bacSmrg    --help | --h* | -h )
301211a29bacSmrg      echo "$lt_cl_help"; exit 0 ;;
301311a29bacSmrg    --debug | --d* | -d )
301411a29bacSmrg      debug=: ;;
301511a29bacSmrg    --quiet | --q* | --silent | --s* | -q )
301611a29bacSmrg      lt_cl_silent=: ;;
301711a29bacSmrg
301811a29bacSmrg    -*) AC_MSG_ERROR([unrecognized option: $[1]
301911a29bacSmrgTry \`$[0] --help' for more information.]) ;;
302011a29bacSmrg
302111a29bacSmrg    *) AC_MSG_ERROR([unrecognized argument: $[1]
302211a29bacSmrgTry \`$[0] --help' for more information.]) ;;
302311a29bacSmrg  esac
302411a29bacSmrg  shift
302511a29bacSmrgdone
302611a29bacSmrg
302711a29bacSmrgif $lt_cl_silent; then
302811a29bacSmrg  exec AS_MESSAGE_FD>/dev/null
302911a29bacSmrgfi
303011a29bacSmrg_LTEOF
303111a29bacSmrg
303211a29bacSmrgcat >>"$CONFIG_LT" <<_LTEOF
303311a29bacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
303411a29bacSmrg_LTEOF
303511a29bacSmrg
303611a29bacSmrgcat >>"$CONFIG_LT" <<\_LTEOF
303711a29bacSmrgAC_MSG_NOTICE([creating $ofile])
303811a29bacSmrg_LT_OUTPUT_LIBTOOL_COMMANDS
303911a29bacSmrgAS_EXIT(0)
304011a29bacSmrg_LTEOF
304111a29bacSmrgchmod +x "$CONFIG_LT"
304211a29bacSmrg
304311a29bacSmrg# configure is writing to config.log, but config.lt does its own redirection,
304411a29bacSmrg# appending to config.log, which fails on DOS, as config.log is still kept
304511a29bacSmrg# open by configure.  Here we exec the FD to /dev/null, effectively closing
304611a29bacSmrg# config.log, so it can be properly (re)opened and appended to by config.lt.
304711a29bacSmrglt_cl_success=:
304811a29bacSmrgtest "$silent" = yes &&
304911a29bacSmrg  lt_config_lt_args="$lt_config_lt_args --quiet"
305011a29bacSmrgexec AS_MESSAGE_LOG_FD>/dev/null
305111a29bacSmrg$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
305211a29bacSmrgexec AS_MESSAGE_LOG_FD>>config.log
305311a29bacSmrg$lt_cl_success || AS_EXIT(1)
305411a29bacSmrg])# LT_OUTPUT
305511a29bacSmrg
305611a29bacSmrg
305711a29bacSmrg# _LT_CONFIG(TAG)
305811a29bacSmrg# ---------------
305911a29bacSmrg# If TAG is the built-in tag, create an initial libtool script with a
306011a29bacSmrg# default configuration from the untagged config vars.  Otherwise add code
306111a29bacSmrg# to config.status for appending the configuration named by TAG from the
306211a29bacSmrg# matching tagged config vars.
306311a29bacSmrgm4_defun([_LT_CONFIG],
306411a29bacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
306511a29bacSmrg_LT_CONFIG_SAVE_COMMANDS([
306611a29bacSmrg  m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
306711a29bacSmrg  m4_if(_LT_TAG, [C], [
306811a29bacSmrg    # See if we are running on zsh, and set the options which allow our
306911a29bacSmrg    # commands through without removal of \ escapes.
307011a29bacSmrg    if test -n "${ZSH_VERSION+set}" ; then
307111a29bacSmrg      setopt NO_GLOB_SUBST
307211a29bacSmrg    fi
307311a29bacSmrg
307411a29bacSmrg    cfgfile="${ofile}T"
307511a29bacSmrg    trap "$RM \"$cfgfile\"; exit 1" 1 2 15
307611a29bacSmrg    $RM "$cfgfile"
307711a29bacSmrg
307811a29bacSmrg    cat <<_LT_EOF >> "$cfgfile"
307911a29bacSmrg#! $SHELL
308011a29bacSmrg
308111a29bacSmrg# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
308211a29bacSmrg# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
308311a29bacSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
308411a29bacSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
308511a29bacSmrg#
308611a29bacSmrg_LT_COPYING
308711a29bacSmrg_LT_LIBTOOL_TAGS
308811a29bacSmrg
308911a29bacSmrg# ### BEGIN LIBTOOL CONFIG
309011a29bacSmrg_LT_LIBTOOL_CONFIG_VARS
309111a29bacSmrg_LT_LIBTOOL_TAG_VARS
309211a29bacSmrg# ### END LIBTOOL CONFIG
309311a29bacSmrg
309411a29bacSmrg_LT_EOF
309511a29bacSmrg
309611a29bacSmrg  case $host_os in
309711a29bacSmrg  aix3*)
309811a29bacSmrg    cat <<\_LT_EOF >> "$cfgfile"
309911a29bacSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
310011a29bacSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
310111a29bacSmrg# vanish in a puff of smoke.
310211a29bacSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
310311a29bacSmrg  COLLECT_NAMES=
310411a29bacSmrg  export COLLECT_NAMES
310511a29bacSmrgfi
310611a29bacSmrg_LT_EOF
310711a29bacSmrg    ;;
310811a29bacSmrg  esac
310911a29bacSmrg
311011a29bacSmrg  _LT_PROG_LTMAIN
311111a29bacSmrg
311211a29bacSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
311311a29bacSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
311411a29bacSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
311511a29bacSmrg  # is reportedly fixed, but why not run on old versions too?
311611a29bacSmrg  sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
311711a29bacSmrg    || (rm -f "$cfgfile"; exit 1)
311811a29bacSmrg
311911a29bacSmrg  _LT_PROG_XSI_SHELLFNS
312011a29bacSmrg
312111a29bacSmrg  sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
312211a29bacSmrg    || (rm -f "$cfgfile"; exit 1)
312311a29bacSmrg
312411a29bacSmrg  mv -f "$cfgfile" "$ofile" ||
312511a29bacSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
312611a29bacSmrg  chmod +x "$ofile"
312711a29bacSmrg],
312811a29bacSmrg[cat <<_LT_EOF >> "$ofile"
312911a29bacSmrg
313011a29bacSmrgdnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
313111a29bacSmrgdnl in a comment (ie after a #).
313211a29bacSmrg# ### BEGIN LIBTOOL TAG CONFIG: $1
313311a29bacSmrg_LT_LIBTOOL_TAG_VARS(_LT_TAG)
313411a29bacSmrg# ### END LIBTOOL TAG CONFIG: $1
313511a29bacSmrg_LT_EOF
313611a29bacSmrg])dnl /m4_if
313711a29bacSmrg],
313811a29bacSmrg[m4_if([$1], [], [
313911a29bacSmrg    PACKAGE='$PACKAGE'
314011a29bacSmrg    VERSION='$VERSION'
314111a29bacSmrg    TIMESTAMP='$TIMESTAMP'
314211a29bacSmrg    RM='$RM'
314311a29bacSmrg    ofile='$ofile'], [])
314411a29bacSmrg])dnl /_LT_CONFIG_SAVE_COMMANDS
314511a29bacSmrg])# _LT_CONFIG
314611a29bacSmrg
314711a29bacSmrg
314811a29bacSmrg# LT_SUPPORTED_TAG(TAG)
314911a29bacSmrg# ---------------------
315011a29bacSmrg# Trace this macro to discover what tags are supported by the libtool
315111a29bacSmrg# --tag option, using:
315211a29bacSmrg#    autoconf --trace 'LT_SUPPORTED_TAG:$1'
315311a29bacSmrgAC_DEFUN([LT_SUPPORTED_TAG], [])
315411a29bacSmrg
315511a29bacSmrg
315611a29bacSmrg# C support is built-in for now
315711a29bacSmrgm4_define([_LT_LANG_C_enabled], [])
315811a29bacSmrgm4_define([_LT_TAGS], [])
315911a29bacSmrg
316011a29bacSmrg
316111a29bacSmrg# LT_LANG(LANG)
316211a29bacSmrg# -------------
316311a29bacSmrg# Enable libtool support for the given language if not already enabled.
316411a29bacSmrgAC_DEFUN([LT_LANG],
316511a29bacSmrg[AC_BEFORE([$0], [LT_OUTPUT])dnl
316611a29bacSmrgm4_case([$1],
316711a29bacSmrg  [C],			[_LT_LANG(C)],
316811a29bacSmrg  [C++],		[_LT_LANG(CXX)],
316911a29bacSmrg  [Java],		[_LT_LANG(GCJ)],
317011a29bacSmrg  [Fortran 77],		[_LT_LANG(F77)],
317111a29bacSmrg  [Fortran],		[_LT_LANG(FC)],
317211a29bacSmrg  [Windows Resource],	[_LT_LANG(RC)],
317311a29bacSmrg  [m4_ifdef([_LT_LANG_]$1[_CONFIG],
317411a29bacSmrg    [_LT_LANG($1)],
317511a29bacSmrg    [m4_fatal([$0: unsupported language: "$1"])])])dnl
317611a29bacSmrg])# LT_LANG
317711a29bacSmrg
317811a29bacSmrg
317911a29bacSmrg# _LT_LANG(LANGNAME)
318011a29bacSmrg# ------------------
318111a29bacSmrgm4_defun([_LT_LANG],
318211a29bacSmrg[m4_ifdef([_LT_LANG_]$1[_enabled], [],
318311a29bacSmrg  [LT_SUPPORTED_TAG([$1])dnl
318411a29bacSmrg  m4_append([_LT_TAGS], [$1 ])dnl
318511a29bacSmrg  m4_define([_LT_LANG_]$1[_enabled], [])dnl
318611a29bacSmrg  _LT_LANG_$1_CONFIG($1)])dnl
318711a29bacSmrg])# _LT_LANG
318811a29bacSmrg
318911a29bacSmrg
319011a29bacSmrg# _LT_LANG_DEFAULT_CONFIG
319111a29bacSmrg# -----------------------
319211a29bacSmrgm4_defun([_LT_LANG_DEFAULT_CONFIG],
319311a29bacSmrg[AC_PROVIDE_IFELSE([AC_PROG_CXX],
319411a29bacSmrg  [LT_LANG(CXX)],
319511a29bacSmrg  [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
319611a29bacSmrg
319711a29bacSmrgAC_PROVIDE_IFELSE([AC_PROG_F77],
319811a29bacSmrg  [LT_LANG(F77)],
319911a29bacSmrg  [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
320011a29bacSmrg
320111a29bacSmrgAC_PROVIDE_IFELSE([AC_PROG_FC],
320211a29bacSmrg  [LT_LANG(FC)],
320311a29bacSmrg  [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
320411a29bacSmrg
320511a29bacSmrgdnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
320611a29bacSmrgdnl pulling things in needlessly.
320711a29bacSmrgAC_PROVIDE_IFELSE([AC_PROG_GCJ],
320811a29bacSmrg  [LT_LANG(GCJ)],
320911a29bacSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
321011a29bacSmrg    [LT_LANG(GCJ)],
321111a29bacSmrg    [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
321211a29bacSmrg      [LT_LANG(GCJ)],
321311a29bacSmrg      [m4_ifdef([AC_PROG_GCJ],
321411a29bacSmrg	[m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
321511a29bacSmrg       m4_ifdef([A][M_PROG_GCJ],
321611a29bacSmrg	[m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
321711a29bacSmrg       m4_ifdef([LT_PROG_GCJ],
321811a29bacSmrg	[m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
321911a29bacSmrg
322011a29bacSmrgAC_PROVIDE_IFELSE([LT_PROG_RC],
322111a29bacSmrg  [LT_LANG(RC)],
322211a29bacSmrg  [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
322311a29bacSmrg])# _LT_LANG_DEFAULT_CONFIG
322411a29bacSmrg
322511a29bacSmrg# Obsolete macros:
322611a29bacSmrgAU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
322711a29bacSmrgAU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
322811a29bacSmrgAU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
322911a29bacSmrgAU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
323011a29bacSmrgAU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)])
323111a29bacSmrgdnl aclocal-1.4 backwards compatibility:
323211a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_CXX], [])
323311a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_F77], [])
323411a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_FC], [])
323511a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
323611a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_RC], [])
323711a29bacSmrg
323811a29bacSmrg
323911a29bacSmrg# _LT_TAG_COMPILER
324011a29bacSmrg# ----------------
324111a29bacSmrgm4_defun([_LT_TAG_COMPILER],
324211a29bacSmrg[AC_REQUIRE([AC_PROG_CC])dnl
324311a29bacSmrg
324411a29bacSmrg_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
324511a29bacSmrg_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
324611a29bacSmrg_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
324711a29bacSmrg_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
324811a29bacSmrg
324911a29bacSmrg# If no C compiler was specified, use CC.
325011a29bacSmrgLTCC=${LTCC-"$CC"}
325111a29bacSmrg
325211a29bacSmrg# If no C compiler flags were specified, use CFLAGS.
325311a29bacSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
325411a29bacSmrg
325511a29bacSmrg# Allow CC to be a program name with arguments.
325611a29bacSmrgcompiler=$CC
325711a29bacSmrg])# _LT_TAG_COMPILER
325811a29bacSmrg
325911a29bacSmrg
326011a29bacSmrg# _LT_COMPILER_BOILERPLATE
326111a29bacSmrg# ------------------------
326211a29bacSmrg# Check for compiler boilerplate output or warnings with
326311a29bacSmrg# the simple compiler test code.
326411a29bacSmrgm4_defun([_LT_COMPILER_BOILERPLATE],
326511a29bacSmrg[m4_require([_LT_DECL_SED])dnl
326611a29bacSmrgac_outfile=conftest.$ac_objext
326711a29bacSmrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
326811a29bacSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
326911a29bacSmrg_lt_compiler_boilerplate=`cat conftest.err`
327011a29bacSmrg$RM conftest*
327111a29bacSmrg])# _LT_COMPILER_BOILERPLATE
327211a29bacSmrg
327311a29bacSmrg
327411a29bacSmrg# _LT_LINKER_BOILERPLATE
327511a29bacSmrg# ----------------------
327611a29bacSmrg# Check for linker boilerplate output or warnings with
327711a29bacSmrg# the simple link test code.
327811a29bacSmrgm4_defun([_LT_LINKER_BOILERPLATE],
327911a29bacSmrg[m4_require([_LT_DECL_SED])dnl
328011a29bacSmrgac_outfile=conftest.$ac_objext
328111a29bacSmrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
328211a29bacSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
328311a29bacSmrg_lt_linker_boilerplate=`cat conftest.err`
328411a29bacSmrg$RM -r conftest*
328511a29bacSmrg])# _LT_LINKER_BOILERPLATE
328611a29bacSmrg
328711a29bacSmrg# _LT_REQUIRED_DARWIN_CHECKS
328811a29bacSmrg# -------------------------
328911a29bacSmrgm4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
329011a29bacSmrg  case $host_os in
329111a29bacSmrg    rhapsody* | darwin*)
329211a29bacSmrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
329311a29bacSmrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
329411a29bacSmrg    AC_CHECK_TOOL([LIPO], [lipo], [:])
329511a29bacSmrg    AC_CHECK_TOOL([OTOOL], [otool], [:])
329611a29bacSmrg    AC_CHECK_TOOL([OTOOL64], [otool64], [:])
329711a29bacSmrg    _LT_DECL([], [DSYMUTIL], [1],
329811a29bacSmrg      [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
329911a29bacSmrg    _LT_DECL([], [NMEDIT], [1],
330011a29bacSmrg      [Tool to change global to local symbols on Mac OS X])
330111a29bacSmrg    _LT_DECL([], [LIPO], [1],
330211a29bacSmrg      [Tool to manipulate fat objects and archives on Mac OS X])
330311a29bacSmrg    _LT_DECL([], [OTOOL], [1],
330411a29bacSmrg      [ldd/readelf like tool for Mach-O binaries on Mac OS X])
330511a29bacSmrg    _LT_DECL([], [OTOOL64], [1],
330611a29bacSmrg      [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
330711a29bacSmrg
330811a29bacSmrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
330911a29bacSmrg      [lt_cv_apple_cc_single_mod=no
331011a29bacSmrg      if test -z "${LT_MULTI_MODULE}"; then
331111a29bacSmrg	# By default we will add the -single_module flag. You can override
331211a29bacSmrg	# by either setting the environment variable LT_MULTI_MODULE
331311a29bacSmrg	# non-empty at configure time, or by adding -multi_module to the
331411a29bacSmrg	# link flags.
331511a29bacSmrg	rm -rf libconftest.dylib*
331611a29bacSmrg	echo "int foo(void){return 1;}" > conftest.c
331711a29bacSmrg	echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
331811a29bacSmrg-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
331911a29bacSmrg	$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
332011a29bacSmrg	  -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
332111a29bacSmrg        _lt_result=$?
332211a29bacSmrg	if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
332311a29bacSmrg	  lt_cv_apple_cc_single_mod=yes
332411a29bacSmrg	else
332511a29bacSmrg	  cat conftest.err >&AS_MESSAGE_LOG_FD
332611a29bacSmrg	fi
332711a29bacSmrg	rm -rf libconftest.dylib*
332811a29bacSmrg	rm -f conftest.*
332911a29bacSmrg      fi])
333011a29bacSmrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
333111a29bacSmrg      [lt_cv_ld_exported_symbols_list],
333211a29bacSmrg      [lt_cv_ld_exported_symbols_list=no
333311a29bacSmrg      save_LDFLAGS=$LDFLAGS
333411a29bacSmrg      echo "_main" > conftest.sym
333511a29bacSmrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
333611a29bacSmrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
333711a29bacSmrg	[lt_cv_ld_exported_symbols_list=yes],
333811a29bacSmrg	[lt_cv_ld_exported_symbols_list=no])
333911a29bacSmrg	LDFLAGS="$save_LDFLAGS"
334011a29bacSmrg    ])
334111a29bacSmrg    AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load],
334211a29bacSmrg      [lt_cv_ld_force_load=no
334311a29bacSmrg      cat > conftest.c << _LT_EOF
334411a29bacSmrgint forced_loaded() { return 2;}
334511a29bacSmrg_LT_EOF
334611a29bacSmrg      echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD
334711a29bacSmrg      $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD
334811a29bacSmrg      echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD
334911a29bacSmrg      $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD
335011a29bacSmrg      echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD
335111a29bacSmrg      $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD
335211a29bacSmrg      cat > conftest.c << _LT_EOF
335311a29bacSmrgint main() { return 0;}
335411a29bacSmrg_LT_EOF
335511a29bacSmrg      echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD
335611a29bacSmrg      $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err
335711a29bacSmrg      _lt_result=$?
335811a29bacSmrg      if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then
335911a29bacSmrg	lt_cv_ld_force_load=yes
336011a29bacSmrg      else
336111a29bacSmrg	cat conftest.err >&AS_MESSAGE_LOG_FD
336211a29bacSmrg      fi
336311a29bacSmrg        rm -f conftest.err libconftest.a conftest conftest.c
336411a29bacSmrg        rm -rf conftest.dSYM
336511a29bacSmrg    ])
336611a29bacSmrg    case $host_os in
336711a29bacSmrg    rhapsody* | darwin1.[[012]])
336811a29bacSmrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
336911a29bacSmrg    darwin1.*)
337011a29bacSmrg      _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
337111a29bacSmrg    darwin*) # darwin 5.x on
337211a29bacSmrg      # if running on 10.5 or later, the deployment target defaults
337311a29bacSmrg      # to the OS version, if on x86, and 10.4, the deployment
337411245024Smrg      # target defaults to 10.4. Don't you love it?
337511245024Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
337611a29bacSmrg	10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
337711a29bacSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
337811a29bacSmrg	10.[[012]]*)
337911a29bacSmrg	  _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
338011a29bacSmrg	10.*)
338111a29bacSmrg	  _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
338211245024Smrg      esac
338311245024Smrg    ;;
338411245024Smrg  esac
338511245024Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
338611245024Smrg      _lt_dar_single_mod='$single_module'
338711245024Smrg    fi
338811245024Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
338911245024Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
339011245024Smrg    else
339111a29bacSmrg      _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
339211245024Smrg    fi
339311a29bacSmrg    if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then
339411a29bacSmrg      _lt_dsymutil='~$DSYMUTIL $lib || :'
339511245024Smrg    else
339611245024Smrg      _lt_dsymutil=
339711245024Smrg    fi
339811245024Smrg    ;;
339911245024Smrg  esac
340011245024Smrg])
340141b2f0bdSmrg
340211a29bacSmrg
340311a29bacSmrg# _LT_DARWIN_LINKER_FEATURES
340411a29bacSmrg# --------------------------
340511a29bacSmrg# Checks for linker and compiler features on darwin
340611a29bacSmrgm4_defun([_LT_DARWIN_LINKER_FEATURES],
340711a29bacSmrg[
340811a29bacSmrg  m4_require([_LT_REQUIRED_DARWIN_CHECKS])
340911a29bacSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=no
341011a29bacSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
341111a29bacSmrg  _LT_TAGVAR(hardcode_automatic, $1)=yes
341211a29bacSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
341311a29bacSmrg  if test "$lt_cv_ld_force_load" = "yes"; then
341411a29bacSmrg    _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\"`'
341511a29bacSmrg  else
341611a29bacSmrg    _LT_TAGVAR(whole_archive_flag_spec, $1)=''
341711a29bacSmrg  fi
341811a29bacSmrg  _LT_TAGVAR(link_all_deplibs, $1)=yes
341911a29bacSmrg  _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
342011a29bacSmrg  case $cc_basename in
342111a29bacSmrg     ifort*) _lt_dar_can_shared=yes ;;
342211a29bacSmrg     *) _lt_dar_can_shared=$GCC ;;
342311a29bacSmrg  esac
342411a29bacSmrg  if test "$_lt_dar_can_shared" = "yes"; then
342511a29bacSmrg    output_verbose_link_cmd=func_echo_all
342611a29bacSmrg    _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}"
342711a29bacSmrg    _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
342811a29bacSmrg    _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}"
342911a29bacSmrg    _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}"
343011a29bacSmrg    m4_if([$1], [CXX],
343111a29bacSmrg[   if test "$lt_cv_apple_cc_single_mod" != "yes"; then
343211a29bacSmrg      _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}"
343311a29bacSmrg      _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}"
343411a29bacSmrg    fi
343511a29bacSmrg],[])
343611a29bacSmrg  else
343711a29bacSmrg  _LT_TAGVAR(ld_shlibs, $1)=no
343811a29bacSmrg  fi
343911a29bacSmrg])
344011a29bacSmrg
344111a29bacSmrg# _LT_SYS_MODULE_PATH_AIX
344211a29bacSmrg# -----------------------
344311245024Smrg# Links a minimal program and checks the executable
344411245024Smrg# for the system default hardcoded library path. In most cases,
344511245024Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
344611245024Smrg# the location of the communication and MPI libs are included too.
344711245024Smrg# If we don't find anything, use the default library path according
344811245024Smrg# to the aix ld manual.
344911a29bacSmrgm4_defun([_LT_SYS_MODULE_PATH_AIX],
345011a29bacSmrg[m4_require([_LT_DECL_SED])dnl
345111245024SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
345211245024Smrglt_aix_libpath_sed='
345311245024Smrg    /Import File Strings/,/^$/ {
345411245024Smrg	/^0/ {
345511245024Smrg	    s/^0  *\(.*\)$/\1/
345611245024Smrg	    p
345711245024Smrg	}
345811245024Smrg    }'
345911245024Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
346011245024Smrg# Check for a 64-bit object if we didn't find anything.
346111245024Smrgif test -z "$aix_libpath"; then
346211245024Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
346311245024Smrgfi],[])
346411245024Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
346511a29bacSmrg])# _LT_SYS_MODULE_PATH_AIX
346641b2f0bdSmrg
346741b2f0bdSmrg
346811a29bacSmrg# _LT_SHELL_INIT(ARG)
346911a29bacSmrg# -------------------
347011a29bacSmrgm4_define([_LT_SHELL_INIT],
347111a29bacSmrg[m4_divert_text([M4SH-INIT], [$1
347211a29bacSmrg])])# _LT_SHELL_INIT
347341b2f0bdSmrg
347411245024Smrg
347541b2f0bdSmrg
347611a29bacSmrg# _LT_PROG_ECHO_BACKSLASH
347711a29bacSmrg# -----------------------
347811a29bacSmrg# Find how we can fake an echo command that does not interpret backslash.
347911a29bacSmrg# In particular, with Autoconf 2.60 or later we add some code to the start
348011a29bacSmrg# of the generated configure script which will find a shell with a builtin
348111a29bacSmrg# printf (which we can use as an echo command).
348211a29bacSmrgm4_defun([_LT_PROG_ECHO_BACKSLASH],
348311a29bacSmrg[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
348411a29bacSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
348511a29bacSmrgECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
348611a29bacSmrg
348711a29bacSmrgAC_MSG_CHECKING([how to print strings])
348811a29bacSmrg# Test print first, because it will be a builtin if present.
348911a29bacSmrgif test "X`print -r -- -n 2>/dev/null`" = X-n && \
349011a29bacSmrg   test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then
349111a29bacSmrg  ECHO='print -r --'
349211a29bacSmrgelif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then
349311a29bacSmrg  ECHO='printf %s\n'
349411245024Smrgelse
349511a29bacSmrg  # Use this function as a fallback that always works.
349611a29bacSmrg  func_fallback_echo ()
349711a29bacSmrg  {
349811a29bacSmrg    eval 'cat <<_LTECHO_EOF
349911a29bacSmrg$[]1
350011a29bacSmrg_LTECHO_EOF'
350111a29bacSmrg  }
350211a29bacSmrg  ECHO='func_fallback_echo'
350311245024Smrgfi
350411245024Smrg
350511a29bacSmrg# func_echo_all arg...
350611a29bacSmrg# Invoke $ECHO with all args, space-separated.
350711a29bacSmrgfunc_echo_all ()
350811a29bacSmrg{
350911a29bacSmrg    $ECHO "$*" 
351011a29bacSmrg}
351111245024Smrg
351211a29bacSmrgcase "$ECHO" in
351311a29bacSmrg  printf*) AC_MSG_RESULT([printf]) ;;
351411a29bacSmrg  print*) AC_MSG_RESULT([print -r]) ;;
351511a29bacSmrg  *) AC_MSG_RESULT([cat]) ;;
351611a29bacSmrgesac
351741b2f0bdSmrg
351811a29bacSmrgm4_ifdef([_AS_DETECT_SUGGESTED],
351911a29bacSmrg[_AS_DETECT_SUGGESTED([
352011a29bacSmrg  test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || (
352111a29bacSmrg    ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
352211a29bacSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO
352311a29bacSmrg    ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO
352411a29bacSmrg    PATH=/empty FPATH=/empty; export PATH FPATH
352511a29bacSmrg    test "X`printf %s $ECHO`" = "X$ECHO" \
352611a29bacSmrg      || test "X`print -r -- $ECHO`" = "X$ECHO" )])])
352741b2f0bdSmrg
352811a29bacSmrg_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
352911a29bacSmrg_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes])
353011a29bacSmrg])# _LT_PROG_ECHO_BACKSLASH
353141b2f0bdSmrg
353241b2f0bdSmrg
353311a29bacSmrg# _LT_ENABLE_LOCK
353411a29bacSmrg# ---------------
353511a29bacSmrgm4_defun([_LT_ENABLE_LOCK],
353611a29bacSmrg[AC_ARG_ENABLE([libtool-lock],
353711a29bacSmrg  [AS_HELP_STRING([--disable-libtool-lock],
353811a29bacSmrg    [avoid locking (might break parallel builds)])])
353911a29bacSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
354041b2f0bdSmrg
354111245024Smrg# Some flags need to be propagated to the compiler or linker for good
354211245024Smrg# libtool support.
354311245024Smrgcase $host in
354411245024Smrgia64-*-hpux*)
354511245024Smrg  # Find out which ABI we are using.
354611245024Smrg  echo 'int i;' > conftest.$ac_ext
354711245024Smrg  if AC_TRY_EVAL(ac_compile); then
354811245024Smrg    case `/usr/bin/file conftest.$ac_objext` in
354911a29bacSmrg      *ELF-32*)
355011a29bacSmrg	HPUX_IA64_MODE="32"
355111a29bacSmrg	;;
355211a29bacSmrg      *ELF-64*)
355311a29bacSmrg	HPUX_IA64_MODE="64"
355411a29bacSmrg	;;
355541b2f0bdSmrg    esac
355641b2f0bdSmrg  fi
355711245024Smrg  rm -rf conftest*
355841b2f0bdSmrg  ;;
355911245024Smrg*-*-irix6*)
356011245024Smrg  # Find out which ABI we are using.
356111a29bacSmrg  echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext
356211245024Smrg  if AC_TRY_EVAL(ac_compile); then
356311a29bacSmrg    if test "$lt_cv_prog_gnu_ld" = yes; then
356411a29bacSmrg      case `/usr/bin/file conftest.$ac_objext` in
356511a29bacSmrg	*32-bit*)
356611a29bacSmrg	  LD="${LD-ld} -melf32bsmip"
356711a29bacSmrg	  ;;
356811a29bacSmrg	*N32*)
356911a29bacSmrg	  LD="${LD-ld} -melf32bmipn32"
357011a29bacSmrg	  ;;
357111a29bacSmrg	*64-bit*)
357211a29bacSmrg	  LD="${LD-ld} -melf64bmip"
357311a29bacSmrg	;;
357411a29bacSmrg      esac
357511a29bacSmrg    else
357611a29bacSmrg      case `/usr/bin/file conftest.$ac_objext` in
357711a29bacSmrg	*32-bit*)
357811a29bacSmrg	  LD="${LD-ld} -32"
357911a29bacSmrg	  ;;
358011a29bacSmrg	*N32*)
358111a29bacSmrg	  LD="${LD-ld} -n32"
358211a29bacSmrg	  ;;
358311a29bacSmrg	*64-bit*)
358411a29bacSmrg	  LD="${LD-ld} -64"
358511a29bacSmrg	  ;;
358611a29bacSmrg      esac
358711a29bacSmrg    fi
358811245024Smrg  fi
358911245024Smrg  rm -rf conftest*
359041b2f0bdSmrg  ;;
359141b2f0bdSmrg
359211245024Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
359311a29bacSmrgs390*-*linux*|s390*-*tpf*|sparc*-*linux*)
359411245024Smrg  # Find out which ABI we are using.
359511245024Smrg  echo 'int i;' > conftest.$ac_ext
359611245024Smrg  if AC_TRY_EVAL(ac_compile); then
359711245024Smrg    case `/usr/bin/file conftest.o` in
359811a29bacSmrg      *32-bit*)
359911a29bacSmrg	case $host in
360011a29bacSmrg	  x86_64-*kfreebsd*-gnu)
360111a29bacSmrg	    LD="${LD-ld} -m elf_i386_fbsd"
360211a29bacSmrg	    ;;
360311a29bacSmrg	  x86_64-*linux*)
360411a29bacSmrg	    LD="${LD-ld} -m elf_i386"
360511a29bacSmrg	    ;;
360611a29bacSmrg	  ppc64-*linux*|powerpc64-*linux*)
360711a29bacSmrg	    LD="${LD-ld} -m elf32ppclinux"
360811a29bacSmrg	    ;;
360911a29bacSmrg	  s390x-*linux*)
361011a29bacSmrg	    LD="${LD-ld} -m elf_s390"
361111a29bacSmrg	    ;;
361211a29bacSmrg	  sparc64-*linux*)
361311a29bacSmrg	    LD="${LD-ld} -m elf32_sparc"
361411a29bacSmrg	    ;;
361511a29bacSmrg	esac
361611a29bacSmrg	;;
361711a29bacSmrg      *64-bit*)
361811a29bacSmrg	case $host in
361911a29bacSmrg	  x86_64-*kfreebsd*-gnu)
362011a29bacSmrg	    LD="${LD-ld} -m elf_x86_64_fbsd"
362111a29bacSmrg	    ;;
362211a29bacSmrg	  x86_64-*linux*)
362311a29bacSmrg	    LD="${LD-ld} -m elf_x86_64"
362411a29bacSmrg	    ;;
362511a29bacSmrg	  ppc*-*linux*|powerpc*-*linux*)
362611a29bacSmrg	    LD="${LD-ld} -m elf64ppc"
362711a29bacSmrg	    ;;
362811a29bacSmrg	  s390*-*linux*|s390*-*tpf*)
362911a29bacSmrg	    LD="${LD-ld} -m elf64_s390"
363011a29bacSmrg	    ;;
363111a29bacSmrg	  sparc*-*linux*)
363211a29bacSmrg	    LD="${LD-ld} -m elf64_sparc"
363311a29bacSmrg	    ;;
363411a29bacSmrg	esac
363511a29bacSmrg	;;
363611245024Smrg    esac
363711245024Smrg  fi
363811245024Smrg  rm -rf conftest*
363941b2f0bdSmrg  ;;
364041b2f0bdSmrg
364111245024Smrg*-*-sco3.2v5*)
364211245024Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
364311245024Smrg  SAVE_CFLAGS="$CFLAGS"
364411245024Smrg  CFLAGS="$CFLAGS -belf"
364511245024Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
364611245024Smrg    [AC_LANG_PUSH(C)
364711a29bacSmrg     AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
364811245024Smrg     AC_LANG_POP])
364911245024Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
365011245024Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
365111245024Smrg    CFLAGS="$SAVE_CFLAGS"
365211245024Smrg  fi
365341b2f0bdSmrg  ;;
365411245024Smrgsparc*-*solaris*)
365511245024Smrg  # Find out which ABI we are using.
365611245024Smrg  echo 'int i;' > conftest.$ac_ext
365711245024Smrg  if AC_TRY_EVAL(ac_compile); then
365811245024Smrg    case `/usr/bin/file conftest.o` in
365911245024Smrg    *64-bit*)
366011245024Smrg      case $lt_cv_prog_gnu_ld in
366111245024Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
366211245024Smrg      *)
366311a29bacSmrg	if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
366411245024Smrg	  LD="${LD-ld} -64"
366511245024Smrg	fi
366611245024Smrg	;;
366711245024Smrg      esac
366811245024Smrg      ;;
366911245024Smrg    esac
367011245024Smrg  fi
367111245024Smrg  rm -rf conftest*
367241b2f0bdSmrg  ;;
367311245024Smrgesac
367441b2f0bdSmrg
367511245024Smrgneed_locks="$enable_libtool_lock"
367611a29bacSmrg])# _LT_ENABLE_LOCK
367711a29bacSmrg
367811a29bacSmrg
367911a29bacSmrg# _LT_CMD_OLD_ARCHIVE
368011a29bacSmrg# -------------------
368111a29bacSmrgm4_defun([_LT_CMD_OLD_ARCHIVE],
368211a29bacSmrg[AC_CHECK_TOOL(AR, ar, false)
368311a29bacSmrgtest -z "$AR" && AR=ar
368411a29bacSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
368511a29bacSmrg_LT_DECL([], [AR], [1], [The archiver])
368611a29bacSmrg_LT_DECL([], [AR_FLAGS], [1])
368711a29bacSmrg
368811a29bacSmrgAC_CHECK_TOOL(STRIP, strip, :)
368911a29bacSmrgtest -z "$STRIP" && STRIP=:
369011a29bacSmrg_LT_DECL([], [STRIP], [1], [A symbol stripping program])
369111a29bacSmrg
369211a29bacSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
369311a29bacSmrgtest -z "$RANLIB" && RANLIB=:
369411a29bacSmrg_LT_DECL([], [RANLIB], [1],
369511a29bacSmrg    [Commands used to install an old-style archive])
369611a29bacSmrg
369711a29bacSmrg# Determine commands to create old-style static archives.
369811a29bacSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
369911a29bacSmrgold_postinstall_cmds='chmod 644 $oldlib'
370011a29bacSmrgold_postuninstall_cmds=
370111a29bacSmrg
370211a29bacSmrgif test -n "$RANLIB"; then
370311a29bacSmrg  case $host_os in
370411a29bacSmrg  openbsd*)
370511a29bacSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
370611a29bacSmrg    ;;
370711a29bacSmrg  *)
370811a29bacSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
370911a29bacSmrg    ;;
371011a29bacSmrg  esac
371111a29bacSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
371211a29bacSmrgfi
371341b2f0bdSmrg
371411a29bacSmrgcase $host_os in
371511a29bacSmrg  darwin*)
371611a29bacSmrg    lock_old_archive_extraction=yes ;;
371711a29bacSmrg  *)
371811a29bacSmrg    lock_old_archive_extraction=no ;;
371911a29bacSmrgesac
372011a29bacSmrg_LT_DECL([], [old_postinstall_cmds], [2])
372111a29bacSmrg_LT_DECL([], [old_postuninstall_cmds], [2])
372211a29bacSmrg_LT_TAGDECL([], [old_archive_cmds], [2],
372311a29bacSmrg    [Commands used to build an old-style archive])
372411a29bacSmrg_LT_DECL([], [lock_old_archive_extraction], [0],
372511a29bacSmrg    [Whether to use a lock for old archive extraction])
372611a29bacSmrg])# _LT_CMD_OLD_ARCHIVE
372741b2f0bdSmrg
372841b2f0bdSmrg
372911a29bacSmrg# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
373011245024Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
373111245024Smrg# ----------------------------------------------------------------
373211245024Smrg# Check whether the given compiler option works
373311a29bacSmrgAC_DEFUN([_LT_COMPILER_OPTION],
373411a29bacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
373511a29bacSmrgm4_require([_LT_DECL_SED])dnl
373611245024SmrgAC_CACHE_CHECK([$1], [$2],
373711245024Smrg  [$2=no
373811a29bacSmrg   m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
373911245024Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
374011245024Smrg   lt_compiler_flag="$3"
374111245024Smrg   # Insert the option either (1) after the last *FLAGS variable, or
374211245024Smrg   # (2) before a word containing "conftest.", or (3) at the end.
374311245024Smrg   # Note that $ac_compile itself does not contain backslashes and begins
374411245024Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
374511245024Smrg   # The option is referenced via a variable to avoid confusing sed.
374611245024Smrg   lt_compile=`echo "$ac_compile" | $SED \
374711245024Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
374811245024Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
374911245024Smrg   -e 's:$: $lt_compiler_flag:'`
375011a29bacSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
375111245024Smrg   (eval "$lt_compile" 2>conftest.err)
375211245024Smrg   ac_status=$?
375311245024Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
375411a29bacSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
375511245024Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
375611245024Smrg     # The compiler can only warn and ignore the option if not recognized
375711245024Smrg     # So say no if there are warnings other than the usual output.
375811a29bacSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp
375911245024Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
376011245024Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
376111245024Smrg       $2=yes
376211245024Smrg     fi
376311245024Smrg   fi
376411a29bacSmrg   $RM conftest*
376511245024Smrg])
376641b2f0bdSmrg
376711245024Smrgif test x"[$]$2" = xyes; then
376811a29bacSmrg    m4_if([$5], , :, [$5])
376911245024Smrgelse
377011a29bacSmrg    m4_if([$6], , :, [$6])
377111245024Smrgfi
377211a29bacSmrg])# _LT_COMPILER_OPTION
377341b2f0bdSmrg
377411a29bacSmrg# Old name:
377511a29bacSmrgAU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
377611a29bacSmrgdnl aclocal-1.4 backwards compatibility:
377711a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
377841b2f0bdSmrg
377911a29bacSmrg
378011a29bacSmrg# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
378111a29bacSmrg#                  [ACTION-SUCCESS], [ACTION-FAILURE])
378211a29bacSmrg# ----------------------------------------------------
378311a29bacSmrg# Check whether the given linker option works
378411a29bacSmrgAC_DEFUN([_LT_LINKER_OPTION],
378511a29bacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
378611a29bacSmrgm4_require([_LT_DECL_SED])dnl
378711245024SmrgAC_CACHE_CHECK([$1], [$2],
378811245024Smrg  [$2=no
378911245024Smrg   save_LDFLAGS="$LDFLAGS"
379011245024Smrg   LDFLAGS="$LDFLAGS $3"
379111245024Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
379211245024Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
379311245024Smrg     # The linker can only warn and ignore the option if not recognized
379411245024Smrg     # So say no if there are warnings
379511245024Smrg     if test -s conftest.err; then
379611245024Smrg       # Append any errors to the config.log.
379711245024Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
379811a29bacSmrg       $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp
379911245024Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
380011245024Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
380111245024Smrg         $2=yes
380211245024Smrg       fi
380311245024Smrg     else
380411245024Smrg       $2=yes
380511245024Smrg     fi
380611245024Smrg   fi
380711a29bacSmrg   $RM -r conftest*
380811245024Smrg   LDFLAGS="$save_LDFLAGS"
380941b2f0bdSmrg])
381041b2f0bdSmrg
381111245024Smrgif test x"[$]$2" = xyes; then
381211a29bacSmrg    m4_if([$4], , :, [$4])
381341b2f0bdSmrgelse
381411a29bacSmrg    m4_if([$5], , :, [$5])
381511245024Smrgfi
381611a29bacSmrg])# _LT_LINKER_OPTION
381741b2f0bdSmrg
381811a29bacSmrg# Old name:
381911a29bacSmrgAU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
382011a29bacSmrgdnl aclocal-1.4 backwards compatibility:
382111a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
382241b2f0bdSmrg
382311a29bacSmrg
382411a29bacSmrg# LT_CMD_MAX_LEN
382511a29bacSmrg#---------------
382611a29bacSmrgAC_DEFUN([LT_CMD_MAX_LEN],
382711a29bacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
382811a29bacSmrg# find the maximum length of command line arguments
382911245024SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
383011245024SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
383111245024Smrg  i=0
383211245024Smrg  teststring="ABCD"
383341b2f0bdSmrg
383411245024Smrg  case $build_os in
383511245024Smrg  msdosdjgpp*)
383611245024Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
383711245024Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
383811245024Smrg    # during glob expansion).  Even if it were fixed, the result of this
383911245024Smrg    # check would be larger than it should be.
384011245024Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
384111245024Smrg    ;;
384241b2f0bdSmrg
384311245024Smrg  gnu*)
384411245024Smrg    # Under GNU Hurd, this test is not required because there is
384511245024Smrg    # no limit to the length of command line arguments.
384611245024Smrg    # Libtool will interpret -1 as no limit whatsoever
384711245024Smrg    lt_cv_sys_max_cmd_len=-1;
384811245024Smrg    ;;
384941b2f0bdSmrg
385011a29bacSmrg  cygwin* | mingw* | cegcc*)
385111245024Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
385211245024Smrg    # about 5 minutes as the teststring grows exponentially.
385311245024Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
385411245024Smrg    # you end up with a "frozen" computer, even though with patience
385511245024Smrg    # the test eventually succeeds (with a max line length of 256k).
385611245024Smrg    # Instead, let's just punt: use the minimum linelength reported by
385711245024Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
385811245024Smrg    lt_cv_sys_max_cmd_len=8192;
385911245024Smrg    ;;
386041b2f0bdSmrg
386111a29bacSmrg  mint*)
386211a29bacSmrg    # On MiNT this can take a long time and run out of memory.
386311a29bacSmrg    lt_cv_sys_max_cmd_len=8192;
386411a29bacSmrg    ;;
386511a29bacSmrg
386611245024Smrg  amigaos*)
386711245024Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
386811245024Smrg    # So we just punt and use a minimum line length of 8192.
386911245024Smrg    lt_cv_sys_max_cmd_len=8192;
387011245024Smrg    ;;
387141b2f0bdSmrg
387211245024Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
387311245024Smrg    # This has been around since 386BSD, at least.  Likely further.
387411245024Smrg    if test -x /sbin/sysctl; then
387511245024Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
387611245024Smrg    elif test -x /usr/sbin/sysctl; then
387711245024Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
387811245024Smrg    else
387911245024Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
388011245024Smrg    fi
388111245024Smrg    # And add a safety zone
388211245024Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
388311245024Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
388411245024Smrg    ;;
388541b2f0bdSmrg
388611245024Smrg  interix*)
388711245024Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
388811245024Smrg    lt_cv_sys_max_cmd_len=196608
388911245024Smrg    ;;
389041b2f0bdSmrg
389111245024Smrg  osf*)
389211245024Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
389311245024Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
389411245024Smrg    # nice to cause kernel panics so lets avoid the loop below.
389511245024Smrg    # First set a reasonable default.
389611245024Smrg    lt_cv_sys_max_cmd_len=16384
389711245024Smrg    #
389811245024Smrg    if test -x /sbin/sysconfig; then
389911245024Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
390011245024Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
390111245024Smrg      esac
390211245024Smrg    fi
390311245024Smrg    ;;
390411245024Smrg  sco3.2v5*)
390511245024Smrg    lt_cv_sys_max_cmd_len=102400
390611245024Smrg    ;;
390711245024Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
390811245024Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
390911245024Smrg    if test -n "$kargmax"; then
391011a29bacSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[	 ]]//'`
391111245024Smrg    else
391211245024Smrg      lt_cv_sys_max_cmd_len=32768
391311245024Smrg    fi
391411245024Smrg    ;;
391511245024Smrg  *)
391611245024Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
391711245024Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
391811245024Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
391911245024Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
392011245024Smrg    else
392111a29bacSmrg      # Make teststring a little bigger before we do anything with it.
392211a29bacSmrg      # a 1K string should be a reasonable start.
392311a29bacSmrg      for i in 1 2 3 4 5 6 7 8 ; do
392411a29bacSmrg        teststring=$teststring$teststring
392511a29bacSmrg      done
392611245024Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
392711a29bacSmrg      # If test is not a shell built-in, we'll probably end up computing a
392811a29bacSmrg      # maximum length that is only half of the actual maximum length, but
392911a29bacSmrg      # we can't tell.
393011a29bacSmrg      while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \
393111a29bacSmrg	         = "X$teststring$teststring"; } >/dev/null 2>&1 &&
393211245024Smrg	      test $i != 17 # 1/2 MB should be enough
393311245024Smrg      do
393411245024Smrg        i=`expr $i + 1`
393511245024Smrg        teststring=$teststring$teststring
393611245024Smrg      done
393711a29bacSmrg      # Only check the string length outside the loop.
393811a29bacSmrg      lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
393911245024Smrg      teststring=
394011a29bacSmrg      # Add a significant safety factor because C++ compilers can tack on
394111a29bacSmrg      # massive amounts of additional arguments before passing them to the
394211a29bacSmrg      # linker.  It appears as though 1/2 is a usable value.
394311245024Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
394411245024Smrg    fi
394511245024Smrg    ;;
394611245024Smrg  esac
394711245024Smrg])
394811245024Smrgif test -n $lt_cv_sys_max_cmd_len ; then
394911245024Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
395011245024Smrgelse
395111245024Smrg  AC_MSG_RESULT(none)
395211245024Smrgfi
395311a29bacSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
395411a29bacSmrg_LT_DECL([], [max_cmd_len], [0],
395511a29bacSmrg    [What is the maximum length of a command?])
395611a29bacSmrg])# LT_CMD_MAX_LEN
395741b2f0bdSmrg
395811a29bacSmrg# Old name:
395911a29bacSmrgAU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
396011a29bacSmrgdnl aclocal-1.4 backwards compatibility:
396111a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
396241b2f0bdSmrg
396311a29bacSmrg
396411a29bacSmrg# _LT_HEADER_DLFCN
396511a29bacSmrg# ----------------
396611a29bacSmrgm4_defun([_LT_HEADER_DLFCN],
396711a29bacSmrg[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
396811a29bacSmrg])# _LT_HEADER_DLFCN
396941b2f0bdSmrg
397041b2f0bdSmrg
397111a29bacSmrg# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
397211a29bacSmrg#                      ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
397311a29bacSmrg# ----------------------------------------------------------------
397411a29bacSmrgm4_defun([_LT_TRY_DLOPEN_SELF],
397511a29bacSmrg[m4_require([_LT_HEADER_DLFCN])dnl
397611245024Smrgif test "$cross_compiling" = yes; then :
397711245024Smrg  [$4]
397811245024Smrgelse
397911245024Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
398011245024Smrg  lt_status=$lt_dlunknown
398111a29bacSmrg  cat > conftest.$ac_ext <<_LT_EOF
398211a29bacSmrg[#line $LINENO "configure"
398311245024Smrg#include "confdefs.h"
398441b2f0bdSmrg
398511245024Smrg#if HAVE_DLFCN_H
398611245024Smrg#include <dlfcn.h>
398711245024Smrg#endif
398841b2f0bdSmrg
398911245024Smrg#include <stdio.h>
399041b2f0bdSmrg
399111245024Smrg#ifdef RTLD_GLOBAL
399211245024Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
399311245024Smrg#else
399411245024Smrg#  ifdef DL_GLOBAL
399511245024Smrg#    define LT_DLGLOBAL		DL_GLOBAL
399611245024Smrg#  else
399711245024Smrg#    define LT_DLGLOBAL		0
399811245024Smrg#  endif
399911245024Smrg#endif
400041b2f0bdSmrg
400111245024Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
400211245024Smrg   find out it does not work in some platform. */
400311245024Smrg#ifndef LT_DLLAZY_OR_NOW
400411245024Smrg#  ifdef RTLD_LAZY
400511245024Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
400611245024Smrg#  else
400711245024Smrg#    ifdef DL_LAZY
400811245024Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
400911245024Smrg#    else
401011245024Smrg#      ifdef RTLD_NOW
401111245024Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
401211245024Smrg#      else
401311245024Smrg#        ifdef DL_NOW
401411245024Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
401511245024Smrg#        else
401611245024Smrg#          define LT_DLLAZY_OR_NOW	0
401711245024Smrg#        endif
401811245024Smrg#      endif
401911245024Smrg#    endif
402011245024Smrg#  endif
402111245024Smrg#endif
402241b2f0bdSmrg
402311a29bacSmrg/* When -fvisbility=hidden is used, assume the code has been annotated
402411a29bacSmrg   correspondingly for the symbols needed.  */
402511a29bacSmrg#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3))
402611a29bacSmrgvoid fnord () __attribute__((visibility("default")));
402711245024Smrg#endif
402841b2f0bdSmrg
402911a29bacSmrgvoid fnord () { int i=42; }
403011245024Smrgint main ()
403111245024Smrg{
403211245024Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
403311245024Smrg  int status = $lt_dlunknown;
403441b2f0bdSmrg
403511245024Smrg  if (self)
403611245024Smrg    {
403711245024Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
403811a29bacSmrg      else
403911a29bacSmrg        {
404011a29bacSmrg	  if (dlsym( self,"_fnord"))  status = $lt_dlneed_uscore;
404111a29bacSmrg          else puts (dlerror ());
404211a29bacSmrg	}
404311245024Smrg      /* dlclose (self); */
404411245024Smrg    }
404511245024Smrg  else
404611245024Smrg    puts (dlerror ());
404741b2f0bdSmrg
404811a29bacSmrg  return status;
404911245024Smrg}]
405011a29bacSmrg_LT_EOF
405111245024Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
405211245024Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
405311245024Smrg    lt_status=$?
405411245024Smrg    case x$lt_status in
405511245024Smrg      x$lt_dlno_uscore) $1 ;;
405611245024Smrg      x$lt_dlneed_uscore) $2 ;;
405711245024Smrg      x$lt_dlunknown|x*) $3 ;;
405811245024Smrg    esac
405911245024Smrg  else :
406011245024Smrg    # compilation failed
406111245024Smrg    $3
406211245024Smrg  fi
406311245024Smrgfi
406411245024Smrgrm -fr conftest*
406511a29bacSmrg])# _LT_TRY_DLOPEN_SELF
406641b2f0bdSmrg
406741b2f0bdSmrg
406811a29bacSmrg# LT_SYS_DLOPEN_SELF
406911a29bacSmrg# ------------------
407011a29bacSmrgAC_DEFUN([LT_SYS_DLOPEN_SELF],
407111a29bacSmrg[m4_require([_LT_HEADER_DLFCN])dnl
407211245024Smrgif test "x$enable_dlopen" != xyes; then
407311245024Smrg  enable_dlopen=unknown
407411245024Smrg  enable_dlopen_self=unknown
407511245024Smrg  enable_dlopen_self_static=unknown
407611245024Smrgelse
407711245024Smrg  lt_cv_dlopen=no
407811245024Smrg  lt_cv_dlopen_libs=
407941b2f0bdSmrg
408011245024Smrg  case $host_os in
408111245024Smrg  beos*)
408211245024Smrg    lt_cv_dlopen="load_add_on"
408311245024Smrg    lt_cv_dlopen_libs=
408411245024Smrg    lt_cv_dlopen_self=yes
408511245024Smrg    ;;
408641b2f0bdSmrg
408711a29bacSmrg  mingw* | pw32* | cegcc*)
408811245024Smrg    lt_cv_dlopen="LoadLibrary"
408911245024Smrg    lt_cv_dlopen_libs=
409011a29bacSmrg    ;;
409141b2f0bdSmrg
409211245024Smrg  cygwin*)
409311245024Smrg    lt_cv_dlopen="dlopen"
409411245024Smrg    lt_cv_dlopen_libs=
409511a29bacSmrg    ;;
409641b2f0bdSmrg
409711245024Smrg  darwin*)
409811245024Smrg  # if libdl is installed we need to link against it
409911245024Smrg    AC_CHECK_LIB([dl], [dlopen],
410011245024Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
410111245024Smrg    lt_cv_dlopen="dyld"
410211245024Smrg    lt_cv_dlopen_libs=
410311245024Smrg    lt_cv_dlopen_self=yes
410411245024Smrg    ])
410511a29bacSmrg    ;;
410641b2f0bdSmrg
410711245024Smrg  *)
410811245024Smrg    AC_CHECK_FUNC([shl_load],
410911245024Smrg	  [lt_cv_dlopen="shl_load"],
411011245024Smrg      [AC_CHECK_LIB([dld], [shl_load],
411111245024Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
411211245024Smrg	[AC_CHECK_FUNC([dlopen],
411311245024Smrg	      [lt_cv_dlopen="dlopen"],
411411245024Smrg	  [AC_CHECK_LIB([dl], [dlopen],
411511245024Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
411611245024Smrg	    [AC_CHECK_LIB([svld], [dlopen],
411711245024Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
411811245024Smrg	      [AC_CHECK_LIB([dld], [dld_link],
411911245024Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
412011245024Smrg	      ])
412111245024Smrg	    ])
412211245024Smrg	  ])
412311245024Smrg	])
412411245024Smrg      ])
412511245024Smrg    ;;
412611245024Smrg  esac
412741b2f0bdSmrg
412811245024Smrg  if test "x$lt_cv_dlopen" != xno; then
412911245024Smrg    enable_dlopen=yes
413011245024Smrg  else
413111245024Smrg    enable_dlopen=no
413241b2f0bdSmrg  fi
413341b2f0bdSmrg
413411245024Smrg  case $lt_cv_dlopen in
413511245024Smrg  dlopen)
413611245024Smrg    save_CPPFLAGS="$CPPFLAGS"
413711245024Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
413841b2f0bdSmrg
413911245024Smrg    save_LDFLAGS="$LDFLAGS"
414011245024Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
414141b2f0bdSmrg
414211245024Smrg    save_LIBS="$LIBS"
414311245024Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
414441b2f0bdSmrg
414511245024Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
414611245024Smrg	  lt_cv_dlopen_self, [dnl
414711a29bacSmrg	  _LT_TRY_DLOPEN_SELF(
414811245024Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
414911245024Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
415011245024Smrg    ])
415141b2f0bdSmrg
415211245024Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
415311245024Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
415411245024Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
415511a29bacSmrg	  lt_cv_dlopen_self_static, [dnl
415611a29bacSmrg	  _LT_TRY_DLOPEN_SELF(
415711245024Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
415811245024Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
415911245024Smrg      ])
416011245024Smrg    fi
416141b2f0bdSmrg
416211245024Smrg    CPPFLAGS="$save_CPPFLAGS"
416311245024Smrg    LDFLAGS="$save_LDFLAGS"
416411245024Smrg    LIBS="$save_LIBS"
416511245024Smrg    ;;
416611245024Smrg  esac
416741b2f0bdSmrg
416811245024Smrg  case $lt_cv_dlopen_self in
416911245024Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
417011245024Smrg  *) enable_dlopen_self=unknown ;;
417111245024Smrg  esac
417241b2f0bdSmrg
417311245024Smrg  case $lt_cv_dlopen_self_static in
417411245024Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
417511245024Smrg  *) enable_dlopen_self_static=unknown ;;
417611245024Smrg  esac
417711245024Smrgfi
417811a29bacSmrg_LT_DECL([dlopen_support], [enable_dlopen], [0],
417911a29bacSmrg	 [Whether dlopen is supported])
418011a29bacSmrg_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
418111a29bacSmrg	 [Whether dlopen of programs is supported])
418211a29bacSmrg_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
418311a29bacSmrg	 [Whether dlopen of statically linked programs is supported])
418411a29bacSmrg])# LT_SYS_DLOPEN_SELF
418541b2f0bdSmrg
418611a29bacSmrg# Old name:
418711a29bacSmrgAU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
418811a29bacSmrgdnl aclocal-1.4 backwards compatibility:
418911a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
419041b2f0bdSmrg
419111a29bacSmrg
419211a29bacSmrg# _LT_COMPILER_C_O([TAGNAME])
419311a29bacSmrg# ---------------------------
419411a29bacSmrg# Check to see if options -c and -o are simultaneously supported by compiler.
419511a29bacSmrg# This macro does not hard code the compiler like AC_PROG_CC_C_O.
419611a29bacSmrgm4_defun([_LT_COMPILER_C_O],
419711a29bacSmrg[m4_require([_LT_DECL_SED])dnl
419811a29bacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
419911a29bacSmrgm4_require([_LT_TAG_COMPILER])dnl
420011245024SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
420111a29bacSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
420211a29bacSmrg  [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
420311a29bacSmrg   $RM -r conftest 2>/dev/null
420411245024Smrg   mkdir conftest
420511245024Smrg   cd conftest
420611245024Smrg   mkdir out
420711245024Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
420841b2f0bdSmrg
420911245024Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
421011245024Smrg   # Insert the option either (1) after the last *FLAGS variable, or
421111245024Smrg   # (2) before a word containing "conftest.", or (3) at the end.
421211245024Smrg   # Note that $ac_compile itself does not contain backslashes and begins
421311245024Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
421411245024Smrg   lt_compile=`echo "$ac_compile" | $SED \
421511245024Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
421611245024Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
421711245024Smrg   -e 's:$: $lt_compiler_flag:'`
421811a29bacSmrg   (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
421911245024Smrg   (eval "$lt_compile" 2>out/conftest.err)
422011245024Smrg   ac_status=$?
422111245024Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
422211a29bacSmrg   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
422311245024Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
422411245024Smrg   then
422511245024Smrg     # The compiler can only warn and ignore the option if not recognized
422611245024Smrg     # So say no if there are warnings
422711a29bacSmrg     $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp
422811245024Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
422911245024Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
423011a29bacSmrg       _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
423111245024Smrg     fi
423211245024Smrg   fi
423311245024Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
423411a29bacSmrg   $RM conftest*
423511245024Smrg   # SGI C++ compiler will create directory out/ii_files/ for
423611245024Smrg   # template instantiation
423711a29bacSmrg   test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
423811a29bacSmrg   $RM out/* && rmdir out
423911245024Smrg   cd ..
424011a29bacSmrg   $RM -r conftest
424111a29bacSmrg   $RM conftest*
424211245024Smrg])
424311a29bacSmrg_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
424411a29bacSmrg	[Does compiler simultaneously support -c and -o options?])
424511a29bacSmrg])# _LT_COMPILER_C_O
424641b2f0bdSmrg
424741b2f0bdSmrg
424811a29bacSmrg# _LT_COMPILER_FILE_LOCKS([TAGNAME])
424911a29bacSmrg# ----------------------------------
425011245024Smrg# Check to see if we can do hard links to lock some files if needed
425111a29bacSmrgm4_defun([_LT_COMPILER_FILE_LOCKS],
425211a29bacSmrg[m4_require([_LT_ENABLE_LOCK])dnl
425311a29bacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
425411a29bacSmrg_LT_COMPILER_C_O([$1])
425541b2f0bdSmrg
425611245024Smrghard_links="nottested"
425711a29bacSmrgif test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
425811245024Smrg  # do not overwrite the value of need_locks provided by the user
425911245024Smrg  AC_MSG_CHECKING([if we can lock with hard links])
426011245024Smrg  hard_links=yes
426111a29bacSmrg  $RM conftest*
426211245024Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
426311245024Smrg  touch conftest.a
426411245024Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
426511245024Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
426611245024Smrg  AC_MSG_RESULT([$hard_links])
426711245024Smrg  if test "$hard_links" = no; then
426811245024Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
426911245024Smrg    need_locks=warn
427011245024Smrg  fi
427141b2f0bdSmrgelse
427211245024Smrg  need_locks=no
427341b2f0bdSmrgfi
427411a29bacSmrg_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
427511a29bacSmrg])# _LT_COMPILER_FILE_LOCKS
427641b2f0bdSmrg
427711245024Smrg
427811a29bacSmrg# _LT_CHECK_OBJDIR
427911a29bacSmrg# ----------------
428011a29bacSmrgm4_defun([_LT_CHECK_OBJDIR],
428111245024Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
428211245024Smrg[rm -f .libs 2>/dev/null
428311245024Smrgmkdir .libs 2>/dev/null
428411245024Smrgif test -d .libs; then
428511245024Smrg  lt_cv_objdir=.libs
428641b2f0bdSmrgelse
428711245024Smrg  # MS-DOS does not allow filenames that begin with a dot.
428811245024Smrg  lt_cv_objdir=_libs
428941b2f0bdSmrgfi
429011245024Smrgrmdir .libs 2>/dev/null])
429111245024Smrgobjdir=$lt_cv_objdir
429211a29bacSmrg_LT_DECL([], [objdir], [0],
429311a29bacSmrg         [The name of the directory that contains temporary libtool files])dnl
429411a29bacSmrgm4_pattern_allow([LT_OBJDIR])dnl
429511a29bacSmrgAC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
429611a29bacSmrg  [Define to the sub-directory in which libtool stores uninstalled libraries.])
429711a29bacSmrg])# _LT_CHECK_OBJDIR
429841b2f0bdSmrg
429941b2f0bdSmrg
430011a29bacSmrg# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
430111a29bacSmrg# --------------------------------------
430211245024Smrg# Check hardcoding attributes.
430311a29bacSmrgm4_defun([_LT_LINKER_HARDCODE_LIBPATH],
430411245024Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
430511a29bacSmrg_LT_TAGVAR(hardcode_action, $1)=
430611a29bacSmrgif test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
430711a29bacSmrg   test -n "$_LT_TAGVAR(runpath_var, $1)" ||
430811a29bacSmrg   test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
430941b2f0bdSmrg
431011a29bacSmrg  # We can hardcode non-existent directories.
431111a29bacSmrg  if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
431211245024Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
431311245024Smrg     # have to relink, otherwise we might link with an installed library
431411245024Smrg     # when we should be linking with a yet-to-be-installed one
431511a29bacSmrg     ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
431611a29bacSmrg     test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
431711245024Smrg    # Linking always hardcodes the temporary library directory.
431811a29bacSmrg    _LT_TAGVAR(hardcode_action, $1)=relink
431911245024Smrg  else
432011245024Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
432111a29bacSmrg    _LT_TAGVAR(hardcode_action, $1)=immediate
432211245024Smrg  fi
432311245024Smrgelse
432411245024Smrg  # We cannot hardcode anything, or else we can only hardcode existing
432511245024Smrg  # directories.
432611a29bacSmrg  _LT_TAGVAR(hardcode_action, $1)=unsupported
432711245024Smrgfi
432811a29bacSmrgAC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
432941b2f0bdSmrg
433011a29bacSmrgif test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
433111a29bacSmrg   test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
433211245024Smrg  # Fast installation is not supported
433311245024Smrg  enable_fast_install=no
433411245024Smrgelif test "$shlibpath_overrides_runpath" = yes ||
433511245024Smrg     test "$enable_shared" = no; then
433611245024Smrg  # Fast installation is not necessary
433711245024Smrg  enable_fast_install=needless
433811245024Smrgfi
433911a29bacSmrg_LT_TAGDECL([], [hardcode_action], [0],
434011a29bacSmrg    [How to hardcode a shared library path into an executable])
434111a29bacSmrg])# _LT_LINKER_HARDCODE_LIBPATH
434241b2f0bdSmrg
434341b2f0bdSmrg
434411a29bacSmrg# _LT_CMD_STRIPLIB
434511a29bacSmrg# ----------------
434611a29bacSmrgm4_defun([_LT_CMD_STRIPLIB],
434711a29bacSmrg[m4_require([_LT_DECL_EGREP])
434811a29bacSmrgstriplib=
434911245024Smrgold_striplib=
435011245024SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
435111a29bacSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
435211245024Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
435311245024Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
435411245024Smrg  AC_MSG_RESULT([yes])
435541b2f0bdSmrgelse
435611245024Smrg# FIXME - insert some real tests, host_os isn't really good enough
435711245024Smrg  case $host_os in
435811a29bacSmrg  darwin*)
435911a29bacSmrg    if test -n "$STRIP" ; then
436011a29bacSmrg      striplib="$STRIP -x"
436111a29bacSmrg      old_striplib="$STRIP -S"
436211a29bacSmrg      AC_MSG_RESULT([yes])
436311a29bacSmrg    else
436411a29bacSmrg      AC_MSG_RESULT([no])
436511a29bacSmrg    fi
436611a29bacSmrg    ;;
436711a29bacSmrg  *)
436811a29bacSmrg    AC_MSG_RESULT([no])
436941b2f0bdSmrg    ;;
437011245024Smrg  esac
437111245024Smrgfi
437211a29bacSmrg_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
437311a29bacSmrg_LT_DECL([], [striplib], [1])
437411a29bacSmrg])# _LT_CMD_STRIPLIB
437541b2f0bdSmrg
437641b2f0bdSmrg
437711a29bacSmrg# _LT_SYS_DYNAMIC_LINKER([TAG])
437811245024Smrg# -----------------------------
437911245024Smrg# PORTME Fill in your ld.so characteristics
438011a29bacSmrgm4_defun([_LT_SYS_DYNAMIC_LINKER],
438111a29bacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
438211a29bacSmrgm4_require([_LT_DECL_EGREP])dnl
438311a29bacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
438411a29bacSmrgm4_require([_LT_DECL_OBJDUMP])dnl
438511a29bacSmrgm4_require([_LT_DECL_SED])dnl
438611a29bacSmrgm4_require([_LT_CHECK_SHELL_FEATURES])dnl
438711245024SmrgAC_MSG_CHECKING([dynamic linker characteristics])
438811a29bacSmrgm4_if([$1],
438911a29bacSmrg	[], [
439011245024Smrgif test "$GCC" = yes; then
439111245024Smrg  case $host_os in
439211245024Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
439311245024Smrg    *) lt_awk_arg="/^libraries:/" ;;
439411245024Smrg  esac
439511a29bacSmrg  case $host_os in
439611a29bacSmrg    mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;;
439711a29bacSmrg    *) lt_sed_strip_eq="s,=/,/,g" ;;
439811a29bacSmrg  esac
439911a29bacSmrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq`
440011a29bacSmrg  case $lt_search_path_spec in
440111a29bacSmrg  *\;*)
440211245024Smrg    # if the path contains ";" then we assume it to be the separator
440311245024Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
440411245024Smrg    # assumed that no part of a normal pathname contains ";" but that should
440511245024Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
440611a29bacSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'`
440711a29bacSmrg    ;;
440811a29bacSmrg  *)
440911a29bacSmrg    lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"`
441011a29bacSmrg    ;;
441111a29bacSmrg  esac
441211245024Smrg  # Ok, now we have the path, separated by spaces, we can step through it
441311245024Smrg  # and add multilib dir if necessary.
441411245024Smrg  lt_tmp_lt_search_path_spec=
441511245024Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
441611245024Smrg  for lt_sys_path in $lt_search_path_spec; do
441711245024Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
441811245024Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
441911245024Smrg    else
442011245024Smrg      test -d "$lt_sys_path" && \
442111245024Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
442241b2f0bdSmrg    fi
442311245024Smrg  done
442411a29bacSmrg  lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk '
442511245024SmrgBEGIN {RS=" "; FS="/|\n";} {
442611245024Smrg  lt_foo="";
442711245024Smrg  lt_count=0;
442811245024Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
442911245024Smrg    if ($lt_i != "" && $lt_i != ".") {
443011245024Smrg      if ($lt_i == "..") {
443111245024Smrg        lt_count++;
443211245024Smrg      } else {
443311245024Smrg        if (lt_count == 0) {
443411245024Smrg          lt_foo="/" $lt_i lt_foo;
443511245024Smrg        } else {
443611245024Smrg          lt_count--;
443711245024Smrg        }
443811245024Smrg      }
443911245024Smrg    }
444011245024Smrg  }
444111245024Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
444211245024Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
444311245024Smrg}'`
444411a29bacSmrg  # AWK program above erroneously prepends '/' to C:/dos/paths
444511a29bacSmrg  # for these hosts.
444611a29bacSmrg  case $host_os in
444711a29bacSmrg    mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\
444811a29bacSmrg      $SED 's,/\([[A-Za-z]]:\),\1,g'` ;;
444911a29bacSmrg  esac
445011a29bacSmrg  sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP`
445111245024Smrgelse
445211245024Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
445311245024Smrgfi])
445411a29bacSmrglibrary_names_spec=
445511a29bacSmrglibname_spec='lib$name'
445611a29bacSmrgsoname_spec=
445711a29bacSmrgshrext_cmds=".so"
445811a29bacSmrgpostinstall_cmds=
445911a29bacSmrgpostuninstall_cmds=
446011a29bacSmrgfinish_cmds=
446111a29bacSmrgfinish_eval=
446211a29bacSmrgshlibpath_var=
446311a29bacSmrgshlibpath_overrides_runpath=unknown
446411a29bacSmrgversion_type=none
446511a29bacSmrgdynamic_linker="$host_os ld.so"
446611a29bacSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
446711245024Smrgneed_lib_prefix=unknown
446811245024Smrghardcode_into_libs=no
446941b2f0bdSmrg
447011245024Smrg# when you set need_version to no, make sure it does not cause -set_version
447111245024Smrg# flags to be left without arguments
447211245024Smrgneed_version=unknown
447341b2f0bdSmrg
447411245024Smrgcase $host_os in
447511245024Smrgaix3*)
447611245024Smrg  version_type=linux
447711245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
447811245024Smrg  shlibpath_var=LIBPATH
447941b2f0bdSmrg
448011245024Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
448111245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
448211245024Smrg  ;;
448341b2f0bdSmrg
448411245024Smrgaix[[4-9]]*)
448511245024Smrg  version_type=linux
448611245024Smrg  need_lib_prefix=no
448711245024Smrg  need_version=no
448811245024Smrg  hardcode_into_libs=yes
448911245024Smrg  if test "$host_cpu" = ia64; then
449011245024Smrg    # AIX 5 supports IA64
449111245024Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
449211245024Smrg    shlibpath_var=LD_LIBRARY_PATH
449311245024Smrg  else
449411245024Smrg    # With GCC up to 2.95.x, collect2 would create an import file
449511245024Smrg    # for dependence libraries.  The import file would start with
449611245024Smrg    # the line `#! .'.  This would cause the generated library to
449711245024Smrg    # depend on `.', always an invalid library.  This was fixed in
449811245024Smrg    # development snapshots of GCC prior to 3.0.
449911245024Smrg    case $host_os in
450011245024Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
450111245024Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
450211245024Smrg	   echo ' yes '
450311a29bacSmrg	   echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
450411245024Smrg	:
450541b2f0bdSmrg      else
450611245024Smrg	can_build_shared=no
450741b2f0bdSmrg      fi
450811245024Smrg      ;;
450911245024Smrg    esac
451011245024Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
451111245024Smrg    # soname into executable. Probably we can add versioning support to
451211245024Smrg    # collect2, so additional links can be useful in future.
451311245024Smrg    if test "$aix_use_runtimelinking" = yes; then
451411245024Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
451511245024Smrg      # instead of lib<name>.a to let people know that these are not
451611245024Smrg      # typical AIX shared libraries.
451711245024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
451841b2f0bdSmrg    else
451911245024Smrg      # We preserve .a as extension for shared libraries through AIX4.2
452011245024Smrg      # and later when we are not doing run time linking.
452111245024Smrg      library_names_spec='${libname}${release}.a $libname.a'
452211245024Smrg      soname_spec='${libname}${release}${shared_ext}$major'
452341b2f0bdSmrg    fi
452411245024Smrg    shlibpath_var=LIBPATH
452511245024Smrg  fi
452611245024Smrg  ;;
452741b2f0bdSmrg
452811245024Smrgamigaos*)
452911a29bacSmrg  case $host_cpu in
453011a29bacSmrg  powerpc)
453111a29bacSmrg    # Since July 2007 AmigaOS4 officially supports .so libraries.
453211a29bacSmrg    # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
453311a29bacSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
453411a29bacSmrg    ;;
453511a29bacSmrg  m68k)
453611a29bacSmrg    library_names_spec='$libname.ixlibrary $libname.a'
453711a29bacSmrg    # Create ${libname}_ixlibrary.a entries in /sys/libs.
453811a29bacSmrg    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'
453911a29bacSmrg    ;;
454011a29bacSmrg  esac
454111245024Smrg  ;;
454241b2f0bdSmrg
454311245024Smrgbeos*)
454411245024Smrg  library_names_spec='${libname}${shared_ext}'
454511245024Smrg  dynamic_linker="$host_os ld.so"
454611245024Smrg  shlibpath_var=LIBRARY_PATH
454711245024Smrg  ;;
454841b2f0bdSmrg
454911245024Smrgbsdi[[45]]*)
455011245024Smrg  version_type=linux
455111245024Smrg  need_version=no
455211245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
455311245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
455411245024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
455511245024Smrg  shlibpath_var=LD_LIBRARY_PATH
455611245024Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
455711245024Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
455811245024Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
455911245024Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
456011245024Smrg  # libtool to hard-code these into programs
456141b2f0bdSmrg  ;;
456241b2f0bdSmrg
456311a29bacSmrgcygwin* | mingw* | pw32* | cegcc*)
456411245024Smrg  version_type=windows
456511245024Smrg  shrext_cmds=".dll"
456611245024Smrg  need_version=no
456711245024Smrg  need_lib_prefix=no
456841b2f0bdSmrg
456911245024Smrg  case $GCC,$host_os in
457011a29bacSmrg  yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
457111245024Smrg    library_names_spec='$libname.dll.a'
457211245024Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
457311245024Smrg    postinstall_cmds='base_file=`basename \${file}`~
457411a29bacSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
457511245024Smrg      dldir=$destdir/`dirname \$dlpath`~
457611245024Smrg      test -d \$dldir || mkdir -p \$dldir~
457711245024Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
457811a29bacSmrg      chmod a+x \$dldir/$dlname~
457911a29bacSmrg      if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
458011a29bacSmrg        eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
458111a29bacSmrg      fi'
458211245024Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
458311245024Smrg      dlpath=$dir/\$dldll~
458411a29bacSmrg       $RM \$dlpath'
458511245024Smrg    shlibpath_overrides_runpath=yes
458641b2f0bdSmrg
458711245024Smrg    case $host_os in
458811245024Smrg    cygwin*)
458911245024Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
459011245024Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
459111a29bacSmrgm4_if([$1], [],[
459211a29bacSmrg      sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"])
459341b2f0bdSmrg      ;;
459411a29bacSmrg    mingw* | cegcc*)
459511245024Smrg      # MinGW DLLs use traditional 'lib' prefix
459611245024Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
459741b2f0bdSmrg      ;;
459811245024Smrg    pw32*)
459911245024Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
460011245024Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
460111245024Smrg      ;;
460241b2f0bdSmrg    esac
460341b2f0bdSmrg    ;;
460441b2f0bdSmrg
460511245024Smrg  *)
460611245024Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
460711245024Smrg    ;;
460811245024Smrg  esac
460911245024Smrg  dynamic_linker='Win32 ld.exe'
461011245024Smrg  # FIXME: first we should search . and the directory the executable is in
461111245024Smrg  shlibpath_var=PATH
461211245024Smrg  ;;
461341b2f0bdSmrg
461411245024Smrgdarwin* | rhapsody*)
461511245024Smrg  dynamic_linker="$host_os dyld"
461611245024Smrg  version_type=darwin
461711245024Smrg  need_lib_prefix=no
461811245024Smrg  need_version=no
461911a29bacSmrg  library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
462011245024Smrg  soname_spec='${libname}${release}${major}$shared_ext'
462111245024Smrg  shlibpath_overrides_runpath=yes
462211245024Smrg  shlibpath_var=DYLD_LIBRARY_PATH
462311245024Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
462411a29bacSmrgm4_if([$1], [],[
462511a29bacSmrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
462611245024Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
462711245024Smrg  ;;
462841b2f0bdSmrg
462911245024Smrgdgux*)
463011245024Smrg  version_type=linux
463111245024Smrg  need_lib_prefix=no
463211245024Smrg  need_version=no
463311245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
463411245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
463511245024Smrg  shlibpath_var=LD_LIBRARY_PATH
463611245024Smrg  ;;
463741b2f0bdSmrg
463811245024Smrgfreebsd1*)
463911245024Smrg  dynamic_linker=no
464011245024Smrg  ;;
464141b2f0bdSmrg
464211245024Smrgfreebsd* | dragonfly*)
464311245024Smrg  # DragonFly does not have aout.  When/if they implement a new
464411245024Smrg  # versioning mechanism, adjust this.
464511245024Smrg  if test -x /usr/bin/objformat; then
464611245024Smrg    objformat=`/usr/bin/objformat`
464711245024Smrg  else
464811245024Smrg    case $host_os in
464911245024Smrg    freebsd[[123]]*) objformat=aout ;;
465011245024Smrg    *) objformat=elf ;;
465141b2f0bdSmrg    esac
465211245024Smrg  fi
465311245024Smrg  version_type=freebsd-$objformat
465411245024Smrg  case $version_type in
465511245024Smrg    freebsd-elf*)
465611245024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
465711245024Smrg      need_version=no
465811245024Smrg      need_lib_prefix=no
465911245024Smrg      ;;
466011245024Smrg    freebsd-*)
466111245024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
466211245024Smrg      need_version=yes
466311245024Smrg      ;;
466411245024Smrg  esac
466511245024Smrg  shlibpath_var=LD_LIBRARY_PATH
466611245024Smrg  case $host_os in
466711245024Smrg  freebsd2*)
466811245024Smrg    shlibpath_overrides_runpath=yes
466941b2f0bdSmrg    ;;
467011245024Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
467111245024Smrg    shlibpath_overrides_runpath=yes
467211245024Smrg    hardcode_into_libs=yes
467341b2f0bdSmrg    ;;
467411245024Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
467511245024Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
467611245024Smrg    shlibpath_overrides_runpath=no
467711245024Smrg    hardcode_into_libs=yes
467841b2f0bdSmrg    ;;
467911245024Smrg  *) # from 4.6 on, and DragonFly
468011245024Smrg    shlibpath_overrides_runpath=yes
468111245024Smrg    hardcode_into_libs=yes
468241b2f0bdSmrg    ;;
468311245024Smrg  esac
468411245024Smrg  ;;
468541b2f0bdSmrg
468611245024Smrggnu*)
468711245024Smrg  version_type=linux
468811245024Smrg  need_lib_prefix=no
468911245024Smrg  need_version=no
469011245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
469111245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
469211245024Smrg  shlibpath_var=LD_LIBRARY_PATH
469311245024Smrg  hardcode_into_libs=yes
469411245024Smrg  ;;
469541b2f0bdSmrg
469611a29bacSmrghaiku*)
469711a29bacSmrg  version_type=linux
469811a29bacSmrg  need_lib_prefix=no
469911a29bacSmrg  need_version=no
470011a29bacSmrg  dynamic_linker="$host_os runtime_loader"
470111a29bacSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
470211a29bacSmrg  soname_spec='${libname}${release}${shared_ext}$major'
470311a29bacSmrg  shlibpath_var=LIBRARY_PATH
470411a29bacSmrg  shlibpath_overrides_runpath=yes
470511a29bacSmrg  sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
470611a29bacSmrg  hardcode_into_libs=yes
470711a29bacSmrg  ;;
470811a29bacSmrg
470911245024Smrghpux9* | hpux10* | hpux11*)
471011245024Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
471111245024Smrg  # link against other versions.
471211245024Smrg  version_type=sunos
471311245024Smrg  need_lib_prefix=no
471411245024Smrg  need_version=no
471511245024Smrg  case $host_cpu in
471611245024Smrg  ia64*)
471711245024Smrg    shrext_cmds='.so'
471811245024Smrg    hardcode_into_libs=yes
471911245024Smrg    dynamic_linker="$host_os dld.so"
472011245024Smrg    shlibpath_var=LD_LIBRARY_PATH
472111245024Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
472211245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
472311245024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
472411245024Smrg    if test "X$HPUX_IA64_MODE" = X32; then
472511245024Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
472611245024Smrg    else
472711245024Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
472811245024Smrg    fi
472911245024Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
473011245024Smrg    ;;
473111a29bacSmrg  hppa*64*)
473211a29bacSmrg    shrext_cmds='.sl'
473311a29bacSmrg    hardcode_into_libs=yes
473411a29bacSmrg    dynamic_linker="$host_os dld.sl"
473511a29bacSmrg    shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
473611a29bacSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
473711a29bacSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
473811a29bacSmrg    soname_spec='${libname}${release}${shared_ext}$major'
473911a29bacSmrg    sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
474011a29bacSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
474111a29bacSmrg    ;;
474211a29bacSmrg  *)
474311245024Smrg    shrext_cmds='.sl'
474411245024Smrg    dynamic_linker="$host_os dld.sl"
474511245024Smrg    shlibpath_var=SHLIB_PATH
474611245024Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
474711245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
474811245024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
474911245024Smrg    ;;
475011245024Smrg  esac
475111a29bacSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555, ...
475211245024Smrg  postinstall_cmds='chmod 555 $lib'
475311a29bacSmrg  # or fails outright, so override atomically:
475411a29bacSmrg  install_override_mode=555
475511245024Smrg  ;;
475641b2f0bdSmrg
475711245024Smrginterix[[3-9]]*)
475811245024Smrg  version_type=linux
475911245024Smrg  need_lib_prefix=no
476011245024Smrg  need_version=no
476111245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
476211245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
476311245024Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
476411245024Smrg  shlibpath_var=LD_LIBRARY_PATH
476511245024Smrg  shlibpath_overrides_runpath=no
476611245024Smrg  hardcode_into_libs=yes
476711245024Smrg  ;;
476841b2f0bdSmrg
476911245024Smrgirix5* | irix6* | nonstopux*)
477011245024Smrg  case $host_os in
477111245024Smrg    nonstopux*) version_type=nonstopux ;;
477211245024Smrg    *)
477311245024Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
477411245024Smrg		version_type=linux
477541b2f0bdSmrg	else
477611245024Smrg		version_type=irix
477711245024Smrg	fi ;;
477811245024Smrg  esac
477911245024Smrg  need_lib_prefix=no
478011245024Smrg  need_version=no
478111245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
478211245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
478311245024Smrg  case $host_os in
478411245024Smrg  irix5* | nonstopux*)
478511245024Smrg    libsuff= shlibsuff=
478611245024Smrg    ;;
478711245024Smrg  *)
478811245024Smrg    case $LD in # libtool.m4 will add one of these switches to LD
478911245024Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
479011245024Smrg      libsuff= shlibsuff= libmagic=32-bit;;
479111245024Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
479211245024Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
479311245024Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
479411245024Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
479511245024Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
479641b2f0bdSmrg    esac
479741b2f0bdSmrg    ;;
479811245024Smrg  esac
479911245024Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
480011245024Smrg  shlibpath_overrides_runpath=no
480111245024Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
480211245024Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
480311245024Smrg  hardcode_into_libs=yes
480411245024Smrg  ;;
480541b2f0bdSmrg
480611245024Smrg# No shared lib support for Linux oldld, aout, or coff.
480711245024Smrglinux*oldld* | linux*aout* | linux*coff*)
480811245024Smrg  dynamic_linker=no
480911245024Smrg  ;;
481041b2f0bdSmrg
481111245024Smrg# This must be Linux ELF.
481211a29bacSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
481311245024Smrg  version_type=linux
481411245024Smrg  need_lib_prefix=no
481511245024Smrg  need_version=no
481611245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
481711245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
481811245024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
481911245024Smrg  shlibpath_var=LD_LIBRARY_PATH
482011245024Smrg  shlibpath_overrides_runpath=no
482111a29bacSmrg
482211a29bacSmrg  # Some binutils ld are patched to set DT_RUNPATH
482311a29bacSmrg  AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath],
482411a29bacSmrg    [lt_cv_shlibpath_overrides_runpath=no
482511a29bacSmrg    save_LDFLAGS=$LDFLAGS
482611a29bacSmrg    save_libdir=$libdir
482711a29bacSmrg    eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
482811a29bacSmrg	 LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
482911a29bacSmrg    AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
483011a29bacSmrg      [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
483111a29bacSmrg	 [lt_cv_shlibpath_overrides_runpath=yes])])
483211a29bacSmrg    LDFLAGS=$save_LDFLAGS
483311a29bacSmrg    libdir=$save_libdir
483411a29bacSmrg    ])
483511a29bacSmrg  shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath
483611a29bacSmrg
483711245024Smrg  # This implies no fast_install, which is unacceptable.
483811245024Smrg  # Some rework will be needed to allow for fast_install
483911245024Smrg  # before this can be enabled.
484011245024Smrg  hardcode_into_libs=yes
484141b2f0bdSmrg
484211245024Smrg  # Append ld.so.conf contents to the search path
484311245024Smrg  if test -f /etc/ld.so.conf; then
484411a29bacSmrg    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' ' '`
484511245024Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
484611245024Smrg  fi
484741b2f0bdSmrg
484811245024Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
484911245024Smrg  # powerpc, because MkLinux only supported shared libraries with the
485011245024Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
485111245024Smrg  # most powerpc-linux boxes support dynamic linking these days and
485211245024Smrg  # people can always --disable-shared, the test was removed, and we
485311245024Smrg  # assume the GNU/Linux dynamic linker is in use.
485411245024Smrg  dynamic_linker='GNU/Linux ld.so'
485511245024Smrg  ;;
485641b2f0bdSmrg
485711245024Smrgnetbsd*)
485811245024Smrg  version_type=sunos
485911245024Smrg  need_lib_prefix=no
486011245024Smrg  need_version=no
486111a29bacSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
486211245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
486311245024Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
486411245024Smrg    dynamic_linker='NetBSD (a.out) ld.so'
486511245024Smrg  else
486611245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
486711245024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
486811245024Smrg    dynamic_linker='NetBSD ld.elf_so'
486911245024Smrg  fi
487011245024Smrg  shlibpath_var=LD_LIBRARY_PATH
487111245024Smrg  shlibpath_overrides_runpath=yes
487211245024Smrg  hardcode_into_libs=yes
487311245024Smrg  ;;
487441b2f0bdSmrg
487511245024Smrgnewsos6)
487611245024Smrg  version_type=linux
487711245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
487811245024Smrg  shlibpath_var=LD_LIBRARY_PATH
487911245024Smrg  shlibpath_overrides_runpath=yes
488011245024Smrg  ;;
488141b2f0bdSmrg
488211a29bacSmrg*nto* | *qnx*)
488311a29bacSmrg  version_type=qnx
488411245024Smrg  need_lib_prefix=no
488511245024Smrg  need_version=no
488611245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
488711245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
488811245024Smrg  shlibpath_var=LD_LIBRARY_PATH
488911a29bacSmrg  shlibpath_overrides_runpath=no
489011a29bacSmrg  hardcode_into_libs=yes
489111a29bacSmrg  dynamic_linker='ldqnx.so'
489211245024Smrg  ;;
489341b2f0bdSmrg
489411245024Smrgopenbsd*)
489511245024Smrg  version_type=sunos
489611245024Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
489711245024Smrg  need_lib_prefix=no
489811245024Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
489911245024Smrg  case $host_os in
490011a29bacSmrg    openbsd3.3 | openbsd3.3.*)	need_version=yes ;;
490111a29bacSmrg    *)				need_version=no  ;;
490211245024Smrg  esac
490311245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
490411245024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
490511245024Smrg  shlibpath_var=LD_LIBRARY_PATH
490611a29bacSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
490711245024Smrg    case $host_os in
490811245024Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
490911245024Smrg	shlibpath_overrides_runpath=no
491041b2f0bdSmrg	;;
491141b2f0bdSmrg      *)
491211245024Smrg	shlibpath_overrides_runpath=yes
491341b2f0bdSmrg	;;
491411245024Smrg      esac
491511245024Smrg  else
491611245024Smrg    shlibpath_overrides_runpath=yes
491711245024Smrg  fi
491811245024Smrg  ;;
491941b2f0bdSmrg
492011245024Smrgos2*)
492111245024Smrg  libname_spec='$name'
492211245024Smrg  shrext_cmds=".dll"
492311245024Smrg  need_lib_prefix=no
492411245024Smrg  library_names_spec='$libname${shared_ext} $libname.a'
492511245024Smrg  dynamic_linker='OS/2 ld.exe'
492611245024Smrg  shlibpath_var=LIBPATH
492711245024Smrg  ;;
492841b2f0bdSmrg
492911245024Smrgosf3* | osf4* | osf5*)
493011245024Smrg  version_type=osf
493111245024Smrg  need_lib_prefix=no
493211245024Smrg  need_version=no
493311245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
493411245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
493511245024Smrg  shlibpath_var=LD_LIBRARY_PATH
493611245024Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
493711245024Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
493811245024Smrg  ;;
493941b2f0bdSmrg
494011245024Smrgrdos*)
494111245024Smrg  dynamic_linker=no
494211245024Smrg  ;;
494341b2f0bdSmrg
494411245024Smrgsolaris*)
494511245024Smrg  version_type=linux
494611245024Smrg  need_lib_prefix=no
494711245024Smrg  need_version=no
494811245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
494911245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
495011245024Smrg  shlibpath_var=LD_LIBRARY_PATH
495111245024Smrg  shlibpath_overrides_runpath=yes
495211245024Smrg  hardcode_into_libs=yes
495311245024Smrg  # ldd complains unless libraries are executable
495411245024Smrg  postinstall_cmds='chmod +x $lib'
495511245024Smrg  ;;
495641b2f0bdSmrg
495711245024Smrgsunos4*)
495811245024Smrg  version_type=sunos
495911245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
496011245024Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
496111245024Smrg  shlibpath_var=LD_LIBRARY_PATH
496211245024Smrg  shlibpath_overrides_runpath=yes
496311245024Smrg  if test "$with_gnu_ld" = yes; then
496411245024Smrg    need_lib_prefix=no
496511245024Smrg  fi
496611245024Smrg  need_version=yes
496711245024Smrg  ;;
496841b2f0bdSmrg
496911245024Smrgsysv4 | sysv4.3*)
497011245024Smrg  version_type=linux
497111245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
497211245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
497311245024Smrg  shlibpath_var=LD_LIBRARY_PATH
497411245024Smrg  case $host_vendor in
497511245024Smrg    sni)
497611245024Smrg      shlibpath_overrides_runpath=no
497711245024Smrg      need_lib_prefix=no
497811245024Smrg      runpath_var=LD_RUN_PATH
497911245024Smrg      ;;
498011245024Smrg    siemens)
498111245024Smrg      need_lib_prefix=no
498211245024Smrg      ;;
498311245024Smrg    motorola)
498411245024Smrg      need_lib_prefix=no
498511245024Smrg      need_version=no
498611245024Smrg      shlibpath_overrides_runpath=no
498711245024Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
498811245024Smrg      ;;
498911245024Smrg  esac
499011245024Smrg  ;;
499141b2f0bdSmrg
499211245024Smrgsysv4*MP*)
499311245024Smrg  if test -d /usr/nec ;then
499411245024Smrg    version_type=linux
499511245024Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
499611245024Smrg    soname_spec='$libname${shared_ext}.$major'
499711245024Smrg    shlibpath_var=LD_LIBRARY_PATH
499811245024Smrg  fi
499911245024Smrg  ;;
500011245024Smrg
500111245024Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
500211245024Smrg  version_type=freebsd-elf
500311245024Smrg  need_lib_prefix=no
500411245024Smrg  need_version=no
500511245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
500611245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
500711245024Smrg  shlibpath_var=LD_LIBRARY_PATH
500811a29bacSmrg  shlibpath_overrides_runpath=yes
500911245024Smrg  hardcode_into_libs=yes
501011245024Smrg  if test "$with_gnu_ld" = yes; then
501111245024Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
501211245024Smrg  else
501311245024Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
501411245024Smrg    case $host_os in
501511245024Smrg      sco3.2v5*)
501611245024Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
501741b2f0bdSmrg	;;
501841b2f0bdSmrg    esac
501911245024Smrg  fi
502011245024Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
502111245024Smrg  ;;
502241b2f0bdSmrg
502311a29bacSmrgtpf*)
502411a29bacSmrg  # TPF is a cross-target only.  Preferred cross-host = GNU/Linux.
502511a29bacSmrg  version_type=linux
502611a29bacSmrg  need_lib_prefix=no
502711a29bacSmrg  need_version=no
502811a29bacSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
502911a29bacSmrg  shlibpath_var=LD_LIBRARY_PATH
503011a29bacSmrg  shlibpath_overrides_runpath=no
503111a29bacSmrg  hardcode_into_libs=yes
503211a29bacSmrg  ;;
503311a29bacSmrg
503411245024Smrguts4*)
503511245024Smrg  version_type=linux
503611245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
503711245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
503811245024Smrg  shlibpath_var=LD_LIBRARY_PATH
503911245024Smrg  ;;
504011245024Smrg
504111245024Smrg*)
504211245024Smrg  dynamic_linker=no
504311245024Smrg  ;;
504411245024Smrgesac
504511245024SmrgAC_MSG_RESULT([$dynamic_linker])
504611245024Smrgtest "$dynamic_linker" = no && can_build_shared=no
504711245024Smrg
504811245024Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
504911245024Smrgif test "$GCC" = yes; then
505011245024Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
505111245024Smrgfi
505211245024Smrg
505311a29bacSmrgif test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
505411a29bacSmrg  sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
505511a29bacSmrgfi
505611a29bacSmrgif test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
505711a29bacSmrg  sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
505811a29bacSmrgfi
505911245024Smrg
506011a29bacSmrg_LT_DECL([], [variables_saved_for_relink], [1],
506111a29bacSmrg    [Variables whose values should be saved in libtool wrapper scripts and
506211a29bacSmrg    restored at link time])
506311a29bacSmrg_LT_DECL([], [need_lib_prefix], [0],
506411a29bacSmrg    [Do we need the "lib" prefix for modules?])
506511a29bacSmrg_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
506611a29bacSmrg_LT_DECL([], [version_type], [0], [Library versioning type])
506711a29bacSmrg_LT_DECL([], [runpath_var], [0],  [Shared library runtime path variable])
506811a29bacSmrg_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
506911a29bacSmrg_LT_DECL([], [shlibpath_overrides_runpath], [0],
507011a29bacSmrg    [Is shlibpath searched before the hard-coded library search path?])
507111a29bacSmrg_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
507211a29bacSmrg_LT_DECL([], [library_names_spec], [1],
507311a29bacSmrg    [[List of archive names.  First name is the real one, the rest are links.
507411a29bacSmrg    The last name is the one that the linker finds with -lNAME]])
507511a29bacSmrg_LT_DECL([], [soname_spec], [1],
507611a29bacSmrg    [[The coded name of the library, if different from the real name]])
507711a29bacSmrg_LT_DECL([], [install_override_mode], [1],
507811a29bacSmrg    [Permission mode override for installation of shared libraries])
507911a29bacSmrg_LT_DECL([], [postinstall_cmds], [2],
508011a29bacSmrg    [Command to use after installation of a shared archive])
508111a29bacSmrg_LT_DECL([], [postuninstall_cmds], [2],
508211a29bacSmrg    [Command to use after uninstallation of a shared archive])
508311a29bacSmrg_LT_DECL([], [finish_cmds], [2],
508411a29bacSmrg    [Commands used to finish a libtool library installation in a directory])
508511a29bacSmrg_LT_DECL([], [finish_eval], [1],
508611a29bacSmrg    [[As "finish_cmds", except a single script fragment to be evaled but
508711a29bacSmrg    not shown]])
508811a29bacSmrg_LT_DECL([], [hardcode_into_libs], [0],
508911a29bacSmrg    [Whether we should hardcode library paths into libraries])
509011a29bacSmrg_LT_DECL([], [sys_lib_search_path_spec], [2],
509111a29bacSmrg    [Compile-time system search path for libraries])
509211a29bacSmrg_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
509311a29bacSmrg    [Run-time system search path for libraries])
509411a29bacSmrg])# _LT_SYS_DYNAMIC_LINKER
509511a29bacSmrg
509611a29bacSmrg
509711a29bacSmrg# _LT_PATH_TOOL_PREFIX(TOOL)
509811a29bacSmrg# --------------------------
509911a29bacSmrg# find a file program which can recognize shared library
510011a29bacSmrgAC_DEFUN([_LT_PATH_TOOL_PREFIX],
510111a29bacSmrg[m4_require([_LT_DECL_EGREP])dnl
510211a29bacSmrgAC_MSG_CHECKING([for $1])
510311a29bacSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
510411a29bacSmrg[case $MAGIC_CMD in
510511a29bacSmrg[[\\/*] |  ?:[\\/]*])
510611a29bacSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
510711a29bacSmrg  ;;
510811a29bacSmrg*)
510911a29bacSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
511011a29bacSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
511111a29bacSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
511211a29bacSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
511311a29bacSmrgdnl not every word.  This closes a longstanding sh security hole.
511411a29bacSmrg  ac_dummy="m4_if([$2], , $PATH, [$2])"
511511a29bacSmrg  for ac_dir in $ac_dummy; do
511611245024Smrg    IFS="$lt_save_ifs"
511711245024Smrg    test -z "$ac_dir" && ac_dir=.
511811245024Smrg    if test -f $ac_dir/$1; then
511911245024Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
512011245024Smrg      if test -n "$file_magic_test_file"; then
512111245024Smrg	case $deplibs_check_method in
512211245024Smrg	"file_magic "*)
512311245024Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
512411245024Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
512511245024Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
512611245024Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
512711245024Smrg	    :
512811245024Smrg	  else
512911a29bacSmrg	    cat <<_LT_EOF 1>&2
513041b2f0bdSmrg
513111245024Smrg*** Warning: the command libtool uses to detect shared libraries,
513211245024Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
513311245024Smrg*** The result is that libtool may fail to recognize shared libraries
513411245024Smrg*** as such.  This will affect the creation of libtool libraries that
513511245024Smrg*** depend on shared libraries, but programs linked with such libtool
513611245024Smrg*** libraries will work regardless of this problem.  Nevertheless, you
513711245024Smrg*** may want to report the problem to your system manager and/or to
513811245024Smrg*** bug-libtool@gnu.org
513941b2f0bdSmrg
514011a29bacSmrg_LT_EOF
514111245024Smrg	  fi ;;
514211245024Smrg	esac
514311245024Smrg      fi
514411245024Smrg      break
514511245024Smrg    fi
514611245024Smrg  done
514711245024Smrg  IFS="$lt_save_ifs"
514811245024Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
514911245024Smrg  ;;
515011245024Smrgesac])
515111245024SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
515211245024Smrgif test -n "$MAGIC_CMD"; then
515311245024Smrg  AC_MSG_RESULT($MAGIC_CMD)
515411245024Smrgelse
515511245024Smrg  AC_MSG_RESULT(no)
515611245024Smrgfi
515711a29bacSmrg_LT_DECL([], [MAGIC_CMD], [0],
515811a29bacSmrg	 [Used to examine libraries when file_magic_cmd begins with "file"])dnl
515911a29bacSmrg])# _LT_PATH_TOOL_PREFIX
516041b2f0bdSmrg
516111a29bacSmrg# Old name:
516211a29bacSmrgAU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
516311a29bacSmrgdnl aclocal-1.4 backwards compatibility:
516411a29bacSmrgdnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
516541b2f0bdSmrg
516611a29bacSmrg
516711a29bacSmrg# _LT_PATH_MAGIC
516811a29bacSmrg# --------------
516911245024Smrg# find a file program which can recognize a shared library
517011a29bacSmrgm4_defun([_LT_PATH_MAGIC],
517111a29bacSmrg[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
517211245024Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
517311245024Smrg  if test -n "$ac_tool_prefix"; then
517411a29bacSmrg    _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
517511245024Smrg  else
517611245024Smrg    MAGIC_CMD=:
517741b2f0bdSmrg  fi
517811245024Smrgfi
517911a29bacSmrg])# _LT_PATH_MAGIC
518041b2f0bdSmrg
518141b2f0bdSmrg
518211a29bacSmrg# LT_PATH_LD
518311245024Smrg# ----------
518411245024Smrg# find the pathname to the GNU or non-GNU linker
518511a29bacSmrgAC_DEFUN([LT_PATH_LD],
518611a29bacSmrg[AC_REQUIRE([AC_PROG_CC])dnl
518711245024SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
518811245024SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
518911a29bacSmrgm4_require([_LT_DECL_SED])dnl
519011a29bacSmrgm4_require([_LT_DECL_EGREP])dnl
519111a29bacSmrgm4_require([_LT_PROG_ECHO_BACKSLASH])dnl
519211a29bacSmrg
519311a29bacSmrgAC_ARG_WITH([gnu-ld],
519411a29bacSmrg    [AS_HELP_STRING([--with-gnu-ld],
519511a29bacSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
519611a29bacSmrg    [test "$withval" = no || with_gnu_ld=yes],
519711a29bacSmrg    [with_gnu_ld=no])dnl
519811a29bacSmrg
519911245024Smrgac_prog=ld
520011245024Smrgif test "$GCC" = yes; then
520111245024Smrg  # Check if gcc -print-prog-name=ld gives a path.
520211245024Smrg  AC_MSG_CHECKING([for ld used by $CC])
520311245024Smrg  case $host in
520411245024Smrg  *-*-mingw*)
520511245024Smrg    # gcc leaves a trailing carriage return which upsets mingw
520611245024Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
520711245024Smrg  *)
520811245024Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
520911245024Smrg  esac
521011245024Smrg  case $ac_prog in
521111245024Smrg    # Accept absolute paths.
521211245024Smrg    [[\\/]]* | ?:[[\\/]]*)
521311245024Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
521411245024Smrg      # Canonicalize the pathname of ld
521511a29bacSmrg      ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
521611a29bacSmrg      while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
521711a29bacSmrg	ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
521811245024Smrg      done
521911245024Smrg      test -z "$LD" && LD="$ac_prog"
522011245024Smrg      ;;
522111245024Smrg  "")
522211245024Smrg    # If it fails, then pretend we aren't using GCC.
522311245024Smrg    ac_prog=ld
522411245024Smrg    ;;
522511245024Smrg  *)
522611245024Smrg    # If it is relative, then search for the first ld in PATH.
522711245024Smrg    with_gnu_ld=unknown
522811245024Smrg    ;;
522911245024Smrg  esac
523011245024Smrgelif test "$with_gnu_ld" = yes; then
523111245024Smrg  AC_MSG_CHECKING([for GNU ld])
523211245024Smrgelse
523311245024Smrg  AC_MSG_CHECKING([for non-GNU ld])
523411245024Smrgfi
523511245024SmrgAC_CACHE_VAL(lt_cv_path_LD,
523611245024Smrg[if test -z "$LD"; then
523711245024Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
523811245024Smrg  for ac_dir in $PATH; do
523911245024Smrg    IFS="$lt_save_ifs"
524011245024Smrg    test -z "$ac_dir" && ac_dir=.
524111245024Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
524211245024Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
524311245024Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
524411245024Smrg      # but apparently some variants of GNU ld only accept -v.
524511245024Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
524611245024Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
524711245024Smrg      *GNU* | *'with BFD'*)
524811245024Smrg	test "$with_gnu_ld" != no && break
524911245024Smrg	;;
525011245024Smrg      *)
525111245024Smrg	test "$with_gnu_ld" != yes && break
525211245024Smrg	;;
525311245024Smrg      esac
525411245024Smrg    fi
525511245024Smrg  done
525611245024Smrg  IFS="$lt_save_ifs"
525711245024Smrgelse
525811245024Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
525911245024Smrgfi])
526011245024SmrgLD="$lt_cv_path_LD"
526111245024Smrgif test -n "$LD"; then
526211245024Smrg  AC_MSG_RESULT($LD)
526311245024Smrgelse
526411245024Smrg  AC_MSG_RESULT(no)
526511245024Smrgfi
526611245024Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
526711a29bacSmrg_LT_PATH_LD_GNU
526811a29bacSmrgAC_SUBST([LD])
526941b2f0bdSmrg
527011a29bacSmrg_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
527111a29bacSmrg])# LT_PATH_LD
527241b2f0bdSmrg
527311a29bacSmrg# Old names:
527411a29bacSmrgAU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
527511a29bacSmrgAU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
527611a29bacSmrgdnl aclocal-1.4 backwards compatibility:
527711a29bacSmrgdnl AC_DEFUN([AM_PROG_LD], [])
527811a29bacSmrgdnl AC_DEFUN([AC_PROG_LD], [])
527911a29bacSmrg
528011a29bacSmrg
528111a29bacSmrg# _LT_PATH_LD_GNU
528211a29bacSmrg#- --------------
528311a29bacSmrgm4_defun([_LT_PATH_LD_GNU],
528411a29bacSmrg[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
528511245024Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
528611245024Smrgcase `$LD -v 2>&1 </dev/null` in
528711245024Smrg*GNU* | *'with BFD'*)
528811245024Smrg  lt_cv_prog_gnu_ld=yes
528911245024Smrg  ;;
529011245024Smrg*)
529111245024Smrg  lt_cv_prog_gnu_ld=no
529211245024Smrg  ;;
529311245024Smrgesac])
529411245024Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
529511a29bacSmrg])# _LT_PATH_LD_GNU
529641b2f0bdSmrg
529741b2f0bdSmrg
529811a29bacSmrg# _LT_CMD_RELOAD
529911a29bacSmrg# --------------
530011245024Smrg# find reload flag for linker
530111245024Smrg#   -- PORTME Some linkers may need a different reload flag.
530211a29bacSmrgm4_defun([_LT_CMD_RELOAD],
530311245024Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
530411245024Smrg  lt_cv_ld_reload_flag,
530511245024Smrg  [lt_cv_ld_reload_flag='-r'])
530611245024Smrgreload_flag=$lt_cv_ld_reload_flag
530711245024Smrgcase $reload_flag in
530811245024Smrg"" | " "*) ;;
530911245024Smrg*) reload_flag=" $reload_flag" ;;
531011245024Smrgesac
531111245024Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
531211245024Smrgcase $host_os in
531311245024Smrg  darwin*)
531411245024Smrg    if test "$GCC" = yes; then
531511245024Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
531611245024Smrg    else
531711245024Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
531811245024Smrg    fi
531911245024Smrg    ;;
532011245024Smrgesac
532111a29bacSmrg_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl
532211a29bacSmrg_LT_TAGDECL([], [reload_cmds], [2])dnl
532311a29bacSmrg])# _LT_CMD_RELOAD
532441b2f0bdSmrg
532541b2f0bdSmrg
532611a29bacSmrg# _LT_CHECK_MAGIC_METHOD
532711a29bacSmrg# ----------------------
532811245024Smrg# how to check for library dependencies
532911245024Smrg#  -- PORTME fill in with the dynamic library characteristics
533011a29bacSmrgm4_defun([_LT_CHECK_MAGIC_METHOD],
533111a29bacSmrg[m4_require([_LT_DECL_EGREP])
533211a29bacSmrgm4_require([_LT_DECL_OBJDUMP])
533311a29bacSmrgAC_CACHE_CHECK([how to recognize dependent libraries],
533411245024Smrglt_cv_deplibs_check_method,
533511245024Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
533611245024Smrglt_cv_file_magic_test_file=
533711245024Smrglt_cv_deplibs_check_method='unknown'
533811245024Smrg# Need to set the preceding variable on all platforms that support
533911245024Smrg# interlibrary dependencies.
534011245024Smrg# 'none' -- dependencies not supported.
534111245024Smrg# `unknown' -- same as none, but documents that we really don't know.
534211245024Smrg# 'pass_all' -- all dependencies passed with no checks.
534311245024Smrg# 'test_compile' -- check by making test program.
534411245024Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
534511245024Smrg# which responds to the $file_magic_cmd with a given extended regex.
534611245024Smrg# If you have `file' or equivalent on your system and you're not sure
534711245024Smrg# whether `pass_all' will *always* work, you probably want this one.
534841b2f0bdSmrg
534911245024Smrgcase $host_os in
535011245024Smrgaix[[4-9]]*)
535111245024Smrg  lt_cv_deplibs_check_method=pass_all
535211245024Smrg  ;;
535341b2f0bdSmrg
535411245024Smrgbeos*)
535511245024Smrg  lt_cv_deplibs_check_method=pass_all
535611245024Smrg  ;;
535741b2f0bdSmrg
535811245024Smrgbsdi[[45]]*)
535911245024Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
536011245024Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
536111245024Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
536211245024Smrg  ;;
536341b2f0bdSmrg
536411245024Smrgcygwin*)
536511245024Smrg  # func_win32_libid is a shell function defined in ltmain.sh
536611245024Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
536711245024Smrg  lt_cv_file_magic_cmd='func_win32_libid'
536811245024Smrg  ;;
536941b2f0bdSmrg
537011245024Smrgmingw* | pw32*)
537111245024Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
537211245024Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
537311245024Smrg  # unless we find 'file', for example because we are cross-compiling.
537411a29bacSmrg  # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin.
537511a29bacSmrg  if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then
537611245024Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
537711245024Smrg    lt_cv_file_magic_cmd='func_win32_libid'
537811245024Smrg  else
537911a29bacSmrg    # Keep this pattern in sync with the one in func_win32_libid.
538011a29bacSmrg    lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)'
538111245024Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
538211245024Smrg  fi
538311245024Smrg  ;;
538441b2f0bdSmrg
538511a29bacSmrgcegcc*)
538611a29bacSmrg  # use the weaker test based on 'objdump'. See mingw*.
538711a29bacSmrg  lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
538811a29bacSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
538911a29bacSmrg  ;;
539011a29bacSmrg
539111245024Smrgdarwin* | rhapsody*)
539211245024Smrg  lt_cv_deplibs_check_method=pass_all
539311245024Smrg  ;;
539441b2f0bdSmrg
539511245024Smrgfreebsd* | dragonfly*)
539611a29bacSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
539711245024Smrg    case $host_cpu in
539811245024Smrg    i*86 )
539911245024Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
540011245024Smrg      # Let's accept both of them until this is cleared up.
540111245024Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
540211245024Smrg      lt_cv_file_magic_cmd=/usr/bin/file
540311245024Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
540411245024Smrg      ;;
540511245024Smrg    esac
540611245024Smrg  else
540711245024Smrg    lt_cv_deplibs_check_method=pass_all
540811245024Smrg  fi
540911245024Smrg  ;;
541041b2f0bdSmrg
541111245024Smrggnu*)
541211245024Smrg  lt_cv_deplibs_check_method=pass_all
541311245024Smrg  ;;
541441b2f0bdSmrg
541511a29bacSmrghaiku*)
541611a29bacSmrg  lt_cv_deplibs_check_method=pass_all
541711a29bacSmrg  ;;
541811a29bacSmrg
541911245024Smrghpux10.20* | hpux11*)
542011245024Smrg  lt_cv_file_magic_cmd=/usr/bin/file
542111245024Smrg  case $host_cpu in
542211245024Smrg  ia64*)
542311245024Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
542411245024Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
542511245024Smrg    ;;
542611245024Smrg  hppa*64*)
542711a29bacSmrg    [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]']
542811245024Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
542911245024Smrg    ;;
543011245024Smrg  *)
543111a29bacSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library'
543211245024Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
543311245024Smrg    ;;
543411245024Smrg  esac
543511245024Smrg  ;;
543641b2f0bdSmrg
543711245024Smrginterix[[3-9]]*)
543811245024Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
543911245024Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
544011245024Smrg  ;;
544141b2f0bdSmrg
544211245024Smrgirix5* | irix6* | nonstopux*)
544311245024Smrg  case $LD in
544411245024Smrg  *-32|*"-32 ") libmagic=32-bit;;
544511245024Smrg  *-n32|*"-n32 ") libmagic=N32;;
544611245024Smrg  *-64|*"-64 ") libmagic=64-bit;;
544711245024Smrg  *) libmagic=never-match;;
544811245024Smrg  esac
544911245024Smrg  lt_cv_deplibs_check_method=pass_all
545011245024Smrg  ;;
545141b2f0bdSmrg
545211245024Smrg# This must be Linux ELF.
545311a29bacSmrglinux* | k*bsd*-gnu | kopensolaris*-gnu)
545411245024Smrg  lt_cv_deplibs_check_method=pass_all
545511245024Smrg  ;;
545641b2f0bdSmrg
545711245024Smrgnetbsd*)
545811a29bacSmrg  if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
545911245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
546011245024Smrg  else
546111245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
546211245024Smrg  fi
546311245024Smrg  ;;
546441b2f0bdSmrg
546511245024Smrgnewos6*)
546611245024Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
546711245024Smrg  lt_cv_file_magic_cmd=/usr/bin/file
546811245024Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
546911245024Smrg  ;;
547041b2f0bdSmrg
547111a29bacSmrg*nto* | *qnx*)
547211a29bacSmrg  lt_cv_deplibs_check_method=pass_all
547311245024Smrg  ;;
547441b2f0bdSmrg
547511245024Smrgopenbsd*)
547611a29bacSmrg  if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
547711245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
547811245024Smrg  else
547911245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
548011245024Smrg  fi
548111245024Smrg  ;;
548241b2f0bdSmrg
548311245024Smrgosf3* | osf4* | osf5*)
548411245024Smrg  lt_cv_deplibs_check_method=pass_all
548511245024Smrg  ;;
548641b2f0bdSmrg
548711245024Smrgrdos*)
548811245024Smrg  lt_cv_deplibs_check_method=pass_all
548911245024Smrg  ;;
549041b2f0bdSmrg
549111245024Smrgsolaris*)
549211245024Smrg  lt_cv_deplibs_check_method=pass_all
549311245024Smrg  ;;
549441b2f0bdSmrg
549511a29bacSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
549611a29bacSmrg  lt_cv_deplibs_check_method=pass_all
549711a29bacSmrg  ;;
549811a29bacSmrg
549911245024Smrgsysv4 | sysv4.3*)
550011245024Smrg  case $host_vendor in
550111245024Smrg  motorola)
550211245024Smrg    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]]'
550311245024Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
550411245024Smrg    ;;
550511245024Smrg  ncr)
550611245024Smrg    lt_cv_deplibs_check_method=pass_all
550711245024Smrg    ;;
550811245024Smrg  sequent)
550911245024Smrg    lt_cv_file_magic_cmd='/bin/file'
551011245024Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
551111245024Smrg    ;;
551211245024Smrg  sni)
551311245024Smrg    lt_cv_file_magic_cmd='/bin/file'
551411245024Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
551511245024Smrg    lt_cv_file_magic_test_file=/lib/libc.so
551611245024Smrg    ;;
551711245024Smrg  siemens)
551811245024Smrg    lt_cv_deplibs_check_method=pass_all
551911245024Smrg    ;;
552011245024Smrg  pc)
552111245024Smrg    lt_cv_deplibs_check_method=pass_all
552241b2f0bdSmrg    ;;
552341b2f0bdSmrg  esac
552411245024Smrg  ;;
552541b2f0bdSmrg
552611a29bacSmrgtpf*)
552711245024Smrg  lt_cv_deplibs_check_method=pass_all
552811245024Smrg  ;;
552911245024Smrgesac
553011245024Smrg])
553111245024Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
553211245024Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
553311245024Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
553411a29bacSmrg
553511a29bacSmrg_LT_DECL([], [deplibs_check_method], [1],
553611a29bacSmrg    [Method to check whether dependent libraries are shared objects])
553711a29bacSmrg_LT_DECL([], [file_magic_cmd], [1],
553811a29bacSmrg    [Command to use when deplibs_check_method == "file_magic"])
553911a29bacSmrg])# _LT_CHECK_MAGIC_METHOD
554041b2f0bdSmrg
554141b2f0bdSmrg
554211a29bacSmrg# LT_PATH_NM
554311245024Smrg# ----------
554411a29bacSmrg# find the pathname to a BSD- or MS-compatible name lister
554511a29bacSmrgAC_DEFUN([LT_PATH_NM],
554611a29bacSmrg[AC_REQUIRE([AC_PROG_CC])dnl
554711a29bacSmrgAC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
554811245024Smrg[if test -n "$NM"; then
554911245024Smrg  # Let the user override the test.
555011245024Smrg  lt_cv_path_NM="$NM"
555111245024Smrgelse
555211245024Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
555311245024Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
555411245024Smrg    lt_nm_to_check="$lt_nm_to_check nm"
555511245024Smrg  fi
555611245024Smrg  for lt_tmp_nm in $lt_nm_to_check; do
555711245024Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
555811245024Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
555911245024Smrg      IFS="$lt_save_ifs"
556011245024Smrg      test -z "$ac_dir" && ac_dir=.
556111245024Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
556211245024Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
556311245024Smrg	# Check to see if the nm accepts a BSD-compat flag.
556411245024Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
556511245024Smrg	#   nm: unknown option "B" ignored
556611245024Smrg	# Tru64's nm complains that /dev/null is an invalid object file
556711245024Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
556811245024Smrg	*/dev/null* | *'Invalid file or object type'*)
556911245024Smrg	  lt_cv_path_NM="$tmp_nm -B"
557011245024Smrg	  break
557111245024Smrg	  ;;
557211245024Smrg	*)
557311245024Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
557411245024Smrg	  */dev/null*)
557511245024Smrg	    lt_cv_path_NM="$tmp_nm -p"
557611245024Smrg	    break
557711245024Smrg	    ;;
557811245024Smrg	  *)
557911245024Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
558011245024Smrg	    continue # so that we can try to find one that supports BSD flags
558111245024Smrg	    ;;
558211245024Smrg	  esac
558311245024Smrg	  ;;
558411245024Smrg	esac
558511245024Smrg      fi
558611245024Smrg    done
558711245024Smrg    IFS="$lt_save_ifs"
558811245024Smrg  done
558911a29bacSmrg  : ${lt_cv_path_NM=no}
559011245024Smrgfi])
559111a29bacSmrgif test "$lt_cv_path_NM" != "no"; then
559211a29bacSmrg  NM="$lt_cv_path_NM"
559311a29bacSmrgelse
559411a29bacSmrg  # Didn't find any BSD compatible name lister, look for dumpbin.
559511a29bacSmrg  if test -n "$DUMPBIN"; then :
559611a29bacSmrg    # Let the user override the test.
559711a29bacSmrg  else
559811a29bacSmrg    AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :)
559911a29bacSmrg    case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in
560011a29bacSmrg    *COFF*)
560111a29bacSmrg      DUMPBIN="$DUMPBIN -symbols"
560211a29bacSmrg      ;;
560311a29bacSmrg    *)
560411a29bacSmrg      DUMPBIN=:
560511a29bacSmrg      ;;
560611a29bacSmrg    esac
560711a29bacSmrg  fi
560811a29bacSmrg  AC_SUBST([DUMPBIN])
560911a29bacSmrg  if test "$DUMPBIN" != ":"; then
561011a29bacSmrg    NM="$DUMPBIN"
561111a29bacSmrg  fi
561211a29bacSmrgfi
561311a29bacSmrgtest -z "$NM" && NM=nm
561411a29bacSmrgAC_SUBST([NM])
561511a29bacSmrg_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
561611a29bacSmrg
561711a29bacSmrgAC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
561811a29bacSmrg  [lt_cv_nm_interface="BSD nm"
561911a29bacSmrg  echo "int some_variable = 0;" > conftest.$ac_ext
562011a29bacSmrg  (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
562111a29bacSmrg  (eval "$ac_compile" 2>conftest.err)
562211a29bacSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
562311a29bacSmrg  (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
562411a29bacSmrg  (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
562511a29bacSmrg  cat conftest.err >&AS_MESSAGE_LOG_FD
562611a29bacSmrg  (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD)
562711a29bacSmrg  cat conftest.out >&AS_MESSAGE_LOG_FD
562811a29bacSmrg  if $GREP 'External.*some_variable' conftest.out > /dev/null; then
562911a29bacSmrg    lt_cv_nm_interface="MS dumpbin"
563011a29bacSmrg  fi
563111a29bacSmrg  rm -f conftest*])
563211a29bacSmrg])# LT_PATH_NM
563341b2f0bdSmrg
563411a29bacSmrg# Old names:
563511a29bacSmrgAU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
563611a29bacSmrgAU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
563711a29bacSmrgdnl aclocal-1.4 backwards compatibility:
563811a29bacSmrgdnl AC_DEFUN([AM_PROG_NM], [])
563911a29bacSmrgdnl AC_DEFUN([AC_PROG_NM], [])
564041b2f0bdSmrg
564111a29bacSmrg
564211a29bacSmrg# LT_LIB_M
564311a29bacSmrg# --------
564411245024Smrg# check for math library
564511a29bacSmrgAC_DEFUN([LT_LIB_M],
564611245024Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
564711245024SmrgLIBM=
564811245024Smrgcase $host in
564911a29bacSmrg*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*)
565011245024Smrg  # These system don't have libm, or don't need it
565111245024Smrg  ;;
565211245024Smrg*-ncr-sysv4.3*)
565311245024Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
565411245024Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
565511245024Smrg  ;;
565611245024Smrg*)
565711245024Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
565811245024Smrg  ;;
565911245024Smrgesac
566011a29bacSmrgAC_SUBST([LIBM])
566111a29bacSmrg])# LT_LIB_M
566241b2f0bdSmrg
566311a29bacSmrg# Old name:
566411a29bacSmrgAU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
566511a29bacSmrgdnl aclocal-1.4 backwards compatibility:
566611a29bacSmrgdnl AC_DEFUN([AC_CHECK_LIBM], [])
566741b2f0bdSmrg
566841b2f0bdSmrg
566911a29bacSmrg# _LT_COMPILER_NO_RTTI([TAGNAME])
567011a29bacSmrg# -------------------------------
567111a29bacSmrgm4_defun([_LT_COMPILER_NO_RTTI],
567211a29bacSmrg[m4_require([_LT_TAG_COMPILER])dnl
567341b2f0bdSmrg
567411a29bacSmrg_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
567541b2f0bdSmrg
567611a29bacSmrgif test "$GCC" = yes; then
567711a29bacSmrg  case $cc_basename in
567811a29bacSmrg  nvcc*)
567911a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;;
568011a29bacSmrg  *)
568111a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;;
568211a29bacSmrg  esac
568341b2f0bdSmrg
568411a29bacSmrg  _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
568511a29bacSmrg    lt_cv_prog_compiler_rtti_exceptions,
568611a29bacSmrg    [-fno-rtti -fno-exceptions], [],
568711a29bacSmrg    [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
568811245024Smrgfi
568911a29bacSmrg_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
569011a29bacSmrg	[Compiler flag to turn off builtin functions])
569111a29bacSmrg])# _LT_COMPILER_NO_RTTI
569241b2f0bdSmrg
569341b2f0bdSmrg
569411a29bacSmrg# _LT_CMD_GLOBAL_SYMBOLS
569511a29bacSmrg# ----------------------
569611a29bacSmrgm4_defun([_LT_CMD_GLOBAL_SYMBOLS],
569711a29bacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
569811a29bacSmrgAC_REQUIRE([AC_PROG_CC])dnl
569911a29bacSmrgAC_REQUIRE([AC_PROG_AWK])dnl
570011a29bacSmrgAC_REQUIRE([LT_PATH_NM])dnl
570111a29bacSmrgAC_REQUIRE([LT_PATH_LD])dnl
570211a29bacSmrgm4_require([_LT_DECL_SED])dnl
570311a29bacSmrgm4_require([_LT_DECL_EGREP])dnl
570411a29bacSmrgm4_require([_LT_TAG_COMPILER])dnl
570541b2f0bdSmrg
570611a29bacSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
570711a29bacSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
570811a29bacSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
570911a29bacSmrg[
571011a29bacSmrg# These are sane defaults that work on at least a few old systems.
571111a29bacSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
571241b2f0bdSmrg
571311a29bacSmrg# Character class describing NM global symbol codes.
571411a29bacSmrgsymcode='[[BCDEGRST]]'
571541b2f0bdSmrg
571611a29bacSmrg# Regexp to match symbols that can be accessed directly from C.
571711a29bacSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
571841b2f0bdSmrg
571911a29bacSmrg# Define system-specific variables.
572011245024Smrgcase $host_os in
572111a29bacSmrgaix*)
572211a29bacSmrg  symcode='[[BCDT]]'
572311245024Smrg  ;;
572411a29bacSmrgcygwin* | mingw* | pw32* | cegcc*)
572511a29bacSmrg  symcode='[[ABCDGISTW]]'
572611a29bacSmrg  ;;
572711a29bacSmrghpux*)
572811a29bacSmrg  if test "$host_cpu" = ia64; then
572911a29bacSmrg    symcode='[[ABCDEGRST]]'
573011245024Smrg  fi
573111a29bacSmrg  ;;
573211a29bacSmrgirix* | nonstopux*)
573311a29bacSmrg  symcode='[[BCDEGRST]]'
573411a29bacSmrg  ;;
573511a29bacSmrgosf*)
573611a29bacSmrg  symcode='[[BCDEGQRST]]'
573711a29bacSmrg  ;;
573811a29bacSmrgsolaris*)
573911a29bacSmrg  symcode='[[BDRT]]'
574011a29bacSmrg  ;;
574111a29bacSmrgsco3.2v5*)
574211a29bacSmrg  symcode='[[DT]]'
574311a29bacSmrg  ;;
574411a29bacSmrgsysv4.2uw2*)
574511a29bacSmrg  symcode='[[DT]]'
574611a29bacSmrg  ;;
574711a29bacSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
574811a29bacSmrg  symcode='[[ABDT]]'
574911a29bacSmrg  ;;
575011a29bacSmrgsysv4)
575111a29bacSmrg  symcode='[[DFNSTU]]'
575211a29bacSmrg  ;;
575311245024Smrgesac
575441b2f0bdSmrg
575511a29bacSmrg# If we're using GNU nm, then use its standard symbol codes.
575611a29bacSmrgcase `$NM -V 2>&1` in
575711a29bacSmrg*GNU* | *'with BFD'*)
575811a29bacSmrg  symcode='[[ABCDGIRSTW]]' ;;
575911a29bacSmrgesac
576041b2f0bdSmrg
576111a29bacSmrg# Transform an extracted symbol line into a proper C declaration.
576211a29bacSmrg# Some systems (esp. on ia64) link data and code symbols differently,
576311a29bacSmrg# so use this general approach.
576411a29bacSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
576541b2f0bdSmrg
576611a29bacSmrg# Transform an extracted symbol line into symbol name and symbol address
576711a29bacSmrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (void *) \&\2},/p'"
576811a29bacSmrglt_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'"
576941b2f0bdSmrg
577011a29bacSmrg# Handle CRLF in mingw tool chain
577111a29bacSmrgopt_cr=
577211a29bacSmrgcase $build_os in
577311a29bacSmrgmingw*)
577411a29bacSmrg  opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
577511a29bacSmrg  ;;
577611a29bacSmrgesac
577741b2f0bdSmrg
577811a29bacSmrg# Try without a prefix underscore, then with it.
577911a29bacSmrgfor ac_symprfx in "" "_"; do
578041b2f0bdSmrg
578111a29bacSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
578211a29bacSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
578341b2f0bdSmrg
578411a29bacSmrg  # Write the raw and C identifiers.
578511a29bacSmrg  if test "$lt_cv_nm_interface" = "MS dumpbin"; then
578611a29bacSmrg    # Fake it for dumpbin and say T for any non-static function
578711a29bacSmrg    # and D for any global variable.
578811a29bacSmrg    # Also find C++ and __fastcall symbols from MSVC++,
578911a29bacSmrg    # which start with @ or ?.
579011a29bacSmrg    lt_cv_sys_global_symbol_pipe="$AWK ['"\
579111a29bacSmrg"     {last_section=section; section=\$ 3};"\
579211a29bacSmrg"     /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
579311a29bacSmrg"     \$ 0!~/External *\|/{next};"\
579411a29bacSmrg"     / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
579511a29bacSmrg"     {if(hide[section]) next};"\
579611a29bacSmrg"     {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
579711a29bacSmrg"     {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
579811a29bacSmrg"     s[1]~/^[@?]/{print s[1], s[1]; next};"\
579911a29bacSmrg"     s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
580011a29bacSmrg"     ' prfx=^$ac_symprfx]"
580111a29bacSmrg  else
580211a29bacSmrg    lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[	 ]]\($symcode$symcode*\)[[	 ]][[	 ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
580311a29bacSmrg  fi
580441b2f0bdSmrg
580511a29bacSmrg  # Check to see that the pipe works correctly.
580611a29bacSmrg  pipe_works=no
580741b2f0bdSmrg
580811a29bacSmrg  rm -f conftest*
580911a29bacSmrg  cat > conftest.$ac_ext <<_LT_EOF
581011a29bacSmrg#ifdef __cplusplus
581111a29bacSmrgextern "C" {
581211a29bacSmrg#endif
581311a29bacSmrgchar nm_test_var;
581411a29bacSmrgvoid nm_test_func(void);
581511a29bacSmrgvoid nm_test_func(void){}
581611a29bacSmrg#ifdef __cplusplus
581711a29bacSmrg}
581811a29bacSmrg#endif
581911a29bacSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
582011a29bacSmrg_LT_EOF
582141b2f0bdSmrg
582211a29bacSmrg  if AC_TRY_EVAL(ac_compile); then
582311a29bacSmrg    # Now try to grab the symbols.
582411a29bacSmrg    nlist=conftest.nm
582511a29bacSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then
582611a29bacSmrg      # Try sorting and uniquifying the output.
582711a29bacSmrg      if sort "$nlist" | uniq > "$nlist"T; then
582811a29bacSmrg	mv -f "$nlist"T "$nlist"
582911a29bacSmrg      else
583011a29bacSmrg	rm -f "$nlist"T
583111a29bacSmrg      fi
583241b2f0bdSmrg
583311a29bacSmrg      # Make sure that we snagged all the symbols we need.
583411a29bacSmrg      if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
583511a29bacSmrg	if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
583611a29bacSmrg	  cat <<_LT_EOF > conftest.$ac_ext
583711a29bacSmrg#ifdef __cplusplus
583811a29bacSmrgextern "C" {
583911a29bacSmrg#endif
584041b2f0bdSmrg
584111a29bacSmrg_LT_EOF
584211a29bacSmrg	  # Now generate the symbol file.
584311a29bacSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
584441b2f0bdSmrg
584511a29bacSmrg	  cat <<_LT_EOF >> conftest.$ac_ext
584641b2f0bdSmrg
584711a29bacSmrg/* The mapping between symbol names and symbols.  */
584811a29bacSmrgconst struct {
584911a29bacSmrg  const char *name;
585011a29bacSmrg  void       *address;
585111a29bacSmrg}
585211a29bacSmrglt__PROGRAM__LTX_preloaded_symbols[[]] =
585311a29bacSmrg{
585411a29bacSmrg  { "@PROGRAM@", (void *) 0 },
585511a29bacSmrg_LT_EOF
585611a29bacSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
585711a29bacSmrg	  cat <<\_LT_EOF >> conftest.$ac_ext
585811a29bacSmrg  {0, (void *) 0}
585911a29bacSmrg};
586041b2f0bdSmrg
586111a29bacSmrg/* This works around a problem in FreeBSD linker */
586211a29bacSmrg#ifdef FREEBSD_WORKAROUND
586311a29bacSmrgstatic const void *lt_preloaded_setup() {
586411a29bacSmrg  return lt__PROGRAM__LTX_preloaded_symbols;
586511a29bacSmrg}
586611a29bacSmrg#endif
586741b2f0bdSmrg
586811a29bacSmrg#ifdef __cplusplus
586911a29bacSmrg}
587011a29bacSmrg#endif
587111a29bacSmrg_LT_EOF
587211a29bacSmrg	  # Now try linking the two files.
587311a29bacSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
587411a29bacSmrg	  lt_save_LIBS="$LIBS"
587511a29bacSmrg	  lt_save_CFLAGS="$CFLAGS"
587611a29bacSmrg	  LIBS="conftstm.$ac_objext"
587711a29bacSmrg	  CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
587811a29bacSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
587911a29bacSmrg	    pipe_works=yes
588011a29bacSmrg	  fi
588111a29bacSmrg	  LIBS="$lt_save_LIBS"
588211a29bacSmrg	  CFLAGS="$lt_save_CFLAGS"
588311a29bacSmrg	else
588411a29bacSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
588511a29bacSmrg	fi
588611a29bacSmrg      else
588711a29bacSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
588811a29bacSmrg      fi
588911245024Smrg    else
589011a29bacSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
589111245024Smrg    fi
589211245024Smrg  else
589311a29bacSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
589411a29bacSmrg    cat conftest.$ac_ext >&5
589511245024Smrg  fi
589611a29bacSmrg  rm -rf conftest* conftst*
589741b2f0bdSmrg
589811a29bacSmrg  # Do not use the global_symbol_pipe unless it works.
589911a29bacSmrg  if test "$pipe_works" = yes; then
590011a29bacSmrg    break
590111a29bacSmrg  else
590211a29bacSmrg    lt_cv_sys_global_symbol_pipe=
590311a29bacSmrg  fi
590411a29bacSmrgdone
590511a29bacSmrg])
590611a29bacSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
590711a29bacSmrg  lt_cv_sys_global_symbol_to_cdecl=
590811a29bacSmrgfi
590911a29bacSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
591011a29bacSmrg  AC_MSG_RESULT(failed)
591111245024Smrgelse
591211a29bacSmrg  AC_MSG_RESULT(ok)
591311245024Smrgfi
591441b2f0bdSmrg
591511a29bacSmrg_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
591611a29bacSmrg    [Take the output of nm and produce a listing of raw symbols and C names])
591711a29bacSmrg_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
591811a29bacSmrg    [Transform the output of nm in a proper C declaration])
591911a29bacSmrg_LT_DECL([global_symbol_to_c_name_address],
592011a29bacSmrg    [lt_cv_sys_global_symbol_to_c_name_address], [1],
592111a29bacSmrg    [Transform the output of nm in a C name address pair])
592211a29bacSmrg_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
592311a29bacSmrg    [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
592411a29bacSmrg    [Transform the output of nm in a C name address pair when lib prefix is needed])
592511a29bacSmrg]) # _LT_CMD_GLOBAL_SYMBOLS
592641b2f0bdSmrg
592741b2f0bdSmrg
592811a29bacSmrg# _LT_COMPILER_PIC([TAGNAME])
592911a29bacSmrg# ---------------------------
593011a29bacSmrgm4_defun([_LT_COMPILER_PIC],
593111a29bacSmrg[m4_require([_LT_TAG_COMPILER])dnl
593211a29bacSmrg_LT_TAGVAR(lt_prog_compiler_wl, $1)=
593311a29bacSmrg_LT_TAGVAR(lt_prog_compiler_pic, $1)=
593411a29bacSmrg_LT_TAGVAR(lt_prog_compiler_static, $1)=
593541b2f0bdSmrg
593611a29bacSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
593711a29bacSmrgm4_if([$1], [CXX], [
593811a29bacSmrg  # C++ specific cases for pic, static, wl, etc.
593911a29bacSmrg  if test "$GXX" = yes; then
594011a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
594111a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
594241b2f0bdSmrg
594311a29bacSmrg    case $host_os in
594411a29bacSmrg    aix*)
594511a29bacSmrg      # All AIX code is PIC.
594611245024Smrg      if test "$host_cpu" = ia64; then
594711a29bacSmrg	# AIX 5 now supports IA64 processor
594811a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
594911245024Smrg      fi
595011a29bacSmrg      ;;
595141b2f0bdSmrg
595211a29bacSmrg    amigaos*)
595311a29bacSmrg      case $host_cpu in
595411a29bacSmrg      powerpc)
595511a29bacSmrg            # see comment about AmigaOS4 .so support
595611a29bacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
595711a29bacSmrg        ;;
595811a29bacSmrg      m68k)
595911a29bacSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
596011a29bacSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
596111a29bacSmrg            # like `-m68040'.
596211a29bacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
596311a29bacSmrg        ;;
596411a29bacSmrg      esac
596511a29bacSmrg      ;;
596641b2f0bdSmrg
596711a29bacSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
596811a29bacSmrg      # PIC is the default for these OSes.
596911a29bacSmrg      ;;
597011a29bacSmrg    mingw* | cygwin* | os2* | pw32* | cegcc*)
597111a29bacSmrg      # This hack is so that the source file can tell whether it is being
597211a29bacSmrg      # built for inclusion in a dll (and should export symbols for example).
597311a29bacSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
597411a29bacSmrg      # (--disable-auto-import) libraries
597511a29bacSmrg      m4_if([$1], [GCJ], [],
597611a29bacSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
597711a29bacSmrg      ;;
597811a29bacSmrg    darwin* | rhapsody*)
597911a29bacSmrg      # PIC is the default on this platform
598011a29bacSmrg      # Common symbols not allowed in MH_DYLIB files
598111a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
598211a29bacSmrg      ;;
598311a29bacSmrg    *djgpp*)
598411a29bacSmrg      # DJGPP does not support shared libraries at all
598511a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)=
598611a29bacSmrg      ;;
598711a29bacSmrg    haiku*)
598811a29bacSmrg      # PIC is the default for Haiku.
598911a29bacSmrg      # The "-static" flag exists, but is broken.
599011a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
599111a29bacSmrg      ;;
599211a29bacSmrg    interix[[3-9]]*)
599311a29bacSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
599411a29bacSmrg      # Instead, we relocate shared libraries at runtime.
599511a29bacSmrg      ;;
599611a29bacSmrg    sysv4*MP*)
599711a29bacSmrg      if test -d /usr/nec; then
599811a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
599911a29bacSmrg      fi
600011a29bacSmrg      ;;
600111a29bacSmrg    hpux*)
600211a29bacSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
600311a29bacSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
600411a29bacSmrg      # sets the default TLS model and affects inlining.
600511a29bacSmrg      case $host_cpu in
600611a29bacSmrg      hppa*64*)
600711a29bacSmrg	;;
600811245024Smrg      *)
600911a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
601011245024Smrg	;;
601111a29bacSmrg      esac
601211a29bacSmrg      ;;
601311a29bacSmrg    *qnx* | *nto*)
601411a29bacSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
601511a29bacSmrg      # it will coredump.
601611a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
601711a29bacSmrg      ;;
601811a29bacSmrg    *)
601911a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
602011a29bacSmrg      ;;
602111245024Smrg    esac
602211a29bacSmrg  else
602311a29bacSmrg    case $host_os in
602411a29bacSmrg      aix[[4-9]]*)
602511a29bacSmrg	# All AIX code is PIC.
602611a29bacSmrg	if test "$host_cpu" = ia64; then
602711a29bacSmrg	  # AIX 5 now supports IA64 processor
602811a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
602911a29bacSmrg	else
603011a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
603111a29bacSmrg	fi
603211245024Smrg	;;
603311a29bacSmrg      chorus*)
603411a29bacSmrg	case $cc_basename in
603511a29bacSmrg	cxch68*)
603611a29bacSmrg	  # Green Hills C++ Compiler
603711a29bacSmrg	  # _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"
603811245024Smrg	  ;;
603911245024Smrg	esac
604011245024Smrg	;;
604111a29bacSmrg      dgux*)
604211a29bacSmrg	case $cc_basename in
604311a29bacSmrg	  ec++*)
604411a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
604511a29bacSmrg	    ;;
604611a29bacSmrg	  ghcx*)
604711a29bacSmrg	    # Green Hills C++ Compiler
604811a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
604911a29bacSmrg	    ;;
605011a29bacSmrg	  *)
605111a29bacSmrg	    ;;
605211a29bacSmrg	esac
605311a29bacSmrg	;;
605411a29bacSmrg      freebsd* | dragonfly*)
605511a29bacSmrg	# FreeBSD uses GNU C++
605611a29bacSmrg	;;
605711a29bacSmrg      hpux9* | hpux10* | hpux11*)
605811a29bacSmrg	case $cc_basename in
605911a29bacSmrg	  CC*)
606011a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
606111a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
606211a29bacSmrg	    if test "$host_cpu" != ia64; then
606311a29bacSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
606411a29bacSmrg	    fi
606511a29bacSmrg	    ;;
606611a29bacSmrg	  aCC*)
606711a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
606811a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
606911245024Smrg	    case $host_cpu in
607011a29bacSmrg	    hppa*64*|ia64*)
607111a29bacSmrg	      # +Z the default
607211245024Smrg	      ;;
607311245024Smrg	    *)
607411a29bacSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
607511245024Smrg	      ;;
607611245024Smrg	    esac
607711a29bacSmrg	    ;;
607811a29bacSmrg	  *)
607911a29bacSmrg	    ;;
608011a29bacSmrg	esac
608111245024Smrg	;;
608211a29bacSmrg      interix*)
608311a29bacSmrg	# This is c89, which is MS Visual C++ (no shared libs)
608411a29bacSmrg	# Anyone wants to do a port?
608511245024Smrg	;;
608611a29bacSmrg      irix5* | irix6* | nonstopux*)
608711a29bacSmrg	case $cc_basename in
608811a29bacSmrg	  CC*)
608911a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
609011a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
609111a29bacSmrg	    # CC pic flag -KPIC is the default.
609211a29bacSmrg	    ;;
609311a29bacSmrg	  *)
609411a29bacSmrg	    ;;
609511a29bacSmrg	esac
609611245024Smrg	;;
609711a29bacSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
609811a29bacSmrg	case $cc_basename in
609911a29bacSmrg	  KCC*)
610011a29bacSmrg	    # KAI C++ Compiler
610111a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
610211a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
610311a29bacSmrg	    ;;
610411a29bacSmrg	  ecpc* )
610511a29bacSmrg	    # old Intel C++ for x86_64 which still supported -KPIC.
610611a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
610711a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
610811a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
610911a29bacSmrg	    ;;
611011a29bacSmrg	  icpc* )
611111a29bacSmrg	    # Intel C++, used to be incompatible with GCC.
611211a29bacSmrg	    # ICC 10 doesn't accept -KPIC any more.
611311a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
611411a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
611511a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
611611a29bacSmrg	    ;;
611711a29bacSmrg	  pgCC* | pgcpp*)
611811a29bacSmrg	    # Portland Group C++ compiler
611911a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
612011a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
612111a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
612211a29bacSmrg	    ;;
612311a29bacSmrg	  cxx*)
612411a29bacSmrg	    # Compaq C++
612511a29bacSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
612611a29bacSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
612711a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
612811a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
612911a29bacSmrg	    ;;
613011a29bacSmrg	  xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*)
613111a29bacSmrg	    # IBM XL 8.0, 9.0 on PPC and BlueGene
613211a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
613311a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
613411a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
613511a29bacSmrg	    ;;
613611a29bacSmrg	  *)
613711a29bacSmrg	    case `$CC -V 2>&1 | sed 5q` in
613811a29bacSmrg	    *Sun\ C*)
613911a29bacSmrg	      # Sun C++ 5.9
614011a29bacSmrg	      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
614111a29bacSmrg	      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
614211a29bacSmrg	      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
614311a29bacSmrg	      ;;
614411a29bacSmrg	    esac
614511a29bacSmrg	    ;;
614611a29bacSmrg	esac
614711245024Smrg	;;
614811a29bacSmrg      lynxos*)
614911a29bacSmrg	;;
615011a29bacSmrg      m88k*)
615111a29bacSmrg	;;
615211a29bacSmrg      mvs*)
615311a29bacSmrg	case $cc_basename in
615411a29bacSmrg	  cxx*)
615511a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
615611a29bacSmrg	    ;;
615711a29bacSmrg	  *)
615811a29bacSmrg	    ;;
615911245024Smrg	esac
616011245024Smrg	;;
616111a29bacSmrg      netbsd*)
616211245024Smrg	;;
616311a29bacSmrg      *qnx* | *nto*)
616411a29bacSmrg        # QNX uses GNU C++, but need to define -shared option too, otherwise
616511a29bacSmrg        # it will coredump.
616611a29bacSmrg        _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
616711a29bacSmrg        ;;
616811a29bacSmrg      osf3* | osf4* | osf5*)
616911a29bacSmrg	case $cc_basename in
617011a29bacSmrg	  KCC*)
617111a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
617211a29bacSmrg	    ;;
617311a29bacSmrg	  RCC*)
617411a29bacSmrg	    # Rational C++ 2.4.1
617511a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
617611a29bacSmrg	    ;;
617711a29bacSmrg	  cxx*)
617811a29bacSmrg	    # Digital/Compaq C++
617911a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
618011a29bacSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
618111a29bacSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
618211a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
618311a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
618411a29bacSmrg	    ;;
618511a29bacSmrg	  *)
618611a29bacSmrg	    ;;
618711245024Smrg	esac
618811245024Smrg	;;
618911a29bacSmrg      psos*)
619011245024Smrg	;;
619111a29bacSmrg      solaris*)
619211a29bacSmrg	case $cc_basename in
619311a29bacSmrg	  CC* | sunCC*)
619411a29bacSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
619511a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
619611a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
619711a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
619811a29bacSmrg	    ;;
619911a29bacSmrg	  gcx*)
620011a29bacSmrg	    # Green Hills C++ Compiler
620111a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
620211a29bacSmrg	    ;;
620311a29bacSmrg	  *)
620411a29bacSmrg	    ;;
620511a29bacSmrg	esac
620611245024Smrg	;;
620711a29bacSmrg      sunos4*)
620811a29bacSmrg	case $cc_basename in
620911a29bacSmrg	  CC*)
621011a29bacSmrg	    # Sun C++ 4.x
621111a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
621211a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
621311a29bacSmrg	    ;;
621411a29bacSmrg	  lcc*)
621511a29bacSmrg	    # Lucid
621611a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
621711a29bacSmrg	    ;;
621811a29bacSmrg	  *)
621911a29bacSmrg	    ;;
622011a29bacSmrg	esac
622111a29bacSmrg	;;
622211a29bacSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
622311a29bacSmrg	case $cc_basename in
622411a29bacSmrg	  CC*)
622511a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
622611a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
622711a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
622811a29bacSmrg	    ;;
622911a29bacSmrg	esac
623011245024Smrg	;;
623111a29bacSmrg      tandem*)
623211a29bacSmrg	case $cc_basename in
623311a29bacSmrg	  NCC*)
623411a29bacSmrg	    # NonStop-UX NCC 3.20
623511a29bacSmrg	    _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
623611a29bacSmrg	    ;;
623711a29bacSmrg	  *)
623811a29bacSmrg	    ;;
623911a29bacSmrg	esac
624011245024Smrg	;;
624111a29bacSmrg      vxworks*)
624211245024Smrg	;;
624311245024Smrg      *)
624411a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
624511245024Smrg	;;
624611245024Smrg    esac
624711a29bacSmrg  fi
624811a29bacSmrg],
624911a29bacSmrg[
625011a29bacSmrg  if test "$GCC" = yes; then
625111a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
625211a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
625341b2f0bdSmrg
625411a29bacSmrg    case $host_os in
625511a29bacSmrg      aix*)
625611a29bacSmrg      # All AIX code is PIC.
625711a29bacSmrg      if test "$host_cpu" = ia64; then
625811a29bacSmrg	# AIX 5 now supports IA64 processor
625911a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
626011a29bacSmrg      fi
626111a29bacSmrg      ;;
626241b2f0bdSmrg
626311a29bacSmrg    amigaos*)
626411a29bacSmrg      case $host_cpu in
626511a29bacSmrg      powerpc)
626611a29bacSmrg            # see comment about AmigaOS4 .so support
626711a29bacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
626811a29bacSmrg        ;;
626911a29bacSmrg      m68k)
627011a29bacSmrg            # FIXME: we need at least 68020 code to build shared libraries, but
627111a29bacSmrg            # adding the `-m68020' flag to GCC prevents building anything better,
627211a29bacSmrg            # like `-m68040'.
627311a29bacSmrg            _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
627411a29bacSmrg        ;;
627511a29bacSmrg      esac
627611a29bacSmrg      ;;
627741b2f0bdSmrg
627811a29bacSmrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
627911a29bacSmrg      # PIC is the default for these OSes.
628011a29bacSmrg      ;;
628141b2f0bdSmrg
628211a29bacSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
628311a29bacSmrg      # This hack is so that the source file can tell whether it is being
628411a29bacSmrg      # built for inclusion in a dll (and should export symbols for example).
628511a29bacSmrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
628611a29bacSmrg      # (--disable-auto-import) libraries
628711a29bacSmrg      m4_if([$1], [GCJ], [],
628811a29bacSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
628911a29bacSmrg      ;;
629041b2f0bdSmrg
629111a29bacSmrg    darwin* | rhapsody*)
629211a29bacSmrg      # PIC is the default on this platform
629311a29bacSmrg      # Common symbols not allowed in MH_DYLIB files
629411a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
629511a29bacSmrg      ;;
629611a29bacSmrg
629711a29bacSmrg    haiku*)
629811a29bacSmrg      # PIC is the default for Haiku.
629911a29bacSmrg      # The "-static" flag exists, but is broken.
630011a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)=
630111a29bacSmrg      ;;
630211a29bacSmrg
630311a29bacSmrg    hpux*)
630411a29bacSmrg      # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
630511a29bacSmrg      # PA HP-UX.  On IA64 HP-UX, PIC is the default but the pic flag
630611a29bacSmrg      # sets the default TLS model and affects inlining.
630711a29bacSmrg      case $host_cpu in
630811a29bacSmrg      hppa*64*)
630911a29bacSmrg	# +Z the default
631011245024Smrg	;;
631111245024Smrg      *)
631211a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
631311245024Smrg	;;
631411a29bacSmrg      esac
631511a29bacSmrg      ;;
631641b2f0bdSmrg
631711a29bacSmrg    interix[[3-9]]*)
631811a29bacSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
631911a29bacSmrg      # Instead, we relocate shared libraries at runtime.
632011a29bacSmrg      ;;
632141b2f0bdSmrg
632211a29bacSmrg    msdosdjgpp*)
632311a29bacSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
632411a29bacSmrg      # on systems that don't support them.
632511a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
632611a29bacSmrg      enable_shared=no
632711a29bacSmrg      ;;
632841b2f0bdSmrg
632911a29bacSmrg    *nto* | *qnx*)
633011a29bacSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
633111a29bacSmrg      # it will coredump.
633211a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
633311a29bacSmrg      ;;
633441b2f0bdSmrg
633511a29bacSmrg    sysv4*MP*)
633611a29bacSmrg      if test -d /usr/nec; then
633711a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
633811a29bacSmrg      fi
633911a29bacSmrg      ;;
634041b2f0bdSmrg
634111a29bacSmrg    *)
634211a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
634311a29bacSmrg      ;;
634411245024Smrg    esac
634541b2f0bdSmrg
634611245024Smrg    case $cc_basename in
634711a29bacSmrg    nvcc*) # Cuda Compiler Driver 2.2
634811a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker '
634911a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC'
635011a29bacSmrg      ;;
635111245024Smrg    esac
635211a29bacSmrg  else
635311a29bacSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
635411a29bacSmrg    case $host_os in
635511a29bacSmrg    aix*)
635611a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
635711a29bacSmrg      if test "$host_cpu" = ia64; then
635811a29bacSmrg	# AIX 5 now supports IA64 processor
635911a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
636011a29bacSmrg      else
636111a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
636211a29bacSmrg      fi
636311a29bacSmrg      ;;
636441b2f0bdSmrg
636511a29bacSmrg    mingw* | cygwin* | pw32* | os2* | cegcc*)
636611a29bacSmrg      # This hack is so that the source file can tell whether it is being
636711a29bacSmrg      # built for inclusion in a dll (and should export symbols for example).
636811a29bacSmrg      m4_if([$1], [GCJ], [],
636911a29bacSmrg	[_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
637011a29bacSmrg      ;;
637111a29bacSmrg
637211a29bacSmrg    hpux9* | hpux10* | hpux11*)
637311a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
637411a29bacSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
637511a29bacSmrg      # not for PA HP-UX.
637611a29bacSmrg      case $host_cpu in
637711a29bacSmrg      hppa*64*|ia64*)
637811a29bacSmrg	# +Z the default
637911245024Smrg	;;
638011245024Smrg      *)
638111a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
638211245024Smrg	;;
638311a29bacSmrg      esac
638411a29bacSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
638511a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
638611a29bacSmrg      ;;
638711a29bacSmrg
638811a29bacSmrg    irix5* | irix6* | nonstopux*)
638911a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
639011a29bacSmrg      # PIC (with -KPIC) is the default.
639111a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
639211a29bacSmrg      ;;
639311a29bacSmrg
639411a29bacSmrg    linux* | k*bsd*-gnu | kopensolaris*-gnu)
639511a29bacSmrg      case $cc_basename in
639611a29bacSmrg      # old Intel for x86_64 which still supported -KPIC.
639711a29bacSmrg      ecc*)
639811a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
639911a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
640011a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
640111a29bacSmrg        ;;
640211a29bacSmrg      # icc used to be incompatible with GCC.
640311a29bacSmrg      # ICC 10 doesn't accept -KPIC any more.
640411a29bacSmrg      icc* | ifort*)
640511a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
640611a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
640711a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
640811a29bacSmrg        ;;
640911a29bacSmrg      # Lahey Fortran 8.1.
641011a29bacSmrg      lf95*)
641111a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
641211a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
641311a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
641411a29bacSmrg	;;
641511a29bacSmrg      pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
641611a29bacSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
641711a29bacSmrg	# which looks to be a dead project)
641811a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
641911a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
642011a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
642111a29bacSmrg        ;;
642211a29bacSmrg      ccc*)
642311a29bacSmrg        _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
642411a29bacSmrg        # All Alpha code is PIC.
642511a29bacSmrg        _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
642611a29bacSmrg        ;;
642711a29bacSmrg      xl* | bgxl* | bgf* | mpixl*)
642811a29bacSmrg	# IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene
642911a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
643011a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
643111a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
643211245024Smrg	;;
643311245024Smrg      *)
643411a29bacSmrg	case `$CC -V 2>&1 | sed 5q` in
643511a29bacSmrg	*Sun\ F* | *Sun*Fortran*)
643611a29bacSmrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
643711a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
643811a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
643911a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
644011a29bacSmrg	  ;;
644111a29bacSmrg	*Sun\ C*)
644211a29bacSmrg	  # Sun C 5.9
644311a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
644411a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
644511a29bacSmrg	  _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
644611a29bacSmrg	  ;;
644711a29bacSmrg	esac
644811245024Smrg	;;
644911a29bacSmrg      esac
645011a29bacSmrg      ;;
645141b2f0bdSmrg
645211a29bacSmrg    newsos6)
645311a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
645411a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
645511a29bacSmrg      ;;
645641b2f0bdSmrg
645711a29bacSmrg    *nto* | *qnx*)
645811a29bacSmrg      # QNX uses GNU C++, but need to define -shared option too, otherwise
645911a29bacSmrg      # it will coredump.
646011a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
646111a29bacSmrg      ;;
646241b2f0bdSmrg
646311a29bacSmrg    osf3* | osf4* | osf5*)
646411a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
646511a29bacSmrg      # All OSF/1 code is PIC.
646611a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
646711a29bacSmrg      ;;
646811245024Smrg
646911a29bacSmrg    rdos*)
647011a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
647111a29bacSmrg      ;;
647211245024Smrg
647311a29bacSmrg    solaris*)
647411a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
647511a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
647611a29bacSmrg      case $cc_basename in
647711a29bacSmrg      f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
647811a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
647911a29bacSmrg      *)
648011a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
648111a29bacSmrg      esac
648211a29bacSmrg      ;;
648311245024Smrg
648411a29bacSmrg    sunos4*)
648511a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
648611a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
648711a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
648811a29bacSmrg      ;;
648911245024Smrg
649011a29bacSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
649111a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
649211a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
649311a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
649411a29bacSmrg      ;;
649511245024Smrg
649611a29bacSmrg    sysv4*MP*)
649711a29bacSmrg      if test -d /usr/nec ;then
649811a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
649911a29bacSmrg	_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
650011a29bacSmrg      fi
650111a29bacSmrg      ;;
650211245024Smrg
650311a29bacSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
650411a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
650511a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
650611a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
650711a29bacSmrg      ;;
650811245024Smrg
650911a29bacSmrg    unicos*)
651011a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
651111a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
651211a29bacSmrg      ;;
651311245024Smrg
651411a29bacSmrg    uts4*)
651511a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
651611a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
651711a29bacSmrg      ;;
651811245024Smrg
651911a29bacSmrg    *)
652011a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
652111a29bacSmrg      ;;
652211245024Smrg    esac
652311a29bacSmrg  fi
652411a29bacSmrg])
652511a29bacSmrgcase $host_os in
652611a29bacSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
652711a29bacSmrg  *djgpp*)
652811a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)=
652911a29bacSmrg    ;;
653011a29bacSmrg  *)
653111a29bacSmrg    _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
653211a29bacSmrg    ;;
653311a29bacSmrgesac
653411a29bacSmrgAC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
653511a29bacSmrg_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
653611a29bacSmrg	[How to pass a linker flag through the compiler])
653711245024Smrg
653811a29bacSmrg#
653911a29bacSmrg# Check to make sure the PIC flag actually works.
654011a29bacSmrg#
654111a29bacSmrgif test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
654211a29bacSmrg  _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
654311a29bacSmrg    [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
654411a29bacSmrg    [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
654511a29bacSmrg    [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
654611a29bacSmrg     "" | " "*) ;;
654711a29bacSmrg     *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
654811a29bacSmrg     esac],
654911a29bacSmrg    [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
655011a29bacSmrg     _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
655141b2f0bdSmrgfi
655211a29bacSmrg_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
655311a29bacSmrg	[Additional compiler flags for building library objects])
655441b2f0bdSmrg
655511a29bacSmrg#
655611a29bacSmrg# Check to make sure the static flag actually works.
655711a29bacSmrg#
655811a29bacSmrgwl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
655911a29bacSmrg_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
656011a29bacSmrg  _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
656111a29bacSmrg  $lt_tmp_static_flag,
656211a29bacSmrg  [],
656311a29bacSmrg  [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
656411a29bacSmrg_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
656511a29bacSmrg	[Compiler flag to prevent dynamic linking])
656611a29bacSmrg])# _LT_COMPILER_PIC
656741b2f0bdSmrg
656841b2f0bdSmrg
656911a29bacSmrg# _LT_LINKER_SHLIBS([TAGNAME])
657011a29bacSmrg# ----------------------------
657111a29bacSmrg# See if the linker supports building shared libraries.
657211a29bacSmrgm4_defun([_LT_LINKER_SHLIBS],
657311a29bacSmrg[AC_REQUIRE([LT_PATH_LD])dnl
657411a29bacSmrgAC_REQUIRE([LT_PATH_NM])dnl
657511a29bacSmrgm4_require([_LT_FILEUTILS_DEFAULTS])dnl
657611a29bacSmrgm4_require([_LT_DECL_EGREP])dnl
657711a29bacSmrgm4_require([_LT_DECL_SED])dnl
657811a29bacSmrgm4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
657911a29bacSmrgm4_require([_LT_TAG_COMPILER])dnl
658011a29bacSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
658111a29bacSmrgm4_if([$1], [CXX], [
658211a29bacSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
658311a29bacSmrg  case $host_os in
658411a29bacSmrg  aix[[4-9]]*)
658511a29bacSmrg    # If we're using GNU nm, then we don't want the "-C" option.
658611a29bacSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
658711a29bacSmrg    # Also, AIX nm treats weak defined symbols like other global defined
658811a29bacSmrg    # symbols, whereas GNU nm marks them as "W".
658911a29bacSmrg    if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
659011a29bacSmrg      _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'
659111a29bacSmrg    else
659211a29bacSmrg      _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'
659311245024Smrg    fi
659411245024Smrg    ;;
659511a29bacSmrg  pw32*)
659611a29bacSmrg    _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
659711245024Smrg  ;;
659811a29bacSmrg  cygwin* | mingw* | cegcc*)
659911a29bacSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
660011a29bacSmrg  ;;
660111a29bacSmrg  *)
660211a29bacSmrg    _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
660311a29bacSmrg  ;;
660411a29bacSmrg  esac
660511a29bacSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
660611a29bacSmrg], [
660711a29bacSmrg  runpath_var=
660811a29bacSmrg  _LT_TAGVAR(allow_undefined_flag, $1)=
660911a29bacSmrg  _LT_TAGVAR(always_export_symbols, $1)=no
661011a29bacSmrg  _LT_TAGVAR(archive_cmds, $1)=
661111a29bacSmrg  _LT_TAGVAR(archive_expsym_cmds, $1)=
661211a29bacSmrg  _LT_TAGVAR(compiler_needs_object, $1)=no
661311a29bacSmrg  _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
661411a29bacSmrg  _LT_TAGVAR(export_dynamic_flag_spec, $1)=
661511a29bacSmrg  _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
661611a29bacSmrg  _LT_TAGVAR(hardcode_automatic, $1)=no
661711a29bacSmrg  _LT_TAGVAR(hardcode_direct, $1)=no
661811a29bacSmrg  _LT_TAGVAR(hardcode_direct_absolute, $1)=no
661911a29bacSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
662011a29bacSmrg  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
662111a29bacSmrg  _LT_TAGVAR(hardcode_libdir_separator, $1)=
662211a29bacSmrg  _LT_TAGVAR(hardcode_minus_L, $1)=no
662311a29bacSmrg  _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
662411a29bacSmrg  _LT_TAGVAR(inherit_rpath, $1)=no
662511a29bacSmrg  _LT_TAGVAR(link_all_deplibs, $1)=unknown
662611a29bacSmrg  _LT_TAGVAR(module_cmds, $1)=
662711a29bacSmrg  _LT_TAGVAR(module_expsym_cmds, $1)=
662811a29bacSmrg  _LT_TAGVAR(old_archive_from_new_cmds, $1)=
662911a29bacSmrg  _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
663011a29bacSmrg  _LT_TAGVAR(thread_safe_flag_spec, $1)=
663111a29bacSmrg  _LT_TAGVAR(whole_archive_flag_spec, $1)=
663211a29bacSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
663311a29bacSmrg  # included in the symbol list
663411a29bacSmrg  _LT_TAGVAR(include_expsyms, $1)=
663511a29bacSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
663611a29bacSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
663711a29bacSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
663811a29bacSmrg  # as well as any symbol that contains `d'.
663911a29bacSmrg  _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
664011a29bacSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
664111a29bacSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
664211a29bacSmrg  # the symbol is explicitly referenced.  Since portable code cannot
664311a29bacSmrg  # rely on this symbol name, it's probably fine to never include it in
664411a29bacSmrg  # preloaded symbol tables.
664511a29bacSmrg  # Exclude shared library initialization/finalization symbols.
664611a29bacSmrgdnl Note also adjust exclude_expsyms for C++ above.
664711a29bacSmrg  extract_expsyms_cmds=
664811245024Smrg
664911a29bacSmrg  case $host_os in
665011a29bacSmrg  cygwin* | mingw* | pw32* | cegcc*)
665111a29bacSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
665211a29bacSmrg    # When not using gcc, we currently assume that we are using
665311a29bacSmrg    # Microsoft Visual C++.
665411a29bacSmrg    if test "$GCC" != yes; then
665511a29bacSmrg      with_gnu_ld=no
665611245024Smrg    fi
665711245024Smrg    ;;
665811a29bacSmrg  interix*)
665911a29bacSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
666011a29bacSmrg    with_gnu_ld=yes
666111a29bacSmrg    ;;
666211a29bacSmrg  openbsd*)
666311a29bacSmrg    with_gnu_ld=no
666411a29bacSmrg    ;;
666511245024Smrg  esac
666611245024Smrg
666711a29bacSmrg  _LT_TAGVAR(ld_shlibs, $1)=yes
666811245024Smrg
666911a29bacSmrg  # On some targets, GNU ld is compatible enough with the native linker
667011a29bacSmrg  # that we're better off using the native interface for both.
667111a29bacSmrg  lt_use_gnu_ld_interface=no
667211a29bacSmrg  if test "$with_gnu_ld" = yes; then
667311a29bacSmrg    case $host_os in
667411a29bacSmrg      aix*)
667511a29bacSmrg	# The AIX port of GNU ld has always aspired to compatibility
667611a29bacSmrg	# with the native linker.  However, as the warning in the GNU ld
667711a29bacSmrg	# block says, versions before 2.19.5* couldn't really create working
667811a29bacSmrg	# shared libraries, regardless of the interface used.
667911a29bacSmrg	case `$LD -v 2>&1` in
668011a29bacSmrg	  *\ \(GNU\ Binutils\)\ 2.19.5*) ;;
668111a29bacSmrg	  *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;;
668211a29bacSmrg	  *\ \(GNU\ Binutils\)\ [[3-9]]*) ;;
668311a29bacSmrg	  *)
668411a29bacSmrg	    lt_use_gnu_ld_interface=yes
668511a29bacSmrg	    ;;
668611a29bacSmrg	esac
668711a29bacSmrg	;;
668811a29bacSmrg      *)
668911a29bacSmrg	lt_use_gnu_ld_interface=yes
669011a29bacSmrg	;;
669111a29bacSmrg    esac
669211a29bacSmrg  fi
669311245024Smrg
669411a29bacSmrg  if test "$lt_use_gnu_ld_interface" = yes; then
669511a29bacSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
669611a29bacSmrg    wlarc='${wl}'
669711245024Smrg
669811a29bacSmrg    # Set some defaults for GNU ld with shared library support. These
669911a29bacSmrg    # are reset later if shared libraries are not supported. Putting them
670011a29bacSmrg    # here allows them to be overridden if necessary.
670111a29bacSmrg    runpath_var=LD_RUN_PATH
670211a29bacSmrg    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
670311a29bacSmrg    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
670411a29bacSmrg    # ancient GNU ld didn't support --whole-archive et. al.
670511a29bacSmrg    if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
670611a29bacSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
670711a29bacSmrg    else
670811a29bacSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
670911a29bacSmrg    fi
671011a29bacSmrg    supports_anon_versioning=no
671111a29bacSmrg    case `$LD -v 2>&1` in
671211a29bacSmrg      *GNU\ gold*) supports_anon_versioning=yes ;;
671311a29bacSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
671411a29bacSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
671511a29bacSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
671611a29bacSmrg      *\ 2.11.*) ;; # other 2.11 versions
671711a29bacSmrg      *) supports_anon_versioning=yes ;;
671811a29bacSmrg    esac
671911245024Smrg
672011a29bacSmrg    # See if GNU ld supports shared libraries.
672111a29bacSmrg    case $host_os in
672211a29bacSmrg    aix[[3-9]]*)
672311a29bacSmrg      # On AIX/PPC, the GNU linker is very broken
672411a29bacSmrg      if test "$host_cpu" != ia64; then
672511a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
672611a29bacSmrg	cat <<_LT_EOF 1>&2
672711245024Smrg
672811a29bacSmrg*** Warning: the GNU linker, at least up to release 2.19, is reported
672911a29bacSmrg*** to be unable to reliably create shared libraries on AIX.
673011a29bacSmrg*** Therefore, libtool is disabling shared libraries support.  If you
673111a29bacSmrg*** really care for shared libraries, you may want to install binutils
673211a29bacSmrg*** 2.20 or above, or modify your PATH so that a non-GNU linker is found.
673311a29bacSmrg*** You will then need to restart the configuration process.
673411245024Smrg
673511a29bacSmrg_LT_EOF
673611a29bacSmrg      fi
673711a29bacSmrg      ;;
673811245024Smrg
673911a29bacSmrg    amigaos*)
674011a29bacSmrg      case $host_cpu in
674111a29bacSmrg      powerpc)
674211a29bacSmrg            # see comment about AmigaOS4 .so support
674311a29bacSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
674411a29bacSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
674511a29bacSmrg        ;;
674611a29bacSmrg      m68k)
674711a29bacSmrg            _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)'
674811a29bacSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
674911a29bacSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
675011a29bacSmrg        ;;
675111a29bacSmrg      esac
675211a29bacSmrg      ;;
675311245024Smrg
675411a29bacSmrg    beos*)
675511a29bacSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
675611a29bacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=unsupported
675711a29bacSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
675811a29bacSmrg	# support --undefined.  This deserves some investigation.  FIXME
675911a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
676011a29bacSmrg      else
676111a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
676211a29bacSmrg      fi
676311a29bacSmrg      ;;
676411245024Smrg
676511a29bacSmrg    cygwin* | mingw* | pw32* | cegcc*)
676611a29bacSmrg      # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
676711a29bacSmrg      # as there is no search path for DLLs.
676811a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
676911a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
677011a29bacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
677111a29bacSmrg      _LT_TAGVAR(always_export_symbols, $1)=no
677211a29bacSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
677311a29bacSmrg      _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'
677411a29bacSmrg
677511a29bacSmrg      if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
677611a29bacSmrg        _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'
677711a29bacSmrg	# If the export-symbols file already is a .def file (1st line
677811a29bacSmrg	# is EXPORTS), use it as is; otherwise, prepend...
677911a29bacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
678011a29bacSmrg	  cp $export_symbols $output_objdir/$soname.def;
678111a29bacSmrg	else
678211a29bacSmrg	  echo EXPORTS > $output_objdir/$soname.def;
678311a29bacSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
678411a29bacSmrg	fi~
678511a29bacSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
678611a29bacSmrg      else
678711a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
678811a29bacSmrg      fi
678911a29bacSmrg      ;;
679011245024Smrg
679111a29bacSmrg    haiku*)
679211a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
679311a29bacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
679411a29bacSmrg      ;;
679511245024Smrg
679611a29bacSmrg    interix[[3-9]]*)
679711a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=no
679811a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
679911a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
680011a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
680111a29bacSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
680211a29bacSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
680311a29bacSmrg      # default) and relocated if they conflict, which is a slow very memory
680411a29bacSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
680511a29bacSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
680611a29bacSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
680711a29bacSmrg      _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'
680811a29bacSmrg      _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'
680911a29bacSmrg      ;;
681011245024Smrg
681111a29bacSmrg    gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
681211a29bacSmrg      tmp_diet=no
681311a29bacSmrg      if test "$host_os" = linux-dietlibc; then
681411a29bacSmrg	case $cc_basename in
681511a29bacSmrg	  diet\ *) tmp_diet=yes;;	# linux-dietlibc with static linking (!diet-dyn)
681611a29bacSmrg	esac
681711a29bacSmrg      fi
681811a29bacSmrg      if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
681911a29bacSmrg	 && test "$tmp_diet" = no
682011a29bacSmrg      then
682111a29bacSmrg	tmp_addflag=
682211a29bacSmrg	tmp_sharedflag='-shared'
682311a29bacSmrg	case $cc_basename,$host_cpu in
682411a29bacSmrg        pgcc*)				# Portland Group C compiler
682511a29bacSmrg	  _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'
682611a29bacSmrg	  tmp_addflag=' $pic_flag'
682711a29bacSmrg	  ;;
682811a29bacSmrg	pgf77* | pgf90* | pgf95* | pgfortran*)
682911a29bacSmrg					# Portland Group f77 and f90 compilers
683011a29bacSmrg	  _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'
683111a29bacSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
683211a29bacSmrg	ecc*,ia64* | icc*,ia64*)	# Intel C compiler on ia64
683311a29bacSmrg	  tmp_addflag=' -i_dynamic' ;;
683411a29bacSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
683511a29bacSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
683611a29bacSmrg	ifc* | ifort*)			# Intel Fortran compiler
683711a29bacSmrg	  tmp_addflag=' -nofor_main' ;;
683811a29bacSmrg	lf95*)				# Lahey Fortran 8.1
683911a29bacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)=
684011a29bacSmrg	  tmp_sharedflag='--shared' ;;
684111a29bacSmrg	xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
684211a29bacSmrg	  tmp_sharedflag='-qmkshrobj'
684311a29bacSmrg	  tmp_addflag= ;;
684411a29bacSmrg	nvcc*)	# Cuda Compiler Driver 2.2
684511a29bacSmrg	  _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'
684611a29bacSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
684711a29bacSmrg	  ;;
684811a29bacSmrg	esac
684911a29bacSmrg	case `$CC -V 2>&1 | sed 5q` in
685011a29bacSmrg	*Sun\ C*)			# Sun C 5.9
685111a29bacSmrg	  _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'
685211a29bacSmrg	  _LT_TAGVAR(compiler_needs_object, $1)=yes
685311a29bacSmrg	  tmp_sharedflag='-G' ;;
685411a29bacSmrg	*Sun\ F*)			# Sun Fortran 8.3
685511a29bacSmrg	  tmp_sharedflag='-G' ;;
685611a29bacSmrg	esac
685711a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
685811245024Smrg
685911a29bacSmrg        if test "x$supports_anon_versioning" = xyes; then
686011a29bacSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
686111a29bacSmrg	    cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
686211a29bacSmrg	    echo "local: *; };" >> $output_objdir/$libname.ver~
686311a29bacSmrg	    $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
686411a29bacSmrg        fi
686511245024Smrg
686611a29bacSmrg	case $cc_basename in
686711a29bacSmrg	xlf* | bgf* | bgxlf* | mpixlf*)
686811a29bacSmrg	  # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
686911a29bacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
687011a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
687111a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
687211a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib'
687311a29bacSmrg	  if test "x$supports_anon_versioning" = xyes; then
687411a29bacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
687511a29bacSmrg	      cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
687611a29bacSmrg	      echo "local: *; };" >> $output_objdir/$libname.ver~
687711a29bacSmrg	      $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
687811a29bacSmrg	  fi
687911a29bacSmrg	  ;;
688011a29bacSmrg	esac
688111a29bacSmrg      else
688211a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
688311a29bacSmrg      fi
688411a29bacSmrg      ;;
688511245024Smrg
688611a29bacSmrg    netbsd*)
688711a29bacSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
688811a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
688911a29bacSmrg	wlarc=
689011a29bacSmrg      else
689111a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
689211a29bacSmrg	_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'
689311a29bacSmrg      fi
689411a29bacSmrg      ;;
689511245024Smrg
689611a29bacSmrg    solaris*)
689711a29bacSmrg      if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
689811a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
689911a29bacSmrg	cat <<_LT_EOF 1>&2
690011245024Smrg
690111a29bacSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
690211a29bacSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
690311a29bacSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
690411a29bacSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
690511a29bacSmrg*** your PATH or compiler configuration so that the native linker is
690611a29bacSmrg*** used, and then restart.
690711245024Smrg
690811a29bacSmrg_LT_EOF
690911a29bacSmrg      elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
691011a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
691111a29bacSmrg	_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'
691211a29bacSmrg      else
691311a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
691411a29bacSmrg      fi
691511a29bacSmrg      ;;
691611245024Smrg
691711a29bacSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
691811a29bacSmrg      case `$LD -v 2>&1` in
691911a29bacSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
692011a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
692111a29bacSmrg	cat <<_LT_EOF 1>&2
692211245024Smrg
692311a29bacSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
692411a29bacSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
692511a29bacSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
692611a29bacSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
692711a29bacSmrg*** your PATH or compiler configuration so that the native linker is
692811a29bacSmrg*** used, and then restart.
692911245024Smrg
693011a29bacSmrg_LT_EOF
693111a29bacSmrg	;;
693211a29bacSmrg	*)
693311a29bacSmrg	  # For security reasons, it is highly recommended that you always
693411a29bacSmrg	  # use absolute paths for naming shared libraries, and exclude the
693511a29bacSmrg	  # DT_RUNPATH tag from executables and libraries.  But doing so
693611a29bacSmrg	  # requires that you compile everything twice, which is a pain.
693711a29bacSmrg	  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
693811a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
693911a29bacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
694011a29bacSmrg	    _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'
694111a29bacSmrg	  else
694211a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
694311a29bacSmrg	  fi
694411a29bacSmrg	;;
694511a29bacSmrg      esac
694611a29bacSmrg      ;;
694711245024Smrg
694811a29bacSmrg    sunos4*)
694911a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
695011a29bacSmrg      wlarc=
695111a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
695211a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
695311a29bacSmrg      ;;
695411245024Smrg
695511a29bacSmrg    *)
695611a29bacSmrg      if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
695711a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
695811a29bacSmrg	_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'
695911a29bacSmrg      else
696011a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
696111a29bacSmrg      fi
696211a29bacSmrg      ;;
696311a29bacSmrg    esac
696411245024Smrg
696511a29bacSmrg    if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
696611a29bacSmrg      runpath_var=
696711a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
696811a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=
696911a29bacSmrg      _LT_TAGVAR(whole_archive_flag_spec, $1)=
697011a29bacSmrg    fi
697111a29bacSmrg  else
697211a29bacSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
697311a29bacSmrg    case $host_os in
697411a29bacSmrg    aix3*)
697511a29bacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
697611a29bacSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
697711a29bacSmrg      _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'
697811a29bacSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
697911a29bacSmrg      # are no directories specified by -L.
698011a29bacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
698111a29bacSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
698211a29bacSmrg	# Neither direct hardcoding nor static linking is supported with a
698311a29bacSmrg	# broken collect2.
698411a29bacSmrg	_LT_TAGVAR(hardcode_direct, $1)=unsupported
698511a29bacSmrg      fi
698611a29bacSmrg      ;;
698711245024Smrg
698811a29bacSmrg    aix[[4-9]]*)
698911a29bacSmrg      if test "$host_cpu" = ia64; then
699011a29bacSmrg	# On IA64, the linker does run time linking by default, so we don't
699111a29bacSmrg	# have to do anything special.
699211a29bacSmrg	aix_use_runtimelinking=no
699311a29bacSmrg	exp_sym_flag='-Bexport'
699411a29bacSmrg	no_entry_flag=""
699511a29bacSmrg      else
699611a29bacSmrg	# If we're using GNU nm, then we don't want the "-C" option.
699711a29bacSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
699811a29bacSmrg	# Also, AIX nm treats weak defined symbols like other global
699911a29bacSmrg	# defined symbols, whereas GNU nm marks them as "W".
700011a29bacSmrg	if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
700111a29bacSmrg	  _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'
700211a29bacSmrg	else
700311a29bacSmrg	  _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'
700411a29bacSmrg	fi
700511a29bacSmrg	aix_use_runtimelinking=no
700611245024Smrg
700711a29bacSmrg	# Test if we are trying to use run time linking or normal
700811a29bacSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
700911a29bacSmrg	# need to do runtime linking.
701011a29bacSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
701111a29bacSmrg	  for ld_flag in $LDFLAGS; do
701211a29bacSmrg	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
701311a29bacSmrg	    aix_use_runtimelinking=yes
701411a29bacSmrg	    break
701511a29bacSmrg	  fi
701611a29bacSmrg	  done
701711a29bacSmrg	  ;;
701811a29bacSmrg	esac
701911245024Smrg
702011a29bacSmrg	exp_sym_flag='-bexport'
702111a29bacSmrg	no_entry_flag='-bnoentry'
702211a29bacSmrg      fi
702311245024Smrg
702411a29bacSmrg      # When large executables or shared objects are built, AIX ld can
702511a29bacSmrg      # have problems creating the table of contents.  If linking a library
702611a29bacSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
702711a29bacSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
702811a29bacSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
702911245024Smrg
703011a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)=''
703111a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
703211a29bacSmrg      _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
703311a29bacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
703411a29bacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
703511a29bacSmrg      _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
703611245024Smrg
703711a29bacSmrg      if test "$GCC" = yes; then
703811a29bacSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
703911a29bacSmrg	# We only want to do this on AIX 4.2 and lower, the check
704011a29bacSmrg	# below for broken collect2 doesn't work under 4.3+
704111a29bacSmrg	  collect2name=`${CC} -print-prog-name=collect2`
704211a29bacSmrg	  if test -f "$collect2name" &&
704311a29bacSmrg	   strings "$collect2name" | $GREP resolve_lib_name >/dev/null
704411a29bacSmrg	  then
704511a29bacSmrg	  # We have reworked collect2
704611a29bacSmrg	  :
704711a29bacSmrg	  else
704811a29bacSmrg	  # We have old collect2
704911a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=unsupported
705011a29bacSmrg	  # It fails to find uninstalled libraries when the uninstalled
705111a29bacSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
705211a29bacSmrg	  # to unsupported forces relinking
705311a29bacSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
705411a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
705511a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=
705611a29bacSmrg	  fi
705711a29bacSmrg	  ;;
705811a29bacSmrg	esac
705911a29bacSmrg	shared_flag='-shared'
706011a29bacSmrg	if test "$aix_use_runtimelinking" = yes; then
706111a29bacSmrg	  shared_flag="$shared_flag "'${wl}-G'
706211a29bacSmrg	fi
706311a29bacSmrg      else
706411a29bacSmrg	# not using gcc
706511a29bacSmrg	if test "$host_cpu" = ia64; then
706611a29bacSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
706711a29bacSmrg	# chokes on -Wl,-G. The following line is correct:
706811a29bacSmrg	  shared_flag='-G'
706911a29bacSmrg	else
707011a29bacSmrg	  if test "$aix_use_runtimelinking" = yes; then
707111a29bacSmrg	    shared_flag='${wl}-G'
707211a29bacSmrg	  else
707311a29bacSmrg	    shared_flag='${wl}-bM:SRE'
707411a29bacSmrg	  fi
707511a29bacSmrg	fi
707611a29bacSmrg      fi
707711245024Smrg
707811a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
707911a29bacSmrg      # It seems that -bexpall does not export symbols beginning with
708011a29bacSmrg      # underscore (_), so it is better to generate a list of symbols to export.
708111a29bacSmrg      _LT_TAGVAR(always_export_symbols, $1)=yes
708211a29bacSmrg      if test "$aix_use_runtimelinking" = yes; then
708311a29bacSmrg	# Warning - without using the other runtime loading flags (-brtl),
708411a29bacSmrg	# -berok will link without error, but may produce a broken library.
708511a29bacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='-berok'
708611a29bacSmrg        # Determine the default libpath from the value encoded in an
708711a29bacSmrg        # empty executable.
708811a29bacSmrg        _LT_SYS_MODULE_PATH_AIX
708911a29bacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
709011a29bacSmrg        _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"
709111a29bacSmrg      else
709211a29bacSmrg	if test "$host_cpu" = ia64; then
709311a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
709411a29bacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
709511a29bacSmrg	  _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"
709611a29bacSmrg	else
709711a29bacSmrg	 # Determine the default libpath from the value encoded in an
709811a29bacSmrg	 # empty executable.
709911a29bacSmrg	 _LT_SYS_MODULE_PATH_AIX
710011a29bacSmrg	 _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
710111a29bacSmrg	  # Warning - without using the other run time loading flags,
710211a29bacSmrg	  # -berok will link without error, but may produce a broken library.
710311a29bacSmrg	  _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
710411a29bacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
710511a29bacSmrg	  if test "$with_gnu_ld" = yes; then
710611a29bacSmrg	    # We only use this code for GNU lds that support --whole-archive.
710711a29bacSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
710811a29bacSmrg	  else
710911a29bacSmrg	    # Exported symbols can be pulled into shared objects from archives
711011a29bacSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
711111a29bacSmrg	  fi
711211a29bacSmrg	  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
711311a29bacSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
711411a29bacSmrg	  _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'
711511a29bacSmrg	fi
711611a29bacSmrg      fi
711711a29bacSmrg      ;;
711811245024Smrg
711911a29bacSmrg    amigaos*)
712011a29bacSmrg      case $host_cpu in
712111a29bacSmrg      powerpc)
712211a29bacSmrg            # see comment about AmigaOS4 .so support
712311a29bacSmrg            _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
712411a29bacSmrg            _LT_TAGVAR(archive_expsym_cmds, $1)=''
712511a29bacSmrg        ;;
712611a29bacSmrg      m68k)
712711a29bacSmrg            _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)'
712811a29bacSmrg            _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
712911a29bacSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes
713011a29bacSmrg        ;;
713111a29bacSmrg      esac
713211a29bacSmrg      ;;
713311245024Smrg
713411a29bacSmrg    bsdi[[45]]*)
713511a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
713611a29bacSmrg      ;;
713711245024Smrg
713811a29bacSmrg    cygwin* | mingw* | pw32* | cegcc*)
713911a29bacSmrg      # When not using gcc, we currently assume that we are using
714011a29bacSmrg      # Microsoft Visual C++.
714111a29bacSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
714211a29bacSmrg      # no search path for DLLs.
714311a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
714411a29bacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
714511a29bacSmrg      # Tell ltmain to make .lib files, not .a files.
714611a29bacSmrg      libext=lib
714711a29bacSmrg      # Tell ltmain to make .dll files, not .so files.
714811a29bacSmrg      shrext_cmds=".dll"
714911a29bacSmrg      # FIXME: Setting linknames here is a bad hack.
715011a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames='
715111a29bacSmrg      # The linker will automatically build a .lib file if we build a DLL.
715211a29bacSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
715311a29bacSmrg      # FIXME: Should let the user specify the lib program.
715411a29bacSmrg      _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
715511a29bacSmrg      _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
715611a29bacSmrg      _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
715711a29bacSmrg      ;;
715811245024Smrg
715911a29bacSmrg    darwin* | rhapsody*)
716011a29bacSmrg      _LT_DARWIN_LINKER_FEATURES($1)
716111a29bacSmrg      ;;
716211245024Smrg
716311a29bacSmrg    dgux*)
716411a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
716511a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
716611a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
716711a29bacSmrg      ;;
716811245024Smrg
716911a29bacSmrg    freebsd1*)
717011a29bacSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
717111a29bacSmrg      ;;
717211245024Smrg
717311a29bacSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
717411a29bacSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
717511a29bacSmrg    # does not break anything, and helps significantly (at the cost of a little
717611a29bacSmrg    # extra space).
717711a29bacSmrg    freebsd2.2*)
717811a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
717911a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
718011a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
718111a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
718211a29bacSmrg      ;;
718311245024Smrg
718411a29bacSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
718511a29bacSmrg    freebsd2*)
718611a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
718711a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
718811a29bacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
718911a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
719011245024Smrg      ;;
719111a29bacSmrg
719211a29bacSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
719311a29bacSmrg    freebsd* | dragonfly*)
719411a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
719511a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
719611a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
719711a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
719811245024Smrg      ;;
719911245024Smrg
720011a29bacSmrg    hpux9*)
720111a29bacSmrg      if test "$GCC" = yes; then
720211a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
720311a29bacSmrg      else
720411a29bacSmrg	_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'
720511a29bacSmrg      fi
720611a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
720711a29bacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
720811a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
720911245024Smrg
721011a29bacSmrg      # hardcode_minus_L: Not really in the search PATH,
721111a29bacSmrg      # but as the default location of the library.
721211a29bacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
721311a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
721411a29bacSmrg      ;;
721511245024Smrg
721611a29bacSmrg    hpux10*)
721711a29bacSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
721811a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
721911a29bacSmrg      else
722011a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
722111a29bacSmrg      fi
722211a29bacSmrg      if test "$with_gnu_ld" = no; then
722311a29bacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
722411a29bacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
722511a29bacSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
722611a29bacSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
722711a29bacSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
722811a29bacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
722911a29bacSmrg	# hardcode_minus_L: Not really in the search PATH,
723011a29bacSmrg	# but as the default location of the library.
723111a29bacSmrg	_LT_TAGVAR(hardcode_minus_L, $1)=yes
723211a29bacSmrg      fi
723311a29bacSmrg      ;;
723411245024Smrg
723511a29bacSmrg    hpux11*)
723611a29bacSmrg      if test "$GCC" = yes && test "$with_gnu_ld" = no; then
723711a29bacSmrg	case $host_cpu in
723811a29bacSmrg	hppa*64*)
723911a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
724011a29bacSmrg	  ;;
724111a29bacSmrg	ia64*)
724211a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
724311a29bacSmrg	  ;;
724411a29bacSmrg	*)
724511a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
724611a29bacSmrg	  ;;
724711a29bacSmrg	esac
724811a29bacSmrg      else
724911a29bacSmrg	case $host_cpu in
725011a29bacSmrg	hppa*64*)
725111a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
725211a29bacSmrg	  ;;
725311a29bacSmrg	ia64*)
725411a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
725511a29bacSmrg	  ;;
725611a29bacSmrg	*)
725711a29bacSmrg	m4_if($1, [], [
725811a29bacSmrg	  # Older versions of the 11.00 compiler do not understand -b yet
725911a29bacSmrg	  # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does)
726011a29bacSmrg	  _LT_LINKER_OPTION([if $CC understands -b],
726111a29bacSmrg	    _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b],
726211a29bacSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'],
726311a29bacSmrg	    [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])],
726411a29bacSmrg	  [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'])
726511a29bacSmrg	  ;;
726611a29bacSmrg	esac
726711a29bacSmrg      fi
726811a29bacSmrg      if test "$with_gnu_ld" = no; then
726911a29bacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
727011a29bacSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=:
727111245024Smrg
727211a29bacSmrg	case $host_cpu in
727311a29bacSmrg	hppa*64*|ia64*)
727411a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
727511a29bacSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
727611a29bacSmrg	  ;;
727711a29bacSmrg	*)
727811a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
727911a29bacSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
728011a29bacSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
728111245024Smrg
728211a29bacSmrg	  # hardcode_minus_L: Not really in the search PATH,
728311a29bacSmrg	  # but as the default location of the library.
728411a29bacSmrg	  _LT_TAGVAR(hardcode_minus_L, $1)=yes
728511a29bacSmrg	  ;;
728611a29bacSmrg	esac
728711a29bacSmrg      fi
728811a29bacSmrg      ;;
728911245024Smrg
729011a29bacSmrg    irix5* | irix6* | nonstopux*)
729111a29bacSmrg      if test "$GCC" = yes; then
729211a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared $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'
729311a29bacSmrg	# Try to use the -exported_symbol ld option, if it does not
729411a29bacSmrg	# work, assume that -exports_file does not work either and
729511a29bacSmrg	# implicitly export all symbols.
729611a29bacSmrg        save_LDFLAGS="$LDFLAGS"
729711a29bacSmrg        LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
729811a29bacSmrg        AC_LINK_IFELSE(int foo(void) {},
729911a29bacSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $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'
730011a29bacSmrg        )
730111a29bacSmrg        LDFLAGS="$save_LDFLAGS"
730211a29bacSmrg      else
730311a29bacSmrg	_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'
730411a29bacSmrg	_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'
730511a29bacSmrg      fi
730611a29bacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
730711a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
730811a29bacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
730911a29bacSmrg      _LT_TAGVAR(inherit_rpath, $1)=yes
731011a29bacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
731111a29bacSmrg      ;;
731211245024Smrg
731311a29bacSmrg    netbsd*)
731411a29bacSmrg      if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
731511a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
731611a29bacSmrg      else
731711a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
731811a29bacSmrg      fi
731911a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
732011a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
732111a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
732211a29bacSmrg      ;;
732311245024Smrg
732411a29bacSmrg    newsos6)
732511a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
732611a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
732711a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
732811a29bacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
732911a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
733011a29bacSmrg      ;;
733111245024Smrg
733211a29bacSmrg    *nto* | *qnx*)
733311a29bacSmrg      ;;
733411245024Smrg
733511a29bacSmrg    openbsd*)
733611a29bacSmrg      if test -f /usr/libexec/ld.so; then
733711a29bacSmrg	_LT_TAGVAR(hardcode_direct, $1)=yes
733811a29bacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
733911a29bacSmrg	_LT_TAGVAR(hardcode_direct_absolute, $1)=yes
734011a29bacSmrg	if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
734111a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
734211a29bacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
734311a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
734411a29bacSmrg	  _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
734511a29bacSmrg	else
734611a29bacSmrg	  case $host_os in
734711a29bacSmrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
734811a29bacSmrg	     _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
734911a29bacSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
735011a29bacSmrg	     ;;
735111a29bacSmrg	   *)
735211a29bacSmrg	     _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
735311a29bacSmrg	     _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
735411a29bacSmrg	     ;;
735511a29bacSmrg	  esac
735611a29bacSmrg	fi
735711a29bacSmrg      else
735811a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
735911a29bacSmrg      fi
736011a29bacSmrg      ;;
736111245024Smrg
736211a29bacSmrg    os2*)
736311a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
736411a29bacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
736511a29bacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
736611a29bacSmrg      _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'
736711a29bacSmrg      _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
736811a29bacSmrg      ;;
736911245024Smrg
737011a29bacSmrg    osf3*)
737111a29bacSmrg      if test "$GCC" = yes; then
737211a29bacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
737311a29bacSmrg	_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'
737411a29bacSmrg      else
737511a29bacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
737611a29bacSmrg	_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'
737711a29bacSmrg      fi
737811a29bacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
737911a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
738011a29bacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
738111a29bacSmrg      ;;
738211245024Smrg
738311a29bacSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
738411a29bacSmrg      if test "$GCC" = yes; then
738511a29bacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
738611a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_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'
738711a29bacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
738811a29bacSmrg      else
738911a29bacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
739011a29bacSmrg	_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'
739111a29bacSmrg	_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~
739211a29bacSmrg	$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'
739311245024Smrg
739411a29bacSmrg	# Both c and cxx compiler support -rpath directly
739511a29bacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
739611a29bacSmrg      fi
739711a29bacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
739811a29bacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
739911a29bacSmrg      ;;
740011245024Smrg
740111a29bacSmrg    solaris*)
740211a29bacSmrg      _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
740311a29bacSmrg      if test "$GCC" = yes; then
740411a29bacSmrg	wlarc='${wl}'
740511a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
740611a29bacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
740711a29bacSmrg	  $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
740811a29bacSmrg      else
740911a29bacSmrg	case `$CC -V 2>&1` in
741011a29bacSmrg	*"Compilers 5.0"*)
741111a29bacSmrg	  wlarc=''
741211a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
741311a29bacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
741411a29bacSmrg	  $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
741511a29bacSmrg	  ;;
741611a29bacSmrg	*)
741711a29bacSmrg	  wlarc='${wl}'
741811a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
741911a29bacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
742011a29bacSmrg	  $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
742111a29bacSmrg	  ;;
742211a29bacSmrg	esac
742311a29bacSmrg      fi
742411a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
742511a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
742611a29bacSmrg      case $host_os in
742711a29bacSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
742811a29bacSmrg      *)
742911a29bacSmrg	# The compiler driver will combine and reorder linker options,
743011a29bacSmrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
743111a29bacSmrg	# but is careful enough not to reorder.
743211a29bacSmrg	# Supported since Solaris 2.6 (maybe 2.5.1?)
743311a29bacSmrg	if test "$GCC" = yes; then
743411a29bacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
743511a29bacSmrg	else
743611a29bacSmrg	  _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
743711a29bacSmrg	fi
743811a29bacSmrg	;;
743911a29bacSmrg      esac
744011a29bacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
744111a29bacSmrg      ;;
744211245024Smrg
744311a29bacSmrg    sunos4*)
744411a29bacSmrg      if test "x$host_vendor" = xsequent; then
744511a29bacSmrg	# Use $CC to link under sequent, because it throws in some extra .o
744611a29bacSmrg	# files that make .init and .fini sections work.
744711a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
744811a29bacSmrg      else
744911a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
745011a29bacSmrg      fi
745111a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
745211a29bacSmrg      _LT_TAGVAR(hardcode_direct, $1)=yes
745311a29bacSmrg      _LT_TAGVAR(hardcode_minus_L, $1)=yes
745411a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
745511a29bacSmrg      ;;
745611245024Smrg
745711a29bacSmrg    sysv4)
745811a29bacSmrg      case $host_vendor in
745911a29bacSmrg	sni)
746011a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
746111a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
746211a29bacSmrg	;;
746311a29bacSmrg	siemens)
746411a29bacSmrg	  ## LD is ld it makes a PLAMLIB
746511a29bacSmrg	  ## CC just makes a GrossModule.
746611a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
746711a29bacSmrg	  _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
746811a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no
746911a29bacSmrg        ;;
747011a29bacSmrg	motorola)
747111a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
747211a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
747311a29bacSmrg	;;
747411a29bacSmrg      esac
747511a29bacSmrg      runpath_var='LD_RUN_PATH'
747611a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
747711a29bacSmrg      ;;
747811245024Smrg
747911a29bacSmrg    sysv4.3*)
748011a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
748111a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
748211a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
748311a29bacSmrg      ;;
748411245024Smrg
748511a29bacSmrg    sysv4*MP*)
748611a29bacSmrg      if test -d /usr/nec; then
748711a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
748811a29bacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
748911a29bacSmrg	runpath_var=LD_RUN_PATH
749011a29bacSmrg	hardcode_runpath_var=yes
749111a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=yes
749211a29bacSmrg      fi
749311a29bacSmrg      ;;
749411245024Smrg
749511a29bacSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
749611a29bacSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
749711a29bacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
749811a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
749911a29bacSmrg      runpath_var='LD_RUN_PATH'
750041b2f0bdSmrg
750111a29bacSmrg      if test "$GCC" = yes; then
750211a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
750311a29bacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
750411a29bacSmrg      else
750511a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
750611a29bacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
750711a29bacSmrg      fi
750811a29bacSmrg      ;;
750941b2f0bdSmrg
751011a29bacSmrg    sysv5* | sco3.2v5* | sco5v6*)
751111a29bacSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
751211a29bacSmrg      # link with -lc, and that would cause any symbols used from libc to
751311a29bacSmrg      # always be unresolved, which means just about no library would
751411a29bacSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
751511a29bacSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
751611a29bacSmrg      # as -z defs.
751711a29bacSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
751811a29bacSmrg      _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
751911a29bacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
752011a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
752111a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
752211a29bacSmrg      _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
752311a29bacSmrg      _LT_TAGVAR(link_all_deplibs, $1)=yes
752411a29bacSmrg      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
752511a29bacSmrg      runpath_var='LD_RUN_PATH'
752641b2f0bdSmrg
752711a29bacSmrg      if test "$GCC" = yes; then
752811a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
752911a29bacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
753011a29bacSmrg      else
753111a29bacSmrg	_LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
753211a29bacSmrg	_LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
753311a29bacSmrg      fi
753411a29bacSmrg      ;;
753541b2f0bdSmrg
753611a29bacSmrg    uts4*)
753711a29bacSmrg      _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
753811a29bacSmrg      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
753911a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
754011a29bacSmrg      ;;
754141b2f0bdSmrg
754211a29bacSmrg    *)
754311a29bacSmrg      _LT_TAGVAR(ld_shlibs, $1)=no
754411a29bacSmrg      ;;
754511a29bacSmrg    esac
754641b2f0bdSmrg
754711a29bacSmrg    if test x$host_vendor = xsni; then
754811a29bacSmrg      case $host in
754911a29bacSmrg      sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
755011a29bacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
755111a29bacSmrg	;;
755211a29bacSmrg      esac
755311a29bacSmrg    fi
755411a29bacSmrg  fi
755511a29bacSmrg])
755611a29bacSmrgAC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
755711a29bacSmrgtest "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
755841b2f0bdSmrg
755911a29bacSmrg_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
756041b2f0bdSmrg
756111a29bacSmrg_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
756211a29bacSmrg_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
756311a29bacSmrg_LT_DECL([], [extract_expsyms_cmds], [2],
756411a29bacSmrg    [The commands to extract the exported symbol list from a shared archive])
756541b2f0bdSmrg
756611a29bacSmrg#
756711a29bacSmrg# Do we need to explicitly link libc?
756811a29bacSmrg#
756911a29bacSmrgcase "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
757011a29bacSmrgx|xyes)
757111a29bacSmrg  # Assume -lc should be added
757211a29bacSmrg  _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
757341b2f0bdSmrg
757411a29bacSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
757511a29bacSmrg    case $_LT_TAGVAR(archive_cmds, $1) in
757611a29bacSmrg    *'~'*)
757711a29bacSmrg      # FIXME: we may have to deal with multi-command sequences.
757811a29bacSmrg      ;;
757911a29bacSmrg    '$CC '*)
758011a29bacSmrg      # Test whether the compiler implicitly links with -lc since on some
758111a29bacSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
758211a29bacSmrg      # to ld, don't add -lc before -lgcc.
758311a29bacSmrg      AC_CACHE_CHECK([whether -lc should be explicitly linked in],
758411a29bacSmrg	[lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1),
758511a29bacSmrg	[$RM conftest*
758611a29bacSmrg	echo "$lt_simple_compile_test_code" > conftest.$ac_ext
758711a29bacSmrg
758811a29bacSmrg	if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
758911a29bacSmrg	  soname=conftest
759011a29bacSmrg	  lib=conftest
759111a29bacSmrg	  libobjs=conftest.$ac_objext
759211a29bacSmrg	  deplibs=
759311a29bacSmrg	  wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
759411a29bacSmrg	  pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
759511a29bacSmrg	  compiler_flags=-v
759611a29bacSmrg	  linker_flags=-v
759711a29bacSmrg	  verstring=
759811a29bacSmrg	  output_objdir=.
759911a29bacSmrg	  libname=conftest
760011a29bacSmrg	  lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
760111a29bacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=
760211a29bacSmrg	  if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
760311a29bacSmrg	  then
760411a29bacSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no
760511a29bacSmrg	  else
760611a29bacSmrg	    lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes
760711a29bacSmrg	  fi
760811a29bacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
760911a29bacSmrg	else
761011a29bacSmrg	  cat conftest.err 1>&5
761111a29bacSmrg	fi
761211a29bacSmrg	$RM conftest*
761311a29bacSmrg	])
761411a29bacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)
761511a29bacSmrg      ;;
761611a29bacSmrg    esac
761711a29bacSmrg  fi
761811a29bacSmrg  ;;
761911a29bacSmrgesac
762041b2f0bdSmrg
762111a29bacSmrg_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
762211a29bacSmrg    [Whether or not to add -lc for building shared libraries])
762311a29bacSmrg_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
762411a29bacSmrg    [enable_shared_with_static_runtimes], [0],
762511a29bacSmrg    [Whether or not to disallow shared libs when runtime libs are static])
762611a29bacSmrg_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
762711a29bacSmrg    [Compiler flag to allow reflexive dlopens])
762811a29bacSmrg_LT_TAGDECL([], [whole_archive_flag_spec], [1],
762911a29bacSmrg    [Compiler flag to generate shared objects directly from archives])
763011a29bacSmrg_LT_TAGDECL([], [compiler_needs_object], [1],
763111a29bacSmrg    [Whether the compiler copes with passing no objects directly])
763211a29bacSmrg_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
763311a29bacSmrg    [Create an old-style archive from a shared archive])
763411a29bacSmrg_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
763511a29bacSmrg    [Create a temporary old-style archive to link instead of a shared archive])
763611a29bacSmrg_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
763711a29bacSmrg_LT_TAGDECL([], [archive_expsym_cmds], [2])
763811a29bacSmrg_LT_TAGDECL([], [module_cmds], [2],
763911a29bacSmrg    [Commands used to build a loadable module if different from building
764011a29bacSmrg    a shared archive.])
764111a29bacSmrg_LT_TAGDECL([], [module_expsym_cmds], [2])
764211a29bacSmrg_LT_TAGDECL([], [with_gnu_ld], [1],
764311a29bacSmrg    [Whether we are building with GNU ld or not])
764411a29bacSmrg_LT_TAGDECL([], [allow_undefined_flag], [1],
764511a29bacSmrg    [Flag that allows shared libraries with undefined symbols to be built])
764611a29bacSmrg_LT_TAGDECL([], [no_undefined_flag], [1],
764711a29bacSmrg    [Flag that enforces no undefined symbols])
764811a29bacSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
764911a29bacSmrg    [Flag to hardcode $libdir into a binary during linking.
765011a29bacSmrg    This must work even if $libdir does not exist])
765111a29bacSmrg_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
765211a29bacSmrg    [[If ld is used when linking, flag to hardcode $libdir into a binary
765311a29bacSmrg    during linking.  This must work even if $libdir does not exist]])
765411a29bacSmrg_LT_TAGDECL([], [hardcode_libdir_separator], [1],
765511a29bacSmrg    [Whether we need a single "-rpath" flag with a separated argument])
765611a29bacSmrg_LT_TAGDECL([], [hardcode_direct], [0],
765711a29bacSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
765811a29bacSmrg    DIR into the resulting binary])
765911a29bacSmrg_LT_TAGDECL([], [hardcode_direct_absolute], [0],
766011a29bacSmrg    [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
766111a29bacSmrg    DIR into the resulting binary and the resulting library dependency is
766211a29bacSmrg    "absolute", i.e impossible to change by setting ${shlibpath_var} if the
766311a29bacSmrg    library is relocated])
766411a29bacSmrg_LT_TAGDECL([], [hardcode_minus_L], [0],
766511a29bacSmrg    [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
766611a29bacSmrg    into the resulting binary])
766711a29bacSmrg_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
766811a29bacSmrg    [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
766911a29bacSmrg    into the resulting binary])
767011a29bacSmrg_LT_TAGDECL([], [hardcode_automatic], [0],
767111a29bacSmrg    [Set to "yes" if building a shared library automatically hardcodes DIR
767211a29bacSmrg    into the library and all subsequent libraries and executables linked
767311a29bacSmrg    against it])
767411a29bacSmrg_LT_TAGDECL([], [inherit_rpath], [0],
767511a29bacSmrg    [Set to yes if linker adds runtime paths of dependent libraries
767611a29bacSmrg    to runtime path list])
767711a29bacSmrg_LT_TAGDECL([], [link_all_deplibs], [0],
767811a29bacSmrg    [Whether libtool must link a program against all its dependency libraries])
767911a29bacSmrg_LT_TAGDECL([], [fix_srcfile_path], [1],
768011a29bacSmrg    [Fix the shell variable $srcfile for the compiler])
768111a29bacSmrg_LT_TAGDECL([], [always_export_symbols], [0],
768211a29bacSmrg    [Set to "yes" if exported symbols are required])
768311a29bacSmrg_LT_TAGDECL([], [export_symbols_cmds], [2],
768411a29bacSmrg    [The commands to list exported symbols])
768511a29bacSmrg_LT_TAGDECL([], [exclude_expsyms], [1],
768611a29bacSmrg    [Symbols that should not be listed in the preloaded symbols])
768711a29bacSmrg_LT_TAGDECL([], [include_expsyms], [1],
768811a29bacSmrg    [Symbols that must always be exported])
768911a29bacSmrg_LT_TAGDECL([], [prelink_cmds], [2],
769011a29bacSmrg    [Commands necessary for linking programs (against libraries) with templates])
769111a29bacSmrg_LT_TAGDECL([], [file_list_spec], [1],
769211a29bacSmrg    [Specify filename containing input files])
769311a29bacSmrgdnl FIXME: Not yet implemented
769411a29bacSmrgdnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
769511a29bacSmrgdnl    [Compiler flag to generate thread safe objects])
769611a29bacSmrg])# _LT_LINKER_SHLIBS
769711a29bacSmrg
769811a29bacSmrg
769911a29bacSmrg# _LT_LANG_C_CONFIG([TAG])
770011a29bacSmrg# ------------------------
770111a29bacSmrg# Ensure that the configuration variables for a C compiler are suitably
770211a29bacSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
770311a29bacSmrg# the compiler configuration to `libtool'.
770411a29bacSmrgm4_defun([_LT_LANG_C_CONFIG],
770511a29bacSmrg[m4_require([_LT_DECL_EGREP])dnl
770611a29bacSmrglt_save_CC="$CC"
770711a29bacSmrgAC_LANG_PUSH(C)
770841b2f0bdSmrg
770911a29bacSmrg# Source file extension for C test sources.
771011a29bacSmrgac_ext=c
771141b2f0bdSmrg
771211a29bacSmrg# Object file extension for compiled C test sources.
771311a29bacSmrgobjext=o
771411a29bacSmrg_LT_TAGVAR(objext, $1)=$objext
771541b2f0bdSmrg
771611a29bacSmrg# Code to be used in simple compile tests
771711a29bacSmrglt_simple_compile_test_code="int some_variable = 0;"
771841b2f0bdSmrg
771911a29bacSmrg# Code to be used in simple link tests
772011a29bacSmrglt_simple_link_test_code='int main(){return(0);}'
772141b2f0bdSmrg
772211a29bacSmrg_LT_TAG_COMPILER
772311a29bacSmrg# Save the default compiler, since it gets overwritten when the other
772411a29bacSmrg# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
772511a29bacSmrgcompiler_DEFAULT=$CC
772641b2f0bdSmrg
772711a29bacSmrg# save warnings/boilerplate of simple test code
772811a29bacSmrg_LT_COMPILER_BOILERPLATE
772911a29bacSmrg_LT_LINKER_BOILERPLATE
773011245024Smrg
773111a29bacSmrgif test -n "$compiler"; then
773211a29bacSmrg  _LT_COMPILER_NO_RTTI($1)
773311a29bacSmrg  _LT_COMPILER_PIC($1)
773411a29bacSmrg  _LT_COMPILER_C_O($1)
773511a29bacSmrg  _LT_COMPILER_FILE_LOCKS($1)
773611a29bacSmrg  _LT_LINKER_SHLIBS($1)
773711a29bacSmrg  _LT_SYS_DYNAMIC_LINKER($1)
773811a29bacSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
773911a29bacSmrg  LT_SYS_DLOPEN_SELF
774011a29bacSmrg  _LT_CMD_STRIPLIB
774111a29bacSmrg
774211a29bacSmrg  # Report which library types will actually be built
774311a29bacSmrg  AC_MSG_CHECKING([if libtool supports shared libraries])
774411a29bacSmrg  AC_MSG_RESULT([$can_build_shared])
774511a29bacSmrg
774611a29bacSmrg  AC_MSG_CHECKING([whether to build shared libraries])
774711a29bacSmrg  test "$can_build_shared" = "no" && enable_shared=no
774811a29bacSmrg
774911a29bacSmrg  # On AIX, shared libraries and static libraries use the same namespace, and
775011a29bacSmrg  # are all built from PIC.
775111a29bacSmrg  case $host_os in
775211a29bacSmrg  aix3*)
775311a29bacSmrg    test "$enable_shared" = yes && enable_static=no
775411a29bacSmrg    if test -n "$RANLIB"; then
775511a29bacSmrg      archive_cmds="$archive_cmds~\$RANLIB \$lib"
775611a29bacSmrg      postinstall_cmds='$RANLIB $lib'
775711a29bacSmrg    fi
775811a29bacSmrg    ;;
775911245024Smrg
776011a29bacSmrg  aix[[4-9]]*)
776111a29bacSmrg    if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
776211a29bacSmrg      test "$enable_shared" = yes && enable_static=no
776311a29bacSmrg    fi
776411a29bacSmrg    ;;
776511a29bacSmrg  esac
776611a29bacSmrg  AC_MSG_RESULT([$enable_shared])
776711245024Smrg
776811a29bacSmrg  AC_MSG_CHECKING([whether to build static libraries])
776911a29bacSmrg  # Make sure either enable_shared or enable_static is yes.
777011a29bacSmrg  test "$enable_shared" = yes || enable_static=yes
777111a29bacSmrg  AC_MSG_RESULT([$enable_static])
777211245024Smrg
777311a29bacSmrg  _LT_CONFIG($1)
777411a29bacSmrgfi
777511a29bacSmrgAC_LANG_POP
777611a29bacSmrgCC="$lt_save_CC"
777711a29bacSmrg])# _LT_LANG_C_CONFIG
777811245024Smrg
777911245024Smrg
778011a29bacSmrg# _LT_LANG_CXX_CONFIG([TAG])
778111a29bacSmrg# --------------------------
778211a29bacSmrg# Ensure that the configuration variables for a C++ compiler are suitably
778311a29bacSmrg# defined.  These variables are subsequently used by _LT_CONFIG to write
778411a29bacSmrg# the compiler configuration to `libtool'.
778511a29bacSmrgm4_defun([_LT_LANG_CXX_CONFIG],
778611a29bacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
778711a29bacSmrgm4_require([_LT_DECL_EGREP])dnl
778811a29bacSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
778911a29bacSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
779011a29bacSmrg    (test "X$CXX" != "Xg++"))) ; then
779111a29bacSmrg  AC_PROG_CXXCPP
779211a29bacSmrgelse
779311a29bacSmrg  _lt_caught_CXX_error=yes
779411a29bacSmrgfi
779511245024Smrg
779611a29bacSmrgAC_LANG_PUSH(C++)
779711a29bacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
779811a29bacSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
779911a29bacSmrg_LT_TAGVAR(always_export_symbols, $1)=no
780011a29bacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
780111a29bacSmrg_LT_TAGVAR(compiler_needs_object, $1)=no
780211a29bacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
780311a29bacSmrg_LT_TAGVAR(hardcode_direct, $1)=no
780411a29bacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
780511a29bacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
780611a29bacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
780711a29bacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
780811a29bacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
780911a29bacSmrg_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
781011a29bacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
781111a29bacSmrg_LT_TAGVAR(inherit_rpath, $1)=no
781211a29bacSmrg_LT_TAGVAR(module_cmds, $1)=
781311a29bacSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
781411a29bacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
781511a29bacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
781611a29bacSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
781711a29bacSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
781811a29bacSmrg_LT_TAGVAR(no_undefined_flag, $1)=
781911a29bacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
782011a29bacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
782111245024Smrg
782211a29bacSmrg# Source file extension for C++ test sources.
782311a29bacSmrgac_ext=cpp
782411245024Smrg
782511a29bacSmrg# Object file extension for compiled C++ test sources.
782611a29bacSmrgobjext=o
782711a29bacSmrg_LT_TAGVAR(objext, $1)=$objext
782811a29bacSmrg
782911a29bacSmrg# No sense in running all these tests if we already determined that
783011a29bacSmrg# the CXX compiler isn't working.  Some variables (like enable_shared)
783111a29bacSmrg# are currently assumed to apply to all compilers on this platform,
783211a29bacSmrg# and will be corrupted by setting them based on a non-working compiler.
783311a29bacSmrgif test "$_lt_caught_CXX_error" != yes; then
783411a29bacSmrg  # Code to be used in simple compile tests
783511a29bacSmrg  lt_simple_compile_test_code="int some_variable = 0;"
783611a29bacSmrg
783711a29bacSmrg  # Code to be used in simple link tests
783811a29bacSmrg  lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
783911a29bacSmrg
784011a29bacSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
784111a29bacSmrg  _LT_TAG_COMPILER
784211a29bacSmrg
784311a29bacSmrg  # save warnings/boilerplate of simple test code
784411a29bacSmrg  _LT_COMPILER_BOILERPLATE
784511a29bacSmrg  _LT_LINKER_BOILERPLATE
784611a29bacSmrg
784711a29bacSmrg  # Allow CC to be a program name with arguments.
784811a29bacSmrg  lt_save_CC=$CC
784911a29bacSmrg  lt_save_LD=$LD
785011a29bacSmrg  lt_save_GCC=$GCC
785111a29bacSmrg  GCC=$GXX
785211a29bacSmrg  lt_save_with_gnu_ld=$with_gnu_ld
785311a29bacSmrg  lt_save_path_LD=$lt_cv_path_LD
785411a29bacSmrg  if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
785511a29bacSmrg    lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
785611a29bacSmrg  else
785711a29bacSmrg    $as_unset lt_cv_prog_gnu_ld
785811a29bacSmrg  fi
785911a29bacSmrg  if test -n "${lt_cv_path_LDCXX+set}"; then
786011a29bacSmrg    lt_cv_path_LD=$lt_cv_path_LDCXX
786111a29bacSmrg  else
786211a29bacSmrg    $as_unset lt_cv_path_LD
786311a29bacSmrg  fi
786411a29bacSmrg  test -z "${LDCXX+set}" || LD=$LDCXX
786511a29bacSmrg  CC=${CXX-"c++"}
786611a29bacSmrg  compiler=$CC
786711a29bacSmrg  _LT_TAGVAR(compiler, $1)=$CC
786811a29bacSmrg  _LT_CC_BASENAME([$compiler])
786911245024Smrg
787011a29bacSmrg  if test -n "$compiler"; then
787111a29bacSmrg    # We don't want -fno-exception when compiling C++ code, so set the
787211a29bacSmrg    # no_builtin_flag separately
787311a29bacSmrg    if test "$GXX" = yes; then
787411a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
787511a29bacSmrg    else
787611a29bacSmrg      _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
787711a29bacSmrg    fi
787811245024Smrg
787911a29bacSmrg    if test "$GXX" = yes; then
788011a29bacSmrg      # Set up default GNU C++ configuration
788111245024Smrg
788211a29bacSmrg      LT_PATH_LD
788311245024Smrg
788411a29bacSmrg      # Check if GNU C++ uses GNU ld as the underlying linker, since the
788511a29bacSmrg      # archiving commands below assume that GNU ld is being used.
788611a29bacSmrg      if test "$with_gnu_ld" = yes; then
788711a29bacSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
788811a29bacSmrg        _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
788911245024Smrg
789011a29bacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
789111a29bacSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
789211245024Smrg
789311a29bacSmrg        # If archive_cmds runs LD, not CC, wlarc should be empty
789411a29bacSmrg        # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
789511a29bacSmrg        #     investigate it a little bit more. (MM)
789611a29bacSmrg        wlarc='${wl}'
789711245024Smrg
789811a29bacSmrg        # ancient GNU ld didn't support --whole-archive et. al.
789911a29bacSmrg        if eval "`$CC -print-prog-name=ld` --help 2>&1" |
790011a29bacSmrg	  $GREP 'no-whole-archive' > /dev/null; then
790111a29bacSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
790211a29bacSmrg        else
790311a29bacSmrg          _LT_TAGVAR(whole_archive_flag_spec, $1)=
790411a29bacSmrg        fi
790511a29bacSmrg      else
790611a29bacSmrg        with_gnu_ld=no
790711a29bacSmrg        wlarc=
790811a29bacSmrg
790911a29bacSmrg        # A generic and very simple default shared library creation
791011a29bacSmrg        # command for GNU C++ for the case where it uses the native
791111a29bacSmrg        # linker, instead of GNU ld.  If possible, this setting should
791211a29bacSmrg        # overridden to take advantage of the native linker features on
791311a29bacSmrg        # the platform it is being used on.
791411a29bacSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
791511a29bacSmrg      fi
791611245024Smrg
791711a29bacSmrg      # Commands to make compiler produce verbose output that lists
791811a29bacSmrg      # what "hidden" libraries, object files and flags are used when
791911a29bacSmrg      # linking a shared library.
792011a29bacSmrg      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
792111245024Smrg
792211a29bacSmrg    else
792311a29bacSmrg      GXX=no
792411a29bacSmrg      with_gnu_ld=no
792511a29bacSmrg      wlarc=
792611a29bacSmrg    fi
792711245024Smrg
792811a29bacSmrg    # PORTME: fill in a description of your system's C++ link characteristics
792911a29bacSmrg    AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
793011a29bacSmrg    _LT_TAGVAR(ld_shlibs, $1)=yes
793111a29bacSmrg    case $host_os in
793211a29bacSmrg      aix3*)
793311a29bacSmrg        # FIXME: insert proper C++ library support
793411a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
793511a29bacSmrg        ;;
793611a29bacSmrg      aix[[4-9]]*)
793711a29bacSmrg        if test "$host_cpu" = ia64; then
793811a29bacSmrg          # On IA64, the linker does run time linking by default, so we don't
793911a29bacSmrg          # have to do anything special.
794011a29bacSmrg          aix_use_runtimelinking=no
794111a29bacSmrg          exp_sym_flag='-Bexport'
794211a29bacSmrg          no_entry_flag=""
794311a29bacSmrg        else
794411a29bacSmrg          aix_use_runtimelinking=no
794511a29bacSmrg
794611a29bacSmrg          # Test if we are trying to use run time linking or normal
794711a29bacSmrg          # AIX style linking. If -brtl is somewhere in LDFLAGS, we
794811a29bacSmrg          # need to do runtime linking.
794911a29bacSmrg          case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
795011a29bacSmrg	    for ld_flag in $LDFLAGS; do
795111a29bacSmrg	      case $ld_flag in
795211a29bacSmrg	      *-brtl*)
795311a29bacSmrg	        aix_use_runtimelinking=yes
795411a29bacSmrg	        break
795511a29bacSmrg	        ;;
795611a29bacSmrg	      esac
795711a29bacSmrg	    done
795811a29bacSmrg	    ;;
795911a29bacSmrg          esac
796011245024Smrg
796111a29bacSmrg          exp_sym_flag='-bexport'
796211a29bacSmrg          no_entry_flag='-bnoentry'
796311a29bacSmrg        fi
796411245024Smrg
796511a29bacSmrg        # When large executables or shared objects are built, AIX ld can
796611a29bacSmrg        # have problems creating the table of contents.  If linking a library
796711a29bacSmrg        # or program results in "error TOC overflow" add -mminimal-toc to
796811a29bacSmrg        # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
796911a29bacSmrg        # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
797011a29bacSmrg
797111a29bacSmrg        _LT_TAGVAR(archive_cmds, $1)=''
797211a29bacSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
797311a29bacSmrg        _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
797411a29bacSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
797511a29bacSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
797611a29bacSmrg        _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
797711a29bacSmrg
797811a29bacSmrg        if test "$GXX" = yes; then
797911a29bacSmrg          case $host_os in aix4.[[012]]|aix4.[[012]].*)
798011a29bacSmrg          # We only want to do this on AIX 4.2 and lower, the check
798111a29bacSmrg          # below for broken collect2 doesn't work under 4.3+
798211a29bacSmrg	  collect2name=`${CC} -print-prog-name=collect2`
798311a29bacSmrg	  if test -f "$collect2name" &&
798411a29bacSmrg	     strings "$collect2name" | $GREP resolve_lib_name >/dev/null
798511a29bacSmrg	  then
798611a29bacSmrg	    # We have reworked collect2
798711a29bacSmrg	    :
798811a29bacSmrg	  else
798911a29bacSmrg	    # We have old collect2
799011a29bacSmrg	    _LT_TAGVAR(hardcode_direct, $1)=unsupported
799111a29bacSmrg	    # It fails to find uninstalled libraries when the uninstalled
799211a29bacSmrg	    # path is not listed in the libpath.  Setting hardcode_minus_L
799311a29bacSmrg	    # to unsupported forces relinking
799411a29bacSmrg	    _LT_TAGVAR(hardcode_minus_L, $1)=yes
799511a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
799611a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=
799711a29bacSmrg	  fi
799811a29bacSmrg          esac
799911a29bacSmrg          shared_flag='-shared'
800011a29bacSmrg	  if test "$aix_use_runtimelinking" = yes; then
800111a29bacSmrg	    shared_flag="$shared_flag "'${wl}-G'
800211a29bacSmrg	  fi
800311a29bacSmrg        else
800411a29bacSmrg          # not using gcc
800511a29bacSmrg          if test "$host_cpu" = ia64; then
800611a29bacSmrg	  # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
800711a29bacSmrg	  # chokes on -Wl,-G. The following line is correct:
800811a29bacSmrg	  shared_flag='-G'
800911a29bacSmrg          else
801011a29bacSmrg	    if test "$aix_use_runtimelinking" = yes; then
801111a29bacSmrg	      shared_flag='${wl}-G'
801211a29bacSmrg	    else
801311a29bacSmrg	      shared_flag='${wl}-bM:SRE'
801411a29bacSmrg	    fi
801511a29bacSmrg          fi
801611a29bacSmrg        fi
801711245024Smrg
801811a29bacSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
801911a29bacSmrg        # It seems that -bexpall does not export symbols beginning with
802011a29bacSmrg        # underscore (_), so it is better to generate a list of symbols to
802111a29bacSmrg	# export.
802211a29bacSmrg        _LT_TAGVAR(always_export_symbols, $1)=yes
802311a29bacSmrg        if test "$aix_use_runtimelinking" = yes; then
802411a29bacSmrg          # Warning - without using the other runtime loading flags (-brtl),
802511a29bacSmrg          # -berok will link without error, but may produce a broken library.
802611a29bacSmrg          _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
802711a29bacSmrg          # Determine the default libpath from the value encoded in an empty
802811a29bacSmrg          # executable.
802911a29bacSmrg          _LT_SYS_MODULE_PATH_AIX
803011a29bacSmrg          _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
803111a29bacSmrg
803211a29bacSmrg          _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"
803311a29bacSmrg        else
803411a29bacSmrg          if test "$host_cpu" = ia64; then
803511a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
803611a29bacSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
803711a29bacSmrg	    _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"
803811a29bacSmrg          else
803911a29bacSmrg	    # Determine the default libpath from the value encoded in an
804011a29bacSmrg	    # empty executable.
804111a29bacSmrg	    _LT_SYS_MODULE_PATH_AIX
804211a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
804311a29bacSmrg	    # Warning - without using the other run time loading flags,
804411a29bacSmrg	    # -berok will link without error, but may produce a broken library.
804511a29bacSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
804611a29bacSmrg	    _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
804711a29bacSmrg	    if test "$with_gnu_ld" = yes; then
804811a29bacSmrg	      # We only use this code for GNU lds that support --whole-archive.
804911a29bacSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
805011a29bacSmrg	    else
805111a29bacSmrg	      # Exported symbols can be pulled into shared objects from archives
805211a29bacSmrg	      _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
805311a29bacSmrg	    fi
805411a29bacSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
805511a29bacSmrg	    # This is similar to how AIX traditionally builds its shared
805611a29bacSmrg	    # libraries.
805711a29bacSmrg	    _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'
805811a29bacSmrg          fi
805911a29bacSmrg        fi
806011a29bacSmrg        ;;
806111245024Smrg
806211a29bacSmrg      beos*)
806311a29bacSmrg	if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
806411a29bacSmrg	  _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
806511a29bacSmrg	  # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
806611a29bacSmrg	  # support --undefined.  This deserves some investigation.  FIXME
806711a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
806811a29bacSmrg	else
806911a29bacSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
807011a29bacSmrg	fi
807111a29bacSmrg	;;
807241b2f0bdSmrg
807311a29bacSmrg      chorus*)
807411a29bacSmrg        case $cc_basename in
807511a29bacSmrg          *)
807611a29bacSmrg	  # FIXME: insert proper C++ library support
807711a29bacSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
807811a29bacSmrg	  ;;
807911a29bacSmrg        esac
808011a29bacSmrg        ;;
808141b2f0bdSmrg
808211a29bacSmrg      cygwin* | mingw* | pw32* | cegcc*)
808311a29bacSmrg        # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
808411a29bacSmrg        # as there is no search path for DLLs.
808511a29bacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
808611a29bacSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols'
808711a29bacSmrg        _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
808811a29bacSmrg        _LT_TAGVAR(always_export_symbols, $1)=no
808911a29bacSmrg        _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
809011a29bacSmrg
809111a29bacSmrg        if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
809211a29bacSmrg          _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'
809311a29bacSmrg          # If the export-symbols file already is a .def file (1st line
809411a29bacSmrg          # is EXPORTS), use it as is; otherwise, prepend...
809511a29bacSmrg          _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
809611a29bacSmrg	    cp $export_symbols $output_objdir/$soname.def;
809711a29bacSmrg          else
809811a29bacSmrg	    echo EXPORTS > $output_objdir/$soname.def;
809911a29bacSmrg	    cat $export_symbols >> $output_objdir/$soname.def;
810011a29bacSmrg          fi~
810111a29bacSmrg          $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'
810211a29bacSmrg        else
810311a29bacSmrg          _LT_TAGVAR(ld_shlibs, $1)=no
810411a29bacSmrg        fi
810511a29bacSmrg        ;;
810611a29bacSmrg      darwin* | rhapsody*)
810711a29bacSmrg        _LT_DARWIN_LINKER_FEATURES($1)
810811a29bacSmrg	;;
810941b2f0bdSmrg
811011a29bacSmrg      dgux*)
811111a29bacSmrg        case $cc_basename in
811211a29bacSmrg          ec++*)
811311a29bacSmrg	    # FIXME: insert proper C++ library support
811411a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
811511a29bacSmrg	    ;;
811611a29bacSmrg          ghcx*)
811711a29bacSmrg	    # Green Hills C++ Compiler
811811a29bacSmrg	    # FIXME: insert proper C++ library support
811911a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
812011a29bacSmrg	    ;;
812111a29bacSmrg          *)
812211a29bacSmrg	    # FIXME: insert proper C++ library support
812311a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
812411a29bacSmrg	    ;;
812511a29bacSmrg        esac
812611a29bacSmrg        ;;
812741b2f0bdSmrg
812811a29bacSmrg      freebsd[[12]]*)
812911a29bacSmrg        # C++ shared libraries reported to be fairly broken before
813011a29bacSmrg	# switch to ELF
813111a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
813211a29bacSmrg        ;;
813341b2f0bdSmrg
813411a29bacSmrg      freebsd-elf*)
813511a29bacSmrg        _LT_TAGVAR(archive_cmds_need_lc, $1)=no
813611a29bacSmrg        ;;
813741b2f0bdSmrg
813811a29bacSmrg      freebsd* | dragonfly*)
813911a29bacSmrg        # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
814011a29bacSmrg        # conventions
814111a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
814211a29bacSmrg        ;;
814341b2f0bdSmrg
814411a29bacSmrg      gnu*)
814511a29bacSmrg        ;;
814641b2f0bdSmrg
814711a29bacSmrg      haiku*)
814811a29bacSmrg        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
814911a29bacSmrg        _LT_TAGVAR(link_all_deplibs, $1)=yes
815011a29bacSmrg        ;;
815141b2f0bdSmrg
815211a29bacSmrg      hpux9*)
815311a29bacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
815411a29bacSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
815511a29bacSmrg        _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
815611a29bacSmrg        _LT_TAGVAR(hardcode_direct, $1)=yes
815711a29bacSmrg        _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
815811a29bacSmrg				             # but as the default
815911a29bacSmrg				             # location of the library.
816011a29bacSmrg
816111a29bacSmrg        case $cc_basename in
816211a29bacSmrg          CC*)
816311a29bacSmrg            # FIXME: insert proper C++ library support
816411a29bacSmrg            _LT_TAGVAR(ld_shlibs, $1)=no
816511a29bacSmrg            ;;
816611a29bacSmrg          aCC*)
816711a29bacSmrg            _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'
816811a29bacSmrg            # Commands to make compiler produce verbose output that lists
816911a29bacSmrg            # what "hidden" libraries, object files and flags are used when
817011a29bacSmrg            # linking a shared library.
817111a29bacSmrg            #
817211a29bacSmrg            # There doesn't appear to be a way to prevent this compiler from
817311a29bacSmrg            # explicitly linking system object files so we need to strip them
817411a29bacSmrg            # from the output so that they don't get included in the library
817511a29bacSmrg            # dependencies.
817611a29bacSmrg            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"'
817711a29bacSmrg            ;;
817811a29bacSmrg          *)
817911a29bacSmrg            if test "$GXX" = yes; then
818011a29bacSmrg              _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${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'
818111a29bacSmrg            else
818211a29bacSmrg              # FIXME: insert proper C++ library support
818311a29bacSmrg              _LT_TAGVAR(ld_shlibs, $1)=no
818411a29bacSmrg            fi
818511a29bacSmrg            ;;
818611a29bacSmrg        esac
818711a29bacSmrg        ;;
818841b2f0bdSmrg
818911a29bacSmrg      hpux10*|hpux11*)
819011a29bacSmrg        if test $with_gnu_ld = no; then
819111a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
819211a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_separator, $1)=:
819311a29bacSmrg
819411a29bacSmrg          case $host_cpu in
819511a29bacSmrg            hppa*64*|ia64*)
819611a29bacSmrg              ;;
819711a29bacSmrg            *)
819811a29bacSmrg	      _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
819911a29bacSmrg              ;;
820011a29bacSmrg          esac
820111a29bacSmrg        fi
820211a29bacSmrg        case $host_cpu in
820311a29bacSmrg          hppa*64*|ia64*)
820411a29bacSmrg            _LT_TAGVAR(hardcode_direct, $1)=no
820511a29bacSmrg            _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
820611a29bacSmrg            ;;
820711a29bacSmrg          *)
820811a29bacSmrg            _LT_TAGVAR(hardcode_direct, $1)=yes
820911a29bacSmrg            _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
821011a29bacSmrg            _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
821111a29bacSmrg					         # but as the default
821211a29bacSmrg					         # location of the library.
821311a29bacSmrg            ;;
821411a29bacSmrg        esac
821511a29bacSmrg
821611a29bacSmrg        case $cc_basename in
821711a29bacSmrg          CC*)
821811a29bacSmrg	    # FIXME: insert proper C++ library support
821911a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
822011a29bacSmrg	    ;;
822111a29bacSmrg          aCC*)
822211a29bacSmrg	    case $host_cpu in
822311a29bacSmrg	      hppa*64*)
822411a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
822511a29bacSmrg	        ;;
822611a29bacSmrg	      ia64*)
822711a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
822811a29bacSmrg	        ;;
822911a29bacSmrg	      *)
823011a29bacSmrg	        _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'
823111a29bacSmrg	        ;;
823211a29bacSmrg	    esac
823311a29bacSmrg	    # Commands to make compiler produce verbose output that lists
823411a29bacSmrg	    # what "hidden" libraries, object files and flags are used when
823511a29bacSmrg	    # linking a shared library.
823611a29bacSmrg	    #
823711a29bacSmrg	    # There doesn't appear to be a way to prevent this compiler from
823811a29bacSmrg	    # explicitly linking system object files so we need to strip them
823911a29bacSmrg	    # from the output so that they don't get included in the library
824011a29bacSmrg	    # dependencies.
824111a29bacSmrg	    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"'
824211a29bacSmrg	    ;;
824311a29bacSmrg          *)
824411a29bacSmrg	    if test "$GXX" = yes; then
824511a29bacSmrg	      if test $with_gnu_ld = no; then
824611a29bacSmrg	        case $host_cpu in
824711a29bacSmrg	          hppa*64*)
824811a29bacSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
824911a29bacSmrg	            ;;
825011a29bacSmrg	          ia64*)
825111a29bacSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
825211a29bacSmrg	            ;;
825311a29bacSmrg	          *)
825411a29bacSmrg	            _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
825511a29bacSmrg	            ;;
825611a29bacSmrg	        esac
825711a29bacSmrg	      fi
825811a29bacSmrg	    else
825911a29bacSmrg	      # FIXME: insert proper C++ library support
826011a29bacSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
826111a29bacSmrg	    fi
826211a29bacSmrg	    ;;
826311a29bacSmrg        esac
826411a29bacSmrg        ;;
826541b2f0bdSmrg
826611a29bacSmrg      interix[[3-9]]*)
826711a29bacSmrg	_LT_TAGVAR(hardcode_direct, $1)=no
826811a29bacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
826911a29bacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
827011a29bacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
827111a29bacSmrg	# Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
827211a29bacSmrg	# Instead, shared libraries are loaded at an image base (0x10000000 by
827311a29bacSmrg	# default) and relocated if they conflict, which is a slow very memory
827411a29bacSmrg	# consuming and fragmenting process.  To avoid this, we pick a random,
827511a29bacSmrg	# 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
827611a29bacSmrg	# time.  Moving up from 0x10000000 also allows more sbrk(2) space.
827711a29bacSmrg	_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'
827811a29bacSmrg	_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'
827911a29bacSmrg	;;
828011a29bacSmrg      irix5* | irix6*)
828111a29bacSmrg        case $cc_basename in
828211a29bacSmrg          CC*)
828311a29bacSmrg	    # SGI C++
828411a29bacSmrg	    _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'
828511a29bacSmrg
828611a29bacSmrg	    # Archives containing C++ object files must be created using
828711a29bacSmrg	    # "CC -ar", where "CC" is the IRIX C++ compiler.  This is
828811a29bacSmrg	    # necessary to make sure instantiated templates are included
828911a29bacSmrg	    # in the archive.
829011a29bacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
829111a29bacSmrg	    ;;
829211a29bacSmrg          *)
829311a29bacSmrg	    if test "$GXX" = yes; then
829411a29bacSmrg	      if test "$with_gnu_ld" = no; then
829511a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
829611a29bacSmrg	      else
829711a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
829811a29bacSmrg	      fi
829911a29bacSmrg	    fi
830011a29bacSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
830111a29bacSmrg	    ;;
830211a29bacSmrg        esac
830311a29bacSmrg        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
830411a29bacSmrg        _LT_TAGVAR(hardcode_libdir_separator, $1)=:
830511a29bacSmrg        _LT_TAGVAR(inherit_rpath, $1)=yes
830611a29bacSmrg        ;;
830741b2f0bdSmrg
830811a29bacSmrg      linux* | k*bsd*-gnu | kopensolaris*-gnu)
830911a29bacSmrg        case $cc_basename in
831011a29bacSmrg          KCC*)
831111a29bacSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
831241b2f0bdSmrg
831311a29bacSmrg	    # KCC will only create a shared library if the output file
831411a29bacSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
831511a29bacSmrg	    # to its proper name (with version) after linking.
831611a29bacSmrg	    _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'
831711a29bacSmrg	    _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'
831811a29bacSmrg	    # Commands to make compiler produce verbose output that lists
831911a29bacSmrg	    # what "hidden" libraries, object files and flags are used when
832011a29bacSmrg	    # linking a shared library.
832111a29bacSmrg	    #
832211a29bacSmrg	    # There doesn't appear to be a way to prevent this compiler from
832311a29bacSmrg	    # explicitly linking system object files so we need to strip them
832411a29bacSmrg	    # from the output so that they don't get included in the library
832511a29bacSmrg	    # dependencies.
832611a29bacSmrg	    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"'
832711a29bacSmrg
832811a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
832911a29bacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
833011a29bacSmrg
833111a29bacSmrg	    # Archives containing C++ object files must be created using
833211a29bacSmrg	    # "CC -Bstatic", where "CC" is the KAI C++ compiler.
833311a29bacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
833411a29bacSmrg	    ;;
833511a29bacSmrg	  icpc* | ecpc* )
833611a29bacSmrg	    # Intel C++
833711a29bacSmrg	    with_gnu_ld=yes
833811a29bacSmrg	    # version 8.0 and above of icpc choke on multiply defined symbols
833911a29bacSmrg	    # if we add $predep_objects and $postdep_objects, however 7.1 and
834011a29bacSmrg	    # earlier do not add the objects themselves.
834111a29bacSmrg	    case `$CC -V 2>&1` in
834211a29bacSmrg	      *"Version 7."*)
834311a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
834411a29bacSmrg		_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'
834511a29bacSmrg		;;
834611a29bacSmrg	      *)  # Version 8.0 or newer
834711a29bacSmrg	        tmp_idyn=
834811a29bacSmrg	        case $host_cpu in
834911a29bacSmrg		  ia64*) tmp_idyn=' -i_dynamic';;
835011a29bacSmrg		esac
835111a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
835211a29bacSmrg		_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'
835311a29bacSmrg		;;
835411a29bacSmrg	    esac
835511a29bacSmrg	    _LT_TAGVAR(archive_cmds_need_lc, $1)=no
835611a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
835711a29bacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
835811a29bacSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
835911a29bacSmrg	    ;;
836011a29bacSmrg          pgCC* | pgcpp*)
836111a29bacSmrg            # Portland Group C++ compiler
836211a29bacSmrg	    case `$CC -V` in
836311a29bacSmrg	    *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*)
836411a29bacSmrg	      _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
836511a29bacSmrg		rm -rf $tpldir~
836611a29bacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
836711a29bacSmrg		compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"'
836811a29bacSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
836911a29bacSmrg		rm -rf $tpldir~
837011a29bacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
837111a29bacSmrg		$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~
837211a29bacSmrg		$RANLIB $oldlib'
837311a29bacSmrg	      _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
837411a29bacSmrg		rm -rf $tpldir~
837511a29bacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
837611a29bacSmrg		$CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
837711a29bacSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
837811a29bacSmrg		rm -rf $tpldir~
837911a29bacSmrg		$CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
838011a29bacSmrg		$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'
838111a29bacSmrg	      ;;
838211a29bacSmrg	    *) # Version 6 and above use weak symbols
838311a29bacSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
838411a29bacSmrg	      _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'
838511a29bacSmrg	      ;;
838611a29bacSmrg	    esac
838741b2f0bdSmrg
838811a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
838911a29bacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
839011a29bacSmrg	    _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'
839111a29bacSmrg            ;;
839211a29bacSmrg	  cxx*)
839311a29bacSmrg	    # Compaq C++
839411a29bacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
839511a29bacSmrg	    _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'
839641b2f0bdSmrg
839711a29bacSmrg	    runpath_var=LD_RUN_PATH
839811a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
839911a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
840041b2f0bdSmrg
840111a29bacSmrg	    # Commands to make compiler produce verbose output that lists
840211a29bacSmrg	    # what "hidden" libraries, object files and flags are used when
840311a29bacSmrg	    # linking a shared library.
840411a29bacSmrg	    #
840511a29bacSmrg	    # There doesn't appear to be a way to prevent this compiler from
840611a29bacSmrg	    # explicitly linking system object files so we need to strip them
840711a29bacSmrg	    # from the output so that they don't get included in the library
840811a29bacSmrg	    # dependencies.
840911a29bacSmrg	    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'
841011a29bacSmrg	    ;;
841111a29bacSmrg	  xl* | mpixl* | bgxl*)
841211a29bacSmrg	    # IBM XL 8.0 on PPC, with GNU ld
841311a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
841411a29bacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
841511a29bacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
841611a29bacSmrg	    if test "x$supports_anon_versioning" = xyes; then
841711a29bacSmrg	      _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
841811a29bacSmrg		cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
841911a29bacSmrg		echo "local: *; };" >> $output_objdir/$libname.ver~
842011a29bacSmrg		$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
842111a29bacSmrg	    fi
842211a29bacSmrg	    ;;
842311a29bacSmrg	  *)
842411a29bacSmrg	    case `$CC -V 2>&1 | sed 5q` in
842511a29bacSmrg	    *Sun\ C*)
842611a29bacSmrg	      # Sun C++ 5.9
842711a29bacSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
842811a29bacSmrg	      _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
842911a29bacSmrg	      _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'
843011a29bacSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
843111a29bacSmrg	      _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'
843211a29bacSmrg	      _LT_TAGVAR(compiler_needs_object, $1)=yes
843311a29bacSmrg
843411a29bacSmrg	      # Not sure whether something based on
843511a29bacSmrg	      # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
843611a29bacSmrg	      # would be better.
843711a29bacSmrg	      output_verbose_link_cmd='func_echo_all'
843811a29bacSmrg
843911a29bacSmrg	      # Archives containing C++ object files must be created using
844011a29bacSmrg	      # "CC -xar", where "CC" is the Sun C++ compiler.  This is
844111a29bacSmrg	      # necessary to make sure instantiated templates are included
844211a29bacSmrg	      # in the archive.
844311a29bacSmrg	      _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
844411a29bacSmrg	      ;;
844511a29bacSmrg	    esac
844611a29bacSmrg	    ;;
844711a29bacSmrg	esac
844811a29bacSmrg	;;
844941b2f0bdSmrg
845011a29bacSmrg      lynxos*)
845111a29bacSmrg        # FIXME: insert proper C++ library support
845211a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
845311a29bacSmrg	;;
845441b2f0bdSmrg
845511a29bacSmrg      m88k*)
845611a29bacSmrg        # FIXME: insert proper C++ library support
845711a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
845811a29bacSmrg	;;
845941b2f0bdSmrg
846011a29bacSmrg      mvs*)
846111a29bacSmrg        case $cc_basename in
846211a29bacSmrg          cxx*)
846311a29bacSmrg	    # FIXME: insert proper C++ library support
846411a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
846511a29bacSmrg	    ;;
846611a29bacSmrg	  *)
846711a29bacSmrg	    # FIXME: insert proper C++ library support
846811a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
846911a29bacSmrg	    ;;
847011a29bacSmrg	esac
847111a29bacSmrg	;;
847211245024Smrg
847311a29bacSmrg      netbsd*)
847411a29bacSmrg        if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
847511a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
847611a29bacSmrg	  wlarc=
847711a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
847811a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
847911a29bacSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
848011a29bacSmrg	fi
848111a29bacSmrg	# Workaround some broken pre-1.5 toolchains
848211a29bacSmrg	output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
848311a29bacSmrg	;;
848411245024Smrg
848511a29bacSmrg      *nto* | *qnx*)
848611a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=yes
848711a29bacSmrg	;;
848841b2f0bdSmrg
848911a29bacSmrg      openbsd2*)
849011a29bacSmrg        # C++ shared libraries are fairly broken
849111a29bacSmrg	_LT_TAGVAR(ld_shlibs, $1)=no
849211a29bacSmrg	;;
849341b2f0bdSmrg
849411a29bacSmrg      openbsd*)
849511a29bacSmrg	if test -f /usr/libexec/ld.so; then
849611a29bacSmrg	  _LT_TAGVAR(hardcode_direct, $1)=yes
849711a29bacSmrg	  _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
849811a29bacSmrg	  _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
849911a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
850011a29bacSmrg	  _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
850111a29bacSmrg	  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
850211a29bacSmrg	    _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'
850311a29bacSmrg	    _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
850411a29bacSmrg	    _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
850511a29bacSmrg	  fi
850611a29bacSmrg	  output_verbose_link_cmd=func_echo_all
850711a29bacSmrg	else
850811a29bacSmrg	  _LT_TAGVAR(ld_shlibs, $1)=no
850911a29bacSmrg	fi
851011a29bacSmrg	;;
851141b2f0bdSmrg
851211a29bacSmrg      osf3* | osf4* | osf5*)
851311a29bacSmrg        case $cc_basename in
851411a29bacSmrg          KCC*)
851511a29bacSmrg	    # Kuck and Associates, Inc. (KAI) C++ Compiler
851611a29bacSmrg
851711a29bacSmrg	    # KCC will only create a shared library if the output file
851811a29bacSmrg	    # ends with ".so" (or ".sl" for HP-UX), so rename the library
851911a29bacSmrg	    # to its proper name (with version) after linking.
852011a29bacSmrg	    _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'
852111a29bacSmrg
852211a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
852311a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
852411a29bacSmrg
852511a29bacSmrg	    # Archives containing C++ object files must be created using
852611a29bacSmrg	    # the KAI C++ compiler.
852711a29bacSmrg	    case $host in
852811a29bacSmrg	      osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
852911a29bacSmrg	      *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
853011a29bacSmrg	    esac
853111a29bacSmrg	    ;;
853211a29bacSmrg          RCC*)
853311a29bacSmrg	    # Rational C++ 2.4.1
853411a29bacSmrg	    # FIXME: insert proper C++ library support
853511a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
853611a29bacSmrg	    ;;
853711a29bacSmrg          cxx*)
853811a29bacSmrg	    case $host in
853911a29bacSmrg	      osf3*)
854011a29bacSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
854111a29bacSmrg	        _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'
854211a29bacSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
854311a29bacSmrg		;;
854411a29bacSmrg	      *)
854511a29bacSmrg	        _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
854611a29bacSmrg	        _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'
854711a29bacSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
854811a29bacSmrg	          echo "-hidden">> $lib.exp~
854911a29bacSmrg	          $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~
855011a29bacSmrg	          $RM $lib.exp'
855111a29bacSmrg	        _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
855211a29bacSmrg		;;
855311a29bacSmrg	    esac
855441b2f0bdSmrg
855511a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_separator, $1)=:
855641b2f0bdSmrg
855711a29bacSmrg	    # Commands to make compiler produce verbose output that lists
855811a29bacSmrg	    # what "hidden" libraries, object files and flags are used when
855911a29bacSmrg	    # linking a shared library.
856011a29bacSmrg	    #
856111a29bacSmrg	    # There doesn't appear to be a way to prevent this compiler from
856211a29bacSmrg	    # explicitly linking system object files so we need to strip them
856311a29bacSmrg	    # from the output so that they don't get included in the library
856411a29bacSmrg	    # dependencies.
856511a29bacSmrg	    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"'
856611a29bacSmrg	    ;;
856711a29bacSmrg	  *)
856811a29bacSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
856911a29bacSmrg	      _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
857011a29bacSmrg	      case $host in
857111a29bacSmrg	        osf3*)
857211a29bacSmrg	          _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'
857311a29bacSmrg		  ;;
857411a29bacSmrg	        *)
857511a29bacSmrg	          _LT_TAGVAR(archive_cmds, $1)='$CC -shared -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'
857611a29bacSmrg		  ;;
857711a29bacSmrg	      esac
857811a29bacSmrg
857911a29bacSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
858011a29bacSmrg	      _LT_TAGVAR(hardcode_libdir_separator, $1)=:
858111a29bacSmrg
858211a29bacSmrg	      # Commands to make compiler produce verbose output that lists
858311a29bacSmrg	      # what "hidden" libraries, object files and flags are used when
858411a29bacSmrg	      # linking a shared library.
858511a29bacSmrg	      output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
858611a29bacSmrg
858711a29bacSmrg	    else
858811a29bacSmrg	      # FIXME: insert proper C++ library support
858911a29bacSmrg	      _LT_TAGVAR(ld_shlibs, $1)=no
859011a29bacSmrg	    fi
859111a29bacSmrg	    ;;
859211a29bacSmrg        esac
859311a29bacSmrg        ;;
859441b2f0bdSmrg
859511a29bacSmrg      psos*)
859611a29bacSmrg        # FIXME: insert proper C++ library support
859711a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
859811a29bacSmrg        ;;
859941b2f0bdSmrg
860011a29bacSmrg      sunos4*)
860111a29bacSmrg        case $cc_basename in
860211a29bacSmrg          CC*)
860311a29bacSmrg	    # Sun C++ 4.x
860411a29bacSmrg	    # FIXME: insert proper C++ library support
860511a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
860611a29bacSmrg	    ;;
860711a29bacSmrg          lcc*)
860811a29bacSmrg	    # Lucid
860911a29bacSmrg	    # FIXME: insert proper C++ library support
861011a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
861111a29bacSmrg	    ;;
861211a29bacSmrg          *)
861311a29bacSmrg	    # FIXME: insert proper C++ library support
861411a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
861511a29bacSmrg	    ;;
861611a29bacSmrg        esac
861711a29bacSmrg        ;;
861841b2f0bdSmrg
861911a29bacSmrg      solaris*)
862011a29bacSmrg        case $cc_basename in
862111a29bacSmrg          CC* | sunCC*)
862211a29bacSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
862311a29bacSmrg            _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
862411a29bacSmrg	    _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
862511a29bacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
862611a29bacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
862711a29bacSmrg	      $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'
862811a29bacSmrg
862911a29bacSmrg	    _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
863011a29bacSmrg	    _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
863111a29bacSmrg	    case $host_os in
863211a29bacSmrg	      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
863311a29bacSmrg	      *)
863411a29bacSmrg		# The compiler driver will combine and reorder linker options,
863511a29bacSmrg		# but understands `-z linker_flag'.
863611a29bacSmrg	        # Supported since Solaris 2.6 (maybe 2.5.1?)
863711a29bacSmrg		_LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
863811a29bacSmrg	        ;;
863911a29bacSmrg	    esac
864011a29bacSmrg	    _LT_TAGVAR(link_all_deplibs, $1)=yes
864141b2f0bdSmrg
864211a29bacSmrg	    output_verbose_link_cmd='func_echo_all'
864341b2f0bdSmrg
864411a29bacSmrg	    # Archives containing C++ object files must be created using
864511a29bacSmrg	    # "CC -xar", where "CC" is the Sun C++ compiler.  This is
864611a29bacSmrg	    # necessary to make sure instantiated templates are included
864711a29bacSmrg	    # in the archive.
864811a29bacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
864911a29bacSmrg	    ;;
865011a29bacSmrg          gcx*)
865111a29bacSmrg	    # Green Hills C++ Compiler
865211a29bacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
865341b2f0bdSmrg
865411a29bacSmrg	    # The C++ compiler must be used to create the archive.
865511a29bacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
865611a29bacSmrg	    ;;
865711a29bacSmrg          *)
865811a29bacSmrg	    # GNU C++ compiler with Solaris linker
865911a29bacSmrg	    if test "$GXX" = yes && test "$with_gnu_ld" = no; then
866011a29bacSmrg	      _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
866111a29bacSmrg	      if $CC --version | $GREP -v '^2\.7' > /dev/null; then
866211a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
866311a29bacSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
866411a29bacSmrg		  $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
866511a29bacSmrg
866611a29bacSmrg	        # Commands to make compiler produce verbose output that lists
866711a29bacSmrg	        # what "hidden" libraries, object files and flags are used when
866811a29bacSmrg	        # linking a shared library.
866911a29bacSmrg	        output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
867011a29bacSmrg	      else
867111a29bacSmrg	        # g++ 2.7 appears to require `-G' NOT `-shared' on this
867211a29bacSmrg	        # platform.
867311a29bacSmrg	        _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
867411a29bacSmrg	        _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
867511a29bacSmrg		  $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
867611a29bacSmrg
867711a29bacSmrg	        # Commands to make compiler produce verbose output that lists
867811a29bacSmrg	        # what "hidden" libraries, object files and flags are used when
867911a29bacSmrg	        # linking a shared library.
868011a29bacSmrg	        output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"'
868111a29bacSmrg	      fi
868211a29bacSmrg
868311a29bacSmrg	      _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
868411a29bacSmrg	      case $host_os in
868511a29bacSmrg		solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
868611a29bacSmrg		*)
868711a29bacSmrg		  _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
868811a29bacSmrg		  ;;
868911a29bacSmrg	      esac
869011a29bacSmrg	    fi
869111a29bacSmrg	    ;;
869211a29bacSmrg        esac
869311a29bacSmrg        ;;
869441b2f0bdSmrg
869511a29bacSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
869611a29bacSmrg      _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
869711a29bacSmrg      _LT_TAGVAR(archive_cmds_need_lc, $1)=no
869811a29bacSmrg      _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
869911a29bacSmrg      runpath_var='LD_RUN_PATH'
870041b2f0bdSmrg
870111a29bacSmrg      case $cc_basename in
870211a29bacSmrg        CC*)
870311a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
870411a29bacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
870511a29bacSmrg	  ;;
870611a29bacSmrg	*)
870711a29bacSmrg	  _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
870811a29bacSmrg	  _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
870911a29bacSmrg	  ;;
871011a29bacSmrg      esac
871111a29bacSmrg      ;;
871241b2f0bdSmrg
871311a29bacSmrg      sysv5* | sco3.2v5* | sco5v6*)
871411a29bacSmrg	# Note: We can NOT use -z defs as we might desire, because we do not
871511a29bacSmrg	# link with -lc, and that would cause any symbols used from libc to
871611a29bacSmrg	# always be unresolved, which means just about no library would
871711a29bacSmrg	# ever link correctly.  If we're not using GNU ld we use -z text
871811a29bacSmrg	# though, which does catch some bad symbols but isn't as heavy-handed
871911a29bacSmrg	# as -z defs.
872011a29bacSmrg	_LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
872111a29bacSmrg	_LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
872211a29bacSmrg	_LT_TAGVAR(archive_cmds_need_lc, $1)=no
872311a29bacSmrg	_LT_TAGVAR(hardcode_shlibpath_var, $1)=no
872411a29bacSmrg	_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
872511a29bacSmrg	_LT_TAGVAR(hardcode_libdir_separator, $1)=':'
872611a29bacSmrg	_LT_TAGVAR(link_all_deplibs, $1)=yes
872711a29bacSmrg	_LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
872811a29bacSmrg	runpath_var='LD_RUN_PATH'
872941b2f0bdSmrg
873011a29bacSmrg	case $cc_basename in
873111a29bacSmrg          CC*)
873211a29bacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
873311a29bacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
873411a29bacSmrg	    _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~
873511a29bacSmrg	      '"$_LT_TAGVAR(old_archive_cmds, $1)"
873611a29bacSmrg	    _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~
873711a29bacSmrg	      '"$_LT_TAGVAR(reload_cmds, $1)"
873811a29bacSmrg	    ;;
873911a29bacSmrg	  *)
874011a29bacSmrg	    _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
874111a29bacSmrg	    _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
874211a29bacSmrg	    ;;
874311a29bacSmrg	esac
874411a29bacSmrg      ;;
874541b2f0bdSmrg
874611a29bacSmrg      tandem*)
874711a29bacSmrg        case $cc_basename in
874811a29bacSmrg          NCC*)
874911a29bacSmrg	    # NonStop-UX NCC 3.20
875011a29bacSmrg	    # FIXME: insert proper C++ library support
875111a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
875211a29bacSmrg	    ;;
875311a29bacSmrg          *)
875411a29bacSmrg	    # FIXME: insert proper C++ library support
875511a29bacSmrg	    _LT_TAGVAR(ld_shlibs, $1)=no
875611a29bacSmrg	    ;;
875711a29bacSmrg        esac
875811a29bacSmrg        ;;
875941b2f0bdSmrg
876011a29bacSmrg      vxworks*)
876111a29bacSmrg        # FIXME: insert proper C++ library support
876211a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
876311a29bacSmrg        ;;
876441b2f0bdSmrg
876511a29bacSmrg      *)
876611a29bacSmrg        # FIXME: insert proper C++ library support
876711a29bacSmrg        _LT_TAGVAR(ld_shlibs, $1)=no
876811a29bacSmrg        ;;
876911a29bacSmrg    esac
877041b2f0bdSmrg
877111a29bacSmrg    AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
877211a29bacSmrg    test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
877311a29bacSmrg
877411a29bacSmrg    _LT_TAGVAR(GCC, $1)="$GXX"
877511a29bacSmrg    _LT_TAGVAR(LD, $1)="$LD"
877611a29bacSmrg
877711a29bacSmrg    ## CAVEAT EMPTOR:
877811a29bacSmrg    ## There is no encapsulation within the following macros, do not change
877911a29bacSmrg    ## the running order or otherwise move them around unless you know exactly
878011a29bacSmrg    ## what you are doing...
878111a29bacSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
878211a29bacSmrg    _LT_COMPILER_PIC($1)
878311a29bacSmrg    _LT_COMPILER_C_O($1)
878411a29bacSmrg    _LT_COMPILER_FILE_LOCKS($1)
878511a29bacSmrg    _LT_LINKER_SHLIBS($1)
878611a29bacSmrg    _LT_SYS_DYNAMIC_LINKER($1)
878711a29bacSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
878811a29bacSmrg
878911a29bacSmrg    _LT_CONFIG($1)
879011a29bacSmrg  fi # test -n "$compiler"
879111a29bacSmrg
879211a29bacSmrg  CC=$lt_save_CC
879311a29bacSmrg  LDCXX=$LD
879411a29bacSmrg  LD=$lt_save_LD
879511a29bacSmrg  GCC=$lt_save_GCC
879611a29bacSmrg  with_gnu_ld=$lt_save_with_gnu_ld
879711a29bacSmrg  lt_cv_path_LDCXX=$lt_cv_path_LD
879811a29bacSmrg  lt_cv_path_LD=$lt_save_path_LD
879911a29bacSmrg  lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
880011a29bacSmrg  lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
880111a29bacSmrgfi # test "$_lt_caught_CXX_error" != yes
880241b2f0bdSmrg
880311a29bacSmrgAC_LANG_POP
880411a29bacSmrg])# _LT_LANG_CXX_CONFIG
880541b2f0bdSmrg
880641b2f0bdSmrg
880711a29bacSmrg# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
880811245024Smrg# ---------------------------------
880911a29bacSmrg# Figure out "hidden" library dependencies from verbose
881011a29bacSmrg# compiler output when linking a shared library.
881111a29bacSmrg# Parse the compiler output and extract the necessary
881211a29bacSmrg# objects, libraries and library flags.
881311a29bacSmrgm4_defun([_LT_SYS_HIDDEN_LIBDEPS],
881411a29bacSmrg[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
881511a29bacSmrg# Dependencies to place before and after the object being linked:
881611a29bacSmrg_LT_TAGVAR(predep_objects, $1)=
881711a29bacSmrg_LT_TAGVAR(postdep_objects, $1)=
881811a29bacSmrg_LT_TAGVAR(predeps, $1)=
881911a29bacSmrg_LT_TAGVAR(postdeps, $1)=
882011a29bacSmrg_LT_TAGVAR(compiler_lib_search_path, $1)=
882141b2f0bdSmrg
882211a29bacSmrgdnl we can't use the lt_simple_compile_test_code here,
882311a29bacSmrgdnl because it contains code intended for an executable,
882411a29bacSmrgdnl not a library.  It's possible we should let each
882511a29bacSmrgdnl tag define a new lt_????_link_test_code variable,
882611a29bacSmrgdnl but it's only used here...
882711a29bacSmrgm4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
882811a29bacSmrgint a;
882911a29bacSmrgvoid foo (void) { a = 0; }
883011a29bacSmrg_LT_EOF
883111a29bacSmrg], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
883211a29bacSmrgclass Foo
883311a29bacSmrg{
883411a29bacSmrgpublic:
883511a29bacSmrg  Foo (void) { a = 0; }
883611a29bacSmrgprivate:
883711a29bacSmrg  int a;
883811a29bacSmrg};
883911a29bacSmrg_LT_EOF
884011a29bacSmrg], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
884111a29bacSmrg      subroutine foo
884211a29bacSmrg      implicit none
884311a29bacSmrg      integer*4 a
884411a29bacSmrg      a=0
884511a29bacSmrg      return
884611a29bacSmrg      end
884711a29bacSmrg_LT_EOF
884811a29bacSmrg], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
884911a29bacSmrg      subroutine foo
885011a29bacSmrg      implicit none
885111a29bacSmrg      integer a
885211a29bacSmrg      a=0
885311a29bacSmrg      return
885411a29bacSmrg      end
885511a29bacSmrg_LT_EOF
885611a29bacSmrg], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
885711a29bacSmrgpublic class foo {
885811a29bacSmrg  private int a;
885911a29bacSmrg  public void bar (void) {
886011a29bacSmrg    a = 0;
886111a29bacSmrg  }
886211a29bacSmrg};
886311a29bacSmrg_LT_EOF
886411a29bacSmrg])
886511a29bacSmrgdnl Parse the compiler output and extract the necessary
886611a29bacSmrgdnl objects, libraries and library flags.
886711a29bacSmrgif AC_TRY_EVAL(ac_compile); then
886811a29bacSmrg  # Parse the compiler output and extract the necessary
886911a29bacSmrg  # objects, libraries and library flags.
887041b2f0bdSmrg
887111a29bacSmrg  # Sentinel used to keep track of whether or not we are before
887211a29bacSmrg  # the conftest object file.
887311a29bacSmrg  pre_test_object_deps_done=no
887441b2f0bdSmrg
887511a29bacSmrg  for p in `eval "$output_verbose_link_cmd"`; do
887611a29bacSmrg    case $p in
887741b2f0bdSmrg
887811a29bacSmrg    -L* | -R* | -l*)
887911a29bacSmrg       # Some compilers place space between "-{L,R}" and the path.
888011a29bacSmrg       # Remove the space.
888111a29bacSmrg       if test $p = "-L" ||
888211a29bacSmrg          test $p = "-R"; then
888311a29bacSmrg	 prev=$p
888411a29bacSmrg	 continue
888511a29bacSmrg       else
888611a29bacSmrg	 prev=
888711a29bacSmrg       fi
888811a29bacSmrg
888911a29bacSmrg       if test "$pre_test_object_deps_done" = no; then
889011a29bacSmrg	 case $p in
889111a29bacSmrg	 -L* | -R*)
889211a29bacSmrg	   # Internal compiler library paths should come after those
889311a29bacSmrg	   # provided the user.  The postdeps already come after the
889411a29bacSmrg	   # user supplied libs so there is no need to process them.
889511a29bacSmrg	   if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
889611a29bacSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
889711a29bacSmrg	   else
889811a29bacSmrg	     _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
889911a29bacSmrg	   fi
890011a29bacSmrg	   ;;
890111a29bacSmrg	 # The "-l" case would never come before the object being
890211a29bacSmrg	 # linked, so don't bother handling this case.
890311a29bacSmrg	 esac
890411a29bacSmrg       else
890511a29bacSmrg	 if test -z "$_LT_TAGVAR(postdeps, $1)"; then
890611a29bacSmrg	   _LT_TAGVAR(postdeps, $1)="${prev}${p}"
890711a29bacSmrg	 else
890811a29bacSmrg	   _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
890911a29bacSmrg	 fi
891011a29bacSmrg       fi
891111a29bacSmrg       ;;
891211a29bacSmrg
891311a29bacSmrg    *.$objext)
891411a29bacSmrg       # This assumes that the test object file only shows up
891511a29bacSmrg       # once in the compiler output.
891611a29bacSmrg       if test "$p" = "conftest.$objext"; then
891711a29bacSmrg	 pre_test_object_deps_done=yes
891811a29bacSmrg	 continue
891911a29bacSmrg       fi
892011a29bacSmrg
892111a29bacSmrg       if test "$pre_test_object_deps_done" = no; then
892211a29bacSmrg	 if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
892311a29bacSmrg	   _LT_TAGVAR(predep_objects, $1)="$p"
892411a29bacSmrg	 else
892511a29bacSmrg	   _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
892611a29bacSmrg	 fi
892711a29bacSmrg       else
892811a29bacSmrg	 if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
892911a29bacSmrg	   _LT_TAGVAR(postdep_objects, $1)="$p"
893011a29bacSmrg	 else
893111a29bacSmrg	   _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
893211a29bacSmrg	 fi
893311a29bacSmrg       fi
893411a29bacSmrg       ;;
893511a29bacSmrg
893611a29bacSmrg    *) ;; # Ignore the rest.
893711a29bacSmrg
893811a29bacSmrg    esac
893911a29bacSmrg  done
894011a29bacSmrg
894111a29bacSmrg  # Clean up.
894211a29bacSmrg  rm -f a.out a.exe
894311a29bacSmrgelse
894411a29bacSmrg  echo "libtool.m4: error: problem compiling $1 test program"
894511a29bacSmrgfi
894611a29bacSmrg
894711a29bacSmrg$RM -f confest.$objext
894811a29bacSmrg
894911a29bacSmrg# PORTME: override above test on systems where it is broken
895011a29bacSmrgm4_if([$1], [CXX],
895111a29bacSmrg[case $host_os in
895211a29bacSmrginterix[[3-9]]*)
895311a29bacSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
895411a29bacSmrg  # hack all around it, let's just trust "g++" to DTRT.
895511a29bacSmrg  _LT_TAGVAR(predep_objects,$1)=
895611a29bacSmrg  _LT_TAGVAR(postdep_objects,$1)=
895711a29bacSmrg  _LT_TAGVAR(postdeps,$1)=
895811245024Smrg  ;;
895911a29bacSmrg
896011a29bacSmrglinux*)
896111a29bacSmrg  case `$CC -V 2>&1 | sed 5q` in
896211a29bacSmrg  *Sun\ C*)
896311a29bacSmrg    # Sun C++ 5.9
896411a29bacSmrg
896511a29bacSmrg    # The more standards-conforming stlport4 library is
896611a29bacSmrg    # incompatible with the Cstd library. Avoid specifying
896711a29bacSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
896811a29bacSmrg    # -library=stlport4 depends on it.
896911a29bacSmrg    case " $CXX $CXXFLAGS " in
897011a29bacSmrg    *" -library=stlport4 "*)
897111a29bacSmrg      solaris_use_stlport4=yes
897211a29bacSmrg      ;;
897311a29bacSmrg    esac
897411a29bacSmrg
897511a29bacSmrg    if test "$solaris_use_stlport4" != yes; then
897611a29bacSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
897711a29bacSmrg    fi
897811a29bacSmrg    ;;
897911a29bacSmrg  esac
898011245024Smrg  ;;
898111a29bacSmrg
898211245024Smrgsolaris*)
898311a29bacSmrg  case $cc_basename in
898411a29bacSmrg  CC* | sunCC*)
898511a29bacSmrg    # The more standards-conforming stlport4 library is
898611a29bacSmrg    # incompatible with the Cstd library. Avoid specifying
898711a29bacSmrg    # it if it's in CXXFLAGS. Ignore libCrun as
898811a29bacSmrg    # -library=stlport4 depends on it.
898911a29bacSmrg    case " $CXX $CXXFLAGS " in
899011a29bacSmrg    *" -library=stlport4 "*)
899111a29bacSmrg      solaris_use_stlport4=yes
899211a29bacSmrg      ;;
899311a29bacSmrg    esac
899441b2f0bdSmrg
899511a29bacSmrg    # Adding this requires a known-good setup of shared libraries for
899611a29bacSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
899711a29bacSmrg    # archive will be linked into the output, leading to subtle bugs.
899811a29bacSmrg    if test "$solaris_use_stlport4" != yes; then
899911a29bacSmrg      _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
900011a29bacSmrg    fi
900111a29bacSmrg    ;;
900211a29bacSmrg  esac
900311245024Smrg  ;;
900411245024Smrgesac
900511a29bacSmrg])
900641b2f0bdSmrg
900711a29bacSmrgcase " $_LT_TAGVAR(postdeps, $1) " in
900811a29bacSmrg*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
900911245024Smrgesac
901011a29bacSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=
901111a29bacSmrgif test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
901211a29bacSmrg _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
901311a29bacSmrgfi
901411a29bacSmrg_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
901511a29bacSmrg    [The directories searched by this compiler when creating a shared library])
901611a29bacSmrg_LT_TAGDECL([], [predep_objects], [1],
901711a29bacSmrg    [Dependencies to place before and after the objects being linked to
901811a29bacSmrg    create a shared library])
901911a29bacSmrg_LT_TAGDECL([], [postdep_objects], [1])
902011a29bacSmrg_LT_TAGDECL([], [predeps], [1])
902111a29bacSmrg_LT_TAGDECL([], [postdeps], [1])
902211a29bacSmrg_LT_TAGDECL([], [compiler_lib_search_path], [1],
902311a29bacSmrg    [The library search path used internally by the compiler when linking
902411a29bacSmrg    a shared library])
902511a29bacSmrg])# _LT_SYS_HIDDEN_LIBDEPS
902611a29bacSmrg
902711a29bacSmrg
902811a29bacSmrg# _LT_LANG_F77_CONFIG([TAG])
902911a29bacSmrg# --------------------------
903011a29bacSmrg# Ensure that the configuration variables for a Fortran 77 compiler are
903111a29bacSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
903211a29bacSmrg# to write the compiler configuration to `libtool'.
903311a29bacSmrgm4_defun([_LT_LANG_F77_CONFIG],
903411a29bacSmrg[AC_LANG_PUSH(Fortran 77)
903511a29bacSmrgif test -z "$F77" || test "X$F77" = "Xno"; then
903611a29bacSmrg  _lt_disable_F77=yes
903711a29bacSmrgfi
903841b2f0bdSmrg
903911a29bacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
904011a29bacSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
904111a29bacSmrg_LT_TAGVAR(always_export_symbols, $1)=no
904211a29bacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
904311a29bacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
904411a29bacSmrg_LT_TAGVAR(hardcode_direct, $1)=no
904511a29bacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
904611a29bacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
904711a29bacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
904811a29bacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
904911a29bacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
905011a29bacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
905111a29bacSmrg_LT_TAGVAR(inherit_rpath, $1)=no
905211a29bacSmrg_LT_TAGVAR(module_cmds, $1)=
905311a29bacSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
905411a29bacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
905511a29bacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
905611a29bacSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
905711a29bacSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
905811a29bacSmrg_LT_TAGVAR(no_undefined_flag, $1)=
905911a29bacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
906011a29bacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
906141b2f0bdSmrg
906211a29bacSmrg# Source file extension for f77 test sources.
906311a29bacSmrgac_ext=f
906411245024Smrg
906511a29bacSmrg# Object file extension for compiled f77 test sources.
906611a29bacSmrgobjext=o
906711a29bacSmrg_LT_TAGVAR(objext, $1)=$objext
906811a29bacSmrg
906911a29bacSmrg# No sense in running all these tests if we already determined that
907011a29bacSmrg# the F77 compiler isn't working.  Some variables (like enable_shared)
907111a29bacSmrg# are currently assumed to apply to all compilers on this platform,
907211a29bacSmrg# and will be corrupted by setting them based on a non-working compiler.
907311a29bacSmrgif test "$_lt_disable_F77" != yes; then
907411a29bacSmrg  # Code to be used in simple compile tests
907511a29bacSmrg  lt_simple_compile_test_code="\
907611a29bacSmrg      subroutine t
907711a29bacSmrg      return
907811a29bacSmrg      end
907911a29bacSmrg"
908011245024Smrg
908111a29bacSmrg  # Code to be used in simple link tests
908211a29bacSmrg  lt_simple_link_test_code="\
908311a29bacSmrg      program t
908411a29bacSmrg      end
908511a29bacSmrg"
908641b2f0bdSmrg
908711a29bacSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
908811a29bacSmrg  _LT_TAG_COMPILER
908911245024Smrg
909011a29bacSmrg  # save warnings/boilerplate of simple test code
909111a29bacSmrg  _LT_COMPILER_BOILERPLATE
909211a29bacSmrg  _LT_LINKER_BOILERPLATE
909341b2f0bdSmrg
909411a29bacSmrg  # Allow CC to be a program name with arguments.
909511a29bacSmrg  lt_save_CC="$CC"
909611a29bacSmrg  lt_save_GCC=$GCC
909711a29bacSmrg  CC=${F77-"f77"}
909811a29bacSmrg  compiler=$CC
909911a29bacSmrg  _LT_TAGVAR(compiler, $1)=$CC
910011a29bacSmrg  _LT_CC_BASENAME([$compiler])
910111a29bacSmrg  GCC=$G77
910211a29bacSmrg  if test -n "$compiler"; then
910311a29bacSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
910411a29bacSmrg    AC_MSG_RESULT([$can_build_shared])
910541b2f0bdSmrg
910611a29bacSmrg    AC_MSG_CHECKING([whether to build shared libraries])
910711a29bacSmrg    test "$can_build_shared" = "no" && enable_shared=no
910841b2f0bdSmrg
910911a29bacSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
911011a29bacSmrg    # are all built from PIC.
911111a29bacSmrg    case $host_os in
911211a29bacSmrg      aix3*)
911311a29bacSmrg        test "$enable_shared" = yes && enable_static=no
911411a29bacSmrg        if test -n "$RANLIB"; then
911511a29bacSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
911611a29bacSmrg          postinstall_cmds='$RANLIB $lib'
911711a29bacSmrg        fi
911811a29bacSmrg        ;;
911911a29bacSmrg      aix[[4-9]]*)
912011a29bacSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
912111a29bacSmrg	  test "$enable_shared" = yes && enable_static=no
912211a29bacSmrg	fi
912311a29bacSmrg        ;;
912411a29bacSmrg    esac
912511a29bacSmrg    AC_MSG_RESULT([$enable_shared])
912611a29bacSmrg
912711a29bacSmrg    AC_MSG_CHECKING([whether to build static libraries])
912811a29bacSmrg    # Make sure either enable_shared or enable_static is yes.
912911a29bacSmrg    test "$enable_shared" = yes || enable_static=yes
913011a29bacSmrg    AC_MSG_RESULT([$enable_static])
913111a29bacSmrg
913211a29bacSmrg    _LT_TAGVAR(GCC, $1)="$G77"
913311a29bacSmrg    _LT_TAGVAR(LD, $1)="$LD"
913411a29bacSmrg
913511a29bacSmrg    ## CAVEAT EMPTOR:
913611a29bacSmrg    ## There is no encapsulation within the following macros, do not change
913711a29bacSmrg    ## the running order or otherwise move them around unless you know exactly
913811a29bacSmrg    ## what you are doing...
913911a29bacSmrg    _LT_COMPILER_PIC($1)
914011a29bacSmrg    _LT_COMPILER_C_O($1)
914111a29bacSmrg    _LT_COMPILER_FILE_LOCKS($1)
914211a29bacSmrg    _LT_LINKER_SHLIBS($1)
914311a29bacSmrg    _LT_SYS_DYNAMIC_LINKER($1)
914411a29bacSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
914511a29bacSmrg
914611a29bacSmrg    _LT_CONFIG($1)
914711a29bacSmrg  fi # test -n "$compiler"
914811a29bacSmrg
914911a29bacSmrg  GCC=$lt_save_GCC
915011a29bacSmrg  CC="$lt_save_CC"
915111a29bacSmrgfi # test "$_lt_disable_F77" != yes
915241b2f0bdSmrg
915311a29bacSmrgAC_LANG_POP
915411a29bacSmrg])# _LT_LANG_F77_CONFIG
915541b2f0bdSmrg
915641b2f0bdSmrg
915711a29bacSmrg# _LT_LANG_FC_CONFIG([TAG])
915811a29bacSmrg# -------------------------
915911a29bacSmrg# Ensure that the configuration variables for a Fortran compiler are
916011a29bacSmrg# suitably defined.  These variables are subsequently used by _LT_CONFIG
916111a29bacSmrg# to write the compiler configuration to `libtool'.
916211a29bacSmrgm4_defun([_LT_LANG_FC_CONFIG],
916311a29bacSmrg[AC_LANG_PUSH(Fortran)
916411a29bacSmrg
916511a29bacSmrgif test -z "$FC" || test "X$FC" = "Xno"; then
916611a29bacSmrg  _lt_disable_FC=yes
916711245024Smrgfi
916841b2f0bdSmrg
916911a29bacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
917011a29bacSmrg_LT_TAGVAR(allow_undefined_flag, $1)=
917111a29bacSmrg_LT_TAGVAR(always_export_symbols, $1)=no
917211a29bacSmrg_LT_TAGVAR(archive_expsym_cmds, $1)=
917311a29bacSmrg_LT_TAGVAR(export_dynamic_flag_spec, $1)=
917411a29bacSmrg_LT_TAGVAR(hardcode_direct, $1)=no
917511a29bacSmrg_LT_TAGVAR(hardcode_direct_absolute, $1)=no
917611a29bacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
917711a29bacSmrg_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
917811a29bacSmrg_LT_TAGVAR(hardcode_libdir_separator, $1)=
917911a29bacSmrg_LT_TAGVAR(hardcode_minus_L, $1)=no
918011a29bacSmrg_LT_TAGVAR(hardcode_automatic, $1)=no
918111a29bacSmrg_LT_TAGVAR(inherit_rpath, $1)=no
918211a29bacSmrg_LT_TAGVAR(module_cmds, $1)=
918311a29bacSmrg_LT_TAGVAR(module_expsym_cmds, $1)=
918411a29bacSmrg_LT_TAGVAR(link_all_deplibs, $1)=unknown
918511a29bacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
918611a29bacSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
918711a29bacSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
918811a29bacSmrg_LT_TAGVAR(no_undefined_flag, $1)=
918911a29bacSmrg_LT_TAGVAR(whole_archive_flag_spec, $1)=
919011a29bacSmrg_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
919111a29bacSmrg
919211a29bacSmrg# Source file extension for fc test sources.
919311a29bacSmrgac_ext=${ac_fc_srcext-f}
919411a29bacSmrg
919511a29bacSmrg# Object file extension for compiled fc test sources.
919611a29bacSmrgobjext=o
919711a29bacSmrg_LT_TAGVAR(objext, $1)=$objext
919811a29bacSmrg
919911a29bacSmrg# No sense in running all these tests if we already determined that
920011a29bacSmrg# the FC compiler isn't working.  Some variables (like enable_shared)
920111a29bacSmrg# are currently assumed to apply to all compilers on this platform,
920211a29bacSmrg# and will be corrupted by setting them based on a non-working compiler.
920311a29bacSmrgif test "$_lt_disable_FC" != yes; then
920411a29bacSmrg  # Code to be used in simple compile tests
920511a29bacSmrg  lt_simple_compile_test_code="\
920611a29bacSmrg      subroutine t
920711a29bacSmrg      return
920811a29bacSmrg      end
920911a29bacSmrg"
921041b2f0bdSmrg
921111a29bacSmrg  # Code to be used in simple link tests
921211a29bacSmrg  lt_simple_link_test_code="\
921311a29bacSmrg      program t
921411a29bacSmrg      end
921511a29bacSmrg"
921641b2f0bdSmrg
921711a29bacSmrg  # ltmain only uses $CC for tagged configurations so make sure $CC is set.
921811a29bacSmrg  _LT_TAG_COMPILER
921911245024Smrg
922011a29bacSmrg  # save warnings/boilerplate of simple test code
922111a29bacSmrg  _LT_COMPILER_BOILERPLATE
922211a29bacSmrg  _LT_LINKER_BOILERPLATE
922311a29bacSmrg
922411a29bacSmrg  # Allow CC to be a program name with arguments.
922511a29bacSmrg  lt_save_CC="$CC"
922611a29bacSmrg  lt_save_GCC=$GCC
922711a29bacSmrg  CC=${FC-"f95"}
922811a29bacSmrg  compiler=$CC
922911a29bacSmrg  GCC=$ac_cv_fc_compiler_gnu
923011a29bacSmrg
923111a29bacSmrg  _LT_TAGVAR(compiler, $1)=$CC
923211a29bacSmrg  _LT_CC_BASENAME([$compiler])
923311a29bacSmrg
923411a29bacSmrg  if test -n "$compiler"; then
923511a29bacSmrg    AC_MSG_CHECKING([if libtool supports shared libraries])
923611a29bacSmrg    AC_MSG_RESULT([$can_build_shared])
923711a29bacSmrg
923811a29bacSmrg    AC_MSG_CHECKING([whether to build shared libraries])
923911a29bacSmrg    test "$can_build_shared" = "no" && enable_shared=no
924011a29bacSmrg
924111a29bacSmrg    # On AIX, shared libraries and static libraries use the same namespace, and
924211a29bacSmrg    # are all built from PIC.
924311245024Smrg    case $host_os in
924411a29bacSmrg      aix3*)
924511a29bacSmrg        test "$enable_shared" = yes && enable_static=no
924611a29bacSmrg        if test -n "$RANLIB"; then
924711a29bacSmrg          archive_cmds="$archive_cmds~\$RANLIB \$lib"
924811a29bacSmrg          postinstall_cmds='$RANLIB $lib'
924911a29bacSmrg        fi
925011a29bacSmrg        ;;
925111245024Smrg      aix[[4-9]]*)
925211a29bacSmrg	if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
925311a29bacSmrg	  test "$enable_shared" = yes && enable_static=no
925411245024Smrg	fi
925511a29bacSmrg        ;;
925611245024Smrg    esac
925711a29bacSmrg    AC_MSG_RESULT([$enable_shared])
925811a29bacSmrg
925911a29bacSmrg    AC_MSG_CHECKING([whether to build static libraries])
926011a29bacSmrg    # Make sure either enable_shared or enable_static is yes.
926111a29bacSmrg    test "$enable_shared" = yes || enable_static=yes
926211a29bacSmrg    AC_MSG_RESULT([$enable_static])
926311a29bacSmrg
926411a29bacSmrg    _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
926511a29bacSmrg    _LT_TAGVAR(LD, $1)="$LD"
926611a29bacSmrg
926711a29bacSmrg    ## CAVEAT EMPTOR:
926811a29bacSmrg    ## There is no encapsulation within the following macros, do not change
926911a29bacSmrg    ## the running order or otherwise move them around unless you know exactly
927011a29bacSmrg    ## what you are doing...
927111a29bacSmrg    _LT_SYS_HIDDEN_LIBDEPS($1)
927211a29bacSmrg    _LT_COMPILER_PIC($1)
927311a29bacSmrg    _LT_COMPILER_C_O($1)
927411a29bacSmrg    _LT_COMPILER_FILE_LOCKS($1)
927511a29bacSmrg    _LT_LINKER_SHLIBS($1)
927611a29bacSmrg    _LT_SYS_DYNAMIC_LINKER($1)
927711a29bacSmrg    _LT_LINKER_HARDCODE_LIBPATH($1)
927811a29bacSmrg
927911a29bacSmrg    _LT_CONFIG($1)
928011a29bacSmrg  fi # test -n "$compiler"
928111a29bacSmrg
928211a29bacSmrg  GCC=$lt_save_GCC
928311a29bacSmrg  CC="$lt_save_CC"
928411a29bacSmrgfi # test "$_lt_disable_FC" != yes
928541b2f0bdSmrg
928611a29bacSmrgAC_LANG_POP
928711a29bacSmrg])# _LT_LANG_FC_CONFIG
928841b2f0bdSmrg
928941b2f0bdSmrg
929011a29bacSmrg# _LT_LANG_GCJ_CONFIG([TAG])
929111a29bacSmrg# --------------------------
929211a29bacSmrg# Ensure that the configuration variables for the GNU Java Compiler compiler
929311a29bacSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
929411a29bacSmrg# to write the compiler configuration to `libtool'.
929511a29bacSmrgm4_defun([_LT_LANG_GCJ_CONFIG],
929611a29bacSmrg[AC_REQUIRE([LT_PROG_GCJ])dnl
929711a29bacSmrgAC_LANG_SAVE
929841b2f0bdSmrg
929911a29bacSmrg# Source file extension for Java test sources.
930011a29bacSmrgac_ext=java
930141b2f0bdSmrg
930211a29bacSmrg# Object file extension for compiled Java test sources.
930311a29bacSmrgobjext=o
930411a29bacSmrg_LT_TAGVAR(objext, $1)=$objext
930541b2f0bdSmrg
930611a29bacSmrg# Code to be used in simple compile tests
930711a29bacSmrglt_simple_compile_test_code="class foo {}"
930841b2f0bdSmrg
930911a29bacSmrg# Code to be used in simple link tests
931011a29bacSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
931141b2f0bdSmrg
931211a29bacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
931311a29bacSmrg_LT_TAG_COMPILER
931441b2f0bdSmrg
931511a29bacSmrg# save warnings/boilerplate of simple test code
931611a29bacSmrg_LT_COMPILER_BOILERPLATE
931711a29bacSmrg_LT_LINKER_BOILERPLATE
931841b2f0bdSmrg
931911a29bacSmrg# Allow CC to be a program name with arguments.
932011a29bacSmrglt_save_CC="$CC"
932111a29bacSmrglt_save_GCC=$GCC
932211a29bacSmrgGCC=yes
932311a29bacSmrgCC=${GCJ-"gcj"}
932411a29bacSmrgcompiler=$CC
932511a29bacSmrg_LT_TAGVAR(compiler, $1)=$CC
932611a29bacSmrg_LT_TAGVAR(LD, $1)="$LD"
932711a29bacSmrg_LT_CC_BASENAME([$compiler])
932811a29bacSmrg
932911a29bacSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
933011a29bacSmrg_LT_TAGVAR(archive_cmds_need_lc, $1)=no
933111a29bacSmrg
933211a29bacSmrg_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
933311a29bacSmrg_LT_TAGVAR(reload_flag, $1)=$reload_flag
933411a29bacSmrg_LT_TAGVAR(reload_cmds, $1)=$reload_cmds
933511a29bacSmrg
933611a29bacSmrgif test -n "$compiler"; then
933711a29bacSmrg  _LT_COMPILER_NO_RTTI($1)
933811a29bacSmrg  _LT_COMPILER_PIC($1)
933911a29bacSmrg  _LT_COMPILER_C_O($1)
934011a29bacSmrg  _LT_COMPILER_FILE_LOCKS($1)
934111a29bacSmrg  _LT_LINKER_SHLIBS($1)
934211a29bacSmrg  _LT_LINKER_HARDCODE_LIBPATH($1)
934311a29bacSmrg
934411a29bacSmrg  _LT_CONFIG($1)
934511a29bacSmrgfi
934611a29bacSmrg
934711a29bacSmrgAC_LANG_RESTORE
934811a29bacSmrg
934911a29bacSmrgGCC=$lt_save_GCC
935011a29bacSmrgCC="$lt_save_CC"
935111a29bacSmrg])# _LT_LANG_GCJ_CONFIG
935241b2f0bdSmrg
935341b2f0bdSmrg
935411a29bacSmrg# _LT_LANG_RC_CONFIG([TAG])
935511a29bacSmrg# -------------------------
935611a29bacSmrg# Ensure that the configuration variables for the Windows resource compiler
935711a29bacSmrg# are suitably defined.  These variables are subsequently used by _LT_CONFIG
935811a29bacSmrg# to write the compiler configuration to `libtool'.
935911a29bacSmrgm4_defun([_LT_LANG_RC_CONFIG],
936011a29bacSmrg[AC_REQUIRE([LT_PROG_RC])dnl
936111a29bacSmrgAC_LANG_SAVE
936241b2f0bdSmrg
936311a29bacSmrg# Source file extension for RC test sources.
936411a29bacSmrgac_ext=rc
936541b2f0bdSmrg
936611a29bacSmrg# Object file extension for compiled RC test sources.
936711a29bacSmrgobjext=o
936811a29bacSmrg_LT_TAGVAR(objext, $1)=$objext
936941b2f0bdSmrg
937011a29bacSmrg# Code to be used in simple compile tests
937111a29bacSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
937241b2f0bdSmrg
937311a29bacSmrg# Code to be used in simple link tests
937411a29bacSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
937541b2f0bdSmrg
937611a29bacSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
937711a29bacSmrg_LT_TAG_COMPILER
937841b2f0bdSmrg
937911a29bacSmrg# save warnings/boilerplate of simple test code
938011a29bacSmrg_LT_COMPILER_BOILERPLATE
938111a29bacSmrg_LT_LINKER_BOILERPLATE
938211245024Smrg
938311a29bacSmrg# Allow CC to be a program name with arguments.
938411a29bacSmrglt_save_CC="$CC"
938511a29bacSmrglt_save_GCC=$GCC
938611a29bacSmrgGCC=
938711a29bacSmrgCC=${RC-"windres"}
938811a29bacSmrgcompiler=$CC
938911a29bacSmrg_LT_TAGVAR(compiler, $1)=$CC
939011a29bacSmrg_LT_CC_BASENAME([$compiler])
939111a29bacSmrg_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
939211245024Smrg
939311a29bacSmrgif test -n "$compiler"; then
939411a29bacSmrg  :
939511a29bacSmrg  _LT_CONFIG($1)
939611a29bacSmrgfi
939741b2f0bdSmrg
939811a29bacSmrgGCC=$lt_save_GCC
939911a29bacSmrgAC_LANG_RESTORE
940011a29bacSmrgCC="$lt_save_CC"
940111a29bacSmrg])# _LT_LANG_RC_CONFIG
940241b2f0bdSmrg
940341b2f0bdSmrg
940411a29bacSmrg# LT_PROG_GCJ
940511a29bacSmrg# -----------
940611a29bacSmrgAC_DEFUN([LT_PROG_GCJ],
940711a29bacSmrg[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
940811a29bacSmrg  [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
940911a29bacSmrg    [AC_CHECK_TOOL(GCJ, gcj,)
941011a29bacSmrg      test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
941111a29bacSmrg      AC_SUBST(GCJFLAGS)])])[]dnl
941211a29bacSmrg])
941341b2f0bdSmrg
941411a29bacSmrg# Old name:
941511a29bacSmrgAU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
941611a29bacSmrgdnl aclocal-1.4 backwards compatibility:
941711a29bacSmrgdnl AC_DEFUN([LT_AC_PROG_GCJ], [])
941841b2f0bdSmrg
941911a29bacSmrg
942011a29bacSmrg# LT_PROG_RC
942111a29bacSmrg# ----------
942211a29bacSmrgAC_DEFUN([LT_PROG_RC],
942311a29bacSmrg[AC_CHECK_TOOL(RC, windres,)
942411245024Smrg])
942541b2f0bdSmrg
942611a29bacSmrg# Old name:
942711a29bacSmrgAU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
942811a29bacSmrgdnl aclocal-1.4 backwards compatibility:
942911a29bacSmrgdnl AC_DEFUN([LT_AC_PROG_RC], [])
943041b2f0bdSmrg
943111a29bacSmrg
943211a29bacSmrg# _LT_DECL_EGREP
943311a29bacSmrg# --------------
943411a29bacSmrg# If we don't have a new enough Autoconf to choose the best grep
943511a29bacSmrg# available, choose the one first in the user's PATH.
943611a29bacSmrgm4_defun([_LT_DECL_EGREP],
943711a29bacSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
943811a29bacSmrgAC_REQUIRE([AC_PROG_FGREP])dnl
943911a29bacSmrgtest -z "$GREP" && GREP=grep
944011a29bacSmrg_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
944111a29bacSmrg_LT_DECL([], [EGREP], [1], [An ERE matcher])
944211a29bacSmrg_LT_DECL([], [FGREP], [1], [A literal string matcher])
944311a29bacSmrgdnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
944411a29bacSmrgAC_SUBST([GREP])
944511245024Smrg])
944641b2f0bdSmrg
944741b2f0bdSmrg
944811a29bacSmrg# _LT_DECL_OBJDUMP
944911a29bacSmrg# --------------
945011a29bacSmrg# If we don't have a new enough Autoconf to choose the best objdump
945111a29bacSmrg# available, choose the one first in the user's PATH.
945211a29bacSmrgm4_defun([_LT_DECL_OBJDUMP],
945311a29bacSmrg[AC_CHECK_TOOL(OBJDUMP, objdump, false)
945411a29bacSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
945511a29bacSmrg_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
945611a29bacSmrgAC_SUBST([OBJDUMP])
945711a29bacSmrg])
945811a29bacSmrg
945911a29bacSmrg
946011a29bacSmrg# _LT_DECL_SED
946111a29bacSmrg# ------------
946211a29bacSmrg# Check for a fully-functional sed program, that truncates
946311a29bacSmrg# as few characters as possible.  Prefer GNU sed if found.
946411a29bacSmrgm4_defun([_LT_DECL_SED],
946511a29bacSmrg[AC_PROG_SED
946611a29bacSmrgtest -z "$SED" && SED=sed
946711a29bacSmrgXsed="$SED -e 1s/^X//"
946811a29bacSmrg_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
946911a29bacSmrg_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
947011a29bacSmrg    [Sed that helps us avoid accidentally triggering echo(1) options like -n])
947111a29bacSmrg])# _LT_DECL_SED
947211a29bacSmrg
947311a29bacSmrgm4_ifndef([AC_PROG_SED], [
947411a29bacSmrg# NOTE: This macro has been submitted for inclusion into   #
947511a29bacSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
947611a29bacSmrg#  a released version of Autoconf we should remove this    #
947711a29bacSmrg#  macro and use it instead.                               #
947811a29bacSmrg
947911a29bacSmrgm4_defun([AC_PROG_SED],
948011a29bacSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
948111a29bacSmrgAC_CACHE_VAL(lt_cv_path_SED,
948211a29bacSmrg[# Loop through the user's path and test for sed and gsed.
948311a29bacSmrg# Then use that list of sed's as ones to test for truncation.
948411a29bacSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
948511a29bacSmrgfor as_dir in $PATH
948611a29bacSmrgdo
948711a29bacSmrg  IFS=$as_save_IFS
948811a29bacSmrg  test -z "$as_dir" && as_dir=.
948911a29bacSmrg  for lt_ac_prog in sed gsed; do
949011a29bacSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
949111a29bacSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
949211a29bacSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
949311a29bacSmrg      fi
949411a29bacSmrg    done
949511a29bacSmrg  done
949611a29bacSmrgdone
949711a29bacSmrgIFS=$as_save_IFS
949811a29bacSmrglt_ac_max=0
949911a29bacSmrglt_ac_count=0
950011a29bacSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
950111a29bacSmrg# along with /bin/sed that truncates output.
950211a29bacSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
950311a29bacSmrg  test ! -f $lt_ac_sed && continue
950411a29bacSmrg  cat /dev/null > conftest.in
950511a29bacSmrg  lt_ac_count=0
950611a29bacSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
950711a29bacSmrg  # Check for GNU sed and select it if it is found.
950811a29bacSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
950911a29bacSmrg    lt_cv_path_SED=$lt_ac_sed
951011a29bacSmrg    break
951111a29bacSmrg  fi
951211a29bacSmrg  while true; do
951311a29bacSmrg    cat conftest.in conftest.in >conftest.tmp
951411a29bacSmrg    mv conftest.tmp conftest.in
951511a29bacSmrg    cp conftest.in conftest.nl
951611a29bacSmrg    echo >>conftest.nl
951711a29bacSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
951811a29bacSmrg    cmp -s conftest.out conftest.nl || break
951911a29bacSmrg    # 10000 chars as input seems more than enough
952011a29bacSmrg    test $lt_ac_count -gt 10 && break
952111a29bacSmrg    lt_ac_count=`expr $lt_ac_count + 1`
952211a29bacSmrg    if test $lt_ac_count -gt $lt_ac_max; then
952311a29bacSmrg      lt_ac_max=$lt_ac_count
952411a29bacSmrg      lt_cv_path_SED=$lt_ac_sed
952511245024Smrg    fi
952611a29bacSmrg  done
952711a29bacSmrgdone
952811a29bacSmrg])
952911a29bacSmrgSED=$lt_cv_path_SED
953011a29bacSmrgAC_SUBST([SED])
953111a29bacSmrgAC_MSG_RESULT([$SED])
953211a29bacSmrg])#AC_PROG_SED
953311a29bacSmrg])#m4_ifndef
953411a29bacSmrg
953511a29bacSmrg# Old name:
953611a29bacSmrgAU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
953711a29bacSmrgdnl aclocal-1.4 backwards compatibility:
953811a29bacSmrgdnl AC_DEFUN([LT_AC_PROG_SED], [])
953911a29bacSmrg
954011a29bacSmrg
954111a29bacSmrg# _LT_CHECK_SHELL_FEATURES
954211a29bacSmrg# ------------------------
954311a29bacSmrg# Find out whether the shell is Bourne or XSI compatible,
954411a29bacSmrg# or has some other useful features.
954511a29bacSmrgm4_defun([_LT_CHECK_SHELL_FEATURES],
954611a29bacSmrg[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
954711a29bacSmrg# Try some XSI features
954811a29bacSmrgxsi_shell=no
954911a29bacSmrg( _lt_dummy="a/b/c"
955011a29bacSmrg  test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
955111a29bacSmrg      = c,a/b,, \
955211a29bacSmrg    && eval 'test $(( 1 + 1 )) -eq 2 \
955311a29bacSmrg    && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
955411a29bacSmrg  && xsi_shell=yes
955511a29bacSmrgAC_MSG_RESULT([$xsi_shell])
955611a29bacSmrg_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
955711a29bacSmrg
955811a29bacSmrgAC_MSG_CHECKING([whether the shell understands "+="])
955911a29bacSmrglt_shell_append=no
956011a29bacSmrg( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
956111a29bacSmrg    >/dev/null 2>&1 \
956211a29bacSmrg  && lt_shell_append=yes
956311a29bacSmrgAC_MSG_RESULT([$lt_shell_append])
956411a29bacSmrg_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
956511a29bacSmrg
956611a29bacSmrgif ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
956711a29bacSmrg  lt_unset=unset
956811a29bacSmrgelse
956911a29bacSmrg  lt_unset=false
957011a29bacSmrgfi
957111a29bacSmrg_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
957211a29bacSmrg
957311a29bacSmrg# test EBCDIC or ASCII
957411a29bacSmrgcase `echo X|tr X '\101'` in
957511a29bacSmrg A) # ASCII based system
957611a29bacSmrg    # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
957711a29bacSmrg  lt_SP2NL='tr \040 \012'
957811a29bacSmrg  lt_NL2SP='tr \015\012 \040\040'
957911245024Smrg  ;;
958011a29bacSmrg *) # EBCDIC based system
958111a29bacSmrg  lt_SP2NL='tr \100 \n'
958211a29bacSmrg  lt_NL2SP='tr \r\n \100\100'
958311245024Smrg  ;;
958411a29bacSmrgesac
958511a29bacSmrg_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
958611a29bacSmrg_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
958711a29bacSmrg])# _LT_CHECK_SHELL_FEATURES
958811a29bacSmrg
958911a29bacSmrg
959011a29bacSmrg# _LT_PROG_XSI_SHELLFNS
959111a29bacSmrg# ---------------------
959211a29bacSmrg# Bourne and XSI compatible variants of some useful shell functions.
959311a29bacSmrgm4_defun([_LT_PROG_XSI_SHELLFNS],
959411a29bacSmrg[case $xsi_shell in
959511a29bacSmrg  yes)
959611a29bacSmrg    cat << \_LT_EOF >> "$cfgfile"
959711a29bacSmrg
959811a29bacSmrg# func_dirname file append nondir_replacement
959911a29bacSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
960011a29bacSmrg# otherwise set result to NONDIR_REPLACEMENT.
960111a29bacSmrgfunc_dirname ()
960211a29bacSmrg{
960311a29bacSmrg  case ${1} in
960411a29bacSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
960511a29bacSmrg    *  ) func_dirname_result="${3}" ;;
960611245024Smrg  esac
960711a29bacSmrg}
960811a29bacSmrg
960911a29bacSmrg# func_basename file
961011a29bacSmrgfunc_basename ()
961111a29bacSmrg{
961211a29bacSmrg  func_basename_result="${1##*/}"
961311a29bacSmrg}
961411a29bacSmrg
961511a29bacSmrg# func_dirname_and_basename file append nondir_replacement
961611a29bacSmrg# perform func_basename and func_dirname in a single function
961711a29bacSmrg# call:
961811a29bacSmrg#   dirname:  Compute the dirname of FILE.  If nonempty,
961911a29bacSmrg#             add APPEND to the result, otherwise set result
962011a29bacSmrg#             to NONDIR_REPLACEMENT.
962111a29bacSmrg#             value returned in "$func_dirname_result"
962211a29bacSmrg#   basename: Compute filename of FILE.
962311a29bacSmrg#             value retuned in "$func_basename_result"
962411a29bacSmrg# Implementation must be kept synchronized with func_dirname
962511a29bacSmrg# and func_basename. For efficiency, we do not delegate to
962611a29bacSmrg# those functions but instead duplicate the functionality here.
962711a29bacSmrgfunc_dirname_and_basename ()
962811a29bacSmrg{
962911a29bacSmrg  case ${1} in
963011a29bacSmrg    */*) func_dirname_result="${1%/*}${2}" ;;
963111a29bacSmrg    *  ) func_dirname_result="${3}" ;;
963211245024Smrg  esac
963311a29bacSmrg  func_basename_result="${1##*/}"
963411a29bacSmrg}
963541b2f0bdSmrg
963611a29bacSmrg# func_stripname prefix suffix name
963711a29bacSmrg# strip PREFIX and SUFFIX off of NAME.
963811a29bacSmrg# PREFIX and SUFFIX must not contain globbing or regex special
963911a29bacSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
964011a29bacSmrg# dot (in which case that matches only a dot).
964111a29bacSmrgfunc_stripname ()
964211a29bacSmrg{
964311a29bacSmrg  # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
964411a29bacSmrg  # positional parameters, so assign one to ordinary parameter first.
964511a29bacSmrg  func_stripname_result=${3}
964611a29bacSmrg  func_stripname_result=${func_stripname_result#"${1}"}
964711a29bacSmrg  func_stripname_result=${func_stripname_result%"${2}"}
964811a29bacSmrg}
964911a29bacSmrg
965011a29bacSmrg# func_opt_split
965111a29bacSmrgfunc_opt_split ()
965211a29bacSmrg{
965311a29bacSmrg  func_opt_split_opt=${1%%=*}
965411a29bacSmrg  func_opt_split_arg=${1#*=}
965511a29bacSmrg}
965611a29bacSmrg
965711a29bacSmrg# func_lo2o object
965811a29bacSmrgfunc_lo2o ()
965911a29bacSmrg{
966011a29bacSmrg  case ${1} in
966111a29bacSmrg    *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
966211a29bacSmrg    *)    func_lo2o_result=${1} ;;
966311a29bacSmrg  esac
966411a29bacSmrg}
966541b2f0bdSmrg
966611a29bacSmrg# func_xform libobj-or-source
966711a29bacSmrgfunc_xform ()
966811a29bacSmrg{
966911a29bacSmrg  func_xform_result=${1%.*}.lo
967011a29bacSmrg}
967141b2f0bdSmrg
967211a29bacSmrg# func_arith arithmetic-term...
967311a29bacSmrgfunc_arith ()
967411a29bacSmrg{
967511a29bacSmrg  func_arith_result=$(( $[*] ))
967611a29bacSmrg}
967741b2f0bdSmrg
967811a29bacSmrg# func_len string
967911a29bacSmrg# STRING may not start with a hyphen.
968011a29bacSmrgfunc_len ()
968111a29bacSmrg{
968211a29bacSmrg  func_len_result=${#1}
968311a29bacSmrg}
968441b2f0bdSmrg
968511a29bacSmrg_LT_EOF
968611a29bacSmrg    ;;
968711a29bacSmrg  *) # Bourne compatible functions.
968811a29bacSmrg    cat << \_LT_EOF >> "$cfgfile"
968941b2f0bdSmrg
969011a29bacSmrg# func_dirname file append nondir_replacement
969111a29bacSmrg# Compute the dirname of FILE.  If nonempty, add APPEND to the result,
969211a29bacSmrg# otherwise set result to NONDIR_REPLACEMENT.
969311a29bacSmrgfunc_dirname ()
969411a29bacSmrg{
969511a29bacSmrg  # Extract subdirectory from the argument.
969611a29bacSmrg  func_dirname_result=`$ECHO "${1}" | $SED "$dirname"`
969711a29bacSmrg  if test "X$func_dirname_result" = "X${1}"; then
969811a29bacSmrg    func_dirname_result="${3}"
969911a29bacSmrg  else
970011a29bacSmrg    func_dirname_result="$func_dirname_result${2}"
970111a29bacSmrg  fi
970211a29bacSmrg}
970341b2f0bdSmrg
970411a29bacSmrg# func_basename file
970511a29bacSmrgfunc_basename ()
970611a29bacSmrg{
970711a29bacSmrg  func_basename_result=`$ECHO "${1}" | $SED "$basename"`
970811a29bacSmrg}
970941b2f0bdSmrg
971011a29bacSmrgdnl func_dirname_and_basename
971111a29bacSmrgdnl A portable version of this function is already defined in general.m4sh
971211a29bacSmrgdnl so there is no need for it here.
971311a29bacSmrg
971411a29bacSmrg# func_stripname prefix suffix name
971511a29bacSmrg# strip PREFIX and SUFFIX off of NAME.
971611a29bacSmrg# PREFIX and SUFFIX must not contain globbing or regex special
971711a29bacSmrg# characters, hashes, percent signs, but SUFFIX may contain a leading
971811a29bacSmrg# dot (in which case that matches only a dot).
971911a29bacSmrg# func_strip_suffix prefix name
972011a29bacSmrgfunc_stripname ()
972111a29bacSmrg{
972211a29bacSmrg  case ${2} in
972311a29bacSmrg    .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;;
972411a29bacSmrg    *)  func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;;
972511a29bacSmrg  esac
972611a29bacSmrg}
972741b2f0bdSmrg
972811a29bacSmrg# sed scripts:
972911a29bacSmrgmy_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
973011a29bacSmrgmy_sed_long_arg='1s/^-[[^=]]*=//'
973141b2f0bdSmrg
973211a29bacSmrg# func_opt_split
973311a29bacSmrgfunc_opt_split ()
973411a29bacSmrg{
973511a29bacSmrg  func_opt_split_opt=`$ECHO "${1}" | $SED "$my_sed_long_opt"`
973611a29bacSmrg  func_opt_split_arg=`$ECHO "${1}" | $SED "$my_sed_long_arg"`
973711a29bacSmrg}
973841b2f0bdSmrg
973911a29bacSmrg# func_lo2o object
974011a29bacSmrgfunc_lo2o ()
974111a29bacSmrg{
974211a29bacSmrg  func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"`
974311a29bacSmrg}
974441b2f0bdSmrg
974511a29bacSmrg# func_xform libobj-or-source
974611a29bacSmrgfunc_xform ()
974711a29bacSmrg{
974811a29bacSmrg  func_xform_result=`$ECHO "${1}" | $SED 's/\.[[^.]]*$/.lo/'`
974911a29bacSmrg}
975041b2f0bdSmrg
975111a29bacSmrg# func_arith arithmetic-term...
975211a29bacSmrgfunc_arith ()
975311a29bacSmrg{
975411a29bacSmrg  func_arith_result=`expr "$[@]"`
975511a29bacSmrg}
975641b2f0bdSmrg
975711a29bacSmrg# func_len string
975811a29bacSmrg# STRING may not start with a hyphen.
975911a29bacSmrgfunc_len ()
976011a29bacSmrg{
976111a29bacSmrg  func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
976211a29bacSmrg}
976341b2f0bdSmrg
976411a29bacSmrg_LT_EOF
976511a29bacSmrgesac
976641b2f0bdSmrg
976711a29bacSmrgcase $lt_shell_append in
976811a29bacSmrg  yes)
976911a29bacSmrg    cat << \_LT_EOF >> "$cfgfile"
977041b2f0bdSmrg
977111a29bacSmrg# func_append var value
977211a29bacSmrg# Append VALUE to the end of shell variable VAR.
977311a29bacSmrgfunc_append ()
977411a29bacSmrg{
977511a29bacSmrg  eval "$[1]+=\$[2]"
977611a29bacSmrg}
977711a29bacSmrg_LT_EOF
977811a29bacSmrg    ;;
977911a29bacSmrg  *)
978011a29bacSmrg    cat << \_LT_EOF >> "$cfgfile"
978111a29bacSmrg
978211a29bacSmrg# func_append var value
978311a29bacSmrg# Append VALUE to the end of shell variable VAR.
978411a29bacSmrgfunc_append ()
978511a29bacSmrg{
978611a29bacSmrg  eval "$[1]=\$$[1]\$[2]"
978711a29bacSmrg}
978841b2f0bdSmrg
978911245024Smrg_LT_EOF
979011a29bacSmrg    ;;
979111a29bacSmrg  esac
979211a29bacSmrg])
979311245024Smrg
979411a29bacSmrg# Helper functions for option handling.                    -*- Autoconf -*-
979511a29bacSmrg#
979611a29bacSmrg#   Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation,
979711a29bacSmrg#   Inc.
979811a29bacSmrg#   Written by Gary V. Vaughan, 2004
979911a29bacSmrg#
980011a29bacSmrg# This file is free software; the Free Software Foundation gives
980111a29bacSmrg# unlimited permission to copy and/or distribute it, with or without
980211a29bacSmrg# modifications, as long as this notice is preserved.
980311245024Smrg
980411a29bacSmrg# serial 7 ltoptions.m4
980541b2f0bdSmrg
980611a29bacSmrg# This is to help aclocal find these macros, as it can't see m4_define.
980711a29bacSmrgAC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
980841b2f0bdSmrg
980941b2f0bdSmrg
981011a29bacSmrg# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
981111a29bacSmrg# ------------------------------------------
981211a29bacSmrgm4_define([_LT_MANGLE_OPTION],
981311a29bacSmrg[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
981441b2f0bdSmrg
981541b2f0bdSmrg
981611a29bacSmrg# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
981711a29bacSmrg# ---------------------------------------
981811a29bacSmrg# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
981911a29bacSmrg# matching handler defined, dispatch to it.  Other OPTION-NAMEs are
982011a29bacSmrg# saved as a flag.
982111a29bacSmrgm4_define([_LT_SET_OPTION],
982211a29bacSmrg[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
982311a29bacSmrgm4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
982411a29bacSmrg        _LT_MANGLE_DEFUN([$1], [$2]),
982511a29bacSmrg    [m4_warning([Unknown $1 option `$2'])])[]dnl
982611a29bacSmrg])
982741b2f0bdSmrg
982841b2f0bdSmrg
982911a29bacSmrg# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
983011a29bacSmrg# ------------------------------------------------------------
983111a29bacSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
983211a29bacSmrgm4_define([_LT_IF_OPTION],
983311a29bacSmrg[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
983411a29bacSmrg
983511a29bacSmrg
983611a29bacSmrg# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
983711a29bacSmrg# -------------------------------------------------------
983811a29bacSmrg# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
983911a29bacSmrg# are set.
984011a29bacSmrgm4_define([_LT_UNLESS_OPTIONS],
984111a29bacSmrg[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
984211a29bacSmrg	    [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
984311a29bacSmrg		      [m4_define([$0_found])])])[]dnl
984411a29bacSmrgm4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
984511a29bacSmrg])[]dnl
984611a29bacSmrg])
984741b2f0bdSmrg
984841b2f0bdSmrg
984911a29bacSmrg# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
985011a29bacSmrg# ----------------------------------------
985111a29bacSmrg# OPTION-LIST is a space-separated list of Libtool options associated
985211a29bacSmrg# with MACRO-NAME.  If any OPTION has a matching handler declared with
985311a29bacSmrg# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
985411a29bacSmrg# the unknown option and exit.
985511a29bacSmrgm4_defun([_LT_SET_OPTIONS],
985611a29bacSmrg[# Set options
985711a29bacSmrgm4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
985811a29bacSmrg    [_LT_SET_OPTION([$1], _LT_Option)])
985911a29bacSmrg
986011a29bacSmrgm4_if([$1],[LT_INIT],[
986111a29bacSmrg  dnl
986211a29bacSmrg  dnl Simply set some default values (i.e off) if boolean options were not
986311a29bacSmrg  dnl specified:
986411a29bacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
986511a29bacSmrg  ])
986611a29bacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
986711a29bacSmrg  ])
986811a29bacSmrg  dnl
986911a29bacSmrg  dnl If no reference was made to various pairs of opposing options, then
987011a29bacSmrg  dnl we run the default mode handler for the pair.  For example, if neither
987111a29bacSmrg  dnl `shared' nor `disable-shared' was passed, we enable building of shared
987211a29bacSmrg  dnl archives by default:
987311a29bacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
987411a29bacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
987511a29bacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
987611a29bacSmrg  _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
987711a29bacSmrg  		   [_LT_ENABLE_FAST_INSTALL])
987811a29bacSmrg  ])
987911a29bacSmrg])# _LT_SET_OPTIONS
988011a29bacSmrg
988111a29bacSmrg
988211a29bacSmrg
988311a29bacSmrg# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
988411a29bacSmrg# -----------------------------------------
988511a29bacSmrgm4_define([_LT_MANGLE_DEFUN],
988611a29bacSmrg[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
988741b2f0bdSmrg
988841b2f0bdSmrg
988911a29bacSmrg# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
989011a29bacSmrg# -----------------------------------------------
989111a29bacSmrgm4_define([LT_OPTION_DEFINE],
989211a29bacSmrg[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
989311a29bacSmrg])# LT_OPTION_DEFINE
989441b2f0bdSmrg
989541b2f0bdSmrg
989611a29bacSmrg# dlopen
989711a29bacSmrg# ------
989811a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
989911a29bacSmrg])
990041b2f0bdSmrg
990111a29bacSmrgAU_DEFUN([AC_LIBTOOL_DLOPEN],
990211a29bacSmrg[_LT_SET_OPTION([LT_INIT], [dlopen])
990311a29bacSmrgAC_DIAGNOSE([obsolete],
990411a29bacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
990511a29bacSmrgput the `dlopen' option into LT_INIT's first parameter.])
990611a29bacSmrg])
990741b2f0bdSmrg
990811a29bacSmrgdnl aclocal-1.4 backwards compatibility:
990911a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
991041b2f0bdSmrg
991141b2f0bdSmrg
991211a29bacSmrg# win32-dll
991311a29bacSmrg# ---------
991411a29bacSmrg# Declare package support for building win32 dll's.
991511a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [win32-dll],
991611a29bacSmrg[enable_win32_dll=yes
991741b2f0bdSmrg
991811a29bacSmrgcase $host in
991911a29bacSmrg*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*)
992011a29bacSmrg  AC_CHECK_TOOL(AS, as, false)
992111a29bacSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
992211a29bacSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
992311a29bacSmrg  ;;
992411a29bacSmrgesac
992541b2f0bdSmrg
992611a29bacSmrgtest -z "$AS" && AS=as
992711a29bacSmrg_LT_DECL([], [AS],      [1], [Assembler program])dnl
992841b2f0bdSmrg
992911a29bacSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
993011a29bacSmrg_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl
993141b2f0bdSmrg
993211a29bacSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
993311a29bacSmrg_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl
993411a29bacSmrg])# win32-dll
993541b2f0bdSmrg
993611a29bacSmrgAU_DEFUN([AC_LIBTOOL_WIN32_DLL],
993711a29bacSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
993811a29bacSmrg_LT_SET_OPTION([LT_INIT], [win32-dll])
993911a29bacSmrgAC_DIAGNOSE([obsolete],
994011a29bacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
994111a29bacSmrgput the `win32-dll' option into LT_INIT's first parameter.])
994211a29bacSmrg])
994341b2f0bdSmrg
994411a29bacSmrgdnl aclocal-1.4 backwards compatibility:
994511a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
994641b2f0bdSmrg
994741b2f0bdSmrg
994811a29bacSmrg# _LT_ENABLE_SHARED([DEFAULT])
994911a29bacSmrg# ----------------------------
995011a29bacSmrg# implement the --enable-shared flag, and supports the `shared' and
995111a29bacSmrg# `disable-shared' LT_INIT options.
995211a29bacSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
995311a29bacSmrgm4_define([_LT_ENABLE_SHARED],
995411a29bacSmrg[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
995511a29bacSmrgAC_ARG_ENABLE([shared],
995611a29bacSmrg    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
995711a29bacSmrg	[build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
995811a29bacSmrg    [p=${PACKAGE-default}
995911a29bacSmrg    case $enableval in
996011a29bacSmrg    yes) enable_shared=yes ;;
996111a29bacSmrg    no) enable_shared=no ;;
996211a29bacSmrg    *)
996311a29bacSmrg      enable_shared=no
996411a29bacSmrg      # Look at the argument we got.  We use all the common list separators.
996511a29bacSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
996611a29bacSmrg      for pkg in $enableval; do
996711a29bacSmrg	IFS="$lt_save_ifs"
996811a29bacSmrg	if test "X$pkg" = "X$p"; then
996911a29bacSmrg	  enable_shared=yes
997011a29bacSmrg	fi
997111a29bacSmrg      done
997211a29bacSmrg      IFS="$lt_save_ifs"
997311245024Smrg      ;;
997411a29bacSmrg    esac],
997511a29bacSmrg    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
997641b2f0bdSmrg
997711a29bacSmrg    _LT_DECL([build_libtool_libs], [enable_shared], [0],
997811a29bacSmrg	[Whether or not to build shared libraries])
997911a29bacSmrg])# _LT_ENABLE_SHARED
998041b2f0bdSmrg
998111a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
998211a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
998341b2f0bdSmrg
998411a29bacSmrg# Old names:
998511a29bacSmrgAC_DEFUN([AC_ENABLE_SHARED],
998611a29bacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
998711a29bacSmrg])
998841b2f0bdSmrg
998911a29bacSmrgAC_DEFUN([AC_DISABLE_SHARED],
999011a29bacSmrg[_LT_SET_OPTION([LT_INIT], [disable-shared])
999111a29bacSmrg])
999241b2f0bdSmrg
999311a29bacSmrgAU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
999411a29bacSmrgAU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
999541b2f0bdSmrg
999611a29bacSmrgdnl aclocal-1.4 backwards compatibility:
999711a29bacSmrgdnl AC_DEFUN([AM_ENABLE_SHARED], [])
999811a29bacSmrgdnl AC_DEFUN([AM_DISABLE_SHARED], [])
999941b2f0bdSmrg
1000041b2f0bdSmrg
1000141b2f0bdSmrg
1000211a29bacSmrg# _LT_ENABLE_STATIC([DEFAULT])
1000311a29bacSmrg# ----------------------------
1000411a29bacSmrg# implement the --enable-static flag, and support the `static' and
1000511a29bacSmrg# `disable-static' LT_INIT options.
1000611a29bacSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1000711a29bacSmrgm4_define([_LT_ENABLE_STATIC],
1000811a29bacSmrg[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
1000911a29bacSmrgAC_ARG_ENABLE([static],
1001011a29bacSmrg    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1001111a29bacSmrg	[build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
1001211a29bacSmrg    [p=${PACKAGE-default}
1001311a29bacSmrg    case $enableval in
1001411a29bacSmrg    yes) enable_static=yes ;;
1001511a29bacSmrg    no) enable_static=no ;;
1001611a29bacSmrg    *)
1001711a29bacSmrg     enable_static=no
1001811a29bacSmrg      # Look at the argument we got.  We use all the common list separators.
1001911a29bacSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1002011a29bacSmrg      for pkg in $enableval; do
1002111a29bacSmrg	IFS="$lt_save_ifs"
1002211a29bacSmrg	if test "X$pkg" = "X$p"; then
1002311a29bacSmrg	  enable_static=yes
1002411245024Smrg	fi
1002511a29bacSmrg      done
1002611a29bacSmrg      IFS="$lt_save_ifs"
1002741b2f0bdSmrg      ;;
1002811a29bacSmrg    esac],
1002911a29bacSmrg    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
1003041b2f0bdSmrg
1003111a29bacSmrg    _LT_DECL([build_old_libs], [enable_static], [0],
1003211a29bacSmrg	[Whether or not to build static libraries])
1003311a29bacSmrg])# _LT_ENABLE_STATIC
1003441b2f0bdSmrg
1003511a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
1003611a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
1003741b2f0bdSmrg
1003811a29bacSmrg# Old names:
1003911a29bacSmrgAC_DEFUN([AC_ENABLE_STATIC],
1004011a29bacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
1004111a29bacSmrg])
1004241b2f0bdSmrg
1004311a29bacSmrgAC_DEFUN([AC_DISABLE_STATIC],
1004411a29bacSmrg[_LT_SET_OPTION([LT_INIT], [disable-static])
1004511a29bacSmrg])
1004641b2f0bdSmrg
1004711a29bacSmrgAU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
1004811a29bacSmrgAU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
1004941b2f0bdSmrg
1005011a29bacSmrgdnl aclocal-1.4 backwards compatibility:
1005111a29bacSmrgdnl AC_DEFUN([AM_ENABLE_STATIC], [])
1005211a29bacSmrgdnl AC_DEFUN([AM_DISABLE_STATIC], [])
1005341b2f0bdSmrg
1005441b2f0bdSmrg
1005541b2f0bdSmrg
1005611a29bacSmrg# _LT_ENABLE_FAST_INSTALL([DEFAULT])
1005711a29bacSmrg# ----------------------------------
1005811a29bacSmrg# implement the --enable-fast-install flag, and support the `fast-install'
1005911a29bacSmrg# and `disable-fast-install' LT_INIT options.
1006011a29bacSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1006111a29bacSmrgm4_define([_LT_ENABLE_FAST_INSTALL],
1006211a29bacSmrg[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
1006311a29bacSmrgAC_ARG_ENABLE([fast-install],
1006411a29bacSmrg    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1006511a29bacSmrg    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1006611a29bacSmrg    [p=${PACKAGE-default}
1006711a29bacSmrg    case $enableval in
1006811a29bacSmrg    yes) enable_fast_install=yes ;;
1006911a29bacSmrg    no) enable_fast_install=no ;;
1007011a29bacSmrg    *)
1007111a29bacSmrg      enable_fast_install=no
1007211a29bacSmrg      # Look at the argument we got.  We use all the common list separators.
1007311a29bacSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1007411a29bacSmrg      for pkg in $enableval; do
1007511a29bacSmrg	IFS="$lt_save_ifs"
1007611a29bacSmrg	if test "X$pkg" = "X$p"; then
1007711a29bacSmrg	  enable_fast_install=yes
1007811a29bacSmrg	fi
1007911a29bacSmrg      done
1008011a29bacSmrg      IFS="$lt_save_ifs"
1008111245024Smrg      ;;
1008211a29bacSmrg    esac],
1008311a29bacSmrg    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
1008441b2f0bdSmrg
1008511a29bacSmrg_LT_DECL([fast_install], [enable_fast_install], [0],
1008611a29bacSmrg	 [Whether or not to optimize for fast installation])dnl
1008711a29bacSmrg])# _LT_ENABLE_FAST_INSTALL
1008841b2f0bdSmrg
1008911a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
1009011a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
1009141b2f0bdSmrg
1009211a29bacSmrg# Old names:
1009311a29bacSmrgAU_DEFUN([AC_ENABLE_FAST_INSTALL],
1009411a29bacSmrg[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
1009511a29bacSmrgAC_DIAGNOSE([obsolete],
1009611a29bacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
1009711a29bacSmrgthe `fast-install' option into LT_INIT's first parameter.])
1009811a29bacSmrg])
1009941b2f0bdSmrg
1010011a29bacSmrgAU_DEFUN([AC_DISABLE_FAST_INSTALL],
1010111a29bacSmrg[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
1010211a29bacSmrgAC_DIAGNOSE([obsolete],
1010311a29bacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you put
1010411a29bacSmrgthe `disable-fast-install' option into LT_INIT's first parameter.])
1010511a29bacSmrg])
1010641b2f0bdSmrg
1010711a29bacSmrgdnl aclocal-1.4 backwards compatibility:
1010811a29bacSmrgdnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
1010911a29bacSmrgdnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
1011041b2f0bdSmrg
1011141b2f0bdSmrg
1011211a29bacSmrg# _LT_WITH_PIC([MODE])
1011311a29bacSmrg# --------------------
1011411a29bacSmrg# implement the --with-pic flag, and support the `pic-only' and `no-pic'
1011511a29bacSmrg# LT_INIT options.
1011611a29bacSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
1011711a29bacSmrgm4_define([_LT_WITH_PIC],
1011811a29bacSmrg[AC_ARG_WITH([pic],
1011911a29bacSmrg    [AS_HELP_STRING([--with-pic],
1012011a29bacSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
1012111a29bacSmrg    [pic_mode="$withval"],
1012211a29bacSmrg    [pic_mode=default])
1012341b2f0bdSmrg
1012411a29bacSmrgtest -z "$pic_mode" && pic_mode=m4_default([$1], [default])
1012541b2f0bdSmrg
1012611a29bacSmrg_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
1012711a29bacSmrg])# _LT_WITH_PIC
1012841b2f0bdSmrg
1012911a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
1013011a29bacSmrgLT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
1013141b2f0bdSmrg
1013211a29bacSmrg# Old name:
1013311a29bacSmrgAU_DEFUN([AC_LIBTOOL_PICMODE],
1013411a29bacSmrg[_LT_SET_OPTION([LT_INIT], [pic-only])
1013511a29bacSmrgAC_DIAGNOSE([obsolete],
1013611a29bacSmrg[$0: Remove this warning and the call to _LT_SET_OPTION when you
1013711a29bacSmrgput the `pic-only' option into LT_INIT's first parameter.])
1013811a29bacSmrg])
1013941b2f0bdSmrg
1014011a29bacSmrgdnl aclocal-1.4 backwards compatibility:
1014111a29bacSmrgdnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
1014241b2f0bdSmrg
1014341b2f0bdSmrg
1014411a29bacSmrgm4_define([_LTDL_MODE], [])
1014511a29bacSmrgLT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
1014611a29bacSmrg		 [m4_define([_LTDL_MODE], [nonrecursive])])
1014711a29bacSmrgLT_OPTION_DEFINE([LTDL_INIT], [recursive],
1014811a29bacSmrg		 [m4_define([_LTDL_MODE], [recursive])])
1014911a29bacSmrgLT_OPTION_DEFINE([LTDL_INIT], [subproject],
1015011a29bacSmrg		 [m4_define([_LTDL_MODE], [subproject])])
1015141b2f0bdSmrg
1015211a29bacSmrgm4_define([_LTDL_TYPE], [])
1015311a29bacSmrgLT_OPTION_DEFINE([LTDL_INIT], [installable],
1015411a29bacSmrg		 [m4_define([_LTDL_TYPE], [installable])])
1015511a29bacSmrgLT_OPTION_DEFINE([LTDL_INIT], [convenience],
1015611a29bacSmrg		 [m4_define([_LTDL_TYPE], [convenience])])
1015741b2f0bdSmrg
1015811a29bacSmrg# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
1015911245024Smrg#
1016011a29bacSmrg# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
1016111a29bacSmrg# Written by Gary V. Vaughan, 2004
1016211245024Smrg#
1016311a29bacSmrg# This file is free software; the Free Software Foundation gives
1016411a29bacSmrg# unlimited permission to copy and/or distribute it, with or without
1016511a29bacSmrg# modifications, as long as this notice is preserved.
1016641b2f0bdSmrg
1016711a29bacSmrg# serial 6 ltsugar.m4
1016841b2f0bdSmrg
1016911a29bacSmrg# This is to help aclocal find these macros, as it can't see m4_define.
1017011a29bacSmrgAC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
1017111a29bacSmrg
1017211a29bacSmrg
1017311a29bacSmrg# lt_join(SEP, ARG1, [ARG2...])
1017411a29bacSmrg# -----------------------------
1017511a29bacSmrg# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
1017611a29bacSmrg# associated separator.
1017711a29bacSmrg# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
1017811a29bacSmrg# versions in m4sugar had bugs.
1017911a29bacSmrgm4_define([lt_join],
1018011a29bacSmrg[m4_if([$#], [1], [],
1018111a29bacSmrg       [$#], [2], [[$2]],
1018211a29bacSmrg       [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
1018311a29bacSmrgm4_define([_lt_join],
1018411a29bacSmrg[m4_if([$#$2], [2], [],
1018511a29bacSmrg       [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
1018611a29bacSmrg
1018711a29bacSmrg
1018811a29bacSmrg# lt_car(LIST)
1018911a29bacSmrg# lt_cdr(LIST)
1019011a29bacSmrg# ------------
1019111a29bacSmrg# Manipulate m4 lists.
1019211a29bacSmrg# These macros are necessary as long as will still need to support
1019311a29bacSmrg# Autoconf-2.59 which quotes differently.
1019411a29bacSmrgm4_define([lt_car], [[$1]])
1019511a29bacSmrgm4_define([lt_cdr],
1019611a29bacSmrg[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
1019711a29bacSmrg       [$#], 1, [],
1019811a29bacSmrg       [m4_dquote(m4_shift($@))])])
1019911a29bacSmrgm4_define([lt_unquote], $1)
1020011a29bacSmrg
1020111a29bacSmrg
1020211a29bacSmrg# lt_append(MACRO-NAME, STRING, [SEPARATOR])
1020311a29bacSmrg# ------------------------------------------
1020411a29bacSmrg# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
1020511a29bacSmrg# Note that neither SEPARATOR nor STRING are expanded; they are appended
1020611a29bacSmrg# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
1020711a29bacSmrg# No SEPARATOR is output if MACRO-NAME was previously undefined (different
1020811a29bacSmrg# than defined and empty).
1020911245024Smrg#
1021011a29bacSmrg# This macro is needed until we can rely on Autoconf 2.62, since earlier
1021111a29bacSmrg# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
1021211a29bacSmrgm4_define([lt_append],
1021311a29bacSmrg[m4_define([$1],
1021411a29bacSmrg	   m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
1021511a29bacSmrg
1021611a29bacSmrg
1021711a29bacSmrg
1021811a29bacSmrg# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
1021911a29bacSmrg# ----------------------------------------------------------
1022011a29bacSmrg# Produce a SEP delimited list of all paired combinations of elements of
1022111a29bacSmrg# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
1022211a29bacSmrg# has the form PREFIXmINFIXSUFFIXn.
1022311a29bacSmrg# Needed until we can rely on m4_combine added in Autoconf 2.62.
1022411a29bacSmrgm4_define([lt_combine],
1022511a29bacSmrg[m4_if(m4_eval([$# > 3]), [1],
1022611a29bacSmrg       [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
1022711a29bacSmrg[[m4_foreach([_Lt_prefix], [$2],
1022811a29bacSmrg	     [m4_foreach([_Lt_suffix],
1022911a29bacSmrg		]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
1023011a29bacSmrg	[_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
1023111a29bacSmrg
1023211a29bacSmrg
1023311a29bacSmrg# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
1023411a29bacSmrg# -----------------------------------------------------------------------
1023511a29bacSmrg# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
1023611a29bacSmrg# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
1023711a29bacSmrgm4_define([lt_if_append_uniq],
1023811a29bacSmrg[m4_ifdef([$1],
1023911a29bacSmrg	  [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
1024011a29bacSmrg		 [lt_append([$1], [$2], [$3])$4],
1024111a29bacSmrg		 [$5])],
1024211a29bacSmrg	  [lt_append([$1], [$2], [$3])$4])])
1024311a29bacSmrg
1024411a29bacSmrg
1024511a29bacSmrg# lt_dict_add(DICT, KEY, VALUE)
1024611a29bacSmrg# -----------------------------
1024711a29bacSmrgm4_define([lt_dict_add],
1024811a29bacSmrg[m4_define([$1($2)], [$3])])
1024941b2f0bdSmrg
1025041b2f0bdSmrg
1025111a29bacSmrg# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
1025211a29bacSmrg# --------------------------------------------
1025311a29bacSmrgm4_define([lt_dict_add_subkey],
1025411a29bacSmrg[m4_define([$1($2:$3)], [$4])])
1025541b2f0bdSmrg
1025641b2f0bdSmrg
1025711a29bacSmrg# lt_dict_fetch(DICT, KEY, [SUBKEY])
1025811a29bacSmrg# ----------------------------------
1025911a29bacSmrgm4_define([lt_dict_fetch],
1026011a29bacSmrg[m4_ifval([$3],
1026111a29bacSmrg	m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
1026211a29bacSmrg    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
1026341b2f0bdSmrg
1026441b2f0bdSmrg
1026511a29bacSmrg# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
1026611a29bacSmrg# -----------------------------------------------------------------
1026711a29bacSmrgm4_define([lt_if_dict_fetch],
1026811a29bacSmrg[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
1026911a29bacSmrg	[$5],
1027011a29bacSmrg    [$6])])
1027141b2f0bdSmrg
1027241b2f0bdSmrg
1027311a29bacSmrg# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
1027411a29bacSmrg# --------------------------------------------------------------
1027511a29bacSmrgm4_define([lt_dict_filter],
1027611a29bacSmrg[m4_if([$5], [], [],
1027711a29bacSmrg  [lt_join(m4_quote(m4_default([$4], [[, ]])),
1027811a29bacSmrg           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
1027911a29bacSmrg		      [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
1028011a29bacSmrg])
1028141b2f0bdSmrg
1028211a29bacSmrg# ltversion.m4 -- version numbers			-*- Autoconf -*-
1028311a29bacSmrg#
1028411a29bacSmrg#   Copyright (C) 2004 Free Software Foundation, Inc.
1028511a29bacSmrg#   Written by Scott James Remnant, 2004
1028611a29bacSmrg#
1028711a29bacSmrg# This file is free software; the Free Software Foundation gives
1028811a29bacSmrg# unlimited permission to copy and/or distribute it, with or without
1028911a29bacSmrg# modifications, as long as this notice is preserved.
1029041b2f0bdSmrg
1029111a29bacSmrg# Generated from ltversion.in.
1029241b2f0bdSmrg
1029311a29bacSmrg# serial 3175 ltversion.m4
1029411a29bacSmrg# This file is part of GNU Libtool
1029541b2f0bdSmrg
1029611a29bacSmrgm4_define([LT_PACKAGE_VERSION], [2.2.10])
1029711a29bacSmrgm4_define([LT_PACKAGE_REVISION], [1.3175])
1029841b2f0bdSmrg
1029911a29bacSmrgAC_DEFUN([LTVERSION_VERSION],
1030011a29bacSmrg[macro_version='2.2.10'
1030111a29bacSmrgmacro_revision='1.3175'
1030211a29bacSmrg_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
1030311a29bacSmrg_LT_DECL(, macro_revision, 0)
1030411a29bacSmrg])
1030541b2f0bdSmrg
1030611a29bacSmrg# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
1030711a29bacSmrg#
1030811a29bacSmrg#   Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
1030911a29bacSmrg#   Written by Scott James Remnant, 2004.
1031011a29bacSmrg#
1031111a29bacSmrg# This file is free software; the Free Software Foundation gives
1031211a29bacSmrg# unlimited permission to copy and/or distribute it, with or without
1031311a29bacSmrg# modifications, as long as this notice is preserved.
1031441b2f0bdSmrg
1031511a29bacSmrg# serial 5 lt~obsolete.m4
1031611a29bacSmrg
1031711a29bacSmrg# These exist entirely to fool aclocal when bootstrapping libtool.
1031811a29bacSmrg#
1031911a29bacSmrg# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
1032011a29bacSmrg# which have later been changed to m4_define as they aren't part of the
1032111a29bacSmrg# exported API, or moved to Autoconf or Automake where they belong.
1032211a29bacSmrg#
1032311a29bacSmrg# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
1032411a29bacSmrg# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
1032511a29bacSmrg# using a macro with the same name in our local m4/libtool.m4 it'll
1032611a29bacSmrg# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
1032711a29bacSmrg# and doesn't know about Autoconf macros at all.)
1032811a29bacSmrg#
1032911a29bacSmrg# So we provide this file, which has a silly filename so it's always
1033011a29bacSmrg# included after everything else.  This provides aclocal with the
1033111a29bacSmrg# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
1033211a29bacSmrg# because those macros already exist, or will be overwritten later.
1033311a29bacSmrg# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
1033411a29bacSmrg#
1033511a29bacSmrg# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
1033611a29bacSmrg# Yes, that means every name once taken will need to remain here until
1033711a29bacSmrg# we give up compatibility with versions before 1.7, at which point
1033811a29bacSmrg# we need to keep only those names which we still refer to.
1033911a29bacSmrg
1034011a29bacSmrg# This is to help aclocal find these macros, as it can't see m4_define.
1034111a29bacSmrgAC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
1034211a29bacSmrg
1034311a29bacSmrgm4_ifndef([AC_LIBTOOL_LINKER_OPTION],	[AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
1034411a29bacSmrgm4_ifndef([AC_PROG_EGREP],		[AC_DEFUN([AC_PROG_EGREP])])
1034511a29bacSmrgm4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
1034611a29bacSmrgm4_ifndef([_LT_AC_SHELL_INIT],		[AC_DEFUN([_LT_AC_SHELL_INIT])])
1034711a29bacSmrgm4_ifndef([_LT_AC_SYS_LIBPATH_AIX],	[AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
1034811a29bacSmrgm4_ifndef([_LT_PROG_LTMAIN],		[AC_DEFUN([_LT_PROG_LTMAIN])])
1034911a29bacSmrgm4_ifndef([_LT_AC_TAGVAR],		[AC_DEFUN([_LT_AC_TAGVAR])])
1035011a29bacSmrgm4_ifndef([AC_LTDL_ENABLE_INSTALL],	[AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
1035111a29bacSmrgm4_ifndef([AC_LTDL_PREOPEN],		[AC_DEFUN([AC_LTDL_PREOPEN])])
1035211a29bacSmrgm4_ifndef([_LT_AC_SYS_COMPILER],	[AC_DEFUN([_LT_AC_SYS_COMPILER])])
1035311a29bacSmrgm4_ifndef([_LT_AC_LOCK],		[AC_DEFUN([_LT_AC_LOCK])])
1035411a29bacSmrgm4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],	[AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
1035511a29bacSmrgm4_ifndef([_LT_AC_TRY_DLOPEN_SELF],	[AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
1035611a29bacSmrgm4_ifndef([AC_LIBTOOL_PROG_CC_C_O],	[AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
1035711a29bacSmrgm4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
1035811a29bacSmrgm4_ifndef([AC_LIBTOOL_OBJDIR],		[AC_DEFUN([AC_LIBTOOL_OBJDIR])])
1035911a29bacSmrgm4_ifndef([AC_LTDL_OBJDIR],		[AC_DEFUN([AC_LTDL_OBJDIR])])
1036011a29bacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
1036111a29bacSmrgm4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],	[AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
1036211a29bacSmrgm4_ifndef([AC_PATH_MAGIC],		[AC_DEFUN([AC_PATH_MAGIC])])
1036311a29bacSmrgm4_ifndef([AC_PROG_LD_GNU],		[AC_DEFUN([AC_PROG_LD_GNU])])
1036411a29bacSmrgm4_ifndef([AC_PROG_LD_RELOAD_FLAG],	[AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
1036511a29bacSmrgm4_ifndef([AC_DEPLIBS_CHECK_METHOD],	[AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
1036611a29bacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
1036711a29bacSmrgm4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
1036811a29bacSmrgm4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
1036911a29bacSmrgm4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS],	[AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
1037011a29bacSmrgm4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP],	[AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
1037111a29bacSmrgm4_ifndef([LT_AC_PROG_EGREP],		[AC_DEFUN([LT_AC_PROG_EGREP])])
1037211a29bacSmrgm4_ifndef([LT_AC_PROG_SED],		[AC_DEFUN([LT_AC_PROG_SED])])
1037311a29bacSmrgm4_ifndef([_LT_CC_BASENAME],		[AC_DEFUN([_LT_CC_BASENAME])])
1037411a29bacSmrgm4_ifndef([_LT_COMPILER_BOILERPLATE],	[AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
1037511a29bacSmrgm4_ifndef([_LT_LINKER_BOILERPLATE],	[AC_DEFUN([_LT_LINKER_BOILERPLATE])])
1037611a29bacSmrgm4_ifndef([_AC_PROG_LIBTOOL],		[AC_DEFUN([_AC_PROG_LIBTOOL])])
1037711a29bacSmrgm4_ifndef([AC_LIBTOOL_SETUP],		[AC_DEFUN([AC_LIBTOOL_SETUP])])
1037811a29bacSmrgm4_ifndef([_LT_AC_CHECK_DLFCN],		[AC_DEFUN([_LT_AC_CHECK_DLFCN])])
1037911a29bacSmrgm4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],	[AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
1038011a29bacSmrgm4_ifndef([_LT_AC_TAGCONFIG],		[AC_DEFUN([_LT_AC_TAGCONFIG])])
1038111a29bacSmrgm4_ifndef([AC_DISABLE_FAST_INSTALL],	[AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
1038211a29bacSmrgm4_ifndef([_LT_AC_LANG_CXX],		[AC_DEFUN([_LT_AC_LANG_CXX])])
1038311a29bacSmrgm4_ifndef([_LT_AC_LANG_F77],		[AC_DEFUN([_LT_AC_LANG_F77])])
1038411a29bacSmrgm4_ifndef([_LT_AC_LANG_GCJ],		[AC_DEFUN([_LT_AC_LANG_GCJ])])
1038511a29bacSmrgm4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
1038611a29bacSmrgm4_ifndef([_LT_AC_LANG_C_CONFIG],	[AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
1038711a29bacSmrgm4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
1038811a29bacSmrgm4_ifndef([_LT_AC_LANG_CXX_CONFIG],	[AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
1038911a29bacSmrgm4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
1039011a29bacSmrgm4_ifndef([_LT_AC_LANG_F77_CONFIG],	[AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
1039111a29bacSmrgm4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
1039211a29bacSmrgm4_ifndef([_LT_AC_LANG_GCJ_CONFIG],	[AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
1039311a29bacSmrgm4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG],	[AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
1039411a29bacSmrgm4_ifndef([_LT_AC_LANG_RC_CONFIG],	[AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
1039511a29bacSmrgm4_ifndef([AC_LIBTOOL_CONFIG],		[AC_DEFUN([AC_LIBTOOL_CONFIG])])
1039611a29bacSmrgm4_ifndef([_LT_AC_FILE_LTDLL_C],	[AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
1039711a29bacSmrgm4_ifndef([_LT_REQUIRED_DARWIN_CHECKS],	[AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])])
1039811a29bacSmrgm4_ifndef([_LT_AC_PROG_CXXCPP],		[AC_DEFUN([_LT_AC_PROG_CXXCPP])])
1039911a29bacSmrgm4_ifndef([_LT_PREPARE_SED_QUOTE_VARS],	[AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])])
1040011a29bacSmrgm4_ifndef([_LT_PROG_ECHO_BACKSLASH],	[AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])])
1040111a29bacSmrgm4_ifndef([_LT_PROG_F77],		[AC_DEFUN([_LT_PROG_F77])])
1040211a29bacSmrgm4_ifndef([_LT_PROG_FC],		[AC_DEFUN([_LT_PROG_FC])])
1040311a29bacSmrgm4_ifndef([_LT_PROG_CXX],		[AC_DEFUN([_LT_PROG_CXX])])
1040441b2f0bdSmrg
10405