aclocal.m4 revision 11245024
111245024Smrg# generated automatically by aclocal 1.11 -*- 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
1611245024Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
1711245024Smrg[m4_warning([this file was generated for autoconf 2.63.
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.
3711245024Smrgm4_if([$1], [1.11], [],
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],
5311245024Smrg[AM_AUTOMAKE_VERSION([1.11])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# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
41011245024Smrg# Free Software Foundation, Inc.
41111245024Smrg#
41211245024Smrg# This file is free software; the Free Software Foundation
41311245024Smrg# gives unlimited permission to copy and/or distribute it,
41411245024Smrg# with or without modifications, as long as this notice is preserved.
41541b2f0bdSmrg
41611245024Smrg# serial 8
41741b2f0bdSmrg
41811245024Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
41911245024SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
42041b2f0bdSmrg
42111245024Smrg# Do all the work for Automake.                             -*- Autoconf -*-
42241b2f0bdSmrg
42311245024Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
42411245024Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
42511245024Smrg#
42611245024Smrg# This file is free software; the Free Software Foundation
42711245024Smrg# gives unlimited permission to copy and/or distribute it,
42811245024Smrg# with or without modifications, as long as this notice is preserved.
42941b2f0bdSmrg
43011245024Smrg# serial 16
43141b2f0bdSmrg
43211245024Smrg# This macro actually does too much.  Some checks are only needed if
43311245024Smrg# your package does certain things.  But this isn't really a big deal.
43441b2f0bdSmrg
43511245024Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
43611245024Smrg# AM_INIT_AUTOMAKE([OPTIONS])
43711245024Smrg# -----------------------------------------------
43811245024Smrg# The call with PACKAGE and VERSION arguments is the old style
43911245024Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
44011245024Smrg# and VERSION should now be passed to AC_INIT and removed from
44111245024Smrg# the call to AM_INIT_AUTOMAKE.
44211245024Smrg# We support both call styles for the transition.  After
44311245024Smrg# the next Automake release, Autoconf can make the AC_INIT
44411245024Smrg# arguments mandatory, and then we can depend on a new Autoconf
44511245024Smrg# release and drop the old call support.
44611245024SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
44711245024Smrg[AC_PREREQ([2.62])dnl
44811245024Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
44911245024Smrgdnl the ones we care about.
45011245024Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
45111245024SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
45211245024SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
45311245024Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
45411245024Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
45511245024Smrg  # is not polluted with repeated "-I."
45611245024Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
45711245024Smrg  # test to see if srcdir already configured
45811245024Smrg  if test -f $srcdir/config.status; then
45911245024Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
46011245024Smrg  fi
46111245024Smrgfi
46241b2f0bdSmrg
46311245024Smrg# test whether we have cygpath
46411245024Smrgif test -z "$CYGPATH_W"; then
46511245024Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
46611245024Smrg    CYGPATH_W='cygpath -w'
46711245024Smrg  else
46811245024Smrg    CYGPATH_W=echo
46911245024Smrg  fi
47011245024Smrgfi
47111245024SmrgAC_SUBST([CYGPATH_W])
47241b2f0bdSmrg
47311245024Smrg# Define the identity of the package.
47411245024Smrgdnl Distinguish between old-style and new-style calls.
47511245024Smrgm4_ifval([$2],
47611245024Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
47711245024Smrg AC_SUBST([PACKAGE], [$1])dnl
47811245024Smrg AC_SUBST([VERSION], [$2])],
47911245024Smrg[_AM_SET_OPTIONS([$1])dnl
48011245024Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
48111245024Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
48211245024Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
48311245024Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
48411245024Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
48541b2f0bdSmrg
48611245024Smrg_AM_IF_OPTION([no-define],,
48711245024Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
48811245024Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
48941b2f0bdSmrg
49011245024Smrg# Some tools Automake needs.
49111245024SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
49211245024SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
49311245024SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
49411245024SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
49511245024SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
49611245024SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
49711245024SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
49811245024SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
49911245024SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
50011245024SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
50111245024Smrg# We need awk for the "check" target.  The system "awk" is bad on
50211245024Smrg# some platforms.
50311245024SmrgAC_REQUIRE([AC_PROG_AWK])dnl
50411245024SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
50511245024SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
50611245024Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
50711245024Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
50811245024Smrg			     [_AM_PROG_TAR([v7])])])
50911245024Smrg_AM_IF_OPTION([no-dependencies],,
51011245024Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
51111245024Smrg		  [_AM_DEPENDENCIES(CC)],
51211245024Smrg		  [define([AC_PROG_CC],
51311245024Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
51411245024SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
51511245024Smrg		  [_AM_DEPENDENCIES(CXX)],
51611245024Smrg		  [define([AC_PROG_CXX],
51711245024Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
51811245024SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
51911245024Smrg		  [_AM_DEPENDENCIES(OBJC)],
52011245024Smrg		  [define([AC_PROG_OBJC],
52111245024Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
52211245024Smrg])
52311245024Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
52411245024Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
52511245024Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
52611245024Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
52711245024SmrgAC_CONFIG_COMMANDS_PRE(dnl
52811245024Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
52911245024Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
53011245024Smrg])
53141b2f0bdSmrg
53211245024Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
53311245024Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
53411245024Smrgdnl mangled by Autoconf and run in a shell conditional statement.
53511245024Smrgm4_define([_AC_COMPILER_EXEEXT],
53611245024Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
53741b2f0bdSmrg
53841b2f0bdSmrg
53911245024Smrg# When config.status generates a header, we must update the stamp-h file.
54011245024Smrg# This file resides in the same directory as the config header
54111245024Smrg# that is generated.  The stamp files are numbered to have different names.
54241b2f0bdSmrg
54311245024Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
54411245024Smrg# loop where config.status creates the headers, so we can generate
54511245024Smrg# our stamp files there.
54611245024SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
54711245024Smrg[# Compute $1's index in $config_headers.
54811245024Smrg_am_arg=$1
54911245024Smrg_am_stamp_count=1
55011245024Smrgfor _am_header in $config_headers :; do
55111245024Smrg  case $_am_header in
55211245024Smrg    $_am_arg | $_am_arg:* )
55311245024Smrg      break ;;
55411245024Smrg    * )
55511245024Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
55611245024Smrg  esac
55711245024Smrgdone
55811245024Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
55941b2f0bdSmrg
56011245024Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
56111245024Smrg#
56211245024Smrg# This file is free software; the Free Software Foundation
56311245024Smrg# gives unlimited permission to copy and/or distribute it,
56411245024Smrg# with or without modifications, as long as this notice is preserved.
56541b2f0bdSmrg
56611245024Smrg# AM_PROG_INSTALL_SH
56711245024Smrg# ------------------
56811245024Smrg# Define $install_sh.
56911245024SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
57011245024Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
57111245024Smrgif test x"${install_sh}" != xset; then
57211245024Smrg  case $am_aux_dir in
57311245024Smrg  *\ * | *\	*)
57411245024Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
57511245024Smrg  *)
57611245024Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
57711245024Smrg  esac
57811245024Smrgfi
57911245024SmrgAC_SUBST(install_sh)])
58041b2f0bdSmrg
58111245024Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
58211245024Smrg#
58311245024Smrg# This file is free software; the Free Software Foundation
58411245024Smrg# gives unlimited permission to copy and/or distribute it,
58511245024Smrg# with or without modifications, as long as this notice is preserved.
58641b2f0bdSmrg
58711245024Smrg# serial 2
58841b2f0bdSmrg
58911245024Smrg# Check whether the underlying file-system supports filenames
59011245024Smrg# with a leading dot.  For instance MS-DOS doesn't.
59111245024SmrgAC_DEFUN([AM_SET_LEADING_DOT],
59211245024Smrg[rm -rf .tst 2>/dev/null
59311245024Smrgmkdir .tst 2>/dev/null
59411245024Smrgif test -d .tst; then
59511245024Smrg  am__leading_dot=.
59611245024Smrgelse
59711245024Smrg  am__leading_dot=_
59841b2f0bdSmrgfi
59911245024Smrgrmdir .tst 2>/dev/null
60011245024SmrgAC_SUBST([am__leading_dot])])
60141b2f0bdSmrg
60211245024Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
60311245024Smrg# From Jim Meyering
60441b2f0bdSmrg
60511245024Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
60611245024Smrg# Free Software Foundation, Inc.
60711245024Smrg#
60811245024Smrg# This file is free software; the Free Software Foundation
60911245024Smrg# gives unlimited permission to copy and/or distribute it,
61011245024Smrg# with or without modifications, as long as this notice is preserved.
61141b2f0bdSmrg
61211245024Smrg# serial 5
61341b2f0bdSmrg
61411245024Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
61511245024Smrg# ----------------------------------
61611245024Smrg# Control maintainer-specific portions of Makefiles.
61711245024Smrg# Default is to disable them, unless `enable' is passed literally.
61811245024Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
61911245024Smrg# can override the default with the --enable/--disable switch.
62011245024SmrgAC_DEFUN([AM_MAINTAINER_MODE],
62111245024Smrg[m4_case(m4_default([$1], [disable]),
62211245024Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
62311245024Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
62411245024Smrg       [m4_define([am_maintainer_other], [enable])
62511245024Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
62611245024SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
62711245024Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
62811245024Smrg  AC_ARG_ENABLE([maintainer-mode],
62911245024Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
63011245024Smrg			  (and sometimes confusing) to the casual installer],
63111245024Smrg      [USE_MAINTAINER_MODE=$enableval],
63211245024Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
63311245024Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
63411245024Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
63511245024Smrg  MAINT=$MAINTAINER_MODE_TRUE
63611245024Smrg  AC_SUBST([MAINT])dnl
63711245024Smrg]
63811245024Smrg)
63941b2f0bdSmrg
64011245024SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
64141b2f0bdSmrg
64211245024Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
64311245024Smrg
64411245024Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
64511245024Smrg#
64611245024Smrg# This file is free software; the Free Software Foundation
64711245024Smrg# gives unlimited permission to copy and/or distribute it,
64811245024Smrg# with or without modifications, as long as this notice is preserved.
64911245024Smrg
65011245024Smrg# serial 4
65111245024Smrg
65211245024Smrg# AM_MAKE_INCLUDE()
65311245024Smrg# -----------------
65411245024Smrg# Check to see how make treats includes.
65511245024SmrgAC_DEFUN([AM_MAKE_INCLUDE],
65611245024Smrg[am_make=${MAKE-make}
65711245024Smrgcat > confinc << 'END'
65811245024Smrgam__doit:
65911245024Smrg	@echo this is the am__doit target
66011245024Smrg.PHONY: am__doit
66111245024SmrgEND
66211245024Smrg# If we don't find an include directive, just comment out the code.
66311245024SmrgAC_MSG_CHECKING([for style of include used by $am_make])
66411245024Smrgam__include="#"
66511245024Smrgam__quote=
66611245024Smrg_am_result=none
66711245024Smrg# First try GNU make style include.
66811245024Smrgecho "include confinc" > confmf
66911245024Smrg# Ignore all kinds of additional output from `make'.
67011245024Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
67111245024Smrg*the\ am__doit\ target*)
67211245024Smrg  am__include=include
67311245024Smrg  am__quote=
67411245024Smrg  _am_result=GNU
67541b2f0bdSmrg  ;;
67641b2f0bdSmrgesac
67711245024Smrg# Now try BSD make style include.
67811245024Smrgif test "$am__include" = "#"; then
67911245024Smrg   echo '.include "confinc"' > confmf
68011245024Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
68111245024Smrg   *the\ am__doit\ target*)
68211245024Smrg     am__include=.include
68311245024Smrg     am__quote="\""
68411245024Smrg     _am_result=BSD
68511245024Smrg     ;;
68611245024Smrg   esac
68711245024Smrgfi
68811245024SmrgAC_SUBST([am__include])
68911245024SmrgAC_SUBST([am__quote])
69011245024SmrgAC_MSG_RESULT([$_am_result])
69111245024Smrgrm -f confinc confmf
69211245024Smrg])
69341b2f0bdSmrg
69411245024Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
69541b2f0bdSmrg
69611245024Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
69711245024Smrg# Free Software Foundation, Inc.
69811245024Smrg#
69911245024Smrg# This file is free software; the Free Software Foundation
70011245024Smrg# gives unlimited permission to copy and/or distribute it,
70111245024Smrg# with or without modifications, as long as this notice is preserved.
70241b2f0bdSmrg
70311245024Smrg# serial 6
70441b2f0bdSmrg
70511245024Smrg# AM_MISSING_PROG(NAME, PROGRAM)
70611245024Smrg# ------------------------------
70711245024SmrgAC_DEFUN([AM_MISSING_PROG],
70811245024Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
70911245024Smrg$1=${$1-"${am_missing_run}$2"}
71011245024SmrgAC_SUBST($1)])
71141b2f0bdSmrg
71211245024Smrg
71311245024Smrg# AM_MISSING_HAS_RUN
71411245024Smrg# ------------------
71511245024Smrg# Define MISSING if not defined so far and test if it supports --run.
71611245024Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
71711245024SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
71811245024Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
71911245024SmrgAC_REQUIRE_AUX_FILE([missing])dnl
72011245024Smrgif test x"${MISSING+set}" != xset; then
72111245024Smrg  case $am_aux_dir in
72211245024Smrg  *\ * | *\	*)
72311245024Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
72411245024Smrg  *)
72511245024Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
72611245024Smrg  esac
72711245024Smrgfi
72811245024Smrg# Use eval to expand $SHELL
72911245024Smrgif eval "$MISSING --run true"; then
73011245024Smrg  am_missing_run="$MISSING --run "
73141b2f0bdSmrgelse
73211245024Smrg  am_missing_run=
73311245024Smrg  AC_MSG_WARN([`missing' script is too old or missing])
73441b2f0bdSmrgfi
73511245024Smrg])
73641b2f0bdSmrg
73711245024Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
73811245024Smrg#
73911245024Smrg# This file is free software; the Free Software Foundation
74011245024Smrg# gives unlimited permission to copy and/or distribute it,
74111245024Smrg# with or without modifications, as long as this notice is preserved.
74241b2f0bdSmrg
74311245024Smrg# AM_PROG_MKDIR_P
74411245024Smrg# ---------------
74511245024Smrg# Check for `mkdir -p'.
74611245024SmrgAC_DEFUN([AM_PROG_MKDIR_P],
74711245024Smrg[AC_PREREQ([2.60])dnl
74811245024SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
74911245024Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
75011245024Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
75111245024Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
75211245024Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
75311245024Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
75411245024Smrgdnl adjustment using top_builddir (which is defined more often than
75511245024Smrgdnl MKDIR_P).
75611245024SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
75711245024Smrgcase $mkdir_p in
75811245024Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
75911245024Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
76011245024Smrgesac
76141b2f0bdSmrg])
76241b2f0bdSmrg
76311245024Smrg# Helper functions for option handling.                     -*- Autoconf -*-
76441b2f0bdSmrg
76511245024Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
76611245024Smrg#
76711245024Smrg# This file is free software; the Free Software Foundation
76811245024Smrg# gives unlimited permission to copy and/or distribute it,
76911245024Smrg# with or without modifications, as long as this notice is preserved.
77041b2f0bdSmrg
77111245024Smrg# serial 4
77241b2f0bdSmrg
77311245024Smrg# _AM_MANGLE_OPTION(NAME)
77411245024Smrg# -----------------------
77511245024SmrgAC_DEFUN([_AM_MANGLE_OPTION],
77611245024Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
77741b2f0bdSmrg
77811245024Smrg# _AM_SET_OPTION(NAME)
77911245024Smrg# ------------------------------
78011245024Smrg# Set option NAME.  Presently that only means defining a flag for this option.
78111245024SmrgAC_DEFUN([_AM_SET_OPTION],
78211245024Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
78341b2f0bdSmrg
78411245024Smrg# _AM_SET_OPTIONS(OPTIONS)
78511245024Smrg# ----------------------------------
78611245024Smrg# OPTIONS is a space-separated list of Automake options.
78711245024SmrgAC_DEFUN([_AM_SET_OPTIONS],
78811245024Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
78941b2f0bdSmrg
79011245024Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
79111245024Smrg# -------------------------------------------
79211245024Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
79311245024SmrgAC_DEFUN([_AM_IF_OPTION],
79411245024Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
79541b2f0bdSmrg
79611245024Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
79741b2f0bdSmrg
79811245024Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
79911245024Smrg# Free Software Foundation, Inc.
80011245024Smrg#
80111245024Smrg# This file is free software; the Free Software Foundation
80211245024Smrg# gives unlimited permission to copy and/or distribute it,
80311245024Smrg# with or without modifications, as long as this notice is preserved.
80441b2f0bdSmrg
80511245024Smrg# serial 5
80641b2f0bdSmrg
80711245024Smrg# AM_SANITY_CHECK
80811245024Smrg# ---------------
80911245024SmrgAC_DEFUN([AM_SANITY_CHECK],
81011245024Smrg[AC_MSG_CHECKING([whether build environment is sane])
81111245024Smrg# Just in case
81211245024Smrgsleep 1
81311245024Smrgecho timestamp > conftest.file
81411245024Smrg# Reject unsafe characters in $srcdir or the absolute working directory
81511245024Smrg# name.  Accept space and tab only in the latter.
81611245024Smrgam_lf='
81711245024Smrg'
81811245024Smrgcase `pwd` in
81911245024Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
82011245024Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
82111245024Smrgesac
82211245024Smrgcase $srcdir in
82311245024Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
82411245024Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
82511245024Smrgesac
82641b2f0bdSmrg
82711245024Smrg# Do `set' in a subshell so we don't clobber the current shell's
82811245024Smrg# arguments.  Must try -L first in case configure is actually a
82911245024Smrg# symlink; some systems play weird games with the mod time of symlinks
83011245024Smrg# (eg FreeBSD returns the mod time of the symlink's containing
83111245024Smrg# directory).
83211245024Smrgif (
83311245024Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
83411245024Smrg   if test "$[*]" = "X"; then
83511245024Smrg      # -L didn't work.
83611245024Smrg      set X `ls -t "$srcdir/configure" conftest.file`
83711245024Smrg   fi
83811245024Smrg   rm -f conftest.file
83911245024Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
84011245024Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
84141b2f0bdSmrg
84211245024Smrg      # If neither matched, then we have a broken ls.  This can happen
84311245024Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
84411245024Smrg      # broken ls alias from the environment.  This has actually
84511245024Smrg      # happened.  Such a system could not be considered "sane".
84611245024Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
84711245024Smrgalias in your environment])
84811245024Smrg   fi
84941b2f0bdSmrg
85011245024Smrg   test "$[2]" = conftest.file
85111245024Smrg   )
85211245024Smrgthen
85311245024Smrg   # Ok.
85411245024Smrg   :
85541b2f0bdSmrgelse
85611245024Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
85711245024SmrgCheck your system clock])
85811245024Smrgfi
85911245024SmrgAC_MSG_RESULT(yes)])
86041b2f0bdSmrg
86111245024Smrg# Copyright (C) 2009  Free Software Foundation, Inc.
86211245024Smrg#
86311245024Smrg# This file is free software; the Free Software Foundation
86411245024Smrg# gives unlimited permission to copy and/or distribute it,
86511245024Smrg# with or without modifications, as long as this notice is preserved.
86641b2f0bdSmrg
86711245024Smrg# serial 1
86841b2f0bdSmrg
86911245024Smrg# AM_SILENT_RULES([DEFAULT])
87011245024Smrg# --------------------------
87111245024Smrg# Enable less verbose build rules; with the default set to DEFAULT
87211245024Smrg# (`yes' being less verbose, `no' or empty being verbose).
87311245024SmrgAC_DEFUN([AM_SILENT_RULES],
87411245024Smrg[AC_ARG_ENABLE([silent-rules],
87511245024Smrg[  --enable-silent-rules          less verbose build output (undo: `make V=1')
87611245024Smrg  --disable-silent-rules         verbose build output (undo: `make V=0')])
87711245024Smrgcase $enable_silent_rules in
87811245024Smrgyes) AM_DEFAULT_VERBOSITY=0;;
87911245024Smrgno)  AM_DEFAULT_VERBOSITY=1;;
88011245024Smrg*)   AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
88111245024Smrgesac
88211245024SmrgAC_SUBST([AM_DEFAULT_VERBOSITY])dnl
88311245024SmrgAM_BACKSLASH='\'
88411245024SmrgAC_SUBST([AM_BACKSLASH])dnl
88511245024Smrg_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
88611245024Smrg])
88741b2f0bdSmrg
88811245024Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
88911245024Smrg#
89011245024Smrg# This file is free software; the Free Software Foundation
89111245024Smrg# gives unlimited permission to copy and/or distribute it,
89211245024Smrg# with or without modifications, as long as this notice is preserved.
89341b2f0bdSmrg
89411245024Smrg# AM_PROG_INSTALL_STRIP
89511245024Smrg# ---------------------
89611245024Smrg# One issue with vendor `install' (even GNU) is that you can't
89711245024Smrg# specify the program used to strip binaries.  This is especially
89811245024Smrg# annoying in cross-compiling environments, where the build's strip
89911245024Smrg# is unlikely to handle the host's binaries.
90011245024Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
90111245024Smrg# always use install-sh in `make install-strip', and initialize
90211245024Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
90311245024SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
90411245024Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
90511245024Smrg# Installed binaries are usually stripped using `strip' when the user
90611245024Smrg# run `make install-strip'.  However `strip' might not be the right
90711245024Smrg# tool to use in cross-compilation environments, therefore Automake
90811245024Smrg# will honor the `STRIP' environment variable to overrule this program.
90911245024Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
91011245024Smrgif test "$cross_compiling" != no; then
91111245024Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
91241b2f0bdSmrgfi
91311245024SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
91411245024SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
91541b2f0bdSmrg
91611245024Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
91711245024Smrg#
91811245024Smrg# This file is free software; the Free Software Foundation
91911245024Smrg# gives unlimited permission to copy and/or distribute it,
92011245024Smrg# with or without modifications, as long as this notice is preserved.
92141b2f0bdSmrg
92211245024Smrg# serial 2
92341b2f0bdSmrg
92411245024Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
92511245024Smrg# ---------------------------
92611245024Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
92711245024Smrg# This macro is traced by Automake.
92811245024SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
92941b2f0bdSmrg
93011245024Smrg# AM_SUBST_NOTMAKE(VARIABLE)
93111245024Smrg# ---------------------------
93211245024Smrg# Public sister of _AM_SUBST_NOTMAKE.
93311245024SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
93441b2f0bdSmrg
93511245024Smrg# Check how to create a tarball.                            -*- Autoconf -*-
93641b2f0bdSmrg
93711245024Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
93811245024Smrg#
93911245024Smrg# This file is free software; the Free Software Foundation
94011245024Smrg# gives unlimited permission to copy and/or distribute it,
94111245024Smrg# with or without modifications, as long as this notice is preserved.
94241b2f0bdSmrg
94311245024Smrg# serial 2
94411245024Smrg
94511245024Smrg# _AM_PROG_TAR(FORMAT)
94611245024Smrg# --------------------
94711245024Smrg# Check how to create a tarball in format FORMAT.
94811245024Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
94911245024Smrg#
95011245024Smrg# Substitute a variable $(am__tar) that is a command
95111245024Smrg# writing to stdout a FORMAT-tarball containing the directory
95211245024Smrg# $tardir.
95311245024Smrg#     tardir=directory && $(am__tar) > result.tar
95411245024Smrg#
95511245024Smrg# Substitute a variable $(am__untar) that extract such
95611245024Smrg# a tarball read from stdin.
95711245024Smrg#     $(am__untar) < result.tar
95811245024SmrgAC_DEFUN([_AM_PROG_TAR],
95911245024Smrg[# Always define AMTAR for backward compatibility.
96011245024SmrgAM_MISSING_PROG([AMTAR], [tar])
96111245024Smrgm4_if([$1], [v7],
96211245024Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
96311245024Smrg     [m4_case([$1], [ustar],, [pax],,
96411245024Smrg              [m4_fatal([Unknown tar format])])
96511245024SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
96611245024Smrg# Loop over all known methods to create a tar archive until one works.
96711245024Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
96811245024Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
96911245024Smrg# Do not fold the above two line into one, because Tru64 sh and
97011245024Smrg# Solaris sh will not grok spaces in the rhs of `-'.
97111245024Smrgfor _am_tool in $_am_tools
97211245024Smrgdo
97311245024Smrg  case $_am_tool in
97411245024Smrg  gnutar)
97511245024Smrg    for _am_tar in tar gnutar gtar;
97611245024Smrg    do
97711245024Smrg      AM_RUN_LOG([$_am_tar --version]) && break
97811245024Smrg    done
97911245024Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
98011245024Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
98111245024Smrg    am__untar="$_am_tar -xf -"
98211245024Smrg    ;;
98311245024Smrg  plaintar)
98411245024Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
98511245024Smrg    # ustar tarball either.
98611245024Smrg    (tar --version) >/dev/null 2>&1 && continue
98711245024Smrg    am__tar='tar chf - "$$tardir"'
98811245024Smrg    am__tar_='tar chf - "$tardir"'
98911245024Smrg    am__untar='tar xf -'
99011245024Smrg    ;;
99111245024Smrg  pax)
99211245024Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
99311245024Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
99411245024Smrg    am__untar='pax -r'
99511245024Smrg    ;;
99611245024Smrg  cpio)
99711245024Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
99811245024Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
99911245024Smrg    am__untar='cpio -i -H $1 -d'
100011245024Smrg    ;;
100111245024Smrg  none)
100211245024Smrg    am__tar=false
100311245024Smrg    am__tar_=false
100411245024Smrg    am__untar=false
100541b2f0bdSmrg    ;;
100641b2f0bdSmrg  esac
100741b2f0bdSmrg
100811245024Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
100911245024Smrg  # and am__untar set.
101011245024Smrg  test -n "${am_cv_prog_tar_$1}" && break
101141b2f0bdSmrg
101211245024Smrg  # tar/untar a dummy directory, and stop if the command works
101311245024Smrg  rm -rf conftest.dir
101411245024Smrg  mkdir conftest.dir
101511245024Smrg  echo GrepMe > conftest.dir/file
101611245024Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
101711245024Smrg  rm -rf conftest.dir
101811245024Smrg  if test -s conftest.tar; then
101911245024Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
102011245024Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
102111245024Smrg  fi
102211245024Smrgdone
102311245024Smrgrm -rf conftest.dir
102441b2f0bdSmrg
102511245024SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
102611245024SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
102711245024SmrgAC_SUBST([am__tar])
102811245024SmrgAC_SUBST([am__untar])
102911245024Smrg]) # _AM_PROG_TAR
103041b2f0bdSmrg
103111245024Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
103211245024Smrgdnl
103311245024Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
103411245024Smrgdnl 
103511245024Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
103611245024Smrgdnl copy of this software and associated documentation files (the
103711245024Smrgdnl "Software"), to deal in the Software without restriction, including
103811245024Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
103911245024Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
104011245024Smrgdnl to whom the Software is furnished to do so, provided that the above
104111245024Smrgdnl copyright notice(s) and this permission notice appear in all copies of
104211245024Smrgdnl the Software and that both the above copyright notice(s) and this
104311245024Smrgdnl permission notice appear in supporting documentation.
104411245024Smrgdnl
104511245024Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
104611245024Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
104711245024Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
104811245024Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
104911245024Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
105011245024Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
105111245024Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
105211245024Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
105311245024Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
105411245024Smrgdnl
105511245024Smrgdnl Except as contained in this notice, the name of a copyright holder
105611245024Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
105711245024Smrgdnl or other dealings in this Software without prior written authorization
105811245024Smrgdnl of the copyright holder.
105941b2f0bdSmrg
106011245024Smrg# XORG_MACROS_VERSION(required-version)
106111245024Smrg# -------------------------------------
106211245024Smrg# Minimum version: 1.1.0
106311245024Smrg#
106411245024Smrg# If you're using a macro added in Version 1.1 or newer, include this in
106511245024Smrg# your configure.ac with the minimum required version, such as:
106611245024Smrg# XORG_MACROS_VERSION(1.1)
106711245024Smrg#
106811245024Smrg# To ensure that this macro is defined, also add:
106911245024Smrg# m4_ifndef([XORG_MACROS_VERSION],
107011245024Smrg#     [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
107111245024Smrg#
107211245024Smrg#
107311245024Smrg# See the "minimum version" comment for each macro you use to see what 
107411245024Smrg# version you require.
107511245024Smrgm4_defun([XORG_MACROS_VERSION],[
107611245024Smrgm4_define([vers_have], [1.3.0])
107711245024Smrgm4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
107811245024Smrgm4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
107911245024Smrgm4_if(m4_cmp(maj_have, maj_needed), 0,,
108011245024Smrg    [m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
108111245024Smrgm4_if(m4_version_compare(vers_have, [$1]), -1,
108211245024Smrg    [m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
108311245024Smrgm4_undefine([vers_have])
108411245024Smrgm4_undefine([maj_have])
108511245024Smrgm4_undefine([maj_needed])
108611245024Smrg]) # XORG_MACROS_VERSION
108741b2f0bdSmrg
108811245024Smrg# XORG_PROG_RAWCPP()
108911245024Smrg# ------------------
109011245024Smrg# Minimum version: 1.0.0
109111245024Smrg#
109211245024Smrg# Find cpp program and necessary flags for use in pre-processing text files
109311245024Smrg# such as man pages and config files
109411245024SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
109511245024SmrgAC_REQUIRE([AC_PROG_CPP])
109611245024SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
109711245024Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
109841b2f0bdSmrg
109911245024Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
110011245024Smrg# which is not the best choice for supporting other OS'es, but covers most
110111245024Smrg# of the ones we need for now.
110211245024SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
110311245024SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
110411245024Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
110511245024Smrg	AC_MSG_RESULT([no])
110611245024Smrgelse
110711245024Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
110811245024Smrg		RAWCPPFLAGS=-undef
110911245024Smrg		AC_MSG_RESULT([yes])
111011245024Smrg	# under Cygwin unix is still defined even with -undef
111111245024Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
111211245024Smrg		RAWCPPFLAGS="-undef -ansi"
111311245024Smrg		AC_MSG_RESULT([yes, with -ansi])
111411245024Smrg	else
111511245024Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
111611245024Smrg	fi
111741b2f0bdSmrgfi
111811245024Smrgrm -f conftest.$ac_ext
111941b2f0bdSmrg
112011245024SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
112111245024SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
112211245024Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
112311245024Smrg	AC_MSG_RESULT([no])
112411245024Smrgelse
112511245024Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
112611245024Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
112711245024Smrg		AC_MSG_RESULT([yes])
112811245024Smrg	else
112911245024Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
113011245024Smrg	fi
113111245024Smrgfi
113211245024Smrgrm -f conftest.$ac_ext
113311245024SmrgAC_SUBST(RAWCPPFLAGS)
113411245024Smrg]) # XORG_PROG_RAWCPP
113541b2f0bdSmrg
113611245024Smrg# XORG_MANPAGE_SECTIONS()
113711245024Smrg# -----------------------
113811245024Smrg# Minimum version: 1.0.0
113911245024Smrg#
114011245024Smrg# Determine which sections man pages go in for the different man page types
114111245024Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
114211245024Smrg# Not sure if there's any better way than just hardcoding by OS name.
114311245024Smrg# Override default settings by setting environment variables
114441b2f0bdSmrg
114511245024SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
114611245024SmrgAC_REQUIRE([AC_CANONICAL_HOST])
114741b2f0bdSmrg
114811245024Smrgif test x$APP_MAN_SUFFIX = x    ; then
114911245024Smrg    APP_MAN_SUFFIX=1
115011245024Smrgfi
115111245024Smrgif test x$APP_MAN_DIR = x    ; then
115211245024Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
115311245024Smrgfi
115441b2f0bdSmrg
115511245024Smrgif test x$LIB_MAN_SUFFIX = x    ; then
115611245024Smrg    LIB_MAN_SUFFIX=3
115711245024Smrgfi
115811245024Smrgif test x$LIB_MAN_DIR = x    ; then
115911245024Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
116011245024Smrgfi
116141b2f0bdSmrg
116211245024Smrgif test x$FILE_MAN_SUFFIX = x    ; then
116311245024Smrg    case $host_os in
116411245024Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
116511245024Smrg	*)		FILE_MAN_SUFFIX=5  ;;
116611245024Smrg    esac
116711245024Smrgfi
116811245024Smrgif test x$FILE_MAN_DIR = x    ; then
116911245024Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
117011245024Smrgfi
117111245024Smrg
117211245024Smrgif test x$MISC_MAN_SUFFIX = x    ; then
117311245024Smrg    case $host_os in
117411245024Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
117511245024Smrg	*)		MISC_MAN_SUFFIX=7  ;;
117611245024Smrg    esac
117711245024Smrgfi
117811245024Smrgif test x$MISC_MAN_DIR = x    ; then
117911245024Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
118041b2f0bdSmrgfi
118141b2f0bdSmrg
118211245024Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
118311245024Smrg    case $host_os in
118411245024Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
118511245024Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
118611245024Smrg    esac
118711245024Smrgfi
118811245024Smrgif test x$DRIVER_MAN_DIR = x    ; then
118911245024Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
119011245024Smrgfi
119141b2f0bdSmrg
119211245024Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
119311245024Smrg    case $host_os in
119411245024Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
119511245024Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
119611245024Smrg    esac
119711245024Smrgfi
119811245024Smrgif test x$ADMIN_MAN_DIR = x    ; then
119911245024Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
120041b2f0bdSmrgfi
120141b2f0bdSmrg
120241b2f0bdSmrg
120311245024SmrgAC_SUBST([APP_MAN_SUFFIX])
120411245024SmrgAC_SUBST([LIB_MAN_SUFFIX])
120511245024SmrgAC_SUBST([FILE_MAN_SUFFIX])
120611245024SmrgAC_SUBST([MISC_MAN_SUFFIX])
120711245024SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
120811245024SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
120911245024SmrgAC_SUBST([APP_MAN_DIR])
121011245024SmrgAC_SUBST([LIB_MAN_DIR])
121111245024SmrgAC_SUBST([FILE_MAN_DIR])
121211245024SmrgAC_SUBST([MISC_MAN_DIR])
121311245024SmrgAC_SUBST([DRIVER_MAN_DIR])
121411245024SmrgAC_SUBST([ADMIN_MAN_DIR])
121511245024Smrg]) # XORG_MANPAGE_SECTIONS
121641b2f0bdSmrg
121711245024Smrg# XORG_CHECK_LINUXDOC
121811245024Smrg# -------------------
121911245024Smrg# Minimum version: 1.0.0
122011245024Smrg#
122111245024Smrg# Defines the variable MAKE_TEXT if the necessary tools and
122211245024Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
122311245024Smrg# Whether or not the necessary tools and files are found can be checked
122411245024Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
122511245024SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
122611245024Smrgif test x$XORG_SGML_PATH = x ; then
122711245024Smrg    XORG_SGML_PATH=$prefix/share/sgml
122841b2f0bdSmrgfi
122911245024SmrgHAVE_DEFS_ENT=
123041b2f0bdSmrg
123111245024Smrgif test x"$cross_compiling" = x"yes" ; then
123211245024Smrg  HAVE_DEFS_ENT=no
123311245024Smrgelse
123411245024Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
123541b2f0bdSmrgfi
123641b2f0bdSmrg
123711245024SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
123811245024SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
123911245024Smrg
124011245024SmrgAC_MSG_CHECKING([Whether to build documentation])
124141b2f0bdSmrg
124211245024Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
124311245024Smrg   BUILDDOC=yes
124441b2f0bdSmrgelse
124511245024Smrg   BUILDDOC=no
124641b2f0bdSmrgfi
124741b2f0bdSmrg
124811245024SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
124941b2f0bdSmrg
125011245024SmrgAC_MSG_RESULT([$BUILDDOC])
125111245024Smrg
125211245024SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
125311245024Smrg
125411245024Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
125511245024Smrg   BUILDPDFDOC=yes
125641b2f0bdSmrgelse
125711245024Smrg   BUILDPDFDOC=no
125841b2f0bdSmrgfi
125941b2f0bdSmrg
126011245024SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
126141b2f0bdSmrg
126211245024SmrgAC_MSG_RESULT([$BUILDPDFDOC])
126341b2f0bdSmrg
126411245024SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
126511245024SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
126611245024SmrgMAKE_PDF="$PS2PDF"
126711245024SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
126841b2f0bdSmrg
126911245024SmrgAC_SUBST(MAKE_TEXT)
127011245024SmrgAC_SUBST(MAKE_PS)
127111245024SmrgAC_SUBST(MAKE_PDF)
127211245024SmrgAC_SUBST(MAKE_HTML)
127311245024Smrg]) # XORG_CHECK_LINUXDOC
127441b2f0bdSmrg
127511245024Smrg# XORG_CHECK_DOCBOOK
127611245024Smrg# -------------------
127711245024Smrg# Minimum version: 1.0.0
127811245024Smrg#
127911245024Smrg# Checks for the ability to build output formats from SGML DocBook source.
128011245024Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
128111245024Smrg# indicates whether the necessary tools and files are found and, if set,
128211245024Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
128311245024SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
128411245024Smrgif test x$XORG_SGML_PATH = x ; then
128511245024Smrg    XORG_SGML_PATH=$prefix/share/sgml
128611245024Smrgfi
128711245024SmrgHAVE_DEFS_ENT=
128811245024SmrgBUILDTXTDOC=no
128911245024SmrgBUILDPDFDOC=no
129011245024SmrgBUILDPSDOC=no
129111245024SmrgBUILDHTMLDOC=no
129211245024Smrg
129311245024SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
129411245024Smrg
129511245024SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
129611245024SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
129711245024SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
129811245024SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
129911245024Smrg
130011245024SmrgAC_MSG_CHECKING([Whether to build text documentation])
130111245024Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
130211245024Smrg   test x$BUILD_TXTDOC != xno; then
130311245024Smrg	BUILDTXTDOC=yes
130411245024Smrgfi
130511245024SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
130611245024SmrgAC_MSG_RESULT([$BUILDTXTDOC])
130741b2f0bdSmrg
130811245024SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
130911245024Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
131011245024Smrg   test x$BUILD_PDFDOC != xno; then
131111245024Smrg	BUILDPDFDOC=yes
131211245024Smrgfi
131311245024SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
131411245024SmrgAC_MSG_RESULT([$BUILDPDFDOC])
131541b2f0bdSmrg
131611245024SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
131711245024Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
131811245024Smrg   test x$BUILD_PSDOC != xno; then
131911245024Smrg	BUILDPSDOC=yes
132011245024Smrgfi
132111245024SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
132211245024SmrgAC_MSG_RESULT([$BUILDPSDOC])
132341b2f0bdSmrg
132411245024SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
132511245024Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
132611245024Smrg   test x$BUILD_HTMLDOC != xno; then
132711245024Smrg	BUILDHTMLDOC=yes
132811245024Smrgfi
132911245024SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
133011245024SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
133141b2f0bdSmrg
133211245024SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
133311245024SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
133411245024SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
133511245024SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
133641b2f0bdSmrg
133711245024SmrgAC_SUBST(MAKE_TEXT)
133811245024SmrgAC_SUBST(MAKE_PS)
133911245024SmrgAC_SUBST(MAKE_PDF)
134011245024SmrgAC_SUBST(MAKE_HTML)
134111245024Smrg]) # XORG_CHECK_DOCBOOK
134241b2f0bdSmrg
134311245024Smrg# XORG_CHECK_MALLOC_ZERO
134411245024Smrg# ----------------------
134511245024Smrg# Minimum version: 1.0.0
134611245024Smrg#
134711245024Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
134811245024Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
134911245024Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
135011245024SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
135111245024SmrgAC_ARG_ENABLE(malloc0returnsnull,
135211245024Smrg	AS_HELP_STRING([--enable-malloc0returnsnull],
135311245024Smrg		       [malloc(0) returns NULL (default: auto)]),
135411245024Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
135511245024Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
135641b2f0bdSmrg
135711245024SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
135811245024Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
135911245024Smrg	AC_RUN_IFELSE([
136011245024Smrgchar *malloc();
136111245024Smrgchar *realloc();
136211245024Smrgchar *calloc();
136311245024Smrgmain() {
136411245024Smrg    char *m0, *r0, *c0, *p;
136511245024Smrg    m0 = malloc(0);
136611245024Smrg    p = malloc(10);
136711245024Smrg    r0 = realloc(p,0);
136811245024Smrg    c0 = calloc(0);
136911245024Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
137011245024Smrg}],
137111245024Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
137211245024Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
137311245024Smrgfi
137411245024SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
137541b2f0bdSmrg
137611245024Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
137711245024Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
137811245024Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
137911245024Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
138011245024Smrgelse
138111245024Smrg	MALLOC_ZERO_CFLAGS=""
138211245024Smrg	XMALLOC_ZERO_CFLAGS=""
138311245024Smrg	XTMALLOC_ZERO_CFLAGS=""
138411245024Smrgfi
138541b2f0bdSmrg
138611245024SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
138711245024SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
138811245024SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
138911245024Smrg]) # XORG_CHECK_MALLOC_ZERO
139041b2f0bdSmrg
139111245024Smrg# XORG_WITH_LINT()
139211245024Smrg# ----------------
139311245024Smrg# Minimum version: 1.1.0
139411245024Smrg#
139511245024Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
139611245024Smrg# is specified.   (Use --with-lint=sparse for sparse.)
139711245024Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
139811245024Smrg# Sets $LINT_FLAGS to flags to pass to source checker
139911245024Smrg# Sets LINT automake conditional if enabled (default: disabled)
140011245024Smrg#
140111245024SmrgAC_DEFUN([XORG_WITH_LINT],[
140211245024Smrg
140311245024Smrg# Allow checking code with lint, sparse, etc.
140411245024SmrgAC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
140511245024Smrg		[Use a lint-style source code checker (default: disabled)])],
140611245024Smrg		[use_lint=$withval], [use_lint=no])
140711245024Smrgif test "x$use_lint" = "xyes" ; then
140811245024Smrg	LINT="lint"
140911245024Smrgelse
141011245024Smrg	LINT="$use_lint"
141111245024Smrgfi
141211245024Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
141311245024Smrg    case $LINT in
141411245024Smrg	lint|*/lint)
141511245024Smrg	    case $host_os in
141611245024Smrg		solaris*)
141711245024Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
141811245024Smrg			;;
141911245024Smrg	    esac
142011245024Smrg	    ;;
142141b2f0bdSmrg    esac
142211245024Smrgfi
142341b2f0bdSmrg
142411245024SmrgAC_SUBST(LINT)
142511245024SmrgAC_SUBST(LINT_FLAGS)
142611245024SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
142741b2f0bdSmrg
142811245024Smrg]) # XORG_WITH_LINT
142941b2f0bdSmrg
143011245024Smrg# XORG_LINT_LIBRARY(LIBNAME)
143111245024Smrg# --------------------------
143211245024Smrg# Minimum version: 1.1.0
143311245024Smrg#
143411245024Smrg# Sets up flags for building lint libraries for checking programs that call
143511245024Smrg# functions in the library.
143611245024Smrg# Disabled by default, enable with --enable-lint-library
143711245024Smrg# Sets: 
143811245024Smrg#	@LINTLIB@		- name of lint library file to make
143911245024Smrg#	MAKE_LINT_LIB		- automake conditional
144011245024Smrg#
144141b2f0bdSmrg
144211245024SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
144311245024SmrgAC_REQUIRE([XORG_WITH_LINT])
144411245024Smrg# Build lint "library" for more indepth checks of programs calling this library
144511245024SmrgAC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
144611245024Smrg	[Create lint library (default: disabled)])],
144711245024Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
144811245024Smrgif test "x$make_lint_lib" != "xno" ; then
144911245024Smrg	if test "x$LINT" = "xno" ; then
145011245024Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
145111245024Smrg	fi
145211245024Smrg	if test "x$make_lint_lib" = "xyes" ; then
145311245024Smrg		LINTLIB=llib-l$1.ln
145441b2f0bdSmrg	else
145511245024Smrg		LINTLIB=$make_lint_lib
145611245024Smrg	fi
145711245024Smrgfi
145811245024SmrgAC_SUBST(LINTLIB)
145911245024SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
146011245024Smrg
146111245024Smrg]) # XORG_LINT_LIBRARY
146211245024Smrg
146311245024Smrg# XORG_CWARNFLAGS
146411245024Smrg# ---------------
146511245024Smrg# Minimum version: 1.2.0
146611245024Smrg#
146711245024Smrg# Defines CWARNFLAGS to enable C compiler warnings.
146811245024Smrg#
146911245024SmrgAC_DEFUN([XORG_CWARNFLAGS], [
147011245024SmrgAC_REQUIRE([AC_PROG_CC])
147111245024Smrgif  test "x$GCC" = xyes ; then
147211245024Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
147311245024Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
147411245024Smrg-Wbad-function-cast"
147511245024Smrg    case `$CC -dumpversion` in
147611245024Smrg    3.4.* | 4.*)
147711245024Smrg	CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
147811245024Smrg	;;
147941b2f0bdSmrg    esac
148011245024Smrgelse
148111245024Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
148211245024Smrg    if test "x$SUNCC" = "xyes"; then
148311245024Smrg	CWARNFLAGS="-v"
148411245024Smrg    fi
148511245024Smrgfi
148611245024SmrgAC_SUBST(CWARNFLAGS)
148711245024Smrgm4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
148811245024Smrg]) # XORG_CWARNFLAGS
148941b2f0bdSmrg
149011245024Smrg# XORG_STRICT_OPTION
149111245024Smrg# -----------------------
149211245024Smrg# Minimum version: 1.3.0
149311245024Smrg#
149411245024Smrg# Add configure option to enable strict compilation
149511245024SmrgAC_DEFUN([XORG_STRICT_OPTION], [
149611245024SmrgAC_REQUIRE([AC_PROG_CC])
149711245024SmrgAC_REQUIRE([AC_PROG_CC_C99])
149811245024SmrgAC_REQUIRE([XORG_CWARNFLAGS])
149911245024Smrg
150011245024SmrgAC_ARG_ENABLE(strict-compilation,
150111245024Smrg			  AS_HELP_STRING([--enable-strict-compilation],
150211245024Smrg			  [Enable all warnings from compiler and make them errors (default: disabled)]),
150311245024Smrg			  [STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
150411245024Smrgif test "x$STRICT_COMPILE" = "xyes"; then
150511245024Smrg	AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
150611245024Smrg	AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
150711245024Smrg	if test "x$GCC" = xyes ; then
150811245024Smrg		STRICT_CFLAGS="-pedantic -Werror"
150911245024Smrg	elif test "x$SUNCC" = "xyes"; then
151011245024Smrg		STRICT_CFLAGS="-errwarn"
151111245024Smrg    elif test "x$INTELCC" = "xyes"; then
151211245024Smrg		STRICT_CFLAGS="-Werror"
151311245024Smrg	fi
151411245024Smrgfi
151511245024SmrgCWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
151611245024SmrgAC_SUBST([CWARNFLAGS])
151711245024Smrg]) # XORG_STRICT_OPTION
151841b2f0bdSmrg
151911245024Smrg# XORG_DEFAULT_OPTIONS
152011245024Smrg# --------------------
152111245024Smrg# Minimum version: 1.3.0
152211245024Smrg#
152311245024Smrg# Defines default options for X.Org modules.
152411245024Smrg#
152511245024SmrgAC_DEFUN([XORG_DEFAULT_OPTIONS], [
152611245024SmrgXORG_CWARNFLAGS
152711245024SmrgXORG_STRICT_OPTION
152811245024SmrgXORG_RELEASE_VERSION
152911245024SmrgXORG_CHANGELOG
153011245024SmrgXORG_MANPAGE_SECTIONS
153111245024Smrg]) # XORG_DEFAULT_OPTIONS
153211245024Smrgdnl Copyright 2005 Red Hat, Inc
153311245024Smrgdnl
153411245024Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
153511245024Smrgdnl documentation for any purpose is hereby granted without fee, provided that
153611245024Smrgdnl the above copyright notice appear in all copies and that both that
153711245024Smrgdnl copyright notice and this permission notice appear in supporting
153811245024Smrgdnl documentation.
153911245024Smrgdnl
154011245024Smrgdnl The above copyright notice and this permission notice shall be included
154111245024Smrgdnl in all copies or substantial portions of the Software.
154211245024Smrgdnl
154311245024Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
154411245024Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
154511245024Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
154611245024Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
154711245024Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
154811245024Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
154911245024Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
155011245024Smrgdnl
155111245024Smrgdnl Except as contained in this notice, the name of the copyright holders shall
155211245024Smrgdnl not be used in advertising or otherwise to promote the sale, use or
155311245024Smrgdnl other dealings in this Software without prior written authorization
155411245024Smrgdnl from the copyright holders.
155511245024Smrgdnl
155641b2f0bdSmrg
155711245024Smrg# XORG_RELEASE_VERSION
155811245024Smrg# --------------------
155911245024Smrg# Adds --with/without-release-string and changes the PACKAGE and
156011245024Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
156111245024Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
156211245024Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
156311245024Smrg 
156411245024SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
156511245024Smrg	AC_ARG_WITH(release-version,
156611245024Smrg			AS_HELP_STRING([--with-release-version=STRING],
156711245024Smrg				[Use release version string in package name]),
156811245024Smrg			[RELEASE_VERSION="$withval"],
156911245024Smrg			[RELEASE_VERSION=""])
157011245024Smrg	if test "x$RELEASE_VERSION" != "x"; then
157111245024Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
157211245024Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
157311245024Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
157411245024Smrg	fi
157511245024Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
157611245024Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
157711245024Smrg		[Major version of this package])
157811245024Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
157911245024Smrg	if test "x$PVM" = "x"; then
158011245024Smrg		PVM="0"
158111245024Smrg	fi
158211245024Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
158311245024Smrg		[$PVM],
158411245024Smrg		[Minor version of this package])
158511245024Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
158611245024Smrg	if test "x$PVP" = "x"; then
158711245024Smrg		PVP="0"
158811245024Smrg	fi
158911245024Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
159011245024Smrg		[$PVP],
159111245024Smrg		[Patch version of this package])
159211245024Smrg])
159341b2f0bdSmrg
159411245024Smrg# XORG_CHANGELOG()
159511245024Smrg# ----------------
159611245024Smrg# Minimum version: 1.2.0
159711245024Smrg#
159811245024Smrg# Defines the variable CHANGELOG_CMD as the command to generate
159911245024Smrg# ChangeLog from git.
160011245024Smrg#
160111245024Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
160211245024Smrg#
160311245024SmrgAC_DEFUN([XORG_CHANGELOG], [
160411245024SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
160511245024Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
160611245024Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
160711245024SmrgAC_SUBST([CHANGELOG_CMD])
160811245024SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
160911245024Smrg]) # XORG_CHANGELOG
161041b2f0bdSmrg
161111245024Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
161241b2f0bdSmrg
161311245024Smrg# serial 52 AC_PROG_LIBTOOL
161441b2f0bdSmrg
161541b2f0bdSmrg
161611245024Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
161711245024Smrg# -----------------------------------------------------------
161811245024Smrg# If this macro is not defined by Autoconf, define it here.
161911245024Smrgm4_ifdef([AC_PROVIDE_IFELSE],
162011245024Smrg         [],
162111245024Smrg         [m4_define([AC_PROVIDE_IFELSE],
162211245024Smrg	         [m4_ifdef([AC_PROVIDE_$1],
162311245024Smrg		           [$2], [$3])])])
162441b2f0bdSmrg
162541b2f0bdSmrg
162611245024Smrg# AC_PROG_LIBTOOL
162711245024Smrg# ---------------
162811245024SmrgAC_DEFUN([AC_PROG_LIBTOOL],
162911245024Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
163011245024Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
163111245024Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
163211245024Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
163311245024Smrg    [AC_LIBTOOL_CXX],
163411245024Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
163511245024Smrg  ])])
163611245024Smrgdnl And a similar setup for Fortran 77 support
163711245024Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
163811245024Smrg    [AC_LIBTOOL_F77],
163911245024Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
164011245024Smrg])])
164141b2f0bdSmrg
164211245024Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
164311245024Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
164411245024Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
164511245024Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
164611245024Smrg    [AC_LIBTOOL_GCJ],
164711245024Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
164811245024Smrg      [AC_LIBTOOL_GCJ],
164911245024Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
165011245024Smrg	[AC_LIBTOOL_GCJ],
165111245024Smrg      [ifdef([AC_PROG_GCJ],
165211245024Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
165311245024Smrg       ifdef([A][M_PROG_GCJ],
165411245024Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
165511245024Smrg       ifdef([LT_AC_PROG_GCJ],
165611245024Smrg	     [define([LT_AC_PROG_GCJ],
165711245024Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
165811245024Smrg])])# AC_PROG_LIBTOOL
165941b2f0bdSmrg
166041b2f0bdSmrg
166111245024Smrg# _AC_PROG_LIBTOOL
166211245024Smrg# ----------------
166311245024SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
166411245024Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
166511245024SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
166611245024SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
166711245024SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
166841b2f0bdSmrg
166911245024Smrg# This can be used to rebuild libtool when needed
167011245024SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
167141b2f0bdSmrg
167211245024Smrg# Always use our own libtool.
167311245024SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
167411245024SmrgAC_SUBST(LIBTOOL)dnl
167541b2f0bdSmrg
167611245024Smrg# Prevent multiple expansion
167711245024Smrgdefine([AC_PROG_LIBTOOL], [])
167811245024Smrg])# _AC_PROG_LIBTOOL
167941b2f0bdSmrg
168041b2f0bdSmrg
168111245024Smrg# AC_LIBTOOL_SETUP
168211245024Smrg# ----------------
168311245024SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
168411245024Smrg[AC_PREREQ(2.50)dnl
168511245024SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
168611245024SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
168711245024SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
168811245024SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
168911245024SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
169011245024SmrgAC_REQUIRE([AC_PROG_CC])dnl
169111245024SmrgAC_REQUIRE([AC_PROG_LD])dnl
169211245024SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
169311245024SmrgAC_REQUIRE([AC_PROG_NM])dnl
169441b2f0bdSmrg
169511245024SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
169611245024SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
169711245024Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
169811245024SmrgAC_REQUIRE([AC_OBJEXT])dnl
169911245024SmrgAC_REQUIRE([AC_EXEEXT])dnl
170011245024Smrgdnl
170111245024SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
170211245024SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
170311245024SmrgAC_LIBTOOL_OBJDIR
170441b2f0bdSmrg
170511245024SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
170611245024Smrg_LT_AC_PROG_ECHO_BACKSLASH
170741b2f0bdSmrg
170811245024Smrgcase $host_os in
170911245024Smrgaix3*)
171011245024Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
171111245024Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
171211245024Smrg  # vanish in a puff of smoke.
171311245024Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
171411245024Smrg    COLLECT_NAMES=
171511245024Smrg    export COLLECT_NAMES
171641b2f0bdSmrg  fi
171711245024Smrg  ;;
171811245024Smrgesac
171941b2f0bdSmrg
172011245024Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
172111245024Smrg# metacharacters that are still active within double-quoted strings.
172211245024SmrgXsed='sed -e 1s/^X//'
172311245024Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
172441b2f0bdSmrg
172511245024Smrg# Same as above, but do not quote variable references.
172611245024Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
172741b2f0bdSmrg
172811245024Smrg# Sed substitution to delay expansion of an escaped shell variable in a
172911245024Smrg# double_quote_subst'ed string.
173011245024Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
173141b2f0bdSmrg
173211245024Smrg# Sed substitution to avoid accidental globbing in evaled expressions
173311245024Smrgno_glob_subst='s/\*/\\\*/g'
173441b2f0bdSmrg
173511245024Smrg# Constants:
173611245024Smrgrm="rm -f"
173741b2f0bdSmrg
173811245024Smrg# Global variables:
173911245024Smrgdefault_ofile=libtool
174011245024Smrgcan_build_shared=yes
174141b2f0bdSmrg
174211245024Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
174311245024Smrg# which needs '.lib').
174411245024Smrglibext=a
174511245024Smrgltmain="$ac_aux_dir/ltmain.sh"
174611245024Smrgofile="$default_ofile"
174711245024Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
174841b2f0bdSmrg
174911245024SmrgAC_CHECK_TOOL(AR, ar, false)
175011245024SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
175111245024SmrgAC_CHECK_TOOL(STRIP, strip, :)
175241b2f0bdSmrg
175311245024Smrgold_CC="$CC"
175411245024Smrgold_CFLAGS="$CFLAGS"
175541b2f0bdSmrg
175611245024Smrg# Set sane defaults for various variables
175711245024Smrgtest -z "$AR" && AR=ar
175811245024Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
175911245024Smrgtest -z "$AS" && AS=as
176011245024Smrgtest -z "$CC" && CC=cc
176111245024Smrgtest -z "$LTCC" && LTCC=$CC
176211245024Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
176311245024Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
176411245024Smrgtest -z "$LD" && LD=ld
176511245024Smrgtest -z "$LN_S" && LN_S="ln -s"
176611245024Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
176711245024Smrgtest -z "$NM" && NM=nm
176811245024Smrgtest -z "$SED" && SED=sed
176911245024Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
177011245024Smrgtest -z "$RANLIB" && RANLIB=:
177111245024Smrgtest -z "$STRIP" && STRIP=:
177211245024Smrgtest -z "$ac_objext" && ac_objext=o
177341b2f0bdSmrg
177411245024Smrg# Determine commands to create old-style static archives.
177511245024Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
177611245024Smrgold_postinstall_cmds='chmod 644 $oldlib'
177711245024Smrgold_postuninstall_cmds=
177841b2f0bdSmrg
177911245024Smrgif test -n "$RANLIB"; then
178011245024Smrg  case $host_os in
178111245024Smrg  openbsd*)
178211245024Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
178311245024Smrg    ;;
178411245024Smrg  *)
178511245024Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
178611245024Smrg    ;;
178711245024Smrg  esac
178811245024Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
178941b2f0bdSmrgfi
179041b2f0bdSmrg
179111245024Smrg_LT_CC_BASENAME([$compiler])
179241b2f0bdSmrg
179311245024Smrg# Only perform the check for file, if the check method requires it
179411245024Smrgcase $deplibs_check_method in
179511245024Smrgfile_magic*)
179611245024Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
179711245024Smrg    AC_PATH_MAGIC
179811245024Smrg  fi
179911245024Smrg  ;;
180011245024Smrgesac
180141b2f0bdSmrg
180211245024Smrg_LT_REQUIRED_DARWIN_CHECKS
180341b2f0bdSmrg
180411245024SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
180511245024SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
180611245024Smrgenable_win32_dll=yes, enable_win32_dll=no)
180741b2f0bdSmrg
180811245024SmrgAC_ARG_ENABLE([libtool-lock],
180911245024Smrg    [AC_HELP_STRING([--disable-libtool-lock],
181011245024Smrg	[avoid locking (might break parallel builds)])])
181111245024Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
181241b2f0bdSmrg
181311245024SmrgAC_ARG_WITH([pic],
181411245024Smrg    [AC_HELP_STRING([--with-pic],
181511245024Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
181611245024Smrg    [pic_mode="$withval"],
181711245024Smrg    [pic_mode=default])
181811245024Smrgtest -z "$pic_mode" && pic_mode=default
181941b2f0bdSmrg
182011245024Smrg# Use C for the default configuration in the libtool script
182111245024Smrgtagname=
182211245024SmrgAC_LIBTOOL_LANG_C_CONFIG
182311245024Smrg_LT_AC_TAGCONFIG
182411245024Smrg])# AC_LIBTOOL_SETUP
182541b2f0bdSmrg
182641b2f0bdSmrg
182711245024Smrg# _LT_AC_SYS_COMPILER
182811245024Smrg# -------------------
182911245024SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
183011245024Smrg[AC_REQUIRE([AC_PROG_CC])dnl
183141b2f0bdSmrg
183211245024Smrg# If no C compiler was specified, use CC.
183311245024SmrgLTCC=${LTCC-"$CC"}
183441b2f0bdSmrg
183511245024Smrg# If no C compiler flags were specified, use CFLAGS.
183611245024SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
183741b2f0bdSmrg
183811245024Smrg# Allow CC to be a program name with arguments.
183911245024Smrgcompiler=$CC
184011245024Smrg])# _LT_AC_SYS_COMPILER
184141b2f0bdSmrg
184241b2f0bdSmrg
184311245024Smrg# _LT_CC_BASENAME(CC)
184411245024Smrg# -------------------
184511245024Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
184611245024SmrgAC_DEFUN([_LT_CC_BASENAME],
184711245024Smrg[for cc_temp in $1""; do
184811245024Smrg  case $cc_temp in
184911245024Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
185011245024Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
185111245024Smrg    \-*) ;;
185211245024Smrg    *) break;;
185311245024Smrg  esac
185411245024Smrgdone
185511245024Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
185611245024Smrg])
185741b2f0bdSmrg
185841b2f0bdSmrg
185911245024Smrg# _LT_COMPILER_BOILERPLATE
186011245024Smrg# ------------------------
186111245024Smrg# Check for compiler boilerplate output or warnings with
186211245024Smrg# the simple compiler test code.
186311245024SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
186411245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
186511245024Smrgac_outfile=conftest.$ac_objext
186611245024Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
186711245024Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
186811245024Smrg_lt_compiler_boilerplate=`cat conftest.err`
186911245024Smrg$rm conftest*
187011245024Smrg])# _LT_COMPILER_BOILERPLATE
187141b2f0bdSmrg
187241b2f0bdSmrg
187311245024Smrg# _LT_LINKER_BOILERPLATE
187411245024Smrg# ----------------------
187511245024Smrg# Check for linker boilerplate output or warnings with
187611245024Smrg# the simple link test code.
187711245024SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
187811245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
187911245024Smrgac_outfile=conftest.$ac_objext
188011245024Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
188111245024Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
188211245024Smrg_lt_linker_boilerplate=`cat conftest.err`
188311245024Smrg$rm -r conftest*
188411245024Smrg])# _LT_LINKER_BOILERPLATE
188511245024Smrg
188611245024Smrg# _LT_REQUIRED_DARWIN_CHECKS
188741b2f0bdSmrg# --------------------------
188811245024Smrg# Check for some things on darwin
188911245024SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
189011245024Smrg  case $host_os in
189111245024Smrg    rhapsody* | darwin*)
189211245024Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
189311245024Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
189411245024Smrg
189511245024Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
189611245024Smrg      [lt_cv_apple_cc_single_mod=no
189711245024Smrg      if test -z "${LT_MULTI_MODULE}"; then
189811245024Smrg   # By default we will add the -single_module flag. You can override
189911245024Smrg   # by either setting the environment variable LT_MULTI_MODULE
190011245024Smrg   # non-empty at configure time, or by adding -multi_module to the
190111245024Smrg   # link flags.
190211245024Smrg   echo "int foo(void){return 1;}" > conftest.c
190311245024Smrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
190411245024Smrg     -dynamiclib ${wl}-single_module conftest.c
190511245024Smrg   if test -f libconftest.dylib; then
190611245024Smrg     lt_cv_apple_cc_single_mod=yes
190711245024Smrg     rm -rf libconftest.dylib*
190811245024Smrg   fi
190911245024Smrg   rm conftest.c
191011245024Smrg      fi])
191111245024Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
191211245024Smrg      [lt_cv_ld_exported_symbols_list],
191311245024Smrg      [lt_cv_ld_exported_symbols_list=no
191411245024Smrg      save_LDFLAGS=$LDFLAGS
191511245024Smrg      echo "_main" > conftest.sym
191611245024Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
191711245024Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
191811245024Smrg   [lt_cv_ld_exported_symbols_list=yes],
191911245024Smrg   [lt_cv_ld_exported_symbols_list=no])
192011245024Smrg   LDFLAGS="$save_LDFLAGS"
192111245024Smrg    ])
192211245024Smrg    case $host_os in
192311245024Smrg    rhapsody* | darwin1.[[0123]])
192411245024Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
192511245024Smrg    darwin1.*)
192611245024Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
192711245024Smrg    darwin*)
192811245024Smrg      # if running on 10.5 or later, the deployment target defaults
192911245024Smrg      # to the OS version, if on x86, and 10.4, the deployment
193011245024Smrg      # target defaults to 10.4. Don't you love it?
193111245024Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
193211245024Smrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
193311245024Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
193411245024Smrg   10.[[012]]*)
193511245024Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
193611245024Smrg   10.*)
193711245024Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
193811245024Smrg      esac
193911245024Smrg    ;;
194011245024Smrg  esac
194111245024Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
194211245024Smrg      _lt_dar_single_mod='$single_module'
194311245024Smrg    fi
194411245024Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
194511245024Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
194611245024Smrg    else
194711245024Smrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
194811245024Smrg    fi
194911245024Smrg    if test "$DSYMUTIL" != ":"; then
195011245024Smrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
195111245024Smrg    else
195211245024Smrg      _lt_dsymutil=
195311245024Smrg    fi
195411245024Smrg    ;;
195511245024Smrg  esac
195611245024Smrg])
195741b2f0bdSmrg
195811245024Smrg# _LT_AC_SYS_LIBPATH_AIX
195911245024Smrg# ----------------------
196011245024Smrg# Links a minimal program and checks the executable
196111245024Smrg# for the system default hardcoded library path. In most cases,
196211245024Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
196311245024Smrg# the location of the communication and MPI libs are included too.
196411245024Smrg# If we don't find anything, use the default library path according
196511245024Smrg# to the aix ld manual.
196611245024SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
196711245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
196811245024SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
196911245024Smrglt_aix_libpath_sed='
197011245024Smrg    /Import File Strings/,/^$/ {
197111245024Smrg	/^0/ {
197211245024Smrg	    s/^0  *\(.*\)$/\1/
197311245024Smrg	    p
197411245024Smrg	}
197511245024Smrg    }'
197611245024Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
197711245024Smrg# Check for a 64-bit object if we didn't find anything.
197811245024Smrgif test -z "$aix_libpath"; then
197911245024Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
198011245024Smrgfi],[])
198111245024Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
198211245024Smrg])# _LT_AC_SYS_LIBPATH_AIX
198341b2f0bdSmrg
198441b2f0bdSmrg
198511245024Smrg# _LT_AC_SHELL_INIT(ARG)
198611245024Smrg# ----------------------
198711245024SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
198811245024Smrg[ifdef([AC_DIVERSION_NOTICE],
198911245024Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
199011245024Smrg	 [AC_DIVERT_PUSH(NOTICE)])
199111245024Smrg$1
199211245024SmrgAC_DIVERT_POP
199311245024Smrg])# _LT_AC_SHELL_INIT
199441b2f0bdSmrg
199511245024Smrg
199611245024Smrg# _LT_AC_PROG_ECHO_BACKSLASH
199711245024Smrg# --------------------------
199811245024Smrg# Add some code to the start of the generated configure script which
199911245024Smrg# will find an echo command which doesn't interpret backslashes.
200011245024SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
200111245024Smrg[_LT_AC_SHELL_INIT([
200211245024Smrg# Check that we are running under the correct shell.
200311245024SmrgSHELL=${CONFIG_SHELL-/bin/sh}
200411245024Smrg
200511245024Smrgcase X$ECHO in
200611245024SmrgX*--fallback-echo)
200711245024Smrg  # Remove one level of quotation (which was required for Make).
200811245024Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
200941b2f0bdSmrg  ;;
201011245024Smrgesac
201141b2f0bdSmrg
201211245024Smrgecho=${ECHO-echo}
201311245024Smrgif test "X[$]1" = X--no-reexec; then
201411245024Smrg  # Discard the --no-reexec flag, and continue.
201511245024Smrg  shift
201611245024Smrgelif test "X[$]1" = X--fallback-echo; then
201711245024Smrg  # Avoid inline document here, it may be left over
201811245024Smrg  :
201911245024Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
202011245024Smrg  # Yippee, $echo works!
202111245024Smrg  :
202211245024Smrgelse
202311245024Smrg  # Restart under the correct shell.
202411245024Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
202511245024Smrgfi
202641b2f0bdSmrg
202711245024Smrgif test "X[$]1" = X--fallback-echo; then
202811245024Smrg  # used as fallback echo
202911245024Smrg  shift
203011245024Smrg  cat <<EOF
203111245024Smrg[$]*
203241b2f0bdSmrgEOF
203311245024Smrg  exit 0
203411245024Smrgfi
203511245024Smrg
203611245024Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
203711245024Smrg# if CDPATH is set.
203811245024Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
203911245024Smrg
204011245024Smrgif test -z "$ECHO"; then
204111245024Smrgif test "X${echo_test_string+set}" != Xset; then
204211245024Smrg# find a string as large as possible, as long as the shell can cope with it
204311245024Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
204411245024Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
204511245024Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
204611245024Smrg       echo_test_string=`eval $cmd` &&
204711245024Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
204811245024Smrg    then
204941b2f0bdSmrg      break
205041b2f0bdSmrg    fi
205141b2f0bdSmrg  done
205241b2f0bdSmrgfi
205341b2f0bdSmrg
205411245024Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
205511245024Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
205611245024Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
205711245024Smrg  :
205811245024Smrgelse
205911245024Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
206011245024Smrg  # backslashes.  This makes it impossible to quote backslashes using
206111245024Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
206211245024Smrg  #
206311245024Smrg  # So, first we look for a working echo in the user's PATH.
206441b2f0bdSmrg
206541b2f0bdSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
206611245024Smrg  for dir in $PATH /usr/ucb; do
206741b2f0bdSmrg    IFS="$lt_save_ifs"
206811245024Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
206911245024Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
207011245024Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
207111245024Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
207211245024Smrg      echo="$dir/echo"
207311245024Smrg      break
207441b2f0bdSmrg    fi
207541b2f0bdSmrg  done
207641b2f0bdSmrg  IFS="$lt_save_ifs"
207741b2f0bdSmrg
207811245024Smrg  if test "X$echo" = Xecho; then
207911245024Smrg    # We didn't find a better echo, so look for alternatives.
208011245024Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
208111245024Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
208211245024Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
208311245024Smrg      # This shell has a builtin print -r that does the trick.
208411245024Smrg      echo='print -r'
208511245024Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
208611245024Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
208711245024Smrg      # If we have ksh, try running configure again with it.
208811245024Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
208911245024Smrg      export ORIGINAL_CONFIG_SHELL
209011245024Smrg      CONFIG_SHELL=/bin/ksh
209111245024Smrg      export CONFIG_SHELL
209211245024Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
209341b2f0bdSmrg    else
209411245024Smrg      # Try using printf.
209511245024Smrg      echo='printf %s\n'
209611245024Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
209711245024Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
209811245024Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
209911245024Smrg	# Cool, printf works
210011245024Smrg	:
210111245024Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
210211245024Smrg	   test "X$echo_testing_string" = 'X\t' &&
210311245024Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
210411245024Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
210511245024Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
210611245024Smrg	export CONFIG_SHELL
210711245024Smrg	SHELL="$CONFIG_SHELL"
210811245024Smrg	export SHELL
210911245024Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
211011245024Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
211111245024Smrg	   test "X$echo_testing_string" = 'X\t' &&
211211245024Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
211311245024Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
211411245024Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
211511245024Smrg      else
211611245024Smrg	# maybe with a smaller string...
211711245024Smrg	prev=:
211841b2f0bdSmrg
211911245024Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
212011245024Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
212111245024Smrg	  then
212211245024Smrg	    break
212311245024Smrg	  fi
212411245024Smrg	  prev="$cmd"
212511245024Smrg	done
212641b2f0bdSmrg
212711245024Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
212811245024Smrg	  echo_test_string=`eval $prev`
212911245024Smrg	  export echo_test_string
213011245024Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
213111245024Smrg	else
213211245024Smrg	  # Oops.  We lost completely, so just stick with echo.
213311245024Smrg	  echo=echo
213411245024Smrg	fi
213511245024Smrg      fi
213611245024Smrg    fi
213711245024Smrg  fi
213811245024Smrgfi
213911245024Smrgfi
214041b2f0bdSmrg
214111245024Smrg# Copy echo and quote the copy suitably for passing to libtool from
214211245024Smrg# the Makefile, instead of quoting the original, which is used later.
214311245024SmrgECHO=$echo
214411245024Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
214511245024Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
214611245024Smrgfi
214741b2f0bdSmrg
214811245024SmrgAC_SUBST(ECHO)
214911245024Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
215041b2f0bdSmrg
215141b2f0bdSmrg
215211245024Smrg# _LT_AC_LOCK
215311245024Smrg# -----------
215411245024SmrgAC_DEFUN([_LT_AC_LOCK],
215511245024Smrg[AC_ARG_ENABLE([libtool-lock],
215611245024Smrg    [AC_HELP_STRING([--disable-libtool-lock],
215711245024Smrg	[avoid locking (might break parallel builds)])])
215811245024Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
215941b2f0bdSmrg
216011245024Smrg# Some flags need to be propagated to the compiler or linker for good
216111245024Smrg# libtool support.
216211245024Smrgcase $host in
216311245024Smrgia64-*-hpux*)
216411245024Smrg  # Find out which ABI we are using.
216511245024Smrg  echo 'int i;' > conftest.$ac_ext
216611245024Smrg  if AC_TRY_EVAL(ac_compile); then
216711245024Smrg    case `/usr/bin/file conftest.$ac_objext` in
216811245024Smrg    *ELF-32*)
216911245024Smrg      HPUX_IA64_MODE="32"
217011245024Smrg      ;;
217111245024Smrg    *ELF-64*)
217211245024Smrg      HPUX_IA64_MODE="64"
217341b2f0bdSmrg      ;;
217441b2f0bdSmrg    esac
217541b2f0bdSmrg  fi
217611245024Smrg  rm -rf conftest*
217741b2f0bdSmrg  ;;
217811245024Smrg*-*-irix6*)
217911245024Smrg  # Find out which ABI we are using.
218011245024Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
218111245024Smrg  if AC_TRY_EVAL(ac_compile); then
218211245024Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
218311245024Smrg    case `/usr/bin/file conftest.$ac_objext` in
218411245024Smrg    *32-bit*)
218511245024Smrg      LD="${LD-ld} -melf32bsmip"
218611245024Smrg      ;;
218711245024Smrg    *N32*)
218811245024Smrg      LD="${LD-ld} -melf32bmipn32"
218911245024Smrg      ;;
219011245024Smrg    *64-bit*)
219111245024Smrg      LD="${LD-ld} -melf64bmip"
219211245024Smrg      ;;
219311245024Smrg    esac
219411245024Smrg   else
219511245024Smrg    case `/usr/bin/file conftest.$ac_objext` in
219611245024Smrg    *32-bit*)
219711245024Smrg      LD="${LD-ld} -32"
219811245024Smrg      ;;
219911245024Smrg    *N32*)
220011245024Smrg      LD="${LD-ld} -n32"
220111245024Smrg      ;;
220211245024Smrg    *64-bit*)
220311245024Smrg      LD="${LD-ld} -64"
220411245024Smrg      ;;
220511245024Smrg    esac
220611245024Smrg   fi
220711245024Smrg  fi
220811245024Smrg  rm -rf conftest*
220941b2f0bdSmrg  ;;
221041b2f0bdSmrg
221111245024Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
221211245024Smrgs390*-*linux*|sparc*-*linux*)
221311245024Smrg  # Find out which ABI we are using.
221411245024Smrg  echo 'int i;' > conftest.$ac_ext
221511245024Smrg  if AC_TRY_EVAL(ac_compile); then
221611245024Smrg    case `/usr/bin/file conftest.o` in
221711245024Smrg    *32-bit*)
221811245024Smrg      case $host in
221911245024Smrg        x86_64-*kfreebsd*-gnu)
222011245024Smrg          LD="${LD-ld} -m elf_i386_fbsd"
222111245024Smrg          ;;
222211245024Smrg        x86_64-*linux*)
222311245024Smrg          LD="${LD-ld} -m elf_i386"
222411245024Smrg          ;;
222511245024Smrg        ppc64-*linux*|powerpc64-*linux*)
222611245024Smrg          LD="${LD-ld} -m elf32ppclinux"
222711245024Smrg          ;;
222811245024Smrg        s390x-*linux*)
222911245024Smrg          LD="${LD-ld} -m elf_s390"
223011245024Smrg          ;;
223111245024Smrg        sparc64-*linux*)
223211245024Smrg          LD="${LD-ld} -m elf32_sparc"
223311245024Smrg          ;;
223411245024Smrg      esac
223511245024Smrg      ;;
223611245024Smrg    *64-bit*)
223711245024Smrg      case $host in
223811245024Smrg        x86_64-*kfreebsd*-gnu)
223911245024Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
224011245024Smrg          ;;
224111245024Smrg        x86_64-*linux*)
224211245024Smrg          LD="${LD-ld} -m elf_x86_64"
224311245024Smrg          ;;
224411245024Smrg        ppc*-*linux*|powerpc*-*linux*)
224511245024Smrg          LD="${LD-ld} -m elf64ppc"
224611245024Smrg          ;;
224711245024Smrg        s390*-*linux*)
224811245024Smrg          LD="${LD-ld} -m elf64_s390"
224911245024Smrg          ;;
225011245024Smrg        sparc*-*linux*)
225111245024Smrg          LD="${LD-ld} -m elf64_sparc"
225211245024Smrg          ;;
225311245024Smrg      esac
225411245024Smrg      ;;
225511245024Smrg    esac
225611245024Smrg  fi
225711245024Smrg  rm -rf conftest*
225841b2f0bdSmrg  ;;
225941b2f0bdSmrg
226011245024Smrg*-*-sco3.2v5*)
226111245024Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
226211245024Smrg  SAVE_CFLAGS="$CFLAGS"
226311245024Smrg  CFLAGS="$CFLAGS -belf"
226411245024Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
226511245024Smrg    [AC_LANG_PUSH(C)
226611245024Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
226711245024Smrg     AC_LANG_POP])
226811245024Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
226911245024Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
227011245024Smrg    CFLAGS="$SAVE_CFLAGS"
227111245024Smrg  fi
227241b2f0bdSmrg  ;;
227311245024Smrgsparc*-*solaris*)
227411245024Smrg  # Find out which ABI we are using.
227511245024Smrg  echo 'int i;' > conftest.$ac_ext
227611245024Smrg  if AC_TRY_EVAL(ac_compile); then
227711245024Smrg    case `/usr/bin/file conftest.o` in
227811245024Smrg    *64-bit*)
227911245024Smrg      case $lt_cv_prog_gnu_ld in
228011245024Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
228111245024Smrg      *)
228211245024Smrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
228311245024Smrg	  LD="${LD-ld} -64"
228411245024Smrg	fi
228511245024Smrg	;;
228611245024Smrg      esac
228711245024Smrg      ;;
228811245024Smrg    esac
228911245024Smrg  fi
229011245024Smrg  rm -rf conftest*
229141b2f0bdSmrg  ;;
229241b2f0bdSmrg
229311245024SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
229411245024Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
229511245024Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
229611245024Smrg  AC_CHECK_TOOL(AS, as, false)
229711245024Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
229841b2f0bdSmrg  ;;
229911245024Smrg  ])
230011245024Smrgesac
230141b2f0bdSmrg
230211245024Smrgneed_locks="$enable_libtool_lock"
230341b2f0bdSmrg
230411245024Smrg])# _LT_AC_LOCK
230541b2f0bdSmrg
230641b2f0bdSmrg
230711245024Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
230811245024Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
230911245024Smrg# ----------------------------------------------------------------
231011245024Smrg# Check whether the given compiler option works
231111245024SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
231211245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])
231311245024SmrgAC_CACHE_CHECK([$1], [$2],
231411245024Smrg  [$2=no
231511245024Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
231611245024Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
231711245024Smrg   lt_compiler_flag="$3"
231811245024Smrg   # Insert the option either (1) after the last *FLAGS variable, or
231911245024Smrg   # (2) before a word containing "conftest.", or (3) at the end.
232011245024Smrg   # Note that $ac_compile itself does not contain backslashes and begins
232111245024Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
232211245024Smrg   # The option is referenced via a variable to avoid confusing sed.
232311245024Smrg   lt_compile=`echo "$ac_compile" | $SED \
232411245024Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
232511245024Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
232611245024Smrg   -e 's:$: $lt_compiler_flag:'`
232711245024Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
232811245024Smrg   (eval "$lt_compile" 2>conftest.err)
232911245024Smrg   ac_status=$?
233011245024Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
233111245024Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
233211245024Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
233311245024Smrg     # The compiler can only warn and ignore the option if not recognized
233411245024Smrg     # So say no if there are warnings other than the usual output.
233511245024Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
233611245024Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
233711245024Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
233811245024Smrg       $2=yes
233911245024Smrg     fi
234011245024Smrg   fi
234111245024Smrg   $rm conftest*
234211245024Smrg])
234341b2f0bdSmrg
234411245024Smrgif test x"[$]$2" = xyes; then
234511245024Smrg    ifelse([$5], , :, [$5])
234611245024Smrgelse
234711245024Smrg    ifelse([$6], , :, [$6])
234811245024Smrgfi
234911245024Smrg])# AC_LIBTOOL_COMPILER_OPTION
235041b2f0bdSmrg
235141b2f0bdSmrg
235211245024Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
235311245024Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
235411245024Smrg# ------------------------------------------------------------
235511245024Smrg# Check whether the given compiler option works
235611245024SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
235711245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
235811245024SmrgAC_CACHE_CHECK([$1], [$2],
235911245024Smrg  [$2=no
236011245024Smrg   save_LDFLAGS="$LDFLAGS"
236111245024Smrg   LDFLAGS="$LDFLAGS $3"
236211245024Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
236311245024Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
236411245024Smrg     # The linker can only warn and ignore the option if not recognized
236511245024Smrg     # So say no if there are warnings
236611245024Smrg     if test -s conftest.err; then
236711245024Smrg       # Append any errors to the config.log.
236811245024Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
236911245024Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
237011245024Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
237111245024Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
237211245024Smrg         $2=yes
237311245024Smrg       fi
237411245024Smrg     else
237511245024Smrg       $2=yes
237611245024Smrg     fi
237711245024Smrg   fi
237811245024Smrg   $rm -r conftest*
237911245024Smrg   LDFLAGS="$save_LDFLAGS"
238041b2f0bdSmrg])
238141b2f0bdSmrg
238211245024Smrgif test x"[$]$2" = xyes; then
238311245024Smrg    ifelse([$4], , :, [$4])
238441b2f0bdSmrgelse
238511245024Smrg    ifelse([$5], , :, [$5])
238611245024Smrgfi
238711245024Smrg])# AC_LIBTOOL_LINKER_OPTION
238841b2f0bdSmrg
238941b2f0bdSmrg
239011245024Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
239111245024Smrg# --------------------------
239211245024SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
239311245024Smrg[# find the maximum length of command line arguments
239411245024SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
239511245024SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
239611245024Smrg  i=0
239711245024Smrg  teststring="ABCD"
239841b2f0bdSmrg
239911245024Smrg  case $build_os in
240011245024Smrg  msdosdjgpp*)
240111245024Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
240211245024Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
240311245024Smrg    # during glob expansion).  Even if it were fixed, the result of this
240411245024Smrg    # check would be larger than it should be.
240511245024Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
240611245024Smrg    ;;
240741b2f0bdSmrg
240811245024Smrg  gnu*)
240911245024Smrg    # Under GNU Hurd, this test is not required because there is
241011245024Smrg    # no limit to the length of command line arguments.
241111245024Smrg    # Libtool will interpret -1 as no limit whatsoever
241211245024Smrg    lt_cv_sys_max_cmd_len=-1;
241311245024Smrg    ;;
241441b2f0bdSmrg
241511245024Smrg  cygwin* | mingw*)
241611245024Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
241711245024Smrg    # about 5 minutes as the teststring grows exponentially.
241811245024Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
241911245024Smrg    # you end up with a "frozen" computer, even though with patience
242011245024Smrg    # the test eventually succeeds (with a max line length of 256k).
242111245024Smrg    # Instead, let's just punt: use the minimum linelength reported by
242211245024Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
242311245024Smrg    lt_cv_sys_max_cmd_len=8192;
242411245024Smrg    ;;
242541b2f0bdSmrg
242611245024Smrg  amigaos*)
242711245024Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
242811245024Smrg    # So we just punt and use a minimum line length of 8192.
242911245024Smrg    lt_cv_sys_max_cmd_len=8192;
243011245024Smrg    ;;
243141b2f0bdSmrg
243211245024Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
243311245024Smrg    # This has been around since 386BSD, at least.  Likely further.
243411245024Smrg    if test -x /sbin/sysctl; then
243511245024Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
243611245024Smrg    elif test -x /usr/sbin/sysctl; then
243711245024Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
243811245024Smrg    else
243911245024Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
244011245024Smrg    fi
244111245024Smrg    # And add a safety zone
244211245024Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
244311245024Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
244411245024Smrg    ;;
244541b2f0bdSmrg
244611245024Smrg  interix*)
244711245024Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
244811245024Smrg    lt_cv_sys_max_cmd_len=196608
244911245024Smrg    ;;
245041b2f0bdSmrg
245111245024Smrg  osf*)
245211245024Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
245311245024Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
245411245024Smrg    # nice to cause kernel panics so lets avoid the loop below.
245511245024Smrg    # First set a reasonable default.
245611245024Smrg    lt_cv_sys_max_cmd_len=16384
245711245024Smrg    #
245811245024Smrg    if test -x /sbin/sysconfig; then
245911245024Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
246011245024Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
246111245024Smrg      esac
246211245024Smrg    fi
246311245024Smrg    ;;
246411245024Smrg  sco3.2v5*)
246511245024Smrg    lt_cv_sys_max_cmd_len=102400
246611245024Smrg    ;;
246711245024Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
246811245024Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
246911245024Smrg    if test -n "$kargmax"; then
247011245024Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
247111245024Smrg    else
247211245024Smrg      lt_cv_sys_max_cmd_len=32768
247311245024Smrg    fi
247411245024Smrg    ;;
247511245024Smrg  *)
247611245024Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
247711245024Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
247811245024Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
247911245024Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
248011245024Smrg    else
248111245024Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
248211245024Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
248311245024Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
248411245024Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
248511245024Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
248611245024Smrg	      test $i != 17 # 1/2 MB should be enough
248711245024Smrg      do
248811245024Smrg        i=`expr $i + 1`
248911245024Smrg        teststring=$teststring$teststring
249011245024Smrg      done
249111245024Smrg      teststring=
249211245024Smrg      # Add a significant safety factor because C++ compilers can tack on massive
249311245024Smrg      # amounts of additional arguments before passing them to the linker.
249411245024Smrg      # It appears as though 1/2 is a usable value.
249511245024Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
249611245024Smrg    fi
249711245024Smrg    ;;
249811245024Smrg  esac
249911245024Smrg])
250011245024Smrgif test -n $lt_cv_sys_max_cmd_len ; then
250111245024Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
250211245024Smrgelse
250311245024Smrg  AC_MSG_RESULT(none)
250411245024Smrgfi
250511245024Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
250641b2f0bdSmrg
250741b2f0bdSmrg
250811245024Smrg# _LT_AC_CHECK_DLFCN
250911245024Smrg# ------------------
251011245024SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
251111245024Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
251211245024Smrg])# _LT_AC_CHECK_DLFCN
251341b2f0bdSmrg
251441b2f0bdSmrg
251511245024Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
251611245024Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
251711245024Smrg# ---------------------------------------------------------------------
251811245024SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
251911245024Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
252011245024Smrgif test "$cross_compiling" = yes; then :
252111245024Smrg  [$4]
252211245024Smrgelse
252311245024Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
252411245024Smrg  lt_status=$lt_dlunknown
252511245024Smrg  cat > conftest.$ac_ext <<EOF
252611245024Smrg[#line __oline__ "configure"
252711245024Smrg#include "confdefs.h"
252841b2f0bdSmrg
252911245024Smrg#if HAVE_DLFCN_H
253011245024Smrg#include <dlfcn.h>
253111245024Smrg#endif
253241b2f0bdSmrg
253311245024Smrg#include <stdio.h>
253441b2f0bdSmrg
253511245024Smrg#ifdef RTLD_GLOBAL
253611245024Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
253711245024Smrg#else
253811245024Smrg#  ifdef DL_GLOBAL
253911245024Smrg#    define LT_DLGLOBAL		DL_GLOBAL
254011245024Smrg#  else
254111245024Smrg#    define LT_DLGLOBAL		0
254211245024Smrg#  endif
254311245024Smrg#endif
254441b2f0bdSmrg
254511245024Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
254611245024Smrg   find out it does not work in some platform. */
254711245024Smrg#ifndef LT_DLLAZY_OR_NOW
254811245024Smrg#  ifdef RTLD_LAZY
254911245024Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
255011245024Smrg#  else
255111245024Smrg#    ifdef DL_LAZY
255211245024Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
255311245024Smrg#    else
255411245024Smrg#      ifdef RTLD_NOW
255511245024Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
255611245024Smrg#      else
255711245024Smrg#        ifdef DL_NOW
255811245024Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
255911245024Smrg#        else
256011245024Smrg#          define LT_DLLAZY_OR_NOW	0
256111245024Smrg#        endif
256211245024Smrg#      endif
256311245024Smrg#    endif
256411245024Smrg#  endif
256511245024Smrg#endif
256641b2f0bdSmrg
256711245024Smrg#ifdef __cplusplus
256811245024Smrgextern "C" void exit (int);
256911245024Smrg#endif
257041b2f0bdSmrg
257111245024Smrgvoid fnord() { int i=42;}
257211245024Smrgint main ()
257311245024Smrg{
257411245024Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
257511245024Smrg  int status = $lt_dlunknown;
257641b2f0bdSmrg
257711245024Smrg  if (self)
257811245024Smrg    {
257911245024Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
258011245024Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
258111245024Smrg      /* dlclose (self); */
258211245024Smrg    }
258311245024Smrg  else
258411245024Smrg    puts (dlerror ());
258541b2f0bdSmrg
258611245024Smrg    exit (status);
258711245024Smrg}]
258811245024SmrgEOF
258911245024Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
259011245024Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
259111245024Smrg    lt_status=$?
259211245024Smrg    case x$lt_status in
259311245024Smrg      x$lt_dlno_uscore) $1 ;;
259411245024Smrg      x$lt_dlneed_uscore) $2 ;;
259511245024Smrg      x$lt_dlunknown|x*) $3 ;;
259611245024Smrg    esac
259711245024Smrg  else :
259811245024Smrg    # compilation failed
259911245024Smrg    $3
260011245024Smrg  fi
260111245024Smrgfi
260211245024Smrgrm -fr conftest*
260311245024Smrg])# _LT_AC_TRY_DLOPEN_SELF
260441b2f0bdSmrg
260541b2f0bdSmrg
260611245024Smrg# AC_LIBTOOL_DLOPEN_SELF
260711245024Smrg# ----------------------
260811245024SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
260911245024Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
261011245024Smrgif test "x$enable_dlopen" != xyes; then
261111245024Smrg  enable_dlopen=unknown
261211245024Smrg  enable_dlopen_self=unknown
261311245024Smrg  enable_dlopen_self_static=unknown
261411245024Smrgelse
261511245024Smrg  lt_cv_dlopen=no
261611245024Smrg  lt_cv_dlopen_libs=
261741b2f0bdSmrg
261811245024Smrg  case $host_os in
261911245024Smrg  beos*)
262011245024Smrg    lt_cv_dlopen="load_add_on"
262111245024Smrg    lt_cv_dlopen_libs=
262211245024Smrg    lt_cv_dlopen_self=yes
262311245024Smrg    ;;
262441b2f0bdSmrg
262511245024Smrg  mingw* | pw32*)
262611245024Smrg    lt_cv_dlopen="LoadLibrary"
262711245024Smrg    lt_cv_dlopen_libs=
262811245024Smrg   ;;
262941b2f0bdSmrg
263011245024Smrg  cygwin*)
263111245024Smrg    lt_cv_dlopen="dlopen"
263211245024Smrg    lt_cv_dlopen_libs=
263311245024Smrg   ;;
263441b2f0bdSmrg
263511245024Smrg  darwin*)
263611245024Smrg  # if libdl is installed we need to link against it
263711245024Smrg    AC_CHECK_LIB([dl], [dlopen],
263811245024Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
263911245024Smrg    lt_cv_dlopen="dyld"
264011245024Smrg    lt_cv_dlopen_libs=
264111245024Smrg    lt_cv_dlopen_self=yes
264211245024Smrg    ])
264311245024Smrg   ;;
264441b2f0bdSmrg
264511245024Smrg  *)
264611245024Smrg    AC_CHECK_FUNC([shl_load],
264711245024Smrg	  [lt_cv_dlopen="shl_load"],
264811245024Smrg      [AC_CHECK_LIB([dld], [shl_load],
264911245024Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
265011245024Smrg	[AC_CHECK_FUNC([dlopen],
265111245024Smrg	      [lt_cv_dlopen="dlopen"],
265211245024Smrg	  [AC_CHECK_LIB([dl], [dlopen],
265311245024Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
265411245024Smrg	    [AC_CHECK_LIB([svld], [dlopen],
265511245024Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
265611245024Smrg	      [AC_CHECK_LIB([dld], [dld_link],
265711245024Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
265811245024Smrg	      ])
265911245024Smrg	    ])
266011245024Smrg	  ])
266111245024Smrg	])
266211245024Smrg      ])
266311245024Smrg    ;;
266411245024Smrg  esac
266541b2f0bdSmrg
266611245024Smrg  if test "x$lt_cv_dlopen" != xno; then
266711245024Smrg    enable_dlopen=yes
266811245024Smrg  else
266911245024Smrg    enable_dlopen=no
267041b2f0bdSmrg  fi
267141b2f0bdSmrg
267211245024Smrg  case $lt_cv_dlopen in
267311245024Smrg  dlopen)
267411245024Smrg    save_CPPFLAGS="$CPPFLAGS"
267511245024Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
267641b2f0bdSmrg
267711245024Smrg    save_LDFLAGS="$LDFLAGS"
267811245024Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
267941b2f0bdSmrg
268011245024Smrg    save_LIBS="$LIBS"
268111245024Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
268241b2f0bdSmrg
268311245024Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
268411245024Smrg	  lt_cv_dlopen_self, [dnl
268511245024Smrg	  _LT_AC_TRY_DLOPEN_SELF(
268611245024Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
268711245024Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
268811245024Smrg    ])
268941b2f0bdSmrg
269011245024Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
269111245024Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
269211245024Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
269311245024Smrg    	  lt_cv_dlopen_self_static, [dnl
269411245024Smrg	  _LT_AC_TRY_DLOPEN_SELF(
269511245024Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
269611245024Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
269711245024Smrg      ])
269811245024Smrg    fi
269941b2f0bdSmrg
270011245024Smrg    CPPFLAGS="$save_CPPFLAGS"
270111245024Smrg    LDFLAGS="$save_LDFLAGS"
270211245024Smrg    LIBS="$save_LIBS"
270311245024Smrg    ;;
270411245024Smrg  esac
270541b2f0bdSmrg
270611245024Smrg  case $lt_cv_dlopen_self in
270711245024Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
270811245024Smrg  *) enable_dlopen_self=unknown ;;
270911245024Smrg  esac
271041b2f0bdSmrg
271111245024Smrg  case $lt_cv_dlopen_self_static in
271211245024Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
271311245024Smrg  *) enable_dlopen_self_static=unknown ;;
271411245024Smrg  esac
271511245024Smrgfi
271611245024Smrg])# AC_LIBTOOL_DLOPEN_SELF
271741b2f0bdSmrg
271841b2f0bdSmrg
271911245024Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
272011245024Smrg# ---------------------------------
272111245024Smrg# Check to see if options -c and -o are simultaneously supported by compiler
272211245024SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
272311245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
272411245024SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
272511245024SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
272611245024Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
272711245024Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
272811245024Smrg   $rm -r conftest 2>/dev/null
272911245024Smrg   mkdir conftest
273011245024Smrg   cd conftest
273111245024Smrg   mkdir out
273211245024Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
273341b2f0bdSmrg
273411245024Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
273511245024Smrg   # Insert the option either (1) after the last *FLAGS variable, or
273611245024Smrg   # (2) before a word containing "conftest.", or (3) at the end.
273711245024Smrg   # Note that $ac_compile itself does not contain backslashes and begins
273811245024Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
273911245024Smrg   lt_compile=`echo "$ac_compile" | $SED \
274011245024Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
274111245024Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
274211245024Smrg   -e 's:$: $lt_compiler_flag:'`
274311245024Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
274411245024Smrg   (eval "$lt_compile" 2>out/conftest.err)
274511245024Smrg   ac_status=$?
274611245024Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
274711245024Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
274811245024Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
274911245024Smrg   then
275011245024Smrg     # The compiler can only warn and ignore the option if not recognized
275111245024Smrg     # So say no if there are warnings
275211245024Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
275311245024Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
275411245024Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
275511245024Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
275611245024Smrg     fi
275711245024Smrg   fi
275811245024Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
275911245024Smrg   $rm conftest*
276011245024Smrg   # SGI C++ compiler will create directory out/ii_files/ for
276111245024Smrg   # template instantiation
276211245024Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
276311245024Smrg   $rm out/* && rmdir out
276411245024Smrg   cd ..
276511245024Smrg   rmdir conftest
276611245024Smrg   $rm conftest*
276711245024Smrg])
276811245024Smrg])# AC_LIBTOOL_PROG_CC_C_O
276941b2f0bdSmrg
277041b2f0bdSmrg
277111245024Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
277211245024Smrg# -----------------------------------------
277311245024Smrg# Check to see if we can do hard links to lock some files if needed
277411245024SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
277511245024Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
277641b2f0bdSmrg
277711245024Smrghard_links="nottested"
277811245024Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
277911245024Smrg  # do not overwrite the value of need_locks provided by the user
278011245024Smrg  AC_MSG_CHECKING([if we can lock with hard links])
278111245024Smrg  hard_links=yes
278211245024Smrg  $rm conftest*
278311245024Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
278411245024Smrg  touch conftest.a
278511245024Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
278611245024Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
278711245024Smrg  AC_MSG_RESULT([$hard_links])
278811245024Smrg  if test "$hard_links" = no; then
278911245024Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
279011245024Smrg    need_locks=warn
279111245024Smrg  fi
279241b2f0bdSmrgelse
279311245024Smrg  need_locks=no
279441b2f0bdSmrgfi
279511245024Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
279641b2f0bdSmrg
279711245024Smrg
279811245024Smrg# AC_LIBTOOL_OBJDIR
279911245024Smrg# -----------------
280011245024SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
280111245024Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
280211245024Smrg[rm -f .libs 2>/dev/null
280311245024Smrgmkdir .libs 2>/dev/null
280411245024Smrgif test -d .libs; then
280511245024Smrg  lt_cv_objdir=.libs
280641b2f0bdSmrgelse
280711245024Smrg  # MS-DOS does not allow filenames that begin with a dot.
280811245024Smrg  lt_cv_objdir=_libs
280941b2f0bdSmrgfi
281011245024Smrgrmdir .libs 2>/dev/null])
281111245024Smrgobjdir=$lt_cv_objdir
281211245024Smrg])# AC_LIBTOOL_OBJDIR
281341b2f0bdSmrg
281441b2f0bdSmrg
281511245024Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
281611245024Smrg# ----------------------------------------------
281711245024Smrg# Check hardcoding attributes.
281811245024SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
281911245024Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
282011245024Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
282111245024Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
282211245024Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
282311245024Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
282441b2f0bdSmrg
282511245024Smrg  # We can hardcode non-existant directories.
282611245024Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
282711245024Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
282811245024Smrg     # have to relink, otherwise we might link with an installed library
282911245024Smrg     # when we should be linking with a yet-to-be-installed one
283011245024Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
283111245024Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
283211245024Smrg    # Linking always hardcodes the temporary library directory.
283311245024Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
283411245024Smrg  else
283511245024Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
283611245024Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
283711245024Smrg  fi
283811245024Smrgelse
283911245024Smrg  # We cannot hardcode anything, or else we can only hardcode existing
284011245024Smrg  # directories.
284111245024Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
284211245024Smrgfi
284311245024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
284441b2f0bdSmrg
284511245024Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
284611245024Smrg  # Fast installation is not supported
284711245024Smrg  enable_fast_install=no
284811245024Smrgelif test "$shlibpath_overrides_runpath" = yes ||
284911245024Smrg     test "$enable_shared" = no; then
285011245024Smrg  # Fast installation is not necessary
285111245024Smrg  enable_fast_install=needless
285211245024Smrgfi
285311245024Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
285441b2f0bdSmrg
285541b2f0bdSmrg
285611245024Smrg# AC_LIBTOOL_SYS_LIB_STRIP
285711245024Smrg# ------------------------
285811245024SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
285911245024Smrg[striplib=
286011245024Smrgold_striplib=
286111245024SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
286211245024Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
286311245024Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
286411245024Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
286511245024Smrg  AC_MSG_RESULT([yes])
286641b2f0bdSmrgelse
286711245024Smrg# FIXME - insert some real tests, host_os isn't really good enough
286811245024Smrg  case $host_os in
286911245024Smrg   darwin*)
287011245024Smrg       if test -n "$STRIP" ; then
287111245024Smrg         striplib="$STRIP -x"
287211245024Smrg         old_striplib="$STRIP -S"
287311245024Smrg         AC_MSG_RESULT([yes])
287411245024Smrg       else
287511245024Smrg  AC_MSG_RESULT([no])
287641b2f0bdSmrgfi
287711245024Smrg       ;;
287811245024Smrg   *)
287911245024Smrg  AC_MSG_RESULT([no])
288041b2f0bdSmrg    ;;
288111245024Smrg  esac
288211245024Smrgfi
288311245024Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
288441b2f0bdSmrg
288541b2f0bdSmrg
288611245024Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
288711245024Smrg# -----------------------------
288811245024Smrg# PORTME Fill in your ld.so characteristics
288911245024SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
289011245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
289111245024SmrgAC_MSG_CHECKING([dynamic linker characteristics])
289211245024Smrglibrary_names_spec=
289311245024Smrglibname_spec='lib$name'
289411245024Smrgsoname_spec=
289511245024Smrgshrext_cmds=".so"
289611245024Smrgpostinstall_cmds=
289711245024Smrgpostuninstall_cmds=
289811245024Smrgfinish_cmds=
289911245024Smrgfinish_eval=
290011245024Smrgshlibpath_var=
290111245024Smrgshlibpath_overrides_runpath=unknown
290211245024Smrgversion_type=none
290311245024Smrgdynamic_linker="$host_os ld.so"
290411245024Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
290511245024Smrgm4_if($1,[],[
290611245024Smrgif test "$GCC" = yes; then
290711245024Smrg  case $host_os in
290811245024Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
290911245024Smrg    *) lt_awk_arg="/^libraries:/" ;;
291011245024Smrg  esac
291111245024Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
291211245024Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
291311245024Smrg    # if the path contains ";" then we assume it to be the separator
291411245024Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
291511245024Smrg    # assumed that no part of a normal pathname contains ";" but that should
291611245024Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
291711245024Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
291811245024Smrg  else
291911245024Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
292011245024Smrg  fi
292111245024Smrg  # Ok, now we have the path, separated by spaces, we can step through it
292211245024Smrg  # and add multilib dir if necessary.
292311245024Smrg  lt_tmp_lt_search_path_spec=
292411245024Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
292511245024Smrg  for lt_sys_path in $lt_search_path_spec; do
292611245024Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
292711245024Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
292811245024Smrg    else
292911245024Smrg      test -d "$lt_sys_path" && \
293011245024Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
293141b2f0bdSmrg    fi
293211245024Smrg  done
293311245024Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
293411245024SmrgBEGIN {RS=" "; FS="/|\n";} {
293511245024Smrg  lt_foo="";
293611245024Smrg  lt_count=0;
293711245024Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
293811245024Smrg    if ($lt_i != "" && $lt_i != ".") {
293911245024Smrg      if ($lt_i == "..") {
294011245024Smrg        lt_count++;
294111245024Smrg      } else {
294211245024Smrg        if (lt_count == 0) {
294311245024Smrg          lt_foo="/" $lt_i lt_foo;
294411245024Smrg        } else {
294511245024Smrg          lt_count--;
294611245024Smrg        }
294711245024Smrg      }
294811245024Smrg    }
294911245024Smrg  }
295011245024Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
295111245024Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
295211245024Smrg}'`
295311245024Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
295411245024Smrgelse
295511245024Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
295611245024Smrgfi])
295711245024Smrgneed_lib_prefix=unknown
295811245024Smrghardcode_into_libs=no
295941b2f0bdSmrg
296011245024Smrg# when you set need_version to no, make sure it does not cause -set_version
296111245024Smrg# flags to be left without arguments
296211245024Smrgneed_version=unknown
296341b2f0bdSmrg
296411245024Smrgcase $host_os in
296511245024Smrgaix3*)
296611245024Smrg  version_type=linux
296711245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
296811245024Smrg  shlibpath_var=LIBPATH
296941b2f0bdSmrg
297011245024Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
297111245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
297211245024Smrg  ;;
297341b2f0bdSmrg
297411245024Smrgaix[[4-9]]*)
297511245024Smrg  version_type=linux
297611245024Smrg  need_lib_prefix=no
297711245024Smrg  need_version=no
297811245024Smrg  hardcode_into_libs=yes
297911245024Smrg  if test "$host_cpu" = ia64; then
298011245024Smrg    # AIX 5 supports IA64
298111245024Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
298211245024Smrg    shlibpath_var=LD_LIBRARY_PATH
298311245024Smrg  else
298411245024Smrg    # With GCC up to 2.95.x, collect2 would create an import file
298511245024Smrg    # for dependence libraries.  The import file would start with
298611245024Smrg    # the line `#! .'.  This would cause the generated library to
298711245024Smrg    # depend on `.', always an invalid library.  This was fixed in
298811245024Smrg    # development snapshots of GCC prior to 3.0.
298911245024Smrg    case $host_os in
299011245024Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
299111245024Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
299211245024Smrg	   echo ' yes '
299311245024Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
299411245024Smrg	:
299541b2f0bdSmrg      else
299611245024Smrg	can_build_shared=no
299741b2f0bdSmrg      fi
299811245024Smrg      ;;
299911245024Smrg    esac
300011245024Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
300111245024Smrg    # soname into executable. Probably we can add versioning support to
300211245024Smrg    # collect2, so additional links can be useful in future.
300311245024Smrg    if test "$aix_use_runtimelinking" = yes; then
300411245024Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
300511245024Smrg      # instead of lib<name>.a to let people know that these are not
300611245024Smrg      # typical AIX shared libraries.
300711245024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
300841b2f0bdSmrg    else
300911245024Smrg      # We preserve .a as extension for shared libraries through AIX4.2
301011245024Smrg      # and later when we are not doing run time linking.
301111245024Smrg      library_names_spec='${libname}${release}.a $libname.a'
301211245024Smrg      soname_spec='${libname}${release}${shared_ext}$major'
301341b2f0bdSmrg    fi
301411245024Smrg    shlibpath_var=LIBPATH
301511245024Smrg  fi
301611245024Smrg  ;;
301741b2f0bdSmrg
301811245024Smrgamigaos*)
301911245024Smrg  library_names_spec='$libname.ixlibrary $libname.a'
302011245024Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
302111245024Smrg  finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''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'
302211245024Smrg  ;;
302341b2f0bdSmrg
302411245024Smrgbeos*)
302511245024Smrg  library_names_spec='${libname}${shared_ext}'
302611245024Smrg  dynamic_linker="$host_os ld.so"
302711245024Smrg  shlibpath_var=LIBRARY_PATH
302811245024Smrg  ;;
302941b2f0bdSmrg
303011245024Smrgbsdi[[45]]*)
303111245024Smrg  version_type=linux
303211245024Smrg  need_version=no
303311245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
303411245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
303511245024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
303611245024Smrg  shlibpath_var=LD_LIBRARY_PATH
303711245024Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
303811245024Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
303911245024Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
304011245024Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
304111245024Smrg  # libtool to hard-code these into programs
304241b2f0bdSmrg  ;;
304341b2f0bdSmrg
304411245024Smrgcygwin* | mingw* | pw32*)
304511245024Smrg  version_type=windows
304611245024Smrg  shrext_cmds=".dll"
304711245024Smrg  need_version=no
304811245024Smrg  need_lib_prefix=no
304941b2f0bdSmrg
305011245024Smrg  case $GCC,$host_os in
305111245024Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
305211245024Smrg    library_names_spec='$libname.dll.a'
305311245024Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
305411245024Smrg    postinstall_cmds='base_file=`basename \${file}`~
305511245024Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
305611245024Smrg      dldir=$destdir/`dirname \$dlpath`~
305711245024Smrg      test -d \$dldir || mkdir -p \$dldir~
305811245024Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
305911245024Smrg      chmod a+x \$dldir/$dlname'
306011245024Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
306111245024Smrg      dlpath=$dir/\$dldll~
306211245024Smrg       $rm \$dlpath'
306311245024Smrg    shlibpath_overrides_runpath=yes
306441b2f0bdSmrg
306511245024Smrg    case $host_os in
306611245024Smrg    cygwin*)
306711245024Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
306811245024Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
306911245024Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
307041b2f0bdSmrg      ;;
307111245024Smrg    mingw*)
307211245024Smrg      # MinGW DLLs use traditional 'lib' prefix
307311245024Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
307411245024Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
307511245024Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
307611245024Smrg        # It is most probably a Windows format PATH printed by
307711245024Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
307811245024Smrg        # path with ; separators, and with drive letters. We can handle the
307911245024Smrg        # drive letters (cygwin fileutils understands them), so leave them,
308011245024Smrg        # especially as we might pass files found there to a mingw objdump,
308111245024Smrg        # which wouldn't understand a cygwinified path. Ahh.
308211245024Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
308341b2f0bdSmrg      else
308411245024Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
308541b2f0bdSmrg      fi
308641b2f0bdSmrg      ;;
308711245024Smrg    pw32*)
308811245024Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
308911245024Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
309011245024Smrg      ;;
309141b2f0bdSmrg    esac
309241b2f0bdSmrg    ;;
309341b2f0bdSmrg
309411245024Smrg  *)
309511245024Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
309611245024Smrg    ;;
309711245024Smrg  esac
309811245024Smrg  dynamic_linker='Win32 ld.exe'
309911245024Smrg  # FIXME: first we should search . and the directory the executable is in
310011245024Smrg  shlibpath_var=PATH
310111245024Smrg  ;;
310241b2f0bdSmrg
310311245024Smrgdarwin* | rhapsody*)
310411245024Smrg  dynamic_linker="$host_os dyld"
310511245024Smrg  version_type=darwin
310611245024Smrg  need_lib_prefix=no
310711245024Smrg  need_version=no
310811245024Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
310911245024Smrg  soname_spec='${libname}${release}${major}$shared_ext'
311011245024Smrg  shlibpath_overrides_runpath=yes
311111245024Smrg  shlibpath_var=DYLD_LIBRARY_PATH
311211245024Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
311311245024Smrg  m4_if([$1], [],[
311411245024Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
311511245024Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
311611245024Smrg  ;;
311741b2f0bdSmrg
311811245024Smrgdgux*)
311911245024Smrg  version_type=linux
312011245024Smrg  need_lib_prefix=no
312111245024Smrg  need_version=no
312211245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
312311245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
312411245024Smrg  shlibpath_var=LD_LIBRARY_PATH
312511245024Smrg  ;;
312641b2f0bdSmrg
312711245024Smrgfreebsd1*)
312811245024Smrg  dynamic_linker=no
312911245024Smrg  ;;
313041b2f0bdSmrg
313111245024Smrgfreebsd* | dragonfly*)
313211245024Smrg  # DragonFly does not have aout.  When/if they implement a new
313311245024Smrg  # versioning mechanism, adjust this.
313411245024Smrg  if test -x /usr/bin/objformat; then
313511245024Smrg    objformat=`/usr/bin/objformat`
313611245024Smrg  else
313711245024Smrg    case $host_os in
313811245024Smrg    freebsd[[123]]*) objformat=aout ;;
313911245024Smrg    *) objformat=elf ;;
314041b2f0bdSmrg    esac
314111245024Smrg  fi
314211245024Smrg  version_type=freebsd-$objformat
314311245024Smrg  case $version_type in
314411245024Smrg    freebsd-elf*)
314511245024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
314611245024Smrg      need_version=no
314711245024Smrg      need_lib_prefix=no
314811245024Smrg      ;;
314911245024Smrg    freebsd-*)
315011245024Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
315111245024Smrg      need_version=yes
315211245024Smrg      ;;
315311245024Smrg  esac
315411245024Smrg  shlibpath_var=LD_LIBRARY_PATH
315511245024Smrg  case $host_os in
315611245024Smrg  freebsd2*)
315711245024Smrg    shlibpath_overrides_runpath=yes
315841b2f0bdSmrg    ;;
315911245024Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
316011245024Smrg    shlibpath_overrides_runpath=yes
316111245024Smrg    hardcode_into_libs=yes
316241b2f0bdSmrg    ;;
316311245024Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
316411245024Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
316511245024Smrg    shlibpath_overrides_runpath=no
316611245024Smrg    hardcode_into_libs=yes
316741b2f0bdSmrg    ;;
316811245024Smrg  *) # from 4.6 on, and DragonFly
316911245024Smrg    shlibpath_overrides_runpath=yes
317011245024Smrg    hardcode_into_libs=yes
317141b2f0bdSmrg    ;;
317211245024Smrg  esac
317311245024Smrg  ;;
317441b2f0bdSmrg
317511245024Smrggnu*)
317611245024Smrg  version_type=linux
317711245024Smrg  need_lib_prefix=no
317811245024Smrg  need_version=no
317911245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
318011245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
318111245024Smrg  shlibpath_var=LD_LIBRARY_PATH
318211245024Smrg  hardcode_into_libs=yes
318311245024Smrg  ;;
318441b2f0bdSmrg
318511245024Smrghpux9* | hpux10* | hpux11*)
318611245024Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
318711245024Smrg  # link against other versions.
318811245024Smrg  version_type=sunos
318911245024Smrg  need_lib_prefix=no
319011245024Smrg  need_version=no
319111245024Smrg  case $host_cpu in
319211245024Smrg  ia64*)
319311245024Smrg    shrext_cmds='.so'
319411245024Smrg    hardcode_into_libs=yes
319511245024Smrg    dynamic_linker="$host_os dld.so"
319611245024Smrg    shlibpath_var=LD_LIBRARY_PATH
319711245024Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
319811245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
319911245024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
320011245024Smrg    if test "X$HPUX_IA64_MODE" = X32; then
320111245024Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
320211245024Smrg    else
320311245024Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
320411245024Smrg    fi
320511245024Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
320611245024Smrg    ;;
320711245024Smrg   hppa*64*)
320811245024Smrg     shrext_cmds='.sl'
320911245024Smrg     hardcode_into_libs=yes
321011245024Smrg     dynamic_linker="$host_os dld.sl"
321111245024Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
321211245024Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
321311245024Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
321411245024Smrg     soname_spec='${libname}${release}${shared_ext}$major'
321511245024Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
321611245024Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
321711245024Smrg     ;;
321811245024Smrg   *)
321911245024Smrg    shrext_cmds='.sl'
322011245024Smrg    dynamic_linker="$host_os dld.sl"
322111245024Smrg    shlibpath_var=SHLIB_PATH
322211245024Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
322311245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
322411245024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
322511245024Smrg    ;;
322611245024Smrg  esac
322711245024Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
322811245024Smrg  postinstall_cmds='chmod 555 $lib'
322911245024Smrg  ;;
323041b2f0bdSmrg
323111245024Smrginterix[[3-9]]*)
323211245024Smrg  version_type=linux
323311245024Smrg  need_lib_prefix=no
323411245024Smrg  need_version=no
323511245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
323611245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
323711245024Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
323811245024Smrg  shlibpath_var=LD_LIBRARY_PATH
323911245024Smrg  shlibpath_overrides_runpath=no
324011245024Smrg  hardcode_into_libs=yes
324111245024Smrg  ;;
324241b2f0bdSmrg
324311245024Smrgirix5* | irix6* | nonstopux*)
324411245024Smrg  case $host_os in
324511245024Smrg    nonstopux*) version_type=nonstopux ;;
324611245024Smrg    *)
324711245024Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
324811245024Smrg		version_type=linux
324941b2f0bdSmrg	else
325011245024Smrg		version_type=irix
325111245024Smrg	fi ;;
325211245024Smrg  esac
325311245024Smrg  need_lib_prefix=no
325411245024Smrg  need_version=no
325511245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
325611245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
325711245024Smrg  case $host_os in
325811245024Smrg  irix5* | nonstopux*)
325911245024Smrg    libsuff= shlibsuff=
326011245024Smrg    ;;
326111245024Smrg  *)
326211245024Smrg    case $LD in # libtool.m4 will add one of these switches to LD
326311245024Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
326411245024Smrg      libsuff= shlibsuff= libmagic=32-bit;;
326511245024Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
326611245024Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
326711245024Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
326811245024Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
326911245024Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
327041b2f0bdSmrg    esac
327141b2f0bdSmrg    ;;
327211245024Smrg  esac
327311245024Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
327411245024Smrg  shlibpath_overrides_runpath=no
327511245024Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
327611245024Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
327711245024Smrg  hardcode_into_libs=yes
327811245024Smrg  ;;
327941b2f0bdSmrg
328011245024Smrg# No shared lib support for Linux oldld, aout, or coff.
328111245024Smrglinux*oldld* | linux*aout* | linux*coff*)
328211245024Smrg  dynamic_linker=no
328311245024Smrg  ;;
328441b2f0bdSmrg
328511245024Smrg# This must be Linux ELF.
328611245024Smrglinux* | k*bsd*-gnu)
328711245024Smrg  version_type=linux
328811245024Smrg  need_lib_prefix=no
328911245024Smrg  need_version=no
329011245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
329111245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
329211245024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
329311245024Smrg  shlibpath_var=LD_LIBRARY_PATH
329411245024Smrg  shlibpath_overrides_runpath=no
329511245024Smrg  # This implies no fast_install, which is unacceptable.
329611245024Smrg  # Some rework will be needed to allow for fast_install
329711245024Smrg  # before this can be enabled.
329811245024Smrg  hardcode_into_libs=yes
329941b2f0bdSmrg
330011245024Smrg  # Append ld.so.conf contents to the search path
330111245024Smrg  if test -f /etc/ld.so.conf; then
330211245024Smrg    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;/^$/d' | tr '\n' ' '`
330311245024Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
330411245024Smrg  fi
330541b2f0bdSmrg
330611245024Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
330711245024Smrg  # powerpc, because MkLinux only supported shared libraries with the
330811245024Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
330911245024Smrg  # most powerpc-linux boxes support dynamic linking these days and
331011245024Smrg  # people can always --disable-shared, the test was removed, and we
331111245024Smrg  # assume the GNU/Linux dynamic linker is in use.
331211245024Smrg  dynamic_linker='GNU/Linux ld.so'
331311245024Smrg  ;;
331441b2f0bdSmrg
331511245024Smrgnetbsd*)
331611245024Smrg  version_type=sunos
331711245024Smrg  need_lib_prefix=no
331811245024Smrg  need_version=no
331911245024Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
332011245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
332111245024Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
332211245024Smrg    dynamic_linker='NetBSD (a.out) ld.so'
332311245024Smrg  else
332411245024Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
332511245024Smrg    soname_spec='${libname}${release}${shared_ext}$major'
332611245024Smrg    dynamic_linker='NetBSD ld.elf_so'
332711245024Smrg  fi
332811245024Smrg  shlibpath_var=LD_LIBRARY_PATH
332911245024Smrg  shlibpath_overrides_runpath=yes
333011245024Smrg  hardcode_into_libs=yes
333111245024Smrg  ;;
333241b2f0bdSmrg
333311245024Smrgnewsos6)
333411245024Smrg  version_type=linux
333511245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
333611245024Smrg  shlibpath_var=LD_LIBRARY_PATH
333711245024Smrg  shlibpath_overrides_runpath=yes
333811245024Smrg  ;;
333941b2f0bdSmrg
334011245024Smrgnto-qnx*)
334111245024Smrg  version_type=linux
334211245024Smrg  need_lib_prefix=no
334311245024Smrg  need_version=no
334411245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
334511245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
334611245024Smrg  shlibpath_var=LD_LIBRARY_PATH
334711245024Smrg  shlibpath_overrides_runpath=yes
334811245024Smrg  ;;
334941b2f0bdSmrg
335011245024Smrgopenbsd*)
335111245024Smrg  version_type=sunos
335211245024Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
335311245024Smrg  need_lib_prefix=no
335411245024Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
335511245024Smrg  case $host_os in
335611245024Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
335711245024Smrg    *)                         need_version=no  ;;
335811245024Smrg  esac
335911245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
336011245024Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
336111245024Smrg  shlibpath_var=LD_LIBRARY_PATH
336211245024Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
336311245024Smrg    case $host_os in
336411245024Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
336511245024Smrg	shlibpath_overrides_runpath=no
336641b2f0bdSmrg	;;
336741b2f0bdSmrg      *)
336811245024Smrg	shlibpath_overrides_runpath=yes
336941b2f0bdSmrg	;;
337011245024Smrg      esac
337111245024Smrg  else
337211245024Smrg    shlibpath_overrides_runpath=yes
337311245024Smrg  fi
337411245024Smrg  ;;
337541b2f0bdSmrg
337611245024Smrgos2*)
337711245024Smrg  libname_spec='$name'
337811245024Smrg  shrext_cmds=".dll"
337911245024Smrg  need_lib_prefix=no
338011245024Smrg  library_names_spec='$libname${shared_ext} $libname.a'
338111245024Smrg  dynamic_linker='OS/2 ld.exe'
338211245024Smrg  shlibpath_var=LIBPATH
338311245024Smrg  ;;
338441b2f0bdSmrg
338511245024Smrgosf3* | osf4* | osf5*)
338611245024Smrg  version_type=osf
338711245024Smrg  need_lib_prefix=no
338811245024Smrg  need_version=no
338911245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
339011245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
339111245024Smrg  shlibpath_var=LD_LIBRARY_PATH
339211245024Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
339311245024Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
339411245024Smrg  ;;
339541b2f0bdSmrg
339611245024Smrgrdos*)
339711245024Smrg  dynamic_linker=no
339811245024Smrg  ;;
339941b2f0bdSmrg
340011245024Smrgsolaris*)
340111245024Smrg  version_type=linux
340211245024Smrg  need_lib_prefix=no
340311245024Smrg  need_version=no
340411245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
340511245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
340611245024Smrg  shlibpath_var=LD_LIBRARY_PATH
340711245024Smrg  shlibpath_overrides_runpath=yes
340811245024Smrg  hardcode_into_libs=yes
340911245024Smrg  # ldd complains unless libraries are executable
341011245024Smrg  postinstall_cmds='chmod +x $lib'
341111245024Smrg  ;;
341241b2f0bdSmrg
341311245024Smrgsunos4*)
341411245024Smrg  version_type=sunos
341511245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
341611245024Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
341711245024Smrg  shlibpath_var=LD_LIBRARY_PATH
341811245024Smrg  shlibpath_overrides_runpath=yes
341911245024Smrg  if test "$with_gnu_ld" = yes; then
342011245024Smrg    need_lib_prefix=no
342111245024Smrg  fi
342211245024Smrg  need_version=yes
342311245024Smrg  ;;
342441b2f0bdSmrg
342511245024Smrgsysv4 | sysv4.3*)
342611245024Smrg  version_type=linux
342711245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
342811245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
342911245024Smrg  shlibpath_var=LD_LIBRARY_PATH
343011245024Smrg  case $host_vendor in
343111245024Smrg    sni)
343211245024Smrg      shlibpath_overrides_runpath=no
343311245024Smrg      need_lib_prefix=no
343411245024Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
343511245024Smrg      runpath_var=LD_RUN_PATH
343611245024Smrg      ;;
343711245024Smrg    siemens)
343811245024Smrg      need_lib_prefix=no
343911245024Smrg      ;;
344011245024Smrg    motorola)
344111245024Smrg      need_lib_prefix=no
344211245024Smrg      need_version=no
344311245024Smrg      shlibpath_overrides_runpath=no
344411245024Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
344511245024Smrg      ;;
344611245024Smrg  esac
344711245024Smrg  ;;
344841b2f0bdSmrg
344911245024Smrgsysv4*MP*)
345011245024Smrg  if test -d /usr/nec ;then
345111245024Smrg    version_type=linux
345211245024Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
345311245024Smrg    soname_spec='$libname${shared_ext}.$major'
345411245024Smrg    shlibpath_var=LD_LIBRARY_PATH
345511245024Smrg  fi
345611245024Smrg  ;;
345711245024Smrg
345811245024Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
345911245024Smrg  version_type=freebsd-elf
346011245024Smrg  need_lib_prefix=no
346111245024Smrg  need_version=no
346211245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
346311245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
346411245024Smrg  shlibpath_var=LD_LIBRARY_PATH
346511245024Smrg  hardcode_into_libs=yes
346611245024Smrg  if test "$with_gnu_ld" = yes; then
346711245024Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
346811245024Smrg    shlibpath_overrides_runpath=no
346911245024Smrg  else
347011245024Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
347111245024Smrg    shlibpath_overrides_runpath=yes
347211245024Smrg    case $host_os in
347311245024Smrg      sco3.2v5*)
347411245024Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
347541b2f0bdSmrg	;;
347641b2f0bdSmrg    esac
347711245024Smrg  fi
347811245024Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
347911245024Smrg  ;;
348041b2f0bdSmrg
348111245024Smrguts4*)
348211245024Smrg  version_type=linux
348311245024Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
348411245024Smrg  soname_spec='${libname}${release}${shared_ext}$major'
348511245024Smrg  shlibpath_var=LD_LIBRARY_PATH
348611245024Smrg  ;;
348711245024Smrg
348811245024Smrg*)
348911245024Smrg  dynamic_linker=no
349011245024Smrg  ;;
349111245024Smrgesac
349211245024SmrgAC_MSG_RESULT([$dynamic_linker])
349311245024Smrgtest "$dynamic_linker" = no && can_build_shared=no
349411245024Smrg
349511245024SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
349611245024Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
349711245024Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
349811245024SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
349911245024Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
350011245024Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
350111245024Smrg
350211245024Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
350311245024Smrgif test "$GCC" = yes; then
350411245024Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
350511245024Smrgfi
350611245024Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
350711245024Smrg
350811245024Smrg
350911245024Smrg# _LT_AC_TAGCONFIG
351011245024Smrg# ----------------
351111245024SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
351211245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
351311245024SmrgAC_ARG_WITH([tags],
351411245024Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
351511245024Smrg        [include additional configurations @<:@automatic@:>@])],
351611245024Smrg    [tagnames="$withval"])
351711245024Smrg
351811245024Smrgif test -f "$ltmain" && test -n "$tagnames"; then
351911245024Smrg  if test ! -f "${ofile}"; then
352011245024Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
352111245024Smrg  fi
352211245024Smrg
352311245024Smrg  if test -z "$LTCC"; then
352411245024Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
352511245024Smrg    if test -z "$LTCC"; then
352611245024Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
352711245024Smrg    else
352811245024Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
352911245024Smrg    fi
353011245024Smrg  fi
353111245024Smrg  if test -z "$LTCFLAGS"; then
353211245024Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
353311245024Smrg  fi
353411245024Smrg
353511245024Smrg  # Extract list of available tagged configurations in $ofile.
353611245024Smrg  # Note that this assumes the entire list is on one line.
353711245024Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
353811245024Smrg
353911245024Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
354011245024Smrg  for tagname in $tagnames; do
354111245024Smrg    IFS="$lt_save_ifs"
354211245024Smrg    # Check whether tagname contains only valid characters
354311245024Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
354411245024Smrg    "") ;;
354511245024Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
354641b2f0bdSmrg	;;
354741b2f0bdSmrg    esac
354841b2f0bdSmrg
354911245024Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
355011245024Smrg    then
355111245024Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
355211245024Smrg    fi
355311245024Smrg
355411245024Smrg    # Update the list of available tags.
355511245024Smrg    if test -n "$tagname"; then
355611245024Smrg      echo appending configuration tag \"$tagname\" to $ofile
355711245024Smrg
355811245024Smrg      case $tagname in
355911245024Smrg      CXX)
356011245024Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
356111245024Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
356211245024Smrg	    (test "X$CXX" != "Xg++"))) ; then
356311245024Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
356411245024Smrg	else
356511245024Smrg	  tagname=""
356611245024Smrg	fi
356741b2f0bdSmrg	;;
356811245024Smrg
356911245024Smrg      F77)
357011245024Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
357111245024Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
357211245024Smrg	else
357311245024Smrg	  tagname=""
357411245024Smrg	fi
357541b2f0bdSmrg	;;
357611245024Smrg
357711245024Smrg      GCJ)
357811245024Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
357911245024Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
358011245024Smrg	else
358111245024Smrg	  tagname=""
358211245024Smrg	fi
358341b2f0bdSmrg	;;
358411245024Smrg
358511245024Smrg      RC)
358611245024Smrg	AC_LIBTOOL_LANG_RC_CONFIG
358741b2f0bdSmrg	;;
358841b2f0bdSmrg
358911245024Smrg      *)
359011245024Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
359111245024Smrg	;;
359211245024Smrg      esac
359341b2f0bdSmrg
359411245024Smrg      # Append the new tag name to the list of available tags.
359511245024Smrg      if test -n "$tagname" ; then
359611245024Smrg      available_tags="$available_tags $tagname"
359711245024Smrg    fi
359811245024Smrg    fi
359911245024Smrg  done
360011245024Smrg  IFS="$lt_save_ifs"
360141b2f0bdSmrg
360211245024Smrg  # Now substitute the updated list of available tags.
360311245024Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
360411245024Smrg    mv "${ofile}T" "$ofile"
360511245024Smrg    chmod +x "$ofile"
360611245024Smrg  else
360711245024Smrg    rm -f "${ofile}T"
360811245024Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
360911245024Smrg  fi
361011245024Smrgfi
361111245024Smrg])# _LT_AC_TAGCONFIG
361241b2f0bdSmrg
361341b2f0bdSmrg
361411245024Smrg# AC_LIBTOOL_DLOPEN
361511245024Smrg# -----------------
361611245024Smrg# enable checks for dlopen support
361711245024SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
361811245024Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
361911245024Smrg])# AC_LIBTOOL_DLOPEN
362041b2f0bdSmrg
362141b2f0bdSmrg
362211245024Smrg# AC_LIBTOOL_WIN32_DLL
362311245024Smrg# --------------------
362411245024Smrg# declare package support for building win32 DLLs
362511245024SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
362611245024Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
362711245024Smrg])# AC_LIBTOOL_WIN32_DLL
362841b2f0bdSmrg
362941b2f0bdSmrg
363011245024Smrg# AC_ENABLE_SHARED([DEFAULT])
363111245024Smrg# ---------------------------
363211245024Smrg# implement the --enable-shared flag
363311245024Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
363411245024SmrgAC_DEFUN([AC_ENABLE_SHARED],
363511245024Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
363611245024SmrgAC_ARG_ENABLE([shared],
363711245024Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
363811245024Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
363911245024Smrg    [p=${PACKAGE-default}
364011245024Smrg    case $enableval in
364111245024Smrg    yes) enable_shared=yes ;;
364211245024Smrg    no) enable_shared=no ;;
364311245024Smrg    *)
364411245024Smrg      enable_shared=no
364511245024Smrg      # Look at the argument we got.  We use all the common list separators.
364611245024Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
364711245024Smrg      for pkg in $enableval; do
364811245024Smrg	IFS="$lt_save_ifs"
364911245024Smrg	if test "X$pkg" = "X$p"; then
365011245024Smrg	  enable_shared=yes
365111245024Smrg	fi
365211245024Smrg      done
365311245024Smrg      IFS="$lt_save_ifs"
365411245024Smrg      ;;
365511245024Smrg    esac],
365611245024Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
365711245024Smrg])# AC_ENABLE_SHARED
365841b2f0bdSmrg
365941b2f0bdSmrg
366011245024Smrg# AC_DISABLE_SHARED
366111245024Smrg# -----------------
366211245024Smrg# set the default shared flag to --disable-shared
366311245024SmrgAC_DEFUN([AC_DISABLE_SHARED],
366411245024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
366511245024SmrgAC_ENABLE_SHARED(no)
366611245024Smrg])# AC_DISABLE_SHARED
366741b2f0bdSmrg
366841b2f0bdSmrg
366911245024Smrg# AC_ENABLE_STATIC([DEFAULT])
367011245024Smrg# ---------------------------
367111245024Smrg# implement the --enable-static flag
367211245024Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
367311245024SmrgAC_DEFUN([AC_ENABLE_STATIC],
367411245024Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
367511245024SmrgAC_ARG_ENABLE([static],
367611245024Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
367711245024Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
367811245024Smrg    [p=${PACKAGE-default}
367911245024Smrg    case $enableval in
368011245024Smrg    yes) enable_static=yes ;;
368111245024Smrg    no) enable_static=no ;;
368211245024Smrg    *)
368311245024Smrg     enable_static=no
368411245024Smrg      # Look at the argument we got.  We use all the common list separators.
368511245024Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
368611245024Smrg      for pkg in $enableval; do
368711245024Smrg	IFS="$lt_save_ifs"
368811245024Smrg	if test "X$pkg" = "X$p"; then
368911245024Smrg	  enable_static=yes
369011245024Smrg	fi
369111245024Smrg      done
369211245024Smrg      IFS="$lt_save_ifs"
369311245024Smrg      ;;
369411245024Smrg    esac],
369511245024Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
369611245024Smrg])# AC_ENABLE_STATIC
369741b2f0bdSmrg
369841b2f0bdSmrg
369911245024Smrg# AC_DISABLE_STATIC
370011245024Smrg# -----------------
370111245024Smrg# set the default static flag to --disable-static
370211245024SmrgAC_DEFUN([AC_DISABLE_STATIC],
370311245024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
370411245024SmrgAC_ENABLE_STATIC(no)
370511245024Smrg])# AC_DISABLE_STATIC
370641b2f0bdSmrg
370741b2f0bdSmrg
370811245024Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
370911245024Smrg# ---------------------------------
371011245024Smrg# implement the --enable-fast-install flag
371111245024Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
371211245024SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
371311245024Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
371411245024SmrgAC_ARG_ENABLE([fast-install],
371511245024Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
371611245024Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
371711245024Smrg    [p=${PACKAGE-default}
371811245024Smrg    case $enableval in
371911245024Smrg    yes) enable_fast_install=yes ;;
372011245024Smrg    no) enable_fast_install=no ;;
372111245024Smrg    *)
372211245024Smrg      enable_fast_install=no
372311245024Smrg      # Look at the argument we got.  We use all the common list separators.
372411245024Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
372511245024Smrg      for pkg in $enableval; do
372611245024Smrg	IFS="$lt_save_ifs"
372711245024Smrg	if test "X$pkg" = "X$p"; then
372811245024Smrg	  enable_fast_install=yes
372911245024Smrg	fi
373011245024Smrg      done
373111245024Smrg      IFS="$lt_save_ifs"
373211245024Smrg      ;;
373311245024Smrg    esac],
373411245024Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
373511245024Smrg])# AC_ENABLE_FAST_INSTALL
373641b2f0bdSmrg
373741b2f0bdSmrg
373811245024Smrg# AC_DISABLE_FAST_INSTALL
373911245024Smrg# -----------------------
374011245024Smrg# set the default to --disable-fast-install
374111245024SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
374211245024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
374311245024SmrgAC_ENABLE_FAST_INSTALL(no)
374411245024Smrg])# AC_DISABLE_FAST_INSTALL
374541b2f0bdSmrg
374641b2f0bdSmrg
374711245024Smrg# AC_LIBTOOL_PICMODE([MODE])
374811245024Smrg# --------------------------
374911245024Smrg# implement the --with-pic flag
375011245024Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
375111245024SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
375211245024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
375311245024Smrgpic_mode=ifelse($#,1,$1,default)
375411245024Smrg])# AC_LIBTOOL_PICMODE
375541b2f0bdSmrg
375641b2f0bdSmrg
375711245024Smrg# AC_PROG_EGREP
375811245024Smrg# -------------
375911245024Smrg# This is predefined starting with Autoconf 2.54, so this conditional
376011245024Smrg# definition can be removed once we require Autoconf 2.54 or later.
376111245024Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
376211245024Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
376311245024Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
376411245024Smrg    then ac_cv_prog_egrep='grep -E'
376511245024Smrg    else ac_cv_prog_egrep='egrep'
376611245024Smrg    fi])
376711245024Smrg EGREP=$ac_cv_prog_egrep
376811245024Smrg AC_SUBST([EGREP])
376911245024Smrg])])
377041b2f0bdSmrg
377141b2f0bdSmrg
377211245024Smrg# AC_PATH_TOOL_PREFIX
377311245024Smrg# -------------------
377411245024Smrg# find a file program which can recognize shared library
377511245024SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
377611245024Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
377711245024SmrgAC_MSG_CHECKING([for $1])
377811245024SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
377911245024Smrg[case $MAGIC_CMD in
378011245024Smrg[[\\/*] |  ?:[\\/]*])
378111245024Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
378211245024Smrg  ;;
378311245024Smrg*)
378411245024Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
378511245024Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
378611245024Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
378711245024Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
378811245024Smrgdnl not every word.  This closes a longstanding sh security hole.
378911245024Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
379011245024Smrg  for ac_dir in $ac_dummy; do
379111245024Smrg    IFS="$lt_save_ifs"
379211245024Smrg    test -z "$ac_dir" && ac_dir=.
379311245024Smrg    if test -f $ac_dir/$1; then
379411245024Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
379511245024Smrg      if test -n "$file_magic_test_file"; then
379611245024Smrg	case $deplibs_check_method in
379711245024Smrg	"file_magic "*)
379811245024Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
379911245024Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
380011245024Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
380111245024Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
380211245024Smrg	    :
380311245024Smrg	  else
380411245024Smrg	    cat <<EOF 1>&2
380541b2f0bdSmrg
380611245024Smrg*** Warning: the command libtool uses to detect shared libraries,
380711245024Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
380811245024Smrg*** The result is that libtool may fail to recognize shared libraries
380911245024Smrg*** as such.  This will affect the creation of libtool libraries that
381011245024Smrg*** depend on shared libraries, but programs linked with such libtool
381111245024Smrg*** libraries will work regardless of this problem.  Nevertheless, you
381211245024Smrg*** may want to report the problem to your system manager and/or to
381311245024Smrg*** bug-libtool@gnu.org
381441b2f0bdSmrg
381511245024SmrgEOF
381611245024Smrg	  fi ;;
381711245024Smrg	esac
381811245024Smrg      fi
381911245024Smrg      break
382011245024Smrg    fi
382111245024Smrg  done
382211245024Smrg  IFS="$lt_save_ifs"
382311245024Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
382411245024Smrg  ;;
382511245024Smrgesac])
382611245024SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
382711245024Smrgif test -n "$MAGIC_CMD"; then
382811245024Smrg  AC_MSG_RESULT($MAGIC_CMD)
382911245024Smrgelse
383011245024Smrg  AC_MSG_RESULT(no)
383111245024Smrgfi
383211245024Smrg])# AC_PATH_TOOL_PREFIX
383341b2f0bdSmrg
383441b2f0bdSmrg
383511245024Smrg# AC_PATH_MAGIC
383611245024Smrg# -------------
383711245024Smrg# find a file program which can recognize a shared library
383811245024SmrgAC_DEFUN([AC_PATH_MAGIC],
383911245024Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
384011245024Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
384111245024Smrg  if test -n "$ac_tool_prefix"; then
384211245024Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
384311245024Smrg  else
384411245024Smrg    MAGIC_CMD=:
384541b2f0bdSmrg  fi
384611245024Smrgfi
384711245024Smrg])# AC_PATH_MAGIC
384841b2f0bdSmrg
384941b2f0bdSmrg
385011245024Smrg# AC_PROG_LD
385111245024Smrg# ----------
385211245024Smrg# find the pathname to the GNU or non-GNU linker
385311245024SmrgAC_DEFUN([AC_PROG_LD],
385411245024Smrg[AC_ARG_WITH([gnu-ld],
385511245024Smrg    [AC_HELP_STRING([--with-gnu-ld],
385611245024Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
385711245024Smrg    [test "$withval" = no || with_gnu_ld=yes],
385811245024Smrg    [with_gnu_ld=no])
385911245024SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
386011245024SmrgAC_REQUIRE([AC_PROG_CC])dnl
386111245024SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
386211245024SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
386311245024Smrgac_prog=ld
386411245024Smrgif test "$GCC" = yes; then
386511245024Smrg  # Check if gcc -print-prog-name=ld gives a path.
386611245024Smrg  AC_MSG_CHECKING([for ld used by $CC])
386711245024Smrg  case $host in
386811245024Smrg  *-*-mingw*)
386911245024Smrg    # gcc leaves a trailing carriage return which upsets mingw
387011245024Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
387111245024Smrg  *)
387211245024Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
387311245024Smrg  esac
387411245024Smrg  case $ac_prog in
387511245024Smrg    # Accept absolute paths.
387611245024Smrg    [[\\/]]* | ?:[[\\/]]*)
387711245024Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
387811245024Smrg      # Canonicalize the pathname of ld
387911245024Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
388011245024Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
388111245024Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
388211245024Smrg      done
388311245024Smrg      test -z "$LD" && LD="$ac_prog"
388411245024Smrg      ;;
388511245024Smrg  "")
388611245024Smrg    # If it fails, then pretend we aren't using GCC.
388711245024Smrg    ac_prog=ld
388811245024Smrg    ;;
388911245024Smrg  *)
389011245024Smrg    # If it is relative, then search for the first ld in PATH.
389111245024Smrg    with_gnu_ld=unknown
389211245024Smrg    ;;
389311245024Smrg  esac
389411245024Smrgelif test "$with_gnu_ld" = yes; then
389511245024Smrg  AC_MSG_CHECKING([for GNU ld])
389611245024Smrgelse
389711245024Smrg  AC_MSG_CHECKING([for non-GNU ld])
389811245024Smrgfi
389911245024SmrgAC_CACHE_VAL(lt_cv_path_LD,
390011245024Smrg[if test -z "$LD"; then
390111245024Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
390211245024Smrg  for ac_dir in $PATH; do
390311245024Smrg    IFS="$lt_save_ifs"
390411245024Smrg    test -z "$ac_dir" && ac_dir=.
390511245024Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
390611245024Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
390711245024Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
390811245024Smrg      # but apparently some variants of GNU ld only accept -v.
390911245024Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
391011245024Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
391111245024Smrg      *GNU* | *'with BFD'*)
391211245024Smrg	test "$with_gnu_ld" != no && break
391311245024Smrg	;;
391411245024Smrg      *)
391511245024Smrg	test "$with_gnu_ld" != yes && break
391611245024Smrg	;;
391711245024Smrg      esac
391811245024Smrg    fi
391911245024Smrg  done
392011245024Smrg  IFS="$lt_save_ifs"
392111245024Smrgelse
392211245024Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
392311245024Smrgfi])
392411245024SmrgLD="$lt_cv_path_LD"
392511245024Smrgif test -n "$LD"; then
392611245024Smrg  AC_MSG_RESULT($LD)
392711245024Smrgelse
392811245024Smrg  AC_MSG_RESULT(no)
392911245024Smrgfi
393011245024Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
393111245024SmrgAC_PROG_LD_GNU
393211245024Smrg])# AC_PROG_LD
393341b2f0bdSmrg
393441b2f0bdSmrg
393511245024Smrg# AC_PROG_LD_GNU
393611245024Smrg# --------------
393711245024SmrgAC_DEFUN([AC_PROG_LD_GNU],
393811245024Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
393911245024SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
394011245024Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
394111245024Smrgcase `$LD -v 2>&1 </dev/null` in
394211245024Smrg*GNU* | *'with BFD'*)
394311245024Smrg  lt_cv_prog_gnu_ld=yes
394411245024Smrg  ;;
394511245024Smrg*)
394611245024Smrg  lt_cv_prog_gnu_ld=no
394711245024Smrg  ;;
394811245024Smrgesac])
394911245024Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
395011245024Smrg])# AC_PROG_LD_GNU
395141b2f0bdSmrg
395241b2f0bdSmrg
395311245024Smrg# AC_PROG_LD_RELOAD_FLAG
395411245024Smrg# ----------------------
395511245024Smrg# find reload flag for linker
395611245024Smrg#   -- PORTME Some linkers may need a different reload flag.
395711245024SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
395811245024Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
395911245024Smrg  lt_cv_ld_reload_flag,
396011245024Smrg  [lt_cv_ld_reload_flag='-r'])
396111245024Smrgreload_flag=$lt_cv_ld_reload_flag
396211245024Smrgcase $reload_flag in
396311245024Smrg"" | " "*) ;;
396411245024Smrg*) reload_flag=" $reload_flag" ;;
396511245024Smrgesac
396611245024Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
396711245024Smrgcase $host_os in
396811245024Smrg  darwin*)
396911245024Smrg    if test "$GCC" = yes; then
397011245024Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
397111245024Smrg    else
397211245024Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
397311245024Smrg    fi
397411245024Smrg    ;;
397511245024Smrgesac
397611245024Smrg])# AC_PROG_LD_RELOAD_FLAG
397741b2f0bdSmrg
397841b2f0bdSmrg
397911245024Smrg# AC_DEPLIBS_CHECK_METHOD
398011245024Smrg# -----------------------
398111245024Smrg# how to check for library dependencies
398211245024Smrg#  -- PORTME fill in with the dynamic library characteristics
398311245024SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
398411245024Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
398511245024Smrglt_cv_deplibs_check_method,
398611245024Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
398711245024Smrglt_cv_file_magic_test_file=
398811245024Smrglt_cv_deplibs_check_method='unknown'
398911245024Smrg# Need to set the preceding variable on all platforms that support
399011245024Smrg# interlibrary dependencies.
399111245024Smrg# 'none' -- dependencies not supported.
399211245024Smrg# `unknown' -- same as none, but documents that we really don't know.
399311245024Smrg# 'pass_all' -- all dependencies passed with no checks.
399411245024Smrg# 'test_compile' -- check by making test program.
399511245024Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
399611245024Smrg# which responds to the $file_magic_cmd with a given extended regex.
399711245024Smrg# If you have `file' or equivalent on your system and you're not sure
399811245024Smrg# whether `pass_all' will *always* work, you probably want this one.
399941b2f0bdSmrg
400011245024Smrgcase $host_os in
400111245024Smrgaix[[4-9]]*)
400211245024Smrg  lt_cv_deplibs_check_method=pass_all
400311245024Smrg  ;;
400441b2f0bdSmrg
400511245024Smrgbeos*)
400611245024Smrg  lt_cv_deplibs_check_method=pass_all
400711245024Smrg  ;;
400841b2f0bdSmrg
400911245024Smrgbsdi[[45]]*)
401011245024Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
401111245024Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
401211245024Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
401311245024Smrg  ;;
401441b2f0bdSmrg
401511245024Smrgcygwin*)
401611245024Smrg  # func_win32_libid is a shell function defined in ltmain.sh
401711245024Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
401811245024Smrg  lt_cv_file_magic_cmd='func_win32_libid'
401911245024Smrg  ;;
402041b2f0bdSmrg
402111245024Smrgmingw* | pw32*)
402211245024Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
402311245024Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
402411245024Smrg  # unless we find 'file', for example because we are cross-compiling.
402511245024Smrg  if ( file / ) >/dev/null 2>&1; then
402611245024Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
402711245024Smrg    lt_cv_file_magic_cmd='func_win32_libid'
402811245024Smrg  else
402911245024Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
403011245024Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
403111245024Smrg  fi
403211245024Smrg  ;;
403341b2f0bdSmrg
403411245024Smrgdarwin* | rhapsody*)
403511245024Smrg  lt_cv_deplibs_check_method=pass_all
403611245024Smrg  ;;
403741b2f0bdSmrg
403811245024Smrgfreebsd* | dragonfly*)
403911245024Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
404011245024Smrg    case $host_cpu in
404111245024Smrg    i*86 )
404211245024Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
404311245024Smrg      # Let's accept both of them until this is cleared up.
404411245024Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
404511245024Smrg      lt_cv_file_magic_cmd=/usr/bin/file
404611245024Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
404711245024Smrg      ;;
404811245024Smrg    esac
404911245024Smrg  else
405011245024Smrg    lt_cv_deplibs_check_method=pass_all
405111245024Smrg  fi
405211245024Smrg  ;;
405341b2f0bdSmrg
405411245024Smrggnu*)
405511245024Smrg  lt_cv_deplibs_check_method=pass_all
405611245024Smrg  ;;
405741b2f0bdSmrg
405811245024Smrghpux10.20* | hpux11*)
405911245024Smrg  lt_cv_file_magic_cmd=/usr/bin/file
406011245024Smrg  case $host_cpu in
406111245024Smrg  ia64*)
406211245024Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
406311245024Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
406411245024Smrg    ;;
406511245024Smrg  hppa*64*)
406611245024Smrg    [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
406711245024Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
406811245024Smrg    ;;
406911245024Smrg  *)
407011245024Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
407111245024Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
407211245024Smrg    ;;
407311245024Smrg  esac
407411245024Smrg  ;;
407541b2f0bdSmrg
407611245024Smrginterix[[3-9]]*)
407711245024Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
407811245024Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
407911245024Smrg  ;;
408041b2f0bdSmrg
408111245024Smrgirix5* | irix6* | nonstopux*)
408211245024Smrg  case $LD in
408311245024Smrg  *-32|*"-32 ") libmagic=32-bit;;
408411245024Smrg  *-n32|*"-n32 ") libmagic=N32;;
408511245024Smrg  *-64|*"-64 ") libmagic=64-bit;;
408611245024Smrg  *) libmagic=never-match;;
408711245024Smrg  esac
408811245024Smrg  lt_cv_deplibs_check_method=pass_all
408911245024Smrg  ;;
409041b2f0bdSmrg
409111245024Smrg# This must be Linux ELF.
409211245024Smrglinux* | k*bsd*-gnu)
409311245024Smrg  lt_cv_deplibs_check_method=pass_all
409411245024Smrg  ;;
409541b2f0bdSmrg
409611245024Smrgnetbsd*)
409711245024Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
409811245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
409911245024Smrg  else
410011245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
410111245024Smrg  fi
410211245024Smrg  ;;
410341b2f0bdSmrg
410411245024Smrgnewos6*)
410511245024Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
410611245024Smrg  lt_cv_file_magic_cmd=/usr/bin/file
410711245024Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
410811245024Smrg  ;;
410941b2f0bdSmrg
411011245024Smrgnto-qnx*)
411111245024Smrg  lt_cv_deplibs_check_method=unknown
411211245024Smrg  ;;
411341b2f0bdSmrg
411411245024Smrgopenbsd*)
411511245024Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
411611245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
411711245024Smrg  else
411811245024Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
411911245024Smrg  fi
412011245024Smrg  ;;
412141b2f0bdSmrg
412211245024Smrgosf3* | osf4* | osf5*)
412311245024Smrg  lt_cv_deplibs_check_method=pass_all
412411245024Smrg  ;;
412541b2f0bdSmrg
412611245024Smrgrdos*)
412711245024Smrg  lt_cv_deplibs_check_method=pass_all
412811245024Smrg  ;;
412941b2f0bdSmrg
413011245024Smrgsolaris*)
413111245024Smrg  lt_cv_deplibs_check_method=pass_all
413211245024Smrg  ;;
413341b2f0bdSmrg
413411245024Smrgsysv4 | sysv4.3*)
413511245024Smrg  case $host_vendor in
413611245024Smrg  motorola)
413711245024Smrg    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]]'
413811245024Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
413911245024Smrg    ;;
414011245024Smrg  ncr)
414111245024Smrg    lt_cv_deplibs_check_method=pass_all
414211245024Smrg    ;;
414311245024Smrg  sequent)
414411245024Smrg    lt_cv_file_magic_cmd='/bin/file'
414511245024Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
414611245024Smrg    ;;
414711245024Smrg  sni)
414811245024Smrg    lt_cv_file_magic_cmd='/bin/file'
414911245024Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
415011245024Smrg    lt_cv_file_magic_test_file=/lib/libc.so
415111245024Smrg    ;;
415211245024Smrg  siemens)
415311245024Smrg    lt_cv_deplibs_check_method=pass_all
415411245024Smrg    ;;
415511245024Smrg  pc)
415611245024Smrg    lt_cv_deplibs_check_method=pass_all
415741b2f0bdSmrg    ;;
415841b2f0bdSmrg  esac
415911245024Smrg  ;;
416041b2f0bdSmrg
416111245024Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
416211245024Smrg  lt_cv_deplibs_check_method=pass_all
416311245024Smrg  ;;
416411245024Smrgesac
416511245024Smrg])
416611245024Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
416711245024Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
416811245024Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
416911245024Smrg])# AC_DEPLIBS_CHECK_METHOD
417041b2f0bdSmrg
417141b2f0bdSmrg
417211245024Smrg# AC_PROG_NM
417311245024Smrg# ----------
417411245024Smrg# find the pathname to a BSD-compatible name lister
417511245024SmrgAC_DEFUN([AC_PROG_NM],
417611245024Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
417711245024Smrg[if test -n "$NM"; then
417811245024Smrg  # Let the user override the test.
417911245024Smrg  lt_cv_path_NM="$NM"
418011245024Smrgelse
418111245024Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
418211245024Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
418311245024Smrg    lt_nm_to_check="$lt_nm_to_check nm"
418411245024Smrg  fi
418511245024Smrg  for lt_tmp_nm in $lt_nm_to_check; do
418611245024Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
418711245024Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
418811245024Smrg      IFS="$lt_save_ifs"
418911245024Smrg      test -z "$ac_dir" && ac_dir=.
419011245024Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
419111245024Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
419211245024Smrg	# Check to see if the nm accepts a BSD-compat flag.
419311245024Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
419411245024Smrg	#   nm: unknown option "B" ignored
419511245024Smrg	# Tru64's nm complains that /dev/null is an invalid object file
419611245024Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
419711245024Smrg	*/dev/null* | *'Invalid file or object type'*)
419811245024Smrg	  lt_cv_path_NM="$tmp_nm -B"
419911245024Smrg	  break
420011245024Smrg	  ;;
420111245024Smrg	*)
420211245024Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
420311245024Smrg	  */dev/null*)
420411245024Smrg	    lt_cv_path_NM="$tmp_nm -p"
420511245024Smrg	    break
420611245024Smrg	    ;;
420711245024Smrg	  *)
420811245024Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
420911245024Smrg	    continue # so that we can try to find one that supports BSD flags
421011245024Smrg	    ;;
421111245024Smrg	  esac
421211245024Smrg	  ;;
421311245024Smrg	esac
421411245024Smrg      fi
421511245024Smrg    done
421611245024Smrg    IFS="$lt_save_ifs"
421711245024Smrg  done
421811245024Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
421911245024Smrgfi])
422011245024SmrgNM="$lt_cv_path_NM"
422111245024Smrg])# AC_PROG_NM
422241b2f0bdSmrg
422341b2f0bdSmrg
422411245024Smrg# AC_CHECK_LIBM
422511245024Smrg# -------------
422611245024Smrg# check for math library
422711245024SmrgAC_DEFUN([AC_CHECK_LIBM],
422811245024Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
422911245024SmrgLIBM=
423011245024Smrgcase $host in
423111245024Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
423211245024Smrg  # These system don't have libm, or don't need it
423311245024Smrg  ;;
423411245024Smrg*-ncr-sysv4.3*)
423511245024Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
423611245024Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
423711245024Smrg  ;;
423811245024Smrg*)
423911245024Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
424011245024Smrg  ;;
424111245024Smrgesac
424211245024Smrg])# AC_CHECK_LIBM
424341b2f0bdSmrg
424441b2f0bdSmrg
424511245024Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
424611245024Smrg# -----------------------------------
424711245024Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
424811245024Smrg# LTDLINCL to the include flags for the libltdl header and adds
424911245024Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
425011245024Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
425111245024Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
425211245024Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
425311245024Smrg# (note the single quotes!).  If your package is not flat and you're not
425411245024Smrg# using automake, define top_builddir and top_srcdir appropriately in
425511245024Smrg# the Makefiles.
425611245024SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
425711245024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
425811245024Smrg  case $enable_ltdl_convenience in
425911245024Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
426011245024Smrg  "") enable_ltdl_convenience=yes
426111245024Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
426211245024Smrg  esac
426311245024Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
426411245024Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
426511245024Smrg  # For backwards non-gettext consistent compatibility...
426611245024Smrg  INCLTDL="$LTDLINCL"
426711245024Smrg])# AC_LIBLTDL_CONVENIENCE
426841b2f0bdSmrg
426941b2f0bdSmrg
427011245024Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
427111245024Smrg# -----------------------------------
427211245024Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
427311245024Smrg# LTDLINCL to the include flags for the libltdl header and adds
427411245024Smrg# --enable-ltdl-install to the configure arguments.  Note that
427511245024Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
427611245024Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
427711245024Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
427811245024Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
427911245024Smrg# flat and you're not using automake, define top_builddir and top_srcdir
428011245024Smrg# appropriately in the Makefiles.
428111245024Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
428211245024SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
428311245024Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
428411245024Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
428511245024Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
428611245024Smrg  [if test x"$enable_ltdl_install" = xno; then
428711245024Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
428811245024Smrg   else
428911245024Smrg     enable_ltdl_install=yes
429011245024Smrg   fi
429111245024Smrg  ])
429211245024Smrg  if test x"$enable_ltdl_install" = x"yes"; then
429311245024Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
429411245024Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
429511245024Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
429611245024Smrg  else
429711245024Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
429811245024Smrg    LIBLTDL="-lltdl"
429911245024Smrg    LTDLINCL=
430011245024Smrg  fi
430111245024Smrg  # For backwards non-gettext consistent compatibility...
430211245024Smrg  INCLTDL="$LTDLINCL"
430311245024Smrg])# AC_LIBLTDL_INSTALLABLE
430441b2f0bdSmrg
430541b2f0bdSmrg
430611245024Smrg# AC_LIBTOOL_CXX
430711245024Smrg# --------------
430811245024Smrg# enable support for C++ libraries
430911245024SmrgAC_DEFUN([AC_LIBTOOL_CXX],
431011245024Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
431111245024Smrg])# AC_LIBTOOL_CXX
431241b2f0bdSmrg
431341b2f0bdSmrg
431411245024Smrg# _LT_AC_LANG_CXX
431511245024Smrg# ---------------
431611245024SmrgAC_DEFUN([_LT_AC_LANG_CXX],
431711245024Smrg[AC_REQUIRE([AC_PROG_CXX])
431811245024SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
431911245024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
432011245024Smrg])# _LT_AC_LANG_CXX
432141b2f0bdSmrg
432211245024Smrg# _LT_AC_PROG_CXXCPP
432311245024Smrg# ------------------
432411245024SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
432511245024Smrg[
432611245024SmrgAC_REQUIRE([AC_PROG_CXX])
432711245024Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
432811245024Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
432911245024Smrg    (test "X$CXX" != "Xg++"))) ; then
433011245024Smrg  AC_PROG_CXXCPP
433111245024Smrgfi
433211245024Smrg])# _LT_AC_PROG_CXXCPP
433341b2f0bdSmrg
433411245024Smrg# AC_LIBTOOL_F77
433511245024Smrg# --------------
433611245024Smrg# enable support for Fortran 77 libraries
433711245024SmrgAC_DEFUN([AC_LIBTOOL_F77],
433811245024Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
433911245024Smrg])# AC_LIBTOOL_F77
434041b2f0bdSmrg
434141b2f0bdSmrg
434211245024Smrg# _LT_AC_LANG_F77
434311245024Smrg# ---------------
434411245024SmrgAC_DEFUN([_LT_AC_LANG_F77],
434511245024Smrg[AC_REQUIRE([AC_PROG_F77])
434611245024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
434711245024Smrg])# _LT_AC_LANG_F77
434841b2f0bdSmrg
434941b2f0bdSmrg
435011245024Smrg# AC_LIBTOOL_GCJ
435111245024Smrg# --------------
435211245024Smrg# enable support for GCJ libraries
435311245024SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
435411245024Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
435511245024Smrg])# AC_LIBTOOL_GCJ
435641b2f0bdSmrg
435741b2f0bdSmrg
435811245024Smrg# _LT_AC_LANG_GCJ
435911245024Smrg# ---------------
436011245024SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
436111245024Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
436211245024Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
436311245024Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
436411245024Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
436511245024Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
436611245024Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
436711245024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
436811245024Smrg])# _LT_AC_LANG_GCJ
436941b2f0bdSmrg
437041b2f0bdSmrg
437111245024Smrg# AC_LIBTOOL_RC
437211245024Smrg# -------------
437311245024Smrg# enable support for Windows resource files
437411245024SmrgAC_DEFUN([AC_LIBTOOL_RC],
437511245024Smrg[AC_REQUIRE([LT_AC_PROG_RC])
437611245024Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
437711245024Smrg])# AC_LIBTOOL_RC
437841b2f0bdSmrg
437941b2f0bdSmrg
438011245024Smrg# AC_LIBTOOL_LANG_C_CONFIG
438111245024Smrg# ------------------------
438211245024Smrg# Ensure that the configuration vars for the C compiler are
438311245024Smrg# suitably defined.  Those variables are subsequently used by
438411245024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
438511245024SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
438611245024SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
438711245024Smrg[lt_save_CC="$CC"
438811245024SmrgAC_LANG_PUSH(C)
438941b2f0bdSmrg
439011245024Smrg# Source file extension for C test sources.
439111245024Smrgac_ext=c
439241b2f0bdSmrg
439311245024Smrg# Object file extension for compiled C test sources.
439411245024Smrgobjext=o
439511245024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
439641b2f0bdSmrg
439711245024Smrg# Code to be used in simple compile tests
439811245024Smrglt_simple_compile_test_code="int some_variable = 0;"
439941b2f0bdSmrg
440011245024Smrg# Code to be used in simple link tests
440111245024Smrglt_simple_link_test_code='int main(){return(0);}'
440241b2f0bdSmrg
440311245024Smrg_LT_AC_SYS_COMPILER
440441b2f0bdSmrg
440511245024Smrg# save warnings/boilerplate of simple test code
440611245024Smrg_LT_COMPILER_BOILERPLATE
440711245024Smrg_LT_LINKER_BOILERPLATE
440841b2f0bdSmrg
440911245024SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
441011245024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
441111245024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
441211245024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
441311245024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
441411245024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
441511245024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
441611245024SmrgAC_LIBTOOL_SYS_LIB_STRIP
441711245024SmrgAC_LIBTOOL_DLOPEN_SELF
441841b2f0bdSmrg
441911245024Smrg# Report which library types will actually be built
442011245024SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
442111245024SmrgAC_MSG_RESULT([$can_build_shared])
442241b2f0bdSmrg
442311245024SmrgAC_MSG_CHECKING([whether to build shared libraries])
442411245024Smrgtest "$can_build_shared" = "no" && enable_shared=no
442541b2f0bdSmrg
442611245024Smrg# On AIX, shared libraries and static libraries use the same namespace, and
442711245024Smrg# are all built from PIC.
442811245024Smrgcase $host_os in
442911245024Smrgaix3*)
443011245024Smrg  test "$enable_shared" = yes && enable_static=no
443111245024Smrg  if test -n "$RANLIB"; then
443211245024Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
443311245024Smrg    postinstall_cmds='$RANLIB $lib'
443411245024Smrg  fi
443511245024Smrg  ;;
443641b2f0bdSmrg
443711245024Smrgaix[[4-9]]*)
443811245024Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
443911245024Smrg    test "$enable_shared" = yes && enable_static=no
444011245024Smrg  fi
444111245024Smrg    ;;
444211245024Smrgesac
444311245024SmrgAC_MSG_RESULT([$enable_shared])
444441b2f0bdSmrg
444511245024SmrgAC_MSG_CHECKING([whether to build static libraries])
444611245024Smrg# Make sure either enable_shared or enable_static is yes.
444711245024Smrgtest "$enable_shared" = yes || enable_static=yes
444811245024SmrgAC_MSG_RESULT([$enable_static])
444941b2f0bdSmrg
445011245024SmrgAC_LIBTOOL_CONFIG($1)
445141b2f0bdSmrg
445211245024SmrgAC_LANG_POP
445311245024SmrgCC="$lt_save_CC"
445411245024Smrg])# AC_LIBTOOL_LANG_C_CONFIG
445541b2f0bdSmrg
445641b2f0bdSmrg
445711245024Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
445811245024Smrg# --------------------------
445911245024Smrg# Ensure that the configuration vars for the C compiler are
446011245024Smrg# suitably defined.  Those variables are subsequently used by
446111245024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
446211245024SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
446311245024SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
446411245024Smrg[AC_LANG_PUSH(C++)
446511245024SmrgAC_REQUIRE([AC_PROG_CXX])
446611245024SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
446741b2f0bdSmrg
446811245024Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
446911245024Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
447011245024Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
447111245024Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
447211245024Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
447311245024Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
447411245024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
447511245024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
447611245024Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
447711245024Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
447811245024Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
447911245024Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
448011245024Smrg_LT_AC_TAGVAR(module_cmds, $1)=
448111245024Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
448211245024Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
448311245024Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
448411245024Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
448511245024Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
448611245024Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
448741b2f0bdSmrg
448811245024Smrg# Dependencies to place before and after the object being linked:
448911245024Smrg_LT_AC_TAGVAR(predep_objects, $1)=
449011245024Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
449111245024Smrg_LT_AC_TAGVAR(predeps, $1)=
449211245024Smrg_LT_AC_TAGVAR(postdeps, $1)=
449311245024Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
449411245024Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
449541b2f0bdSmrg
449611245024Smrg# Source file extension for C++ test sources.
449711245024Smrgac_ext=cpp
449841b2f0bdSmrg
449911245024Smrg# Object file extension for compiled C++ test sources.
450011245024Smrgobjext=o
450111245024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
450241b2f0bdSmrg
450311245024Smrg# Code to be used in simple compile tests
450411245024Smrglt_simple_compile_test_code="int some_variable = 0;"
450541b2f0bdSmrg
450611245024Smrg# Code to be used in simple link tests
450711245024Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
450841b2f0bdSmrg
450911245024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
451011245024Smrg_LT_AC_SYS_COMPILER
451141b2f0bdSmrg
451211245024Smrg# save warnings/boilerplate of simple test code
451311245024Smrg_LT_COMPILER_BOILERPLATE
451411245024Smrg_LT_LINKER_BOILERPLATE
451541b2f0bdSmrg
451611245024Smrg# Allow CC to be a program name with arguments.
451711245024Smrglt_save_CC=$CC
451811245024Smrglt_save_LD=$LD
451911245024Smrglt_save_GCC=$GCC
452011245024SmrgGCC=$GXX
452111245024Smrglt_save_with_gnu_ld=$with_gnu_ld
452211245024Smrglt_save_path_LD=$lt_cv_path_LD
452311245024Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
452411245024Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
452511245024Smrgelse
452611245024Smrg  $as_unset lt_cv_prog_gnu_ld
452711245024Smrgfi
452811245024Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
452911245024Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
453011245024Smrgelse
453111245024Smrg  $as_unset lt_cv_path_LD
453211245024Smrgfi
453311245024Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
453411245024SmrgCC=${CXX-"c++"}
453511245024Smrgcompiler=$CC
453611245024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
453711245024Smrg_LT_CC_BASENAME([$compiler])
453841b2f0bdSmrg
453911245024Smrg# We don't want -fno-exception wen compiling C++ code, so set the
454011245024Smrg# no_builtin_flag separately
454111245024Smrgif test "$GXX" = yes; then
454211245024Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
454311245024Smrgelse
454411245024Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
454511245024Smrgfi
454641b2f0bdSmrg
454711245024Smrgif test "$GXX" = yes; then
454811245024Smrg  # Set up default GNU C++ configuration
454941b2f0bdSmrg
455011245024Smrg  AC_PROG_LD
455141b2f0bdSmrg
455211245024Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
455311245024Smrg  # archiving commands below assume that GNU ld is being used.
455411245024Smrg  if test "$with_gnu_ld" = yes; then
455511245024Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
455611245024Smrg    _LT_AC_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'
455741b2f0bdSmrg
455811245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
455911245024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
456041b2f0bdSmrg
456111245024Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
456211245024Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
456311245024Smrg    #     investigate it a little bit more. (MM)
456411245024Smrg    wlarc='${wl}'
456541b2f0bdSmrg
456611245024Smrg    # ancient GNU ld didn't support --whole-archive et. al.
456711245024Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
456811245024Smrg	grep 'no-whole-archive' > /dev/null; then
456911245024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
457011245024Smrg    else
457111245024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
457211245024Smrg    fi
457311245024Smrg  else
457411245024Smrg    with_gnu_ld=no
457511245024Smrg    wlarc=
457641b2f0bdSmrg
457711245024Smrg    # A generic and very simple default shared library creation
457811245024Smrg    # command for GNU C++ for the case where it uses the native
457911245024Smrg    # linker, instead of GNU ld.  If possible, this setting should
458011245024Smrg    # overridden to take advantage of the native linker features on
458111245024Smrg    # the platform it is being used on.
458211245024Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
458311245024Smrg  fi
458441b2f0bdSmrg
458511245024Smrg  # Commands to make compiler produce verbose output that lists
458611245024Smrg  # what "hidden" libraries, object files and flags are used when
458711245024Smrg  # linking a shared library.
458811245024Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
458941b2f0bdSmrg
459011245024Smrgelse
459111245024Smrg  GXX=no
459211245024Smrg  with_gnu_ld=no
459311245024Smrg  wlarc=
459411245024Smrgfi
459541b2f0bdSmrg
459611245024Smrg# PORTME: fill in a description of your system's C++ link characteristics
459711245024SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
459811245024Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
459911245024Smrgcase $host_os in
460011245024Smrg  aix3*)
460111245024Smrg    # FIXME: insert proper C++ library support
460211245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
460311245024Smrg    ;;
460411245024Smrg  aix[[4-9]]*)
460511245024Smrg    if test "$host_cpu" = ia64; then
460611245024Smrg      # On IA64, the linker does run time linking by default, so we don't
460711245024Smrg      # have to do anything special.
460811245024Smrg      aix_use_runtimelinking=no
460911245024Smrg      exp_sym_flag='-Bexport'
461011245024Smrg      no_entry_flag=""
461111245024Smrg    else
461211245024Smrg      aix_use_runtimelinking=no
461341b2f0bdSmrg
461411245024Smrg      # Test if we are trying to use run time linking or normal
461511245024Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
461611245024Smrg      # need to do runtime linking.
461711245024Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
461811245024Smrg	for ld_flag in $LDFLAGS; do
461911245024Smrg	  case $ld_flag in
462011245024Smrg	  *-brtl*)
462111245024Smrg	    aix_use_runtimelinking=yes
462211245024Smrg	    break
462311245024Smrg	    ;;
462411245024Smrg	  esac
462511245024Smrg	done
462611245024Smrg	;;
462711245024Smrg      esac
462841b2f0bdSmrg
462911245024Smrg      exp_sym_flag='-bexport'
463011245024Smrg      no_entry_flag='-bnoentry'
463111245024Smrg    fi
463241b2f0bdSmrg
463311245024Smrg    # When large executables or shared objects are built, AIX ld can
463411245024Smrg    # have problems creating the table of contents.  If linking a library
463511245024Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
463611245024Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
463711245024Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
463841b2f0bdSmrg
463911245024Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
464011245024Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
464111245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
464211245024Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
464341b2f0bdSmrg
464411245024Smrg    if test "$GXX" = yes; then
464511245024Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
464611245024Smrg      # We only want to do this on AIX 4.2 and lower, the check
464711245024Smrg      # below for broken collect2 doesn't work under 4.3+
464811245024Smrg	collect2name=`${CC} -print-prog-name=collect2`
464911245024Smrg	if test -f "$collect2name" && \
465011245024Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
465111245024Smrg	then
465211245024Smrg	  # We have reworked collect2
465311245024Smrg	  :
465411245024Smrg	else
465511245024Smrg	  # We have old collect2
465611245024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
465711245024Smrg	  # It fails to find uninstalled libraries when the uninstalled
465811245024Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
465911245024Smrg	  # to unsupported forces relinking
466011245024Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
466111245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
466211245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
466311245024Smrg	fi
466411245024Smrg	;;
466511245024Smrg      esac
466611245024Smrg      shared_flag='-shared'
466711245024Smrg      if test "$aix_use_runtimelinking" = yes; then
466811245024Smrg	shared_flag="$shared_flag "'${wl}-G'
466911245024Smrg      fi
467011245024Smrg    else
467111245024Smrg      # not using gcc
467211245024Smrg      if test "$host_cpu" = ia64; then
467311245024Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
467411245024Smrg	# chokes on -Wl,-G. The following line is correct:
467511245024Smrg	shared_flag='-G'
467611245024Smrg      else
467711245024Smrg	if test "$aix_use_runtimelinking" = yes; then
467811245024Smrg	  shared_flag='${wl}-G'
467911245024Smrg	else
468011245024Smrg	  shared_flag='${wl}-bM:SRE'
468111245024Smrg	fi
468211245024Smrg      fi
468311245024Smrg    fi
468441b2f0bdSmrg
468511245024Smrg    # It seems that -bexpall does not export symbols beginning with
468611245024Smrg    # underscore (_), so it is better to generate a list of symbols to export.
468711245024Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
468811245024Smrg    if test "$aix_use_runtimelinking" = yes; then
468911245024Smrg      # Warning - without using the other runtime loading flags (-brtl),
469011245024Smrg      # -berok will link without error, but may produce a broken library.
469111245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
469211245024Smrg      # Determine the default libpath from the value encoded in an empty executable.
469311245024Smrg      _LT_AC_SYS_LIBPATH_AIX
469411245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
469541b2f0bdSmrg
469611245024Smrg      _LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
469711245024Smrg     else
469811245024Smrg      if test "$host_cpu" = ia64; then
469911245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
470011245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
470111245024Smrg	_LT_AC_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"
470211245024Smrg      else
470311245024Smrg	# Determine the default libpath from the value encoded in an empty executable.
470411245024Smrg	_LT_AC_SYS_LIBPATH_AIX
470511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
470611245024Smrg	# Warning - without using the other run time loading flags,
470711245024Smrg	# -berok will link without error, but may produce a broken library.
470811245024Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
470911245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
471011245024Smrg	# Exported symbols can be pulled into shared objects from archives
471111245024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
471211245024Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
471311245024Smrg	# This is similar to how AIX traditionally builds its shared libraries.
471411245024Smrg	_LT_AC_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'
471511245024Smrg      fi
471611245024Smrg    fi
471711245024Smrg    ;;
471841b2f0bdSmrg
471911245024Smrg  beos*)
472011245024Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
472111245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
472211245024Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
472311245024Smrg      # support --undefined.  This deserves some investigation.  FIXME
472411245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
472511245024Smrg    else
472611245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
472711245024Smrg    fi
472811245024Smrg    ;;
472941b2f0bdSmrg
473011245024Smrg  chorus*)
473111245024Smrg    case $cc_basename in
473211245024Smrg      *)
473311245024Smrg	# FIXME: insert proper C++ library support
473411245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
473511245024Smrg	;;
473611245024Smrg    esac
473711245024Smrg    ;;
473841b2f0bdSmrg
473911245024Smrg  cygwin* | mingw* | pw32*)
474011245024Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
474111245024Smrg    # as there is no search path for DLLs.
474211245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
474311245024Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
474411245024Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
474511245024Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
474641b2f0bdSmrg
474711245024Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
474811245024Smrg      _LT_AC_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'
474911245024Smrg      # If the export-symbols file already is a .def file (1st line
475011245024Smrg      # is EXPORTS), use it as is; otherwise, prepend...
475111245024Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
475211245024Smrg	cp $export_symbols $output_objdir/$soname.def;
475311245024Smrg      else
475411245024Smrg	echo EXPORTS > $output_objdir/$soname.def;
475511245024Smrg	cat $export_symbols >> $output_objdir/$soname.def;
475611245024Smrg      fi~
475711245024Smrg      $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'
475811245024Smrg    else
475911245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
476011245024Smrg    fi
476111245024Smrg  ;;
476211245024Smrg      darwin* | rhapsody*)
476311245024Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
476411245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
476511245024Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
476611245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
476711245024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
476811245024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
476911245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
477011245024Smrg      if test "$GXX" = yes ; then
477111245024Smrg      output_verbose_link_cmd='echo'
477211245024Smrg      _LT_AC_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}"
477311245024Smrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
477411245024Smrg      _LT_AC_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}"
477511245024Smrg      _LT_AC_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}"
477611245024Smrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
477711245024Smrg        _LT_AC_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}"
477811245024Smrg        _LT_AC_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}"
477911245024Smrg      fi
478011245024Smrg      else
478111245024Smrg      case $cc_basename in
478211245024Smrg        xlc*)
478311245024Smrg         output_verbose_link_cmd='echo'
478411245024Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
478511245024Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
478611245024Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
478711245024Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
478811245024Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
478911245024Smrg          ;;
479011245024Smrg       *)
479111245024Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
479211245024Smrg          ;;
479311245024Smrg      esac
479411245024Smrg      fi
479511245024Smrg        ;;
479641b2f0bdSmrg
479711245024Smrg  dgux*)
479811245024Smrg    case $cc_basename in
479911245024Smrg      ec++*)
480011245024Smrg	# FIXME: insert proper C++ library support
480111245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
480211245024Smrg	;;
480311245024Smrg      ghcx*)
480411245024Smrg	# Green Hills C++ Compiler
480511245024Smrg	# FIXME: insert proper C++ library support
480611245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
480711245024Smrg	;;
480811245024Smrg      *)
480911245024Smrg	# FIXME: insert proper C++ library support
481011245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
481111245024Smrg	;;
481211245024Smrg    esac
481311245024Smrg    ;;
481411245024Smrg  freebsd[[12]]*)
481511245024Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
481611245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
481711245024Smrg    ;;
481811245024Smrg  freebsd-elf*)
481911245024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
482011245024Smrg    ;;
482111245024Smrg  freebsd* | dragonfly*)
482211245024Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
482311245024Smrg    # conventions
482411245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
482511245024Smrg    ;;
482611245024Smrg  gnu*)
482711245024Smrg    ;;
482811245024Smrg  hpux9*)
482911245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
483011245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
483111245024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
483211245024Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
483311245024Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
483411245024Smrg				# but as the default
483511245024Smrg				# location of the library.
483641b2f0bdSmrg
483711245024Smrg    case $cc_basename in
483811245024Smrg    CC*)
483911245024Smrg      # FIXME: insert proper C++ library support
484011245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
484111245024Smrg      ;;
484211245024Smrg    aCC*)
484311245024Smrg      _LT_AC_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'
484411245024Smrg      # Commands to make compiler produce verbose output that lists
484511245024Smrg      # what "hidden" libraries, object files and flags are used when
484611245024Smrg      # linking a shared library.
484711245024Smrg      #
484811245024Smrg      # There doesn't appear to be a way to prevent this compiler from
484911245024Smrg      # explicitly linking system object files so we need to strip them
485011245024Smrg      # from the output so that they don't get included in the library
485111245024Smrg      # dependencies.
485211245024Smrg      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; echo $list'
485311245024Smrg      ;;
485411245024Smrg    *)
485511245024Smrg      if test "$GXX" = yes; then
485611245024Smrg        _LT_AC_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'
485711245024Smrg      else
485811245024Smrg        # FIXME: insert proper C++ library support
485911245024Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
486011245024Smrg      fi
486111245024Smrg      ;;
486211245024Smrg    esac
486311245024Smrg    ;;
486411245024Smrg  hpux10*|hpux11*)
486511245024Smrg    if test $with_gnu_ld = no; then
486611245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
486711245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
486841b2f0bdSmrg
486911245024Smrg      case $host_cpu in
487011245024Smrg      hppa*64*|ia64*) ;;
487111245024Smrg      *)
487211245024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
487311245024Smrg        ;;
487411245024Smrg      esac
487511245024Smrg    fi
487611245024Smrg    case $host_cpu in
487711245024Smrg    hppa*64*|ia64*)
487811245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
487911245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
488011245024Smrg      ;;
488111245024Smrg    *)
488211245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
488311245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
488411245024Smrg					      # but as the default
488511245024Smrg					      # location of the library.
488611245024Smrg      ;;
488711245024Smrg    esac
488841b2f0bdSmrg
488911245024Smrg    case $cc_basename in
489011245024Smrg      CC*)
489111245024Smrg	# FIXME: insert proper C++ library support
489211245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
489311245024Smrg	;;
489411245024Smrg      aCC*)
489511245024Smrg	case $host_cpu in
489611245024Smrg	hppa*64*)
489711245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
489811245024Smrg	  ;;
489911245024Smrg	ia64*)
490011245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
490111245024Smrg	  ;;
490211245024Smrg	*)
490311245024Smrg	  _LT_AC_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'
490411245024Smrg	  ;;
490511245024Smrg	esac
490611245024Smrg	# Commands to make compiler produce verbose output that lists
490711245024Smrg	# what "hidden" libraries, object files and flags are used when
490811245024Smrg	# linking a shared library.
490911245024Smrg	#
491011245024Smrg	# There doesn't appear to be a way to prevent this compiler from
491111245024Smrg	# explicitly linking system object files so we need to strip them
491211245024Smrg	# from the output so that they don't get included in the library
491311245024Smrg	# dependencies.
491411245024Smrg	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; echo $list'
491511245024Smrg	;;
491611245024Smrg      *)
491711245024Smrg	if test "$GXX" = yes; then
491811245024Smrg	  if test $with_gnu_ld = no; then
491911245024Smrg	    case $host_cpu in
492011245024Smrg	    hppa*64*)
492111245024Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
492211245024Smrg	      ;;
492311245024Smrg	    ia64*)
492411245024Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
492511245024Smrg	      ;;
492611245024Smrg	    *)
492711245024Smrg	      _LT_AC_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'
492811245024Smrg	      ;;
492911245024Smrg	    esac
493011245024Smrg	  fi
493111245024Smrg	else
493211245024Smrg	  # FIXME: insert proper C++ library support
493311245024Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
493411245024Smrg	fi
493511245024Smrg	;;
493611245024Smrg    esac
493711245024Smrg    ;;
493811245024Smrg  interix[[3-9]]*)
493911245024Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
494011245024Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
494111245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
494211245024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
494311245024Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
494411245024Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
494511245024Smrg    # default) and relocated if they conflict, which is a slow very memory
494611245024Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
494711245024Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
494811245024Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
494911245024Smrg    _LT_AC_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'
495011245024Smrg    _LT_AC_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'
495111245024Smrg    ;;
495211245024Smrg  irix5* | irix6*)
495311245024Smrg    case $cc_basename in
495411245024Smrg      CC*)
495511245024Smrg	# SGI C++
495611245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
495741b2f0bdSmrg
495811245024Smrg	# Archives containing C++ object files must be created using
495911245024Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
496011245024Smrg	# necessary to make sure instantiated templates are included
496111245024Smrg	# in the archive.
496211245024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
496311245024Smrg	;;
496411245024Smrg      *)
496511245024Smrg	if test "$GXX" = yes; then
496611245024Smrg	  if test "$with_gnu_ld" = no; then
496711245024Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
496811245024Smrg	  else
496911245024Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib'
497011245024Smrg	  fi
497111245024Smrg	fi
497211245024Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
497311245024Smrg	;;
497411245024Smrg    esac
497511245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
497611245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
497711245024Smrg    ;;
497811245024Smrg  linux* | k*bsd*-gnu)
497911245024Smrg    case $cc_basename in
498011245024Smrg      KCC*)
498111245024Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
498241b2f0bdSmrg
498311245024Smrg	# KCC will only create a shared library if the output file
498411245024Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
498511245024Smrg	# to its proper name (with version) after linking.
498611245024Smrg	_LT_AC_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'
498711245024Smrg	_LT_AC_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'
498811245024Smrg	# Commands to make compiler produce verbose output that lists
498911245024Smrg	# what "hidden" libraries, object files and flags are used when
499011245024Smrg	# linking a shared library.
499111245024Smrg	#
499211245024Smrg	# There doesn't appear to be a way to prevent this compiler from
499311245024Smrg	# explicitly linking system object files so we need to strip them
499411245024Smrg	# from the output so that they don't get included in the library
499511245024Smrg	# dependencies.
499611245024Smrg	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; echo $list'
499741b2f0bdSmrg
499811245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
499911245024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
500041b2f0bdSmrg
500111245024Smrg	# Archives containing C++ object files must be created using
500211245024Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
500311245024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
500411245024Smrg	;;
500511245024Smrg      icpc*)
500611245024Smrg	# Intel C++
500711245024Smrg	with_gnu_ld=yes
500811245024Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
500911245024Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
501011245024Smrg	# earlier do not add the objects themselves.
501111245024Smrg	case `$CC -V 2>&1` in
501211245024Smrg	*"Version 7."*)
501311245024Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
501411245024Smrg  	  _LT_AC_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'
501511245024Smrg	  ;;
501611245024Smrg	*)  # Version 8.0 or newer
501711245024Smrg	  tmp_idyn=
501811245024Smrg	  case $host_cpu in
501911245024Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
502011245024Smrg	  esac
502111245024Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
502211245024Smrg	  _LT_AC_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'
502311245024Smrg	  ;;
502411245024Smrg	esac
502511245024Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
502611245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
502711245024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
502811245024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
502911245024Smrg	;;
503011245024Smrg      pgCC* | pgcpp*)
503111245024Smrg        # Portland Group C++ compiler
503211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
503311245024Smrg  	_LT_AC_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'
503441b2f0bdSmrg
503511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
503611245024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
503711245024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
503811245024Smrg        ;;
503911245024Smrg      cxx*)
504011245024Smrg	# Compaq C++
504111245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
504211245024Smrg	_LT_AC_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'
504341b2f0bdSmrg
504411245024Smrg	runpath_var=LD_RUN_PATH
504511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
504611245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
504741b2f0bdSmrg
504811245024Smrg	# Commands to make compiler produce verbose output that lists
504911245024Smrg	# what "hidden" libraries, object files and flags are used when
505011245024Smrg	# linking a shared library.
505111245024Smrg	#
505211245024Smrg	# There doesn't appear to be a way to prevent this compiler from
505311245024Smrg	# explicitly linking system object files so we need to strip them
505411245024Smrg	# from the output so that they don't get included in the library
505511245024Smrg	# dependencies.
505611245024Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $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; echo $list'
505711245024Smrg	;;
505811245024Smrg      *)
505911245024Smrg	case `$CC -V 2>&1 | sed 5q` in
506011245024Smrg	*Sun\ C*)
506111245024Smrg	  # Sun C++ 5.9
506211245024Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
506311245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
506411245024Smrg	  _LT_AC_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'
506511245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
506611245024Smrg	  _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
506711245024Smrg
506811245024Smrg	  # Not sure whether something based on
506911245024Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
507011245024Smrg	  # would be better.
507111245024Smrg	  output_verbose_link_cmd='echo'
507211245024Smrg
507311245024Smrg	  # Archives containing C++ object files must be created using
507411245024Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
507511245024Smrg	  # necessary to make sure instantiated templates are included
507611245024Smrg	  # in the archive.
507711245024Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
507811245024Smrg	  ;;
507911245024Smrg	esac
508011245024Smrg	;;
508111245024Smrg    esac
508211245024Smrg    ;;
508311245024Smrg  lynxos*)
508411245024Smrg    # FIXME: insert proper C++ library support
508511245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
508611245024Smrg    ;;
508711245024Smrg  m88k*)
508811245024Smrg    # FIXME: insert proper C++ library support
508911245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
509011245024Smrg    ;;
509111245024Smrg  mvs*)
509211245024Smrg    case $cc_basename in
509311245024Smrg      cxx*)
509411245024Smrg	# FIXME: insert proper C++ library support
509511245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
509611245024Smrg	;;
509711245024Smrg      *)
509811245024Smrg	# FIXME: insert proper C++ library support
509911245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
510011245024Smrg	;;
510111245024Smrg    esac
510211245024Smrg    ;;
510311245024Smrg  netbsd*)
510411245024Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
510511245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
510611245024Smrg      wlarc=
510711245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
510811245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
510911245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
511011245024Smrg    fi
511111245024Smrg    # Workaround some broken pre-1.5 toolchains
511211245024Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
511311245024Smrg    ;;
511411245024Smrg  openbsd2*)
511511245024Smrg    # C++ shared libraries are fairly broken
511611245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
511711245024Smrg    ;;
511811245024Smrg  openbsd*)
511911245024Smrg    if test -f /usr/libexec/ld.so; then
512011245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
512111245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
512211245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
512311245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
512411245024Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
512511245024Smrg	_LT_AC_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'
512611245024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
512711245024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
512811245024Smrg      fi
512911245024Smrg      output_verbose_link_cmd='echo'
513011245024Smrg    else
513111245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
513211245024Smrg    fi
513311245024Smrg    ;;
513411245024Smrg  osf3*)
513511245024Smrg    case $cc_basename in
513611245024Smrg      KCC*)
513711245024Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
513841b2f0bdSmrg
513911245024Smrg	# KCC will only create a shared library if the output file
514011245024Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
514111245024Smrg	# to its proper name (with version) after linking.
514211245024Smrg	_LT_AC_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'
514341b2f0bdSmrg
514411245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
514511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
514641b2f0bdSmrg
514711245024Smrg	# Archives containing C++ object files must be created using
514811245024Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
514911245024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
515041b2f0bdSmrg
515111245024Smrg	;;
515211245024Smrg      RCC*)
515311245024Smrg	# Rational C++ 2.4.1
515411245024Smrg	# FIXME: insert proper C++ library support
515511245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
515611245024Smrg	;;
515711245024Smrg      cxx*)
515811245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
515911245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
516041b2f0bdSmrg
516111245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
516211245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
516341b2f0bdSmrg
516411245024Smrg	# Commands to make compiler produce verbose output that lists
516511245024Smrg	# what "hidden" libraries, object files and flags are used when
516611245024Smrg	# linking a shared library.
516711245024Smrg	#
516811245024Smrg	# There doesn't appear to be a way to prevent this compiler from
516911245024Smrg	# explicitly linking system object files so we need to strip them
517011245024Smrg	# from the output so that they don't get included in the library
517111245024Smrg	# dependencies.
517211245024Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
517311245024Smrg	;;
517411245024Smrg      *)
517511245024Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
517611245024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
517711245024Smrg	  _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
517841b2f0bdSmrg
517911245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
518011245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
518141b2f0bdSmrg
518211245024Smrg	  # Commands to make compiler produce verbose output that lists
518311245024Smrg	  # what "hidden" libraries, object files and flags are used when
518411245024Smrg	  # linking a shared library.
518511245024Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
518641b2f0bdSmrg
518711245024Smrg	else
518811245024Smrg	  # FIXME: insert proper C++ library support
518911245024Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
519011245024Smrg	fi
519111245024Smrg	;;
519211245024Smrg    esac
519311245024Smrg    ;;
519411245024Smrg  osf4* | osf5*)
519511245024Smrg    case $cc_basename in
519611245024Smrg      KCC*)
519711245024Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
519841b2f0bdSmrg
519911245024Smrg	# KCC will only create a shared library if the output file
520011245024Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
520111245024Smrg	# to its proper name (with version) after linking.
520211245024Smrg	_LT_AC_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'
520341b2f0bdSmrg
520411245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
520511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
520641b2f0bdSmrg
520711245024Smrg	# Archives containing C++ object files must be created using
520811245024Smrg	# the KAI C++ compiler.
520911245024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
521011245024Smrg	;;
521111245024Smrg      RCC*)
521211245024Smrg	# Rational C++ 2.4.1
521311245024Smrg	# FIXME: insert proper C++ library support
521411245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
521511245024Smrg	;;
521611245024Smrg      cxx*)
521711245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
521811245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
521911245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
522011245024Smrg	  echo "-hidden">> $lib.exp~
522111245024Smrg	  $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~
522211245024Smrg	  $rm $lib.exp'
522341b2f0bdSmrg
522411245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
522511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
522641b2f0bdSmrg
522711245024Smrg	# Commands to make compiler produce verbose output that lists
522811245024Smrg	# what "hidden" libraries, object files and flags are used when
522911245024Smrg	# linking a shared library.
523011245024Smrg	#
523111245024Smrg	# There doesn't appear to be a way to prevent this compiler from
523211245024Smrg	# explicitly linking system object files so we need to strip them
523311245024Smrg	# from the output so that they don't get included in the library
523411245024Smrg	# dependencies.
523511245024Smrg	output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $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; echo $list'
523611245024Smrg	;;
523711245024Smrg      *)
523811245024Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
523911245024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
524011245024Smrg	 _LT_AC_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" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
524141b2f0bdSmrg
524211245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
524311245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
524441b2f0bdSmrg
524511245024Smrg	  # Commands to make compiler produce verbose output that lists
524611245024Smrg	  # what "hidden" libraries, object files and flags are used when
524711245024Smrg	  # linking a shared library.
524811245024Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
524941b2f0bdSmrg
525011245024Smrg	else
525111245024Smrg	  # FIXME: insert proper C++ library support
525211245024Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
525311245024Smrg	fi
525411245024Smrg	;;
525511245024Smrg    esac
525611245024Smrg    ;;
525711245024Smrg  psos*)
525811245024Smrg    # FIXME: insert proper C++ library support
525911245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
526011245024Smrg    ;;
526111245024Smrg  sunos4*)
526211245024Smrg    case $cc_basename in
526311245024Smrg      CC*)
526411245024Smrg	# Sun C++ 4.x
526511245024Smrg	# FIXME: insert proper C++ library support
526611245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
526711245024Smrg	;;
526811245024Smrg      lcc*)
526911245024Smrg	# Lucid
527011245024Smrg	# FIXME: insert proper C++ library support
527111245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
527211245024Smrg	;;
527311245024Smrg      *)
527411245024Smrg	# FIXME: insert proper C++ library support
527511245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
527611245024Smrg	;;
527711245024Smrg    esac
527811245024Smrg    ;;
527911245024Smrg  solaris*)
528011245024Smrg    case $cc_basename in
528111245024Smrg      CC*)
528211245024Smrg	# Sun C++ 4.2, 5.x and Centerline C++
528311245024Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
528411245024Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
528511245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
528611245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
528711245024Smrg	$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'
528841b2f0bdSmrg
528911245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
529011245024Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
529111245024Smrg	case $host_os in
529211245024Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
529311245024Smrg	  *)
529411245024Smrg	    # The compiler driver will combine and reorder linker options,
529511245024Smrg	    # but understands `-z linker_flag'.
529611245024Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
529711245024Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
529811245024Smrg	    ;;
529911245024Smrg	esac
530011245024Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
530141b2f0bdSmrg
530211245024Smrg	output_verbose_link_cmd='echo'
530341b2f0bdSmrg
530411245024Smrg	# Archives containing C++ object files must be created using
530511245024Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
530611245024Smrg	# necessary to make sure instantiated templates are included
530711245024Smrg	# in the archive.
530811245024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
530911245024Smrg	;;
531011245024Smrg      gcx*)
531111245024Smrg	# Green Hills C++ Compiler
531211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
531341b2f0bdSmrg
531411245024Smrg	# The C++ compiler must be used to create the archive.
531511245024Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
531611245024Smrg	;;
531711245024Smrg      *)
531811245024Smrg	# GNU C++ compiler with Solaris linker
531911245024Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
532011245024Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
532111245024Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
532211245024Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
532311245024Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
532411245024Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
532541b2f0bdSmrg
532611245024Smrg	    # Commands to make compiler produce verbose output that lists
532711245024Smrg	    # what "hidden" libraries, object files and flags are used when
532811245024Smrg	    # linking a shared library.
532911245024Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
533011245024Smrg	  else
533111245024Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
533211245024Smrg	    # platform.
533311245024Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
533411245024Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
533511245024Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
533641b2f0bdSmrg
533711245024Smrg	    # Commands to make compiler produce verbose output that lists
533811245024Smrg	    # what "hidden" libraries, object files and flags are used when
533911245024Smrg	    # linking a shared library.
534011245024Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
534111245024Smrg	  fi
534241b2f0bdSmrg
534311245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
534411245024Smrg	  case $host_os in
534511245024Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
534611245024Smrg	  *)
534711245024Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
534811245024Smrg	    ;;
534911245024Smrg	  esac
535011245024Smrg	fi
535111245024Smrg	;;
535211245024Smrg    esac
535311245024Smrg    ;;
535411245024Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
535511245024Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
535611245024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
535711245024Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
535811245024Smrg    runpath_var='LD_RUN_PATH'
535941b2f0bdSmrg
536011245024Smrg    case $cc_basename in
536111245024Smrg      CC*)
536211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
536311245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
536411245024Smrg	;;
536511245024Smrg      *)
536611245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
536711245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
536811245024Smrg	;;
536911245024Smrg    esac
537011245024Smrg    ;;
537111245024Smrg  sysv5* | sco3.2v5* | sco5v6*)
537211245024Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
537311245024Smrg    # link with -lc, and that would cause any symbols used from libc to
537411245024Smrg    # always be unresolved, which means just about no library would
537511245024Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
537611245024Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
537711245024Smrg    # as -z defs.
537811245024Smrg    # For security reasons, it is highly recommended that you always
537911245024Smrg    # use absolute paths for naming shared libraries, and exclude the
538011245024Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
538111245024Smrg    # requires that you compile everything twice, which is a pain.
538211245024Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
538311245024Smrg    # non-empty value in the environment.  Most likely only useful for
538411245024Smrg    # creating official distributions of packages.
538511245024Smrg    # This is a hack until libtool officially supports absolute path
538611245024Smrg    # names for shared libraries.
538711245024Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
538811245024Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
538911245024Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
539011245024Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
539111245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
539211245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
539311245024Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
539411245024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
539511245024Smrg    runpath_var='LD_RUN_PATH'
539641b2f0bdSmrg
539711245024Smrg    case $cc_basename in
539811245024Smrg      CC*)
539911245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
540011245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
540111245024Smrg	;;
540211245024Smrg      *)
540311245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
540411245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
540511245024Smrg	;;
540611245024Smrg    esac
540711245024Smrg    ;;
540811245024Smrg  tandem*)
540911245024Smrg    case $cc_basename in
541011245024Smrg      NCC*)
541111245024Smrg	# NonStop-UX NCC 3.20
541211245024Smrg	# FIXME: insert proper C++ library support
541311245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
541411245024Smrg	;;
541511245024Smrg      *)
541611245024Smrg	# FIXME: insert proper C++ library support
541711245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
541811245024Smrg	;;
541911245024Smrg    esac
542011245024Smrg    ;;
542111245024Smrg  vxworks*)
542211245024Smrg    # FIXME: insert proper C++ library support
542311245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
542411245024Smrg    ;;
542511245024Smrg  *)
542611245024Smrg    # FIXME: insert proper C++ library support
542711245024Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
542811245024Smrg    ;;
542911245024Smrgesac
543011245024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
543111245024Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
543241b2f0bdSmrg
543311245024Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
543411245024Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
543541b2f0bdSmrg
543611245024SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
543711245024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
543811245024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
543911245024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
544011245024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
544111245024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
544211245024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
544341b2f0bdSmrg
544411245024SmrgAC_LIBTOOL_CONFIG($1)
544511245024Smrg
544611245024SmrgAC_LANG_POP
544711245024SmrgCC=$lt_save_CC
544811245024SmrgLDCXX=$LD
544911245024SmrgLD=$lt_save_LD
545011245024SmrgGCC=$lt_save_GCC
545111245024Smrgwith_gnu_ldcxx=$with_gnu_ld
545211245024Smrgwith_gnu_ld=$lt_save_with_gnu_ld
545311245024Smrglt_cv_path_LDCXX=$lt_cv_path_LD
545411245024Smrglt_cv_path_LD=$lt_save_path_LD
545511245024Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
545611245024Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
545711245024Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
545811245024Smrg
545911245024Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
546011245024Smrg# ------------------------------------
546111245024Smrg# Figure out "hidden" library dependencies from verbose
546211245024Smrg# compiler output when linking a shared library.
546311245024Smrg# Parse the compiler output and extract the necessary
546411245024Smrg# objects, libraries and library flags.
546511245024SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
546611245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
546711245024Smrgdnl we can't use the lt_simple_compile_test_code here,
546811245024Smrgdnl because it contains code intended for an executable,
546911245024Smrgdnl not a library.  It's possible we should let each
547011245024Smrgdnl tag define a new lt_????_link_test_code variable,
547111245024Smrgdnl but it's only used here...
547211245024Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
547311245024Smrgint a;
547411245024Smrgvoid foo (void) { a = 0; }
547511245024SmrgEOF
547611245024Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
547711245024Smrgclass Foo
547841b2f0bdSmrg{
547911245024Smrgpublic:
548011245024Smrg  Foo (void) { a = 0; }
548111245024Smrgprivate:
548211245024Smrg  int a;
548311245024Smrg};
548441b2f0bdSmrgEOF
548511245024Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
548611245024Smrg      subroutine foo
548711245024Smrg      implicit none
548811245024Smrg      integer*4 a
548911245024Smrg      a=0
549011245024Smrg      return
549111245024Smrg      end
549211245024SmrgEOF
549311245024Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
549411245024Smrgpublic class foo {
549511245024Smrg  private int a;
549611245024Smrg  public void bar (void) {
549711245024Smrg    a = 0;
549811245024Smrg  }
549941b2f0bdSmrg};
550041b2f0bdSmrgEOF
550141b2f0bdSmrg])
550211245024Smrgdnl Parse the compiler output and extract the necessary
550311245024Smrgdnl objects, libraries and library flags.
550411245024Smrgif AC_TRY_EVAL(ac_compile); then
550511245024Smrg  # Parse the compiler output and extract the necessary
550611245024Smrg  # objects, libraries and library flags.
550711245024Smrg
550811245024Smrg  # Sentinel used to keep track of whether or not we are before
550911245024Smrg  # the conftest object file.
551011245024Smrg  pre_test_object_deps_done=no
551111245024Smrg
551211245024Smrg  # The `*' in the case matches for architectures that use `case' in
551311245024Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
551411245024Smrg  # eval without this substitution.
551511245024Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
551611245024Smrg
551711245024Smrg  for p in `eval $output_verbose_link_cmd`; do
551811245024Smrg    case $p in
551911245024Smrg
552011245024Smrg    -L* | -R* | -l*)
552111245024Smrg       # Some compilers place space between "-{L,R}" and the path.
552211245024Smrg       # Remove the space.
552311245024Smrg       if test $p = "-L" \
552411245024Smrg	  || test $p = "-R"; then
552511245024Smrg	 prev=$p
552611245024Smrg	 continue
552711245024Smrg       else
552811245024Smrg	 prev=
552911245024Smrg       fi
553011245024Smrg
553111245024Smrg       if test "$pre_test_object_deps_done" = no; then
553211245024Smrg	 case $p in
553311245024Smrg	 -L* | -R*)
553411245024Smrg	   # Internal compiler library paths should come after those
553511245024Smrg	   # provided the user.  The postdeps already come after the
553611245024Smrg	   # user supplied libs so there is no need to process them.
553711245024Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
553811245024Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
553911245024Smrg	   else
554011245024Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
554111245024Smrg	   fi
554211245024Smrg	   ;;
554311245024Smrg	 # The "-l" case would never come before the object being
554411245024Smrg	 # linked, so don't bother handling this case.
554511245024Smrg	 esac
554611245024Smrg       else
554711245024Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
554811245024Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
554911245024Smrg	 else
555011245024Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
555111245024Smrg	 fi
555211245024Smrg       fi
555311245024Smrg       ;;
555411245024Smrg
555511245024Smrg    *.$objext)
555611245024Smrg       # This assumes that the test object file only shows up
555711245024Smrg       # once in the compiler output.
555811245024Smrg       if test "$p" = "conftest.$objext"; then
555911245024Smrg	 pre_test_object_deps_done=yes
556011245024Smrg	 continue
556111245024Smrg       fi
556211245024Smrg
556311245024Smrg       if test "$pre_test_object_deps_done" = no; then
556411245024Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
556511245024Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
556611245024Smrg	 else
556711245024Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
556811245024Smrg	 fi
556911245024Smrg       else
557011245024Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
557111245024Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
557211245024Smrg	 else
557311245024Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
557411245024Smrg	 fi
557511245024Smrg       fi
557611245024Smrg       ;;
557711245024Smrg
557811245024Smrg    *) ;; # Ignore the rest.
557911245024Smrg
558011245024Smrg    esac
558111245024Smrg  done
558211245024Smrg
558311245024Smrg  # Clean up.
558411245024Smrg  rm -f a.out a.exe
558541b2f0bdSmrgelse
558611245024Smrg  echo "libtool.m4: error: problem compiling $1 test program"
558741b2f0bdSmrgfi
558841b2f0bdSmrg
558911245024Smrg$rm -f confest.$objext
559041b2f0bdSmrg
559111245024Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
559211245024Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
559311245024Smrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
559411245024Smrgfi
559541b2f0bdSmrg
559611245024Smrg# PORTME: override above test on systems where it is broken
559711245024Smrgifelse([$1],[CXX],
559811245024Smrg[case $host_os in
559911245024Smrginterix[[3-9]]*)
560011245024Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
560111245024Smrg  # hack all around it, let's just trust "g++" to DTRT.
560211245024Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
560311245024Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
560411245024Smrg  _LT_AC_TAGVAR(postdeps,$1)=
560511245024Smrg  ;;
560641b2f0bdSmrg
560711245024Smrglinux*)
560811245024Smrg  case `$CC -V 2>&1 | sed 5q` in
560911245024Smrg  *Sun\ C*)
561011245024Smrg    # Sun C++ 5.9
561111245024Smrg    #
561211245024Smrg    # The more standards-conforming stlport4 library is
561311245024Smrg    # incompatible with the Cstd library. Avoid specifying
561411245024Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
561511245024Smrg    # -library=stlport4 depends on it.
561611245024Smrg    case " $CXX $CXXFLAGS " in
561711245024Smrg    *" -library=stlport4 "*)
561811245024Smrg      solaris_use_stlport4=yes
561941b2f0bdSmrg      ;;
562011245024Smrg    esac
562111245024Smrg    if test "$solaris_use_stlport4" != yes; then
562211245024Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
562311245024Smrg    fi
562411245024Smrg    ;;
562511245024Smrg  esac
562611245024Smrg  ;;
562711245024Smrg
562811245024Smrgsolaris*)
562911245024Smrg  case $cc_basename in
563011245024Smrg  CC*)
563111245024Smrg    # The more standards-conforming stlport4 library is
563211245024Smrg    # incompatible with the Cstd library. Avoid specifying
563311245024Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
563411245024Smrg    # -library=stlport4 depends on it.
563511245024Smrg    case " $CXX $CXXFLAGS " in
563611245024Smrg    *" -library=stlport4 "*)
563711245024Smrg      solaris_use_stlport4=yes
563841b2f0bdSmrg      ;;
563941b2f0bdSmrg    esac
564011245024Smrg
564111245024Smrg    # Adding this requires a known-good setup of shared libraries for
564211245024Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
564311245024Smrg    # archive will be linked into the output, leading to subtle bugs.
564411245024Smrg    if test "$solaris_use_stlport4" != yes; then
564511245024Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
564611245024Smrg    fi
564711245024Smrg    ;;
564811245024Smrg  esac
564911245024Smrg  ;;
565011245024Smrgesac
565111245024Smrg])
565211245024Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
565311245024Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
565411245024Smrgesac
565511245024Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
565611245024Smrg
565711245024Smrg# AC_LIBTOOL_LANG_F77_CONFIG
565811245024Smrg# --------------------------
565911245024Smrg# Ensure that the configuration vars for the C compiler are
566011245024Smrg# suitably defined.  Those variables are subsequently used by
566111245024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
566211245024SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
566311245024SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
566411245024Smrg[AC_REQUIRE([AC_PROG_F77])
566511245024SmrgAC_LANG_PUSH(Fortran 77)
566611245024Smrg
566711245024Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
566811245024Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
566911245024Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
567011245024Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
567111245024Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
567211245024Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
567311245024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
567411245024Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
567511245024Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
567611245024Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
567711245024Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
567811245024Smrg_LT_AC_TAGVAR(module_cmds, $1)=
567911245024Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
568011245024Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
568111245024Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
568211245024Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
568311245024Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
568411245024Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
568511245024Smrg
568611245024Smrg# Source file extension for f77 test sources.
568711245024Smrgac_ext=f
568811245024Smrg
568911245024Smrg# Object file extension for compiled f77 test sources.
569011245024Smrgobjext=o
569111245024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
569211245024Smrg
569311245024Smrg# Code to be used in simple compile tests
569411245024Smrglt_simple_compile_test_code="\
569511245024Smrg      subroutine t
569611245024Smrg      return
569711245024Smrg      end
569811245024Smrg"
569911245024Smrg
570011245024Smrg# Code to be used in simple link tests
570111245024Smrglt_simple_link_test_code="\
570211245024Smrg      program t
570311245024Smrg      end
570411245024Smrg"
570511245024Smrg
570611245024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
570711245024Smrg_LT_AC_SYS_COMPILER
570811245024Smrg
570911245024Smrg# save warnings/boilerplate of simple test code
571011245024Smrg_LT_COMPILER_BOILERPLATE
571111245024Smrg_LT_LINKER_BOILERPLATE
571211245024Smrg
571311245024Smrg# Allow CC to be a program name with arguments.
571411245024Smrglt_save_CC="$CC"
571511245024SmrgCC=${F77-"f77"}
571611245024Smrgcompiler=$CC
571711245024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
571811245024Smrg_LT_CC_BASENAME([$compiler])
571911245024Smrg
572011245024SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
572111245024SmrgAC_MSG_RESULT([$can_build_shared])
572211245024Smrg
572311245024SmrgAC_MSG_CHECKING([whether to build shared libraries])
572411245024Smrgtest "$can_build_shared" = "no" && enable_shared=no
572511245024Smrg
572611245024Smrg# On AIX, shared libraries and static libraries use the same namespace, and
572711245024Smrg# are all built from PIC.
572811245024Smrgcase $host_os in
572911245024Smrgaix3*)
573011245024Smrg  test "$enable_shared" = yes && enable_static=no
573111245024Smrg  if test -n "$RANLIB"; then
573211245024Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
573311245024Smrg    postinstall_cmds='$RANLIB $lib'
573411245024Smrg  fi
573511245024Smrg  ;;
573611245024Smrgaix[[4-9]]*)
573711245024Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
573811245024Smrg    test "$enable_shared" = yes && enable_static=no
573911245024Smrg  fi
574011245024Smrg  ;;
574111245024Smrgesac
574211245024SmrgAC_MSG_RESULT([$enable_shared])
574311245024Smrg
574411245024SmrgAC_MSG_CHECKING([whether to build static libraries])
574511245024Smrg# Make sure either enable_shared or enable_static is yes.
574611245024Smrgtest "$enable_shared" = yes || enable_static=yes
574711245024SmrgAC_MSG_RESULT([$enable_static])
574811245024Smrg
574911245024Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
575011245024Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
575111245024Smrg
575211245024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
575311245024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
575411245024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
575511245024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
575611245024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
575711245024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
575811245024Smrg
575911245024SmrgAC_LIBTOOL_CONFIG($1)
576011245024Smrg
576111245024SmrgAC_LANG_POP
576211245024SmrgCC="$lt_save_CC"
576311245024Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
576411245024Smrg
576511245024Smrg
576611245024Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
576711245024Smrg# --------------------------
576811245024Smrg# Ensure that the configuration vars for the C compiler are
576911245024Smrg# suitably defined.  Those variables are subsequently used by
577011245024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
577111245024SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
577211245024SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
577311245024Smrg[AC_LANG_SAVE
577411245024Smrg
577511245024Smrg# Source file extension for Java test sources.
577611245024Smrgac_ext=java
577711245024Smrg
577811245024Smrg# Object file extension for compiled Java test sources.
577911245024Smrgobjext=o
578011245024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
578111245024Smrg
578211245024Smrg# Code to be used in simple compile tests
578311245024Smrglt_simple_compile_test_code="class foo {}"
578411245024Smrg
578511245024Smrg# Code to be used in simple link tests
578611245024Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
578711245024Smrg
578811245024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
578911245024Smrg_LT_AC_SYS_COMPILER
579011245024Smrg
579111245024Smrg# save warnings/boilerplate of simple test code
579211245024Smrg_LT_COMPILER_BOILERPLATE
579311245024Smrg_LT_LINKER_BOILERPLATE
579411245024Smrg
579511245024Smrg# Allow CC to be a program name with arguments.
579611245024Smrglt_save_CC="$CC"
579711245024SmrgCC=${GCJ-"gcj"}
579811245024Smrgcompiler=$CC
579911245024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
580011245024Smrg_LT_CC_BASENAME([$compiler])
580111245024Smrg
580211245024Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
580311245024Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
580411245024Smrg
580511245024Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
580611245024Smrg
580711245024SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
580811245024SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
580911245024SmrgAC_LIBTOOL_PROG_CC_C_O($1)
581011245024SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
581111245024SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
581211245024SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
581311245024SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
581411245024Smrg
581511245024SmrgAC_LIBTOOL_CONFIG($1)
581611245024Smrg
581711245024SmrgAC_LANG_RESTORE
581811245024SmrgCC="$lt_save_CC"
581911245024Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
582011245024Smrg
582111245024Smrg
582211245024Smrg# AC_LIBTOOL_LANG_RC_CONFIG
582311245024Smrg# -------------------------
582411245024Smrg# Ensure that the configuration vars for the Windows resource compiler are
582511245024Smrg# suitably defined.  Those variables are subsequently used by
582611245024Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
582711245024SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
582811245024SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
582911245024Smrg[AC_LANG_SAVE
583011245024Smrg
583111245024Smrg# Source file extension for RC test sources.
583211245024Smrgac_ext=rc
583311245024Smrg
583411245024Smrg# Object file extension for compiled RC test sources.
583511245024Smrgobjext=o
583611245024Smrg_LT_AC_TAGVAR(objext, $1)=$objext
583711245024Smrg
583811245024Smrg# Code to be used in simple compile tests
583911245024Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
584011245024Smrg
584111245024Smrg# Code to be used in simple link tests
584211245024Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
584311245024Smrg
584411245024Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
584511245024Smrg_LT_AC_SYS_COMPILER
584611245024Smrg
584711245024Smrg# save warnings/boilerplate of simple test code
584811245024Smrg_LT_COMPILER_BOILERPLATE
584911245024Smrg_LT_LINKER_BOILERPLATE
585011245024Smrg
585111245024Smrg# Allow CC to be a program name with arguments.
585211245024Smrglt_save_CC="$CC"
585311245024SmrgCC=${RC-"windres"}
585411245024Smrgcompiler=$CC
585511245024Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
585611245024Smrg_LT_CC_BASENAME([$compiler])
585711245024Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
585811245024Smrg
585911245024SmrgAC_LIBTOOL_CONFIG($1)
586011245024Smrg
586111245024SmrgAC_LANG_RESTORE
586211245024SmrgCC="$lt_save_CC"
586311245024Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
586411245024Smrg
586511245024Smrg
586611245024Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
586711245024Smrg# ----------------------------
586811245024Smrg# If TAGNAME is not passed, then create an initial libtool script
586911245024Smrg# with a default configuration from the untagged config vars.  Otherwise
587011245024Smrg# add code to config.status for appending the configuration named by
587111245024Smrg# TAGNAME from the matching tagged config vars.
587211245024SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
587311245024Smrg[# The else clause should only fire when bootstrapping the
587411245024Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
587511245024Smrg# with your package, and you will get complaints that there are
587611245024Smrg# no rules to generate ltmain.sh.
587711245024Smrgif test -f "$ltmain"; then
587811245024Smrg  # See if we are running on zsh, and set the options which allow our commands through
587911245024Smrg  # without removal of \ escapes.
588011245024Smrg  if test -n "${ZSH_VERSION+set}" ; then
588111245024Smrg    setopt NO_GLOB_SUBST
588241b2f0bdSmrg  fi
588311245024Smrg  # Now quote all the things that may contain metacharacters while being
588411245024Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
588511245024Smrg  # variables and quote the copies for generation of the libtool script.
588611245024Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
588711245024Smrg    SED SHELL STRIP \
588811245024Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
588911245024Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
589011245024Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
589111245024Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
589211245024Smrg    lt_cv_sys_global_symbol_to_c_name_address \
589311245024Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
589411245024Smrg    old_postinstall_cmds old_postuninstall_cmds \
589511245024Smrg    _LT_AC_TAGVAR(compiler, $1) \
589611245024Smrg    _LT_AC_TAGVAR(CC, $1) \
589711245024Smrg    _LT_AC_TAGVAR(LD, $1) \
589811245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
589911245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
590011245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
590111245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
590211245024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
590311245024Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
590411245024Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
590511245024Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
590611245024Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
590711245024Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
590811245024Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
590911245024Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
591011245024Smrg    _LT_AC_TAGVAR(predeps, $1) \
591111245024Smrg    _LT_AC_TAGVAR(postdeps, $1) \
591211245024Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
591311245024Smrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
591411245024Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
591511245024Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
591611245024Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
591711245024Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
591811245024Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
591911245024Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
592011245024Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
592111245024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
592211245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
592311245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
592411245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
592511245024Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
592611245024Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
592711245024Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
592811245024Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
592911245024Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
593011245024Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
593111245024Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
593211245024Smrg
593311245024Smrg    case $var in
593411245024Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
593511245024Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
593611245024Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
593711245024Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
593811245024Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
593911245024Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
594011245024Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
594111245024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
594211245024Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
594311245024Smrg    postinstall_cmds | postuninstall_cmds | \
594411245024Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
594511245024Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
594611245024Smrg      # Double-quote double-evaled strings.
594711245024Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
594811245024Smrg      ;;
594911245024Smrg    *)
595011245024Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
595111245024Smrg      ;;
595211245024Smrg    esac
595311245024Smrg  done
595411245024Smrg
595511245024Smrg  case $lt_echo in
595611245024Smrg  *'\[$]0 --fallback-echo"')
595711245024Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
595811245024Smrg    ;;
595911245024Smrg  esac
596011245024Smrg
596111245024Smrgifelse([$1], [],
596211245024Smrg  [cfgfile="${ofile}T"
596311245024Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
596411245024Smrg  $rm -f "$cfgfile"
596511245024Smrg  AC_MSG_NOTICE([creating $ofile])],
596611245024Smrg  [cfgfile="$ofile"])
596711245024Smrg
596811245024Smrg  cat <<__EOF__ >> "$cfgfile"
596911245024Smrgifelse([$1], [],
597011245024Smrg[#! $SHELL
597111245024Smrg
597211245024Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
597311245024Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
597411245024Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
597511245024Smrg#
597611245024Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
597711245024Smrg# Free Software Foundation, Inc.
597811245024Smrg#
597911245024Smrg# This file is part of GNU Libtool:
598011245024Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
598111245024Smrg#
598211245024Smrg# This program is free software; you can redistribute it and/or modify
598311245024Smrg# it under the terms of the GNU General Public License as published by
598411245024Smrg# the Free Software Foundation; either version 2 of the License, or
598511245024Smrg# (at your option) any later version.
598611245024Smrg#
598711245024Smrg# This program is distributed in the hope that it will be useful, but
598811245024Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
598911245024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
599011245024Smrg# General Public License for more details.
599111245024Smrg#
599211245024Smrg# You should have received a copy of the GNU General Public License
599311245024Smrg# along with this program; if not, write to the Free Software
599411245024Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
599511245024Smrg#
599611245024Smrg# As a special exception to the GNU General Public License, if you
599711245024Smrg# distribute this file as part of a program that contains a
599811245024Smrg# configuration script generated by Autoconf, you may include it under
599911245024Smrg# the same distribution terms that you use for the rest of that program.
600011245024Smrg
600111245024Smrg# A sed program that does not truncate output.
600211245024SmrgSED=$lt_SED
600311245024Smrg
600411245024Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
600511245024SmrgXsed="$SED -e 1s/^X//"
600611245024Smrg
600711245024Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
600811245024Smrg# if CDPATH is set.
600911245024Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
601011245024Smrg
601111245024Smrg# The names of the tagged configurations supported by this script.
601211245024Smrgavailable_tags=
601311245024Smrg
601411245024Smrg# ### BEGIN LIBTOOL CONFIG],
601511245024Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
601611245024Smrg
601711245024Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
601811245024Smrg
601911245024Smrg# Shell to use when invoking shell scripts.
602011245024SmrgSHELL=$lt_SHELL
602111245024Smrg
602211245024Smrg# Whether or not to build shared libraries.
602311245024Smrgbuild_libtool_libs=$enable_shared
602411245024Smrg
602511245024Smrg# Whether or not to build static libraries.
602611245024Smrgbuild_old_libs=$enable_static
602711245024Smrg
602811245024Smrg# Whether or not to add -lc for building shared libraries.
602911245024Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
603011245024Smrg
603111245024Smrg# Whether or not to disallow shared libs when runtime libs are static
603211245024Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
603311245024Smrg
603411245024Smrg# Whether or not to optimize for fast installation.
603511245024Smrgfast_install=$enable_fast_install
603611245024Smrg
603711245024Smrg# The host system.
603811245024Smrghost_alias=$host_alias
603911245024Smrghost=$host
604011245024Smrghost_os=$host_os
604111245024Smrg
604211245024Smrg# The build system.
604311245024Smrgbuild_alias=$build_alias
604411245024Smrgbuild=$build
604511245024Smrgbuild_os=$build_os
604611245024Smrg
604711245024Smrg# An echo program that does not interpret backslashes.
604811245024Smrgecho=$lt_echo
604911245024Smrg
605011245024Smrg# The archiver.
605111245024SmrgAR=$lt_AR
605211245024SmrgAR_FLAGS=$lt_AR_FLAGS
605311245024Smrg
605411245024Smrg# A C compiler.
605511245024SmrgLTCC=$lt_LTCC
605611245024Smrg
605711245024Smrg# LTCC compiler flags.
605811245024SmrgLTCFLAGS=$lt_LTCFLAGS
605911245024Smrg
606011245024Smrg# A language-specific compiler.
606111245024SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
606211245024Smrg
606311245024Smrg# Is the compiler the GNU C compiler?
606411245024Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
606511245024Smrg
606611245024Smrg# An ERE matcher.
606711245024SmrgEGREP=$lt_EGREP
606811245024Smrg
606911245024Smrg# The linker used to build libraries.
607011245024SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
607111245024Smrg
607211245024Smrg# Whether we need hard or soft links.
607311245024SmrgLN_S=$lt_LN_S
607411245024Smrg
607511245024Smrg# A BSD-compatible nm program.
607611245024SmrgNM=$lt_NM
607711245024Smrg
607811245024Smrg# A symbol stripping program
607911245024SmrgSTRIP=$lt_STRIP
608011245024Smrg
608111245024Smrg# Used to examine libraries when file_magic_cmd begins "file"
608211245024SmrgMAGIC_CMD=$MAGIC_CMD
608311245024Smrg
608411245024Smrg# Used on cygwin: DLL creation program.
608511245024SmrgDLLTOOL="$DLLTOOL"
608641b2f0bdSmrg
608711245024Smrg# Used on cygwin: object dumper.
608811245024SmrgOBJDUMP="$OBJDUMP"
608941b2f0bdSmrg
609011245024Smrg# Used on cygwin: assembler.
609111245024SmrgAS="$AS"
609241b2f0bdSmrg
609311245024Smrg# The name of the directory that contains temporary libtool files.
609411245024Smrgobjdir=$objdir
609541b2f0bdSmrg
609611245024Smrg# How to create reloadable object files.
609711245024Smrgreload_flag=$lt_reload_flag
609811245024Smrgreload_cmds=$lt_reload_cmds
609941b2f0bdSmrg
610011245024Smrg# How to pass a linker flag through the compiler.
610111245024Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
610241b2f0bdSmrg
610311245024Smrg# Object file suffix (normally "o").
610411245024Smrgobjext="$ac_objext"
610541b2f0bdSmrg
610611245024Smrg# Old archive suffix (normally "a").
610711245024Smrglibext="$libext"
610841b2f0bdSmrg
610911245024Smrg# Shared library suffix (normally ".so").
611011245024Smrgshrext_cmds='$shrext_cmds'
611141b2f0bdSmrg
611211245024Smrg# Executable file suffix (normally "").
611311245024Smrgexeext="$exeext"
611441b2f0bdSmrg
611511245024Smrg# Additional compiler flags for building library objects.
611611245024Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
611711245024Smrgpic_mode=$pic_mode
611841b2f0bdSmrg
611911245024Smrg# What is the maximum length of a command?
612011245024Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
612141b2f0bdSmrg
612211245024Smrg# Does compiler simultaneously support -c and -o options?
612311245024Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
612441b2f0bdSmrg
612511245024Smrg# Must we lock files when doing compilation?
612611245024Smrgneed_locks=$lt_need_locks
612741b2f0bdSmrg
612811245024Smrg# Do we need the lib prefix for modules?
612911245024Smrgneed_lib_prefix=$need_lib_prefix
613041b2f0bdSmrg
613111245024Smrg# Do we need a version for libraries?
613211245024Smrgneed_version=$need_version
613341b2f0bdSmrg
613411245024Smrg# Whether dlopen is supported.
613511245024Smrgdlopen_support=$enable_dlopen
613641b2f0bdSmrg
613711245024Smrg# Whether dlopen of programs is supported.
613811245024Smrgdlopen_self=$enable_dlopen_self
613911245024Smrg
614011245024Smrg# Whether dlopen of statically linked programs is supported.
614111245024Smrgdlopen_self_static=$enable_dlopen_self_static
614211245024Smrg
614311245024Smrg# Compiler flag to prevent dynamic linking.
614411245024Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
614511245024Smrg
614611245024Smrg# Compiler flag to turn off builtin functions.
614711245024Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
614811245024Smrg
614911245024Smrg# Compiler flag to allow reflexive dlopens.
615011245024Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
615111245024Smrg
615211245024Smrg# Compiler flag to generate shared objects directly from archives.
615311245024Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
615411245024Smrg
615511245024Smrg# Compiler flag to generate thread-safe objects.
615611245024Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
615711245024Smrg
615811245024Smrg# Library versioning type.
615911245024Smrgversion_type=$version_type
616011245024Smrg
616111245024Smrg# Format of library name prefix.
616211245024Smrglibname_spec=$lt_libname_spec
616311245024Smrg
616411245024Smrg# List of archive names.  First name is the real one, the rest are links.
616511245024Smrg# The last name is the one that the linker finds with -lNAME.
616611245024Smrglibrary_names_spec=$lt_library_names_spec
616711245024Smrg
616811245024Smrg# The coded name of the library, if different from the real name.
616911245024Smrgsoname_spec=$lt_soname_spec
617011245024Smrg
617111245024Smrg# Commands used to build and install an old-style archive.
617211245024SmrgRANLIB=$lt_RANLIB
617311245024Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
617411245024Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
617511245024Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
617611245024Smrg
617711245024Smrg# Create an old-style archive from a shared archive.
617811245024Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
617911245024Smrg
618011245024Smrg# Create a temporary old-style archive to link instead of a shared archive.
618111245024Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
618211245024Smrg
618311245024Smrg# Commands used to build and install a shared archive.
618411245024Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
618511245024Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
618611245024Smrgpostinstall_cmds=$lt_postinstall_cmds
618711245024Smrgpostuninstall_cmds=$lt_postuninstall_cmds
618811245024Smrg
618911245024Smrg# Commands used to build a loadable module (assumed same as above if empty)
619011245024Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
619111245024Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
619211245024Smrg
619311245024Smrg# Commands to strip libraries.
619411245024Smrgold_striplib=$lt_old_striplib
619511245024Smrgstriplib=$lt_striplib
619611245024Smrg
619711245024Smrg# Dependencies to place before the objects being linked to create a
619811245024Smrg# shared library.
619911245024Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
620011245024Smrg
620111245024Smrg# Dependencies to place after the objects being linked to create a
620211245024Smrg# shared library.
620311245024Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
620411245024Smrg
620511245024Smrg# Dependencies to place before the objects being linked to create a
620611245024Smrg# shared library.
620711245024Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
620811245024Smrg
620911245024Smrg# Dependencies to place after the objects being linked to create a
621011245024Smrg# shared library.
621111245024Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
621211245024Smrg
621311245024Smrg# The directories searched by this compiler when creating a shared
621411245024Smrg# library
621511245024Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
621611245024Smrg
621711245024Smrg# The library search path used internally by the compiler when linking
621811245024Smrg# a shared library.
621911245024Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
622011245024Smrg
622111245024Smrg# Method to check whether dependent libraries are shared objects.
622211245024Smrgdeplibs_check_method=$lt_deplibs_check_method
622341b2f0bdSmrg
622411245024Smrg# Command to use when deplibs_check_method == file_magic.
622511245024Smrgfile_magic_cmd=$lt_file_magic_cmd
622641b2f0bdSmrg
622711245024Smrg# Flag that allows shared libraries with undefined symbols to be built.
622811245024Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
622941b2f0bdSmrg
623011245024Smrg# Flag that forces no undefined symbols.
623111245024Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
623241b2f0bdSmrg
623311245024Smrg# Commands used to finish a libtool library installation in a directory.
623411245024Smrgfinish_cmds=$lt_finish_cmds
623541b2f0bdSmrg
623611245024Smrg# Same as above, but a single script fragment to be evaled but not shown.
623711245024Smrgfinish_eval=$lt_finish_eval
623841b2f0bdSmrg
623911245024Smrg# Take the output of nm and produce a listing of raw symbols and C names.
624011245024Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
624141b2f0bdSmrg
624211245024Smrg# Transform the output of nm in a proper C declaration
624311245024Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
624441b2f0bdSmrg
624511245024Smrg# Transform the output of nm in a C name address pair
624611245024Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
624741b2f0bdSmrg
624811245024Smrg# This is the shared library runtime path variable.
624911245024Smrgrunpath_var=$runpath_var
625041b2f0bdSmrg
625111245024Smrg# This is the shared library path variable.
625211245024Smrgshlibpath_var=$shlibpath_var
625341b2f0bdSmrg
625411245024Smrg# Is shlibpath searched before the hard-coded library search path?
625511245024Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
625641b2f0bdSmrg
625711245024Smrg# How to hardcode a shared library path into an executable.
625811245024Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
625941b2f0bdSmrg
626011245024Smrg# Whether we should hardcode library paths into libraries.
626111245024Smrghardcode_into_libs=$hardcode_into_libs
626241b2f0bdSmrg
626311245024Smrg# Flag to hardcode \$libdir into a binary during linking.
626411245024Smrg# This must work even if \$libdir does not exist.
626511245024Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
626641b2f0bdSmrg
626711245024Smrg# If ld is used when linking, flag to hardcode \$libdir into
626811245024Smrg# a binary during linking. This must work even if \$libdir does
626911245024Smrg# not exist.
627011245024Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
627141b2f0bdSmrg
627211245024Smrg# Whether we need a single -rpath flag with a separated argument.
627311245024Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
627441b2f0bdSmrg
627511245024Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
627611245024Smrg# resulting binary.
627711245024Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
627841b2f0bdSmrg
627911245024Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
628011245024Smrg# resulting binary.
628111245024Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
628241b2f0bdSmrg
628311245024Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
628411245024Smrg# the resulting binary.
628511245024Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
628611245024Smrg
628711245024Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
628811245024Smrg# and all subsequent libraries and executables linked against it.
628911245024Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
629011245024Smrg
629111245024Smrg# Variables whose values should be saved in libtool wrapper scripts and
629211245024Smrg# restored at relink time.
629311245024Smrgvariables_saved_for_relink="$variables_saved_for_relink"
629441b2f0bdSmrg
629511245024Smrg# Whether libtool must link a program against all its dependency libraries.
629611245024Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
629741b2f0bdSmrg
629811245024Smrg# Compile-time system search path for libraries
629911245024Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
630041b2f0bdSmrg
630111245024Smrg# Run-time system search path for libraries
630211245024Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
630341b2f0bdSmrg
630411245024Smrg# Fix the shell variable \$srcfile for the compiler.
630511245024Smrgfix_srcfile_path=$lt_fix_srcfile_path
630641b2f0bdSmrg
630711245024Smrg# Set to yes if exported symbols are required.
630811245024Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
630941b2f0bdSmrg
631011245024Smrg# The commands to list exported symbols.
631111245024Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
631241b2f0bdSmrg
631311245024Smrg# The commands to extract the exported symbol list from a shared archive.
631411245024Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
631541b2f0bdSmrg
631611245024Smrg# Symbols that should not be listed in the preloaded symbols.
631711245024Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
631841b2f0bdSmrg
631911245024Smrg# Symbols that must always be exported.
632011245024Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
632141b2f0bdSmrg
632211245024Smrgifelse([$1],[],
632311245024Smrg[# ### END LIBTOOL CONFIG],
632411245024Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
632541b2f0bdSmrg
632611245024Smrg__EOF__
632741b2f0bdSmrg
632811245024Smrgifelse([$1],[], [
632911245024Smrg  case $host_os in
633011245024Smrg  aix3*)
633111245024Smrg    cat <<\EOF >> "$cfgfile"
633241b2f0bdSmrg
633311245024Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
633411245024Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
633511245024Smrg# vanish in a puff of smoke.
633611245024Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
633711245024Smrg  COLLECT_NAMES=
633811245024Smrg  export COLLECT_NAMES
633911245024Smrgfi
634011245024SmrgEOF
634111245024Smrg    ;;
634211245024Smrg  esac
634341b2f0bdSmrg
634411245024Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
634511245024Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
634611245024Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
634711245024Smrg  # is reportedly fixed, but why not run on old versions too?
634811245024Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
634941b2f0bdSmrg
635011245024Smrg  mv -f "$cfgfile" "$ofile" || \
635111245024Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
635211245024Smrg  chmod +x "$ofile"
635311245024Smrg])
635411245024Smrgelse
635511245024Smrg  # If there is no Makefile yet, we rely on a make rule to execute
635611245024Smrg  # `config.status --recheck' to rerun these tests and create the
635711245024Smrg  # libtool script then.
635811245024Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
635911245024Smrg  if test -f "$ltmain_in"; then
636011245024Smrg    test -f Makefile && make "$ltmain"
636111245024Smrg  fi
636211245024Smrgfi
636311245024Smrg])# AC_LIBTOOL_CONFIG
636441b2f0bdSmrg
636541b2f0bdSmrg
636611245024Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
636711245024Smrg# -------------------------------------------
636811245024SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
636911245024Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
637041b2f0bdSmrg
637111245024Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
637241b2f0bdSmrg
637311245024Smrgif test "$GCC" = yes; then
637411245024Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
637541b2f0bdSmrg
637611245024Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
637711245024Smrg    lt_cv_prog_compiler_rtti_exceptions,
637811245024Smrg    [-fno-rtti -fno-exceptions], [],
637911245024Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
638011245024Smrgfi
638111245024Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
638241b2f0bdSmrg
638341b2f0bdSmrg
638411245024Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
638511245024Smrg# ---------------------------------
638611245024SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
638711245024Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
638811245024SmrgAC_REQUIRE([LT_AC_PROG_SED])
638911245024SmrgAC_REQUIRE([AC_PROG_NM])
639011245024SmrgAC_REQUIRE([AC_OBJEXT])
639111245024Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
639211245024SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
639311245024SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
639411245024Smrg[
639511245024Smrg# These are sane defaults that work on at least a few old systems.
639611245024Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
639741b2f0bdSmrg
639811245024Smrg# Character class describing NM global symbol codes.
639911245024Smrgsymcode='[[BCDEGRST]]'
640041b2f0bdSmrg
640111245024Smrg# Regexp to match symbols that can be accessed directly from C.
640211245024Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
640341b2f0bdSmrg
640411245024Smrg# Transform an extracted symbol line into a proper C declaration
640511245024Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
640641b2f0bdSmrg
640711245024Smrg# Transform an extracted symbol line into symbol name and symbol address
640811245024Smrglt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
640941b2f0bdSmrg
641011245024Smrg# Define system-specific variables.
641111245024Smrgcase $host_os in
641211245024Smrgaix*)
641311245024Smrg  symcode='[[BCDT]]'
641411245024Smrg  ;;
641511245024Smrgcygwin* | mingw* | pw32*)
641611245024Smrg  symcode='[[ABCDGISTW]]'
641711245024Smrg  ;;
641811245024Smrghpux*) # Its linker distinguishes data from code symbols
641911245024Smrg  if test "$host_cpu" = ia64; then
642011245024Smrg    symcode='[[ABCDEGRST]]'
642111245024Smrg  fi
642211245024Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
642311245024Smrg  lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
642411245024Smrg  ;;
642511245024Smrglinux* | k*bsd*-gnu)
642611245024Smrg  if test "$host_cpu" = ia64; then
642711245024Smrg    symcode='[[ABCDGIRSTW]]'
642811245024Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
642911245024Smrg    lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/  {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/  {\"\2\", (lt_ptr) \&\2},/p'"
643011245024Smrg  fi
643111245024Smrg  ;;
643211245024Smrgirix* | nonstopux*)
643311245024Smrg  symcode='[[BCDEGRST]]'
643411245024Smrg  ;;
643511245024Smrgosf*)
643611245024Smrg  symcode='[[BCDEGQRST]]'
643711245024Smrg  ;;
643811245024Smrgsolaris*)
643911245024Smrg  symcode='[[BDRT]]'
644011245024Smrg  ;;
644111245024Smrgsco3.2v5*)
644211245024Smrg  symcode='[[DT]]'
644311245024Smrg  ;;
644411245024Smrgsysv4.2uw2*)
644511245024Smrg  symcode='[[DT]]'
644611245024Smrg  ;;
644711245024Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
644811245024Smrg  symcode='[[ABDT]]'
644911245024Smrg  ;;
645011245024Smrgsysv4)
645111245024Smrg  symcode='[[DFNSTU]]'
645211245024Smrg  ;;
645311245024Smrgesac
645441b2f0bdSmrg
645511245024Smrg# Handle CRLF in mingw tool chain
645611245024Smrgopt_cr=
645711245024Smrgcase $build_os in
645811245024Smrgmingw*)
645911245024Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
646011245024Smrg  ;;
646111245024Smrgesac
646241b2f0bdSmrg
646311245024Smrg# If we're using GNU nm, then use its standard symbol codes.
646411245024Smrgcase `$NM -V 2>&1` in
646511245024Smrg*GNU* | *'with BFD'*)
646611245024Smrg  symcode='[[ABCDGIRSTW]]' ;;
646711245024Smrgesac
646841b2f0bdSmrg
646911245024Smrg# Try without a prefix undercore, then with it.
647011245024Smrgfor ac_symprfx in "" "_"; do
647141b2f0bdSmrg
647211245024Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
647311245024Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
647411245024Smrg
647511245024Smrg  # Write the raw and C identifiers.
647611245024Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
647711245024Smrg
647811245024Smrg  # Check to see that the pipe works correctly.
647911245024Smrg  pipe_works=no
648041b2f0bdSmrg
648111245024Smrg  rm -f conftest*
648211245024Smrg  cat > conftest.$ac_ext <<EOF
648311245024Smrg#ifdef __cplusplus
648411245024Smrgextern "C" {
648511245024Smrg#endif
648611245024Smrgchar nm_test_var;
648711245024Smrgvoid nm_test_func(){}
648811245024Smrg#ifdef __cplusplus
648911245024Smrg}
649011245024Smrg#endif
649111245024Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
649211245024SmrgEOF
649311245024Smrg
649411245024Smrg  if AC_TRY_EVAL(ac_compile); then
649511245024Smrg    # Now try to grab the symbols.
649611245024Smrg    nlist=conftest.nm
649711245024Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
649811245024Smrg      # Try sorting and uniquifying the output.
649911245024Smrg      if sort "$nlist" | uniq > "$nlist"T; then
650011245024Smrg	mv -f "$nlist"T "$nlist"
650141b2f0bdSmrg      else
650211245024Smrg	rm -f "$nlist"T
650341b2f0bdSmrg      fi
650441b2f0bdSmrg
650511245024Smrg      # Make sure that we snagged all the symbols we need.
650611245024Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
650711245024Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
650811245024Smrg	  cat <<EOF > conftest.$ac_ext
650911245024Smrg#ifdef __cplusplus
651011245024Smrgextern "C" {
651111245024Smrg#endif
651241b2f0bdSmrg
651311245024SmrgEOF
651411245024Smrg	  # Now generate the symbol file.
651511245024Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
651641b2f0bdSmrg
651711245024Smrg	  cat <<EOF >> conftest.$ac_ext
651811245024Smrg#if defined (__STDC__) && __STDC__
651911245024Smrg# define lt_ptr_t void *
652011245024Smrg#else
652111245024Smrg# define lt_ptr_t char *
652211245024Smrg# define const
652311245024Smrg#endif
652441b2f0bdSmrg
652511245024Smrg/* The mapping between symbol names and symbols. */
652611245024Smrgconst struct {
652711245024Smrg  const char *name;
652811245024Smrg  lt_ptr_t address;
652911245024Smrg}
653011245024Smrglt_preloaded_symbols[[]] =
653111245024Smrg{
653211245024SmrgEOF
653311245024Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
653411245024Smrg	  cat <<\EOF >> conftest.$ac_ext
653511245024Smrg  {0, (lt_ptr_t) 0}
653611245024Smrg};
653741b2f0bdSmrg
653811245024Smrg#ifdef __cplusplus
653911245024Smrg}
654011245024Smrg#endif
654111245024SmrgEOF
654211245024Smrg	  # Now try linking the two files.
654311245024Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
654411245024Smrg	  lt_save_LIBS="$LIBS"
654511245024Smrg	  lt_save_CFLAGS="$CFLAGS"
654611245024Smrg	  LIBS="conftstm.$ac_objext"
654711245024Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
654811245024Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
654911245024Smrg	    pipe_works=yes
655011245024Smrg	  fi
655111245024Smrg	  LIBS="$lt_save_LIBS"
655211245024Smrg	  CFLAGS="$lt_save_CFLAGS"
655311245024Smrg	else
655411245024Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
655511245024Smrg	fi
655641b2f0bdSmrg      else
655711245024Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
655841b2f0bdSmrg      fi
655911245024Smrg    else
656011245024Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
656111245024Smrg    fi
656211245024Smrg  else
656311245024Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
656411245024Smrg    cat conftest.$ac_ext >&5
656511245024Smrg  fi
656611245024Smrg  rm -rf conftest* conftst*
656741b2f0bdSmrg
656811245024Smrg  # Do not use the global_symbol_pipe unless it works.
656911245024Smrg  if test "$pipe_works" = yes; then
657011245024Smrg    break
657111245024Smrg  else
657211245024Smrg    lt_cv_sys_global_symbol_pipe=
657311245024Smrg  fi
657411245024Smrgdone
657511245024Smrg])
657611245024Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
657711245024Smrg  lt_cv_sys_global_symbol_to_cdecl=
657811245024Smrgfi
657911245024Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
658011245024Smrg  AC_MSG_RESULT(failed)
658111245024Smrgelse
658211245024Smrg  AC_MSG_RESULT(ok)
658311245024Smrgfi
658411245024Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
658541b2f0bdSmrg
658641b2f0bdSmrg
658711245024Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
658811245024Smrg# ---------------------------------------
658911245024SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
659011245024Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
659111245024Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
659211245024Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
659341b2f0bdSmrg
659411245024SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
659511245024Smrg ifelse([$1],[CXX],[
659611245024Smrg  # C++ specific cases for pic, static, wl, etc.
659711245024Smrg  if test "$GXX" = yes; then
659811245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
659911245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
660011245024Smrg
660111245024Smrg    case $host_os in
660211245024Smrg    aix*)
660311245024Smrg      # All AIX code is PIC.
660411245024Smrg      if test "$host_cpu" = ia64; then
660511245024Smrg	# AIX 5 now supports IA64 processor
660611245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
660741b2f0bdSmrg      fi
660841b2f0bdSmrg      ;;
660911245024Smrg    amigaos*)
661011245024Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
661111245024Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
661211245024Smrg      # like `-m68040'.
661311245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
661441b2f0bdSmrg      ;;
661511245024Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
661611245024Smrg      # PIC is the default for these OSes.
661741b2f0bdSmrg      ;;
661811245024Smrg    mingw* | cygwin* | os2* | pw32*)
661911245024Smrg      # This hack is so that the source file can tell whether it is being
662011245024Smrg      # built for inclusion in a dll (and should export symbols for example).
662111245024Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
662211245024Smrg      # (--disable-auto-import) libraries
662311245024Smrg      m4_if([$1], [GCJ], [],
662411245024Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
662541b2f0bdSmrg      ;;
662611245024Smrg    darwin* | rhapsody*)
662711245024Smrg      # PIC is the default on this platform
662811245024Smrg      # Common symbols not allowed in MH_DYLIB files
662911245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
663011245024Smrg      ;;
663111245024Smrg    *djgpp*)
663211245024Smrg      # DJGPP does not support shared libraries at all
663311245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
663441b2f0bdSmrg      ;;
663511245024Smrg    interix[[3-9]]*)
663611245024Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
663711245024Smrg      # Instead, we relocate shared libraries at runtime.
663841b2f0bdSmrg      ;;
663911245024Smrg    sysv4*MP*)
664011245024Smrg      if test -d /usr/nec; then
664111245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
664241b2f0bdSmrg      fi
664311245024Smrg      ;;
664411245024Smrg    hpux*)
664511245024Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
664611245024Smrg      # not for PA HP-UX.
664711245024Smrg      case $host_cpu in
664811245024Smrg      hppa*64*|ia64*)
664911245024Smrg	;;
665041b2f0bdSmrg      *)
665111245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
665211245024Smrg	;;
665341b2f0bdSmrg      esac
665441b2f0bdSmrg      ;;
665511245024Smrg    *)
665611245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
665741b2f0bdSmrg      ;;
665811245024Smrg    esac
665911245024Smrg  else
666011245024Smrg    case $host_os in
666111245024Smrg      aix[[4-9]]*)
666211245024Smrg	# All AIX code is PIC.
666311245024Smrg	if test "$host_cpu" = ia64; then
666411245024Smrg	  # AIX 5 now supports IA64 processor
666511245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
666611245024Smrg	else
666711245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
666811245024Smrg	fi
666911245024Smrg	;;
667011245024Smrg      chorus*)
667111245024Smrg	case $cc_basename in
667211245024Smrg	cxch68*)
667311245024Smrg	  # Green Hills C++ Compiler
667411245024Smrg	  # _LT_AC_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"
667511245024Smrg	  ;;
667611245024Smrg	esac
667711245024Smrg	;;
667811245024Smrg       darwin*)
667911245024Smrg         # PIC is the default on this platform
668011245024Smrg         # Common symbols not allowed in MH_DYLIB files
668111245024Smrg         case $cc_basename in
668211245024Smrg           xlc*)
668311245024Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
668411245024Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
668511245024Smrg           ;;
668611245024Smrg         esac
668711245024Smrg       ;;
668811245024Smrg      dgux*)
668911245024Smrg	case $cc_basename in
669011245024Smrg	  ec++*)
669111245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
669211245024Smrg	    ;;
669311245024Smrg	  ghcx*)
669411245024Smrg	    # Green Hills C++ Compiler
669511245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
669611245024Smrg	    ;;
669711245024Smrg	  *)
669811245024Smrg	    ;;
669911245024Smrg	esac
670011245024Smrg	;;
670111245024Smrg      freebsd* | dragonfly*)
670211245024Smrg	# FreeBSD uses GNU C++
670311245024Smrg	;;
670411245024Smrg      hpux9* | hpux10* | hpux11*)
670511245024Smrg	case $cc_basename in
670611245024Smrg	  CC*)
670711245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
670811245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
670911245024Smrg	    if test "$host_cpu" != ia64; then
671011245024Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
671111245024Smrg	    fi
671211245024Smrg	    ;;
671311245024Smrg	  aCC*)
671411245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
671511245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
671611245024Smrg	    case $host_cpu in
671711245024Smrg	    hppa*64*|ia64*)
671811245024Smrg	      # +Z the default
671911245024Smrg	      ;;
672011245024Smrg	    *)
672111245024Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
672211245024Smrg	      ;;
672311245024Smrg	    esac
672411245024Smrg	    ;;
672511245024Smrg	  *)
672611245024Smrg	    ;;
672711245024Smrg	esac
672811245024Smrg	;;
672911245024Smrg      interix*)
673011245024Smrg	# This is c89, which is MS Visual C++ (no shared libs)
673111245024Smrg	# Anyone wants to do a port?
673211245024Smrg	;;
673311245024Smrg      irix5* | irix6* | nonstopux*)
673411245024Smrg	case $cc_basename in
673511245024Smrg	  CC*)
673611245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
673711245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
673811245024Smrg	    # CC pic flag -KPIC is the default.
673911245024Smrg	    ;;
674011245024Smrg	  *)
674111245024Smrg	    ;;
674211245024Smrg	esac
674311245024Smrg	;;
674411245024Smrg      linux* | k*bsd*-gnu)
674511245024Smrg	case $cc_basename in
674611245024Smrg	  KCC*)
674711245024Smrg	    # KAI C++ Compiler
674811245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
674911245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
675011245024Smrg	    ;;
675111245024Smrg	  icpc* | ecpc*)
675211245024Smrg	    # Intel C++
675311245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
675411245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
675511245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
675611245024Smrg	    ;;
675711245024Smrg	  pgCC* | pgcpp*)
675811245024Smrg	    # Portland Group C++ compiler.
675911245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
676011245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
676111245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
676211245024Smrg	    ;;
676311245024Smrg	  cxx*)
676411245024Smrg	    # Compaq C++
676511245024Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
676611245024Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
676711245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
676811245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
676911245024Smrg	    ;;
677011245024Smrg	  *)
677111245024Smrg	    case `$CC -V 2>&1 | sed 5q` in
677211245024Smrg	    *Sun\ C*)
677311245024Smrg	      # Sun C++ 5.9
677411245024Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
677511245024Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
677611245024Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
677711245024Smrg	      ;;
677811245024Smrg	    esac
677911245024Smrg	    ;;
678011245024Smrg	esac
678111245024Smrg	;;
678211245024Smrg      lynxos*)
678311245024Smrg	;;
678411245024Smrg      m88k*)
678511245024Smrg	;;
678611245024Smrg      mvs*)
678711245024Smrg	case $cc_basename in
678811245024Smrg	  cxx*)
678911245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
679011245024Smrg	    ;;
679111245024Smrg	  *)
679211245024Smrg	    ;;
679311245024Smrg	esac
679411245024Smrg	;;
679511245024Smrg      netbsd*)
679611245024Smrg	;;
679711245024Smrg      osf3* | osf4* | osf5*)
679811245024Smrg	case $cc_basename in
679911245024Smrg	  KCC*)
680011245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
680111245024Smrg	    ;;
680211245024Smrg	  RCC*)
680311245024Smrg	    # Rational C++ 2.4.1
680411245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
680511245024Smrg	    ;;
680611245024Smrg	  cxx*)
680711245024Smrg	    # Digital/Compaq C++
680811245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
680911245024Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
681011245024Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
681111245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
681211245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
681311245024Smrg	    ;;
681411245024Smrg	  *)
681511245024Smrg	    ;;
681611245024Smrg	esac
681711245024Smrg	;;
681811245024Smrg      psos*)
681911245024Smrg	;;
682011245024Smrg      solaris*)
682111245024Smrg	case $cc_basename in
682211245024Smrg	  CC*)
682311245024Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
682411245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
682511245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
682611245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
682711245024Smrg	    ;;
682811245024Smrg	  gcx*)
682911245024Smrg	    # Green Hills C++ Compiler
683011245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
683111245024Smrg	    ;;
683211245024Smrg	  *)
683311245024Smrg	    ;;
683411245024Smrg	esac
683511245024Smrg	;;
683611245024Smrg      sunos4*)
683711245024Smrg	case $cc_basename in
683811245024Smrg	  CC*)
683911245024Smrg	    # Sun C++ 4.x
684011245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
684111245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
684211245024Smrg	    ;;
684311245024Smrg	  lcc*)
684411245024Smrg	    # Lucid
684511245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
684611245024Smrg	    ;;
684711245024Smrg	  *)
684811245024Smrg	    ;;
684911245024Smrg	esac
685011245024Smrg	;;
685111245024Smrg      tandem*)
685211245024Smrg	case $cc_basename in
685311245024Smrg	  NCC*)
685411245024Smrg	    # NonStop-UX NCC 3.20
685511245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
685611245024Smrg	    ;;
685711245024Smrg	  *)
685811245024Smrg	    ;;
685911245024Smrg	esac
686041b2f0bdSmrg	;;
686111245024Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
686211245024Smrg	case $cc_basename in
686311245024Smrg	  CC*)
686411245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
686511245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
686611245024Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
686711245024Smrg	    ;;
686811245024Smrg	esac
686941b2f0bdSmrg	;;
687011245024Smrg      vxworks*)
687111245024Smrg	;;
687211245024Smrg      *)
687311245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
687411245024Smrg	;;
687511245024Smrg    esac
687611245024Smrg  fi
687711245024Smrg],
687811245024Smrg[
687911245024Smrg  if test "$GCC" = yes; then
688011245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
688111245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
688241b2f0bdSmrg
688311245024Smrg    case $host_os in
688411245024Smrg      aix*)
688511245024Smrg      # All AIX code is PIC.
688611245024Smrg      if test "$host_cpu" = ia64; then
688711245024Smrg	# AIX 5 now supports IA64 processor
688811245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
688941b2f0bdSmrg      fi
689041b2f0bdSmrg      ;;
689141b2f0bdSmrg
689211245024Smrg    amigaos*)
689311245024Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
689411245024Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
689511245024Smrg      # like `-m68040'.
689611245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
689741b2f0bdSmrg      ;;
689841b2f0bdSmrg
689911245024Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
690011245024Smrg      # PIC is the default for these OSes.
690141b2f0bdSmrg      ;;
690241b2f0bdSmrg
690311245024Smrg    mingw* | cygwin* | pw32* | os2*)
690411245024Smrg      # This hack is so that the source file can tell whether it is being
690511245024Smrg      # built for inclusion in a dll (and should export symbols for example).
690611245024Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
690711245024Smrg      # (--disable-auto-import) libraries
690811245024Smrg      m4_if([$1], [GCJ], [],
690911245024Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
691041b2f0bdSmrg      ;;
691141b2f0bdSmrg
691211245024Smrg    darwin* | rhapsody*)
691311245024Smrg      # PIC is the default on this platform
691411245024Smrg      # Common symbols not allowed in MH_DYLIB files
691511245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
691641b2f0bdSmrg      ;;
691741b2f0bdSmrg
691811245024Smrg    interix[[3-9]]*)
691911245024Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
692011245024Smrg      # Instead, we relocate shared libraries at runtime.
692111245024Smrg      ;;
692241b2f0bdSmrg
692311245024Smrg    msdosdjgpp*)
692411245024Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
692511245024Smrg      # on systems that don't support them.
692611245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
692711245024Smrg      enable_shared=no
692841b2f0bdSmrg      ;;
692941b2f0bdSmrg
693011245024Smrg    sysv4*MP*)
693111245024Smrg      if test -d /usr/nec; then
693211245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
693341b2f0bdSmrg      fi
693441b2f0bdSmrg      ;;
693541b2f0bdSmrg
693611245024Smrg    hpux*)
693711245024Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
693811245024Smrg      # not for PA HP-UX.
693911245024Smrg      case $host_cpu in
694011245024Smrg      hppa*64*|ia64*)
694111245024Smrg	# +Z the default
694211245024Smrg	;;
694311245024Smrg      *)
694411245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
694511245024Smrg	;;
694611245024Smrg      esac
694711245024Smrg      ;;
694841b2f0bdSmrg
694911245024Smrg    *)
695011245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
695111245024Smrg      ;;
695211245024Smrg    esac
695311245024Smrg  else
695411245024Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
695511245024Smrg    case $host_os in
695611245024Smrg    aix*)
695711245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
695811245024Smrg      if test "$host_cpu" = ia64; then
695911245024Smrg	# AIX 5 now supports IA64 processor
696011245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
696111245024Smrg      else
696211245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
696341b2f0bdSmrg      fi
696411245024Smrg      ;;
696511245024Smrg      darwin*)
696611245024Smrg        # PIC is the default on this platform
696711245024Smrg        # Common symbols not allowed in MH_DYLIB files
696811245024Smrg       case $cc_basename in
696911245024Smrg         xlc*)
697011245024Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
697111245024Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
697211245024Smrg         ;;
697311245024Smrg       esac
697411245024Smrg       ;;
697541b2f0bdSmrg
697611245024Smrg    mingw* | cygwin* | pw32* | os2*)
697711245024Smrg      # This hack is so that the source file can tell whether it is being
697811245024Smrg      # built for inclusion in a dll (and should export symbols for example).
697911245024Smrg      m4_if([$1], [GCJ], [],
698011245024Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
698111245024Smrg      ;;
698241b2f0bdSmrg
698311245024Smrg    hpux9* | hpux10* | hpux11*)
698411245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
698511245024Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
698611245024Smrg      # not for PA HP-UX.
698711245024Smrg      case $host_cpu in
698811245024Smrg      hppa*64*|ia64*)
698911245024Smrg	# +Z the default
699011245024Smrg	;;
699111245024Smrg      *)
699211245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
699311245024Smrg	;;
699411245024Smrg      esac
699511245024Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
699611245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
699711245024Smrg      ;;
699841b2f0bdSmrg
699911245024Smrg    irix5* | irix6* | nonstopux*)
700011245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
700111245024Smrg      # PIC (with -KPIC) is the default.
700211245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
700311245024Smrg      ;;
700441b2f0bdSmrg
700511245024Smrg    newsos6)
700611245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
700711245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
700811245024Smrg      ;;
700941b2f0bdSmrg
701011245024Smrg    linux* | k*bsd*-gnu)
701111245024Smrg      case $cc_basename in
701211245024Smrg      icc* | ecc*)
701311245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
701411245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
701511245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
701611245024Smrg        ;;
701711245024Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
701811245024Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
701911245024Smrg	# which looks to be a dead project)
702011245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
702111245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
702211245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
702311245024Smrg        ;;
702411245024Smrg      ccc*)
702511245024Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
702611245024Smrg        # All Alpha code is PIC.
702711245024Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
702811245024Smrg        ;;
702911245024Smrg      *)
703011245024Smrg        case `$CC -V 2>&1 | sed 5q` in
703111245024Smrg	*Sun\ C*)
703211245024Smrg	  # Sun C 5.9
703311245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
703411245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
703511245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
703611245024Smrg	  ;;
703711245024Smrg	*Sun\ F*)
703811245024Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
703911245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
704011245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
704111245024Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
704211245024Smrg	  ;;
704311245024Smrg	esac
704411245024Smrg	;;
704511245024Smrg      esac
704611245024Smrg      ;;
704741b2f0bdSmrg
704811245024Smrg    osf3* | osf4* | osf5*)
704911245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
705011245024Smrg      # All OSF/1 code is PIC.
705111245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
705211245024Smrg      ;;
705341b2f0bdSmrg
705411245024Smrg    rdos*)
705511245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
705611245024Smrg      ;;
705741b2f0bdSmrg
705811245024Smrg    solaris*)
705911245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
706011245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
706111245024Smrg      case $cc_basename in
706211245024Smrg      f77* | f90* | f95*)
706311245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
706411245024Smrg      *)
706511245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
706611245024Smrg      esac
706711245024Smrg      ;;
706811245024Smrg
706911245024Smrg    sunos4*)
707011245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
707111245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
707211245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
707311245024Smrg      ;;
707411245024Smrg
707511245024Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
707611245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
707711245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
707811245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
707911245024Smrg      ;;
708041b2f0bdSmrg
708111245024Smrg    sysv4*MP*)
708211245024Smrg      if test -d /usr/nec ;then
708311245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
708411245024Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
708511245024Smrg      fi
708611245024Smrg      ;;
708741b2f0bdSmrg
708811245024Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
708911245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
709011245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
709111245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
709211245024Smrg      ;;
709341b2f0bdSmrg
709411245024Smrg    unicos*)
709511245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
709611245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
709711245024Smrg      ;;
709841b2f0bdSmrg
709911245024Smrg    uts4*)
710011245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
710111245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
710211245024Smrg      ;;
710341b2f0bdSmrg
710411245024Smrg    *)
710511245024Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
710611245024Smrg      ;;
710711245024Smrg    esac
710811245024Smrg  fi
710911245024Smrg])
711011245024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
711141b2f0bdSmrg
711211245024Smrg#
711311245024Smrg# Check to make sure the PIC flag actually works.
711411245024Smrg#
711511245024Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
711611245024Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
711711245024Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
711811245024Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
711911245024Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
712011245024Smrg     "" | " "*) ;;
712111245024Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
712211245024Smrg     esac],
712311245024Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
712411245024Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
712511245024Smrgfi
712611245024Smrgcase $host_os in
712711245024Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
712811245024Smrg  *djgpp*)
712911245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
713011245024Smrg    ;;
713111245024Smrg  *)
713211245024Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
713311245024Smrg    ;;
713411245024Smrgesac
713541b2f0bdSmrg
713611245024Smrg#
713711245024Smrg# Check to make sure the static flag actually works.
713811245024Smrg#
713911245024Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
714011245024SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
714111245024Smrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
714211245024Smrg  $lt_tmp_static_flag,
714311245024Smrg  [],
714411245024Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
714511245024Smrg])
714641b2f0bdSmrg
714741b2f0bdSmrg
714811245024Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
714911245024Smrg# ------------------------------------
715011245024Smrg# See if the linker supports building shared libraries.
715111245024SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
715211245024Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
715311245024SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
715411245024Smrgifelse([$1],[CXX],[
715511245024Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
715611245024Smrg  case $host_os in
715711245024Smrg  aix[[4-9]]*)
715811245024Smrg    # If we're using GNU nm, then we don't want the "-C" option.
715911245024Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
716011245024Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
716111245024Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
716211245024Smrg    else
716311245024Smrg      _LT_AC_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'
716411245024Smrg    fi
716511245024Smrg    ;;
716611245024Smrg  pw32*)
716711245024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
716811245024Smrg  ;;
716911245024Smrg  cygwin* | mingw*)
717011245024Smrg    _LT_AC_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'
717111245024Smrg  ;;
717211245024Smrg  *)
717311245024Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
717411245024Smrg  ;;
717511245024Smrg  esac
717611245024Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
717711245024Smrg],[
717811245024Smrg  runpath_var=
717911245024Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
718011245024Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
718111245024Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
718211245024Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
718311245024Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
718411245024Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
718511245024Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
718611245024Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
718711245024Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
718811245024Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
718911245024Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
719011245024Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
719111245024Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
719211245024Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
719311245024Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
719411245024Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
719511245024Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
719611245024Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
719711245024Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
719811245024Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
719911245024Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
720011245024Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
720111245024Smrg  # included in the symbol list
720211245024Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
720311245024Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
720411245024Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
720511245024Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
720611245024Smrg  # as well as any symbol that contains `d'.
720711245024Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
720811245024Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
720911245024Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
721011245024Smrg  # the symbol is explicitly referenced.  Since portable code cannot
721111245024Smrg  # rely on this symbol name, it's probably fine to never include it in
721211245024Smrg  # preloaded symbol tables.
721311245024Smrg  # Exclude shared library initialization/finalization symbols.
721411245024Smrgdnl Note also adjust exclude_expsyms for C++ above.
721511245024Smrg  extract_expsyms_cmds=
721611245024Smrg  # Just being paranoid about ensuring that cc_basename is set.
721711245024Smrg  _LT_CC_BASENAME([$compiler])
721811245024Smrg  case $host_os in
721911245024Smrg  cygwin* | mingw* | pw32*)
722011245024Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
722111245024Smrg    # When not using gcc, we currently assume that we are using
722211245024Smrg    # Microsoft Visual C++.
722311245024Smrg    if test "$GCC" != yes; then
722411245024Smrg      with_gnu_ld=no
722511245024Smrg    fi
722611245024Smrg    ;;
722711245024Smrg  interix*)
722811245024Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
722911245024Smrg    with_gnu_ld=yes
723011245024Smrg    ;;
723111245024Smrg  openbsd*)
723211245024Smrg    with_gnu_ld=no
723311245024Smrg    ;;
723411245024Smrg  esac
723541b2f0bdSmrg
723611245024Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
723711245024Smrg  if test "$with_gnu_ld" = yes; then
723811245024Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
723911245024Smrg    wlarc='${wl}'
724041b2f0bdSmrg
724111245024Smrg    # Set some defaults for GNU ld with shared library support. These
724211245024Smrg    # are reset later if shared libraries are not supported. Putting them
724311245024Smrg    # here allows them to be overridden if necessary.
724411245024Smrg    runpath_var=LD_RUN_PATH
724511245024Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
724611245024Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
724711245024Smrg    # ancient GNU ld didn't support --whole-archive et. al.
724811245024Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
724911245024Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
725011245024Smrg      else
725111245024Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
725211245024Smrg    fi
725311245024Smrg    supports_anon_versioning=no
725411245024Smrg    case `$LD -v 2>/dev/null` in
725511245024Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
725611245024Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
725711245024Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
725811245024Smrg      *\ 2.11.*) ;; # other 2.11 versions
725911245024Smrg      *) supports_anon_versioning=yes ;;
726011245024Smrg    esac
726141b2f0bdSmrg
726211245024Smrg    # See if GNU ld supports shared libraries.
726311245024Smrg    case $host_os in
726411245024Smrg    aix[[3-9]]*)
726511245024Smrg      # On AIX/PPC, the GNU linker is very broken
726611245024Smrg      if test "$host_cpu" != ia64; then
726711245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
726811245024Smrg	cat <<EOF 1>&2
726941b2f0bdSmrg
727011245024Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
727111245024Smrg*** to be unable to reliably create shared libraries on AIX.
727211245024Smrg*** Therefore, libtool is disabling shared libraries support.  If you
727311245024Smrg*** really care for shared libraries, you may want to modify your PATH
727411245024Smrg*** so that a non-GNU linker is found, and then restart.
727541b2f0bdSmrg
727611245024SmrgEOF
727711245024Smrg      fi
727811245024Smrg      ;;
727941b2f0bdSmrg
728011245024Smrg    amigaos*)
728111245024Smrg      _LT_AC_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)'
728211245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
728311245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
728441b2f0bdSmrg
728511245024Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
728611245024Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
728711245024Smrg      # to version 4, is to share data among multiple programs linked
728811245024Smrg      # with the same dynamic library.  Since this doesn't match the
728911245024Smrg      # behavior of shared libraries on other platforms, we can't use
729011245024Smrg      # them.
729111245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
729211245024Smrg      ;;
729341b2f0bdSmrg
729411245024Smrg    beos*)
729511245024Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
729611245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
729711245024Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
729811245024Smrg	# support --undefined.  This deserves some investigation.  FIXME
729911245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
730011245024Smrg      else
730111245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
730211245024Smrg      fi
730311245024Smrg      ;;
730441b2f0bdSmrg
730511245024Smrg    cygwin* | mingw* | pw32*)
730611245024Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
730711245024Smrg      # as there is no search path for DLLs.
730811245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
730911245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
731011245024Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
731111245024Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
731211245024Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
731341b2f0bdSmrg
731411245024Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
731511245024Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
731611245024Smrg	# If the export-symbols file already is a .def file (1st line
731711245024Smrg	# is EXPORTS), use it as is; otherwise, prepend...
731811245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
731911245024Smrg	  cp $export_symbols $output_objdir/$soname.def;
732011245024Smrg	else
732111245024Smrg	  echo EXPORTS > $output_objdir/$soname.def;
732211245024Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
732311245024Smrg	fi~
732411245024Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
732511245024Smrg      else
732611245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
732711245024Smrg      fi
732811245024Smrg      ;;
732941b2f0bdSmrg
733011245024Smrg    interix[[3-9]]*)
733111245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
733211245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
733311245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
733411245024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
733511245024Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
733611245024Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
733711245024Smrg      # default) and relocated if they conflict, which is a slow very memory
733811245024Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
733911245024Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
734011245024Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
734111245024Smrg      _LT_AC_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'
734211245024Smrg      _LT_AC_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'
734311245024Smrg      ;;
734441b2f0bdSmrg
734511245024Smrg    gnu* | linux* | k*bsd*-gnu)
734611245024Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
734711245024Smrg	tmp_addflag=
734811245024Smrg	case $cc_basename,$host_cpu in
734911245024Smrg	pgcc*)				# Portland Group C compiler
735011245024Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
735111245024Smrg	  tmp_addflag=' $pic_flag'
735211245024Smrg	  ;;
735311245024Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
735411245024Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test  -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
735511245024Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
735611245024Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
735711245024Smrg	  tmp_addflag=' -i_dynamic' ;;
735811245024Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
735911245024Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
736011245024Smrg	ifc* | ifort*)			# Intel Fortran compiler
736111245024Smrg	  tmp_addflag=' -nofor_main' ;;
736211245024Smrg	esac
736311245024Smrg	case `$CC -V 2>&1 | sed 5q` in
736411245024Smrg	*Sun\ C*)			# Sun C 5.9
736511245024Smrg	  _LT_AC_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; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
736611245024Smrg	  tmp_sharedflag='-G' ;;
736711245024Smrg	*Sun\ F*)			# Sun Fortran 8.3
736811245024Smrg	  tmp_sharedflag='-G' ;;
736911245024Smrg	*)
737011245024Smrg	  tmp_sharedflag='-shared' ;;
737111245024Smrg	esac
737211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
737341b2f0bdSmrg
737411245024Smrg	if test $supports_anon_versioning = yes; then
737511245024Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
737611245024Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
737711245024Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
737811245024Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
737911245024Smrg	fi
738011245024Smrg      else
738111245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
738211245024Smrg      fi
738311245024Smrg      ;;
738441b2f0bdSmrg
738511245024Smrg    netbsd*)
738611245024Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
738711245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
738811245024Smrg	wlarc=
738911245024Smrg      else
739011245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
739111245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
739211245024Smrg      fi
739311245024Smrg      ;;
739441b2f0bdSmrg
739511245024Smrg    solaris*)
739611245024Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
739711245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
739811245024Smrg	cat <<EOF 1>&2
739941b2f0bdSmrg
740011245024Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
740111245024Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
740211245024Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
740311245024Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
740411245024Smrg*** your PATH or compiler configuration so that the native linker is
740511245024Smrg*** used, and then restart.
740641b2f0bdSmrg
740711245024SmrgEOF
740811245024Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
740911245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
741011245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
741111245024Smrg      else
741211245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
741311245024Smrg      fi
741411245024Smrg      ;;
741541b2f0bdSmrg
741611245024Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
741711245024Smrg      case `$LD -v 2>&1` in
741811245024Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
741911245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
742011245024Smrg	cat <<_LT_EOF 1>&2
742141b2f0bdSmrg
742211245024Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
742311245024Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
742411245024Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
742511245024Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
742611245024Smrg*** your PATH or compiler configuration so that the native linker is
742711245024Smrg*** used, and then restart.
742841b2f0bdSmrg
742911245024Smrg_LT_EOF
743011245024Smrg	;;
743111245024Smrg	*)
743211245024Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
743311245024Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
743411245024Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
743511245024Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib'
743611245024Smrg	  else
743711245024Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
743811245024Smrg	  fi
743911245024Smrg	;;
744011245024Smrg      esac
744111245024Smrg      ;;
744211245024Smrg
744311245024Smrg    sunos4*)
744411245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
744511245024Smrg      wlarc=
744611245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
744711245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
744811245024Smrg      ;;
744911245024Smrg
745011245024Smrg    *)
745111245024Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
745211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
745311245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
745411245024Smrg      else
745511245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
745611245024Smrg      fi
745711245024Smrg      ;;
745811245024Smrg    esac
745941b2f0bdSmrg
746011245024Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
746111245024Smrg      runpath_var=
746211245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
746311245024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
746411245024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
746511245024Smrg    fi
746611245024Smrg  else
746711245024Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
746811245024Smrg    case $host_os in
746911245024Smrg    aix3*)
747011245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
747111245024Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
747211245024Smrg      _LT_AC_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'
747311245024Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
747411245024Smrg      # are no directories specified by -L.
747511245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
747611245024Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
747711245024Smrg	# Neither direct hardcoding nor static linking is supported with a
747811245024Smrg	# broken collect2.
747911245024Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
748011245024Smrg      fi
748111245024Smrg      ;;
748241b2f0bdSmrg
748311245024Smrg    aix[[4-9]]*)
748411245024Smrg      if test "$host_cpu" = ia64; then
748511245024Smrg	# On IA64, the linker does run time linking by default, so we don't
748611245024Smrg	# have to do anything special.
748711245024Smrg	aix_use_runtimelinking=no
748811245024Smrg	exp_sym_flag='-Bexport'
748911245024Smrg	no_entry_flag=""
749011245024Smrg      else
749111245024Smrg	# If we're using GNU nm, then we don't want the "-C" option.
749211245024Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
749311245024Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
749411245024Smrg	  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols'
749511245024Smrg	else
749611245024Smrg	  _LT_AC_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'
749711245024Smrg	fi
749811245024Smrg	aix_use_runtimelinking=no
749941b2f0bdSmrg
750011245024Smrg	# Test if we are trying to use run time linking or normal
750111245024Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
750211245024Smrg	# need to do runtime linking.
750311245024Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
750411245024Smrg	  for ld_flag in $LDFLAGS; do
750511245024Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
750611245024Smrg  	    aix_use_runtimelinking=yes
750711245024Smrg  	    break
750811245024Smrg  	  fi
750911245024Smrg	  done
751011245024Smrg	  ;;
751111245024Smrg	esac
751241b2f0bdSmrg
751311245024Smrg	exp_sym_flag='-bexport'
751411245024Smrg	no_entry_flag='-bnoentry'
751511245024Smrg      fi
751641b2f0bdSmrg
751711245024Smrg      # When large executables or shared objects are built, AIX ld can
751811245024Smrg      # have problems creating the table of contents.  If linking a library
751911245024Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
752011245024Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
752111245024Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
752241b2f0bdSmrg
752311245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
752411245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
752511245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
752611245024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
752741b2f0bdSmrg
752811245024Smrg      if test "$GCC" = yes; then
752911245024Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
753011245024Smrg	# We only want to do this on AIX 4.2 and lower, the check
753111245024Smrg	# below for broken collect2 doesn't work under 4.3+
753211245024Smrg	  collect2name=`${CC} -print-prog-name=collect2`
753311245024Smrg	  if test -f "$collect2name" && \
753411245024Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
753511245024Smrg	  then
753611245024Smrg  	  # We have reworked collect2
753711245024Smrg  	  :
753811245024Smrg	  else
753911245024Smrg  	  # We have old collect2
754011245024Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
754111245024Smrg  	  # It fails to find uninstalled libraries when the uninstalled
754211245024Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
754311245024Smrg  	  # to unsupported forces relinking
754411245024Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
754511245024Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
754611245024Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
754711245024Smrg	  fi
754811245024Smrg	  ;;
754911245024Smrg	esac
755011245024Smrg	shared_flag='-shared'
755111245024Smrg	if test "$aix_use_runtimelinking" = yes; then
755211245024Smrg	  shared_flag="$shared_flag "'${wl}-G'
755311245024Smrg	fi
755411245024Smrg      else
755511245024Smrg	# not using gcc
755611245024Smrg	if test "$host_cpu" = ia64; then
755711245024Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
755811245024Smrg  	# chokes on -Wl,-G. The following line is correct:
755911245024Smrg	  shared_flag='-G'
756011245024Smrg	else
756111245024Smrg	  if test "$aix_use_runtimelinking" = yes; then
756211245024Smrg	    shared_flag='${wl}-G'
756311245024Smrg	  else
756411245024Smrg	    shared_flag='${wl}-bM:SRE'
756511245024Smrg	  fi
756611245024Smrg	fi
756711245024Smrg      fi
756841b2f0bdSmrg
756911245024Smrg      # It seems that -bexpall does not export symbols beginning with
757011245024Smrg      # underscore (_), so it is better to generate a list of symbols to export.
757111245024Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
757211245024Smrg      if test "$aix_use_runtimelinking" = yes; then
757311245024Smrg	# Warning - without using the other runtime loading flags (-brtl),
757411245024Smrg	# -berok will link without error, but may produce a broken library.
757511245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
757611245024Smrg       # Determine the default libpath from the value encoded in an empty executable.
757711245024Smrg       _LT_AC_SYS_LIBPATH_AIX
757811245024Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
757911245024Smrg	_LT_AC_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 echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
758011245024Smrg       else
758111245024Smrg	if test "$host_cpu" = ia64; then
758211245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
758311245024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
758411245024Smrg	  _LT_AC_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"
758511245024Smrg	else
758611245024Smrg	 # Determine the default libpath from the value encoded in an empty executable.
758711245024Smrg	 _LT_AC_SYS_LIBPATH_AIX
758811245024Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
758911245024Smrg	  # Warning - without using the other run time loading flags,
759011245024Smrg	  # -berok will link without error, but may produce a broken library.
759111245024Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
759211245024Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
759311245024Smrg	  # Exported symbols can be pulled into shared objects from archives
759411245024Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
759511245024Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
759611245024Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
759711245024Smrg	  _LT_AC_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'
759811245024Smrg	fi
759911245024Smrg      fi
760011245024Smrg      ;;
760141b2f0bdSmrg
760211245024Smrg    amigaos*)
760311245024Smrg      _LT_AC_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)'
760411245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
760511245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
760611245024Smrg      # see comment about different semantics on the GNU ld section
760711245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
760811245024Smrg      ;;
760941b2f0bdSmrg
761011245024Smrg    bsdi[[45]]*)
761111245024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
761211245024Smrg      ;;
761341b2f0bdSmrg
761411245024Smrg    cygwin* | mingw* | pw32*)
761511245024Smrg      # When not using gcc, we currently assume that we are using
761611245024Smrg      # Microsoft Visual C++.
761711245024Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
761811245024Smrg      # no search path for DLLs.
761911245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
762011245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
762111245024Smrg      # Tell ltmain to make .lib files, not .a files.
762211245024Smrg      libext=lib
762311245024Smrg      # Tell ltmain to make .dll files, not .so files.
762411245024Smrg      shrext_cmds=".dll"
762511245024Smrg      # FIXME: Setting linknames here is a bad hack.
762611245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
762711245024Smrg      # The linker will automatically build a .lib file if we build a DLL.
762811245024Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
762911245024Smrg      # FIXME: Should let the user specify the lib program.
763011245024Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
763111245024Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
763211245024Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
763311245024Smrg      ;;
763441b2f0bdSmrg
763511245024Smrg    darwin* | rhapsody*)
763611245024Smrg      case $host_os in
763711245024Smrg        rhapsody* | darwin1.[[012]])
763811245024Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
763911245024Smrg         ;;
764011245024Smrg       *) # Darwin 1.3 on
764111245024Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
764211245024Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
764311245024Smrg         else
764411245024Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
764511245024Smrg             10.[[012]])
764611245024Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
764711245024Smrg               ;;
764811245024Smrg             10.*)
764911245024Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
765011245024Smrg               ;;
765111245024Smrg           esac
765211245024Smrg         fi
765311245024Smrg         ;;
765411245024Smrg      esac
765511245024Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
765611245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
765711245024Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
765811245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
765911245024Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
766011245024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
766111245024Smrg    if test "$GCC" = yes ; then
766211245024Smrg    	output_verbose_link_cmd='echo'
766311245024Smrg        _LT_AC_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}"
766411245024Smrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
766511245024Smrg        _LT_AC_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}"
766611245024Smrg        _LT_AC_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}"
766711245024Smrg    else
766811245024Smrg      case $cc_basename in
766911245024Smrg        xlc*)
767011245024Smrg         output_verbose_link_cmd='echo'
767111245024Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
767211245024Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
767311245024Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
767411245024Smrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
767511245024Smrg          _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag  -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
767611245024Smrg          ;;
767711245024Smrg       *)
767811245024Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
767911245024Smrg          ;;
768011245024Smrg      esac
768111245024Smrg    fi
768211245024Smrg      ;;
768341b2f0bdSmrg
768411245024Smrg    dgux*)
768511245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
768611245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
768711245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
768811245024Smrg      ;;
768941b2f0bdSmrg
769011245024Smrg    freebsd1*)
769111245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
769211245024Smrg      ;;
769341b2f0bdSmrg
769411245024Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
769511245024Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
769611245024Smrg    # does not break anything, and helps significantly (at the cost of a little
769711245024Smrg    # extra space).
769811245024Smrg    freebsd2.2*)
769911245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
770011245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
770111245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
770211245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
770311245024Smrg      ;;
770441b2f0bdSmrg
770511245024Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
770611245024Smrg    freebsd2*)
770711245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
770811245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
770911245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
771011245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
771111245024Smrg      ;;
771241b2f0bdSmrg
771311245024Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
771411245024Smrg    freebsd* | dragonfly*)
771511245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
771611245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
771711245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
771811245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
771911245024Smrg      ;;
772041b2f0bdSmrg
772111245024Smrg    hpux9*)
772211245024Smrg      if test "$GCC" = yes; then
772311245024Smrg	_LT_AC_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'
772411245024Smrg      else
772511245024Smrg	_LT_AC_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'
772611245024Smrg      fi
772711245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
772811245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
772911245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
773041b2f0bdSmrg
773111245024Smrg      # hardcode_minus_L: Not really in the search PATH,
773211245024Smrg      # but as the default location of the library.
773311245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
773411245024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
773511245024Smrg      ;;
773641b2f0bdSmrg
773711245024Smrg    hpux10*)
773811245024Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
773911245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
774011245024Smrg      else
774111245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
774211245024Smrg      fi
774311245024Smrg      if test "$with_gnu_ld" = no; then
774411245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
774511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
774641b2f0bdSmrg
774711245024Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
774811245024Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
774941b2f0bdSmrg
775011245024Smrg	# hardcode_minus_L: Not really in the search PATH,
775111245024Smrg	# but as the default location of the library.
775211245024Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
775311245024Smrg      fi
775411245024Smrg      ;;
775541b2f0bdSmrg
775611245024Smrg    hpux11*)
775711245024Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
775811245024Smrg	case $host_cpu in
775911245024Smrg	hppa*64*)
776011245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
776111245024Smrg	  ;;
776211245024Smrg	ia64*)
776311245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
776411245024Smrg	  ;;
776511245024Smrg	*)
776611245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
776711245024Smrg	  ;;
776811245024Smrg	esac
776911245024Smrg      else
777011245024Smrg	case $host_cpu in
777111245024Smrg	hppa*64*)
777211245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
777311245024Smrg	  ;;
777411245024Smrg	ia64*)
777511245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
777611245024Smrg	  ;;
777711245024Smrg	*)
777811245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
777911245024Smrg	  ;;
778011245024Smrg	esac
778111245024Smrg      fi
778211245024Smrg      if test "$with_gnu_ld" = no; then
778311245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
778411245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
778541b2f0bdSmrg
778611245024Smrg	case $host_cpu in
778711245024Smrg	hppa*64*|ia64*)
778811245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
778911245024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
779011245024Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
779111245024Smrg	  ;;
779211245024Smrg	*)
779311245024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
779411245024Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
779541b2f0bdSmrg
779611245024Smrg	  # hardcode_minus_L: Not really in the search PATH,
779711245024Smrg	  # but as the default location of the library.
779811245024Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
779911245024Smrg	  ;;
780011245024Smrg	esac
780111245024Smrg      fi
780211245024Smrg      ;;
780341b2f0bdSmrg
780411245024Smrg    irix5* | irix6* | nonstopux*)
780511245024Smrg      if test "$GCC" = yes; then
780611245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
780711245024Smrg      else
780811245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
780911245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
781011245024Smrg      fi
781111245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
781211245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
781311245024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
781411245024Smrg      ;;
781541b2f0bdSmrg
781611245024Smrg    netbsd*)
781711245024Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
781811245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
781911245024Smrg      else
782011245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
782111245024Smrg      fi
782211245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
782311245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
782411245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
782511245024Smrg      ;;
782641b2f0bdSmrg
782711245024Smrg    newsos6)
782811245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
782911245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
783011245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
783111245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
783211245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
783311245024Smrg      ;;
783441b2f0bdSmrg
783511245024Smrg    openbsd*)
783611245024Smrg      if test -f /usr/libexec/ld.so; then
783711245024Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
783811245024Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
783911245024Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
784011245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
784111245024Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
784211245024Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
784311245024Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
784411245024Smrg	else
784511245024Smrg	  case $host_os in
784611245024Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
784711245024Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
784811245024Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
784911245024Smrg	     ;;
785011245024Smrg	   *)
785111245024Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
785211245024Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
785311245024Smrg	     ;;
785411245024Smrg	  esac
785511245024Smrg        fi
785611245024Smrg      else
785711245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
785811245024Smrg      fi
785911245024Smrg      ;;
786041b2f0bdSmrg
786111245024Smrg    os2*)
786211245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
786311245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
786411245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
786511245024Smrg      _LT_AC_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'
786611245024Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
786711245024Smrg      ;;
786841b2f0bdSmrg
786911245024Smrg    osf3*)
787011245024Smrg      if test "$GCC" = yes; then
787111245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
787211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
787311245024Smrg      else
787411245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
787511245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
787611245024Smrg      fi
787711245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
787811245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
787911245024Smrg      ;;
788041b2f0bdSmrg
788111245024Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
788211245024Smrg      if test "$GCC" = yes; then
788311245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
788411245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
788511245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
788611245024Smrg      else
788711245024Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
788811245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib'
788911245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
789011245024Smrg	$LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp'
789141b2f0bdSmrg
789211245024Smrg	# Both c and cxx compiler support -rpath directly
789311245024Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
789411245024Smrg      fi
789511245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
789611245024Smrg      ;;
789741b2f0bdSmrg
789811245024Smrg    solaris*)
789911245024Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
790011245024Smrg      if test "$GCC" = yes; then
790111245024Smrg	wlarc='${wl}'
790211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
790311245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
790411245024Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
790541b2f0bdSmrg      else
790611245024Smrg	wlarc=''
790711245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
790811245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
790911245024Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
791041b2f0bdSmrg      fi
791111245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
791211245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
791311245024Smrg      case $host_os in
791411245024Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
791511245024Smrg      *)
791611245024Smrg	# The compiler driver will combine and reorder linker options,
791711245024Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
791811245024Smrg	# but is careful enough not to reorder.
791911245024Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
792011245024Smrg	if test "$GCC" = yes; then
792111245024Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
792211245024Smrg	else
792311245024Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
792411245024Smrg	fi
792511245024Smrg	;;
792611245024Smrg      esac
792711245024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
792841b2f0bdSmrg      ;;
792941b2f0bdSmrg
793011245024Smrg    sunos4*)
793111245024Smrg      if test "x$host_vendor" = xsequent; then
793211245024Smrg	# Use $CC to link under sequent, because it throws in some extra .o
793311245024Smrg	# files that make .init and .fini sections work.
793411245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
793511245024Smrg      else
793611245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
793711245024Smrg      fi
793811245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
793911245024Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
794011245024Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
794111245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
794211245024Smrg      ;;
794341b2f0bdSmrg
794411245024Smrg    sysv4)
794511245024Smrg      case $host_vendor in
794611245024Smrg	sni)
794711245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
794811245024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
794911245024Smrg	;;
795011245024Smrg	siemens)
795111245024Smrg	  ## LD is ld it makes a PLAMLIB
795211245024Smrg	  ## CC just makes a GrossModule.
795311245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
795411245024Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
795511245024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
795611245024Smrg        ;;
795711245024Smrg	motorola)
795811245024Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
795911245024Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
796011245024Smrg	;;
796111245024Smrg      esac
796211245024Smrg      runpath_var='LD_RUN_PATH'
796311245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
796411245024Smrg      ;;
796541b2f0bdSmrg
796611245024Smrg    sysv4.3*)
796711245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
796811245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
796911245024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
797011245024Smrg      ;;
797141b2f0bdSmrg
797211245024Smrg    sysv4*MP*)
797311245024Smrg      if test -d /usr/nec; then
797411245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
797511245024Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
797611245024Smrg	runpath_var=LD_RUN_PATH
797711245024Smrg	hardcode_runpath_var=yes
797811245024Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
797911245024Smrg      fi
798011245024Smrg      ;;
798141b2f0bdSmrg
798211245024Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
798311245024Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
798411245024Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
798511245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
798611245024Smrg      runpath_var='LD_RUN_PATH'
798741b2f0bdSmrg
798811245024Smrg      if test "$GCC" = yes; then
798911245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
799011245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
799111245024Smrg      else
799211245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
799311245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
799411245024Smrg      fi
799511245024Smrg      ;;
799641b2f0bdSmrg
799711245024Smrg    sysv5* | sco3.2v5* | sco5v6*)
799811245024Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
799911245024Smrg      # link with -lc, and that would cause any symbols used from libc to
800011245024Smrg      # always be unresolved, which means just about no library would
800111245024Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
800211245024Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
800311245024Smrg      # as -z defs.
800411245024Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
800511245024Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
800611245024Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
800711245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
800811245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
800911245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
801011245024Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
801111245024Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
801211245024Smrg      runpath_var='LD_RUN_PATH'
801341b2f0bdSmrg
801411245024Smrg      if test "$GCC" = yes; then
801511245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
801611245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
801711245024Smrg      else
801811245024Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
801911245024Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
802011245024Smrg      fi
802111245024Smrg      ;;
802241b2f0bdSmrg
802311245024Smrg    uts4*)
802411245024Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
802511245024Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
802611245024Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
802711245024Smrg      ;;
802841b2f0bdSmrg
802911245024Smrg    *)
803011245024Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
803111245024Smrg      ;;
803211245024Smrg    esac
803311245024Smrg  fi
803441b2f0bdSmrg])
803511245024SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
803611245024Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
803741b2f0bdSmrg
803841b2f0bdSmrg#
803911245024Smrg# Do we need to explicitly link libc?
804041b2f0bdSmrg#
804111245024Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
804211245024Smrgx|xyes)
804311245024Smrg  # Assume -lc should be added
804411245024Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
804541b2f0bdSmrg
804611245024Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
804711245024Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
804811245024Smrg    *'~'*)
804911245024Smrg      # FIXME: we may have to deal with multi-command sequences.
805011245024Smrg      ;;
805111245024Smrg    '$CC '*)
805211245024Smrg      # Test whether the compiler implicitly links with -lc since on some
805311245024Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
805411245024Smrg      # to ld, don't add -lc before -lgcc.
805511245024Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
805611245024Smrg      $rm conftest*
805711245024Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
805841b2f0bdSmrg
805911245024Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
806011245024Smrg        soname=conftest
806111245024Smrg        lib=conftest
806211245024Smrg        libobjs=conftest.$ac_objext
806311245024Smrg        deplibs=
806411245024Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
806511245024Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
806611245024Smrg        compiler_flags=-v
806711245024Smrg        linker_flags=-v
806811245024Smrg        verstring=
806911245024Smrg        output_objdir=.
807011245024Smrg        libname=conftest
807111245024Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
807211245024Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
807311245024Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
807411245024Smrg        then
807511245024Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
807611245024Smrg        else
807711245024Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
807811245024Smrg        fi
807911245024Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
808011245024Smrg      else
808111245024Smrg        cat conftest.err 1>&5
808211245024Smrg      fi
808311245024Smrg      $rm conftest*
808411245024Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
808511245024Smrg      ;;
808611245024Smrg    esac
808741b2f0bdSmrg  fi
808811245024Smrg  ;;
808911245024Smrgesac
809011245024Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
809141b2f0bdSmrg
809241b2f0bdSmrg
809311245024Smrg# _LT_AC_FILE_LTDLL_C
809411245024Smrg# -------------------
809511245024Smrg# Be careful that the start marker always follows a newline.
809611245024SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
809711245024Smrg# /* ltdll.c starts here */
809811245024Smrg# #define WIN32_LEAN_AND_MEAN
809911245024Smrg# #include <windows.h>
810011245024Smrg# #undef WIN32_LEAN_AND_MEAN
810111245024Smrg# #include <stdio.h>
810211245024Smrg#
810311245024Smrg# #ifndef __CYGWIN__
810411245024Smrg# #  ifdef __CYGWIN32__
810511245024Smrg# #    define __CYGWIN__ __CYGWIN32__
810611245024Smrg# #  endif
810711245024Smrg# #endif
810811245024Smrg#
810911245024Smrg# #ifdef __cplusplus
811011245024Smrg# extern "C" {
811111245024Smrg# #endif
811211245024Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
811311245024Smrg# #ifdef __cplusplus
811411245024Smrg# }
811511245024Smrg# #endif
811611245024Smrg#
811711245024Smrg# #ifdef __CYGWIN__
811811245024Smrg# #include <cygwin/cygwin_dll.h>
811911245024Smrg# DECLARE_CYGWIN_DLL( DllMain );
812011245024Smrg# #endif
812111245024Smrg# HINSTANCE __hDllInstance_base;
812211245024Smrg#
812311245024Smrg# BOOL APIENTRY
812411245024Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
812511245024Smrg# {
812611245024Smrg#   __hDllInstance_base = hInst;
812711245024Smrg#   return TRUE;
812811245024Smrg# }
812911245024Smrg# /* ltdll.c ends here */
813011245024Smrg])# _LT_AC_FILE_LTDLL_C
813141b2f0bdSmrg
813241b2f0bdSmrg
813311245024Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
813411245024Smrg# ---------------------------------
813511245024SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
813641b2f0bdSmrg
813741b2f0bdSmrg
813811245024Smrg# old names
813911245024SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
814011245024SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
814111245024SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
814211245024SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
814311245024SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
814411245024SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
814511245024SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
814641b2f0bdSmrg
814711245024Smrg# This is just to silence aclocal about the macro not being used
814811245024Smrgifelse([AC_DISABLE_FAST_INSTALL])
814941b2f0bdSmrg
815011245024SmrgAC_DEFUN([LT_AC_PROG_GCJ],
815111245024Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
815211245024Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
815311245024Smrg  AC_SUBST(GCJFLAGS)
815411245024Smrg])
815541b2f0bdSmrg
815611245024SmrgAC_DEFUN([LT_AC_PROG_RC],
815711245024Smrg[AC_CHECK_TOOL(RC, windres, no)
815811245024Smrg])
815941b2f0bdSmrg
816041b2f0bdSmrg
816111245024Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
816211245024Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
816341b2f0bdSmrg
816411245024Smrg# _AS_TEST_PREPARE
816511245024Smrg# ----------------
816611245024Smrgm4_ifndef([_AS_TEST_PREPARE],
816711245024Smrg[m4_defun([_AS_TEST_PREPARE],
816811245024Smrg[if test -x / >/dev/null 2>&1; then
816911245024Smrg  as_executable_p='test -x'
817011245024Smrgelse
817111245024Smrg  as_executable_p='test -f'
817211245024Smrgfi
817311245024Smrg])])# _AS_TEST_PREPARE
817441b2f0bdSmrg
817511245024Smrg# AS_EXECUTABLE_P
817611245024Smrg# ---------------
817711245024Smrg# Check whether a file is executable.
817811245024Smrgm4_ifndef([AS_EXECUTABLE_P],
817911245024Smrg[m4_defun([AS_EXECUTABLE_P],
818011245024Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
818111245024Smrg$as_executable_p $1[]dnl
818211245024Smrg])])# AS_EXECUTABLE_P
818341b2f0bdSmrg
818411245024Smrg# NOTE: This macro has been submitted for inclusion into   #
818511245024Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
818611245024Smrg#  a released version of Autoconf we should remove this    #
818711245024Smrg#  macro and use it instead.                               #
818811245024Smrg# LT_AC_PROG_SED
818911245024Smrg# --------------
819011245024Smrg# Check for a fully-functional sed program, that truncates
819111245024Smrg# as few characters as possible.  Prefer GNU sed if found.
819211245024SmrgAC_DEFUN([LT_AC_PROG_SED],
819311245024Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
819411245024SmrgAC_CACHE_VAL(lt_cv_path_SED,
819511245024Smrg[# Loop through the user's path and test for sed and gsed.
819611245024Smrg# Then use that list of sed's as ones to test for truncation.
819711245024Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
819811245024Smrgfor as_dir in $PATH
819911245024Smrgdo
820011245024Smrg  IFS=$as_save_IFS
820111245024Smrg  test -z "$as_dir" && as_dir=.
820211245024Smrg  for lt_ac_prog in sed gsed; do
820311245024Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
820411245024Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
820511245024Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
820611245024Smrg      fi
820711245024Smrg    done
820811245024Smrg  done
820911245024Smrgdone
821011245024SmrgIFS=$as_save_IFS
821111245024Smrglt_ac_max=0
821211245024Smrglt_ac_count=0
821311245024Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
821411245024Smrg# along with /bin/sed that truncates output.
821511245024Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
821611245024Smrg  test ! -f $lt_ac_sed && continue
821711245024Smrg  cat /dev/null > conftest.in
821811245024Smrg  lt_ac_count=0
821911245024Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
822011245024Smrg  # Check for GNU sed and select it if it is found.
822111245024Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
822211245024Smrg    lt_cv_path_SED=$lt_ac_sed
822311245024Smrg    break
822411245024Smrg  fi
822511245024Smrg  while true; do
822611245024Smrg    cat conftest.in conftest.in >conftest.tmp
822711245024Smrg    mv conftest.tmp conftest.in
822811245024Smrg    cp conftest.in conftest.nl
822911245024Smrg    echo >>conftest.nl
823011245024Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
823111245024Smrg    cmp -s conftest.out conftest.nl || break
823211245024Smrg    # 10000 chars as input seems more than enough
823311245024Smrg    test $lt_ac_count -gt 10 && break
823411245024Smrg    lt_ac_count=`expr $lt_ac_count + 1`
823511245024Smrg    if test $lt_ac_count -gt $lt_ac_max; then
823611245024Smrg      lt_ac_max=$lt_ac_count
823711245024Smrg      lt_cv_path_SED=$lt_ac_sed
823811245024Smrg    fi
823911245024Smrg  done
824011245024Smrgdone
824111245024Smrg])
824211245024SmrgSED=$lt_cv_path_SED
824311245024SmrgAC_SUBST([SED])
824411245024SmrgAC_MSG_RESULT([$SED])
824511245024Smrg])
824641b2f0bdSmrg
824711245024Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
824811245024Smrg# 
824911245024Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
825011245024Smrg#
825111245024Smrg# This program is free software; you can redistribute it and/or modify
825211245024Smrg# it under the terms of the GNU General Public License as published by
825311245024Smrg# the Free Software Foundation; either version 2 of the License, or
825411245024Smrg# (at your option) any later version.
825511245024Smrg#
825611245024Smrg# This program is distributed in the hope that it will be useful, but
825711245024Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
825811245024Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
825911245024Smrg# General Public License for more details.
826011245024Smrg#
826111245024Smrg# You should have received a copy of the GNU General Public License
826211245024Smrg# along with this program; if not, write to the Free Software
826311245024Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
826411245024Smrg#
826511245024Smrg# As a special exception to the GNU General Public License, if you
826611245024Smrg# distribute this file as part of a program that contains a
826711245024Smrg# configuration script generated by Autoconf, you may include it under
826811245024Smrg# the same distribution terms that you use for the rest of that program.
826941b2f0bdSmrg
827011245024Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
827111245024Smrg# ----------------------------------
827211245024SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
827311245024Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
827411245024Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
827511245024SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
827611245024Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
827711245024Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
827841b2f0bdSmrgfi
827911245024Smrgif test -n "$PKG_CONFIG"; then
828011245024Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
828111245024Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
828211245024Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
828311245024Smrg		AC_MSG_RESULT([yes])
828411245024Smrg	else
828511245024Smrg		AC_MSG_RESULT([no])
828611245024Smrg		PKG_CONFIG=""
828711245024Smrg	fi
828811245024Smrg		
828911245024Smrgfi[]dnl
829011245024Smrg])# PKG_PROG_PKG_CONFIG
829141b2f0bdSmrg
829211245024Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
829341b2f0bdSmrg#
829411245024Smrg# Check to see whether a particular set of modules exists.  Similar
829511245024Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
829611245024Smrg#
829711245024Smrg#
829811245024Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
829911245024Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
830011245024Smrg# PKG_CHECK_EXISTS manually
830111245024Smrg# --------------------------------------------------------------
830211245024SmrgAC_DEFUN([PKG_CHECK_EXISTS],
830311245024Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
830411245024Smrgif test -n "$PKG_CONFIG" && \
830511245024Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
830611245024Smrg  m4_ifval([$2], [$2], [:])
830711245024Smrgm4_ifvaln([$3], [else
830811245024Smrg  $3])dnl
830911245024Smrgfi])
831041b2f0bdSmrg
831141b2f0bdSmrg
831211245024Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
831311245024Smrg# ---------------------------------------------
831411245024Smrgm4_define([_PKG_CONFIG],
831511245024Smrg[if test -n "$$1"; then
831611245024Smrg    pkg_cv_[]$1="$$1"
831711245024Smrg elif test -n "$PKG_CONFIG"; then
831811245024Smrg    PKG_CHECK_EXISTS([$3],
831911245024Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
832011245024Smrg		     [pkg_failed=yes])
832111245024Smrg else
832211245024Smrg    pkg_failed=untried
832311245024Smrgfi[]dnl
832411245024Smrg])# _PKG_CONFIG
832541b2f0bdSmrg
832611245024Smrg# _PKG_SHORT_ERRORS_SUPPORTED
832711245024Smrg# -----------------------------
832811245024SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
832911245024Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
833011245024Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
833111245024Smrg        _pkg_short_errors_supported=yes
833241b2f0bdSmrgelse
833311245024Smrg        _pkg_short_errors_supported=no
833411245024Smrgfi[]dnl
833511245024Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
833641b2f0bdSmrg
833741b2f0bdSmrg
833811245024Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
833911245024Smrg# [ACTION-IF-NOT-FOUND])
834041b2f0bdSmrg#
834141b2f0bdSmrg#
834211245024Smrg# Note that if there is a possibility the first call to
834311245024Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
834411245024Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
834541b2f0bdSmrg#
834641b2f0bdSmrg#
834711245024Smrg# --------------------------------------------------------------
834811245024SmrgAC_DEFUN([PKG_CHECK_MODULES],
834911245024Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
835011245024SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
835111245024SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
835241b2f0bdSmrg
835311245024Smrgpkg_failed=no
835411245024SmrgAC_MSG_CHECKING([for $1])
835541b2f0bdSmrg
835611245024Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
835711245024Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
835841b2f0bdSmrg
835911245024Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
836011245024Smrgand $1[]_LIBS to avoid the need to call pkg-config.
836111245024SmrgSee the pkg-config man page for more details.])
836241b2f0bdSmrg
836311245024Smrgif test $pkg_failed = yes; then
836411245024Smrg        _PKG_SHORT_ERRORS_SUPPORTED
836511245024Smrg        if test $_pkg_short_errors_supported = yes; then
836611245024Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
836711245024Smrg        else 
836811245024Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
836911245024Smrg        fi
837011245024Smrg	# Put the nasty error message in config.log where it belongs
837111245024Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
837241b2f0bdSmrg
837311245024Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
837411245024Smrg[Package requirements ($2) were not met:
837541b2f0bdSmrg
837611245024Smrg$$1_PKG_ERRORS
837741b2f0bdSmrg
837811245024SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
837911245024Smrginstalled software in a non-standard prefix.
838041b2f0bdSmrg
838111245024Smrg_PKG_TEXT
838211245024Smrg])],
838311245024Smrg		[AC_MSG_RESULT([no])
838411245024Smrg                $4])
838511245024Smrgelif test $pkg_failed = untried; then
838611245024Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
838711245024Smrg[The pkg-config script could not be found or is too old.  Make sure it
838811245024Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
838911245024Smrgpath to pkg-config.
839041b2f0bdSmrg
839111245024Smrg_PKG_TEXT
839241b2f0bdSmrg
839311245024SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
839411245024Smrg		[$4])
839541b2f0bdSmrgelse
839611245024Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
839711245024Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
839811245024Smrg        AC_MSG_RESULT([yes])
839911245024Smrg	ifelse([$3], , :, [$3])
840011245024Smrgfi[]dnl
840111245024Smrg])# PKG_CHECK_MODULES
840241b2f0bdSmrg
8403