aclocal.m4 revision 8e0ed500
18e0ed500Smrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
217a48c7cSmrg
317a48c7cSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
48e0ed500Smrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
517a48c7cSmrg# This file is free software; the Free Software Foundation
617a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
717a48c7cSmrg# with or without modifications, as long as this notice is preserved.
817a48c7cSmrg
917a48c7cSmrg# This program is distributed in the hope that it will be useful,
1017a48c7cSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1117a48c7cSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1217a48c7cSmrg# PARTICULAR PURPOSE.
1317a48c7cSmrg
148e0ed500Smrgm4_ifndef([AC_AUTOCONF_VERSION],
158e0ed500Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
168e0ed500Smrgm4_if(AC_AUTOCONF_VERSION, [2.63],,
178e0ed500Smrg[m4_warning([this file was generated for autoconf 2.63.
188e0ed500SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
198e0ed500SmrgIf you have problems, you may need to regenerate the build system entirely.
208e0ed500SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
218e0ed500Smrg
2217a48c7cSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2317a48c7cSmrg
248e0ed500Smrg# serial 52 AC_PROG_LIBTOOL
2517a48c7cSmrg
2617a48c7cSmrg
2717a48c7cSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2817a48c7cSmrg# -----------------------------------------------------------
2917a48c7cSmrg# If this macro is not defined by Autoconf, define it here.
3017a48c7cSmrgm4_ifdef([AC_PROVIDE_IFELSE],
3117a48c7cSmrg         [],
3217a48c7cSmrg         [m4_define([AC_PROVIDE_IFELSE],
3317a48c7cSmrg	         [m4_ifdef([AC_PROVIDE_$1],
3417a48c7cSmrg		           [$2], [$3])])])
3517a48c7cSmrg
3617a48c7cSmrg
3717a48c7cSmrg# AC_PROG_LIBTOOL
3817a48c7cSmrg# ---------------
3917a48c7cSmrgAC_DEFUN([AC_PROG_LIBTOOL],
4017a48c7cSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
4117a48c7cSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
4217a48c7cSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
4317a48c7cSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
4417a48c7cSmrg    [AC_LIBTOOL_CXX],
4517a48c7cSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
4617a48c7cSmrg  ])])
4717a48c7cSmrgdnl And a similar setup for Fortran 77 support
4817a48c7cSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
4917a48c7cSmrg    [AC_LIBTOOL_F77],
5017a48c7cSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5117a48c7cSmrg])])
5217a48c7cSmrg
5317a48c7cSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5417a48c7cSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5517a48c7cSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5617a48c7cSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5717a48c7cSmrg    [AC_LIBTOOL_GCJ],
5817a48c7cSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5917a48c7cSmrg      [AC_LIBTOOL_GCJ],
6017a48c7cSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6117a48c7cSmrg	[AC_LIBTOOL_GCJ],
6217a48c7cSmrg      [ifdef([AC_PROG_GCJ],
6317a48c7cSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6417a48c7cSmrg       ifdef([A][M_PROG_GCJ],
6517a48c7cSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6617a48c7cSmrg       ifdef([LT_AC_PROG_GCJ],
6717a48c7cSmrg	     [define([LT_AC_PROG_GCJ],
6817a48c7cSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6917a48c7cSmrg])])# AC_PROG_LIBTOOL
7017a48c7cSmrg
7117a48c7cSmrg
7217a48c7cSmrg# _AC_PROG_LIBTOOL
7317a48c7cSmrg# ----------------
7417a48c7cSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
7517a48c7cSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
7617a48c7cSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
7717a48c7cSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
7817a48c7cSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
7917a48c7cSmrg
8017a48c7cSmrg# This can be used to rebuild libtool when needed
8117a48c7cSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
8217a48c7cSmrg
8317a48c7cSmrg# Always use our own libtool.
8417a48c7cSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
8517a48c7cSmrgAC_SUBST(LIBTOOL)dnl
8617a48c7cSmrg
8717a48c7cSmrg# Prevent multiple expansion
8817a48c7cSmrgdefine([AC_PROG_LIBTOOL], [])
8917a48c7cSmrg])# _AC_PROG_LIBTOOL
9017a48c7cSmrg
9117a48c7cSmrg
9217a48c7cSmrg# AC_LIBTOOL_SETUP
9317a48c7cSmrg# ----------------
9417a48c7cSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
9517a48c7cSmrg[AC_PREREQ(2.50)dnl
9617a48c7cSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
9717a48c7cSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
9817a48c7cSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
9917a48c7cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
10017a48c7cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
10117a48c7cSmrgAC_REQUIRE([AC_PROG_CC])dnl
10217a48c7cSmrgAC_REQUIRE([AC_PROG_LD])dnl
10317a48c7cSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
10417a48c7cSmrgAC_REQUIRE([AC_PROG_NM])dnl
10517a48c7cSmrg
10617a48c7cSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
10717a48c7cSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
10817a48c7cSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
10917a48c7cSmrgAC_REQUIRE([AC_OBJEXT])dnl
11017a48c7cSmrgAC_REQUIRE([AC_EXEEXT])dnl
11117a48c7cSmrgdnl
11217a48c7cSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
11317a48c7cSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
11417a48c7cSmrgAC_LIBTOOL_OBJDIR
11517a48c7cSmrg
11617a48c7cSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
11717a48c7cSmrg_LT_AC_PROG_ECHO_BACKSLASH
11817a48c7cSmrg
11917a48c7cSmrgcase $host_os in
12017a48c7cSmrgaix3*)
12117a48c7cSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
12217a48c7cSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
12317a48c7cSmrg  # vanish in a puff of smoke.
12417a48c7cSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
12517a48c7cSmrg    COLLECT_NAMES=
12617a48c7cSmrg    export COLLECT_NAMES
12717a48c7cSmrg  fi
12817a48c7cSmrg  ;;
12917a48c7cSmrgesac
13017a48c7cSmrg
13117a48c7cSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
13217a48c7cSmrg# metacharacters that are still active within double-quoted strings.
13317a48c7cSmrgXsed='sed -e 1s/^X//'
13417a48c7cSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
13517a48c7cSmrg
13617a48c7cSmrg# Same as above, but do not quote variable references.
13717a48c7cSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
13817a48c7cSmrg
13917a48c7cSmrg# Sed substitution to delay expansion of an escaped shell variable in a
14017a48c7cSmrg# double_quote_subst'ed string.
14117a48c7cSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
14217a48c7cSmrg
14317a48c7cSmrg# Sed substitution to avoid accidental globbing in evaled expressions
14417a48c7cSmrgno_glob_subst='s/\*/\\\*/g'
14517a48c7cSmrg
14617a48c7cSmrg# Constants:
14717a48c7cSmrgrm="rm -f"
14817a48c7cSmrg
14917a48c7cSmrg# Global variables:
15017a48c7cSmrgdefault_ofile=libtool
15117a48c7cSmrgcan_build_shared=yes
15217a48c7cSmrg
15317a48c7cSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
15417a48c7cSmrg# which needs '.lib').
15517a48c7cSmrglibext=a
15617a48c7cSmrgltmain="$ac_aux_dir/ltmain.sh"
15717a48c7cSmrgofile="$default_ofile"
15817a48c7cSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
15917a48c7cSmrg
16017a48c7cSmrgAC_CHECK_TOOL(AR, ar, false)
16117a48c7cSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
16217a48c7cSmrgAC_CHECK_TOOL(STRIP, strip, :)
16317a48c7cSmrg
16417a48c7cSmrgold_CC="$CC"
16517a48c7cSmrgold_CFLAGS="$CFLAGS"
16617a48c7cSmrg
16717a48c7cSmrg# Set sane defaults for various variables
16817a48c7cSmrgtest -z "$AR" && AR=ar
16917a48c7cSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
17017a48c7cSmrgtest -z "$AS" && AS=as
17117a48c7cSmrgtest -z "$CC" && CC=cc
17217a48c7cSmrgtest -z "$LTCC" && LTCC=$CC
17317a48c7cSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
17417a48c7cSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
17517a48c7cSmrgtest -z "$LD" && LD=ld
17617a48c7cSmrgtest -z "$LN_S" && LN_S="ln -s"
17717a48c7cSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
17817a48c7cSmrgtest -z "$NM" && NM=nm
17917a48c7cSmrgtest -z "$SED" && SED=sed
18017a48c7cSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
18117a48c7cSmrgtest -z "$RANLIB" && RANLIB=:
18217a48c7cSmrgtest -z "$STRIP" && STRIP=:
18317a48c7cSmrgtest -z "$ac_objext" && ac_objext=o
18417a48c7cSmrg
18517a48c7cSmrg# Determine commands to create old-style static archives.
1868e0ed500Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
18717a48c7cSmrgold_postinstall_cmds='chmod 644 $oldlib'
18817a48c7cSmrgold_postuninstall_cmds=
18917a48c7cSmrg
19017a48c7cSmrgif test -n "$RANLIB"; then
19117a48c7cSmrg  case $host_os in
19217a48c7cSmrg  openbsd*)
19317a48c7cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
19417a48c7cSmrg    ;;
19517a48c7cSmrg  *)
19617a48c7cSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
19717a48c7cSmrg    ;;
19817a48c7cSmrg  esac
19917a48c7cSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
20017a48c7cSmrgfi
20117a48c7cSmrg
20217a48c7cSmrg_LT_CC_BASENAME([$compiler])
20317a48c7cSmrg
20417a48c7cSmrg# Only perform the check for file, if the check method requires it
20517a48c7cSmrgcase $deplibs_check_method in
20617a48c7cSmrgfile_magic*)
20717a48c7cSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
20817a48c7cSmrg    AC_PATH_MAGIC
20917a48c7cSmrg  fi
21017a48c7cSmrg  ;;
21117a48c7cSmrgesac
21217a48c7cSmrg
2138e0ed500Smrg_LT_REQUIRED_DARWIN_CHECKS
2148e0ed500Smrg
21517a48c7cSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
21617a48c7cSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
21717a48c7cSmrgenable_win32_dll=yes, enable_win32_dll=no)
21817a48c7cSmrg
21917a48c7cSmrgAC_ARG_ENABLE([libtool-lock],
22017a48c7cSmrg    [AC_HELP_STRING([--disable-libtool-lock],
22117a48c7cSmrg	[avoid locking (might break parallel builds)])])
22217a48c7cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
22317a48c7cSmrg
22417a48c7cSmrgAC_ARG_WITH([pic],
22517a48c7cSmrg    [AC_HELP_STRING([--with-pic],
22617a48c7cSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
22717a48c7cSmrg    [pic_mode="$withval"],
22817a48c7cSmrg    [pic_mode=default])
22917a48c7cSmrgtest -z "$pic_mode" && pic_mode=default
23017a48c7cSmrg
23117a48c7cSmrg# Use C for the default configuration in the libtool script
23217a48c7cSmrgtagname=
23317a48c7cSmrgAC_LIBTOOL_LANG_C_CONFIG
23417a48c7cSmrg_LT_AC_TAGCONFIG
23517a48c7cSmrg])# AC_LIBTOOL_SETUP
23617a48c7cSmrg
23717a48c7cSmrg
23817a48c7cSmrg# _LT_AC_SYS_COMPILER
23917a48c7cSmrg# -------------------
24017a48c7cSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
24117a48c7cSmrg[AC_REQUIRE([AC_PROG_CC])dnl
24217a48c7cSmrg
24317a48c7cSmrg# If no C compiler was specified, use CC.
24417a48c7cSmrgLTCC=${LTCC-"$CC"}
24517a48c7cSmrg
24617a48c7cSmrg# If no C compiler flags were specified, use CFLAGS.
24717a48c7cSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
24817a48c7cSmrg
24917a48c7cSmrg# Allow CC to be a program name with arguments.
25017a48c7cSmrgcompiler=$CC
25117a48c7cSmrg])# _LT_AC_SYS_COMPILER
25217a48c7cSmrg
25317a48c7cSmrg
25417a48c7cSmrg# _LT_CC_BASENAME(CC)
25517a48c7cSmrg# -------------------
25617a48c7cSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
25717a48c7cSmrgAC_DEFUN([_LT_CC_BASENAME],
25817a48c7cSmrg[for cc_temp in $1""; do
25917a48c7cSmrg  case $cc_temp in
26017a48c7cSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
26117a48c7cSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
26217a48c7cSmrg    \-*) ;;
26317a48c7cSmrg    *) break;;
26417a48c7cSmrg  esac
26517a48c7cSmrgdone
26617a48c7cSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
26717a48c7cSmrg])
26817a48c7cSmrg
26917a48c7cSmrg
27017a48c7cSmrg# _LT_COMPILER_BOILERPLATE
27117a48c7cSmrg# ------------------------
27217a48c7cSmrg# Check for compiler boilerplate output or warnings with
27317a48c7cSmrg# the simple compiler test code.
27417a48c7cSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
2758e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2768e0ed500Smrgac_outfile=conftest.$ac_objext
2778e0ed500Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
27817a48c7cSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27917a48c7cSmrg_lt_compiler_boilerplate=`cat conftest.err`
28017a48c7cSmrg$rm conftest*
28117a48c7cSmrg])# _LT_COMPILER_BOILERPLATE
28217a48c7cSmrg
28317a48c7cSmrg
28417a48c7cSmrg# _LT_LINKER_BOILERPLATE
28517a48c7cSmrg# ----------------------
28617a48c7cSmrg# Check for linker boilerplate output or warnings with
28717a48c7cSmrg# the simple link test code.
28817a48c7cSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
2898e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2908e0ed500Smrgac_outfile=conftest.$ac_objext
2918e0ed500Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
29217a48c7cSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
29317a48c7cSmrg_lt_linker_boilerplate=`cat conftest.err`
2948e0ed500Smrg$rm -r conftest*
29517a48c7cSmrg])# _LT_LINKER_BOILERPLATE
29617a48c7cSmrg
2978e0ed500Smrg# _LT_REQUIRED_DARWIN_CHECKS
2988e0ed500Smrg# --------------------------
2998e0ed500Smrg# Check for some things on darwin
3008e0ed500SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
3018e0ed500Smrg  case $host_os in
3028e0ed500Smrg    rhapsody* | darwin*)
3038e0ed500Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3048e0ed500Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3058e0ed500Smrg
3068e0ed500Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3078e0ed500Smrg      [lt_cv_apple_cc_single_mod=no
3088e0ed500Smrg      if test -z "${LT_MULTI_MODULE}"; then
3098e0ed500Smrg   # By default we will add the -single_module flag. You can override
3108e0ed500Smrg   # by either setting the environment variable LT_MULTI_MODULE
3118e0ed500Smrg   # non-empty at configure time, or by adding -multi_module to the
3128e0ed500Smrg   # link flags.
3138e0ed500Smrg   echo "int foo(void){return 1;}" > conftest.c
3148e0ed500Smrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3158e0ed500Smrg     -dynamiclib ${wl}-single_module conftest.c
3168e0ed500Smrg   if test -f libconftest.dylib; then
3178e0ed500Smrg     lt_cv_apple_cc_single_mod=yes
3188e0ed500Smrg     rm -rf libconftest.dylib*
3198e0ed500Smrg   fi
3208e0ed500Smrg   rm conftest.c
3218e0ed500Smrg      fi])
3228e0ed500Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3238e0ed500Smrg      [lt_cv_ld_exported_symbols_list],
3248e0ed500Smrg      [lt_cv_ld_exported_symbols_list=no
3258e0ed500Smrg      save_LDFLAGS=$LDFLAGS
3268e0ed500Smrg      echo "_main" > conftest.sym
3278e0ed500Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3288e0ed500Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3298e0ed500Smrg   [lt_cv_ld_exported_symbols_list=yes],
3308e0ed500Smrg   [lt_cv_ld_exported_symbols_list=no])
3318e0ed500Smrg   LDFLAGS="$save_LDFLAGS"
3328e0ed500Smrg    ])
3338e0ed500Smrg    case $host_os in
3348e0ed500Smrg    rhapsody* | darwin1.[[0123]])
3358e0ed500Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3368e0ed500Smrg    darwin1.*)
3378e0ed500Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3388e0ed500Smrg    darwin*)
3398e0ed500Smrg      # if running on 10.5 or later, the deployment target defaults
3408e0ed500Smrg      # to the OS version, if on x86, and 10.4, the deployment
3418e0ed500Smrg      # target defaults to 10.4. Don't you love it?
3428e0ed500Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3438e0ed500Smrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3448e0ed500Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3458e0ed500Smrg   10.[[012]]*)
3468e0ed500Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3478e0ed500Smrg   10.*)
3488e0ed500Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3498e0ed500Smrg      esac
3508e0ed500Smrg    ;;
3518e0ed500Smrg  esac
3528e0ed500Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3538e0ed500Smrg      _lt_dar_single_mod='$single_module'
3548e0ed500Smrg    fi
3558e0ed500Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3568e0ed500Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3578e0ed500Smrg    else
3588e0ed500Smrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
3598e0ed500Smrg    fi
3608e0ed500Smrg    if test "$DSYMUTIL" != ":"; then
3618e0ed500Smrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
3628e0ed500Smrg    else
3638e0ed500Smrg      _lt_dsymutil=
3648e0ed500Smrg    fi
3658e0ed500Smrg    ;;
3668e0ed500Smrg  esac
3678e0ed500Smrg])
36817a48c7cSmrg
36917a48c7cSmrg# _LT_AC_SYS_LIBPATH_AIX
37017a48c7cSmrg# ----------------------
37117a48c7cSmrg# Links a minimal program and checks the executable
37217a48c7cSmrg# for the system default hardcoded library path. In most cases,
37317a48c7cSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
37417a48c7cSmrg# the location of the communication and MPI libs are included too.
37517a48c7cSmrg# If we don't find anything, use the default library path according
37617a48c7cSmrg# to the aix ld manual.
37717a48c7cSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
3788e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
3798e0ed500SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
3808e0ed500Smrglt_aix_libpath_sed='
3818e0ed500Smrg    /Import File Strings/,/^$/ {
3828e0ed500Smrg	/^0/ {
3838e0ed500Smrg	    s/^0  *\(.*\)$/\1/
3848e0ed500Smrg	    p
3858e0ed500Smrg	}
3868e0ed500Smrg    }'
3878e0ed500Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
38817a48c7cSmrg# Check for a 64-bit object if we didn't find anything.
3898e0ed500Smrgif test -z "$aix_libpath"; then
3908e0ed500Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3918e0ed500Smrgfi],[])
39217a48c7cSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
39317a48c7cSmrg])# _LT_AC_SYS_LIBPATH_AIX
39417a48c7cSmrg
39517a48c7cSmrg
39617a48c7cSmrg# _LT_AC_SHELL_INIT(ARG)
39717a48c7cSmrg# ----------------------
39817a48c7cSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
39917a48c7cSmrg[ifdef([AC_DIVERSION_NOTICE],
40017a48c7cSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
40117a48c7cSmrg	 [AC_DIVERT_PUSH(NOTICE)])
40217a48c7cSmrg$1
40317a48c7cSmrgAC_DIVERT_POP
40417a48c7cSmrg])# _LT_AC_SHELL_INIT
40517a48c7cSmrg
40617a48c7cSmrg
40717a48c7cSmrg# _LT_AC_PROG_ECHO_BACKSLASH
40817a48c7cSmrg# --------------------------
40917a48c7cSmrg# Add some code to the start of the generated configure script which
41017a48c7cSmrg# will find an echo command which doesn't interpret backslashes.
41117a48c7cSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
41217a48c7cSmrg[_LT_AC_SHELL_INIT([
41317a48c7cSmrg# Check that we are running under the correct shell.
41417a48c7cSmrgSHELL=${CONFIG_SHELL-/bin/sh}
41517a48c7cSmrg
41617a48c7cSmrgcase X$ECHO in
41717a48c7cSmrgX*--fallback-echo)
41817a48c7cSmrg  # Remove one level of quotation (which was required for Make).
41917a48c7cSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
42017a48c7cSmrg  ;;
42117a48c7cSmrgesac
42217a48c7cSmrg
42317a48c7cSmrgecho=${ECHO-echo}
42417a48c7cSmrgif test "X[$]1" = X--no-reexec; then
42517a48c7cSmrg  # Discard the --no-reexec flag, and continue.
42617a48c7cSmrg  shift
42717a48c7cSmrgelif test "X[$]1" = X--fallback-echo; then
42817a48c7cSmrg  # Avoid inline document here, it may be left over
42917a48c7cSmrg  :
43017a48c7cSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
43117a48c7cSmrg  # Yippee, $echo works!
43217a48c7cSmrg  :
43317a48c7cSmrgelse
43417a48c7cSmrg  # Restart under the correct shell.
43517a48c7cSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
43617a48c7cSmrgfi
43717a48c7cSmrg
43817a48c7cSmrgif test "X[$]1" = X--fallback-echo; then
43917a48c7cSmrg  # used as fallback echo
44017a48c7cSmrg  shift
44117a48c7cSmrg  cat <<EOF
44217a48c7cSmrg[$]*
44317a48c7cSmrgEOF
44417a48c7cSmrg  exit 0
44517a48c7cSmrgfi
44617a48c7cSmrg
44717a48c7cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
44817a48c7cSmrg# if CDPATH is set.
44917a48c7cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
45017a48c7cSmrg
45117a48c7cSmrgif test -z "$ECHO"; then
45217a48c7cSmrgif test "X${echo_test_string+set}" != Xset; then
45317a48c7cSmrg# find a string as large as possible, as long as the shell can cope with it
45417a48c7cSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
45517a48c7cSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
45617a48c7cSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
45717a48c7cSmrg       echo_test_string=`eval $cmd` &&
45817a48c7cSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
45917a48c7cSmrg    then
46017a48c7cSmrg      break
46117a48c7cSmrg    fi
46217a48c7cSmrg  done
46317a48c7cSmrgfi
46417a48c7cSmrg
46517a48c7cSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
46617a48c7cSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
46717a48c7cSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
46817a48c7cSmrg  :
46917a48c7cSmrgelse
47017a48c7cSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
47117a48c7cSmrg  # backslashes.  This makes it impossible to quote backslashes using
47217a48c7cSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
47317a48c7cSmrg  #
47417a48c7cSmrg  # So, first we look for a working echo in the user's PATH.
47517a48c7cSmrg
47617a48c7cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
47717a48c7cSmrg  for dir in $PATH /usr/ucb; do
47817a48c7cSmrg    IFS="$lt_save_ifs"
47917a48c7cSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
48017a48c7cSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
48117a48c7cSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
48217a48c7cSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
48317a48c7cSmrg      echo="$dir/echo"
48417a48c7cSmrg      break
48517a48c7cSmrg    fi
48617a48c7cSmrg  done
48717a48c7cSmrg  IFS="$lt_save_ifs"
48817a48c7cSmrg
48917a48c7cSmrg  if test "X$echo" = Xecho; then
49017a48c7cSmrg    # We didn't find a better echo, so look for alternatives.
49117a48c7cSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
49217a48c7cSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
49317a48c7cSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
49417a48c7cSmrg      # This shell has a builtin print -r that does the trick.
49517a48c7cSmrg      echo='print -r'
49617a48c7cSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
49717a48c7cSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
49817a48c7cSmrg      # If we have ksh, try running configure again with it.
49917a48c7cSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
50017a48c7cSmrg      export ORIGINAL_CONFIG_SHELL
50117a48c7cSmrg      CONFIG_SHELL=/bin/ksh
50217a48c7cSmrg      export CONFIG_SHELL
50317a48c7cSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
50417a48c7cSmrg    else
50517a48c7cSmrg      # Try using printf.
50617a48c7cSmrg      echo='printf %s\n'
50717a48c7cSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
50817a48c7cSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
50917a48c7cSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
51017a48c7cSmrg	# Cool, printf works
51117a48c7cSmrg	:
51217a48c7cSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
51317a48c7cSmrg	   test "X$echo_testing_string" = 'X\t' &&
51417a48c7cSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
51517a48c7cSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
51617a48c7cSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
51717a48c7cSmrg	export CONFIG_SHELL
51817a48c7cSmrg	SHELL="$CONFIG_SHELL"
51917a48c7cSmrg	export SHELL
52017a48c7cSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
52117a48c7cSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
52217a48c7cSmrg	   test "X$echo_testing_string" = 'X\t' &&
52317a48c7cSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
52417a48c7cSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
52517a48c7cSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
52617a48c7cSmrg      else
52717a48c7cSmrg	# maybe with a smaller string...
52817a48c7cSmrg	prev=:
52917a48c7cSmrg
53017a48c7cSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
53117a48c7cSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
53217a48c7cSmrg	  then
53317a48c7cSmrg	    break
53417a48c7cSmrg	  fi
53517a48c7cSmrg	  prev="$cmd"
53617a48c7cSmrg	done
53717a48c7cSmrg
53817a48c7cSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
53917a48c7cSmrg	  echo_test_string=`eval $prev`
54017a48c7cSmrg	  export echo_test_string
54117a48c7cSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
54217a48c7cSmrg	else
54317a48c7cSmrg	  # Oops.  We lost completely, so just stick with echo.
54417a48c7cSmrg	  echo=echo
54517a48c7cSmrg	fi
54617a48c7cSmrg      fi
54717a48c7cSmrg    fi
54817a48c7cSmrg  fi
54917a48c7cSmrgfi
55017a48c7cSmrgfi
55117a48c7cSmrg
55217a48c7cSmrg# Copy echo and quote the copy suitably for passing to libtool from
55317a48c7cSmrg# the Makefile, instead of quoting the original, which is used later.
55417a48c7cSmrgECHO=$echo
55517a48c7cSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
55617a48c7cSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
55717a48c7cSmrgfi
55817a48c7cSmrg
55917a48c7cSmrgAC_SUBST(ECHO)
56017a48c7cSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
56117a48c7cSmrg
56217a48c7cSmrg
56317a48c7cSmrg# _LT_AC_LOCK
56417a48c7cSmrg# -----------
56517a48c7cSmrgAC_DEFUN([_LT_AC_LOCK],
56617a48c7cSmrg[AC_ARG_ENABLE([libtool-lock],
56717a48c7cSmrg    [AC_HELP_STRING([--disable-libtool-lock],
56817a48c7cSmrg	[avoid locking (might break parallel builds)])])
56917a48c7cSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
57017a48c7cSmrg
57117a48c7cSmrg# Some flags need to be propagated to the compiler or linker for good
57217a48c7cSmrg# libtool support.
57317a48c7cSmrgcase $host in
57417a48c7cSmrgia64-*-hpux*)
57517a48c7cSmrg  # Find out which ABI we are using.
57617a48c7cSmrg  echo 'int i;' > conftest.$ac_ext
57717a48c7cSmrg  if AC_TRY_EVAL(ac_compile); then
57817a48c7cSmrg    case `/usr/bin/file conftest.$ac_objext` in
57917a48c7cSmrg    *ELF-32*)
58017a48c7cSmrg      HPUX_IA64_MODE="32"
58117a48c7cSmrg      ;;
58217a48c7cSmrg    *ELF-64*)
58317a48c7cSmrg      HPUX_IA64_MODE="64"
58417a48c7cSmrg      ;;
58517a48c7cSmrg    esac
58617a48c7cSmrg  fi
58717a48c7cSmrg  rm -rf conftest*
58817a48c7cSmrg  ;;
58917a48c7cSmrg*-*-irix6*)
59017a48c7cSmrg  # Find out which ABI we are using.
59117a48c7cSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
59217a48c7cSmrg  if AC_TRY_EVAL(ac_compile); then
59317a48c7cSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
59417a48c7cSmrg    case `/usr/bin/file conftest.$ac_objext` in
59517a48c7cSmrg    *32-bit*)
59617a48c7cSmrg      LD="${LD-ld} -melf32bsmip"
59717a48c7cSmrg      ;;
59817a48c7cSmrg    *N32*)
59917a48c7cSmrg      LD="${LD-ld} -melf32bmipn32"
60017a48c7cSmrg      ;;
60117a48c7cSmrg    *64-bit*)
60217a48c7cSmrg      LD="${LD-ld} -melf64bmip"
60317a48c7cSmrg      ;;
60417a48c7cSmrg    esac
60517a48c7cSmrg   else
60617a48c7cSmrg    case `/usr/bin/file conftest.$ac_objext` in
60717a48c7cSmrg    *32-bit*)
60817a48c7cSmrg      LD="${LD-ld} -32"
60917a48c7cSmrg      ;;
61017a48c7cSmrg    *N32*)
61117a48c7cSmrg      LD="${LD-ld} -n32"
61217a48c7cSmrg      ;;
61317a48c7cSmrg    *64-bit*)
61417a48c7cSmrg      LD="${LD-ld} -64"
61517a48c7cSmrg      ;;
61617a48c7cSmrg    esac
61717a48c7cSmrg   fi
61817a48c7cSmrg  fi
61917a48c7cSmrg  rm -rf conftest*
62017a48c7cSmrg  ;;
62117a48c7cSmrg
6228e0ed500Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
6238e0ed500Smrgs390*-*linux*|sparc*-*linux*)
62417a48c7cSmrg  # Find out which ABI we are using.
62517a48c7cSmrg  echo 'int i;' > conftest.$ac_ext
62617a48c7cSmrg  if AC_TRY_EVAL(ac_compile); then
62717a48c7cSmrg    case `/usr/bin/file conftest.o` in
62817a48c7cSmrg    *32-bit*)
62917a48c7cSmrg      case $host in
6308e0ed500Smrg        x86_64-*kfreebsd*-gnu)
6318e0ed500Smrg          LD="${LD-ld} -m elf_i386_fbsd"
6328e0ed500Smrg          ;;
63317a48c7cSmrg        x86_64-*linux*)
63417a48c7cSmrg          LD="${LD-ld} -m elf_i386"
63517a48c7cSmrg          ;;
63617a48c7cSmrg        ppc64-*linux*|powerpc64-*linux*)
63717a48c7cSmrg          LD="${LD-ld} -m elf32ppclinux"
63817a48c7cSmrg          ;;
63917a48c7cSmrg        s390x-*linux*)
64017a48c7cSmrg          LD="${LD-ld} -m elf_s390"
64117a48c7cSmrg          ;;
64217a48c7cSmrg        sparc64-*linux*)
64317a48c7cSmrg          LD="${LD-ld} -m elf32_sparc"
64417a48c7cSmrg          ;;
64517a48c7cSmrg      esac
64617a48c7cSmrg      ;;
64717a48c7cSmrg    *64-bit*)
6488e0ed500Smrg      libsuff=64
64917a48c7cSmrg      case $host in
6508e0ed500Smrg        x86_64-*kfreebsd*-gnu)
6518e0ed500Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
6528e0ed500Smrg          ;;
65317a48c7cSmrg        x86_64-*linux*)
65417a48c7cSmrg          LD="${LD-ld} -m elf_x86_64"
65517a48c7cSmrg          ;;
65617a48c7cSmrg        ppc*-*linux*|powerpc*-*linux*)
65717a48c7cSmrg          LD="${LD-ld} -m elf64ppc"
65817a48c7cSmrg          ;;
65917a48c7cSmrg        s390*-*linux*)
66017a48c7cSmrg          LD="${LD-ld} -m elf64_s390"
66117a48c7cSmrg          ;;
66217a48c7cSmrg        sparc*-*linux*)
66317a48c7cSmrg          LD="${LD-ld} -m elf64_sparc"
66417a48c7cSmrg          ;;
66517a48c7cSmrg      esac
66617a48c7cSmrg      ;;
66717a48c7cSmrg    esac
66817a48c7cSmrg  fi
66917a48c7cSmrg  rm -rf conftest*
67017a48c7cSmrg  ;;
67117a48c7cSmrg
67217a48c7cSmrg*-*-sco3.2v5*)
67317a48c7cSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
67417a48c7cSmrg  SAVE_CFLAGS="$CFLAGS"
67517a48c7cSmrg  CFLAGS="$CFLAGS -belf"
67617a48c7cSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
67717a48c7cSmrg    [AC_LANG_PUSH(C)
67817a48c7cSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
67917a48c7cSmrg     AC_LANG_POP])
68017a48c7cSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
68117a48c7cSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
68217a48c7cSmrg    CFLAGS="$SAVE_CFLAGS"
68317a48c7cSmrg  fi
68417a48c7cSmrg  ;;
68517a48c7cSmrgsparc*-*solaris*)
68617a48c7cSmrg  # Find out which ABI we are using.
68717a48c7cSmrg  echo 'int i;' > conftest.$ac_ext
68817a48c7cSmrg  if AC_TRY_EVAL(ac_compile); then
68917a48c7cSmrg    case `/usr/bin/file conftest.o` in
69017a48c7cSmrg    *64-bit*)
69117a48c7cSmrg      case $lt_cv_prog_gnu_ld in
69217a48c7cSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
6938e0ed500Smrg      *)
6948e0ed500Smrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6958e0ed500Smrg	  LD="${LD-ld} -64"
6968e0ed500Smrg	fi
6978e0ed500Smrg	;;
69817a48c7cSmrg      esac
69917a48c7cSmrg      ;;
70017a48c7cSmrg    esac
70117a48c7cSmrg  fi
70217a48c7cSmrg  rm -rf conftest*
70317a48c7cSmrg  ;;
70417a48c7cSmrg
70517a48c7cSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
70617a48c7cSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
70717a48c7cSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
70817a48c7cSmrg  AC_CHECK_TOOL(AS, as, false)
70917a48c7cSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
71017a48c7cSmrg  ;;
71117a48c7cSmrg  ])
71217a48c7cSmrgesac
71317a48c7cSmrg
71417a48c7cSmrgneed_locks="$enable_libtool_lock"
71517a48c7cSmrg
71617a48c7cSmrg])# _LT_AC_LOCK
71717a48c7cSmrg
71817a48c7cSmrg
71917a48c7cSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
72017a48c7cSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
72117a48c7cSmrg# ----------------------------------------------------------------
72217a48c7cSmrg# Check whether the given compiler option works
72317a48c7cSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
72417a48c7cSmrg[AC_REQUIRE([LT_AC_PROG_SED])
72517a48c7cSmrgAC_CACHE_CHECK([$1], [$2],
72617a48c7cSmrg  [$2=no
72717a48c7cSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
7288e0ed500Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
72917a48c7cSmrg   lt_compiler_flag="$3"
73017a48c7cSmrg   # Insert the option either (1) after the last *FLAGS variable, or
73117a48c7cSmrg   # (2) before a word containing "conftest.", or (3) at the end.
73217a48c7cSmrg   # Note that $ac_compile itself does not contain backslashes and begins
73317a48c7cSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
73417a48c7cSmrg   # The option is referenced via a variable to avoid confusing sed.
73517a48c7cSmrg   lt_compile=`echo "$ac_compile" | $SED \
73617a48c7cSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
73717a48c7cSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
73817a48c7cSmrg   -e 's:$: $lt_compiler_flag:'`
73917a48c7cSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
74017a48c7cSmrg   (eval "$lt_compile" 2>conftest.err)
74117a48c7cSmrg   ac_status=$?
74217a48c7cSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
74317a48c7cSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
74417a48c7cSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
74517a48c7cSmrg     # The compiler can only warn and ignore the option if not recognized
74617a48c7cSmrg     # So say no if there are warnings other than the usual output.
74717a48c7cSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
74817a48c7cSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
74917a48c7cSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
75017a48c7cSmrg       $2=yes
75117a48c7cSmrg     fi
75217a48c7cSmrg   fi
75317a48c7cSmrg   $rm conftest*
75417a48c7cSmrg])
75517a48c7cSmrg
75617a48c7cSmrgif test x"[$]$2" = xyes; then
75717a48c7cSmrg    ifelse([$5], , :, [$5])
75817a48c7cSmrgelse
75917a48c7cSmrg    ifelse([$6], , :, [$6])
76017a48c7cSmrgfi
76117a48c7cSmrg])# AC_LIBTOOL_COMPILER_OPTION
76217a48c7cSmrg
76317a48c7cSmrg
76417a48c7cSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
76517a48c7cSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
76617a48c7cSmrg# ------------------------------------------------------------
76717a48c7cSmrg# Check whether the given compiler option works
76817a48c7cSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
7698e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
7708e0ed500SmrgAC_CACHE_CHECK([$1], [$2],
77117a48c7cSmrg  [$2=no
77217a48c7cSmrg   save_LDFLAGS="$LDFLAGS"
77317a48c7cSmrg   LDFLAGS="$LDFLAGS $3"
7748e0ed500Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
77517a48c7cSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
77617a48c7cSmrg     # The linker can only warn and ignore the option if not recognized
77717a48c7cSmrg     # So say no if there are warnings
77817a48c7cSmrg     if test -s conftest.err; then
77917a48c7cSmrg       # Append any errors to the config.log.
78017a48c7cSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
78117a48c7cSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
78217a48c7cSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
78317a48c7cSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
78417a48c7cSmrg         $2=yes
78517a48c7cSmrg       fi
78617a48c7cSmrg     else
78717a48c7cSmrg       $2=yes
78817a48c7cSmrg     fi
78917a48c7cSmrg   fi
7908e0ed500Smrg   $rm -r conftest*
79117a48c7cSmrg   LDFLAGS="$save_LDFLAGS"
79217a48c7cSmrg])
79317a48c7cSmrg
79417a48c7cSmrgif test x"[$]$2" = xyes; then
79517a48c7cSmrg    ifelse([$4], , :, [$4])
79617a48c7cSmrgelse
79717a48c7cSmrg    ifelse([$5], , :, [$5])
79817a48c7cSmrgfi
79917a48c7cSmrg])# AC_LIBTOOL_LINKER_OPTION
80017a48c7cSmrg
80117a48c7cSmrg
80217a48c7cSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
80317a48c7cSmrg# --------------------------
80417a48c7cSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
80517a48c7cSmrg[# find the maximum length of command line arguments
80617a48c7cSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
80717a48c7cSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
80817a48c7cSmrg  i=0
80917a48c7cSmrg  teststring="ABCD"
81017a48c7cSmrg
81117a48c7cSmrg  case $build_os in
81217a48c7cSmrg  msdosdjgpp*)
81317a48c7cSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
81417a48c7cSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
81517a48c7cSmrg    # during glob expansion).  Even if it were fixed, the result of this
81617a48c7cSmrg    # check would be larger than it should be.
81717a48c7cSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
81817a48c7cSmrg    ;;
81917a48c7cSmrg
82017a48c7cSmrg  gnu*)
82117a48c7cSmrg    # Under GNU Hurd, this test is not required because there is
82217a48c7cSmrg    # no limit to the length of command line arguments.
82317a48c7cSmrg    # Libtool will interpret -1 as no limit whatsoever
82417a48c7cSmrg    lt_cv_sys_max_cmd_len=-1;
82517a48c7cSmrg    ;;
82617a48c7cSmrg
82717a48c7cSmrg  cygwin* | mingw*)
82817a48c7cSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
82917a48c7cSmrg    # about 5 minutes as the teststring grows exponentially.
83017a48c7cSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
83117a48c7cSmrg    # you end up with a "frozen" computer, even though with patience
83217a48c7cSmrg    # the test eventually succeeds (with a max line length of 256k).
83317a48c7cSmrg    # Instead, let's just punt: use the minimum linelength reported by
83417a48c7cSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
83517a48c7cSmrg    lt_cv_sys_max_cmd_len=8192;
83617a48c7cSmrg    ;;
83717a48c7cSmrg
83817a48c7cSmrg  amigaos*)
83917a48c7cSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
84017a48c7cSmrg    # So we just punt and use a minimum line length of 8192.
84117a48c7cSmrg    lt_cv_sys_max_cmd_len=8192;
84217a48c7cSmrg    ;;
84317a48c7cSmrg
84417a48c7cSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
84517a48c7cSmrg    # This has been around since 386BSD, at least.  Likely further.
84617a48c7cSmrg    if test -x /sbin/sysctl; then
84717a48c7cSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
84817a48c7cSmrg    elif test -x /usr/sbin/sysctl; then
84917a48c7cSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
85017a48c7cSmrg    else
85117a48c7cSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
85217a48c7cSmrg    fi
85317a48c7cSmrg    # And add a safety zone
85417a48c7cSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
85517a48c7cSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
85617a48c7cSmrg    ;;
85717a48c7cSmrg
85817a48c7cSmrg  interix*)
85917a48c7cSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
86017a48c7cSmrg    lt_cv_sys_max_cmd_len=196608
86117a48c7cSmrg    ;;
86217a48c7cSmrg
86317a48c7cSmrg  osf*)
86417a48c7cSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
86517a48c7cSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
86617a48c7cSmrg    # nice to cause kernel panics so lets avoid the loop below.
86717a48c7cSmrg    # First set a reasonable default.
86817a48c7cSmrg    lt_cv_sys_max_cmd_len=16384
86917a48c7cSmrg    #
87017a48c7cSmrg    if test -x /sbin/sysconfig; then
87117a48c7cSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
87217a48c7cSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
87317a48c7cSmrg      esac
87417a48c7cSmrg    fi
87517a48c7cSmrg    ;;
87617a48c7cSmrg  sco3.2v5*)
87717a48c7cSmrg    lt_cv_sys_max_cmd_len=102400
87817a48c7cSmrg    ;;
87917a48c7cSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
88017a48c7cSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
88117a48c7cSmrg    if test -n "$kargmax"; then
88217a48c7cSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
88317a48c7cSmrg    else
88417a48c7cSmrg      lt_cv_sys_max_cmd_len=32768
88517a48c7cSmrg    fi
88617a48c7cSmrg    ;;
88717a48c7cSmrg  *)
8888e0ed500Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8898e0ed500Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
8908e0ed500Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8918e0ed500Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8928e0ed500Smrg    else
8938e0ed500Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8948e0ed500Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
89517a48c7cSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
8968e0ed500Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
8978e0ed500Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
8988e0ed500Smrg	      test $i != 17 # 1/2 MB should be enough
8998e0ed500Smrg      do
9008e0ed500Smrg        i=`expr $i + 1`
9018e0ed500Smrg        teststring=$teststring$teststring
9028e0ed500Smrg      done
9038e0ed500Smrg      teststring=
9048e0ed500Smrg      # Add a significant safety factor because C++ compilers can tack on massive
9058e0ed500Smrg      # amounts of additional arguments before passing them to the linker.
9068e0ed500Smrg      # It appears as though 1/2 is a usable value.
9078e0ed500Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
9088e0ed500Smrg    fi
90917a48c7cSmrg    ;;
91017a48c7cSmrg  esac
91117a48c7cSmrg])
91217a48c7cSmrgif test -n $lt_cv_sys_max_cmd_len ; then
91317a48c7cSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
91417a48c7cSmrgelse
91517a48c7cSmrg  AC_MSG_RESULT(none)
91617a48c7cSmrgfi
91717a48c7cSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
91817a48c7cSmrg
91917a48c7cSmrg
92017a48c7cSmrg# _LT_AC_CHECK_DLFCN
92117a48c7cSmrg# ------------------
92217a48c7cSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
92317a48c7cSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
92417a48c7cSmrg])# _LT_AC_CHECK_DLFCN
92517a48c7cSmrg
92617a48c7cSmrg
92717a48c7cSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
92817a48c7cSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
92917a48c7cSmrg# ---------------------------------------------------------------------
93017a48c7cSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
93117a48c7cSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
93217a48c7cSmrgif test "$cross_compiling" = yes; then :
93317a48c7cSmrg  [$4]
93417a48c7cSmrgelse
93517a48c7cSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
93617a48c7cSmrg  lt_status=$lt_dlunknown
93717a48c7cSmrg  cat > conftest.$ac_ext <<EOF
93817a48c7cSmrg[#line __oline__ "configure"
93917a48c7cSmrg#include "confdefs.h"
94017a48c7cSmrg
94117a48c7cSmrg#if HAVE_DLFCN_H
94217a48c7cSmrg#include <dlfcn.h>
94317a48c7cSmrg#endif
94417a48c7cSmrg
94517a48c7cSmrg#include <stdio.h>
94617a48c7cSmrg
94717a48c7cSmrg#ifdef RTLD_GLOBAL
94817a48c7cSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
94917a48c7cSmrg#else
95017a48c7cSmrg#  ifdef DL_GLOBAL
95117a48c7cSmrg#    define LT_DLGLOBAL		DL_GLOBAL
95217a48c7cSmrg#  else
95317a48c7cSmrg#    define LT_DLGLOBAL		0
95417a48c7cSmrg#  endif
95517a48c7cSmrg#endif
95617a48c7cSmrg
95717a48c7cSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
95817a48c7cSmrg   find out it does not work in some platform. */
95917a48c7cSmrg#ifndef LT_DLLAZY_OR_NOW
96017a48c7cSmrg#  ifdef RTLD_LAZY
96117a48c7cSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
96217a48c7cSmrg#  else
96317a48c7cSmrg#    ifdef DL_LAZY
96417a48c7cSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
96517a48c7cSmrg#    else
96617a48c7cSmrg#      ifdef RTLD_NOW
96717a48c7cSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
96817a48c7cSmrg#      else
96917a48c7cSmrg#        ifdef DL_NOW
97017a48c7cSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
97117a48c7cSmrg#        else
97217a48c7cSmrg#          define LT_DLLAZY_OR_NOW	0
97317a48c7cSmrg#        endif
97417a48c7cSmrg#      endif
97517a48c7cSmrg#    endif
97617a48c7cSmrg#  endif
97717a48c7cSmrg#endif
97817a48c7cSmrg
97917a48c7cSmrg#ifdef __cplusplus
98017a48c7cSmrgextern "C" void exit (int);
98117a48c7cSmrg#endif
98217a48c7cSmrg
98317a48c7cSmrgvoid fnord() { int i=42;}
98417a48c7cSmrgint main ()
98517a48c7cSmrg{
98617a48c7cSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
98717a48c7cSmrg  int status = $lt_dlunknown;
98817a48c7cSmrg
98917a48c7cSmrg  if (self)
99017a48c7cSmrg    {
99117a48c7cSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
99217a48c7cSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
99317a48c7cSmrg      /* dlclose (self); */
99417a48c7cSmrg    }
99517a48c7cSmrg  else
99617a48c7cSmrg    puts (dlerror ());
99717a48c7cSmrg
99817a48c7cSmrg    exit (status);
99917a48c7cSmrg}]
100017a48c7cSmrgEOF
100117a48c7cSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
100217a48c7cSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
100317a48c7cSmrg    lt_status=$?
100417a48c7cSmrg    case x$lt_status in
100517a48c7cSmrg      x$lt_dlno_uscore) $1 ;;
100617a48c7cSmrg      x$lt_dlneed_uscore) $2 ;;
100717a48c7cSmrg      x$lt_dlunknown|x*) $3 ;;
100817a48c7cSmrg    esac
100917a48c7cSmrg  else :
101017a48c7cSmrg    # compilation failed
101117a48c7cSmrg    $3
101217a48c7cSmrg  fi
101317a48c7cSmrgfi
101417a48c7cSmrgrm -fr conftest*
101517a48c7cSmrg])# _LT_AC_TRY_DLOPEN_SELF
101617a48c7cSmrg
101717a48c7cSmrg
101817a48c7cSmrg# AC_LIBTOOL_DLOPEN_SELF
101917a48c7cSmrg# ----------------------
102017a48c7cSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
102117a48c7cSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
102217a48c7cSmrgif test "x$enable_dlopen" != xyes; then
102317a48c7cSmrg  enable_dlopen=unknown
102417a48c7cSmrg  enable_dlopen_self=unknown
102517a48c7cSmrg  enable_dlopen_self_static=unknown
102617a48c7cSmrgelse
102717a48c7cSmrg  lt_cv_dlopen=no
102817a48c7cSmrg  lt_cv_dlopen_libs=
102917a48c7cSmrg
103017a48c7cSmrg  case $host_os in
103117a48c7cSmrg  beos*)
103217a48c7cSmrg    lt_cv_dlopen="load_add_on"
103317a48c7cSmrg    lt_cv_dlopen_libs=
103417a48c7cSmrg    lt_cv_dlopen_self=yes
103517a48c7cSmrg    ;;
103617a48c7cSmrg
103717a48c7cSmrg  mingw* | pw32*)
103817a48c7cSmrg    lt_cv_dlopen="LoadLibrary"
103917a48c7cSmrg    lt_cv_dlopen_libs=
104017a48c7cSmrg   ;;
104117a48c7cSmrg
104217a48c7cSmrg  cygwin*)
104317a48c7cSmrg    lt_cv_dlopen="dlopen"
104417a48c7cSmrg    lt_cv_dlopen_libs=
104517a48c7cSmrg   ;;
104617a48c7cSmrg
104717a48c7cSmrg  darwin*)
104817a48c7cSmrg  # if libdl is installed we need to link against it
104917a48c7cSmrg    AC_CHECK_LIB([dl], [dlopen],
105017a48c7cSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
105117a48c7cSmrg    lt_cv_dlopen="dyld"
105217a48c7cSmrg    lt_cv_dlopen_libs=
105317a48c7cSmrg    lt_cv_dlopen_self=yes
105417a48c7cSmrg    ])
105517a48c7cSmrg   ;;
105617a48c7cSmrg
105717a48c7cSmrg  *)
105817a48c7cSmrg    AC_CHECK_FUNC([shl_load],
105917a48c7cSmrg	  [lt_cv_dlopen="shl_load"],
106017a48c7cSmrg      [AC_CHECK_LIB([dld], [shl_load],
10618e0ed500Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
106217a48c7cSmrg	[AC_CHECK_FUNC([dlopen],
106317a48c7cSmrg	      [lt_cv_dlopen="dlopen"],
106417a48c7cSmrg	  [AC_CHECK_LIB([dl], [dlopen],
106517a48c7cSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
106617a48c7cSmrg	    [AC_CHECK_LIB([svld], [dlopen],
106717a48c7cSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
106817a48c7cSmrg	      [AC_CHECK_LIB([dld], [dld_link],
10698e0ed500Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
107017a48c7cSmrg	      ])
107117a48c7cSmrg	    ])
107217a48c7cSmrg	  ])
107317a48c7cSmrg	])
107417a48c7cSmrg      ])
107517a48c7cSmrg    ;;
107617a48c7cSmrg  esac
107717a48c7cSmrg
107817a48c7cSmrg  if test "x$lt_cv_dlopen" != xno; then
107917a48c7cSmrg    enable_dlopen=yes
108017a48c7cSmrg  else
108117a48c7cSmrg    enable_dlopen=no
108217a48c7cSmrg  fi
108317a48c7cSmrg
108417a48c7cSmrg  case $lt_cv_dlopen in
108517a48c7cSmrg  dlopen)
108617a48c7cSmrg    save_CPPFLAGS="$CPPFLAGS"
108717a48c7cSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
108817a48c7cSmrg
108917a48c7cSmrg    save_LDFLAGS="$LDFLAGS"
109017a48c7cSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
109117a48c7cSmrg
109217a48c7cSmrg    save_LIBS="$LIBS"
109317a48c7cSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
109417a48c7cSmrg
109517a48c7cSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
109617a48c7cSmrg	  lt_cv_dlopen_self, [dnl
109717a48c7cSmrg	  _LT_AC_TRY_DLOPEN_SELF(
109817a48c7cSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
109917a48c7cSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
110017a48c7cSmrg    ])
110117a48c7cSmrg
110217a48c7cSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
110317a48c7cSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
110417a48c7cSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
110517a48c7cSmrg    	  lt_cv_dlopen_self_static, [dnl
110617a48c7cSmrg	  _LT_AC_TRY_DLOPEN_SELF(
110717a48c7cSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
110817a48c7cSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
110917a48c7cSmrg      ])
111017a48c7cSmrg    fi
111117a48c7cSmrg
111217a48c7cSmrg    CPPFLAGS="$save_CPPFLAGS"
111317a48c7cSmrg    LDFLAGS="$save_LDFLAGS"
111417a48c7cSmrg    LIBS="$save_LIBS"
111517a48c7cSmrg    ;;
111617a48c7cSmrg  esac
111717a48c7cSmrg
111817a48c7cSmrg  case $lt_cv_dlopen_self in
111917a48c7cSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
112017a48c7cSmrg  *) enable_dlopen_self=unknown ;;
112117a48c7cSmrg  esac
112217a48c7cSmrg
112317a48c7cSmrg  case $lt_cv_dlopen_self_static in
112417a48c7cSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
112517a48c7cSmrg  *) enable_dlopen_self_static=unknown ;;
112617a48c7cSmrg  esac
112717a48c7cSmrgfi
112817a48c7cSmrg])# AC_LIBTOOL_DLOPEN_SELF
112917a48c7cSmrg
113017a48c7cSmrg
113117a48c7cSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
113217a48c7cSmrg# ---------------------------------
113317a48c7cSmrg# Check to see if options -c and -o are simultaneously supported by compiler
113417a48c7cSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
11358e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
11368e0ed500SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
113717a48c7cSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
113817a48c7cSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
113917a48c7cSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
114017a48c7cSmrg   $rm -r conftest 2>/dev/null
114117a48c7cSmrg   mkdir conftest
114217a48c7cSmrg   cd conftest
114317a48c7cSmrg   mkdir out
11448e0ed500Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
114517a48c7cSmrg
114617a48c7cSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
114717a48c7cSmrg   # Insert the option either (1) after the last *FLAGS variable, or
114817a48c7cSmrg   # (2) before a word containing "conftest.", or (3) at the end.
114917a48c7cSmrg   # Note that $ac_compile itself does not contain backslashes and begins
115017a48c7cSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
115117a48c7cSmrg   lt_compile=`echo "$ac_compile" | $SED \
115217a48c7cSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
115317a48c7cSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
115417a48c7cSmrg   -e 's:$: $lt_compiler_flag:'`
115517a48c7cSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
115617a48c7cSmrg   (eval "$lt_compile" 2>out/conftest.err)
115717a48c7cSmrg   ac_status=$?
115817a48c7cSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
115917a48c7cSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
116017a48c7cSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
116117a48c7cSmrg   then
116217a48c7cSmrg     # The compiler can only warn and ignore the option if not recognized
116317a48c7cSmrg     # So say no if there are warnings
116417a48c7cSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
116517a48c7cSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
116617a48c7cSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
116717a48c7cSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
116817a48c7cSmrg     fi
116917a48c7cSmrg   fi
117017a48c7cSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
117117a48c7cSmrg   $rm conftest*
117217a48c7cSmrg   # SGI C++ compiler will create directory out/ii_files/ for
117317a48c7cSmrg   # template instantiation
117417a48c7cSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
117517a48c7cSmrg   $rm out/* && rmdir out
117617a48c7cSmrg   cd ..
117717a48c7cSmrg   rmdir conftest
117817a48c7cSmrg   $rm conftest*
117917a48c7cSmrg])
118017a48c7cSmrg])# AC_LIBTOOL_PROG_CC_C_O
118117a48c7cSmrg
118217a48c7cSmrg
118317a48c7cSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
118417a48c7cSmrg# -----------------------------------------
118517a48c7cSmrg# Check to see if we can do hard links to lock some files if needed
118617a48c7cSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
118717a48c7cSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
118817a48c7cSmrg
118917a48c7cSmrghard_links="nottested"
119017a48c7cSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
119117a48c7cSmrg  # do not overwrite the value of need_locks provided by the user
119217a48c7cSmrg  AC_MSG_CHECKING([if we can lock with hard links])
119317a48c7cSmrg  hard_links=yes
119417a48c7cSmrg  $rm conftest*
119517a48c7cSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
119617a48c7cSmrg  touch conftest.a
119717a48c7cSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
119817a48c7cSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
119917a48c7cSmrg  AC_MSG_RESULT([$hard_links])
120017a48c7cSmrg  if test "$hard_links" = no; then
120117a48c7cSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
120217a48c7cSmrg    need_locks=warn
120317a48c7cSmrg  fi
120417a48c7cSmrgelse
120517a48c7cSmrg  need_locks=no
120617a48c7cSmrgfi
120717a48c7cSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
120817a48c7cSmrg
120917a48c7cSmrg
121017a48c7cSmrg# AC_LIBTOOL_OBJDIR
121117a48c7cSmrg# -----------------
121217a48c7cSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
121317a48c7cSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
121417a48c7cSmrg[rm -f .libs 2>/dev/null
121517a48c7cSmrgmkdir .libs 2>/dev/null
121617a48c7cSmrgif test -d .libs; then
121717a48c7cSmrg  lt_cv_objdir=.libs
121817a48c7cSmrgelse
121917a48c7cSmrg  # MS-DOS does not allow filenames that begin with a dot.
122017a48c7cSmrg  lt_cv_objdir=_libs
122117a48c7cSmrgfi
122217a48c7cSmrgrmdir .libs 2>/dev/null])
122317a48c7cSmrgobjdir=$lt_cv_objdir
122417a48c7cSmrg])# AC_LIBTOOL_OBJDIR
122517a48c7cSmrg
122617a48c7cSmrg
122717a48c7cSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
122817a48c7cSmrg# ----------------------------------------------
122917a48c7cSmrg# Check hardcoding attributes.
123017a48c7cSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
123117a48c7cSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
123217a48c7cSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
123317a48c7cSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
123417a48c7cSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
123517a48c7cSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
123617a48c7cSmrg
123717a48c7cSmrg  # We can hardcode non-existant directories.
123817a48c7cSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
123917a48c7cSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
124017a48c7cSmrg     # have to relink, otherwise we might link with an installed library
124117a48c7cSmrg     # when we should be linking with a yet-to-be-installed one
124217a48c7cSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
124317a48c7cSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
124417a48c7cSmrg    # Linking always hardcodes the temporary library directory.
124517a48c7cSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
124617a48c7cSmrg  else
124717a48c7cSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
124817a48c7cSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
124917a48c7cSmrg  fi
125017a48c7cSmrgelse
125117a48c7cSmrg  # We cannot hardcode anything, or else we can only hardcode existing
125217a48c7cSmrg  # directories.
125317a48c7cSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
125417a48c7cSmrgfi
125517a48c7cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
125617a48c7cSmrg
125717a48c7cSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
125817a48c7cSmrg  # Fast installation is not supported
125917a48c7cSmrg  enable_fast_install=no
126017a48c7cSmrgelif test "$shlibpath_overrides_runpath" = yes ||
126117a48c7cSmrg     test "$enable_shared" = no; then
126217a48c7cSmrg  # Fast installation is not necessary
126317a48c7cSmrg  enable_fast_install=needless
126417a48c7cSmrgfi
126517a48c7cSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
126617a48c7cSmrg
126717a48c7cSmrg
126817a48c7cSmrg# AC_LIBTOOL_SYS_LIB_STRIP
126917a48c7cSmrg# ------------------------
127017a48c7cSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
127117a48c7cSmrg[striplib=
127217a48c7cSmrgold_striplib=
127317a48c7cSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
127417a48c7cSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
127517a48c7cSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
127617a48c7cSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
127717a48c7cSmrg  AC_MSG_RESULT([yes])
127817a48c7cSmrgelse
127917a48c7cSmrg# FIXME - insert some real tests, host_os isn't really good enough
128017a48c7cSmrg  case $host_os in
128117a48c7cSmrg   darwin*)
128217a48c7cSmrg       if test -n "$STRIP" ; then
128317a48c7cSmrg         striplib="$STRIP -x"
12848e0ed500Smrg         old_striplib="$STRIP -S"
128517a48c7cSmrg         AC_MSG_RESULT([yes])
128617a48c7cSmrg       else
128717a48c7cSmrg  AC_MSG_RESULT([no])
128817a48c7cSmrgfi
128917a48c7cSmrg       ;;
129017a48c7cSmrg   *)
129117a48c7cSmrg  AC_MSG_RESULT([no])
129217a48c7cSmrg    ;;
129317a48c7cSmrg  esac
129417a48c7cSmrgfi
129517a48c7cSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
129617a48c7cSmrg
129717a48c7cSmrg
129817a48c7cSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
129917a48c7cSmrg# -----------------------------
130017a48c7cSmrg# PORTME Fill in your ld.so characteristics
130117a48c7cSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
13028e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
13038e0ed500SmrgAC_MSG_CHECKING([dynamic linker characteristics])
130417a48c7cSmrglibrary_names_spec=
130517a48c7cSmrglibname_spec='lib$name'
130617a48c7cSmrgsoname_spec=
130717a48c7cSmrgshrext_cmds=".so"
130817a48c7cSmrgpostinstall_cmds=
130917a48c7cSmrgpostuninstall_cmds=
131017a48c7cSmrgfinish_cmds=
131117a48c7cSmrgfinish_eval=
131217a48c7cSmrgshlibpath_var=
131317a48c7cSmrgshlibpath_overrides_runpath=unknown
131417a48c7cSmrgversion_type=none
131517a48c7cSmrgdynamic_linker="$host_os ld.so"
131617a48c7cSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
13178e0ed500Smrgm4_if($1,[],[
131817a48c7cSmrgif test "$GCC" = yes; then
13198e0ed500Smrg  case $host_os in
13208e0ed500Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
13218e0ed500Smrg    *) lt_awk_arg="/^libraries:/" ;;
13228e0ed500Smrg  esac
13238e0ed500Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
13248e0ed500Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
132517a48c7cSmrg    # if the path contains ";" then we assume it to be the separator
132617a48c7cSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
132717a48c7cSmrg    # assumed that no part of a normal pathname contains ";" but that should
132817a48c7cSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
13298e0ed500Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
133017a48c7cSmrg  else
13318e0ed500Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
133217a48c7cSmrg  fi
13338e0ed500Smrg  # Ok, now we have the path, separated by spaces, we can step through it
13348e0ed500Smrg  # and add multilib dir if necessary.
13358e0ed500Smrg  lt_tmp_lt_search_path_spec=
13368e0ed500Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13378e0ed500Smrg  for lt_sys_path in $lt_search_path_spec; do
13388e0ed500Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
13398e0ed500Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
13408e0ed500Smrg    else
13418e0ed500Smrg      test -d "$lt_sys_path" && \
13428e0ed500Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13438e0ed500Smrg    fi
13448e0ed500Smrg  done
13458e0ed500Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
13468e0ed500SmrgBEGIN {RS=" "; FS="/|\n";} {
13478e0ed500Smrg  lt_foo="";
13488e0ed500Smrg  lt_count=0;
13498e0ed500Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
13508e0ed500Smrg    if ($lt_i != "" && $lt_i != ".") {
13518e0ed500Smrg      if ($lt_i == "..") {
13528e0ed500Smrg        lt_count++;
13538e0ed500Smrg      } else {
13548e0ed500Smrg        if (lt_count == 0) {
13558e0ed500Smrg          lt_foo="/" $lt_i lt_foo;
13568e0ed500Smrg        } else {
13578e0ed500Smrg          lt_count--;
13588e0ed500Smrg        }
13598e0ed500Smrg      }
13608e0ed500Smrg    }
13618e0ed500Smrg  }
13628e0ed500Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
13638e0ed500Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
13648e0ed500Smrg}'`
13658e0ed500Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
136617a48c7cSmrgelse
136717a48c7cSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13688e0ed500Smrgfi])
136917a48c7cSmrgneed_lib_prefix=unknown
137017a48c7cSmrghardcode_into_libs=no
137117a48c7cSmrg
137217a48c7cSmrg# when you set need_version to no, make sure it does not cause -set_version
137317a48c7cSmrg# flags to be left without arguments
137417a48c7cSmrgneed_version=unknown
137517a48c7cSmrg
137617a48c7cSmrgcase $host_os in
137717a48c7cSmrgaix3*)
137817a48c7cSmrg  version_type=linux
137917a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
138017a48c7cSmrg  shlibpath_var=LIBPATH
138117a48c7cSmrg
138217a48c7cSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
138317a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
138417a48c7cSmrg  ;;
138517a48c7cSmrg
13868e0ed500Smrgaix[[4-9]]*)
138717a48c7cSmrg  version_type=linux
138817a48c7cSmrg  need_lib_prefix=no
138917a48c7cSmrg  need_version=no
139017a48c7cSmrg  hardcode_into_libs=yes
139117a48c7cSmrg  if test "$host_cpu" = ia64; then
139217a48c7cSmrg    # AIX 5 supports IA64
139317a48c7cSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
139417a48c7cSmrg    shlibpath_var=LD_LIBRARY_PATH
139517a48c7cSmrg  else
139617a48c7cSmrg    # With GCC up to 2.95.x, collect2 would create an import file
139717a48c7cSmrg    # for dependence libraries.  The import file would start with
139817a48c7cSmrg    # the line `#! .'.  This would cause the generated library to
139917a48c7cSmrg    # depend on `.', always an invalid library.  This was fixed in
140017a48c7cSmrg    # development snapshots of GCC prior to 3.0.
140117a48c7cSmrg    case $host_os in
140217a48c7cSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
140317a48c7cSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
140417a48c7cSmrg	   echo ' yes '
140517a48c7cSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
140617a48c7cSmrg	:
140717a48c7cSmrg      else
140817a48c7cSmrg	can_build_shared=no
140917a48c7cSmrg      fi
141017a48c7cSmrg      ;;
141117a48c7cSmrg    esac
141217a48c7cSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
141317a48c7cSmrg    # soname into executable. Probably we can add versioning support to
141417a48c7cSmrg    # collect2, so additional links can be useful in future.
141517a48c7cSmrg    if test "$aix_use_runtimelinking" = yes; then
141617a48c7cSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
141717a48c7cSmrg      # instead of lib<name>.a to let people know that these are not
141817a48c7cSmrg      # typical AIX shared libraries.
141917a48c7cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
142017a48c7cSmrg    else
142117a48c7cSmrg      # We preserve .a as extension for shared libraries through AIX4.2
142217a48c7cSmrg      # and later when we are not doing run time linking.
142317a48c7cSmrg      library_names_spec='${libname}${release}.a $libname.a'
142417a48c7cSmrg      soname_spec='${libname}${release}${shared_ext}$major'
142517a48c7cSmrg    fi
142617a48c7cSmrg    shlibpath_var=LIBPATH
142717a48c7cSmrg  fi
142817a48c7cSmrg  ;;
142917a48c7cSmrg
143017a48c7cSmrgamigaos*)
143117a48c7cSmrg  library_names_spec='$libname.ixlibrary $libname.a'
143217a48c7cSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
143317a48c7cSmrg  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'
143417a48c7cSmrg  ;;
143517a48c7cSmrg
143617a48c7cSmrgbeos*)
143717a48c7cSmrg  library_names_spec='${libname}${shared_ext}'
143817a48c7cSmrg  dynamic_linker="$host_os ld.so"
143917a48c7cSmrg  shlibpath_var=LIBRARY_PATH
144017a48c7cSmrg  ;;
144117a48c7cSmrg
144217a48c7cSmrgbsdi[[45]]*)
144317a48c7cSmrg  version_type=linux
144417a48c7cSmrg  need_version=no
144517a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
144617a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
144717a48c7cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
144817a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
144917a48c7cSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
145017a48c7cSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
145117a48c7cSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
145217a48c7cSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
145317a48c7cSmrg  # libtool to hard-code these into programs
145417a48c7cSmrg  ;;
145517a48c7cSmrg
145617a48c7cSmrgcygwin* | mingw* | pw32*)
145717a48c7cSmrg  version_type=windows
145817a48c7cSmrg  shrext_cmds=".dll"
145917a48c7cSmrg  need_version=no
146017a48c7cSmrg  need_lib_prefix=no
146117a48c7cSmrg
146217a48c7cSmrg  case $GCC,$host_os in
146317a48c7cSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
146417a48c7cSmrg    library_names_spec='$libname.dll.a'
146517a48c7cSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
146617a48c7cSmrg    postinstall_cmds='base_file=`basename \${file}`~
146717a48c7cSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
146817a48c7cSmrg      dldir=$destdir/`dirname \$dlpath`~
146917a48c7cSmrg      test -d \$dldir || mkdir -p \$dldir~
147017a48c7cSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
147117a48c7cSmrg      chmod a+x \$dldir/$dlname'
147217a48c7cSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
147317a48c7cSmrg      dlpath=$dir/\$dldll~
147417a48c7cSmrg       $rm \$dlpath'
147517a48c7cSmrg    shlibpath_overrides_runpath=yes
147617a48c7cSmrg
147717a48c7cSmrg    case $host_os in
147817a48c7cSmrg    cygwin*)
147917a48c7cSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
148017a48c7cSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
148117a48c7cSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
148217a48c7cSmrg      ;;
148317a48c7cSmrg    mingw*)
148417a48c7cSmrg      # MinGW DLLs use traditional 'lib' prefix
148517a48c7cSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
148617a48c7cSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
148717a48c7cSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
148817a48c7cSmrg        # It is most probably a Windows format PATH printed by
148917a48c7cSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
149017a48c7cSmrg        # path with ; separators, and with drive letters. We can handle the
149117a48c7cSmrg        # drive letters (cygwin fileutils understands them), so leave them,
149217a48c7cSmrg        # especially as we might pass files found there to a mingw objdump,
149317a48c7cSmrg        # which wouldn't understand a cygwinified path. Ahh.
149417a48c7cSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
149517a48c7cSmrg      else
149617a48c7cSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
149717a48c7cSmrg      fi
149817a48c7cSmrg      ;;
149917a48c7cSmrg    pw32*)
150017a48c7cSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
150117a48c7cSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
150217a48c7cSmrg      ;;
150317a48c7cSmrg    esac
150417a48c7cSmrg    ;;
150517a48c7cSmrg
150617a48c7cSmrg  *)
150717a48c7cSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
150817a48c7cSmrg    ;;
150917a48c7cSmrg  esac
151017a48c7cSmrg  dynamic_linker='Win32 ld.exe'
151117a48c7cSmrg  # FIXME: first we should search . and the directory the executable is in
151217a48c7cSmrg  shlibpath_var=PATH
151317a48c7cSmrg  ;;
151417a48c7cSmrg
151517a48c7cSmrgdarwin* | rhapsody*)
151617a48c7cSmrg  dynamic_linker="$host_os dyld"
151717a48c7cSmrg  version_type=darwin
151817a48c7cSmrg  need_lib_prefix=no
151917a48c7cSmrg  need_version=no
152017a48c7cSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
152117a48c7cSmrg  soname_spec='${libname}${release}${major}$shared_ext'
152217a48c7cSmrg  shlibpath_overrides_runpath=yes
152317a48c7cSmrg  shlibpath_var=DYLD_LIBRARY_PATH
152417a48c7cSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15258e0ed500Smrg  m4_if([$1], [],[
15268e0ed500Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
152717a48c7cSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
152817a48c7cSmrg  ;;
152917a48c7cSmrg
153017a48c7cSmrgdgux*)
153117a48c7cSmrg  version_type=linux
153217a48c7cSmrg  need_lib_prefix=no
153317a48c7cSmrg  need_version=no
153417a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
153517a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
153617a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
153717a48c7cSmrg  ;;
153817a48c7cSmrg
153917a48c7cSmrgfreebsd1*)
154017a48c7cSmrg  dynamic_linker=no
154117a48c7cSmrg  ;;
154217a48c7cSmrg
154317a48c7cSmrgfreebsd* | dragonfly*)
154417a48c7cSmrg  # DragonFly does not have aout.  When/if they implement a new
154517a48c7cSmrg  # versioning mechanism, adjust this.
154617a48c7cSmrg  if test -x /usr/bin/objformat; then
154717a48c7cSmrg    objformat=`/usr/bin/objformat`
154817a48c7cSmrg  else
154917a48c7cSmrg    case $host_os in
155017a48c7cSmrg    freebsd[[123]]*) objformat=aout ;;
155117a48c7cSmrg    *) objformat=elf ;;
155217a48c7cSmrg    esac
155317a48c7cSmrg  fi
155417a48c7cSmrg  version_type=freebsd-$objformat
155517a48c7cSmrg  case $version_type in
155617a48c7cSmrg    freebsd-elf*)
155717a48c7cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
155817a48c7cSmrg      need_version=no
155917a48c7cSmrg      need_lib_prefix=no
156017a48c7cSmrg      ;;
156117a48c7cSmrg    freebsd-*)
156217a48c7cSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
156317a48c7cSmrg      need_version=yes
156417a48c7cSmrg      ;;
156517a48c7cSmrg  esac
156617a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
156717a48c7cSmrg  case $host_os in
156817a48c7cSmrg  freebsd2*)
156917a48c7cSmrg    shlibpath_overrides_runpath=yes
157017a48c7cSmrg    ;;
157117a48c7cSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
157217a48c7cSmrg    shlibpath_overrides_runpath=yes
157317a48c7cSmrg    hardcode_into_libs=yes
157417a48c7cSmrg    ;;
157517a48c7cSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
157617a48c7cSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
157717a48c7cSmrg    shlibpath_overrides_runpath=no
157817a48c7cSmrg    hardcode_into_libs=yes
157917a48c7cSmrg    ;;
15808e0ed500Smrg  *) # from 4.6 on, and DragonFly
158117a48c7cSmrg    shlibpath_overrides_runpath=yes
158217a48c7cSmrg    hardcode_into_libs=yes
158317a48c7cSmrg    ;;
158417a48c7cSmrg  esac
158517a48c7cSmrg  ;;
158617a48c7cSmrg
158717a48c7cSmrggnu*)
158817a48c7cSmrg  version_type=linux
158917a48c7cSmrg  need_lib_prefix=no
159017a48c7cSmrg  need_version=no
159117a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
159217a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
159317a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
159417a48c7cSmrg  hardcode_into_libs=yes
159517a48c7cSmrg  ;;
159617a48c7cSmrg
159717a48c7cSmrghpux9* | hpux10* | hpux11*)
159817a48c7cSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
159917a48c7cSmrg  # link against other versions.
160017a48c7cSmrg  version_type=sunos
160117a48c7cSmrg  need_lib_prefix=no
160217a48c7cSmrg  need_version=no
160317a48c7cSmrg  case $host_cpu in
160417a48c7cSmrg  ia64*)
160517a48c7cSmrg    shrext_cmds='.so'
160617a48c7cSmrg    hardcode_into_libs=yes
160717a48c7cSmrg    dynamic_linker="$host_os dld.so"
160817a48c7cSmrg    shlibpath_var=LD_LIBRARY_PATH
160917a48c7cSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
161017a48c7cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
161117a48c7cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
161217a48c7cSmrg    if test "X$HPUX_IA64_MODE" = X32; then
161317a48c7cSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
161417a48c7cSmrg    else
161517a48c7cSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
161617a48c7cSmrg    fi
161717a48c7cSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
161817a48c7cSmrg    ;;
161917a48c7cSmrg   hppa*64*)
162017a48c7cSmrg     shrext_cmds='.sl'
162117a48c7cSmrg     hardcode_into_libs=yes
162217a48c7cSmrg     dynamic_linker="$host_os dld.sl"
162317a48c7cSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
162417a48c7cSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
162517a48c7cSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
162617a48c7cSmrg     soname_spec='${libname}${release}${shared_ext}$major'
162717a48c7cSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
162817a48c7cSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
162917a48c7cSmrg     ;;
163017a48c7cSmrg   *)
163117a48c7cSmrg    shrext_cmds='.sl'
163217a48c7cSmrg    dynamic_linker="$host_os dld.sl"
163317a48c7cSmrg    shlibpath_var=SHLIB_PATH
163417a48c7cSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
163517a48c7cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
163617a48c7cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
163717a48c7cSmrg    ;;
163817a48c7cSmrg  esac
163917a48c7cSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
164017a48c7cSmrg  postinstall_cmds='chmod 555 $lib'
164117a48c7cSmrg  ;;
164217a48c7cSmrg
16438e0ed500Smrginterix[[3-9]]*)
164417a48c7cSmrg  version_type=linux
164517a48c7cSmrg  need_lib_prefix=no
164617a48c7cSmrg  need_version=no
164717a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
164817a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
164917a48c7cSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
165017a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
165117a48c7cSmrg  shlibpath_overrides_runpath=no
165217a48c7cSmrg  hardcode_into_libs=yes
165317a48c7cSmrg  ;;
165417a48c7cSmrg
165517a48c7cSmrgirix5* | irix6* | nonstopux*)
165617a48c7cSmrg  case $host_os in
165717a48c7cSmrg    nonstopux*) version_type=nonstopux ;;
165817a48c7cSmrg    *)
165917a48c7cSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
166017a48c7cSmrg		version_type=linux
166117a48c7cSmrg	else
166217a48c7cSmrg		version_type=irix
166317a48c7cSmrg	fi ;;
166417a48c7cSmrg  esac
166517a48c7cSmrg  need_lib_prefix=no
166617a48c7cSmrg  need_version=no
166717a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
166817a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
166917a48c7cSmrg  case $host_os in
167017a48c7cSmrg  irix5* | nonstopux*)
167117a48c7cSmrg    libsuff= shlibsuff=
167217a48c7cSmrg    ;;
167317a48c7cSmrg  *)
167417a48c7cSmrg    case $LD in # libtool.m4 will add one of these switches to LD
167517a48c7cSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
167617a48c7cSmrg      libsuff= shlibsuff= libmagic=32-bit;;
167717a48c7cSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
167817a48c7cSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
167917a48c7cSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
168017a48c7cSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
168117a48c7cSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
168217a48c7cSmrg    esac
168317a48c7cSmrg    ;;
168417a48c7cSmrg  esac
168517a48c7cSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
168617a48c7cSmrg  shlibpath_overrides_runpath=no
168717a48c7cSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
168817a48c7cSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
168917a48c7cSmrg  hardcode_into_libs=yes
169017a48c7cSmrg  ;;
169117a48c7cSmrg
169217a48c7cSmrg# No shared lib support for Linux oldld, aout, or coff.
169317a48c7cSmrglinux*oldld* | linux*aout* | linux*coff*)
169417a48c7cSmrg  dynamic_linker=no
169517a48c7cSmrg  ;;
169617a48c7cSmrg
169717a48c7cSmrg# This must be Linux ELF.
16988e0ed500Smrglinux* | k*bsd*-gnu)
169917a48c7cSmrg  version_type=linux
170017a48c7cSmrg  need_lib_prefix=no
170117a48c7cSmrg  need_version=no
170217a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
170317a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
170417a48c7cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
170517a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
170617a48c7cSmrg  shlibpath_overrides_runpath=no
170717a48c7cSmrg  # This implies no fast_install, which is unacceptable.
170817a48c7cSmrg  # Some rework will be needed to allow for fast_install
170917a48c7cSmrg  # before this can be enabled.
171017a48c7cSmrg  hardcode_into_libs=yes
17118e0ed500Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
17128e0ed500Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
171317a48c7cSmrg
171417a48c7cSmrg  # Append ld.so.conf contents to the search path
171517a48c7cSmrg  if test -f /etc/ld.so.conf; then
17168e0ed500Smrg    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' ' '`
17178e0ed500Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
171817a48c7cSmrg  fi
171917a48c7cSmrg
172017a48c7cSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
172117a48c7cSmrg  # powerpc, because MkLinux only supported shared libraries with the
172217a48c7cSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
172317a48c7cSmrg  # most powerpc-linux boxes support dynamic linking these days and
172417a48c7cSmrg  # people can always --disable-shared, the test was removed, and we
172517a48c7cSmrg  # assume the GNU/Linux dynamic linker is in use.
172617a48c7cSmrg  dynamic_linker='GNU/Linux ld.so'
172717a48c7cSmrg  ;;
172817a48c7cSmrg
172917a48c7cSmrgnetbsd*)
173017a48c7cSmrg  version_type=sunos
173117a48c7cSmrg  need_lib_prefix=no
173217a48c7cSmrg  need_version=no
173317a48c7cSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
173417a48c7cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
173517a48c7cSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
173617a48c7cSmrg    dynamic_linker='NetBSD (a.out) ld.so'
173717a48c7cSmrg  else
173817a48c7cSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
173917a48c7cSmrg    soname_spec='${libname}${release}${shared_ext}$major'
174017a48c7cSmrg    dynamic_linker='NetBSD ld.elf_so'
174117a48c7cSmrg  fi
174217a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
174317a48c7cSmrg  shlibpath_overrides_runpath=yes
174417a48c7cSmrg  hardcode_into_libs=yes
174517a48c7cSmrg  ;;
174617a48c7cSmrg
174717a48c7cSmrgnewsos6)
174817a48c7cSmrg  version_type=linux
174917a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
175017a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
175117a48c7cSmrg  shlibpath_overrides_runpath=yes
175217a48c7cSmrg  ;;
175317a48c7cSmrg
175417a48c7cSmrgnto-qnx*)
175517a48c7cSmrg  version_type=linux
175617a48c7cSmrg  need_lib_prefix=no
175717a48c7cSmrg  need_version=no
175817a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
175917a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
176017a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
176117a48c7cSmrg  shlibpath_overrides_runpath=yes
176217a48c7cSmrg  ;;
176317a48c7cSmrg
176417a48c7cSmrgopenbsd*)
176517a48c7cSmrg  version_type=sunos
176617a48c7cSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
176717a48c7cSmrg  need_lib_prefix=no
176817a48c7cSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
176917a48c7cSmrg  case $host_os in
177017a48c7cSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
177117a48c7cSmrg    *)                         need_version=no  ;;
177217a48c7cSmrg  esac
177317a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
177417a48c7cSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
177517a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
177617a48c7cSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
177717a48c7cSmrg    case $host_os in
177817a48c7cSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
177917a48c7cSmrg	shlibpath_overrides_runpath=no
178017a48c7cSmrg	;;
178117a48c7cSmrg      *)
178217a48c7cSmrg	shlibpath_overrides_runpath=yes
178317a48c7cSmrg	;;
178417a48c7cSmrg      esac
178517a48c7cSmrg  else
178617a48c7cSmrg    shlibpath_overrides_runpath=yes
178717a48c7cSmrg  fi
178817a48c7cSmrg  ;;
178917a48c7cSmrg
179017a48c7cSmrgos2*)
179117a48c7cSmrg  libname_spec='$name'
179217a48c7cSmrg  shrext_cmds=".dll"
179317a48c7cSmrg  need_lib_prefix=no
179417a48c7cSmrg  library_names_spec='$libname${shared_ext} $libname.a'
179517a48c7cSmrg  dynamic_linker='OS/2 ld.exe'
179617a48c7cSmrg  shlibpath_var=LIBPATH
179717a48c7cSmrg  ;;
179817a48c7cSmrg
179917a48c7cSmrgosf3* | osf4* | osf5*)
180017a48c7cSmrg  version_type=osf
180117a48c7cSmrg  need_lib_prefix=no
180217a48c7cSmrg  need_version=no
180317a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
180417a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
180517a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
180617a48c7cSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
180717a48c7cSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
180817a48c7cSmrg  ;;
180917a48c7cSmrg
18108e0ed500Smrgrdos*)
18118e0ed500Smrg  dynamic_linker=no
18128e0ed500Smrg  ;;
18138e0ed500Smrg
181417a48c7cSmrgsolaris*)
181517a48c7cSmrg  version_type=linux
181617a48c7cSmrg  need_lib_prefix=no
181717a48c7cSmrg  need_version=no
181817a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
181917a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
182017a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
182117a48c7cSmrg  shlibpath_overrides_runpath=yes
182217a48c7cSmrg  hardcode_into_libs=yes
182317a48c7cSmrg  # ldd complains unless libraries are executable
182417a48c7cSmrg  postinstall_cmds='chmod +x $lib'
182517a48c7cSmrg  ;;
182617a48c7cSmrg
182717a48c7cSmrgsunos4*)
182817a48c7cSmrg  version_type=sunos
182917a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
183017a48c7cSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
183117a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
183217a48c7cSmrg  shlibpath_overrides_runpath=yes
183317a48c7cSmrg  if test "$with_gnu_ld" = yes; then
183417a48c7cSmrg    need_lib_prefix=no
183517a48c7cSmrg  fi
183617a48c7cSmrg  need_version=yes
183717a48c7cSmrg  ;;
183817a48c7cSmrg
183917a48c7cSmrgsysv4 | sysv4.3*)
184017a48c7cSmrg  version_type=linux
184117a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
184217a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
184317a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
184417a48c7cSmrg  case $host_vendor in
184517a48c7cSmrg    sni)
184617a48c7cSmrg      shlibpath_overrides_runpath=no
184717a48c7cSmrg      need_lib_prefix=no
184817a48c7cSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
184917a48c7cSmrg      runpath_var=LD_RUN_PATH
185017a48c7cSmrg      ;;
185117a48c7cSmrg    siemens)
185217a48c7cSmrg      need_lib_prefix=no
185317a48c7cSmrg      ;;
185417a48c7cSmrg    motorola)
185517a48c7cSmrg      need_lib_prefix=no
185617a48c7cSmrg      need_version=no
185717a48c7cSmrg      shlibpath_overrides_runpath=no
185817a48c7cSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
185917a48c7cSmrg      ;;
186017a48c7cSmrg  esac
186117a48c7cSmrg  ;;
186217a48c7cSmrg
186317a48c7cSmrgsysv4*MP*)
186417a48c7cSmrg  if test -d /usr/nec ;then
186517a48c7cSmrg    version_type=linux
186617a48c7cSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
186717a48c7cSmrg    soname_spec='$libname${shared_ext}.$major'
186817a48c7cSmrg    shlibpath_var=LD_LIBRARY_PATH
186917a48c7cSmrg  fi
187017a48c7cSmrg  ;;
187117a48c7cSmrg
187217a48c7cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
187317a48c7cSmrg  version_type=freebsd-elf
187417a48c7cSmrg  need_lib_prefix=no
187517a48c7cSmrg  need_version=no
187617a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
187717a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
187817a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
187917a48c7cSmrg  hardcode_into_libs=yes
188017a48c7cSmrg  if test "$with_gnu_ld" = yes; then
188117a48c7cSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
188217a48c7cSmrg    shlibpath_overrides_runpath=no
188317a48c7cSmrg  else
188417a48c7cSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
188517a48c7cSmrg    shlibpath_overrides_runpath=yes
188617a48c7cSmrg    case $host_os in
188717a48c7cSmrg      sco3.2v5*)
188817a48c7cSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
188917a48c7cSmrg	;;
189017a48c7cSmrg    esac
189117a48c7cSmrg  fi
189217a48c7cSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
189317a48c7cSmrg  ;;
189417a48c7cSmrg
189517a48c7cSmrguts4*)
189617a48c7cSmrg  version_type=linux
189717a48c7cSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
189817a48c7cSmrg  soname_spec='${libname}${release}${shared_ext}$major'
189917a48c7cSmrg  shlibpath_var=LD_LIBRARY_PATH
190017a48c7cSmrg  ;;
190117a48c7cSmrg
190217a48c7cSmrg*)
190317a48c7cSmrg  dynamic_linker=no
190417a48c7cSmrg  ;;
190517a48c7cSmrgesac
190617a48c7cSmrgAC_MSG_RESULT([$dynamic_linker])
190717a48c7cSmrgtest "$dynamic_linker" = no && can_build_shared=no
190817a48c7cSmrg
19098e0ed500SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
19108e0ed500Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
19118e0ed500Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
19128e0ed500SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
19138e0ed500Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
19148e0ed500Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
19158e0ed500Smrg
191617a48c7cSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
191717a48c7cSmrgif test "$GCC" = yes; then
191817a48c7cSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
191917a48c7cSmrgfi
192017a48c7cSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
192117a48c7cSmrg
192217a48c7cSmrg
192317a48c7cSmrg# _LT_AC_TAGCONFIG
192417a48c7cSmrg# ----------------
192517a48c7cSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
19268e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
19278e0ed500SmrgAC_ARG_WITH([tags],
192817a48c7cSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
192917a48c7cSmrg        [include additional configurations @<:@automatic@:>@])],
193017a48c7cSmrg    [tagnames="$withval"])
193117a48c7cSmrg
193217a48c7cSmrgif test -f "$ltmain" && test -n "$tagnames"; then
193317a48c7cSmrg  if test ! -f "${ofile}"; then
193417a48c7cSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
193517a48c7cSmrg  fi
193617a48c7cSmrg
193717a48c7cSmrg  if test -z "$LTCC"; then
193817a48c7cSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
193917a48c7cSmrg    if test -z "$LTCC"; then
194017a48c7cSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
194117a48c7cSmrg    else
194217a48c7cSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
194317a48c7cSmrg    fi
194417a48c7cSmrg  fi
194517a48c7cSmrg  if test -z "$LTCFLAGS"; then
194617a48c7cSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
194717a48c7cSmrg  fi
194817a48c7cSmrg
194917a48c7cSmrg  # Extract list of available tagged configurations in $ofile.
195017a48c7cSmrg  # Note that this assumes the entire list is on one line.
195117a48c7cSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
195217a48c7cSmrg
195317a48c7cSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
195417a48c7cSmrg  for tagname in $tagnames; do
195517a48c7cSmrg    IFS="$lt_save_ifs"
195617a48c7cSmrg    # Check whether tagname contains only valid characters
195717a48c7cSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
195817a48c7cSmrg    "") ;;
195917a48c7cSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
196017a48c7cSmrg	;;
196117a48c7cSmrg    esac
196217a48c7cSmrg
196317a48c7cSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
196417a48c7cSmrg    then
196517a48c7cSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
196617a48c7cSmrg    fi
196717a48c7cSmrg
196817a48c7cSmrg    # Update the list of available tags.
196917a48c7cSmrg    if test -n "$tagname"; then
197017a48c7cSmrg      echo appending configuration tag \"$tagname\" to $ofile
197117a48c7cSmrg
197217a48c7cSmrg      case $tagname in
197317a48c7cSmrg      CXX)
197417a48c7cSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
197517a48c7cSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
197617a48c7cSmrg	    (test "X$CXX" != "Xg++"))) ; then
197717a48c7cSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
197817a48c7cSmrg	else
197917a48c7cSmrg	  tagname=""
198017a48c7cSmrg	fi
198117a48c7cSmrg	;;
198217a48c7cSmrg
198317a48c7cSmrg      F77)
198417a48c7cSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
198517a48c7cSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
198617a48c7cSmrg	else
198717a48c7cSmrg	  tagname=""
198817a48c7cSmrg	fi
198917a48c7cSmrg	;;
199017a48c7cSmrg
199117a48c7cSmrg      GCJ)
199217a48c7cSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
199317a48c7cSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
199417a48c7cSmrg	else
199517a48c7cSmrg	  tagname=""
199617a48c7cSmrg	fi
199717a48c7cSmrg	;;
199817a48c7cSmrg
199917a48c7cSmrg      RC)
200017a48c7cSmrg	AC_LIBTOOL_LANG_RC_CONFIG
200117a48c7cSmrg	;;
200217a48c7cSmrg
200317a48c7cSmrg      *)
200417a48c7cSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
200517a48c7cSmrg	;;
200617a48c7cSmrg      esac
200717a48c7cSmrg
200817a48c7cSmrg      # Append the new tag name to the list of available tags.
200917a48c7cSmrg      if test -n "$tagname" ; then
201017a48c7cSmrg      available_tags="$available_tags $tagname"
201117a48c7cSmrg    fi
201217a48c7cSmrg    fi
201317a48c7cSmrg  done
201417a48c7cSmrg  IFS="$lt_save_ifs"
201517a48c7cSmrg
201617a48c7cSmrg  # Now substitute the updated list of available tags.
201717a48c7cSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
201817a48c7cSmrg    mv "${ofile}T" "$ofile"
201917a48c7cSmrg    chmod +x "$ofile"
202017a48c7cSmrg  else
202117a48c7cSmrg    rm -f "${ofile}T"
202217a48c7cSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
202317a48c7cSmrg  fi
202417a48c7cSmrgfi
202517a48c7cSmrg])# _LT_AC_TAGCONFIG
202617a48c7cSmrg
202717a48c7cSmrg
202817a48c7cSmrg# AC_LIBTOOL_DLOPEN
202917a48c7cSmrg# -----------------
203017a48c7cSmrg# enable checks for dlopen support
203117a48c7cSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
203217a48c7cSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
203317a48c7cSmrg])# AC_LIBTOOL_DLOPEN
203417a48c7cSmrg
203517a48c7cSmrg
203617a48c7cSmrg# AC_LIBTOOL_WIN32_DLL
203717a48c7cSmrg# --------------------
203817a48c7cSmrg# declare package support for building win32 DLLs
203917a48c7cSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
204017a48c7cSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
204117a48c7cSmrg])# AC_LIBTOOL_WIN32_DLL
204217a48c7cSmrg
204317a48c7cSmrg
204417a48c7cSmrg# AC_ENABLE_SHARED([DEFAULT])
204517a48c7cSmrg# ---------------------------
204617a48c7cSmrg# implement the --enable-shared flag
204717a48c7cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
204817a48c7cSmrgAC_DEFUN([AC_ENABLE_SHARED],
204917a48c7cSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
205017a48c7cSmrgAC_ARG_ENABLE([shared],
205117a48c7cSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
205217a48c7cSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
205317a48c7cSmrg    [p=${PACKAGE-default}
205417a48c7cSmrg    case $enableval in
205517a48c7cSmrg    yes) enable_shared=yes ;;
205617a48c7cSmrg    no) enable_shared=no ;;
205717a48c7cSmrg    *)
205817a48c7cSmrg      enable_shared=no
205917a48c7cSmrg      # Look at the argument we got.  We use all the common list separators.
206017a48c7cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
206117a48c7cSmrg      for pkg in $enableval; do
206217a48c7cSmrg	IFS="$lt_save_ifs"
206317a48c7cSmrg	if test "X$pkg" = "X$p"; then
206417a48c7cSmrg	  enable_shared=yes
206517a48c7cSmrg	fi
206617a48c7cSmrg      done
206717a48c7cSmrg      IFS="$lt_save_ifs"
206817a48c7cSmrg      ;;
206917a48c7cSmrg    esac],
207017a48c7cSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
207117a48c7cSmrg])# AC_ENABLE_SHARED
207217a48c7cSmrg
207317a48c7cSmrg
207417a48c7cSmrg# AC_DISABLE_SHARED
207517a48c7cSmrg# -----------------
207617a48c7cSmrg# set the default shared flag to --disable-shared
207717a48c7cSmrgAC_DEFUN([AC_DISABLE_SHARED],
207817a48c7cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
207917a48c7cSmrgAC_ENABLE_SHARED(no)
208017a48c7cSmrg])# AC_DISABLE_SHARED
208117a48c7cSmrg
208217a48c7cSmrg
208317a48c7cSmrg# AC_ENABLE_STATIC([DEFAULT])
208417a48c7cSmrg# ---------------------------
208517a48c7cSmrg# implement the --enable-static flag
208617a48c7cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
208717a48c7cSmrgAC_DEFUN([AC_ENABLE_STATIC],
208817a48c7cSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
208917a48c7cSmrgAC_ARG_ENABLE([static],
209017a48c7cSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
209117a48c7cSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
209217a48c7cSmrg    [p=${PACKAGE-default}
209317a48c7cSmrg    case $enableval in
209417a48c7cSmrg    yes) enable_static=yes ;;
209517a48c7cSmrg    no) enable_static=no ;;
209617a48c7cSmrg    *)
209717a48c7cSmrg     enable_static=no
209817a48c7cSmrg      # Look at the argument we got.  We use all the common list separators.
209917a48c7cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
210017a48c7cSmrg      for pkg in $enableval; do
210117a48c7cSmrg	IFS="$lt_save_ifs"
210217a48c7cSmrg	if test "X$pkg" = "X$p"; then
210317a48c7cSmrg	  enable_static=yes
210417a48c7cSmrg	fi
210517a48c7cSmrg      done
210617a48c7cSmrg      IFS="$lt_save_ifs"
210717a48c7cSmrg      ;;
210817a48c7cSmrg    esac],
210917a48c7cSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
211017a48c7cSmrg])# AC_ENABLE_STATIC
211117a48c7cSmrg
211217a48c7cSmrg
211317a48c7cSmrg# AC_DISABLE_STATIC
211417a48c7cSmrg# -----------------
211517a48c7cSmrg# set the default static flag to --disable-static
211617a48c7cSmrgAC_DEFUN([AC_DISABLE_STATIC],
211717a48c7cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
211817a48c7cSmrgAC_ENABLE_STATIC(no)
211917a48c7cSmrg])# AC_DISABLE_STATIC
212017a48c7cSmrg
212117a48c7cSmrg
212217a48c7cSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
212317a48c7cSmrg# ---------------------------------
212417a48c7cSmrg# implement the --enable-fast-install flag
212517a48c7cSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
212617a48c7cSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
212717a48c7cSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
212817a48c7cSmrgAC_ARG_ENABLE([fast-install],
212917a48c7cSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
213017a48c7cSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
213117a48c7cSmrg    [p=${PACKAGE-default}
213217a48c7cSmrg    case $enableval in
213317a48c7cSmrg    yes) enable_fast_install=yes ;;
213417a48c7cSmrg    no) enable_fast_install=no ;;
213517a48c7cSmrg    *)
213617a48c7cSmrg      enable_fast_install=no
213717a48c7cSmrg      # Look at the argument we got.  We use all the common list separators.
213817a48c7cSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
213917a48c7cSmrg      for pkg in $enableval; do
214017a48c7cSmrg	IFS="$lt_save_ifs"
214117a48c7cSmrg	if test "X$pkg" = "X$p"; then
214217a48c7cSmrg	  enable_fast_install=yes
214317a48c7cSmrg	fi
214417a48c7cSmrg      done
214517a48c7cSmrg      IFS="$lt_save_ifs"
214617a48c7cSmrg      ;;
214717a48c7cSmrg    esac],
214817a48c7cSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
214917a48c7cSmrg])# AC_ENABLE_FAST_INSTALL
215017a48c7cSmrg
215117a48c7cSmrg
215217a48c7cSmrg# AC_DISABLE_FAST_INSTALL
215317a48c7cSmrg# -----------------------
215417a48c7cSmrg# set the default to --disable-fast-install
215517a48c7cSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
215617a48c7cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
215717a48c7cSmrgAC_ENABLE_FAST_INSTALL(no)
215817a48c7cSmrg])# AC_DISABLE_FAST_INSTALL
215917a48c7cSmrg
216017a48c7cSmrg
216117a48c7cSmrg# AC_LIBTOOL_PICMODE([MODE])
216217a48c7cSmrg# --------------------------
216317a48c7cSmrg# implement the --with-pic flag
216417a48c7cSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
216517a48c7cSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
216617a48c7cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
216717a48c7cSmrgpic_mode=ifelse($#,1,$1,default)
216817a48c7cSmrg])# AC_LIBTOOL_PICMODE
216917a48c7cSmrg
217017a48c7cSmrg
217117a48c7cSmrg# AC_PROG_EGREP
217217a48c7cSmrg# -------------
217317a48c7cSmrg# This is predefined starting with Autoconf 2.54, so this conditional
217417a48c7cSmrg# definition can be removed once we require Autoconf 2.54 or later.
217517a48c7cSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
217617a48c7cSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
217717a48c7cSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
217817a48c7cSmrg    then ac_cv_prog_egrep='grep -E'
217917a48c7cSmrg    else ac_cv_prog_egrep='egrep'
218017a48c7cSmrg    fi])
218117a48c7cSmrg EGREP=$ac_cv_prog_egrep
218217a48c7cSmrg AC_SUBST([EGREP])
218317a48c7cSmrg])])
218417a48c7cSmrg
218517a48c7cSmrg
218617a48c7cSmrg# AC_PATH_TOOL_PREFIX
218717a48c7cSmrg# -------------------
21888e0ed500Smrg# find a file program which can recognize shared library
218917a48c7cSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
219017a48c7cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
219117a48c7cSmrgAC_MSG_CHECKING([for $1])
219217a48c7cSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
219317a48c7cSmrg[case $MAGIC_CMD in
219417a48c7cSmrg[[\\/*] |  ?:[\\/]*])
219517a48c7cSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
219617a48c7cSmrg  ;;
219717a48c7cSmrg*)
219817a48c7cSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
219917a48c7cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
220017a48c7cSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
220117a48c7cSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
220217a48c7cSmrgdnl not every word.  This closes a longstanding sh security hole.
220317a48c7cSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
220417a48c7cSmrg  for ac_dir in $ac_dummy; do
220517a48c7cSmrg    IFS="$lt_save_ifs"
220617a48c7cSmrg    test -z "$ac_dir" && ac_dir=.
220717a48c7cSmrg    if test -f $ac_dir/$1; then
220817a48c7cSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
220917a48c7cSmrg      if test -n "$file_magic_test_file"; then
221017a48c7cSmrg	case $deplibs_check_method in
221117a48c7cSmrg	"file_magic "*)
221217a48c7cSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
221317a48c7cSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
221417a48c7cSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
221517a48c7cSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
221617a48c7cSmrg	    :
221717a48c7cSmrg	  else
221817a48c7cSmrg	    cat <<EOF 1>&2
221917a48c7cSmrg
222017a48c7cSmrg*** Warning: the command libtool uses to detect shared libraries,
222117a48c7cSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
222217a48c7cSmrg*** The result is that libtool may fail to recognize shared libraries
222317a48c7cSmrg*** as such.  This will affect the creation of libtool libraries that
222417a48c7cSmrg*** depend on shared libraries, but programs linked with such libtool
222517a48c7cSmrg*** libraries will work regardless of this problem.  Nevertheless, you
222617a48c7cSmrg*** may want to report the problem to your system manager and/or to
222717a48c7cSmrg*** bug-libtool@gnu.org
222817a48c7cSmrg
222917a48c7cSmrgEOF
223017a48c7cSmrg	  fi ;;
223117a48c7cSmrg	esac
223217a48c7cSmrg      fi
223317a48c7cSmrg      break
223417a48c7cSmrg    fi
223517a48c7cSmrg  done
223617a48c7cSmrg  IFS="$lt_save_ifs"
223717a48c7cSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
223817a48c7cSmrg  ;;
223917a48c7cSmrgesac])
224017a48c7cSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
224117a48c7cSmrgif test -n "$MAGIC_CMD"; then
224217a48c7cSmrg  AC_MSG_RESULT($MAGIC_CMD)
224317a48c7cSmrgelse
224417a48c7cSmrg  AC_MSG_RESULT(no)
224517a48c7cSmrgfi
224617a48c7cSmrg])# AC_PATH_TOOL_PREFIX
224717a48c7cSmrg
224817a48c7cSmrg
224917a48c7cSmrg# AC_PATH_MAGIC
225017a48c7cSmrg# -------------
22518e0ed500Smrg# find a file program which can recognize a shared library
225217a48c7cSmrgAC_DEFUN([AC_PATH_MAGIC],
225317a48c7cSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
225417a48c7cSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
225517a48c7cSmrg  if test -n "$ac_tool_prefix"; then
225617a48c7cSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
225717a48c7cSmrg  else
225817a48c7cSmrg    MAGIC_CMD=:
225917a48c7cSmrg  fi
226017a48c7cSmrgfi
226117a48c7cSmrg])# AC_PATH_MAGIC
226217a48c7cSmrg
226317a48c7cSmrg
226417a48c7cSmrg# AC_PROG_LD
226517a48c7cSmrg# ----------
226617a48c7cSmrg# find the pathname to the GNU or non-GNU linker
226717a48c7cSmrgAC_DEFUN([AC_PROG_LD],
226817a48c7cSmrg[AC_ARG_WITH([gnu-ld],
226917a48c7cSmrg    [AC_HELP_STRING([--with-gnu-ld],
227017a48c7cSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
227117a48c7cSmrg    [test "$withval" = no || with_gnu_ld=yes],
227217a48c7cSmrg    [with_gnu_ld=no])
227317a48c7cSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
227417a48c7cSmrgAC_REQUIRE([AC_PROG_CC])dnl
227517a48c7cSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
227617a48c7cSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
227717a48c7cSmrgac_prog=ld
227817a48c7cSmrgif test "$GCC" = yes; then
227917a48c7cSmrg  # Check if gcc -print-prog-name=ld gives a path.
228017a48c7cSmrg  AC_MSG_CHECKING([for ld used by $CC])
228117a48c7cSmrg  case $host in
228217a48c7cSmrg  *-*-mingw*)
228317a48c7cSmrg    # gcc leaves a trailing carriage return which upsets mingw
228417a48c7cSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
228517a48c7cSmrg  *)
228617a48c7cSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
228717a48c7cSmrg  esac
228817a48c7cSmrg  case $ac_prog in
228917a48c7cSmrg    # Accept absolute paths.
229017a48c7cSmrg    [[\\/]]* | ?:[[\\/]]*)
229117a48c7cSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
229217a48c7cSmrg      # Canonicalize the pathname of ld
229317a48c7cSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
229417a48c7cSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
229517a48c7cSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
229617a48c7cSmrg      done
229717a48c7cSmrg      test -z "$LD" && LD="$ac_prog"
229817a48c7cSmrg      ;;
229917a48c7cSmrg  "")
230017a48c7cSmrg    # If it fails, then pretend we aren't using GCC.
230117a48c7cSmrg    ac_prog=ld
230217a48c7cSmrg    ;;
230317a48c7cSmrg  *)
230417a48c7cSmrg    # If it is relative, then search for the first ld in PATH.
230517a48c7cSmrg    with_gnu_ld=unknown
230617a48c7cSmrg    ;;
230717a48c7cSmrg  esac
230817a48c7cSmrgelif test "$with_gnu_ld" = yes; then
230917a48c7cSmrg  AC_MSG_CHECKING([for GNU ld])
231017a48c7cSmrgelse
231117a48c7cSmrg  AC_MSG_CHECKING([for non-GNU ld])
231217a48c7cSmrgfi
231317a48c7cSmrgAC_CACHE_VAL(lt_cv_path_LD,
231417a48c7cSmrg[if test -z "$LD"; then
231517a48c7cSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
231617a48c7cSmrg  for ac_dir in $PATH; do
231717a48c7cSmrg    IFS="$lt_save_ifs"
231817a48c7cSmrg    test -z "$ac_dir" && ac_dir=.
231917a48c7cSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
232017a48c7cSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
232117a48c7cSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
232217a48c7cSmrg      # but apparently some variants of GNU ld only accept -v.
232317a48c7cSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
232417a48c7cSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
232517a48c7cSmrg      *GNU* | *'with BFD'*)
232617a48c7cSmrg	test "$with_gnu_ld" != no && break
232717a48c7cSmrg	;;
232817a48c7cSmrg      *)
232917a48c7cSmrg	test "$with_gnu_ld" != yes && break
233017a48c7cSmrg	;;
233117a48c7cSmrg      esac
233217a48c7cSmrg    fi
233317a48c7cSmrg  done
233417a48c7cSmrg  IFS="$lt_save_ifs"
233517a48c7cSmrgelse
233617a48c7cSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
233717a48c7cSmrgfi])
233817a48c7cSmrgLD="$lt_cv_path_LD"
233917a48c7cSmrgif test -n "$LD"; then
234017a48c7cSmrg  AC_MSG_RESULT($LD)
234117a48c7cSmrgelse
234217a48c7cSmrg  AC_MSG_RESULT(no)
234317a48c7cSmrgfi
234417a48c7cSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
234517a48c7cSmrgAC_PROG_LD_GNU
234617a48c7cSmrg])# AC_PROG_LD
234717a48c7cSmrg
234817a48c7cSmrg
234917a48c7cSmrg# AC_PROG_LD_GNU
235017a48c7cSmrg# --------------
235117a48c7cSmrgAC_DEFUN([AC_PROG_LD_GNU],
235217a48c7cSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
235317a48c7cSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
235417a48c7cSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
235517a48c7cSmrgcase `$LD -v 2>&1 </dev/null` in
235617a48c7cSmrg*GNU* | *'with BFD'*)
235717a48c7cSmrg  lt_cv_prog_gnu_ld=yes
235817a48c7cSmrg  ;;
235917a48c7cSmrg*)
236017a48c7cSmrg  lt_cv_prog_gnu_ld=no
236117a48c7cSmrg  ;;
236217a48c7cSmrgesac])
236317a48c7cSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
236417a48c7cSmrg])# AC_PROG_LD_GNU
236517a48c7cSmrg
236617a48c7cSmrg
236717a48c7cSmrg# AC_PROG_LD_RELOAD_FLAG
236817a48c7cSmrg# ----------------------
236917a48c7cSmrg# find reload flag for linker
237017a48c7cSmrg#   -- PORTME Some linkers may need a different reload flag.
237117a48c7cSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
237217a48c7cSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
237317a48c7cSmrg  lt_cv_ld_reload_flag,
237417a48c7cSmrg  [lt_cv_ld_reload_flag='-r'])
237517a48c7cSmrgreload_flag=$lt_cv_ld_reload_flag
237617a48c7cSmrgcase $reload_flag in
237717a48c7cSmrg"" | " "*) ;;
237817a48c7cSmrg*) reload_flag=" $reload_flag" ;;
237917a48c7cSmrgesac
238017a48c7cSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
238117a48c7cSmrgcase $host_os in
238217a48c7cSmrg  darwin*)
238317a48c7cSmrg    if test "$GCC" = yes; then
238417a48c7cSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
238517a48c7cSmrg    else
238617a48c7cSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
238717a48c7cSmrg    fi
238817a48c7cSmrg    ;;
238917a48c7cSmrgesac
239017a48c7cSmrg])# AC_PROG_LD_RELOAD_FLAG
239117a48c7cSmrg
239217a48c7cSmrg
239317a48c7cSmrg# AC_DEPLIBS_CHECK_METHOD
239417a48c7cSmrg# -----------------------
239517a48c7cSmrg# how to check for library dependencies
239617a48c7cSmrg#  -- PORTME fill in with the dynamic library characteristics
239717a48c7cSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
23988e0ed500Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
239917a48c7cSmrglt_cv_deplibs_check_method,
240017a48c7cSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
240117a48c7cSmrglt_cv_file_magic_test_file=
240217a48c7cSmrglt_cv_deplibs_check_method='unknown'
240317a48c7cSmrg# Need to set the preceding variable on all platforms that support
240417a48c7cSmrg# interlibrary dependencies.
240517a48c7cSmrg# 'none' -- dependencies not supported.
240617a48c7cSmrg# `unknown' -- same as none, but documents that we really don't know.
240717a48c7cSmrg# 'pass_all' -- all dependencies passed with no checks.
240817a48c7cSmrg# 'test_compile' -- check by making test program.
240917a48c7cSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
241017a48c7cSmrg# which responds to the $file_magic_cmd with a given extended regex.
241117a48c7cSmrg# If you have `file' or equivalent on your system and you're not sure
241217a48c7cSmrg# whether `pass_all' will *always* work, you probably want this one.
241317a48c7cSmrg
241417a48c7cSmrgcase $host_os in
24158e0ed500Smrgaix[[4-9]]*)
241617a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
241717a48c7cSmrg  ;;
241817a48c7cSmrg
241917a48c7cSmrgbeos*)
242017a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
242117a48c7cSmrg  ;;
242217a48c7cSmrg
242317a48c7cSmrgbsdi[[45]]*)
242417a48c7cSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
242517a48c7cSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
242617a48c7cSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
242717a48c7cSmrg  ;;
242817a48c7cSmrg
242917a48c7cSmrgcygwin*)
243017a48c7cSmrg  # func_win32_libid is a shell function defined in ltmain.sh
243117a48c7cSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
243217a48c7cSmrg  lt_cv_file_magic_cmd='func_win32_libid'
243317a48c7cSmrg  ;;
243417a48c7cSmrg
243517a48c7cSmrgmingw* | pw32*)
243617a48c7cSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
24378e0ed500Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
24388e0ed500Smrg  # unless we find 'file', for example because we are cross-compiling.
24398e0ed500Smrg  if ( file / ) >/dev/null 2>&1; then
24408e0ed500Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
24418e0ed500Smrg    lt_cv_file_magic_cmd='func_win32_libid'
24428e0ed500Smrg  else
24438e0ed500Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
24448e0ed500Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
24458e0ed500Smrg  fi
244617a48c7cSmrg  ;;
244717a48c7cSmrg
244817a48c7cSmrgdarwin* | rhapsody*)
244917a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
245017a48c7cSmrg  ;;
245117a48c7cSmrg
24528e0ed500Smrgfreebsd* | dragonfly*)
245317a48c7cSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
245417a48c7cSmrg    case $host_cpu in
245517a48c7cSmrg    i*86 )
245617a48c7cSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
245717a48c7cSmrg      # Let's accept both of them until this is cleared up.
245817a48c7cSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
245917a48c7cSmrg      lt_cv_file_magic_cmd=/usr/bin/file
246017a48c7cSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
246117a48c7cSmrg      ;;
246217a48c7cSmrg    esac
246317a48c7cSmrg  else
246417a48c7cSmrg    lt_cv_deplibs_check_method=pass_all
246517a48c7cSmrg  fi
246617a48c7cSmrg  ;;
246717a48c7cSmrg
246817a48c7cSmrggnu*)
246917a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
247017a48c7cSmrg  ;;
247117a48c7cSmrg
247217a48c7cSmrghpux10.20* | hpux11*)
247317a48c7cSmrg  lt_cv_file_magic_cmd=/usr/bin/file
247417a48c7cSmrg  case $host_cpu in
247517a48c7cSmrg  ia64*)
247617a48c7cSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
247717a48c7cSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
247817a48c7cSmrg    ;;
247917a48c7cSmrg  hppa*64*)
248017a48c7cSmrg    [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]']
248117a48c7cSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
248217a48c7cSmrg    ;;
248317a48c7cSmrg  *)
248417a48c7cSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
248517a48c7cSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
248617a48c7cSmrg    ;;
248717a48c7cSmrg  esac
248817a48c7cSmrg  ;;
248917a48c7cSmrg
24908e0ed500Smrginterix[[3-9]]*)
249117a48c7cSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
249217a48c7cSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
249317a48c7cSmrg  ;;
249417a48c7cSmrg
249517a48c7cSmrgirix5* | irix6* | nonstopux*)
249617a48c7cSmrg  case $LD in
249717a48c7cSmrg  *-32|*"-32 ") libmagic=32-bit;;
249817a48c7cSmrg  *-n32|*"-n32 ") libmagic=N32;;
249917a48c7cSmrg  *-64|*"-64 ") libmagic=64-bit;;
250017a48c7cSmrg  *) libmagic=never-match;;
250117a48c7cSmrg  esac
250217a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
250317a48c7cSmrg  ;;
250417a48c7cSmrg
250517a48c7cSmrg# This must be Linux ELF.
25068e0ed500Smrglinux* | k*bsd*-gnu)
250717a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
250817a48c7cSmrg  ;;
250917a48c7cSmrg
251017a48c7cSmrgnetbsd*)
251117a48c7cSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
251217a48c7cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
251317a48c7cSmrg  else
251417a48c7cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
251517a48c7cSmrg  fi
251617a48c7cSmrg  ;;
251717a48c7cSmrg
251817a48c7cSmrgnewos6*)
251917a48c7cSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
252017a48c7cSmrg  lt_cv_file_magic_cmd=/usr/bin/file
252117a48c7cSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
252217a48c7cSmrg  ;;
252317a48c7cSmrg
252417a48c7cSmrgnto-qnx*)
252517a48c7cSmrg  lt_cv_deplibs_check_method=unknown
252617a48c7cSmrg  ;;
252717a48c7cSmrg
252817a48c7cSmrgopenbsd*)
252917a48c7cSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
253017a48c7cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
253117a48c7cSmrg  else
253217a48c7cSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
253317a48c7cSmrg  fi
253417a48c7cSmrg  ;;
253517a48c7cSmrg
253617a48c7cSmrgosf3* | osf4* | osf5*)
253717a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
253817a48c7cSmrg  ;;
253917a48c7cSmrg
25408e0ed500Smrgrdos*)
25418e0ed500Smrg  lt_cv_deplibs_check_method=pass_all
25428e0ed500Smrg  ;;
25438e0ed500Smrg
254417a48c7cSmrgsolaris*)
254517a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
254617a48c7cSmrg  ;;
254717a48c7cSmrg
254817a48c7cSmrgsysv4 | sysv4.3*)
254917a48c7cSmrg  case $host_vendor in
255017a48c7cSmrg  motorola)
255117a48c7cSmrg    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]]'
255217a48c7cSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
255317a48c7cSmrg    ;;
255417a48c7cSmrg  ncr)
255517a48c7cSmrg    lt_cv_deplibs_check_method=pass_all
255617a48c7cSmrg    ;;
255717a48c7cSmrg  sequent)
255817a48c7cSmrg    lt_cv_file_magic_cmd='/bin/file'
255917a48c7cSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
256017a48c7cSmrg    ;;
256117a48c7cSmrg  sni)
256217a48c7cSmrg    lt_cv_file_magic_cmd='/bin/file'
256317a48c7cSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
256417a48c7cSmrg    lt_cv_file_magic_test_file=/lib/libc.so
256517a48c7cSmrg    ;;
256617a48c7cSmrg  siemens)
256717a48c7cSmrg    lt_cv_deplibs_check_method=pass_all
256817a48c7cSmrg    ;;
256917a48c7cSmrg  pc)
257017a48c7cSmrg    lt_cv_deplibs_check_method=pass_all
257117a48c7cSmrg    ;;
257217a48c7cSmrg  esac
257317a48c7cSmrg  ;;
257417a48c7cSmrg
257517a48c7cSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
257617a48c7cSmrg  lt_cv_deplibs_check_method=pass_all
257717a48c7cSmrg  ;;
257817a48c7cSmrgesac
257917a48c7cSmrg])
258017a48c7cSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
258117a48c7cSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
258217a48c7cSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
258317a48c7cSmrg])# AC_DEPLIBS_CHECK_METHOD
258417a48c7cSmrg
258517a48c7cSmrg
258617a48c7cSmrg# AC_PROG_NM
258717a48c7cSmrg# ----------
258817a48c7cSmrg# find the pathname to a BSD-compatible name lister
258917a48c7cSmrgAC_DEFUN([AC_PROG_NM],
259017a48c7cSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
259117a48c7cSmrg[if test -n "$NM"; then
259217a48c7cSmrg  # Let the user override the test.
259317a48c7cSmrg  lt_cv_path_NM="$NM"
259417a48c7cSmrgelse
259517a48c7cSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
25968e0ed500Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
259717a48c7cSmrg    lt_nm_to_check="$lt_nm_to_check nm"
259817a48c7cSmrg  fi
259917a48c7cSmrg  for lt_tmp_nm in $lt_nm_to_check; do
260017a48c7cSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
260117a48c7cSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
260217a48c7cSmrg      IFS="$lt_save_ifs"
260317a48c7cSmrg      test -z "$ac_dir" && ac_dir=.
260417a48c7cSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
260517a48c7cSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
260617a48c7cSmrg	# Check to see if the nm accepts a BSD-compat flag.
260717a48c7cSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
260817a48c7cSmrg	#   nm: unknown option "B" ignored
260917a48c7cSmrg	# Tru64's nm complains that /dev/null is an invalid object file
261017a48c7cSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
261117a48c7cSmrg	*/dev/null* | *'Invalid file or object type'*)
261217a48c7cSmrg	  lt_cv_path_NM="$tmp_nm -B"
261317a48c7cSmrg	  break
261417a48c7cSmrg	  ;;
261517a48c7cSmrg	*)
261617a48c7cSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
261717a48c7cSmrg	  */dev/null*)
261817a48c7cSmrg	    lt_cv_path_NM="$tmp_nm -p"
261917a48c7cSmrg	    break
262017a48c7cSmrg	    ;;
262117a48c7cSmrg	  *)
262217a48c7cSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
262317a48c7cSmrg	    continue # so that we can try to find one that supports BSD flags
262417a48c7cSmrg	    ;;
262517a48c7cSmrg	  esac
262617a48c7cSmrg	  ;;
262717a48c7cSmrg	esac
262817a48c7cSmrg      fi
262917a48c7cSmrg    done
263017a48c7cSmrg    IFS="$lt_save_ifs"
263117a48c7cSmrg  done
263217a48c7cSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
263317a48c7cSmrgfi])
263417a48c7cSmrgNM="$lt_cv_path_NM"
263517a48c7cSmrg])# AC_PROG_NM
263617a48c7cSmrg
263717a48c7cSmrg
263817a48c7cSmrg# AC_CHECK_LIBM
263917a48c7cSmrg# -------------
264017a48c7cSmrg# check for math library
264117a48c7cSmrgAC_DEFUN([AC_CHECK_LIBM],
264217a48c7cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
264317a48c7cSmrgLIBM=
264417a48c7cSmrgcase $host in
264517a48c7cSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
264617a48c7cSmrg  # These system don't have libm, or don't need it
264717a48c7cSmrg  ;;
264817a48c7cSmrg*-ncr-sysv4.3*)
264917a48c7cSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
265017a48c7cSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
265117a48c7cSmrg  ;;
265217a48c7cSmrg*)
265317a48c7cSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
265417a48c7cSmrg  ;;
265517a48c7cSmrgesac
265617a48c7cSmrg])# AC_CHECK_LIBM
265717a48c7cSmrg
265817a48c7cSmrg
265917a48c7cSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
266017a48c7cSmrg# -----------------------------------
266117a48c7cSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
266217a48c7cSmrg# LTDLINCL to the include flags for the libltdl header and adds
266317a48c7cSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
266417a48c7cSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
266517a48c7cSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
266617a48c7cSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
266717a48c7cSmrg# (note the single quotes!).  If your package is not flat and you're not
266817a48c7cSmrg# using automake, define top_builddir and top_srcdir appropriately in
266917a48c7cSmrg# the Makefiles.
267017a48c7cSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
267117a48c7cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
267217a48c7cSmrg  case $enable_ltdl_convenience in
267317a48c7cSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
267417a48c7cSmrg  "") enable_ltdl_convenience=yes
267517a48c7cSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
267617a48c7cSmrg  esac
267717a48c7cSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
267817a48c7cSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
267917a48c7cSmrg  # For backwards non-gettext consistent compatibility...
268017a48c7cSmrg  INCLTDL="$LTDLINCL"
268117a48c7cSmrg])# AC_LIBLTDL_CONVENIENCE
268217a48c7cSmrg
268317a48c7cSmrg
268417a48c7cSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
268517a48c7cSmrg# -----------------------------------
268617a48c7cSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
268717a48c7cSmrg# LTDLINCL to the include flags for the libltdl header and adds
268817a48c7cSmrg# --enable-ltdl-install to the configure arguments.  Note that
268917a48c7cSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
269017a48c7cSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
269117a48c7cSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
269217a48c7cSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
269317a48c7cSmrg# flat and you're not using automake, define top_builddir and top_srcdir
269417a48c7cSmrg# appropriately in the Makefiles.
269517a48c7cSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
269617a48c7cSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
269717a48c7cSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
269817a48c7cSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
269917a48c7cSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
270017a48c7cSmrg  [if test x"$enable_ltdl_install" = xno; then
270117a48c7cSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
270217a48c7cSmrg   else
270317a48c7cSmrg     enable_ltdl_install=yes
270417a48c7cSmrg   fi
270517a48c7cSmrg  ])
270617a48c7cSmrg  if test x"$enable_ltdl_install" = x"yes"; then
270717a48c7cSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
270817a48c7cSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
270917a48c7cSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
271017a48c7cSmrg  else
271117a48c7cSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
271217a48c7cSmrg    LIBLTDL="-lltdl"
271317a48c7cSmrg    LTDLINCL=
271417a48c7cSmrg  fi
271517a48c7cSmrg  # For backwards non-gettext consistent compatibility...
271617a48c7cSmrg  INCLTDL="$LTDLINCL"
271717a48c7cSmrg])# AC_LIBLTDL_INSTALLABLE
271817a48c7cSmrg
271917a48c7cSmrg
272017a48c7cSmrg# AC_LIBTOOL_CXX
272117a48c7cSmrg# --------------
272217a48c7cSmrg# enable support for C++ libraries
272317a48c7cSmrgAC_DEFUN([AC_LIBTOOL_CXX],
272417a48c7cSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
272517a48c7cSmrg])# AC_LIBTOOL_CXX
272617a48c7cSmrg
272717a48c7cSmrg
272817a48c7cSmrg# _LT_AC_LANG_CXX
272917a48c7cSmrg# ---------------
273017a48c7cSmrgAC_DEFUN([_LT_AC_LANG_CXX],
273117a48c7cSmrg[AC_REQUIRE([AC_PROG_CXX])
273217a48c7cSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
273317a48c7cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
273417a48c7cSmrg])# _LT_AC_LANG_CXX
273517a48c7cSmrg
273617a48c7cSmrg# _LT_AC_PROG_CXXCPP
273717a48c7cSmrg# ------------------
273817a48c7cSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
273917a48c7cSmrg[
274017a48c7cSmrgAC_REQUIRE([AC_PROG_CXX])
274117a48c7cSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
274217a48c7cSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
274317a48c7cSmrg    (test "X$CXX" != "Xg++"))) ; then
274417a48c7cSmrg  AC_PROG_CXXCPP
274517a48c7cSmrgfi
274617a48c7cSmrg])# _LT_AC_PROG_CXXCPP
274717a48c7cSmrg
274817a48c7cSmrg# AC_LIBTOOL_F77
274917a48c7cSmrg# --------------
275017a48c7cSmrg# enable support for Fortran 77 libraries
275117a48c7cSmrgAC_DEFUN([AC_LIBTOOL_F77],
275217a48c7cSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
275317a48c7cSmrg])# AC_LIBTOOL_F77
275417a48c7cSmrg
275517a48c7cSmrg
275617a48c7cSmrg# _LT_AC_LANG_F77
275717a48c7cSmrg# ---------------
275817a48c7cSmrgAC_DEFUN([_LT_AC_LANG_F77],
275917a48c7cSmrg[AC_REQUIRE([AC_PROG_F77])
276017a48c7cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
276117a48c7cSmrg])# _LT_AC_LANG_F77
276217a48c7cSmrg
276317a48c7cSmrg
276417a48c7cSmrg# AC_LIBTOOL_GCJ
276517a48c7cSmrg# --------------
276617a48c7cSmrg# enable support for GCJ libraries
276717a48c7cSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
276817a48c7cSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
276917a48c7cSmrg])# AC_LIBTOOL_GCJ
277017a48c7cSmrg
277117a48c7cSmrg
277217a48c7cSmrg# _LT_AC_LANG_GCJ
277317a48c7cSmrg# ---------------
277417a48c7cSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
277517a48c7cSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
277617a48c7cSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
277717a48c7cSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
277817a48c7cSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
277917a48c7cSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
278017a48c7cSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
278117a48c7cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
278217a48c7cSmrg])# _LT_AC_LANG_GCJ
278317a48c7cSmrg
278417a48c7cSmrg
278517a48c7cSmrg# AC_LIBTOOL_RC
278617a48c7cSmrg# -------------
278717a48c7cSmrg# enable support for Windows resource files
278817a48c7cSmrgAC_DEFUN([AC_LIBTOOL_RC],
278917a48c7cSmrg[AC_REQUIRE([LT_AC_PROG_RC])
279017a48c7cSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
279117a48c7cSmrg])# AC_LIBTOOL_RC
279217a48c7cSmrg
279317a48c7cSmrg
279417a48c7cSmrg# AC_LIBTOOL_LANG_C_CONFIG
279517a48c7cSmrg# ------------------------
279617a48c7cSmrg# Ensure that the configuration vars for the C compiler are
279717a48c7cSmrg# suitably defined.  Those variables are subsequently used by
279817a48c7cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
279917a48c7cSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
280017a48c7cSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
280117a48c7cSmrg[lt_save_CC="$CC"
280217a48c7cSmrgAC_LANG_PUSH(C)
280317a48c7cSmrg
280417a48c7cSmrg# Source file extension for C test sources.
280517a48c7cSmrgac_ext=c
280617a48c7cSmrg
280717a48c7cSmrg# Object file extension for compiled C test sources.
280817a48c7cSmrgobjext=o
280917a48c7cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
281017a48c7cSmrg
281117a48c7cSmrg# Code to be used in simple compile tests
28128e0ed500Smrglt_simple_compile_test_code="int some_variable = 0;"
281317a48c7cSmrg
281417a48c7cSmrg# Code to be used in simple link tests
28158e0ed500Smrglt_simple_link_test_code='int main(){return(0);}'
281617a48c7cSmrg
281717a48c7cSmrg_LT_AC_SYS_COMPILER
281817a48c7cSmrg
281917a48c7cSmrg# save warnings/boilerplate of simple test code
282017a48c7cSmrg_LT_COMPILER_BOILERPLATE
282117a48c7cSmrg_LT_LINKER_BOILERPLATE
282217a48c7cSmrg
282317a48c7cSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
282417a48c7cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
282517a48c7cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
282617a48c7cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
282717a48c7cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
282817a48c7cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
282917a48c7cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
283017a48c7cSmrgAC_LIBTOOL_SYS_LIB_STRIP
283117a48c7cSmrgAC_LIBTOOL_DLOPEN_SELF
283217a48c7cSmrg
283317a48c7cSmrg# Report which library types will actually be built
283417a48c7cSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
283517a48c7cSmrgAC_MSG_RESULT([$can_build_shared])
283617a48c7cSmrg
283717a48c7cSmrgAC_MSG_CHECKING([whether to build shared libraries])
283817a48c7cSmrgtest "$can_build_shared" = "no" && enable_shared=no
283917a48c7cSmrg
284017a48c7cSmrg# On AIX, shared libraries and static libraries use the same namespace, and
284117a48c7cSmrg# are all built from PIC.
284217a48c7cSmrgcase $host_os in
284317a48c7cSmrgaix3*)
284417a48c7cSmrg  test "$enable_shared" = yes && enable_static=no
284517a48c7cSmrg  if test -n "$RANLIB"; then
284617a48c7cSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
284717a48c7cSmrg    postinstall_cmds='$RANLIB $lib'
284817a48c7cSmrg  fi
284917a48c7cSmrg  ;;
285017a48c7cSmrg
28518e0ed500Smrgaix[[4-9]]*)
285217a48c7cSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
285317a48c7cSmrg    test "$enable_shared" = yes && enable_static=no
285417a48c7cSmrg  fi
285517a48c7cSmrg    ;;
285617a48c7cSmrgesac
285717a48c7cSmrgAC_MSG_RESULT([$enable_shared])
285817a48c7cSmrg
285917a48c7cSmrgAC_MSG_CHECKING([whether to build static libraries])
286017a48c7cSmrg# Make sure either enable_shared or enable_static is yes.
286117a48c7cSmrgtest "$enable_shared" = yes || enable_static=yes
286217a48c7cSmrgAC_MSG_RESULT([$enable_static])
286317a48c7cSmrg
286417a48c7cSmrgAC_LIBTOOL_CONFIG($1)
286517a48c7cSmrg
286617a48c7cSmrgAC_LANG_POP
286717a48c7cSmrgCC="$lt_save_CC"
286817a48c7cSmrg])# AC_LIBTOOL_LANG_C_CONFIG
286917a48c7cSmrg
287017a48c7cSmrg
287117a48c7cSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
287217a48c7cSmrg# --------------------------
287317a48c7cSmrg# Ensure that the configuration vars for the C compiler are
287417a48c7cSmrg# suitably defined.  Those variables are subsequently used by
287517a48c7cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
287617a48c7cSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
287717a48c7cSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
287817a48c7cSmrg[AC_LANG_PUSH(C++)
287917a48c7cSmrgAC_REQUIRE([AC_PROG_CXX])
288017a48c7cSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
288117a48c7cSmrg
288217a48c7cSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
288317a48c7cSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
288417a48c7cSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
288517a48c7cSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
288617a48c7cSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
288717a48c7cSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
288817a48c7cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
288917a48c7cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
289017a48c7cSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
289117a48c7cSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
289217a48c7cSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
289317a48c7cSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
289417a48c7cSmrg_LT_AC_TAGVAR(module_cmds, $1)=
289517a48c7cSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
289617a48c7cSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
289717a48c7cSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
289817a48c7cSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
289917a48c7cSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
290017a48c7cSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
290117a48c7cSmrg
290217a48c7cSmrg# Dependencies to place before and after the object being linked:
290317a48c7cSmrg_LT_AC_TAGVAR(predep_objects, $1)=
290417a48c7cSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
290517a48c7cSmrg_LT_AC_TAGVAR(predeps, $1)=
290617a48c7cSmrg_LT_AC_TAGVAR(postdeps, $1)=
290717a48c7cSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
29088e0ed500Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
290917a48c7cSmrg
291017a48c7cSmrg# Source file extension for C++ test sources.
291117a48c7cSmrgac_ext=cpp
291217a48c7cSmrg
291317a48c7cSmrg# Object file extension for compiled C++ test sources.
291417a48c7cSmrgobjext=o
291517a48c7cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
291617a48c7cSmrg
291717a48c7cSmrg# Code to be used in simple compile tests
29188e0ed500Smrglt_simple_compile_test_code="int some_variable = 0;"
291917a48c7cSmrg
292017a48c7cSmrg# Code to be used in simple link tests
29218e0ed500Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
292217a48c7cSmrg
292317a48c7cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
292417a48c7cSmrg_LT_AC_SYS_COMPILER
292517a48c7cSmrg
292617a48c7cSmrg# save warnings/boilerplate of simple test code
292717a48c7cSmrg_LT_COMPILER_BOILERPLATE
292817a48c7cSmrg_LT_LINKER_BOILERPLATE
292917a48c7cSmrg
293017a48c7cSmrg# Allow CC to be a program name with arguments.
293117a48c7cSmrglt_save_CC=$CC
293217a48c7cSmrglt_save_LD=$LD
293317a48c7cSmrglt_save_GCC=$GCC
293417a48c7cSmrgGCC=$GXX
293517a48c7cSmrglt_save_with_gnu_ld=$with_gnu_ld
293617a48c7cSmrglt_save_path_LD=$lt_cv_path_LD
293717a48c7cSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
293817a48c7cSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
293917a48c7cSmrgelse
294017a48c7cSmrg  $as_unset lt_cv_prog_gnu_ld
294117a48c7cSmrgfi
294217a48c7cSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
294317a48c7cSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
294417a48c7cSmrgelse
294517a48c7cSmrg  $as_unset lt_cv_path_LD
294617a48c7cSmrgfi
294717a48c7cSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
294817a48c7cSmrgCC=${CXX-"c++"}
294917a48c7cSmrgcompiler=$CC
295017a48c7cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
295117a48c7cSmrg_LT_CC_BASENAME([$compiler])
295217a48c7cSmrg
295317a48c7cSmrg# We don't want -fno-exception wen compiling C++ code, so set the
295417a48c7cSmrg# no_builtin_flag separately
295517a48c7cSmrgif test "$GXX" = yes; then
295617a48c7cSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
295717a48c7cSmrgelse
295817a48c7cSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
295917a48c7cSmrgfi
296017a48c7cSmrg
296117a48c7cSmrgif test "$GXX" = yes; then
296217a48c7cSmrg  # Set up default GNU C++ configuration
296317a48c7cSmrg
296417a48c7cSmrg  AC_PROG_LD
296517a48c7cSmrg
296617a48c7cSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
296717a48c7cSmrg  # archiving commands below assume that GNU ld is being used.
296817a48c7cSmrg  if test "$with_gnu_ld" = yes; then
296917a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
297017a48c7cSmrg    _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'
297117a48c7cSmrg
297217a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
297317a48c7cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
297417a48c7cSmrg
297517a48c7cSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
297617a48c7cSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
297717a48c7cSmrg    #     investigate it a little bit more. (MM)
297817a48c7cSmrg    wlarc='${wl}'
297917a48c7cSmrg
298017a48c7cSmrg    # ancient GNU ld didn't support --whole-archive et. al.
298117a48c7cSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
298217a48c7cSmrg	grep 'no-whole-archive' > /dev/null; then
298317a48c7cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
298417a48c7cSmrg    else
298517a48c7cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
298617a48c7cSmrg    fi
298717a48c7cSmrg  else
298817a48c7cSmrg    with_gnu_ld=no
298917a48c7cSmrg    wlarc=
299017a48c7cSmrg
299117a48c7cSmrg    # A generic and very simple default shared library creation
299217a48c7cSmrg    # command for GNU C++ for the case where it uses the native
299317a48c7cSmrg    # linker, instead of GNU ld.  If possible, this setting should
299417a48c7cSmrg    # overridden to take advantage of the native linker features on
299517a48c7cSmrg    # the platform it is being used on.
299617a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
299717a48c7cSmrg  fi
299817a48c7cSmrg
299917a48c7cSmrg  # Commands to make compiler produce verbose output that lists
300017a48c7cSmrg  # what "hidden" libraries, object files and flags are used when
300117a48c7cSmrg  # linking a shared library.
300217a48c7cSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
300317a48c7cSmrg
300417a48c7cSmrgelse
300517a48c7cSmrg  GXX=no
300617a48c7cSmrg  with_gnu_ld=no
300717a48c7cSmrg  wlarc=
300817a48c7cSmrgfi
300917a48c7cSmrg
301017a48c7cSmrg# PORTME: fill in a description of your system's C++ link characteristics
301117a48c7cSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
301217a48c7cSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
301317a48c7cSmrgcase $host_os in
301417a48c7cSmrg  aix3*)
301517a48c7cSmrg    # FIXME: insert proper C++ library support
301617a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
301717a48c7cSmrg    ;;
30188e0ed500Smrg  aix[[4-9]]*)
301917a48c7cSmrg    if test "$host_cpu" = ia64; then
302017a48c7cSmrg      # On IA64, the linker does run time linking by default, so we don't
302117a48c7cSmrg      # have to do anything special.
302217a48c7cSmrg      aix_use_runtimelinking=no
302317a48c7cSmrg      exp_sym_flag='-Bexport'
302417a48c7cSmrg      no_entry_flag=""
302517a48c7cSmrg    else
302617a48c7cSmrg      aix_use_runtimelinking=no
302717a48c7cSmrg
302817a48c7cSmrg      # Test if we are trying to use run time linking or normal
302917a48c7cSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
303017a48c7cSmrg      # need to do runtime linking.
30318e0ed500Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
303217a48c7cSmrg	for ld_flag in $LDFLAGS; do
303317a48c7cSmrg	  case $ld_flag in
303417a48c7cSmrg	  *-brtl*)
303517a48c7cSmrg	    aix_use_runtimelinking=yes
303617a48c7cSmrg	    break
303717a48c7cSmrg	    ;;
303817a48c7cSmrg	  esac
303917a48c7cSmrg	done
304017a48c7cSmrg	;;
304117a48c7cSmrg      esac
304217a48c7cSmrg
304317a48c7cSmrg      exp_sym_flag='-bexport'
304417a48c7cSmrg      no_entry_flag='-bnoentry'
304517a48c7cSmrg    fi
304617a48c7cSmrg
304717a48c7cSmrg    # When large executables or shared objects are built, AIX ld can
304817a48c7cSmrg    # have problems creating the table of contents.  If linking a library
304917a48c7cSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
305017a48c7cSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
305117a48c7cSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
305217a48c7cSmrg
305317a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
305417a48c7cSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
305517a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
305617a48c7cSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
305717a48c7cSmrg
305817a48c7cSmrg    if test "$GXX" = yes; then
305917a48c7cSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
306017a48c7cSmrg      # We only want to do this on AIX 4.2 and lower, the check
306117a48c7cSmrg      # below for broken collect2 doesn't work under 4.3+
306217a48c7cSmrg	collect2name=`${CC} -print-prog-name=collect2`
306317a48c7cSmrg	if test -f "$collect2name" && \
306417a48c7cSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
306517a48c7cSmrg	then
306617a48c7cSmrg	  # We have reworked collect2
30678e0ed500Smrg	  :
306817a48c7cSmrg	else
306917a48c7cSmrg	  # We have old collect2
307017a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
307117a48c7cSmrg	  # It fails to find uninstalled libraries when the uninstalled
307217a48c7cSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
307317a48c7cSmrg	  # to unsupported forces relinking
307417a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
307517a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
307617a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
307717a48c7cSmrg	fi
307817a48c7cSmrg	;;
307917a48c7cSmrg      esac
308017a48c7cSmrg      shared_flag='-shared'
308117a48c7cSmrg      if test "$aix_use_runtimelinking" = yes; then
308217a48c7cSmrg	shared_flag="$shared_flag "'${wl}-G'
308317a48c7cSmrg      fi
308417a48c7cSmrg    else
308517a48c7cSmrg      # not using gcc
308617a48c7cSmrg      if test "$host_cpu" = ia64; then
308717a48c7cSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
308817a48c7cSmrg	# chokes on -Wl,-G. The following line is correct:
308917a48c7cSmrg	shared_flag='-G'
309017a48c7cSmrg      else
309117a48c7cSmrg	if test "$aix_use_runtimelinking" = yes; then
309217a48c7cSmrg	  shared_flag='${wl}-G'
309317a48c7cSmrg	else
309417a48c7cSmrg	  shared_flag='${wl}-bM:SRE'
309517a48c7cSmrg	fi
309617a48c7cSmrg      fi
309717a48c7cSmrg    fi
309817a48c7cSmrg
309917a48c7cSmrg    # It seems that -bexpall does not export symbols beginning with
310017a48c7cSmrg    # underscore (_), so it is better to generate a list of symbols to export.
310117a48c7cSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
310217a48c7cSmrg    if test "$aix_use_runtimelinking" = yes; then
310317a48c7cSmrg      # Warning - without using the other runtime loading flags (-brtl),
310417a48c7cSmrg      # -berok will link without error, but may produce a broken library.
310517a48c7cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
310617a48c7cSmrg      # Determine the default libpath from the value encoded in an empty executable.
310717a48c7cSmrg      _LT_AC_SYS_LIBPATH_AIX
310817a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
310917a48c7cSmrg
311017a48c7cSmrg      _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"
311117a48c7cSmrg     else
311217a48c7cSmrg      if test "$host_cpu" = ia64; then
311317a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
311417a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
311517a48c7cSmrg	_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"
311617a48c7cSmrg      else
311717a48c7cSmrg	# Determine the default libpath from the value encoded in an empty executable.
311817a48c7cSmrg	_LT_AC_SYS_LIBPATH_AIX
311917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
312017a48c7cSmrg	# Warning - without using the other run time loading flags,
312117a48c7cSmrg	# -berok will link without error, but may produce a broken library.
312217a48c7cSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
312317a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
312417a48c7cSmrg	# Exported symbols can be pulled into shared objects from archives
312517a48c7cSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
312617a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
312717a48c7cSmrg	# This is similar to how AIX traditionally builds its shared libraries.
312817a48c7cSmrg	_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'
312917a48c7cSmrg      fi
313017a48c7cSmrg    fi
313117a48c7cSmrg    ;;
313217a48c7cSmrg
313317a48c7cSmrg  beos*)
313417a48c7cSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
313517a48c7cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
313617a48c7cSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
313717a48c7cSmrg      # support --undefined.  This deserves some investigation.  FIXME
313817a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
313917a48c7cSmrg    else
314017a48c7cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
314117a48c7cSmrg    fi
314217a48c7cSmrg    ;;
314317a48c7cSmrg
314417a48c7cSmrg  chorus*)
314517a48c7cSmrg    case $cc_basename in
314617a48c7cSmrg      *)
314717a48c7cSmrg	# FIXME: insert proper C++ library support
314817a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
314917a48c7cSmrg	;;
315017a48c7cSmrg    esac
315117a48c7cSmrg    ;;
315217a48c7cSmrg
315317a48c7cSmrg  cygwin* | mingw* | pw32*)
315417a48c7cSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
315517a48c7cSmrg    # as there is no search path for DLLs.
315617a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
315717a48c7cSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
315817a48c7cSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
315917a48c7cSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
316017a48c7cSmrg
316117a48c7cSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
316217a48c7cSmrg      _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'
316317a48c7cSmrg      # If the export-symbols file already is a .def file (1st line
316417a48c7cSmrg      # is EXPORTS), use it as is; otherwise, prepend...
316517a48c7cSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
316617a48c7cSmrg	cp $export_symbols $output_objdir/$soname.def;
316717a48c7cSmrg      else
316817a48c7cSmrg	echo EXPORTS > $output_objdir/$soname.def;
316917a48c7cSmrg	cat $export_symbols >> $output_objdir/$soname.def;
317017a48c7cSmrg      fi~
317117a48c7cSmrg      $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'
317217a48c7cSmrg    else
317317a48c7cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
317417a48c7cSmrg    fi
317517a48c7cSmrg  ;;
317617a48c7cSmrg      darwin* | rhapsody*)
317717a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
317817a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
317917a48c7cSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
318017a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
318117a48c7cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
318217a48c7cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
31838e0ed500Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
31848e0ed500Smrg      if test "$GXX" = yes ; then
318517a48c7cSmrg      output_verbose_link_cmd='echo'
31868e0ed500Smrg      _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}"
31878e0ed500Smrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
31888e0ed500Smrg      _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}"
31898e0ed500Smrg      _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}"
31908e0ed500Smrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
31918e0ed500Smrg        _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}"
31928e0ed500Smrg        _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}"
319317a48c7cSmrg      fi
319417a48c7cSmrg      else
319517a48c7cSmrg      case $cc_basename in
319617a48c7cSmrg        xlc*)
319717a48c7cSmrg         output_verbose_link_cmd='echo'
31988e0ed500Smrg          _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'
319917a48c7cSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
320017a48c7cSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
32018e0ed500Smrg          _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}'
320217a48c7cSmrg          _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}'
320317a48c7cSmrg          ;;
320417a48c7cSmrg       *)
320517a48c7cSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
320617a48c7cSmrg          ;;
320717a48c7cSmrg      esac
320817a48c7cSmrg      fi
320917a48c7cSmrg        ;;
321017a48c7cSmrg
321117a48c7cSmrg  dgux*)
321217a48c7cSmrg    case $cc_basename in
321317a48c7cSmrg      ec++*)
321417a48c7cSmrg	# FIXME: insert proper C++ library support
321517a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
321617a48c7cSmrg	;;
321717a48c7cSmrg      ghcx*)
321817a48c7cSmrg	# Green Hills C++ Compiler
321917a48c7cSmrg	# FIXME: insert proper C++ library support
322017a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
322117a48c7cSmrg	;;
322217a48c7cSmrg      *)
322317a48c7cSmrg	# FIXME: insert proper C++ library support
322417a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
322517a48c7cSmrg	;;
322617a48c7cSmrg    esac
322717a48c7cSmrg    ;;
322817a48c7cSmrg  freebsd[[12]]*)
322917a48c7cSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
323017a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
323117a48c7cSmrg    ;;
323217a48c7cSmrg  freebsd-elf*)
323317a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
323417a48c7cSmrg    ;;
32358e0ed500Smrg  freebsd* | dragonfly*)
323617a48c7cSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
323717a48c7cSmrg    # conventions
323817a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
323917a48c7cSmrg    ;;
324017a48c7cSmrg  gnu*)
324117a48c7cSmrg    ;;
324217a48c7cSmrg  hpux9*)
324317a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
324417a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
324517a48c7cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
324617a48c7cSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
324717a48c7cSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
324817a48c7cSmrg				# but as the default
324917a48c7cSmrg				# location of the library.
325017a48c7cSmrg
325117a48c7cSmrg    case $cc_basename in
325217a48c7cSmrg    CC*)
325317a48c7cSmrg      # FIXME: insert proper C++ library support
325417a48c7cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
325517a48c7cSmrg      ;;
325617a48c7cSmrg    aCC*)
325717a48c7cSmrg      _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'
325817a48c7cSmrg      # Commands to make compiler produce verbose output that lists
325917a48c7cSmrg      # what "hidden" libraries, object files and flags are used when
326017a48c7cSmrg      # linking a shared library.
326117a48c7cSmrg      #
326217a48c7cSmrg      # There doesn't appear to be a way to prevent this compiler from
326317a48c7cSmrg      # explicitly linking system object files so we need to strip them
326417a48c7cSmrg      # from the output so that they don't get included in the library
326517a48c7cSmrg      # dependencies.
326617a48c7cSmrg      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'
326717a48c7cSmrg      ;;
326817a48c7cSmrg    *)
326917a48c7cSmrg      if test "$GXX" = yes; then
327017a48c7cSmrg        _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'
327117a48c7cSmrg      else
327217a48c7cSmrg        # FIXME: insert proper C++ library support
327317a48c7cSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
327417a48c7cSmrg      fi
327517a48c7cSmrg      ;;
327617a48c7cSmrg    esac
327717a48c7cSmrg    ;;
327817a48c7cSmrg  hpux10*|hpux11*)
327917a48c7cSmrg    if test $with_gnu_ld = no; then
328017a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
328117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
328217a48c7cSmrg
328317a48c7cSmrg      case $host_cpu in
32848e0ed500Smrg      hppa*64*|ia64*) ;;
328517a48c7cSmrg      *)
328617a48c7cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
328717a48c7cSmrg        ;;
328817a48c7cSmrg      esac
328917a48c7cSmrg    fi
329017a48c7cSmrg    case $host_cpu in
329117a48c7cSmrg    hppa*64*|ia64*)
329217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
329317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
329417a48c7cSmrg      ;;
329517a48c7cSmrg    *)
329617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
329717a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
329817a48c7cSmrg					      # but as the default
329917a48c7cSmrg					      # location of the library.
330017a48c7cSmrg      ;;
330117a48c7cSmrg    esac
330217a48c7cSmrg
330317a48c7cSmrg    case $cc_basename in
330417a48c7cSmrg      CC*)
330517a48c7cSmrg	# FIXME: insert proper C++ library support
330617a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
330717a48c7cSmrg	;;
330817a48c7cSmrg      aCC*)
330917a48c7cSmrg	case $host_cpu in
331017a48c7cSmrg	hppa*64*)
331117a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
331217a48c7cSmrg	  ;;
331317a48c7cSmrg	ia64*)
331417a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
331517a48c7cSmrg	  ;;
331617a48c7cSmrg	*)
331717a48c7cSmrg	  _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'
331817a48c7cSmrg	  ;;
331917a48c7cSmrg	esac
332017a48c7cSmrg	# Commands to make compiler produce verbose output that lists
332117a48c7cSmrg	# what "hidden" libraries, object files and flags are used when
332217a48c7cSmrg	# linking a shared library.
332317a48c7cSmrg	#
332417a48c7cSmrg	# There doesn't appear to be a way to prevent this compiler from
332517a48c7cSmrg	# explicitly linking system object files so we need to strip them
332617a48c7cSmrg	# from the output so that they don't get included in the library
332717a48c7cSmrg	# dependencies.
332817a48c7cSmrg	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'
332917a48c7cSmrg	;;
333017a48c7cSmrg      *)
333117a48c7cSmrg	if test "$GXX" = yes; then
333217a48c7cSmrg	  if test $with_gnu_ld = no; then
333317a48c7cSmrg	    case $host_cpu in
333417a48c7cSmrg	    hppa*64*)
333517a48c7cSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
333617a48c7cSmrg	      ;;
333717a48c7cSmrg	    ia64*)
333817a48c7cSmrg	      _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'
333917a48c7cSmrg	      ;;
334017a48c7cSmrg	    *)
334117a48c7cSmrg	      _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'
334217a48c7cSmrg	      ;;
334317a48c7cSmrg	    esac
334417a48c7cSmrg	  fi
334517a48c7cSmrg	else
334617a48c7cSmrg	  # FIXME: insert proper C++ library support
334717a48c7cSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
334817a48c7cSmrg	fi
334917a48c7cSmrg	;;
335017a48c7cSmrg    esac
335117a48c7cSmrg    ;;
33528e0ed500Smrg  interix[[3-9]]*)
335317a48c7cSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
335417a48c7cSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
335517a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
335617a48c7cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
335717a48c7cSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
335817a48c7cSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
335917a48c7cSmrg    # default) and relocated if they conflict, which is a slow very memory
336017a48c7cSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
336117a48c7cSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
336217a48c7cSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
336317a48c7cSmrg    _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'
336417a48c7cSmrg    _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'
336517a48c7cSmrg    ;;
336617a48c7cSmrg  irix5* | irix6*)
336717a48c7cSmrg    case $cc_basename in
336817a48c7cSmrg      CC*)
336917a48c7cSmrg	# SGI C++
337017a48c7cSmrg	_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'
337117a48c7cSmrg
337217a48c7cSmrg	# Archives containing C++ object files must be created using
337317a48c7cSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
337417a48c7cSmrg	# necessary to make sure instantiated templates are included
337517a48c7cSmrg	# in the archive.
337617a48c7cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
337717a48c7cSmrg	;;
337817a48c7cSmrg      *)
337917a48c7cSmrg	if test "$GXX" = yes; then
338017a48c7cSmrg	  if test "$with_gnu_ld" = no; then
338117a48c7cSmrg	    _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'
338217a48c7cSmrg	  else
338317a48c7cSmrg	    _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'
338417a48c7cSmrg	  fi
338517a48c7cSmrg	fi
338617a48c7cSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
338717a48c7cSmrg	;;
338817a48c7cSmrg    esac
338917a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
339017a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
339117a48c7cSmrg    ;;
33928e0ed500Smrg  linux* | k*bsd*-gnu)
339317a48c7cSmrg    case $cc_basename in
339417a48c7cSmrg      KCC*)
339517a48c7cSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
339617a48c7cSmrg
339717a48c7cSmrg	# KCC will only create a shared library if the output file
339817a48c7cSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
339917a48c7cSmrg	# to its proper name (with version) after linking.
340017a48c7cSmrg	_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'
340117a48c7cSmrg	_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'
340217a48c7cSmrg	# Commands to make compiler produce verbose output that lists
340317a48c7cSmrg	# what "hidden" libraries, object files and flags are used when
340417a48c7cSmrg	# linking a shared library.
340517a48c7cSmrg	#
340617a48c7cSmrg	# There doesn't appear to be a way to prevent this compiler from
340717a48c7cSmrg	# explicitly linking system object files so we need to strip them
340817a48c7cSmrg	# from the output so that they don't get included in the library
340917a48c7cSmrg	# dependencies.
341017a48c7cSmrg	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'
341117a48c7cSmrg
341217a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
341317a48c7cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
341417a48c7cSmrg
341517a48c7cSmrg	# Archives containing C++ object files must be created using
341617a48c7cSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
341717a48c7cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
341817a48c7cSmrg	;;
341917a48c7cSmrg      icpc*)
342017a48c7cSmrg	# Intel C++
342117a48c7cSmrg	with_gnu_ld=yes
342217a48c7cSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
342317a48c7cSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
342417a48c7cSmrg	# earlier do not add the objects themselves.
342517a48c7cSmrg	case `$CC -V 2>&1` in
342617a48c7cSmrg	*"Version 7."*)
342717a48c7cSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
342817a48c7cSmrg  	  _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'
342917a48c7cSmrg	  ;;
343017a48c7cSmrg	*)  # Version 8.0 or newer
343117a48c7cSmrg	  tmp_idyn=
343217a48c7cSmrg	  case $host_cpu in
343317a48c7cSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
343417a48c7cSmrg	  esac
343517a48c7cSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
343617a48c7cSmrg	  _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'
343717a48c7cSmrg	  ;;
343817a48c7cSmrg	esac
343917a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
344017a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
344117a48c7cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
344217a48c7cSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
344317a48c7cSmrg	;;
34448e0ed500Smrg      pgCC* | pgcpp*)
344517a48c7cSmrg        # Portland Group C++ compiler
344617a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
344717a48c7cSmrg  	_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'
344817a48c7cSmrg
344917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
345017a48c7cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
345117a48c7cSmrg	_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'
345217a48c7cSmrg        ;;
345317a48c7cSmrg      cxx*)
345417a48c7cSmrg	# Compaq C++
345517a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
345617a48c7cSmrg	_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'
345717a48c7cSmrg
345817a48c7cSmrg	runpath_var=LD_RUN_PATH
345917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
346017a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
346117a48c7cSmrg
346217a48c7cSmrg	# Commands to make compiler produce verbose output that lists
346317a48c7cSmrg	# what "hidden" libraries, object files and flags are used when
346417a48c7cSmrg	# linking a shared library.
346517a48c7cSmrg	#
346617a48c7cSmrg	# There doesn't appear to be a way to prevent this compiler from
346717a48c7cSmrg	# explicitly linking system object files so we need to strip them
346817a48c7cSmrg	# from the output so that they don't get included in the library
346917a48c7cSmrg	# dependencies.
347017a48c7cSmrg	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'
347117a48c7cSmrg	;;
34728e0ed500Smrg      *)
34738e0ed500Smrg	case `$CC -V 2>&1 | sed 5q` in
34748e0ed500Smrg	*Sun\ C*)
34758e0ed500Smrg	  # Sun C++ 5.9
34768e0ed500Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
34778e0ed500Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
34788e0ed500Smrg	  _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'
34798e0ed500Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
34808e0ed500Smrg	  _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'
34818e0ed500Smrg
34828e0ed500Smrg	  # Not sure whether something based on
34838e0ed500Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
34848e0ed500Smrg	  # would be better.
34858e0ed500Smrg	  output_verbose_link_cmd='echo'
34868e0ed500Smrg
34878e0ed500Smrg	  # Archives containing C++ object files must be created using
34888e0ed500Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
34898e0ed500Smrg	  # necessary to make sure instantiated templates are included
34908e0ed500Smrg	  # in the archive.
34918e0ed500Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
34928e0ed500Smrg	  ;;
34938e0ed500Smrg	esac
34948e0ed500Smrg	;;
349517a48c7cSmrg    esac
349617a48c7cSmrg    ;;
349717a48c7cSmrg  lynxos*)
349817a48c7cSmrg    # FIXME: insert proper C++ library support
349917a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
350017a48c7cSmrg    ;;
350117a48c7cSmrg  m88k*)
350217a48c7cSmrg    # FIXME: insert proper C++ library support
350317a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
350417a48c7cSmrg    ;;
350517a48c7cSmrg  mvs*)
350617a48c7cSmrg    case $cc_basename in
350717a48c7cSmrg      cxx*)
350817a48c7cSmrg	# FIXME: insert proper C++ library support
350917a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
351017a48c7cSmrg	;;
351117a48c7cSmrg      *)
351217a48c7cSmrg	# FIXME: insert proper C++ library support
351317a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
351417a48c7cSmrg	;;
351517a48c7cSmrg    esac
351617a48c7cSmrg    ;;
351717a48c7cSmrg  netbsd*)
351817a48c7cSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
351917a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
352017a48c7cSmrg      wlarc=
352117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
352217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
352317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
352417a48c7cSmrg    fi
352517a48c7cSmrg    # Workaround some broken pre-1.5 toolchains
352617a48c7cSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
352717a48c7cSmrg    ;;
352817a48c7cSmrg  openbsd2*)
352917a48c7cSmrg    # C++ shared libraries are fairly broken
353017a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
353117a48c7cSmrg    ;;
353217a48c7cSmrg  openbsd*)
35338e0ed500Smrg    if test -f /usr/libexec/ld.so; then
35348e0ed500Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
35358e0ed500Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
35368e0ed500Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
35378e0ed500Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
35388e0ed500Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
35398e0ed500Smrg	_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'
35408e0ed500Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
35418e0ed500Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
35428e0ed500Smrg      fi
35438e0ed500Smrg      output_verbose_link_cmd='echo'
35448e0ed500Smrg    else
35458e0ed500Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
354617a48c7cSmrg    fi
354717a48c7cSmrg    ;;
354817a48c7cSmrg  osf3*)
354917a48c7cSmrg    case $cc_basename in
355017a48c7cSmrg      KCC*)
355117a48c7cSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
355217a48c7cSmrg
355317a48c7cSmrg	# KCC will only create a shared library if the output file
355417a48c7cSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
355517a48c7cSmrg	# to its proper name (with version) after linking.
355617a48c7cSmrg	_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'
355717a48c7cSmrg
355817a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
355917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
356017a48c7cSmrg
356117a48c7cSmrg	# Archives containing C++ object files must be created using
356217a48c7cSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
356317a48c7cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
356417a48c7cSmrg
356517a48c7cSmrg	;;
356617a48c7cSmrg      RCC*)
356717a48c7cSmrg	# Rational C++ 2.4.1
356817a48c7cSmrg	# FIXME: insert proper C++ library support
356917a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
357017a48c7cSmrg	;;
357117a48c7cSmrg      cxx*)
357217a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
357317a48c7cSmrg	_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'
357417a48c7cSmrg
357517a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
357617a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
357717a48c7cSmrg
357817a48c7cSmrg	# Commands to make compiler produce verbose output that lists
357917a48c7cSmrg	# what "hidden" libraries, object files and flags are used when
358017a48c7cSmrg	# linking a shared library.
358117a48c7cSmrg	#
358217a48c7cSmrg	# There doesn't appear to be a way to prevent this compiler from
358317a48c7cSmrg	# explicitly linking system object files so we need to strip them
358417a48c7cSmrg	# from the output so that they don't get included in the library
358517a48c7cSmrg	# dependencies.
358617a48c7cSmrg	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'
358717a48c7cSmrg	;;
358817a48c7cSmrg      *)
358917a48c7cSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
359017a48c7cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
359117a48c7cSmrg	  _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'
359217a48c7cSmrg
359317a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
359417a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
359517a48c7cSmrg
359617a48c7cSmrg	  # Commands to make compiler produce verbose output that lists
359717a48c7cSmrg	  # what "hidden" libraries, object files and flags are used when
359817a48c7cSmrg	  # linking a shared library.
359917a48c7cSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
360017a48c7cSmrg
360117a48c7cSmrg	else
360217a48c7cSmrg	  # FIXME: insert proper C++ library support
360317a48c7cSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
360417a48c7cSmrg	fi
360517a48c7cSmrg	;;
360617a48c7cSmrg    esac
360717a48c7cSmrg    ;;
360817a48c7cSmrg  osf4* | osf5*)
360917a48c7cSmrg    case $cc_basename in
361017a48c7cSmrg      KCC*)
361117a48c7cSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
361217a48c7cSmrg
361317a48c7cSmrg	# KCC will only create a shared library if the output file
361417a48c7cSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
361517a48c7cSmrg	# to its proper name (with version) after linking.
361617a48c7cSmrg	_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'
361717a48c7cSmrg
361817a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
361917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
362017a48c7cSmrg
362117a48c7cSmrg	# Archives containing C++ object files must be created using
362217a48c7cSmrg	# the KAI C++ compiler.
362317a48c7cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
362417a48c7cSmrg	;;
362517a48c7cSmrg      RCC*)
362617a48c7cSmrg	# Rational C++ 2.4.1
362717a48c7cSmrg	# FIXME: insert proper C++ library support
362817a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
362917a48c7cSmrg	;;
363017a48c7cSmrg      cxx*)
363117a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
363217a48c7cSmrg	_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'
363317a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
363417a48c7cSmrg	  echo "-hidden">> $lib.exp~
363517a48c7cSmrg	  $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~
363617a48c7cSmrg	  $rm $lib.exp'
363717a48c7cSmrg
363817a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
363917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
364017a48c7cSmrg
364117a48c7cSmrg	# Commands to make compiler produce verbose output that lists
364217a48c7cSmrg	# what "hidden" libraries, object files and flags are used when
364317a48c7cSmrg	# linking a shared library.
364417a48c7cSmrg	#
364517a48c7cSmrg	# There doesn't appear to be a way to prevent this compiler from
364617a48c7cSmrg	# explicitly linking system object files so we need to strip them
364717a48c7cSmrg	# from the output so that they don't get included in the library
364817a48c7cSmrg	# dependencies.
364917a48c7cSmrg	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'
365017a48c7cSmrg	;;
365117a48c7cSmrg      *)
365217a48c7cSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
365317a48c7cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
365417a48c7cSmrg	 _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'
365517a48c7cSmrg
365617a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
365717a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
365817a48c7cSmrg
365917a48c7cSmrg	  # Commands to make compiler produce verbose output that lists
366017a48c7cSmrg	  # what "hidden" libraries, object files and flags are used when
366117a48c7cSmrg	  # linking a shared library.
366217a48c7cSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
366317a48c7cSmrg
366417a48c7cSmrg	else
366517a48c7cSmrg	  # FIXME: insert proper C++ library support
366617a48c7cSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
366717a48c7cSmrg	fi
366817a48c7cSmrg	;;
366917a48c7cSmrg    esac
367017a48c7cSmrg    ;;
367117a48c7cSmrg  psos*)
367217a48c7cSmrg    # FIXME: insert proper C++ library support
367317a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
367417a48c7cSmrg    ;;
367517a48c7cSmrg  sunos4*)
367617a48c7cSmrg    case $cc_basename in
367717a48c7cSmrg      CC*)
367817a48c7cSmrg	# Sun C++ 4.x
367917a48c7cSmrg	# FIXME: insert proper C++ library support
368017a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
368117a48c7cSmrg	;;
368217a48c7cSmrg      lcc*)
368317a48c7cSmrg	# Lucid
368417a48c7cSmrg	# FIXME: insert proper C++ library support
368517a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
368617a48c7cSmrg	;;
368717a48c7cSmrg      *)
368817a48c7cSmrg	# FIXME: insert proper C++ library support
368917a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
369017a48c7cSmrg	;;
369117a48c7cSmrg    esac
369217a48c7cSmrg    ;;
369317a48c7cSmrg  solaris*)
369417a48c7cSmrg    case $cc_basename in
369517a48c7cSmrg      CC*)
369617a48c7cSmrg	# Sun C++ 4.2, 5.x and Centerline C++
369717a48c7cSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
369817a48c7cSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
369917a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
370017a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
370117a48c7cSmrg	$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'
370217a48c7cSmrg
370317a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
370417a48c7cSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
370517a48c7cSmrg	case $host_os in
370617a48c7cSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
370717a48c7cSmrg	  *)
37088e0ed500Smrg	    # The compiler driver will combine and reorder linker options,
37098e0ed500Smrg	    # but understands `-z linker_flag'.
371017a48c7cSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
37118e0ed500Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
371217a48c7cSmrg	    ;;
371317a48c7cSmrg	esac
371417a48c7cSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
371517a48c7cSmrg
371617a48c7cSmrg	output_verbose_link_cmd='echo'
371717a48c7cSmrg
371817a48c7cSmrg	# Archives containing C++ object files must be created using
371917a48c7cSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
372017a48c7cSmrg	# necessary to make sure instantiated templates are included
372117a48c7cSmrg	# in the archive.
372217a48c7cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
372317a48c7cSmrg	;;
372417a48c7cSmrg      gcx*)
372517a48c7cSmrg	# Green Hills C++ Compiler
372617a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
372717a48c7cSmrg
372817a48c7cSmrg	# The C++ compiler must be used to create the archive.
372917a48c7cSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
373017a48c7cSmrg	;;
373117a48c7cSmrg      *)
373217a48c7cSmrg	# GNU C++ compiler with Solaris linker
373317a48c7cSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
373417a48c7cSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
373517a48c7cSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
373617a48c7cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
373717a48c7cSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
373817a48c7cSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
373917a48c7cSmrg
374017a48c7cSmrg	    # Commands to make compiler produce verbose output that lists
374117a48c7cSmrg	    # what "hidden" libraries, object files and flags are used when
374217a48c7cSmrg	    # linking a shared library.
374317a48c7cSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
374417a48c7cSmrg	  else
374517a48c7cSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
374617a48c7cSmrg	    # platform.
374717a48c7cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
374817a48c7cSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
374917a48c7cSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
375017a48c7cSmrg
375117a48c7cSmrg	    # Commands to make compiler produce verbose output that lists
375217a48c7cSmrg	    # what "hidden" libraries, object files and flags are used when
375317a48c7cSmrg	    # linking a shared library.
375417a48c7cSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
375517a48c7cSmrg	  fi
375617a48c7cSmrg
375717a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
37588e0ed500Smrg	  case $host_os in
37598e0ed500Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
37608e0ed500Smrg	  *)
37618e0ed500Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
37628e0ed500Smrg	    ;;
37638e0ed500Smrg	  esac
376417a48c7cSmrg	fi
376517a48c7cSmrg	;;
376617a48c7cSmrg    esac
376717a48c7cSmrg    ;;
376817a48c7cSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
376917a48c7cSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
377017a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
377117a48c7cSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
377217a48c7cSmrg    runpath_var='LD_RUN_PATH'
377317a48c7cSmrg
377417a48c7cSmrg    case $cc_basename in
377517a48c7cSmrg      CC*)
377617a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
377717a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
377817a48c7cSmrg	;;
377917a48c7cSmrg      *)
378017a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
378117a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
378217a48c7cSmrg	;;
378317a48c7cSmrg    esac
378417a48c7cSmrg    ;;
378517a48c7cSmrg  sysv5* | sco3.2v5* | sco5v6*)
378617a48c7cSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
378717a48c7cSmrg    # link with -lc, and that would cause any symbols used from libc to
378817a48c7cSmrg    # always be unresolved, which means just about no library would
378917a48c7cSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
379017a48c7cSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
379117a48c7cSmrg    # as -z defs.
379217a48c7cSmrg    # For security reasons, it is highly recommended that you always
379317a48c7cSmrg    # use absolute paths for naming shared libraries, and exclude the
379417a48c7cSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
379517a48c7cSmrg    # requires that you compile everything twice, which is a pain.
379617a48c7cSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
379717a48c7cSmrg    # non-empty value in the environment.  Most likely only useful for
379817a48c7cSmrg    # creating official distributions of packages.
379917a48c7cSmrg    # This is a hack until libtool officially supports absolute path
380017a48c7cSmrg    # names for shared libraries.
380117a48c7cSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
380217a48c7cSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
380317a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
380417a48c7cSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
380517a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
380617a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
380717a48c7cSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
380817a48c7cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
380917a48c7cSmrg    runpath_var='LD_RUN_PATH'
381017a48c7cSmrg
381117a48c7cSmrg    case $cc_basename in
381217a48c7cSmrg      CC*)
381317a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
381417a48c7cSmrg	_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'
381517a48c7cSmrg	;;
381617a48c7cSmrg      *)
381717a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
381817a48c7cSmrg	_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'
381917a48c7cSmrg	;;
382017a48c7cSmrg    esac
382117a48c7cSmrg    ;;
382217a48c7cSmrg  tandem*)
382317a48c7cSmrg    case $cc_basename in
382417a48c7cSmrg      NCC*)
382517a48c7cSmrg	# NonStop-UX NCC 3.20
382617a48c7cSmrg	# FIXME: insert proper C++ library support
382717a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
382817a48c7cSmrg	;;
382917a48c7cSmrg      *)
383017a48c7cSmrg	# FIXME: insert proper C++ library support
383117a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
383217a48c7cSmrg	;;
383317a48c7cSmrg    esac
383417a48c7cSmrg    ;;
383517a48c7cSmrg  vxworks*)
383617a48c7cSmrg    # FIXME: insert proper C++ library support
383717a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
383817a48c7cSmrg    ;;
383917a48c7cSmrg  *)
384017a48c7cSmrg    # FIXME: insert proper C++ library support
384117a48c7cSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
384217a48c7cSmrg    ;;
384317a48c7cSmrgesac
384417a48c7cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
384517a48c7cSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
384617a48c7cSmrg
384717a48c7cSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
384817a48c7cSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
384917a48c7cSmrg
385017a48c7cSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
385117a48c7cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
385217a48c7cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
385317a48c7cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
385417a48c7cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
385517a48c7cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
385617a48c7cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
385717a48c7cSmrg
385817a48c7cSmrgAC_LIBTOOL_CONFIG($1)
385917a48c7cSmrg
386017a48c7cSmrgAC_LANG_POP
386117a48c7cSmrgCC=$lt_save_CC
386217a48c7cSmrgLDCXX=$LD
386317a48c7cSmrgLD=$lt_save_LD
386417a48c7cSmrgGCC=$lt_save_GCC
386517a48c7cSmrgwith_gnu_ldcxx=$with_gnu_ld
386617a48c7cSmrgwith_gnu_ld=$lt_save_with_gnu_ld
386717a48c7cSmrglt_cv_path_LDCXX=$lt_cv_path_LD
386817a48c7cSmrglt_cv_path_LD=$lt_save_path_LD
386917a48c7cSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
387017a48c7cSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
387117a48c7cSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
387217a48c7cSmrg
387317a48c7cSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
387417a48c7cSmrg# ------------------------------------
387517a48c7cSmrg# Figure out "hidden" library dependencies from verbose
387617a48c7cSmrg# compiler output when linking a shared library.
387717a48c7cSmrg# Parse the compiler output and extract the necessary
387817a48c7cSmrg# objects, libraries and library flags.
38798e0ed500SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
38808e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
388117a48c7cSmrgdnl we can't use the lt_simple_compile_test_code here,
388217a48c7cSmrgdnl because it contains code intended for an executable,
388317a48c7cSmrgdnl not a library.  It's possible we should let each
388417a48c7cSmrgdnl tag define a new lt_????_link_test_code variable,
388517a48c7cSmrgdnl but it's only used here...
388617a48c7cSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
388717a48c7cSmrgint a;
388817a48c7cSmrgvoid foo (void) { a = 0; }
388917a48c7cSmrgEOF
389017a48c7cSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
389117a48c7cSmrgclass Foo
389217a48c7cSmrg{
389317a48c7cSmrgpublic:
389417a48c7cSmrg  Foo (void) { a = 0; }
389517a48c7cSmrgprivate:
389617a48c7cSmrg  int a;
389717a48c7cSmrg};
389817a48c7cSmrgEOF
389917a48c7cSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
390017a48c7cSmrg      subroutine foo
390117a48c7cSmrg      implicit none
390217a48c7cSmrg      integer*4 a
390317a48c7cSmrg      a=0
390417a48c7cSmrg      return
390517a48c7cSmrg      end
390617a48c7cSmrgEOF
390717a48c7cSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
390817a48c7cSmrgpublic class foo {
390917a48c7cSmrg  private int a;
391017a48c7cSmrg  public void bar (void) {
391117a48c7cSmrg    a = 0;
391217a48c7cSmrg  }
391317a48c7cSmrg};
391417a48c7cSmrgEOF
391517a48c7cSmrg])
391617a48c7cSmrgdnl Parse the compiler output and extract the necessary
391717a48c7cSmrgdnl objects, libraries and library flags.
391817a48c7cSmrgif AC_TRY_EVAL(ac_compile); then
391917a48c7cSmrg  # Parse the compiler output and extract the necessary
392017a48c7cSmrg  # objects, libraries and library flags.
392117a48c7cSmrg
392217a48c7cSmrg  # Sentinel used to keep track of whether or not we are before
392317a48c7cSmrg  # the conftest object file.
392417a48c7cSmrg  pre_test_object_deps_done=no
392517a48c7cSmrg
392617a48c7cSmrg  # The `*' in the case matches for architectures that use `case' in
392717a48c7cSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
392817a48c7cSmrg  # eval without this substitution.
392917a48c7cSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
393017a48c7cSmrg
393117a48c7cSmrg  for p in `eval $output_verbose_link_cmd`; do
393217a48c7cSmrg    case $p in
393317a48c7cSmrg
393417a48c7cSmrg    -L* | -R* | -l*)
393517a48c7cSmrg       # Some compilers place space between "-{L,R}" and the path.
393617a48c7cSmrg       # Remove the space.
393717a48c7cSmrg       if test $p = "-L" \
393817a48c7cSmrg	  || test $p = "-R"; then
393917a48c7cSmrg	 prev=$p
394017a48c7cSmrg	 continue
394117a48c7cSmrg       else
394217a48c7cSmrg	 prev=
394317a48c7cSmrg       fi
394417a48c7cSmrg
394517a48c7cSmrg       if test "$pre_test_object_deps_done" = no; then
394617a48c7cSmrg	 case $p in
394717a48c7cSmrg	 -L* | -R*)
394817a48c7cSmrg	   # Internal compiler library paths should come after those
394917a48c7cSmrg	   # provided the user.  The postdeps already come after the
395017a48c7cSmrg	   # user supplied libs so there is no need to process them.
395117a48c7cSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
395217a48c7cSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
395317a48c7cSmrg	   else
395417a48c7cSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
395517a48c7cSmrg	   fi
395617a48c7cSmrg	   ;;
395717a48c7cSmrg	 # The "-l" case would never come before the object being
395817a48c7cSmrg	 # linked, so don't bother handling this case.
395917a48c7cSmrg	 esac
396017a48c7cSmrg       else
396117a48c7cSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
396217a48c7cSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
396317a48c7cSmrg	 else
396417a48c7cSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
396517a48c7cSmrg	 fi
396617a48c7cSmrg       fi
396717a48c7cSmrg       ;;
396817a48c7cSmrg
396917a48c7cSmrg    *.$objext)
397017a48c7cSmrg       # This assumes that the test object file only shows up
397117a48c7cSmrg       # once in the compiler output.
397217a48c7cSmrg       if test "$p" = "conftest.$objext"; then
397317a48c7cSmrg	 pre_test_object_deps_done=yes
397417a48c7cSmrg	 continue
397517a48c7cSmrg       fi
397617a48c7cSmrg
397717a48c7cSmrg       if test "$pre_test_object_deps_done" = no; then
397817a48c7cSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
397917a48c7cSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
398017a48c7cSmrg	 else
398117a48c7cSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
398217a48c7cSmrg	 fi
398317a48c7cSmrg       else
398417a48c7cSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
398517a48c7cSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
398617a48c7cSmrg	 else
398717a48c7cSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
398817a48c7cSmrg	 fi
398917a48c7cSmrg       fi
399017a48c7cSmrg       ;;
399117a48c7cSmrg
399217a48c7cSmrg    *) ;; # Ignore the rest.
399317a48c7cSmrg
399417a48c7cSmrg    esac
399517a48c7cSmrg  done
399617a48c7cSmrg
399717a48c7cSmrg  # Clean up.
399817a48c7cSmrg  rm -f a.out a.exe
399917a48c7cSmrgelse
400017a48c7cSmrg  echo "libtool.m4: error: problem compiling $1 test program"
400117a48c7cSmrgfi
400217a48c7cSmrg
400317a48c7cSmrg$rm -f confest.$objext
400417a48c7cSmrg
40058e0ed500Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
40068e0ed500Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
40078e0ed500Smrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
40088e0ed500Smrgfi
40098e0ed500Smrg
401017a48c7cSmrg# PORTME: override above test on systems where it is broken
401117a48c7cSmrgifelse([$1],[CXX],
401217a48c7cSmrg[case $host_os in
40138e0ed500Smrginterix[[3-9]]*)
401417a48c7cSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
401517a48c7cSmrg  # hack all around it, let's just trust "g++" to DTRT.
401617a48c7cSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
401717a48c7cSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
401817a48c7cSmrg  _LT_AC_TAGVAR(postdeps,$1)=
401917a48c7cSmrg  ;;
402017a48c7cSmrg
40218e0ed500Smrglinux*)
40228e0ed500Smrg  case `$CC -V 2>&1 | sed 5q` in
40238e0ed500Smrg  *Sun\ C*)
40248e0ed500Smrg    # Sun C++ 5.9
40258e0ed500Smrg    #
40268e0ed500Smrg    # The more standards-conforming stlport4 library is
40278e0ed500Smrg    # incompatible with the Cstd library. Avoid specifying
40288e0ed500Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
40298e0ed500Smrg    # -library=stlport4 depends on it.
40308e0ed500Smrg    case " $CXX $CXXFLAGS " in
40318e0ed500Smrg    *" -library=stlport4 "*)
40328e0ed500Smrg      solaris_use_stlport4=yes
40338e0ed500Smrg      ;;
40348e0ed500Smrg    esac
40358e0ed500Smrg    if test "$solaris_use_stlport4" != yes; then
40368e0ed500Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
40378e0ed500Smrg    fi
40388e0ed500Smrg    ;;
40398e0ed500Smrg  esac
40408e0ed500Smrg  ;;
40418e0ed500Smrg
404217a48c7cSmrgsolaris*)
404317a48c7cSmrg  case $cc_basename in
404417a48c7cSmrg  CC*)
40458e0ed500Smrg    # The more standards-conforming stlport4 library is
40468e0ed500Smrg    # incompatible with the Cstd library. Avoid specifying
40478e0ed500Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
40488e0ed500Smrg    # -library=stlport4 depends on it.
40498e0ed500Smrg    case " $CXX $CXXFLAGS " in
40508e0ed500Smrg    *" -library=stlport4 "*)
40518e0ed500Smrg      solaris_use_stlport4=yes
40528e0ed500Smrg      ;;
40538e0ed500Smrg    esac
40548e0ed500Smrg
405517a48c7cSmrg    # Adding this requires a known-good setup of shared libraries for
405617a48c7cSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
405717a48c7cSmrg    # archive will be linked into the output, leading to subtle bugs.
40588e0ed500Smrg    if test "$solaris_use_stlport4" != yes; then
40598e0ed500Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
40608e0ed500Smrg    fi
406117a48c7cSmrg    ;;
406217a48c7cSmrg  esac
406317a48c7cSmrg  ;;
406417a48c7cSmrgesac
406517a48c7cSmrg])
406617a48c7cSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
406717a48c7cSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
406817a48c7cSmrgesac
406917a48c7cSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
407017a48c7cSmrg
407117a48c7cSmrg# AC_LIBTOOL_LANG_F77_CONFIG
407217a48c7cSmrg# --------------------------
407317a48c7cSmrg# Ensure that the configuration vars for the C compiler are
407417a48c7cSmrg# suitably defined.  Those variables are subsequently used by
407517a48c7cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
407617a48c7cSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
407717a48c7cSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
407817a48c7cSmrg[AC_REQUIRE([AC_PROG_F77])
407917a48c7cSmrgAC_LANG_PUSH(Fortran 77)
408017a48c7cSmrg
408117a48c7cSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
408217a48c7cSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
408317a48c7cSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
408417a48c7cSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
408517a48c7cSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
408617a48c7cSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
408717a48c7cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
408817a48c7cSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
408917a48c7cSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
409017a48c7cSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
409117a48c7cSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
409217a48c7cSmrg_LT_AC_TAGVAR(module_cmds, $1)=
409317a48c7cSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
409417a48c7cSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
409517a48c7cSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
409617a48c7cSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
409717a48c7cSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
409817a48c7cSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
409917a48c7cSmrg
410017a48c7cSmrg# Source file extension for f77 test sources.
410117a48c7cSmrgac_ext=f
410217a48c7cSmrg
410317a48c7cSmrg# Object file extension for compiled f77 test sources.
410417a48c7cSmrgobjext=o
410517a48c7cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
410617a48c7cSmrg
410717a48c7cSmrg# Code to be used in simple compile tests
41088e0ed500Smrglt_simple_compile_test_code="\
41098e0ed500Smrg      subroutine t
41108e0ed500Smrg      return
41118e0ed500Smrg      end
41128e0ed500Smrg"
411317a48c7cSmrg
411417a48c7cSmrg# Code to be used in simple link tests
41158e0ed500Smrglt_simple_link_test_code="\
41168e0ed500Smrg      program t
41178e0ed500Smrg      end
41188e0ed500Smrg"
411917a48c7cSmrg
412017a48c7cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
412117a48c7cSmrg_LT_AC_SYS_COMPILER
412217a48c7cSmrg
412317a48c7cSmrg# save warnings/boilerplate of simple test code
412417a48c7cSmrg_LT_COMPILER_BOILERPLATE
412517a48c7cSmrg_LT_LINKER_BOILERPLATE
412617a48c7cSmrg
412717a48c7cSmrg# Allow CC to be a program name with arguments.
412817a48c7cSmrglt_save_CC="$CC"
412917a48c7cSmrgCC=${F77-"f77"}
413017a48c7cSmrgcompiler=$CC
413117a48c7cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
413217a48c7cSmrg_LT_CC_BASENAME([$compiler])
413317a48c7cSmrg
413417a48c7cSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
413517a48c7cSmrgAC_MSG_RESULT([$can_build_shared])
413617a48c7cSmrg
413717a48c7cSmrgAC_MSG_CHECKING([whether to build shared libraries])
413817a48c7cSmrgtest "$can_build_shared" = "no" && enable_shared=no
413917a48c7cSmrg
414017a48c7cSmrg# On AIX, shared libraries and static libraries use the same namespace, and
414117a48c7cSmrg# are all built from PIC.
414217a48c7cSmrgcase $host_os in
414317a48c7cSmrgaix3*)
414417a48c7cSmrg  test "$enable_shared" = yes && enable_static=no
414517a48c7cSmrg  if test -n "$RANLIB"; then
414617a48c7cSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
414717a48c7cSmrg    postinstall_cmds='$RANLIB $lib'
414817a48c7cSmrg  fi
414917a48c7cSmrg  ;;
41508e0ed500Smrgaix[[4-9]]*)
415117a48c7cSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
415217a48c7cSmrg    test "$enable_shared" = yes && enable_static=no
415317a48c7cSmrg  fi
415417a48c7cSmrg  ;;
415517a48c7cSmrgesac
415617a48c7cSmrgAC_MSG_RESULT([$enable_shared])
415717a48c7cSmrg
415817a48c7cSmrgAC_MSG_CHECKING([whether to build static libraries])
415917a48c7cSmrg# Make sure either enable_shared or enable_static is yes.
416017a48c7cSmrgtest "$enable_shared" = yes || enable_static=yes
416117a48c7cSmrgAC_MSG_RESULT([$enable_static])
416217a48c7cSmrg
416317a48c7cSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
416417a48c7cSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
416517a48c7cSmrg
416617a48c7cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
416717a48c7cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
416817a48c7cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
416917a48c7cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
417017a48c7cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
417117a48c7cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
417217a48c7cSmrg
417317a48c7cSmrgAC_LIBTOOL_CONFIG($1)
417417a48c7cSmrg
417517a48c7cSmrgAC_LANG_POP
417617a48c7cSmrgCC="$lt_save_CC"
417717a48c7cSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
417817a48c7cSmrg
417917a48c7cSmrg
418017a48c7cSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
418117a48c7cSmrg# --------------------------
418217a48c7cSmrg# Ensure that the configuration vars for the C compiler are
418317a48c7cSmrg# suitably defined.  Those variables are subsequently used by
418417a48c7cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
418517a48c7cSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
418617a48c7cSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
418717a48c7cSmrg[AC_LANG_SAVE
418817a48c7cSmrg
418917a48c7cSmrg# Source file extension for Java test sources.
419017a48c7cSmrgac_ext=java
419117a48c7cSmrg
419217a48c7cSmrg# Object file extension for compiled Java test sources.
419317a48c7cSmrgobjext=o
419417a48c7cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
419517a48c7cSmrg
419617a48c7cSmrg# Code to be used in simple compile tests
41978e0ed500Smrglt_simple_compile_test_code="class foo {}"
419817a48c7cSmrg
419917a48c7cSmrg# Code to be used in simple link tests
42008e0ed500Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
420117a48c7cSmrg
420217a48c7cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
420317a48c7cSmrg_LT_AC_SYS_COMPILER
420417a48c7cSmrg
420517a48c7cSmrg# save warnings/boilerplate of simple test code
420617a48c7cSmrg_LT_COMPILER_BOILERPLATE
420717a48c7cSmrg_LT_LINKER_BOILERPLATE
420817a48c7cSmrg
420917a48c7cSmrg# Allow CC to be a program name with arguments.
421017a48c7cSmrglt_save_CC="$CC"
421117a48c7cSmrgCC=${GCJ-"gcj"}
421217a48c7cSmrgcompiler=$CC
421317a48c7cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
421417a48c7cSmrg_LT_CC_BASENAME([$compiler])
421517a48c7cSmrg
421617a48c7cSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
421717a48c7cSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
421817a48c7cSmrg
421917a48c7cSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
422017a48c7cSmrg
422117a48c7cSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
422217a48c7cSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
422317a48c7cSmrgAC_LIBTOOL_PROG_CC_C_O($1)
422417a48c7cSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
422517a48c7cSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
422617a48c7cSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
422717a48c7cSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
422817a48c7cSmrg
422917a48c7cSmrgAC_LIBTOOL_CONFIG($1)
423017a48c7cSmrg
423117a48c7cSmrgAC_LANG_RESTORE
423217a48c7cSmrgCC="$lt_save_CC"
423317a48c7cSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
423417a48c7cSmrg
423517a48c7cSmrg
423617a48c7cSmrg# AC_LIBTOOL_LANG_RC_CONFIG
423717a48c7cSmrg# -------------------------
423817a48c7cSmrg# Ensure that the configuration vars for the Windows resource compiler are
423917a48c7cSmrg# suitably defined.  Those variables are subsequently used by
424017a48c7cSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
424117a48c7cSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
424217a48c7cSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
424317a48c7cSmrg[AC_LANG_SAVE
424417a48c7cSmrg
424517a48c7cSmrg# Source file extension for RC test sources.
424617a48c7cSmrgac_ext=rc
424717a48c7cSmrg
424817a48c7cSmrg# Object file extension for compiled RC test sources.
424917a48c7cSmrgobjext=o
425017a48c7cSmrg_LT_AC_TAGVAR(objext, $1)=$objext
425117a48c7cSmrg
425217a48c7cSmrg# Code to be used in simple compile tests
42538e0ed500Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
425417a48c7cSmrg
425517a48c7cSmrg# Code to be used in simple link tests
425617a48c7cSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
425717a48c7cSmrg
425817a48c7cSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
425917a48c7cSmrg_LT_AC_SYS_COMPILER
426017a48c7cSmrg
426117a48c7cSmrg# save warnings/boilerplate of simple test code
426217a48c7cSmrg_LT_COMPILER_BOILERPLATE
426317a48c7cSmrg_LT_LINKER_BOILERPLATE
426417a48c7cSmrg
426517a48c7cSmrg# Allow CC to be a program name with arguments.
426617a48c7cSmrglt_save_CC="$CC"
426717a48c7cSmrgCC=${RC-"windres"}
426817a48c7cSmrgcompiler=$CC
426917a48c7cSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
427017a48c7cSmrg_LT_CC_BASENAME([$compiler])
427117a48c7cSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
427217a48c7cSmrg
427317a48c7cSmrgAC_LIBTOOL_CONFIG($1)
427417a48c7cSmrg
427517a48c7cSmrgAC_LANG_RESTORE
427617a48c7cSmrgCC="$lt_save_CC"
427717a48c7cSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
427817a48c7cSmrg
427917a48c7cSmrg
428017a48c7cSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
428117a48c7cSmrg# ----------------------------
428217a48c7cSmrg# If TAGNAME is not passed, then create an initial libtool script
428317a48c7cSmrg# with a default configuration from the untagged config vars.  Otherwise
428417a48c7cSmrg# add code to config.status for appending the configuration named by
428517a48c7cSmrg# TAGNAME from the matching tagged config vars.
428617a48c7cSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
428717a48c7cSmrg[# The else clause should only fire when bootstrapping the
428817a48c7cSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
428917a48c7cSmrg# with your package, and you will get complaints that there are
429017a48c7cSmrg# no rules to generate ltmain.sh.
429117a48c7cSmrgif test -f "$ltmain"; then
429217a48c7cSmrg  # See if we are running on zsh, and set the options which allow our commands through
429317a48c7cSmrg  # without removal of \ escapes.
429417a48c7cSmrg  if test -n "${ZSH_VERSION+set}" ; then
429517a48c7cSmrg    setopt NO_GLOB_SUBST
429617a48c7cSmrg  fi
429717a48c7cSmrg  # Now quote all the things that may contain metacharacters while being
429817a48c7cSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
429917a48c7cSmrg  # variables and quote the copies for generation of the libtool script.
430017a48c7cSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
430117a48c7cSmrg    SED SHELL STRIP \
430217a48c7cSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
430317a48c7cSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
430417a48c7cSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
430517a48c7cSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
430617a48c7cSmrg    lt_cv_sys_global_symbol_to_c_name_address \
430717a48c7cSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
430817a48c7cSmrg    old_postinstall_cmds old_postuninstall_cmds \
430917a48c7cSmrg    _LT_AC_TAGVAR(compiler, $1) \
431017a48c7cSmrg    _LT_AC_TAGVAR(CC, $1) \
431117a48c7cSmrg    _LT_AC_TAGVAR(LD, $1) \
431217a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
431317a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
431417a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
431517a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
431617a48c7cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
431717a48c7cSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
431817a48c7cSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
431917a48c7cSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
432017a48c7cSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
432117a48c7cSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
432217a48c7cSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
432317a48c7cSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
432417a48c7cSmrg    _LT_AC_TAGVAR(predeps, $1) \
432517a48c7cSmrg    _LT_AC_TAGVAR(postdeps, $1) \
432617a48c7cSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
43278e0ed500Smrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
432817a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
432917a48c7cSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
433017a48c7cSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
433117a48c7cSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
433217a48c7cSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
433317a48c7cSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
433417a48c7cSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
433517a48c7cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
433617a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
433717a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
433817a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
433917a48c7cSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
434017a48c7cSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
434117a48c7cSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
434217a48c7cSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
43438e0ed500Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
434417a48c7cSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
434517a48c7cSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
434617a48c7cSmrg
434717a48c7cSmrg    case $var in
434817a48c7cSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
434917a48c7cSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
435017a48c7cSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
435117a48c7cSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
435217a48c7cSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
435317a48c7cSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
435417a48c7cSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
435517a48c7cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
435617a48c7cSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
435717a48c7cSmrg    postinstall_cmds | postuninstall_cmds | \
435817a48c7cSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
435917a48c7cSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
436017a48c7cSmrg      # Double-quote double-evaled strings.
436117a48c7cSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
436217a48c7cSmrg      ;;
436317a48c7cSmrg    *)
436417a48c7cSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
436517a48c7cSmrg      ;;
436617a48c7cSmrg    esac
436717a48c7cSmrg  done
436817a48c7cSmrg
436917a48c7cSmrg  case $lt_echo in
437017a48c7cSmrg  *'\[$]0 --fallback-echo"')
437117a48c7cSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
437217a48c7cSmrg    ;;
437317a48c7cSmrg  esac
437417a48c7cSmrg
437517a48c7cSmrgifelse([$1], [],
437617a48c7cSmrg  [cfgfile="${ofile}T"
437717a48c7cSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
437817a48c7cSmrg  $rm -f "$cfgfile"
437917a48c7cSmrg  AC_MSG_NOTICE([creating $ofile])],
438017a48c7cSmrg  [cfgfile="$ofile"])
438117a48c7cSmrg
438217a48c7cSmrg  cat <<__EOF__ >> "$cfgfile"
438317a48c7cSmrgifelse([$1], [],
438417a48c7cSmrg[#! $SHELL
438517a48c7cSmrg
438617a48c7cSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
438717a48c7cSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
438817a48c7cSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
438917a48c7cSmrg#
43908e0ed500Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
439117a48c7cSmrg# Free Software Foundation, Inc.
439217a48c7cSmrg#
439317a48c7cSmrg# This file is part of GNU Libtool:
439417a48c7cSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
439517a48c7cSmrg#
439617a48c7cSmrg# This program is free software; you can redistribute it and/or modify
439717a48c7cSmrg# it under the terms of the GNU General Public License as published by
439817a48c7cSmrg# the Free Software Foundation; either version 2 of the License, or
439917a48c7cSmrg# (at your option) any later version.
440017a48c7cSmrg#
440117a48c7cSmrg# This program is distributed in the hope that it will be useful, but
440217a48c7cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
440317a48c7cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
440417a48c7cSmrg# General Public License for more details.
440517a48c7cSmrg#
440617a48c7cSmrg# You should have received a copy of the GNU General Public License
440717a48c7cSmrg# along with this program; if not, write to the Free Software
440817a48c7cSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
440917a48c7cSmrg#
441017a48c7cSmrg# As a special exception to the GNU General Public License, if you
441117a48c7cSmrg# distribute this file as part of a program that contains a
441217a48c7cSmrg# configuration script generated by Autoconf, you may include it under
441317a48c7cSmrg# the same distribution terms that you use for the rest of that program.
441417a48c7cSmrg
441517a48c7cSmrg# A sed program that does not truncate output.
441617a48c7cSmrgSED=$lt_SED
441717a48c7cSmrg
441817a48c7cSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
441917a48c7cSmrgXsed="$SED -e 1s/^X//"
442017a48c7cSmrg
442117a48c7cSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
442217a48c7cSmrg# if CDPATH is set.
442317a48c7cSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
442417a48c7cSmrg
442517a48c7cSmrg# The names of the tagged configurations supported by this script.
442617a48c7cSmrgavailable_tags=
442717a48c7cSmrg
442817a48c7cSmrg# ### BEGIN LIBTOOL CONFIG],
442917a48c7cSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
443017a48c7cSmrg
443117a48c7cSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
443217a48c7cSmrg
443317a48c7cSmrg# Shell to use when invoking shell scripts.
443417a48c7cSmrgSHELL=$lt_SHELL
443517a48c7cSmrg
443617a48c7cSmrg# Whether or not to build shared libraries.
443717a48c7cSmrgbuild_libtool_libs=$enable_shared
443817a48c7cSmrg
443917a48c7cSmrg# Whether or not to build static libraries.
444017a48c7cSmrgbuild_old_libs=$enable_static
444117a48c7cSmrg
444217a48c7cSmrg# Whether or not to add -lc for building shared libraries.
444317a48c7cSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
444417a48c7cSmrg
444517a48c7cSmrg# Whether or not to disallow shared libs when runtime libs are static
444617a48c7cSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
444717a48c7cSmrg
444817a48c7cSmrg# Whether or not to optimize for fast installation.
444917a48c7cSmrgfast_install=$enable_fast_install
445017a48c7cSmrg
445117a48c7cSmrg# The host system.
445217a48c7cSmrghost_alias=$host_alias
445317a48c7cSmrghost=$host
445417a48c7cSmrghost_os=$host_os
445517a48c7cSmrg
445617a48c7cSmrg# The build system.
445717a48c7cSmrgbuild_alias=$build_alias
445817a48c7cSmrgbuild=$build
445917a48c7cSmrgbuild_os=$build_os
446017a48c7cSmrg
446117a48c7cSmrg# An echo program that does not interpret backslashes.
446217a48c7cSmrgecho=$lt_echo
446317a48c7cSmrg
446417a48c7cSmrg# The archiver.
446517a48c7cSmrgAR=$lt_AR
446617a48c7cSmrgAR_FLAGS=$lt_AR_FLAGS
446717a48c7cSmrg
446817a48c7cSmrg# A C compiler.
446917a48c7cSmrgLTCC=$lt_LTCC
447017a48c7cSmrg
447117a48c7cSmrg# LTCC compiler flags.
447217a48c7cSmrgLTCFLAGS=$lt_LTCFLAGS
447317a48c7cSmrg
447417a48c7cSmrg# A language-specific compiler.
447517a48c7cSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
447617a48c7cSmrg
447717a48c7cSmrg# Is the compiler the GNU C compiler?
447817a48c7cSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
447917a48c7cSmrg
448017a48c7cSmrg# An ERE matcher.
448117a48c7cSmrgEGREP=$lt_EGREP
448217a48c7cSmrg
448317a48c7cSmrg# The linker used to build libraries.
448417a48c7cSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
448517a48c7cSmrg
448617a48c7cSmrg# Whether we need hard or soft links.
448717a48c7cSmrgLN_S=$lt_LN_S
448817a48c7cSmrg
448917a48c7cSmrg# A BSD-compatible nm program.
449017a48c7cSmrgNM=$lt_NM
449117a48c7cSmrg
449217a48c7cSmrg# A symbol stripping program
449317a48c7cSmrgSTRIP=$lt_STRIP
449417a48c7cSmrg
449517a48c7cSmrg# Used to examine libraries when file_magic_cmd begins "file"
449617a48c7cSmrgMAGIC_CMD=$MAGIC_CMD
449717a48c7cSmrg
449817a48c7cSmrg# Used on cygwin: DLL creation program.
449917a48c7cSmrgDLLTOOL="$DLLTOOL"
450017a48c7cSmrg
450117a48c7cSmrg# Used on cygwin: object dumper.
450217a48c7cSmrgOBJDUMP="$OBJDUMP"
450317a48c7cSmrg
450417a48c7cSmrg# Used on cygwin: assembler.
450517a48c7cSmrgAS="$AS"
450617a48c7cSmrg
450717a48c7cSmrg# The name of the directory that contains temporary libtool files.
450817a48c7cSmrgobjdir=$objdir
450917a48c7cSmrg
451017a48c7cSmrg# How to create reloadable object files.
451117a48c7cSmrgreload_flag=$lt_reload_flag
451217a48c7cSmrgreload_cmds=$lt_reload_cmds
451317a48c7cSmrg
451417a48c7cSmrg# How to pass a linker flag through the compiler.
451517a48c7cSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
451617a48c7cSmrg
451717a48c7cSmrg# Object file suffix (normally "o").
451817a48c7cSmrgobjext="$ac_objext"
451917a48c7cSmrg
452017a48c7cSmrg# Old archive suffix (normally "a").
452117a48c7cSmrglibext="$libext"
452217a48c7cSmrg
452317a48c7cSmrg# Shared library suffix (normally ".so").
452417a48c7cSmrgshrext_cmds='$shrext_cmds'
452517a48c7cSmrg
452617a48c7cSmrg# Executable file suffix (normally "").
452717a48c7cSmrgexeext="$exeext"
452817a48c7cSmrg
452917a48c7cSmrg# Additional compiler flags for building library objects.
453017a48c7cSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
453117a48c7cSmrgpic_mode=$pic_mode
453217a48c7cSmrg
453317a48c7cSmrg# What is the maximum length of a command?
453417a48c7cSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
453517a48c7cSmrg
453617a48c7cSmrg# Does compiler simultaneously support -c and -o options?
453717a48c7cSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
453817a48c7cSmrg
453917a48c7cSmrg# Must we lock files when doing compilation?
454017a48c7cSmrgneed_locks=$lt_need_locks
454117a48c7cSmrg
454217a48c7cSmrg# Do we need the lib prefix for modules?
454317a48c7cSmrgneed_lib_prefix=$need_lib_prefix
454417a48c7cSmrg
454517a48c7cSmrg# Do we need a version for libraries?
454617a48c7cSmrgneed_version=$need_version
454717a48c7cSmrg
454817a48c7cSmrg# Whether dlopen is supported.
454917a48c7cSmrgdlopen_support=$enable_dlopen
455017a48c7cSmrg
455117a48c7cSmrg# Whether dlopen of programs is supported.
455217a48c7cSmrgdlopen_self=$enable_dlopen_self
455317a48c7cSmrg
455417a48c7cSmrg# Whether dlopen of statically linked programs is supported.
455517a48c7cSmrgdlopen_self_static=$enable_dlopen_self_static
455617a48c7cSmrg
455717a48c7cSmrg# Compiler flag to prevent dynamic linking.
455817a48c7cSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
455917a48c7cSmrg
456017a48c7cSmrg# Compiler flag to turn off builtin functions.
456117a48c7cSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
456217a48c7cSmrg
456317a48c7cSmrg# Compiler flag to allow reflexive dlopens.
456417a48c7cSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
456517a48c7cSmrg
456617a48c7cSmrg# Compiler flag to generate shared objects directly from archives.
456717a48c7cSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
456817a48c7cSmrg
456917a48c7cSmrg# Compiler flag to generate thread-safe objects.
457017a48c7cSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
457117a48c7cSmrg
457217a48c7cSmrg# Library versioning type.
457317a48c7cSmrgversion_type=$version_type
457417a48c7cSmrg
457517a48c7cSmrg# Format of library name prefix.
457617a48c7cSmrglibname_spec=$lt_libname_spec
457717a48c7cSmrg
457817a48c7cSmrg# List of archive names.  First name is the real one, the rest are links.
457917a48c7cSmrg# The last name is the one that the linker finds with -lNAME.
458017a48c7cSmrglibrary_names_spec=$lt_library_names_spec
458117a48c7cSmrg
458217a48c7cSmrg# The coded name of the library, if different from the real name.
458317a48c7cSmrgsoname_spec=$lt_soname_spec
458417a48c7cSmrg
458517a48c7cSmrg# Commands used to build and install an old-style archive.
458617a48c7cSmrgRANLIB=$lt_RANLIB
458717a48c7cSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
458817a48c7cSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
458917a48c7cSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
459017a48c7cSmrg
459117a48c7cSmrg# Create an old-style archive from a shared archive.
459217a48c7cSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
459317a48c7cSmrg
459417a48c7cSmrg# Create a temporary old-style archive to link instead of a shared archive.
459517a48c7cSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
459617a48c7cSmrg
459717a48c7cSmrg# Commands used to build and install a shared archive.
459817a48c7cSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
459917a48c7cSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
460017a48c7cSmrgpostinstall_cmds=$lt_postinstall_cmds
460117a48c7cSmrgpostuninstall_cmds=$lt_postuninstall_cmds
460217a48c7cSmrg
460317a48c7cSmrg# Commands used to build a loadable module (assumed same as above if empty)
460417a48c7cSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
460517a48c7cSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
460617a48c7cSmrg
460717a48c7cSmrg# Commands to strip libraries.
460817a48c7cSmrgold_striplib=$lt_old_striplib
460917a48c7cSmrgstriplib=$lt_striplib
461017a48c7cSmrg
461117a48c7cSmrg# Dependencies to place before the objects being linked to create a
461217a48c7cSmrg# shared library.
461317a48c7cSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
461417a48c7cSmrg
461517a48c7cSmrg# Dependencies to place after the objects being linked to create a
461617a48c7cSmrg# shared library.
461717a48c7cSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
461817a48c7cSmrg
461917a48c7cSmrg# Dependencies to place before the objects being linked to create a
462017a48c7cSmrg# shared library.
462117a48c7cSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
462217a48c7cSmrg
462317a48c7cSmrg# Dependencies to place after the objects being linked to create a
462417a48c7cSmrg# shared library.
462517a48c7cSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
462617a48c7cSmrg
46278e0ed500Smrg# The directories searched by this compiler when creating a shared
46288e0ed500Smrg# library
46298e0ed500Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
46308e0ed500Smrg
463117a48c7cSmrg# The library search path used internally by the compiler when linking
463217a48c7cSmrg# a shared library.
463317a48c7cSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
463417a48c7cSmrg
463517a48c7cSmrg# Method to check whether dependent libraries are shared objects.
463617a48c7cSmrgdeplibs_check_method=$lt_deplibs_check_method
463717a48c7cSmrg
463817a48c7cSmrg# Command to use when deplibs_check_method == file_magic.
463917a48c7cSmrgfile_magic_cmd=$lt_file_magic_cmd
464017a48c7cSmrg
464117a48c7cSmrg# Flag that allows shared libraries with undefined symbols to be built.
464217a48c7cSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
464317a48c7cSmrg
464417a48c7cSmrg# Flag that forces no undefined symbols.
464517a48c7cSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
464617a48c7cSmrg
464717a48c7cSmrg# Commands used to finish a libtool library installation in a directory.
464817a48c7cSmrgfinish_cmds=$lt_finish_cmds
464917a48c7cSmrg
465017a48c7cSmrg# Same as above, but a single script fragment to be evaled but not shown.
465117a48c7cSmrgfinish_eval=$lt_finish_eval
465217a48c7cSmrg
465317a48c7cSmrg# Take the output of nm and produce a listing of raw symbols and C names.
465417a48c7cSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
465517a48c7cSmrg
465617a48c7cSmrg# Transform the output of nm in a proper C declaration
465717a48c7cSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
465817a48c7cSmrg
465917a48c7cSmrg# Transform the output of nm in a C name address pair
466017a48c7cSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
466117a48c7cSmrg
466217a48c7cSmrg# This is the shared library runtime path variable.
466317a48c7cSmrgrunpath_var=$runpath_var
466417a48c7cSmrg
466517a48c7cSmrg# This is the shared library path variable.
466617a48c7cSmrgshlibpath_var=$shlibpath_var
466717a48c7cSmrg
466817a48c7cSmrg# Is shlibpath searched before the hard-coded library search path?
466917a48c7cSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
467017a48c7cSmrg
467117a48c7cSmrg# How to hardcode a shared library path into an executable.
467217a48c7cSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
467317a48c7cSmrg
467417a48c7cSmrg# Whether we should hardcode library paths into libraries.
467517a48c7cSmrghardcode_into_libs=$hardcode_into_libs
467617a48c7cSmrg
467717a48c7cSmrg# Flag to hardcode \$libdir into a binary during linking.
467817a48c7cSmrg# This must work even if \$libdir does not exist.
467917a48c7cSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
468017a48c7cSmrg
468117a48c7cSmrg# If ld is used when linking, flag to hardcode \$libdir into
468217a48c7cSmrg# a binary during linking. This must work even if \$libdir does
468317a48c7cSmrg# not exist.
468417a48c7cSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
468517a48c7cSmrg
468617a48c7cSmrg# Whether we need a single -rpath flag with a separated argument.
468717a48c7cSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
468817a48c7cSmrg
468917a48c7cSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
469017a48c7cSmrg# resulting binary.
469117a48c7cSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
469217a48c7cSmrg
469317a48c7cSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
469417a48c7cSmrg# resulting binary.
469517a48c7cSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
469617a48c7cSmrg
469717a48c7cSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
469817a48c7cSmrg# the resulting binary.
469917a48c7cSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
470017a48c7cSmrg
470117a48c7cSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
470217a48c7cSmrg# and all subsequent libraries and executables linked against it.
470317a48c7cSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
470417a48c7cSmrg
470517a48c7cSmrg# Variables whose values should be saved in libtool wrapper scripts and
470617a48c7cSmrg# restored at relink time.
470717a48c7cSmrgvariables_saved_for_relink="$variables_saved_for_relink"
470817a48c7cSmrg
470917a48c7cSmrg# Whether libtool must link a program against all its dependency libraries.
471017a48c7cSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
471117a48c7cSmrg
471217a48c7cSmrg# Compile-time system search path for libraries
471317a48c7cSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
471417a48c7cSmrg
471517a48c7cSmrg# Run-time system search path for libraries
471617a48c7cSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
471717a48c7cSmrg
471817a48c7cSmrg# Fix the shell variable \$srcfile for the compiler.
47198e0ed500Smrgfix_srcfile_path=$lt_fix_srcfile_path
472017a48c7cSmrg
472117a48c7cSmrg# Set to yes if exported symbols are required.
472217a48c7cSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
472317a48c7cSmrg
472417a48c7cSmrg# The commands to list exported symbols.
472517a48c7cSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
472617a48c7cSmrg
472717a48c7cSmrg# The commands to extract the exported symbol list from a shared archive.
472817a48c7cSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
472917a48c7cSmrg
473017a48c7cSmrg# Symbols that should not be listed in the preloaded symbols.
473117a48c7cSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
473217a48c7cSmrg
473317a48c7cSmrg# Symbols that must always be exported.
473417a48c7cSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
473517a48c7cSmrg
473617a48c7cSmrgifelse([$1],[],
473717a48c7cSmrg[# ### END LIBTOOL CONFIG],
473817a48c7cSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
473917a48c7cSmrg
474017a48c7cSmrg__EOF__
474117a48c7cSmrg
474217a48c7cSmrgifelse([$1],[], [
474317a48c7cSmrg  case $host_os in
474417a48c7cSmrg  aix3*)
474517a48c7cSmrg    cat <<\EOF >> "$cfgfile"
474617a48c7cSmrg
474717a48c7cSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
474817a48c7cSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
474917a48c7cSmrg# vanish in a puff of smoke.
475017a48c7cSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
475117a48c7cSmrg  COLLECT_NAMES=
475217a48c7cSmrg  export COLLECT_NAMES
475317a48c7cSmrgfi
475417a48c7cSmrgEOF
475517a48c7cSmrg    ;;
475617a48c7cSmrg  esac
475717a48c7cSmrg
475817a48c7cSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
475917a48c7cSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
476017a48c7cSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
476117a48c7cSmrg  # is reportedly fixed, but why not run on old versions too?
476217a48c7cSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
476317a48c7cSmrg
476417a48c7cSmrg  mv -f "$cfgfile" "$ofile" || \
476517a48c7cSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
476617a48c7cSmrg  chmod +x "$ofile"
476717a48c7cSmrg])
476817a48c7cSmrgelse
476917a48c7cSmrg  # If there is no Makefile yet, we rely on a make rule to execute
477017a48c7cSmrg  # `config.status --recheck' to rerun these tests and create the
477117a48c7cSmrg  # libtool script then.
477217a48c7cSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
477317a48c7cSmrg  if test -f "$ltmain_in"; then
477417a48c7cSmrg    test -f Makefile && make "$ltmain"
477517a48c7cSmrg  fi
477617a48c7cSmrgfi
477717a48c7cSmrg])# AC_LIBTOOL_CONFIG
477817a48c7cSmrg
477917a48c7cSmrg
478017a48c7cSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
478117a48c7cSmrg# -------------------------------------------
478217a48c7cSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
478317a48c7cSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
478417a48c7cSmrg
478517a48c7cSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
478617a48c7cSmrg
478717a48c7cSmrgif test "$GCC" = yes; then
478817a48c7cSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
478917a48c7cSmrg
479017a48c7cSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
479117a48c7cSmrg    lt_cv_prog_compiler_rtti_exceptions,
479217a48c7cSmrg    [-fno-rtti -fno-exceptions], [],
479317a48c7cSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
479417a48c7cSmrgfi
479517a48c7cSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
479617a48c7cSmrg
479717a48c7cSmrg
479817a48c7cSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
479917a48c7cSmrg# ---------------------------------
480017a48c7cSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
480117a48c7cSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
48028e0ed500SmrgAC_REQUIRE([LT_AC_PROG_SED])
480317a48c7cSmrgAC_REQUIRE([AC_PROG_NM])
480417a48c7cSmrgAC_REQUIRE([AC_OBJEXT])
480517a48c7cSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
480617a48c7cSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
480717a48c7cSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
480817a48c7cSmrg[
480917a48c7cSmrg# These are sane defaults that work on at least a few old systems.
481017a48c7cSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
481117a48c7cSmrg
481217a48c7cSmrg# Character class describing NM global symbol codes.
481317a48c7cSmrgsymcode='[[BCDEGRST]]'
481417a48c7cSmrg
481517a48c7cSmrg# Regexp to match symbols that can be accessed directly from C.
481617a48c7cSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
481717a48c7cSmrg
481817a48c7cSmrg# Transform an extracted symbol line into a proper C declaration
481917a48c7cSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
482017a48c7cSmrg
482117a48c7cSmrg# Transform an extracted symbol line into symbol name and symbol address
482217a48c7cSmrglt_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'"
482317a48c7cSmrg
482417a48c7cSmrg# Define system-specific variables.
482517a48c7cSmrgcase $host_os in
482617a48c7cSmrgaix*)
482717a48c7cSmrg  symcode='[[BCDT]]'
482817a48c7cSmrg  ;;
482917a48c7cSmrgcygwin* | mingw* | pw32*)
483017a48c7cSmrg  symcode='[[ABCDGISTW]]'
483117a48c7cSmrg  ;;
483217a48c7cSmrghpux*) # Its linker distinguishes data from code symbols
483317a48c7cSmrg  if test "$host_cpu" = ia64; then
483417a48c7cSmrg    symcode='[[ABCDEGRST]]'
483517a48c7cSmrg  fi
483617a48c7cSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
483717a48c7cSmrg  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'"
483817a48c7cSmrg  ;;
48398e0ed500Smrglinux* | k*bsd*-gnu)
484017a48c7cSmrg  if test "$host_cpu" = ia64; then
484117a48c7cSmrg    symcode='[[ABCDGIRSTW]]'
484217a48c7cSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
484317a48c7cSmrg    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'"
484417a48c7cSmrg  fi
484517a48c7cSmrg  ;;
484617a48c7cSmrgirix* | nonstopux*)
484717a48c7cSmrg  symcode='[[BCDEGRST]]'
484817a48c7cSmrg  ;;
484917a48c7cSmrgosf*)
485017a48c7cSmrg  symcode='[[BCDEGQRST]]'
485117a48c7cSmrg  ;;
485217a48c7cSmrgsolaris*)
485317a48c7cSmrg  symcode='[[BDRT]]'
485417a48c7cSmrg  ;;
485517a48c7cSmrgsco3.2v5*)
485617a48c7cSmrg  symcode='[[DT]]'
485717a48c7cSmrg  ;;
485817a48c7cSmrgsysv4.2uw2*)
485917a48c7cSmrg  symcode='[[DT]]'
486017a48c7cSmrg  ;;
486117a48c7cSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
486217a48c7cSmrg  symcode='[[ABDT]]'
486317a48c7cSmrg  ;;
486417a48c7cSmrgsysv4)
486517a48c7cSmrg  symcode='[[DFNSTU]]'
486617a48c7cSmrg  ;;
486717a48c7cSmrgesac
486817a48c7cSmrg
486917a48c7cSmrg# Handle CRLF in mingw tool chain
487017a48c7cSmrgopt_cr=
487117a48c7cSmrgcase $build_os in
487217a48c7cSmrgmingw*)
487317a48c7cSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
487417a48c7cSmrg  ;;
487517a48c7cSmrgesac
487617a48c7cSmrg
487717a48c7cSmrg# If we're using GNU nm, then use its standard symbol codes.
487817a48c7cSmrgcase `$NM -V 2>&1` in
487917a48c7cSmrg*GNU* | *'with BFD'*)
488017a48c7cSmrg  symcode='[[ABCDGIRSTW]]' ;;
488117a48c7cSmrgesac
488217a48c7cSmrg
488317a48c7cSmrg# Try without a prefix undercore, then with it.
488417a48c7cSmrgfor ac_symprfx in "" "_"; do
488517a48c7cSmrg
488617a48c7cSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
488717a48c7cSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
488817a48c7cSmrg
488917a48c7cSmrg  # Write the raw and C identifiers.
489017a48c7cSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
489117a48c7cSmrg
489217a48c7cSmrg  # Check to see that the pipe works correctly.
489317a48c7cSmrg  pipe_works=no
489417a48c7cSmrg
489517a48c7cSmrg  rm -f conftest*
489617a48c7cSmrg  cat > conftest.$ac_ext <<EOF
489717a48c7cSmrg#ifdef __cplusplus
489817a48c7cSmrgextern "C" {
489917a48c7cSmrg#endif
490017a48c7cSmrgchar nm_test_var;
490117a48c7cSmrgvoid nm_test_func(){}
490217a48c7cSmrg#ifdef __cplusplus
490317a48c7cSmrg}
490417a48c7cSmrg#endif
490517a48c7cSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
490617a48c7cSmrgEOF
490717a48c7cSmrg
490817a48c7cSmrg  if AC_TRY_EVAL(ac_compile); then
490917a48c7cSmrg    # Now try to grab the symbols.
491017a48c7cSmrg    nlist=conftest.nm
491117a48c7cSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
491217a48c7cSmrg      # Try sorting and uniquifying the output.
491317a48c7cSmrg      if sort "$nlist" | uniq > "$nlist"T; then
491417a48c7cSmrg	mv -f "$nlist"T "$nlist"
491517a48c7cSmrg      else
491617a48c7cSmrg	rm -f "$nlist"T
491717a48c7cSmrg      fi
491817a48c7cSmrg
491917a48c7cSmrg      # Make sure that we snagged all the symbols we need.
492017a48c7cSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
492117a48c7cSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
492217a48c7cSmrg	  cat <<EOF > conftest.$ac_ext
492317a48c7cSmrg#ifdef __cplusplus
492417a48c7cSmrgextern "C" {
492517a48c7cSmrg#endif
492617a48c7cSmrg
492717a48c7cSmrgEOF
492817a48c7cSmrg	  # Now generate the symbol file.
492917a48c7cSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
493017a48c7cSmrg
493117a48c7cSmrg	  cat <<EOF >> conftest.$ac_ext
493217a48c7cSmrg#if defined (__STDC__) && __STDC__
493317a48c7cSmrg# define lt_ptr_t void *
493417a48c7cSmrg#else
493517a48c7cSmrg# define lt_ptr_t char *
493617a48c7cSmrg# define const
493717a48c7cSmrg#endif
493817a48c7cSmrg
493917a48c7cSmrg/* The mapping between symbol names and symbols. */
494017a48c7cSmrgconst struct {
494117a48c7cSmrg  const char *name;
494217a48c7cSmrg  lt_ptr_t address;
494317a48c7cSmrg}
494417a48c7cSmrglt_preloaded_symbols[[]] =
494517a48c7cSmrg{
494617a48c7cSmrgEOF
494717a48c7cSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
494817a48c7cSmrg	  cat <<\EOF >> conftest.$ac_ext
494917a48c7cSmrg  {0, (lt_ptr_t) 0}
495017a48c7cSmrg};
495117a48c7cSmrg
495217a48c7cSmrg#ifdef __cplusplus
495317a48c7cSmrg}
495417a48c7cSmrg#endif
495517a48c7cSmrgEOF
495617a48c7cSmrg	  # Now try linking the two files.
495717a48c7cSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
495817a48c7cSmrg	  lt_save_LIBS="$LIBS"
495917a48c7cSmrg	  lt_save_CFLAGS="$CFLAGS"
496017a48c7cSmrg	  LIBS="conftstm.$ac_objext"
496117a48c7cSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
496217a48c7cSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
496317a48c7cSmrg	    pipe_works=yes
496417a48c7cSmrg	  fi
496517a48c7cSmrg	  LIBS="$lt_save_LIBS"
496617a48c7cSmrg	  CFLAGS="$lt_save_CFLAGS"
496717a48c7cSmrg	else
496817a48c7cSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
496917a48c7cSmrg	fi
497017a48c7cSmrg      else
497117a48c7cSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
497217a48c7cSmrg      fi
497317a48c7cSmrg    else
497417a48c7cSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
497517a48c7cSmrg    fi
497617a48c7cSmrg  else
497717a48c7cSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
497817a48c7cSmrg    cat conftest.$ac_ext >&5
497917a48c7cSmrg  fi
49808e0ed500Smrg  rm -rf conftest* conftst*
498117a48c7cSmrg
498217a48c7cSmrg  # Do not use the global_symbol_pipe unless it works.
498317a48c7cSmrg  if test "$pipe_works" = yes; then
498417a48c7cSmrg    break
498517a48c7cSmrg  else
498617a48c7cSmrg    lt_cv_sys_global_symbol_pipe=
498717a48c7cSmrg  fi
498817a48c7cSmrgdone
498917a48c7cSmrg])
499017a48c7cSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
499117a48c7cSmrg  lt_cv_sys_global_symbol_to_cdecl=
499217a48c7cSmrgfi
499317a48c7cSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
499417a48c7cSmrg  AC_MSG_RESULT(failed)
499517a48c7cSmrgelse
499617a48c7cSmrg  AC_MSG_RESULT(ok)
499717a48c7cSmrgfi
499817a48c7cSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
499917a48c7cSmrg
500017a48c7cSmrg
500117a48c7cSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
500217a48c7cSmrg# ---------------------------------------
500317a48c7cSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
500417a48c7cSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
500517a48c7cSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
500617a48c7cSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
500717a48c7cSmrg
500817a48c7cSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
500917a48c7cSmrg ifelse([$1],[CXX],[
501017a48c7cSmrg  # C++ specific cases for pic, static, wl, etc.
501117a48c7cSmrg  if test "$GXX" = yes; then
501217a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
501317a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
501417a48c7cSmrg
501517a48c7cSmrg    case $host_os in
501617a48c7cSmrg    aix*)
501717a48c7cSmrg      # All AIX code is PIC.
501817a48c7cSmrg      if test "$host_cpu" = ia64; then
501917a48c7cSmrg	# AIX 5 now supports IA64 processor
502017a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
502117a48c7cSmrg      fi
502217a48c7cSmrg      ;;
502317a48c7cSmrg    amigaos*)
502417a48c7cSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
502517a48c7cSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
502617a48c7cSmrg      # like `-m68040'.
502717a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
502817a48c7cSmrg      ;;
50298e0ed500Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
503017a48c7cSmrg      # PIC is the default for these OSes.
503117a48c7cSmrg      ;;
50328e0ed500Smrg    mingw* | cygwin* | os2* | pw32*)
503317a48c7cSmrg      # This hack is so that the source file can tell whether it is being
503417a48c7cSmrg      # built for inclusion in a dll (and should export symbols for example).
50358e0ed500Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
50368e0ed500Smrg      # (--disable-auto-import) libraries
50378e0ed500Smrg      m4_if([$1], [GCJ], [],
50388e0ed500Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
503917a48c7cSmrg      ;;
504017a48c7cSmrg    darwin* | rhapsody*)
504117a48c7cSmrg      # PIC is the default on this platform
504217a48c7cSmrg      # Common symbols not allowed in MH_DYLIB files
504317a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
504417a48c7cSmrg      ;;
504517a48c7cSmrg    *djgpp*)
504617a48c7cSmrg      # DJGPP does not support shared libraries at all
504717a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
504817a48c7cSmrg      ;;
50498e0ed500Smrg    interix[[3-9]]*)
505017a48c7cSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
505117a48c7cSmrg      # Instead, we relocate shared libraries at runtime.
505217a48c7cSmrg      ;;
505317a48c7cSmrg    sysv4*MP*)
505417a48c7cSmrg      if test -d /usr/nec; then
505517a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
505617a48c7cSmrg      fi
505717a48c7cSmrg      ;;
505817a48c7cSmrg    hpux*)
505917a48c7cSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
506017a48c7cSmrg      # not for PA HP-UX.
506117a48c7cSmrg      case $host_cpu in
506217a48c7cSmrg      hppa*64*|ia64*)
506317a48c7cSmrg	;;
506417a48c7cSmrg      *)
506517a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
506617a48c7cSmrg	;;
506717a48c7cSmrg      esac
506817a48c7cSmrg      ;;
506917a48c7cSmrg    *)
507017a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
507117a48c7cSmrg      ;;
507217a48c7cSmrg    esac
507317a48c7cSmrg  else
507417a48c7cSmrg    case $host_os in
50758e0ed500Smrg      aix[[4-9]]*)
507617a48c7cSmrg	# All AIX code is PIC.
507717a48c7cSmrg	if test "$host_cpu" = ia64; then
507817a48c7cSmrg	  # AIX 5 now supports IA64 processor
507917a48c7cSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
508017a48c7cSmrg	else
508117a48c7cSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
508217a48c7cSmrg	fi
508317a48c7cSmrg	;;
508417a48c7cSmrg      chorus*)
508517a48c7cSmrg	case $cc_basename in
508617a48c7cSmrg	cxch68*)
508717a48c7cSmrg	  # Green Hills C++ Compiler
508817a48c7cSmrg	  # _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"
508917a48c7cSmrg	  ;;
509017a48c7cSmrg	esac
509117a48c7cSmrg	;;
509217a48c7cSmrg       darwin*)
509317a48c7cSmrg         # PIC is the default on this platform
509417a48c7cSmrg         # Common symbols not allowed in MH_DYLIB files
509517a48c7cSmrg         case $cc_basename in
509617a48c7cSmrg           xlc*)
509717a48c7cSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
509817a48c7cSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
509917a48c7cSmrg           ;;
510017a48c7cSmrg         esac
510117a48c7cSmrg       ;;
510217a48c7cSmrg      dgux*)
510317a48c7cSmrg	case $cc_basename in
510417a48c7cSmrg	  ec++*)
510517a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
510617a48c7cSmrg	    ;;
510717a48c7cSmrg	  ghcx*)
510817a48c7cSmrg	    # Green Hills C++ Compiler
510917a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
511017a48c7cSmrg	    ;;
511117a48c7cSmrg	  *)
511217a48c7cSmrg	    ;;
511317a48c7cSmrg	esac
511417a48c7cSmrg	;;
51158e0ed500Smrg      freebsd* | dragonfly*)
511617a48c7cSmrg	# FreeBSD uses GNU C++
511717a48c7cSmrg	;;
511817a48c7cSmrg      hpux9* | hpux10* | hpux11*)
511917a48c7cSmrg	case $cc_basename in
512017a48c7cSmrg	  CC*)
512117a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
512217a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
512317a48c7cSmrg	    if test "$host_cpu" != ia64; then
512417a48c7cSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
512517a48c7cSmrg	    fi
512617a48c7cSmrg	    ;;
512717a48c7cSmrg	  aCC*)
512817a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
512917a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
513017a48c7cSmrg	    case $host_cpu in
513117a48c7cSmrg	    hppa*64*|ia64*)
513217a48c7cSmrg	      # +Z the default
513317a48c7cSmrg	      ;;
513417a48c7cSmrg	    *)
513517a48c7cSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
513617a48c7cSmrg	      ;;
513717a48c7cSmrg	    esac
513817a48c7cSmrg	    ;;
513917a48c7cSmrg	  *)
514017a48c7cSmrg	    ;;
514117a48c7cSmrg	esac
514217a48c7cSmrg	;;
514317a48c7cSmrg      interix*)
514417a48c7cSmrg	# This is c89, which is MS Visual C++ (no shared libs)
514517a48c7cSmrg	# Anyone wants to do a port?
514617a48c7cSmrg	;;
514717a48c7cSmrg      irix5* | irix6* | nonstopux*)
514817a48c7cSmrg	case $cc_basename in
514917a48c7cSmrg	  CC*)
515017a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
515117a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
515217a48c7cSmrg	    # CC pic flag -KPIC is the default.
515317a48c7cSmrg	    ;;
515417a48c7cSmrg	  *)
515517a48c7cSmrg	    ;;
515617a48c7cSmrg	esac
515717a48c7cSmrg	;;
51588e0ed500Smrg      linux* | k*bsd*-gnu)
515917a48c7cSmrg	case $cc_basename in
516017a48c7cSmrg	  KCC*)
516117a48c7cSmrg	    # KAI C++ Compiler
516217a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
516317a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
516417a48c7cSmrg	    ;;
516517a48c7cSmrg	  icpc* | ecpc*)
516617a48c7cSmrg	    # Intel C++
516717a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
516817a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
516917a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
517017a48c7cSmrg	    ;;
51718e0ed500Smrg	  pgCC* | pgcpp*)
517217a48c7cSmrg	    # Portland Group C++ compiler.
517317a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
517417a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
517517a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
517617a48c7cSmrg	    ;;
517717a48c7cSmrg	  cxx*)
517817a48c7cSmrg	    # Compaq C++
517917a48c7cSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
518017a48c7cSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
518117a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
518217a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
518317a48c7cSmrg	    ;;
518417a48c7cSmrg	  *)
51858e0ed500Smrg	    case `$CC -V 2>&1 | sed 5q` in
51868e0ed500Smrg	    *Sun\ C*)
51878e0ed500Smrg	      # Sun C++ 5.9
51888e0ed500Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51898e0ed500Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51908e0ed500Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
51918e0ed500Smrg	      ;;
51928e0ed500Smrg	    esac
519317a48c7cSmrg	    ;;
519417a48c7cSmrg	esac
519517a48c7cSmrg	;;
519617a48c7cSmrg      lynxos*)
519717a48c7cSmrg	;;
519817a48c7cSmrg      m88k*)
519917a48c7cSmrg	;;
520017a48c7cSmrg      mvs*)
520117a48c7cSmrg	case $cc_basename in
520217a48c7cSmrg	  cxx*)
520317a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
520417a48c7cSmrg	    ;;
520517a48c7cSmrg	  *)
520617a48c7cSmrg	    ;;
520717a48c7cSmrg	esac
520817a48c7cSmrg	;;
520917a48c7cSmrg      netbsd*)
521017a48c7cSmrg	;;
521117a48c7cSmrg      osf3* | osf4* | osf5*)
521217a48c7cSmrg	case $cc_basename in
521317a48c7cSmrg	  KCC*)
521417a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
521517a48c7cSmrg	    ;;
521617a48c7cSmrg	  RCC*)
521717a48c7cSmrg	    # Rational C++ 2.4.1
521817a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
521917a48c7cSmrg	    ;;
522017a48c7cSmrg	  cxx*)
522117a48c7cSmrg	    # Digital/Compaq C++
522217a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
522317a48c7cSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
522417a48c7cSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
522517a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
522617a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
522717a48c7cSmrg	    ;;
522817a48c7cSmrg	  *)
522917a48c7cSmrg	    ;;
523017a48c7cSmrg	esac
523117a48c7cSmrg	;;
523217a48c7cSmrg      psos*)
523317a48c7cSmrg	;;
523417a48c7cSmrg      solaris*)
523517a48c7cSmrg	case $cc_basename in
523617a48c7cSmrg	  CC*)
523717a48c7cSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
523817a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
523917a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
524017a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
524117a48c7cSmrg	    ;;
524217a48c7cSmrg	  gcx*)
524317a48c7cSmrg	    # Green Hills C++ Compiler
524417a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
524517a48c7cSmrg	    ;;
524617a48c7cSmrg	  *)
524717a48c7cSmrg	    ;;
524817a48c7cSmrg	esac
524917a48c7cSmrg	;;
525017a48c7cSmrg      sunos4*)
525117a48c7cSmrg	case $cc_basename in
525217a48c7cSmrg	  CC*)
525317a48c7cSmrg	    # Sun C++ 4.x
525417a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
525517a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
525617a48c7cSmrg	    ;;
525717a48c7cSmrg	  lcc*)
525817a48c7cSmrg	    # Lucid
525917a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
526017a48c7cSmrg	    ;;
526117a48c7cSmrg	  *)
526217a48c7cSmrg	    ;;
526317a48c7cSmrg	esac
526417a48c7cSmrg	;;
526517a48c7cSmrg      tandem*)
526617a48c7cSmrg	case $cc_basename in
526717a48c7cSmrg	  NCC*)
526817a48c7cSmrg	    # NonStop-UX NCC 3.20
526917a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
527017a48c7cSmrg	    ;;
527117a48c7cSmrg	  *)
527217a48c7cSmrg	    ;;
527317a48c7cSmrg	esac
527417a48c7cSmrg	;;
527517a48c7cSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
527617a48c7cSmrg	case $cc_basename in
527717a48c7cSmrg	  CC*)
527817a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
527917a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
528017a48c7cSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
528117a48c7cSmrg	    ;;
528217a48c7cSmrg	esac
528317a48c7cSmrg	;;
528417a48c7cSmrg      vxworks*)
528517a48c7cSmrg	;;
528617a48c7cSmrg      *)
528717a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
528817a48c7cSmrg	;;
528917a48c7cSmrg    esac
529017a48c7cSmrg  fi
529117a48c7cSmrg],
529217a48c7cSmrg[
529317a48c7cSmrg  if test "$GCC" = yes; then
529417a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
529517a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
529617a48c7cSmrg
529717a48c7cSmrg    case $host_os in
529817a48c7cSmrg      aix*)
529917a48c7cSmrg      # All AIX code is PIC.
530017a48c7cSmrg      if test "$host_cpu" = ia64; then
530117a48c7cSmrg	# AIX 5 now supports IA64 processor
530217a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
530317a48c7cSmrg      fi
530417a48c7cSmrg      ;;
530517a48c7cSmrg
530617a48c7cSmrg    amigaos*)
530717a48c7cSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
530817a48c7cSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
530917a48c7cSmrg      # like `-m68040'.
531017a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
531117a48c7cSmrg      ;;
531217a48c7cSmrg
53138e0ed500Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
531417a48c7cSmrg      # PIC is the default for these OSes.
531517a48c7cSmrg      ;;
531617a48c7cSmrg
53178e0ed500Smrg    mingw* | cygwin* | pw32* | os2*)
531817a48c7cSmrg      # This hack is so that the source file can tell whether it is being
531917a48c7cSmrg      # built for inclusion in a dll (and should export symbols for example).
53208e0ed500Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
53218e0ed500Smrg      # (--disable-auto-import) libraries
53228e0ed500Smrg      m4_if([$1], [GCJ], [],
53238e0ed500Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
532417a48c7cSmrg      ;;
532517a48c7cSmrg
532617a48c7cSmrg    darwin* | rhapsody*)
532717a48c7cSmrg      # PIC is the default on this platform
532817a48c7cSmrg      # Common symbols not allowed in MH_DYLIB files
532917a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
533017a48c7cSmrg      ;;
533117a48c7cSmrg
53328e0ed500Smrg    interix[[3-9]]*)
533317a48c7cSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
533417a48c7cSmrg      # Instead, we relocate shared libraries at runtime.
533517a48c7cSmrg      ;;
533617a48c7cSmrg
533717a48c7cSmrg    msdosdjgpp*)
533817a48c7cSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
533917a48c7cSmrg      # on systems that don't support them.
534017a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
534117a48c7cSmrg      enable_shared=no
534217a48c7cSmrg      ;;
534317a48c7cSmrg
534417a48c7cSmrg    sysv4*MP*)
534517a48c7cSmrg      if test -d /usr/nec; then
534617a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
534717a48c7cSmrg      fi
534817a48c7cSmrg      ;;
534917a48c7cSmrg
535017a48c7cSmrg    hpux*)
535117a48c7cSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
535217a48c7cSmrg      # not for PA HP-UX.
535317a48c7cSmrg      case $host_cpu in
535417a48c7cSmrg      hppa*64*|ia64*)
535517a48c7cSmrg	# +Z the default
535617a48c7cSmrg	;;
535717a48c7cSmrg      *)
535817a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
535917a48c7cSmrg	;;
536017a48c7cSmrg      esac
536117a48c7cSmrg      ;;
536217a48c7cSmrg
536317a48c7cSmrg    *)
536417a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
536517a48c7cSmrg      ;;
536617a48c7cSmrg    esac
536717a48c7cSmrg  else
536817a48c7cSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
536917a48c7cSmrg    case $host_os in
537017a48c7cSmrg    aix*)
537117a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
537217a48c7cSmrg      if test "$host_cpu" = ia64; then
537317a48c7cSmrg	# AIX 5 now supports IA64 processor
537417a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
537517a48c7cSmrg      else
537617a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
537717a48c7cSmrg      fi
537817a48c7cSmrg      ;;
537917a48c7cSmrg      darwin*)
538017a48c7cSmrg        # PIC is the default on this platform
538117a48c7cSmrg        # Common symbols not allowed in MH_DYLIB files
538217a48c7cSmrg       case $cc_basename in
538317a48c7cSmrg         xlc*)
538417a48c7cSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
538517a48c7cSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
538617a48c7cSmrg         ;;
538717a48c7cSmrg       esac
538817a48c7cSmrg       ;;
538917a48c7cSmrg
53908e0ed500Smrg    mingw* | cygwin* | pw32* | os2*)
539117a48c7cSmrg      # This hack is so that the source file can tell whether it is being
539217a48c7cSmrg      # built for inclusion in a dll (and should export symbols for example).
53938e0ed500Smrg      m4_if([$1], [GCJ], [],
53948e0ed500Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
539517a48c7cSmrg      ;;
539617a48c7cSmrg
539717a48c7cSmrg    hpux9* | hpux10* | hpux11*)
539817a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
539917a48c7cSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
540017a48c7cSmrg      # not for PA HP-UX.
540117a48c7cSmrg      case $host_cpu in
540217a48c7cSmrg      hppa*64*|ia64*)
540317a48c7cSmrg	# +Z the default
540417a48c7cSmrg	;;
540517a48c7cSmrg      *)
540617a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
540717a48c7cSmrg	;;
540817a48c7cSmrg      esac
540917a48c7cSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
541017a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
541117a48c7cSmrg      ;;
541217a48c7cSmrg
541317a48c7cSmrg    irix5* | irix6* | nonstopux*)
541417a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
541517a48c7cSmrg      # PIC (with -KPIC) is the default.
541617a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
541717a48c7cSmrg      ;;
541817a48c7cSmrg
541917a48c7cSmrg    newsos6)
542017a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
542117a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
542217a48c7cSmrg      ;;
542317a48c7cSmrg
54248e0ed500Smrg    linux* | k*bsd*-gnu)
542517a48c7cSmrg      case $cc_basename in
542617a48c7cSmrg      icc* | ecc*)
542717a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
542817a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
542917a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
543017a48c7cSmrg        ;;
543117a48c7cSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
543217a48c7cSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
543317a48c7cSmrg	# which looks to be a dead project)
543417a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
543517a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
543617a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
543717a48c7cSmrg        ;;
543817a48c7cSmrg      ccc*)
543917a48c7cSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
544017a48c7cSmrg        # All Alpha code is PIC.
544117a48c7cSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
544217a48c7cSmrg        ;;
54438e0ed500Smrg      *)
54448e0ed500Smrg        case `$CC -V 2>&1 | sed 5q` in
54458e0ed500Smrg	*Sun\ C*)
54468e0ed500Smrg	  # Sun C 5.9
54478e0ed500Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54488e0ed500Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54498e0ed500Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54508e0ed500Smrg	  ;;
54518e0ed500Smrg	*Sun\ F*)
54528e0ed500Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
54538e0ed500Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54548e0ed500Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54558e0ed500Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
54568e0ed500Smrg	  ;;
54578e0ed500Smrg	esac
54588e0ed500Smrg	;;
545917a48c7cSmrg      esac
546017a48c7cSmrg      ;;
546117a48c7cSmrg
546217a48c7cSmrg    osf3* | osf4* | osf5*)
546317a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
546417a48c7cSmrg      # All OSF/1 code is PIC.
546517a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
546617a48c7cSmrg      ;;
546717a48c7cSmrg
54688e0ed500Smrg    rdos*)
54698e0ed500Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54708e0ed500Smrg      ;;
54718e0ed500Smrg
547217a48c7cSmrg    solaris*)
547317a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
547417a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
547517a48c7cSmrg      case $cc_basename in
547617a48c7cSmrg      f77* | f90* | f95*)
547717a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
547817a48c7cSmrg      *)
547917a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
548017a48c7cSmrg      esac
548117a48c7cSmrg      ;;
548217a48c7cSmrg
548317a48c7cSmrg    sunos4*)
548417a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
548517a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
548617a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
548717a48c7cSmrg      ;;
548817a48c7cSmrg
548917a48c7cSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
549017a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
549117a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
549217a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
549317a48c7cSmrg      ;;
549417a48c7cSmrg
549517a48c7cSmrg    sysv4*MP*)
549617a48c7cSmrg      if test -d /usr/nec ;then
549717a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
549817a48c7cSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
549917a48c7cSmrg      fi
550017a48c7cSmrg      ;;
550117a48c7cSmrg
550217a48c7cSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
550317a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
550417a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
550517a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
550617a48c7cSmrg      ;;
550717a48c7cSmrg
550817a48c7cSmrg    unicos*)
550917a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
551017a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
551117a48c7cSmrg      ;;
551217a48c7cSmrg
551317a48c7cSmrg    uts4*)
551417a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
551517a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
551617a48c7cSmrg      ;;
551717a48c7cSmrg
551817a48c7cSmrg    *)
551917a48c7cSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
552017a48c7cSmrg      ;;
552117a48c7cSmrg    esac
552217a48c7cSmrg  fi
552317a48c7cSmrg])
552417a48c7cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
552517a48c7cSmrg
552617a48c7cSmrg#
552717a48c7cSmrg# Check to make sure the PIC flag actually works.
552817a48c7cSmrg#
552917a48c7cSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
553017a48c7cSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
55318e0ed500Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
553217a48c7cSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
553317a48c7cSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
553417a48c7cSmrg     "" | " "*) ;;
553517a48c7cSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
553617a48c7cSmrg     esac],
553717a48c7cSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
553817a48c7cSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
553917a48c7cSmrgfi
554017a48c7cSmrgcase $host_os in
554117a48c7cSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
554217a48c7cSmrg  *djgpp*)
554317a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
554417a48c7cSmrg    ;;
554517a48c7cSmrg  *)
554617a48c7cSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
554717a48c7cSmrg    ;;
554817a48c7cSmrgesac
554917a48c7cSmrg
555017a48c7cSmrg#
555117a48c7cSmrg# Check to make sure the static flag actually works.
555217a48c7cSmrg#
555317a48c7cSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
555417a48c7cSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
55558e0ed500Smrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
555617a48c7cSmrg  $lt_tmp_static_flag,
555717a48c7cSmrg  [],
555817a48c7cSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
555917a48c7cSmrg])
556017a48c7cSmrg
556117a48c7cSmrg
556217a48c7cSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
556317a48c7cSmrg# ------------------------------------
556417a48c7cSmrg# See if the linker supports building shared libraries.
556517a48c7cSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
55668e0ed500Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
55678e0ed500SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
556817a48c7cSmrgifelse([$1],[CXX],[
556917a48c7cSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
557017a48c7cSmrg  case $host_os in
55718e0ed500Smrg  aix[[4-9]]*)
557217a48c7cSmrg    # If we're using GNU nm, then we don't want the "-C" option.
557317a48c7cSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
557417a48c7cSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
557517a48c7cSmrg      _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'
557617a48c7cSmrg    else
557717a48c7cSmrg      _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'
557817a48c7cSmrg    fi
557917a48c7cSmrg    ;;
558017a48c7cSmrg  pw32*)
558117a48c7cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
558217a48c7cSmrg  ;;
558317a48c7cSmrg  cygwin* | mingw*)
55848e0ed500Smrg    _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'
558517a48c7cSmrg  ;;
558617a48c7cSmrg  *)
558717a48c7cSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
558817a48c7cSmrg  ;;
558917a48c7cSmrg  esac
55908e0ed500Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
559117a48c7cSmrg],[
559217a48c7cSmrg  runpath_var=
559317a48c7cSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
559417a48c7cSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
559517a48c7cSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
559617a48c7cSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
559717a48c7cSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
559817a48c7cSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
559917a48c7cSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
560017a48c7cSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
560117a48c7cSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
560217a48c7cSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
560317a48c7cSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
560417a48c7cSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
560517a48c7cSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
560617a48c7cSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
560717a48c7cSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
560817a48c7cSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
560917a48c7cSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
561017a48c7cSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
561117a48c7cSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
561217a48c7cSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
561317a48c7cSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
561417a48c7cSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
561517a48c7cSmrg  # included in the symbol list
561617a48c7cSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
561717a48c7cSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
561817a48c7cSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
561917a48c7cSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
562017a48c7cSmrg  # as well as any symbol that contains `d'.
56218e0ed500Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
562217a48c7cSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
562317a48c7cSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
562417a48c7cSmrg  # the symbol is explicitly referenced.  Since portable code cannot
562517a48c7cSmrg  # rely on this symbol name, it's probably fine to never include it in
562617a48c7cSmrg  # preloaded symbol tables.
56278e0ed500Smrg  # Exclude shared library initialization/finalization symbols.
56288e0ed500Smrgdnl Note also adjust exclude_expsyms for C++ above.
562917a48c7cSmrg  extract_expsyms_cmds=
563017a48c7cSmrg  # Just being paranoid about ensuring that cc_basename is set.
563117a48c7cSmrg  _LT_CC_BASENAME([$compiler])
563217a48c7cSmrg  case $host_os in
563317a48c7cSmrg  cygwin* | mingw* | pw32*)
563417a48c7cSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
563517a48c7cSmrg    # When not using gcc, we currently assume that we are using
563617a48c7cSmrg    # Microsoft Visual C++.
563717a48c7cSmrg    if test "$GCC" != yes; then
563817a48c7cSmrg      with_gnu_ld=no
563917a48c7cSmrg    fi
564017a48c7cSmrg    ;;
564117a48c7cSmrg  interix*)
564217a48c7cSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
564317a48c7cSmrg    with_gnu_ld=yes
564417a48c7cSmrg    ;;
564517a48c7cSmrg  openbsd*)
564617a48c7cSmrg    with_gnu_ld=no
564717a48c7cSmrg    ;;
564817a48c7cSmrg  esac
564917a48c7cSmrg
565017a48c7cSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
565117a48c7cSmrg  if test "$with_gnu_ld" = yes; then
565217a48c7cSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
565317a48c7cSmrg    wlarc='${wl}'
565417a48c7cSmrg
565517a48c7cSmrg    # Set some defaults for GNU ld with shared library support. These
565617a48c7cSmrg    # are reset later if shared libraries are not supported. Putting them
565717a48c7cSmrg    # here allows them to be overridden if necessary.
565817a48c7cSmrg    runpath_var=LD_RUN_PATH
565917a48c7cSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
566017a48c7cSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
566117a48c7cSmrg    # ancient GNU ld didn't support --whole-archive et. al.
566217a48c7cSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
566317a48c7cSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
566417a48c7cSmrg      else
566517a48c7cSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
566617a48c7cSmrg    fi
566717a48c7cSmrg    supports_anon_versioning=no
566817a48c7cSmrg    case `$LD -v 2>/dev/null` in
566917a48c7cSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
567017a48c7cSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
567117a48c7cSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
567217a48c7cSmrg      *\ 2.11.*) ;; # other 2.11 versions
567317a48c7cSmrg      *) supports_anon_versioning=yes ;;
567417a48c7cSmrg    esac
567517a48c7cSmrg
567617a48c7cSmrg    # See if GNU ld supports shared libraries.
567717a48c7cSmrg    case $host_os in
56788e0ed500Smrg    aix[[3-9]]*)
567917a48c7cSmrg      # On AIX/PPC, the GNU linker is very broken
568017a48c7cSmrg      if test "$host_cpu" != ia64; then
568117a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
568217a48c7cSmrg	cat <<EOF 1>&2
568317a48c7cSmrg
568417a48c7cSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
568517a48c7cSmrg*** to be unable to reliably create shared libraries on AIX.
568617a48c7cSmrg*** Therefore, libtool is disabling shared libraries support.  If you
568717a48c7cSmrg*** really care for shared libraries, you may want to modify your PATH
568817a48c7cSmrg*** so that a non-GNU linker is found, and then restart.
568917a48c7cSmrg
569017a48c7cSmrgEOF
569117a48c7cSmrg      fi
569217a48c7cSmrg      ;;
569317a48c7cSmrg
569417a48c7cSmrg    amigaos*)
569517a48c7cSmrg      _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)'
569617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
569717a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
569817a48c7cSmrg
569917a48c7cSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
570017a48c7cSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
570117a48c7cSmrg      # to version 4, is to share data among multiple programs linked
570217a48c7cSmrg      # with the same dynamic library.  Since this doesn't match the
570317a48c7cSmrg      # behavior of shared libraries on other platforms, we can't use
570417a48c7cSmrg      # them.
570517a48c7cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
570617a48c7cSmrg      ;;
570717a48c7cSmrg
570817a48c7cSmrg    beos*)
570917a48c7cSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
571017a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
571117a48c7cSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
571217a48c7cSmrg	# support --undefined.  This deserves some investigation.  FIXME
571317a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
571417a48c7cSmrg      else
571517a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
571617a48c7cSmrg      fi
571717a48c7cSmrg      ;;
571817a48c7cSmrg
571917a48c7cSmrg    cygwin* | mingw* | pw32*)
572017a48c7cSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
572117a48c7cSmrg      # as there is no search path for DLLs.
572217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
572317a48c7cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
572417a48c7cSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
572517a48c7cSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
57268e0ed500Smrg      _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'
572717a48c7cSmrg
572817a48c7cSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
572917a48c7cSmrg        _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'
573017a48c7cSmrg	# If the export-symbols file already is a .def file (1st line
573117a48c7cSmrg	# is EXPORTS), use it as is; otherwise, prepend...
573217a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
573317a48c7cSmrg	  cp $export_symbols $output_objdir/$soname.def;
573417a48c7cSmrg	else
573517a48c7cSmrg	  echo EXPORTS > $output_objdir/$soname.def;
573617a48c7cSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
573717a48c7cSmrg	fi~
573817a48c7cSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
573917a48c7cSmrg      else
574017a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
574117a48c7cSmrg      fi
574217a48c7cSmrg      ;;
574317a48c7cSmrg
57448e0ed500Smrg    interix[[3-9]]*)
574517a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
574617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
574717a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
574817a48c7cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
574917a48c7cSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
575017a48c7cSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
575117a48c7cSmrg      # default) and relocated if they conflict, which is a slow very memory
575217a48c7cSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
575317a48c7cSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
575417a48c7cSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
575517a48c7cSmrg      _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'
575617a48c7cSmrg      _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'
575717a48c7cSmrg      ;;
575817a48c7cSmrg
57598e0ed500Smrg    gnu* | linux* | k*bsd*-gnu)
576017a48c7cSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
576117a48c7cSmrg	tmp_addflag=
576217a48c7cSmrg	case $cc_basename,$host_cpu in
576317a48c7cSmrg	pgcc*)				# Portland Group C compiler
576417a48c7cSmrg	  _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'
576517a48c7cSmrg	  tmp_addflag=' $pic_flag'
576617a48c7cSmrg	  ;;
576717a48c7cSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
576817a48c7cSmrg	  _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'
576917a48c7cSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
577017a48c7cSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
577117a48c7cSmrg	  tmp_addflag=' -i_dynamic' ;;
577217a48c7cSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
577317a48c7cSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
577417a48c7cSmrg	ifc* | ifort*)			# Intel Fortran compiler
577517a48c7cSmrg	  tmp_addflag=' -nofor_main' ;;
577617a48c7cSmrg	esac
57778e0ed500Smrg	case `$CC -V 2>&1 | sed 5q` in
57788e0ed500Smrg	*Sun\ C*)			# Sun C 5.9
57798e0ed500Smrg	  _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'
57808e0ed500Smrg	  tmp_sharedflag='-G' ;;
57818e0ed500Smrg	*Sun\ F*)			# Sun Fortran 8.3
57828e0ed500Smrg	  tmp_sharedflag='-G' ;;
57838e0ed500Smrg	*)
57848e0ed500Smrg	  tmp_sharedflag='-shared' ;;
57858e0ed500Smrg	esac
57868e0ed500Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
578717a48c7cSmrg
578817a48c7cSmrg	if test $supports_anon_versioning = yes; then
578917a48c7cSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
579017a48c7cSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
579117a48c7cSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
57928e0ed500Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
579317a48c7cSmrg	fi
579417a48c7cSmrg      else
579517a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
579617a48c7cSmrg      fi
579717a48c7cSmrg      ;;
579817a48c7cSmrg
579917a48c7cSmrg    netbsd*)
580017a48c7cSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
580117a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
580217a48c7cSmrg	wlarc=
580317a48c7cSmrg      else
580417a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
580517a48c7cSmrg	_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'
580617a48c7cSmrg      fi
580717a48c7cSmrg      ;;
580817a48c7cSmrg
580917a48c7cSmrg    solaris*)
581017a48c7cSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
581117a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
581217a48c7cSmrg	cat <<EOF 1>&2
581317a48c7cSmrg
581417a48c7cSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
581517a48c7cSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
581617a48c7cSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
581717a48c7cSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
581817a48c7cSmrg*** your PATH or compiler configuration so that the native linker is
581917a48c7cSmrg*** used, and then restart.
582017a48c7cSmrg
582117a48c7cSmrgEOF
582217a48c7cSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
582317a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
582417a48c7cSmrg	_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'
582517a48c7cSmrg      else
582617a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
582717a48c7cSmrg      fi
582817a48c7cSmrg      ;;
582917a48c7cSmrg
583017a48c7cSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
583117a48c7cSmrg      case `$LD -v 2>&1` in
58328e0ed500Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
583317a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
583417a48c7cSmrg	cat <<_LT_EOF 1>&2
583517a48c7cSmrg
583617a48c7cSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
583717a48c7cSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
583817a48c7cSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
583917a48c7cSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
584017a48c7cSmrg*** your PATH or compiler configuration so that the native linker is
584117a48c7cSmrg*** used, and then restart.
584217a48c7cSmrg
584317a48c7cSmrg_LT_EOF
584417a48c7cSmrg	;;
584517a48c7cSmrg	*)
584617a48c7cSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
584717a48c7cSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
584817a48c7cSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
584917a48c7cSmrg	    _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'
585017a48c7cSmrg	  else
585117a48c7cSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
585217a48c7cSmrg	  fi
585317a48c7cSmrg	;;
585417a48c7cSmrg      esac
585517a48c7cSmrg      ;;
585617a48c7cSmrg
585717a48c7cSmrg    sunos4*)
585817a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
585917a48c7cSmrg      wlarc=
586017a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
586117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
586217a48c7cSmrg      ;;
586317a48c7cSmrg
586417a48c7cSmrg    *)
586517a48c7cSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
586617a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
586717a48c7cSmrg	_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'
586817a48c7cSmrg      else
586917a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
587017a48c7cSmrg      fi
587117a48c7cSmrg      ;;
587217a48c7cSmrg    esac
587317a48c7cSmrg
587417a48c7cSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
587517a48c7cSmrg      runpath_var=
587617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
587717a48c7cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
587817a48c7cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
587917a48c7cSmrg    fi
588017a48c7cSmrg  else
588117a48c7cSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
588217a48c7cSmrg    case $host_os in
588317a48c7cSmrg    aix3*)
588417a48c7cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
588517a48c7cSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
588617a48c7cSmrg      _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'
588717a48c7cSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
588817a48c7cSmrg      # are no directories specified by -L.
588917a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
589017a48c7cSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
589117a48c7cSmrg	# Neither direct hardcoding nor static linking is supported with a
589217a48c7cSmrg	# broken collect2.
589317a48c7cSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
589417a48c7cSmrg      fi
589517a48c7cSmrg      ;;
589617a48c7cSmrg
58978e0ed500Smrg    aix[[4-9]]*)
589817a48c7cSmrg      if test "$host_cpu" = ia64; then
589917a48c7cSmrg	# On IA64, the linker does run time linking by default, so we don't
590017a48c7cSmrg	# have to do anything special.
590117a48c7cSmrg	aix_use_runtimelinking=no
590217a48c7cSmrg	exp_sym_flag='-Bexport'
590317a48c7cSmrg	no_entry_flag=""
590417a48c7cSmrg      else
590517a48c7cSmrg	# If we're using GNU nm, then we don't want the "-C" option.
590617a48c7cSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
590717a48c7cSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
590817a48c7cSmrg	  _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'
590917a48c7cSmrg	else
591017a48c7cSmrg	  _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'
591117a48c7cSmrg	fi
591217a48c7cSmrg	aix_use_runtimelinking=no
591317a48c7cSmrg
591417a48c7cSmrg	# Test if we are trying to use run time linking or normal
591517a48c7cSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
591617a48c7cSmrg	# need to do runtime linking.
59178e0ed500Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
591817a48c7cSmrg	  for ld_flag in $LDFLAGS; do
591917a48c7cSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
592017a48c7cSmrg  	    aix_use_runtimelinking=yes
592117a48c7cSmrg  	    break
592217a48c7cSmrg  	  fi
592317a48c7cSmrg	  done
592417a48c7cSmrg	  ;;
592517a48c7cSmrg	esac
592617a48c7cSmrg
592717a48c7cSmrg	exp_sym_flag='-bexport'
592817a48c7cSmrg	no_entry_flag='-bnoentry'
592917a48c7cSmrg      fi
593017a48c7cSmrg
593117a48c7cSmrg      # When large executables or shared objects are built, AIX ld can
593217a48c7cSmrg      # have problems creating the table of contents.  If linking a library
593317a48c7cSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
593417a48c7cSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
593517a48c7cSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
593617a48c7cSmrg
593717a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
593817a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
593917a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
594017a48c7cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
594117a48c7cSmrg
594217a48c7cSmrg      if test "$GCC" = yes; then
594317a48c7cSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
594417a48c7cSmrg	# We only want to do this on AIX 4.2 and lower, the check
594517a48c7cSmrg	# below for broken collect2 doesn't work under 4.3+
594617a48c7cSmrg	  collect2name=`${CC} -print-prog-name=collect2`
594717a48c7cSmrg	  if test -f "$collect2name" && \
594817a48c7cSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
594917a48c7cSmrg	  then
595017a48c7cSmrg  	  # We have reworked collect2
59518e0ed500Smrg  	  :
595217a48c7cSmrg	  else
595317a48c7cSmrg  	  # We have old collect2
595417a48c7cSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
595517a48c7cSmrg  	  # It fails to find uninstalled libraries when the uninstalled
595617a48c7cSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
595717a48c7cSmrg  	  # to unsupported forces relinking
595817a48c7cSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
595917a48c7cSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
596017a48c7cSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
596117a48c7cSmrg	  fi
596217a48c7cSmrg	  ;;
596317a48c7cSmrg	esac
596417a48c7cSmrg	shared_flag='-shared'
596517a48c7cSmrg	if test "$aix_use_runtimelinking" = yes; then
596617a48c7cSmrg	  shared_flag="$shared_flag "'${wl}-G'
596717a48c7cSmrg	fi
596817a48c7cSmrg      else
596917a48c7cSmrg	# not using gcc
597017a48c7cSmrg	if test "$host_cpu" = ia64; then
597117a48c7cSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
597217a48c7cSmrg  	# chokes on -Wl,-G. The following line is correct:
597317a48c7cSmrg	  shared_flag='-G'
597417a48c7cSmrg	else
597517a48c7cSmrg	  if test "$aix_use_runtimelinking" = yes; then
597617a48c7cSmrg	    shared_flag='${wl}-G'
597717a48c7cSmrg	  else
597817a48c7cSmrg	    shared_flag='${wl}-bM:SRE'
597917a48c7cSmrg	  fi
598017a48c7cSmrg	fi
598117a48c7cSmrg      fi
598217a48c7cSmrg
598317a48c7cSmrg      # It seems that -bexpall does not export symbols beginning with
598417a48c7cSmrg      # underscore (_), so it is better to generate a list of symbols to export.
598517a48c7cSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
598617a48c7cSmrg      if test "$aix_use_runtimelinking" = yes; then
598717a48c7cSmrg	# Warning - without using the other runtime loading flags (-brtl),
598817a48c7cSmrg	# -berok will link without error, but may produce a broken library.
598917a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
599017a48c7cSmrg       # Determine the default libpath from the value encoded in an empty executable.
599117a48c7cSmrg       _LT_AC_SYS_LIBPATH_AIX
599217a48c7cSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
599317a48c7cSmrg	_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"
599417a48c7cSmrg       else
599517a48c7cSmrg	if test "$host_cpu" = ia64; then
599617a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
599717a48c7cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
599817a48c7cSmrg	  _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"
599917a48c7cSmrg	else
600017a48c7cSmrg	 # Determine the default libpath from the value encoded in an empty executable.
600117a48c7cSmrg	 _LT_AC_SYS_LIBPATH_AIX
600217a48c7cSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
600317a48c7cSmrg	  # Warning - without using the other run time loading flags,
600417a48c7cSmrg	  # -berok will link without error, but may produce a broken library.
600517a48c7cSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
600617a48c7cSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
600717a48c7cSmrg	  # Exported symbols can be pulled into shared objects from archives
600817a48c7cSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
600917a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
601017a48c7cSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
601117a48c7cSmrg	  _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'
601217a48c7cSmrg	fi
601317a48c7cSmrg      fi
601417a48c7cSmrg      ;;
601517a48c7cSmrg
601617a48c7cSmrg    amigaos*)
601717a48c7cSmrg      _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)'
601817a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
601917a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
602017a48c7cSmrg      # see comment about different semantics on the GNU ld section
602117a48c7cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
602217a48c7cSmrg      ;;
602317a48c7cSmrg
602417a48c7cSmrg    bsdi[[45]]*)
602517a48c7cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
602617a48c7cSmrg      ;;
602717a48c7cSmrg
602817a48c7cSmrg    cygwin* | mingw* | pw32*)
602917a48c7cSmrg      # When not using gcc, we currently assume that we are using
603017a48c7cSmrg      # Microsoft Visual C++.
603117a48c7cSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
603217a48c7cSmrg      # no search path for DLLs.
603317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
603417a48c7cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
603517a48c7cSmrg      # Tell ltmain to make .lib files, not .a files.
603617a48c7cSmrg      libext=lib
603717a48c7cSmrg      # Tell ltmain to make .dll files, not .so files.
603817a48c7cSmrg      shrext_cmds=".dll"
603917a48c7cSmrg      # FIXME: Setting linknames here is a bad hack.
604017a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
604117a48c7cSmrg      # The linker will automatically build a .lib file if we build a DLL.
604217a48c7cSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
604317a48c7cSmrg      # FIXME: Should let the user specify the lib program.
60448e0ed500Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
604517a48c7cSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
604617a48c7cSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
604717a48c7cSmrg      ;;
604817a48c7cSmrg
604917a48c7cSmrg    darwin* | rhapsody*)
605017a48c7cSmrg      case $host_os in
605117a48c7cSmrg        rhapsody* | darwin1.[[012]])
605217a48c7cSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
605317a48c7cSmrg         ;;
605417a48c7cSmrg       *) # Darwin 1.3 on
605517a48c7cSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
605617a48c7cSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
605717a48c7cSmrg         else
605817a48c7cSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
605917a48c7cSmrg             10.[[012]])
606017a48c7cSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
606117a48c7cSmrg               ;;
606217a48c7cSmrg             10.*)
606317a48c7cSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
606417a48c7cSmrg               ;;
606517a48c7cSmrg           esac
606617a48c7cSmrg         fi
606717a48c7cSmrg         ;;
606817a48c7cSmrg      esac
606917a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
607017a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
607117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
607217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
607317a48c7cSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
607417a48c7cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
607517a48c7cSmrg    if test "$GCC" = yes ; then
607617a48c7cSmrg    	output_verbose_link_cmd='echo'
60778e0ed500Smrg        _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}"
60788e0ed500Smrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
60798e0ed500Smrg        _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}"
60808e0ed500Smrg        _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}"
608117a48c7cSmrg    else
608217a48c7cSmrg      case $cc_basename in
608317a48c7cSmrg        xlc*)
608417a48c7cSmrg         output_verbose_link_cmd='echo'
60858e0ed500Smrg         _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'
608617a48c7cSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
608717a48c7cSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
60888e0ed500Smrg         _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}'
608917a48c7cSmrg          _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}'
609017a48c7cSmrg          ;;
609117a48c7cSmrg       *)
609217a48c7cSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
609317a48c7cSmrg          ;;
609417a48c7cSmrg      esac
609517a48c7cSmrg    fi
609617a48c7cSmrg      ;;
609717a48c7cSmrg
609817a48c7cSmrg    dgux*)
609917a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
610017a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
610117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
610217a48c7cSmrg      ;;
610317a48c7cSmrg
610417a48c7cSmrg    freebsd1*)
610517a48c7cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
610617a48c7cSmrg      ;;
610717a48c7cSmrg
610817a48c7cSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
610917a48c7cSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
611017a48c7cSmrg    # does not break anything, and helps significantly (at the cost of a little
611117a48c7cSmrg    # extra space).
611217a48c7cSmrg    freebsd2.2*)
611317a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
611417a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
611517a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
611617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
611717a48c7cSmrg      ;;
611817a48c7cSmrg
611917a48c7cSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
612017a48c7cSmrg    freebsd2*)
612117a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
612217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
612317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
612417a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
612517a48c7cSmrg      ;;
612617a48c7cSmrg
612717a48c7cSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
61288e0ed500Smrg    freebsd* | dragonfly*)
612917a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
613017a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
613117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
613217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
613317a48c7cSmrg      ;;
613417a48c7cSmrg
613517a48c7cSmrg    hpux9*)
613617a48c7cSmrg      if test "$GCC" = yes; then
613717a48c7cSmrg	_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'
613817a48c7cSmrg      else
613917a48c7cSmrg	_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'
614017a48c7cSmrg      fi
614117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
614217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
614317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
614417a48c7cSmrg
614517a48c7cSmrg      # hardcode_minus_L: Not really in the search PATH,
614617a48c7cSmrg      # but as the default location of the library.
614717a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
614817a48c7cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
614917a48c7cSmrg      ;;
615017a48c7cSmrg
615117a48c7cSmrg    hpux10*)
615217a48c7cSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
615317a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
615417a48c7cSmrg      else
615517a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
615617a48c7cSmrg      fi
615717a48c7cSmrg      if test "$with_gnu_ld" = no; then
615817a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
615917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
616017a48c7cSmrg
616117a48c7cSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
616217a48c7cSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
616317a48c7cSmrg
616417a48c7cSmrg	# hardcode_minus_L: Not really in the search PATH,
616517a48c7cSmrg	# but as the default location of the library.
616617a48c7cSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
616717a48c7cSmrg      fi
616817a48c7cSmrg      ;;
616917a48c7cSmrg
617017a48c7cSmrg    hpux11*)
617117a48c7cSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
617217a48c7cSmrg	case $host_cpu in
617317a48c7cSmrg	hppa*64*)
617417a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
617517a48c7cSmrg	  ;;
617617a48c7cSmrg	ia64*)
617717a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
617817a48c7cSmrg	  ;;
617917a48c7cSmrg	*)
618017a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
618117a48c7cSmrg	  ;;
618217a48c7cSmrg	esac
618317a48c7cSmrg      else
618417a48c7cSmrg	case $host_cpu in
618517a48c7cSmrg	hppa*64*)
618617a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
618717a48c7cSmrg	  ;;
618817a48c7cSmrg	ia64*)
618917a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
619017a48c7cSmrg	  ;;
619117a48c7cSmrg	*)
619217a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
619317a48c7cSmrg	  ;;
619417a48c7cSmrg	esac
619517a48c7cSmrg      fi
619617a48c7cSmrg      if test "$with_gnu_ld" = no; then
619717a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
619817a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
619917a48c7cSmrg
620017a48c7cSmrg	case $host_cpu in
620117a48c7cSmrg	hppa*64*|ia64*)
620217a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
620317a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
620417a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
620517a48c7cSmrg	  ;;
620617a48c7cSmrg	*)
620717a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
620817a48c7cSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
620917a48c7cSmrg
621017a48c7cSmrg	  # hardcode_minus_L: Not really in the search PATH,
621117a48c7cSmrg	  # but as the default location of the library.
621217a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
621317a48c7cSmrg	  ;;
621417a48c7cSmrg	esac
621517a48c7cSmrg      fi
621617a48c7cSmrg      ;;
621717a48c7cSmrg
621817a48c7cSmrg    irix5* | irix6* | nonstopux*)
621917a48c7cSmrg      if test "$GCC" = yes; then
622017a48c7cSmrg	_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'
622117a48c7cSmrg      else
622217a48c7cSmrg	_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'
622317a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
622417a48c7cSmrg      fi
622517a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
622617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
622717a48c7cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
622817a48c7cSmrg      ;;
622917a48c7cSmrg
623017a48c7cSmrg    netbsd*)
623117a48c7cSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
623217a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
623317a48c7cSmrg      else
623417a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
623517a48c7cSmrg      fi
623617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
623717a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
623817a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
623917a48c7cSmrg      ;;
624017a48c7cSmrg
624117a48c7cSmrg    newsos6)
624217a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
624317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
624417a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
624517a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
624617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
624717a48c7cSmrg      ;;
624817a48c7cSmrg
624917a48c7cSmrg    openbsd*)
62508e0ed500Smrg      if test -f /usr/libexec/ld.so; then
62518e0ed500Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
62528e0ed500Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
62538e0ed500Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
62548e0ed500Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
62558e0ed500Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
62568e0ed500Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
62578e0ed500Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
62588e0ed500Smrg	else
62598e0ed500Smrg	  case $host_os in
62608e0ed500Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
62618e0ed500Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
62628e0ed500Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
62638e0ed500Smrg	     ;;
62648e0ed500Smrg	   *)
62658e0ed500Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
62668e0ed500Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
62678e0ed500Smrg	     ;;
62688e0ed500Smrg	  esac
62698e0ed500Smrg        fi
627017a48c7cSmrg      else
62718e0ed500Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
627217a48c7cSmrg      fi
627317a48c7cSmrg      ;;
627417a48c7cSmrg
627517a48c7cSmrg    os2*)
627617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
627717a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
627817a48c7cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
627917a48c7cSmrg      _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'
628017a48c7cSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
628117a48c7cSmrg      ;;
628217a48c7cSmrg
628317a48c7cSmrg    osf3*)
628417a48c7cSmrg      if test "$GCC" = yes; then
628517a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
628617a48c7cSmrg	_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'
628717a48c7cSmrg      else
628817a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
628917a48c7cSmrg	_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'
629017a48c7cSmrg      fi
629117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
629217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
629317a48c7cSmrg      ;;
629417a48c7cSmrg
629517a48c7cSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
629617a48c7cSmrg      if test "$GCC" = yes; then
629717a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
629817a48c7cSmrg	_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'
629917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
630017a48c7cSmrg      else
630117a48c7cSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
630217a48c7cSmrg	_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'
630317a48c7cSmrg	_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~
630417a48c7cSmrg	$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'
630517a48c7cSmrg
630617a48c7cSmrg	# Both c and cxx compiler support -rpath directly
630717a48c7cSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
630817a48c7cSmrg      fi
630917a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
631017a48c7cSmrg      ;;
631117a48c7cSmrg
631217a48c7cSmrg    solaris*)
631317a48c7cSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
631417a48c7cSmrg      if test "$GCC" = yes; then
631517a48c7cSmrg	wlarc='${wl}'
631617a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
631717a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
631817a48c7cSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
631917a48c7cSmrg      else
632017a48c7cSmrg	wlarc=''
632117a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
632217a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
632317a48c7cSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
632417a48c7cSmrg      fi
632517a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
632617a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
632717a48c7cSmrg      case $host_os in
632817a48c7cSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
632917a48c7cSmrg      *)
63308e0ed500Smrg	# The compiler driver will combine and reorder linker options,
63318e0ed500Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
63328e0ed500Smrg	# but is careful enough not to reorder.
633317a48c7cSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
63348e0ed500Smrg	if test "$GCC" = yes; then
63358e0ed500Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
63368e0ed500Smrg	else
63378e0ed500Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
63388e0ed500Smrg	fi
63398e0ed500Smrg	;;
634017a48c7cSmrg      esac
634117a48c7cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
634217a48c7cSmrg      ;;
634317a48c7cSmrg
634417a48c7cSmrg    sunos4*)
634517a48c7cSmrg      if test "x$host_vendor" = xsequent; then
634617a48c7cSmrg	# Use $CC to link under sequent, because it throws in some extra .o
634717a48c7cSmrg	# files that make .init and .fini sections work.
634817a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
634917a48c7cSmrg      else
635017a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
635117a48c7cSmrg      fi
635217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
635317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
635417a48c7cSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
635517a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
635617a48c7cSmrg      ;;
635717a48c7cSmrg
635817a48c7cSmrg    sysv4)
635917a48c7cSmrg      case $host_vendor in
636017a48c7cSmrg	sni)
636117a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
636217a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
636317a48c7cSmrg	;;
636417a48c7cSmrg	siemens)
636517a48c7cSmrg	  ## LD is ld it makes a PLAMLIB
636617a48c7cSmrg	  ## CC just makes a GrossModule.
636717a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
636817a48c7cSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
636917a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
637017a48c7cSmrg        ;;
637117a48c7cSmrg	motorola)
637217a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
637317a48c7cSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
637417a48c7cSmrg	;;
637517a48c7cSmrg      esac
637617a48c7cSmrg      runpath_var='LD_RUN_PATH'
637717a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
637817a48c7cSmrg      ;;
637917a48c7cSmrg
638017a48c7cSmrg    sysv4.3*)
638117a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
638217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
638317a48c7cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
638417a48c7cSmrg      ;;
638517a48c7cSmrg
638617a48c7cSmrg    sysv4*MP*)
638717a48c7cSmrg      if test -d /usr/nec; then
638817a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
638917a48c7cSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
639017a48c7cSmrg	runpath_var=LD_RUN_PATH
639117a48c7cSmrg	hardcode_runpath_var=yes
639217a48c7cSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
639317a48c7cSmrg      fi
639417a48c7cSmrg      ;;
639517a48c7cSmrg
63968e0ed500Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
639717a48c7cSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
639817a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
639917a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
640017a48c7cSmrg      runpath_var='LD_RUN_PATH'
640117a48c7cSmrg
640217a48c7cSmrg      if test "$GCC" = yes; then
640317a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640417a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640517a48c7cSmrg      else
640617a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640717a48c7cSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640817a48c7cSmrg      fi
640917a48c7cSmrg      ;;
641017a48c7cSmrg
641117a48c7cSmrg    sysv5* | sco3.2v5* | sco5v6*)
641217a48c7cSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
641317a48c7cSmrg      # link with -lc, and that would cause any symbols used from libc to
641417a48c7cSmrg      # always be unresolved, which means just about no library would
641517a48c7cSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
641617a48c7cSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
641717a48c7cSmrg      # as -z defs.
641817a48c7cSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
641917a48c7cSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
642017a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
642117a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
642217a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
642317a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
642417a48c7cSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
642517a48c7cSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
642617a48c7cSmrg      runpath_var='LD_RUN_PATH'
642717a48c7cSmrg
642817a48c7cSmrg      if test "$GCC" = yes; then
642917a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
643017a48c7cSmrg	_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'
643117a48c7cSmrg      else
643217a48c7cSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
643317a48c7cSmrg	_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'
643417a48c7cSmrg      fi
643517a48c7cSmrg      ;;
643617a48c7cSmrg
643717a48c7cSmrg    uts4*)
643817a48c7cSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
643917a48c7cSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
644017a48c7cSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
644117a48c7cSmrg      ;;
644217a48c7cSmrg
644317a48c7cSmrg    *)
644417a48c7cSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
644517a48c7cSmrg      ;;
644617a48c7cSmrg    esac
644717a48c7cSmrg  fi
644817a48c7cSmrg])
644917a48c7cSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
645017a48c7cSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
645117a48c7cSmrg
645217a48c7cSmrg#
645317a48c7cSmrg# Do we need to explicitly link libc?
645417a48c7cSmrg#
645517a48c7cSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
645617a48c7cSmrgx|xyes)
645717a48c7cSmrg  # Assume -lc should be added
645817a48c7cSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
645917a48c7cSmrg
646017a48c7cSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
646117a48c7cSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
646217a48c7cSmrg    *'~'*)
646317a48c7cSmrg      # FIXME: we may have to deal with multi-command sequences.
646417a48c7cSmrg      ;;
646517a48c7cSmrg    '$CC '*)
646617a48c7cSmrg      # Test whether the compiler implicitly links with -lc since on some
646717a48c7cSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
646817a48c7cSmrg      # to ld, don't add -lc before -lgcc.
646917a48c7cSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
647017a48c7cSmrg      $rm conftest*
64718e0ed500Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
647217a48c7cSmrg
647317a48c7cSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
647417a48c7cSmrg        soname=conftest
647517a48c7cSmrg        lib=conftest
647617a48c7cSmrg        libobjs=conftest.$ac_objext
647717a48c7cSmrg        deplibs=
647817a48c7cSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
647917a48c7cSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
648017a48c7cSmrg        compiler_flags=-v
648117a48c7cSmrg        linker_flags=-v
648217a48c7cSmrg        verstring=
648317a48c7cSmrg        output_objdir=.
648417a48c7cSmrg        libname=conftest
648517a48c7cSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
648617a48c7cSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
648717a48c7cSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
648817a48c7cSmrg        then
648917a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
649017a48c7cSmrg        else
649117a48c7cSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
649217a48c7cSmrg        fi
649317a48c7cSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
649417a48c7cSmrg      else
649517a48c7cSmrg        cat conftest.err 1>&5
649617a48c7cSmrg      fi
649717a48c7cSmrg      $rm conftest*
649817a48c7cSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
649917a48c7cSmrg      ;;
650017a48c7cSmrg    esac
650117a48c7cSmrg  fi
650217a48c7cSmrg  ;;
650317a48c7cSmrgesac
650417a48c7cSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
650517a48c7cSmrg
650617a48c7cSmrg
650717a48c7cSmrg# _LT_AC_FILE_LTDLL_C
650817a48c7cSmrg# -------------------
650917a48c7cSmrg# Be careful that the start marker always follows a newline.
651017a48c7cSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
651117a48c7cSmrg# /* ltdll.c starts here */
651217a48c7cSmrg# #define WIN32_LEAN_AND_MEAN
651317a48c7cSmrg# #include <windows.h>
651417a48c7cSmrg# #undef WIN32_LEAN_AND_MEAN
651517a48c7cSmrg# #include <stdio.h>
651617a48c7cSmrg#
651717a48c7cSmrg# #ifndef __CYGWIN__
651817a48c7cSmrg# #  ifdef __CYGWIN32__
651917a48c7cSmrg# #    define __CYGWIN__ __CYGWIN32__
652017a48c7cSmrg# #  endif
652117a48c7cSmrg# #endif
652217a48c7cSmrg#
652317a48c7cSmrg# #ifdef __cplusplus
652417a48c7cSmrg# extern "C" {
652517a48c7cSmrg# #endif
652617a48c7cSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
652717a48c7cSmrg# #ifdef __cplusplus
652817a48c7cSmrg# }
652917a48c7cSmrg# #endif
653017a48c7cSmrg#
653117a48c7cSmrg# #ifdef __CYGWIN__
653217a48c7cSmrg# #include <cygwin/cygwin_dll.h>
653317a48c7cSmrg# DECLARE_CYGWIN_DLL( DllMain );
653417a48c7cSmrg# #endif
653517a48c7cSmrg# HINSTANCE __hDllInstance_base;
653617a48c7cSmrg#
653717a48c7cSmrg# BOOL APIENTRY
653817a48c7cSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
653917a48c7cSmrg# {
654017a48c7cSmrg#   __hDllInstance_base = hInst;
654117a48c7cSmrg#   return TRUE;
654217a48c7cSmrg# }
654317a48c7cSmrg# /* ltdll.c ends here */
654417a48c7cSmrg])# _LT_AC_FILE_LTDLL_C
654517a48c7cSmrg
654617a48c7cSmrg
654717a48c7cSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
654817a48c7cSmrg# ---------------------------------
654917a48c7cSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
655017a48c7cSmrg
655117a48c7cSmrg
655217a48c7cSmrg# old names
655317a48c7cSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
655417a48c7cSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
655517a48c7cSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
655617a48c7cSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
655717a48c7cSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
655817a48c7cSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
655917a48c7cSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
656017a48c7cSmrg
656117a48c7cSmrg# This is just to silence aclocal about the macro not being used
656217a48c7cSmrgifelse([AC_DISABLE_FAST_INSTALL])
656317a48c7cSmrg
656417a48c7cSmrgAC_DEFUN([LT_AC_PROG_GCJ],
656517a48c7cSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
656617a48c7cSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
656717a48c7cSmrg  AC_SUBST(GCJFLAGS)
656817a48c7cSmrg])
656917a48c7cSmrg
657017a48c7cSmrgAC_DEFUN([LT_AC_PROG_RC],
657117a48c7cSmrg[AC_CHECK_TOOL(RC, windres, no)
657217a48c7cSmrg])
657317a48c7cSmrg
65748e0ed500Smrg
65758e0ed500Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
65768e0ed500Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
65778e0ed500Smrg
65788e0ed500Smrg# _AS_TEST_PREPARE
65798e0ed500Smrg# ----------------
65808e0ed500Smrgm4_ifndef([_AS_TEST_PREPARE],
65818e0ed500Smrg[m4_defun([_AS_TEST_PREPARE],
65828e0ed500Smrg[if test -x / >/dev/null 2>&1; then
65838e0ed500Smrg  as_executable_p='test -x'
65848e0ed500Smrgelse
65858e0ed500Smrg  as_executable_p='test -f'
65868e0ed500Smrgfi
65878e0ed500Smrg])])# _AS_TEST_PREPARE
65888e0ed500Smrg
65898e0ed500Smrg# AS_EXECUTABLE_P
65908e0ed500Smrg# ---------------
65918e0ed500Smrg# Check whether a file is executable.
65928e0ed500Smrgm4_ifndef([AS_EXECUTABLE_P],
65938e0ed500Smrg[m4_defun([AS_EXECUTABLE_P],
65948e0ed500Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
65958e0ed500Smrg$as_executable_p $1[]dnl
65968e0ed500Smrg])])# AS_EXECUTABLE_P
65978e0ed500Smrg
659817a48c7cSmrg# NOTE: This macro has been submitted for inclusion into   #
659917a48c7cSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
660017a48c7cSmrg#  a released version of Autoconf we should remove this    #
660117a48c7cSmrg#  macro and use it instead.                               #
660217a48c7cSmrg# LT_AC_PROG_SED
660317a48c7cSmrg# --------------
660417a48c7cSmrg# Check for a fully-functional sed program, that truncates
660517a48c7cSmrg# as few characters as possible.  Prefer GNU sed if found.
660617a48c7cSmrgAC_DEFUN([LT_AC_PROG_SED],
660717a48c7cSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
660817a48c7cSmrgAC_CACHE_VAL(lt_cv_path_SED,
660917a48c7cSmrg[# Loop through the user's path and test for sed and gsed.
661017a48c7cSmrg# Then use that list of sed's as ones to test for truncation.
661117a48c7cSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
661217a48c7cSmrgfor as_dir in $PATH
661317a48c7cSmrgdo
661417a48c7cSmrg  IFS=$as_save_IFS
661517a48c7cSmrg  test -z "$as_dir" && as_dir=.
661617a48c7cSmrg  for lt_ac_prog in sed gsed; do
661717a48c7cSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
66188e0ed500Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
661917a48c7cSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
662017a48c7cSmrg      fi
662117a48c7cSmrg    done
662217a48c7cSmrg  done
662317a48c7cSmrgdone
66248e0ed500SmrgIFS=$as_save_IFS
662517a48c7cSmrglt_ac_max=0
662617a48c7cSmrglt_ac_count=0
662717a48c7cSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
662817a48c7cSmrg# along with /bin/sed that truncates output.
662917a48c7cSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
663017a48c7cSmrg  test ! -f $lt_ac_sed && continue
663117a48c7cSmrg  cat /dev/null > conftest.in
663217a48c7cSmrg  lt_ac_count=0
663317a48c7cSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
663417a48c7cSmrg  # Check for GNU sed and select it if it is found.
663517a48c7cSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
663617a48c7cSmrg    lt_cv_path_SED=$lt_ac_sed
663717a48c7cSmrg    break
663817a48c7cSmrg  fi
663917a48c7cSmrg  while true; do
664017a48c7cSmrg    cat conftest.in conftest.in >conftest.tmp
664117a48c7cSmrg    mv conftest.tmp conftest.in
664217a48c7cSmrg    cp conftest.in conftest.nl
664317a48c7cSmrg    echo >>conftest.nl
664417a48c7cSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
664517a48c7cSmrg    cmp -s conftest.out conftest.nl || break
664617a48c7cSmrg    # 10000 chars as input seems more than enough
664717a48c7cSmrg    test $lt_ac_count -gt 10 && break
664817a48c7cSmrg    lt_ac_count=`expr $lt_ac_count + 1`
664917a48c7cSmrg    if test $lt_ac_count -gt $lt_ac_max; then
665017a48c7cSmrg      lt_ac_max=$lt_ac_count
665117a48c7cSmrg      lt_cv_path_SED=$lt_ac_sed
665217a48c7cSmrg    fi
665317a48c7cSmrg  done
665417a48c7cSmrgdone
665517a48c7cSmrg])
665617a48c7cSmrgSED=$lt_cv_path_SED
66578e0ed500SmrgAC_SUBST([SED])
665817a48c7cSmrgAC_MSG_RESULT([$SED])
665917a48c7cSmrg])
666017a48c7cSmrg
666117a48c7cSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
666217a48c7cSmrg# 
666317a48c7cSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
666417a48c7cSmrg#
666517a48c7cSmrg# This program is free software; you can redistribute it and/or modify
666617a48c7cSmrg# it under the terms of the GNU General Public License as published by
666717a48c7cSmrg# the Free Software Foundation; either version 2 of the License, or
666817a48c7cSmrg# (at your option) any later version.
666917a48c7cSmrg#
667017a48c7cSmrg# This program is distributed in the hope that it will be useful, but
667117a48c7cSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
667217a48c7cSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
667317a48c7cSmrg# General Public License for more details.
667417a48c7cSmrg#
667517a48c7cSmrg# You should have received a copy of the GNU General Public License
667617a48c7cSmrg# along with this program; if not, write to the Free Software
667717a48c7cSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
667817a48c7cSmrg#
667917a48c7cSmrg# As a special exception to the GNU General Public License, if you
668017a48c7cSmrg# distribute this file as part of a program that contains a
668117a48c7cSmrg# configuration script generated by Autoconf, you may include it under
668217a48c7cSmrg# the same distribution terms that you use for the rest of that program.
668317a48c7cSmrg
668417a48c7cSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
668517a48c7cSmrg# ----------------------------------
668617a48c7cSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
668717a48c7cSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
668817a48c7cSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
668917a48c7cSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
669017a48c7cSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
669117a48c7cSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
669217a48c7cSmrgfi
669317a48c7cSmrgif test -n "$PKG_CONFIG"; then
669417a48c7cSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
669517a48c7cSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
669617a48c7cSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
669717a48c7cSmrg		AC_MSG_RESULT([yes])
669817a48c7cSmrg	else
669917a48c7cSmrg		AC_MSG_RESULT([no])
670017a48c7cSmrg		PKG_CONFIG=""
670117a48c7cSmrg	fi
670217a48c7cSmrg		
670317a48c7cSmrgfi[]dnl
670417a48c7cSmrg])# PKG_PROG_PKG_CONFIG
670517a48c7cSmrg
670617a48c7cSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
670717a48c7cSmrg#
670817a48c7cSmrg# Check to see whether a particular set of modules exists.  Similar
670917a48c7cSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
671017a48c7cSmrg#
671117a48c7cSmrg#
671217a48c7cSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
671317a48c7cSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
671417a48c7cSmrg# PKG_CHECK_EXISTS manually
671517a48c7cSmrg# --------------------------------------------------------------
671617a48c7cSmrgAC_DEFUN([PKG_CHECK_EXISTS],
671717a48c7cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
671817a48c7cSmrgif test -n "$PKG_CONFIG" && \
671917a48c7cSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
672017a48c7cSmrg  m4_ifval([$2], [$2], [:])
672117a48c7cSmrgm4_ifvaln([$3], [else
672217a48c7cSmrg  $3])dnl
672317a48c7cSmrgfi])
672417a48c7cSmrg
672517a48c7cSmrg
672617a48c7cSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
672717a48c7cSmrg# ---------------------------------------------
672817a48c7cSmrgm4_define([_PKG_CONFIG],
67298e0ed500Smrg[if test -n "$$1"; then
67308e0ed500Smrg    pkg_cv_[]$1="$$1"
67318e0ed500Smrg elif test -n "$PKG_CONFIG"; then
67328e0ed500Smrg    PKG_CHECK_EXISTS([$3],
67338e0ed500Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
67348e0ed500Smrg		     [pkg_failed=yes])
67358e0ed500Smrg else
67368e0ed500Smrg    pkg_failed=untried
673717a48c7cSmrgfi[]dnl
673817a48c7cSmrg])# _PKG_CONFIG
673917a48c7cSmrg
674017a48c7cSmrg# _PKG_SHORT_ERRORS_SUPPORTED
674117a48c7cSmrg# -----------------------------
674217a48c7cSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
674317a48c7cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
674417a48c7cSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
674517a48c7cSmrg        _pkg_short_errors_supported=yes
674617a48c7cSmrgelse
674717a48c7cSmrg        _pkg_short_errors_supported=no
674817a48c7cSmrgfi[]dnl
674917a48c7cSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
675017a48c7cSmrg
675117a48c7cSmrg
675217a48c7cSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
675317a48c7cSmrg# [ACTION-IF-NOT-FOUND])
675417a48c7cSmrg#
675517a48c7cSmrg#
675617a48c7cSmrg# Note that if there is a possibility the first call to
675717a48c7cSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
675817a48c7cSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
675917a48c7cSmrg#
676017a48c7cSmrg#
676117a48c7cSmrg# --------------------------------------------------------------
676217a48c7cSmrgAC_DEFUN([PKG_CHECK_MODULES],
676317a48c7cSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
676417a48c7cSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
676517a48c7cSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
676617a48c7cSmrg
676717a48c7cSmrgpkg_failed=no
676817a48c7cSmrgAC_MSG_CHECKING([for $1])
676917a48c7cSmrg
677017a48c7cSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
677117a48c7cSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
677217a48c7cSmrg
677317a48c7cSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
677417a48c7cSmrgand $1[]_LIBS to avoid the need to call pkg-config.
677517a48c7cSmrgSee the pkg-config man page for more details.])
677617a48c7cSmrg
677717a48c7cSmrgif test $pkg_failed = yes; then
677817a48c7cSmrg        _PKG_SHORT_ERRORS_SUPPORTED
677917a48c7cSmrg        if test $_pkg_short_errors_supported = yes; then
67808e0ed500Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
678117a48c7cSmrg        else 
67828e0ed500Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
678317a48c7cSmrg        fi
678417a48c7cSmrg	# Put the nasty error message in config.log where it belongs
678517a48c7cSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
678617a48c7cSmrg
678717a48c7cSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
678817a48c7cSmrg[Package requirements ($2) were not met:
678917a48c7cSmrg
679017a48c7cSmrg$$1_PKG_ERRORS
679117a48c7cSmrg
679217a48c7cSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
679317a48c7cSmrginstalled software in a non-standard prefix.
679417a48c7cSmrg
679517a48c7cSmrg_PKG_TEXT
679617a48c7cSmrg])],
67978e0ed500Smrg		[AC_MSG_RESULT([no])
67988e0ed500Smrg                $4])
679917a48c7cSmrgelif test $pkg_failed = untried; then
680017a48c7cSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
680117a48c7cSmrg[The pkg-config script could not be found or is too old.  Make sure it
680217a48c7cSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
680317a48c7cSmrgpath to pkg-config.
680417a48c7cSmrg
680517a48c7cSmrg_PKG_TEXT
680617a48c7cSmrg
68078e0ed500SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
680817a48c7cSmrg		[$4])
680917a48c7cSmrgelse
681017a48c7cSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
681117a48c7cSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
681217a48c7cSmrg        AC_MSG_RESULT([yes])
681317a48c7cSmrg	ifelse([$3], , :, [$3])
681417a48c7cSmrgfi[]dnl
681517a48c7cSmrg])# PKG_CHECK_MODULES
681617a48c7cSmrg
681717a48c7cSmrgdnl
68188e0ed500Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
681917a48c7cSmrgdnl 
68208e0ed500Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
68218e0ed500Smrgdnl copy of this software and associated documentation files (the
68228e0ed500Smrgdnl "Software"), to deal in the Software without restriction, including
68238e0ed500Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
68248e0ed500Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
68258e0ed500Smrgdnl to whom the Software is furnished to do so, provided that the above
68268e0ed500Smrgdnl copyright notice(s) and this permission notice appear in all copies of
68278e0ed500Smrgdnl the Software and that both the above copyright notice(s) and this
68288e0ed500Smrgdnl permission notice appear in supporting documentation.
68298e0ed500Smrgdnl
683017a48c7cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
683117a48c7cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
68328e0ed500Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
68338e0ed500Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
68348e0ed500Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
68358e0ed500Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
68368e0ed500Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
68378e0ed500Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
68388e0ed500Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
68398e0ed500Smrgdnl
68408e0ed500Smrgdnl Except as contained in this notice, the name of a copyright holder
68418e0ed500Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
68428e0ed500Smrgdnl or other dealings in this Software without prior written authorization
68438e0ed500Smrgdnl of the copyright holder.
68448e0ed500Smrg
68458e0ed500Smrg# XORG_MACROS_VERSION(required-version)
68468e0ed500Smrg# -------------------------------------
68478e0ed500Smrg# Minimum version: 1.1.0
68488e0ed500Smrg#
68498e0ed500Smrg# If you're using a macro added in Version 1.1 or newer, include this in
68508e0ed500Smrg# your configure.ac with the minimum required version, such as:
68518e0ed500Smrg# XORG_MACROS_VERSION(1.1)
68528e0ed500Smrg#
68538e0ed500Smrg# To force at least a version with this macro defined, also add:
68548e0ed500Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
68558e0ed500Smrg#
68568e0ed500Smrg#
68578e0ed500Smrg# See the "minimum version" comment for each macro you use to see what 
68588e0ed500Smrg# version you require.
68598e0ed500SmrgAC_DEFUN([XORG_MACROS_VERSION],[
68608e0ed500Smrg	[XORG_MACROS_needed_version=$1
68618e0ed500Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
68628e0ed500Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
68638e0ed500Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
68648e0ed500Smrg	[XORG_MACROS_version=1.1.6
68658e0ed500Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
68668e0ed500Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
68678e0ed500Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
68688e0ed500Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
68698e0ed500Smrg	fi
68708e0ed500Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
68718e0ed500Smrg		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])
68728e0ed500Smrg	fi
68738e0ed500Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
68748e0ed500Smrg]) # XORG_MACROS_VERSION
687517a48c7cSmrg
687617a48c7cSmrg# XORG_PROG_RAWCPP()
687717a48c7cSmrg# ------------------
68788e0ed500Smrg# Minimum version: 1.0.0
68798e0ed500Smrg#
688017a48c7cSmrg# Find cpp program and necessary flags for use in pre-processing text files
688117a48c7cSmrg# such as man pages and config files
688217a48c7cSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
688317a48c7cSmrgAC_REQUIRE([AC_PROG_CPP])
688417a48c7cSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
688517a48c7cSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
688617a48c7cSmrg
688717a48c7cSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
688817a48c7cSmrg# which is not the best choice for supporting other OS'es, but covers most
688917a48c7cSmrg# of the ones we need for now.
689017a48c7cSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
689117a48c7cSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
689217a48c7cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
689317a48c7cSmrg	AC_MSG_RESULT([no])
689417a48c7cSmrgelse
689517a48c7cSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
689617a48c7cSmrg		RAWCPPFLAGS=-undef
689717a48c7cSmrg		AC_MSG_RESULT([yes])
689817a48c7cSmrg	else
689917a48c7cSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
690017a48c7cSmrg	fi
690117a48c7cSmrgfi
690217a48c7cSmrgrm -f conftest.$ac_ext
690317a48c7cSmrg
690417a48c7cSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
690517a48c7cSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
690617a48c7cSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
690717a48c7cSmrg	AC_MSG_RESULT([no])
690817a48c7cSmrgelse
690917a48c7cSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
691017a48c7cSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
691117a48c7cSmrg		AC_MSG_RESULT([yes])
691217a48c7cSmrg	else
691317a48c7cSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
691417a48c7cSmrg	fi
691517a48c7cSmrgfi
691617a48c7cSmrgrm -f conftest.$ac_ext
691717a48c7cSmrgAC_SUBST(RAWCPPFLAGS)
691817a48c7cSmrg]) # XORG_PROG_RAWCPP
691917a48c7cSmrg
692017a48c7cSmrg# XORG_MANPAGE_SECTIONS()
692117a48c7cSmrg# -----------------------
69228e0ed500Smrg# Minimum version: 1.0.0
69238e0ed500Smrg#
692417a48c7cSmrg# Determine which sections man pages go in for the different man page types
692517a48c7cSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
692617a48c7cSmrg# Not sure if there's any better way than just hardcoding by OS name.
692717a48c7cSmrg# Override default settings by setting environment variables
692817a48c7cSmrg
692917a48c7cSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
693017a48c7cSmrgAC_REQUIRE([AC_CANONICAL_HOST])
693117a48c7cSmrg
693217a48c7cSmrgif test x$APP_MAN_SUFFIX = x    ; then
69338e0ed500Smrg    APP_MAN_SUFFIX=1
693417a48c7cSmrgfi
693517a48c7cSmrgif test x$APP_MAN_DIR = x    ; then
69368e0ed500Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
693717a48c7cSmrgfi
693817a48c7cSmrg
693917a48c7cSmrgif test x$LIB_MAN_SUFFIX = x    ; then
69408e0ed500Smrg    LIB_MAN_SUFFIX=3
694117a48c7cSmrgfi
694217a48c7cSmrgif test x$LIB_MAN_DIR = x    ; then
69438e0ed500Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
694417a48c7cSmrgfi
694517a48c7cSmrg
694617a48c7cSmrgif test x$FILE_MAN_SUFFIX = x    ; then
694717a48c7cSmrg    case $host_os in
694817a48c7cSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
694917a48c7cSmrg	*)		FILE_MAN_SUFFIX=5  ;;
695017a48c7cSmrg    esac
695117a48c7cSmrgfi
695217a48c7cSmrgif test x$FILE_MAN_DIR = x    ; then
69538e0ed500Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
695417a48c7cSmrgfi
695517a48c7cSmrg
695617a48c7cSmrgif test x$MISC_MAN_SUFFIX = x    ; then
695717a48c7cSmrg    case $host_os in
695817a48c7cSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
695917a48c7cSmrg	*)		MISC_MAN_SUFFIX=7  ;;
696017a48c7cSmrg    esac
696117a48c7cSmrgfi
696217a48c7cSmrgif test x$MISC_MAN_DIR = x    ; then
69638e0ed500Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
696417a48c7cSmrgfi
696517a48c7cSmrg
696617a48c7cSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
696717a48c7cSmrg    case $host_os in
696817a48c7cSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
696917a48c7cSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
697017a48c7cSmrg    esac
697117a48c7cSmrgfi
697217a48c7cSmrgif test x$DRIVER_MAN_DIR = x    ; then
69738e0ed500Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
697417a48c7cSmrgfi
697517a48c7cSmrg
697617a48c7cSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
697717a48c7cSmrg    case $host_os in
697817a48c7cSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
697917a48c7cSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
698017a48c7cSmrg    esac
698117a48c7cSmrgfi
698217a48c7cSmrgif test x$ADMIN_MAN_DIR = x    ; then
698317a48c7cSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
698417a48c7cSmrgfi
698517a48c7cSmrg
698617a48c7cSmrg
698717a48c7cSmrgAC_SUBST([APP_MAN_SUFFIX])
698817a48c7cSmrgAC_SUBST([LIB_MAN_SUFFIX])
698917a48c7cSmrgAC_SUBST([FILE_MAN_SUFFIX])
699017a48c7cSmrgAC_SUBST([MISC_MAN_SUFFIX])
699117a48c7cSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
699217a48c7cSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
699317a48c7cSmrgAC_SUBST([APP_MAN_DIR])
699417a48c7cSmrgAC_SUBST([LIB_MAN_DIR])
699517a48c7cSmrgAC_SUBST([FILE_MAN_DIR])
699617a48c7cSmrgAC_SUBST([MISC_MAN_DIR])
699717a48c7cSmrgAC_SUBST([DRIVER_MAN_DIR])
699817a48c7cSmrgAC_SUBST([ADMIN_MAN_DIR])
699917a48c7cSmrg]) # XORG_MANPAGE_SECTIONS
700017a48c7cSmrg
700117a48c7cSmrg# XORG_CHECK_LINUXDOC
700217a48c7cSmrg# -------------------
70038e0ed500Smrg# Minimum version: 1.0.0
70048e0ed500Smrg#
700517a48c7cSmrg# Defines the variable MAKE_TEXT if the necessary tools and
700617a48c7cSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
700717a48c7cSmrg# Whether or not the necessary tools and files are found can be checked
700817a48c7cSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
700917a48c7cSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
70108e0ed500SmrgXORG_SGML_PATH=$prefix/share/sgml
70118e0ed500SmrgHAVE_DEFS_ENT=
70128e0ed500Smrg
70138e0ed500Smrgif test x"$cross_compiling" = x"yes" ; then
70148e0ed500Smrg  HAVE_DEFS_ENT=no
70158e0ed500Smrgelse
70168e0ed500Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
70178e0ed500Smrgfi
701817a48c7cSmrg
701917a48c7cSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
702017a48c7cSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
702117a48c7cSmrg
702217a48c7cSmrgAC_MSG_CHECKING([Whether to build documentation])
702317a48c7cSmrg
70248e0ed500Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
702517a48c7cSmrg   BUILDDOC=yes
702617a48c7cSmrgelse
702717a48c7cSmrg   BUILDDOC=no
702817a48c7cSmrgfi
702917a48c7cSmrg
703017a48c7cSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
703117a48c7cSmrg
703217a48c7cSmrgAC_MSG_RESULT([$BUILDDOC])
703317a48c7cSmrg
703417a48c7cSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
703517a48c7cSmrg
70368e0ed500Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
703717a48c7cSmrg   BUILDPDFDOC=yes
703817a48c7cSmrgelse
703917a48c7cSmrg   BUILDPDFDOC=no
704017a48c7cSmrgfi
704117a48c7cSmrg
704217a48c7cSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
704317a48c7cSmrg
704417a48c7cSmrgAC_MSG_RESULT([$BUILDPDFDOC])
704517a48c7cSmrg
70468e0ed500SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
70478e0ed500SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
704817a48c7cSmrgMAKE_PDF="$PS2PDF"
70498e0ed500SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
705017a48c7cSmrg
705117a48c7cSmrgAC_SUBST(MAKE_TEXT)
705217a48c7cSmrgAC_SUBST(MAKE_PS)
705317a48c7cSmrgAC_SUBST(MAKE_PDF)
705417a48c7cSmrgAC_SUBST(MAKE_HTML)
705517a48c7cSmrg]) # XORG_CHECK_LINUXDOC
705617a48c7cSmrg
70578e0ed500Smrg# XORG_CHECK_DOCBOOK
70588e0ed500Smrg# -------------------
70598e0ed500Smrg# Minimum version: 1.0.0
70608e0ed500Smrg#
70618e0ed500Smrg# Checks for the ability to build output formats from SGML DocBook source.
70628e0ed500Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
70638e0ed500Smrg# indicates whether the necessary tools and files are found and, if set,
70648e0ed500Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
70658e0ed500SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
70668e0ed500SmrgXORG_SGML_PATH=$prefix/share/sgml
70678e0ed500SmrgHAVE_DEFS_ENT=
70688e0ed500SmrgBUILDTXTDOC=no
70698e0ed500SmrgBUILDPDFDOC=no
70708e0ed500SmrgBUILDPSDOC=no
70718e0ed500SmrgBUILDHTMLDOC=no
70728e0ed500Smrg
70738e0ed500SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
70748e0ed500Smrg
70758e0ed500SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
70768e0ed500SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
70778e0ed500SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
70788e0ed500SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
70798e0ed500Smrg
70808e0ed500SmrgAC_MSG_CHECKING([Whether to build text documentation])
70818e0ed500Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
70828e0ed500Smrg   test x$BUILD_TXTDOC != xno; then
70838e0ed500Smrg	BUILDTXTDOC=yes
70848e0ed500Smrgfi
70858e0ed500SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
70868e0ed500SmrgAC_MSG_RESULT([$BUILDTXTDOC])
70878e0ed500Smrg
70888e0ed500SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
70898e0ed500Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
70908e0ed500Smrg   test x$BUILD_PDFDOC != xno; then
70918e0ed500Smrg	BUILDPDFDOC=yes
70928e0ed500Smrgfi
70938e0ed500SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
70948e0ed500SmrgAC_MSG_RESULT([$BUILDPDFDOC])
70958e0ed500Smrg
70968e0ed500SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
70978e0ed500Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
70988e0ed500Smrg   test x$BUILD_PSDOC != xno; then
70998e0ed500Smrg	BUILDPSDOC=yes
71008e0ed500Smrgfi
71018e0ed500SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
71028e0ed500SmrgAC_MSG_RESULT([$BUILDPSDOC])
71038e0ed500Smrg
71048e0ed500SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
71058e0ed500Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
71068e0ed500Smrg   test x$BUILD_HTMLDOC != xno; then
71078e0ed500Smrg	BUILDHTMLDOC=yes
71088e0ed500Smrgfi
71098e0ed500SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
71108e0ed500SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
71118e0ed500Smrg
71128e0ed500SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
71138e0ed500SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
71148e0ed500SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
71158e0ed500SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
71168e0ed500Smrg
71178e0ed500SmrgAC_SUBST(MAKE_TEXT)
71188e0ed500SmrgAC_SUBST(MAKE_PS)
71198e0ed500SmrgAC_SUBST(MAKE_PDF)
71208e0ed500SmrgAC_SUBST(MAKE_HTML)
71218e0ed500Smrg]) # XORG_CHECK_DOCBOOK
71228e0ed500Smrg
712317a48c7cSmrg# XORG_CHECK_MALLOC_ZERO
712417a48c7cSmrg# ----------------------
71258e0ed500Smrg# Minimum version: 1.0.0
71268e0ed500Smrg#
712717a48c7cSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
712817a48c7cSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
712917a48c7cSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
713017a48c7cSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
713117a48c7cSmrgAC_ARG_ENABLE(malloc0returnsnull,
713217a48c7cSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
713317a48c7cSmrg		       [malloc(0) returns NULL (default: auto)]),
713417a48c7cSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
713517a48c7cSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
713617a48c7cSmrg
713717a48c7cSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
713817a48c7cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
713917a48c7cSmrg	AC_RUN_IFELSE([
714017a48c7cSmrgchar *malloc();
714117a48c7cSmrgchar *realloc();
714217a48c7cSmrgchar *calloc();
714317a48c7cSmrgmain() {
714417a48c7cSmrg    char *m0, *r0, *c0, *p;
714517a48c7cSmrg    m0 = malloc(0);
714617a48c7cSmrg    p = malloc(10);
714717a48c7cSmrg    r0 = realloc(p,0);
714817a48c7cSmrg    c0 = calloc(0);
714917a48c7cSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
715017a48c7cSmrg}],
715117a48c7cSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
715217a48c7cSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
715317a48c7cSmrgfi
715417a48c7cSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
715517a48c7cSmrg
715617a48c7cSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
715717a48c7cSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
715817a48c7cSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
715917a48c7cSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
716017a48c7cSmrgelse
716117a48c7cSmrg	MALLOC_ZERO_CFLAGS=""
716217a48c7cSmrg	XMALLOC_ZERO_CFLAGS=""
716317a48c7cSmrg	XTMALLOC_ZERO_CFLAGS=""
716417a48c7cSmrgfi
716517a48c7cSmrg
716617a48c7cSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
716717a48c7cSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
716817a48c7cSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
716917a48c7cSmrg]) # XORG_CHECK_MALLOC_ZERO
717017a48c7cSmrg
71718e0ed500Smrg# XORG_WITH_LINT()
71728e0ed500Smrg# ----------------
71738e0ed500Smrg# Minimum version: 1.1.0
71748e0ed500Smrg#
71758e0ed500Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
71768e0ed500Smrg# is specified.   (Use --with-lint=sparse for sparse.)
71778e0ed500Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
71788e0ed500Smrg# Sets $LINT_FLAGS to flags to pass to source checker
71798e0ed500Smrg# Sets LINT automake conditional if enabled (default: disabled)
71808e0ed500Smrg#
71818e0ed500SmrgAC_DEFUN([XORG_WITH_LINT],[
71828e0ed500Smrg
71838e0ed500Smrg# Allow checking code with lint, sparse, etc.
71848e0ed500SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
71858e0ed500Smrg		[Use a lint-style source code checker (default: disabled)])],
71868e0ed500Smrg		[use_lint=$withval], [use_lint=no])
71878e0ed500Smrgif test "x$use_lint" = "xyes" ; then
71888e0ed500Smrg	LINT="lint"
71898e0ed500Smrgelse
71908e0ed500Smrg	LINT="$use_lint"
71918e0ed500Smrgfi
71928e0ed500Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
71938e0ed500Smrg    case $LINT in
71948e0ed500Smrg	lint|*/lint)
71958e0ed500Smrg	    case $host_os in
71968e0ed500Smrg		solaris*)
71978e0ed500Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
71988e0ed500Smrg			;;
71998e0ed500Smrg	    esac
72008e0ed500Smrg	    ;;
72018e0ed500Smrg    esac
72028e0ed500Smrgfi
72038e0ed500Smrg
72048e0ed500SmrgAC_SUBST(LINT)
72058e0ed500SmrgAC_SUBST(LINT_FLAGS)
72068e0ed500SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
72078e0ed500Smrg
72088e0ed500Smrg]) # XORG_WITH_LINT
72098e0ed500Smrg
72108e0ed500Smrg# XORG_LINT_LIBRARY(LIBNAME)
72118e0ed500Smrg# --------------------------
72128e0ed500Smrg# Minimum version: 1.1.0
72138e0ed500Smrg#
72148e0ed500Smrg# Sets up flags for building lint libraries for checking programs that call
72158e0ed500Smrg# functions in the library.
72168e0ed500Smrg# Disabled by default, enable with --enable-lint-library
72178e0ed500Smrg# Sets: 
72188e0ed500Smrg#	@LINTLIB@		- name of lint library file to make
72198e0ed500Smrg#	MAKE_LINT_LIB		- automake conditional
72208e0ed500Smrg#
72218e0ed500Smrg
72228e0ed500SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
72238e0ed500SmrgAC_REQUIRE([XORG_WITH_LINT])
72248e0ed500Smrg# Build lint "library" for more indepth checks of programs calling this library
72258e0ed500SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
72268e0ed500Smrg	[Create lint library (default: disabled)])],
72278e0ed500Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
72288e0ed500Smrgif test "x$make_lint_lib" != "xno" ; then
72298e0ed500Smrg	if test "x$LINT" = "xno" ; then
72308e0ed500Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
72318e0ed500Smrg	fi
72328e0ed500Smrg	if test "x$make_lint_lib" = "xyes" ; then
72338e0ed500Smrg		LINTLIB=llib-l$1.ln
72348e0ed500Smrg	else
72358e0ed500Smrg		LINTLIB=$make_lint_lib
72368e0ed500Smrg	fi
72378e0ed500Smrgfi
72388e0ed500SmrgAC_SUBST(LINTLIB)
72398e0ed500SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
72408e0ed500Smrg
72418e0ed500Smrg]) # XORG_LINT_LIBRARY
72428e0ed500Smrg
724317a48c7cSmrgdnl Copyright 2005 Red Hat, Inc
724417a48c7cSmrgdnl 
724517a48c7cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
724617a48c7cSmrgdnl documentation for any purpose is hereby granted without fee, provided that
724717a48c7cSmrgdnl the above copyright notice appear in all copies and that both that
724817a48c7cSmrgdnl copyright notice and this permission notice appear in supporting
724917a48c7cSmrgdnl documentation.
725017a48c7cSmrgdnl 
725117a48c7cSmrgdnl The above copyright notice and this permission notice shall be included
725217a48c7cSmrgdnl in all copies or substantial portions of the Software.
725317a48c7cSmrgdnl 
725417a48c7cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
725517a48c7cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
725617a48c7cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
725717a48c7cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
725817a48c7cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
725917a48c7cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
726017a48c7cSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
726117a48c7cSmrgdnl 
726217a48c7cSmrgdnl Except as contained in this notice, the name of the copyright holders shall
726317a48c7cSmrgdnl not be used in advertising or otherwise to promote the sale, use or
726417a48c7cSmrgdnl other dealings in this Software without prior written authorization
726517a48c7cSmrgdnl from the copyright holders.
726617a48c7cSmrgdnl 
726717a48c7cSmrg
726817a48c7cSmrg# XORG_DRIVER_CHECK_EXT()
726917a48c7cSmrg# --------------------------
727017a48c7cSmrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
727117a48c7cSmrg# is defined, then add $1 to $REQUIRED_MODULES.
727217a48c7cSmrg
727317a48c7cSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
727417a48c7cSmrg	SAVE_CFLAGS="$CFLAGS"
727517a48c7cSmrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
727617a48c7cSmrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
727717a48c7cSmrg#include "xorg-server.h"
727817a48c7cSmrg#if !defined $1
727917a48c7cSmrg#error $1 not defined
728017a48c7cSmrg#endif
728117a48c7cSmrg		]])],
728217a48c7cSmrg		[_EXT_CHECK=yes],
728317a48c7cSmrg		[_EXT_CHECK=no])
728417a48c7cSmrg	CFLAGS="$SAVE_CFLAGS"
728517a48c7cSmrg	AC_MSG_CHECKING([if $1 is defined])
728617a48c7cSmrg	AC_MSG_RESULT([$_EXT_CHECK])
728717a48c7cSmrg	if test "$_EXT_CHECK" != no; then
728817a48c7cSmrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
728917a48c7cSmrg	fi
729017a48c7cSmrg])
729117a48c7cSmrg
729217a48c7cSmrgdnl Copyright 2005 Red Hat, Inc
729317a48c7cSmrgdnl
729417a48c7cSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
729517a48c7cSmrgdnl documentation for any purpose is hereby granted without fee, provided that
729617a48c7cSmrgdnl the above copyright notice appear in all copies and that both that
729717a48c7cSmrgdnl copyright notice and this permission notice appear in supporting
729817a48c7cSmrgdnl documentation.
729917a48c7cSmrgdnl
730017a48c7cSmrgdnl The above copyright notice and this permission notice shall be included
730117a48c7cSmrgdnl in all copies or substantial portions of the Software.
730217a48c7cSmrgdnl
730317a48c7cSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
730417a48c7cSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
730517a48c7cSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
730617a48c7cSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
730717a48c7cSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
730817a48c7cSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
730917a48c7cSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
731017a48c7cSmrgdnl
731117a48c7cSmrgdnl Except as contained in this notice, the name of the copyright holders shall
731217a48c7cSmrgdnl not be used in advertising or otherwise to promote the sale, use or
731317a48c7cSmrgdnl other dealings in this Software without prior written authorization
731417a48c7cSmrgdnl from the copyright holders.
731517a48c7cSmrgdnl
731617a48c7cSmrg
731717a48c7cSmrg# XORG_RELEASE_VERSION
731817a48c7cSmrg# --------------------
731917a48c7cSmrg# Adds --with/without-release-string and changes the PACKAGE and
732017a48c7cSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
73218e0ed500Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
73228e0ed500Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
732317a48c7cSmrg 
732417a48c7cSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
732517a48c7cSmrg	AC_ARG_WITH(release-version,
732617a48c7cSmrg			AC_HELP_STRING([--with-release-version=STRING],
732717a48c7cSmrg				[Use release version string in package name]),
732817a48c7cSmrg			[RELEASE_VERSION="$withval"],
732917a48c7cSmrg			[RELEASE_VERSION=""])
733017a48c7cSmrg	if test "x$RELEASE_VERSION" != "x"; then
733117a48c7cSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
733217a48c7cSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
733317a48c7cSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
733417a48c7cSmrg	fi
73358e0ed500Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
73368e0ed500Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
73378e0ed500Smrg		[Major version of this package])
73388e0ed500Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
73398e0ed500Smrg	if test "x$PVM" = "x"; then
73408e0ed500Smrg		PVM="0"
73418e0ed500Smrg	fi
73428e0ed500Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
73438e0ed500Smrg		[$PVM],
73448e0ed500Smrg		[Minor version of this package])
73458e0ed500Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
73468e0ed500Smrg	if test "x$PVP" = "x"; then
73478e0ed500Smrg		PVP="0"
73488e0ed500Smrg	fi
73498e0ed500Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
73508e0ed500Smrg		[$PVP],
73518e0ed500Smrg		[Patch version of this package])
735217a48c7cSmrg])
735317a48c7cSmrg
73548e0ed500Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
735517a48c7cSmrg#
735617a48c7cSmrg# This file is free software; the Free Software Foundation
735717a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
735817a48c7cSmrg# with or without modifications, as long as this notice is preserved.
735917a48c7cSmrg
736017a48c7cSmrg# AM_AUTOMAKE_VERSION(VERSION)
736117a48c7cSmrg# ----------------------------
736217a48c7cSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
736317a48c7cSmrg# generated from the m4 files accompanying Automake X.Y.
73648e0ed500Smrg# (This private macro should not be called outside this file.)
73658e0ed500SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
73668e0ed500Smrg[am__api_version='1.10'
73678e0ed500Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
73688e0ed500Smrgdnl require some minimum version.  Point them to the right macro.
73698e0ed500Smrgm4_if([$1], [1.10.1], [],
73708e0ed500Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
73718e0ed500Smrg])
73728e0ed500Smrg
73738e0ed500Smrg# _AM_AUTOCONF_VERSION(VERSION)
73748e0ed500Smrg# -----------------------------
73758e0ed500Smrg# aclocal traces this macro to find the Autoconf version.
73768e0ed500Smrg# This is a private macro too.  Using m4_define simplifies
73778e0ed500Smrg# the logic in aclocal, which can simply ignore this definition.
73788e0ed500Smrgm4_define([_AM_AUTOCONF_VERSION], [])
737917a48c7cSmrg
738017a48c7cSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
738117a48c7cSmrg# -------------------------------
73828e0ed500Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
738317a48c7cSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
738417a48c7cSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
73858e0ed500Smrg[AM_AUTOMAKE_VERSION([1.10.1])dnl
73868e0ed500Smrgm4_ifndef([AC_AUTOCONF_VERSION],
73878e0ed500Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
73888e0ed500Smrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
738917a48c7cSmrg
739017a48c7cSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
739117a48c7cSmrg
739217a48c7cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
739317a48c7cSmrg#
739417a48c7cSmrg# This file is free software; the Free Software Foundation
739517a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
739617a48c7cSmrg# with or without modifications, as long as this notice is preserved.
739717a48c7cSmrg
739817a48c7cSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
739917a48c7cSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
740017a48c7cSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
740117a48c7cSmrg#
740217a48c7cSmrg# Of course, Automake must honor this variable whenever it calls a
740317a48c7cSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
740417a48c7cSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
740517a48c7cSmrg# depending on how configure is run.  This is pretty annoying, since
740617a48c7cSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
740717a48c7cSmrg# source directory, any form will work fine, but in subdirectories a
740817a48c7cSmrg# relative path needs to be adjusted first.
740917a48c7cSmrg#
741017a48c7cSmrg# $ac_aux_dir/missing
741117a48c7cSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
741217a48c7cSmrg# $top_srcdir/$ac_aux_dir/missing
741317a48c7cSmrg#    fails if $ac_aux_dir is absolute,
741417a48c7cSmrg#    fails when called from a subdirectory in a VPATH build with
741517a48c7cSmrg#          a relative $ac_aux_dir
741617a48c7cSmrg#
741717a48c7cSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
741817a48c7cSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
741917a48c7cSmrg# harmless because $srcdir is `.', but things will broke when you
742017a48c7cSmrg# start a VPATH build or use an absolute $srcdir.
742117a48c7cSmrg#
742217a48c7cSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
742317a48c7cSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
742417a48c7cSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
742517a48c7cSmrg# and then we would define $MISSING as
742617a48c7cSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
742717a48c7cSmrg# This will work as long as MISSING is not called from configure, because
742817a48c7cSmrg# unfortunately $(top_srcdir) has no meaning in configure.
742917a48c7cSmrg# However there are other variables, like CC, which are often used in
743017a48c7cSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
743117a48c7cSmrg#
743217a48c7cSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
743317a48c7cSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
743417a48c7cSmrg# configured tree to be moved without reconfiguration.
743517a48c7cSmrg
743617a48c7cSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
743717a48c7cSmrg[dnl Rely on autoconf to set up CDPATH properly.
743817a48c7cSmrgAC_PREREQ([2.50])dnl
743917a48c7cSmrg# expand $ac_aux_dir to an absolute path
744017a48c7cSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
744117a48c7cSmrg])
744217a48c7cSmrg
744317a48c7cSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
744417a48c7cSmrg
74458e0ed500Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
744617a48c7cSmrg# Free Software Foundation, Inc.
744717a48c7cSmrg#
744817a48c7cSmrg# This file is free software; the Free Software Foundation
744917a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
745017a48c7cSmrg# with or without modifications, as long as this notice is preserved.
745117a48c7cSmrg
74528e0ed500Smrg# serial 8
745317a48c7cSmrg
745417a48c7cSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
745517a48c7cSmrg# -------------------------------------
745617a48c7cSmrg# Define a conditional.
745717a48c7cSmrgAC_DEFUN([AM_CONDITIONAL],
745817a48c7cSmrg[AC_PREREQ(2.52)dnl
745917a48c7cSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
746017a48c7cSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
74618e0ed500SmrgAC_SUBST([$1_TRUE])dnl
74628e0ed500SmrgAC_SUBST([$1_FALSE])dnl
74638e0ed500Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
74648e0ed500Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
746517a48c7cSmrgif $2; then
746617a48c7cSmrg  $1_TRUE=
746717a48c7cSmrg  $1_FALSE='#'
746817a48c7cSmrgelse
746917a48c7cSmrg  $1_TRUE='#'
747017a48c7cSmrg  $1_FALSE=
747117a48c7cSmrgfi
747217a48c7cSmrgAC_CONFIG_COMMANDS_PRE(
747317a48c7cSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
747417a48c7cSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
747517a48c7cSmrgUsually this means the macro was only invoked conditionally.]])
747617a48c7cSmrgfi])])
747717a48c7cSmrg
74788e0ed500Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
747917a48c7cSmrg# Free Software Foundation, Inc.
748017a48c7cSmrg#
748117a48c7cSmrg# This file is free software; the Free Software Foundation
748217a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
748317a48c7cSmrg# with or without modifications, as long as this notice is preserved.
748417a48c7cSmrg
74858e0ed500Smrg# serial 9
748617a48c7cSmrg
748717a48c7cSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
748817a48c7cSmrg# written in clear, in which case automake, when reading aclocal.m4,
748917a48c7cSmrg# will think it sees a *use*, and therefore will trigger all it's
749017a48c7cSmrg# C support machinery.  Also note that it means that autoscan, seeing
749117a48c7cSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
749217a48c7cSmrg
749317a48c7cSmrg
749417a48c7cSmrg# _AM_DEPENDENCIES(NAME)
749517a48c7cSmrg# ----------------------
749617a48c7cSmrg# See how the compiler implements dependency checking.
749717a48c7cSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
749817a48c7cSmrg# We try a few techniques and use that to set a single cache variable.
749917a48c7cSmrg#
750017a48c7cSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
750117a48c7cSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
750217a48c7cSmrg# dependency, and given that the user is not expected to run this macro,
750317a48c7cSmrg# just rely on AC_PROG_CC.
750417a48c7cSmrgAC_DEFUN([_AM_DEPENDENCIES],
750517a48c7cSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
750617a48c7cSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
750717a48c7cSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
750817a48c7cSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
750917a48c7cSmrg
751017a48c7cSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
751117a48c7cSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
751217a48c7cSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
75138e0ed500Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
751417a48c7cSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
751517a48c7cSmrg                   [depcc="$$1"   am_compiler_list=])
751617a48c7cSmrg
751717a48c7cSmrgAC_CACHE_CHECK([dependency style of $depcc],
751817a48c7cSmrg               [am_cv_$1_dependencies_compiler_type],
751917a48c7cSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
752017a48c7cSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
752117a48c7cSmrg  # making bogus files that we don't know about and never remove.  For
752217a48c7cSmrg  # instance it was reported that on HP-UX the gcc test will end up
752317a48c7cSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
752417a48c7cSmrg  # in D'.
752517a48c7cSmrg  mkdir conftest.dir
752617a48c7cSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
752717a48c7cSmrg  # using a relative directory.
752817a48c7cSmrg  cp "$am_depcomp" conftest.dir
752917a48c7cSmrg  cd conftest.dir
753017a48c7cSmrg  # We will build objects and dependencies in a subdirectory because
753117a48c7cSmrg  # it helps to detect inapplicable dependency modes.  For instance
753217a48c7cSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
753317a48c7cSmrg  # side effect of compilation, but ICC will put the dependencies in
753417a48c7cSmrg  # the current directory while Tru64 will put them in the object
753517a48c7cSmrg  # directory.
753617a48c7cSmrg  mkdir sub
753717a48c7cSmrg
753817a48c7cSmrg  am_cv_$1_dependencies_compiler_type=none
753917a48c7cSmrg  if test "$am_compiler_list" = ""; then
754017a48c7cSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
754117a48c7cSmrg  fi
754217a48c7cSmrg  for depmode in $am_compiler_list; do
754317a48c7cSmrg    # Setup a source with many dependencies, because some compilers
754417a48c7cSmrg    # like to wrap large dependency lists on column 80 (with \), and
754517a48c7cSmrg    # we should not choose a depcomp mode which is confused by this.
754617a48c7cSmrg    #
754717a48c7cSmrg    # We need to recreate these files for each test, as the compiler may
754817a48c7cSmrg    # overwrite some of them when testing with obscure command lines.
754917a48c7cSmrg    # This happens at least with the AIX C compiler.
755017a48c7cSmrg    : > sub/conftest.c
755117a48c7cSmrg    for i in 1 2 3 4 5 6; do
755217a48c7cSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
755317a48c7cSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
755417a48c7cSmrg      # Solaris 8's {/usr,}/bin/sh.
755517a48c7cSmrg      touch sub/conftst$i.h
755617a48c7cSmrg    done
755717a48c7cSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
755817a48c7cSmrg
755917a48c7cSmrg    case $depmode in
756017a48c7cSmrg    nosideeffect)
756117a48c7cSmrg      # after this tag, mechanisms are not by side-effect, so they'll
756217a48c7cSmrg      # only be used when explicitly requested
756317a48c7cSmrg      if test "x$enable_dependency_tracking" = xyes; then
756417a48c7cSmrg	continue
756517a48c7cSmrg      else
756617a48c7cSmrg	break
756717a48c7cSmrg      fi
756817a48c7cSmrg      ;;
756917a48c7cSmrg    none) break ;;
757017a48c7cSmrg    esac
757117a48c7cSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
757217a48c7cSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
757317a48c7cSmrg    # handle `-M -o', and we need to detect this.
757417a48c7cSmrg    if depmode=$depmode \
757517a48c7cSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
757617a48c7cSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
757717a48c7cSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
757817a48c7cSmrg         >/dev/null 2>conftest.err &&
75798e0ed500Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
758017a48c7cSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
758117a48c7cSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
758217a48c7cSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
758317a48c7cSmrg      # icc doesn't choke on unknown options, it will just issue warnings
758417a48c7cSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
758517a48c7cSmrg      # that says an option was ignored or not supported.
758617a48c7cSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
758717a48c7cSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
758817a48c7cSmrg      # The diagnosis changed in icc 8.0:
758917a48c7cSmrg      #   icc: Command line remark: option '-MP' not supported
759017a48c7cSmrg      if (grep 'ignoring option' conftest.err ||
759117a48c7cSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
759217a48c7cSmrg        am_cv_$1_dependencies_compiler_type=$depmode
759317a48c7cSmrg        break
759417a48c7cSmrg      fi
759517a48c7cSmrg    fi
759617a48c7cSmrg  done
759717a48c7cSmrg
759817a48c7cSmrg  cd ..
759917a48c7cSmrg  rm -rf conftest.dir
760017a48c7cSmrgelse
760117a48c7cSmrg  am_cv_$1_dependencies_compiler_type=none
760217a48c7cSmrgfi
760317a48c7cSmrg])
760417a48c7cSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
760517a48c7cSmrgAM_CONDITIONAL([am__fastdep$1], [
760617a48c7cSmrg  test "x$enable_dependency_tracking" != xno \
760717a48c7cSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
760817a48c7cSmrg])
760917a48c7cSmrg
761017a48c7cSmrg
761117a48c7cSmrg# AM_SET_DEPDIR
761217a48c7cSmrg# -------------
761317a48c7cSmrg# Choose a directory name for dependency files.
761417a48c7cSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
761517a48c7cSmrgAC_DEFUN([AM_SET_DEPDIR],
761617a48c7cSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
761717a48c7cSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
761817a48c7cSmrg])
761917a48c7cSmrg
762017a48c7cSmrg
762117a48c7cSmrg# AM_DEP_TRACK
762217a48c7cSmrg# ------------
762317a48c7cSmrgAC_DEFUN([AM_DEP_TRACK],
762417a48c7cSmrg[AC_ARG_ENABLE(dependency-tracking,
762517a48c7cSmrg[  --disable-dependency-tracking  speeds up one-time build
762617a48c7cSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
762717a48c7cSmrgif test "x$enable_dependency_tracking" != xno; then
762817a48c7cSmrg  am_depcomp="$ac_aux_dir/depcomp"
762917a48c7cSmrg  AMDEPBACKSLASH='\'
763017a48c7cSmrgfi
763117a48c7cSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
76328e0ed500SmrgAC_SUBST([AMDEPBACKSLASH])dnl
76338e0ed500Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
763417a48c7cSmrg])
763517a48c7cSmrg
763617a48c7cSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
763717a48c7cSmrg
763817a48c7cSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
763917a48c7cSmrg# Free Software Foundation, Inc.
764017a48c7cSmrg#
764117a48c7cSmrg# This file is free software; the Free Software Foundation
764217a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
764317a48c7cSmrg# with or without modifications, as long as this notice is preserved.
764417a48c7cSmrg
764517a48c7cSmrg#serial 3
764617a48c7cSmrg
764717a48c7cSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
764817a48c7cSmrg# ------------------------------
764917a48c7cSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
765017a48c7cSmrg[for mf in $CONFIG_FILES; do
765117a48c7cSmrg  # Strip MF so we end up with the name of the file.
765217a48c7cSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
765317a48c7cSmrg  # Check whether this is an Automake generated Makefile or not.
765417a48c7cSmrg  # We used to match only the files named `Makefile.in', but
765517a48c7cSmrg  # some people rename them; so instead we look at the file content.
765617a48c7cSmrg  # Grep'ing the first line is not enough: some people post-process
765717a48c7cSmrg  # each Makefile.in and add a new line on top of each file to say so.
76588e0ed500Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
76598e0ed500Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
76608e0ed500Smrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
766117a48c7cSmrg    dirpart=`AS_DIRNAME("$mf")`
766217a48c7cSmrg  else
766317a48c7cSmrg    continue
766417a48c7cSmrg  fi
766517a48c7cSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
766617a48c7cSmrg  # from the Makefile without running `make'.
766717a48c7cSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
766817a48c7cSmrg  test -z "$DEPDIR" && continue
766917a48c7cSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
767017a48c7cSmrg  test -z "am__include" && continue
767117a48c7cSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
767217a48c7cSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
767317a48c7cSmrg  U=`sed -n 's/^U = //p' < "$mf"`
767417a48c7cSmrg  # Find all dependency output files, they are included files with
767517a48c7cSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
767617a48c7cSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
767717a48c7cSmrg  # expansion.
767817a48c7cSmrg  for file in `sed -n "
767917a48c7cSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
768017a48c7cSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
768117a48c7cSmrg    # Make sure the directory exists.
768217a48c7cSmrg    test -f "$dirpart/$file" && continue
768317a48c7cSmrg    fdir=`AS_DIRNAME(["$file"])`
768417a48c7cSmrg    AS_MKDIR_P([$dirpart/$fdir])
768517a48c7cSmrg    # echo "creating $dirpart/$file"
768617a48c7cSmrg    echo '# dummy' > "$dirpart/$file"
768717a48c7cSmrg  done
768817a48c7cSmrgdone
768917a48c7cSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
769017a48c7cSmrg
769117a48c7cSmrg
769217a48c7cSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
769317a48c7cSmrg# -----------------------------
769417a48c7cSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
769517a48c7cSmrg#
769617a48c7cSmrg# This code is only required when automatic dependency tracking
769717a48c7cSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
769817a48c7cSmrg# need in order to bootstrap the dependency handling code.
769917a48c7cSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
770017a48c7cSmrg[AC_CONFIG_COMMANDS([depfiles],
770117a48c7cSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
770217a48c7cSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
770317a48c7cSmrg])
770417a48c7cSmrg
770517a48c7cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
770617a48c7cSmrg# Free Software Foundation, Inc.
770717a48c7cSmrg#
770817a48c7cSmrg# This file is free software; the Free Software Foundation
770917a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
771017a48c7cSmrg# with or without modifications, as long as this notice is preserved.
771117a48c7cSmrg
771217a48c7cSmrg# serial 8
771317a48c7cSmrg
771417a48c7cSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
771517a48c7cSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
771617a48c7cSmrg
771717a48c7cSmrg# Do all the work for Automake.                             -*- Autoconf -*-
771817a48c7cSmrg
77198e0ed500Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
77208e0ed500Smrg# 2005, 2006, 2008 Free Software Foundation, Inc.
772117a48c7cSmrg#
772217a48c7cSmrg# This file is free software; the Free Software Foundation
772317a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
772417a48c7cSmrg# with or without modifications, as long as this notice is preserved.
772517a48c7cSmrg
77268e0ed500Smrg# serial 13
772717a48c7cSmrg
772817a48c7cSmrg# This macro actually does too much.  Some checks are only needed if
772917a48c7cSmrg# your package does certain things.  But this isn't really a big deal.
773017a48c7cSmrg
773117a48c7cSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
773217a48c7cSmrg# AM_INIT_AUTOMAKE([OPTIONS])
773317a48c7cSmrg# -----------------------------------------------
773417a48c7cSmrg# The call with PACKAGE and VERSION arguments is the old style
773517a48c7cSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
773617a48c7cSmrg# and VERSION should now be passed to AC_INIT and removed from
773717a48c7cSmrg# the call to AM_INIT_AUTOMAKE.
773817a48c7cSmrg# We support both call styles for the transition.  After
773917a48c7cSmrg# the next Automake release, Autoconf can make the AC_INIT
774017a48c7cSmrg# arguments mandatory, and then we can depend on a new Autoconf
774117a48c7cSmrg# release and drop the old call support.
774217a48c7cSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
77438e0ed500Smrg[AC_PREREQ([2.60])dnl
774417a48c7cSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
774517a48c7cSmrgdnl the ones we care about.
774617a48c7cSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
774717a48c7cSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
774817a48c7cSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
77498e0ed500Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
77508e0ed500Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
77518e0ed500Smrg  # is not polluted with repeated "-I."
77528e0ed500Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
77538e0ed500Smrg  # test to see if srcdir already configured
77548e0ed500Smrg  if test -f $srcdir/config.status; then
77558e0ed500Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
77568e0ed500Smrg  fi
775717a48c7cSmrgfi
775817a48c7cSmrg
775917a48c7cSmrg# test whether we have cygpath
776017a48c7cSmrgif test -z "$CYGPATH_W"; then
776117a48c7cSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
776217a48c7cSmrg    CYGPATH_W='cygpath -w'
776317a48c7cSmrg  else
776417a48c7cSmrg    CYGPATH_W=echo
776517a48c7cSmrg  fi
776617a48c7cSmrgfi
776717a48c7cSmrgAC_SUBST([CYGPATH_W])
776817a48c7cSmrg
776917a48c7cSmrg# Define the identity of the package.
777017a48c7cSmrgdnl Distinguish between old-style and new-style calls.
777117a48c7cSmrgm4_ifval([$2],
777217a48c7cSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
777317a48c7cSmrg AC_SUBST([PACKAGE], [$1])dnl
777417a48c7cSmrg AC_SUBST([VERSION], [$2])],
777517a48c7cSmrg[_AM_SET_OPTIONS([$1])dnl
77768e0ed500Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
77778e0ed500Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
77788e0ed500Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
777917a48c7cSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
778017a48c7cSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
778117a48c7cSmrg
778217a48c7cSmrg_AM_IF_OPTION([no-define],,
778317a48c7cSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
778417a48c7cSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
778517a48c7cSmrg
778617a48c7cSmrg# Some tools Automake needs.
778717a48c7cSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
778817a48c7cSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
778917a48c7cSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
779017a48c7cSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
779117a48c7cSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
779217a48c7cSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
779317a48c7cSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
779417a48c7cSmrgAM_PROG_INSTALL_SH
779517a48c7cSmrgAM_PROG_INSTALL_STRIP
779617a48c7cSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
779717a48c7cSmrg# We need awk for the "check" target.  The system "awk" is bad on
779817a48c7cSmrg# some platforms.
779917a48c7cSmrgAC_REQUIRE([AC_PROG_AWK])dnl
780017a48c7cSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
780117a48c7cSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
780217a48c7cSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
780317a48c7cSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
780417a48c7cSmrg	      		     [_AM_PROG_TAR([v7])])])
780517a48c7cSmrg_AM_IF_OPTION([no-dependencies],,
780617a48c7cSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
780717a48c7cSmrg                  [_AM_DEPENDENCIES(CC)],
780817a48c7cSmrg                  [define([AC_PROG_CC],
780917a48c7cSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
781017a48c7cSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
781117a48c7cSmrg                  [_AM_DEPENDENCIES(CXX)],
781217a48c7cSmrg                  [define([AC_PROG_CXX],
781317a48c7cSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
78148e0ed500SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
78158e0ed500Smrg                  [_AM_DEPENDENCIES(OBJC)],
78168e0ed500Smrg                  [define([AC_PROG_OBJC],
78178e0ed500Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
781817a48c7cSmrg])
781917a48c7cSmrg])
782017a48c7cSmrg
782117a48c7cSmrg
782217a48c7cSmrg# When config.status generates a header, we must update the stamp-h file.
782317a48c7cSmrg# This file resides in the same directory as the config header
782417a48c7cSmrg# that is generated.  The stamp files are numbered to have different names.
782517a48c7cSmrg
782617a48c7cSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
782717a48c7cSmrg# loop where config.status creates the headers, so we can generate
782817a48c7cSmrg# our stamp files there.
782917a48c7cSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
783017a48c7cSmrg[# Compute $1's index in $config_headers.
78318e0ed500Smrg_am_arg=$1
783217a48c7cSmrg_am_stamp_count=1
783317a48c7cSmrgfor _am_header in $config_headers :; do
783417a48c7cSmrg  case $_am_header in
78358e0ed500Smrg    $_am_arg | $_am_arg:* )
783617a48c7cSmrg      break ;;
783717a48c7cSmrg    * )
783817a48c7cSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
783917a48c7cSmrg  esac
784017a48c7cSmrgdone
78418e0ed500Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
784217a48c7cSmrg
784317a48c7cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
784417a48c7cSmrg#
784517a48c7cSmrg# This file is free software; the Free Software Foundation
784617a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
784717a48c7cSmrg# with or without modifications, as long as this notice is preserved.
784817a48c7cSmrg
784917a48c7cSmrg# AM_PROG_INSTALL_SH
785017a48c7cSmrg# ------------------
785117a48c7cSmrg# Define $install_sh.
785217a48c7cSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
785317a48c7cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
78548e0ed500Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
785517a48c7cSmrgAC_SUBST(install_sh)])
785617a48c7cSmrg
785717a48c7cSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
785817a48c7cSmrg#
785917a48c7cSmrg# This file is free software; the Free Software Foundation
786017a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
786117a48c7cSmrg# with or without modifications, as long as this notice is preserved.
786217a48c7cSmrg
786317a48c7cSmrg# serial 2
786417a48c7cSmrg
786517a48c7cSmrg# Check whether the underlying file-system supports filenames
786617a48c7cSmrg# with a leading dot.  For instance MS-DOS doesn't.
786717a48c7cSmrgAC_DEFUN([AM_SET_LEADING_DOT],
786817a48c7cSmrg[rm -rf .tst 2>/dev/null
786917a48c7cSmrgmkdir .tst 2>/dev/null
787017a48c7cSmrgif test -d .tst; then
787117a48c7cSmrg  am__leading_dot=.
787217a48c7cSmrgelse
787317a48c7cSmrg  am__leading_dot=_
787417a48c7cSmrgfi
787517a48c7cSmrgrmdir .tst 2>/dev/null
787617a48c7cSmrgAC_SUBST([am__leading_dot])])
787717a48c7cSmrg
787817a48c7cSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
787917a48c7cSmrg# From Jim Meyering
788017a48c7cSmrg
788117a48c7cSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
788217a48c7cSmrg# Free Software Foundation, Inc.
788317a48c7cSmrg#
788417a48c7cSmrg# This file is free software; the Free Software Foundation
788517a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
788617a48c7cSmrg# with or without modifications, as long as this notice is preserved.
788717a48c7cSmrg
788817a48c7cSmrg# serial 4
788917a48c7cSmrg
789017a48c7cSmrgAC_DEFUN([AM_MAINTAINER_MODE],
789117a48c7cSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
789217a48c7cSmrg  dnl maintainer-mode is disabled by default
789317a48c7cSmrg  AC_ARG_ENABLE(maintainer-mode,
789417a48c7cSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
789517a48c7cSmrg			  (and sometimes confusing) to the casual installer],
789617a48c7cSmrg      USE_MAINTAINER_MODE=$enableval,
789717a48c7cSmrg      USE_MAINTAINER_MODE=no)
789817a48c7cSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
789917a48c7cSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
790017a48c7cSmrg  MAINT=$MAINTAINER_MODE_TRUE
790117a48c7cSmrg  AC_SUBST(MAINT)dnl
790217a48c7cSmrg]
790317a48c7cSmrg)
790417a48c7cSmrg
790517a48c7cSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
790617a48c7cSmrg
790717a48c7cSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
790817a48c7cSmrg
790917a48c7cSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
791017a48c7cSmrg#
791117a48c7cSmrg# This file is free software; the Free Software Foundation
791217a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
791317a48c7cSmrg# with or without modifications, as long as this notice is preserved.
791417a48c7cSmrg
791517a48c7cSmrg# serial 3
791617a48c7cSmrg
791717a48c7cSmrg# AM_MAKE_INCLUDE()
791817a48c7cSmrg# -----------------
791917a48c7cSmrg# Check to see how make treats includes.
792017a48c7cSmrgAC_DEFUN([AM_MAKE_INCLUDE],
792117a48c7cSmrg[am_make=${MAKE-make}
792217a48c7cSmrgcat > confinc << 'END'
792317a48c7cSmrgam__doit:
792417a48c7cSmrg	@echo done
792517a48c7cSmrg.PHONY: am__doit
792617a48c7cSmrgEND
792717a48c7cSmrg# If we don't find an include directive, just comment out the code.
792817a48c7cSmrgAC_MSG_CHECKING([for style of include used by $am_make])
792917a48c7cSmrgam__include="#"
793017a48c7cSmrgam__quote=
793117a48c7cSmrg_am_result=none
793217a48c7cSmrg# First try GNU make style include.
793317a48c7cSmrgecho "include confinc" > confmf
793417a48c7cSmrg# We grep out `Entering directory' and `Leaving directory'
793517a48c7cSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
793617a48c7cSmrg# In particular we don't look at `^make:' because GNU make might
793717a48c7cSmrg# be invoked under some other name (usually "gmake"), in which
793817a48c7cSmrg# case it prints its new name instead of `make'.
793917a48c7cSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
794017a48c7cSmrg   am__include=include
794117a48c7cSmrg   am__quote=
794217a48c7cSmrg   _am_result=GNU
794317a48c7cSmrgfi
794417a48c7cSmrg# Now try BSD make style include.
794517a48c7cSmrgif test "$am__include" = "#"; then
794617a48c7cSmrg   echo '.include "confinc"' > confmf
794717a48c7cSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
794817a48c7cSmrg      am__include=.include
794917a48c7cSmrg      am__quote="\""
795017a48c7cSmrg      _am_result=BSD
795117a48c7cSmrg   fi
795217a48c7cSmrgfi
795317a48c7cSmrgAC_SUBST([am__include])
795417a48c7cSmrgAC_SUBST([am__quote])
795517a48c7cSmrgAC_MSG_RESULT([$_am_result])
795617a48c7cSmrgrm -f confinc confmf
795717a48c7cSmrg])
795817a48c7cSmrg
795917a48c7cSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
796017a48c7cSmrg
79618e0ed500Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
796217a48c7cSmrg# Free Software Foundation, Inc.
796317a48c7cSmrg#
796417a48c7cSmrg# This file is free software; the Free Software Foundation
796517a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
796617a48c7cSmrg# with or without modifications, as long as this notice is preserved.
796717a48c7cSmrg
79688e0ed500Smrg# serial 5
796917a48c7cSmrg
797017a48c7cSmrg# AM_MISSING_PROG(NAME, PROGRAM)
797117a48c7cSmrg# ------------------------------
797217a48c7cSmrgAC_DEFUN([AM_MISSING_PROG],
797317a48c7cSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
797417a48c7cSmrg$1=${$1-"${am_missing_run}$2"}
797517a48c7cSmrgAC_SUBST($1)])
797617a48c7cSmrg
797717a48c7cSmrg
797817a48c7cSmrg# AM_MISSING_HAS_RUN
797917a48c7cSmrg# ------------------
798017a48c7cSmrg# Define MISSING if not defined so far and test if it supports --run.
798117a48c7cSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
798217a48c7cSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
798317a48c7cSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
79848e0ed500SmrgAC_REQUIRE_AUX_FILE([missing])dnl
798517a48c7cSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
798617a48c7cSmrg# Use eval to expand $SHELL
798717a48c7cSmrgif eval "$MISSING --run true"; then
798817a48c7cSmrg  am_missing_run="$MISSING --run "
798917a48c7cSmrgelse
799017a48c7cSmrg  am_missing_run=
799117a48c7cSmrg  AC_MSG_WARN([`missing' script is too old or missing])
799217a48c7cSmrgfi
799317a48c7cSmrg])
799417a48c7cSmrg
79958e0ed500Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
799617a48c7cSmrg#
799717a48c7cSmrg# This file is free software; the Free Software Foundation
799817a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
799917a48c7cSmrg# with or without modifications, as long as this notice is preserved.
800017a48c7cSmrg
800117a48c7cSmrg# AM_PROG_MKDIR_P
800217a48c7cSmrg# ---------------
80038e0ed500Smrg# Check for `mkdir -p'.
800417a48c7cSmrgAC_DEFUN([AM_PROG_MKDIR_P],
80058e0ed500Smrg[AC_PREREQ([2.60])dnl
80068e0ed500SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
80078e0ed500Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
80088e0ed500Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
80098e0ed500Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
80108e0ed500Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
80118e0ed500Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
80128e0ed500Smrgdnl adjustment using top_builddir (which is defined more often than
80138e0ed500Smrgdnl MKDIR_P).
80148e0ed500SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
80158e0ed500Smrgcase $mkdir_p in
80168e0ed500Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
80178e0ed500Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
80188e0ed500Smrgesac
80198e0ed500Smrg])
802017a48c7cSmrg
802117a48c7cSmrg# Helper functions for option handling.                     -*- Autoconf -*-
802217a48c7cSmrg
802317a48c7cSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
802417a48c7cSmrg#
802517a48c7cSmrg# This file is free software; the Free Software Foundation
802617a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
802717a48c7cSmrg# with or without modifications, as long as this notice is preserved.
802817a48c7cSmrg
802917a48c7cSmrg# serial 3
803017a48c7cSmrg
803117a48c7cSmrg# _AM_MANGLE_OPTION(NAME)
803217a48c7cSmrg# -----------------------
803317a48c7cSmrgAC_DEFUN([_AM_MANGLE_OPTION],
803417a48c7cSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
803517a48c7cSmrg
803617a48c7cSmrg# _AM_SET_OPTION(NAME)
803717a48c7cSmrg# ------------------------------
803817a48c7cSmrg# Set option NAME.  Presently that only means defining a flag for this option.
803917a48c7cSmrgAC_DEFUN([_AM_SET_OPTION],
804017a48c7cSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
804117a48c7cSmrg
804217a48c7cSmrg# _AM_SET_OPTIONS(OPTIONS)
804317a48c7cSmrg# ----------------------------------
804417a48c7cSmrg# OPTIONS is a space-separated list of Automake options.
804517a48c7cSmrgAC_DEFUN([_AM_SET_OPTIONS],
804617a48c7cSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
804717a48c7cSmrg
804817a48c7cSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
804917a48c7cSmrg# -------------------------------------------
805017a48c7cSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
805117a48c7cSmrgAC_DEFUN([_AM_IF_OPTION],
805217a48c7cSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
805317a48c7cSmrg
805417a48c7cSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
805517a48c7cSmrg
805617a48c7cSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
805717a48c7cSmrg# Free Software Foundation, Inc.
805817a48c7cSmrg#
805917a48c7cSmrg# This file is free software; the Free Software Foundation
806017a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
806117a48c7cSmrg# with or without modifications, as long as this notice is preserved.
806217a48c7cSmrg
806317a48c7cSmrg# serial 4
806417a48c7cSmrg
806517a48c7cSmrg# AM_SANITY_CHECK
806617a48c7cSmrg# ---------------
806717a48c7cSmrgAC_DEFUN([AM_SANITY_CHECK],
806817a48c7cSmrg[AC_MSG_CHECKING([whether build environment is sane])
806917a48c7cSmrg# Just in case
807017a48c7cSmrgsleep 1
807117a48c7cSmrgecho timestamp > conftest.file
807217a48c7cSmrg# Do `set' in a subshell so we don't clobber the current shell's
807317a48c7cSmrg# arguments.  Must try -L first in case configure is actually a
807417a48c7cSmrg# symlink; some systems play weird games with the mod time of symlinks
807517a48c7cSmrg# (eg FreeBSD returns the mod time of the symlink's containing
807617a48c7cSmrg# directory).
807717a48c7cSmrgif (
807817a48c7cSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
807917a48c7cSmrg   if test "$[*]" = "X"; then
808017a48c7cSmrg      # -L didn't work.
808117a48c7cSmrg      set X `ls -t $srcdir/configure conftest.file`
808217a48c7cSmrg   fi
808317a48c7cSmrg   rm -f conftest.file
808417a48c7cSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
808517a48c7cSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
808617a48c7cSmrg
808717a48c7cSmrg      # If neither matched, then we have a broken ls.  This can happen
808817a48c7cSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
808917a48c7cSmrg      # broken ls alias from the environment.  This has actually
809017a48c7cSmrg      # happened.  Such a system could not be considered "sane".
809117a48c7cSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
809217a48c7cSmrgalias in your environment])
809317a48c7cSmrg   fi
809417a48c7cSmrg
809517a48c7cSmrg   test "$[2]" = conftest.file
809617a48c7cSmrg   )
809717a48c7cSmrgthen
809817a48c7cSmrg   # Ok.
809917a48c7cSmrg   :
810017a48c7cSmrgelse
810117a48c7cSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
810217a48c7cSmrgCheck your system clock])
810317a48c7cSmrgfi
810417a48c7cSmrgAC_MSG_RESULT(yes)])
810517a48c7cSmrg
810617a48c7cSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
810717a48c7cSmrg#
810817a48c7cSmrg# This file is free software; the Free Software Foundation
810917a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
811017a48c7cSmrg# with or without modifications, as long as this notice is preserved.
811117a48c7cSmrg
811217a48c7cSmrg# AM_PROG_INSTALL_STRIP
811317a48c7cSmrg# ---------------------
811417a48c7cSmrg# One issue with vendor `install' (even GNU) is that you can't
811517a48c7cSmrg# specify the program used to strip binaries.  This is especially
811617a48c7cSmrg# annoying in cross-compiling environments, where the build's strip
811717a48c7cSmrg# is unlikely to handle the host's binaries.
811817a48c7cSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
811917a48c7cSmrg# always use install-sh in `make install-strip', and initialize
812017a48c7cSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
812117a48c7cSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
812217a48c7cSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
812317a48c7cSmrg# Installed binaries are usually stripped using `strip' when the user
812417a48c7cSmrg# run `make install-strip'.  However `strip' might not be the right
812517a48c7cSmrg# tool to use in cross-compilation environments, therefore Automake
812617a48c7cSmrg# will honor the `STRIP' environment variable to overrule this program.
812717a48c7cSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
812817a48c7cSmrgif test "$cross_compiling" != no; then
812917a48c7cSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
813017a48c7cSmrgfi
81318e0ed500SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
813217a48c7cSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
813317a48c7cSmrg
81348e0ed500Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
81358e0ed500Smrg#
81368e0ed500Smrg# This file is free software; the Free Software Foundation
81378e0ed500Smrg# gives unlimited permission to copy and/or distribute it,
81388e0ed500Smrg# with or without modifications, as long as this notice is preserved.
81398e0ed500Smrg
81408e0ed500Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
81418e0ed500Smrg# ---------------------------
81428e0ed500Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
81438e0ed500Smrg# This macro is traced by Automake.
81448e0ed500SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
81458e0ed500Smrg
814617a48c7cSmrg# Check how to create a tarball.                            -*- Autoconf -*-
814717a48c7cSmrg
814817a48c7cSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
814917a48c7cSmrg#
815017a48c7cSmrg# This file is free software; the Free Software Foundation
815117a48c7cSmrg# gives unlimited permission to copy and/or distribute it,
815217a48c7cSmrg# with or without modifications, as long as this notice is preserved.
815317a48c7cSmrg
815417a48c7cSmrg# serial 2
815517a48c7cSmrg
815617a48c7cSmrg# _AM_PROG_TAR(FORMAT)
815717a48c7cSmrg# --------------------
815817a48c7cSmrg# Check how to create a tarball in format FORMAT.
815917a48c7cSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
816017a48c7cSmrg#
816117a48c7cSmrg# Substitute a variable $(am__tar) that is a command
816217a48c7cSmrg# writing to stdout a FORMAT-tarball containing the directory
816317a48c7cSmrg# $tardir.
816417a48c7cSmrg#     tardir=directory && $(am__tar) > result.tar
816517a48c7cSmrg#
816617a48c7cSmrg# Substitute a variable $(am__untar) that extract such
816717a48c7cSmrg# a tarball read from stdin.
816817a48c7cSmrg#     $(am__untar) < result.tar
816917a48c7cSmrgAC_DEFUN([_AM_PROG_TAR],
817017a48c7cSmrg[# Always define AMTAR for backward compatibility.
817117a48c7cSmrgAM_MISSING_PROG([AMTAR], [tar])
817217a48c7cSmrgm4_if([$1], [v7],
817317a48c7cSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
817417a48c7cSmrg     [m4_case([$1], [ustar],, [pax],,
817517a48c7cSmrg              [m4_fatal([Unknown tar format])])
817617a48c7cSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
817717a48c7cSmrg# Loop over all known methods to create a tar archive until one works.
817817a48c7cSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
817917a48c7cSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
818017a48c7cSmrg# Do not fold the above two line into one, because Tru64 sh and
818117a48c7cSmrg# Solaris sh will not grok spaces in the rhs of `-'.
818217a48c7cSmrgfor _am_tool in $_am_tools
818317a48c7cSmrgdo
818417a48c7cSmrg  case $_am_tool in
818517a48c7cSmrg  gnutar)
818617a48c7cSmrg    for _am_tar in tar gnutar gtar;
818717a48c7cSmrg    do
818817a48c7cSmrg      AM_RUN_LOG([$_am_tar --version]) && break
818917a48c7cSmrg    done
819017a48c7cSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
819117a48c7cSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
819217a48c7cSmrg    am__untar="$_am_tar -xf -"
819317a48c7cSmrg    ;;
819417a48c7cSmrg  plaintar)
819517a48c7cSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
819617a48c7cSmrg    # ustar tarball either.
819717a48c7cSmrg    (tar --version) >/dev/null 2>&1 && continue
819817a48c7cSmrg    am__tar='tar chf - "$$tardir"'
819917a48c7cSmrg    am__tar_='tar chf - "$tardir"'
820017a48c7cSmrg    am__untar='tar xf -'
820117a48c7cSmrg    ;;
820217a48c7cSmrg  pax)
820317a48c7cSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
820417a48c7cSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
820517a48c7cSmrg    am__untar='pax -r'
820617a48c7cSmrg    ;;
820717a48c7cSmrg  cpio)
820817a48c7cSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
820917a48c7cSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
821017a48c7cSmrg    am__untar='cpio -i -H $1 -d'
821117a48c7cSmrg    ;;
821217a48c7cSmrg  none)
821317a48c7cSmrg    am__tar=false
821417a48c7cSmrg    am__tar_=false
821517a48c7cSmrg    am__untar=false
821617a48c7cSmrg    ;;
821717a48c7cSmrg  esac
821817a48c7cSmrg
821917a48c7cSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
822017a48c7cSmrg  # and am__untar set.
822117a48c7cSmrg  test -n "${am_cv_prog_tar_$1}" && break
822217a48c7cSmrg
822317a48c7cSmrg  # tar/untar a dummy directory, and stop if the command works
822417a48c7cSmrg  rm -rf conftest.dir
822517a48c7cSmrg  mkdir conftest.dir
822617a48c7cSmrg  echo GrepMe > conftest.dir/file
822717a48c7cSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
822817a48c7cSmrg  rm -rf conftest.dir
822917a48c7cSmrg  if test -s conftest.tar; then
823017a48c7cSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
823117a48c7cSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
823217a48c7cSmrg  fi
823317a48c7cSmrgdone
823417a48c7cSmrgrm -rf conftest.dir
823517a48c7cSmrg
823617a48c7cSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
823717a48c7cSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
823817a48c7cSmrgAC_SUBST([am__tar])
823917a48c7cSmrgAC_SUBST([am__untar])
824017a48c7cSmrg]) # _AM_PROG_TAR
824117a48c7cSmrg
8242