aclocal.m4 revision 7104f784
17104f784Smrg# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
209885543Smrg
309885543Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
47104f784Smrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
509885543Smrg# This file is free software; the Free Software Foundation
609885543Smrg# gives unlimited permission to copy and/or distribute it,
709885543Smrg# with or without modifications, as long as this notice is preserved.
809885543Smrg
909885543Smrg# This program is distributed in the hope that it will be useful,
1009885543Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1109885543Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1209885543Smrg# PARTICULAR PURPOSE.
1309885543Smrg
147104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION],
157104f784Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
167104f784Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
177104f784Smrg[m4_warning([this file was generated for autoconf 2.63.
187104f784SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
197104f784SmrgIf you have problems, you may need to regenerate the build system entirely.
207104f784SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
217104f784Smrg
2209885543Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2309885543Smrg
247104f784Smrg# serial 52 AC_PROG_LIBTOOL
2509885543Smrg
2609885543Smrg
2709885543Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2809885543Smrg# -----------------------------------------------------------
2909885543Smrg# If this macro is not defined by Autoconf, define it here.
3009885543Smrgm4_ifdef([AC_PROVIDE_IFELSE],
3109885543Smrg         [],
3209885543Smrg         [m4_define([AC_PROVIDE_IFELSE],
3309885543Smrg	         [m4_ifdef([AC_PROVIDE_$1],
3409885543Smrg		           [$2], [$3])])])
3509885543Smrg
3609885543Smrg
3709885543Smrg# AC_PROG_LIBTOOL
3809885543Smrg# ---------------
3909885543SmrgAC_DEFUN([AC_PROG_LIBTOOL],
4009885543Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
4109885543Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
4209885543Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
4309885543Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
4409885543Smrg    [AC_LIBTOOL_CXX],
4509885543Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
4609885543Smrg  ])])
4709885543Smrgdnl And a similar setup for Fortran 77 support
4809885543Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
4909885543Smrg    [AC_LIBTOOL_F77],
5009885543Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5109885543Smrg])])
5209885543Smrg
5309885543Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5409885543Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5509885543Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5609885543Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5709885543Smrg    [AC_LIBTOOL_GCJ],
5809885543Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5909885543Smrg      [AC_LIBTOOL_GCJ],
6009885543Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6109885543Smrg	[AC_LIBTOOL_GCJ],
6209885543Smrg      [ifdef([AC_PROG_GCJ],
6309885543Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6409885543Smrg       ifdef([A][M_PROG_GCJ],
6509885543Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6609885543Smrg       ifdef([LT_AC_PROG_GCJ],
6709885543Smrg	     [define([LT_AC_PROG_GCJ],
6809885543Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6909885543Smrg])])# AC_PROG_LIBTOOL
7009885543Smrg
7109885543Smrg
7209885543Smrg# _AC_PROG_LIBTOOL
7309885543Smrg# ----------------
7409885543SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
7509885543Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
7609885543SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
7709885543SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
7809885543SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
7909885543Smrg
8009885543Smrg# This can be used to rebuild libtool when needed
8109885543SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
8209885543Smrg
8309885543Smrg# Always use our own libtool.
8409885543SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
8509885543SmrgAC_SUBST(LIBTOOL)dnl
8609885543Smrg
8709885543Smrg# Prevent multiple expansion
8809885543Smrgdefine([AC_PROG_LIBTOOL], [])
8909885543Smrg])# _AC_PROG_LIBTOOL
9009885543Smrg
9109885543Smrg
9209885543Smrg# AC_LIBTOOL_SETUP
9309885543Smrg# ----------------
9409885543SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
9509885543Smrg[AC_PREREQ(2.50)dnl
9609885543SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
9709885543SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
9809885543SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
9909885543SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
10009885543SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
10109885543SmrgAC_REQUIRE([AC_PROG_CC])dnl
10209885543SmrgAC_REQUIRE([AC_PROG_LD])dnl
10309885543SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
10409885543SmrgAC_REQUIRE([AC_PROG_NM])dnl
10509885543Smrg
10609885543SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
10709885543SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
10809885543Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
10909885543SmrgAC_REQUIRE([AC_OBJEXT])dnl
11009885543SmrgAC_REQUIRE([AC_EXEEXT])dnl
11109885543Smrgdnl
11209885543SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
11309885543SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
11409885543SmrgAC_LIBTOOL_OBJDIR
11509885543Smrg
11609885543SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
11709885543Smrg_LT_AC_PROG_ECHO_BACKSLASH
11809885543Smrg
11909885543Smrgcase $host_os in
12009885543Smrgaix3*)
12109885543Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
12209885543Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
12309885543Smrg  # vanish in a puff of smoke.
12409885543Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
12509885543Smrg    COLLECT_NAMES=
12609885543Smrg    export COLLECT_NAMES
12709885543Smrg  fi
12809885543Smrg  ;;
12909885543Smrgesac
13009885543Smrg
13109885543Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
13209885543Smrg# metacharacters that are still active within double-quoted strings.
13309885543SmrgXsed='sed -e 1s/^X//'
13409885543Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
13509885543Smrg
13609885543Smrg# Same as above, but do not quote variable references.
13709885543Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
13809885543Smrg
13909885543Smrg# Sed substitution to delay expansion of an escaped shell variable in a
14009885543Smrg# double_quote_subst'ed string.
14109885543Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
14209885543Smrg
14309885543Smrg# Sed substitution to avoid accidental globbing in evaled expressions
14409885543Smrgno_glob_subst='s/\*/\\\*/g'
14509885543Smrg
14609885543Smrg# Constants:
14709885543Smrgrm="rm -f"
14809885543Smrg
14909885543Smrg# Global variables:
15009885543Smrgdefault_ofile=libtool
15109885543Smrgcan_build_shared=yes
15209885543Smrg
15309885543Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
15409885543Smrg# which needs '.lib').
15509885543Smrglibext=a
15609885543Smrgltmain="$ac_aux_dir/ltmain.sh"
15709885543Smrgofile="$default_ofile"
15809885543Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
15909885543Smrg
16009885543SmrgAC_CHECK_TOOL(AR, ar, false)
16109885543SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
16209885543SmrgAC_CHECK_TOOL(STRIP, strip, :)
16309885543Smrg
16409885543Smrgold_CC="$CC"
16509885543Smrgold_CFLAGS="$CFLAGS"
16609885543Smrg
16709885543Smrg# Set sane defaults for various variables
16809885543Smrgtest -z "$AR" && AR=ar
16909885543Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
17009885543Smrgtest -z "$AS" && AS=as
17109885543Smrgtest -z "$CC" && CC=cc
17209885543Smrgtest -z "$LTCC" && LTCC=$CC
17309885543Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
17409885543Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
17509885543Smrgtest -z "$LD" && LD=ld
17609885543Smrgtest -z "$LN_S" && LN_S="ln -s"
17709885543Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
17809885543Smrgtest -z "$NM" && NM=nm
17909885543Smrgtest -z "$SED" && SED=sed
18009885543Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
18109885543Smrgtest -z "$RANLIB" && RANLIB=:
18209885543Smrgtest -z "$STRIP" && STRIP=:
18309885543Smrgtest -z "$ac_objext" && ac_objext=o
18409885543Smrg
18509885543Smrg# Determine commands to create old-style static archives.
1867104f784Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
18709885543Smrgold_postinstall_cmds='chmod 644 $oldlib'
18809885543Smrgold_postuninstall_cmds=
18909885543Smrg
19009885543Smrgif test -n "$RANLIB"; then
19109885543Smrg  case $host_os in
19209885543Smrg  openbsd*)
19309885543Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
19409885543Smrg    ;;
19509885543Smrg  *)
19609885543Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
19709885543Smrg    ;;
19809885543Smrg  esac
19909885543Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
20009885543Smrgfi
20109885543Smrg
20209885543Smrg_LT_CC_BASENAME([$compiler])
20309885543Smrg
20409885543Smrg# Only perform the check for file, if the check method requires it
20509885543Smrgcase $deplibs_check_method in
20609885543Smrgfile_magic*)
20709885543Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
20809885543Smrg    AC_PATH_MAGIC
20909885543Smrg  fi
21009885543Smrg  ;;
21109885543Smrgesac
21209885543Smrg
2137104f784Smrg_LT_REQUIRED_DARWIN_CHECKS
2147104f784Smrg
21509885543SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
21609885543SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
21709885543Smrgenable_win32_dll=yes, enable_win32_dll=no)
21809885543Smrg
21909885543SmrgAC_ARG_ENABLE([libtool-lock],
22009885543Smrg    [AC_HELP_STRING([--disable-libtool-lock],
22109885543Smrg	[avoid locking (might break parallel builds)])])
22209885543Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
22309885543Smrg
22409885543SmrgAC_ARG_WITH([pic],
22509885543Smrg    [AC_HELP_STRING([--with-pic],
22609885543Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
22709885543Smrg    [pic_mode="$withval"],
22809885543Smrg    [pic_mode=default])
22909885543Smrgtest -z "$pic_mode" && pic_mode=default
23009885543Smrg
2317104f784Smrg# Check if we have a version mismatch between libtool.m4 and ltmain.sh.
2327104f784Smrg#
2337104f784Smrg# Note:  This should be in AC_LIBTOOL_SETUP, _after_ $ltmain have been defined.
2347104f784Smrg#        We also should do it _before_ AC_LIBTOOL_LANG_C_CONFIG that actually
2357104f784Smrg#        calls AC_LIBTOOL_CONFIG and creates libtool.
2367104f784Smrg#
2377104f784Smrg_LT_VERSION_CHECK
2387104f784Smrg
23909885543Smrg# Use C for the default configuration in the libtool script
24009885543Smrgtagname=
24109885543SmrgAC_LIBTOOL_LANG_C_CONFIG
24209885543Smrg_LT_AC_TAGCONFIG
24309885543Smrg])# AC_LIBTOOL_SETUP
24409885543Smrg
24509885543Smrg
2467104f784Smrg# _LT_VERSION_CHECK
2477104f784Smrg# -----------------
2487104f784SmrgAC_DEFUN([_LT_VERSION_CHECK],
2497104f784Smrg[AC_MSG_CHECKING([for correct ltmain.sh version])
2507104f784Smrgif test "x$ltmain" = "x" ; then
2517104f784Smrg  AC_MSG_RESULT(no)
2527104f784Smrg  AC_MSG_ERROR([
2537104f784Smrg
2547104f784Smrg*** @<:@Gentoo@:>@ sanity check failed! ***
2557104f784Smrg*** \$ltmain is not defined, please check the patch for consistency! ***
2567104f784Smrg])
2577104f784Smrgfi
2587104f784Smrggentoo_lt_version="1.5.26"
2597104f784Smrggentoo_ltmain_version=`sed -n '/^[[ 	]]*VERSION=/{s/^[[ 	]]*VERSION=//;p;q;}' "$ltmain"`
2607104f784Smrgif test "x$gentoo_lt_version" != "x$gentoo_ltmain_version" ; then
2617104f784Smrg  AC_MSG_RESULT(no)
2627104f784Smrg  AC_MSG_ERROR([
2637104f784Smrg
2647104f784Smrg*** @<:@Gentoo@:>@ sanity check failed! ***
2657104f784Smrg*** libtool.m4 and ltmain.sh have a version mismatch! ***
2667104f784Smrg*** (libtool.m4 = $gentoo_lt_version, ltmain.sh = $gentoo_ltmain_version) ***
2677104f784Smrg
2687104f784SmrgPlease run:
2697104f784Smrg
2707104f784Smrg  libtoolize --copy --force
2717104f784Smrg
2727104f784Smrgif appropriate, please contact the maintainer of this
2737104f784Smrgpackage (or your distribution) for help.
2747104f784Smrg])
2757104f784Smrgelse
2767104f784Smrg  AC_MSG_RESULT(yes)
2777104f784Smrgfi
2787104f784Smrg])# _LT_VERSION_CHECK
2797104f784Smrg
2807104f784Smrg
28109885543Smrg# _LT_AC_SYS_COMPILER
28209885543Smrg# -------------------
28309885543SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
28409885543Smrg[AC_REQUIRE([AC_PROG_CC])dnl
28509885543Smrg
28609885543Smrg# If no C compiler was specified, use CC.
28709885543SmrgLTCC=${LTCC-"$CC"}
28809885543Smrg
28909885543Smrg# If no C compiler flags were specified, use CFLAGS.
29009885543SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
29109885543Smrg
29209885543Smrg# Allow CC to be a program name with arguments.
29309885543Smrgcompiler=$CC
29409885543Smrg])# _LT_AC_SYS_COMPILER
29509885543Smrg
29609885543Smrg
29709885543Smrg# _LT_CC_BASENAME(CC)
29809885543Smrg# -------------------
29909885543Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
30009885543SmrgAC_DEFUN([_LT_CC_BASENAME],
30109885543Smrg[for cc_temp in $1""; do
30209885543Smrg  case $cc_temp in
30309885543Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
30409885543Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
30509885543Smrg    \-*) ;;
30609885543Smrg    *) break;;
30709885543Smrg  esac
30809885543Smrgdone
30909885543Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
31009885543Smrg])
31109885543Smrg
31209885543Smrg
31309885543Smrg# _LT_COMPILER_BOILERPLATE
31409885543Smrg# ------------------------
31509885543Smrg# Check for compiler boilerplate output or warnings with
31609885543Smrg# the simple compiler test code.
31709885543SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
3187104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
3197104f784Smrgac_outfile=conftest.$ac_objext
3207104f784Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
32109885543Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
32209885543Smrg_lt_compiler_boilerplate=`cat conftest.err`
32309885543Smrg$rm conftest*
32409885543Smrg])# _LT_COMPILER_BOILERPLATE
32509885543Smrg
32609885543Smrg
32709885543Smrg# _LT_LINKER_BOILERPLATE
32809885543Smrg# ----------------------
32909885543Smrg# Check for linker boilerplate output or warnings with
33009885543Smrg# the simple link test code.
33109885543SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
3327104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
3337104f784Smrgac_outfile=conftest.$ac_objext
3347104f784Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
33509885543Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
33609885543Smrg_lt_linker_boilerplate=`cat conftest.err`
3377104f784Smrg$rm -r conftest*
33809885543Smrg])# _LT_LINKER_BOILERPLATE
33909885543Smrg
3407104f784Smrg# _LT_REQUIRED_DARWIN_CHECKS
3417104f784Smrg# --------------------------
3427104f784Smrg# Check for some things on darwin
3437104f784SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
3447104f784Smrg  case $host_os in
3457104f784Smrg    rhapsody* | darwin*)
3467104f784Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3477104f784Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3487104f784Smrg
3497104f784Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3507104f784Smrg      [lt_cv_apple_cc_single_mod=no
3517104f784Smrg      if test -z "${LT_MULTI_MODULE}"; then
3527104f784Smrg   # By default we will add the -single_module flag. You can override
3537104f784Smrg   # by either setting the environment variable LT_MULTI_MODULE
3547104f784Smrg   # non-empty at configure time, or by adding -multi_module to the
3557104f784Smrg   # link flags.
3567104f784Smrg   echo "int foo(void){return 1;}" > conftest.c
3577104f784Smrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3587104f784Smrg     -dynamiclib ${wl}-single_module conftest.c
3597104f784Smrg   if test -f libconftest.dylib; then
3607104f784Smrg     lt_cv_apple_cc_single_mod=yes
3617104f784Smrg     rm -rf libconftest.dylib*
3627104f784Smrg   fi
3637104f784Smrg   rm conftest.c
3647104f784Smrg      fi])
3657104f784Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3667104f784Smrg      [lt_cv_ld_exported_symbols_list],
3677104f784Smrg      [lt_cv_ld_exported_symbols_list=no
3687104f784Smrg      save_LDFLAGS=$LDFLAGS
3697104f784Smrg      echo "_main" > conftest.sym
3707104f784Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3717104f784Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3727104f784Smrg   [lt_cv_ld_exported_symbols_list=yes],
3737104f784Smrg   [lt_cv_ld_exported_symbols_list=no])
3747104f784Smrg   LDFLAGS="$save_LDFLAGS"
3757104f784Smrg    ])
3767104f784Smrg    case $host_os in
3777104f784Smrg    rhapsody* | darwin1.[[0123]])
3787104f784Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3797104f784Smrg    darwin1.*)
3807104f784Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3817104f784Smrg    darwin*)
3827104f784Smrg      # if running on 10.5 or later, the deployment target defaults
3837104f784Smrg      # to the OS version, if on x86, and 10.4, the deployment
3847104f784Smrg      # target defaults to 10.4. Don't you love it?
3857104f784Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3867104f784Smrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3877104f784Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3887104f784Smrg   10.[[012]]*)
3897104f784Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3907104f784Smrg   10.*)
3917104f784Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3927104f784Smrg      esac
3937104f784Smrg    ;;
3947104f784Smrg  esac
3957104f784Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3967104f784Smrg      _lt_dar_single_mod='$single_module'
3977104f784Smrg    fi
3987104f784Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3997104f784Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
4007104f784Smrg    else
4017104f784Smrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
4027104f784Smrg    fi
4037104f784Smrg    if test "$DSYMUTIL" != ":"; then
4047104f784Smrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
4057104f784Smrg    else
4067104f784Smrg      _lt_dsymutil=
4077104f784Smrg    fi
4087104f784Smrg    ;;
4097104f784Smrg  esac
4107104f784Smrg])
41109885543Smrg
41209885543Smrg# _LT_AC_SYS_LIBPATH_AIX
41309885543Smrg# ----------------------
41409885543Smrg# Links a minimal program and checks the executable
41509885543Smrg# for the system default hardcoded library path. In most cases,
41609885543Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
41709885543Smrg# the location of the communication and MPI libs are included too.
41809885543Smrg# If we don't find anything, use the default library path according
41909885543Smrg# to the aix ld manual.
42009885543SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
4217104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
4227104f784SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
4237104f784Smrglt_aix_libpath_sed='
4247104f784Smrg    /Import File Strings/,/^$/ {
4257104f784Smrg	/^0/ {
4267104f784Smrg	    s/^0  *\(.*\)$/\1/
4277104f784Smrg	    p
4287104f784Smrg	}
4297104f784Smrg    }'
4307104f784Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
43109885543Smrg# Check for a 64-bit object if we didn't find anything.
4327104f784Smrgif test -z "$aix_libpath"; then
4337104f784Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
4347104f784Smrgfi],[])
43509885543Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
43609885543Smrg])# _LT_AC_SYS_LIBPATH_AIX
43709885543Smrg
43809885543Smrg
43909885543Smrg# _LT_AC_SHELL_INIT(ARG)
44009885543Smrg# ----------------------
44109885543SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
44209885543Smrg[ifdef([AC_DIVERSION_NOTICE],
44309885543Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
44409885543Smrg	 [AC_DIVERT_PUSH(NOTICE)])
44509885543Smrg$1
44609885543SmrgAC_DIVERT_POP
44709885543Smrg])# _LT_AC_SHELL_INIT
44809885543Smrg
44909885543Smrg
45009885543Smrg# _LT_AC_PROG_ECHO_BACKSLASH
45109885543Smrg# --------------------------
45209885543Smrg# Add some code to the start of the generated configure script which
45309885543Smrg# will find an echo command which doesn't interpret backslashes.
45409885543SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
45509885543Smrg[_LT_AC_SHELL_INIT([
45609885543Smrg# Check that we are running under the correct shell.
45709885543SmrgSHELL=${CONFIG_SHELL-/bin/sh}
45809885543Smrg
45909885543Smrgcase X$ECHO in
46009885543SmrgX*--fallback-echo)
46109885543Smrg  # Remove one level of quotation (which was required for Make).
46209885543Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
46309885543Smrg  ;;
46409885543Smrgesac
46509885543Smrg
46609885543Smrgecho=${ECHO-echo}
46709885543Smrgif test "X[$]1" = X--no-reexec; then
46809885543Smrg  # Discard the --no-reexec flag, and continue.
46909885543Smrg  shift
47009885543Smrgelif test "X[$]1" = X--fallback-echo; then
47109885543Smrg  # Avoid inline document here, it may be left over
47209885543Smrg  :
47309885543Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
47409885543Smrg  # Yippee, $echo works!
47509885543Smrg  :
47609885543Smrgelse
47709885543Smrg  # Restart under the correct shell.
47809885543Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
47909885543Smrgfi
48009885543Smrg
48109885543Smrgif test "X[$]1" = X--fallback-echo; then
48209885543Smrg  # used as fallback echo
48309885543Smrg  shift
48409885543Smrg  cat <<EOF
48509885543Smrg[$]*
48609885543SmrgEOF
48709885543Smrg  exit 0
48809885543Smrgfi
48909885543Smrg
49009885543Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
49109885543Smrg# if CDPATH is set.
49209885543Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49309885543Smrg
49409885543Smrgif test -z "$ECHO"; then
49509885543Smrgif test "X${echo_test_string+set}" != Xset; then
49609885543Smrg# find a string as large as possible, as long as the shell can cope with it
49709885543Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
49809885543Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
49909885543Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
50009885543Smrg       echo_test_string=`eval $cmd` &&
50109885543Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
50209885543Smrg    then
50309885543Smrg      break
50409885543Smrg    fi
50509885543Smrg  done
50609885543Smrgfi
50709885543Smrg
50809885543Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
50909885543Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
51009885543Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
51109885543Smrg  :
51209885543Smrgelse
51309885543Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
51409885543Smrg  # backslashes.  This makes it impossible to quote backslashes using
51509885543Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
51609885543Smrg  #
51709885543Smrg  # So, first we look for a working echo in the user's PATH.
51809885543Smrg
51909885543Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
52009885543Smrg  for dir in $PATH /usr/ucb; do
52109885543Smrg    IFS="$lt_save_ifs"
52209885543Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
52309885543Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
52409885543Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
52509885543Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
52609885543Smrg      echo="$dir/echo"
52709885543Smrg      break
52809885543Smrg    fi
52909885543Smrg  done
53009885543Smrg  IFS="$lt_save_ifs"
53109885543Smrg
53209885543Smrg  if test "X$echo" = Xecho; then
53309885543Smrg    # We didn't find a better echo, so look for alternatives.
53409885543Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
53509885543Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
53609885543Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
53709885543Smrg      # This shell has a builtin print -r that does the trick.
53809885543Smrg      echo='print -r'
53909885543Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
54009885543Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
54109885543Smrg      # If we have ksh, try running configure again with it.
54209885543Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
54309885543Smrg      export ORIGINAL_CONFIG_SHELL
54409885543Smrg      CONFIG_SHELL=/bin/ksh
54509885543Smrg      export CONFIG_SHELL
54609885543Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
54709885543Smrg    else
54809885543Smrg      # Try using printf.
54909885543Smrg      echo='printf %s\n'
55009885543Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
55109885543Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
55209885543Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
55309885543Smrg	# Cool, printf works
55409885543Smrg	:
55509885543Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
55609885543Smrg	   test "X$echo_testing_string" = 'X\t' &&
55709885543Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
55809885543Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
55909885543Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
56009885543Smrg	export CONFIG_SHELL
56109885543Smrg	SHELL="$CONFIG_SHELL"
56209885543Smrg	export SHELL
56309885543Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
56409885543Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
56509885543Smrg	   test "X$echo_testing_string" = 'X\t' &&
56609885543Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
56709885543Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
56809885543Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
56909885543Smrg      else
57009885543Smrg	# maybe with a smaller string...
57109885543Smrg	prev=:
57209885543Smrg
57309885543Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
57409885543Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
57509885543Smrg	  then
57609885543Smrg	    break
57709885543Smrg	  fi
57809885543Smrg	  prev="$cmd"
57909885543Smrg	done
58009885543Smrg
58109885543Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
58209885543Smrg	  echo_test_string=`eval $prev`
58309885543Smrg	  export echo_test_string
58409885543Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
58509885543Smrg	else
58609885543Smrg	  # Oops.  We lost completely, so just stick with echo.
58709885543Smrg	  echo=echo
58809885543Smrg	fi
58909885543Smrg      fi
59009885543Smrg    fi
59109885543Smrg  fi
59209885543Smrgfi
59309885543Smrgfi
59409885543Smrg
59509885543Smrg# Copy echo and quote the copy suitably for passing to libtool from
59609885543Smrg# the Makefile, instead of quoting the original, which is used later.
59709885543SmrgECHO=$echo
59809885543Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
59909885543Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
60009885543Smrgfi
60109885543Smrg
60209885543SmrgAC_SUBST(ECHO)
60309885543Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
60409885543Smrg
60509885543Smrg
60609885543Smrg# _LT_AC_LOCK
60709885543Smrg# -----------
60809885543SmrgAC_DEFUN([_LT_AC_LOCK],
60909885543Smrg[AC_ARG_ENABLE([libtool-lock],
61009885543Smrg    [AC_HELP_STRING([--disable-libtool-lock],
61109885543Smrg	[avoid locking (might break parallel builds)])])
61209885543Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
61309885543Smrg
61409885543Smrg# Some flags need to be propagated to the compiler or linker for good
61509885543Smrg# libtool support.
61609885543Smrgcase $host in
61709885543Smrgia64-*-hpux*)
61809885543Smrg  # Find out which ABI we are using.
61909885543Smrg  echo 'int i;' > conftest.$ac_ext
62009885543Smrg  if AC_TRY_EVAL(ac_compile); then
62109885543Smrg    case `/usr/bin/file conftest.$ac_objext` in
62209885543Smrg    *ELF-32*)
62309885543Smrg      HPUX_IA64_MODE="32"
62409885543Smrg      ;;
62509885543Smrg    *ELF-64*)
62609885543Smrg      HPUX_IA64_MODE="64"
62709885543Smrg      ;;
62809885543Smrg    esac
62909885543Smrg  fi
63009885543Smrg  rm -rf conftest*
63109885543Smrg  ;;
63209885543Smrg*-*-irix6*)
63309885543Smrg  # Find out which ABI we are using.
63409885543Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
63509885543Smrg  if AC_TRY_EVAL(ac_compile); then
63609885543Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
63709885543Smrg    case `/usr/bin/file conftest.$ac_objext` in
63809885543Smrg    *32-bit*)
63909885543Smrg      LD="${LD-ld} -melf32bsmip"
64009885543Smrg      ;;
64109885543Smrg    *N32*)
64209885543Smrg      LD="${LD-ld} -melf32bmipn32"
64309885543Smrg      ;;
64409885543Smrg    *64-bit*)
64509885543Smrg      LD="${LD-ld} -melf64bmip"
64609885543Smrg      ;;
64709885543Smrg    esac
64809885543Smrg   else
64909885543Smrg    case `/usr/bin/file conftest.$ac_objext` in
65009885543Smrg    *32-bit*)
65109885543Smrg      LD="${LD-ld} -32"
65209885543Smrg      ;;
65309885543Smrg    *N32*)
65409885543Smrg      LD="${LD-ld} -n32"
65509885543Smrg      ;;
65609885543Smrg    *64-bit*)
65709885543Smrg      LD="${LD-ld} -64"
65809885543Smrg      ;;
65909885543Smrg    esac
66009885543Smrg   fi
66109885543Smrg  fi
66209885543Smrg  rm -rf conftest*
66309885543Smrg  ;;
66409885543Smrg
6657104f784Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
6667104f784Smrgs390*-*linux*|sparc*-*linux*)
66709885543Smrg  # Find out which ABI we are using.
66809885543Smrg  echo 'int i;' > conftest.$ac_ext
66909885543Smrg  if AC_TRY_EVAL(ac_compile); then
67009885543Smrg    case `/usr/bin/file conftest.o` in
67109885543Smrg    *32-bit*)
67209885543Smrg      case $host in
6737104f784Smrg        x86_64-*kfreebsd*-gnu)
6747104f784Smrg          LD="${LD-ld} -m elf_i386_fbsd"
6757104f784Smrg          ;;
67609885543Smrg        x86_64-*linux*)
67709885543Smrg          LD="${LD-ld} -m elf_i386"
67809885543Smrg          ;;
67909885543Smrg        ppc64-*linux*|powerpc64-*linux*)
68009885543Smrg          LD="${LD-ld} -m elf32ppclinux"
68109885543Smrg          ;;
68209885543Smrg        s390x-*linux*)
68309885543Smrg          LD="${LD-ld} -m elf_s390"
68409885543Smrg          ;;
68509885543Smrg        sparc64-*linux*)
68609885543Smrg          LD="${LD-ld} -m elf32_sparc"
68709885543Smrg          ;;
68809885543Smrg      esac
68909885543Smrg      ;;
69009885543Smrg    *64-bit*)
69109885543Smrg      case $host in
6927104f784Smrg        x86_64-*kfreebsd*-gnu)
6937104f784Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
6947104f784Smrg          ;;
69509885543Smrg        x86_64-*linux*)
69609885543Smrg          LD="${LD-ld} -m elf_x86_64"
69709885543Smrg          ;;
69809885543Smrg        ppc*-*linux*|powerpc*-*linux*)
69909885543Smrg          LD="${LD-ld} -m elf64ppc"
70009885543Smrg          ;;
70109885543Smrg        s390*-*linux*)
70209885543Smrg          LD="${LD-ld} -m elf64_s390"
70309885543Smrg          ;;
70409885543Smrg        sparc*-*linux*)
70509885543Smrg          LD="${LD-ld} -m elf64_sparc"
70609885543Smrg          ;;
70709885543Smrg      esac
70809885543Smrg      ;;
70909885543Smrg    esac
71009885543Smrg  fi
71109885543Smrg  rm -rf conftest*
71209885543Smrg  ;;
71309885543Smrg
71409885543Smrg*-*-sco3.2v5*)
71509885543Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
71609885543Smrg  SAVE_CFLAGS="$CFLAGS"
71709885543Smrg  CFLAGS="$CFLAGS -belf"
71809885543Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
71909885543Smrg    [AC_LANG_PUSH(C)
72009885543Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
72109885543Smrg     AC_LANG_POP])
72209885543Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
72309885543Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
72409885543Smrg    CFLAGS="$SAVE_CFLAGS"
72509885543Smrg  fi
72609885543Smrg  ;;
72709885543Smrgsparc*-*solaris*)
72809885543Smrg  # Find out which ABI we are using.
72909885543Smrg  echo 'int i;' > conftest.$ac_ext
73009885543Smrg  if AC_TRY_EVAL(ac_compile); then
73109885543Smrg    case `/usr/bin/file conftest.o` in
73209885543Smrg    *64-bit*)
73309885543Smrg      case $lt_cv_prog_gnu_ld in
73409885543Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
7357104f784Smrg      *)
7367104f784Smrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
7377104f784Smrg	  LD="${LD-ld} -64"
7387104f784Smrg	fi
7397104f784Smrg	;;
74009885543Smrg      esac
74109885543Smrg      ;;
74209885543Smrg    esac
74309885543Smrg  fi
74409885543Smrg  rm -rf conftest*
74509885543Smrg  ;;
74609885543Smrg
74709885543SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
74809885543Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
74909885543Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
75009885543Smrg  AC_CHECK_TOOL(AS, as, false)
75109885543Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
75209885543Smrg  ;;
75309885543Smrg  ])
75409885543Smrgesac
75509885543Smrg
75609885543Smrgneed_locks="$enable_libtool_lock"
75709885543Smrg
75809885543Smrg])# _LT_AC_LOCK
75909885543Smrg
76009885543Smrg
76109885543Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
76209885543Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
76309885543Smrg# ----------------------------------------------------------------
76409885543Smrg# Check whether the given compiler option works
76509885543SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
76609885543Smrg[AC_REQUIRE([LT_AC_PROG_SED])
76709885543SmrgAC_CACHE_CHECK([$1], [$2],
76809885543Smrg  [$2=no
76909885543Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
7707104f784Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
77109885543Smrg   lt_compiler_flag="$3"
77209885543Smrg   # Insert the option either (1) after the last *FLAGS variable, or
77309885543Smrg   # (2) before a word containing "conftest.", or (3) at the end.
77409885543Smrg   # Note that $ac_compile itself does not contain backslashes and begins
77509885543Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
77609885543Smrg   # The option is referenced via a variable to avoid confusing sed.
77709885543Smrg   lt_compile=`echo "$ac_compile" | $SED \
77809885543Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
77909885543Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
78009885543Smrg   -e 's:$: $lt_compiler_flag:'`
78109885543Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
78209885543Smrg   (eval "$lt_compile" 2>conftest.err)
78309885543Smrg   ac_status=$?
78409885543Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
78509885543Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
78609885543Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
78709885543Smrg     # The compiler can only warn and ignore the option if not recognized
78809885543Smrg     # So say no if there are warnings other than the usual output.
78909885543Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
79009885543Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
79109885543Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
79209885543Smrg       $2=yes
79309885543Smrg     fi
79409885543Smrg   fi
79509885543Smrg   $rm conftest*
79609885543Smrg])
79709885543Smrg
79809885543Smrgif test x"[$]$2" = xyes; then
79909885543Smrg    ifelse([$5], , :, [$5])
80009885543Smrgelse
80109885543Smrg    ifelse([$6], , :, [$6])
80209885543Smrgfi
80309885543Smrg])# AC_LIBTOOL_COMPILER_OPTION
80409885543Smrg
80509885543Smrg
80609885543Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
80709885543Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
80809885543Smrg# ------------------------------------------------------------
80909885543Smrg# Check whether the given compiler option works
81009885543SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
8117104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
8127104f784SmrgAC_CACHE_CHECK([$1], [$2],
81309885543Smrg  [$2=no
81409885543Smrg   save_LDFLAGS="$LDFLAGS"
81509885543Smrg   LDFLAGS="$LDFLAGS $3"
8167104f784Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
81709885543Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
81809885543Smrg     # The linker can only warn and ignore the option if not recognized
81909885543Smrg     # So say no if there are warnings
82009885543Smrg     if test -s conftest.err; then
82109885543Smrg       # Append any errors to the config.log.
82209885543Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
82309885543Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
82409885543Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
82509885543Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
82609885543Smrg         $2=yes
82709885543Smrg       fi
82809885543Smrg     else
82909885543Smrg       $2=yes
83009885543Smrg     fi
83109885543Smrg   fi
8327104f784Smrg   $rm -r conftest*
83309885543Smrg   LDFLAGS="$save_LDFLAGS"
83409885543Smrg])
83509885543Smrg
83609885543Smrgif test x"[$]$2" = xyes; then
83709885543Smrg    ifelse([$4], , :, [$4])
83809885543Smrgelse
83909885543Smrg    ifelse([$5], , :, [$5])
84009885543Smrgfi
84109885543Smrg])# AC_LIBTOOL_LINKER_OPTION
84209885543Smrg
84309885543Smrg
84409885543Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
84509885543Smrg# --------------------------
84609885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
84709885543Smrg[# find the maximum length of command line arguments
84809885543SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
84909885543SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
85009885543Smrg  i=0
85109885543Smrg  teststring="ABCD"
85209885543Smrg
85309885543Smrg  case $build_os in
85409885543Smrg  msdosdjgpp*)
85509885543Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
85609885543Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
85709885543Smrg    # during glob expansion).  Even if it were fixed, the result of this
85809885543Smrg    # check would be larger than it should be.
85909885543Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
86009885543Smrg    ;;
86109885543Smrg
86209885543Smrg  gnu*)
86309885543Smrg    # Under GNU Hurd, this test is not required because there is
86409885543Smrg    # no limit to the length of command line arguments.
86509885543Smrg    # Libtool will interpret -1 as no limit whatsoever
86609885543Smrg    lt_cv_sys_max_cmd_len=-1;
86709885543Smrg    ;;
86809885543Smrg
86909885543Smrg  cygwin* | mingw*)
87009885543Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
87109885543Smrg    # about 5 minutes as the teststring grows exponentially.
87209885543Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
87309885543Smrg    # you end up with a "frozen" computer, even though with patience
87409885543Smrg    # the test eventually succeeds (with a max line length of 256k).
87509885543Smrg    # Instead, let's just punt: use the minimum linelength reported by
87609885543Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
87709885543Smrg    lt_cv_sys_max_cmd_len=8192;
87809885543Smrg    ;;
87909885543Smrg
88009885543Smrg  amigaos*)
88109885543Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
88209885543Smrg    # So we just punt and use a minimum line length of 8192.
88309885543Smrg    lt_cv_sys_max_cmd_len=8192;
88409885543Smrg    ;;
88509885543Smrg
88609885543Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
88709885543Smrg    # This has been around since 386BSD, at least.  Likely further.
88809885543Smrg    if test -x /sbin/sysctl; then
88909885543Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
89009885543Smrg    elif test -x /usr/sbin/sysctl; then
89109885543Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
89209885543Smrg    else
89309885543Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
89409885543Smrg    fi
89509885543Smrg    # And add a safety zone
89609885543Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
89709885543Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
89809885543Smrg    ;;
89909885543Smrg
90009885543Smrg  interix*)
90109885543Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
90209885543Smrg    lt_cv_sys_max_cmd_len=196608
90309885543Smrg    ;;
90409885543Smrg
90509885543Smrg  osf*)
90609885543Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
90709885543Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
90809885543Smrg    # nice to cause kernel panics so lets avoid the loop below.
90909885543Smrg    # First set a reasonable default.
91009885543Smrg    lt_cv_sys_max_cmd_len=16384
91109885543Smrg    #
91209885543Smrg    if test -x /sbin/sysconfig; then
91309885543Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
91409885543Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
91509885543Smrg      esac
91609885543Smrg    fi
91709885543Smrg    ;;
91809885543Smrg  sco3.2v5*)
91909885543Smrg    lt_cv_sys_max_cmd_len=102400
92009885543Smrg    ;;
92109885543Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
92209885543Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
92309885543Smrg    if test -n "$kargmax"; then
92409885543Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
92509885543Smrg    else
92609885543Smrg      lt_cv_sys_max_cmd_len=32768
92709885543Smrg    fi
92809885543Smrg    ;;
92909885543Smrg  *)
9307104f784Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
9317104f784Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
9327104f784Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
9337104f784Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
9347104f784Smrg    else
9357104f784Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
9367104f784Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
93709885543Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
9387104f784Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
9397104f784Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
9407104f784Smrg	      test $i != 17 # 1/2 MB should be enough
9417104f784Smrg      do
9427104f784Smrg        i=`expr $i + 1`
9437104f784Smrg        teststring=$teststring$teststring
9447104f784Smrg      done
9457104f784Smrg      teststring=
9467104f784Smrg      # Add a significant safety factor because C++ compilers can tack on massive
9477104f784Smrg      # amounts of additional arguments before passing them to the linker.
9487104f784Smrg      # It appears as though 1/2 is a usable value.
9497104f784Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
9507104f784Smrg    fi
95109885543Smrg    ;;
95209885543Smrg  esac
95309885543Smrg])
95409885543Smrgif test -n $lt_cv_sys_max_cmd_len ; then
95509885543Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
95609885543Smrgelse
95709885543Smrg  AC_MSG_RESULT(none)
95809885543Smrgfi
95909885543Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
96009885543Smrg
96109885543Smrg
96209885543Smrg# _LT_AC_CHECK_DLFCN
96309885543Smrg# ------------------
96409885543SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
96509885543Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
96609885543Smrg])# _LT_AC_CHECK_DLFCN
96709885543Smrg
96809885543Smrg
96909885543Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
97009885543Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
97109885543Smrg# ---------------------------------------------------------------------
97209885543SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
97309885543Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
97409885543Smrgif test "$cross_compiling" = yes; then :
97509885543Smrg  [$4]
97609885543Smrgelse
97709885543Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
97809885543Smrg  lt_status=$lt_dlunknown
97909885543Smrg  cat > conftest.$ac_ext <<EOF
98009885543Smrg[#line __oline__ "configure"
98109885543Smrg#include "confdefs.h"
98209885543Smrg
98309885543Smrg#if HAVE_DLFCN_H
98409885543Smrg#include <dlfcn.h>
98509885543Smrg#endif
98609885543Smrg
98709885543Smrg#include <stdio.h>
98809885543Smrg
98909885543Smrg#ifdef RTLD_GLOBAL
99009885543Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
99109885543Smrg#else
99209885543Smrg#  ifdef DL_GLOBAL
99309885543Smrg#    define LT_DLGLOBAL		DL_GLOBAL
99409885543Smrg#  else
99509885543Smrg#    define LT_DLGLOBAL		0
99609885543Smrg#  endif
99709885543Smrg#endif
99809885543Smrg
99909885543Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
100009885543Smrg   find out it does not work in some platform. */
100109885543Smrg#ifndef LT_DLLAZY_OR_NOW
100209885543Smrg#  ifdef RTLD_LAZY
100309885543Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
100409885543Smrg#  else
100509885543Smrg#    ifdef DL_LAZY
100609885543Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
100709885543Smrg#    else
100809885543Smrg#      ifdef RTLD_NOW
100909885543Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
101009885543Smrg#      else
101109885543Smrg#        ifdef DL_NOW
101209885543Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
101309885543Smrg#        else
101409885543Smrg#          define LT_DLLAZY_OR_NOW	0
101509885543Smrg#        endif
101609885543Smrg#      endif
101709885543Smrg#    endif
101809885543Smrg#  endif
101909885543Smrg#endif
102009885543Smrg
102109885543Smrg#ifdef __cplusplus
102209885543Smrgextern "C" void exit (int);
102309885543Smrg#endif
102409885543Smrg
102509885543Smrgvoid fnord() { int i=42;}
102609885543Smrgint main ()
102709885543Smrg{
102809885543Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
102909885543Smrg  int status = $lt_dlunknown;
103009885543Smrg
103109885543Smrg  if (self)
103209885543Smrg    {
103309885543Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
103409885543Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
103509885543Smrg      /* dlclose (self); */
103609885543Smrg    }
103709885543Smrg  else
103809885543Smrg    puts (dlerror ());
103909885543Smrg
104009885543Smrg    exit (status);
104109885543Smrg}]
104209885543SmrgEOF
104309885543Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
104409885543Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
104509885543Smrg    lt_status=$?
104609885543Smrg    case x$lt_status in
104709885543Smrg      x$lt_dlno_uscore) $1 ;;
104809885543Smrg      x$lt_dlneed_uscore) $2 ;;
104909885543Smrg      x$lt_dlunknown|x*) $3 ;;
105009885543Smrg    esac
105109885543Smrg  else :
105209885543Smrg    # compilation failed
105309885543Smrg    $3
105409885543Smrg  fi
105509885543Smrgfi
105609885543Smrgrm -fr conftest*
105709885543Smrg])# _LT_AC_TRY_DLOPEN_SELF
105809885543Smrg
105909885543Smrg
106009885543Smrg# AC_LIBTOOL_DLOPEN_SELF
106109885543Smrg# ----------------------
106209885543SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
106309885543Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
106409885543Smrgif test "x$enable_dlopen" != xyes; then
106509885543Smrg  enable_dlopen=unknown
106609885543Smrg  enable_dlopen_self=unknown
106709885543Smrg  enable_dlopen_self_static=unknown
106809885543Smrgelse
106909885543Smrg  lt_cv_dlopen=no
107009885543Smrg  lt_cv_dlopen_libs=
107109885543Smrg
107209885543Smrg  case $host_os in
107309885543Smrg  beos*)
107409885543Smrg    lt_cv_dlopen="load_add_on"
107509885543Smrg    lt_cv_dlopen_libs=
107609885543Smrg    lt_cv_dlopen_self=yes
107709885543Smrg    ;;
107809885543Smrg
107909885543Smrg  mingw* | pw32*)
108009885543Smrg    lt_cv_dlopen="LoadLibrary"
108109885543Smrg    lt_cv_dlopen_libs=
108209885543Smrg   ;;
108309885543Smrg
108409885543Smrg  cygwin*)
108509885543Smrg    lt_cv_dlopen="dlopen"
108609885543Smrg    lt_cv_dlopen_libs=
108709885543Smrg   ;;
108809885543Smrg
108909885543Smrg  darwin*)
109009885543Smrg  # if libdl is installed we need to link against it
109109885543Smrg    AC_CHECK_LIB([dl], [dlopen],
109209885543Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
109309885543Smrg    lt_cv_dlopen="dyld"
109409885543Smrg    lt_cv_dlopen_libs=
109509885543Smrg    lt_cv_dlopen_self=yes
109609885543Smrg    ])
109709885543Smrg   ;;
109809885543Smrg
109909885543Smrg  *)
110009885543Smrg    AC_CHECK_FUNC([shl_load],
110109885543Smrg	  [lt_cv_dlopen="shl_load"],
110209885543Smrg      [AC_CHECK_LIB([dld], [shl_load],
11037104f784Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
110409885543Smrg	[AC_CHECK_FUNC([dlopen],
110509885543Smrg	      [lt_cv_dlopen="dlopen"],
110609885543Smrg	  [AC_CHECK_LIB([dl], [dlopen],
110709885543Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
110809885543Smrg	    [AC_CHECK_LIB([svld], [dlopen],
110909885543Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
111009885543Smrg	      [AC_CHECK_LIB([dld], [dld_link],
11117104f784Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
111209885543Smrg	      ])
111309885543Smrg	    ])
111409885543Smrg	  ])
111509885543Smrg	])
111609885543Smrg      ])
111709885543Smrg    ;;
111809885543Smrg  esac
111909885543Smrg
112009885543Smrg  if test "x$lt_cv_dlopen" != xno; then
112109885543Smrg    enable_dlopen=yes
112209885543Smrg  else
112309885543Smrg    enable_dlopen=no
112409885543Smrg  fi
112509885543Smrg
112609885543Smrg  case $lt_cv_dlopen in
112709885543Smrg  dlopen)
112809885543Smrg    save_CPPFLAGS="$CPPFLAGS"
112909885543Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
113009885543Smrg
113109885543Smrg    save_LDFLAGS="$LDFLAGS"
113209885543Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
113309885543Smrg
113409885543Smrg    save_LIBS="$LIBS"
113509885543Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
113609885543Smrg
113709885543Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
113809885543Smrg	  lt_cv_dlopen_self, [dnl
113909885543Smrg	  _LT_AC_TRY_DLOPEN_SELF(
114009885543Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
114109885543Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
114209885543Smrg    ])
114309885543Smrg
114409885543Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
114509885543Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
114609885543Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
114709885543Smrg    	  lt_cv_dlopen_self_static, [dnl
114809885543Smrg	  _LT_AC_TRY_DLOPEN_SELF(
114909885543Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
115009885543Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
115109885543Smrg      ])
115209885543Smrg    fi
115309885543Smrg
115409885543Smrg    CPPFLAGS="$save_CPPFLAGS"
115509885543Smrg    LDFLAGS="$save_LDFLAGS"
115609885543Smrg    LIBS="$save_LIBS"
115709885543Smrg    ;;
115809885543Smrg  esac
115909885543Smrg
116009885543Smrg  case $lt_cv_dlopen_self in
116109885543Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
116209885543Smrg  *) enable_dlopen_self=unknown ;;
116309885543Smrg  esac
116409885543Smrg
116509885543Smrg  case $lt_cv_dlopen_self_static in
116609885543Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
116709885543Smrg  *) enable_dlopen_self_static=unknown ;;
116809885543Smrg  esac
116909885543Smrgfi
117009885543Smrg])# AC_LIBTOOL_DLOPEN_SELF
117109885543Smrg
117209885543Smrg
117309885543Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
117409885543Smrg# ---------------------------------
117509885543Smrg# Check to see if options -c and -o are simultaneously supported by compiler
117609885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
11777104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
11787104f784SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
117909885543SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
118009885543Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
118109885543Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
118209885543Smrg   $rm -r conftest 2>/dev/null
118309885543Smrg   mkdir conftest
118409885543Smrg   cd conftest
118509885543Smrg   mkdir out
11867104f784Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
118709885543Smrg
118809885543Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
118909885543Smrg   # Insert the option either (1) after the last *FLAGS variable, or
119009885543Smrg   # (2) before a word containing "conftest.", or (3) at the end.
119109885543Smrg   # Note that $ac_compile itself does not contain backslashes and begins
119209885543Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
119309885543Smrg   lt_compile=`echo "$ac_compile" | $SED \
119409885543Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
119509885543Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
119609885543Smrg   -e 's:$: $lt_compiler_flag:'`
119709885543Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
119809885543Smrg   (eval "$lt_compile" 2>out/conftest.err)
119909885543Smrg   ac_status=$?
120009885543Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
120109885543Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
120209885543Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
120309885543Smrg   then
120409885543Smrg     # The compiler can only warn and ignore the option if not recognized
120509885543Smrg     # So say no if there are warnings
120609885543Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
120709885543Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
120809885543Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
120909885543Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
121009885543Smrg     fi
121109885543Smrg   fi
121209885543Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
121309885543Smrg   $rm conftest*
121409885543Smrg   # SGI C++ compiler will create directory out/ii_files/ for
121509885543Smrg   # template instantiation
121609885543Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
121709885543Smrg   $rm out/* && rmdir out
121809885543Smrg   cd ..
121909885543Smrg   rmdir conftest
122009885543Smrg   $rm conftest*
122109885543Smrg])
122209885543Smrg])# AC_LIBTOOL_PROG_CC_C_O
122309885543Smrg
122409885543Smrg
122509885543Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
122609885543Smrg# -----------------------------------------
122709885543Smrg# Check to see if we can do hard links to lock some files if needed
122809885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
122909885543Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
123009885543Smrg
123109885543Smrghard_links="nottested"
123209885543Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
123309885543Smrg  # do not overwrite the value of need_locks provided by the user
123409885543Smrg  AC_MSG_CHECKING([if we can lock with hard links])
123509885543Smrg  hard_links=yes
123609885543Smrg  $rm conftest*
123709885543Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
123809885543Smrg  touch conftest.a
123909885543Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
124009885543Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
124109885543Smrg  AC_MSG_RESULT([$hard_links])
124209885543Smrg  if test "$hard_links" = no; then
124309885543Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
124409885543Smrg    need_locks=warn
124509885543Smrg  fi
124609885543Smrgelse
124709885543Smrg  need_locks=no
124809885543Smrgfi
124909885543Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
125009885543Smrg
125109885543Smrg
125209885543Smrg# AC_LIBTOOL_OBJDIR
125309885543Smrg# -----------------
125409885543SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
125509885543Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
125609885543Smrg[rm -f .libs 2>/dev/null
125709885543Smrgmkdir .libs 2>/dev/null
125809885543Smrgif test -d .libs; then
125909885543Smrg  lt_cv_objdir=.libs
126009885543Smrgelse
126109885543Smrg  # MS-DOS does not allow filenames that begin with a dot.
126209885543Smrg  lt_cv_objdir=_libs
126309885543Smrgfi
126409885543Smrgrmdir .libs 2>/dev/null])
126509885543Smrgobjdir=$lt_cv_objdir
126609885543Smrg])# AC_LIBTOOL_OBJDIR
126709885543Smrg
126809885543Smrg
126909885543Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
127009885543Smrg# ----------------------------------------------
127109885543Smrg# Check hardcoding attributes.
127209885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
127309885543Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
127409885543Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
127509885543Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
127609885543Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
127709885543Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
127809885543Smrg
127909885543Smrg  # We can hardcode non-existant directories.
128009885543Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
128109885543Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
128209885543Smrg     # have to relink, otherwise we might link with an installed library
128309885543Smrg     # when we should be linking with a yet-to-be-installed one
128409885543Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
128509885543Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
128609885543Smrg    # Linking always hardcodes the temporary library directory.
128709885543Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
128809885543Smrg  else
128909885543Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
129009885543Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
129109885543Smrg  fi
129209885543Smrgelse
129309885543Smrg  # We cannot hardcode anything, or else we can only hardcode existing
129409885543Smrg  # directories.
129509885543Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
129609885543Smrgfi
129709885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
129809885543Smrg
129909885543Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
130009885543Smrg  # Fast installation is not supported
130109885543Smrg  enable_fast_install=no
130209885543Smrgelif test "$shlibpath_overrides_runpath" = yes ||
130309885543Smrg     test "$enable_shared" = no; then
130409885543Smrg  # Fast installation is not necessary
130509885543Smrg  enable_fast_install=needless
130609885543Smrgfi
130709885543Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
130809885543Smrg
130909885543Smrg
131009885543Smrg# AC_LIBTOOL_SYS_LIB_STRIP
131109885543Smrg# ------------------------
131209885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
131309885543Smrg[striplib=
131409885543Smrgold_striplib=
131509885543SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
131609885543Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
131709885543Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
131809885543Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
131909885543Smrg  AC_MSG_RESULT([yes])
132009885543Smrgelse
132109885543Smrg# FIXME - insert some real tests, host_os isn't really good enough
132209885543Smrg  case $host_os in
132309885543Smrg   darwin*)
132409885543Smrg       if test -n "$STRIP" ; then
132509885543Smrg         striplib="$STRIP -x"
13267104f784Smrg         old_striplib="$STRIP -S"
132709885543Smrg         AC_MSG_RESULT([yes])
132809885543Smrg       else
132909885543Smrg  AC_MSG_RESULT([no])
133009885543Smrgfi
133109885543Smrg       ;;
133209885543Smrg   *)
133309885543Smrg  AC_MSG_RESULT([no])
133409885543Smrg    ;;
133509885543Smrg  esac
133609885543Smrgfi
133709885543Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
133809885543Smrg
133909885543Smrg
134009885543Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
134109885543Smrg# -----------------------------
134209885543Smrg# PORTME Fill in your ld.so characteristics
134309885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
13447104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
13457104f784SmrgAC_MSG_CHECKING([dynamic linker characteristics])
134609885543Smrglibrary_names_spec=
134709885543Smrglibname_spec='lib$name'
134809885543Smrgsoname_spec=
134909885543Smrgshrext_cmds=".so"
135009885543Smrgpostinstall_cmds=
135109885543Smrgpostuninstall_cmds=
135209885543Smrgfinish_cmds=
135309885543Smrgfinish_eval=
135409885543Smrgshlibpath_var=
135509885543Smrgshlibpath_overrides_runpath=unknown
135609885543Smrgversion_type=none
135709885543Smrgdynamic_linker="$host_os ld.so"
135809885543Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
13597104f784Smrgm4_if($1,[],[
136009885543Smrgif test "$GCC" = yes; then
13617104f784Smrg  case $host_os in
13627104f784Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
13637104f784Smrg    *) lt_awk_arg="/^libraries:/" ;;
13647104f784Smrg  esac
13657104f784Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
13667104f784Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
136709885543Smrg    # if the path contains ";" then we assume it to be the separator
136809885543Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
136909885543Smrg    # assumed that no part of a normal pathname contains ";" but that should
137009885543Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
13717104f784Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
137209885543Smrg  else
13737104f784Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
137409885543Smrg  fi
13757104f784Smrg  # Ok, now we have the path, separated by spaces, we can step through it
13767104f784Smrg  # and add multilib dir if necessary.
13777104f784Smrg  lt_tmp_lt_search_path_spec=
13787104f784Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13797104f784Smrg  for lt_sys_path in $lt_search_path_spec; do
13807104f784Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
13817104f784Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
13827104f784Smrg    else
13837104f784Smrg      test -d "$lt_sys_path" && \
13847104f784Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13857104f784Smrg    fi
13867104f784Smrg  done
13877104f784Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
13887104f784SmrgBEGIN {RS=" "; FS="/|\n";} {
13897104f784Smrg  lt_foo="";
13907104f784Smrg  lt_count=0;
13917104f784Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
13927104f784Smrg    if ($lt_i != "" && $lt_i != ".") {
13937104f784Smrg      if ($lt_i == "..") {
13947104f784Smrg        lt_count++;
13957104f784Smrg      } else {
13967104f784Smrg        if (lt_count == 0) {
13977104f784Smrg          lt_foo="/" $lt_i lt_foo;
13987104f784Smrg        } else {
13997104f784Smrg          lt_count--;
14007104f784Smrg        }
14017104f784Smrg      }
14027104f784Smrg    }
14037104f784Smrg  }
14047104f784Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
14057104f784Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
14067104f784Smrg}'`
14077104f784Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
140809885543Smrgelse
140909885543Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
14107104f784Smrgfi])
141109885543Smrgneed_lib_prefix=unknown
141209885543Smrghardcode_into_libs=no
141309885543Smrg
141409885543Smrg# when you set need_version to no, make sure it does not cause -set_version
141509885543Smrg# flags to be left without arguments
141609885543Smrgneed_version=unknown
141709885543Smrg
141809885543Smrgcase $host_os in
141909885543Smrgaix3*)
142009885543Smrg  version_type=linux
142109885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
142209885543Smrg  shlibpath_var=LIBPATH
142309885543Smrg
142409885543Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
142509885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
142609885543Smrg  ;;
142709885543Smrg
14287104f784Smrgaix[[4-9]]*)
142909885543Smrg  version_type=linux
143009885543Smrg  need_lib_prefix=no
143109885543Smrg  need_version=no
143209885543Smrg  hardcode_into_libs=yes
143309885543Smrg  if test "$host_cpu" = ia64; then
143409885543Smrg    # AIX 5 supports IA64
143509885543Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
143609885543Smrg    shlibpath_var=LD_LIBRARY_PATH
143709885543Smrg  else
143809885543Smrg    # With GCC up to 2.95.x, collect2 would create an import file
143909885543Smrg    # for dependence libraries.  The import file would start with
144009885543Smrg    # the line `#! .'.  This would cause the generated library to
144109885543Smrg    # depend on `.', always an invalid library.  This was fixed in
144209885543Smrg    # development snapshots of GCC prior to 3.0.
144309885543Smrg    case $host_os in
144409885543Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
144509885543Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
144609885543Smrg	   echo ' yes '
144709885543Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
144809885543Smrg	:
144909885543Smrg      else
145009885543Smrg	can_build_shared=no
145109885543Smrg      fi
145209885543Smrg      ;;
145309885543Smrg    esac
145409885543Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
145509885543Smrg    # soname into executable. Probably we can add versioning support to
145609885543Smrg    # collect2, so additional links can be useful in future.
145709885543Smrg    if test "$aix_use_runtimelinking" = yes; then
145809885543Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
145909885543Smrg      # instead of lib<name>.a to let people know that these are not
146009885543Smrg      # typical AIX shared libraries.
146109885543Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
146209885543Smrg    else
146309885543Smrg      # We preserve .a as extension for shared libraries through AIX4.2
146409885543Smrg      # and later when we are not doing run time linking.
146509885543Smrg      library_names_spec='${libname}${release}.a $libname.a'
146609885543Smrg      soname_spec='${libname}${release}${shared_ext}$major'
146709885543Smrg    fi
146809885543Smrg    shlibpath_var=LIBPATH
146909885543Smrg  fi
147009885543Smrg  ;;
147109885543Smrg
147209885543Smrgamigaos*)
147309885543Smrg  library_names_spec='$libname.ixlibrary $libname.a'
147409885543Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
147509885543Smrg  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'
147609885543Smrg  ;;
147709885543Smrg
147809885543Smrgbeos*)
147909885543Smrg  library_names_spec='${libname}${shared_ext}'
148009885543Smrg  dynamic_linker="$host_os ld.so"
148109885543Smrg  shlibpath_var=LIBRARY_PATH
148209885543Smrg  ;;
148309885543Smrg
148409885543Smrgbsdi[[45]]*)
148509885543Smrg  version_type=linux
148609885543Smrg  need_version=no
148709885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
148809885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
148909885543Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
149009885543Smrg  shlibpath_var=LD_LIBRARY_PATH
149109885543Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
149209885543Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
149309885543Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
149409885543Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
149509885543Smrg  # libtool to hard-code these into programs
149609885543Smrg  ;;
149709885543Smrg
149809885543Smrgcygwin* | mingw* | pw32*)
149909885543Smrg  version_type=windows
150009885543Smrg  shrext_cmds=".dll"
150109885543Smrg  need_version=no
150209885543Smrg  need_lib_prefix=no
150309885543Smrg
150409885543Smrg  case $GCC,$host_os in
150509885543Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
150609885543Smrg    library_names_spec='$libname.dll.a'
150709885543Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
150809885543Smrg    postinstall_cmds='base_file=`basename \${file}`~
150909885543Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
151009885543Smrg      dldir=$destdir/`dirname \$dlpath`~
151109885543Smrg      test -d \$dldir || mkdir -p \$dldir~
151209885543Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
151309885543Smrg      chmod a+x \$dldir/$dlname'
151409885543Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
151509885543Smrg      dlpath=$dir/\$dldll~
151609885543Smrg       $rm \$dlpath'
151709885543Smrg    shlibpath_overrides_runpath=yes
151809885543Smrg
151909885543Smrg    case $host_os in
152009885543Smrg    cygwin*)
152109885543Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
152209885543Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
152309885543Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
152409885543Smrg      ;;
152509885543Smrg    mingw*)
152609885543Smrg      # MinGW DLLs use traditional 'lib' prefix
152709885543Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
152809885543Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
152909885543Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
153009885543Smrg        # It is most probably a Windows format PATH printed by
153109885543Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
153209885543Smrg        # path with ; separators, and with drive letters. We can handle the
153309885543Smrg        # drive letters (cygwin fileutils understands them), so leave them,
153409885543Smrg        # especially as we might pass files found there to a mingw objdump,
153509885543Smrg        # which wouldn't understand a cygwinified path. Ahh.
153609885543Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
153709885543Smrg      else
153809885543Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
153909885543Smrg      fi
154009885543Smrg      ;;
154109885543Smrg    pw32*)
154209885543Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
154309885543Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
154409885543Smrg      ;;
154509885543Smrg    esac
154609885543Smrg    ;;
154709885543Smrg
154809885543Smrg  *)
154909885543Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
155009885543Smrg    ;;
155109885543Smrg  esac
155209885543Smrg  dynamic_linker='Win32 ld.exe'
155309885543Smrg  # FIXME: first we should search . and the directory the executable is in
155409885543Smrg  shlibpath_var=PATH
155509885543Smrg  ;;
155609885543Smrg
155709885543Smrgdarwin* | rhapsody*)
155809885543Smrg  dynamic_linker="$host_os dyld"
155909885543Smrg  version_type=darwin
156009885543Smrg  need_lib_prefix=no
156109885543Smrg  need_version=no
156209885543Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
156309885543Smrg  soname_spec='${libname}${release}${major}$shared_ext'
156409885543Smrg  shlibpath_overrides_runpath=yes
156509885543Smrg  shlibpath_var=DYLD_LIBRARY_PATH
156609885543Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15677104f784Smrg  m4_if([$1], [],[
15687104f784Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
156909885543Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
157009885543Smrg  ;;
157109885543Smrg
157209885543Smrgdgux*)
157309885543Smrg  version_type=linux
157409885543Smrg  need_lib_prefix=no
157509885543Smrg  need_version=no
157609885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
157709885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
157809885543Smrg  shlibpath_var=LD_LIBRARY_PATH
157909885543Smrg  ;;
158009885543Smrg
158109885543Smrgfreebsd1*)
158209885543Smrg  dynamic_linker=no
158309885543Smrg  ;;
158409885543Smrg
158509885543Smrgfreebsd* | dragonfly*)
158609885543Smrg  # DragonFly does not have aout.  When/if they implement a new
158709885543Smrg  # versioning mechanism, adjust this.
158809885543Smrg  if test -x /usr/bin/objformat; then
158909885543Smrg    objformat=`/usr/bin/objformat`
159009885543Smrg  else
159109885543Smrg    case $host_os in
159209885543Smrg    freebsd[[123]]*) objformat=aout ;;
159309885543Smrg    *) objformat=elf ;;
159409885543Smrg    esac
159509885543Smrg  fi
15967104f784Smrg  # Handle Gentoo/FreeBSD as it was Linux
15977104f784Smrg  case $host_vendor in
15987104f784Smrg    gentoo)
15997104f784Smrg      version_type=linux ;;
16007104f784Smrg    *)
16017104f784Smrg      version_type=freebsd-$objformat ;;
16027104f784Smrg  esac
16037104f784Smrg
160409885543Smrg  case $version_type in
160509885543Smrg    freebsd-elf*)
160609885543Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
160709885543Smrg      need_version=no
160809885543Smrg      need_lib_prefix=no
160909885543Smrg      ;;
161009885543Smrg    freebsd-*)
161109885543Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
161209885543Smrg      need_version=yes
161309885543Smrg      ;;
16147104f784Smrg    linux)
16157104f784Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
16167104f784Smrg      soname_spec='${libname}${release}${shared_ext}$major'
16177104f784Smrg      need_lib_prefix=no
16187104f784Smrg      need_version=no
16197104f784Smrg      ;;
162009885543Smrg  esac
162109885543Smrg  shlibpath_var=LD_LIBRARY_PATH
162209885543Smrg  case $host_os in
162309885543Smrg  freebsd2*)
162409885543Smrg    shlibpath_overrides_runpath=yes
162509885543Smrg    ;;
162609885543Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
162709885543Smrg    shlibpath_overrides_runpath=yes
162809885543Smrg    hardcode_into_libs=yes
162909885543Smrg    ;;
163009885543Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
163109885543Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
163209885543Smrg    shlibpath_overrides_runpath=no
163309885543Smrg    hardcode_into_libs=yes
163409885543Smrg    ;;
16357104f784Smrg  *) # from 4.6 on, and DragonFly
163609885543Smrg    shlibpath_overrides_runpath=yes
163709885543Smrg    hardcode_into_libs=yes
163809885543Smrg    ;;
163909885543Smrg  esac
164009885543Smrg  ;;
164109885543Smrg
164209885543Smrggnu*)
164309885543Smrg  version_type=linux
164409885543Smrg  need_lib_prefix=no
164509885543Smrg  need_version=no
164609885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
164709885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
164809885543Smrg  shlibpath_var=LD_LIBRARY_PATH
164909885543Smrg  hardcode_into_libs=yes
165009885543Smrg  ;;
165109885543Smrg
165209885543Smrghpux9* | hpux10* | hpux11*)
165309885543Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
165409885543Smrg  # link against other versions.
165509885543Smrg  version_type=sunos
165609885543Smrg  need_lib_prefix=no
165709885543Smrg  need_version=no
165809885543Smrg  case $host_cpu in
165909885543Smrg  ia64*)
166009885543Smrg    shrext_cmds='.so'
166109885543Smrg    hardcode_into_libs=yes
166209885543Smrg    dynamic_linker="$host_os dld.so"
166309885543Smrg    shlibpath_var=LD_LIBRARY_PATH
166409885543Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
166509885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
166609885543Smrg    soname_spec='${libname}${release}${shared_ext}$major'
166709885543Smrg    if test "X$HPUX_IA64_MODE" = X32; then
166809885543Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
166909885543Smrg    else
167009885543Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
167109885543Smrg    fi
167209885543Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
167309885543Smrg    ;;
167409885543Smrg   hppa*64*)
167509885543Smrg     shrext_cmds='.sl'
167609885543Smrg     hardcode_into_libs=yes
167709885543Smrg     dynamic_linker="$host_os dld.sl"
167809885543Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
167909885543Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
168009885543Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
168109885543Smrg     soname_spec='${libname}${release}${shared_ext}$major'
168209885543Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
168309885543Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
168409885543Smrg     ;;
168509885543Smrg   *)
168609885543Smrg    shrext_cmds='.sl'
168709885543Smrg    dynamic_linker="$host_os dld.sl"
168809885543Smrg    shlibpath_var=SHLIB_PATH
168909885543Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
169009885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
169109885543Smrg    soname_spec='${libname}${release}${shared_ext}$major'
169209885543Smrg    ;;
169309885543Smrg  esac
169409885543Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
169509885543Smrg  postinstall_cmds='chmod 555 $lib'
169609885543Smrg  ;;
169709885543Smrg
16987104f784Smrginterix[[3-9]]*)
169909885543Smrg  version_type=linux
170009885543Smrg  need_lib_prefix=no
170109885543Smrg  need_version=no
170209885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
170309885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
170409885543Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
170509885543Smrg  shlibpath_var=LD_LIBRARY_PATH
170609885543Smrg  shlibpath_overrides_runpath=no
170709885543Smrg  hardcode_into_libs=yes
170809885543Smrg  ;;
170909885543Smrg
171009885543Smrgirix5* | irix6* | nonstopux*)
171109885543Smrg  case $host_os in
171209885543Smrg    nonstopux*) version_type=nonstopux ;;
171309885543Smrg    *)
171409885543Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
171509885543Smrg		version_type=linux
171609885543Smrg	else
171709885543Smrg		version_type=irix
171809885543Smrg	fi ;;
171909885543Smrg  esac
172009885543Smrg  need_lib_prefix=no
172109885543Smrg  need_version=no
172209885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
172309885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
172409885543Smrg  case $host_os in
172509885543Smrg  irix5* | nonstopux*)
172609885543Smrg    libsuff= shlibsuff=
172709885543Smrg    ;;
172809885543Smrg  *)
172909885543Smrg    case $LD in # libtool.m4 will add one of these switches to LD
173009885543Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
173109885543Smrg      libsuff= shlibsuff= libmagic=32-bit;;
173209885543Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
173309885543Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
173409885543Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
173509885543Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
173609885543Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
173709885543Smrg    esac
173809885543Smrg    ;;
173909885543Smrg  esac
174009885543Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
174109885543Smrg  shlibpath_overrides_runpath=no
174209885543Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
174309885543Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
174409885543Smrg  hardcode_into_libs=yes
174509885543Smrg  ;;
174609885543Smrg
174709885543Smrg# No shared lib support for Linux oldld, aout, or coff.
174809885543Smrglinux*oldld* | linux*aout* | linux*coff*)
174909885543Smrg  dynamic_linker=no
175009885543Smrg  ;;
175109885543Smrg
175209885543Smrg# This must be Linux ELF.
175309885543Smrglinux* | k*bsd*-gnu)
175409885543Smrg  version_type=linux
175509885543Smrg  need_lib_prefix=no
175609885543Smrg  need_version=no
175709885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
175809885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
175909885543Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
176009885543Smrg  shlibpath_var=LD_LIBRARY_PATH
176109885543Smrg  shlibpath_overrides_runpath=no
176209885543Smrg  # This implies no fast_install, which is unacceptable.
176309885543Smrg  # Some rework will be needed to allow for fast_install
176409885543Smrg  # before this can be enabled.
176509885543Smrg  hardcode_into_libs=yes
176609885543Smrg
176709885543Smrg  # Append ld.so.conf contents to the search path
176809885543Smrg  if test -f /etc/ld.so.conf; then
17697104f784Smrg    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' ' '`
177009885543Smrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
177109885543Smrg  fi
177209885543Smrg
177309885543Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
177409885543Smrg  # powerpc, because MkLinux only supported shared libraries with the
177509885543Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
177609885543Smrg  # most powerpc-linux boxes support dynamic linking these days and
177709885543Smrg  # people can always --disable-shared, the test was removed, and we
177809885543Smrg  # assume the GNU/Linux dynamic linker is in use.
177909885543Smrg  dynamic_linker='GNU/Linux ld.so'
178009885543Smrg  ;;
178109885543Smrg
178209885543Smrgnetbsd*)
178309885543Smrg  version_type=sunos
178409885543Smrg  need_lib_prefix=no
178509885543Smrg  need_version=no
178609885543Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
178709885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
178809885543Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
178909885543Smrg    dynamic_linker='NetBSD (a.out) ld.so'
179009885543Smrg  else
179109885543Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
179209885543Smrg    soname_spec='${libname}${release}${shared_ext}$major'
179309885543Smrg    dynamic_linker='NetBSD ld.elf_so'
179409885543Smrg  fi
179509885543Smrg  shlibpath_var=LD_LIBRARY_PATH
179609885543Smrg  shlibpath_overrides_runpath=yes
179709885543Smrg  hardcode_into_libs=yes
179809885543Smrg  ;;
179909885543Smrg
180009885543Smrgnewsos6)
180109885543Smrg  version_type=linux
180209885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
180309885543Smrg  shlibpath_var=LD_LIBRARY_PATH
180409885543Smrg  shlibpath_overrides_runpath=yes
180509885543Smrg  ;;
180609885543Smrg
180709885543Smrgnto-qnx*)
180809885543Smrg  version_type=linux
180909885543Smrg  need_lib_prefix=no
181009885543Smrg  need_version=no
181109885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
181209885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
181309885543Smrg  shlibpath_var=LD_LIBRARY_PATH
181409885543Smrg  shlibpath_overrides_runpath=yes
181509885543Smrg  ;;
181609885543Smrg
181709885543Smrgopenbsd*)
181809885543Smrg  version_type=sunos
181909885543Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
182009885543Smrg  need_lib_prefix=no
182109885543Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
182209885543Smrg  case $host_os in
182309885543Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
182409885543Smrg    *)                         need_version=no  ;;
182509885543Smrg  esac
182609885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
182709885543Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
182809885543Smrg  shlibpath_var=LD_LIBRARY_PATH
182909885543Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
183009885543Smrg    case $host_os in
183109885543Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
183209885543Smrg	shlibpath_overrides_runpath=no
183309885543Smrg	;;
183409885543Smrg      *)
183509885543Smrg	shlibpath_overrides_runpath=yes
183609885543Smrg	;;
183709885543Smrg      esac
183809885543Smrg  else
183909885543Smrg    shlibpath_overrides_runpath=yes
184009885543Smrg  fi
184109885543Smrg  ;;
184209885543Smrg
184309885543Smrgos2*)
184409885543Smrg  libname_spec='$name'
184509885543Smrg  shrext_cmds=".dll"
184609885543Smrg  need_lib_prefix=no
184709885543Smrg  library_names_spec='$libname${shared_ext} $libname.a'
184809885543Smrg  dynamic_linker='OS/2 ld.exe'
184909885543Smrg  shlibpath_var=LIBPATH
185009885543Smrg  ;;
185109885543Smrg
185209885543Smrgosf3* | osf4* | osf5*)
185309885543Smrg  version_type=osf
185409885543Smrg  need_lib_prefix=no
185509885543Smrg  need_version=no
185609885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
185709885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
185809885543Smrg  shlibpath_var=LD_LIBRARY_PATH
185909885543Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
186009885543Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
186109885543Smrg  ;;
186209885543Smrg
18637104f784Smrgrdos*)
18647104f784Smrg  dynamic_linker=no
18657104f784Smrg  ;;
18667104f784Smrg
186709885543Smrgsolaris*)
186809885543Smrg  version_type=linux
186909885543Smrg  need_lib_prefix=no
187009885543Smrg  need_version=no
187109885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
187209885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
187309885543Smrg  shlibpath_var=LD_LIBRARY_PATH
187409885543Smrg  shlibpath_overrides_runpath=yes
187509885543Smrg  hardcode_into_libs=yes
187609885543Smrg  # ldd complains unless libraries are executable
187709885543Smrg  postinstall_cmds='chmod +x $lib'
187809885543Smrg  ;;
187909885543Smrg
188009885543Smrgsunos4*)
188109885543Smrg  version_type=sunos
188209885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
188309885543Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
188409885543Smrg  shlibpath_var=LD_LIBRARY_PATH
188509885543Smrg  shlibpath_overrides_runpath=yes
188609885543Smrg  if test "$with_gnu_ld" = yes; then
188709885543Smrg    need_lib_prefix=no
188809885543Smrg  fi
188909885543Smrg  need_version=yes
189009885543Smrg  ;;
189109885543Smrg
189209885543Smrgsysv4 | sysv4.3*)
189309885543Smrg  version_type=linux
189409885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
189509885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
189609885543Smrg  shlibpath_var=LD_LIBRARY_PATH
189709885543Smrg  case $host_vendor in
189809885543Smrg    sni)
189909885543Smrg      shlibpath_overrides_runpath=no
190009885543Smrg      need_lib_prefix=no
190109885543Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
190209885543Smrg      runpath_var=LD_RUN_PATH
190309885543Smrg      ;;
190409885543Smrg    siemens)
190509885543Smrg      need_lib_prefix=no
190609885543Smrg      ;;
190709885543Smrg    motorola)
190809885543Smrg      need_lib_prefix=no
190909885543Smrg      need_version=no
191009885543Smrg      shlibpath_overrides_runpath=no
191109885543Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
191209885543Smrg      ;;
191309885543Smrg  esac
191409885543Smrg  ;;
191509885543Smrg
191609885543Smrgsysv4*MP*)
191709885543Smrg  if test -d /usr/nec ;then
191809885543Smrg    version_type=linux
191909885543Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
192009885543Smrg    soname_spec='$libname${shared_ext}.$major'
192109885543Smrg    shlibpath_var=LD_LIBRARY_PATH
192209885543Smrg  fi
192309885543Smrg  ;;
192409885543Smrg
192509885543Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
192609885543Smrg  version_type=freebsd-elf
192709885543Smrg  need_lib_prefix=no
192809885543Smrg  need_version=no
192909885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
193009885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
193109885543Smrg  shlibpath_var=LD_LIBRARY_PATH
193209885543Smrg  hardcode_into_libs=yes
193309885543Smrg  if test "$with_gnu_ld" = yes; then
193409885543Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
193509885543Smrg    shlibpath_overrides_runpath=no
193609885543Smrg  else
193709885543Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
193809885543Smrg    shlibpath_overrides_runpath=yes
193909885543Smrg    case $host_os in
194009885543Smrg      sco3.2v5*)
194109885543Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
194209885543Smrg	;;
194309885543Smrg    esac
194409885543Smrg  fi
194509885543Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
194609885543Smrg  ;;
194709885543Smrg
194809885543Smrguts4*)
194909885543Smrg  version_type=linux
195009885543Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
195109885543Smrg  soname_spec='${libname}${release}${shared_ext}$major'
195209885543Smrg  shlibpath_var=LD_LIBRARY_PATH
195309885543Smrg  ;;
195409885543Smrg
195509885543Smrg*)
195609885543Smrg  dynamic_linker=no
195709885543Smrg  ;;
195809885543Smrgesac
195909885543SmrgAC_MSG_RESULT([$dynamic_linker])
196009885543Smrgtest "$dynamic_linker" = no && can_build_shared=no
196109885543Smrg
19627104f784SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
19637104f784Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
19647104f784Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
19657104f784SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
19667104f784Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
19677104f784Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
19687104f784Smrg
196909885543Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
197009885543Smrgif test "$GCC" = yes; then
197109885543Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
197209885543Smrgfi
197309885543Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
197409885543Smrg
197509885543Smrg
197609885543Smrg# _LT_AC_TAGCONFIG
197709885543Smrg# ----------------
197809885543SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
19797104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
19807104f784SmrgAC_ARG_WITH([tags],
198109885543Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
198209885543Smrg        [include additional configurations @<:@automatic@:>@])],
198309885543Smrg    [tagnames="$withval"])
198409885543Smrg
198509885543Smrgif test -f "$ltmain" && test -n "$tagnames"; then
198609885543Smrg  if test ! -f "${ofile}"; then
198709885543Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
198809885543Smrg  fi
198909885543Smrg
199009885543Smrg  if test -z "$LTCC"; then
199109885543Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
199209885543Smrg    if test -z "$LTCC"; then
199309885543Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
199409885543Smrg    else
199509885543Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
199609885543Smrg    fi
199709885543Smrg  fi
199809885543Smrg  if test -z "$LTCFLAGS"; then
199909885543Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
200009885543Smrg  fi
200109885543Smrg
200209885543Smrg  # Extract list of available tagged configurations in $ofile.
200309885543Smrg  # Note that this assumes the entire list is on one line.
200409885543Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
200509885543Smrg
200609885543Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
200709885543Smrg  for tagname in $tagnames; do
200809885543Smrg    IFS="$lt_save_ifs"
200909885543Smrg    # Check whether tagname contains only valid characters
201009885543Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
201109885543Smrg    "") ;;
201209885543Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
201309885543Smrg	;;
201409885543Smrg    esac
201509885543Smrg
201609885543Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
201709885543Smrg    then
201809885543Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
201909885543Smrg    fi
202009885543Smrg
202109885543Smrg    # Update the list of available tags.
202209885543Smrg    if test -n "$tagname"; then
202309885543Smrg      echo appending configuration tag \"$tagname\" to $ofile
202409885543Smrg
202509885543Smrg      case $tagname in
202609885543Smrg      CXX)
202709885543Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
202809885543Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
202909885543Smrg	    (test "X$CXX" != "Xg++"))) ; then
203009885543Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
203109885543Smrg	else
203209885543Smrg	  tagname=""
203309885543Smrg	fi
203409885543Smrg	;;
203509885543Smrg
203609885543Smrg      F77)
203709885543Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
203809885543Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
203909885543Smrg	else
204009885543Smrg	  tagname=""
204109885543Smrg	fi
204209885543Smrg	;;
204309885543Smrg
204409885543Smrg      GCJ)
204509885543Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
204609885543Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
204709885543Smrg	else
204809885543Smrg	  tagname=""
204909885543Smrg	fi
205009885543Smrg	;;
205109885543Smrg
205209885543Smrg      RC)
205309885543Smrg	AC_LIBTOOL_LANG_RC_CONFIG
205409885543Smrg	;;
205509885543Smrg
205609885543Smrg      *)
205709885543Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
205809885543Smrg	;;
205909885543Smrg      esac
206009885543Smrg
206109885543Smrg      # Append the new tag name to the list of available tags.
206209885543Smrg      if test -n "$tagname" ; then
206309885543Smrg      available_tags="$available_tags $tagname"
206409885543Smrg    fi
206509885543Smrg    fi
206609885543Smrg  done
206709885543Smrg  IFS="$lt_save_ifs"
206809885543Smrg
206909885543Smrg  # Now substitute the updated list of available tags.
207009885543Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
207109885543Smrg    mv "${ofile}T" "$ofile"
207209885543Smrg    chmod +x "$ofile"
207309885543Smrg  else
207409885543Smrg    rm -f "${ofile}T"
207509885543Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
207609885543Smrg  fi
207709885543Smrgfi
207809885543Smrg])# _LT_AC_TAGCONFIG
207909885543Smrg
208009885543Smrg
208109885543Smrg# AC_LIBTOOL_DLOPEN
208209885543Smrg# -----------------
208309885543Smrg# enable checks for dlopen support
208409885543SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
208509885543Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
208609885543Smrg])# AC_LIBTOOL_DLOPEN
208709885543Smrg
208809885543Smrg
208909885543Smrg# AC_LIBTOOL_WIN32_DLL
209009885543Smrg# --------------------
209109885543Smrg# declare package support for building win32 DLLs
209209885543SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
209309885543Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
209409885543Smrg])# AC_LIBTOOL_WIN32_DLL
209509885543Smrg
209609885543Smrg
209709885543Smrg# AC_ENABLE_SHARED([DEFAULT])
209809885543Smrg# ---------------------------
209909885543Smrg# implement the --enable-shared flag
210009885543Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
210109885543SmrgAC_DEFUN([AC_ENABLE_SHARED],
210209885543Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
210309885543SmrgAC_ARG_ENABLE([shared],
210409885543Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
210509885543Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
210609885543Smrg    [p=${PACKAGE-default}
210709885543Smrg    case $enableval in
210809885543Smrg    yes) enable_shared=yes ;;
210909885543Smrg    no) enable_shared=no ;;
211009885543Smrg    *)
211109885543Smrg      enable_shared=no
211209885543Smrg      # Look at the argument we got.  We use all the common list separators.
211309885543Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
211409885543Smrg      for pkg in $enableval; do
211509885543Smrg	IFS="$lt_save_ifs"
211609885543Smrg	if test "X$pkg" = "X$p"; then
211709885543Smrg	  enable_shared=yes
211809885543Smrg	fi
211909885543Smrg      done
212009885543Smrg      IFS="$lt_save_ifs"
212109885543Smrg      ;;
212209885543Smrg    esac],
212309885543Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
212409885543Smrg])# AC_ENABLE_SHARED
212509885543Smrg
212609885543Smrg
212709885543Smrg# AC_DISABLE_SHARED
212809885543Smrg# -----------------
212909885543Smrg# set the default shared flag to --disable-shared
213009885543SmrgAC_DEFUN([AC_DISABLE_SHARED],
213109885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
213209885543SmrgAC_ENABLE_SHARED(no)
213309885543Smrg])# AC_DISABLE_SHARED
213409885543Smrg
213509885543Smrg
213609885543Smrg# AC_ENABLE_STATIC([DEFAULT])
213709885543Smrg# ---------------------------
213809885543Smrg# implement the --enable-static flag
213909885543Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
214009885543SmrgAC_DEFUN([AC_ENABLE_STATIC],
214109885543Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
214209885543SmrgAC_ARG_ENABLE([static],
214309885543Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
214409885543Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
214509885543Smrg    [p=${PACKAGE-default}
214609885543Smrg    case $enableval in
214709885543Smrg    yes) enable_static=yes ;;
214809885543Smrg    no) enable_static=no ;;
214909885543Smrg    *)
215009885543Smrg     enable_static=no
215109885543Smrg      # Look at the argument we got.  We use all the common list separators.
215209885543Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
215309885543Smrg      for pkg in $enableval; do
215409885543Smrg	IFS="$lt_save_ifs"
215509885543Smrg	if test "X$pkg" = "X$p"; then
215609885543Smrg	  enable_static=yes
215709885543Smrg	fi
215809885543Smrg      done
215909885543Smrg      IFS="$lt_save_ifs"
216009885543Smrg      ;;
216109885543Smrg    esac],
216209885543Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
216309885543Smrg])# AC_ENABLE_STATIC
216409885543Smrg
216509885543Smrg
216609885543Smrg# AC_DISABLE_STATIC
216709885543Smrg# -----------------
216809885543Smrg# set the default static flag to --disable-static
216909885543SmrgAC_DEFUN([AC_DISABLE_STATIC],
217009885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
217109885543SmrgAC_ENABLE_STATIC(no)
217209885543Smrg])# AC_DISABLE_STATIC
217309885543Smrg
217409885543Smrg
217509885543Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
217609885543Smrg# ---------------------------------
217709885543Smrg# implement the --enable-fast-install flag
217809885543Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
217909885543SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
218009885543Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
218109885543SmrgAC_ARG_ENABLE([fast-install],
218209885543Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
218309885543Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
218409885543Smrg    [p=${PACKAGE-default}
218509885543Smrg    case $enableval in
218609885543Smrg    yes) enable_fast_install=yes ;;
218709885543Smrg    no) enable_fast_install=no ;;
218809885543Smrg    *)
218909885543Smrg      enable_fast_install=no
219009885543Smrg      # Look at the argument we got.  We use all the common list separators.
219109885543Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
219209885543Smrg      for pkg in $enableval; do
219309885543Smrg	IFS="$lt_save_ifs"
219409885543Smrg	if test "X$pkg" = "X$p"; then
219509885543Smrg	  enable_fast_install=yes
219609885543Smrg	fi
219709885543Smrg      done
219809885543Smrg      IFS="$lt_save_ifs"
219909885543Smrg      ;;
220009885543Smrg    esac],
220109885543Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
220209885543Smrg])# AC_ENABLE_FAST_INSTALL
220309885543Smrg
220409885543Smrg
220509885543Smrg# AC_DISABLE_FAST_INSTALL
220609885543Smrg# -----------------------
220709885543Smrg# set the default to --disable-fast-install
220809885543SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
220909885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
221009885543SmrgAC_ENABLE_FAST_INSTALL(no)
221109885543Smrg])# AC_DISABLE_FAST_INSTALL
221209885543Smrg
221309885543Smrg
221409885543Smrg# AC_LIBTOOL_PICMODE([MODE])
221509885543Smrg# --------------------------
221609885543Smrg# implement the --with-pic flag
221709885543Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
221809885543SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
221909885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
222009885543Smrgpic_mode=ifelse($#,1,$1,default)
222109885543Smrg])# AC_LIBTOOL_PICMODE
222209885543Smrg
222309885543Smrg
222409885543Smrg# AC_PROG_EGREP
222509885543Smrg# -------------
222609885543Smrg# This is predefined starting with Autoconf 2.54, so this conditional
222709885543Smrg# definition can be removed once we require Autoconf 2.54 or later.
222809885543Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
222909885543Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
223009885543Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
223109885543Smrg    then ac_cv_prog_egrep='grep -E'
223209885543Smrg    else ac_cv_prog_egrep='egrep'
223309885543Smrg    fi])
223409885543Smrg EGREP=$ac_cv_prog_egrep
223509885543Smrg AC_SUBST([EGREP])
223609885543Smrg])])
223709885543Smrg
223809885543Smrg
223909885543Smrg# AC_PATH_TOOL_PREFIX
224009885543Smrg# -------------------
22417104f784Smrg# find a file program which can recognize shared library
224209885543SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
224309885543Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
224409885543SmrgAC_MSG_CHECKING([for $1])
224509885543SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
224609885543Smrg[case $MAGIC_CMD in
224709885543Smrg[[\\/*] |  ?:[\\/]*])
224809885543Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
224909885543Smrg  ;;
225009885543Smrg*)
225109885543Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
225209885543Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
225309885543Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
225409885543Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
225509885543Smrgdnl not every word.  This closes a longstanding sh security hole.
225609885543Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
225709885543Smrg  for ac_dir in $ac_dummy; do
225809885543Smrg    IFS="$lt_save_ifs"
225909885543Smrg    test -z "$ac_dir" && ac_dir=.
226009885543Smrg    if test -f $ac_dir/$1; then
226109885543Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
226209885543Smrg      if test -n "$file_magic_test_file"; then
226309885543Smrg	case $deplibs_check_method in
226409885543Smrg	"file_magic "*)
226509885543Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
226609885543Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
226709885543Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
226809885543Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
226909885543Smrg	    :
227009885543Smrg	  else
227109885543Smrg	    cat <<EOF 1>&2
227209885543Smrg
227309885543Smrg*** Warning: the command libtool uses to detect shared libraries,
227409885543Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
227509885543Smrg*** The result is that libtool may fail to recognize shared libraries
227609885543Smrg*** as such.  This will affect the creation of libtool libraries that
227709885543Smrg*** depend on shared libraries, but programs linked with such libtool
227809885543Smrg*** libraries will work regardless of this problem.  Nevertheless, you
227909885543Smrg*** may want to report the problem to your system manager and/or to
228009885543Smrg*** bug-libtool@gnu.org
228109885543Smrg
228209885543SmrgEOF
228309885543Smrg	  fi ;;
228409885543Smrg	esac
228509885543Smrg      fi
228609885543Smrg      break
228709885543Smrg    fi
228809885543Smrg  done
228909885543Smrg  IFS="$lt_save_ifs"
229009885543Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
229109885543Smrg  ;;
229209885543Smrgesac])
229309885543SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
229409885543Smrgif test -n "$MAGIC_CMD"; then
229509885543Smrg  AC_MSG_RESULT($MAGIC_CMD)
229609885543Smrgelse
229709885543Smrg  AC_MSG_RESULT(no)
229809885543Smrgfi
229909885543Smrg])# AC_PATH_TOOL_PREFIX
230009885543Smrg
230109885543Smrg
230209885543Smrg# AC_PATH_MAGIC
230309885543Smrg# -------------
23047104f784Smrg# find a file program which can recognize a shared library
230509885543SmrgAC_DEFUN([AC_PATH_MAGIC],
230609885543Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
230709885543Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
230809885543Smrg  if test -n "$ac_tool_prefix"; then
230909885543Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
231009885543Smrg  else
231109885543Smrg    MAGIC_CMD=:
231209885543Smrg  fi
231309885543Smrgfi
231409885543Smrg])# AC_PATH_MAGIC
231509885543Smrg
231609885543Smrg
231709885543Smrg# AC_PROG_LD
231809885543Smrg# ----------
231909885543Smrg# find the pathname to the GNU or non-GNU linker
232009885543SmrgAC_DEFUN([AC_PROG_LD],
232109885543Smrg[AC_ARG_WITH([gnu-ld],
232209885543Smrg    [AC_HELP_STRING([--with-gnu-ld],
232309885543Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
232409885543Smrg    [test "$withval" = no || with_gnu_ld=yes],
232509885543Smrg    [with_gnu_ld=no])
232609885543SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
232709885543SmrgAC_REQUIRE([AC_PROG_CC])dnl
232809885543SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
232909885543SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
233009885543Smrgac_prog=ld
233109885543Smrgif test "$GCC" = yes; then
233209885543Smrg  # Check if gcc -print-prog-name=ld gives a path.
233309885543Smrg  AC_MSG_CHECKING([for ld used by $CC])
233409885543Smrg  case $host in
233509885543Smrg  *-*-mingw*)
233609885543Smrg    # gcc leaves a trailing carriage return which upsets mingw
233709885543Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
233809885543Smrg  *)
233909885543Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
234009885543Smrg  esac
234109885543Smrg  case $ac_prog in
234209885543Smrg    # Accept absolute paths.
234309885543Smrg    [[\\/]]* | ?:[[\\/]]*)
234409885543Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
234509885543Smrg      # Canonicalize the pathname of ld
234609885543Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
234709885543Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
234809885543Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
234909885543Smrg      done
235009885543Smrg      test -z "$LD" && LD="$ac_prog"
235109885543Smrg      ;;
235209885543Smrg  "")
235309885543Smrg    # If it fails, then pretend we aren't using GCC.
235409885543Smrg    ac_prog=ld
235509885543Smrg    ;;
235609885543Smrg  *)
235709885543Smrg    # If it is relative, then search for the first ld in PATH.
235809885543Smrg    with_gnu_ld=unknown
235909885543Smrg    ;;
236009885543Smrg  esac
236109885543Smrgelif test "$with_gnu_ld" = yes; then
236209885543Smrg  AC_MSG_CHECKING([for GNU ld])
236309885543Smrgelse
236409885543Smrg  AC_MSG_CHECKING([for non-GNU ld])
236509885543Smrgfi
236609885543SmrgAC_CACHE_VAL(lt_cv_path_LD,
236709885543Smrg[if test -z "$LD"; then
236809885543Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
236909885543Smrg  for ac_dir in $PATH; do
237009885543Smrg    IFS="$lt_save_ifs"
237109885543Smrg    test -z "$ac_dir" && ac_dir=.
237209885543Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
237309885543Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
237409885543Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
237509885543Smrg      # but apparently some variants of GNU ld only accept -v.
237609885543Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
237709885543Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
237809885543Smrg      *GNU* | *'with BFD'*)
237909885543Smrg	test "$with_gnu_ld" != no && break
238009885543Smrg	;;
238109885543Smrg      *)
238209885543Smrg	test "$with_gnu_ld" != yes && break
238309885543Smrg	;;
238409885543Smrg      esac
238509885543Smrg    fi
238609885543Smrg  done
238709885543Smrg  IFS="$lt_save_ifs"
238809885543Smrgelse
238909885543Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
239009885543Smrgfi])
239109885543SmrgLD="$lt_cv_path_LD"
239209885543Smrgif test -n "$LD"; then
239309885543Smrg  AC_MSG_RESULT($LD)
239409885543Smrgelse
239509885543Smrg  AC_MSG_RESULT(no)
239609885543Smrgfi
239709885543Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
239809885543SmrgAC_PROG_LD_GNU
239909885543Smrg])# AC_PROG_LD
240009885543Smrg
240109885543Smrg
240209885543Smrg# AC_PROG_LD_GNU
240309885543Smrg# --------------
240409885543SmrgAC_DEFUN([AC_PROG_LD_GNU],
240509885543Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
240609885543SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
240709885543Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
240809885543Smrgcase `$LD -v 2>&1 </dev/null` in
240909885543Smrg*GNU* | *'with BFD'*)
241009885543Smrg  lt_cv_prog_gnu_ld=yes
241109885543Smrg  ;;
241209885543Smrg*)
241309885543Smrg  lt_cv_prog_gnu_ld=no
241409885543Smrg  ;;
241509885543Smrgesac])
241609885543Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
241709885543Smrg])# AC_PROG_LD_GNU
241809885543Smrg
241909885543Smrg
242009885543Smrg# AC_PROG_LD_RELOAD_FLAG
242109885543Smrg# ----------------------
242209885543Smrg# find reload flag for linker
242309885543Smrg#   -- PORTME Some linkers may need a different reload flag.
242409885543SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
242509885543Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
242609885543Smrg  lt_cv_ld_reload_flag,
242709885543Smrg  [lt_cv_ld_reload_flag='-r'])
242809885543Smrgreload_flag=$lt_cv_ld_reload_flag
242909885543Smrgcase $reload_flag in
243009885543Smrg"" | " "*) ;;
243109885543Smrg*) reload_flag=" $reload_flag" ;;
243209885543Smrgesac
243309885543Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
243409885543Smrgcase $host_os in
243509885543Smrg  darwin*)
243609885543Smrg    if test "$GCC" = yes; then
243709885543Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
243809885543Smrg    else
243909885543Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
244009885543Smrg    fi
244109885543Smrg    ;;
244209885543Smrgesac
244309885543Smrg])# AC_PROG_LD_RELOAD_FLAG
244409885543Smrg
244509885543Smrg
244609885543Smrg# AC_DEPLIBS_CHECK_METHOD
244709885543Smrg# -----------------------
244809885543Smrg# how to check for library dependencies
244909885543Smrg#  -- PORTME fill in with the dynamic library characteristics
245009885543SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
24517104f784Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
245209885543Smrglt_cv_deplibs_check_method,
245309885543Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
245409885543Smrglt_cv_file_magic_test_file=
245509885543Smrglt_cv_deplibs_check_method='unknown'
245609885543Smrg# Need to set the preceding variable on all platforms that support
245709885543Smrg# interlibrary dependencies.
245809885543Smrg# 'none' -- dependencies not supported.
245909885543Smrg# `unknown' -- same as none, but documents that we really don't know.
246009885543Smrg# 'pass_all' -- all dependencies passed with no checks.
246109885543Smrg# 'test_compile' -- check by making test program.
246209885543Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
246309885543Smrg# which responds to the $file_magic_cmd with a given extended regex.
246409885543Smrg# If you have `file' or equivalent on your system and you're not sure
246509885543Smrg# whether `pass_all' will *always* work, you probably want this one.
246609885543Smrg
246709885543Smrgcase $host_os in
24687104f784Smrgaix[[4-9]]*)
246909885543Smrg  lt_cv_deplibs_check_method=pass_all
247009885543Smrg  ;;
247109885543Smrg
247209885543Smrgbeos*)
247309885543Smrg  lt_cv_deplibs_check_method=pass_all
247409885543Smrg  ;;
247509885543Smrg
247609885543Smrgbsdi[[45]]*)
247709885543Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
247809885543Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
247909885543Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
248009885543Smrg  ;;
248109885543Smrg
248209885543Smrgcygwin*)
248309885543Smrg  # func_win32_libid is a shell function defined in ltmain.sh
248409885543Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
248509885543Smrg  lt_cv_file_magic_cmd='func_win32_libid'
248609885543Smrg  ;;
248709885543Smrg
248809885543Smrgmingw* | pw32*)
248909885543Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
24907104f784Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
24917104f784Smrg  # unless we find 'file', for example because we are cross-compiling.
24927104f784Smrg  if ( file / ) >/dev/null 2>&1; then
24937104f784Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
24947104f784Smrg    lt_cv_file_magic_cmd='func_win32_libid'
24957104f784Smrg  else
24967104f784Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
24977104f784Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
24987104f784Smrg  fi
249909885543Smrg  ;;
250009885543Smrg
250109885543Smrgdarwin* | rhapsody*)
250209885543Smrg  lt_cv_deplibs_check_method=pass_all
250309885543Smrg  ;;
250409885543Smrg
250509885543Smrgfreebsd* | dragonfly*)
250609885543Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
250709885543Smrg    case $host_cpu in
250809885543Smrg    i*86 )
250909885543Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
251009885543Smrg      # Let's accept both of them until this is cleared up.
251109885543Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
251209885543Smrg      lt_cv_file_magic_cmd=/usr/bin/file
251309885543Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
251409885543Smrg      ;;
251509885543Smrg    esac
251609885543Smrg  else
251709885543Smrg    lt_cv_deplibs_check_method=pass_all
251809885543Smrg  fi
251909885543Smrg  ;;
252009885543Smrg
252109885543Smrggnu*)
252209885543Smrg  lt_cv_deplibs_check_method=pass_all
252309885543Smrg  ;;
252409885543Smrg
252509885543Smrghpux10.20* | hpux11*)
252609885543Smrg  lt_cv_file_magic_cmd=/usr/bin/file
252709885543Smrg  case $host_cpu in
252809885543Smrg  ia64*)
252909885543Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
253009885543Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
253109885543Smrg    ;;
253209885543Smrg  hppa*64*)
253309885543Smrg    [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]']
253409885543Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
253509885543Smrg    ;;
253609885543Smrg  *)
253709885543Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
253809885543Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
253909885543Smrg    ;;
254009885543Smrg  esac
254109885543Smrg  ;;
254209885543Smrg
25437104f784Smrginterix[[3-9]]*)
254409885543Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
254509885543Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
254609885543Smrg  ;;
254709885543Smrg
254809885543Smrgirix5* | irix6* | nonstopux*)
254909885543Smrg  case $LD in
255009885543Smrg  *-32|*"-32 ") libmagic=32-bit;;
255109885543Smrg  *-n32|*"-n32 ") libmagic=N32;;
255209885543Smrg  *-64|*"-64 ") libmagic=64-bit;;
255309885543Smrg  *) libmagic=never-match;;
255409885543Smrg  esac
255509885543Smrg  lt_cv_deplibs_check_method=pass_all
255609885543Smrg  ;;
255709885543Smrg
255809885543Smrg# This must be Linux ELF.
255909885543Smrglinux* | k*bsd*-gnu)
256009885543Smrg  lt_cv_deplibs_check_method=pass_all
256109885543Smrg  ;;
256209885543Smrg
25637104f784Smrgnetbsd*)
256409885543Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
256509885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
256609885543Smrg  else
256709885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
256809885543Smrg  fi
256909885543Smrg  ;;
257009885543Smrg
257109885543Smrgnewos6*)
257209885543Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
257309885543Smrg  lt_cv_file_magic_cmd=/usr/bin/file
257409885543Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
257509885543Smrg  ;;
257609885543Smrg
257709885543Smrgnto-qnx*)
257809885543Smrg  lt_cv_deplibs_check_method=unknown
257909885543Smrg  ;;
258009885543Smrg
258109885543Smrgopenbsd*)
258209885543Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
258309885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
258409885543Smrg  else
258509885543Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
258609885543Smrg  fi
258709885543Smrg  ;;
258809885543Smrg
258909885543Smrgosf3* | osf4* | osf5*)
259009885543Smrg  lt_cv_deplibs_check_method=pass_all
259109885543Smrg  ;;
259209885543Smrg
25937104f784Smrgrdos*)
25947104f784Smrg  lt_cv_deplibs_check_method=pass_all
25957104f784Smrg  ;;
25967104f784Smrg
259709885543Smrgsolaris*)
259809885543Smrg  lt_cv_deplibs_check_method=pass_all
259909885543Smrg  ;;
260009885543Smrg
260109885543Smrgsysv4 | sysv4.3*)
260209885543Smrg  case $host_vendor in
260309885543Smrg  motorola)
260409885543Smrg    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]]'
260509885543Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
260609885543Smrg    ;;
260709885543Smrg  ncr)
260809885543Smrg    lt_cv_deplibs_check_method=pass_all
260909885543Smrg    ;;
261009885543Smrg  sequent)
261109885543Smrg    lt_cv_file_magic_cmd='/bin/file'
261209885543Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
261309885543Smrg    ;;
261409885543Smrg  sni)
261509885543Smrg    lt_cv_file_magic_cmd='/bin/file'
261609885543Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
261709885543Smrg    lt_cv_file_magic_test_file=/lib/libc.so
261809885543Smrg    ;;
261909885543Smrg  siemens)
262009885543Smrg    lt_cv_deplibs_check_method=pass_all
262109885543Smrg    ;;
262209885543Smrg  pc)
262309885543Smrg    lt_cv_deplibs_check_method=pass_all
262409885543Smrg    ;;
262509885543Smrg  esac
262609885543Smrg  ;;
262709885543Smrg
262809885543Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
262909885543Smrg  lt_cv_deplibs_check_method=pass_all
263009885543Smrg  ;;
263109885543Smrgesac
263209885543Smrg])
263309885543Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
263409885543Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
263509885543Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
263609885543Smrg])# AC_DEPLIBS_CHECK_METHOD
263709885543Smrg
263809885543Smrg
263909885543Smrg# AC_PROG_NM
264009885543Smrg# ----------
264109885543Smrg# find the pathname to a BSD-compatible name lister
264209885543SmrgAC_DEFUN([AC_PROG_NM],
264309885543Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
264409885543Smrg[if test -n "$NM"; then
264509885543Smrg  # Let the user override the test.
264609885543Smrg  lt_cv_path_NM="$NM"
264709885543Smrgelse
264809885543Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
26497104f784Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
265009885543Smrg    lt_nm_to_check="$lt_nm_to_check nm"
265109885543Smrg  fi
265209885543Smrg  for lt_tmp_nm in $lt_nm_to_check; do
265309885543Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
265409885543Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
265509885543Smrg      IFS="$lt_save_ifs"
265609885543Smrg      test -z "$ac_dir" && ac_dir=.
265709885543Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
265809885543Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
265909885543Smrg	# Check to see if the nm accepts a BSD-compat flag.
266009885543Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
266109885543Smrg	#   nm: unknown option "B" ignored
266209885543Smrg	# Tru64's nm complains that /dev/null is an invalid object file
266309885543Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
266409885543Smrg	*/dev/null* | *'Invalid file or object type'*)
266509885543Smrg	  lt_cv_path_NM="$tmp_nm -B"
266609885543Smrg	  break
266709885543Smrg	  ;;
266809885543Smrg	*)
266909885543Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
267009885543Smrg	  */dev/null*)
267109885543Smrg	    lt_cv_path_NM="$tmp_nm -p"
267209885543Smrg	    break
267309885543Smrg	    ;;
267409885543Smrg	  *)
267509885543Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
267609885543Smrg	    continue # so that we can try to find one that supports BSD flags
267709885543Smrg	    ;;
267809885543Smrg	  esac
267909885543Smrg	  ;;
268009885543Smrg	esac
268109885543Smrg      fi
268209885543Smrg    done
268309885543Smrg    IFS="$lt_save_ifs"
268409885543Smrg  done
268509885543Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
268609885543Smrgfi])
268709885543SmrgNM="$lt_cv_path_NM"
268809885543Smrg])# AC_PROG_NM
268909885543Smrg
269009885543Smrg
269109885543Smrg# AC_CHECK_LIBM
269209885543Smrg# -------------
269309885543Smrg# check for math library
269409885543SmrgAC_DEFUN([AC_CHECK_LIBM],
269509885543Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
269609885543SmrgLIBM=
269709885543Smrgcase $host in
269809885543Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
269909885543Smrg  # These system don't have libm, or don't need it
270009885543Smrg  ;;
270109885543Smrg*-ncr-sysv4.3*)
270209885543Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
270309885543Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
270409885543Smrg  ;;
270509885543Smrg*)
270609885543Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
270709885543Smrg  ;;
270809885543Smrgesac
270909885543Smrg])# AC_CHECK_LIBM
271009885543Smrg
271109885543Smrg
271209885543Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
271309885543Smrg# -----------------------------------
271409885543Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
271509885543Smrg# LTDLINCL to the include flags for the libltdl header and adds
271609885543Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
271709885543Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
271809885543Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
271909885543Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
272009885543Smrg# (note the single quotes!).  If your package is not flat and you're not
272109885543Smrg# using automake, define top_builddir and top_srcdir appropriately in
272209885543Smrg# the Makefiles.
272309885543SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
272409885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
272509885543Smrg  case $enable_ltdl_convenience in
272609885543Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
272709885543Smrg  "") enable_ltdl_convenience=yes
272809885543Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
272909885543Smrg  esac
273009885543Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
273109885543Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
273209885543Smrg  # For backwards non-gettext consistent compatibility...
273309885543Smrg  INCLTDL="$LTDLINCL"
273409885543Smrg])# AC_LIBLTDL_CONVENIENCE
273509885543Smrg
273609885543Smrg
273709885543Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
273809885543Smrg# -----------------------------------
273909885543Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
274009885543Smrg# LTDLINCL to the include flags for the libltdl header and adds
274109885543Smrg# --enable-ltdl-install to the configure arguments.  Note that
274209885543Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
274309885543Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
274409885543Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
274509885543Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
274609885543Smrg# flat and you're not using automake, define top_builddir and top_srcdir
274709885543Smrg# appropriately in the Makefiles.
274809885543Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
274909885543SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
275009885543Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
275109885543Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
275209885543Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
275309885543Smrg  [if test x"$enable_ltdl_install" = xno; then
275409885543Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
275509885543Smrg   else
275609885543Smrg     enable_ltdl_install=yes
275709885543Smrg   fi
275809885543Smrg  ])
275909885543Smrg  if test x"$enable_ltdl_install" = x"yes"; then
276009885543Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
276109885543Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
276209885543Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
276309885543Smrg  else
276409885543Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
276509885543Smrg    LIBLTDL="-lltdl"
276609885543Smrg    LTDLINCL=
276709885543Smrg  fi
276809885543Smrg  # For backwards non-gettext consistent compatibility...
276909885543Smrg  INCLTDL="$LTDLINCL"
277009885543Smrg])# AC_LIBLTDL_INSTALLABLE
277109885543Smrg
277209885543Smrg
277309885543Smrg# AC_LIBTOOL_CXX
277409885543Smrg# --------------
277509885543Smrg# enable support for C++ libraries
277609885543SmrgAC_DEFUN([AC_LIBTOOL_CXX],
277709885543Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
277809885543Smrg])# AC_LIBTOOL_CXX
277909885543Smrg
278009885543Smrg
278109885543Smrg# _LT_AC_LANG_CXX
278209885543Smrg# ---------------
278309885543SmrgAC_DEFUN([_LT_AC_LANG_CXX],
278409885543Smrg[AC_REQUIRE([AC_PROG_CXX])
278509885543SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
278609885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
278709885543Smrg])# _LT_AC_LANG_CXX
278809885543Smrg
278909885543Smrg# _LT_AC_PROG_CXXCPP
279009885543Smrg# ------------------
279109885543SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
279209885543Smrg[
279309885543SmrgAC_REQUIRE([AC_PROG_CXX])
279409885543Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
279509885543Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
279609885543Smrg    (test "X$CXX" != "Xg++"))) ; then
279709885543Smrg  AC_PROG_CXXCPP
279809885543Smrgfi
279909885543Smrg])# _LT_AC_PROG_CXXCPP
280009885543Smrg
280109885543Smrg# AC_LIBTOOL_F77
280209885543Smrg# --------------
280309885543Smrg# enable support for Fortran 77 libraries
280409885543SmrgAC_DEFUN([AC_LIBTOOL_F77],
280509885543Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
280609885543Smrg])# AC_LIBTOOL_F77
280709885543Smrg
280809885543Smrg
280909885543Smrg# _LT_AC_LANG_F77
281009885543Smrg# ---------------
281109885543SmrgAC_DEFUN([_LT_AC_LANG_F77],
281209885543Smrg[AC_REQUIRE([AC_PROG_F77])
281309885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
281409885543Smrg])# _LT_AC_LANG_F77
281509885543Smrg
281609885543Smrg
281709885543Smrg# AC_LIBTOOL_GCJ
281809885543Smrg# --------------
281909885543Smrg# enable support for GCJ libraries
282009885543SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
282109885543Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
282209885543Smrg])# AC_LIBTOOL_GCJ
282309885543Smrg
282409885543Smrg
282509885543Smrg# _LT_AC_LANG_GCJ
282609885543Smrg# ---------------
282709885543SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
282809885543Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
282909885543Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
283009885543Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
283109885543Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
283209885543Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
283309885543Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
283409885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
283509885543Smrg])# _LT_AC_LANG_GCJ
283609885543Smrg
283709885543Smrg
283809885543Smrg# AC_LIBTOOL_RC
283909885543Smrg# -------------
284009885543Smrg# enable support for Windows resource files
284109885543SmrgAC_DEFUN([AC_LIBTOOL_RC],
284209885543Smrg[AC_REQUIRE([LT_AC_PROG_RC])
284309885543Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
284409885543Smrg])# AC_LIBTOOL_RC
284509885543Smrg
284609885543Smrg
284709885543Smrg# AC_LIBTOOL_LANG_C_CONFIG
284809885543Smrg# ------------------------
284909885543Smrg# Ensure that the configuration vars for the C compiler are
285009885543Smrg# suitably defined.  Those variables are subsequently used by
285109885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
285209885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
285309885543SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
285409885543Smrg[lt_save_CC="$CC"
285509885543SmrgAC_LANG_PUSH(C)
285609885543Smrg
285709885543Smrg# Source file extension for C test sources.
285809885543Smrgac_ext=c
285909885543Smrg
286009885543Smrg# Object file extension for compiled C test sources.
286109885543Smrgobjext=o
286209885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext
286309885543Smrg
286409885543Smrg# Code to be used in simple compile tests
28657104f784Smrglt_simple_compile_test_code="int some_variable = 0;"
286609885543Smrg
286709885543Smrg# Code to be used in simple link tests
28687104f784Smrglt_simple_link_test_code='int main(){return(0);}'
286909885543Smrg
287009885543Smrg_LT_AC_SYS_COMPILER
287109885543Smrg
287209885543Smrg# save warnings/boilerplate of simple test code
287309885543Smrg_LT_COMPILER_BOILERPLATE
287409885543Smrg_LT_LINKER_BOILERPLATE
287509885543Smrg
287609885543SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
287709885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
287809885543SmrgAC_LIBTOOL_PROG_CC_C_O($1)
287909885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
288009885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
288109885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
288209885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
288309885543SmrgAC_LIBTOOL_SYS_LIB_STRIP
288409885543SmrgAC_LIBTOOL_DLOPEN_SELF
288509885543Smrg
288609885543Smrg# Report which library types will actually be built
288709885543SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
288809885543SmrgAC_MSG_RESULT([$can_build_shared])
288909885543Smrg
289009885543SmrgAC_MSG_CHECKING([whether to build shared libraries])
289109885543Smrgtest "$can_build_shared" = "no" && enable_shared=no
289209885543Smrg
289309885543Smrg# On AIX, shared libraries and static libraries use the same namespace, and
289409885543Smrg# are all built from PIC.
289509885543Smrgcase $host_os in
289609885543Smrgaix3*)
289709885543Smrg  test "$enable_shared" = yes && enable_static=no
289809885543Smrg  if test -n "$RANLIB"; then
289909885543Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
290009885543Smrg    postinstall_cmds='$RANLIB $lib'
290109885543Smrg  fi
290209885543Smrg  ;;
290309885543Smrg
29047104f784Smrgaix[[4-9]]*)
290509885543Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
290609885543Smrg    test "$enable_shared" = yes && enable_static=no
290709885543Smrg  fi
290809885543Smrg    ;;
290909885543Smrgesac
291009885543SmrgAC_MSG_RESULT([$enable_shared])
291109885543Smrg
291209885543SmrgAC_MSG_CHECKING([whether to build static libraries])
291309885543Smrg# Make sure either enable_shared or enable_static is yes.
291409885543Smrgtest "$enable_shared" = yes || enable_static=yes
291509885543SmrgAC_MSG_RESULT([$enable_static])
291609885543Smrg
291709885543SmrgAC_LIBTOOL_CONFIG($1)
291809885543Smrg
291909885543SmrgAC_LANG_POP
292009885543SmrgCC="$lt_save_CC"
292109885543Smrg])# AC_LIBTOOL_LANG_C_CONFIG
292209885543Smrg
292309885543Smrg
292409885543Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
292509885543Smrg# --------------------------
292609885543Smrg# Ensure that the configuration vars for the C compiler are
292709885543Smrg# suitably defined.  Those variables are subsequently used by
292809885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
292909885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
293009885543SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
293109885543Smrg[AC_LANG_PUSH(C++)
293209885543SmrgAC_REQUIRE([AC_PROG_CXX])
293309885543SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
293409885543Smrg
293509885543Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
293609885543Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
293709885543Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
293809885543Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
293909885543Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
294009885543Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
294109885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
294209885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
294309885543Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
294409885543Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
294509885543Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
294609885543Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
294709885543Smrg_LT_AC_TAGVAR(module_cmds, $1)=
294809885543Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
294909885543Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
295009885543Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
295109885543Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
295209885543Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
295309885543Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
295409885543Smrg
295509885543Smrg# Dependencies to place before and after the object being linked:
295609885543Smrg_LT_AC_TAGVAR(predep_objects, $1)=
295709885543Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
295809885543Smrg_LT_AC_TAGVAR(predeps, $1)=
295909885543Smrg_LT_AC_TAGVAR(postdeps, $1)=
296009885543Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
29617104f784Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
296209885543Smrg
296309885543Smrg# Source file extension for C++ test sources.
296409885543Smrgac_ext=cpp
296509885543Smrg
296609885543Smrg# Object file extension for compiled C++ test sources.
296709885543Smrgobjext=o
296809885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext
296909885543Smrg
297009885543Smrg# Code to be used in simple compile tests
29717104f784Smrglt_simple_compile_test_code="int some_variable = 0;"
297209885543Smrg
297309885543Smrg# Code to be used in simple link tests
29747104f784Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
297509885543Smrg
297609885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
297709885543Smrg_LT_AC_SYS_COMPILER
297809885543Smrg
297909885543Smrg# save warnings/boilerplate of simple test code
298009885543Smrg_LT_COMPILER_BOILERPLATE
298109885543Smrg_LT_LINKER_BOILERPLATE
298209885543Smrg
298309885543Smrg# Allow CC to be a program name with arguments.
298409885543Smrglt_save_CC=$CC
298509885543Smrglt_save_LD=$LD
298609885543Smrglt_save_GCC=$GCC
298709885543SmrgGCC=$GXX
298809885543Smrglt_save_with_gnu_ld=$with_gnu_ld
298909885543Smrglt_save_path_LD=$lt_cv_path_LD
299009885543Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
299109885543Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
299209885543Smrgelse
299309885543Smrg  $as_unset lt_cv_prog_gnu_ld
299409885543Smrgfi
299509885543Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
299609885543Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
299709885543Smrgelse
299809885543Smrg  $as_unset lt_cv_path_LD
299909885543Smrgfi
300009885543Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
300109885543SmrgCC=${CXX-"c++"}
300209885543Smrgcompiler=$CC
300309885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
300409885543Smrg_LT_CC_BASENAME([$compiler])
300509885543Smrg
300609885543Smrg# We don't want -fno-exception wen compiling C++ code, so set the
300709885543Smrg# no_builtin_flag separately
300809885543Smrgif test "$GXX" = yes; then
300909885543Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
301009885543Smrgelse
301109885543Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
301209885543Smrgfi
301309885543Smrg
301409885543Smrgif test "$GXX" = yes; then
301509885543Smrg  # Set up default GNU C++ configuration
301609885543Smrg
301709885543Smrg  AC_PROG_LD
301809885543Smrg
301909885543Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
302009885543Smrg  # archiving commands below assume that GNU ld is being used.
302109885543Smrg  if test "$with_gnu_ld" = yes; then
302209885543Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
302309885543Smrg    _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'
302409885543Smrg
302509885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
302609885543Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
302709885543Smrg
302809885543Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
302909885543Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
303009885543Smrg    #     investigate it a little bit more. (MM)
303109885543Smrg    wlarc='${wl}'
303209885543Smrg
303309885543Smrg    # ancient GNU ld didn't support --whole-archive et. al.
303409885543Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
303509885543Smrg	grep 'no-whole-archive' > /dev/null; then
303609885543Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
303709885543Smrg    else
303809885543Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
303909885543Smrg    fi
304009885543Smrg  else
304109885543Smrg    with_gnu_ld=no
304209885543Smrg    wlarc=
304309885543Smrg
304409885543Smrg    # A generic and very simple default shared library creation
304509885543Smrg    # command for GNU C++ for the case where it uses the native
304609885543Smrg    # linker, instead of GNU ld.  If possible, this setting should
304709885543Smrg    # overridden to take advantage of the native linker features on
304809885543Smrg    # the platform it is being used on.
304909885543Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
305009885543Smrg  fi
305109885543Smrg
305209885543Smrg  # Commands to make compiler produce verbose output that lists
305309885543Smrg  # what "hidden" libraries, object files and flags are used when
305409885543Smrg  # linking a shared library.
305509885543Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
305609885543Smrg
305709885543Smrgelse
305809885543Smrg  GXX=no
305909885543Smrg  with_gnu_ld=no
306009885543Smrg  wlarc=
306109885543Smrgfi
306209885543Smrg
306309885543Smrg# PORTME: fill in a description of your system's C++ link characteristics
306409885543SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
306509885543Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
306609885543Smrgcase $host_os in
306709885543Smrg  aix3*)
306809885543Smrg    # FIXME: insert proper C++ library support
306909885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
307009885543Smrg    ;;
30717104f784Smrg  aix[[4-9]]*)
307209885543Smrg    if test "$host_cpu" = ia64; then
307309885543Smrg      # On IA64, the linker does run time linking by default, so we don't
307409885543Smrg      # have to do anything special.
307509885543Smrg      aix_use_runtimelinking=no
307609885543Smrg      exp_sym_flag='-Bexport'
307709885543Smrg      no_entry_flag=""
307809885543Smrg    else
307909885543Smrg      aix_use_runtimelinking=no
308009885543Smrg
308109885543Smrg      # Test if we are trying to use run time linking or normal
308209885543Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
308309885543Smrg      # need to do runtime linking.
30847104f784Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
308509885543Smrg	for ld_flag in $LDFLAGS; do
308609885543Smrg	  case $ld_flag in
308709885543Smrg	  *-brtl*)
308809885543Smrg	    aix_use_runtimelinking=yes
308909885543Smrg	    break
309009885543Smrg	    ;;
309109885543Smrg	  esac
309209885543Smrg	done
309309885543Smrg	;;
309409885543Smrg      esac
309509885543Smrg
309609885543Smrg      exp_sym_flag='-bexport'
309709885543Smrg      no_entry_flag='-bnoentry'
309809885543Smrg    fi
309909885543Smrg
310009885543Smrg    # When large executables or shared objects are built, AIX ld can
310109885543Smrg    # have problems creating the table of contents.  If linking a library
310209885543Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
310309885543Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
310409885543Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
310509885543Smrg
310609885543Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
310709885543Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
310809885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
310909885543Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
311009885543Smrg
311109885543Smrg    if test "$GXX" = yes; then
311209885543Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
311309885543Smrg      # We only want to do this on AIX 4.2 and lower, the check
311409885543Smrg      # below for broken collect2 doesn't work under 4.3+
311509885543Smrg	collect2name=`${CC} -print-prog-name=collect2`
311609885543Smrg	if test -f "$collect2name" && \
311709885543Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
311809885543Smrg	then
311909885543Smrg	  # We have reworked collect2
31207104f784Smrg	  :
312109885543Smrg	else
312209885543Smrg	  # We have old collect2
312309885543Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
312409885543Smrg	  # It fails to find uninstalled libraries when the uninstalled
312509885543Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
312609885543Smrg	  # to unsupported forces relinking
312709885543Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
312809885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
312909885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
313009885543Smrg	fi
313109885543Smrg	;;
313209885543Smrg      esac
313309885543Smrg      shared_flag='-shared'
313409885543Smrg      if test "$aix_use_runtimelinking" = yes; then
313509885543Smrg	shared_flag="$shared_flag "'${wl}-G'
313609885543Smrg      fi
313709885543Smrg    else
313809885543Smrg      # not using gcc
313909885543Smrg      if test "$host_cpu" = ia64; then
314009885543Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
314109885543Smrg	# chokes on -Wl,-G. The following line is correct:
314209885543Smrg	shared_flag='-G'
314309885543Smrg      else
314409885543Smrg	if test "$aix_use_runtimelinking" = yes; then
314509885543Smrg	  shared_flag='${wl}-G'
314609885543Smrg	else
314709885543Smrg	  shared_flag='${wl}-bM:SRE'
314809885543Smrg	fi
314909885543Smrg      fi
315009885543Smrg    fi
315109885543Smrg
315209885543Smrg    # It seems that -bexpall does not export symbols beginning with
315309885543Smrg    # underscore (_), so it is better to generate a list of symbols to export.
315409885543Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
315509885543Smrg    if test "$aix_use_runtimelinking" = yes; then
315609885543Smrg      # Warning - without using the other runtime loading flags (-brtl),
315709885543Smrg      # -berok will link without error, but may produce a broken library.
315809885543Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
315909885543Smrg      # Determine the default libpath from the value encoded in an empty executable.
316009885543Smrg      _LT_AC_SYS_LIBPATH_AIX
316109885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
316209885543Smrg
316309885543Smrg      _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"
316409885543Smrg     else
316509885543Smrg      if test "$host_cpu" = ia64; then
316609885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
316709885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
316809885543Smrg	_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"
316909885543Smrg      else
317009885543Smrg	# Determine the default libpath from the value encoded in an empty executable.
317109885543Smrg	_LT_AC_SYS_LIBPATH_AIX
317209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
317309885543Smrg	# Warning - without using the other run time loading flags,
317409885543Smrg	# -berok will link without error, but may produce a broken library.
317509885543Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
317609885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
317709885543Smrg	# Exported symbols can be pulled into shared objects from archives
317809885543Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
317909885543Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
318009885543Smrg	# This is similar to how AIX traditionally builds its shared libraries.
318109885543Smrg	_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'
318209885543Smrg      fi
318309885543Smrg    fi
318409885543Smrg    ;;
318509885543Smrg
318609885543Smrg  beos*)
318709885543Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
318809885543Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
318909885543Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
319009885543Smrg      # support --undefined.  This deserves some investigation.  FIXME
319109885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
319209885543Smrg    else
319309885543Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
319409885543Smrg    fi
319509885543Smrg    ;;
319609885543Smrg
319709885543Smrg  chorus*)
319809885543Smrg    case $cc_basename in
319909885543Smrg      *)
320009885543Smrg	# FIXME: insert proper C++ library support
320109885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
320209885543Smrg	;;
320309885543Smrg    esac
320409885543Smrg    ;;
320509885543Smrg
320609885543Smrg  cygwin* | mingw* | pw32*)
320709885543Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
320809885543Smrg    # as there is no search path for DLLs.
320909885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
321009885543Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
321109885543Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
321209885543Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
321309885543Smrg
321409885543Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
321509885543Smrg      _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'
321609885543Smrg      # If the export-symbols file already is a .def file (1st line
321709885543Smrg      # is EXPORTS), use it as is; otherwise, prepend...
321809885543Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
321909885543Smrg	cp $export_symbols $output_objdir/$soname.def;
322009885543Smrg      else
322109885543Smrg	echo EXPORTS > $output_objdir/$soname.def;
322209885543Smrg	cat $export_symbols >> $output_objdir/$soname.def;
322309885543Smrg      fi~
322409885543Smrg      $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'
322509885543Smrg    else
322609885543Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
322709885543Smrg    fi
322809885543Smrg  ;;
322909885543Smrg      darwin* | rhapsody*)
323009885543Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
323109885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
323209885543Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
323309885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
323409885543Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
323509885543Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
32367104f784Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
32377104f784Smrg      if test "$GXX" = yes ; then
323809885543Smrg      output_verbose_link_cmd='echo'
32397104f784Smrg      _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}"
32407104f784Smrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
32417104f784Smrg      _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}"
32427104f784Smrg      _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}"
32437104f784Smrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
32447104f784Smrg        _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}"
32457104f784Smrg        _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}"
324609885543Smrg      fi
324709885543Smrg      else
324809885543Smrg      case $cc_basename in
324909885543Smrg        xlc*)
325009885543Smrg         output_verbose_link_cmd='echo'
32517104f784Smrg          _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'
325209885543Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
325309885543Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
32547104f784Smrg          _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}'
325509885543Smrg          _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}'
325609885543Smrg          ;;
325709885543Smrg       *)
325809885543Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
325909885543Smrg          ;;
326009885543Smrg      esac
326109885543Smrg      fi
326209885543Smrg        ;;
326309885543Smrg
326409885543Smrg  dgux*)
326509885543Smrg    case $cc_basename in
326609885543Smrg      ec++*)
326709885543Smrg	# FIXME: insert proper C++ library support
326809885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
326909885543Smrg	;;
327009885543Smrg      ghcx*)
327109885543Smrg	# Green Hills C++ Compiler
327209885543Smrg	# FIXME: insert proper C++ library support
327309885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
327409885543Smrg	;;
327509885543Smrg      *)
327609885543Smrg	# FIXME: insert proper C++ library support
327709885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
327809885543Smrg	;;
327909885543Smrg    esac
328009885543Smrg    ;;
328109885543Smrg  freebsd[[12]]*)
328209885543Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
328309885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
328409885543Smrg    ;;
328509885543Smrg  freebsd-elf*)
328609885543Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
328709885543Smrg    ;;
328809885543Smrg  freebsd* | dragonfly*)
328909885543Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
329009885543Smrg    # conventions
329109885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
329209885543Smrg    ;;
329309885543Smrg  gnu*)
329409885543Smrg    ;;
329509885543Smrg  hpux9*)
329609885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
329709885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
329809885543Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
329909885543Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
330009885543Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
330109885543Smrg				# but as the default
330209885543Smrg				# location of the library.
330309885543Smrg
330409885543Smrg    case $cc_basename in
330509885543Smrg    CC*)
330609885543Smrg      # FIXME: insert proper C++ library support
330709885543Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
330809885543Smrg      ;;
330909885543Smrg    aCC*)
331009885543Smrg      _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'
331109885543Smrg      # Commands to make compiler produce verbose output that lists
331209885543Smrg      # what "hidden" libraries, object files and flags are used when
331309885543Smrg      # linking a shared library.
331409885543Smrg      #
331509885543Smrg      # There doesn't appear to be a way to prevent this compiler from
331609885543Smrg      # explicitly linking system object files so we need to strip them
331709885543Smrg      # from the output so that they don't get included in the library
331809885543Smrg      # dependencies.
331909885543Smrg      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'
332009885543Smrg      ;;
332109885543Smrg    *)
332209885543Smrg      if test "$GXX" = yes; then
332309885543Smrg        _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'
332409885543Smrg      else
332509885543Smrg        # FIXME: insert proper C++ library support
332609885543Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
332709885543Smrg      fi
332809885543Smrg      ;;
332909885543Smrg    esac
333009885543Smrg    ;;
333109885543Smrg  hpux10*|hpux11*)
333209885543Smrg    if test $with_gnu_ld = no; then
333309885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
333409885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
333509885543Smrg
333609885543Smrg      case $host_cpu in
33377104f784Smrg      hppa*64*|ia64*) ;;
333809885543Smrg      *)
333909885543Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
334009885543Smrg        ;;
334109885543Smrg      esac
334209885543Smrg    fi
334309885543Smrg    case $host_cpu in
334409885543Smrg    hppa*64*|ia64*)
334509885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
334609885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
334709885543Smrg      ;;
334809885543Smrg    *)
334909885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
335009885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
335109885543Smrg					      # but as the default
335209885543Smrg					      # location of the library.
335309885543Smrg      ;;
335409885543Smrg    esac
335509885543Smrg
335609885543Smrg    case $cc_basename in
335709885543Smrg      CC*)
335809885543Smrg	# FIXME: insert proper C++ library support
335909885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
336009885543Smrg	;;
336109885543Smrg      aCC*)
336209885543Smrg	case $host_cpu in
336309885543Smrg	hppa*64*)
336409885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
336509885543Smrg	  ;;
336609885543Smrg	ia64*)
336709885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
336809885543Smrg	  ;;
336909885543Smrg	*)
337009885543Smrg	  _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'
337109885543Smrg	  ;;
337209885543Smrg	esac
337309885543Smrg	# Commands to make compiler produce verbose output that lists
337409885543Smrg	# what "hidden" libraries, object files and flags are used when
337509885543Smrg	# linking a shared library.
337609885543Smrg	#
337709885543Smrg	# There doesn't appear to be a way to prevent this compiler from
337809885543Smrg	# explicitly linking system object files so we need to strip them
337909885543Smrg	# from the output so that they don't get included in the library
338009885543Smrg	# dependencies.
338109885543Smrg	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'
338209885543Smrg	;;
338309885543Smrg      *)
338409885543Smrg	if test "$GXX" = yes; then
338509885543Smrg	  if test $with_gnu_ld = no; then
338609885543Smrg	    case $host_cpu in
338709885543Smrg	    hppa*64*)
338809885543Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
338909885543Smrg	      ;;
339009885543Smrg	    ia64*)
339109885543Smrg	      _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'
339209885543Smrg	      ;;
339309885543Smrg	    *)
339409885543Smrg	      _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'
339509885543Smrg	      ;;
339609885543Smrg	    esac
339709885543Smrg	  fi
339809885543Smrg	else
339909885543Smrg	  # FIXME: insert proper C++ library support
340009885543Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
340109885543Smrg	fi
340209885543Smrg	;;
340309885543Smrg    esac
340409885543Smrg    ;;
34057104f784Smrg  interix[[3-9]]*)
340609885543Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
340709885543Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
340809885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
340909885543Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
341009885543Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
341109885543Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
341209885543Smrg    # default) and relocated if they conflict, which is a slow very memory
341309885543Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
341409885543Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
341509885543Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
341609885543Smrg    _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'
341709885543Smrg    _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'
341809885543Smrg    ;;
341909885543Smrg  irix5* | irix6*)
342009885543Smrg    case $cc_basename in
342109885543Smrg      CC*)
342209885543Smrg	# SGI C++
342309885543Smrg	_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'
342409885543Smrg
342509885543Smrg	# Archives containing C++ object files must be created using
342609885543Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
342709885543Smrg	# necessary to make sure instantiated templates are included
342809885543Smrg	# in the archive.
342909885543Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
343009885543Smrg	;;
343109885543Smrg      *)
343209885543Smrg	if test "$GXX" = yes; then
343309885543Smrg	  if test "$with_gnu_ld" = no; then
343409885543Smrg	    _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'
343509885543Smrg	  else
343609885543Smrg	    _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'
343709885543Smrg	  fi
343809885543Smrg	fi
343909885543Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
344009885543Smrg	;;
344109885543Smrg    esac
344209885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
344309885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
344409885543Smrg    ;;
344509885543Smrg  linux* | k*bsd*-gnu)
344609885543Smrg    case $cc_basename in
344709885543Smrg      KCC*)
344809885543Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
344909885543Smrg
345009885543Smrg	# KCC will only create a shared library if the output file
345109885543Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
345209885543Smrg	# to its proper name (with version) after linking.
345309885543Smrg	_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'
345409885543Smrg	_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'
345509885543Smrg	# Commands to make compiler produce verbose output that lists
345609885543Smrg	# what "hidden" libraries, object files and flags are used when
345709885543Smrg	# linking a shared library.
345809885543Smrg	#
345909885543Smrg	# There doesn't appear to be a way to prevent this compiler from
346009885543Smrg	# explicitly linking system object files so we need to strip them
346109885543Smrg	# from the output so that they don't get included in the library
346209885543Smrg	# dependencies.
346309885543Smrg	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'
346409885543Smrg
346509885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
346609885543Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
346709885543Smrg
346809885543Smrg	# Archives containing C++ object files must be created using
346909885543Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
347009885543Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
347109885543Smrg	;;
347209885543Smrg      icpc*)
347309885543Smrg	# Intel C++
347409885543Smrg	with_gnu_ld=yes
347509885543Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
347609885543Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
347709885543Smrg	# earlier do not add the objects themselves.
347809885543Smrg	case `$CC -V 2>&1` in
347909885543Smrg	*"Version 7."*)
348009885543Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
348109885543Smrg  	  _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'
348209885543Smrg	  ;;
348309885543Smrg	*)  # Version 8.0 or newer
348409885543Smrg	  tmp_idyn=
348509885543Smrg	  case $host_cpu in
348609885543Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
348709885543Smrg	  esac
348809885543Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
348909885543Smrg	  _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'
349009885543Smrg	  ;;
349109885543Smrg	esac
349209885543Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
349309885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
349409885543Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
349509885543Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
349609885543Smrg	;;
34977104f784Smrg      pgCC* | pgcpp*)
349809885543Smrg        # Portland Group C++ compiler
349909885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
350009885543Smrg  	_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'
350109885543Smrg
350209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
350309885543Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
350409885543Smrg	_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'
350509885543Smrg        ;;
350609885543Smrg      cxx*)
350709885543Smrg	# Compaq C++
350809885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
350909885543Smrg	_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'
351009885543Smrg
351109885543Smrg	runpath_var=LD_RUN_PATH
351209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
351309885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
351409885543Smrg
351509885543Smrg	# Commands to make compiler produce verbose output that lists
351609885543Smrg	# what "hidden" libraries, object files and flags are used when
351709885543Smrg	# linking a shared library.
351809885543Smrg	#
351909885543Smrg	# There doesn't appear to be a way to prevent this compiler from
352009885543Smrg	# explicitly linking system object files so we need to strip them
352109885543Smrg	# from the output so that they don't get included in the library
352209885543Smrg	# dependencies.
352309885543Smrg	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'
352409885543Smrg	;;
35257104f784Smrg      *)
35267104f784Smrg	case `$CC -V 2>&1 | sed 5q` in
35277104f784Smrg	*Sun\ C*)
35287104f784Smrg	  # Sun C++ 5.9
35297104f784Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
35307104f784Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
35317104f784Smrg	  _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'
35327104f784Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
35337104f784Smrg	  _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'
35347104f784Smrg
35357104f784Smrg	  # Not sure whether something based on
35367104f784Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
35377104f784Smrg	  # would be better.
35387104f784Smrg	  output_verbose_link_cmd='echo'
35397104f784Smrg
35407104f784Smrg	  # Archives containing C++ object files must be created using
35417104f784Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
35427104f784Smrg	  # necessary to make sure instantiated templates are included
35437104f784Smrg	  # in the archive.
35447104f784Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
35457104f784Smrg	  ;;
35467104f784Smrg	esac
35477104f784Smrg	;;
354809885543Smrg    esac
354909885543Smrg    ;;
355009885543Smrg  lynxos*)
355109885543Smrg    # FIXME: insert proper C++ library support
355209885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
355309885543Smrg    ;;
355409885543Smrg  m88k*)
355509885543Smrg    # FIXME: insert proper C++ library support
355609885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
355709885543Smrg    ;;
355809885543Smrg  mvs*)
355909885543Smrg    case $cc_basename in
356009885543Smrg      cxx*)
356109885543Smrg	# FIXME: insert proper C++ library support
356209885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
356309885543Smrg	;;
356409885543Smrg      *)
356509885543Smrg	# FIXME: insert proper C++ library support
356609885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
356709885543Smrg	;;
356809885543Smrg    esac
356909885543Smrg    ;;
35707104f784Smrg  netbsd*)
357109885543Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
357209885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
357309885543Smrg      wlarc=
357409885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
357509885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
357609885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
357709885543Smrg    fi
357809885543Smrg    # Workaround some broken pre-1.5 toolchains
357909885543Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
358009885543Smrg    ;;
358109885543Smrg  openbsd2*)
358209885543Smrg    # C++ shared libraries are fairly broken
358309885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
358409885543Smrg    ;;
358509885543Smrg  openbsd*)
35867104f784Smrg    if test -f /usr/libexec/ld.so; then
35877104f784Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
35887104f784Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
35897104f784Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
35907104f784Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
35917104f784Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
35927104f784Smrg	_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'
35937104f784Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
35947104f784Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
35957104f784Smrg      fi
35967104f784Smrg      output_verbose_link_cmd='echo'
35977104f784Smrg    else
35987104f784Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
359909885543Smrg    fi
360009885543Smrg    ;;
360109885543Smrg  osf3*)
360209885543Smrg    case $cc_basename in
360309885543Smrg      KCC*)
360409885543Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
360509885543Smrg
360609885543Smrg	# KCC will only create a shared library if the output file
360709885543Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
360809885543Smrg	# to its proper name (with version) after linking.
360909885543Smrg	_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'
361009885543Smrg
361109885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
361209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
361309885543Smrg
361409885543Smrg	# Archives containing C++ object files must be created using
361509885543Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
361609885543Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
361709885543Smrg
361809885543Smrg	;;
361909885543Smrg      RCC*)
362009885543Smrg	# Rational C++ 2.4.1
362109885543Smrg	# FIXME: insert proper C++ library support
362209885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
362309885543Smrg	;;
362409885543Smrg      cxx*)
362509885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
362609885543Smrg	_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'
362709885543Smrg
362809885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
362909885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
363009885543Smrg
363109885543Smrg	# Commands to make compiler produce verbose output that lists
363209885543Smrg	# what "hidden" libraries, object files and flags are used when
363309885543Smrg	# linking a shared library.
363409885543Smrg	#
363509885543Smrg	# There doesn't appear to be a way to prevent this compiler from
363609885543Smrg	# explicitly linking system object files so we need to strip them
363709885543Smrg	# from the output so that they don't get included in the library
363809885543Smrg	# dependencies.
363909885543Smrg	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'
364009885543Smrg	;;
364109885543Smrg      *)
364209885543Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
364309885543Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
364409885543Smrg	  _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'
364509885543Smrg
364609885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
364709885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
364809885543Smrg
364909885543Smrg	  # Commands to make compiler produce verbose output that lists
365009885543Smrg	  # what "hidden" libraries, object files and flags are used when
365109885543Smrg	  # linking a shared library.
365209885543Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
365309885543Smrg
365409885543Smrg	else
365509885543Smrg	  # FIXME: insert proper C++ library support
365609885543Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
365709885543Smrg	fi
365809885543Smrg	;;
365909885543Smrg    esac
366009885543Smrg    ;;
366109885543Smrg  osf4* | osf5*)
366209885543Smrg    case $cc_basename in
366309885543Smrg      KCC*)
366409885543Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
366509885543Smrg
366609885543Smrg	# KCC will only create a shared library if the output file
366709885543Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
366809885543Smrg	# to its proper name (with version) after linking.
366909885543Smrg	_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'
367009885543Smrg
367109885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
367209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
367309885543Smrg
367409885543Smrg	# Archives containing C++ object files must be created using
367509885543Smrg	# the KAI C++ compiler.
367609885543Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
367709885543Smrg	;;
367809885543Smrg      RCC*)
367909885543Smrg	# Rational C++ 2.4.1
368009885543Smrg	# FIXME: insert proper C++ library support
368109885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
368209885543Smrg	;;
368309885543Smrg      cxx*)
368409885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
368509885543Smrg	_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'
368609885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
368709885543Smrg	  echo "-hidden">> $lib.exp~
368809885543Smrg	  $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~
368909885543Smrg	  $rm $lib.exp'
369009885543Smrg
369109885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
369209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
369309885543Smrg
369409885543Smrg	# Commands to make compiler produce verbose output that lists
369509885543Smrg	# what "hidden" libraries, object files and flags are used when
369609885543Smrg	# linking a shared library.
369709885543Smrg	#
369809885543Smrg	# There doesn't appear to be a way to prevent this compiler from
369909885543Smrg	# explicitly linking system object files so we need to strip them
370009885543Smrg	# from the output so that they don't get included in the library
370109885543Smrg	# dependencies.
370209885543Smrg	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'
370309885543Smrg	;;
370409885543Smrg      *)
370509885543Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
370609885543Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
370709885543Smrg	 _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'
370809885543Smrg
370909885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
371009885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
371109885543Smrg
371209885543Smrg	  # Commands to make compiler produce verbose output that lists
371309885543Smrg	  # what "hidden" libraries, object files and flags are used when
371409885543Smrg	  # linking a shared library.
371509885543Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
371609885543Smrg
371709885543Smrg	else
371809885543Smrg	  # FIXME: insert proper C++ library support
371909885543Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
372009885543Smrg	fi
372109885543Smrg	;;
372209885543Smrg    esac
372309885543Smrg    ;;
372409885543Smrg  psos*)
372509885543Smrg    # FIXME: insert proper C++ library support
372609885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
372709885543Smrg    ;;
372809885543Smrg  sunos4*)
372909885543Smrg    case $cc_basename in
373009885543Smrg      CC*)
373109885543Smrg	# Sun C++ 4.x
373209885543Smrg	# FIXME: insert proper C++ library support
373309885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
373409885543Smrg	;;
373509885543Smrg      lcc*)
373609885543Smrg	# Lucid
373709885543Smrg	# FIXME: insert proper C++ library support
373809885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
373909885543Smrg	;;
374009885543Smrg      *)
374109885543Smrg	# FIXME: insert proper C++ library support
374209885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
374309885543Smrg	;;
374409885543Smrg    esac
374509885543Smrg    ;;
374609885543Smrg  solaris*)
374709885543Smrg    case $cc_basename in
374809885543Smrg      CC*)
374909885543Smrg	# Sun C++ 4.2, 5.x and Centerline C++
375009885543Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
375109885543Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
375209885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
375309885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
375409885543Smrg	$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'
375509885543Smrg
375609885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
375709885543Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
375809885543Smrg	case $host_os in
375909885543Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
376009885543Smrg	  *)
37617104f784Smrg	    # The compiler driver will combine and reorder linker options,
37627104f784Smrg	    # but understands `-z linker_flag'.
376309885543Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
37647104f784Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
376509885543Smrg	    ;;
376609885543Smrg	esac
376709885543Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
376809885543Smrg
376909885543Smrg	output_verbose_link_cmd='echo'
377009885543Smrg
377109885543Smrg	# Archives containing C++ object files must be created using
377209885543Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
377309885543Smrg	# necessary to make sure instantiated templates are included
377409885543Smrg	# in the archive.
377509885543Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
377609885543Smrg	;;
377709885543Smrg      gcx*)
377809885543Smrg	# Green Hills C++ Compiler
377909885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
378009885543Smrg
378109885543Smrg	# The C++ compiler must be used to create the archive.
378209885543Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
378309885543Smrg	;;
378409885543Smrg      *)
378509885543Smrg	# GNU C++ compiler with Solaris linker
378609885543Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
378709885543Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
378809885543Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
378909885543Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
379009885543Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
379109885543Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
379209885543Smrg
379309885543Smrg	    # Commands to make compiler produce verbose output that lists
379409885543Smrg	    # what "hidden" libraries, object files and flags are used when
379509885543Smrg	    # linking a shared library.
379609885543Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
379709885543Smrg	  else
379809885543Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
379909885543Smrg	    # platform.
380009885543Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
380109885543Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
380209885543Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
380309885543Smrg
380409885543Smrg	    # Commands to make compiler produce verbose output that lists
380509885543Smrg	    # what "hidden" libraries, object files and flags are used when
380609885543Smrg	    # linking a shared library.
380709885543Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
380809885543Smrg	  fi
380909885543Smrg
381009885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
38117104f784Smrg	  case $host_os in
38127104f784Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
38137104f784Smrg	  *)
38147104f784Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
38157104f784Smrg	    ;;
38167104f784Smrg	  esac
381709885543Smrg	fi
381809885543Smrg	;;
381909885543Smrg    esac
382009885543Smrg    ;;
382109885543Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
382209885543Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
382309885543Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
382409885543Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
382509885543Smrg    runpath_var='LD_RUN_PATH'
382609885543Smrg
382709885543Smrg    case $cc_basename in
382809885543Smrg      CC*)
382909885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
383009885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
383109885543Smrg	;;
383209885543Smrg      *)
383309885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
383409885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
383509885543Smrg	;;
383609885543Smrg    esac
383709885543Smrg    ;;
383809885543Smrg  sysv5* | sco3.2v5* | sco5v6*)
383909885543Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
384009885543Smrg    # link with -lc, and that would cause any symbols used from libc to
384109885543Smrg    # always be unresolved, which means just about no library would
384209885543Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
384309885543Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
384409885543Smrg    # as -z defs.
384509885543Smrg    # For security reasons, it is highly recommended that you always
384609885543Smrg    # use absolute paths for naming shared libraries, and exclude the
384709885543Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
384809885543Smrg    # requires that you compile everything twice, which is a pain.
384909885543Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
385009885543Smrg    # non-empty value in the environment.  Most likely only useful for
385109885543Smrg    # creating official distributions of packages.
385209885543Smrg    # This is a hack until libtool officially supports absolute path
385309885543Smrg    # names for shared libraries.
385409885543Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
385509885543Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
385609885543Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
385709885543Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
385809885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
385909885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
386009885543Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
386109885543Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
386209885543Smrg    runpath_var='LD_RUN_PATH'
386309885543Smrg
386409885543Smrg    case $cc_basename in
386509885543Smrg      CC*)
386609885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
386709885543Smrg	_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'
386809885543Smrg	;;
386909885543Smrg      *)
387009885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
387109885543Smrg	_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'
387209885543Smrg	;;
387309885543Smrg    esac
387409885543Smrg    ;;
387509885543Smrg  tandem*)
387609885543Smrg    case $cc_basename in
387709885543Smrg      NCC*)
387809885543Smrg	# NonStop-UX NCC 3.20
387909885543Smrg	# FIXME: insert proper C++ library support
388009885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
388109885543Smrg	;;
388209885543Smrg      *)
388309885543Smrg	# FIXME: insert proper C++ library support
388409885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
388509885543Smrg	;;
388609885543Smrg    esac
388709885543Smrg    ;;
388809885543Smrg  vxworks*)
388909885543Smrg    # FIXME: insert proper C++ library support
389009885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
389109885543Smrg    ;;
389209885543Smrg  *)
389309885543Smrg    # FIXME: insert proper C++ library support
389409885543Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
389509885543Smrg    ;;
389609885543Smrgesac
389709885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
389809885543Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
389909885543Smrg
390009885543Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
390109885543Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
390209885543Smrg
390309885543SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
390409885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
390509885543SmrgAC_LIBTOOL_PROG_CC_C_O($1)
390609885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
390709885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
390809885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
390909885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
391009885543Smrg
391109885543SmrgAC_LIBTOOL_CONFIG($1)
391209885543Smrg
391309885543SmrgAC_LANG_POP
391409885543SmrgCC=$lt_save_CC
391509885543SmrgLDCXX=$LD
391609885543SmrgLD=$lt_save_LD
391709885543SmrgGCC=$lt_save_GCC
391809885543Smrgwith_gnu_ldcxx=$with_gnu_ld
391909885543Smrgwith_gnu_ld=$lt_save_with_gnu_ld
392009885543Smrglt_cv_path_LDCXX=$lt_cv_path_LD
392109885543Smrglt_cv_path_LD=$lt_save_path_LD
392209885543Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
392309885543Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
392409885543Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
392509885543Smrg
392609885543Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
392709885543Smrg# ------------------------------------
392809885543Smrg# Figure out "hidden" library dependencies from verbose
392909885543Smrg# compiler output when linking a shared library.
393009885543Smrg# Parse the compiler output and extract the necessary
393109885543Smrg# objects, libraries and library flags.
39327104f784SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
39337104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
393409885543Smrgdnl we can't use the lt_simple_compile_test_code here,
393509885543Smrgdnl because it contains code intended for an executable,
393609885543Smrgdnl not a library.  It's possible we should let each
393709885543Smrgdnl tag define a new lt_????_link_test_code variable,
393809885543Smrgdnl but it's only used here...
393909885543Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
394009885543Smrgint a;
394109885543Smrgvoid foo (void) { a = 0; }
394209885543SmrgEOF
394309885543Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
394409885543Smrgclass Foo
394509885543Smrg{
394609885543Smrgpublic:
394709885543Smrg  Foo (void) { a = 0; }
394809885543Smrgprivate:
394909885543Smrg  int a;
395009885543Smrg};
395109885543SmrgEOF
395209885543Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
395309885543Smrg      subroutine foo
395409885543Smrg      implicit none
395509885543Smrg      integer*4 a
395609885543Smrg      a=0
395709885543Smrg      return
395809885543Smrg      end
395909885543SmrgEOF
396009885543Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
396109885543Smrgpublic class foo {
396209885543Smrg  private int a;
396309885543Smrg  public void bar (void) {
396409885543Smrg    a = 0;
396509885543Smrg  }
396609885543Smrg};
396709885543SmrgEOF
396809885543Smrg])
396909885543Smrgdnl Parse the compiler output and extract the necessary
397009885543Smrgdnl objects, libraries and library flags.
397109885543Smrgif AC_TRY_EVAL(ac_compile); then
397209885543Smrg  # Parse the compiler output and extract the necessary
397309885543Smrg  # objects, libraries and library flags.
397409885543Smrg
397509885543Smrg  # Sentinel used to keep track of whether or not we are before
397609885543Smrg  # the conftest object file.
397709885543Smrg  pre_test_object_deps_done=no
397809885543Smrg
397909885543Smrg  # The `*' in the case matches for architectures that use `case' in
398009885543Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
398109885543Smrg  # eval without this substitution.
398209885543Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
398309885543Smrg
398409885543Smrg  for p in `eval $output_verbose_link_cmd`; do
398509885543Smrg    case $p in
398609885543Smrg
398709885543Smrg    -L* | -R* | -l*)
398809885543Smrg       # Some compilers place space between "-{L,R}" and the path.
398909885543Smrg       # Remove the space.
399009885543Smrg       if test $p = "-L" \
399109885543Smrg	  || test $p = "-R"; then
399209885543Smrg	 prev=$p
399309885543Smrg	 continue
399409885543Smrg       else
399509885543Smrg	 prev=
399609885543Smrg       fi
399709885543Smrg
399809885543Smrg       if test "$pre_test_object_deps_done" = no; then
399909885543Smrg	 case $p in
400009885543Smrg	 -L* | -R*)
400109885543Smrg	   # Internal compiler library paths should come after those
400209885543Smrg	   # provided the user.  The postdeps already come after the
400309885543Smrg	   # user supplied libs so there is no need to process them.
400409885543Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
400509885543Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
400609885543Smrg	   else
400709885543Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
400809885543Smrg	   fi
400909885543Smrg	   ;;
401009885543Smrg	 # The "-l" case would never come before the object being
401109885543Smrg	 # linked, so don't bother handling this case.
401209885543Smrg	 esac
401309885543Smrg       else
401409885543Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
401509885543Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
401609885543Smrg	 else
401709885543Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
401809885543Smrg	 fi
401909885543Smrg       fi
402009885543Smrg       ;;
402109885543Smrg
402209885543Smrg    *.$objext)
402309885543Smrg       # This assumes that the test object file only shows up
402409885543Smrg       # once in the compiler output.
402509885543Smrg       if test "$p" = "conftest.$objext"; then
402609885543Smrg	 pre_test_object_deps_done=yes
402709885543Smrg	 continue
402809885543Smrg       fi
402909885543Smrg
403009885543Smrg       if test "$pre_test_object_deps_done" = no; then
403109885543Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
403209885543Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
403309885543Smrg	 else
403409885543Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
403509885543Smrg	 fi
403609885543Smrg       else
403709885543Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
403809885543Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
403909885543Smrg	 else
404009885543Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
404109885543Smrg	 fi
404209885543Smrg       fi
404309885543Smrg       ;;
404409885543Smrg
404509885543Smrg    *) ;; # Ignore the rest.
404609885543Smrg
404709885543Smrg    esac
404809885543Smrg  done
404909885543Smrg
405009885543Smrg  # Clean up.
405109885543Smrg  rm -f a.out a.exe
405209885543Smrgelse
405309885543Smrg  echo "libtool.m4: error: problem compiling $1 test program"
405409885543Smrgfi
405509885543Smrg
405609885543Smrg$rm -f confest.$objext
405709885543Smrg
40587104f784Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
40597104f784Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
40607104f784Smrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
40617104f784Smrgfi
40627104f784Smrg
406309885543Smrg# PORTME: override above test on systems where it is broken
406409885543Smrgifelse([$1],[CXX],
406509885543Smrg[case $host_os in
40667104f784Smrginterix[[3-9]]*)
406709885543Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
406809885543Smrg  # hack all around it, let's just trust "g++" to DTRT.
406909885543Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
407009885543Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
407109885543Smrg  _LT_AC_TAGVAR(postdeps,$1)=
407209885543Smrg  ;;
407309885543Smrg
40747104f784Smrglinux*)
40757104f784Smrg  case `$CC -V 2>&1 | sed 5q` in
40767104f784Smrg  *Sun\ C*)
40777104f784Smrg    # Sun C++ 5.9
40787104f784Smrg    #
40797104f784Smrg    # The more standards-conforming stlport4 library is
40807104f784Smrg    # incompatible with the Cstd library. Avoid specifying
40817104f784Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
40827104f784Smrg    # -library=stlport4 depends on it.
40837104f784Smrg    case " $CXX $CXXFLAGS " in
40847104f784Smrg    *" -library=stlport4 "*)
40857104f784Smrg      solaris_use_stlport4=yes
40867104f784Smrg      ;;
40877104f784Smrg    esac
40887104f784Smrg    if test "$solaris_use_stlport4" != yes; then
40897104f784Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
40907104f784Smrg    fi
40917104f784Smrg    ;;
40927104f784Smrg  esac
40937104f784Smrg  ;;
40947104f784Smrg
409509885543Smrgsolaris*)
409609885543Smrg  case $cc_basename in
409709885543Smrg  CC*)
40987104f784Smrg    # The more standards-conforming stlport4 library is
40997104f784Smrg    # incompatible with the Cstd library. Avoid specifying
41007104f784Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
41017104f784Smrg    # -library=stlport4 depends on it.
41027104f784Smrg    case " $CXX $CXXFLAGS " in
41037104f784Smrg    *" -library=stlport4 "*)
41047104f784Smrg      solaris_use_stlport4=yes
41057104f784Smrg      ;;
41067104f784Smrg    esac
41077104f784Smrg
410809885543Smrg    # Adding this requires a known-good setup of shared libraries for
410909885543Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
411009885543Smrg    # archive will be linked into the output, leading to subtle bugs.
41117104f784Smrg    if test "$solaris_use_stlport4" != yes; then
41127104f784Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
41137104f784Smrg    fi
411409885543Smrg    ;;
411509885543Smrg  esac
411609885543Smrg  ;;
411709885543Smrgesac
411809885543Smrg])
411909885543Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
412009885543Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
412109885543Smrgesac
412209885543Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
412309885543Smrg
412409885543Smrg# AC_LIBTOOL_LANG_F77_CONFIG
412509885543Smrg# --------------------------
412609885543Smrg# Ensure that the configuration vars for the C compiler are
412709885543Smrg# suitably defined.  Those variables are subsequently used by
412809885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
412909885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
413009885543SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
413109885543Smrg[AC_REQUIRE([AC_PROG_F77])
413209885543SmrgAC_LANG_PUSH(Fortran 77)
413309885543Smrg
413409885543Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
413509885543Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
413609885543Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
413709885543Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
413809885543Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
413909885543Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
414009885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
414109885543Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
414209885543Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
414309885543Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
414409885543Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
414509885543Smrg_LT_AC_TAGVAR(module_cmds, $1)=
414609885543Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
414709885543Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
414809885543Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
414909885543Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
415009885543Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
415109885543Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
415209885543Smrg
415309885543Smrg# Source file extension for f77 test sources.
415409885543Smrgac_ext=f
415509885543Smrg
415609885543Smrg# Object file extension for compiled f77 test sources.
415709885543Smrgobjext=o
415809885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext
415909885543Smrg
416009885543Smrg# Code to be used in simple compile tests
41617104f784Smrglt_simple_compile_test_code="\
41627104f784Smrg      subroutine t
41637104f784Smrg      return
41647104f784Smrg      end
41657104f784Smrg"
416609885543Smrg
416709885543Smrg# Code to be used in simple link tests
41687104f784Smrglt_simple_link_test_code="\
41697104f784Smrg      program t
41707104f784Smrg      end
41717104f784Smrg"
417209885543Smrg
417309885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
417409885543Smrg_LT_AC_SYS_COMPILER
417509885543Smrg
417609885543Smrg# save warnings/boilerplate of simple test code
417709885543Smrg_LT_COMPILER_BOILERPLATE
417809885543Smrg_LT_LINKER_BOILERPLATE
417909885543Smrg
418009885543Smrg# Allow CC to be a program name with arguments.
418109885543Smrglt_save_CC="$CC"
418209885543SmrgCC=${F77-"f77"}
418309885543Smrgcompiler=$CC
418409885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
418509885543Smrg_LT_CC_BASENAME([$compiler])
418609885543Smrg
418709885543SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
418809885543SmrgAC_MSG_RESULT([$can_build_shared])
418909885543Smrg
419009885543SmrgAC_MSG_CHECKING([whether to build shared libraries])
419109885543Smrgtest "$can_build_shared" = "no" && enable_shared=no
419209885543Smrg
419309885543Smrg# On AIX, shared libraries and static libraries use the same namespace, and
419409885543Smrg# are all built from PIC.
419509885543Smrgcase $host_os in
419609885543Smrgaix3*)
419709885543Smrg  test "$enable_shared" = yes && enable_static=no
419809885543Smrg  if test -n "$RANLIB"; then
419909885543Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
420009885543Smrg    postinstall_cmds='$RANLIB $lib'
420109885543Smrg  fi
420209885543Smrg  ;;
42037104f784Smrgaix[[4-9]]*)
420409885543Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
420509885543Smrg    test "$enable_shared" = yes && enable_static=no
420609885543Smrg  fi
420709885543Smrg  ;;
420809885543Smrgesac
420909885543SmrgAC_MSG_RESULT([$enable_shared])
421009885543Smrg
421109885543SmrgAC_MSG_CHECKING([whether to build static libraries])
421209885543Smrg# Make sure either enable_shared or enable_static is yes.
421309885543Smrgtest "$enable_shared" = yes || enable_static=yes
421409885543SmrgAC_MSG_RESULT([$enable_static])
421509885543Smrg
421609885543Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
421709885543Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
421809885543Smrg
421909885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
422009885543SmrgAC_LIBTOOL_PROG_CC_C_O($1)
422109885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
422209885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
422309885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
422409885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
422509885543Smrg
422609885543SmrgAC_LIBTOOL_CONFIG($1)
422709885543Smrg
422809885543SmrgAC_LANG_POP
422909885543SmrgCC="$lt_save_CC"
423009885543Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
423109885543Smrg
423209885543Smrg
423309885543Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
423409885543Smrg# --------------------------
423509885543Smrg# Ensure that the configuration vars for the C compiler are
423609885543Smrg# suitably defined.  Those variables are subsequently used by
423709885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
423809885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
423909885543SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
424009885543Smrg[AC_LANG_SAVE
424109885543Smrg
424209885543Smrg# Source file extension for Java test sources.
424309885543Smrgac_ext=java
424409885543Smrg
424509885543Smrg# Object file extension for compiled Java test sources.
424609885543Smrgobjext=o
424709885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext
424809885543Smrg
424909885543Smrg# Code to be used in simple compile tests
42507104f784Smrglt_simple_compile_test_code="class foo {}"
425109885543Smrg
425209885543Smrg# Code to be used in simple link tests
42537104f784Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
425409885543Smrg
425509885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
425609885543Smrg_LT_AC_SYS_COMPILER
425709885543Smrg
425809885543Smrg# save warnings/boilerplate of simple test code
425909885543Smrg_LT_COMPILER_BOILERPLATE
426009885543Smrg_LT_LINKER_BOILERPLATE
426109885543Smrg
426209885543Smrg# Allow CC to be a program name with arguments.
426309885543Smrglt_save_CC="$CC"
426409885543SmrgCC=${GCJ-"gcj"}
426509885543Smrgcompiler=$CC
426609885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
426709885543Smrg_LT_CC_BASENAME([$compiler])
426809885543Smrg
426909885543Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
427009885543Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
427109885543Smrg
427209885543Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
427309885543Smrg
427409885543SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
427509885543SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
427609885543SmrgAC_LIBTOOL_PROG_CC_C_O($1)
427709885543SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
427809885543SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
427909885543SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
428009885543SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
428109885543Smrg
428209885543SmrgAC_LIBTOOL_CONFIG($1)
428309885543Smrg
428409885543SmrgAC_LANG_RESTORE
428509885543SmrgCC="$lt_save_CC"
428609885543Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
428709885543Smrg
428809885543Smrg
428909885543Smrg# AC_LIBTOOL_LANG_RC_CONFIG
429009885543Smrg# -------------------------
429109885543Smrg# Ensure that the configuration vars for the Windows resource compiler are
429209885543Smrg# suitably defined.  Those variables are subsequently used by
429309885543Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
429409885543SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
429509885543SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
429609885543Smrg[AC_LANG_SAVE
429709885543Smrg
429809885543Smrg# Source file extension for RC test sources.
429909885543Smrgac_ext=rc
430009885543Smrg
430109885543Smrg# Object file extension for compiled RC test sources.
430209885543Smrgobjext=o
430309885543Smrg_LT_AC_TAGVAR(objext, $1)=$objext
430409885543Smrg
430509885543Smrg# Code to be used in simple compile tests
43067104f784Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
430709885543Smrg
430809885543Smrg# Code to be used in simple link tests
430909885543Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
431009885543Smrg
431109885543Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
431209885543Smrg_LT_AC_SYS_COMPILER
431309885543Smrg
431409885543Smrg# save warnings/boilerplate of simple test code
431509885543Smrg_LT_COMPILER_BOILERPLATE
431609885543Smrg_LT_LINKER_BOILERPLATE
431709885543Smrg
431809885543Smrg# Allow CC to be a program name with arguments.
431909885543Smrglt_save_CC="$CC"
432009885543SmrgCC=${RC-"windres"}
432109885543Smrgcompiler=$CC
432209885543Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
432309885543Smrg_LT_CC_BASENAME([$compiler])
432409885543Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
432509885543Smrg
432609885543SmrgAC_LIBTOOL_CONFIG($1)
432709885543Smrg
432809885543SmrgAC_LANG_RESTORE
432909885543SmrgCC="$lt_save_CC"
433009885543Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
433109885543Smrg
433209885543Smrg
433309885543Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
433409885543Smrg# ----------------------------
433509885543Smrg# If TAGNAME is not passed, then create an initial libtool script
433609885543Smrg# with a default configuration from the untagged config vars.  Otherwise
433709885543Smrg# add code to config.status for appending the configuration named by
433809885543Smrg# TAGNAME from the matching tagged config vars.
433909885543SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
434009885543Smrg[# The else clause should only fire when bootstrapping the
434109885543Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
434209885543Smrg# with your package, and you will get complaints that there are
434309885543Smrg# no rules to generate ltmain.sh.
434409885543Smrgif test -f "$ltmain"; then
434509885543Smrg  # See if we are running on zsh, and set the options which allow our commands through
434609885543Smrg  # without removal of \ escapes.
434709885543Smrg  if test -n "${ZSH_VERSION+set}" ; then
434809885543Smrg    setopt NO_GLOB_SUBST
434909885543Smrg  fi
435009885543Smrg  # Now quote all the things that may contain metacharacters while being
435109885543Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
435209885543Smrg  # variables and quote the copies for generation of the libtool script.
435309885543Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
435409885543Smrg    SED SHELL STRIP \
435509885543Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
435609885543Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
435709885543Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
435809885543Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
435909885543Smrg    lt_cv_sys_global_symbol_to_c_name_address \
436009885543Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
436109885543Smrg    old_postinstall_cmds old_postuninstall_cmds \
436209885543Smrg    _LT_AC_TAGVAR(compiler, $1) \
436309885543Smrg    _LT_AC_TAGVAR(CC, $1) \
436409885543Smrg    _LT_AC_TAGVAR(LD, $1) \
436509885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
436609885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
436709885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
436809885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
436909885543Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
437009885543Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
437109885543Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
437209885543Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
437309885543Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
437409885543Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
437509885543Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
437609885543Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
437709885543Smrg    _LT_AC_TAGVAR(predeps, $1) \
437809885543Smrg    _LT_AC_TAGVAR(postdeps, $1) \
437909885543Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
43807104f784Smrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
438109885543Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
438209885543Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
438309885543Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
438409885543Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
438509885543Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
438609885543Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
438709885543Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
438809885543Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
438909885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
439009885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
439109885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
439209885543Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
439309885543Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
439409885543Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
439509885543Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
43967104f784Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
439709885543Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
439809885543Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
439909885543Smrg
440009885543Smrg    case $var in
440109885543Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
440209885543Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
440309885543Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
440409885543Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
440509885543Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
440609885543Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
440709885543Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
440809885543Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
440909885543Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
441009885543Smrg    postinstall_cmds | postuninstall_cmds | \
441109885543Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
441209885543Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
441309885543Smrg      # Double-quote double-evaled strings.
441409885543Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
441509885543Smrg      ;;
441609885543Smrg    *)
441709885543Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
441809885543Smrg      ;;
441909885543Smrg    esac
442009885543Smrg  done
442109885543Smrg
442209885543Smrg  case $lt_echo in
442309885543Smrg  *'\[$]0 --fallback-echo"')
442409885543Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
442509885543Smrg    ;;
442609885543Smrg  esac
442709885543Smrg
442809885543Smrgifelse([$1], [],
442909885543Smrg  [cfgfile="${ofile}T"
443009885543Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
443109885543Smrg  $rm -f "$cfgfile"
443209885543Smrg  AC_MSG_NOTICE([creating $ofile])],
443309885543Smrg  [cfgfile="$ofile"])
443409885543Smrg
443509885543Smrg  cat <<__EOF__ >> "$cfgfile"
443609885543Smrgifelse([$1], [],
443709885543Smrg[#! $SHELL
443809885543Smrg
443909885543Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
444009885543Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
444109885543Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
444209885543Smrg#
44437104f784Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
444409885543Smrg# Free Software Foundation, Inc.
444509885543Smrg#
444609885543Smrg# This file is part of GNU Libtool:
444709885543Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
444809885543Smrg#
444909885543Smrg# This program is free software; you can redistribute it and/or modify
445009885543Smrg# it under the terms of the GNU General Public License as published by
445109885543Smrg# the Free Software Foundation; either version 2 of the License, or
445209885543Smrg# (at your option) any later version.
445309885543Smrg#
445409885543Smrg# This program is distributed in the hope that it will be useful, but
445509885543Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
445609885543Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
445709885543Smrg# General Public License for more details.
445809885543Smrg#
445909885543Smrg# You should have received a copy of the GNU General Public License
446009885543Smrg# along with this program; if not, write to the Free Software
446109885543Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
446209885543Smrg#
446309885543Smrg# As a special exception to the GNU General Public License, if you
446409885543Smrg# distribute this file as part of a program that contains a
446509885543Smrg# configuration script generated by Autoconf, you may include it under
446609885543Smrg# the same distribution terms that you use for the rest of that program.
446709885543Smrg
446809885543Smrg# A sed program that does not truncate output.
446909885543SmrgSED=$lt_SED
447009885543Smrg
447109885543Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
447209885543SmrgXsed="$SED -e 1s/^X//"
447309885543Smrg
447409885543Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
447509885543Smrg# if CDPATH is set.
447609885543Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
447709885543Smrg
447809885543Smrg# The names of the tagged configurations supported by this script.
447909885543Smrgavailable_tags=
448009885543Smrg
448109885543Smrg# ### BEGIN LIBTOOL CONFIG],
448209885543Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
448309885543Smrg
448409885543Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
448509885543Smrg
448609885543Smrg# Shell to use when invoking shell scripts.
448709885543SmrgSHELL=$lt_SHELL
448809885543Smrg
448909885543Smrg# Whether or not to build shared libraries.
449009885543Smrgbuild_libtool_libs=$enable_shared
449109885543Smrg
449209885543Smrg# Whether or not to build static libraries.
449309885543Smrgbuild_old_libs=$enable_static
449409885543Smrg
449509885543Smrg# Whether or not to add -lc for building shared libraries.
449609885543Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
449709885543Smrg
449809885543Smrg# Whether or not to disallow shared libs when runtime libs are static
449909885543Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
450009885543Smrg
450109885543Smrg# Whether or not to optimize for fast installation.
450209885543Smrgfast_install=$enable_fast_install
450309885543Smrg
450409885543Smrg# The host system.
450509885543Smrghost_alias=$host_alias
450609885543Smrghost=$host
450709885543Smrghost_os=$host_os
450809885543Smrg
450909885543Smrg# The build system.
451009885543Smrgbuild_alias=$build_alias
451109885543Smrgbuild=$build
451209885543Smrgbuild_os=$build_os
451309885543Smrg
451409885543Smrg# An echo program that does not interpret backslashes.
451509885543Smrgecho=$lt_echo
451609885543Smrg
451709885543Smrg# The archiver.
451809885543SmrgAR=$lt_AR
451909885543SmrgAR_FLAGS=$lt_AR_FLAGS
452009885543Smrg
452109885543Smrg# A C compiler.
452209885543SmrgLTCC=$lt_LTCC
452309885543Smrg
452409885543Smrg# LTCC compiler flags.
452509885543SmrgLTCFLAGS=$lt_LTCFLAGS
452609885543Smrg
452709885543Smrg# A language-specific compiler.
452809885543SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
452909885543Smrg
453009885543Smrg# Is the compiler the GNU C compiler?
453109885543Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
453209885543Smrg
453309885543Smrg# An ERE matcher.
453409885543SmrgEGREP=$lt_EGREP
453509885543Smrg
453609885543Smrg# The linker used to build libraries.
453709885543SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
453809885543Smrg
453909885543Smrg# Whether we need hard or soft links.
454009885543SmrgLN_S=$lt_LN_S
454109885543Smrg
454209885543Smrg# A BSD-compatible nm program.
454309885543SmrgNM=$lt_NM
454409885543Smrg
454509885543Smrg# A symbol stripping program
454609885543SmrgSTRIP=$lt_STRIP
454709885543Smrg
454809885543Smrg# Used to examine libraries when file_magic_cmd begins "file"
454909885543SmrgMAGIC_CMD=$MAGIC_CMD
455009885543Smrg
455109885543Smrg# Used on cygwin: DLL creation program.
455209885543SmrgDLLTOOL="$DLLTOOL"
455309885543Smrg
455409885543Smrg# Used on cygwin: object dumper.
455509885543SmrgOBJDUMP="$OBJDUMP"
455609885543Smrg
455709885543Smrg# Used on cygwin: assembler.
455809885543SmrgAS="$AS"
455909885543Smrg
456009885543Smrg# The name of the directory that contains temporary libtool files.
456109885543Smrgobjdir=$objdir
456209885543Smrg
456309885543Smrg# How to create reloadable object files.
456409885543Smrgreload_flag=$lt_reload_flag
456509885543Smrgreload_cmds=$lt_reload_cmds
456609885543Smrg
456709885543Smrg# How to pass a linker flag through the compiler.
456809885543Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
456909885543Smrg
457009885543Smrg# Object file suffix (normally "o").
457109885543Smrgobjext="$ac_objext"
457209885543Smrg
457309885543Smrg# Old archive suffix (normally "a").
457409885543Smrglibext="$libext"
457509885543Smrg
457609885543Smrg# Shared library suffix (normally ".so").
457709885543Smrgshrext_cmds='$shrext_cmds'
457809885543Smrg
457909885543Smrg# Executable file suffix (normally "").
458009885543Smrgexeext="$exeext"
458109885543Smrg
458209885543Smrg# Additional compiler flags for building library objects.
458309885543Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
458409885543Smrgpic_mode=$pic_mode
458509885543Smrg
458609885543Smrg# What is the maximum length of a command?
458709885543Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
458809885543Smrg
458909885543Smrg# Does compiler simultaneously support -c and -o options?
459009885543Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
459109885543Smrg
459209885543Smrg# Must we lock files when doing compilation?
459309885543Smrgneed_locks=$lt_need_locks
459409885543Smrg
459509885543Smrg# Do we need the lib prefix for modules?
459609885543Smrgneed_lib_prefix=$need_lib_prefix
459709885543Smrg
459809885543Smrg# Do we need a version for libraries?
459909885543Smrgneed_version=$need_version
460009885543Smrg
460109885543Smrg# Whether dlopen is supported.
460209885543Smrgdlopen_support=$enable_dlopen
460309885543Smrg
460409885543Smrg# Whether dlopen of programs is supported.
460509885543Smrgdlopen_self=$enable_dlopen_self
460609885543Smrg
460709885543Smrg# Whether dlopen of statically linked programs is supported.
460809885543Smrgdlopen_self_static=$enable_dlopen_self_static
460909885543Smrg
461009885543Smrg# Compiler flag to prevent dynamic linking.
461109885543Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
461209885543Smrg
461309885543Smrg# Compiler flag to turn off builtin functions.
461409885543Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
461509885543Smrg
461609885543Smrg# Compiler flag to allow reflexive dlopens.
461709885543Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
461809885543Smrg
461909885543Smrg# Compiler flag to generate shared objects directly from archives.
462009885543Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
462109885543Smrg
462209885543Smrg# Compiler flag to generate thread-safe objects.
462309885543Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
462409885543Smrg
462509885543Smrg# Library versioning type.
462609885543Smrgversion_type=$version_type
462709885543Smrg
462809885543Smrg# Format of library name prefix.
462909885543Smrglibname_spec=$lt_libname_spec
463009885543Smrg
463109885543Smrg# List of archive names.  First name is the real one, the rest are links.
463209885543Smrg# The last name is the one that the linker finds with -lNAME.
463309885543Smrglibrary_names_spec=$lt_library_names_spec
463409885543Smrg
463509885543Smrg# The coded name of the library, if different from the real name.
463609885543Smrgsoname_spec=$lt_soname_spec
463709885543Smrg
463809885543Smrg# Commands used to build and install an old-style archive.
463909885543SmrgRANLIB=$lt_RANLIB
464009885543Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
464109885543Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
464209885543Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
464309885543Smrg
464409885543Smrg# Create an old-style archive from a shared archive.
464509885543Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
464609885543Smrg
464709885543Smrg# Create a temporary old-style archive to link instead of a shared archive.
464809885543Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
464909885543Smrg
465009885543Smrg# Commands used to build and install a shared archive.
465109885543Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
465209885543Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
465309885543Smrgpostinstall_cmds=$lt_postinstall_cmds
465409885543Smrgpostuninstall_cmds=$lt_postuninstall_cmds
465509885543Smrg
465609885543Smrg# Commands used to build a loadable module (assumed same as above if empty)
465709885543Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
465809885543Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
465909885543Smrg
466009885543Smrg# Commands to strip libraries.
466109885543Smrgold_striplib=$lt_old_striplib
466209885543Smrgstriplib=$lt_striplib
466309885543Smrg
466409885543Smrg# Dependencies to place before the objects being linked to create a
466509885543Smrg# shared library.
466609885543Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
466709885543Smrg
466809885543Smrg# Dependencies to place after the objects being linked to create a
466909885543Smrg# shared library.
467009885543Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
467109885543Smrg
467209885543Smrg# Dependencies to place before the objects being linked to create a
467309885543Smrg# shared library.
467409885543Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
467509885543Smrg
467609885543Smrg# Dependencies to place after the objects being linked to create a
467709885543Smrg# shared library.
467809885543Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
467909885543Smrg
46807104f784Smrg# The directories searched by this compiler when creating a shared
46817104f784Smrg# library
46827104f784Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
46837104f784Smrg
468409885543Smrg# The library search path used internally by the compiler when linking
468509885543Smrg# a shared library.
468609885543Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
468709885543Smrg
468809885543Smrg# Method to check whether dependent libraries are shared objects.
468909885543Smrgdeplibs_check_method=$lt_deplibs_check_method
469009885543Smrg
469109885543Smrg# Command to use when deplibs_check_method == file_magic.
469209885543Smrgfile_magic_cmd=$lt_file_magic_cmd
469309885543Smrg
469409885543Smrg# Flag that allows shared libraries with undefined symbols to be built.
469509885543Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
469609885543Smrg
469709885543Smrg# Flag that forces no undefined symbols.
469809885543Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
469909885543Smrg
470009885543Smrg# Commands used to finish a libtool library installation in a directory.
470109885543Smrgfinish_cmds=$lt_finish_cmds
470209885543Smrg
470309885543Smrg# Same as above, but a single script fragment to be evaled but not shown.
470409885543Smrgfinish_eval=$lt_finish_eval
470509885543Smrg
470609885543Smrg# Take the output of nm and produce a listing of raw symbols and C names.
470709885543Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
470809885543Smrg
470909885543Smrg# Transform the output of nm in a proper C declaration
471009885543Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
471109885543Smrg
471209885543Smrg# Transform the output of nm in a C name address pair
471309885543Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
471409885543Smrg
471509885543Smrg# This is the shared library runtime path variable.
471609885543Smrgrunpath_var=$runpath_var
471709885543Smrg
471809885543Smrg# This is the shared library path variable.
471909885543Smrgshlibpath_var=$shlibpath_var
472009885543Smrg
472109885543Smrg# Is shlibpath searched before the hard-coded library search path?
472209885543Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
472309885543Smrg
472409885543Smrg# How to hardcode a shared library path into an executable.
472509885543Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
472609885543Smrg
472709885543Smrg# Whether we should hardcode library paths into libraries.
472809885543Smrghardcode_into_libs=$hardcode_into_libs
472909885543Smrg
473009885543Smrg# Flag to hardcode \$libdir into a binary during linking.
473109885543Smrg# This must work even if \$libdir does not exist.
473209885543Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
473309885543Smrg
473409885543Smrg# If ld is used when linking, flag to hardcode \$libdir into
473509885543Smrg# a binary during linking. This must work even if \$libdir does
473609885543Smrg# not exist.
473709885543Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
473809885543Smrg
473909885543Smrg# Whether we need a single -rpath flag with a separated argument.
474009885543Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
474109885543Smrg
474209885543Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
474309885543Smrg# resulting binary.
474409885543Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
474509885543Smrg
474609885543Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
474709885543Smrg# resulting binary.
474809885543Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
474909885543Smrg
475009885543Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
475109885543Smrg# the resulting binary.
475209885543Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
475309885543Smrg
475409885543Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
475509885543Smrg# and all subsequent libraries and executables linked against it.
475609885543Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
475709885543Smrg
475809885543Smrg# Variables whose values should be saved in libtool wrapper scripts and
475909885543Smrg# restored at relink time.
476009885543Smrgvariables_saved_for_relink="$variables_saved_for_relink"
476109885543Smrg
476209885543Smrg# Whether libtool must link a program against all its dependency libraries.
476309885543Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
476409885543Smrg
476509885543Smrg# Compile-time system search path for libraries
476609885543Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
476709885543Smrg
476809885543Smrg# Run-time system search path for libraries
476909885543Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
477009885543Smrg
477109885543Smrg# Fix the shell variable \$srcfile for the compiler.
47727104f784Smrgfix_srcfile_path=$lt_fix_srcfile_path
477309885543Smrg
477409885543Smrg# Set to yes if exported symbols are required.
477509885543Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
477609885543Smrg
477709885543Smrg# The commands to list exported symbols.
477809885543Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
477909885543Smrg
478009885543Smrg# The commands to extract the exported symbol list from a shared archive.
478109885543Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
478209885543Smrg
478309885543Smrg# Symbols that should not be listed in the preloaded symbols.
478409885543Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
478509885543Smrg
478609885543Smrg# Symbols that must always be exported.
478709885543Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
478809885543Smrg
478909885543Smrgifelse([$1],[],
479009885543Smrg[# ### END LIBTOOL CONFIG],
479109885543Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
479209885543Smrg
479309885543Smrg__EOF__
479409885543Smrg
479509885543Smrgifelse([$1],[], [
479609885543Smrg  case $host_os in
479709885543Smrg  aix3*)
479809885543Smrg    cat <<\EOF >> "$cfgfile"
479909885543Smrg
480009885543Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
480109885543Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
480209885543Smrg# vanish in a puff of smoke.
480309885543Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
480409885543Smrg  COLLECT_NAMES=
480509885543Smrg  export COLLECT_NAMES
480609885543Smrgfi
480709885543SmrgEOF
480809885543Smrg    ;;
480909885543Smrg  esac
481009885543Smrg
481109885543Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
481209885543Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
481309885543Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
481409885543Smrg  # is reportedly fixed, but why not run on old versions too?
481509885543Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
481609885543Smrg
481709885543Smrg  mv -f "$cfgfile" "$ofile" || \
481809885543Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
481909885543Smrg  chmod +x "$ofile"
482009885543Smrg])
482109885543Smrgelse
482209885543Smrg  # If there is no Makefile yet, we rely on a make rule to execute
482309885543Smrg  # `config.status --recheck' to rerun these tests and create the
482409885543Smrg  # libtool script then.
482509885543Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
482609885543Smrg  if test -f "$ltmain_in"; then
482709885543Smrg    test -f Makefile && make "$ltmain"
482809885543Smrg  fi
482909885543Smrgfi
483009885543Smrg])# AC_LIBTOOL_CONFIG
483109885543Smrg
483209885543Smrg
483309885543Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
483409885543Smrg# -------------------------------------------
483509885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
483609885543Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
483709885543Smrg
483809885543Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
483909885543Smrg
484009885543Smrgif test "$GCC" = yes; then
484109885543Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
484209885543Smrg
484309885543Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
484409885543Smrg    lt_cv_prog_compiler_rtti_exceptions,
484509885543Smrg    [-fno-rtti -fno-exceptions], [],
484609885543Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
484709885543Smrgfi
484809885543Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
484909885543Smrg
485009885543Smrg
485109885543Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
485209885543Smrg# ---------------------------------
485309885543SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
485409885543Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
48557104f784SmrgAC_REQUIRE([LT_AC_PROG_SED])
485609885543SmrgAC_REQUIRE([AC_PROG_NM])
485709885543SmrgAC_REQUIRE([AC_OBJEXT])
485809885543Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
485909885543SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
486009885543SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
486109885543Smrg[
486209885543Smrg# These are sane defaults that work on at least a few old systems.
486309885543Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
486409885543Smrg
486509885543Smrg# Character class describing NM global symbol codes.
486609885543Smrgsymcode='[[BCDEGRST]]'
486709885543Smrg
486809885543Smrg# Regexp to match symbols that can be accessed directly from C.
486909885543Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
487009885543Smrg
487109885543Smrg# Transform an extracted symbol line into a proper C declaration
487209885543Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
487309885543Smrg
487409885543Smrg# Transform an extracted symbol line into symbol name and symbol address
487509885543Smrglt_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'"
487609885543Smrg
487709885543Smrg# Define system-specific variables.
487809885543Smrgcase $host_os in
487909885543Smrgaix*)
488009885543Smrg  symcode='[[BCDT]]'
488109885543Smrg  ;;
488209885543Smrgcygwin* | mingw* | pw32*)
488309885543Smrg  symcode='[[ABCDGISTW]]'
488409885543Smrg  ;;
488509885543Smrghpux*) # Its linker distinguishes data from code symbols
488609885543Smrg  if test "$host_cpu" = ia64; then
488709885543Smrg    symcode='[[ABCDEGRST]]'
488809885543Smrg  fi
488909885543Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
489009885543Smrg  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'"
489109885543Smrg  ;;
489209885543Smrglinux* | k*bsd*-gnu)
489309885543Smrg  if test "$host_cpu" = ia64; then
489409885543Smrg    symcode='[[ABCDGIRSTW]]'
489509885543Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
489609885543Smrg    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'"
489709885543Smrg  fi
489809885543Smrg  ;;
489909885543Smrgirix* | nonstopux*)
490009885543Smrg  symcode='[[BCDEGRST]]'
490109885543Smrg  ;;
490209885543Smrgosf*)
490309885543Smrg  symcode='[[BCDEGQRST]]'
490409885543Smrg  ;;
490509885543Smrgsolaris*)
490609885543Smrg  symcode='[[BDRT]]'
490709885543Smrg  ;;
490809885543Smrgsco3.2v5*)
490909885543Smrg  symcode='[[DT]]'
491009885543Smrg  ;;
491109885543Smrgsysv4.2uw2*)
491209885543Smrg  symcode='[[DT]]'
491309885543Smrg  ;;
491409885543Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
491509885543Smrg  symcode='[[ABDT]]'
491609885543Smrg  ;;
491709885543Smrgsysv4)
491809885543Smrg  symcode='[[DFNSTU]]'
491909885543Smrg  ;;
492009885543Smrgesac
492109885543Smrg
492209885543Smrg# Handle CRLF in mingw tool chain
492309885543Smrgopt_cr=
492409885543Smrgcase $build_os in
492509885543Smrgmingw*)
492609885543Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
492709885543Smrg  ;;
492809885543Smrgesac
492909885543Smrg
493009885543Smrg# If we're using GNU nm, then use its standard symbol codes.
493109885543Smrgcase `$NM -V 2>&1` in
493209885543Smrg*GNU* | *'with BFD'*)
493309885543Smrg  symcode='[[ABCDGIRSTW]]' ;;
493409885543Smrgesac
493509885543Smrg
493609885543Smrg# Try without a prefix undercore, then with it.
493709885543Smrgfor ac_symprfx in "" "_"; do
493809885543Smrg
493909885543Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
494009885543Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
494109885543Smrg
494209885543Smrg  # Write the raw and C identifiers.
494309885543Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
494409885543Smrg
494509885543Smrg  # Check to see that the pipe works correctly.
494609885543Smrg  pipe_works=no
494709885543Smrg
494809885543Smrg  rm -f conftest*
494909885543Smrg  cat > conftest.$ac_ext <<EOF
495009885543Smrg#ifdef __cplusplus
495109885543Smrgextern "C" {
495209885543Smrg#endif
495309885543Smrgchar nm_test_var;
495409885543Smrgvoid nm_test_func(){}
495509885543Smrg#ifdef __cplusplus
495609885543Smrg}
495709885543Smrg#endif
495809885543Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
495909885543SmrgEOF
496009885543Smrg
496109885543Smrg  if AC_TRY_EVAL(ac_compile); then
496209885543Smrg    # Now try to grab the symbols.
496309885543Smrg    nlist=conftest.nm
496409885543Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
496509885543Smrg      # Try sorting and uniquifying the output.
496609885543Smrg      if sort "$nlist" | uniq > "$nlist"T; then
496709885543Smrg	mv -f "$nlist"T "$nlist"
496809885543Smrg      else
496909885543Smrg	rm -f "$nlist"T
497009885543Smrg      fi
497109885543Smrg
497209885543Smrg      # Make sure that we snagged all the symbols we need.
497309885543Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
497409885543Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
497509885543Smrg	  cat <<EOF > conftest.$ac_ext
497609885543Smrg#ifdef __cplusplus
497709885543Smrgextern "C" {
497809885543Smrg#endif
497909885543Smrg
498009885543SmrgEOF
498109885543Smrg	  # Now generate the symbol file.
498209885543Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
498309885543Smrg
498409885543Smrg	  cat <<EOF >> conftest.$ac_ext
498509885543Smrg#if defined (__STDC__) && __STDC__
498609885543Smrg# define lt_ptr_t void *
498709885543Smrg#else
498809885543Smrg# define lt_ptr_t char *
498909885543Smrg# define const
499009885543Smrg#endif
499109885543Smrg
499209885543Smrg/* The mapping between symbol names and symbols. */
499309885543Smrgconst struct {
499409885543Smrg  const char *name;
499509885543Smrg  lt_ptr_t address;
499609885543Smrg}
499709885543Smrglt_preloaded_symbols[[]] =
499809885543Smrg{
499909885543SmrgEOF
500009885543Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
500109885543Smrg	  cat <<\EOF >> conftest.$ac_ext
500209885543Smrg  {0, (lt_ptr_t) 0}
500309885543Smrg};
500409885543Smrg
500509885543Smrg#ifdef __cplusplus
500609885543Smrg}
500709885543Smrg#endif
500809885543SmrgEOF
500909885543Smrg	  # Now try linking the two files.
501009885543Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
501109885543Smrg	  lt_save_LIBS="$LIBS"
501209885543Smrg	  lt_save_CFLAGS="$CFLAGS"
501309885543Smrg	  LIBS="conftstm.$ac_objext"
501409885543Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
501509885543Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
501609885543Smrg	    pipe_works=yes
501709885543Smrg	  fi
501809885543Smrg	  LIBS="$lt_save_LIBS"
501909885543Smrg	  CFLAGS="$lt_save_CFLAGS"
502009885543Smrg	else
502109885543Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
502209885543Smrg	fi
502309885543Smrg      else
502409885543Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
502509885543Smrg      fi
502609885543Smrg    else
502709885543Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
502809885543Smrg    fi
502909885543Smrg  else
503009885543Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
503109885543Smrg    cat conftest.$ac_ext >&5
503209885543Smrg  fi
50337104f784Smrg  rm -rf conftest* conftst*
503409885543Smrg
503509885543Smrg  # Do not use the global_symbol_pipe unless it works.
503609885543Smrg  if test "$pipe_works" = yes; then
503709885543Smrg    break
503809885543Smrg  else
503909885543Smrg    lt_cv_sys_global_symbol_pipe=
504009885543Smrg  fi
504109885543Smrgdone
504209885543Smrg])
504309885543Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
504409885543Smrg  lt_cv_sys_global_symbol_to_cdecl=
504509885543Smrgfi
504609885543Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
504709885543Smrg  AC_MSG_RESULT(failed)
504809885543Smrgelse
504909885543Smrg  AC_MSG_RESULT(ok)
505009885543Smrgfi
505109885543Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
505209885543Smrg
505309885543Smrg
505409885543Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
505509885543Smrg# ---------------------------------------
505609885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
505709885543Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
505809885543Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
505909885543Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
506009885543Smrg
506109885543SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
506209885543Smrg ifelse([$1],[CXX],[
506309885543Smrg  # C++ specific cases for pic, static, wl, etc.
506409885543Smrg  if test "$GXX" = yes; then
506509885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
506609885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
506709885543Smrg
506809885543Smrg    case $host_os in
506909885543Smrg    aix*)
507009885543Smrg      # All AIX code is PIC.
507109885543Smrg      if test "$host_cpu" = ia64; then
507209885543Smrg	# AIX 5 now supports IA64 processor
507309885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
507409885543Smrg      fi
507509885543Smrg      ;;
507609885543Smrg    amigaos*)
507709885543Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
507809885543Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
507909885543Smrg      # like `-m68040'.
508009885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
508109885543Smrg      ;;
50827104f784Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
508309885543Smrg      # PIC is the default for these OSes.
508409885543Smrg      ;;
50857104f784Smrg    mingw* | cygwin* | os2* | pw32*)
508609885543Smrg      # This hack is so that the source file can tell whether it is being
508709885543Smrg      # built for inclusion in a dll (and should export symbols for example).
50887104f784Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
50897104f784Smrg      # (--disable-auto-import) libraries
50907104f784Smrg      m4_if([$1], [GCJ], [],
50917104f784Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
509209885543Smrg      ;;
509309885543Smrg    darwin* | rhapsody*)
509409885543Smrg      # PIC is the default on this platform
509509885543Smrg      # Common symbols not allowed in MH_DYLIB files
509609885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
509709885543Smrg      ;;
509809885543Smrg    *djgpp*)
509909885543Smrg      # DJGPP does not support shared libraries at all
510009885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
510109885543Smrg      ;;
51027104f784Smrg    interix[[3-9]]*)
510309885543Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
510409885543Smrg      # Instead, we relocate shared libraries at runtime.
510509885543Smrg      ;;
510609885543Smrg    sysv4*MP*)
510709885543Smrg      if test -d /usr/nec; then
510809885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
510909885543Smrg      fi
511009885543Smrg      ;;
511109885543Smrg    hpux*)
511209885543Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
511309885543Smrg      # not for PA HP-UX.
511409885543Smrg      case $host_cpu in
511509885543Smrg      hppa*64*|ia64*)
511609885543Smrg	;;
511709885543Smrg      *)
511809885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
511909885543Smrg	;;
512009885543Smrg      esac
512109885543Smrg      ;;
512209885543Smrg    *)
512309885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
512409885543Smrg      ;;
512509885543Smrg    esac
512609885543Smrg  else
512709885543Smrg    case $host_os in
51287104f784Smrg      aix[[4-9]]*)
512909885543Smrg	# All AIX code is PIC.
513009885543Smrg	if test "$host_cpu" = ia64; then
513109885543Smrg	  # AIX 5 now supports IA64 processor
513209885543Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
513309885543Smrg	else
513409885543Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
513509885543Smrg	fi
513609885543Smrg	;;
513709885543Smrg      chorus*)
513809885543Smrg	case $cc_basename in
513909885543Smrg	cxch68*)
514009885543Smrg	  # Green Hills C++ Compiler
514109885543Smrg	  # _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"
514209885543Smrg	  ;;
514309885543Smrg	esac
514409885543Smrg	;;
514509885543Smrg       darwin*)
514609885543Smrg         # PIC is the default on this platform
514709885543Smrg         # Common symbols not allowed in MH_DYLIB files
514809885543Smrg         case $cc_basename in
514909885543Smrg           xlc*)
515009885543Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
515109885543Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
515209885543Smrg           ;;
515309885543Smrg         esac
515409885543Smrg       ;;
515509885543Smrg      dgux*)
515609885543Smrg	case $cc_basename in
515709885543Smrg	  ec++*)
515809885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
515909885543Smrg	    ;;
516009885543Smrg	  ghcx*)
516109885543Smrg	    # Green Hills C++ Compiler
516209885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
516309885543Smrg	    ;;
516409885543Smrg	  *)
516509885543Smrg	    ;;
516609885543Smrg	esac
516709885543Smrg	;;
516809885543Smrg      freebsd* | dragonfly*)
516909885543Smrg	# FreeBSD uses GNU C++
517009885543Smrg	;;
517109885543Smrg      hpux9* | hpux10* | hpux11*)
517209885543Smrg	case $cc_basename in
517309885543Smrg	  CC*)
517409885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
517509885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
517609885543Smrg	    if test "$host_cpu" != ia64; then
517709885543Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
517809885543Smrg	    fi
517909885543Smrg	    ;;
518009885543Smrg	  aCC*)
518109885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
518209885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
518309885543Smrg	    case $host_cpu in
518409885543Smrg	    hppa*64*|ia64*)
518509885543Smrg	      # +Z the default
518609885543Smrg	      ;;
518709885543Smrg	    *)
518809885543Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
518909885543Smrg	      ;;
519009885543Smrg	    esac
519109885543Smrg	    ;;
519209885543Smrg	  *)
519309885543Smrg	    ;;
519409885543Smrg	esac
519509885543Smrg	;;
519609885543Smrg      interix*)
519709885543Smrg	# This is c89, which is MS Visual C++ (no shared libs)
519809885543Smrg	# Anyone wants to do a port?
519909885543Smrg	;;
520009885543Smrg      irix5* | irix6* | nonstopux*)
520109885543Smrg	case $cc_basename in
520209885543Smrg	  CC*)
520309885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
520409885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
520509885543Smrg	    # CC pic flag -KPIC is the default.
520609885543Smrg	    ;;
520709885543Smrg	  *)
520809885543Smrg	    ;;
520909885543Smrg	esac
521009885543Smrg	;;
521109885543Smrg      linux* | k*bsd*-gnu)
521209885543Smrg	case $cc_basename in
521309885543Smrg	  KCC*)
521409885543Smrg	    # KAI C++ Compiler
521509885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
521609885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
521709885543Smrg	    ;;
521809885543Smrg	  icpc* | ecpc*)
521909885543Smrg	    # Intel C++
522009885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
522109885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
522209885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
522309885543Smrg	    ;;
52247104f784Smrg	  pgCC* | pgcpp*)
522509885543Smrg	    # Portland Group C++ compiler.
522609885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
522709885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
522809885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
522909885543Smrg	    ;;
523009885543Smrg	  cxx*)
523109885543Smrg	    # Compaq C++
523209885543Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
523309885543Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
523409885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
523509885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
523609885543Smrg	    ;;
523709885543Smrg	  *)
52387104f784Smrg	    case `$CC -V 2>&1 | sed 5q` in
52397104f784Smrg	    *Sun\ C*)
52407104f784Smrg	      # Sun C++ 5.9
52417104f784Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
52427104f784Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
52437104f784Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
52447104f784Smrg	      ;;
52457104f784Smrg	    esac
524609885543Smrg	    ;;
524709885543Smrg	esac
524809885543Smrg	;;
524909885543Smrg      lynxos*)
525009885543Smrg	;;
525109885543Smrg      m88k*)
525209885543Smrg	;;
525309885543Smrg      mvs*)
525409885543Smrg	case $cc_basename in
525509885543Smrg	  cxx*)
525609885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
525709885543Smrg	    ;;
525809885543Smrg	  *)
525909885543Smrg	    ;;
526009885543Smrg	esac
526109885543Smrg	;;
52627104f784Smrg      netbsd*)
526309885543Smrg	;;
526409885543Smrg      osf3* | osf4* | osf5*)
526509885543Smrg	case $cc_basename in
526609885543Smrg	  KCC*)
526709885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
526809885543Smrg	    ;;
526909885543Smrg	  RCC*)
527009885543Smrg	    # Rational C++ 2.4.1
527109885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
527209885543Smrg	    ;;
527309885543Smrg	  cxx*)
527409885543Smrg	    # Digital/Compaq C++
527509885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
527609885543Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
527709885543Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
527809885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
527909885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
528009885543Smrg	    ;;
528109885543Smrg	  *)
528209885543Smrg	    ;;
528309885543Smrg	esac
528409885543Smrg	;;
528509885543Smrg      psos*)
528609885543Smrg	;;
528709885543Smrg      solaris*)
528809885543Smrg	case $cc_basename in
528909885543Smrg	  CC*)
529009885543Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
529109885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
529209885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
529309885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
529409885543Smrg	    ;;
529509885543Smrg	  gcx*)
529609885543Smrg	    # Green Hills C++ Compiler
529709885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
529809885543Smrg	    ;;
529909885543Smrg	  *)
530009885543Smrg	    ;;
530109885543Smrg	esac
530209885543Smrg	;;
530309885543Smrg      sunos4*)
530409885543Smrg	case $cc_basename in
530509885543Smrg	  CC*)
530609885543Smrg	    # Sun C++ 4.x
530709885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
530809885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
530909885543Smrg	    ;;
531009885543Smrg	  lcc*)
531109885543Smrg	    # Lucid
531209885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
531309885543Smrg	    ;;
531409885543Smrg	  *)
531509885543Smrg	    ;;
531609885543Smrg	esac
531709885543Smrg	;;
531809885543Smrg      tandem*)
531909885543Smrg	case $cc_basename in
532009885543Smrg	  NCC*)
532109885543Smrg	    # NonStop-UX NCC 3.20
532209885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
532309885543Smrg	    ;;
532409885543Smrg	  *)
532509885543Smrg	    ;;
532609885543Smrg	esac
532709885543Smrg	;;
532809885543Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
532909885543Smrg	case $cc_basename in
533009885543Smrg	  CC*)
533109885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
533209885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
533309885543Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
533409885543Smrg	    ;;
533509885543Smrg	esac
533609885543Smrg	;;
533709885543Smrg      vxworks*)
533809885543Smrg	;;
533909885543Smrg      *)
534009885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
534109885543Smrg	;;
534209885543Smrg    esac
534309885543Smrg  fi
534409885543Smrg],
534509885543Smrg[
534609885543Smrg  if test "$GCC" = yes; then
534709885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
534809885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
534909885543Smrg
535009885543Smrg    case $host_os in
535109885543Smrg      aix*)
535209885543Smrg      # All AIX code is PIC.
535309885543Smrg      if test "$host_cpu" = ia64; then
535409885543Smrg	# AIX 5 now supports IA64 processor
535509885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
535609885543Smrg      fi
535709885543Smrg      ;;
535809885543Smrg
535909885543Smrg    amigaos*)
536009885543Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
536109885543Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
536209885543Smrg      # like `-m68040'.
536309885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
536409885543Smrg      ;;
536509885543Smrg
53667104f784Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
536709885543Smrg      # PIC is the default for these OSes.
536809885543Smrg      ;;
536909885543Smrg
53707104f784Smrg    mingw* | cygwin* | pw32* | os2*)
537109885543Smrg      # This hack is so that the source file can tell whether it is being
537209885543Smrg      # built for inclusion in a dll (and should export symbols for example).
53737104f784Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
53747104f784Smrg      # (--disable-auto-import) libraries
53757104f784Smrg      m4_if([$1], [GCJ], [],
53767104f784Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
537709885543Smrg      ;;
537809885543Smrg
537909885543Smrg    darwin* | rhapsody*)
538009885543Smrg      # PIC is the default on this platform
538109885543Smrg      # Common symbols not allowed in MH_DYLIB files
538209885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
538309885543Smrg      ;;
538409885543Smrg
53857104f784Smrg    interix[[3-9]]*)
538609885543Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
538709885543Smrg      # Instead, we relocate shared libraries at runtime.
538809885543Smrg      ;;
538909885543Smrg
539009885543Smrg    msdosdjgpp*)
539109885543Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
539209885543Smrg      # on systems that don't support them.
539309885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
539409885543Smrg      enable_shared=no
539509885543Smrg      ;;
539609885543Smrg
539709885543Smrg    sysv4*MP*)
539809885543Smrg      if test -d /usr/nec; then
539909885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
540009885543Smrg      fi
540109885543Smrg      ;;
540209885543Smrg
540309885543Smrg    hpux*)
540409885543Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
540509885543Smrg      # not for PA HP-UX.
540609885543Smrg      case $host_cpu in
540709885543Smrg      hppa*64*|ia64*)
540809885543Smrg	# +Z the default
540909885543Smrg	;;
541009885543Smrg      *)
541109885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
541209885543Smrg	;;
541309885543Smrg      esac
541409885543Smrg      ;;
541509885543Smrg
541609885543Smrg    *)
541709885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
541809885543Smrg      ;;
541909885543Smrg    esac
542009885543Smrg  else
542109885543Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
542209885543Smrg    case $host_os in
542309885543Smrg    aix*)
542409885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
542509885543Smrg      if test "$host_cpu" = ia64; then
542609885543Smrg	# AIX 5 now supports IA64 processor
542709885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
542809885543Smrg      else
542909885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
543009885543Smrg      fi
543109885543Smrg      ;;
543209885543Smrg      darwin*)
543309885543Smrg        # PIC is the default on this platform
543409885543Smrg        # Common symbols not allowed in MH_DYLIB files
543509885543Smrg       case $cc_basename in
543609885543Smrg         xlc*)
543709885543Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
543809885543Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
543909885543Smrg         ;;
544009885543Smrg       esac
544109885543Smrg       ;;
544209885543Smrg
54437104f784Smrg    mingw* | cygwin* | pw32* | os2*)
544409885543Smrg      # This hack is so that the source file can tell whether it is being
544509885543Smrg      # built for inclusion in a dll (and should export symbols for example).
54467104f784Smrg      m4_if([$1], [GCJ], [],
54477104f784Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
544809885543Smrg      ;;
544909885543Smrg
545009885543Smrg    hpux9* | hpux10* | hpux11*)
545109885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
545209885543Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
545309885543Smrg      # not for PA HP-UX.
545409885543Smrg      case $host_cpu in
545509885543Smrg      hppa*64*|ia64*)
545609885543Smrg	# +Z the default
545709885543Smrg	;;
545809885543Smrg      *)
545909885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
546009885543Smrg	;;
546109885543Smrg      esac
546209885543Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
546309885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
546409885543Smrg      ;;
546509885543Smrg
546609885543Smrg    irix5* | irix6* | nonstopux*)
546709885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
546809885543Smrg      # PIC (with -KPIC) is the default.
546909885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
547009885543Smrg      ;;
547109885543Smrg
547209885543Smrg    newsos6)
547309885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
547409885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
547509885543Smrg      ;;
547609885543Smrg
547709885543Smrg    linux* | k*bsd*-gnu)
547809885543Smrg      case $cc_basename in
547909885543Smrg      icc* | ecc*)
548009885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
548109885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
548209885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
548309885543Smrg        ;;
548409885543Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
548509885543Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
548609885543Smrg	# which looks to be a dead project)
548709885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
548809885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
548909885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
549009885543Smrg        ;;
549109885543Smrg      ccc*)
549209885543Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
549309885543Smrg        # All Alpha code is PIC.
549409885543Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
549509885543Smrg        ;;
54967104f784Smrg      *)
54977104f784Smrg        case `$CC -V 2>&1 | sed 5q` in
54987104f784Smrg	*Sun\ C*)
54997104f784Smrg	  # Sun C 5.9
55007104f784Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55017104f784Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55027104f784Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
55037104f784Smrg	  ;;
55047104f784Smrg	*Sun\ F*)
55057104f784Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
55067104f784Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
55077104f784Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
55087104f784Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
55097104f784Smrg	  ;;
55107104f784Smrg	esac
55117104f784Smrg	;;
551209885543Smrg      esac
551309885543Smrg      ;;
551409885543Smrg
551509885543Smrg    osf3* | osf4* | osf5*)
551609885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
551709885543Smrg      # All OSF/1 code is PIC.
551809885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
551909885543Smrg      ;;
552009885543Smrg
55217104f784Smrg    rdos*)
55227104f784Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
55237104f784Smrg      ;;
55247104f784Smrg
552509885543Smrg    solaris*)
552609885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
552709885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
552809885543Smrg      case $cc_basename in
552909885543Smrg      f77* | f90* | f95*)
553009885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
553109885543Smrg      *)
553209885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
553309885543Smrg      esac
553409885543Smrg      ;;
553509885543Smrg
553609885543Smrg    sunos4*)
553709885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
553809885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
553909885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
554009885543Smrg      ;;
554109885543Smrg
554209885543Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
554309885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
554409885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
554509885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
554609885543Smrg      ;;
554709885543Smrg
554809885543Smrg    sysv4*MP*)
554909885543Smrg      if test -d /usr/nec ;then
555009885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
555109885543Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
555209885543Smrg      fi
555309885543Smrg      ;;
555409885543Smrg
555509885543Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
555609885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
555709885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
555809885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
555909885543Smrg      ;;
556009885543Smrg
556109885543Smrg    unicos*)
556209885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
556309885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
556409885543Smrg      ;;
556509885543Smrg
556609885543Smrg    uts4*)
556709885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
556809885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
556909885543Smrg      ;;
557009885543Smrg
557109885543Smrg    *)
557209885543Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
557309885543Smrg      ;;
557409885543Smrg    esac
557509885543Smrg  fi
557609885543Smrg])
557709885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
557809885543Smrg
557909885543Smrg#
558009885543Smrg# Check to make sure the PIC flag actually works.
558109885543Smrg#
558209885543Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
558309885543Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
55847104f784Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
558509885543Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
558609885543Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
558709885543Smrg     "" | " "*) ;;
558809885543Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
558909885543Smrg     esac],
559009885543Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
559109885543Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
559209885543Smrgfi
559309885543Smrgcase $host_os in
559409885543Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
559509885543Smrg  *djgpp*)
559609885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
559709885543Smrg    ;;
559809885543Smrg  *)
559909885543Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
560009885543Smrg    ;;
560109885543Smrgesac
560209885543Smrg
560309885543Smrg#
560409885543Smrg# Check to make sure the static flag actually works.
560509885543Smrg#
560609885543Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
560709885543SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
56087104f784Smrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
560909885543Smrg  $lt_tmp_static_flag,
561009885543Smrg  [],
561109885543Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
561209885543Smrg])
561309885543Smrg
561409885543Smrg
561509885543Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
561609885543Smrg# ------------------------------------
561709885543Smrg# See if the linker supports building shared libraries.
561809885543SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
56197104f784Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
56207104f784SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
562109885543Smrgifelse([$1],[CXX],[
562209885543Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
562309885543Smrg  case $host_os in
56247104f784Smrg  aix[[4-9]]*)
562509885543Smrg    # If we're using GNU nm, then we don't want the "-C" option.
562609885543Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
562709885543Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
562809885543Smrg      _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'
562909885543Smrg    else
563009885543Smrg      _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'
563109885543Smrg    fi
563209885543Smrg    ;;
563309885543Smrg  pw32*)
563409885543Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
563509885543Smrg  ;;
563609885543Smrg  cygwin* | mingw*)
56377104f784Smrg    _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'
563809885543Smrg  ;;
563909885543Smrg  *)
564009885543Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
564109885543Smrg  ;;
564209885543Smrg  esac
56437104f784Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
564409885543Smrg],[
564509885543Smrg  runpath_var=
564609885543Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
564709885543Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
564809885543Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
564909885543Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
565009885543Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
565109885543Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
565209885543Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
565309885543Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
565409885543Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
565509885543Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
565609885543Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
565709885543Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
565809885543Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
565909885543Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
566009885543Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
566109885543Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
566209885543Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
566309885543Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
566409885543Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
566509885543Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
566609885543Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
566709885543Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
566809885543Smrg  # included in the symbol list
566909885543Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
567009885543Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
567109885543Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
567209885543Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
567309885543Smrg  # as well as any symbol that contains `d'.
56747104f784Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
567509885543Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
567609885543Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
567709885543Smrg  # the symbol is explicitly referenced.  Since portable code cannot
567809885543Smrg  # rely on this symbol name, it's probably fine to never include it in
567909885543Smrg  # preloaded symbol tables.
56807104f784Smrg  # Exclude shared library initialization/finalization symbols.
56817104f784Smrgdnl Note also adjust exclude_expsyms for C++ above.
568209885543Smrg  extract_expsyms_cmds=
568309885543Smrg  # Just being paranoid about ensuring that cc_basename is set.
568409885543Smrg  _LT_CC_BASENAME([$compiler])
568509885543Smrg  case $host_os in
568609885543Smrg  cygwin* | mingw* | pw32*)
568709885543Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
568809885543Smrg    # When not using gcc, we currently assume that we are using
568909885543Smrg    # Microsoft Visual C++.
569009885543Smrg    if test "$GCC" != yes; then
569109885543Smrg      with_gnu_ld=no
569209885543Smrg    fi
569309885543Smrg    ;;
569409885543Smrg  interix*)
569509885543Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
569609885543Smrg    with_gnu_ld=yes
569709885543Smrg    ;;
569809885543Smrg  openbsd*)
569909885543Smrg    with_gnu_ld=no
570009885543Smrg    ;;
570109885543Smrg  esac
570209885543Smrg
570309885543Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
570409885543Smrg  if test "$with_gnu_ld" = yes; then
570509885543Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
570609885543Smrg    wlarc='${wl}'
570709885543Smrg
570809885543Smrg    # Set some defaults for GNU ld with shared library support. These
570909885543Smrg    # are reset later if shared libraries are not supported. Putting them
571009885543Smrg    # here allows them to be overridden if necessary.
571109885543Smrg    runpath_var=LD_RUN_PATH
571209885543Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
571309885543Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
571409885543Smrg    # ancient GNU ld didn't support --whole-archive et. al.
571509885543Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
571609885543Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
571709885543Smrg      else
571809885543Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
571909885543Smrg    fi
572009885543Smrg    supports_anon_versioning=no
572109885543Smrg    case `$LD -v 2>/dev/null` in
572209885543Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
572309885543Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
572409885543Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
572509885543Smrg      *\ 2.11.*) ;; # other 2.11 versions
572609885543Smrg      *) supports_anon_versioning=yes ;;
572709885543Smrg    esac
572809885543Smrg
572909885543Smrg    # See if GNU ld supports shared libraries.
573009885543Smrg    case $host_os in
57317104f784Smrg    aix[[3-9]]*)
573209885543Smrg      # On AIX/PPC, the GNU linker is very broken
573309885543Smrg      if test "$host_cpu" != ia64; then
573409885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
573509885543Smrg	cat <<EOF 1>&2
573609885543Smrg
573709885543Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
573809885543Smrg*** to be unable to reliably create shared libraries on AIX.
573909885543Smrg*** Therefore, libtool is disabling shared libraries support.  If you
574009885543Smrg*** really care for shared libraries, you may want to modify your PATH
574109885543Smrg*** so that a non-GNU linker is found, and then restart.
574209885543Smrg
574309885543SmrgEOF
574409885543Smrg      fi
574509885543Smrg      ;;
574609885543Smrg
574709885543Smrg    amigaos*)
574809885543Smrg      _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)'
574909885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
575009885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
575109885543Smrg
575209885543Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
575309885543Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
575409885543Smrg      # to version 4, is to share data among multiple programs linked
575509885543Smrg      # with the same dynamic library.  Since this doesn't match the
575609885543Smrg      # behavior of shared libraries on other platforms, we can't use
575709885543Smrg      # them.
575809885543Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
575909885543Smrg      ;;
576009885543Smrg
576109885543Smrg    beos*)
576209885543Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
576309885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
576409885543Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
576509885543Smrg	# support --undefined.  This deserves some investigation.  FIXME
576609885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
576709885543Smrg      else
576809885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
576909885543Smrg      fi
577009885543Smrg      ;;
577109885543Smrg
577209885543Smrg    cygwin* | mingw* | pw32*)
577309885543Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
577409885543Smrg      # as there is no search path for DLLs.
577509885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
577609885543Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
577709885543Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
577809885543Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
57797104f784Smrg      _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'
578009885543Smrg
578109885543Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
578209885543Smrg        _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'
578309885543Smrg	# If the export-symbols file already is a .def file (1st line
578409885543Smrg	# is EXPORTS), use it as is; otherwise, prepend...
578509885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
578609885543Smrg	  cp $export_symbols $output_objdir/$soname.def;
578709885543Smrg	else
578809885543Smrg	  echo EXPORTS > $output_objdir/$soname.def;
578909885543Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
579009885543Smrg	fi~
579109885543Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
579209885543Smrg      else
579309885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
579409885543Smrg      fi
579509885543Smrg      ;;
579609885543Smrg
57977104f784Smrg    interix[[3-9]]*)
579809885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
579909885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
580009885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
580109885543Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
580209885543Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
580309885543Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
580409885543Smrg      # default) and relocated if they conflict, which is a slow very memory
580509885543Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
580609885543Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
580709885543Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
580809885543Smrg      _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'
580909885543Smrg      _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'
581009885543Smrg      ;;
581109885543Smrg
58127104f784Smrg    gnu* | linux* | k*bsd*-gnu)
581309885543Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
581409885543Smrg	tmp_addflag=
581509885543Smrg	case $cc_basename,$host_cpu in
581609885543Smrg	pgcc*)				# Portland Group C compiler
581709885543Smrg	  _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'
581809885543Smrg	  tmp_addflag=' $pic_flag'
581909885543Smrg	  ;;
582009885543Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
582109885543Smrg	  _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'
582209885543Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
582309885543Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
582409885543Smrg	  tmp_addflag=' -i_dynamic' ;;
582509885543Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
582609885543Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
582709885543Smrg	ifc* | ifort*)			# Intel Fortran compiler
582809885543Smrg	  tmp_addflag=' -nofor_main' ;;
582909885543Smrg	esac
58307104f784Smrg	case `$CC -V 2>&1 | sed 5q` in
58317104f784Smrg	*Sun\ C*)			# Sun C 5.9
58327104f784Smrg	  _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'
58337104f784Smrg	  tmp_sharedflag='-G' ;;
58347104f784Smrg	*Sun\ F*)			# Sun Fortran 8.3
58357104f784Smrg	  tmp_sharedflag='-G' ;;
58367104f784Smrg	*)
58377104f784Smrg	  tmp_sharedflag='-shared' ;;
58387104f784Smrg	esac
58397104f784Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
584009885543Smrg
584109885543Smrg	if test $supports_anon_versioning = yes; then
584209885543Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
584309885543Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
584409885543Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
58457104f784Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
584609885543Smrg	fi
584709885543Smrg      else
584809885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
584909885543Smrg      fi
585009885543Smrg      ;;
585109885543Smrg
58527104f784Smrg    netbsd*)
585309885543Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
585409885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
585509885543Smrg	wlarc=
585609885543Smrg      else
585709885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
585809885543Smrg	_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'
585909885543Smrg      fi
586009885543Smrg      ;;
586109885543Smrg
586209885543Smrg    solaris*)
586309885543Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
586409885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
586509885543Smrg	cat <<EOF 1>&2
586609885543Smrg
586709885543Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
586809885543Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
586909885543Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
587009885543Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
587109885543Smrg*** your PATH or compiler configuration so that the native linker is
587209885543Smrg*** used, and then restart.
587309885543Smrg
587409885543SmrgEOF
587509885543Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
587609885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
587709885543Smrg	_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'
587809885543Smrg      else
587909885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
588009885543Smrg      fi
588109885543Smrg      ;;
588209885543Smrg
588309885543Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
588409885543Smrg      case `$LD -v 2>&1` in
58857104f784Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
588609885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
588709885543Smrg	cat <<_LT_EOF 1>&2
588809885543Smrg
588909885543Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
589009885543Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
589109885543Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
589209885543Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
589309885543Smrg*** your PATH or compiler configuration so that the native linker is
589409885543Smrg*** used, and then restart.
589509885543Smrg
589609885543Smrg_LT_EOF
589709885543Smrg	;;
589809885543Smrg	*)
589909885543Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
590009885543Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
590109885543Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
590209885543Smrg	    _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'
590309885543Smrg	  else
590409885543Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
590509885543Smrg	  fi
590609885543Smrg	;;
590709885543Smrg      esac
590809885543Smrg      ;;
590909885543Smrg
591009885543Smrg    sunos4*)
591109885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
591209885543Smrg      wlarc=
591309885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
591409885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
591509885543Smrg      ;;
591609885543Smrg
591709885543Smrg    *)
591809885543Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
591909885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
592009885543Smrg	_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'
592109885543Smrg      else
592209885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
592309885543Smrg      fi
592409885543Smrg      ;;
592509885543Smrg    esac
592609885543Smrg
592709885543Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
592809885543Smrg      runpath_var=
592909885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
593009885543Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
593109885543Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
593209885543Smrg    fi
593309885543Smrg  else
593409885543Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
593509885543Smrg    case $host_os in
593609885543Smrg    aix3*)
593709885543Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
593809885543Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
593909885543Smrg      _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'
594009885543Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
594109885543Smrg      # are no directories specified by -L.
594209885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
594309885543Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
594409885543Smrg	# Neither direct hardcoding nor static linking is supported with a
594509885543Smrg	# broken collect2.
594609885543Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
594709885543Smrg      fi
594809885543Smrg      ;;
594909885543Smrg
59507104f784Smrg    aix[[4-9]]*)
595109885543Smrg      if test "$host_cpu" = ia64; then
595209885543Smrg	# On IA64, the linker does run time linking by default, so we don't
595309885543Smrg	# have to do anything special.
595409885543Smrg	aix_use_runtimelinking=no
595509885543Smrg	exp_sym_flag='-Bexport'
595609885543Smrg	no_entry_flag=""
595709885543Smrg      else
595809885543Smrg	# If we're using GNU nm, then we don't want the "-C" option.
595909885543Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
596009885543Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
596109885543Smrg	  _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'
596209885543Smrg	else
596309885543Smrg	  _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'
596409885543Smrg	fi
596509885543Smrg	aix_use_runtimelinking=no
596609885543Smrg
596709885543Smrg	# Test if we are trying to use run time linking or normal
596809885543Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
596909885543Smrg	# need to do runtime linking.
59707104f784Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
597109885543Smrg	  for ld_flag in $LDFLAGS; do
597209885543Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
597309885543Smrg  	    aix_use_runtimelinking=yes
597409885543Smrg  	    break
597509885543Smrg  	  fi
597609885543Smrg	  done
597709885543Smrg	  ;;
597809885543Smrg	esac
597909885543Smrg
598009885543Smrg	exp_sym_flag='-bexport'
598109885543Smrg	no_entry_flag='-bnoentry'
598209885543Smrg      fi
598309885543Smrg
598409885543Smrg      # When large executables or shared objects are built, AIX ld can
598509885543Smrg      # have problems creating the table of contents.  If linking a library
598609885543Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
598709885543Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
598809885543Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
598909885543Smrg
599009885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
599109885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
599209885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
599309885543Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
599409885543Smrg
599509885543Smrg      if test "$GCC" = yes; then
599609885543Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
599709885543Smrg	# We only want to do this on AIX 4.2 and lower, the check
599809885543Smrg	# below for broken collect2 doesn't work under 4.3+
599909885543Smrg	  collect2name=`${CC} -print-prog-name=collect2`
600009885543Smrg	  if test -f "$collect2name" && \
600109885543Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
600209885543Smrg	  then
600309885543Smrg  	  # We have reworked collect2
60047104f784Smrg  	  :
600509885543Smrg	  else
600609885543Smrg  	  # We have old collect2
600709885543Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
600809885543Smrg  	  # It fails to find uninstalled libraries when the uninstalled
600909885543Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
601009885543Smrg  	  # to unsupported forces relinking
601109885543Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
601209885543Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
601309885543Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
601409885543Smrg	  fi
601509885543Smrg	  ;;
601609885543Smrg	esac
601709885543Smrg	shared_flag='-shared'
601809885543Smrg	if test "$aix_use_runtimelinking" = yes; then
601909885543Smrg	  shared_flag="$shared_flag "'${wl}-G'
602009885543Smrg	fi
602109885543Smrg      else
602209885543Smrg	# not using gcc
602309885543Smrg	if test "$host_cpu" = ia64; then
602409885543Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
602509885543Smrg  	# chokes on -Wl,-G. The following line is correct:
602609885543Smrg	  shared_flag='-G'
602709885543Smrg	else
602809885543Smrg	  if test "$aix_use_runtimelinking" = yes; then
602909885543Smrg	    shared_flag='${wl}-G'
603009885543Smrg	  else
603109885543Smrg	    shared_flag='${wl}-bM:SRE'
603209885543Smrg	  fi
603309885543Smrg	fi
603409885543Smrg      fi
603509885543Smrg
603609885543Smrg      # It seems that -bexpall does not export symbols beginning with
603709885543Smrg      # underscore (_), so it is better to generate a list of symbols to export.
603809885543Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
603909885543Smrg      if test "$aix_use_runtimelinking" = yes; then
604009885543Smrg	# Warning - without using the other runtime loading flags (-brtl),
604109885543Smrg	# -berok will link without error, but may produce a broken library.
604209885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
604309885543Smrg       # Determine the default libpath from the value encoded in an empty executable.
604409885543Smrg       _LT_AC_SYS_LIBPATH_AIX
604509885543Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
604609885543Smrg	_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"
604709885543Smrg       else
604809885543Smrg	if test "$host_cpu" = ia64; then
604909885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
605009885543Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
605109885543Smrg	  _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"
605209885543Smrg	else
605309885543Smrg	 # Determine the default libpath from the value encoded in an empty executable.
605409885543Smrg	 _LT_AC_SYS_LIBPATH_AIX
605509885543Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
605609885543Smrg	  # Warning - without using the other run time loading flags,
605709885543Smrg	  # -berok will link without error, but may produce a broken library.
605809885543Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
605909885543Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
606009885543Smrg	  # Exported symbols can be pulled into shared objects from archives
606109885543Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
606209885543Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
606309885543Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
606409885543Smrg	  _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'
606509885543Smrg	fi
606609885543Smrg      fi
606709885543Smrg      ;;
606809885543Smrg
606909885543Smrg    amigaos*)
607009885543Smrg      _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)'
607109885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
607209885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
607309885543Smrg      # see comment about different semantics on the GNU ld section
607409885543Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
607509885543Smrg      ;;
607609885543Smrg
607709885543Smrg    bsdi[[45]]*)
607809885543Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
607909885543Smrg      ;;
608009885543Smrg
608109885543Smrg    cygwin* | mingw* | pw32*)
608209885543Smrg      # When not using gcc, we currently assume that we are using
608309885543Smrg      # Microsoft Visual C++.
608409885543Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
608509885543Smrg      # no search path for DLLs.
608609885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
608709885543Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
608809885543Smrg      # Tell ltmain to make .lib files, not .a files.
608909885543Smrg      libext=lib
609009885543Smrg      # Tell ltmain to make .dll files, not .so files.
609109885543Smrg      shrext_cmds=".dll"
609209885543Smrg      # FIXME: Setting linknames here is a bad hack.
609309885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
609409885543Smrg      # The linker will automatically build a .lib file if we build a DLL.
609509885543Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
609609885543Smrg      # FIXME: Should let the user specify the lib program.
60977104f784Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
609809885543Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
609909885543Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
610009885543Smrg      ;;
610109885543Smrg
610209885543Smrg    darwin* | rhapsody*)
610309885543Smrg      case $host_os in
610409885543Smrg        rhapsody* | darwin1.[[012]])
610509885543Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
610609885543Smrg         ;;
610709885543Smrg       *) # Darwin 1.3 on
610809885543Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
610909885543Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
611009885543Smrg         else
611109885543Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
611209885543Smrg             10.[[012]])
611309885543Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
611409885543Smrg               ;;
611509885543Smrg             10.*)
611609885543Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
611709885543Smrg               ;;
611809885543Smrg           esac
611909885543Smrg         fi
612009885543Smrg         ;;
612109885543Smrg      esac
612209885543Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
612309885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
612409885543Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
612509885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
612609885543Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
612709885543Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
612809885543Smrg    if test "$GCC" = yes ; then
612909885543Smrg    	output_verbose_link_cmd='echo'
61307104f784Smrg        _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}"
61317104f784Smrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
61327104f784Smrg        _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}"
61337104f784Smrg        _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}"
613409885543Smrg    else
613509885543Smrg      case $cc_basename in
613609885543Smrg        xlc*)
613709885543Smrg         output_verbose_link_cmd='echo'
61387104f784Smrg         _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'
613909885543Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
614009885543Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
61417104f784Smrg         _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}'
614209885543Smrg          _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}'
614309885543Smrg          ;;
614409885543Smrg       *)
614509885543Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
614609885543Smrg          ;;
614709885543Smrg      esac
614809885543Smrg    fi
614909885543Smrg      ;;
615009885543Smrg
615109885543Smrg    dgux*)
615209885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
615309885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
615409885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
615509885543Smrg      ;;
615609885543Smrg
615709885543Smrg    freebsd1*)
615809885543Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
615909885543Smrg      ;;
616009885543Smrg
616109885543Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
616209885543Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
616309885543Smrg    # does not break anything, and helps significantly (at the cost of a little
616409885543Smrg    # extra space).
616509885543Smrg    freebsd2.2*)
616609885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
616709885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
616809885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
616909885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
617009885543Smrg      ;;
617109885543Smrg
617209885543Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
617309885543Smrg    freebsd2*)
617409885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
617509885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
617609885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
617709885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
617809885543Smrg      ;;
617909885543Smrg
618009885543Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
618109885543Smrg    freebsd* | dragonfly*)
618209885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
618309885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
618409885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
618509885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
618609885543Smrg      ;;
618709885543Smrg
618809885543Smrg    hpux9*)
618909885543Smrg      if test "$GCC" = yes; then
619009885543Smrg	_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'
619109885543Smrg      else
619209885543Smrg	_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'
619309885543Smrg      fi
619409885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
619509885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
619609885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
619709885543Smrg
619809885543Smrg      # hardcode_minus_L: Not really in the search PATH,
619909885543Smrg      # but as the default location of the library.
620009885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
620109885543Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
620209885543Smrg      ;;
620309885543Smrg
620409885543Smrg    hpux10*)
620509885543Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
620609885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
620709885543Smrg      else
620809885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
620909885543Smrg      fi
621009885543Smrg      if test "$with_gnu_ld" = no; then
621109885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
621209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
621309885543Smrg
621409885543Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
621509885543Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
621609885543Smrg
621709885543Smrg	# hardcode_minus_L: Not really in the search PATH,
621809885543Smrg	# but as the default location of the library.
621909885543Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
622009885543Smrg      fi
622109885543Smrg      ;;
622209885543Smrg
622309885543Smrg    hpux11*)
622409885543Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
622509885543Smrg	case $host_cpu in
622609885543Smrg	hppa*64*)
622709885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
622809885543Smrg	  ;;
622909885543Smrg	ia64*)
623009885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
623109885543Smrg	  ;;
623209885543Smrg	*)
623309885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
623409885543Smrg	  ;;
623509885543Smrg	esac
623609885543Smrg      else
623709885543Smrg	case $host_cpu in
623809885543Smrg	hppa*64*)
623909885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
624009885543Smrg	  ;;
624109885543Smrg	ia64*)
624209885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
624309885543Smrg	  ;;
624409885543Smrg	*)
624509885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
624609885543Smrg	  ;;
624709885543Smrg	esac
624809885543Smrg      fi
624909885543Smrg      if test "$with_gnu_ld" = no; then
625009885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
625109885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
625209885543Smrg
625309885543Smrg	case $host_cpu in
625409885543Smrg	hppa*64*|ia64*)
625509885543Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
625609885543Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
625709885543Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
625809885543Smrg	  ;;
625909885543Smrg	*)
626009885543Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
626109885543Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
626209885543Smrg
626309885543Smrg	  # hardcode_minus_L: Not really in the search PATH,
626409885543Smrg	  # but as the default location of the library.
626509885543Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
626609885543Smrg	  ;;
626709885543Smrg	esac
626809885543Smrg      fi
626909885543Smrg      ;;
627009885543Smrg
627109885543Smrg    irix5* | irix6* | nonstopux*)
627209885543Smrg      if test "$GCC" = yes; then
627309885543Smrg	_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'
627409885543Smrg      else
627509885543Smrg	_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'
627609885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
627709885543Smrg      fi
627809885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
627909885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
628009885543Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
628109885543Smrg      ;;
628209885543Smrg
62837104f784Smrg    netbsd*)
628409885543Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
628509885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
628609885543Smrg      else
628709885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
628809885543Smrg      fi
628909885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
629009885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
629109885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
629209885543Smrg      ;;
629309885543Smrg
629409885543Smrg    newsos6)
629509885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
629609885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
629709885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
629809885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
629909885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
630009885543Smrg      ;;
630109885543Smrg
630209885543Smrg    openbsd*)
63037104f784Smrg      if test -f /usr/libexec/ld.so; then
63047104f784Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
63057104f784Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
63067104f784Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
63077104f784Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
63087104f784Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
63097104f784Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
63107104f784Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
63117104f784Smrg	else
63127104f784Smrg	  case $host_os in
63137104f784Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
63147104f784Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
63157104f784Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
63167104f784Smrg	     ;;
63177104f784Smrg	   *)
63187104f784Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
63197104f784Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
63207104f784Smrg	     ;;
63217104f784Smrg	  esac
63227104f784Smrg        fi
632309885543Smrg      else
63247104f784Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
632509885543Smrg      fi
632609885543Smrg      ;;
632709885543Smrg
632809885543Smrg    os2*)
632909885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
633009885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
633109885543Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
633209885543Smrg      _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'
633309885543Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
633409885543Smrg      ;;
633509885543Smrg
633609885543Smrg    osf3*)
633709885543Smrg      if test "$GCC" = yes; then
633809885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
633909885543Smrg	_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'
634009885543Smrg      else
634109885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
634209885543Smrg	_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'
634309885543Smrg      fi
634409885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
634509885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
634609885543Smrg      ;;
634709885543Smrg
634809885543Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
634909885543Smrg      if test "$GCC" = yes; then
635009885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
635109885543Smrg	_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'
635209885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
635309885543Smrg      else
635409885543Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
635509885543Smrg	_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'
635609885543Smrg	_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~
635709885543Smrg	$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'
635809885543Smrg
635909885543Smrg	# Both c and cxx compiler support -rpath directly
636009885543Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
636109885543Smrg      fi
636209885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
636309885543Smrg      ;;
636409885543Smrg
636509885543Smrg    solaris*)
636609885543Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
636709885543Smrg      if test "$GCC" = yes; then
636809885543Smrg	wlarc='${wl}'
636909885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
637009885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
637109885543Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
637209885543Smrg      else
637309885543Smrg	wlarc=''
637409885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
637509885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
637609885543Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
637709885543Smrg      fi
637809885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
637909885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
638009885543Smrg      case $host_os in
638109885543Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
638209885543Smrg      *)
63837104f784Smrg	# The compiler driver will combine and reorder linker options,
63847104f784Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
63857104f784Smrg	# but is careful enough not to reorder.
638609885543Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
63877104f784Smrg	if test "$GCC" = yes; then
63887104f784Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
63897104f784Smrg	else
63907104f784Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
63917104f784Smrg	fi
63927104f784Smrg	;;
639309885543Smrg      esac
639409885543Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
639509885543Smrg      ;;
639609885543Smrg
639709885543Smrg    sunos4*)
639809885543Smrg      if test "x$host_vendor" = xsequent; then
639909885543Smrg	# Use $CC to link under sequent, because it throws in some extra .o
640009885543Smrg	# files that make .init and .fini sections work.
640109885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
640209885543Smrg      else
640309885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
640409885543Smrg      fi
640509885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
640609885543Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
640709885543Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
640809885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
640909885543Smrg      ;;
641009885543Smrg
641109885543Smrg    sysv4)
641209885543Smrg      case $host_vendor in
641309885543Smrg	sni)
641409885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
641509885543Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
641609885543Smrg	;;
641709885543Smrg	siemens)
641809885543Smrg	  ## LD is ld it makes a PLAMLIB
641909885543Smrg	  ## CC just makes a GrossModule.
642009885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
642109885543Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
642209885543Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
642309885543Smrg        ;;
642409885543Smrg	motorola)
642509885543Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
642609885543Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
642709885543Smrg	;;
642809885543Smrg      esac
642909885543Smrg      runpath_var='LD_RUN_PATH'
643009885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
643109885543Smrg      ;;
643209885543Smrg
643309885543Smrg    sysv4.3*)
643409885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
643509885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
643609885543Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
643709885543Smrg      ;;
643809885543Smrg
643909885543Smrg    sysv4*MP*)
644009885543Smrg      if test -d /usr/nec; then
644109885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
644209885543Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
644309885543Smrg	runpath_var=LD_RUN_PATH
644409885543Smrg	hardcode_runpath_var=yes
644509885543Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
644609885543Smrg      fi
644709885543Smrg      ;;
644809885543Smrg
64497104f784Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
645009885543Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
645109885543Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
645209885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
645309885543Smrg      runpath_var='LD_RUN_PATH'
645409885543Smrg
645509885543Smrg      if test "$GCC" = yes; then
645609885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
645709885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
645809885543Smrg      else
645909885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
646009885543Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
646109885543Smrg      fi
646209885543Smrg      ;;
646309885543Smrg
646409885543Smrg    sysv5* | sco3.2v5* | sco5v6*)
646509885543Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
646609885543Smrg      # link with -lc, and that would cause any symbols used from libc to
646709885543Smrg      # always be unresolved, which means just about no library would
646809885543Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
646909885543Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
647009885543Smrg      # as -z defs.
647109885543Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
647209885543Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
647309885543Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
647409885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
647509885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
647609885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
647709885543Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
647809885543Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
647909885543Smrg      runpath_var='LD_RUN_PATH'
648009885543Smrg
648109885543Smrg      if test "$GCC" = yes; then
648209885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
648309885543Smrg	_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'
648409885543Smrg      else
648509885543Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
648609885543Smrg	_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'
648709885543Smrg      fi
648809885543Smrg      ;;
648909885543Smrg
649009885543Smrg    uts4*)
649109885543Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
649209885543Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
649309885543Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
649409885543Smrg      ;;
649509885543Smrg
649609885543Smrg    *)
649709885543Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
649809885543Smrg      ;;
649909885543Smrg    esac
650009885543Smrg  fi
650109885543Smrg])
650209885543SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
650309885543Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
650409885543Smrg
650509885543Smrg#
650609885543Smrg# Do we need to explicitly link libc?
650709885543Smrg#
650809885543Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
650909885543Smrgx|xyes)
651009885543Smrg  # Assume -lc should be added
651109885543Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
651209885543Smrg
651309885543Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
651409885543Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
651509885543Smrg    *'~'*)
651609885543Smrg      # FIXME: we may have to deal with multi-command sequences.
651709885543Smrg      ;;
651809885543Smrg    '$CC '*)
651909885543Smrg      # Test whether the compiler implicitly links with -lc since on some
652009885543Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
652109885543Smrg      # to ld, don't add -lc before -lgcc.
652209885543Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
652309885543Smrg      $rm conftest*
65247104f784Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
652509885543Smrg
652609885543Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
652709885543Smrg        soname=conftest
652809885543Smrg        lib=conftest
652909885543Smrg        libobjs=conftest.$ac_objext
653009885543Smrg        deplibs=
653109885543Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
653209885543Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
653309885543Smrg        compiler_flags=-v
653409885543Smrg        linker_flags=-v
653509885543Smrg        verstring=
653609885543Smrg        output_objdir=.
653709885543Smrg        libname=conftest
653809885543Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
653909885543Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
654009885543Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
654109885543Smrg        then
654209885543Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
654309885543Smrg        else
654409885543Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
654509885543Smrg        fi
654609885543Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
654709885543Smrg      else
654809885543Smrg        cat conftest.err 1>&5
654909885543Smrg      fi
655009885543Smrg      $rm conftest*
655109885543Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
655209885543Smrg      ;;
655309885543Smrg    esac
655409885543Smrg  fi
655509885543Smrg  ;;
655609885543Smrgesac
655709885543Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
655809885543Smrg
655909885543Smrg
656009885543Smrg# _LT_AC_FILE_LTDLL_C
656109885543Smrg# -------------------
656209885543Smrg# Be careful that the start marker always follows a newline.
656309885543SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
656409885543Smrg# /* ltdll.c starts here */
656509885543Smrg# #define WIN32_LEAN_AND_MEAN
656609885543Smrg# #include <windows.h>
656709885543Smrg# #undef WIN32_LEAN_AND_MEAN
656809885543Smrg# #include <stdio.h>
656909885543Smrg#
657009885543Smrg# #ifndef __CYGWIN__
657109885543Smrg# #  ifdef __CYGWIN32__
657209885543Smrg# #    define __CYGWIN__ __CYGWIN32__
657309885543Smrg# #  endif
657409885543Smrg# #endif
657509885543Smrg#
657609885543Smrg# #ifdef __cplusplus
657709885543Smrg# extern "C" {
657809885543Smrg# #endif
657909885543Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
658009885543Smrg# #ifdef __cplusplus
658109885543Smrg# }
658209885543Smrg# #endif
658309885543Smrg#
658409885543Smrg# #ifdef __CYGWIN__
658509885543Smrg# #include <cygwin/cygwin_dll.h>
658609885543Smrg# DECLARE_CYGWIN_DLL( DllMain );
658709885543Smrg# #endif
658809885543Smrg# HINSTANCE __hDllInstance_base;
658909885543Smrg#
659009885543Smrg# BOOL APIENTRY
659109885543Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
659209885543Smrg# {
659309885543Smrg#   __hDllInstance_base = hInst;
659409885543Smrg#   return TRUE;
659509885543Smrg# }
659609885543Smrg# /* ltdll.c ends here */
659709885543Smrg])# _LT_AC_FILE_LTDLL_C
659809885543Smrg
659909885543Smrg
660009885543Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
660109885543Smrg# ---------------------------------
660209885543SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
660309885543Smrg
660409885543Smrg
660509885543Smrg# old names
660609885543SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
660709885543SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
660809885543SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
660909885543SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
661009885543SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
661109885543SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
661209885543SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
661309885543Smrg
661409885543Smrg# This is just to silence aclocal about the macro not being used
661509885543Smrgifelse([AC_DISABLE_FAST_INSTALL])
661609885543Smrg
661709885543SmrgAC_DEFUN([LT_AC_PROG_GCJ],
661809885543Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
661909885543Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
662009885543Smrg  AC_SUBST(GCJFLAGS)
662109885543Smrg])
662209885543Smrg
662309885543SmrgAC_DEFUN([LT_AC_PROG_RC],
662409885543Smrg[AC_CHECK_TOOL(RC, windres, no)
662509885543Smrg])
662609885543Smrg
66277104f784Smrg
66287104f784Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
66297104f784Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
66307104f784Smrg
66317104f784Smrg# _AS_TEST_PREPARE
66327104f784Smrg# ----------------
66337104f784Smrgm4_ifndef([_AS_TEST_PREPARE],
66347104f784Smrg[m4_defun([_AS_TEST_PREPARE],
66357104f784Smrg[if test -x / >/dev/null 2>&1; then
66367104f784Smrg  as_executable_p='test -x'
66377104f784Smrgelse
66387104f784Smrg  as_executable_p='test -f'
66397104f784Smrgfi
66407104f784Smrg])])# _AS_TEST_PREPARE
66417104f784Smrg
66427104f784Smrg# AS_EXECUTABLE_P
66437104f784Smrg# ---------------
66447104f784Smrg# Check whether a file is executable.
66457104f784Smrgm4_ifndef([AS_EXECUTABLE_P],
66467104f784Smrg[m4_defun([AS_EXECUTABLE_P],
66477104f784Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
66487104f784Smrg$as_executable_p $1[]dnl
66497104f784Smrg])])# AS_EXECUTABLE_P
66507104f784Smrg
665109885543Smrg# NOTE: This macro has been submitted for inclusion into   #
665209885543Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
665309885543Smrg#  a released version of Autoconf we should remove this    #
665409885543Smrg#  macro and use it instead.                               #
665509885543Smrg# LT_AC_PROG_SED
665609885543Smrg# --------------
665709885543Smrg# Check for a fully-functional sed program, that truncates
665809885543Smrg# as few characters as possible.  Prefer GNU sed if found.
665909885543SmrgAC_DEFUN([LT_AC_PROG_SED],
666009885543Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
666109885543SmrgAC_CACHE_VAL(lt_cv_path_SED,
666209885543Smrg[# Loop through the user's path and test for sed and gsed.
666309885543Smrg# Then use that list of sed's as ones to test for truncation.
666409885543Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
666509885543Smrgfor as_dir in $PATH
666609885543Smrgdo
666709885543Smrg  IFS=$as_save_IFS
666809885543Smrg  test -z "$as_dir" && as_dir=.
666909885543Smrg  for lt_ac_prog in sed gsed; do
667009885543Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
66717104f784Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
667209885543Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
667309885543Smrg      fi
667409885543Smrg    done
667509885543Smrg  done
667609885543Smrgdone
66777104f784SmrgIFS=$as_save_IFS
667809885543Smrglt_ac_max=0
667909885543Smrglt_ac_count=0
668009885543Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
668109885543Smrg# along with /bin/sed that truncates output.
668209885543Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
668309885543Smrg  test ! -f $lt_ac_sed && continue
668409885543Smrg  cat /dev/null > conftest.in
668509885543Smrg  lt_ac_count=0
668609885543Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
668709885543Smrg  # Check for GNU sed and select it if it is found.
668809885543Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
668909885543Smrg    lt_cv_path_SED=$lt_ac_sed
669009885543Smrg    break
669109885543Smrg  fi
669209885543Smrg  while true; do
669309885543Smrg    cat conftest.in conftest.in >conftest.tmp
669409885543Smrg    mv conftest.tmp conftest.in
669509885543Smrg    cp conftest.in conftest.nl
669609885543Smrg    echo >>conftest.nl
669709885543Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
669809885543Smrg    cmp -s conftest.out conftest.nl || break
669909885543Smrg    # 10000 chars as input seems more than enough
670009885543Smrg    test $lt_ac_count -gt 10 && break
670109885543Smrg    lt_ac_count=`expr $lt_ac_count + 1`
670209885543Smrg    if test $lt_ac_count -gt $lt_ac_max; then
670309885543Smrg      lt_ac_max=$lt_ac_count
670409885543Smrg      lt_cv_path_SED=$lt_ac_sed
670509885543Smrg    fi
670609885543Smrg  done
670709885543Smrgdone
670809885543Smrg])
670909885543SmrgSED=$lt_cv_path_SED
67107104f784SmrgAC_SUBST([SED])
671109885543SmrgAC_MSG_RESULT([$SED])
671209885543Smrg])
671309885543Smrg
671409885543Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
671509885543Smrg# 
671609885543Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
671709885543Smrg#
671809885543Smrg# This program is free software; you can redistribute it and/or modify
671909885543Smrg# it under the terms of the GNU General Public License as published by
672009885543Smrg# the Free Software Foundation; either version 2 of the License, or
672109885543Smrg# (at your option) any later version.
672209885543Smrg#
672309885543Smrg# This program is distributed in the hope that it will be useful, but
672409885543Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
672509885543Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
672609885543Smrg# General Public License for more details.
672709885543Smrg#
672809885543Smrg# You should have received a copy of the GNU General Public License
672909885543Smrg# along with this program; if not, write to the Free Software
673009885543Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
673109885543Smrg#
673209885543Smrg# As a special exception to the GNU General Public License, if you
673309885543Smrg# distribute this file as part of a program that contains a
673409885543Smrg# configuration script generated by Autoconf, you may include it under
673509885543Smrg# the same distribution terms that you use for the rest of that program.
673609885543Smrg
673709885543Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
673809885543Smrg# ----------------------------------
673909885543SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
674009885543Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
674109885543Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
674209885543SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
674309885543Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
674409885543Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
674509885543Smrgfi
674609885543Smrgif test -n "$PKG_CONFIG"; then
674709885543Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
674809885543Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
674909885543Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
675009885543Smrg		AC_MSG_RESULT([yes])
675109885543Smrg	else
675209885543Smrg		AC_MSG_RESULT([no])
675309885543Smrg		PKG_CONFIG=""
675409885543Smrg	fi
675509885543Smrg		
675609885543Smrgfi[]dnl
675709885543Smrg])# PKG_PROG_PKG_CONFIG
675809885543Smrg
675909885543Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
676009885543Smrg#
676109885543Smrg# Check to see whether a particular set of modules exists.  Similar
676209885543Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
676309885543Smrg#
676409885543Smrg#
676509885543Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
676609885543Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
676709885543Smrg# PKG_CHECK_EXISTS manually
676809885543Smrg# --------------------------------------------------------------
676909885543SmrgAC_DEFUN([PKG_CHECK_EXISTS],
677009885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
677109885543Smrgif test -n "$PKG_CONFIG" && \
677209885543Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
677309885543Smrg  m4_ifval([$2], [$2], [:])
677409885543Smrgm4_ifvaln([$3], [else
677509885543Smrg  $3])dnl
677609885543Smrgfi])
677709885543Smrg
677809885543Smrg
677909885543Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
678009885543Smrg# ---------------------------------------------
678109885543Smrgm4_define([_PKG_CONFIG],
67827104f784Smrg[if test -n "$$1"; then
67837104f784Smrg    pkg_cv_[]$1="$$1"
67847104f784Smrg elif test -n "$PKG_CONFIG"; then
67857104f784Smrg    PKG_CHECK_EXISTS([$3],
67867104f784Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
67877104f784Smrg		     [pkg_failed=yes])
67887104f784Smrg else
67897104f784Smrg    pkg_failed=untried
679009885543Smrgfi[]dnl
679109885543Smrg])# _PKG_CONFIG
679209885543Smrg
679309885543Smrg# _PKG_SHORT_ERRORS_SUPPORTED
679409885543Smrg# -----------------------------
679509885543SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
679609885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
679709885543Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
679809885543Smrg        _pkg_short_errors_supported=yes
679909885543Smrgelse
680009885543Smrg        _pkg_short_errors_supported=no
680109885543Smrgfi[]dnl
680209885543Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
680309885543Smrg
680409885543Smrg
680509885543Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
680609885543Smrg# [ACTION-IF-NOT-FOUND])
680709885543Smrg#
680809885543Smrg#
680909885543Smrg# Note that if there is a possibility the first call to
681009885543Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
681109885543Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
681209885543Smrg#
681309885543Smrg#
681409885543Smrg# --------------------------------------------------------------
681509885543SmrgAC_DEFUN([PKG_CHECK_MODULES],
681609885543Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
681709885543SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
681809885543SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
681909885543Smrg
682009885543Smrgpkg_failed=no
682109885543SmrgAC_MSG_CHECKING([for $1])
682209885543Smrg
682309885543Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
682409885543Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
682509885543Smrg
682609885543Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
682709885543Smrgand $1[]_LIBS to avoid the need to call pkg-config.
682809885543SmrgSee the pkg-config man page for more details.])
682909885543Smrg
683009885543Smrgif test $pkg_failed = yes; then
683109885543Smrg        _PKG_SHORT_ERRORS_SUPPORTED
683209885543Smrg        if test $_pkg_short_errors_supported = yes; then
68337104f784Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
683409885543Smrg        else 
68357104f784Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
683609885543Smrg        fi
683709885543Smrg	# Put the nasty error message in config.log where it belongs
683809885543Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
683909885543Smrg
684009885543Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
684109885543Smrg[Package requirements ($2) were not met:
684209885543Smrg
684309885543Smrg$$1_PKG_ERRORS
684409885543Smrg
684509885543SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
684609885543Smrginstalled software in a non-standard prefix.
684709885543Smrg
684809885543Smrg_PKG_TEXT
684909885543Smrg])],
685009885543Smrg		[AC_MSG_RESULT([no])
685109885543Smrg                $4])
685209885543Smrgelif test $pkg_failed = untried; then
685309885543Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
685409885543Smrg[The pkg-config script could not be found or is too old.  Make sure it
685509885543Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
685609885543Smrgpath to pkg-config.
685709885543Smrg
685809885543Smrg_PKG_TEXT
685909885543Smrg
68607104f784SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
686109885543Smrg		[$4])
686209885543Smrgelse
686309885543Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
686409885543Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
686509885543Smrg        AC_MSG_RESULT([yes])
686609885543Smrg	ifelse([$3], , :, [$3])
686709885543Smrgfi[]dnl
686809885543Smrg])# PKG_CHECK_MODULES
686909885543Smrg
68707104f784Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
687109885543Smrgdnl
687209885543Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
687309885543Smrgdnl 
687409885543Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
687509885543Smrgdnl copy of this software and associated documentation files (the
687609885543Smrgdnl "Software"), to deal in the Software without restriction, including
687709885543Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
687809885543Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
687909885543Smrgdnl to whom the Software is furnished to do so, provided that the above
688009885543Smrgdnl copyright notice(s) and this permission notice appear in all copies of
688109885543Smrgdnl the Software and that both the above copyright notice(s) and this
688209885543Smrgdnl permission notice appear in supporting documentation.
688309885543Smrgdnl
688409885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
688509885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
688609885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
688709885543Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
688809885543Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
688909885543Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
689009885543Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
689109885543Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
689209885543Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
689309885543Smrgdnl
689409885543Smrgdnl Except as contained in this notice, the name of a copyright holder
689509885543Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
689609885543Smrgdnl or other dealings in this Software without prior written authorization
689709885543Smrgdnl of the copyright holder.
689809885543Smrg
689909885543Smrg# XORG_MACROS_VERSION(required-version)
690009885543Smrg# -------------------------------------
690109885543Smrg# Minimum version: 1.1.0
690209885543Smrg#
690309885543Smrg# If you're using a macro added in Version 1.1 or newer, include this in
690409885543Smrg# your configure.ac with the minimum required version, such as:
690509885543Smrg# XORG_MACROS_VERSION(1.1)
690609885543Smrg#
690709885543Smrg# To force at least a version with this macro defined, also add:
690809885543Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
690909885543Smrg#
691009885543Smrg#
691109885543Smrg# See the "minimum version" comment for each macro you use to see what 
691209885543Smrg# version you require.
691309885543SmrgAC_DEFUN([XORG_MACROS_VERSION],[
691409885543Smrg	[XORG_MACROS_needed_version=$1
691509885543Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
691609885543Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
691709885543Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
69187104f784Smrg	[XORG_MACROS_version=1.2.1
691909885543Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
692009885543Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
692109885543Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
692209885543Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
692309885543Smrg	fi
692409885543Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
692509885543Smrg		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
692609885543Smrg	fi
692709885543Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
692809885543Smrg]) # XORG_MACROS_VERSION
692909885543Smrg
693009885543Smrg# XORG_PROG_RAWCPP()
693109885543Smrg# ------------------
693209885543Smrg# Minimum version: 1.0.0
693309885543Smrg#
693409885543Smrg# Find cpp program and necessary flags for use in pre-processing text files
693509885543Smrg# such as man pages and config files
693609885543SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
693709885543SmrgAC_REQUIRE([AC_PROG_CPP])
693809885543SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
693909885543Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
694009885543Smrg
694109885543Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
694209885543Smrg# which is not the best choice for supporting other OS'es, but covers most
694309885543Smrg# of the ones we need for now.
694409885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
694509885543SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
694609885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
694709885543Smrg	AC_MSG_RESULT([no])
694809885543Smrgelse
694909885543Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
695009885543Smrg		RAWCPPFLAGS=-undef
695109885543Smrg		AC_MSG_RESULT([yes])
69527104f784Smrg	# under Cygwin unix is still defined even with -undef
69537104f784Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
69547104f784Smrg		RAWCPPFLAGS="-undef -ansi"
69557104f784Smrg		AC_MSG_RESULT([yes, with -ansi])
695609885543Smrg	else
695709885543Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
695809885543Smrg	fi
695909885543Smrgfi
696009885543Smrgrm -f conftest.$ac_ext
696109885543Smrg
696209885543SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
696309885543SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
696409885543Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
696509885543Smrg	AC_MSG_RESULT([no])
696609885543Smrgelse
696709885543Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
696809885543Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
696909885543Smrg		AC_MSG_RESULT([yes])
697009885543Smrg	else
697109885543Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
697209885543Smrg	fi
697309885543Smrgfi
697409885543Smrgrm -f conftest.$ac_ext
697509885543SmrgAC_SUBST(RAWCPPFLAGS)
697609885543Smrg]) # XORG_PROG_RAWCPP
697709885543Smrg
697809885543Smrg# XORG_MANPAGE_SECTIONS()
697909885543Smrg# -----------------------
698009885543Smrg# Minimum version: 1.0.0
698109885543Smrg#
698209885543Smrg# Determine which sections man pages go in for the different man page types
698309885543Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
698409885543Smrg# Not sure if there's any better way than just hardcoding by OS name.
698509885543Smrg# Override default settings by setting environment variables
698609885543Smrg
698709885543SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
698809885543SmrgAC_REQUIRE([AC_CANONICAL_HOST])
698909885543Smrg
699009885543Smrgif test x$APP_MAN_SUFFIX = x    ; then
699109885543Smrg    APP_MAN_SUFFIX=1
699209885543Smrgfi
699309885543Smrgif test x$APP_MAN_DIR = x    ; then
699409885543Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
699509885543Smrgfi
699609885543Smrg
699709885543Smrgif test x$LIB_MAN_SUFFIX = x    ; then
699809885543Smrg    LIB_MAN_SUFFIX=3
699909885543Smrgfi
700009885543Smrgif test x$LIB_MAN_DIR = x    ; then
700109885543Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
700209885543Smrgfi
700309885543Smrg
700409885543Smrgif test x$FILE_MAN_SUFFIX = x    ; then
700509885543Smrg    case $host_os in
700609885543Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
700709885543Smrg	*)		FILE_MAN_SUFFIX=5  ;;
700809885543Smrg    esac
700909885543Smrgfi
701009885543Smrgif test x$FILE_MAN_DIR = x    ; then
701109885543Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
701209885543Smrgfi
701309885543Smrg
701409885543Smrgif test x$MISC_MAN_SUFFIX = x    ; then
701509885543Smrg    case $host_os in
701609885543Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
701709885543Smrg	*)		MISC_MAN_SUFFIX=7  ;;
701809885543Smrg    esac
701909885543Smrgfi
702009885543Smrgif test x$MISC_MAN_DIR = x    ; then
702109885543Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
702209885543Smrgfi
702309885543Smrg
702409885543Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
702509885543Smrg    case $host_os in
702609885543Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
702709885543Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
702809885543Smrg    esac
702909885543Smrgfi
703009885543Smrgif test x$DRIVER_MAN_DIR = x    ; then
703109885543Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
703209885543Smrgfi
703309885543Smrg
703409885543Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
703509885543Smrg    case $host_os in
703609885543Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
703709885543Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
703809885543Smrg    esac
703909885543Smrgfi
704009885543Smrgif test x$ADMIN_MAN_DIR = x    ; then
704109885543Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
704209885543Smrgfi
704309885543Smrg
704409885543Smrg
704509885543SmrgAC_SUBST([APP_MAN_SUFFIX])
704609885543SmrgAC_SUBST([LIB_MAN_SUFFIX])
704709885543SmrgAC_SUBST([FILE_MAN_SUFFIX])
704809885543SmrgAC_SUBST([MISC_MAN_SUFFIX])
704909885543SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
705009885543SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
705109885543SmrgAC_SUBST([APP_MAN_DIR])
705209885543SmrgAC_SUBST([LIB_MAN_DIR])
705309885543SmrgAC_SUBST([FILE_MAN_DIR])
705409885543SmrgAC_SUBST([MISC_MAN_DIR])
705509885543SmrgAC_SUBST([DRIVER_MAN_DIR])
705609885543SmrgAC_SUBST([ADMIN_MAN_DIR])
705709885543Smrg]) # XORG_MANPAGE_SECTIONS
705809885543Smrg
705909885543Smrg# XORG_CHECK_LINUXDOC
706009885543Smrg# -------------------
706109885543Smrg# Minimum version: 1.0.0
706209885543Smrg#
706309885543Smrg# Defines the variable MAKE_TEXT if the necessary tools and
706409885543Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
706509885543Smrg# Whether or not the necessary tools and files are found can be checked
706609885543Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
706709885543SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
70687104f784Smrgif test x$XORG_SGML_PATH = x ; then
70697104f784Smrg    XORG_SGML_PATH=$prefix/share/sgml
70707104f784Smrgfi
707109885543SmrgHAVE_DEFS_ENT=
707209885543Smrg
70737104f784Smrgif test x"$cross_compiling" = x"yes" ; then
70747104f784Smrg  HAVE_DEFS_ENT=no
70757104f784Smrgelse
70767104f784Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
70777104f784Smrgfi
707809885543Smrg
707909885543SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
708009885543SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
708109885543Smrg
708209885543SmrgAC_MSG_CHECKING([Whether to build documentation])
708309885543Smrg
708409885543Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
708509885543Smrg   BUILDDOC=yes
708609885543Smrgelse
708709885543Smrg   BUILDDOC=no
708809885543Smrgfi
708909885543Smrg
709009885543SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
709109885543Smrg
709209885543SmrgAC_MSG_RESULT([$BUILDDOC])
709309885543Smrg
709409885543SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
709509885543Smrg
709609885543Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
709709885543Smrg   BUILDPDFDOC=yes
709809885543Smrgelse
709909885543Smrg   BUILDPDFDOC=no
710009885543Smrgfi
710109885543Smrg
710209885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
710309885543Smrg
710409885543SmrgAC_MSG_RESULT([$BUILDPDFDOC])
710509885543Smrg
710609885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
710709885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
710809885543SmrgMAKE_PDF="$PS2PDF"
710909885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
711009885543Smrg
711109885543SmrgAC_SUBST(MAKE_TEXT)
711209885543SmrgAC_SUBST(MAKE_PS)
711309885543SmrgAC_SUBST(MAKE_PDF)
711409885543SmrgAC_SUBST(MAKE_HTML)
711509885543Smrg]) # XORG_CHECK_LINUXDOC
711609885543Smrg
711709885543Smrg# XORG_CHECK_DOCBOOK
711809885543Smrg# -------------------
711909885543Smrg# Minimum version: 1.0.0
712009885543Smrg#
712109885543Smrg# Checks for the ability to build output formats from SGML DocBook source.
712209885543Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
712309885543Smrg# indicates whether the necessary tools and files are found and, if set,
712409885543Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
712509885543SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
71267104f784Smrgif test x$XORG_SGML_PATH = x ; then
71277104f784Smrg    XORG_SGML_PATH=$prefix/share/sgml
71287104f784Smrgfi
712909885543SmrgHAVE_DEFS_ENT=
713009885543SmrgBUILDTXTDOC=no
713109885543SmrgBUILDPDFDOC=no
713209885543SmrgBUILDPSDOC=no
713309885543SmrgBUILDHTMLDOC=no
713409885543Smrg
713509885543SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
713609885543Smrg
713709885543SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
713809885543SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
713909885543SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
714009885543SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
714109885543Smrg
714209885543SmrgAC_MSG_CHECKING([Whether to build text documentation])
714309885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
714409885543Smrg   test x$BUILD_TXTDOC != xno; then
714509885543Smrg	BUILDTXTDOC=yes
714609885543Smrgfi
714709885543SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
714809885543SmrgAC_MSG_RESULT([$BUILDTXTDOC])
714909885543Smrg
715009885543SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
715109885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
715209885543Smrg   test x$BUILD_PDFDOC != xno; then
715309885543Smrg	BUILDPDFDOC=yes
715409885543Smrgfi
715509885543SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
715609885543SmrgAC_MSG_RESULT([$BUILDPDFDOC])
715709885543Smrg
715809885543SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
715909885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
716009885543Smrg   test x$BUILD_PSDOC != xno; then
716109885543Smrg	BUILDPSDOC=yes
716209885543Smrgfi
716309885543SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
716409885543SmrgAC_MSG_RESULT([$BUILDPSDOC])
716509885543Smrg
716609885543SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
716709885543Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
716809885543Smrg   test x$BUILD_HTMLDOC != xno; then
716909885543Smrg	BUILDHTMLDOC=yes
717009885543Smrgfi
717109885543SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
717209885543SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
717309885543Smrg
717409885543SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
717509885543SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
717609885543SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
717709885543SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
717809885543Smrg
717909885543SmrgAC_SUBST(MAKE_TEXT)
718009885543SmrgAC_SUBST(MAKE_PS)
718109885543SmrgAC_SUBST(MAKE_PDF)
718209885543SmrgAC_SUBST(MAKE_HTML)
718309885543Smrg]) # XORG_CHECK_DOCBOOK
718409885543Smrg
718509885543Smrg# XORG_CHECK_MALLOC_ZERO
718609885543Smrg# ----------------------
718709885543Smrg# Minimum version: 1.0.0
718809885543Smrg#
718909885543Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
719009885543Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
719109885543Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
719209885543SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
719309885543SmrgAC_ARG_ENABLE(malloc0returnsnull,
719409885543Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
719509885543Smrg		       [malloc(0) returns NULL (default: auto)]),
719609885543Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
719709885543Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
719809885543Smrg
719909885543SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
720009885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
720109885543Smrg	AC_RUN_IFELSE([
720209885543Smrgchar *malloc();
720309885543Smrgchar *realloc();
720409885543Smrgchar *calloc();
720509885543Smrgmain() {
720609885543Smrg    char *m0, *r0, *c0, *p;
720709885543Smrg    m0 = malloc(0);
720809885543Smrg    p = malloc(10);
720909885543Smrg    r0 = realloc(p,0);
721009885543Smrg    c0 = calloc(0);
721109885543Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
721209885543Smrg}],
721309885543Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
721409885543Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
721509885543Smrgfi
721609885543SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
721709885543Smrg
721809885543Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
721909885543Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
722009885543Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
722109885543Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
722209885543Smrgelse
722309885543Smrg	MALLOC_ZERO_CFLAGS=""
722409885543Smrg	XMALLOC_ZERO_CFLAGS=""
722509885543Smrg	XTMALLOC_ZERO_CFLAGS=""
722609885543Smrgfi
722709885543Smrg
722809885543SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
722909885543SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
723009885543SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
723109885543Smrg]) # XORG_CHECK_MALLOC_ZERO
723209885543Smrg
723309885543Smrg# XORG_WITH_LINT()
723409885543Smrg# ----------------
723509885543Smrg# Minimum version: 1.1.0
723609885543Smrg#
723709885543Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
723809885543Smrg# is specified.   (Use --with-lint=sparse for sparse.)
723909885543Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
724009885543Smrg# Sets $LINT_FLAGS to flags to pass to source checker
724109885543Smrg# Sets LINT automake conditional if enabled (default: disabled)
724209885543Smrg#
724309885543SmrgAC_DEFUN([XORG_WITH_LINT],[
724409885543Smrg
724509885543Smrg# Allow checking code with lint, sparse, etc.
724609885543SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
724709885543Smrg		[Use a lint-style source code checker (default: disabled)])],
724809885543Smrg		[use_lint=$withval], [use_lint=no])
724909885543Smrgif test "x$use_lint" = "xyes" ; then
725009885543Smrg	LINT="lint"
725109885543Smrgelse
725209885543Smrg	LINT="$use_lint"
725309885543Smrgfi
725409885543Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
725509885543Smrg    case $LINT in
725609885543Smrg	lint|*/lint)
725709885543Smrg	    case $host_os in
725809885543Smrg		solaris*)
725909885543Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
726009885543Smrg			;;
726109885543Smrg	    esac
726209885543Smrg	    ;;
726309885543Smrg    esac
726409885543Smrgfi
726509885543Smrg
726609885543SmrgAC_SUBST(LINT)
726709885543SmrgAC_SUBST(LINT_FLAGS)
726809885543SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
726909885543Smrg
727009885543Smrg]) # XORG_WITH_LINT
727109885543Smrg
727209885543Smrg# XORG_LINT_LIBRARY(LIBNAME)
727309885543Smrg# --------------------------
727409885543Smrg# Minimum version: 1.1.0
727509885543Smrg#
727609885543Smrg# Sets up flags for building lint libraries for checking programs that call
727709885543Smrg# functions in the library.
727809885543Smrg# Disabled by default, enable with --enable-lint-library
727909885543Smrg# Sets: 
728009885543Smrg#	@LINTLIB@		- name of lint library file to make
728109885543Smrg#	MAKE_LINT_LIB		- automake conditional
728209885543Smrg#
728309885543Smrg
728409885543SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
728509885543SmrgAC_REQUIRE([XORG_WITH_LINT])
728609885543Smrg# Build lint "library" for more indepth checks of programs calling this library
728709885543SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
728809885543Smrg	[Create lint library (default: disabled)])],
728909885543Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
729009885543Smrgif test "x$make_lint_lib" != "xno" ; then
729109885543Smrg	if test "x$LINT" = "xno" ; then
729209885543Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
729309885543Smrg	fi
729409885543Smrg	if test "x$make_lint_lib" = "xyes" ; then
729509885543Smrg		LINTLIB=llib-l$1.ln
729609885543Smrg	else
729709885543Smrg		LINTLIB=$make_lint_lib
729809885543Smrg	fi
729909885543Smrgfi
730009885543SmrgAC_SUBST(LINTLIB)
730109885543SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
730209885543Smrg
730309885543Smrg]) # XORG_LINT_LIBRARY
730409885543Smrg
73057104f784Smrg# XORG_CWARNFLAGS
73067104f784Smrg# ---------------
73077104f784Smrg# Minimum version: 1.2.0
73087104f784Smrg#
73097104f784Smrg# Defines CWARNFLAGS to enable C compiler warnings.
73107104f784Smrg#
73117104f784SmrgAC_DEFUN([XORG_CWARNFLAGS], [
73127104f784SmrgAC_REQUIRE([AC_PROG_CC])
73137104f784Smrgif  test "x$GCC" = xyes ; then
73147104f784Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
73157104f784Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
73167104f784Smrg-Wbad-function-cast"
73177104f784Smrg    case `gcc -dumpversion` in
73187104f784Smrg    3.4.* | 4.*)
73197104f784Smrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
73207104f784Smrg	;;
73217104f784Smrg    esac
73227104f784Smrgelse
73237104f784Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
73247104f784Smrg    if test "x$SUNCC" = "xyes"; then
73257104f784Smrg	CWARNFLAGS="-v"
73267104f784Smrg    fi
73277104f784Smrgfi
73287104f784SmrgAC_SUBST(CWARNFLAGS)
73297104f784Smrg]) # XORG_CWARNFLAGS
733009885543Smrgdnl Copyright 2005 Red Hat, Inc
733109885543Smrgdnl
733209885543Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
733309885543Smrgdnl documentation for any purpose is hereby granted without fee, provided that
733409885543Smrgdnl the above copyright notice appear in all copies and that both that
733509885543Smrgdnl copyright notice and this permission notice appear in supporting
733609885543Smrgdnl documentation.
733709885543Smrgdnl
733809885543Smrgdnl The above copyright notice and this permission notice shall be included
733909885543Smrgdnl in all copies or substantial portions of the Software.
734009885543Smrgdnl
734109885543Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
734209885543Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
734309885543Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
734409885543Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
734509885543Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
734609885543Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
734709885543Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
734809885543Smrgdnl
734909885543Smrgdnl Except as contained in this notice, the name of the copyright holders shall
735009885543Smrgdnl not be used in advertising or otherwise to promote the sale, use or
735109885543Smrgdnl other dealings in this Software without prior written authorization
735209885543Smrgdnl from the copyright holders.
735309885543Smrgdnl
735409885543Smrg
735509885543Smrg# XORG_RELEASE_VERSION
735609885543Smrg# --------------------
735709885543Smrg# Adds --with/without-release-string and changes the PACKAGE and
735809885543Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
735909885543Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
736009885543Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
736109885543Smrg 
736209885543SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
736309885543Smrg	AC_ARG_WITH(release-version,
736409885543Smrg			AC_HELP_STRING([--with-release-version=STRING],
736509885543Smrg				[Use release version string in package name]),
736609885543Smrg			[RELEASE_VERSION="$withval"],
736709885543Smrg			[RELEASE_VERSION=""])
736809885543Smrg	if test "x$RELEASE_VERSION" != "x"; then
736909885543Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
737009885543Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
737109885543Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
737209885543Smrg	fi
737309885543Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
737409885543Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
737509885543Smrg		[Major version of this package])
73767104f784Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
737709885543Smrg	if test "x$PVM" = "x"; then
737809885543Smrg		PVM="0"
737909885543Smrg	fi
738009885543Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
738109885543Smrg		[$PVM],
738209885543Smrg		[Minor version of this package])
73837104f784Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
738409885543Smrg	if test "x$PVP" = "x"; then
738509885543Smrg		PVP="0"
738609885543Smrg	fi
738709885543Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
738809885543Smrg		[$PVP],
738909885543Smrg		[Patch version of this package])
739009885543Smrg])
739109885543Smrg
73927104f784Smrg# XORG_CHANGELOG()
73937104f784Smrg# ----------------
73947104f784Smrg# Minimum version: 1.2.0
73957104f784Smrg#
73967104f784Smrg# Defines the variable CHANGELOG_CMD as the command to generate
73977104f784Smrg# ChangeLog from git.
73987104f784Smrg#
73997104f784Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
74007104f784Smrg#
74017104f784SmrgAC_DEFUN([XORG_CHANGELOG], [
74027104f784SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
74037104f784Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
74047104f784Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
74057104f784SmrgAC_SUBST([CHANGELOG_CMD])
74067104f784SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
74077104f784Smrg]) # XORG_CHANGELOG
74087104f784Smrg
74097104f784Smrgdnl Copyright 2005 Red Hat, Inc
74107104f784Smrgdnl 
74117104f784Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
74127104f784Smrgdnl documentation for any purpose is hereby granted without fee, provided that
74137104f784Smrgdnl the above copyright notice appear in all copies and that both that
74147104f784Smrgdnl copyright notice and this permission notice appear in supporting
74157104f784Smrgdnl documentation.
74167104f784Smrgdnl 
74177104f784Smrgdnl The above copyright notice and this permission notice shall be included
74187104f784Smrgdnl in all copies or substantial portions of the Software.
74197104f784Smrgdnl 
74207104f784Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
74217104f784Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
74227104f784Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
74237104f784Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
74247104f784Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
74257104f784Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
74267104f784Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
74277104f784Smrgdnl 
74287104f784Smrgdnl Except as contained in this notice, the name of the copyright holders shall
74297104f784Smrgdnl not be used in advertising or otherwise to promote the sale, use or
74307104f784Smrgdnl other dealings in this Software without prior written authorization
74317104f784Smrgdnl from the copyright holders.
74327104f784Smrgdnl 
74337104f784Smrg
74347104f784Smrg# XORG_DRIVER_CHECK_EXT()
74357104f784Smrg# --------------------------
74367104f784Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
74377104f784Smrg# is defined, then add $1 to $REQUIRED_MODULES.
74387104f784Smrg
74397104f784SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
74407104f784Smrg	SAVE_CFLAGS="$CFLAGS"
74417104f784Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
74427104f784Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
74437104f784Smrg#include "xorg-server.h"
74447104f784Smrg#if !defined $1
74457104f784Smrg#error $1 not defined
74467104f784Smrg#endif
74477104f784Smrg		]])],
74487104f784Smrg		[_EXT_CHECK=yes],
74497104f784Smrg		[_EXT_CHECK=no])
74507104f784Smrg	CFLAGS="$SAVE_CFLAGS"
74517104f784Smrg	AC_MSG_CHECKING([if $1 is defined])
74527104f784Smrg	AC_MSG_RESULT([$_EXT_CHECK])
74537104f784Smrg	if test "$_EXT_CHECK" != no; then
74547104f784Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
74557104f784Smrg	fi
74567104f784Smrg])
74577104f784Smrg
74587104f784Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
745909885543Smrg#
746009885543Smrg# This file is free software; the Free Software Foundation
746109885543Smrg# gives unlimited permission to copy and/or distribute it,
746209885543Smrg# with or without modifications, as long as this notice is preserved.
746309885543Smrg
746409885543Smrg# AM_AUTOMAKE_VERSION(VERSION)
746509885543Smrg# ----------------------------
746609885543Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
746709885543Smrg# generated from the m4 files accompanying Automake X.Y.
74687104f784Smrg# (This private macro should not be called outside this file.)
74697104f784SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
74707104f784Smrg[am__api_version='1.10'
74717104f784Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
74727104f784Smrgdnl require some minimum version.  Point them to the right macro.
74737104f784Smrgm4_if([$1], [1.10.2], [],
74747104f784Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
74757104f784Smrg])
74767104f784Smrg
74777104f784Smrg# _AM_AUTOCONF_VERSION(VERSION)
74787104f784Smrg# -----------------------------
74797104f784Smrg# aclocal traces this macro to find the Autoconf version.
74807104f784Smrg# This is a private macro too.  Using m4_define simplifies
74817104f784Smrg# the logic in aclocal, which can simply ignore this definition.
74827104f784Smrgm4_define([_AM_AUTOCONF_VERSION], [])
748309885543Smrg
748409885543Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
748509885543Smrg# -------------------------------
74867104f784Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
74877104f784Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
748809885543SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
74897104f784Smrg[AM_AUTOMAKE_VERSION([1.10.2])dnl
74907104f784Smrgm4_ifndef([AC_AUTOCONF_VERSION],
74917104f784Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
74927104f784Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
749309885543Smrg
749409885543Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
749509885543Smrg
749609885543Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
749709885543Smrg#
749809885543Smrg# This file is free software; the Free Software Foundation
749909885543Smrg# gives unlimited permission to copy and/or distribute it,
750009885543Smrg# with or without modifications, as long as this notice is preserved.
750109885543Smrg
750209885543Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
750309885543Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
750409885543Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
750509885543Smrg#
750609885543Smrg# Of course, Automake must honor this variable whenever it calls a
750709885543Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
750809885543Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
750909885543Smrg# depending on how configure is run.  This is pretty annoying, since
751009885543Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
751109885543Smrg# source directory, any form will work fine, but in subdirectories a
751209885543Smrg# relative path needs to be adjusted first.
751309885543Smrg#
751409885543Smrg# $ac_aux_dir/missing
751509885543Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
751609885543Smrg# $top_srcdir/$ac_aux_dir/missing
751709885543Smrg#    fails if $ac_aux_dir is absolute,
751809885543Smrg#    fails when called from a subdirectory in a VPATH build with
751909885543Smrg#          a relative $ac_aux_dir
752009885543Smrg#
752109885543Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
752209885543Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
752309885543Smrg# harmless because $srcdir is `.', but things will broke when you
752409885543Smrg# start a VPATH build or use an absolute $srcdir.
752509885543Smrg#
752609885543Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
752709885543Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
752809885543Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
752909885543Smrg# and then we would define $MISSING as
753009885543Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
753109885543Smrg# This will work as long as MISSING is not called from configure, because
753209885543Smrg# unfortunately $(top_srcdir) has no meaning in configure.
753309885543Smrg# However there are other variables, like CC, which are often used in
753409885543Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
753509885543Smrg#
753609885543Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
753709885543Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
753809885543Smrg# configured tree to be moved without reconfiguration.
753909885543Smrg
754009885543SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
754109885543Smrg[dnl Rely on autoconf to set up CDPATH properly.
754209885543SmrgAC_PREREQ([2.50])dnl
754309885543Smrg# expand $ac_aux_dir to an absolute path
754409885543Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
754509885543Smrg])
754609885543Smrg
754709885543Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
754809885543Smrg
75497104f784Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
755009885543Smrg# Free Software Foundation, Inc.
755109885543Smrg#
755209885543Smrg# This file is free software; the Free Software Foundation
755309885543Smrg# gives unlimited permission to copy and/or distribute it,
755409885543Smrg# with or without modifications, as long as this notice is preserved.
755509885543Smrg
75567104f784Smrg# serial 8
755709885543Smrg
755809885543Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
755909885543Smrg# -------------------------------------
756009885543Smrg# Define a conditional.
756109885543SmrgAC_DEFUN([AM_CONDITIONAL],
756209885543Smrg[AC_PREREQ(2.52)dnl
756309885543Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
756409885543Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
75657104f784SmrgAC_SUBST([$1_TRUE])dnl
75667104f784SmrgAC_SUBST([$1_FALSE])dnl
75677104f784Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
75687104f784Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
756909885543Smrgif $2; then
757009885543Smrg  $1_TRUE=
757109885543Smrg  $1_FALSE='#'
757209885543Smrgelse
757309885543Smrg  $1_TRUE='#'
757409885543Smrg  $1_FALSE=
757509885543Smrgfi
757609885543SmrgAC_CONFIG_COMMANDS_PRE(
757709885543Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
757809885543Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
757909885543SmrgUsually this means the macro was only invoked conditionally.]])
758009885543Smrgfi])])
758109885543Smrg
75827104f784Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
758309885543Smrg# Free Software Foundation, Inc.
758409885543Smrg#
758509885543Smrg# This file is free software; the Free Software Foundation
758609885543Smrg# gives unlimited permission to copy and/or distribute it,
758709885543Smrg# with or without modifications, as long as this notice is preserved.
758809885543Smrg
75897104f784Smrg# serial 9
759009885543Smrg
759109885543Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
759209885543Smrg# written in clear, in which case automake, when reading aclocal.m4,
759309885543Smrg# will think it sees a *use*, and therefore will trigger all it's
759409885543Smrg# C support machinery.  Also note that it means that autoscan, seeing
759509885543Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
759609885543Smrg
759709885543Smrg
759809885543Smrg# _AM_DEPENDENCIES(NAME)
759909885543Smrg# ----------------------
760009885543Smrg# See how the compiler implements dependency checking.
760109885543Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
760209885543Smrg# We try a few techniques and use that to set a single cache variable.
760309885543Smrg#
760409885543Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
760509885543Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
760609885543Smrg# dependency, and given that the user is not expected to run this macro,
760709885543Smrg# just rely on AC_PROG_CC.
760809885543SmrgAC_DEFUN([_AM_DEPENDENCIES],
760909885543Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
761009885543SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
761109885543SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
761209885543SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
761309885543Smrg
761409885543Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
761509885543Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
761609885543Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
76177104f784Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
761809885543Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
761909885543Smrg                   [depcc="$$1"   am_compiler_list=])
762009885543Smrg
762109885543SmrgAC_CACHE_CHECK([dependency style of $depcc],
762209885543Smrg               [am_cv_$1_dependencies_compiler_type],
762309885543Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
762409885543Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
762509885543Smrg  # making bogus files that we don't know about and never remove.  For
762609885543Smrg  # instance it was reported that on HP-UX the gcc test will end up
762709885543Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
762809885543Smrg  # in D'.
762909885543Smrg  mkdir conftest.dir
763009885543Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
763109885543Smrg  # using a relative directory.
763209885543Smrg  cp "$am_depcomp" conftest.dir
763309885543Smrg  cd conftest.dir
763409885543Smrg  # We will build objects and dependencies in a subdirectory because
763509885543Smrg  # it helps to detect inapplicable dependency modes.  For instance
763609885543Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
763709885543Smrg  # side effect of compilation, but ICC will put the dependencies in
763809885543Smrg  # the current directory while Tru64 will put them in the object
763909885543Smrg  # directory.
764009885543Smrg  mkdir sub
764109885543Smrg
764209885543Smrg  am_cv_$1_dependencies_compiler_type=none
764309885543Smrg  if test "$am_compiler_list" = ""; then
764409885543Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
764509885543Smrg  fi
764609885543Smrg  for depmode in $am_compiler_list; do
764709885543Smrg    # Setup a source with many dependencies, because some compilers
764809885543Smrg    # like to wrap large dependency lists on column 80 (with \), and
764909885543Smrg    # we should not choose a depcomp mode which is confused by this.
765009885543Smrg    #
765109885543Smrg    # We need to recreate these files for each test, as the compiler may
765209885543Smrg    # overwrite some of them when testing with obscure command lines.
765309885543Smrg    # This happens at least with the AIX C compiler.
765409885543Smrg    : > sub/conftest.c
765509885543Smrg    for i in 1 2 3 4 5 6; do
765609885543Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
765709885543Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
765809885543Smrg      # Solaris 8's {/usr,}/bin/sh.
765909885543Smrg      touch sub/conftst$i.h
766009885543Smrg    done
766109885543Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
766209885543Smrg
766309885543Smrg    case $depmode in
766409885543Smrg    nosideeffect)
766509885543Smrg      # after this tag, mechanisms are not by side-effect, so they'll
766609885543Smrg      # only be used when explicitly requested
766709885543Smrg      if test "x$enable_dependency_tracking" = xyes; then
766809885543Smrg	continue
766909885543Smrg      else
767009885543Smrg	break
767109885543Smrg      fi
767209885543Smrg      ;;
767309885543Smrg    none) break ;;
767409885543Smrg    esac
767509885543Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
767609885543Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
767709885543Smrg    # handle `-M -o', and we need to detect this.
767809885543Smrg    if depmode=$depmode \
767909885543Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
768009885543Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
768109885543Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
768209885543Smrg         >/dev/null 2>conftest.err &&
76837104f784Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
768409885543Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
768509885543Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
768609885543Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
768709885543Smrg      # icc doesn't choke on unknown options, it will just issue warnings
768809885543Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
768909885543Smrg      # that says an option was ignored or not supported.
769009885543Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
769109885543Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
769209885543Smrg      # The diagnosis changed in icc 8.0:
769309885543Smrg      #   icc: Command line remark: option '-MP' not supported
769409885543Smrg      if (grep 'ignoring option' conftest.err ||
769509885543Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
769609885543Smrg        am_cv_$1_dependencies_compiler_type=$depmode
769709885543Smrg        break
769809885543Smrg      fi
769909885543Smrg    fi
770009885543Smrg  done
770109885543Smrg
770209885543Smrg  cd ..
770309885543Smrg  rm -rf conftest.dir
770409885543Smrgelse
770509885543Smrg  am_cv_$1_dependencies_compiler_type=none
770609885543Smrgfi
770709885543Smrg])
770809885543SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
770909885543SmrgAM_CONDITIONAL([am__fastdep$1], [
771009885543Smrg  test "x$enable_dependency_tracking" != xno \
771109885543Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
771209885543Smrg])
771309885543Smrg
771409885543Smrg
771509885543Smrg# AM_SET_DEPDIR
771609885543Smrg# -------------
771709885543Smrg# Choose a directory name for dependency files.
771809885543Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
771909885543SmrgAC_DEFUN([AM_SET_DEPDIR],
772009885543Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
772109885543SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
772209885543Smrg])
772309885543Smrg
772409885543Smrg
772509885543Smrg# AM_DEP_TRACK
772609885543Smrg# ------------
772709885543SmrgAC_DEFUN([AM_DEP_TRACK],
772809885543Smrg[AC_ARG_ENABLE(dependency-tracking,
772909885543Smrg[  --disable-dependency-tracking  speeds up one-time build
773009885543Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
773109885543Smrgif test "x$enable_dependency_tracking" != xno; then
773209885543Smrg  am_depcomp="$ac_aux_dir/depcomp"
773309885543Smrg  AMDEPBACKSLASH='\'
773409885543Smrgfi
773509885543SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
77367104f784SmrgAC_SUBST([AMDEPBACKSLASH])dnl
77377104f784Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
773809885543Smrg])
773909885543Smrg
774009885543Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
774109885543Smrg
77427104f784Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
774309885543Smrg# Free Software Foundation, Inc.
774409885543Smrg#
774509885543Smrg# This file is free software; the Free Software Foundation
774609885543Smrg# gives unlimited permission to copy and/or distribute it,
774709885543Smrg# with or without modifications, as long as this notice is preserved.
774809885543Smrg
77497104f784Smrg#serial 4
775009885543Smrg
775109885543Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
775209885543Smrg# ------------------------------
775309885543SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
77547104f784Smrg[# Autoconf 2.62 quotes --file arguments for eval, but not when files
77557104f784Smrg# are listed without --file.  Let's play safe and only enable the eval
77567104f784Smrg# if we detect the quoting.
77577104f784Smrgcase $CONFIG_FILES in
77587104f784Smrg*\'*) eval set x "$CONFIG_FILES" ;;
77597104f784Smrg*)   set x $CONFIG_FILES ;;
77607104f784Smrgesac
77617104f784Smrgshift
77627104f784Smrgfor mf
77637104f784Smrgdo
776409885543Smrg  # Strip MF so we end up with the name of the file.
776509885543Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
776609885543Smrg  # Check whether this is an Automake generated Makefile or not.
776709885543Smrg  # We used to match only the files named `Makefile.in', but
776809885543Smrg  # some people rename them; so instead we look at the file content.
776909885543Smrg  # Grep'ing the first line is not enough: some people post-process
777009885543Smrg  # each Makefile.in and add a new line on top of each file to say so.
77717104f784Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
77727104f784Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
77737104f784Smrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
777409885543Smrg    dirpart=`AS_DIRNAME("$mf")`
777509885543Smrg  else
777609885543Smrg    continue
777709885543Smrg  fi
777809885543Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
777909885543Smrg  # from the Makefile without running `make'.
778009885543Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
778109885543Smrg  test -z "$DEPDIR" && continue
778209885543Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
778309885543Smrg  test -z "am__include" && continue
778409885543Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
778509885543Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
778609885543Smrg  U=`sed -n 's/^U = //p' < "$mf"`
778709885543Smrg  # Find all dependency output files, they are included files with
778809885543Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
778909885543Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
779009885543Smrg  # expansion.
779109885543Smrg  for file in `sed -n "
779209885543Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
779309885543Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
779409885543Smrg    # Make sure the directory exists.
779509885543Smrg    test -f "$dirpart/$file" && continue
779609885543Smrg    fdir=`AS_DIRNAME(["$file"])`
779709885543Smrg    AS_MKDIR_P([$dirpart/$fdir])
779809885543Smrg    # echo "creating $dirpart/$file"
779909885543Smrg    echo '# dummy' > "$dirpart/$file"
780009885543Smrg  done
780109885543Smrgdone
780209885543Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
780309885543Smrg
780409885543Smrg
780509885543Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
780609885543Smrg# -----------------------------
780709885543Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
780809885543Smrg#
780909885543Smrg# This code is only required when automatic dependency tracking
781009885543Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
781109885543Smrg# need in order to bootstrap the dependency handling code.
781209885543SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
781309885543Smrg[AC_CONFIG_COMMANDS([depfiles],
781409885543Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
781509885543Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
781609885543Smrg])
781709885543Smrg
781809885543Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
781909885543Smrg# Free Software Foundation, Inc.
782009885543Smrg#
782109885543Smrg# This file is free software; the Free Software Foundation
782209885543Smrg# gives unlimited permission to copy and/or distribute it,
782309885543Smrg# with or without modifications, as long as this notice is preserved.
782409885543Smrg
782509885543Smrg# serial 8
782609885543Smrg
782709885543Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
782809885543SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
782909885543Smrg
783009885543Smrg# Do all the work for Automake.                             -*- Autoconf -*-
783109885543Smrg
78327104f784Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
78337104f784Smrg# 2005, 2006, 2008 Free Software Foundation, Inc.
783409885543Smrg#
783509885543Smrg# This file is free software; the Free Software Foundation
783609885543Smrg# gives unlimited permission to copy and/or distribute it,
783709885543Smrg# with or without modifications, as long as this notice is preserved.
783809885543Smrg
78397104f784Smrg# serial 13
784009885543Smrg
784109885543Smrg# This macro actually does too much.  Some checks are only needed if
784209885543Smrg# your package does certain things.  But this isn't really a big deal.
784309885543Smrg
784409885543Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
784509885543Smrg# AM_INIT_AUTOMAKE([OPTIONS])
784609885543Smrg# -----------------------------------------------
784709885543Smrg# The call with PACKAGE and VERSION arguments is the old style
784809885543Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
784909885543Smrg# and VERSION should now be passed to AC_INIT and removed from
785009885543Smrg# the call to AM_INIT_AUTOMAKE.
785109885543Smrg# We support both call styles for the transition.  After
785209885543Smrg# the next Automake release, Autoconf can make the AC_INIT
785309885543Smrg# arguments mandatory, and then we can depend on a new Autoconf
785409885543Smrg# release and drop the old call support.
785509885543SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
78567104f784Smrg[AC_PREREQ([2.60])dnl
785709885543Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
785809885543Smrgdnl the ones we care about.
785909885543Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
786009885543SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
786109885543SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
78627104f784Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
78637104f784Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
78647104f784Smrg  # is not polluted with repeated "-I."
78657104f784Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
78667104f784Smrg  # test to see if srcdir already configured
78677104f784Smrg  if test -f $srcdir/config.status; then
78687104f784Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
78697104f784Smrg  fi
787009885543Smrgfi
787109885543Smrg
787209885543Smrg# test whether we have cygpath
787309885543Smrgif test -z "$CYGPATH_W"; then
787409885543Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
787509885543Smrg    CYGPATH_W='cygpath -w'
787609885543Smrg  else
787709885543Smrg    CYGPATH_W=echo
787809885543Smrg  fi
787909885543Smrgfi
788009885543SmrgAC_SUBST([CYGPATH_W])
788109885543Smrg
788209885543Smrg# Define the identity of the package.
788309885543Smrgdnl Distinguish between old-style and new-style calls.
788409885543Smrgm4_ifval([$2],
788509885543Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
788609885543Smrg AC_SUBST([PACKAGE], [$1])dnl
788709885543Smrg AC_SUBST([VERSION], [$2])],
788809885543Smrg[_AM_SET_OPTIONS([$1])dnl
78897104f784Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
78907104f784Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
78917104f784Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
789209885543Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
789309885543Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
789409885543Smrg
789509885543Smrg_AM_IF_OPTION([no-define],,
789609885543Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
789709885543Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
789809885543Smrg
789909885543Smrg# Some tools Automake needs.
790009885543SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
790109885543SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
790209885543SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
790309885543SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
790409885543SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
790509885543SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
790609885543SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
790709885543SmrgAM_PROG_INSTALL_SH
790809885543SmrgAM_PROG_INSTALL_STRIP
790909885543SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
791009885543Smrg# We need awk for the "check" target.  The system "awk" is bad on
791109885543Smrg# some platforms.
791209885543SmrgAC_REQUIRE([AC_PROG_AWK])dnl
791309885543SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
791409885543SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
791509885543Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
791609885543Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
791709885543Smrg	      		     [_AM_PROG_TAR([v7])])])
791809885543Smrg_AM_IF_OPTION([no-dependencies],,
791909885543Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
792009885543Smrg                  [_AM_DEPENDENCIES(CC)],
792109885543Smrg                  [define([AC_PROG_CC],
792209885543Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
792309885543SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
792409885543Smrg                  [_AM_DEPENDENCIES(CXX)],
792509885543Smrg                  [define([AC_PROG_CXX],
792609885543Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
79277104f784SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
79287104f784Smrg                  [_AM_DEPENDENCIES(OBJC)],
79297104f784Smrg                  [define([AC_PROG_OBJC],
79307104f784Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
793109885543Smrg])
793209885543Smrg])
793309885543Smrg
793409885543Smrg
793509885543Smrg# When config.status generates a header, we must update the stamp-h file.
793609885543Smrg# This file resides in the same directory as the config header
793709885543Smrg# that is generated.  The stamp files are numbered to have different names.
793809885543Smrg
793909885543Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
794009885543Smrg# loop where config.status creates the headers, so we can generate
794109885543Smrg# our stamp files there.
794209885543SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
794309885543Smrg[# Compute $1's index in $config_headers.
79447104f784Smrg_am_arg=$1
794509885543Smrg_am_stamp_count=1
794609885543Smrgfor _am_header in $config_headers :; do
794709885543Smrg  case $_am_header in
79487104f784Smrg    $_am_arg | $_am_arg:* )
794909885543Smrg      break ;;
795009885543Smrg    * )
795109885543Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
795209885543Smrg  esac
795309885543Smrgdone
79547104f784Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
795509885543Smrg
795609885543Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
795709885543Smrg#
795809885543Smrg# This file is free software; the Free Software Foundation
795909885543Smrg# gives unlimited permission to copy and/or distribute it,
796009885543Smrg# with or without modifications, as long as this notice is preserved.
796109885543Smrg
796209885543Smrg# AM_PROG_INSTALL_SH
796309885543Smrg# ------------------
796409885543Smrg# Define $install_sh.
796509885543SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
796609885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
79677104f784Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
796809885543SmrgAC_SUBST(install_sh)])
796909885543Smrg
797009885543Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
797109885543Smrg#
797209885543Smrg# This file is free software; the Free Software Foundation
797309885543Smrg# gives unlimited permission to copy and/or distribute it,
797409885543Smrg# with or without modifications, as long as this notice is preserved.
797509885543Smrg
797609885543Smrg# serial 2
797709885543Smrg
797809885543Smrg# Check whether the underlying file-system supports filenames
797909885543Smrg# with a leading dot.  For instance MS-DOS doesn't.
798009885543SmrgAC_DEFUN([AM_SET_LEADING_DOT],
798109885543Smrg[rm -rf .tst 2>/dev/null
798209885543Smrgmkdir .tst 2>/dev/null
798309885543Smrgif test -d .tst; then
798409885543Smrg  am__leading_dot=.
798509885543Smrgelse
798609885543Smrg  am__leading_dot=_
798709885543Smrgfi
798809885543Smrgrmdir .tst 2>/dev/null
798909885543SmrgAC_SUBST([am__leading_dot])])
799009885543Smrg
799109885543Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
799209885543Smrg# From Jim Meyering
799309885543Smrg
799409885543Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
799509885543Smrg# Free Software Foundation, Inc.
799609885543Smrg#
799709885543Smrg# This file is free software; the Free Software Foundation
799809885543Smrg# gives unlimited permission to copy and/or distribute it,
799909885543Smrg# with or without modifications, as long as this notice is preserved.
800009885543Smrg
800109885543Smrg# serial 4
800209885543Smrg
800309885543SmrgAC_DEFUN([AM_MAINTAINER_MODE],
800409885543Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
800509885543Smrg  dnl maintainer-mode is disabled by default
800609885543Smrg  AC_ARG_ENABLE(maintainer-mode,
800709885543Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
800809885543Smrg			  (and sometimes confusing) to the casual installer],
800909885543Smrg      USE_MAINTAINER_MODE=$enableval,
801009885543Smrg      USE_MAINTAINER_MODE=no)
801109885543Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
801209885543Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
801309885543Smrg  MAINT=$MAINTAINER_MODE_TRUE
801409885543Smrg  AC_SUBST(MAINT)dnl
801509885543Smrg]
801609885543Smrg)
801709885543Smrg
801809885543SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
801909885543Smrg
802009885543Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
802109885543Smrg
802209885543Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
802309885543Smrg#
802409885543Smrg# This file is free software; the Free Software Foundation
802509885543Smrg# gives unlimited permission to copy and/or distribute it,
802609885543Smrg# with or without modifications, as long as this notice is preserved.
802709885543Smrg
802809885543Smrg# serial 3
802909885543Smrg
803009885543Smrg# AM_MAKE_INCLUDE()
803109885543Smrg# -----------------
803209885543Smrg# Check to see how make treats includes.
803309885543SmrgAC_DEFUN([AM_MAKE_INCLUDE],
803409885543Smrg[am_make=${MAKE-make}
803509885543Smrgcat > confinc << 'END'
803609885543Smrgam__doit:
803709885543Smrg	@echo done
803809885543Smrg.PHONY: am__doit
803909885543SmrgEND
804009885543Smrg# If we don't find an include directive, just comment out the code.
804109885543SmrgAC_MSG_CHECKING([for style of include used by $am_make])
804209885543Smrgam__include="#"
804309885543Smrgam__quote=
804409885543Smrg_am_result=none
804509885543Smrg# First try GNU make style include.
804609885543Smrgecho "include confinc" > confmf
804709885543Smrg# We grep out `Entering directory' and `Leaving directory'
804809885543Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
804909885543Smrg# In particular we don't look at `^make:' because GNU make might
805009885543Smrg# be invoked under some other name (usually "gmake"), in which
805109885543Smrg# case it prints its new name instead of `make'.
805209885543Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
805309885543Smrg   am__include=include
805409885543Smrg   am__quote=
805509885543Smrg   _am_result=GNU
805609885543Smrgfi
805709885543Smrg# Now try BSD make style include.
805809885543Smrgif test "$am__include" = "#"; then
805909885543Smrg   echo '.include "confinc"' > confmf
806009885543Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
806109885543Smrg      am__include=.include
806209885543Smrg      am__quote="\""
806309885543Smrg      _am_result=BSD
806409885543Smrg   fi
806509885543Smrgfi
806609885543SmrgAC_SUBST([am__include])
806709885543SmrgAC_SUBST([am__quote])
806809885543SmrgAC_MSG_RESULT([$_am_result])
806909885543Smrgrm -f confinc confmf
807009885543Smrg])
807109885543Smrg
807209885543Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
807309885543Smrg
80747104f784Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
807509885543Smrg# Free Software Foundation, Inc.
807609885543Smrg#
807709885543Smrg# This file is free software; the Free Software Foundation
807809885543Smrg# gives unlimited permission to copy and/or distribute it,
807909885543Smrg# with or without modifications, as long as this notice is preserved.
808009885543Smrg
80817104f784Smrg# serial 5
808209885543Smrg
808309885543Smrg# AM_MISSING_PROG(NAME, PROGRAM)
808409885543Smrg# ------------------------------
808509885543SmrgAC_DEFUN([AM_MISSING_PROG],
808609885543Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
808709885543Smrg$1=${$1-"${am_missing_run}$2"}
808809885543SmrgAC_SUBST($1)])
808909885543Smrg
809009885543Smrg
809109885543Smrg# AM_MISSING_HAS_RUN
809209885543Smrg# ------------------
809309885543Smrg# Define MISSING if not defined so far and test if it supports --run.
809409885543Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
809509885543SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
809609885543Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
80977104f784SmrgAC_REQUIRE_AUX_FILE([missing])dnl
809809885543Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
809909885543Smrg# Use eval to expand $SHELL
810009885543Smrgif eval "$MISSING --run true"; then
810109885543Smrg  am_missing_run="$MISSING --run "
810209885543Smrgelse
810309885543Smrg  am_missing_run=
810409885543Smrg  AC_MSG_WARN([`missing' script is too old or missing])
810509885543Smrgfi
810609885543Smrg])
810709885543Smrg
81087104f784Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
810909885543Smrg#
811009885543Smrg# This file is free software; the Free Software Foundation
811109885543Smrg# gives unlimited permission to copy and/or distribute it,
811209885543Smrg# with or without modifications, as long as this notice is preserved.
811309885543Smrg
811409885543Smrg# AM_PROG_MKDIR_P
811509885543Smrg# ---------------
81167104f784Smrg# Check for `mkdir -p'.
811709885543SmrgAC_DEFUN([AM_PROG_MKDIR_P],
81187104f784Smrg[AC_PREREQ([2.60])dnl
81197104f784SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
81207104f784Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
81217104f784Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
81227104f784Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
81237104f784Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
81247104f784Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
81257104f784Smrgdnl adjustment using top_builddir (which is defined more often than
81267104f784Smrgdnl MKDIR_P).
81277104f784SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
81287104f784Smrgcase $mkdir_p in
81297104f784Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
81307104f784Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
81317104f784Smrgesac
81327104f784Smrg])
813309885543Smrg
813409885543Smrg# Helper functions for option handling.                     -*- Autoconf -*-
813509885543Smrg
81367104f784Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
813709885543Smrg#
813809885543Smrg# This file is free software; the Free Software Foundation
813909885543Smrg# gives unlimited permission to copy and/or distribute it,
814009885543Smrg# with or without modifications, as long as this notice is preserved.
814109885543Smrg
81427104f784Smrg# serial 4
814309885543Smrg
814409885543Smrg# _AM_MANGLE_OPTION(NAME)
814509885543Smrg# -----------------------
814609885543SmrgAC_DEFUN([_AM_MANGLE_OPTION],
814709885543Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
814809885543Smrg
814909885543Smrg# _AM_SET_OPTION(NAME)
815009885543Smrg# ------------------------------
815109885543Smrg# Set option NAME.  Presently that only means defining a flag for this option.
815209885543SmrgAC_DEFUN([_AM_SET_OPTION],
815309885543Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
815409885543Smrg
815509885543Smrg# _AM_SET_OPTIONS(OPTIONS)
815609885543Smrg# ----------------------------------
815709885543Smrg# OPTIONS is a space-separated list of Automake options.
815809885543SmrgAC_DEFUN([_AM_SET_OPTIONS],
81597104f784Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
816009885543Smrg
816109885543Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
816209885543Smrg# -------------------------------------------
816309885543Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
816409885543SmrgAC_DEFUN([_AM_IF_OPTION],
816509885543Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
816609885543Smrg
816709885543Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
816809885543Smrg
816909885543Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
817009885543Smrg# Free Software Foundation, Inc.
817109885543Smrg#
817209885543Smrg# This file is free software; the Free Software Foundation
817309885543Smrg# gives unlimited permission to copy and/or distribute it,
817409885543Smrg# with or without modifications, as long as this notice is preserved.
817509885543Smrg
817609885543Smrg# serial 4
817709885543Smrg
817809885543Smrg# AM_SANITY_CHECK
817909885543Smrg# ---------------
818009885543SmrgAC_DEFUN([AM_SANITY_CHECK],
818109885543Smrg[AC_MSG_CHECKING([whether build environment is sane])
818209885543Smrg# Just in case
818309885543Smrgsleep 1
818409885543Smrgecho timestamp > conftest.file
818509885543Smrg# Do `set' in a subshell so we don't clobber the current shell's
818609885543Smrg# arguments.  Must try -L first in case configure is actually a
818709885543Smrg# symlink; some systems play weird games with the mod time of symlinks
818809885543Smrg# (eg FreeBSD returns the mod time of the symlink's containing
818909885543Smrg# directory).
819009885543Smrgif (
819109885543Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
819209885543Smrg   if test "$[*]" = "X"; then
819309885543Smrg      # -L didn't work.
819409885543Smrg      set X `ls -t $srcdir/configure conftest.file`
819509885543Smrg   fi
819609885543Smrg   rm -f conftest.file
819709885543Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
819809885543Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
819909885543Smrg
820009885543Smrg      # If neither matched, then we have a broken ls.  This can happen
820109885543Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
820209885543Smrg      # broken ls alias from the environment.  This has actually
820309885543Smrg      # happened.  Such a system could not be considered "sane".
820409885543Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
820509885543Smrgalias in your environment])
820609885543Smrg   fi
820709885543Smrg
820809885543Smrg   test "$[2]" = conftest.file
820909885543Smrg   )
821009885543Smrgthen
821109885543Smrg   # Ok.
821209885543Smrg   :
821309885543Smrgelse
821409885543Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
821509885543SmrgCheck your system clock])
821609885543Smrgfi
821709885543SmrgAC_MSG_RESULT(yes)])
821809885543Smrg
821909885543Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
822009885543Smrg#
822109885543Smrg# This file is free software; the Free Software Foundation
822209885543Smrg# gives unlimited permission to copy and/or distribute it,
822309885543Smrg# with or without modifications, as long as this notice is preserved.
822409885543Smrg
822509885543Smrg# AM_PROG_INSTALL_STRIP
822609885543Smrg# ---------------------
822709885543Smrg# One issue with vendor `install' (even GNU) is that you can't
822809885543Smrg# specify the program used to strip binaries.  This is especially
822909885543Smrg# annoying in cross-compiling environments, where the build's strip
823009885543Smrg# is unlikely to handle the host's binaries.
823109885543Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
823209885543Smrg# always use install-sh in `make install-strip', and initialize
823309885543Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
823409885543SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
823509885543Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
823609885543Smrg# Installed binaries are usually stripped using `strip' when the user
823709885543Smrg# run `make install-strip'.  However `strip' might not be the right
823809885543Smrg# tool to use in cross-compilation environments, therefore Automake
823909885543Smrg# will honor the `STRIP' environment variable to overrule this program.
824009885543Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
824109885543Smrgif test "$cross_compiling" != no; then
824209885543Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
824309885543Smrgfi
82447104f784SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
824509885543SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
824609885543Smrg
82477104f784Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
82487104f784Smrg#
82497104f784Smrg# This file is free software; the Free Software Foundation
82507104f784Smrg# gives unlimited permission to copy and/or distribute it,
82517104f784Smrg# with or without modifications, as long as this notice is preserved.
82527104f784Smrg
82537104f784Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
82547104f784Smrg# ---------------------------
82557104f784Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
82567104f784Smrg# This macro is traced by Automake.
82577104f784SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
82587104f784Smrg
825909885543Smrg# Check how to create a tarball.                            -*- Autoconf -*-
826009885543Smrg
826109885543Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
826209885543Smrg#
826309885543Smrg# This file is free software; the Free Software Foundation
826409885543Smrg# gives unlimited permission to copy and/or distribute it,
826509885543Smrg# with or without modifications, as long as this notice is preserved.
826609885543Smrg
826709885543Smrg# serial 2
826809885543Smrg
826909885543Smrg# _AM_PROG_TAR(FORMAT)
827009885543Smrg# --------------------
827109885543Smrg# Check how to create a tarball in format FORMAT.
827209885543Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
827309885543Smrg#
827409885543Smrg# Substitute a variable $(am__tar) that is a command
827509885543Smrg# writing to stdout a FORMAT-tarball containing the directory
827609885543Smrg# $tardir.
827709885543Smrg#     tardir=directory && $(am__tar) > result.tar
827809885543Smrg#
827909885543Smrg# Substitute a variable $(am__untar) that extract such
828009885543Smrg# a tarball read from stdin.
828109885543Smrg#     $(am__untar) < result.tar
828209885543SmrgAC_DEFUN([_AM_PROG_TAR],
828309885543Smrg[# Always define AMTAR for backward compatibility.
828409885543SmrgAM_MISSING_PROG([AMTAR], [tar])
828509885543Smrgm4_if([$1], [v7],
828609885543Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
828709885543Smrg     [m4_case([$1], [ustar],, [pax],,
828809885543Smrg              [m4_fatal([Unknown tar format])])
828909885543SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
829009885543Smrg# Loop over all known methods to create a tar archive until one works.
829109885543Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
829209885543Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
829309885543Smrg# Do not fold the above two line into one, because Tru64 sh and
829409885543Smrg# Solaris sh will not grok spaces in the rhs of `-'.
829509885543Smrgfor _am_tool in $_am_tools
829609885543Smrgdo
829709885543Smrg  case $_am_tool in
829809885543Smrg  gnutar)
829909885543Smrg    for _am_tar in tar gnutar gtar;
830009885543Smrg    do
830109885543Smrg      AM_RUN_LOG([$_am_tar --version]) && break
830209885543Smrg    done
830309885543Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
830409885543Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
830509885543Smrg    am__untar="$_am_tar -xf -"
830609885543Smrg    ;;
830709885543Smrg  plaintar)
830809885543Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
830909885543Smrg    # ustar tarball either.
831009885543Smrg    (tar --version) >/dev/null 2>&1 && continue
831109885543Smrg    am__tar='tar chf - "$$tardir"'
831209885543Smrg    am__tar_='tar chf - "$tardir"'
831309885543Smrg    am__untar='tar xf -'
831409885543Smrg    ;;
831509885543Smrg  pax)
831609885543Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
831709885543Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
831809885543Smrg    am__untar='pax -r'
831909885543Smrg    ;;
832009885543Smrg  cpio)
832109885543Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
832209885543Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
832309885543Smrg    am__untar='cpio -i -H $1 -d'
832409885543Smrg    ;;
832509885543Smrg  none)
832609885543Smrg    am__tar=false
832709885543Smrg    am__tar_=false
832809885543Smrg    am__untar=false
832909885543Smrg    ;;
833009885543Smrg  esac
833109885543Smrg
833209885543Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
833309885543Smrg  # and am__untar set.
833409885543Smrg  test -n "${am_cv_prog_tar_$1}" && break
833509885543Smrg
833609885543Smrg  # tar/untar a dummy directory, and stop if the command works
833709885543Smrg  rm -rf conftest.dir
833809885543Smrg  mkdir conftest.dir
833909885543Smrg  echo GrepMe > conftest.dir/file
834009885543Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
834109885543Smrg  rm -rf conftest.dir
834209885543Smrg  if test -s conftest.tar; then
834309885543Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
834409885543Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
834509885543Smrg  fi
834609885543Smrgdone
834709885543Smrgrm -rf conftest.dir
834809885543Smrg
834909885543SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
835009885543SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
835109885543SmrgAC_SUBST([am__tar])
835209885543SmrgAC_SUBST([am__untar])
835309885543Smrg]) # _AM_PROG_TAR
835409885543Smrg
8355