aclocal.m4 revision e47418d9
1e47418d9Smrg# generated automatically by aclocal 1.11 -*- Autoconf -*-
272b676d7Smrg
372b676d7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4e47418d9Smrg# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
572b676d7Smrg# This file is free software; the Free Software Foundation
672b676d7Smrg# gives unlimited permission to copy and/or distribute it,
772b676d7Smrg# with or without modifications, as long as this notice is preserved.
872b676d7Smrg
972b676d7Smrg# This program is distributed in the hope that it will be useful,
1072b676d7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1172b676d7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1272b676d7Smrg# PARTICULAR PURPOSE.
1372b676d7Smrg
141fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION],
151fd23544Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
16e47418d9Smrgm4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.63],,
171fd23544Smrg[m4_warning([this file was generated for autoconf 2.63.
181fd23544SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
191fd23544SmrgIf you have problems, you may need to regenerate the build system entirely.
201fd23544SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
211fd23544Smrg
2272b676d7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2372b676d7Smrg
241fd23544Smrg# serial 52 AC_PROG_LIBTOOL
2572b676d7Smrg
2672b676d7Smrg
2772b676d7Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2872b676d7Smrg# -----------------------------------------------------------
2972b676d7Smrg# If this macro is not defined by Autoconf, define it here.
3072b676d7Smrgm4_ifdef([AC_PROVIDE_IFELSE],
3172b676d7Smrg         [],
3272b676d7Smrg         [m4_define([AC_PROVIDE_IFELSE],
3372b676d7Smrg	         [m4_ifdef([AC_PROVIDE_$1],
3472b676d7Smrg		           [$2], [$3])])])
3572b676d7Smrg
3672b676d7Smrg
3772b676d7Smrg# AC_PROG_LIBTOOL
3872b676d7Smrg# ---------------
3972b676d7SmrgAC_DEFUN([AC_PROG_LIBTOOL],
4072b676d7Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
4172b676d7Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
4272b676d7Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
4372b676d7Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
4472b676d7Smrg    [AC_LIBTOOL_CXX],
4572b676d7Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
4672b676d7Smrg  ])])
4772b676d7Smrgdnl And a similar setup for Fortran 77 support
4872b676d7Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
4972b676d7Smrg    [AC_LIBTOOL_F77],
5072b676d7Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
5172b676d7Smrg])])
5272b676d7Smrg
5372b676d7Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
5472b676d7Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
5572b676d7Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
5672b676d7Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
5772b676d7Smrg    [AC_LIBTOOL_GCJ],
5872b676d7Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5972b676d7Smrg      [AC_LIBTOOL_GCJ],
6072b676d7Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
6172b676d7Smrg	[AC_LIBTOOL_GCJ],
6272b676d7Smrg      [ifdef([AC_PROG_GCJ],
6372b676d7Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6472b676d7Smrg       ifdef([A][M_PROG_GCJ],
6572b676d7Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
6672b676d7Smrg       ifdef([LT_AC_PROG_GCJ],
6772b676d7Smrg	     [define([LT_AC_PROG_GCJ],
6872b676d7Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6972b676d7Smrg])])# AC_PROG_LIBTOOL
7072b676d7Smrg
7172b676d7Smrg
7272b676d7Smrg# _AC_PROG_LIBTOOL
7372b676d7Smrg# ----------------
7472b676d7SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
7572b676d7Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
7672b676d7SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
7772b676d7SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
7872b676d7SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
7972b676d7Smrg
8072b676d7Smrg# This can be used to rebuild libtool when needed
8172b676d7SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
8272b676d7Smrg
8372b676d7Smrg# Always use our own libtool.
8472b676d7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
8572b676d7SmrgAC_SUBST(LIBTOOL)dnl
8672b676d7Smrg
8772b676d7Smrg# Prevent multiple expansion
8872b676d7Smrgdefine([AC_PROG_LIBTOOL], [])
8972b676d7Smrg])# _AC_PROG_LIBTOOL
9072b676d7Smrg
9172b676d7Smrg
9272b676d7Smrg# AC_LIBTOOL_SETUP
9372b676d7Smrg# ----------------
9472b676d7SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
9572b676d7Smrg[AC_PREREQ(2.50)dnl
9672b676d7SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
9772b676d7SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
9872b676d7SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
9972b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
10072b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
10172b676d7SmrgAC_REQUIRE([AC_PROG_CC])dnl
10272b676d7SmrgAC_REQUIRE([AC_PROG_LD])dnl
10372b676d7SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
10472b676d7SmrgAC_REQUIRE([AC_PROG_NM])dnl
10572b676d7Smrg
10672b676d7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
10772b676d7SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
10872b676d7Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
10972b676d7SmrgAC_REQUIRE([AC_OBJEXT])dnl
11072b676d7SmrgAC_REQUIRE([AC_EXEEXT])dnl
11172b676d7Smrgdnl
11272b676d7SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
11372b676d7SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
11472b676d7SmrgAC_LIBTOOL_OBJDIR
11572b676d7Smrg
11672b676d7SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
11772b676d7Smrg_LT_AC_PROG_ECHO_BACKSLASH
11872b676d7Smrg
11972b676d7Smrgcase $host_os in
12072b676d7Smrgaix3*)
12172b676d7Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
12272b676d7Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
12372b676d7Smrg  # vanish in a puff of smoke.
12472b676d7Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
12572b676d7Smrg    COLLECT_NAMES=
12672b676d7Smrg    export COLLECT_NAMES
12772b676d7Smrg  fi
12872b676d7Smrg  ;;
12972b676d7Smrgesac
13072b676d7Smrg
13172b676d7Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
13272b676d7Smrg# metacharacters that are still active within double-quoted strings.
13372b676d7SmrgXsed='sed -e 1s/^X//'
13472b676d7Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
13572b676d7Smrg
13672b676d7Smrg# Same as above, but do not quote variable references.
13772b676d7Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
13872b676d7Smrg
13972b676d7Smrg# Sed substitution to delay expansion of an escaped shell variable in a
14072b676d7Smrg# double_quote_subst'ed string.
14172b676d7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
14272b676d7Smrg
14372b676d7Smrg# Sed substitution to avoid accidental globbing in evaled expressions
14472b676d7Smrgno_glob_subst='s/\*/\\\*/g'
14572b676d7Smrg
14672b676d7Smrg# Constants:
14772b676d7Smrgrm="rm -f"
14872b676d7Smrg
14972b676d7Smrg# Global variables:
15072b676d7Smrgdefault_ofile=libtool
15172b676d7Smrgcan_build_shared=yes
15272b676d7Smrg
15372b676d7Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
15472b676d7Smrg# which needs '.lib').
15572b676d7Smrglibext=a
15672b676d7Smrgltmain="$ac_aux_dir/ltmain.sh"
15772b676d7Smrgofile="$default_ofile"
15872b676d7Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
15972b676d7Smrg
16072b676d7SmrgAC_CHECK_TOOL(AR, ar, false)
16172b676d7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
16272b676d7SmrgAC_CHECK_TOOL(STRIP, strip, :)
16372b676d7Smrg
16472b676d7Smrgold_CC="$CC"
16572b676d7Smrgold_CFLAGS="$CFLAGS"
16672b676d7Smrg
16772b676d7Smrg# Set sane defaults for various variables
16872b676d7Smrgtest -z "$AR" && AR=ar
16972b676d7Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
17072b676d7Smrgtest -z "$AS" && AS=as
17172b676d7Smrgtest -z "$CC" && CC=cc
17272b676d7Smrgtest -z "$LTCC" && LTCC=$CC
17372b676d7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
17472b676d7Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
17572b676d7Smrgtest -z "$LD" && LD=ld
17672b676d7Smrgtest -z "$LN_S" && LN_S="ln -s"
17772b676d7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
17872b676d7Smrgtest -z "$NM" && NM=nm
17972b676d7Smrgtest -z "$SED" && SED=sed
18072b676d7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
18172b676d7Smrgtest -z "$RANLIB" && RANLIB=:
18272b676d7Smrgtest -z "$STRIP" && STRIP=:
18372b676d7Smrgtest -z "$ac_objext" && ac_objext=o
18472b676d7Smrg
18572b676d7Smrg# Determine commands to create old-style static archives.
1861fd23544Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
18772b676d7Smrgold_postinstall_cmds='chmod 644 $oldlib'
18872b676d7Smrgold_postuninstall_cmds=
18972b676d7Smrg
19072b676d7Smrgif test -n "$RANLIB"; then
19172b676d7Smrg  case $host_os in
19272b676d7Smrg  openbsd*)
19372b676d7Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
19472b676d7Smrg    ;;
19572b676d7Smrg  *)
19672b676d7Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
19772b676d7Smrg    ;;
19872b676d7Smrg  esac
19972b676d7Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
20072b676d7Smrgfi
20172b676d7Smrg
20272b676d7Smrg_LT_CC_BASENAME([$compiler])
20372b676d7Smrg
20472b676d7Smrg# Only perform the check for file, if the check method requires it
20572b676d7Smrgcase $deplibs_check_method in
20672b676d7Smrgfile_magic*)
20772b676d7Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
20872b676d7Smrg    AC_PATH_MAGIC
20972b676d7Smrg  fi
21072b676d7Smrg  ;;
21172b676d7Smrgesac
21272b676d7Smrg
2131fd23544Smrg_LT_REQUIRED_DARWIN_CHECKS
2141fd23544Smrg
21572b676d7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
21672b676d7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
21772b676d7Smrgenable_win32_dll=yes, enable_win32_dll=no)
21872b676d7Smrg
21972b676d7SmrgAC_ARG_ENABLE([libtool-lock],
22072b676d7Smrg    [AC_HELP_STRING([--disable-libtool-lock],
22172b676d7Smrg	[avoid locking (might break parallel builds)])])
22272b676d7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
22372b676d7Smrg
22472b676d7SmrgAC_ARG_WITH([pic],
22572b676d7Smrg    [AC_HELP_STRING([--with-pic],
22672b676d7Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
22772b676d7Smrg    [pic_mode="$withval"],
22872b676d7Smrg    [pic_mode=default])
22972b676d7Smrgtest -z "$pic_mode" && pic_mode=default
23072b676d7Smrg
23172b676d7Smrg# Use C for the default configuration in the libtool script
23272b676d7Smrgtagname=
23372b676d7SmrgAC_LIBTOOL_LANG_C_CONFIG
23472b676d7Smrg_LT_AC_TAGCONFIG
23572b676d7Smrg])# AC_LIBTOOL_SETUP
23672b676d7Smrg
23772b676d7Smrg
23872b676d7Smrg# _LT_AC_SYS_COMPILER
23972b676d7Smrg# -------------------
24072b676d7SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
24172b676d7Smrg[AC_REQUIRE([AC_PROG_CC])dnl
24272b676d7Smrg
24372b676d7Smrg# If no C compiler was specified, use CC.
24472b676d7SmrgLTCC=${LTCC-"$CC"}
24572b676d7Smrg
24672b676d7Smrg# If no C compiler flags were specified, use CFLAGS.
24772b676d7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
24872b676d7Smrg
24972b676d7Smrg# Allow CC to be a program name with arguments.
25072b676d7Smrgcompiler=$CC
25172b676d7Smrg])# _LT_AC_SYS_COMPILER
25272b676d7Smrg
25372b676d7Smrg
25472b676d7Smrg# _LT_CC_BASENAME(CC)
25572b676d7Smrg# -------------------
25672b676d7Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
25772b676d7SmrgAC_DEFUN([_LT_CC_BASENAME],
25872b676d7Smrg[for cc_temp in $1""; do
25972b676d7Smrg  case $cc_temp in
26072b676d7Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
26172b676d7Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
26272b676d7Smrg    \-*) ;;
26372b676d7Smrg    *) break;;
26472b676d7Smrg  esac
26572b676d7Smrgdone
26672b676d7Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
26772b676d7Smrg])
26872b676d7Smrg
26972b676d7Smrg
27072b676d7Smrg# _LT_COMPILER_BOILERPLATE
27172b676d7Smrg# ------------------------
27272b676d7Smrg# Check for compiler boilerplate output or warnings with
27372b676d7Smrg# the simple compiler test code.
27472b676d7SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
2751fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2761fd23544Smrgac_outfile=conftest.$ac_objext
2771fd23544Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
27872b676d7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
27972b676d7Smrg_lt_compiler_boilerplate=`cat conftest.err`
28072b676d7Smrg$rm conftest*
28172b676d7Smrg])# _LT_COMPILER_BOILERPLATE
28272b676d7Smrg
28372b676d7Smrg
28472b676d7Smrg# _LT_LINKER_BOILERPLATE
28572b676d7Smrg# ----------------------
28672b676d7Smrg# Check for linker boilerplate output or warnings with
28772b676d7Smrg# the simple link test code.
28872b676d7SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
2891fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2901fd23544Smrgac_outfile=conftest.$ac_objext
2911fd23544Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
29272b676d7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
29372b676d7Smrg_lt_linker_boilerplate=`cat conftest.err`
2941fd23544Smrg$rm -r conftest*
29572b676d7Smrg])# _LT_LINKER_BOILERPLATE
29672b676d7Smrg
2971fd23544Smrg# _LT_REQUIRED_DARWIN_CHECKS
2981fd23544Smrg# --------------------------
2991fd23544Smrg# Check for some things on darwin
3001fd23544SmrgAC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
3011fd23544Smrg  case $host_os in
3021fd23544Smrg    rhapsody* | darwin*)
3031fd23544Smrg    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
3041fd23544Smrg    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
3051fd23544Smrg
3061fd23544Smrg    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
3071fd23544Smrg      [lt_cv_apple_cc_single_mod=no
3081fd23544Smrg      if test -z "${LT_MULTI_MODULE}"; then
3091fd23544Smrg   # By default we will add the -single_module flag. You can override
3101fd23544Smrg   # by either setting the environment variable LT_MULTI_MODULE
3111fd23544Smrg   # non-empty at configure time, or by adding -multi_module to the
3121fd23544Smrg   # link flags.
3131fd23544Smrg   echo "int foo(void){return 1;}" > conftest.c
3141fd23544Smrg   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
3151fd23544Smrg     -dynamiclib ${wl}-single_module conftest.c
3161fd23544Smrg   if test -f libconftest.dylib; then
3171fd23544Smrg     lt_cv_apple_cc_single_mod=yes
3181fd23544Smrg     rm -rf libconftest.dylib*
3191fd23544Smrg   fi
3201fd23544Smrg   rm conftest.c
3211fd23544Smrg      fi])
3221fd23544Smrg    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
3231fd23544Smrg      [lt_cv_ld_exported_symbols_list],
3241fd23544Smrg      [lt_cv_ld_exported_symbols_list=no
3251fd23544Smrg      save_LDFLAGS=$LDFLAGS
3261fd23544Smrg      echo "_main" > conftest.sym
3271fd23544Smrg      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
3281fd23544Smrg      AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
3291fd23544Smrg   [lt_cv_ld_exported_symbols_list=yes],
3301fd23544Smrg   [lt_cv_ld_exported_symbols_list=no])
3311fd23544Smrg   LDFLAGS="$save_LDFLAGS"
3321fd23544Smrg    ])
3331fd23544Smrg    case $host_os in
3341fd23544Smrg    rhapsody* | darwin1.[[0123]])
3351fd23544Smrg      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
3361fd23544Smrg    darwin1.*)
3371fd23544Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3381fd23544Smrg    darwin*)
3391fd23544Smrg      # if running on 10.5 or later, the deployment target defaults
3401fd23544Smrg      # to the OS version, if on x86, and 10.4, the deployment
3411fd23544Smrg      # target defaults to 10.4. Don't you love it?
3421fd23544Smrg      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
3431fd23544Smrg   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
3441fd23544Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3451fd23544Smrg   10.[[012]]*)
3461fd23544Smrg     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
3471fd23544Smrg   10.*)
3481fd23544Smrg     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
3491fd23544Smrg      esac
3501fd23544Smrg    ;;
3511fd23544Smrg  esac
3521fd23544Smrg    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
3531fd23544Smrg      _lt_dar_single_mod='$single_module'
3541fd23544Smrg    fi
3551fd23544Smrg    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
3561fd23544Smrg      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
3571fd23544Smrg    else
3581fd23544Smrg      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
3591fd23544Smrg    fi
3601fd23544Smrg    if test "$DSYMUTIL" != ":"; then
3611fd23544Smrg      _lt_dsymutil="~$DSYMUTIL \$lib || :"
3621fd23544Smrg    else
3631fd23544Smrg      _lt_dsymutil=
3641fd23544Smrg    fi
3651fd23544Smrg    ;;
3661fd23544Smrg  esac
3671fd23544Smrg])
36872b676d7Smrg
36972b676d7Smrg# _LT_AC_SYS_LIBPATH_AIX
37072b676d7Smrg# ----------------------
37172b676d7Smrg# Links a minimal program and checks the executable
37272b676d7Smrg# for the system default hardcoded library path. In most cases,
37372b676d7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
37472b676d7Smrg# the location of the communication and MPI libs are included too.
37572b676d7Smrg# If we don't find anything, use the default library path according
37672b676d7Smrg# to the aix ld manual.
37772b676d7SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
3781fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
3791fd23544SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
3801fd23544Smrglt_aix_libpath_sed='
3811fd23544Smrg    /Import File Strings/,/^$/ {
3821fd23544Smrg	/^0/ {
3831fd23544Smrg	    s/^0  *\(.*\)$/\1/
3841fd23544Smrg	    p
3851fd23544Smrg	}
3861fd23544Smrg    }'
3871fd23544Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
38872b676d7Smrg# Check for a 64-bit object if we didn't find anything.
3891fd23544Smrgif test -z "$aix_libpath"; then
3901fd23544Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3911fd23544Smrgfi],[])
39272b676d7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
39372b676d7Smrg])# _LT_AC_SYS_LIBPATH_AIX
39472b676d7Smrg
39572b676d7Smrg
39672b676d7Smrg# _LT_AC_SHELL_INIT(ARG)
39772b676d7Smrg# ----------------------
39872b676d7SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
39972b676d7Smrg[ifdef([AC_DIVERSION_NOTICE],
40072b676d7Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
40172b676d7Smrg	 [AC_DIVERT_PUSH(NOTICE)])
40272b676d7Smrg$1
40372b676d7SmrgAC_DIVERT_POP
40472b676d7Smrg])# _LT_AC_SHELL_INIT
40572b676d7Smrg
40672b676d7Smrg
40772b676d7Smrg# _LT_AC_PROG_ECHO_BACKSLASH
40872b676d7Smrg# --------------------------
40972b676d7Smrg# Add some code to the start of the generated configure script which
41072b676d7Smrg# will find an echo command which doesn't interpret backslashes.
41172b676d7SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
41272b676d7Smrg[_LT_AC_SHELL_INIT([
41372b676d7Smrg# Check that we are running under the correct shell.
41472b676d7SmrgSHELL=${CONFIG_SHELL-/bin/sh}
41572b676d7Smrg
41672b676d7Smrgcase X$ECHO in
41772b676d7SmrgX*--fallback-echo)
41872b676d7Smrg  # Remove one level of quotation (which was required for Make).
41972b676d7Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
42072b676d7Smrg  ;;
42172b676d7Smrgesac
42272b676d7Smrg
42372b676d7Smrgecho=${ECHO-echo}
42472b676d7Smrgif test "X[$]1" = X--no-reexec; then
42572b676d7Smrg  # Discard the --no-reexec flag, and continue.
42672b676d7Smrg  shift
42772b676d7Smrgelif test "X[$]1" = X--fallback-echo; then
42872b676d7Smrg  # Avoid inline document here, it may be left over
42972b676d7Smrg  :
43072b676d7Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
43172b676d7Smrg  # Yippee, $echo works!
43272b676d7Smrg  :
43372b676d7Smrgelse
43472b676d7Smrg  # Restart under the correct shell.
43572b676d7Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
43672b676d7Smrgfi
43772b676d7Smrg
43872b676d7Smrgif test "X[$]1" = X--fallback-echo; then
43972b676d7Smrg  # used as fallback echo
44072b676d7Smrg  shift
44172b676d7Smrg  cat <<EOF
44272b676d7Smrg[$]*
44372b676d7SmrgEOF
44472b676d7Smrg  exit 0
44572b676d7Smrgfi
44672b676d7Smrg
44772b676d7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
44872b676d7Smrg# if CDPATH is set.
44972b676d7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
45072b676d7Smrg
45172b676d7Smrgif test -z "$ECHO"; then
45272b676d7Smrgif test "X${echo_test_string+set}" != Xset; then
45372b676d7Smrg# find a string as large as possible, as long as the shell can cope with it
45472b676d7Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
45572b676d7Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
45672b676d7Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
45772b676d7Smrg       echo_test_string=`eval $cmd` &&
45872b676d7Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
45972b676d7Smrg    then
46072b676d7Smrg      break
46172b676d7Smrg    fi
46272b676d7Smrg  done
46372b676d7Smrgfi
46472b676d7Smrg
46572b676d7Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
46672b676d7Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
46772b676d7Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
46872b676d7Smrg  :
46972b676d7Smrgelse
47072b676d7Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
47172b676d7Smrg  # backslashes.  This makes it impossible to quote backslashes using
47272b676d7Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
47372b676d7Smrg  #
47472b676d7Smrg  # So, first we look for a working echo in the user's PATH.
47572b676d7Smrg
47672b676d7Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
47772b676d7Smrg  for dir in $PATH /usr/ucb; do
47872b676d7Smrg    IFS="$lt_save_ifs"
47972b676d7Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
48072b676d7Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
48172b676d7Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
48272b676d7Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
48372b676d7Smrg      echo="$dir/echo"
48472b676d7Smrg      break
48572b676d7Smrg    fi
48672b676d7Smrg  done
48772b676d7Smrg  IFS="$lt_save_ifs"
48872b676d7Smrg
48972b676d7Smrg  if test "X$echo" = Xecho; then
49072b676d7Smrg    # We didn't find a better echo, so look for alternatives.
49172b676d7Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
49272b676d7Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
49372b676d7Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
49472b676d7Smrg      # This shell has a builtin print -r that does the trick.
49572b676d7Smrg      echo='print -r'
49672b676d7Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
49772b676d7Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
49872b676d7Smrg      # If we have ksh, try running configure again with it.
49972b676d7Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
50072b676d7Smrg      export ORIGINAL_CONFIG_SHELL
50172b676d7Smrg      CONFIG_SHELL=/bin/ksh
50272b676d7Smrg      export CONFIG_SHELL
50372b676d7Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
50472b676d7Smrg    else
50572b676d7Smrg      # Try using printf.
50672b676d7Smrg      echo='printf %s\n'
50772b676d7Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
50872b676d7Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
50972b676d7Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
51072b676d7Smrg	# Cool, printf works
51172b676d7Smrg	:
51272b676d7Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
51372b676d7Smrg	   test "X$echo_testing_string" = 'X\t' &&
51472b676d7Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
51572b676d7Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
51672b676d7Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
51772b676d7Smrg	export CONFIG_SHELL
51872b676d7Smrg	SHELL="$CONFIG_SHELL"
51972b676d7Smrg	export SHELL
52072b676d7Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
52172b676d7Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
52272b676d7Smrg	   test "X$echo_testing_string" = 'X\t' &&
52372b676d7Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
52472b676d7Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
52572b676d7Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
52672b676d7Smrg      else
52772b676d7Smrg	# maybe with a smaller string...
52872b676d7Smrg	prev=:
52972b676d7Smrg
53072b676d7Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
53172b676d7Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
53272b676d7Smrg	  then
53372b676d7Smrg	    break
53472b676d7Smrg	  fi
53572b676d7Smrg	  prev="$cmd"
53672b676d7Smrg	done
53772b676d7Smrg
53872b676d7Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
53972b676d7Smrg	  echo_test_string=`eval $prev`
54072b676d7Smrg	  export echo_test_string
54172b676d7Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
54272b676d7Smrg	else
54372b676d7Smrg	  # Oops.  We lost completely, so just stick with echo.
54472b676d7Smrg	  echo=echo
54572b676d7Smrg	fi
54672b676d7Smrg      fi
54772b676d7Smrg    fi
54872b676d7Smrg  fi
54972b676d7Smrgfi
55072b676d7Smrgfi
55172b676d7Smrg
55272b676d7Smrg# Copy echo and quote the copy suitably for passing to libtool from
55372b676d7Smrg# the Makefile, instead of quoting the original, which is used later.
55472b676d7SmrgECHO=$echo
55572b676d7Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
55672b676d7Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
55772b676d7Smrgfi
55872b676d7Smrg
55972b676d7SmrgAC_SUBST(ECHO)
56072b676d7Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
56172b676d7Smrg
56272b676d7Smrg
56372b676d7Smrg# _LT_AC_LOCK
56472b676d7Smrg# -----------
56572b676d7SmrgAC_DEFUN([_LT_AC_LOCK],
56672b676d7Smrg[AC_ARG_ENABLE([libtool-lock],
56772b676d7Smrg    [AC_HELP_STRING([--disable-libtool-lock],
56872b676d7Smrg	[avoid locking (might break parallel builds)])])
56972b676d7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
57072b676d7Smrg
57172b676d7Smrg# Some flags need to be propagated to the compiler or linker for good
57272b676d7Smrg# libtool support.
57372b676d7Smrgcase $host in
57472b676d7Smrgia64-*-hpux*)
57572b676d7Smrg  # Find out which ABI we are using.
57672b676d7Smrg  echo 'int i;' > conftest.$ac_ext
57772b676d7Smrg  if AC_TRY_EVAL(ac_compile); then
57872b676d7Smrg    case `/usr/bin/file conftest.$ac_objext` in
57972b676d7Smrg    *ELF-32*)
58072b676d7Smrg      HPUX_IA64_MODE="32"
58172b676d7Smrg      ;;
58272b676d7Smrg    *ELF-64*)
58372b676d7Smrg      HPUX_IA64_MODE="64"
58472b676d7Smrg      ;;
58572b676d7Smrg    esac
58672b676d7Smrg  fi
58772b676d7Smrg  rm -rf conftest*
58872b676d7Smrg  ;;
58972b676d7Smrg*-*-irix6*)
59072b676d7Smrg  # Find out which ABI we are using.
59172b676d7Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
59272b676d7Smrg  if AC_TRY_EVAL(ac_compile); then
59372b676d7Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
59472b676d7Smrg    case `/usr/bin/file conftest.$ac_objext` in
59572b676d7Smrg    *32-bit*)
59672b676d7Smrg      LD="${LD-ld} -melf32bsmip"
59772b676d7Smrg      ;;
59872b676d7Smrg    *N32*)
59972b676d7Smrg      LD="${LD-ld} -melf32bmipn32"
60072b676d7Smrg      ;;
60172b676d7Smrg    *64-bit*)
60272b676d7Smrg      LD="${LD-ld} -melf64bmip"
60372b676d7Smrg      ;;
60472b676d7Smrg    esac
60572b676d7Smrg   else
60672b676d7Smrg    case `/usr/bin/file conftest.$ac_objext` in
60772b676d7Smrg    *32-bit*)
60872b676d7Smrg      LD="${LD-ld} -32"
60972b676d7Smrg      ;;
61072b676d7Smrg    *N32*)
61172b676d7Smrg      LD="${LD-ld} -n32"
61272b676d7Smrg      ;;
61372b676d7Smrg    *64-bit*)
61472b676d7Smrg      LD="${LD-ld} -64"
61572b676d7Smrg      ;;
61672b676d7Smrg    esac
61772b676d7Smrg   fi
61872b676d7Smrg  fi
61972b676d7Smrg  rm -rf conftest*
62072b676d7Smrg  ;;
62172b676d7Smrg
6221fd23544Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
6231fd23544Smrgs390*-*linux*|sparc*-*linux*)
62472b676d7Smrg  # Find out which ABI we are using.
62572b676d7Smrg  echo 'int i;' > conftest.$ac_ext
62672b676d7Smrg  if AC_TRY_EVAL(ac_compile); then
62772b676d7Smrg    case `/usr/bin/file conftest.o` in
62872b676d7Smrg    *32-bit*)
62972b676d7Smrg      case $host in
6301fd23544Smrg        x86_64-*kfreebsd*-gnu)
6311fd23544Smrg          LD="${LD-ld} -m elf_i386_fbsd"
6321fd23544Smrg          ;;
63372b676d7Smrg        x86_64-*linux*)
63472b676d7Smrg          LD="${LD-ld} -m elf_i386"
63572b676d7Smrg          ;;
63672b676d7Smrg        ppc64-*linux*|powerpc64-*linux*)
63772b676d7Smrg          LD="${LD-ld} -m elf32ppclinux"
63872b676d7Smrg          ;;
63972b676d7Smrg        s390x-*linux*)
64072b676d7Smrg          LD="${LD-ld} -m elf_s390"
64172b676d7Smrg          ;;
64272b676d7Smrg        sparc64-*linux*)
64372b676d7Smrg          LD="${LD-ld} -m elf32_sparc"
64472b676d7Smrg          ;;
64572b676d7Smrg      esac
64672b676d7Smrg      ;;
64772b676d7Smrg    *64-bit*)
6481fd23544Smrg      libsuff=64
64972b676d7Smrg      case $host in
6501fd23544Smrg        x86_64-*kfreebsd*-gnu)
6511fd23544Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
6521fd23544Smrg          ;;
65372b676d7Smrg        x86_64-*linux*)
65472b676d7Smrg          LD="${LD-ld} -m elf_x86_64"
65572b676d7Smrg          ;;
65672b676d7Smrg        ppc*-*linux*|powerpc*-*linux*)
65772b676d7Smrg          LD="${LD-ld} -m elf64ppc"
65872b676d7Smrg          ;;
65972b676d7Smrg        s390*-*linux*)
66072b676d7Smrg          LD="${LD-ld} -m elf64_s390"
66172b676d7Smrg          ;;
66272b676d7Smrg        sparc*-*linux*)
66372b676d7Smrg          LD="${LD-ld} -m elf64_sparc"
66472b676d7Smrg          ;;
66572b676d7Smrg      esac
66672b676d7Smrg      ;;
66772b676d7Smrg    esac
66872b676d7Smrg  fi
66972b676d7Smrg  rm -rf conftest*
67072b676d7Smrg  ;;
67172b676d7Smrg
67272b676d7Smrg*-*-sco3.2v5*)
67372b676d7Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
67472b676d7Smrg  SAVE_CFLAGS="$CFLAGS"
67572b676d7Smrg  CFLAGS="$CFLAGS -belf"
67672b676d7Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
67772b676d7Smrg    [AC_LANG_PUSH(C)
67872b676d7Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
67972b676d7Smrg     AC_LANG_POP])
68072b676d7Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
68172b676d7Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
68272b676d7Smrg    CFLAGS="$SAVE_CFLAGS"
68372b676d7Smrg  fi
68472b676d7Smrg  ;;
68572b676d7Smrgsparc*-*solaris*)
68672b676d7Smrg  # Find out which ABI we are using.
68772b676d7Smrg  echo 'int i;' > conftest.$ac_ext
68872b676d7Smrg  if AC_TRY_EVAL(ac_compile); then
68972b676d7Smrg    case `/usr/bin/file conftest.o` in
69072b676d7Smrg    *64-bit*)
69172b676d7Smrg      case $lt_cv_prog_gnu_ld in
69272b676d7Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
6931fd23544Smrg      *)
6941fd23544Smrg        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
6951fd23544Smrg	  LD="${LD-ld} -64"
6961fd23544Smrg	fi
6971fd23544Smrg	;;
69872b676d7Smrg      esac
69972b676d7Smrg      ;;
70072b676d7Smrg    esac
70172b676d7Smrg  fi
70272b676d7Smrg  rm -rf conftest*
70372b676d7Smrg  ;;
70472b676d7Smrg
70572b676d7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
70672b676d7Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
70772b676d7Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
70872b676d7Smrg  AC_CHECK_TOOL(AS, as, false)
70972b676d7Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
71072b676d7Smrg  ;;
71172b676d7Smrg  ])
71272b676d7Smrgesac
71372b676d7Smrg
71472b676d7Smrgneed_locks="$enable_libtool_lock"
71572b676d7Smrg
71672b676d7Smrg])# _LT_AC_LOCK
71772b676d7Smrg
71872b676d7Smrg
71972b676d7Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
72072b676d7Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
72172b676d7Smrg# ----------------------------------------------------------------
72272b676d7Smrg# Check whether the given compiler option works
72372b676d7SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
72472b676d7Smrg[AC_REQUIRE([LT_AC_PROG_SED])
72572b676d7SmrgAC_CACHE_CHECK([$1], [$2],
72672b676d7Smrg  [$2=no
72772b676d7Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
7281fd23544Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
72972b676d7Smrg   lt_compiler_flag="$3"
73072b676d7Smrg   # Insert the option either (1) after the last *FLAGS variable, or
73172b676d7Smrg   # (2) before a word containing "conftest.", or (3) at the end.
73272b676d7Smrg   # Note that $ac_compile itself does not contain backslashes and begins
73372b676d7Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
73472b676d7Smrg   # The option is referenced via a variable to avoid confusing sed.
73572b676d7Smrg   lt_compile=`echo "$ac_compile" | $SED \
73672b676d7Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
73772b676d7Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
73872b676d7Smrg   -e 's:$: $lt_compiler_flag:'`
73972b676d7Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
74072b676d7Smrg   (eval "$lt_compile" 2>conftest.err)
74172b676d7Smrg   ac_status=$?
74272b676d7Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
74372b676d7Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
74472b676d7Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
74572b676d7Smrg     # The compiler can only warn and ignore the option if not recognized
74672b676d7Smrg     # So say no if there are warnings other than the usual output.
74772b676d7Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
74872b676d7Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
74972b676d7Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
75072b676d7Smrg       $2=yes
75172b676d7Smrg     fi
75272b676d7Smrg   fi
75372b676d7Smrg   $rm conftest*
75472b676d7Smrg])
75572b676d7Smrg
75672b676d7Smrgif test x"[$]$2" = xyes; then
75772b676d7Smrg    ifelse([$5], , :, [$5])
75872b676d7Smrgelse
75972b676d7Smrg    ifelse([$6], , :, [$6])
76072b676d7Smrgfi
76172b676d7Smrg])# AC_LIBTOOL_COMPILER_OPTION
76272b676d7Smrg
76372b676d7Smrg
76472b676d7Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
76572b676d7Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
76672b676d7Smrg# ------------------------------------------------------------
76772b676d7Smrg# Check whether the given compiler option works
76872b676d7SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
7691fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
7701fd23544SmrgAC_CACHE_CHECK([$1], [$2],
77172b676d7Smrg  [$2=no
77272b676d7Smrg   save_LDFLAGS="$LDFLAGS"
77372b676d7Smrg   LDFLAGS="$LDFLAGS $3"
7741fd23544Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
77572b676d7Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
77672b676d7Smrg     # The linker can only warn and ignore the option if not recognized
77772b676d7Smrg     # So say no if there are warnings
77872b676d7Smrg     if test -s conftest.err; then
77972b676d7Smrg       # Append any errors to the config.log.
78072b676d7Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
78172b676d7Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
78272b676d7Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
78372b676d7Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
78472b676d7Smrg         $2=yes
78572b676d7Smrg       fi
78672b676d7Smrg     else
78772b676d7Smrg       $2=yes
78872b676d7Smrg     fi
78972b676d7Smrg   fi
7901fd23544Smrg   $rm -r conftest*
79172b676d7Smrg   LDFLAGS="$save_LDFLAGS"
79272b676d7Smrg])
79372b676d7Smrg
79472b676d7Smrgif test x"[$]$2" = xyes; then
79572b676d7Smrg    ifelse([$4], , :, [$4])
79672b676d7Smrgelse
79772b676d7Smrg    ifelse([$5], , :, [$5])
79872b676d7Smrgfi
79972b676d7Smrg])# AC_LIBTOOL_LINKER_OPTION
80072b676d7Smrg
80172b676d7Smrg
80272b676d7Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
80372b676d7Smrg# --------------------------
80472b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
80572b676d7Smrg[# find the maximum length of command line arguments
80672b676d7SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
80772b676d7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
80872b676d7Smrg  i=0
80972b676d7Smrg  teststring="ABCD"
81072b676d7Smrg
81172b676d7Smrg  case $build_os in
81272b676d7Smrg  msdosdjgpp*)
81372b676d7Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
81472b676d7Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
81572b676d7Smrg    # during glob expansion).  Even if it were fixed, the result of this
81672b676d7Smrg    # check would be larger than it should be.
81772b676d7Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
81872b676d7Smrg    ;;
81972b676d7Smrg
82072b676d7Smrg  gnu*)
82172b676d7Smrg    # Under GNU Hurd, this test is not required because there is
82272b676d7Smrg    # no limit to the length of command line arguments.
82372b676d7Smrg    # Libtool will interpret -1 as no limit whatsoever
82472b676d7Smrg    lt_cv_sys_max_cmd_len=-1;
82572b676d7Smrg    ;;
82672b676d7Smrg
82772b676d7Smrg  cygwin* | mingw*)
82872b676d7Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
82972b676d7Smrg    # about 5 minutes as the teststring grows exponentially.
83072b676d7Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
83172b676d7Smrg    # you end up with a "frozen" computer, even though with patience
83272b676d7Smrg    # the test eventually succeeds (with a max line length of 256k).
83372b676d7Smrg    # Instead, let's just punt: use the minimum linelength reported by
83472b676d7Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
83572b676d7Smrg    lt_cv_sys_max_cmd_len=8192;
83672b676d7Smrg    ;;
83772b676d7Smrg
83872b676d7Smrg  amigaos*)
83972b676d7Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
84072b676d7Smrg    # So we just punt and use a minimum line length of 8192.
84172b676d7Smrg    lt_cv_sys_max_cmd_len=8192;
84272b676d7Smrg    ;;
84372b676d7Smrg
84472b676d7Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
84572b676d7Smrg    # This has been around since 386BSD, at least.  Likely further.
84672b676d7Smrg    if test -x /sbin/sysctl; then
84772b676d7Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
84872b676d7Smrg    elif test -x /usr/sbin/sysctl; then
84972b676d7Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
85072b676d7Smrg    else
85172b676d7Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
85272b676d7Smrg    fi
85372b676d7Smrg    # And add a safety zone
85472b676d7Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
85572b676d7Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
85672b676d7Smrg    ;;
85772b676d7Smrg
85872b676d7Smrg  interix*)
85972b676d7Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
86072b676d7Smrg    lt_cv_sys_max_cmd_len=196608
86172b676d7Smrg    ;;
86272b676d7Smrg
86372b676d7Smrg  osf*)
86472b676d7Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
86572b676d7Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
86672b676d7Smrg    # nice to cause kernel panics so lets avoid the loop below.
86772b676d7Smrg    # First set a reasonable default.
86872b676d7Smrg    lt_cv_sys_max_cmd_len=16384
86972b676d7Smrg    #
87072b676d7Smrg    if test -x /sbin/sysconfig; then
87172b676d7Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
87272b676d7Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
87372b676d7Smrg      esac
87472b676d7Smrg    fi
87572b676d7Smrg    ;;
87672b676d7Smrg  sco3.2v5*)
87772b676d7Smrg    lt_cv_sys_max_cmd_len=102400
87872b676d7Smrg    ;;
87972b676d7Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
88072b676d7Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
88172b676d7Smrg    if test -n "$kargmax"; then
88272b676d7Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
88372b676d7Smrg    else
88472b676d7Smrg      lt_cv_sys_max_cmd_len=32768
88572b676d7Smrg    fi
88672b676d7Smrg    ;;
88772b676d7Smrg  *)
8881fd23544Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8891fd23544Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
8901fd23544Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8911fd23544Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8921fd23544Smrg    else
8931fd23544Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8941fd23544Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
89572b676d7Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
8961fd23544Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
8971fd23544Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
8981fd23544Smrg	      test $i != 17 # 1/2 MB should be enough
8991fd23544Smrg      do
9001fd23544Smrg        i=`expr $i + 1`
9011fd23544Smrg        teststring=$teststring$teststring
9021fd23544Smrg      done
9031fd23544Smrg      teststring=
9041fd23544Smrg      # Add a significant safety factor because C++ compilers can tack on massive
9051fd23544Smrg      # amounts of additional arguments before passing them to the linker.
9061fd23544Smrg      # It appears as though 1/2 is a usable value.
9071fd23544Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
9081fd23544Smrg    fi
90972b676d7Smrg    ;;
91072b676d7Smrg  esac
91172b676d7Smrg])
91272b676d7Smrgif test -n $lt_cv_sys_max_cmd_len ; then
91372b676d7Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
91472b676d7Smrgelse
91572b676d7Smrg  AC_MSG_RESULT(none)
91672b676d7Smrgfi
91772b676d7Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
91872b676d7Smrg
91972b676d7Smrg
92072b676d7Smrg# _LT_AC_CHECK_DLFCN
92172b676d7Smrg# ------------------
92272b676d7SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
92372b676d7Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
92472b676d7Smrg])# _LT_AC_CHECK_DLFCN
92572b676d7Smrg
92672b676d7Smrg
92772b676d7Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
92872b676d7Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
92972b676d7Smrg# ---------------------------------------------------------------------
93072b676d7SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
93172b676d7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
93272b676d7Smrgif test "$cross_compiling" = yes; then :
93372b676d7Smrg  [$4]
93472b676d7Smrgelse
93572b676d7Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
93672b676d7Smrg  lt_status=$lt_dlunknown
93772b676d7Smrg  cat > conftest.$ac_ext <<EOF
93872b676d7Smrg[#line __oline__ "configure"
93972b676d7Smrg#include "confdefs.h"
94072b676d7Smrg
94172b676d7Smrg#if HAVE_DLFCN_H
94272b676d7Smrg#include <dlfcn.h>
94372b676d7Smrg#endif
94472b676d7Smrg
94572b676d7Smrg#include <stdio.h>
94672b676d7Smrg
94772b676d7Smrg#ifdef RTLD_GLOBAL
94872b676d7Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
94972b676d7Smrg#else
95072b676d7Smrg#  ifdef DL_GLOBAL
95172b676d7Smrg#    define LT_DLGLOBAL		DL_GLOBAL
95272b676d7Smrg#  else
95372b676d7Smrg#    define LT_DLGLOBAL		0
95472b676d7Smrg#  endif
95572b676d7Smrg#endif
95672b676d7Smrg
95772b676d7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
95872b676d7Smrg   find out it does not work in some platform. */
95972b676d7Smrg#ifndef LT_DLLAZY_OR_NOW
96072b676d7Smrg#  ifdef RTLD_LAZY
96172b676d7Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
96272b676d7Smrg#  else
96372b676d7Smrg#    ifdef DL_LAZY
96472b676d7Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
96572b676d7Smrg#    else
96672b676d7Smrg#      ifdef RTLD_NOW
96772b676d7Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
96872b676d7Smrg#      else
96972b676d7Smrg#        ifdef DL_NOW
97072b676d7Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
97172b676d7Smrg#        else
97272b676d7Smrg#          define LT_DLLAZY_OR_NOW	0
97372b676d7Smrg#        endif
97472b676d7Smrg#      endif
97572b676d7Smrg#    endif
97672b676d7Smrg#  endif
97772b676d7Smrg#endif
97872b676d7Smrg
97972b676d7Smrg#ifdef __cplusplus
98072b676d7Smrgextern "C" void exit (int);
98172b676d7Smrg#endif
98272b676d7Smrg
98372b676d7Smrgvoid fnord() { int i=42;}
98472b676d7Smrgint main ()
98572b676d7Smrg{
98672b676d7Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
98772b676d7Smrg  int status = $lt_dlunknown;
98872b676d7Smrg
98972b676d7Smrg  if (self)
99072b676d7Smrg    {
99172b676d7Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
99272b676d7Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
99372b676d7Smrg      /* dlclose (self); */
99472b676d7Smrg    }
99572b676d7Smrg  else
99672b676d7Smrg    puts (dlerror ());
99772b676d7Smrg
99872b676d7Smrg    exit (status);
99972b676d7Smrg}]
100072b676d7SmrgEOF
100172b676d7Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
100272b676d7Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
100372b676d7Smrg    lt_status=$?
100472b676d7Smrg    case x$lt_status in
100572b676d7Smrg      x$lt_dlno_uscore) $1 ;;
100672b676d7Smrg      x$lt_dlneed_uscore) $2 ;;
100772b676d7Smrg      x$lt_dlunknown|x*) $3 ;;
100872b676d7Smrg    esac
100972b676d7Smrg  else :
101072b676d7Smrg    # compilation failed
101172b676d7Smrg    $3
101272b676d7Smrg  fi
101372b676d7Smrgfi
101472b676d7Smrgrm -fr conftest*
101572b676d7Smrg])# _LT_AC_TRY_DLOPEN_SELF
101672b676d7Smrg
101772b676d7Smrg
101872b676d7Smrg# AC_LIBTOOL_DLOPEN_SELF
101972b676d7Smrg# ----------------------
102072b676d7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
102172b676d7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
102272b676d7Smrgif test "x$enable_dlopen" != xyes; then
102372b676d7Smrg  enable_dlopen=unknown
102472b676d7Smrg  enable_dlopen_self=unknown
102572b676d7Smrg  enable_dlopen_self_static=unknown
102672b676d7Smrgelse
102772b676d7Smrg  lt_cv_dlopen=no
102872b676d7Smrg  lt_cv_dlopen_libs=
102972b676d7Smrg
103072b676d7Smrg  case $host_os in
103172b676d7Smrg  beos*)
103272b676d7Smrg    lt_cv_dlopen="load_add_on"
103372b676d7Smrg    lt_cv_dlopen_libs=
103472b676d7Smrg    lt_cv_dlopen_self=yes
103572b676d7Smrg    ;;
103672b676d7Smrg
103772b676d7Smrg  mingw* | pw32*)
103872b676d7Smrg    lt_cv_dlopen="LoadLibrary"
103972b676d7Smrg    lt_cv_dlopen_libs=
104072b676d7Smrg   ;;
104172b676d7Smrg
104272b676d7Smrg  cygwin*)
104372b676d7Smrg    lt_cv_dlopen="dlopen"
104472b676d7Smrg    lt_cv_dlopen_libs=
104572b676d7Smrg   ;;
104672b676d7Smrg
104772b676d7Smrg  darwin*)
104872b676d7Smrg  # if libdl is installed we need to link against it
104972b676d7Smrg    AC_CHECK_LIB([dl], [dlopen],
105072b676d7Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
105172b676d7Smrg    lt_cv_dlopen="dyld"
105272b676d7Smrg    lt_cv_dlopen_libs=
105372b676d7Smrg    lt_cv_dlopen_self=yes
105472b676d7Smrg    ])
105572b676d7Smrg   ;;
105672b676d7Smrg
105772b676d7Smrg  *)
105872b676d7Smrg    AC_CHECK_FUNC([shl_load],
105972b676d7Smrg	  [lt_cv_dlopen="shl_load"],
106072b676d7Smrg      [AC_CHECK_LIB([dld], [shl_load],
10611fd23544Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
106272b676d7Smrg	[AC_CHECK_FUNC([dlopen],
106372b676d7Smrg	      [lt_cv_dlopen="dlopen"],
106472b676d7Smrg	  [AC_CHECK_LIB([dl], [dlopen],
106572b676d7Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
106672b676d7Smrg	    [AC_CHECK_LIB([svld], [dlopen],
106772b676d7Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
106872b676d7Smrg	      [AC_CHECK_LIB([dld], [dld_link],
10691fd23544Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
107072b676d7Smrg	      ])
107172b676d7Smrg	    ])
107272b676d7Smrg	  ])
107372b676d7Smrg	])
107472b676d7Smrg      ])
107572b676d7Smrg    ;;
107672b676d7Smrg  esac
107772b676d7Smrg
107872b676d7Smrg  if test "x$lt_cv_dlopen" != xno; then
107972b676d7Smrg    enable_dlopen=yes
108072b676d7Smrg  else
108172b676d7Smrg    enable_dlopen=no
108272b676d7Smrg  fi
108372b676d7Smrg
108472b676d7Smrg  case $lt_cv_dlopen in
108572b676d7Smrg  dlopen)
108672b676d7Smrg    save_CPPFLAGS="$CPPFLAGS"
108772b676d7Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
108872b676d7Smrg
108972b676d7Smrg    save_LDFLAGS="$LDFLAGS"
109072b676d7Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
109172b676d7Smrg
109272b676d7Smrg    save_LIBS="$LIBS"
109372b676d7Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
109472b676d7Smrg
109572b676d7Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
109672b676d7Smrg	  lt_cv_dlopen_self, [dnl
109772b676d7Smrg	  _LT_AC_TRY_DLOPEN_SELF(
109872b676d7Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
109972b676d7Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
110072b676d7Smrg    ])
110172b676d7Smrg
110272b676d7Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
110372b676d7Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
110472b676d7Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
110572b676d7Smrg    	  lt_cv_dlopen_self_static, [dnl
110672b676d7Smrg	  _LT_AC_TRY_DLOPEN_SELF(
110772b676d7Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
110872b676d7Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
110972b676d7Smrg      ])
111072b676d7Smrg    fi
111172b676d7Smrg
111272b676d7Smrg    CPPFLAGS="$save_CPPFLAGS"
111372b676d7Smrg    LDFLAGS="$save_LDFLAGS"
111472b676d7Smrg    LIBS="$save_LIBS"
111572b676d7Smrg    ;;
111672b676d7Smrg  esac
111772b676d7Smrg
111872b676d7Smrg  case $lt_cv_dlopen_self in
111972b676d7Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
112072b676d7Smrg  *) enable_dlopen_self=unknown ;;
112172b676d7Smrg  esac
112272b676d7Smrg
112372b676d7Smrg  case $lt_cv_dlopen_self_static in
112472b676d7Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
112572b676d7Smrg  *) enable_dlopen_self_static=unknown ;;
112672b676d7Smrg  esac
112772b676d7Smrgfi
112872b676d7Smrg])# AC_LIBTOOL_DLOPEN_SELF
112972b676d7Smrg
113072b676d7Smrg
113172b676d7Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
113272b676d7Smrg# ---------------------------------
113372b676d7Smrg# Check to see if options -c and -o are simultaneously supported by compiler
113472b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
11351fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
11361fd23544SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
113772b676d7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
113872b676d7Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
113972b676d7Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
114072b676d7Smrg   $rm -r conftest 2>/dev/null
114172b676d7Smrg   mkdir conftest
114272b676d7Smrg   cd conftest
114372b676d7Smrg   mkdir out
11441fd23544Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
114572b676d7Smrg
114672b676d7Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
114772b676d7Smrg   # Insert the option either (1) after the last *FLAGS variable, or
114872b676d7Smrg   # (2) before a word containing "conftest.", or (3) at the end.
114972b676d7Smrg   # Note that $ac_compile itself does not contain backslashes and begins
115072b676d7Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
115172b676d7Smrg   lt_compile=`echo "$ac_compile" | $SED \
115272b676d7Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
115372b676d7Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
115472b676d7Smrg   -e 's:$: $lt_compiler_flag:'`
115572b676d7Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
115672b676d7Smrg   (eval "$lt_compile" 2>out/conftest.err)
115772b676d7Smrg   ac_status=$?
115872b676d7Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
115972b676d7Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
116072b676d7Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
116172b676d7Smrg   then
116272b676d7Smrg     # The compiler can only warn and ignore the option if not recognized
116372b676d7Smrg     # So say no if there are warnings
116472b676d7Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
116572b676d7Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
116672b676d7Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
116772b676d7Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
116872b676d7Smrg     fi
116972b676d7Smrg   fi
117072b676d7Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
117172b676d7Smrg   $rm conftest*
117272b676d7Smrg   # SGI C++ compiler will create directory out/ii_files/ for
117372b676d7Smrg   # template instantiation
117472b676d7Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
117572b676d7Smrg   $rm out/* && rmdir out
117672b676d7Smrg   cd ..
117772b676d7Smrg   rmdir conftest
117872b676d7Smrg   $rm conftest*
117972b676d7Smrg])
118072b676d7Smrg])# AC_LIBTOOL_PROG_CC_C_O
118172b676d7Smrg
118272b676d7Smrg
118372b676d7Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
118472b676d7Smrg# -----------------------------------------
118572b676d7Smrg# Check to see if we can do hard links to lock some files if needed
118672b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
118772b676d7Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
118872b676d7Smrg
118972b676d7Smrghard_links="nottested"
119072b676d7Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
119172b676d7Smrg  # do not overwrite the value of need_locks provided by the user
119272b676d7Smrg  AC_MSG_CHECKING([if we can lock with hard links])
119372b676d7Smrg  hard_links=yes
119472b676d7Smrg  $rm conftest*
119572b676d7Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
119672b676d7Smrg  touch conftest.a
119772b676d7Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
119872b676d7Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
119972b676d7Smrg  AC_MSG_RESULT([$hard_links])
120072b676d7Smrg  if test "$hard_links" = no; then
120172b676d7Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
120272b676d7Smrg    need_locks=warn
120372b676d7Smrg  fi
120472b676d7Smrgelse
120572b676d7Smrg  need_locks=no
120672b676d7Smrgfi
120772b676d7Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
120872b676d7Smrg
120972b676d7Smrg
121072b676d7Smrg# AC_LIBTOOL_OBJDIR
121172b676d7Smrg# -----------------
121272b676d7SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
121372b676d7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
121472b676d7Smrg[rm -f .libs 2>/dev/null
121572b676d7Smrgmkdir .libs 2>/dev/null
121672b676d7Smrgif test -d .libs; then
121772b676d7Smrg  lt_cv_objdir=.libs
121872b676d7Smrgelse
121972b676d7Smrg  # MS-DOS does not allow filenames that begin with a dot.
122072b676d7Smrg  lt_cv_objdir=_libs
122172b676d7Smrgfi
122272b676d7Smrgrmdir .libs 2>/dev/null])
122372b676d7Smrgobjdir=$lt_cv_objdir
122472b676d7Smrg])# AC_LIBTOOL_OBJDIR
122572b676d7Smrg
122672b676d7Smrg
122772b676d7Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
122872b676d7Smrg# ----------------------------------------------
122972b676d7Smrg# Check hardcoding attributes.
123072b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
123172b676d7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
123272b676d7Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
123372b676d7Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
123472b676d7Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
123572b676d7Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
123672b676d7Smrg
123772b676d7Smrg  # We can hardcode non-existant directories.
123872b676d7Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
123972b676d7Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
124072b676d7Smrg     # have to relink, otherwise we might link with an installed library
124172b676d7Smrg     # when we should be linking with a yet-to-be-installed one
124272b676d7Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
124372b676d7Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
124472b676d7Smrg    # Linking always hardcodes the temporary library directory.
124572b676d7Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
124672b676d7Smrg  else
124772b676d7Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
124872b676d7Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
124972b676d7Smrg  fi
125072b676d7Smrgelse
125172b676d7Smrg  # We cannot hardcode anything, or else we can only hardcode existing
125272b676d7Smrg  # directories.
125372b676d7Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
125472b676d7Smrgfi
125572b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
125672b676d7Smrg
125772b676d7Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
125872b676d7Smrg  # Fast installation is not supported
125972b676d7Smrg  enable_fast_install=no
126072b676d7Smrgelif test "$shlibpath_overrides_runpath" = yes ||
126172b676d7Smrg     test "$enable_shared" = no; then
126272b676d7Smrg  # Fast installation is not necessary
126372b676d7Smrg  enable_fast_install=needless
126472b676d7Smrgfi
126572b676d7Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
126672b676d7Smrg
126772b676d7Smrg
126872b676d7Smrg# AC_LIBTOOL_SYS_LIB_STRIP
126972b676d7Smrg# ------------------------
127072b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
127172b676d7Smrg[striplib=
127272b676d7Smrgold_striplib=
127372b676d7SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
127472b676d7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
127572b676d7Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
127672b676d7Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
127772b676d7Smrg  AC_MSG_RESULT([yes])
127872b676d7Smrgelse
127972b676d7Smrg# FIXME - insert some real tests, host_os isn't really good enough
128072b676d7Smrg  case $host_os in
128172b676d7Smrg   darwin*)
128272b676d7Smrg       if test -n "$STRIP" ; then
128372b676d7Smrg         striplib="$STRIP -x"
12841fd23544Smrg         old_striplib="$STRIP -S"
128572b676d7Smrg         AC_MSG_RESULT([yes])
128672b676d7Smrg       else
128772b676d7Smrg  AC_MSG_RESULT([no])
128872b676d7Smrgfi
128972b676d7Smrg       ;;
129072b676d7Smrg   *)
129172b676d7Smrg  AC_MSG_RESULT([no])
129272b676d7Smrg    ;;
129372b676d7Smrg  esac
129472b676d7Smrgfi
129572b676d7Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
129672b676d7Smrg
129772b676d7Smrg
129872b676d7Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
129972b676d7Smrg# -----------------------------
130072b676d7Smrg# PORTME Fill in your ld.so characteristics
130172b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
13021fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
13031fd23544SmrgAC_MSG_CHECKING([dynamic linker characteristics])
130472b676d7Smrglibrary_names_spec=
130572b676d7Smrglibname_spec='lib$name'
130672b676d7Smrgsoname_spec=
130772b676d7Smrgshrext_cmds=".so"
130872b676d7Smrgpostinstall_cmds=
130972b676d7Smrgpostuninstall_cmds=
131072b676d7Smrgfinish_cmds=
131172b676d7Smrgfinish_eval=
131272b676d7Smrgshlibpath_var=
131372b676d7Smrgshlibpath_overrides_runpath=unknown
131472b676d7Smrgversion_type=none
131572b676d7Smrgdynamic_linker="$host_os ld.so"
131672b676d7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
13171fd23544Smrgm4_if($1,[],[
131872b676d7Smrgif test "$GCC" = yes; then
13191fd23544Smrg  case $host_os in
13201fd23544Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
13211fd23544Smrg    *) lt_awk_arg="/^libraries:/" ;;
13221fd23544Smrg  esac
13231fd23544Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
13241fd23544Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
132572b676d7Smrg    # if the path contains ";" then we assume it to be the separator
132672b676d7Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
132772b676d7Smrg    # assumed that no part of a normal pathname contains ";" but that should
132872b676d7Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
13291fd23544Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
133072b676d7Smrg  else
13311fd23544Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
133272b676d7Smrg  fi
13331fd23544Smrg  # Ok, now we have the path, separated by spaces, we can step through it
13341fd23544Smrg  # and add multilib dir if necessary.
13351fd23544Smrg  lt_tmp_lt_search_path_spec=
13361fd23544Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
13371fd23544Smrg  for lt_sys_path in $lt_search_path_spec; do
13381fd23544Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
13391fd23544Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
13401fd23544Smrg    else
13411fd23544Smrg      test -d "$lt_sys_path" && \
13421fd23544Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
13431fd23544Smrg    fi
13441fd23544Smrg  done
13451fd23544Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
13461fd23544SmrgBEGIN {RS=" "; FS="/|\n";} {
13471fd23544Smrg  lt_foo="";
13481fd23544Smrg  lt_count=0;
13491fd23544Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
13501fd23544Smrg    if ($lt_i != "" && $lt_i != ".") {
13511fd23544Smrg      if ($lt_i == "..") {
13521fd23544Smrg        lt_count++;
13531fd23544Smrg      } else {
13541fd23544Smrg        if (lt_count == 0) {
13551fd23544Smrg          lt_foo="/" $lt_i lt_foo;
13561fd23544Smrg        } else {
13571fd23544Smrg          lt_count--;
13581fd23544Smrg        }
13591fd23544Smrg      }
13601fd23544Smrg    }
13611fd23544Smrg  }
13621fd23544Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
13631fd23544Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
13641fd23544Smrg}'`
13651fd23544Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
136672b676d7Smrgelse
136772b676d7Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
13681fd23544Smrgfi])
136972b676d7Smrgneed_lib_prefix=unknown
137072b676d7Smrghardcode_into_libs=no
137172b676d7Smrg
137272b676d7Smrg# when you set need_version to no, make sure it does not cause -set_version
137372b676d7Smrg# flags to be left without arguments
137472b676d7Smrgneed_version=unknown
137572b676d7Smrg
137672b676d7Smrgcase $host_os in
137772b676d7Smrgaix3*)
137872b676d7Smrg  version_type=linux
137972b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
138072b676d7Smrg  shlibpath_var=LIBPATH
138172b676d7Smrg
138272b676d7Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
138372b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
138472b676d7Smrg  ;;
138572b676d7Smrg
13861fd23544Smrgaix[[4-9]]*)
138772b676d7Smrg  version_type=linux
138872b676d7Smrg  need_lib_prefix=no
138972b676d7Smrg  need_version=no
139072b676d7Smrg  hardcode_into_libs=yes
139172b676d7Smrg  if test "$host_cpu" = ia64; then
139272b676d7Smrg    # AIX 5 supports IA64
139372b676d7Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
139472b676d7Smrg    shlibpath_var=LD_LIBRARY_PATH
139572b676d7Smrg  else
139672b676d7Smrg    # With GCC up to 2.95.x, collect2 would create an import file
139772b676d7Smrg    # for dependence libraries.  The import file would start with
139872b676d7Smrg    # the line `#! .'.  This would cause the generated library to
139972b676d7Smrg    # depend on `.', always an invalid library.  This was fixed in
140072b676d7Smrg    # development snapshots of GCC prior to 3.0.
140172b676d7Smrg    case $host_os in
140272b676d7Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
140372b676d7Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
140472b676d7Smrg	   echo ' yes '
140572b676d7Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
140672b676d7Smrg	:
140772b676d7Smrg      else
140872b676d7Smrg	can_build_shared=no
140972b676d7Smrg      fi
141072b676d7Smrg      ;;
141172b676d7Smrg    esac
141272b676d7Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
141372b676d7Smrg    # soname into executable. Probably we can add versioning support to
141472b676d7Smrg    # collect2, so additional links can be useful in future.
141572b676d7Smrg    if test "$aix_use_runtimelinking" = yes; then
141672b676d7Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
141772b676d7Smrg      # instead of lib<name>.a to let people know that these are not
141872b676d7Smrg      # typical AIX shared libraries.
141972b676d7Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
142072b676d7Smrg    else
142172b676d7Smrg      # We preserve .a as extension for shared libraries through AIX4.2
142272b676d7Smrg      # and later when we are not doing run time linking.
142372b676d7Smrg      library_names_spec='${libname}${release}.a $libname.a'
142472b676d7Smrg      soname_spec='${libname}${release}${shared_ext}$major'
142572b676d7Smrg    fi
142672b676d7Smrg    shlibpath_var=LIBPATH
142772b676d7Smrg  fi
142872b676d7Smrg  ;;
142972b676d7Smrg
143072b676d7Smrgamigaos*)
143172b676d7Smrg  library_names_spec='$libname.ixlibrary $libname.a'
143272b676d7Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
143372b676d7Smrg  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'
143472b676d7Smrg  ;;
143572b676d7Smrg
143672b676d7Smrgbeos*)
143772b676d7Smrg  library_names_spec='${libname}${shared_ext}'
143872b676d7Smrg  dynamic_linker="$host_os ld.so"
143972b676d7Smrg  shlibpath_var=LIBRARY_PATH
144072b676d7Smrg  ;;
144172b676d7Smrg
144272b676d7Smrgbsdi[[45]]*)
144372b676d7Smrg  version_type=linux
144472b676d7Smrg  need_version=no
144572b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
144672b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
144772b676d7Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
144872b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
144972b676d7Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
145072b676d7Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
145172b676d7Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
145272b676d7Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
145372b676d7Smrg  # libtool to hard-code these into programs
145472b676d7Smrg  ;;
145572b676d7Smrg
145672b676d7Smrgcygwin* | mingw* | pw32*)
145772b676d7Smrg  version_type=windows
145872b676d7Smrg  shrext_cmds=".dll"
145972b676d7Smrg  need_version=no
146072b676d7Smrg  need_lib_prefix=no
146172b676d7Smrg
146272b676d7Smrg  case $GCC,$host_os in
146372b676d7Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
146472b676d7Smrg    library_names_spec='$libname.dll.a'
146572b676d7Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
146672b676d7Smrg    postinstall_cmds='base_file=`basename \${file}`~
146772b676d7Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
146872b676d7Smrg      dldir=$destdir/`dirname \$dlpath`~
146972b676d7Smrg      test -d \$dldir || mkdir -p \$dldir~
147072b676d7Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
147172b676d7Smrg      chmod a+x \$dldir/$dlname'
147272b676d7Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
147372b676d7Smrg      dlpath=$dir/\$dldll~
147472b676d7Smrg       $rm \$dlpath'
147572b676d7Smrg    shlibpath_overrides_runpath=yes
147672b676d7Smrg
147772b676d7Smrg    case $host_os in
147872b676d7Smrg    cygwin*)
147972b676d7Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
148072b676d7Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
148172b676d7Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
148272b676d7Smrg      ;;
148372b676d7Smrg    mingw*)
148472b676d7Smrg      # MinGW DLLs use traditional 'lib' prefix
148572b676d7Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
148672b676d7Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
148772b676d7Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
148872b676d7Smrg        # It is most probably a Windows format PATH printed by
148972b676d7Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
149072b676d7Smrg        # path with ; separators, and with drive letters. We can handle the
149172b676d7Smrg        # drive letters (cygwin fileutils understands them), so leave them,
149272b676d7Smrg        # especially as we might pass files found there to a mingw objdump,
149372b676d7Smrg        # which wouldn't understand a cygwinified path. Ahh.
149472b676d7Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
149572b676d7Smrg      else
149672b676d7Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
149772b676d7Smrg      fi
149872b676d7Smrg      ;;
149972b676d7Smrg    pw32*)
150072b676d7Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
150172b676d7Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
150272b676d7Smrg      ;;
150372b676d7Smrg    esac
150472b676d7Smrg    ;;
150572b676d7Smrg
150672b676d7Smrg  *)
150772b676d7Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
150872b676d7Smrg    ;;
150972b676d7Smrg  esac
151072b676d7Smrg  dynamic_linker='Win32 ld.exe'
151172b676d7Smrg  # FIXME: first we should search . and the directory the executable is in
151272b676d7Smrg  shlibpath_var=PATH
151372b676d7Smrg  ;;
151472b676d7Smrg
151572b676d7Smrgdarwin* | rhapsody*)
151672b676d7Smrg  dynamic_linker="$host_os dyld"
151772b676d7Smrg  version_type=darwin
151872b676d7Smrg  need_lib_prefix=no
151972b676d7Smrg  need_version=no
152072b676d7Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
152172b676d7Smrg  soname_spec='${libname}${release}${major}$shared_ext'
152272b676d7Smrg  shlibpath_overrides_runpath=yes
152372b676d7Smrg  shlibpath_var=DYLD_LIBRARY_PATH
152472b676d7Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
15251fd23544Smrg  m4_if([$1], [],[
15261fd23544Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
152772b676d7Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
152872b676d7Smrg  ;;
152972b676d7Smrg
153072b676d7Smrgdgux*)
153172b676d7Smrg  version_type=linux
153272b676d7Smrg  need_lib_prefix=no
153372b676d7Smrg  need_version=no
153472b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
153572b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
153672b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
153772b676d7Smrg  ;;
153872b676d7Smrg
153972b676d7Smrgfreebsd1*)
154072b676d7Smrg  dynamic_linker=no
154172b676d7Smrg  ;;
154272b676d7Smrg
154372b676d7Smrgfreebsd* | dragonfly*)
154472b676d7Smrg  # DragonFly does not have aout.  When/if they implement a new
154572b676d7Smrg  # versioning mechanism, adjust this.
154672b676d7Smrg  if test -x /usr/bin/objformat; then
154772b676d7Smrg    objformat=`/usr/bin/objformat`
154872b676d7Smrg  else
154972b676d7Smrg    case $host_os in
155072b676d7Smrg    freebsd[[123]]*) objformat=aout ;;
155172b676d7Smrg    *) objformat=elf ;;
155272b676d7Smrg    esac
155372b676d7Smrg  fi
155472b676d7Smrg  version_type=freebsd-$objformat
155572b676d7Smrg  case $version_type in
155672b676d7Smrg    freebsd-elf*)
155772b676d7Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
155872b676d7Smrg      need_version=no
155972b676d7Smrg      need_lib_prefix=no
156072b676d7Smrg      ;;
156172b676d7Smrg    freebsd-*)
156272b676d7Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
156372b676d7Smrg      need_version=yes
156472b676d7Smrg      ;;
156572b676d7Smrg  esac
156672b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
156772b676d7Smrg  case $host_os in
156872b676d7Smrg  freebsd2*)
156972b676d7Smrg    shlibpath_overrides_runpath=yes
157072b676d7Smrg    ;;
157172b676d7Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
157272b676d7Smrg    shlibpath_overrides_runpath=yes
157372b676d7Smrg    hardcode_into_libs=yes
157472b676d7Smrg    ;;
157572b676d7Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
157672b676d7Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
157772b676d7Smrg    shlibpath_overrides_runpath=no
157872b676d7Smrg    hardcode_into_libs=yes
157972b676d7Smrg    ;;
15801fd23544Smrg  *) # from 4.6 on, and DragonFly
158172b676d7Smrg    shlibpath_overrides_runpath=yes
158272b676d7Smrg    hardcode_into_libs=yes
158372b676d7Smrg    ;;
158472b676d7Smrg  esac
158572b676d7Smrg  ;;
158672b676d7Smrg
158772b676d7Smrggnu*)
158872b676d7Smrg  version_type=linux
158972b676d7Smrg  need_lib_prefix=no
159072b676d7Smrg  need_version=no
159172b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
159272b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
159372b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
159472b676d7Smrg  hardcode_into_libs=yes
159572b676d7Smrg  ;;
159672b676d7Smrg
159772b676d7Smrghpux9* | hpux10* | hpux11*)
159872b676d7Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
159972b676d7Smrg  # link against other versions.
160072b676d7Smrg  version_type=sunos
160172b676d7Smrg  need_lib_prefix=no
160272b676d7Smrg  need_version=no
160372b676d7Smrg  case $host_cpu in
160472b676d7Smrg  ia64*)
160572b676d7Smrg    shrext_cmds='.so'
160672b676d7Smrg    hardcode_into_libs=yes
160772b676d7Smrg    dynamic_linker="$host_os dld.so"
160872b676d7Smrg    shlibpath_var=LD_LIBRARY_PATH
160972b676d7Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
161072b676d7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
161172b676d7Smrg    soname_spec='${libname}${release}${shared_ext}$major'
161272b676d7Smrg    if test "X$HPUX_IA64_MODE" = X32; then
161372b676d7Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
161472b676d7Smrg    else
161572b676d7Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
161672b676d7Smrg    fi
161772b676d7Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
161872b676d7Smrg    ;;
161972b676d7Smrg   hppa*64*)
162072b676d7Smrg     shrext_cmds='.sl'
162172b676d7Smrg     hardcode_into_libs=yes
162272b676d7Smrg     dynamic_linker="$host_os dld.sl"
162372b676d7Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
162472b676d7Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
162572b676d7Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
162672b676d7Smrg     soname_spec='${libname}${release}${shared_ext}$major'
162772b676d7Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
162872b676d7Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
162972b676d7Smrg     ;;
163072b676d7Smrg   *)
163172b676d7Smrg    shrext_cmds='.sl'
163272b676d7Smrg    dynamic_linker="$host_os dld.sl"
163372b676d7Smrg    shlibpath_var=SHLIB_PATH
163472b676d7Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
163572b676d7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
163672b676d7Smrg    soname_spec='${libname}${release}${shared_ext}$major'
163772b676d7Smrg    ;;
163872b676d7Smrg  esac
163972b676d7Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
164072b676d7Smrg  postinstall_cmds='chmod 555 $lib'
164172b676d7Smrg  ;;
164272b676d7Smrg
16431fd23544Smrginterix[[3-9]]*)
164472b676d7Smrg  version_type=linux
164572b676d7Smrg  need_lib_prefix=no
164672b676d7Smrg  need_version=no
164772b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
164872b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
164972b676d7Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
165072b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
165172b676d7Smrg  shlibpath_overrides_runpath=no
165272b676d7Smrg  hardcode_into_libs=yes
165372b676d7Smrg  ;;
165472b676d7Smrg
165572b676d7Smrgirix5* | irix6* | nonstopux*)
165672b676d7Smrg  case $host_os in
165772b676d7Smrg    nonstopux*) version_type=nonstopux ;;
165872b676d7Smrg    *)
165972b676d7Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
166072b676d7Smrg		version_type=linux
166172b676d7Smrg	else
166272b676d7Smrg		version_type=irix
166372b676d7Smrg	fi ;;
166472b676d7Smrg  esac
166572b676d7Smrg  need_lib_prefix=no
166672b676d7Smrg  need_version=no
166772b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
166872b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
166972b676d7Smrg  case $host_os in
167072b676d7Smrg  irix5* | nonstopux*)
167172b676d7Smrg    libsuff= shlibsuff=
167272b676d7Smrg    ;;
167372b676d7Smrg  *)
167472b676d7Smrg    case $LD in # libtool.m4 will add one of these switches to LD
167572b676d7Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
167672b676d7Smrg      libsuff= shlibsuff= libmagic=32-bit;;
167772b676d7Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
167872b676d7Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
167972b676d7Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
168072b676d7Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
168172b676d7Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
168272b676d7Smrg    esac
168372b676d7Smrg    ;;
168472b676d7Smrg  esac
168572b676d7Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
168672b676d7Smrg  shlibpath_overrides_runpath=no
168772b676d7Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
168872b676d7Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
168972b676d7Smrg  hardcode_into_libs=yes
169072b676d7Smrg  ;;
169172b676d7Smrg
169272b676d7Smrg# No shared lib support for Linux oldld, aout, or coff.
169372b676d7Smrglinux*oldld* | linux*aout* | linux*coff*)
169472b676d7Smrg  dynamic_linker=no
169572b676d7Smrg  ;;
169672b676d7Smrg
169772b676d7Smrg# This must be Linux ELF.
169872b676d7Smrglinux* | k*bsd*-gnu)
169972b676d7Smrg  version_type=linux
170072b676d7Smrg  need_lib_prefix=no
170172b676d7Smrg  need_version=no
170272b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
170372b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
170472b676d7Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
170572b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
170672b676d7Smrg  shlibpath_overrides_runpath=no
170772b676d7Smrg  # This implies no fast_install, which is unacceptable.
170872b676d7Smrg  # Some rework will be needed to allow for fast_install
170972b676d7Smrg  # before this can be enabled.
171072b676d7Smrg  hardcode_into_libs=yes
17111fd23544Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
17121fd23544Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
171372b676d7Smrg
171472b676d7Smrg  # Append ld.so.conf contents to the search path
171572b676d7Smrg  if test -f /etc/ld.so.conf; then
17161fd23544Smrg    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' ' '`
17171fd23544Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
171872b676d7Smrg  fi
171972b676d7Smrg
172072b676d7Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
172172b676d7Smrg  # powerpc, because MkLinux only supported shared libraries with the
172272b676d7Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
172372b676d7Smrg  # most powerpc-linux boxes support dynamic linking these days and
172472b676d7Smrg  # people can always --disable-shared, the test was removed, and we
172572b676d7Smrg  # assume the GNU/Linux dynamic linker is in use.
172672b676d7Smrg  dynamic_linker='GNU/Linux ld.so'
172772b676d7Smrg  ;;
172872b676d7Smrg
172972b676d7Smrgnetbsd*)
173072b676d7Smrg  version_type=sunos
173172b676d7Smrg  need_lib_prefix=no
173272b676d7Smrg  need_version=no
173372b676d7Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
173472b676d7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
173572b676d7Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
173672b676d7Smrg    dynamic_linker='NetBSD (a.out) ld.so'
173772b676d7Smrg  else
173872b676d7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
173972b676d7Smrg    soname_spec='${libname}${release}${shared_ext}$major'
174072b676d7Smrg    dynamic_linker='NetBSD ld.elf_so'
174172b676d7Smrg  fi
174272b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
174372b676d7Smrg  shlibpath_overrides_runpath=yes
174472b676d7Smrg  hardcode_into_libs=yes
174572b676d7Smrg  ;;
174672b676d7Smrg
174772b676d7Smrgnewsos6)
174872b676d7Smrg  version_type=linux
174972b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
175072b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
175172b676d7Smrg  shlibpath_overrides_runpath=yes
175272b676d7Smrg  ;;
175372b676d7Smrg
175472b676d7Smrgnto-qnx*)
175572b676d7Smrg  version_type=linux
175672b676d7Smrg  need_lib_prefix=no
175772b676d7Smrg  need_version=no
175872b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
175972b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
176072b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
176172b676d7Smrg  shlibpath_overrides_runpath=yes
176272b676d7Smrg  ;;
176372b676d7Smrg
176472b676d7Smrgopenbsd*)
176572b676d7Smrg  version_type=sunos
176672b676d7Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
176772b676d7Smrg  need_lib_prefix=no
176872b676d7Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
176972b676d7Smrg  case $host_os in
177072b676d7Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
177172b676d7Smrg    *)                         need_version=no  ;;
177272b676d7Smrg  esac
177372b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
177472b676d7Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
177572b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
177672b676d7Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
177772b676d7Smrg    case $host_os in
177872b676d7Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
177972b676d7Smrg	shlibpath_overrides_runpath=no
178072b676d7Smrg	;;
178172b676d7Smrg      *)
178272b676d7Smrg	shlibpath_overrides_runpath=yes
178372b676d7Smrg	;;
178472b676d7Smrg      esac
178572b676d7Smrg  else
178672b676d7Smrg    shlibpath_overrides_runpath=yes
178772b676d7Smrg  fi
178872b676d7Smrg  ;;
178972b676d7Smrg
179072b676d7Smrgos2*)
179172b676d7Smrg  libname_spec='$name'
179272b676d7Smrg  shrext_cmds=".dll"
179372b676d7Smrg  need_lib_prefix=no
179472b676d7Smrg  library_names_spec='$libname${shared_ext} $libname.a'
179572b676d7Smrg  dynamic_linker='OS/2 ld.exe'
179672b676d7Smrg  shlibpath_var=LIBPATH
179772b676d7Smrg  ;;
179872b676d7Smrg
179972b676d7Smrgosf3* | osf4* | osf5*)
180072b676d7Smrg  version_type=osf
180172b676d7Smrg  need_lib_prefix=no
180272b676d7Smrg  need_version=no
180372b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
180472b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
180572b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
180672b676d7Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
180772b676d7Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
180872b676d7Smrg  ;;
180972b676d7Smrg
18101fd23544Smrgrdos*)
18111fd23544Smrg  dynamic_linker=no
18121fd23544Smrg  ;;
18131fd23544Smrg
181472b676d7Smrgsolaris*)
181572b676d7Smrg  version_type=linux
181672b676d7Smrg  need_lib_prefix=no
181772b676d7Smrg  need_version=no
181872b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
181972b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
182072b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
182172b676d7Smrg  shlibpath_overrides_runpath=yes
182272b676d7Smrg  hardcode_into_libs=yes
182372b676d7Smrg  # ldd complains unless libraries are executable
182472b676d7Smrg  postinstall_cmds='chmod +x $lib'
182572b676d7Smrg  ;;
182672b676d7Smrg
182772b676d7Smrgsunos4*)
182872b676d7Smrg  version_type=sunos
182972b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
183072b676d7Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
183172b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
183272b676d7Smrg  shlibpath_overrides_runpath=yes
183372b676d7Smrg  if test "$with_gnu_ld" = yes; then
183472b676d7Smrg    need_lib_prefix=no
183572b676d7Smrg  fi
183672b676d7Smrg  need_version=yes
183772b676d7Smrg  ;;
183872b676d7Smrg
183972b676d7Smrgsysv4 | sysv4.3*)
184072b676d7Smrg  version_type=linux
184172b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
184272b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
184372b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
184472b676d7Smrg  case $host_vendor in
184572b676d7Smrg    sni)
184672b676d7Smrg      shlibpath_overrides_runpath=no
184772b676d7Smrg      need_lib_prefix=no
184872b676d7Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
184972b676d7Smrg      runpath_var=LD_RUN_PATH
185072b676d7Smrg      ;;
185172b676d7Smrg    siemens)
185272b676d7Smrg      need_lib_prefix=no
185372b676d7Smrg      ;;
185472b676d7Smrg    motorola)
185572b676d7Smrg      need_lib_prefix=no
185672b676d7Smrg      need_version=no
185772b676d7Smrg      shlibpath_overrides_runpath=no
185872b676d7Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
185972b676d7Smrg      ;;
186072b676d7Smrg  esac
186172b676d7Smrg  ;;
186272b676d7Smrg
186372b676d7Smrgsysv4*MP*)
186472b676d7Smrg  if test -d /usr/nec ;then
186572b676d7Smrg    version_type=linux
186672b676d7Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
186772b676d7Smrg    soname_spec='$libname${shared_ext}.$major'
186872b676d7Smrg    shlibpath_var=LD_LIBRARY_PATH
186972b676d7Smrg  fi
187072b676d7Smrg  ;;
187172b676d7Smrg
187272b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
187372b676d7Smrg  version_type=freebsd-elf
187472b676d7Smrg  need_lib_prefix=no
187572b676d7Smrg  need_version=no
187672b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
187772b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
187872b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
187972b676d7Smrg  hardcode_into_libs=yes
188072b676d7Smrg  if test "$with_gnu_ld" = yes; then
188172b676d7Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
188272b676d7Smrg    shlibpath_overrides_runpath=no
188372b676d7Smrg  else
188472b676d7Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
188572b676d7Smrg    shlibpath_overrides_runpath=yes
188672b676d7Smrg    case $host_os in
188772b676d7Smrg      sco3.2v5*)
188872b676d7Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
188972b676d7Smrg	;;
189072b676d7Smrg    esac
189172b676d7Smrg  fi
189272b676d7Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
189372b676d7Smrg  ;;
189472b676d7Smrg
189572b676d7Smrguts4*)
189672b676d7Smrg  version_type=linux
189772b676d7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
189872b676d7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
189972b676d7Smrg  shlibpath_var=LD_LIBRARY_PATH
190072b676d7Smrg  ;;
190172b676d7Smrg
190272b676d7Smrg*)
190372b676d7Smrg  dynamic_linker=no
190472b676d7Smrg  ;;
190572b676d7Smrgesac
190672b676d7SmrgAC_MSG_RESULT([$dynamic_linker])
190772b676d7Smrgtest "$dynamic_linker" = no && can_build_shared=no
190872b676d7Smrg
19091fd23544SmrgAC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
19101fd23544Smrg[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
19111fd23544Smrgsys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
19121fd23544SmrgAC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
19131fd23544Smrg[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
19141fd23544Smrgsys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
19151fd23544Smrg
191672b676d7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
191772b676d7Smrgif test "$GCC" = yes; then
191872b676d7Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
191972b676d7Smrgfi
192072b676d7Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
192172b676d7Smrg
192272b676d7Smrg
192372b676d7Smrg# _LT_AC_TAGCONFIG
192472b676d7Smrg# ----------------
192572b676d7SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
19261fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
19271fd23544SmrgAC_ARG_WITH([tags],
192872b676d7Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
192972b676d7Smrg        [include additional configurations @<:@automatic@:>@])],
193072b676d7Smrg    [tagnames="$withval"])
193172b676d7Smrg
193272b676d7Smrgif test -f "$ltmain" && test -n "$tagnames"; then
193372b676d7Smrg  if test ! -f "${ofile}"; then
193472b676d7Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
193572b676d7Smrg  fi
193672b676d7Smrg
193772b676d7Smrg  if test -z "$LTCC"; then
193872b676d7Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
193972b676d7Smrg    if test -z "$LTCC"; then
194072b676d7Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
194172b676d7Smrg    else
194272b676d7Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
194372b676d7Smrg    fi
194472b676d7Smrg  fi
194572b676d7Smrg  if test -z "$LTCFLAGS"; then
194672b676d7Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
194772b676d7Smrg  fi
194872b676d7Smrg
194972b676d7Smrg  # Extract list of available tagged configurations in $ofile.
195072b676d7Smrg  # Note that this assumes the entire list is on one line.
195172b676d7Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
195272b676d7Smrg
195372b676d7Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
195472b676d7Smrg  for tagname in $tagnames; do
195572b676d7Smrg    IFS="$lt_save_ifs"
195672b676d7Smrg    # Check whether tagname contains only valid characters
195772b676d7Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
195872b676d7Smrg    "") ;;
195972b676d7Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
196072b676d7Smrg	;;
196172b676d7Smrg    esac
196272b676d7Smrg
196372b676d7Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
196472b676d7Smrg    then
196572b676d7Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
196672b676d7Smrg    fi
196772b676d7Smrg
196872b676d7Smrg    # Update the list of available tags.
196972b676d7Smrg    if test -n "$tagname"; then
197072b676d7Smrg      echo appending configuration tag \"$tagname\" to $ofile
197172b676d7Smrg
197272b676d7Smrg      case $tagname in
197372b676d7Smrg      CXX)
197472b676d7Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
197572b676d7Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
197672b676d7Smrg	    (test "X$CXX" != "Xg++"))) ; then
197772b676d7Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
197872b676d7Smrg	else
197972b676d7Smrg	  tagname=""
198072b676d7Smrg	fi
198172b676d7Smrg	;;
198272b676d7Smrg
198372b676d7Smrg      F77)
198472b676d7Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
198572b676d7Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
198672b676d7Smrg	else
198772b676d7Smrg	  tagname=""
198872b676d7Smrg	fi
198972b676d7Smrg	;;
199072b676d7Smrg
199172b676d7Smrg      GCJ)
199272b676d7Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
199372b676d7Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
199472b676d7Smrg	else
199572b676d7Smrg	  tagname=""
199672b676d7Smrg	fi
199772b676d7Smrg	;;
199872b676d7Smrg
199972b676d7Smrg      RC)
200072b676d7Smrg	AC_LIBTOOL_LANG_RC_CONFIG
200172b676d7Smrg	;;
200272b676d7Smrg
200372b676d7Smrg      *)
200472b676d7Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
200572b676d7Smrg	;;
200672b676d7Smrg      esac
200772b676d7Smrg
200872b676d7Smrg      # Append the new tag name to the list of available tags.
200972b676d7Smrg      if test -n "$tagname" ; then
201072b676d7Smrg      available_tags="$available_tags $tagname"
201172b676d7Smrg    fi
201272b676d7Smrg    fi
201372b676d7Smrg  done
201472b676d7Smrg  IFS="$lt_save_ifs"
201572b676d7Smrg
201672b676d7Smrg  # Now substitute the updated list of available tags.
201772b676d7Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
201872b676d7Smrg    mv "${ofile}T" "$ofile"
201972b676d7Smrg    chmod +x "$ofile"
202072b676d7Smrg  else
202172b676d7Smrg    rm -f "${ofile}T"
202272b676d7Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
202372b676d7Smrg  fi
202472b676d7Smrgfi
202572b676d7Smrg])# _LT_AC_TAGCONFIG
202672b676d7Smrg
202772b676d7Smrg
202872b676d7Smrg# AC_LIBTOOL_DLOPEN
202972b676d7Smrg# -----------------
203072b676d7Smrg# enable checks for dlopen support
203172b676d7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
203272b676d7Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
203372b676d7Smrg])# AC_LIBTOOL_DLOPEN
203472b676d7Smrg
203572b676d7Smrg
203672b676d7Smrg# AC_LIBTOOL_WIN32_DLL
203772b676d7Smrg# --------------------
203872b676d7Smrg# declare package support for building win32 DLLs
203972b676d7SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
204072b676d7Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
204172b676d7Smrg])# AC_LIBTOOL_WIN32_DLL
204272b676d7Smrg
204372b676d7Smrg
204472b676d7Smrg# AC_ENABLE_SHARED([DEFAULT])
204572b676d7Smrg# ---------------------------
204672b676d7Smrg# implement the --enable-shared flag
204772b676d7Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
204872b676d7SmrgAC_DEFUN([AC_ENABLE_SHARED],
204972b676d7Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
205072b676d7SmrgAC_ARG_ENABLE([shared],
205172b676d7Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
205272b676d7Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
205372b676d7Smrg    [p=${PACKAGE-default}
205472b676d7Smrg    case $enableval in
205572b676d7Smrg    yes) enable_shared=yes ;;
205672b676d7Smrg    no) enable_shared=no ;;
205772b676d7Smrg    *)
205872b676d7Smrg      enable_shared=no
205972b676d7Smrg      # Look at the argument we got.  We use all the common list separators.
206072b676d7Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
206172b676d7Smrg      for pkg in $enableval; do
206272b676d7Smrg	IFS="$lt_save_ifs"
206372b676d7Smrg	if test "X$pkg" = "X$p"; then
206472b676d7Smrg	  enable_shared=yes
206572b676d7Smrg	fi
206672b676d7Smrg      done
206772b676d7Smrg      IFS="$lt_save_ifs"
206872b676d7Smrg      ;;
206972b676d7Smrg    esac],
207072b676d7Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
207172b676d7Smrg])# AC_ENABLE_SHARED
207272b676d7Smrg
207372b676d7Smrg
207472b676d7Smrg# AC_DISABLE_SHARED
207572b676d7Smrg# -----------------
207672b676d7Smrg# set the default shared flag to --disable-shared
207772b676d7SmrgAC_DEFUN([AC_DISABLE_SHARED],
207872b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
207972b676d7SmrgAC_ENABLE_SHARED(no)
208072b676d7Smrg])# AC_DISABLE_SHARED
208172b676d7Smrg
208272b676d7Smrg
208372b676d7Smrg# AC_ENABLE_STATIC([DEFAULT])
208472b676d7Smrg# ---------------------------
208572b676d7Smrg# implement the --enable-static flag
208672b676d7Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
208772b676d7SmrgAC_DEFUN([AC_ENABLE_STATIC],
208872b676d7Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
208972b676d7SmrgAC_ARG_ENABLE([static],
209072b676d7Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
209172b676d7Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
209272b676d7Smrg    [p=${PACKAGE-default}
209372b676d7Smrg    case $enableval in
209472b676d7Smrg    yes) enable_static=yes ;;
209572b676d7Smrg    no) enable_static=no ;;
209672b676d7Smrg    *)
209772b676d7Smrg     enable_static=no
209872b676d7Smrg      # Look at the argument we got.  We use all the common list separators.
209972b676d7Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
210072b676d7Smrg      for pkg in $enableval; do
210172b676d7Smrg	IFS="$lt_save_ifs"
210272b676d7Smrg	if test "X$pkg" = "X$p"; then
210372b676d7Smrg	  enable_static=yes
210472b676d7Smrg	fi
210572b676d7Smrg      done
210672b676d7Smrg      IFS="$lt_save_ifs"
210772b676d7Smrg      ;;
210872b676d7Smrg    esac],
210972b676d7Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
211072b676d7Smrg])# AC_ENABLE_STATIC
211172b676d7Smrg
211272b676d7Smrg
211372b676d7Smrg# AC_DISABLE_STATIC
211472b676d7Smrg# -----------------
211572b676d7Smrg# set the default static flag to --disable-static
211672b676d7SmrgAC_DEFUN([AC_DISABLE_STATIC],
211772b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
211872b676d7SmrgAC_ENABLE_STATIC(no)
211972b676d7Smrg])# AC_DISABLE_STATIC
212072b676d7Smrg
212172b676d7Smrg
212272b676d7Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
212372b676d7Smrg# ---------------------------------
212472b676d7Smrg# implement the --enable-fast-install flag
212572b676d7Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
212672b676d7SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
212772b676d7Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
212872b676d7SmrgAC_ARG_ENABLE([fast-install],
212972b676d7Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
213072b676d7Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
213172b676d7Smrg    [p=${PACKAGE-default}
213272b676d7Smrg    case $enableval in
213372b676d7Smrg    yes) enable_fast_install=yes ;;
213472b676d7Smrg    no) enable_fast_install=no ;;
213572b676d7Smrg    *)
213672b676d7Smrg      enable_fast_install=no
213772b676d7Smrg      # Look at the argument we got.  We use all the common list separators.
213872b676d7Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
213972b676d7Smrg      for pkg in $enableval; do
214072b676d7Smrg	IFS="$lt_save_ifs"
214172b676d7Smrg	if test "X$pkg" = "X$p"; then
214272b676d7Smrg	  enable_fast_install=yes
214372b676d7Smrg	fi
214472b676d7Smrg      done
214572b676d7Smrg      IFS="$lt_save_ifs"
214672b676d7Smrg      ;;
214772b676d7Smrg    esac],
214872b676d7Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
214972b676d7Smrg])# AC_ENABLE_FAST_INSTALL
215072b676d7Smrg
215172b676d7Smrg
215272b676d7Smrg# AC_DISABLE_FAST_INSTALL
215372b676d7Smrg# -----------------------
215472b676d7Smrg# set the default to --disable-fast-install
215572b676d7SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
215672b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
215772b676d7SmrgAC_ENABLE_FAST_INSTALL(no)
215872b676d7Smrg])# AC_DISABLE_FAST_INSTALL
215972b676d7Smrg
216072b676d7Smrg
216172b676d7Smrg# AC_LIBTOOL_PICMODE([MODE])
216272b676d7Smrg# --------------------------
216372b676d7Smrg# implement the --with-pic flag
216472b676d7Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
216572b676d7SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
216672b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
216772b676d7Smrgpic_mode=ifelse($#,1,$1,default)
216872b676d7Smrg])# AC_LIBTOOL_PICMODE
216972b676d7Smrg
217072b676d7Smrg
217172b676d7Smrg# AC_PROG_EGREP
217272b676d7Smrg# -------------
217372b676d7Smrg# This is predefined starting with Autoconf 2.54, so this conditional
217472b676d7Smrg# definition can be removed once we require Autoconf 2.54 or later.
217572b676d7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
217672b676d7Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
217772b676d7Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
217872b676d7Smrg    then ac_cv_prog_egrep='grep -E'
217972b676d7Smrg    else ac_cv_prog_egrep='egrep'
218072b676d7Smrg    fi])
218172b676d7Smrg EGREP=$ac_cv_prog_egrep
218272b676d7Smrg AC_SUBST([EGREP])
218372b676d7Smrg])])
218472b676d7Smrg
218572b676d7Smrg
218672b676d7Smrg# AC_PATH_TOOL_PREFIX
218772b676d7Smrg# -------------------
21881fd23544Smrg# find a file program which can recognize shared library
218972b676d7SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
219072b676d7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
219172b676d7SmrgAC_MSG_CHECKING([for $1])
219272b676d7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
219372b676d7Smrg[case $MAGIC_CMD in
219472b676d7Smrg[[\\/*] |  ?:[\\/]*])
219572b676d7Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
219672b676d7Smrg  ;;
219772b676d7Smrg*)
219872b676d7Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
219972b676d7Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
220072b676d7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
220172b676d7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
220272b676d7Smrgdnl not every word.  This closes a longstanding sh security hole.
220372b676d7Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
220472b676d7Smrg  for ac_dir in $ac_dummy; do
220572b676d7Smrg    IFS="$lt_save_ifs"
220672b676d7Smrg    test -z "$ac_dir" && ac_dir=.
220772b676d7Smrg    if test -f $ac_dir/$1; then
220872b676d7Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
220972b676d7Smrg      if test -n "$file_magic_test_file"; then
221072b676d7Smrg	case $deplibs_check_method in
221172b676d7Smrg	"file_magic "*)
221272b676d7Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
221372b676d7Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
221472b676d7Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
221572b676d7Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
221672b676d7Smrg	    :
221772b676d7Smrg	  else
221872b676d7Smrg	    cat <<EOF 1>&2
221972b676d7Smrg
222072b676d7Smrg*** Warning: the command libtool uses to detect shared libraries,
222172b676d7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
222272b676d7Smrg*** The result is that libtool may fail to recognize shared libraries
222372b676d7Smrg*** as such.  This will affect the creation of libtool libraries that
222472b676d7Smrg*** depend on shared libraries, but programs linked with such libtool
222572b676d7Smrg*** libraries will work regardless of this problem.  Nevertheless, you
222672b676d7Smrg*** may want to report the problem to your system manager and/or to
222772b676d7Smrg*** bug-libtool@gnu.org
222872b676d7Smrg
222972b676d7SmrgEOF
223072b676d7Smrg	  fi ;;
223172b676d7Smrg	esac
223272b676d7Smrg      fi
223372b676d7Smrg      break
223472b676d7Smrg    fi
223572b676d7Smrg  done
223672b676d7Smrg  IFS="$lt_save_ifs"
223772b676d7Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
223872b676d7Smrg  ;;
223972b676d7Smrgesac])
224072b676d7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
224172b676d7Smrgif test -n "$MAGIC_CMD"; then
224272b676d7Smrg  AC_MSG_RESULT($MAGIC_CMD)
224372b676d7Smrgelse
224472b676d7Smrg  AC_MSG_RESULT(no)
224572b676d7Smrgfi
224672b676d7Smrg])# AC_PATH_TOOL_PREFIX
224772b676d7Smrg
224872b676d7Smrg
224972b676d7Smrg# AC_PATH_MAGIC
225072b676d7Smrg# -------------
22511fd23544Smrg# find a file program which can recognize a shared library
225272b676d7SmrgAC_DEFUN([AC_PATH_MAGIC],
225372b676d7Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
225472b676d7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
225572b676d7Smrg  if test -n "$ac_tool_prefix"; then
225672b676d7Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
225772b676d7Smrg  else
225872b676d7Smrg    MAGIC_CMD=:
225972b676d7Smrg  fi
226072b676d7Smrgfi
226172b676d7Smrg])# AC_PATH_MAGIC
226272b676d7Smrg
226372b676d7Smrg
226472b676d7Smrg# AC_PROG_LD
226572b676d7Smrg# ----------
226672b676d7Smrg# find the pathname to the GNU or non-GNU linker
226772b676d7SmrgAC_DEFUN([AC_PROG_LD],
226872b676d7Smrg[AC_ARG_WITH([gnu-ld],
226972b676d7Smrg    [AC_HELP_STRING([--with-gnu-ld],
227072b676d7Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
227172b676d7Smrg    [test "$withval" = no || with_gnu_ld=yes],
227272b676d7Smrg    [with_gnu_ld=no])
227372b676d7SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
227472b676d7SmrgAC_REQUIRE([AC_PROG_CC])dnl
227572b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
227672b676d7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
227772b676d7Smrgac_prog=ld
227872b676d7Smrgif test "$GCC" = yes; then
227972b676d7Smrg  # Check if gcc -print-prog-name=ld gives a path.
228072b676d7Smrg  AC_MSG_CHECKING([for ld used by $CC])
228172b676d7Smrg  case $host in
228272b676d7Smrg  *-*-mingw*)
228372b676d7Smrg    # gcc leaves a trailing carriage return which upsets mingw
228472b676d7Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
228572b676d7Smrg  *)
228672b676d7Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
228772b676d7Smrg  esac
228872b676d7Smrg  case $ac_prog in
228972b676d7Smrg    # Accept absolute paths.
229072b676d7Smrg    [[\\/]]* | ?:[[\\/]]*)
229172b676d7Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
229272b676d7Smrg      # Canonicalize the pathname of ld
229372b676d7Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
229472b676d7Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
229572b676d7Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
229672b676d7Smrg      done
229772b676d7Smrg      test -z "$LD" && LD="$ac_prog"
229872b676d7Smrg      ;;
229972b676d7Smrg  "")
230072b676d7Smrg    # If it fails, then pretend we aren't using GCC.
230172b676d7Smrg    ac_prog=ld
230272b676d7Smrg    ;;
230372b676d7Smrg  *)
230472b676d7Smrg    # If it is relative, then search for the first ld in PATH.
230572b676d7Smrg    with_gnu_ld=unknown
230672b676d7Smrg    ;;
230772b676d7Smrg  esac
230872b676d7Smrgelif test "$with_gnu_ld" = yes; then
230972b676d7Smrg  AC_MSG_CHECKING([for GNU ld])
231072b676d7Smrgelse
231172b676d7Smrg  AC_MSG_CHECKING([for non-GNU ld])
231272b676d7Smrgfi
231372b676d7SmrgAC_CACHE_VAL(lt_cv_path_LD,
231472b676d7Smrg[if test -z "$LD"; then
231572b676d7Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
231672b676d7Smrg  for ac_dir in $PATH; do
231772b676d7Smrg    IFS="$lt_save_ifs"
231872b676d7Smrg    test -z "$ac_dir" && ac_dir=.
231972b676d7Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
232072b676d7Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
232172b676d7Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
232272b676d7Smrg      # but apparently some variants of GNU ld only accept -v.
232372b676d7Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
232472b676d7Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
232572b676d7Smrg      *GNU* | *'with BFD'*)
232672b676d7Smrg	test "$with_gnu_ld" != no && break
232772b676d7Smrg	;;
232872b676d7Smrg      *)
232972b676d7Smrg	test "$with_gnu_ld" != yes && break
233072b676d7Smrg	;;
233172b676d7Smrg      esac
233272b676d7Smrg    fi
233372b676d7Smrg  done
233472b676d7Smrg  IFS="$lt_save_ifs"
233572b676d7Smrgelse
233672b676d7Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
233772b676d7Smrgfi])
233872b676d7SmrgLD="$lt_cv_path_LD"
233972b676d7Smrgif test -n "$LD"; then
234072b676d7Smrg  AC_MSG_RESULT($LD)
234172b676d7Smrgelse
234272b676d7Smrg  AC_MSG_RESULT(no)
234372b676d7Smrgfi
234472b676d7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
234572b676d7SmrgAC_PROG_LD_GNU
234672b676d7Smrg])# AC_PROG_LD
234772b676d7Smrg
234872b676d7Smrg
234972b676d7Smrg# AC_PROG_LD_GNU
235072b676d7Smrg# --------------
235172b676d7SmrgAC_DEFUN([AC_PROG_LD_GNU],
235272b676d7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
235372b676d7SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
235472b676d7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
235572b676d7Smrgcase `$LD -v 2>&1 </dev/null` in
235672b676d7Smrg*GNU* | *'with BFD'*)
235772b676d7Smrg  lt_cv_prog_gnu_ld=yes
235872b676d7Smrg  ;;
235972b676d7Smrg*)
236072b676d7Smrg  lt_cv_prog_gnu_ld=no
236172b676d7Smrg  ;;
236272b676d7Smrgesac])
236372b676d7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
236472b676d7Smrg])# AC_PROG_LD_GNU
236572b676d7Smrg
236672b676d7Smrg
236772b676d7Smrg# AC_PROG_LD_RELOAD_FLAG
236872b676d7Smrg# ----------------------
236972b676d7Smrg# find reload flag for linker
237072b676d7Smrg#   -- PORTME Some linkers may need a different reload flag.
237172b676d7SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
237272b676d7Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
237372b676d7Smrg  lt_cv_ld_reload_flag,
237472b676d7Smrg  [lt_cv_ld_reload_flag='-r'])
237572b676d7Smrgreload_flag=$lt_cv_ld_reload_flag
237672b676d7Smrgcase $reload_flag in
237772b676d7Smrg"" | " "*) ;;
237872b676d7Smrg*) reload_flag=" $reload_flag" ;;
237972b676d7Smrgesac
238072b676d7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
238172b676d7Smrgcase $host_os in
238272b676d7Smrg  darwin*)
238372b676d7Smrg    if test "$GCC" = yes; then
238472b676d7Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
238572b676d7Smrg    else
238672b676d7Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
238772b676d7Smrg    fi
238872b676d7Smrg    ;;
238972b676d7Smrgesac
239072b676d7Smrg])# AC_PROG_LD_RELOAD_FLAG
239172b676d7Smrg
239272b676d7Smrg
239372b676d7Smrg# AC_DEPLIBS_CHECK_METHOD
239472b676d7Smrg# -----------------------
239572b676d7Smrg# how to check for library dependencies
239672b676d7Smrg#  -- PORTME fill in with the dynamic library characteristics
239772b676d7SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
23981fd23544Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
239972b676d7Smrglt_cv_deplibs_check_method,
240072b676d7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
240172b676d7Smrglt_cv_file_magic_test_file=
240272b676d7Smrglt_cv_deplibs_check_method='unknown'
240372b676d7Smrg# Need to set the preceding variable on all platforms that support
240472b676d7Smrg# interlibrary dependencies.
240572b676d7Smrg# 'none' -- dependencies not supported.
240672b676d7Smrg# `unknown' -- same as none, but documents that we really don't know.
240772b676d7Smrg# 'pass_all' -- all dependencies passed with no checks.
240872b676d7Smrg# 'test_compile' -- check by making test program.
240972b676d7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
241072b676d7Smrg# which responds to the $file_magic_cmd with a given extended regex.
241172b676d7Smrg# If you have `file' or equivalent on your system and you're not sure
241272b676d7Smrg# whether `pass_all' will *always* work, you probably want this one.
241372b676d7Smrg
241472b676d7Smrgcase $host_os in
24151fd23544Smrgaix[[4-9]]*)
241672b676d7Smrg  lt_cv_deplibs_check_method=pass_all
241772b676d7Smrg  ;;
241872b676d7Smrg
241972b676d7Smrgbeos*)
242072b676d7Smrg  lt_cv_deplibs_check_method=pass_all
242172b676d7Smrg  ;;
242272b676d7Smrg
242372b676d7Smrgbsdi[[45]]*)
242472b676d7Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
242572b676d7Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
242672b676d7Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
242772b676d7Smrg  ;;
242872b676d7Smrg
242972b676d7Smrgcygwin*)
243072b676d7Smrg  # func_win32_libid is a shell function defined in ltmain.sh
243172b676d7Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
243272b676d7Smrg  lt_cv_file_magic_cmd='func_win32_libid'
243372b676d7Smrg  ;;
243472b676d7Smrg
243572b676d7Smrgmingw* | pw32*)
243672b676d7Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
24371fd23544Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
24381fd23544Smrg  # unless we find 'file', for example because we are cross-compiling.
24391fd23544Smrg  if ( file / ) >/dev/null 2>&1; then
24401fd23544Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
24411fd23544Smrg    lt_cv_file_magic_cmd='func_win32_libid'
24421fd23544Smrg  else
24431fd23544Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
24441fd23544Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
24451fd23544Smrg  fi
244672b676d7Smrg  ;;
244772b676d7Smrg
244872b676d7Smrgdarwin* | rhapsody*)
244972b676d7Smrg  lt_cv_deplibs_check_method=pass_all
245072b676d7Smrg  ;;
245172b676d7Smrg
245272b676d7Smrgfreebsd* | dragonfly*)
245372b676d7Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
245472b676d7Smrg    case $host_cpu in
245572b676d7Smrg    i*86 )
245672b676d7Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
245772b676d7Smrg      # Let's accept both of them until this is cleared up.
245872b676d7Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
245972b676d7Smrg      lt_cv_file_magic_cmd=/usr/bin/file
246072b676d7Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
246172b676d7Smrg      ;;
246272b676d7Smrg    esac
246372b676d7Smrg  else
246472b676d7Smrg    lt_cv_deplibs_check_method=pass_all
246572b676d7Smrg  fi
246672b676d7Smrg  ;;
246772b676d7Smrg
246872b676d7Smrggnu*)
246972b676d7Smrg  lt_cv_deplibs_check_method=pass_all
247072b676d7Smrg  ;;
247172b676d7Smrg
247272b676d7Smrghpux10.20* | hpux11*)
247372b676d7Smrg  lt_cv_file_magic_cmd=/usr/bin/file
247472b676d7Smrg  case $host_cpu in
247572b676d7Smrg  ia64*)
247672b676d7Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
247772b676d7Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
247872b676d7Smrg    ;;
247972b676d7Smrg  hppa*64*)
248072b676d7Smrg    [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]']
248172b676d7Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
248272b676d7Smrg    ;;
248372b676d7Smrg  *)
248472b676d7Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
248572b676d7Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
248672b676d7Smrg    ;;
248772b676d7Smrg  esac
248872b676d7Smrg  ;;
248972b676d7Smrg
24901fd23544Smrginterix[[3-9]]*)
249172b676d7Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
249272b676d7Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
249372b676d7Smrg  ;;
249472b676d7Smrg
249572b676d7Smrgirix5* | irix6* | nonstopux*)
249672b676d7Smrg  case $LD in
249772b676d7Smrg  *-32|*"-32 ") libmagic=32-bit;;
249872b676d7Smrg  *-n32|*"-n32 ") libmagic=N32;;
249972b676d7Smrg  *-64|*"-64 ") libmagic=64-bit;;
250072b676d7Smrg  *) libmagic=never-match;;
250172b676d7Smrg  esac
250272b676d7Smrg  lt_cv_deplibs_check_method=pass_all
250372b676d7Smrg  ;;
250472b676d7Smrg
250572b676d7Smrg# This must be Linux ELF.
250672b676d7Smrglinux* | k*bsd*-gnu)
250772b676d7Smrg  lt_cv_deplibs_check_method=pass_all
250872b676d7Smrg  ;;
250972b676d7Smrg
25101fd23544Smrgnetbsd*)
251172b676d7Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
251272b676d7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
251372b676d7Smrg  else
251472b676d7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
251572b676d7Smrg  fi
251672b676d7Smrg  ;;
251772b676d7Smrg
251872b676d7Smrgnewos6*)
251972b676d7Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
252072b676d7Smrg  lt_cv_file_magic_cmd=/usr/bin/file
252172b676d7Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
252272b676d7Smrg  ;;
252372b676d7Smrg
252472b676d7Smrgnto-qnx*)
252572b676d7Smrg  lt_cv_deplibs_check_method=unknown
252672b676d7Smrg  ;;
252772b676d7Smrg
252872b676d7Smrgopenbsd*)
252972b676d7Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
253072b676d7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
253172b676d7Smrg  else
253272b676d7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
253372b676d7Smrg  fi
253472b676d7Smrg  ;;
253572b676d7Smrg
253672b676d7Smrgosf3* | osf4* | osf5*)
253772b676d7Smrg  lt_cv_deplibs_check_method=pass_all
253872b676d7Smrg  ;;
253972b676d7Smrg
25401fd23544Smrgrdos*)
25411fd23544Smrg  lt_cv_deplibs_check_method=pass_all
25421fd23544Smrg  ;;
25431fd23544Smrg
254472b676d7Smrgsolaris*)
254572b676d7Smrg  lt_cv_deplibs_check_method=pass_all
254672b676d7Smrg  ;;
254772b676d7Smrg
254872b676d7Smrgsysv4 | sysv4.3*)
254972b676d7Smrg  case $host_vendor in
255072b676d7Smrg  motorola)
255172b676d7Smrg    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]]'
255272b676d7Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
255372b676d7Smrg    ;;
255472b676d7Smrg  ncr)
255572b676d7Smrg    lt_cv_deplibs_check_method=pass_all
255672b676d7Smrg    ;;
255772b676d7Smrg  sequent)
255872b676d7Smrg    lt_cv_file_magic_cmd='/bin/file'
255972b676d7Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
256072b676d7Smrg    ;;
256172b676d7Smrg  sni)
256272b676d7Smrg    lt_cv_file_magic_cmd='/bin/file'
256372b676d7Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
256472b676d7Smrg    lt_cv_file_magic_test_file=/lib/libc.so
256572b676d7Smrg    ;;
256672b676d7Smrg  siemens)
256772b676d7Smrg    lt_cv_deplibs_check_method=pass_all
256872b676d7Smrg    ;;
256972b676d7Smrg  pc)
257072b676d7Smrg    lt_cv_deplibs_check_method=pass_all
257172b676d7Smrg    ;;
257272b676d7Smrg  esac
257372b676d7Smrg  ;;
257472b676d7Smrg
257572b676d7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
257672b676d7Smrg  lt_cv_deplibs_check_method=pass_all
257772b676d7Smrg  ;;
257872b676d7Smrgesac
257972b676d7Smrg])
258072b676d7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
258172b676d7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
258272b676d7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
258372b676d7Smrg])# AC_DEPLIBS_CHECK_METHOD
258472b676d7Smrg
258572b676d7Smrg
258672b676d7Smrg# AC_PROG_NM
258772b676d7Smrg# ----------
258872b676d7Smrg# find the pathname to a BSD-compatible name lister
258972b676d7SmrgAC_DEFUN([AC_PROG_NM],
259072b676d7Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
259172b676d7Smrg[if test -n "$NM"; then
259272b676d7Smrg  # Let the user override the test.
259372b676d7Smrg  lt_cv_path_NM="$NM"
259472b676d7Smrgelse
259572b676d7Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
25961fd23544Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
259772b676d7Smrg    lt_nm_to_check="$lt_nm_to_check nm"
259872b676d7Smrg  fi
259972b676d7Smrg  for lt_tmp_nm in $lt_nm_to_check; do
260072b676d7Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
260172b676d7Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
260272b676d7Smrg      IFS="$lt_save_ifs"
260372b676d7Smrg      test -z "$ac_dir" && ac_dir=.
260472b676d7Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
260572b676d7Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
260672b676d7Smrg	# Check to see if the nm accepts a BSD-compat flag.
260772b676d7Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
260872b676d7Smrg	#   nm: unknown option "B" ignored
260972b676d7Smrg	# Tru64's nm complains that /dev/null is an invalid object file
261072b676d7Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
261172b676d7Smrg	*/dev/null* | *'Invalid file or object type'*)
261272b676d7Smrg	  lt_cv_path_NM="$tmp_nm -B"
261372b676d7Smrg	  break
261472b676d7Smrg	  ;;
261572b676d7Smrg	*)
261672b676d7Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
261772b676d7Smrg	  */dev/null*)
261872b676d7Smrg	    lt_cv_path_NM="$tmp_nm -p"
261972b676d7Smrg	    break
262072b676d7Smrg	    ;;
262172b676d7Smrg	  *)
262272b676d7Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
262372b676d7Smrg	    continue # so that we can try to find one that supports BSD flags
262472b676d7Smrg	    ;;
262572b676d7Smrg	  esac
262672b676d7Smrg	  ;;
262772b676d7Smrg	esac
262872b676d7Smrg      fi
262972b676d7Smrg    done
263072b676d7Smrg    IFS="$lt_save_ifs"
263172b676d7Smrg  done
263272b676d7Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
263372b676d7Smrgfi])
263472b676d7SmrgNM="$lt_cv_path_NM"
263572b676d7Smrg])# AC_PROG_NM
263672b676d7Smrg
263772b676d7Smrg
263872b676d7Smrg# AC_CHECK_LIBM
263972b676d7Smrg# -------------
264072b676d7Smrg# check for math library
264172b676d7SmrgAC_DEFUN([AC_CHECK_LIBM],
264272b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
264372b676d7SmrgLIBM=
264472b676d7Smrgcase $host in
264572b676d7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
264672b676d7Smrg  # These system don't have libm, or don't need it
264772b676d7Smrg  ;;
264872b676d7Smrg*-ncr-sysv4.3*)
264972b676d7Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
265072b676d7Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
265172b676d7Smrg  ;;
265272b676d7Smrg*)
265372b676d7Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
265472b676d7Smrg  ;;
265572b676d7Smrgesac
265672b676d7Smrg])# AC_CHECK_LIBM
265772b676d7Smrg
265872b676d7Smrg
265972b676d7Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
266072b676d7Smrg# -----------------------------------
266172b676d7Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
266272b676d7Smrg# LTDLINCL to the include flags for the libltdl header and adds
266372b676d7Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
266472b676d7Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
266572b676d7Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
266672b676d7Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
266772b676d7Smrg# (note the single quotes!).  If your package is not flat and you're not
266872b676d7Smrg# using automake, define top_builddir and top_srcdir appropriately in
266972b676d7Smrg# the Makefiles.
267072b676d7SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
267172b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
267272b676d7Smrg  case $enable_ltdl_convenience in
267372b676d7Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
267472b676d7Smrg  "") enable_ltdl_convenience=yes
267572b676d7Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
267672b676d7Smrg  esac
267772b676d7Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
267872b676d7Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
267972b676d7Smrg  # For backwards non-gettext consistent compatibility...
268072b676d7Smrg  INCLTDL="$LTDLINCL"
268172b676d7Smrg])# AC_LIBLTDL_CONVENIENCE
268272b676d7Smrg
268372b676d7Smrg
268472b676d7Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
268572b676d7Smrg# -----------------------------------
268672b676d7Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
268772b676d7Smrg# LTDLINCL to the include flags for the libltdl header and adds
268872b676d7Smrg# --enable-ltdl-install to the configure arguments.  Note that
268972b676d7Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
269072b676d7Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
269172b676d7Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
269272b676d7Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
269372b676d7Smrg# flat and you're not using automake, define top_builddir and top_srcdir
269472b676d7Smrg# appropriately in the Makefiles.
269572b676d7Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
269672b676d7SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
269772b676d7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
269872b676d7Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
269972b676d7Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
270072b676d7Smrg  [if test x"$enable_ltdl_install" = xno; then
270172b676d7Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
270272b676d7Smrg   else
270372b676d7Smrg     enable_ltdl_install=yes
270472b676d7Smrg   fi
270572b676d7Smrg  ])
270672b676d7Smrg  if test x"$enable_ltdl_install" = x"yes"; then
270772b676d7Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
270872b676d7Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
270972b676d7Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
271072b676d7Smrg  else
271172b676d7Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
271272b676d7Smrg    LIBLTDL="-lltdl"
271372b676d7Smrg    LTDLINCL=
271472b676d7Smrg  fi
271572b676d7Smrg  # For backwards non-gettext consistent compatibility...
271672b676d7Smrg  INCLTDL="$LTDLINCL"
271772b676d7Smrg])# AC_LIBLTDL_INSTALLABLE
271872b676d7Smrg
271972b676d7Smrg
272072b676d7Smrg# AC_LIBTOOL_CXX
272172b676d7Smrg# --------------
272272b676d7Smrg# enable support for C++ libraries
272372b676d7SmrgAC_DEFUN([AC_LIBTOOL_CXX],
272472b676d7Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
272572b676d7Smrg])# AC_LIBTOOL_CXX
272672b676d7Smrg
272772b676d7Smrg
272872b676d7Smrg# _LT_AC_LANG_CXX
272972b676d7Smrg# ---------------
273072b676d7SmrgAC_DEFUN([_LT_AC_LANG_CXX],
273172b676d7Smrg[AC_REQUIRE([AC_PROG_CXX])
273272b676d7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
273372b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
273472b676d7Smrg])# _LT_AC_LANG_CXX
273572b676d7Smrg
273672b676d7Smrg# _LT_AC_PROG_CXXCPP
273772b676d7Smrg# ------------------
273872b676d7SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
273972b676d7Smrg[
274072b676d7SmrgAC_REQUIRE([AC_PROG_CXX])
274172b676d7Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
274272b676d7Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
274372b676d7Smrg    (test "X$CXX" != "Xg++"))) ; then
274472b676d7Smrg  AC_PROG_CXXCPP
274572b676d7Smrgfi
274672b676d7Smrg])# _LT_AC_PROG_CXXCPP
274772b676d7Smrg
274872b676d7Smrg# AC_LIBTOOL_F77
274972b676d7Smrg# --------------
275072b676d7Smrg# enable support for Fortran 77 libraries
275172b676d7SmrgAC_DEFUN([AC_LIBTOOL_F77],
275272b676d7Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
275372b676d7Smrg])# AC_LIBTOOL_F77
275472b676d7Smrg
275572b676d7Smrg
275672b676d7Smrg# _LT_AC_LANG_F77
275772b676d7Smrg# ---------------
275872b676d7SmrgAC_DEFUN([_LT_AC_LANG_F77],
275972b676d7Smrg[AC_REQUIRE([AC_PROG_F77])
276072b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
276172b676d7Smrg])# _LT_AC_LANG_F77
276272b676d7Smrg
276372b676d7Smrg
276472b676d7Smrg# AC_LIBTOOL_GCJ
276572b676d7Smrg# --------------
276672b676d7Smrg# enable support for GCJ libraries
276772b676d7SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
276872b676d7Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
276972b676d7Smrg])# AC_LIBTOOL_GCJ
277072b676d7Smrg
277172b676d7Smrg
277272b676d7Smrg# _LT_AC_LANG_GCJ
277372b676d7Smrg# ---------------
277472b676d7SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
277572b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
277672b676d7Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
277772b676d7Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
277872b676d7Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
277972b676d7Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
278072b676d7Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
278172b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
278272b676d7Smrg])# _LT_AC_LANG_GCJ
278372b676d7Smrg
278472b676d7Smrg
278572b676d7Smrg# AC_LIBTOOL_RC
278672b676d7Smrg# -------------
278772b676d7Smrg# enable support for Windows resource files
278872b676d7SmrgAC_DEFUN([AC_LIBTOOL_RC],
278972b676d7Smrg[AC_REQUIRE([LT_AC_PROG_RC])
279072b676d7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
279172b676d7Smrg])# AC_LIBTOOL_RC
279272b676d7Smrg
279372b676d7Smrg
279472b676d7Smrg# AC_LIBTOOL_LANG_C_CONFIG
279572b676d7Smrg# ------------------------
279672b676d7Smrg# Ensure that the configuration vars for the C compiler are
279772b676d7Smrg# suitably defined.  Those variables are subsequently used by
279872b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
279972b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
280072b676d7SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
280172b676d7Smrg[lt_save_CC="$CC"
280272b676d7SmrgAC_LANG_PUSH(C)
280372b676d7Smrg
280472b676d7Smrg# Source file extension for C test sources.
280572b676d7Smrgac_ext=c
280672b676d7Smrg
280772b676d7Smrg# Object file extension for compiled C test sources.
280872b676d7Smrgobjext=o
280972b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
281072b676d7Smrg
281172b676d7Smrg# Code to be used in simple compile tests
28121fd23544Smrglt_simple_compile_test_code="int some_variable = 0;"
281372b676d7Smrg
281472b676d7Smrg# Code to be used in simple link tests
28151fd23544Smrglt_simple_link_test_code='int main(){return(0);}'
281672b676d7Smrg
281772b676d7Smrg_LT_AC_SYS_COMPILER
281872b676d7Smrg
281972b676d7Smrg# save warnings/boilerplate of simple test code
282072b676d7Smrg_LT_COMPILER_BOILERPLATE
282172b676d7Smrg_LT_LINKER_BOILERPLATE
282272b676d7Smrg
282372b676d7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
282472b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
282572b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
282672b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
282772b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
282872b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
282972b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
283072b676d7SmrgAC_LIBTOOL_SYS_LIB_STRIP
283172b676d7SmrgAC_LIBTOOL_DLOPEN_SELF
283272b676d7Smrg
283372b676d7Smrg# Report which library types will actually be built
283472b676d7SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
283572b676d7SmrgAC_MSG_RESULT([$can_build_shared])
283672b676d7Smrg
283772b676d7SmrgAC_MSG_CHECKING([whether to build shared libraries])
283872b676d7Smrgtest "$can_build_shared" = "no" && enable_shared=no
283972b676d7Smrg
284072b676d7Smrg# On AIX, shared libraries and static libraries use the same namespace, and
284172b676d7Smrg# are all built from PIC.
284272b676d7Smrgcase $host_os in
284372b676d7Smrgaix3*)
284472b676d7Smrg  test "$enable_shared" = yes && enable_static=no
284572b676d7Smrg  if test -n "$RANLIB"; then
284672b676d7Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
284772b676d7Smrg    postinstall_cmds='$RANLIB $lib'
284872b676d7Smrg  fi
284972b676d7Smrg  ;;
285072b676d7Smrg
28511fd23544Smrgaix[[4-9]]*)
285272b676d7Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
285372b676d7Smrg    test "$enable_shared" = yes && enable_static=no
285472b676d7Smrg  fi
285572b676d7Smrg    ;;
285672b676d7Smrgesac
285772b676d7SmrgAC_MSG_RESULT([$enable_shared])
285872b676d7Smrg
285972b676d7SmrgAC_MSG_CHECKING([whether to build static libraries])
286072b676d7Smrg# Make sure either enable_shared or enable_static is yes.
286172b676d7Smrgtest "$enable_shared" = yes || enable_static=yes
286272b676d7SmrgAC_MSG_RESULT([$enable_static])
286372b676d7Smrg
286472b676d7SmrgAC_LIBTOOL_CONFIG($1)
286572b676d7Smrg
286672b676d7SmrgAC_LANG_POP
286772b676d7SmrgCC="$lt_save_CC"
286872b676d7Smrg])# AC_LIBTOOL_LANG_C_CONFIG
286972b676d7Smrg
287072b676d7Smrg
287172b676d7Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
287272b676d7Smrg# --------------------------
287372b676d7Smrg# Ensure that the configuration vars for the C compiler are
287472b676d7Smrg# suitably defined.  Those variables are subsequently used by
287572b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
287672b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
287772b676d7SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
287872b676d7Smrg[AC_LANG_PUSH(C++)
287972b676d7SmrgAC_REQUIRE([AC_PROG_CXX])
288072b676d7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
288172b676d7Smrg
288272b676d7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
288372b676d7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
288472b676d7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
288572b676d7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
288672b676d7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
288772b676d7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
288872b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
288972b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
289072b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
289172b676d7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
289272b676d7Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
289372b676d7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
289472b676d7Smrg_LT_AC_TAGVAR(module_cmds, $1)=
289572b676d7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
289672b676d7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
289772b676d7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
289872b676d7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
289972b676d7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
290072b676d7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
290172b676d7Smrg
290272b676d7Smrg# Dependencies to place before and after the object being linked:
290372b676d7Smrg_LT_AC_TAGVAR(predep_objects, $1)=
290472b676d7Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
290572b676d7Smrg_LT_AC_TAGVAR(predeps, $1)=
290672b676d7Smrg_LT_AC_TAGVAR(postdeps, $1)=
290772b676d7Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
29081fd23544Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
290972b676d7Smrg
291072b676d7Smrg# Source file extension for C++ test sources.
291172b676d7Smrgac_ext=cpp
291272b676d7Smrg
291372b676d7Smrg# Object file extension for compiled C++ test sources.
291472b676d7Smrgobjext=o
291572b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
291672b676d7Smrg
291772b676d7Smrg# Code to be used in simple compile tests
29181fd23544Smrglt_simple_compile_test_code="int some_variable = 0;"
291972b676d7Smrg
292072b676d7Smrg# Code to be used in simple link tests
29211fd23544Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
292272b676d7Smrg
292372b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
292472b676d7Smrg_LT_AC_SYS_COMPILER
292572b676d7Smrg
292672b676d7Smrg# save warnings/boilerplate of simple test code
292772b676d7Smrg_LT_COMPILER_BOILERPLATE
292872b676d7Smrg_LT_LINKER_BOILERPLATE
292972b676d7Smrg
293072b676d7Smrg# Allow CC to be a program name with arguments.
293172b676d7Smrglt_save_CC=$CC
293272b676d7Smrglt_save_LD=$LD
293372b676d7Smrglt_save_GCC=$GCC
293472b676d7SmrgGCC=$GXX
293572b676d7Smrglt_save_with_gnu_ld=$with_gnu_ld
293672b676d7Smrglt_save_path_LD=$lt_cv_path_LD
293772b676d7Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
293872b676d7Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
293972b676d7Smrgelse
294072b676d7Smrg  $as_unset lt_cv_prog_gnu_ld
294172b676d7Smrgfi
294272b676d7Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
294372b676d7Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
294472b676d7Smrgelse
294572b676d7Smrg  $as_unset lt_cv_path_LD
294672b676d7Smrgfi
294772b676d7Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
294872b676d7SmrgCC=${CXX-"c++"}
294972b676d7Smrgcompiler=$CC
295072b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
295172b676d7Smrg_LT_CC_BASENAME([$compiler])
295272b676d7Smrg
295372b676d7Smrg# We don't want -fno-exception wen compiling C++ code, so set the
295472b676d7Smrg# no_builtin_flag separately
295572b676d7Smrgif test "$GXX" = yes; then
295672b676d7Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
295772b676d7Smrgelse
295872b676d7Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
295972b676d7Smrgfi
296072b676d7Smrg
296172b676d7Smrgif test "$GXX" = yes; then
296272b676d7Smrg  # Set up default GNU C++ configuration
296372b676d7Smrg
296472b676d7Smrg  AC_PROG_LD
296572b676d7Smrg
296672b676d7Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
296772b676d7Smrg  # archiving commands below assume that GNU ld is being used.
296872b676d7Smrg  if test "$with_gnu_ld" = yes; then
296972b676d7Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
297072b676d7Smrg    _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'
297172b676d7Smrg
297272b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
297372b676d7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
297472b676d7Smrg
297572b676d7Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
297672b676d7Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
297772b676d7Smrg    #     investigate it a little bit more. (MM)
297872b676d7Smrg    wlarc='${wl}'
297972b676d7Smrg
298072b676d7Smrg    # ancient GNU ld didn't support --whole-archive et. al.
298172b676d7Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
298272b676d7Smrg	grep 'no-whole-archive' > /dev/null; then
298372b676d7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
298472b676d7Smrg    else
298572b676d7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
298672b676d7Smrg    fi
298772b676d7Smrg  else
298872b676d7Smrg    with_gnu_ld=no
298972b676d7Smrg    wlarc=
299072b676d7Smrg
299172b676d7Smrg    # A generic and very simple default shared library creation
299272b676d7Smrg    # command for GNU C++ for the case where it uses the native
299372b676d7Smrg    # linker, instead of GNU ld.  If possible, this setting should
299472b676d7Smrg    # overridden to take advantage of the native linker features on
299572b676d7Smrg    # the platform it is being used on.
299672b676d7Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
299772b676d7Smrg  fi
299872b676d7Smrg
299972b676d7Smrg  # Commands to make compiler produce verbose output that lists
300072b676d7Smrg  # what "hidden" libraries, object files and flags are used when
300172b676d7Smrg  # linking a shared library.
300272b676d7Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
300372b676d7Smrg
300472b676d7Smrgelse
300572b676d7Smrg  GXX=no
300672b676d7Smrg  with_gnu_ld=no
300772b676d7Smrg  wlarc=
300872b676d7Smrgfi
300972b676d7Smrg
301072b676d7Smrg# PORTME: fill in a description of your system's C++ link characteristics
301172b676d7SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
301272b676d7Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
301372b676d7Smrgcase $host_os in
301472b676d7Smrg  aix3*)
301572b676d7Smrg    # FIXME: insert proper C++ library support
301672b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
301772b676d7Smrg    ;;
30181fd23544Smrg  aix[[4-9]]*)
301972b676d7Smrg    if test "$host_cpu" = ia64; then
302072b676d7Smrg      # On IA64, the linker does run time linking by default, so we don't
302172b676d7Smrg      # have to do anything special.
302272b676d7Smrg      aix_use_runtimelinking=no
302372b676d7Smrg      exp_sym_flag='-Bexport'
302472b676d7Smrg      no_entry_flag=""
302572b676d7Smrg    else
302672b676d7Smrg      aix_use_runtimelinking=no
302772b676d7Smrg
302872b676d7Smrg      # Test if we are trying to use run time linking or normal
302972b676d7Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
303072b676d7Smrg      # need to do runtime linking.
30311fd23544Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
303272b676d7Smrg	for ld_flag in $LDFLAGS; do
303372b676d7Smrg	  case $ld_flag in
303472b676d7Smrg	  *-brtl*)
303572b676d7Smrg	    aix_use_runtimelinking=yes
303672b676d7Smrg	    break
303772b676d7Smrg	    ;;
303872b676d7Smrg	  esac
303972b676d7Smrg	done
304072b676d7Smrg	;;
304172b676d7Smrg      esac
304272b676d7Smrg
304372b676d7Smrg      exp_sym_flag='-bexport'
304472b676d7Smrg      no_entry_flag='-bnoentry'
304572b676d7Smrg    fi
304672b676d7Smrg
304772b676d7Smrg    # When large executables or shared objects are built, AIX ld can
304872b676d7Smrg    # have problems creating the table of contents.  If linking a library
304972b676d7Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
305072b676d7Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
305172b676d7Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
305272b676d7Smrg
305372b676d7Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
305472b676d7Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
305572b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
305672b676d7Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
305772b676d7Smrg
305872b676d7Smrg    if test "$GXX" = yes; then
305972b676d7Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
306072b676d7Smrg      # We only want to do this on AIX 4.2 and lower, the check
306172b676d7Smrg      # below for broken collect2 doesn't work under 4.3+
306272b676d7Smrg	collect2name=`${CC} -print-prog-name=collect2`
306372b676d7Smrg	if test -f "$collect2name" && \
306472b676d7Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
306572b676d7Smrg	then
306672b676d7Smrg	  # We have reworked collect2
30671fd23544Smrg	  :
306872b676d7Smrg	else
306972b676d7Smrg	  # We have old collect2
307072b676d7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
307172b676d7Smrg	  # It fails to find uninstalled libraries when the uninstalled
307272b676d7Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
307372b676d7Smrg	  # to unsupported forces relinking
307472b676d7Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
307572b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
307672b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
307772b676d7Smrg	fi
307872b676d7Smrg	;;
307972b676d7Smrg      esac
308072b676d7Smrg      shared_flag='-shared'
308172b676d7Smrg      if test "$aix_use_runtimelinking" = yes; then
308272b676d7Smrg	shared_flag="$shared_flag "'${wl}-G'
308372b676d7Smrg      fi
308472b676d7Smrg    else
308572b676d7Smrg      # not using gcc
308672b676d7Smrg      if test "$host_cpu" = ia64; then
308772b676d7Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
308872b676d7Smrg	# chokes on -Wl,-G. The following line is correct:
308972b676d7Smrg	shared_flag='-G'
309072b676d7Smrg      else
309172b676d7Smrg	if test "$aix_use_runtimelinking" = yes; then
309272b676d7Smrg	  shared_flag='${wl}-G'
309372b676d7Smrg	else
309472b676d7Smrg	  shared_flag='${wl}-bM:SRE'
309572b676d7Smrg	fi
309672b676d7Smrg      fi
309772b676d7Smrg    fi
309872b676d7Smrg
309972b676d7Smrg    # It seems that -bexpall does not export symbols beginning with
310072b676d7Smrg    # underscore (_), so it is better to generate a list of symbols to export.
310172b676d7Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
310272b676d7Smrg    if test "$aix_use_runtimelinking" = yes; then
310372b676d7Smrg      # Warning - without using the other runtime loading flags (-brtl),
310472b676d7Smrg      # -berok will link without error, but may produce a broken library.
310572b676d7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
310672b676d7Smrg      # Determine the default libpath from the value encoded in an empty executable.
310772b676d7Smrg      _LT_AC_SYS_LIBPATH_AIX
310872b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
310972b676d7Smrg
311072b676d7Smrg      _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"
311172b676d7Smrg     else
311272b676d7Smrg      if test "$host_cpu" = ia64; then
311372b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
311472b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
311572b676d7Smrg	_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"
311672b676d7Smrg      else
311772b676d7Smrg	# Determine the default libpath from the value encoded in an empty executable.
311872b676d7Smrg	_LT_AC_SYS_LIBPATH_AIX
311972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
312072b676d7Smrg	# Warning - without using the other run time loading flags,
312172b676d7Smrg	# -berok will link without error, but may produce a broken library.
312272b676d7Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
312372b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
312472b676d7Smrg	# Exported symbols can be pulled into shared objects from archives
312572b676d7Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
312672b676d7Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
312772b676d7Smrg	# This is similar to how AIX traditionally builds its shared libraries.
312872b676d7Smrg	_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'
312972b676d7Smrg      fi
313072b676d7Smrg    fi
313172b676d7Smrg    ;;
313272b676d7Smrg
313372b676d7Smrg  beos*)
313472b676d7Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
313572b676d7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
313672b676d7Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
313772b676d7Smrg      # support --undefined.  This deserves some investigation.  FIXME
313872b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
313972b676d7Smrg    else
314072b676d7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
314172b676d7Smrg    fi
314272b676d7Smrg    ;;
314372b676d7Smrg
314472b676d7Smrg  chorus*)
314572b676d7Smrg    case $cc_basename in
314672b676d7Smrg      *)
314772b676d7Smrg	# FIXME: insert proper C++ library support
314872b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
314972b676d7Smrg	;;
315072b676d7Smrg    esac
315172b676d7Smrg    ;;
315272b676d7Smrg
315372b676d7Smrg  cygwin* | mingw* | pw32*)
315472b676d7Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
315572b676d7Smrg    # as there is no search path for DLLs.
315672b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
315772b676d7Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
315872b676d7Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
315972b676d7Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
316072b676d7Smrg
316172b676d7Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
316272b676d7Smrg      _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'
316372b676d7Smrg      # If the export-symbols file already is a .def file (1st line
316472b676d7Smrg      # is EXPORTS), use it as is; otherwise, prepend...
316572b676d7Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
316672b676d7Smrg	cp $export_symbols $output_objdir/$soname.def;
316772b676d7Smrg      else
316872b676d7Smrg	echo EXPORTS > $output_objdir/$soname.def;
316972b676d7Smrg	cat $export_symbols >> $output_objdir/$soname.def;
317072b676d7Smrg      fi~
317172b676d7Smrg      $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'
317272b676d7Smrg    else
317372b676d7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
317472b676d7Smrg    fi
317572b676d7Smrg  ;;
317672b676d7Smrg      darwin* | rhapsody*)
317772b676d7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
317872b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
317972b676d7Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
318072b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
318172b676d7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
318272b676d7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
31831fd23544Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
31841fd23544Smrg      if test "$GXX" = yes ; then
318572b676d7Smrg      output_verbose_link_cmd='echo'
31861fd23544Smrg      _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}"
31871fd23544Smrg      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
31881fd23544Smrg      _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}"
31891fd23544Smrg      _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}"
31901fd23544Smrg      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
31911fd23544Smrg        _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}"
31921fd23544Smrg        _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}"
319372b676d7Smrg      fi
319472b676d7Smrg      else
319572b676d7Smrg      case $cc_basename in
319672b676d7Smrg        xlc*)
319772b676d7Smrg         output_verbose_link_cmd='echo'
31981fd23544Smrg          _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'
319972b676d7Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
320072b676d7Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
32011fd23544Smrg          _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}'
320272b676d7Smrg          _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}'
320372b676d7Smrg          ;;
320472b676d7Smrg       *)
320572b676d7Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
320672b676d7Smrg          ;;
320772b676d7Smrg      esac
320872b676d7Smrg      fi
320972b676d7Smrg        ;;
321072b676d7Smrg
321172b676d7Smrg  dgux*)
321272b676d7Smrg    case $cc_basename in
321372b676d7Smrg      ec++*)
321472b676d7Smrg	# FIXME: insert proper C++ library support
321572b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
321672b676d7Smrg	;;
321772b676d7Smrg      ghcx*)
321872b676d7Smrg	# Green Hills C++ Compiler
321972b676d7Smrg	# FIXME: insert proper C++ library support
322072b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
322172b676d7Smrg	;;
322272b676d7Smrg      *)
322372b676d7Smrg	# FIXME: insert proper C++ library support
322472b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
322572b676d7Smrg	;;
322672b676d7Smrg    esac
322772b676d7Smrg    ;;
322872b676d7Smrg  freebsd[[12]]*)
322972b676d7Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
323072b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
323172b676d7Smrg    ;;
323272b676d7Smrg  freebsd-elf*)
323372b676d7Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
323472b676d7Smrg    ;;
323572b676d7Smrg  freebsd* | dragonfly*)
323672b676d7Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
323772b676d7Smrg    # conventions
323872b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
323972b676d7Smrg    ;;
324072b676d7Smrg  gnu*)
324172b676d7Smrg    ;;
324272b676d7Smrg  hpux9*)
324372b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
324472b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
324572b676d7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
324672b676d7Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
324772b676d7Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
324872b676d7Smrg				# but as the default
324972b676d7Smrg				# location of the library.
325072b676d7Smrg
325172b676d7Smrg    case $cc_basename in
325272b676d7Smrg    CC*)
325372b676d7Smrg      # FIXME: insert proper C++ library support
325472b676d7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
325572b676d7Smrg      ;;
325672b676d7Smrg    aCC*)
325772b676d7Smrg      _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'
325872b676d7Smrg      # Commands to make compiler produce verbose output that lists
325972b676d7Smrg      # what "hidden" libraries, object files and flags are used when
326072b676d7Smrg      # linking a shared library.
326172b676d7Smrg      #
326272b676d7Smrg      # There doesn't appear to be a way to prevent this compiler from
326372b676d7Smrg      # explicitly linking system object files so we need to strip them
326472b676d7Smrg      # from the output so that they don't get included in the library
326572b676d7Smrg      # dependencies.
326672b676d7Smrg      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'
326772b676d7Smrg      ;;
326872b676d7Smrg    *)
326972b676d7Smrg      if test "$GXX" = yes; then
327072b676d7Smrg        _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'
327172b676d7Smrg      else
327272b676d7Smrg        # FIXME: insert proper C++ library support
327372b676d7Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
327472b676d7Smrg      fi
327572b676d7Smrg      ;;
327672b676d7Smrg    esac
327772b676d7Smrg    ;;
327872b676d7Smrg  hpux10*|hpux11*)
327972b676d7Smrg    if test $with_gnu_ld = no; then
328072b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
328172b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
328272b676d7Smrg
328372b676d7Smrg      case $host_cpu in
32841fd23544Smrg      hppa*64*|ia64*) ;;
328572b676d7Smrg      *)
328672b676d7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
328772b676d7Smrg        ;;
328872b676d7Smrg      esac
328972b676d7Smrg    fi
329072b676d7Smrg    case $host_cpu in
329172b676d7Smrg    hppa*64*|ia64*)
329272b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
329372b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
329472b676d7Smrg      ;;
329572b676d7Smrg    *)
329672b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
329772b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
329872b676d7Smrg					      # but as the default
329972b676d7Smrg					      # location of the library.
330072b676d7Smrg      ;;
330172b676d7Smrg    esac
330272b676d7Smrg
330372b676d7Smrg    case $cc_basename in
330472b676d7Smrg      CC*)
330572b676d7Smrg	# FIXME: insert proper C++ library support
330672b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
330772b676d7Smrg	;;
330872b676d7Smrg      aCC*)
330972b676d7Smrg	case $host_cpu in
331072b676d7Smrg	hppa*64*)
331172b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
331272b676d7Smrg	  ;;
331372b676d7Smrg	ia64*)
331472b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
331572b676d7Smrg	  ;;
331672b676d7Smrg	*)
331772b676d7Smrg	  _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'
331872b676d7Smrg	  ;;
331972b676d7Smrg	esac
332072b676d7Smrg	# Commands to make compiler produce verbose output that lists
332172b676d7Smrg	# what "hidden" libraries, object files and flags are used when
332272b676d7Smrg	# linking a shared library.
332372b676d7Smrg	#
332472b676d7Smrg	# There doesn't appear to be a way to prevent this compiler from
332572b676d7Smrg	# explicitly linking system object files so we need to strip them
332672b676d7Smrg	# from the output so that they don't get included in the library
332772b676d7Smrg	# dependencies.
332872b676d7Smrg	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'
332972b676d7Smrg	;;
333072b676d7Smrg      *)
333172b676d7Smrg	if test "$GXX" = yes; then
333272b676d7Smrg	  if test $with_gnu_ld = no; then
333372b676d7Smrg	    case $host_cpu in
333472b676d7Smrg	    hppa*64*)
333572b676d7Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
333672b676d7Smrg	      ;;
333772b676d7Smrg	    ia64*)
333872b676d7Smrg	      _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'
333972b676d7Smrg	      ;;
334072b676d7Smrg	    *)
334172b676d7Smrg	      _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'
334272b676d7Smrg	      ;;
334372b676d7Smrg	    esac
334472b676d7Smrg	  fi
334572b676d7Smrg	else
334672b676d7Smrg	  # FIXME: insert proper C++ library support
334772b676d7Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
334872b676d7Smrg	fi
334972b676d7Smrg	;;
335072b676d7Smrg    esac
335172b676d7Smrg    ;;
33521fd23544Smrg  interix[[3-9]]*)
335372b676d7Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
335472b676d7Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
335572b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
335672b676d7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
335772b676d7Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
335872b676d7Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
335972b676d7Smrg    # default) and relocated if they conflict, which is a slow very memory
336072b676d7Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
336172b676d7Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
336272b676d7Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
336372b676d7Smrg    _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'
336472b676d7Smrg    _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'
336572b676d7Smrg    ;;
336672b676d7Smrg  irix5* | irix6*)
336772b676d7Smrg    case $cc_basename in
336872b676d7Smrg      CC*)
336972b676d7Smrg	# SGI C++
337072b676d7Smrg	_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'
337172b676d7Smrg
337272b676d7Smrg	# Archives containing C++ object files must be created using
337372b676d7Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
337472b676d7Smrg	# necessary to make sure instantiated templates are included
337572b676d7Smrg	# in the archive.
337672b676d7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
337772b676d7Smrg	;;
337872b676d7Smrg      *)
337972b676d7Smrg	if test "$GXX" = yes; then
338072b676d7Smrg	  if test "$with_gnu_ld" = no; then
338172b676d7Smrg	    _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'
338272b676d7Smrg	  else
338372b676d7Smrg	    _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'
338472b676d7Smrg	  fi
338572b676d7Smrg	fi
338672b676d7Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
338772b676d7Smrg	;;
338872b676d7Smrg    esac
338972b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
339072b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
339172b676d7Smrg    ;;
339272b676d7Smrg  linux* | k*bsd*-gnu)
339372b676d7Smrg    case $cc_basename in
339472b676d7Smrg      KCC*)
339572b676d7Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
339672b676d7Smrg
339772b676d7Smrg	# KCC will only create a shared library if the output file
339872b676d7Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
339972b676d7Smrg	# to its proper name (with version) after linking.
340072b676d7Smrg	_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'
340172b676d7Smrg	_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'
340272b676d7Smrg	# Commands to make compiler produce verbose output that lists
340372b676d7Smrg	# what "hidden" libraries, object files and flags are used when
340472b676d7Smrg	# linking a shared library.
340572b676d7Smrg	#
340672b676d7Smrg	# There doesn't appear to be a way to prevent this compiler from
340772b676d7Smrg	# explicitly linking system object files so we need to strip them
340872b676d7Smrg	# from the output so that they don't get included in the library
340972b676d7Smrg	# dependencies.
341072b676d7Smrg	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'
341172b676d7Smrg
341272b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
341372b676d7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
341472b676d7Smrg
341572b676d7Smrg	# Archives containing C++ object files must be created using
341672b676d7Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
341772b676d7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
341872b676d7Smrg	;;
341972b676d7Smrg      icpc*)
342072b676d7Smrg	# Intel C++
342172b676d7Smrg	with_gnu_ld=yes
342272b676d7Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
342372b676d7Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
342472b676d7Smrg	# earlier do not add the objects themselves.
342572b676d7Smrg	case `$CC -V 2>&1` in
342672b676d7Smrg	*"Version 7."*)
342772b676d7Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
342872b676d7Smrg  	  _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'
342972b676d7Smrg	  ;;
343072b676d7Smrg	*)  # Version 8.0 or newer
343172b676d7Smrg	  tmp_idyn=
343272b676d7Smrg	  case $host_cpu in
343372b676d7Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
343472b676d7Smrg	  esac
343572b676d7Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
343672b676d7Smrg	  _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'
343772b676d7Smrg	  ;;
343872b676d7Smrg	esac
343972b676d7Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
344072b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
344172b676d7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
344272b676d7Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
344372b676d7Smrg	;;
34441fd23544Smrg      pgCC* | pgcpp*)
344572b676d7Smrg        # Portland Group C++ compiler
344672b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
344772b676d7Smrg  	_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'
344872b676d7Smrg
344972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
345072b676d7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
345172b676d7Smrg	_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'
345272b676d7Smrg        ;;
345372b676d7Smrg      cxx*)
345472b676d7Smrg	# Compaq C++
345572b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
345672b676d7Smrg	_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'
345772b676d7Smrg
345872b676d7Smrg	runpath_var=LD_RUN_PATH
345972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
346072b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
346172b676d7Smrg
346272b676d7Smrg	# Commands to make compiler produce verbose output that lists
346372b676d7Smrg	# what "hidden" libraries, object files and flags are used when
346472b676d7Smrg	# linking a shared library.
346572b676d7Smrg	#
346672b676d7Smrg	# There doesn't appear to be a way to prevent this compiler from
346772b676d7Smrg	# explicitly linking system object files so we need to strip them
346872b676d7Smrg	# from the output so that they don't get included in the library
346972b676d7Smrg	# dependencies.
347072b676d7Smrg	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'
347172b676d7Smrg	;;
34721fd23544Smrg      *)
34731fd23544Smrg	case `$CC -V 2>&1 | sed 5q` in
34741fd23544Smrg	*Sun\ C*)
34751fd23544Smrg	  # Sun C++ 5.9
34761fd23544Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
34771fd23544Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
34781fd23544Smrg	  _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'
34791fd23544Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
34801fd23544Smrg	  _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'
34811fd23544Smrg
34821fd23544Smrg	  # Not sure whether something based on
34831fd23544Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
34841fd23544Smrg	  # would be better.
34851fd23544Smrg	  output_verbose_link_cmd='echo'
34861fd23544Smrg
34871fd23544Smrg	  # Archives containing C++ object files must be created using
34881fd23544Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
34891fd23544Smrg	  # necessary to make sure instantiated templates are included
34901fd23544Smrg	  # in the archive.
34911fd23544Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
34921fd23544Smrg	  ;;
34931fd23544Smrg	esac
34941fd23544Smrg	;;
349572b676d7Smrg    esac
349672b676d7Smrg    ;;
349772b676d7Smrg  lynxos*)
349872b676d7Smrg    # FIXME: insert proper C++ library support
349972b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
350072b676d7Smrg    ;;
350172b676d7Smrg  m88k*)
350272b676d7Smrg    # FIXME: insert proper C++ library support
350372b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
350472b676d7Smrg    ;;
350572b676d7Smrg  mvs*)
350672b676d7Smrg    case $cc_basename in
350772b676d7Smrg      cxx*)
350872b676d7Smrg	# FIXME: insert proper C++ library support
350972b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
351072b676d7Smrg	;;
351172b676d7Smrg      *)
351272b676d7Smrg	# FIXME: insert proper C++ library support
351372b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
351472b676d7Smrg	;;
351572b676d7Smrg    esac
351672b676d7Smrg    ;;
35171fd23544Smrg  netbsd*)
351872b676d7Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
351972b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
352072b676d7Smrg      wlarc=
352172b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
352272b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
352372b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
352472b676d7Smrg    fi
352572b676d7Smrg    # Workaround some broken pre-1.5 toolchains
352672b676d7Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
352772b676d7Smrg    ;;
352872b676d7Smrg  openbsd2*)
352972b676d7Smrg    # C++ shared libraries are fairly broken
353072b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
353172b676d7Smrg    ;;
353272b676d7Smrg  openbsd*)
35331fd23544Smrg    if test -f /usr/libexec/ld.so; then
35341fd23544Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
35351fd23544Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
35361fd23544Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
35371fd23544Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
35381fd23544Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
35391fd23544Smrg	_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'
35401fd23544Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
35411fd23544Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
35421fd23544Smrg      fi
35431fd23544Smrg      output_verbose_link_cmd='echo'
35441fd23544Smrg    else
35451fd23544Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
354672b676d7Smrg    fi
354772b676d7Smrg    ;;
354872b676d7Smrg  osf3*)
354972b676d7Smrg    case $cc_basename in
355072b676d7Smrg      KCC*)
355172b676d7Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
355272b676d7Smrg
355372b676d7Smrg	# KCC will only create a shared library if the output file
355472b676d7Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
355572b676d7Smrg	# to its proper name (with version) after linking.
355672b676d7Smrg	_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'
355772b676d7Smrg
355872b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
355972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
356072b676d7Smrg
356172b676d7Smrg	# Archives containing C++ object files must be created using
356272b676d7Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
356372b676d7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
356472b676d7Smrg
356572b676d7Smrg	;;
356672b676d7Smrg      RCC*)
356772b676d7Smrg	# Rational C++ 2.4.1
356872b676d7Smrg	# FIXME: insert proper C++ library support
356972b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
357072b676d7Smrg	;;
357172b676d7Smrg      cxx*)
357272b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
357372b676d7Smrg	_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'
357472b676d7Smrg
357572b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
357672b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
357772b676d7Smrg
357872b676d7Smrg	# Commands to make compiler produce verbose output that lists
357972b676d7Smrg	# what "hidden" libraries, object files and flags are used when
358072b676d7Smrg	# linking a shared library.
358172b676d7Smrg	#
358272b676d7Smrg	# There doesn't appear to be a way to prevent this compiler from
358372b676d7Smrg	# explicitly linking system object files so we need to strip them
358472b676d7Smrg	# from the output so that they don't get included in the library
358572b676d7Smrg	# dependencies.
358672b676d7Smrg	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'
358772b676d7Smrg	;;
358872b676d7Smrg      *)
358972b676d7Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
359072b676d7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
359172b676d7Smrg	  _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'
359272b676d7Smrg
359372b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
359472b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
359572b676d7Smrg
359672b676d7Smrg	  # Commands to make compiler produce verbose output that lists
359772b676d7Smrg	  # what "hidden" libraries, object files and flags are used when
359872b676d7Smrg	  # linking a shared library.
359972b676d7Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
360072b676d7Smrg
360172b676d7Smrg	else
360272b676d7Smrg	  # FIXME: insert proper C++ library support
360372b676d7Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
360472b676d7Smrg	fi
360572b676d7Smrg	;;
360672b676d7Smrg    esac
360772b676d7Smrg    ;;
360872b676d7Smrg  osf4* | osf5*)
360972b676d7Smrg    case $cc_basename in
361072b676d7Smrg      KCC*)
361172b676d7Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
361272b676d7Smrg
361372b676d7Smrg	# KCC will only create a shared library if the output file
361472b676d7Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
361572b676d7Smrg	# to its proper name (with version) after linking.
361672b676d7Smrg	_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'
361772b676d7Smrg
361872b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
361972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
362072b676d7Smrg
362172b676d7Smrg	# Archives containing C++ object files must be created using
362272b676d7Smrg	# the KAI C++ compiler.
362372b676d7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
362472b676d7Smrg	;;
362572b676d7Smrg      RCC*)
362672b676d7Smrg	# Rational C++ 2.4.1
362772b676d7Smrg	# FIXME: insert proper C++ library support
362872b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
362972b676d7Smrg	;;
363072b676d7Smrg      cxx*)
363172b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
363272b676d7Smrg	_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'
363372b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
363472b676d7Smrg	  echo "-hidden">> $lib.exp~
363572b676d7Smrg	  $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~
363672b676d7Smrg	  $rm $lib.exp'
363772b676d7Smrg
363872b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
363972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
364072b676d7Smrg
364172b676d7Smrg	# Commands to make compiler produce verbose output that lists
364272b676d7Smrg	# what "hidden" libraries, object files and flags are used when
364372b676d7Smrg	# linking a shared library.
364472b676d7Smrg	#
364572b676d7Smrg	# There doesn't appear to be a way to prevent this compiler from
364672b676d7Smrg	# explicitly linking system object files so we need to strip them
364772b676d7Smrg	# from the output so that they don't get included in the library
364872b676d7Smrg	# dependencies.
364972b676d7Smrg	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'
365072b676d7Smrg	;;
365172b676d7Smrg      *)
365272b676d7Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
365372b676d7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
365472b676d7Smrg	 _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'
365572b676d7Smrg
365672b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
365772b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
365872b676d7Smrg
365972b676d7Smrg	  # Commands to make compiler produce verbose output that lists
366072b676d7Smrg	  # what "hidden" libraries, object files and flags are used when
366172b676d7Smrg	  # linking a shared library.
366272b676d7Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
366372b676d7Smrg
366472b676d7Smrg	else
366572b676d7Smrg	  # FIXME: insert proper C++ library support
366672b676d7Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
366772b676d7Smrg	fi
366872b676d7Smrg	;;
366972b676d7Smrg    esac
367072b676d7Smrg    ;;
367172b676d7Smrg  psos*)
367272b676d7Smrg    # FIXME: insert proper C++ library support
367372b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
367472b676d7Smrg    ;;
367572b676d7Smrg  sunos4*)
367672b676d7Smrg    case $cc_basename in
367772b676d7Smrg      CC*)
367872b676d7Smrg	# Sun C++ 4.x
367972b676d7Smrg	# FIXME: insert proper C++ library support
368072b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
368172b676d7Smrg	;;
368272b676d7Smrg      lcc*)
368372b676d7Smrg	# Lucid
368472b676d7Smrg	# FIXME: insert proper C++ library support
368572b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
368672b676d7Smrg	;;
368772b676d7Smrg      *)
368872b676d7Smrg	# FIXME: insert proper C++ library support
368972b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
369072b676d7Smrg	;;
369172b676d7Smrg    esac
369272b676d7Smrg    ;;
369372b676d7Smrg  solaris*)
369472b676d7Smrg    case $cc_basename in
369572b676d7Smrg      CC*)
369672b676d7Smrg	# Sun C++ 4.2, 5.x and Centerline C++
369772b676d7Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
369872b676d7Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
369972b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
370072b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
370172b676d7Smrg	$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'
370272b676d7Smrg
370372b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
370472b676d7Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
370572b676d7Smrg	case $host_os in
370672b676d7Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
370772b676d7Smrg	  *)
37081fd23544Smrg	    # The compiler driver will combine and reorder linker options,
37091fd23544Smrg	    # but understands `-z linker_flag'.
371072b676d7Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
37111fd23544Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
371272b676d7Smrg	    ;;
371372b676d7Smrg	esac
371472b676d7Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
371572b676d7Smrg
371672b676d7Smrg	output_verbose_link_cmd='echo'
371772b676d7Smrg
371872b676d7Smrg	# Archives containing C++ object files must be created using
371972b676d7Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
372072b676d7Smrg	# necessary to make sure instantiated templates are included
372172b676d7Smrg	# in the archive.
372272b676d7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
372372b676d7Smrg	;;
372472b676d7Smrg      gcx*)
372572b676d7Smrg	# Green Hills C++ Compiler
372672b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
372772b676d7Smrg
372872b676d7Smrg	# The C++ compiler must be used to create the archive.
372972b676d7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
373072b676d7Smrg	;;
373172b676d7Smrg      *)
373272b676d7Smrg	# GNU C++ compiler with Solaris linker
373372b676d7Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
373472b676d7Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
373572b676d7Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
373672b676d7Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
373772b676d7Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
373872b676d7Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
373972b676d7Smrg
374072b676d7Smrg	    # Commands to make compiler produce verbose output that lists
374172b676d7Smrg	    # what "hidden" libraries, object files and flags are used when
374272b676d7Smrg	    # linking a shared library.
374372b676d7Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
374472b676d7Smrg	  else
374572b676d7Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
374672b676d7Smrg	    # platform.
374772b676d7Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
374872b676d7Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
374972b676d7Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
375072b676d7Smrg
375172b676d7Smrg	    # Commands to make compiler produce verbose output that lists
375272b676d7Smrg	    # what "hidden" libraries, object files and flags are used when
375372b676d7Smrg	    # linking a shared library.
375472b676d7Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
375572b676d7Smrg	  fi
375672b676d7Smrg
375772b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
37581fd23544Smrg	  case $host_os in
37591fd23544Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
37601fd23544Smrg	  *)
37611fd23544Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
37621fd23544Smrg	    ;;
37631fd23544Smrg	  esac
376472b676d7Smrg	fi
376572b676d7Smrg	;;
376672b676d7Smrg    esac
376772b676d7Smrg    ;;
376872b676d7Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
376972b676d7Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
377072b676d7Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
377172b676d7Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
377272b676d7Smrg    runpath_var='LD_RUN_PATH'
377372b676d7Smrg
377472b676d7Smrg    case $cc_basename in
377572b676d7Smrg      CC*)
377672b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
377772b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
377872b676d7Smrg	;;
377972b676d7Smrg      *)
378072b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
378172b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
378272b676d7Smrg	;;
378372b676d7Smrg    esac
378472b676d7Smrg    ;;
378572b676d7Smrg  sysv5* | sco3.2v5* | sco5v6*)
378672b676d7Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
378772b676d7Smrg    # link with -lc, and that would cause any symbols used from libc to
378872b676d7Smrg    # always be unresolved, which means just about no library would
378972b676d7Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
379072b676d7Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
379172b676d7Smrg    # as -z defs.
379272b676d7Smrg    # For security reasons, it is highly recommended that you always
379372b676d7Smrg    # use absolute paths for naming shared libraries, and exclude the
379472b676d7Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
379572b676d7Smrg    # requires that you compile everything twice, which is a pain.
379672b676d7Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
379772b676d7Smrg    # non-empty value in the environment.  Most likely only useful for
379872b676d7Smrg    # creating official distributions of packages.
379972b676d7Smrg    # This is a hack until libtool officially supports absolute path
380072b676d7Smrg    # names for shared libraries.
380172b676d7Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
380272b676d7Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
380372b676d7Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
380472b676d7Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
380572b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
380672b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
380772b676d7Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
380872b676d7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
380972b676d7Smrg    runpath_var='LD_RUN_PATH'
381072b676d7Smrg
381172b676d7Smrg    case $cc_basename in
381272b676d7Smrg      CC*)
381372b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
381472b676d7Smrg	_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'
381572b676d7Smrg	;;
381672b676d7Smrg      *)
381772b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
381872b676d7Smrg	_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'
381972b676d7Smrg	;;
382072b676d7Smrg    esac
382172b676d7Smrg    ;;
382272b676d7Smrg  tandem*)
382372b676d7Smrg    case $cc_basename in
382472b676d7Smrg      NCC*)
382572b676d7Smrg	# NonStop-UX NCC 3.20
382672b676d7Smrg	# FIXME: insert proper C++ library support
382772b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
382872b676d7Smrg	;;
382972b676d7Smrg      *)
383072b676d7Smrg	# FIXME: insert proper C++ library support
383172b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
383272b676d7Smrg	;;
383372b676d7Smrg    esac
383472b676d7Smrg    ;;
383572b676d7Smrg  vxworks*)
383672b676d7Smrg    # FIXME: insert proper C++ library support
383772b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
383872b676d7Smrg    ;;
383972b676d7Smrg  *)
384072b676d7Smrg    # FIXME: insert proper C++ library support
384172b676d7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
384272b676d7Smrg    ;;
384372b676d7Smrgesac
384472b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
384572b676d7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
384672b676d7Smrg
384772b676d7Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
384872b676d7Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
384972b676d7Smrg
385072b676d7SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
385172b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
385272b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
385372b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
385472b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
385572b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
385672b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
385772b676d7Smrg
385872b676d7SmrgAC_LIBTOOL_CONFIG($1)
385972b676d7Smrg
386072b676d7SmrgAC_LANG_POP
386172b676d7SmrgCC=$lt_save_CC
386272b676d7SmrgLDCXX=$LD
386372b676d7SmrgLD=$lt_save_LD
386472b676d7SmrgGCC=$lt_save_GCC
386572b676d7Smrgwith_gnu_ldcxx=$with_gnu_ld
386672b676d7Smrgwith_gnu_ld=$lt_save_with_gnu_ld
386772b676d7Smrglt_cv_path_LDCXX=$lt_cv_path_LD
386872b676d7Smrglt_cv_path_LD=$lt_save_path_LD
386972b676d7Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
387072b676d7Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
387172b676d7Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
387272b676d7Smrg
387372b676d7Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
387472b676d7Smrg# ------------------------------------
387572b676d7Smrg# Figure out "hidden" library dependencies from verbose
387672b676d7Smrg# compiler output when linking a shared library.
387772b676d7Smrg# Parse the compiler output and extract the necessary
387872b676d7Smrg# objects, libraries and library flags.
38791fd23544SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
38801fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
388172b676d7Smrgdnl we can't use the lt_simple_compile_test_code here,
388272b676d7Smrgdnl because it contains code intended for an executable,
388372b676d7Smrgdnl not a library.  It's possible we should let each
388472b676d7Smrgdnl tag define a new lt_????_link_test_code variable,
388572b676d7Smrgdnl but it's only used here...
388672b676d7Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
388772b676d7Smrgint a;
388872b676d7Smrgvoid foo (void) { a = 0; }
388972b676d7SmrgEOF
389072b676d7Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
389172b676d7Smrgclass Foo
389272b676d7Smrg{
389372b676d7Smrgpublic:
389472b676d7Smrg  Foo (void) { a = 0; }
389572b676d7Smrgprivate:
389672b676d7Smrg  int a;
389772b676d7Smrg};
389872b676d7SmrgEOF
389972b676d7Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
390072b676d7Smrg      subroutine foo
390172b676d7Smrg      implicit none
390272b676d7Smrg      integer*4 a
390372b676d7Smrg      a=0
390472b676d7Smrg      return
390572b676d7Smrg      end
390672b676d7SmrgEOF
390772b676d7Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
390872b676d7Smrgpublic class foo {
390972b676d7Smrg  private int a;
391072b676d7Smrg  public void bar (void) {
391172b676d7Smrg    a = 0;
391272b676d7Smrg  }
391372b676d7Smrg};
391472b676d7SmrgEOF
391572b676d7Smrg])
391672b676d7Smrgdnl Parse the compiler output and extract the necessary
391772b676d7Smrgdnl objects, libraries and library flags.
391872b676d7Smrgif AC_TRY_EVAL(ac_compile); then
391972b676d7Smrg  # Parse the compiler output and extract the necessary
392072b676d7Smrg  # objects, libraries and library flags.
392172b676d7Smrg
392272b676d7Smrg  # Sentinel used to keep track of whether or not we are before
392372b676d7Smrg  # the conftest object file.
392472b676d7Smrg  pre_test_object_deps_done=no
392572b676d7Smrg
392672b676d7Smrg  # The `*' in the case matches for architectures that use `case' in
392772b676d7Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
392872b676d7Smrg  # eval without this substitution.
392972b676d7Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
393072b676d7Smrg
393172b676d7Smrg  for p in `eval $output_verbose_link_cmd`; do
393272b676d7Smrg    case $p in
393372b676d7Smrg
393472b676d7Smrg    -L* | -R* | -l*)
393572b676d7Smrg       # Some compilers place space between "-{L,R}" and the path.
393672b676d7Smrg       # Remove the space.
393772b676d7Smrg       if test $p = "-L" \
393872b676d7Smrg	  || test $p = "-R"; then
393972b676d7Smrg	 prev=$p
394072b676d7Smrg	 continue
394172b676d7Smrg       else
394272b676d7Smrg	 prev=
394372b676d7Smrg       fi
394472b676d7Smrg
394572b676d7Smrg       if test "$pre_test_object_deps_done" = no; then
394672b676d7Smrg	 case $p in
394772b676d7Smrg	 -L* | -R*)
394872b676d7Smrg	   # Internal compiler library paths should come after those
394972b676d7Smrg	   # provided the user.  The postdeps already come after the
395072b676d7Smrg	   # user supplied libs so there is no need to process them.
395172b676d7Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
395272b676d7Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
395372b676d7Smrg	   else
395472b676d7Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
395572b676d7Smrg	   fi
395672b676d7Smrg	   ;;
395772b676d7Smrg	 # The "-l" case would never come before the object being
395872b676d7Smrg	 # linked, so don't bother handling this case.
395972b676d7Smrg	 esac
396072b676d7Smrg       else
396172b676d7Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
396272b676d7Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
396372b676d7Smrg	 else
396472b676d7Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
396572b676d7Smrg	 fi
396672b676d7Smrg       fi
396772b676d7Smrg       ;;
396872b676d7Smrg
396972b676d7Smrg    *.$objext)
397072b676d7Smrg       # This assumes that the test object file only shows up
397172b676d7Smrg       # once in the compiler output.
397272b676d7Smrg       if test "$p" = "conftest.$objext"; then
397372b676d7Smrg	 pre_test_object_deps_done=yes
397472b676d7Smrg	 continue
397572b676d7Smrg       fi
397672b676d7Smrg
397772b676d7Smrg       if test "$pre_test_object_deps_done" = no; then
397872b676d7Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
397972b676d7Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
398072b676d7Smrg	 else
398172b676d7Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
398272b676d7Smrg	 fi
398372b676d7Smrg       else
398472b676d7Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
398572b676d7Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
398672b676d7Smrg	 else
398772b676d7Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
398872b676d7Smrg	 fi
398972b676d7Smrg       fi
399072b676d7Smrg       ;;
399172b676d7Smrg
399272b676d7Smrg    *) ;; # Ignore the rest.
399372b676d7Smrg
399472b676d7Smrg    esac
399572b676d7Smrg  done
399672b676d7Smrg
399772b676d7Smrg  # Clean up.
399872b676d7Smrg  rm -f a.out a.exe
399972b676d7Smrgelse
400072b676d7Smrg  echo "libtool.m4: error: problem compiling $1 test program"
400172b676d7Smrgfi
400272b676d7Smrg
400372b676d7Smrg$rm -f confest.$objext
400472b676d7Smrg
40051fd23544Smrg_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
40061fd23544Smrgif test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
40071fd23544Smrg  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
40081fd23544Smrgfi
40091fd23544Smrg
401072b676d7Smrg# PORTME: override above test on systems where it is broken
401172b676d7Smrgifelse([$1],[CXX],
401272b676d7Smrg[case $host_os in
40131fd23544Smrginterix[[3-9]]*)
401472b676d7Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
401572b676d7Smrg  # hack all around it, let's just trust "g++" to DTRT.
401672b676d7Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
401772b676d7Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
401872b676d7Smrg  _LT_AC_TAGVAR(postdeps,$1)=
401972b676d7Smrg  ;;
402072b676d7Smrg
40211fd23544Smrglinux*)
40221fd23544Smrg  case `$CC -V 2>&1 | sed 5q` in
40231fd23544Smrg  *Sun\ C*)
40241fd23544Smrg    # Sun C++ 5.9
40251fd23544Smrg    #
40261fd23544Smrg    # The more standards-conforming stlport4 library is
40271fd23544Smrg    # incompatible with the Cstd library. Avoid specifying
40281fd23544Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
40291fd23544Smrg    # -library=stlport4 depends on it.
40301fd23544Smrg    case " $CXX $CXXFLAGS " in
40311fd23544Smrg    *" -library=stlport4 "*)
40321fd23544Smrg      solaris_use_stlport4=yes
40331fd23544Smrg      ;;
40341fd23544Smrg    esac
40351fd23544Smrg    if test "$solaris_use_stlport4" != yes; then
40361fd23544Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
40371fd23544Smrg    fi
40381fd23544Smrg    ;;
40391fd23544Smrg  esac
40401fd23544Smrg  ;;
40411fd23544Smrg
404272b676d7Smrgsolaris*)
404372b676d7Smrg  case $cc_basename in
404472b676d7Smrg  CC*)
40451fd23544Smrg    # The more standards-conforming stlport4 library is
40461fd23544Smrg    # incompatible with the Cstd library. Avoid specifying
40471fd23544Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
40481fd23544Smrg    # -library=stlport4 depends on it.
40491fd23544Smrg    case " $CXX $CXXFLAGS " in
40501fd23544Smrg    *" -library=stlport4 "*)
40511fd23544Smrg      solaris_use_stlport4=yes
40521fd23544Smrg      ;;
40531fd23544Smrg    esac
40541fd23544Smrg
405572b676d7Smrg    # Adding this requires a known-good setup of shared libraries for
405672b676d7Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
405772b676d7Smrg    # archive will be linked into the output, leading to subtle bugs.
40581fd23544Smrg    if test "$solaris_use_stlport4" != yes; then
40591fd23544Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
40601fd23544Smrg    fi
406172b676d7Smrg    ;;
406272b676d7Smrg  esac
406372b676d7Smrg  ;;
406472b676d7Smrgesac
406572b676d7Smrg])
406672b676d7Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
406772b676d7Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
406872b676d7Smrgesac
406972b676d7Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
407072b676d7Smrg
407172b676d7Smrg# AC_LIBTOOL_LANG_F77_CONFIG
407272b676d7Smrg# --------------------------
407372b676d7Smrg# Ensure that the configuration vars for the C compiler are
407472b676d7Smrg# suitably defined.  Those variables are subsequently used by
407572b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
407672b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
407772b676d7SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
407872b676d7Smrg[AC_REQUIRE([AC_PROG_F77])
407972b676d7SmrgAC_LANG_PUSH(Fortran 77)
408072b676d7Smrg
408172b676d7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
408272b676d7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
408372b676d7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
408472b676d7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
408572b676d7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
408672b676d7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
408772b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
408872b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
408972b676d7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
409072b676d7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
409172b676d7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
409272b676d7Smrg_LT_AC_TAGVAR(module_cmds, $1)=
409372b676d7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
409472b676d7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
409572b676d7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
409672b676d7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
409772b676d7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
409872b676d7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
409972b676d7Smrg
410072b676d7Smrg# Source file extension for f77 test sources.
410172b676d7Smrgac_ext=f
410272b676d7Smrg
410372b676d7Smrg# Object file extension for compiled f77 test sources.
410472b676d7Smrgobjext=o
410572b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
410672b676d7Smrg
410772b676d7Smrg# Code to be used in simple compile tests
41081fd23544Smrglt_simple_compile_test_code="\
41091fd23544Smrg      subroutine t
41101fd23544Smrg      return
41111fd23544Smrg      end
41121fd23544Smrg"
411372b676d7Smrg
411472b676d7Smrg# Code to be used in simple link tests
41151fd23544Smrglt_simple_link_test_code="\
41161fd23544Smrg      program t
41171fd23544Smrg      end
41181fd23544Smrg"
411972b676d7Smrg
412072b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
412172b676d7Smrg_LT_AC_SYS_COMPILER
412272b676d7Smrg
412372b676d7Smrg# save warnings/boilerplate of simple test code
412472b676d7Smrg_LT_COMPILER_BOILERPLATE
412572b676d7Smrg_LT_LINKER_BOILERPLATE
412672b676d7Smrg
412772b676d7Smrg# Allow CC to be a program name with arguments.
412872b676d7Smrglt_save_CC="$CC"
412972b676d7SmrgCC=${F77-"f77"}
413072b676d7Smrgcompiler=$CC
413172b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
413272b676d7Smrg_LT_CC_BASENAME([$compiler])
413372b676d7Smrg
413472b676d7SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
413572b676d7SmrgAC_MSG_RESULT([$can_build_shared])
413672b676d7Smrg
413772b676d7SmrgAC_MSG_CHECKING([whether to build shared libraries])
413872b676d7Smrgtest "$can_build_shared" = "no" && enable_shared=no
413972b676d7Smrg
414072b676d7Smrg# On AIX, shared libraries and static libraries use the same namespace, and
414172b676d7Smrg# are all built from PIC.
414272b676d7Smrgcase $host_os in
414372b676d7Smrgaix3*)
414472b676d7Smrg  test "$enable_shared" = yes && enable_static=no
414572b676d7Smrg  if test -n "$RANLIB"; then
414672b676d7Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
414772b676d7Smrg    postinstall_cmds='$RANLIB $lib'
414872b676d7Smrg  fi
414972b676d7Smrg  ;;
41501fd23544Smrgaix[[4-9]]*)
415172b676d7Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
415272b676d7Smrg    test "$enable_shared" = yes && enable_static=no
415372b676d7Smrg  fi
415472b676d7Smrg  ;;
415572b676d7Smrgesac
415672b676d7SmrgAC_MSG_RESULT([$enable_shared])
415772b676d7Smrg
415872b676d7SmrgAC_MSG_CHECKING([whether to build static libraries])
415972b676d7Smrg# Make sure either enable_shared or enable_static is yes.
416072b676d7Smrgtest "$enable_shared" = yes || enable_static=yes
416172b676d7SmrgAC_MSG_RESULT([$enable_static])
416272b676d7Smrg
416372b676d7Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
416472b676d7Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
416572b676d7Smrg
416672b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
416772b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
416872b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
416972b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
417072b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
417172b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
417272b676d7Smrg
417372b676d7SmrgAC_LIBTOOL_CONFIG($1)
417472b676d7Smrg
417572b676d7SmrgAC_LANG_POP
417672b676d7SmrgCC="$lt_save_CC"
417772b676d7Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
417872b676d7Smrg
417972b676d7Smrg
418072b676d7Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
418172b676d7Smrg# --------------------------
418272b676d7Smrg# Ensure that the configuration vars for the C compiler are
418372b676d7Smrg# suitably defined.  Those variables are subsequently used by
418472b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
418572b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
418672b676d7SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
418772b676d7Smrg[AC_LANG_SAVE
418872b676d7Smrg
418972b676d7Smrg# Source file extension for Java test sources.
419072b676d7Smrgac_ext=java
419172b676d7Smrg
419272b676d7Smrg# Object file extension for compiled Java test sources.
419372b676d7Smrgobjext=o
419472b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
419572b676d7Smrg
419672b676d7Smrg# Code to be used in simple compile tests
41971fd23544Smrglt_simple_compile_test_code="class foo {}"
419872b676d7Smrg
419972b676d7Smrg# Code to be used in simple link tests
42001fd23544Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
420172b676d7Smrg
420272b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
420372b676d7Smrg_LT_AC_SYS_COMPILER
420472b676d7Smrg
420572b676d7Smrg# save warnings/boilerplate of simple test code
420672b676d7Smrg_LT_COMPILER_BOILERPLATE
420772b676d7Smrg_LT_LINKER_BOILERPLATE
420872b676d7Smrg
420972b676d7Smrg# Allow CC to be a program name with arguments.
421072b676d7Smrglt_save_CC="$CC"
421172b676d7SmrgCC=${GCJ-"gcj"}
421272b676d7Smrgcompiler=$CC
421372b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
421472b676d7Smrg_LT_CC_BASENAME([$compiler])
421572b676d7Smrg
421672b676d7Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
421772b676d7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
421872b676d7Smrg
421972b676d7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
422072b676d7Smrg
422172b676d7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
422272b676d7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
422372b676d7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
422472b676d7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
422572b676d7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
422672b676d7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
422772b676d7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
422872b676d7Smrg
422972b676d7SmrgAC_LIBTOOL_CONFIG($1)
423072b676d7Smrg
423172b676d7SmrgAC_LANG_RESTORE
423272b676d7SmrgCC="$lt_save_CC"
423372b676d7Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
423472b676d7Smrg
423572b676d7Smrg
423672b676d7Smrg# AC_LIBTOOL_LANG_RC_CONFIG
423772b676d7Smrg# -------------------------
423872b676d7Smrg# Ensure that the configuration vars for the Windows resource compiler are
423972b676d7Smrg# suitably defined.  Those variables are subsequently used by
424072b676d7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
424172b676d7SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
424272b676d7SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
424372b676d7Smrg[AC_LANG_SAVE
424472b676d7Smrg
424572b676d7Smrg# Source file extension for RC test sources.
424672b676d7Smrgac_ext=rc
424772b676d7Smrg
424872b676d7Smrg# Object file extension for compiled RC test sources.
424972b676d7Smrgobjext=o
425072b676d7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
425172b676d7Smrg
425272b676d7Smrg# Code to be used in simple compile tests
42531fd23544Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
425472b676d7Smrg
425572b676d7Smrg# Code to be used in simple link tests
425672b676d7Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
425772b676d7Smrg
425872b676d7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
425972b676d7Smrg_LT_AC_SYS_COMPILER
426072b676d7Smrg
426172b676d7Smrg# save warnings/boilerplate of simple test code
426272b676d7Smrg_LT_COMPILER_BOILERPLATE
426372b676d7Smrg_LT_LINKER_BOILERPLATE
426472b676d7Smrg
426572b676d7Smrg# Allow CC to be a program name with arguments.
426672b676d7Smrglt_save_CC="$CC"
426772b676d7SmrgCC=${RC-"windres"}
426872b676d7Smrgcompiler=$CC
426972b676d7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
427072b676d7Smrg_LT_CC_BASENAME([$compiler])
427172b676d7Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
427272b676d7Smrg
427372b676d7SmrgAC_LIBTOOL_CONFIG($1)
427472b676d7Smrg
427572b676d7SmrgAC_LANG_RESTORE
427672b676d7SmrgCC="$lt_save_CC"
427772b676d7Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
427872b676d7Smrg
427972b676d7Smrg
428072b676d7Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
428172b676d7Smrg# ----------------------------
428272b676d7Smrg# If TAGNAME is not passed, then create an initial libtool script
428372b676d7Smrg# with a default configuration from the untagged config vars.  Otherwise
428472b676d7Smrg# add code to config.status for appending the configuration named by
428572b676d7Smrg# TAGNAME from the matching tagged config vars.
428672b676d7SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
428772b676d7Smrg[# The else clause should only fire when bootstrapping the
428872b676d7Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
428972b676d7Smrg# with your package, and you will get complaints that there are
429072b676d7Smrg# no rules to generate ltmain.sh.
429172b676d7Smrgif test -f "$ltmain"; then
429272b676d7Smrg  # See if we are running on zsh, and set the options which allow our commands through
429372b676d7Smrg  # without removal of \ escapes.
429472b676d7Smrg  if test -n "${ZSH_VERSION+set}" ; then
429572b676d7Smrg    setopt NO_GLOB_SUBST
429672b676d7Smrg  fi
429772b676d7Smrg  # Now quote all the things that may contain metacharacters while being
429872b676d7Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
429972b676d7Smrg  # variables and quote the copies for generation of the libtool script.
430072b676d7Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
430172b676d7Smrg    SED SHELL STRIP \
430272b676d7Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
430372b676d7Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
430472b676d7Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
430572b676d7Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
430672b676d7Smrg    lt_cv_sys_global_symbol_to_c_name_address \
430772b676d7Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
430872b676d7Smrg    old_postinstall_cmds old_postuninstall_cmds \
430972b676d7Smrg    _LT_AC_TAGVAR(compiler, $1) \
431072b676d7Smrg    _LT_AC_TAGVAR(CC, $1) \
431172b676d7Smrg    _LT_AC_TAGVAR(LD, $1) \
431272b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
431372b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
431472b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
431572b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
431672b676d7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
431772b676d7Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
431872b676d7Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
431972b676d7Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
432072b676d7Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
432172b676d7Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
432272b676d7Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
432372b676d7Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
432472b676d7Smrg    _LT_AC_TAGVAR(predeps, $1) \
432572b676d7Smrg    _LT_AC_TAGVAR(postdeps, $1) \
432672b676d7Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
43271fd23544Smrg    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
432872b676d7Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
432972b676d7Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
433072b676d7Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
433172b676d7Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
433272b676d7Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
433372b676d7Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
433472b676d7Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
433572b676d7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
433672b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
433772b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
433872b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
433972b676d7Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
434072b676d7Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
434172b676d7Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
434272b676d7Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
43431fd23544Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
434472b676d7Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
434572b676d7Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
434672b676d7Smrg
434772b676d7Smrg    case $var in
434872b676d7Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
434972b676d7Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
435072b676d7Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
435172b676d7Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
435272b676d7Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
435372b676d7Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
435472b676d7Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
435572b676d7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
435672b676d7Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
435772b676d7Smrg    postinstall_cmds | postuninstall_cmds | \
435872b676d7Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
435972b676d7Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
436072b676d7Smrg      # Double-quote double-evaled strings.
436172b676d7Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
436272b676d7Smrg      ;;
436372b676d7Smrg    *)
436472b676d7Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
436572b676d7Smrg      ;;
436672b676d7Smrg    esac
436772b676d7Smrg  done
436872b676d7Smrg
436972b676d7Smrg  case $lt_echo in
437072b676d7Smrg  *'\[$]0 --fallback-echo"')
437172b676d7Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
437272b676d7Smrg    ;;
437372b676d7Smrg  esac
437472b676d7Smrg
437572b676d7Smrgifelse([$1], [],
437672b676d7Smrg  [cfgfile="${ofile}T"
437772b676d7Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
437872b676d7Smrg  $rm -f "$cfgfile"
437972b676d7Smrg  AC_MSG_NOTICE([creating $ofile])],
438072b676d7Smrg  [cfgfile="$ofile"])
438172b676d7Smrg
438272b676d7Smrg  cat <<__EOF__ >> "$cfgfile"
438372b676d7Smrgifelse([$1], [],
438472b676d7Smrg[#! $SHELL
438572b676d7Smrg
438672b676d7Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
438772b676d7Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
438872b676d7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
438972b676d7Smrg#
43901fd23544Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
439172b676d7Smrg# Free Software Foundation, Inc.
439272b676d7Smrg#
439372b676d7Smrg# This file is part of GNU Libtool:
439472b676d7Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
439572b676d7Smrg#
439672b676d7Smrg# This program is free software; you can redistribute it and/or modify
439772b676d7Smrg# it under the terms of the GNU General Public License as published by
439872b676d7Smrg# the Free Software Foundation; either version 2 of the License, or
439972b676d7Smrg# (at your option) any later version.
440072b676d7Smrg#
440172b676d7Smrg# This program is distributed in the hope that it will be useful, but
440272b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
440372b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
440472b676d7Smrg# General Public License for more details.
440572b676d7Smrg#
440672b676d7Smrg# You should have received a copy of the GNU General Public License
440772b676d7Smrg# along with this program; if not, write to the Free Software
440872b676d7Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
440972b676d7Smrg#
441072b676d7Smrg# As a special exception to the GNU General Public License, if you
441172b676d7Smrg# distribute this file as part of a program that contains a
441272b676d7Smrg# configuration script generated by Autoconf, you may include it under
441372b676d7Smrg# the same distribution terms that you use for the rest of that program.
441472b676d7Smrg
441572b676d7Smrg# A sed program that does not truncate output.
441672b676d7SmrgSED=$lt_SED
441772b676d7Smrg
441872b676d7Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
441972b676d7SmrgXsed="$SED -e 1s/^X//"
442072b676d7Smrg
442172b676d7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
442272b676d7Smrg# if CDPATH is set.
442372b676d7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
442472b676d7Smrg
442572b676d7Smrg# The names of the tagged configurations supported by this script.
442672b676d7Smrgavailable_tags=
442772b676d7Smrg
442872b676d7Smrg# ### BEGIN LIBTOOL CONFIG],
442972b676d7Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
443072b676d7Smrg
443172b676d7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
443272b676d7Smrg
443372b676d7Smrg# Shell to use when invoking shell scripts.
443472b676d7SmrgSHELL=$lt_SHELL
443572b676d7Smrg
443672b676d7Smrg# Whether or not to build shared libraries.
443772b676d7Smrgbuild_libtool_libs=$enable_shared
443872b676d7Smrg
443972b676d7Smrg# Whether or not to build static libraries.
444072b676d7Smrgbuild_old_libs=$enable_static
444172b676d7Smrg
444272b676d7Smrg# Whether or not to add -lc for building shared libraries.
444372b676d7Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
444472b676d7Smrg
444572b676d7Smrg# Whether or not to disallow shared libs when runtime libs are static
444672b676d7Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
444772b676d7Smrg
444872b676d7Smrg# Whether or not to optimize for fast installation.
444972b676d7Smrgfast_install=$enable_fast_install
445072b676d7Smrg
445172b676d7Smrg# The host system.
445272b676d7Smrghost_alias=$host_alias
445372b676d7Smrghost=$host
445472b676d7Smrghost_os=$host_os
445572b676d7Smrg
445672b676d7Smrg# The build system.
445772b676d7Smrgbuild_alias=$build_alias
445872b676d7Smrgbuild=$build
445972b676d7Smrgbuild_os=$build_os
446072b676d7Smrg
446172b676d7Smrg# An echo program that does not interpret backslashes.
446272b676d7Smrgecho=$lt_echo
446372b676d7Smrg
446472b676d7Smrg# The archiver.
446572b676d7SmrgAR=$lt_AR
446672b676d7SmrgAR_FLAGS=$lt_AR_FLAGS
446772b676d7Smrg
446872b676d7Smrg# A C compiler.
446972b676d7SmrgLTCC=$lt_LTCC
447072b676d7Smrg
447172b676d7Smrg# LTCC compiler flags.
447272b676d7SmrgLTCFLAGS=$lt_LTCFLAGS
447372b676d7Smrg
447472b676d7Smrg# A language-specific compiler.
447572b676d7SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
447672b676d7Smrg
447772b676d7Smrg# Is the compiler the GNU C compiler?
447872b676d7Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
447972b676d7Smrg
448072b676d7Smrg# An ERE matcher.
448172b676d7SmrgEGREP=$lt_EGREP
448272b676d7Smrg
448372b676d7Smrg# The linker used to build libraries.
448472b676d7SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
448572b676d7Smrg
448672b676d7Smrg# Whether we need hard or soft links.
448772b676d7SmrgLN_S=$lt_LN_S
448872b676d7Smrg
448972b676d7Smrg# A BSD-compatible nm program.
449072b676d7SmrgNM=$lt_NM
449172b676d7Smrg
449272b676d7Smrg# A symbol stripping program
449372b676d7SmrgSTRIP=$lt_STRIP
449472b676d7Smrg
449572b676d7Smrg# Used to examine libraries when file_magic_cmd begins "file"
449672b676d7SmrgMAGIC_CMD=$MAGIC_CMD
449772b676d7Smrg
449872b676d7Smrg# Used on cygwin: DLL creation program.
449972b676d7SmrgDLLTOOL="$DLLTOOL"
450072b676d7Smrg
450172b676d7Smrg# Used on cygwin: object dumper.
450272b676d7SmrgOBJDUMP="$OBJDUMP"
450372b676d7Smrg
450472b676d7Smrg# Used on cygwin: assembler.
450572b676d7SmrgAS="$AS"
450672b676d7Smrg
450772b676d7Smrg# The name of the directory that contains temporary libtool files.
450872b676d7Smrgobjdir=$objdir
450972b676d7Smrg
451072b676d7Smrg# How to create reloadable object files.
451172b676d7Smrgreload_flag=$lt_reload_flag
451272b676d7Smrgreload_cmds=$lt_reload_cmds
451372b676d7Smrg
451472b676d7Smrg# How to pass a linker flag through the compiler.
451572b676d7Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
451672b676d7Smrg
451772b676d7Smrg# Object file suffix (normally "o").
451872b676d7Smrgobjext="$ac_objext"
451972b676d7Smrg
452072b676d7Smrg# Old archive suffix (normally "a").
452172b676d7Smrglibext="$libext"
452272b676d7Smrg
452372b676d7Smrg# Shared library suffix (normally ".so").
452472b676d7Smrgshrext_cmds='$shrext_cmds'
452572b676d7Smrg
452672b676d7Smrg# Executable file suffix (normally "").
452772b676d7Smrgexeext="$exeext"
452872b676d7Smrg
452972b676d7Smrg# Additional compiler flags for building library objects.
453072b676d7Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
453172b676d7Smrgpic_mode=$pic_mode
453272b676d7Smrg
453372b676d7Smrg# What is the maximum length of a command?
453472b676d7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
453572b676d7Smrg
453672b676d7Smrg# Does compiler simultaneously support -c and -o options?
453772b676d7Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
453872b676d7Smrg
453972b676d7Smrg# Must we lock files when doing compilation?
454072b676d7Smrgneed_locks=$lt_need_locks
454172b676d7Smrg
454272b676d7Smrg# Do we need the lib prefix for modules?
454372b676d7Smrgneed_lib_prefix=$need_lib_prefix
454472b676d7Smrg
454572b676d7Smrg# Do we need a version for libraries?
454672b676d7Smrgneed_version=$need_version
454772b676d7Smrg
454872b676d7Smrg# Whether dlopen is supported.
454972b676d7Smrgdlopen_support=$enable_dlopen
455072b676d7Smrg
455172b676d7Smrg# Whether dlopen of programs is supported.
455272b676d7Smrgdlopen_self=$enable_dlopen_self
455372b676d7Smrg
455472b676d7Smrg# Whether dlopen of statically linked programs is supported.
455572b676d7Smrgdlopen_self_static=$enable_dlopen_self_static
455672b676d7Smrg
455772b676d7Smrg# Compiler flag to prevent dynamic linking.
455872b676d7Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
455972b676d7Smrg
456072b676d7Smrg# Compiler flag to turn off builtin functions.
456172b676d7Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
456272b676d7Smrg
456372b676d7Smrg# Compiler flag to allow reflexive dlopens.
456472b676d7Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
456572b676d7Smrg
456672b676d7Smrg# Compiler flag to generate shared objects directly from archives.
456772b676d7Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
456872b676d7Smrg
456972b676d7Smrg# Compiler flag to generate thread-safe objects.
457072b676d7Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
457172b676d7Smrg
457272b676d7Smrg# Library versioning type.
457372b676d7Smrgversion_type=$version_type
457472b676d7Smrg
457572b676d7Smrg# Format of library name prefix.
457672b676d7Smrglibname_spec=$lt_libname_spec
457772b676d7Smrg
457872b676d7Smrg# List of archive names.  First name is the real one, the rest are links.
457972b676d7Smrg# The last name is the one that the linker finds with -lNAME.
458072b676d7Smrglibrary_names_spec=$lt_library_names_spec
458172b676d7Smrg
458272b676d7Smrg# The coded name of the library, if different from the real name.
458372b676d7Smrgsoname_spec=$lt_soname_spec
458472b676d7Smrg
458572b676d7Smrg# Commands used to build and install an old-style archive.
458672b676d7SmrgRANLIB=$lt_RANLIB
458772b676d7Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
458872b676d7Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
458972b676d7Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
459072b676d7Smrg
459172b676d7Smrg# Create an old-style archive from a shared archive.
459272b676d7Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
459372b676d7Smrg
459472b676d7Smrg# Create a temporary old-style archive to link instead of a shared archive.
459572b676d7Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
459672b676d7Smrg
459772b676d7Smrg# Commands used to build and install a shared archive.
459872b676d7Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
459972b676d7Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
460072b676d7Smrgpostinstall_cmds=$lt_postinstall_cmds
460172b676d7Smrgpostuninstall_cmds=$lt_postuninstall_cmds
460272b676d7Smrg
460372b676d7Smrg# Commands used to build a loadable module (assumed same as above if empty)
460472b676d7Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
460572b676d7Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
460672b676d7Smrg
460772b676d7Smrg# Commands to strip libraries.
460872b676d7Smrgold_striplib=$lt_old_striplib
460972b676d7Smrgstriplib=$lt_striplib
461072b676d7Smrg
461172b676d7Smrg# Dependencies to place before the objects being linked to create a
461272b676d7Smrg# shared library.
461372b676d7Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
461472b676d7Smrg
461572b676d7Smrg# Dependencies to place after the objects being linked to create a
461672b676d7Smrg# shared library.
461772b676d7Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
461872b676d7Smrg
461972b676d7Smrg# Dependencies to place before the objects being linked to create a
462072b676d7Smrg# shared library.
462172b676d7Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
462272b676d7Smrg
462372b676d7Smrg# Dependencies to place after the objects being linked to create a
462472b676d7Smrg# shared library.
462572b676d7Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
462672b676d7Smrg
46271fd23544Smrg# The directories searched by this compiler when creating a shared
46281fd23544Smrg# library
46291fd23544Smrgcompiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
46301fd23544Smrg
463172b676d7Smrg# The library search path used internally by the compiler when linking
463272b676d7Smrg# a shared library.
463372b676d7Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
463472b676d7Smrg
463572b676d7Smrg# Method to check whether dependent libraries are shared objects.
463672b676d7Smrgdeplibs_check_method=$lt_deplibs_check_method
463772b676d7Smrg
463872b676d7Smrg# Command to use when deplibs_check_method == file_magic.
463972b676d7Smrgfile_magic_cmd=$lt_file_magic_cmd
464072b676d7Smrg
464172b676d7Smrg# Flag that allows shared libraries with undefined symbols to be built.
464272b676d7Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
464372b676d7Smrg
464472b676d7Smrg# Flag that forces no undefined symbols.
464572b676d7Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
464672b676d7Smrg
464772b676d7Smrg# Commands used to finish a libtool library installation in a directory.
464872b676d7Smrgfinish_cmds=$lt_finish_cmds
464972b676d7Smrg
465072b676d7Smrg# Same as above, but a single script fragment to be evaled but not shown.
465172b676d7Smrgfinish_eval=$lt_finish_eval
465272b676d7Smrg
465372b676d7Smrg# Take the output of nm and produce a listing of raw symbols and C names.
465472b676d7Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
465572b676d7Smrg
465672b676d7Smrg# Transform the output of nm in a proper C declaration
465772b676d7Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
465872b676d7Smrg
465972b676d7Smrg# Transform the output of nm in a C name address pair
466072b676d7Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
466172b676d7Smrg
466272b676d7Smrg# This is the shared library runtime path variable.
466372b676d7Smrgrunpath_var=$runpath_var
466472b676d7Smrg
466572b676d7Smrg# This is the shared library path variable.
466672b676d7Smrgshlibpath_var=$shlibpath_var
466772b676d7Smrg
466872b676d7Smrg# Is shlibpath searched before the hard-coded library search path?
466972b676d7Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
467072b676d7Smrg
467172b676d7Smrg# How to hardcode a shared library path into an executable.
467272b676d7Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
467372b676d7Smrg
467472b676d7Smrg# Whether we should hardcode library paths into libraries.
467572b676d7Smrghardcode_into_libs=$hardcode_into_libs
467672b676d7Smrg
467772b676d7Smrg# Flag to hardcode \$libdir into a binary during linking.
467872b676d7Smrg# This must work even if \$libdir does not exist.
467972b676d7Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
468072b676d7Smrg
468172b676d7Smrg# If ld is used when linking, flag to hardcode \$libdir into
468272b676d7Smrg# a binary during linking. This must work even if \$libdir does
468372b676d7Smrg# not exist.
468472b676d7Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
468572b676d7Smrg
468672b676d7Smrg# Whether we need a single -rpath flag with a separated argument.
468772b676d7Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
468872b676d7Smrg
468972b676d7Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
469072b676d7Smrg# resulting binary.
469172b676d7Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
469272b676d7Smrg
469372b676d7Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
469472b676d7Smrg# resulting binary.
469572b676d7Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
469672b676d7Smrg
469772b676d7Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
469872b676d7Smrg# the resulting binary.
469972b676d7Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
470072b676d7Smrg
470172b676d7Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
470272b676d7Smrg# and all subsequent libraries and executables linked against it.
470372b676d7Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
470472b676d7Smrg
470572b676d7Smrg# Variables whose values should be saved in libtool wrapper scripts and
470672b676d7Smrg# restored at relink time.
470772b676d7Smrgvariables_saved_for_relink="$variables_saved_for_relink"
470872b676d7Smrg
470972b676d7Smrg# Whether libtool must link a program against all its dependency libraries.
471072b676d7Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
471172b676d7Smrg
471272b676d7Smrg# Compile-time system search path for libraries
471372b676d7Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
471472b676d7Smrg
471572b676d7Smrg# Run-time system search path for libraries
471672b676d7Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
471772b676d7Smrg
471872b676d7Smrg# Fix the shell variable \$srcfile for the compiler.
47191fd23544Smrgfix_srcfile_path=$lt_fix_srcfile_path
472072b676d7Smrg
472172b676d7Smrg# Set to yes if exported symbols are required.
472272b676d7Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
472372b676d7Smrg
472472b676d7Smrg# The commands to list exported symbols.
472572b676d7Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
472672b676d7Smrg
472772b676d7Smrg# The commands to extract the exported symbol list from a shared archive.
472872b676d7Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
472972b676d7Smrg
473072b676d7Smrg# Symbols that should not be listed in the preloaded symbols.
473172b676d7Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
473272b676d7Smrg
473372b676d7Smrg# Symbols that must always be exported.
473472b676d7Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
473572b676d7Smrg
473672b676d7Smrgifelse([$1],[],
473772b676d7Smrg[# ### END LIBTOOL CONFIG],
473872b676d7Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
473972b676d7Smrg
474072b676d7Smrg__EOF__
474172b676d7Smrg
474272b676d7Smrgifelse([$1],[], [
474372b676d7Smrg  case $host_os in
474472b676d7Smrg  aix3*)
474572b676d7Smrg    cat <<\EOF >> "$cfgfile"
474672b676d7Smrg
474772b676d7Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
474872b676d7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
474972b676d7Smrg# vanish in a puff of smoke.
475072b676d7Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
475172b676d7Smrg  COLLECT_NAMES=
475272b676d7Smrg  export COLLECT_NAMES
475372b676d7Smrgfi
475472b676d7SmrgEOF
475572b676d7Smrg    ;;
475672b676d7Smrg  esac
475772b676d7Smrg
475872b676d7Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
475972b676d7Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
476072b676d7Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
476172b676d7Smrg  # is reportedly fixed, but why not run on old versions too?
476272b676d7Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
476372b676d7Smrg
476472b676d7Smrg  mv -f "$cfgfile" "$ofile" || \
476572b676d7Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
476672b676d7Smrg  chmod +x "$ofile"
476772b676d7Smrg])
476872b676d7Smrgelse
476972b676d7Smrg  # If there is no Makefile yet, we rely on a make rule to execute
477072b676d7Smrg  # `config.status --recheck' to rerun these tests and create the
477172b676d7Smrg  # libtool script then.
477272b676d7Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
477372b676d7Smrg  if test -f "$ltmain_in"; then
477472b676d7Smrg    test -f Makefile && make "$ltmain"
477572b676d7Smrg  fi
477672b676d7Smrgfi
477772b676d7Smrg])# AC_LIBTOOL_CONFIG
477872b676d7Smrg
477972b676d7Smrg
478072b676d7Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
478172b676d7Smrg# -------------------------------------------
478272b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
478372b676d7Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
478472b676d7Smrg
478572b676d7Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
478672b676d7Smrg
478772b676d7Smrgif test "$GCC" = yes; then
478872b676d7Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
478972b676d7Smrg
479072b676d7Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
479172b676d7Smrg    lt_cv_prog_compiler_rtti_exceptions,
479272b676d7Smrg    [-fno-rtti -fno-exceptions], [],
479372b676d7Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
479472b676d7Smrgfi
479572b676d7Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
479672b676d7Smrg
479772b676d7Smrg
479872b676d7Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
479972b676d7Smrg# ---------------------------------
480072b676d7SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
480172b676d7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
48021fd23544SmrgAC_REQUIRE([LT_AC_PROG_SED])
480372b676d7SmrgAC_REQUIRE([AC_PROG_NM])
480472b676d7SmrgAC_REQUIRE([AC_OBJEXT])
480572b676d7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
480672b676d7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
480772b676d7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
480872b676d7Smrg[
480972b676d7Smrg# These are sane defaults that work on at least a few old systems.
481072b676d7Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
481172b676d7Smrg
481272b676d7Smrg# Character class describing NM global symbol codes.
481372b676d7Smrgsymcode='[[BCDEGRST]]'
481472b676d7Smrg
481572b676d7Smrg# Regexp to match symbols that can be accessed directly from C.
481672b676d7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
481772b676d7Smrg
481872b676d7Smrg# Transform an extracted symbol line into a proper C declaration
481972b676d7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
482072b676d7Smrg
482172b676d7Smrg# Transform an extracted symbol line into symbol name and symbol address
482272b676d7Smrglt_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'"
482372b676d7Smrg
482472b676d7Smrg# Define system-specific variables.
482572b676d7Smrgcase $host_os in
482672b676d7Smrgaix*)
482772b676d7Smrg  symcode='[[BCDT]]'
482872b676d7Smrg  ;;
482972b676d7Smrgcygwin* | mingw* | pw32*)
483072b676d7Smrg  symcode='[[ABCDGISTW]]'
483172b676d7Smrg  ;;
483272b676d7Smrghpux*) # Its linker distinguishes data from code symbols
483372b676d7Smrg  if test "$host_cpu" = ia64; then
483472b676d7Smrg    symcode='[[ABCDEGRST]]'
483572b676d7Smrg  fi
483672b676d7Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
483772b676d7Smrg  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'"
483872b676d7Smrg  ;;
483972b676d7Smrglinux* | k*bsd*-gnu)
484072b676d7Smrg  if test "$host_cpu" = ia64; then
484172b676d7Smrg    symcode='[[ABCDGIRSTW]]'
484272b676d7Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
484372b676d7Smrg    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'"
484472b676d7Smrg  fi
484572b676d7Smrg  ;;
484672b676d7Smrgirix* | nonstopux*)
484772b676d7Smrg  symcode='[[BCDEGRST]]'
484872b676d7Smrg  ;;
484972b676d7Smrgosf*)
485072b676d7Smrg  symcode='[[BCDEGQRST]]'
485172b676d7Smrg  ;;
485272b676d7Smrgsolaris*)
485372b676d7Smrg  symcode='[[BDRT]]'
485472b676d7Smrg  ;;
485572b676d7Smrgsco3.2v5*)
485672b676d7Smrg  symcode='[[DT]]'
485772b676d7Smrg  ;;
485872b676d7Smrgsysv4.2uw2*)
485972b676d7Smrg  symcode='[[DT]]'
486072b676d7Smrg  ;;
486172b676d7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
486272b676d7Smrg  symcode='[[ABDT]]'
486372b676d7Smrg  ;;
486472b676d7Smrgsysv4)
486572b676d7Smrg  symcode='[[DFNSTU]]'
486672b676d7Smrg  ;;
486772b676d7Smrgesac
486872b676d7Smrg
486972b676d7Smrg# Handle CRLF in mingw tool chain
487072b676d7Smrgopt_cr=
487172b676d7Smrgcase $build_os in
487272b676d7Smrgmingw*)
487372b676d7Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
487472b676d7Smrg  ;;
487572b676d7Smrgesac
487672b676d7Smrg
487772b676d7Smrg# If we're using GNU nm, then use its standard symbol codes.
487872b676d7Smrgcase `$NM -V 2>&1` in
487972b676d7Smrg*GNU* | *'with BFD'*)
488072b676d7Smrg  symcode='[[ABCDGIRSTW]]' ;;
488172b676d7Smrgesac
488272b676d7Smrg
488372b676d7Smrg# Try without a prefix undercore, then with it.
488472b676d7Smrgfor ac_symprfx in "" "_"; do
488572b676d7Smrg
488672b676d7Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
488772b676d7Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
488872b676d7Smrg
488972b676d7Smrg  # Write the raw and C identifiers.
489072b676d7Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
489172b676d7Smrg
489272b676d7Smrg  # Check to see that the pipe works correctly.
489372b676d7Smrg  pipe_works=no
489472b676d7Smrg
489572b676d7Smrg  rm -f conftest*
489672b676d7Smrg  cat > conftest.$ac_ext <<EOF
489772b676d7Smrg#ifdef __cplusplus
489872b676d7Smrgextern "C" {
489972b676d7Smrg#endif
490072b676d7Smrgchar nm_test_var;
490172b676d7Smrgvoid nm_test_func(){}
490272b676d7Smrg#ifdef __cplusplus
490372b676d7Smrg}
490472b676d7Smrg#endif
490572b676d7Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
490672b676d7SmrgEOF
490772b676d7Smrg
490872b676d7Smrg  if AC_TRY_EVAL(ac_compile); then
490972b676d7Smrg    # Now try to grab the symbols.
491072b676d7Smrg    nlist=conftest.nm
491172b676d7Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
491272b676d7Smrg      # Try sorting and uniquifying the output.
491372b676d7Smrg      if sort "$nlist" | uniq > "$nlist"T; then
491472b676d7Smrg	mv -f "$nlist"T "$nlist"
491572b676d7Smrg      else
491672b676d7Smrg	rm -f "$nlist"T
491772b676d7Smrg      fi
491872b676d7Smrg
491972b676d7Smrg      # Make sure that we snagged all the symbols we need.
492072b676d7Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
492172b676d7Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
492272b676d7Smrg	  cat <<EOF > conftest.$ac_ext
492372b676d7Smrg#ifdef __cplusplus
492472b676d7Smrgextern "C" {
492572b676d7Smrg#endif
492672b676d7Smrg
492772b676d7SmrgEOF
492872b676d7Smrg	  # Now generate the symbol file.
492972b676d7Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
493072b676d7Smrg
493172b676d7Smrg	  cat <<EOF >> conftest.$ac_ext
493272b676d7Smrg#if defined (__STDC__) && __STDC__
493372b676d7Smrg# define lt_ptr_t void *
493472b676d7Smrg#else
493572b676d7Smrg# define lt_ptr_t char *
493672b676d7Smrg# define const
493772b676d7Smrg#endif
493872b676d7Smrg
493972b676d7Smrg/* The mapping between symbol names and symbols. */
494072b676d7Smrgconst struct {
494172b676d7Smrg  const char *name;
494272b676d7Smrg  lt_ptr_t address;
494372b676d7Smrg}
494472b676d7Smrglt_preloaded_symbols[[]] =
494572b676d7Smrg{
494672b676d7SmrgEOF
494772b676d7Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
494872b676d7Smrg	  cat <<\EOF >> conftest.$ac_ext
494972b676d7Smrg  {0, (lt_ptr_t) 0}
495072b676d7Smrg};
495172b676d7Smrg
495272b676d7Smrg#ifdef __cplusplus
495372b676d7Smrg}
495472b676d7Smrg#endif
495572b676d7SmrgEOF
495672b676d7Smrg	  # Now try linking the two files.
495772b676d7Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
495872b676d7Smrg	  lt_save_LIBS="$LIBS"
495972b676d7Smrg	  lt_save_CFLAGS="$CFLAGS"
496072b676d7Smrg	  LIBS="conftstm.$ac_objext"
496172b676d7Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
496272b676d7Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
496372b676d7Smrg	    pipe_works=yes
496472b676d7Smrg	  fi
496572b676d7Smrg	  LIBS="$lt_save_LIBS"
496672b676d7Smrg	  CFLAGS="$lt_save_CFLAGS"
496772b676d7Smrg	else
496872b676d7Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
496972b676d7Smrg	fi
497072b676d7Smrg      else
497172b676d7Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
497272b676d7Smrg      fi
497372b676d7Smrg    else
497472b676d7Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
497572b676d7Smrg    fi
497672b676d7Smrg  else
497772b676d7Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
497872b676d7Smrg    cat conftest.$ac_ext >&5
497972b676d7Smrg  fi
49801fd23544Smrg  rm -rf conftest* conftst*
498172b676d7Smrg
498272b676d7Smrg  # Do not use the global_symbol_pipe unless it works.
498372b676d7Smrg  if test "$pipe_works" = yes; then
498472b676d7Smrg    break
498572b676d7Smrg  else
498672b676d7Smrg    lt_cv_sys_global_symbol_pipe=
498772b676d7Smrg  fi
498872b676d7Smrgdone
498972b676d7Smrg])
499072b676d7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
499172b676d7Smrg  lt_cv_sys_global_symbol_to_cdecl=
499272b676d7Smrgfi
499372b676d7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
499472b676d7Smrg  AC_MSG_RESULT(failed)
499572b676d7Smrgelse
499672b676d7Smrg  AC_MSG_RESULT(ok)
499772b676d7Smrgfi
499872b676d7Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
499972b676d7Smrg
500072b676d7Smrg
500172b676d7Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
500272b676d7Smrg# ---------------------------------------
500372b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
500472b676d7Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
500572b676d7Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
500672b676d7Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
500772b676d7Smrg
500872b676d7SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
500972b676d7Smrg ifelse([$1],[CXX],[
501072b676d7Smrg  # C++ specific cases for pic, static, wl, etc.
501172b676d7Smrg  if test "$GXX" = yes; then
501272b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
501372b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
501472b676d7Smrg
501572b676d7Smrg    case $host_os in
501672b676d7Smrg    aix*)
501772b676d7Smrg      # All AIX code is PIC.
501872b676d7Smrg      if test "$host_cpu" = ia64; then
501972b676d7Smrg	# AIX 5 now supports IA64 processor
502072b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
502172b676d7Smrg      fi
502272b676d7Smrg      ;;
502372b676d7Smrg    amigaos*)
502472b676d7Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
502572b676d7Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
502672b676d7Smrg      # like `-m68040'.
502772b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
502872b676d7Smrg      ;;
50291fd23544Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
503072b676d7Smrg      # PIC is the default for these OSes.
503172b676d7Smrg      ;;
50321fd23544Smrg    mingw* | cygwin* | os2* | pw32*)
503372b676d7Smrg      # This hack is so that the source file can tell whether it is being
503472b676d7Smrg      # built for inclusion in a dll (and should export symbols for example).
50351fd23544Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
50361fd23544Smrg      # (--disable-auto-import) libraries
50371fd23544Smrg      m4_if([$1], [GCJ], [],
50381fd23544Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
503972b676d7Smrg      ;;
504072b676d7Smrg    darwin* | rhapsody*)
504172b676d7Smrg      # PIC is the default on this platform
504272b676d7Smrg      # Common symbols not allowed in MH_DYLIB files
504372b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
504472b676d7Smrg      ;;
504572b676d7Smrg    *djgpp*)
504672b676d7Smrg      # DJGPP does not support shared libraries at all
504772b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
504872b676d7Smrg      ;;
50491fd23544Smrg    interix[[3-9]]*)
505072b676d7Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
505172b676d7Smrg      # Instead, we relocate shared libraries at runtime.
505272b676d7Smrg      ;;
505372b676d7Smrg    sysv4*MP*)
505472b676d7Smrg      if test -d /usr/nec; then
505572b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
505672b676d7Smrg      fi
505772b676d7Smrg      ;;
505872b676d7Smrg    hpux*)
505972b676d7Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
506072b676d7Smrg      # not for PA HP-UX.
506172b676d7Smrg      case $host_cpu in
506272b676d7Smrg      hppa*64*|ia64*)
506372b676d7Smrg	;;
506472b676d7Smrg      *)
506572b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
506672b676d7Smrg	;;
506772b676d7Smrg      esac
506872b676d7Smrg      ;;
506972b676d7Smrg    *)
507072b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
507172b676d7Smrg      ;;
507272b676d7Smrg    esac
507372b676d7Smrg  else
507472b676d7Smrg    case $host_os in
50751fd23544Smrg      aix[[4-9]]*)
507672b676d7Smrg	# All AIX code is PIC.
507772b676d7Smrg	if test "$host_cpu" = ia64; then
507872b676d7Smrg	  # AIX 5 now supports IA64 processor
507972b676d7Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
508072b676d7Smrg	else
508172b676d7Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
508272b676d7Smrg	fi
508372b676d7Smrg	;;
508472b676d7Smrg      chorus*)
508572b676d7Smrg	case $cc_basename in
508672b676d7Smrg	cxch68*)
508772b676d7Smrg	  # Green Hills C++ Compiler
508872b676d7Smrg	  # _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"
508972b676d7Smrg	  ;;
509072b676d7Smrg	esac
509172b676d7Smrg	;;
509272b676d7Smrg       darwin*)
509372b676d7Smrg         # PIC is the default on this platform
509472b676d7Smrg         # Common symbols not allowed in MH_DYLIB files
509572b676d7Smrg         case $cc_basename in
509672b676d7Smrg           xlc*)
509772b676d7Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
509872b676d7Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
509972b676d7Smrg           ;;
510072b676d7Smrg         esac
510172b676d7Smrg       ;;
510272b676d7Smrg      dgux*)
510372b676d7Smrg	case $cc_basename in
510472b676d7Smrg	  ec++*)
510572b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
510672b676d7Smrg	    ;;
510772b676d7Smrg	  ghcx*)
510872b676d7Smrg	    # Green Hills C++ Compiler
510972b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
511072b676d7Smrg	    ;;
511172b676d7Smrg	  *)
511272b676d7Smrg	    ;;
511372b676d7Smrg	esac
511472b676d7Smrg	;;
511572b676d7Smrg      freebsd* | dragonfly*)
511672b676d7Smrg	# FreeBSD uses GNU C++
511772b676d7Smrg	;;
511872b676d7Smrg      hpux9* | hpux10* | hpux11*)
511972b676d7Smrg	case $cc_basename in
512072b676d7Smrg	  CC*)
512172b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
512272b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
512372b676d7Smrg	    if test "$host_cpu" != ia64; then
512472b676d7Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
512572b676d7Smrg	    fi
512672b676d7Smrg	    ;;
512772b676d7Smrg	  aCC*)
512872b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
512972b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
513072b676d7Smrg	    case $host_cpu in
513172b676d7Smrg	    hppa*64*|ia64*)
513272b676d7Smrg	      # +Z the default
513372b676d7Smrg	      ;;
513472b676d7Smrg	    *)
513572b676d7Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
513672b676d7Smrg	      ;;
513772b676d7Smrg	    esac
513872b676d7Smrg	    ;;
513972b676d7Smrg	  *)
514072b676d7Smrg	    ;;
514172b676d7Smrg	esac
514272b676d7Smrg	;;
514372b676d7Smrg      interix*)
514472b676d7Smrg	# This is c89, which is MS Visual C++ (no shared libs)
514572b676d7Smrg	# Anyone wants to do a port?
514672b676d7Smrg	;;
514772b676d7Smrg      irix5* | irix6* | nonstopux*)
514872b676d7Smrg	case $cc_basename in
514972b676d7Smrg	  CC*)
515072b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
515172b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
515272b676d7Smrg	    # CC pic flag -KPIC is the default.
515372b676d7Smrg	    ;;
515472b676d7Smrg	  *)
515572b676d7Smrg	    ;;
515672b676d7Smrg	esac
515772b676d7Smrg	;;
515872b676d7Smrg      linux* | k*bsd*-gnu)
515972b676d7Smrg	case $cc_basename in
516072b676d7Smrg	  KCC*)
516172b676d7Smrg	    # KAI C++ Compiler
516272b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
516372b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
516472b676d7Smrg	    ;;
516572b676d7Smrg	  icpc* | ecpc*)
516672b676d7Smrg	    # Intel C++
516772b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
516872b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
516972b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
517072b676d7Smrg	    ;;
51711fd23544Smrg	  pgCC* | pgcpp*)
517272b676d7Smrg	    # Portland Group C++ compiler.
517372b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
517472b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
517572b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
517672b676d7Smrg	    ;;
517772b676d7Smrg	  cxx*)
517872b676d7Smrg	    # Compaq C++
517972b676d7Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
518072b676d7Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
518172b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
518272b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
518372b676d7Smrg	    ;;
518472b676d7Smrg	  *)
51851fd23544Smrg	    case `$CC -V 2>&1 | sed 5q` in
51861fd23544Smrg	    *Sun\ C*)
51871fd23544Smrg	      # Sun C++ 5.9
51881fd23544Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51891fd23544Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51901fd23544Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
51911fd23544Smrg	      ;;
51921fd23544Smrg	    esac
519372b676d7Smrg	    ;;
519472b676d7Smrg	esac
519572b676d7Smrg	;;
519672b676d7Smrg      lynxos*)
519772b676d7Smrg	;;
519872b676d7Smrg      m88k*)
519972b676d7Smrg	;;
520072b676d7Smrg      mvs*)
520172b676d7Smrg	case $cc_basename in
520272b676d7Smrg	  cxx*)
520372b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
520472b676d7Smrg	    ;;
520572b676d7Smrg	  *)
520672b676d7Smrg	    ;;
520772b676d7Smrg	esac
520872b676d7Smrg	;;
52091fd23544Smrg      netbsd*)
521072b676d7Smrg	;;
521172b676d7Smrg      osf3* | osf4* | osf5*)
521272b676d7Smrg	case $cc_basename in
521372b676d7Smrg	  KCC*)
521472b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
521572b676d7Smrg	    ;;
521672b676d7Smrg	  RCC*)
521772b676d7Smrg	    # Rational C++ 2.4.1
521872b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
521972b676d7Smrg	    ;;
522072b676d7Smrg	  cxx*)
522172b676d7Smrg	    # Digital/Compaq C++
522272b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
522372b676d7Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
522472b676d7Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
522572b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
522672b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
522772b676d7Smrg	    ;;
522872b676d7Smrg	  *)
522972b676d7Smrg	    ;;
523072b676d7Smrg	esac
523172b676d7Smrg	;;
523272b676d7Smrg      psos*)
523372b676d7Smrg	;;
523472b676d7Smrg      solaris*)
523572b676d7Smrg	case $cc_basename in
523672b676d7Smrg	  CC*)
523772b676d7Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
523872b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
523972b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
524072b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
524172b676d7Smrg	    ;;
524272b676d7Smrg	  gcx*)
524372b676d7Smrg	    # Green Hills C++ Compiler
524472b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
524572b676d7Smrg	    ;;
524672b676d7Smrg	  *)
524772b676d7Smrg	    ;;
524872b676d7Smrg	esac
524972b676d7Smrg	;;
525072b676d7Smrg      sunos4*)
525172b676d7Smrg	case $cc_basename in
525272b676d7Smrg	  CC*)
525372b676d7Smrg	    # Sun C++ 4.x
525472b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
525572b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
525672b676d7Smrg	    ;;
525772b676d7Smrg	  lcc*)
525872b676d7Smrg	    # Lucid
525972b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
526072b676d7Smrg	    ;;
526172b676d7Smrg	  *)
526272b676d7Smrg	    ;;
526372b676d7Smrg	esac
526472b676d7Smrg	;;
526572b676d7Smrg      tandem*)
526672b676d7Smrg	case $cc_basename in
526772b676d7Smrg	  NCC*)
526872b676d7Smrg	    # NonStop-UX NCC 3.20
526972b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
527072b676d7Smrg	    ;;
527172b676d7Smrg	  *)
527272b676d7Smrg	    ;;
527372b676d7Smrg	esac
527472b676d7Smrg	;;
527572b676d7Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
527672b676d7Smrg	case $cc_basename in
527772b676d7Smrg	  CC*)
527872b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
527972b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
528072b676d7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
528172b676d7Smrg	    ;;
528272b676d7Smrg	esac
528372b676d7Smrg	;;
528472b676d7Smrg      vxworks*)
528572b676d7Smrg	;;
528672b676d7Smrg      *)
528772b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
528872b676d7Smrg	;;
528972b676d7Smrg    esac
529072b676d7Smrg  fi
529172b676d7Smrg],
529272b676d7Smrg[
529372b676d7Smrg  if test "$GCC" = yes; then
529472b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
529572b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
529672b676d7Smrg
529772b676d7Smrg    case $host_os in
529872b676d7Smrg      aix*)
529972b676d7Smrg      # All AIX code is PIC.
530072b676d7Smrg      if test "$host_cpu" = ia64; then
530172b676d7Smrg	# AIX 5 now supports IA64 processor
530272b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
530372b676d7Smrg      fi
530472b676d7Smrg      ;;
530572b676d7Smrg
530672b676d7Smrg    amigaos*)
530772b676d7Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
530872b676d7Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
530972b676d7Smrg      # like `-m68040'.
531072b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
531172b676d7Smrg      ;;
531272b676d7Smrg
53131fd23544Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
531472b676d7Smrg      # PIC is the default for these OSes.
531572b676d7Smrg      ;;
531672b676d7Smrg
53171fd23544Smrg    mingw* | cygwin* | pw32* | os2*)
531872b676d7Smrg      # This hack is so that the source file can tell whether it is being
531972b676d7Smrg      # built for inclusion in a dll (and should export symbols for example).
53201fd23544Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
53211fd23544Smrg      # (--disable-auto-import) libraries
53221fd23544Smrg      m4_if([$1], [GCJ], [],
53231fd23544Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
532472b676d7Smrg      ;;
532572b676d7Smrg
532672b676d7Smrg    darwin* | rhapsody*)
532772b676d7Smrg      # PIC is the default on this platform
532872b676d7Smrg      # Common symbols not allowed in MH_DYLIB files
532972b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
533072b676d7Smrg      ;;
533172b676d7Smrg
53321fd23544Smrg    interix[[3-9]]*)
533372b676d7Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
533472b676d7Smrg      # Instead, we relocate shared libraries at runtime.
533572b676d7Smrg      ;;
533672b676d7Smrg
533772b676d7Smrg    msdosdjgpp*)
533872b676d7Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
533972b676d7Smrg      # on systems that don't support them.
534072b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
534172b676d7Smrg      enable_shared=no
534272b676d7Smrg      ;;
534372b676d7Smrg
534472b676d7Smrg    sysv4*MP*)
534572b676d7Smrg      if test -d /usr/nec; then
534672b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
534772b676d7Smrg      fi
534872b676d7Smrg      ;;
534972b676d7Smrg
535072b676d7Smrg    hpux*)
535172b676d7Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
535272b676d7Smrg      # not for PA HP-UX.
535372b676d7Smrg      case $host_cpu in
535472b676d7Smrg      hppa*64*|ia64*)
535572b676d7Smrg	# +Z the default
535672b676d7Smrg	;;
535772b676d7Smrg      *)
535872b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
535972b676d7Smrg	;;
536072b676d7Smrg      esac
536172b676d7Smrg      ;;
536272b676d7Smrg
536372b676d7Smrg    *)
536472b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
536572b676d7Smrg      ;;
536672b676d7Smrg    esac
536772b676d7Smrg  else
536872b676d7Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
536972b676d7Smrg    case $host_os in
537072b676d7Smrg    aix*)
537172b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
537272b676d7Smrg      if test "$host_cpu" = ia64; then
537372b676d7Smrg	# AIX 5 now supports IA64 processor
537472b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
537572b676d7Smrg      else
537672b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
537772b676d7Smrg      fi
537872b676d7Smrg      ;;
537972b676d7Smrg      darwin*)
538072b676d7Smrg        # PIC is the default on this platform
538172b676d7Smrg        # Common symbols not allowed in MH_DYLIB files
538272b676d7Smrg       case $cc_basename in
538372b676d7Smrg         xlc*)
538472b676d7Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
538572b676d7Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
538672b676d7Smrg         ;;
538772b676d7Smrg       esac
538872b676d7Smrg       ;;
538972b676d7Smrg
53901fd23544Smrg    mingw* | cygwin* | pw32* | os2*)
539172b676d7Smrg      # This hack is so that the source file can tell whether it is being
539272b676d7Smrg      # built for inclusion in a dll (and should export symbols for example).
53931fd23544Smrg      m4_if([$1], [GCJ], [],
53941fd23544Smrg	[_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
539572b676d7Smrg      ;;
539672b676d7Smrg
539772b676d7Smrg    hpux9* | hpux10* | hpux11*)
539872b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
539972b676d7Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
540072b676d7Smrg      # not for PA HP-UX.
540172b676d7Smrg      case $host_cpu in
540272b676d7Smrg      hppa*64*|ia64*)
540372b676d7Smrg	# +Z the default
540472b676d7Smrg	;;
540572b676d7Smrg      *)
540672b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
540772b676d7Smrg	;;
540872b676d7Smrg      esac
540972b676d7Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
541072b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
541172b676d7Smrg      ;;
541272b676d7Smrg
541372b676d7Smrg    irix5* | irix6* | nonstopux*)
541472b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
541572b676d7Smrg      # PIC (with -KPIC) is the default.
541672b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
541772b676d7Smrg      ;;
541872b676d7Smrg
541972b676d7Smrg    newsos6)
542072b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
542172b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
542272b676d7Smrg      ;;
542372b676d7Smrg
542472b676d7Smrg    linux* | k*bsd*-gnu)
542572b676d7Smrg      case $cc_basename in
542672b676d7Smrg      icc* | ecc*)
542772b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
542872b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
542972b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
543072b676d7Smrg        ;;
543172b676d7Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
543272b676d7Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
543372b676d7Smrg	# which looks to be a dead project)
543472b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
543572b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
543672b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
543772b676d7Smrg        ;;
543872b676d7Smrg      ccc*)
543972b676d7Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
544072b676d7Smrg        # All Alpha code is PIC.
544172b676d7Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
544272b676d7Smrg        ;;
54431fd23544Smrg      *)
54441fd23544Smrg        case `$CC -V 2>&1 | sed 5q` in
54451fd23544Smrg	*Sun\ C*)
54461fd23544Smrg	  # Sun C 5.9
54471fd23544Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54481fd23544Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54491fd23544Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
54501fd23544Smrg	  ;;
54511fd23544Smrg	*Sun\ F*)
54521fd23544Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
54531fd23544Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
54541fd23544Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
54551fd23544Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
54561fd23544Smrg	  ;;
54571fd23544Smrg	esac
54581fd23544Smrg	;;
545972b676d7Smrg      esac
546072b676d7Smrg      ;;
546172b676d7Smrg
546272b676d7Smrg    osf3* | osf4* | osf5*)
546372b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
546472b676d7Smrg      # All OSF/1 code is PIC.
546572b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
546672b676d7Smrg      ;;
546772b676d7Smrg
54681fd23544Smrg    rdos*)
54691fd23544Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54701fd23544Smrg      ;;
54711fd23544Smrg
547272b676d7Smrg    solaris*)
547372b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
547472b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
547572b676d7Smrg      case $cc_basename in
547672b676d7Smrg      f77* | f90* | f95*)
547772b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
547872b676d7Smrg      *)
547972b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
548072b676d7Smrg      esac
548172b676d7Smrg      ;;
548272b676d7Smrg
548372b676d7Smrg    sunos4*)
548472b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
548572b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
548672b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
548772b676d7Smrg      ;;
548872b676d7Smrg
548972b676d7Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
549072b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
549172b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
549272b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
549372b676d7Smrg      ;;
549472b676d7Smrg
549572b676d7Smrg    sysv4*MP*)
549672b676d7Smrg      if test -d /usr/nec ;then
549772b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
549872b676d7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
549972b676d7Smrg      fi
550072b676d7Smrg      ;;
550172b676d7Smrg
550272b676d7Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
550372b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
550472b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
550572b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
550672b676d7Smrg      ;;
550772b676d7Smrg
550872b676d7Smrg    unicos*)
550972b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
551072b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
551172b676d7Smrg      ;;
551272b676d7Smrg
551372b676d7Smrg    uts4*)
551472b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
551572b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
551672b676d7Smrg      ;;
551772b676d7Smrg
551872b676d7Smrg    *)
551972b676d7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
552072b676d7Smrg      ;;
552172b676d7Smrg    esac
552272b676d7Smrg  fi
552372b676d7Smrg])
552472b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
552572b676d7Smrg
552672b676d7Smrg#
552772b676d7Smrg# Check to make sure the PIC flag actually works.
552872b676d7Smrg#
552972b676d7Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
553072b676d7Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
55311fd23544Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
553272b676d7Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
553372b676d7Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
553472b676d7Smrg     "" | " "*) ;;
553572b676d7Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
553672b676d7Smrg     esac],
553772b676d7Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
553872b676d7Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
553972b676d7Smrgfi
554072b676d7Smrgcase $host_os in
554172b676d7Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
554272b676d7Smrg  *djgpp*)
554372b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
554472b676d7Smrg    ;;
554572b676d7Smrg  *)
554672b676d7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
554772b676d7Smrg    ;;
554872b676d7Smrgesac
554972b676d7Smrg
555072b676d7Smrg#
555172b676d7Smrg# Check to make sure the static flag actually works.
555272b676d7Smrg#
555372b676d7Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
555472b676d7SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
55551fd23544Smrg  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
555672b676d7Smrg  $lt_tmp_static_flag,
555772b676d7Smrg  [],
555872b676d7Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
555972b676d7Smrg])
556072b676d7Smrg
556172b676d7Smrg
556272b676d7Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
556372b676d7Smrg# ------------------------------------
556472b676d7Smrg# See if the linker supports building shared libraries.
556572b676d7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
55661fd23544Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
55671fd23544SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
556872b676d7Smrgifelse([$1],[CXX],[
556972b676d7Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
557072b676d7Smrg  case $host_os in
55711fd23544Smrg  aix[[4-9]]*)
557272b676d7Smrg    # If we're using GNU nm, then we don't want the "-C" option.
557372b676d7Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
557472b676d7Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
557572b676d7Smrg      _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'
557672b676d7Smrg    else
557772b676d7Smrg      _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'
557872b676d7Smrg    fi
557972b676d7Smrg    ;;
558072b676d7Smrg  pw32*)
558172b676d7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
558272b676d7Smrg  ;;
558372b676d7Smrg  cygwin* | mingw*)
55841fd23544Smrg    _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'
558572b676d7Smrg  ;;
558672b676d7Smrg  *)
558772b676d7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
558872b676d7Smrg  ;;
558972b676d7Smrg  esac
55901fd23544Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
559172b676d7Smrg],[
559272b676d7Smrg  runpath_var=
559372b676d7Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
559472b676d7Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
559572b676d7Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
559672b676d7Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
559772b676d7Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
559872b676d7Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
559972b676d7Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
560072b676d7Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
560172b676d7Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
560272b676d7Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
560372b676d7Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
560472b676d7Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
560572b676d7Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
560672b676d7Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
560772b676d7Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
560872b676d7Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
560972b676d7Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
561072b676d7Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
561172b676d7Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
561272b676d7Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
561372b676d7Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
561472b676d7Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
561572b676d7Smrg  # included in the symbol list
561672b676d7Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
561772b676d7Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
561872b676d7Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
561972b676d7Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
562072b676d7Smrg  # as well as any symbol that contains `d'.
56211fd23544Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
562272b676d7Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
562372b676d7Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
562472b676d7Smrg  # the symbol is explicitly referenced.  Since portable code cannot
562572b676d7Smrg  # rely on this symbol name, it's probably fine to never include it in
562672b676d7Smrg  # preloaded symbol tables.
56271fd23544Smrg  # Exclude shared library initialization/finalization symbols.
56281fd23544Smrgdnl Note also adjust exclude_expsyms for C++ above.
562972b676d7Smrg  extract_expsyms_cmds=
563072b676d7Smrg  # Just being paranoid about ensuring that cc_basename is set.
563172b676d7Smrg  _LT_CC_BASENAME([$compiler])
563272b676d7Smrg  case $host_os in
563372b676d7Smrg  cygwin* | mingw* | pw32*)
563472b676d7Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
563572b676d7Smrg    # When not using gcc, we currently assume that we are using
563672b676d7Smrg    # Microsoft Visual C++.
563772b676d7Smrg    if test "$GCC" != yes; then
563872b676d7Smrg      with_gnu_ld=no
563972b676d7Smrg    fi
564072b676d7Smrg    ;;
564172b676d7Smrg  interix*)
564272b676d7Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
564372b676d7Smrg    with_gnu_ld=yes
564472b676d7Smrg    ;;
564572b676d7Smrg  openbsd*)
564672b676d7Smrg    with_gnu_ld=no
564772b676d7Smrg    ;;
564872b676d7Smrg  esac
564972b676d7Smrg
565072b676d7Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
565172b676d7Smrg  if test "$with_gnu_ld" = yes; then
565272b676d7Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
565372b676d7Smrg    wlarc='${wl}'
565472b676d7Smrg
565572b676d7Smrg    # Set some defaults for GNU ld with shared library support. These
565672b676d7Smrg    # are reset later if shared libraries are not supported. Putting them
565772b676d7Smrg    # here allows them to be overridden if necessary.
565872b676d7Smrg    runpath_var=LD_RUN_PATH
565972b676d7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
566072b676d7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
566172b676d7Smrg    # ancient GNU ld didn't support --whole-archive et. al.
566272b676d7Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
566372b676d7Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
566472b676d7Smrg      else
566572b676d7Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
566672b676d7Smrg    fi
566772b676d7Smrg    supports_anon_versioning=no
566872b676d7Smrg    case `$LD -v 2>/dev/null` in
566972b676d7Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
567072b676d7Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
567172b676d7Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
567272b676d7Smrg      *\ 2.11.*) ;; # other 2.11 versions
567372b676d7Smrg      *) supports_anon_versioning=yes ;;
567472b676d7Smrg    esac
567572b676d7Smrg
567672b676d7Smrg    # See if GNU ld supports shared libraries.
567772b676d7Smrg    case $host_os in
56781fd23544Smrg    aix[[3-9]]*)
567972b676d7Smrg      # On AIX/PPC, the GNU linker is very broken
568072b676d7Smrg      if test "$host_cpu" != ia64; then
568172b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
568272b676d7Smrg	cat <<EOF 1>&2
568372b676d7Smrg
568472b676d7Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
568572b676d7Smrg*** to be unable to reliably create shared libraries on AIX.
568672b676d7Smrg*** Therefore, libtool is disabling shared libraries support.  If you
568772b676d7Smrg*** really care for shared libraries, you may want to modify your PATH
568872b676d7Smrg*** so that a non-GNU linker is found, and then restart.
568972b676d7Smrg
569072b676d7SmrgEOF
569172b676d7Smrg      fi
569272b676d7Smrg      ;;
569372b676d7Smrg
569472b676d7Smrg    amigaos*)
569572b676d7Smrg      _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)'
569672b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
569772b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
569872b676d7Smrg
569972b676d7Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
570072b676d7Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
570172b676d7Smrg      # to version 4, is to share data among multiple programs linked
570272b676d7Smrg      # with the same dynamic library.  Since this doesn't match the
570372b676d7Smrg      # behavior of shared libraries on other platforms, we can't use
570472b676d7Smrg      # them.
570572b676d7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
570672b676d7Smrg      ;;
570772b676d7Smrg
570872b676d7Smrg    beos*)
570972b676d7Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
571072b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
571172b676d7Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
571272b676d7Smrg	# support --undefined.  This deserves some investigation.  FIXME
571372b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
571472b676d7Smrg      else
571572b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
571672b676d7Smrg      fi
571772b676d7Smrg      ;;
571872b676d7Smrg
571972b676d7Smrg    cygwin* | mingw* | pw32*)
572072b676d7Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
572172b676d7Smrg      # as there is no search path for DLLs.
572272b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
572372b676d7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
572472b676d7Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
572572b676d7Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
57261fd23544Smrg      _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'
572772b676d7Smrg
572872b676d7Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
572972b676d7Smrg        _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'
573072b676d7Smrg	# If the export-symbols file already is a .def file (1st line
573172b676d7Smrg	# is EXPORTS), use it as is; otherwise, prepend...
573272b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
573372b676d7Smrg	  cp $export_symbols $output_objdir/$soname.def;
573472b676d7Smrg	else
573572b676d7Smrg	  echo EXPORTS > $output_objdir/$soname.def;
573672b676d7Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
573772b676d7Smrg	fi~
573872b676d7Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
573972b676d7Smrg      else
574072b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
574172b676d7Smrg      fi
574272b676d7Smrg      ;;
574372b676d7Smrg
57441fd23544Smrg    interix[[3-9]]*)
574572b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
574672b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
574772b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
574872b676d7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
574972b676d7Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
575072b676d7Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
575172b676d7Smrg      # default) and relocated if they conflict, which is a slow very memory
575272b676d7Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
575372b676d7Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
575472b676d7Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
575572b676d7Smrg      _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'
575672b676d7Smrg      _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'
575772b676d7Smrg      ;;
575872b676d7Smrg
57591fd23544Smrg    gnu* | linux* | k*bsd*-gnu)
576072b676d7Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
576172b676d7Smrg	tmp_addflag=
576272b676d7Smrg	case $cc_basename,$host_cpu in
576372b676d7Smrg	pgcc*)				# Portland Group C compiler
576472b676d7Smrg	  _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'
576572b676d7Smrg	  tmp_addflag=' $pic_flag'
576672b676d7Smrg	  ;;
576772b676d7Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
576872b676d7Smrg	  _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'
576972b676d7Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
577072b676d7Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
577172b676d7Smrg	  tmp_addflag=' -i_dynamic' ;;
577272b676d7Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
577372b676d7Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
577472b676d7Smrg	ifc* | ifort*)			# Intel Fortran compiler
577572b676d7Smrg	  tmp_addflag=' -nofor_main' ;;
577672b676d7Smrg	esac
57771fd23544Smrg	case `$CC -V 2>&1 | sed 5q` in
57781fd23544Smrg	*Sun\ C*)			# Sun C 5.9
57791fd23544Smrg	  _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'
57801fd23544Smrg	  tmp_sharedflag='-G' ;;
57811fd23544Smrg	*Sun\ F*)			# Sun Fortran 8.3
57821fd23544Smrg	  tmp_sharedflag='-G' ;;
57831fd23544Smrg	*)
57841fd23544Smrg	  tmp_sharedflag='-shared' ;;
57851fd23544Smrg	esac
57861fd23544Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
578772b676d7Smrg
578872b676d7Smrg	if test $supports_anon_versioning = yes; then
578972b676d7Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
579072b676d7Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
579172b676d7Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
57921fd23544Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
579372b676d7Smrg	fi
579472b676d7Smrg      else
579572b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
579672b676d7Smrg      fi
579772b676d7Smrg      ;;
579872b676d7Smrg
57991fd23544Smrg    netbsd*)
580072b676d7Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
580172b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
580272b676d7Smrg	wlarc=
580372b676d7Smrg      else
580472b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
580572b676d7Smrg	_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'
580672b676d7Smrg      fi
580772b676d7Smrg      ;;
580872b676d7Smrg
580972b676d7Smrg    solaris*)
581072b676d7Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
581172b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
581272b676d7Smrg	cat <<EOF 1>&2
581372b676d7Smrg
581472b676d7Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
581572b676d7Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
581672b676d7Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
581772b676d7Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
581872b676d7Smrg*** your PATH or compiler configuration so that the native linker is
581972b676d7Smrg*** used, and then restart.
582072b676d7Smrg
582172b676d7SmrgEOF
582272b676d7Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
582372b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
582472b676d7Smrg	_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'
582572b676d7Smrg      else
582672b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
582772b676d7Smrg      fi
582872b676d7Smrg      ;;
582972b676d7Smrg
583072b676d7Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
583172b676d7Smrg      case `$LD -v 2>&1` in
58321fd23544Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
583372b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
583472b676d7Smrg	cat <<_LT_EOF 1>&2
583572b676d7Smrg
583672b676d7Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
583772b676d7Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
583872b676d7Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
583972b676d7Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
584072b676d7Smrg*** your PATH or compiler configuration so that the native linker is
584172b676d7Smrg*** used, and then restart.
584272b676d7Smrg
584372b676d7Smrg_LT_EOF
584472b676d7Smrg	;;
584572b676d7Smrg	*)
584672b676d7Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
584772b676d7Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
584872b676d7Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
584972b676d7Smrg	    _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'
585072b676d7Smrg	  else
585172b676d7Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
585272b676d7Smrg	  fi
585372b676d7Smrg	;;
585472b676d7Smrg      esac
585572b676d7Smrg      ;;
585672b676d7Smrg
585772b676d7Smrg    sunos4*)
585872b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
585972b676d7Smrg      wlarc=
586072b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
586172b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
586272b676d7Smrg      ;;
586372b676d7Smrg
586472b676d7Smrg    *)
586572b676d7Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
586672b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
586772b676d7Smrg	_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'
586872b676d7Smrg      else
586972b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
587072b676d7Smrg      fi
587172b676d7Smrg      ;;
587272b676d7Smrg    esac
587372b676d7Smrg
587472b676d7Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
587572b676d7Smrg      runpath_var=
587672b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
587772b676d7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
587872b676d7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
587972b676d7Smrg    fi
588072b676d7Smrg  else
588172b676d7Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
588272b676d7Smrg    case $host_os in
588372b676d7Smrg    aix3*)
588472b676d7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
588572b676d7Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
588672b676d7Smrg      _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'
588772b676d7Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
588872b676d7Smrg      # are no directories specified by -L.
588972b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
589072b676d7Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
589172b676d7Smrg	# Neither direct hardcoding nor static linking is supported with a
589272b676d7Smrg	# broken collect2.
589372b676d7Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
589472b676d7Smrg      fi
589572b676d7Smrg      ;;
589672b676d7Smrg
58971fd23544Smrg    aix[[4-9]]*)
589872b676d7Smrg      if test "$host_cpu" = ia64; then
589972b676d7Smrg	# On IA64, the linker does run time linking by default, so we don't
590072b676d7Smrg	# have to do anything special.
590172b676d7Smrg	aix_use_runtimelinking=no
590272b676d7Smrg	exp_sym_flag='-Bexport'
590372b676d7Smrg	no_entry_flag=""
590472b676d7Smrg      else
590572b676d7Smrg	# If we're using GNU nm, then we don't want the "-C" option.
590672b676d7Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
590772b676d7Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
590872b676d7Smrg	  _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'
590972b676d7Smrg	else
591072b676d7Smrg	  _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'
591172b676d7Smrg	fi
591272b676d7Smrg	aix_use_runtimelinking=no
591372b676d7Smrg
591472b676d7Smrg	# Test if we are trying to use run time linking or normal
591572b676d7Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
591672b676d7Smrg	# need to do runtime linking.
59171fd23544Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
591872b676d7Smrg	  for ld_flag in $LDFLAGS; do
591972b676d7Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
592072b676d7Smrg  	    aix_use_runtimelinking=yes
592172b676d7Smrg  	    break
592272b676d7Smrg  	  fi
592372b676d7Smrg	  done
592472b676d7Smrg	  ;;
592572b676d7Smrg	esac
592672b676d7Smrg
592772b676d7Smrg	exp_sym_flag='-bexport'
592872b676d7Smrg	no_entry_flag='-bnoentry'
592972b676d7Smrg      fi
593072b676d7Smrg
593172b676d7Smrg      # When large executables or shared objects are built, AIX ld can
593272b676d7Smrg      # have problems creating the table of contents.  If linking a library
593372b676d7Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
593472b676d7Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
593572b676d7Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
593672b676d7Smrg
593772b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
593872b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
593972b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
594072b676d7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
594172b676d7Smrg
594272b676d7Smrg      if test "$GCC" = yes; then
594372b676d7Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
594472b676d7Smrg	# We only want to do this on AIX 4.2 and lower, the check
594572b676d7Smrg	# below for broken collect2 doesn't work under 4.3+
594672b676d7Smrg	  collect2name=`${CC} -print-prog-name=collect2`
594772b676d7Smrg	  if test -f "$collect2name" && \
594872b676d7Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
594972b676d7Smrg	  then
595072b676d7Smrg  	  # We have reworked collect2
59511fd23544Smrg  	  :
595272b676d7Smrg	  else
595372b676d7Smrg  	  # We have old collect2
595472b676d7Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
595572b676d7Smrg  	  # It fails to find uninstalled libraries when the uninstalled
595672b676d7Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
595772b676d7Smrg  	  # to unsupported forces relinking
595872b676d7Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
595972b676d7Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
596072b676d7Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
596172b676d7Smrg	  fi
596272b676d7Smrg	  ;;
596372b676d7Smrg	esac
596472b676d7Smrg	shared_flag='-shared'
596572b676d7Smrg	if test "$aix_use_runtimelinking" = yes; then
596672b676d7Smrg	  shared_flag="$shared_flag "'${wl}-G'
596772b676d7Smrg	fi
596872b676d7Smrg      else
596972b676d7Smrg	# not using gcc
597072b676d7Smrg	if test "$host_cpu" = ia64; then
597172b676d7Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
597272b676d7Smrg  	# chokes on -Wl,-G. The following line is correct:
597372b676d7Smrg	  shared_flag='-G'
597472b676d7Smrg	else
597572b676d7Smrg	  if test "$aix_use_runtimelinking" = yes; then
597672b676d7Smrg	    shared_flag='${wl}-G'
597772b676d7Smrg	  else
597872b676d7Smrg	    shared_flag='${wl}-bM:SRE'
597972b676d7Smrg	  fi
598072b676d7Smrg	fi
598172b676d7Smrg      fi
598272b676d7Smrg
598372b676d7Smrg      # It seems that -bexpall does not export symbols beginning with
598472b676d7Smrg      # underscore (_), so it is better to generate a list of symbols to export.
598572b676d7Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
598672b676d7Smrg      if test "$aix_use_runtimelinking" = yes; then
598772b676d7Smrg	# Warning - without using the other runtime loading flags (-brtl),
598872b676d7Smrg	# -berok will link without error, but may produce a broken library.
598972b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
599072b676d7Smrg       # Determine the default libpath from the value encoded in an empty executable.
599172b676d7Smrg       _LT_AC_SYS_LIBPATH_AIX
599272b676d7Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
599372b676d7Smrg	_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"
599472b676d7Smrg       else
599572b676d7Smrg	if test "$host_cpu" = ia64; then
599672b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
599772b676d7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
599872b676d7Smrg	  _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"
599972b676d7Smrg	else
600072b676d7Smrg	 # Determine the default libpath from the value encoded in an empty executable.
600172b676d7Smrg	 _LT_AC_SYS_LIBPATH_AIX
600272b676d7Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
600372b676d7Smrg	  # Warning - without using the other run time loading flags,
600472b676d7Smrg	  # -berok will link without error, but may produce a broken library.
600572b676d7Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
600672b676d7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
600772b676d7Smrg	  # Exported symbols can be pulled into shared objects from archives
600872b676d7Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
600972b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
601072b676d7Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
601172b676d7Smrg	  _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'
601272b676d7Smrg	fi
601372b676d7Smrg      fi
601472b676d7Smrg      ;;
601572b676d7Smrg
601672b676d7Smrg    amigaos*)
601772b676d7Smrg      _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)'
601872b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
601972b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
602072b676d7Smrg      # see comment about different semantics on the GNU ld section
602172b676d7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
602272b676d7Smrg      ;;
602372b676d7Smrg
602472b676d7Smrg    bsdi[[45]]*)
602572b676d7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
602672b676d7Smrg      ;;
602772b676d7Smrg
602872b676d7Smrg    cygwin* | mingw* | pw32*)
602972b676d7Smrg      # When not using gcc, we currently assume that we are using
603072b676d7Smrg      # Microsoft Visual C++.
603172b676d7Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
603272b676d7Smrg      # no search path for DLLs.
603372b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
603472b676d7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
603572b676d7Smrg      # Tell ltmain to make .lib files, not .a files.
603672b676d7Smrg      libext=lib
603772b676d7Smrg      # Tell ltmain to make .dll files, not .so files.
603872b676d7Smrg      shrext_cmds=".dll"
603972b676d7Smrg      # FIXME: Setting linknames here is a bad hack.
604072b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
604172b676d7Smrg      # The linker will automatically build a .lib file if we build a DLL.
604272b676d7Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
604372b676d7Smrg      # FIXME: Should let the user specify the lib program.
60441fd23544Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
604572b676d7Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
604672b676d7Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
604772b676d7Smrg      ;;
604872b676d7Smrg
604972b676d7Smrg    darwin* | rhapsody*)
605072b676d7Smrg      case $host_os in
605172b676d7Smrg        rhapsody* | darwin1.[[012]])
605272b676d7Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
605372b676d7Smrg         ;;
605472b676d7Smrg       *) # Darwin 1.3 on
605572b676d7Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
605672b676d7Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
605772b676d7Smrg         else
605872b676d7Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
605972b676d7Smrg             10.[[012]])
606072b676d7Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
606172b676d7Smrg               ;;
606272b676d7Smrg             10.*)
606372b676d7Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
606472b676d7Smrg               ;;
606572b676d7Smrg           esac
606672b676d7Smrg         fi
606772b676d7Smrg         ;;
606872b676d7Smrg      esac
606972b676d7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
607072b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
607172b676d7Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
607272b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
607372b676d7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
607472b676d7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
607572b676d7Smrg    if test "$GCC" = yes ; then
607672b676d7Smrg    	output_verbose_link_cmd='echo'
60771fd23544Smrg        _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}"
60781fd23544Smrg        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
60791fd23544Smrg        _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}"
60801fd23544Smrg        _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}"
608172b676d7Smrg    else
608272b676d7Smrg      case $cc_basename in
608372b676d7Smrg        xlc*)
608472b676d7Smrg         output_verbose_link_cmd='echo'
60851fd23544Smrg         _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'
608672b676d7Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
608772b676d7Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
60881fd23544Smrg         _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}'
608972b676d7Smrg          _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}'
609072b676d7Smrg          ;;
609172b676d7Smrg       *)
609272b676d7Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
609372b676d7Smrg          ;;
609472b676d7Smrg      esac
609572b676d7Smrg    fi
609672b676d7Smrg      ;;
609772b676d7Smrg
609872b676d7Smrg    dgux*)
609972b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
610072b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
610172b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
610272b676d7Smrg      ;;
610372b676d7Smrg
610472b676d7Smrg    freebsd1*)
610572b676d7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
610672b676d7Smrg      ;;
610772b676d7Smrg
610872b676d7Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
610972b676d7Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
611072b676d7Smrg    # does not break anything, and helps significantly (at the cost of a little
611172b676d7Smrg    # extra space).
611272b676d7Smrg    freebsd2.2*)
611372b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
611472b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
611572b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
611672b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
611772b676d7Smrg      ;;
611872b676d7Smrg
611972b676d7Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
612072b676d7Smrg    freebsd2*)
612172b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
612272b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
612372b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
612472b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
612572b676d7Smrg      ;;
612672b676d7Smrg
612772b676d7Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
612872b676d7Smrg    freebsd* | dragonfly*)
612972b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
613072b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
613172b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
613272b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
613372b676d7Smrg      ;;
613472b676d7Smrg
613572b676d7Smrg    hpux9*)
613672b676d7Smrg      if test "$GCC" = yes; then
613772b676d7Smrg	_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'
613872b676d7Smrg      else
613972b676d7Smrg	_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'
614072b676d7Smrg      fi
614172b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
614272b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
614372b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
614472b676d7Smrg
614572b676d7Smrg      # hardcode_minus_L: Not really in the search PATH,
614672b676d7Smrg      # but as the default location of the library.
614772b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
614872b676d7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
614972b676d7Smrg      ;;
615072b676d7Smrg
615172b676d7Smrg    hpux10*)
615272b676d7Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
615372b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
615472b676d7Smrg      else
615572b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
615672b676d7Smrg      fi
615772b676d7Smrg      if test "$with_gnu_ld" = no; then
615872b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
615972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
616072b676d7Smrg
616172b676d7Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
616272b676d7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
616372b676d7Smrg
616472b676d7Smrg	# hardcode_minus_L: Not really in the search PATH,
616572b676d7Smrg	# but as the default location of the library.
616672b676d7Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
616772b676d7Smrg      fi
616872b676d7Smrg      ;;
616972b676d7Smrg
617072b676d7Smrg    hpux11*)
617172b676d7Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
617272b676d7Smrg	case $host_cpu in
617372b676d7Smrg	hppa*64*)
617472b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
617572b676d7Smrg	  ;;
617672b676d7Smrg	ia64*)
617772b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
617872b676d7Smrg	  ;;
617972b676d7Smrg	*)
618072b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
618172b676d7Smrg	  ;;
618272b676d7Smrg	esac
618372b676d7Smrg      else
618472b676d7Smrg	case $host_cpu in
618572b676d7Smrg	hppa*64*)
618672b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
618772b676d7Smrg	  ;;
618872b676d7Smrg	ia64*)
618972b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
619072b676d7Smrg	  ;;
619172b676d7Smrg	*)
619272b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
619372b676d7Smrg	  ;;
619472b676d7Smrg	esac
619572b676d7Smrg      fi
619672b676d7Smrg      if test "$with_gnu_ld" = no; then
619772b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
619872b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
619972b676d7Smrg
620072b676d7Smrg	case $host_cpu in
620172b676d7Smrg	hppa*64*|ia64*)
620272b676d7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
620372b676d7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
620472b676d7Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
620572b676d7Smrg	  ;;
620672b676d7Smrg	*)
620772b676d7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
620872b676d7Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
620972b676d7Smrg
621072b676d7Smrg	  # hardcode_minus_L: Not really in the search PATH,
621172b676d7Smrg	  # but as the default location of the library.
621272b676d7Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
621372b676d7Smrg	  ;;
621472b676d7Smrg	esac
621572b676d7Smrg      fi
621672b676d7Smrg      ;;
621772b676d7Smrg
621872b676d7Smrg    irix5* | irix6* | nonstopux*)
621972b676d7Smrg      if test "$GCC" = yes; then
622072b676d7Smrg	_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'
622172b676d7Smrg      else
622272b676d7Smrg	_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'
622372b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
622472b676d7Smrg      fi
622572b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
622672b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
622772b676d7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
622872b676d7Smrg      ;;
622972b676d7Smrg
62301fd23544Smrg    netbsd*)
623172b676d7Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
623272b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
623372b676d7Smrg      else
623472b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
623572b676d7Smrg      fi
623672b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
623772b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
623872b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
623972b676d7Smrg      ;;
624072b676d7Smrg
624172b676d7Smrg    newsos6)
624272b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
624372b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
624472b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
624572b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
624672b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
624772b676d7Smrg      ;;
624872b676d7Smrg
624972b676d7Smrg    openbsd*)
62501fd23544Smrg      if test -f /usr/libexec/ld.so; then
62511fd23544Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
62521fd23544Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
62531fd23544Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
62541fd23544Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
62551fd23544Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
62561fd23544Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
62571fd23544Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
62581fd23544Smrg	else
62591fd23544Smrg	  case $host_os in
62601fd23544Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
62611fd23544Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
62621fd23544Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
62631fd23544Smrg	     ;;
62641fd23544Smrg	   *)
62651fd23544Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
62661fd23544Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
62671fd23544Smrg	     ;;
62681fd23544Smrg	  esac
62691fd23544Smrg        fi
627072b676d7Smrg      else
62711fd23544Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
627272b676d7Smrg      fi
627372b676d7Smrg      ;;
627472b676d7Smrg
627572b676d7Smrg    os2*)
627672b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
627772b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
627872b676d7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
627972b676d7Smrg      _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'
628072b676d7Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
628172b676d7Smrg      ;;
628272b676d7Smrg
628372b676d7Smrg    osf3*)
628472b676d7Smrg      if test "$GCC" = yes; then
628572b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
628672b676d7Smrg	_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'
628772b676d7Smrg      else
628872b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
628972b676d7Smrg	_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'
629072b676d7Smrg      fi
629172b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
629272b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
629372b676d7Smrg      ;;
629472b676d7Smrg
629572b676d7Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
629672b676d7Smrg      if test "$GCC" = yes; then
629772b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
629872b676d7Smrg	_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'
629972b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
630072b676d7Smrg      else
630172b676d7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
630272b676d7Smrg	_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'
630372b676d7Smrg	_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~
630472b676d7Smrg	$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'
630572b676d7Smrg
630672b676d7Smrg	# Both c and cxx compiler support -rpath directly
630772b676d7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
630872b676d7Smrg      fi
630972b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
631072b676d7Smrg      ;;
631172b676d7Smrg
631272b676d7Smrg    solaris*)
631372b676d7Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
631472b676d7Smrg      if test "$GCC" = yes; then
631572b676d7Smrg	wlarc='${wl}'
631672b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
631772b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
631872b676d7Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
631972b676d7Smrg      else
632072b676d7Smrg	wlarc=''
632172b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
632272b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
632372b676d7Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
632472b676d7Smrg      fi
632572b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
632672b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
632772b676d7Smrg      case $host_os in
632872b676d7Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
632972b676d7Smrg      *)
63301fd23544Smrg	# The compiler driver will combine and reorder linker options,
63311fd23544Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
63321fd23544Smrg	# but is careful enough not to reorder.
633372b676d7Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
63341fd23544Smrg	if test "$GCC" = yes; then
63351fd23544Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
63361fd23544Smrg	else
63371fd23544Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
63381fd23544Smrg	fi
63391fd23544Smrg	;;
634072b676d7Smrg      esac
634172b676d7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
634272b676d7Smrg      ;;
634372b676d7Smrg
634472b676d7Smrg    sunos4*)
634572b676d7Smrg      if test "x$host_vendor" = xsequent; then
634672b676d7Smrg	# Use $CC to link under sequent, because it throws in some extra .o
634772b676d7Smrg	# files that make .init and .fini sections work.
634872b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
634972b676d7Smrg      else
635072b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
635172b676d7Smrg      fi
635272b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
635372b676d7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
635472b676d7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
635572b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
635672b676d7Smrg      ;;
635772b676d7Smrg
635872b676d7Smrg    sysv4)
635972b676d7Smrg      case $host_vendor in
636072b676d7Smrg	sni)
636172b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
636272b676d7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
636372b676d7Smrg	;;
636472b676d7Smrg	siemens)
636572b676d7Smrg	  ## LD is ld it makes a PLAMLIB
636672b676d7Smrg	  ## CC just makes a GrossModule.
636772b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
636872b676d7Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
636972b676d7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
637072b676d7Smrg        ;;
637172b676d7Smrg	motorola)
637272b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
637372b676d7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
637472b676d7Smrg	;;
637572b676d7Smrg      esac
637672b676d7Smrg      runpath_var='LD_RUN_PATH'
637772b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
637872b676d7Smrg      ;;
637972b676d7Smrg
638072b676d7Smrg    sysv4.3*)
638172b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
638272b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
638372b676d7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
638472b676d7Smrg      ;;
638572b676d7Smrg
638672b676d7Smrg    sysv4*MP*)
638772b676d7Smrg      if test -d /usr/nec; then
638872b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
638972b676d7Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
639072b676d7Smrg	runpath_var=LD_RUN_PATH
639172b676d7Smrg	hardcode_runpath_var=yes
639272b676d7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
639372b676d7Smrg      fi
639472b676d7Smrg      ;;
639572b676d7Smrg
63961fd23544Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
639772b676d7Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
639872b676d7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
639972b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
640072b676d7Smrg      runpath_var='LD_RUN_PATH'
640172b676d7Smrg
640272b676d7Smrg      if test "$GCC" = yes; then
640372b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640472b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640572b676d7Smrg      else
640672b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640772b676d7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
640872b676d7Smrg      fi
640972b676d7Smrg      ;;
641072b676d7Smrg
641172b676d7Smrg    sysv5* | sco3.2v5* | sco5v6*)
641272b676d7Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
641372b676d7Smrg      # link with -lc, and that would cause any symbols used from libc to
641472b676d7Smrg      # always be unresolved, which means just about no library would
641572b676d7Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
641672b676d7Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
641772b676d7Smrg      # as -z defs.
641872b676d7Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
641972b676d7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
642072b676d7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
642172b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
642272b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
642372b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
642472b676d7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
642572b676d7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
642672b676d7Smrg      runpath_var='LD_RUN_PATH'
642772b676d7Smrg
642872b676d7Smrg      if test "$GCC" = yes; then
642972b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
643072b676d7Smrg	_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'
643172b676d7Smrg      else
643272b676d7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
643372b676d7Smrg	_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'
643472b676d7Smrg      fi
643572b676d7Smrg      ;;
643672b676d7Smrg
643772b676d7Smrg    uts4*)
643872b676d7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
643972b676d7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
644072b676d7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
644172b676d7Smrg      ;;
644272b676d7Smrg
644372b676d7Smrg    *)
644472b676d7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
644572b676d7Smrg      ;;
644672b676d7Smrg    esac
644772b676d7Smrg  fi
644872b676d7Smrg])
644972b676d7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
645072b676d7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
645172b676d7Smrg
645272b676d7Smrg#
645372b676d7Smrg# Do we need to explicitly link libc?
645472b676d7Smrg#
645572b676d7Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
645672b676d7Smrgx|xyes)
645772b676d7Smrg  # Assume -lc should be added
645872b676d7Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
645972b676d7Smrg
646072b676d7Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
646172b676d7Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
646272b676d7Smrg    *'~'*)
646372b676d7Smrg      # FIXME: we may have to deal with multi-command sequences.
646472b676d7Smrg      ;;
646572b676d7Smrg    '$CC '*)
646672b676d7Smrg      # Test whether the compiler implicitly links with -lc since on some
646772b676d7Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
646872b676d7Smrg      # to ld, don't add -lc before -lgcc.
646972b676d7Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
647072b676d7Smrg      $rm conftest*
64711fd23544Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
647272b676d7Smrg
647372b676d7Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
647472b676d7Smrg        soname=conftest
647572b676d7Smrg        lib=conftest
647672b676d7Smrg        libobjs=conftest.$ac_objext
647772b676d7Smrg        deplibs=
647872b676d7Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
647972b676d7Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
648072b676d7Smrg        compiler_flags=-v
648172b676d7Smrg        linker_flags=-v
648272b676d7Smrg        verstring=
648372b676d7Smrg        output_objdir=.
648472b676d7Smrg        libname=conftest
648572b676d7Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
648672b676d7Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
648772b676d7Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
648872b676d7Smrg        then
648972b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
649072b676d7Smrg        else
649172b676d7Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
649272b676d7Smrg        fi
649372b676d7Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
649472b676d7Smrg      else
649572b676d7Smrg        cat conftest.err 1>&5
649672b676d7Smrg      fi
649772b676d7Smrg      $rm conftest*
649872b676d7Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
649972b676d7Smrg      ;;
650072b676d7Smrg    esac
650172b676d7Smrg  fi
650272b676d7Smrg  ;;
650372b676d7Smrgesac
650472b676d7Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
650572b676d7Smrg
650672b676d7Smrg
650772b676d7Smrg# _LT_AC_FILE_LTDLL_C
650872b676d7Smrg# -------------------
650972b676d7Smrg# Be careful that the start marker always follows a newline.
651072b676d7SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
651172b676d7Smrg# /* ltdll.c starts here */
651272b676d7Smrg# #define WIN32_LEAN_AND_MEAN
651372b676d7Smrg# #include <windows.h>
651472b676d7Smrg# #undef WIN32_LEAN_AND_MEAN
651572b676d7Smrg# #include <stdio.h>
651672b676d7Smrg#
651772b676d7Smrg# #ifndef __CYGWIN__
651872b676d7Smrg# #  ifdef __CYGWIN32__
651972b676d7Smrg# #    define __CYGWIN__ __CYGWIN32__
652072b676d7Smrg# #  endif
652172b676d7Smrg# #endif
652272b676d7Smrg#
652372b676d7Smrg# #ifdef __cplusplus
652472b676d7Smrg# extern "C" {
652572b676d7Smrg# #endif
652672b676d7Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
652772b676d7Smrg# #ifdef __cplusplus
652872b676d7Smrg# }
652972b676d7Smrg# #endif
653072b676d7Smrg#
653172b676d7Smrg# #ifdef __CYGWIN__
653272b676d7Smrg# #include <cygwin/cygwin_dll.h>
653372b676d7Smrg# DECLARE_CYGWIN_DLL( DllMain );
653472b676d7Smrg# #endif
653572b676d7Smrg# HINSTANCE __hDllInstance_base;
653672b676d7Smrg#
653772b676d7Smrg# BOOL APIENTRY
653872b676d7Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
653972b676d7Smrg# {
654072b676d7Smrg#   __hDllInstance_base = hInst;
654172b676d7Smrg#   return TRUE;
654272b676d7Smrg# }
654372b676d7Smrg# /* ltdll.c ends here */
654472b676d7Smrg])# _LT_AC_FILE_LTDLL_C
654572b676d7Smrg
654672b676d7Smrg
654772b676d7Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
654872b676d7Smrg# ---------------------------------
654972b676d7SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
655072b676d7Smrg
655172b676d7Smrg
655272b676d7Smrg# old names
655372b676d7SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
655472b676d7SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
655572b676d7SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
655672b676d7SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
655772b676d7SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
655872b676d7SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
655972b676d7SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
656072b676d7Smrg
656172b676d7Smrg# This is just to silence aclocal about the macro not being used
656272b676d7Smrgifelse([AC_DISABLE_FAST_INSTALL])
656372b676d7Smrg
656472b676d7SmrgAC_DEFUN([LT_AC_PROG_GCJ],
656572b676d7Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
656672b676d7Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
656772b676d7Smrg  AC_SUBST(GCJFLAGS)
656872b676d7Smrg])
656972b676d7Smrg
657072b676d7SmrgAC_DEFUN([LT_AC_PROG_RC],
657172b676d7Smrg[AC_CHECK_TOOL(RC, windres, no)
657272b676d7Smrg])
657372b676d7Smrg
65741fd23544Smrg
65751fd23544Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
65761fd23544Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
65771fd23544Smrg
65781fd23544Smrg# _AS_TEST_PREPARE
65791fd23544Smrg# ----------------
65801fd23544Smrgm4_ifndef([_AS_TEST_PREPARE],
65811fd23544Smrg[m4_defun([_AS_TEST_PREPARE],
65821fd23544Smrg[if test -x / >/dev/null 2>&1; then
65831fd23544Smrg  as_executable_p='test -x'
65841fd23544Smrgelse
65851fd23544Smrg  as_executable_p='test -f'
65861fd23544Smrgfi
65871fd23544Smrg])])# _AS_TEST_PREPARE
65881fd23544Smrg
65891fd23544Smrg# AS_EXECUTABLE_P
65901fd23544Smrg# ---------------
65911fd23544Smrg# Check whether a file is executable.
65921fd23544Smrgm4_ifndef([AS_EXECUTABLE_P],
65931fd23544Smrg[m4_defun([AS_EXECUTABLE_P],
65941fd23544Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
65951fd23544Smrg$as_executable_p $1[]dnl
65961fd23544Smrg])])# AS_EXECUTABLE_P
65971fd23544Smrg
659872b676d7Smrg# NOTE: This macro has been submitted for inclusion into   #
659972b676d7Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
660072b676d7Smrg#  a released version of Autoconf we should remove this    #
660172b676d7Smrg#  macro and use it instead.                               #
660272b676d7Smrg# LT_AC_PROG_SED
660372b676d7Smrg# --------------
660472b676d7Smrg# Check for a fully-functional sed program, that truncates
660572b676d7Smrg# as few characters as possible.  Prefer GNU sed if found.
660672b676d7SmrgAC_DEFUN([LT_AC_PROG_SED],
660772b676d7Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
660872b676d7SmrgAC_CACHE_VAL(lt_cv_path_SED,
660972b676d7Smrg[# Loop through the user's path and test for sed and gsed.
661072b676d7Smrg# Then use that list of sed's as ones to test for truncation.
661172b676d7Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
661272b676d7Smrgfor as_dir in $PATH
661372b676d7Smrgdo
661472b676d7Smrg  IFS=$as_save_IFS
661572b676d7Smrg  test -z "$as_dir" && as_dir=.
661672b676d7Smrg  for lt_ac_prog in sed gsed; do
661772b676d7Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
66181fd23544Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
661972b676d7Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
662072b676d7Smrg      fi
662172b676d7Smrg    done
662272b676d7Smrg  done
662372b676d7Smrgdone
66241fd23544SmrgIFS=$as_save_IFS
662572b676d7Smrglt_ac_max=0
662672b676d7Smrglt_ac_count=0
662772b676d7Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
662872b676d7Smrg# along with /bin/sed that truncates output.
662972b676d7Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
663072b676d7Smrg  test ! -f $lt_ac_sed && continue
663172b676d7Smrg  cat /dev/null > conftest.in
663272b676d7Smrg  lt_ac_count=0
663372b676d7Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
663472b676d7Smrg  # Check for GNU sed and select it if it is found.
663572b676d7Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
663672b676d7Smrg    lt_cv_path_SED=$lt_ac_sed
663772b676d7Smrg    break
663872b676d7Smrg  fi
663972b676d7Smrg  while true; do
664072b676d7Smrg    cat conftest.in conftest.in >conftest.tmp
664172b676d7Smrg    mv conftest.tmp conftest.in
664272b676d7Smrg    cp conftest.in conftest.nl
664372b676d7Smrg    echo >>conftest.nl
664472b676d7Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
664572b676d7Smrg    cmp -s conftest.out conftest.nl || break
664672b676d7Smrg    # 10000 chars as input seems more than enough
664772b676d7Smrg    test $lt_ac_count -gt 10 && break
664872b676d7Smrg    lt_ac_count=`expr $lt_ac_count + 1`
664972b676d7Smrg    if test $lt_ac_count -gt $lt_ac_max; then
665072b676d7Smrg      lt_ac_max=$lt_ac_count
665172b676d7Smrg      lt_cv_path_SED=$lt_ac_sed
665272b676d7Smrg    fi
665372b676d7Smrg  done
665472b676d7Smrgdone
665572b676d7Smrg])
665672b676d7SmrgSED=$lt_cv_path_SED
66571fd23544SmrgAC_SUBST([SED])
665872b676d7SmrgAC_MSG_RESULT([$SED])
665972b676d7Smrg])
666072b676d7Smrg
666172b676d7Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
666272b676d7Smrg# 
666372b676d7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
666472b676d7Smrg#
666572b676d7Smrg# This program is free software; you can redistribute it and/or modify
666672b676d7Smrg# it under the terms of the GNU General Public License as published by
666772b676d7Smrg# the Free Software Foundation; either version 2 of the License, or
666872b676d7Smrg# (at your option) any later version.
666972b676d7Smrg#
667072b676d7Smrg# This program is distributed in the hope that it will be useful, but
667172b676d7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
667272b676d7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
667372b676d7Smrg# General Public License for more details.
667472b676d7Smrg#
667572b676d7Smrg# You should have received a copy of the GNU General Public License
667672b676d7Smrg# along with this program; if not, write to the Free Software
667772b676d7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
667872b676d7Smrg#
667972b676d7Smrg# As a special exception to the GNU General Public License, if you
668072b676d7Smrg# distribute this file as part of a program that contains a
668172b676d7Smrg# configuration script generated by Autoconf, you may include it under
668272b676d7Smrg# the same distribution terms that you use for the rest of that program.
668372b676d7Smrg
668472b676d7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
668572b676d7Smrg# ----------------------------------
668672b676d7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
668772b676d7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
668872b676d7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
668972b676d7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
669072b676d7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
669172b676d7Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
669272b676d7Smrgfi
669372b676d7Smrgif test -n "$PKG_CONFIG"; then
669472b676d7Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
669572b676d7Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
669672b676d7Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
669772b676d7Smrg		AC_MSG_RESULT([yes])
669872b676d7Smrg	else
669972b676d7Smrg		AC_MSG_RESULT([no])
670072b676d7Smrg		PKG_CONFIG=""
670172b676d7Smrg	fi
670272b676d7Smrg		
670372b676d7Smrgfi[]dnl
670472b676d7Smrg])# PKG_PROG_PKG_CONFIG
670572b676d7Smrg
670672b676d7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
670772b676d7Smrg#
670872b676d7Smrg# Check to see whether a particular set of modules exists.  Similar
670972b676d7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
671072b676d7Smrg#
671172b676d7Smrg#
671272b676d7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
671372b676d7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
671472b676d7Smrg# PKG_CHECK_EXISTS manually
671572b676d7Smrg# --------------------------------------------------------------
671672b676d7SmrgAC_DEFUN([PKG_CHECK_EXISTS],
671772b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
671872b676d7Smrgif test -n "$PKG_CONFIG" && \
671972b676d7Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
672072b676d7Smrg  m4_ifval([$2], [$2], [:])
672172b676d7Smrgm4_ifvaln([$3], [else
672272b676d7Smrg  $3])dnl
672372b676d7Smrgfi])
672472b676d7Smrg
672572b676d7Smrg
672672b676d7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
672772b676d7Smrg# ---------------------------------------------
672872b676d7Smrgm4_define([_PKG_CONFIG],
67291fd23544Smrg[if test -n "$$1"; then
67301fd23544Smrg    pkg_cv_[]$1="$$1"
67311fd23544Smrg elif test -n "$PKG_CONFIG"; then
67321fd23544Smrg    PKG_CHECK_EXISTS([$3],
67331fd23544Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
67341fd23544Smrg		     [pkg_failed=yes])
67351fd23544Smrg else
67361fd23544Smrg    pkg_failed=untried
673772b676d7Smrgfi[]dnl
673872b676d7Smrg])# _PKG_CONFIG
673972b676d7Smrg
674072b676d7Smrg# _PKG_SHORT_ERRORS_SUPPORTED
674172b676d7Smrg# -----------------------------
674272b676d7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
674372b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
674472b676d7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
674572b676d7Smrg        _pkg_short_errors_supported=yes
674672b676d7Smrgelse
674772b676d7Smrg        _pkg_short_errors_supported=no
674872b676d7Smrgfi[]dnl
674972b676d7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
675072b676d7Smrg
675172b676d7Smrg
675272b676d7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
675372b676d7Smrg# [ACTION-IF-NOT-FOUND])
675472b676d7Smrg#
675572b676d7Smrg#
675672b676d7Smrg# Note that if there is a possibility the first call to
675772b676d7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
675872b676d7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
675972b676d7Smrg#
676072b676d7Smrg#
676172b676d7Smrg# --------------------------------------------------------------
676272b676d7SmrgAC_DEFUN([PKG_CHECK_MODULES],
676372b676d7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
676472b676d7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
676572b676d7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
676672b676d7Smrg
676772b676d7Smrgpkg_failed=no
676872b676d7SmrgAC_MSG_CHECKING([for $1])
676972b676d7Smrg
677072b676d7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
677172b676d7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
677272b676d7Smrg
677372b676d7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
677472b676d7Smrgand $1[]_LIBS to avoid the need to call pkg-config.
677572b676d7SmrgSee the pkg-config man page for more details.])
677672b676d7Smrg
677772b676d7Smrgif test $pkg_failed = yes; then
677872b676d7Smrg        _PKG_SHORT_ERRORS_SUPPORTED
677972b676d7Smrg        if test $_pkg_short_errors_supported = yes; then
67801fd23544Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
678172b676d7Smrg        else 
67821fd23544Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
678372b676d7Smrg        fi
678472b676d7Smrg	# Put the nasty error message in config.log where it belongs
678572b676d7Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
678672b676d7Smrg
678772b676d7Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
678872b676d7Smrg[Package requirements ($2) were not met:
678972b676d7Smrg
679072b676d7Smrg$$1_PKG_ERRORS
679172b676d7Smrg
679272b676d7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
679372b676d7Smrginstalled software in a non-standard prefix.
679472b676d7Smrg
679572b676d7Smrg_PKG_TEXT
679672b676d7Smrg])],
67971fd23544Smrg		[AC_MSG_RESULT([no])
67981fd23544Smrg                $4])
679972b676d7Smrgelif test $pkg_failed = untried; then
680072b676d7Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
680172b676d7Smrg[The pkg-config script could not be found or is too old.  Make sure it
680272b676d7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
680372b676d7Smrgpath to pkg-config.
680472b676d7Smrg
680572b676d7Smrg_PKG_TEXT
680672b676d7Smrg
68071fd23544SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
680872b676d7Smrg		[$4])
680972b676d7Smrgelse
681072b676d7Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
681172b676d7Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
681272b676d7Smrg        AC_MSG_RESULT([yes])
681372b676d7Smrg	ifelse([$3], , :, [$3])
681472b676d7Smrgfi[]dnl
681572b676d7Smrg])# PKG_CHECK_MODULES
681672b676d7Smrg
6817e47418d9Smrgdnl xorg-macros.m4.  Generated from xorg-macros.m4.in xorgversion.m4 by configure.
681872b676d7Smrgdnl
681972b676d7Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
682072b676d7Smrgdnl 
682172b676d7Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
682272b676d7Smrgdnl copy of this software and associated documentation files (the
682372b676d7Smrgdnl "Software"), to deal in the Software without restriction, including
682472b676d7Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
682572b676d7Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
682672b676d7Smrgdnl to whom the Software is furnished to do so, provided that the above
682772b676d7Smrgdnl copyright notice(s) and this permission notice appear in all copies of
682872b676d7Smrgdnl the Software and that both the above copyright notice(s) and this
682972b676d7Smrgdnl permission notice appear in supporting documentation.
683072b676d7Smrgdnl
683172b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
683272b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
683372b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
683472b676d7Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
683572b676d7Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
683672b676d7Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
683772b676d7Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
683872b676d7Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
683972b676d7Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
684072b676d7Smrgdnl
684172b676d7Smrgdnl Except as contained in this notice, the name of a copyright holder
684272b676d7Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
684372b676d7Smrgdnl or other dealings in this Software without prior written authorization
684472b676d7Smrgdnl of the copyright holder.
684572b676d7Smrg
684672b676d7Smrg# XORG_MACROS_VERSION(required-version)
684772b676d7Smrg# -------------------------------------
684872b676d7Smrg# Minimum version: 1.1.0
684972b676d7Smrg#
685072b676d7Smrg# If you're using a macro added in Version 1.1 or newer, include this in
685172b676d7Smrg# your configure.ac with the minimum required version, such as:
685272b676d7Smrg# XORG_MACROS_VERSION(1.1)
685372b676d7Smrg#
685472b676d7Smrg# To force at least a version with this macro defined, also add:
685572b676d7Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
685672b676d7Smrg#
685772b676d7Smrg#
685872b676d7Smrg# See the "minimum version" comment for each macro you use to see what 
685972b676d7Smrg# version you require.
686072b676d7SmrgAC_DEFUN([XORG_MACROS_VERSION],[
686172b676d7Smrg	[XORG_MACROS_needed_version=$1
686272b676d7Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
686372b676d7Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
686472b676d7Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
6865e47418d9Smrg	[XORG_MACROS_version=1.2.1
686672b676d7Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
686772b676d7Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
686872b676d7Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
686972b676d7Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
687072b676d7Smrg	fi
687172b676d7Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
687272b676d7Smrg		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])
687372b676d7Smrg	fi
687472b676d7Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
687572b676d7Smrg]) # XORG_MACROS_VERSION
687672b676d7Smrg
687772b676d7Smrg# XORG_PROG_RAWCPP()
687872b676d7Smrg# ------------------
687972b676d7Smrg# Minimum version: 1.0.0
688072b676d7Smrg#
688172b676d7Smrg# Find cpp program and necessary flags for use in pre-processing text files
688272b676d7Smrg# such as man pages and config files
688372b676d7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
688472b676d7SmrgAC_REQUIRE([AC_PROG_CPP])
688572b676d7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
688672b676d7Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
688772b676d7Smrg
688872b676d7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
688972b676d7Smrg# which is not the best choice for supporting other OS'es, but covers most
689072b676d7Smrg# of the ones we need for now.
689172b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
689272b676d7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
689372b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
689472b676d7Smrg	AC_MSG_RESULT([no])
689572b676d7Smrgelse
689672b676d7Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
689772b676d7Smrg		RAWCPPFLAGS=-undef
689872b676d7Smrg		AC_MSG_RESULT([yes])
6899e47418d9Smrg	# under Cygwin unix is still defined even with -undef
6900e47418d9Smrg	elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6901e47418d9Smrg		RAWCPPFLAGS="-undef -ansi"
6902e47418d9Smrg		AC_MSG_RESULT([yes, with -ansi])
690372b676d7Smrg	else
690472b676d7Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
690572b676d7Smrg	fi
690672b676d7Smrgfi
690772b676d7Smrgrm -f conftest.$ac_ext
690872b676d7Smrg
690972b676d7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
691072b676d7SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
691172b676d7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
691272b676d7Smrg	AC_MSG_RESULT([no])
691372b676d7Smrgelse
691472b676d7Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
691572b676d7Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
691672b676d7Smrg		AC_MSG_RESULT([yes])
691772b676d7Smrg	else
691872b676d7Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
691972b676d7Smrg	fi
692072b676d7Smrgfi
692172b676d7Smrgrm -f conftest.$ac_ext
692272b676d7SmrgAC_SUBST(RAWCPPFLAGS)
692372b676d7Smrg]) # XORG_PROG_RAWCPP
692472b676d7Smrg
692572b676d7Smrg# XORG_MANPAGE_SECTIONS()
692672b676d7Smrg# -----------------------
692772b676d7Smrg# Minimum version: 1.0.0
692872b676d7Smrg#
692972b676d7Smrg# Determine which sections man pages go in for the different man page types
693072b676d7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
693172b676d7Smrg# Not sure if there's any better way than just hardcoding by OS name.
693272b676d7Smrg# Override default settings by setting environment variables
693372b676d7Smrg
693472b676d7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
693572b676d7SmrgAC_REQUIRE([AC_CANONICAL_HOST])
693672b676d7Smrg
693772b676d7Smrgif test x$APP_MAN_SUFFIX = x    ; then
693872b676d7Smrg    APP_MAN_SUFFIX=1
693972b676d7Smrgfi
694072b676d7Smrgif test x$APP_MAN_DIR = x    ; then
694172b676d7Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
694272b676d7Smrgfi
694372b676d7Smrg
694472b676d7Smrgif test x$LIB_MAN_SUFFIX = x    ; then
694572b676d7Smrg    LIB_MAN_SUFFIX=3
694672b676d7Smrgfi
694772b676d7Smrgif test x$LIB_MAN_DIR = x    ; then
694872b676d7Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
694972b676d7Smrgfi
695072b676d7Smrg
695172b676d7Smrgif test x$FILE_MAN_SUFFIX = x    ; then
695272b676d7Smrg    case $host_os in
695372b676d7Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
695472b676d7Smrg	*)		FILE_MAN_SUFFIX=5  ;;
695572b676d7Smrg    esac
695672b676d7Smrgfi
695772b676d7Smrgif test x$FILE_MAN_DIR = x    ; then
695872b676d7Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
695972b676d7Smrgfi
696072b676d7Smrg
696172b676d7Smrgif test x$MISC_MAN_SUFFIX = x    ; then
696272b676d7Smrg    case $host_os in
696372b676d7Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
696472b676d7Smrg	*)		MISC_MAN_SUFFIX=7  ;;
696572b676d7Smrg    esac
696672b676d7Smrgfi
696772b676d7Smrgif test x$MISC_MAN_DIR = x    ; then
696872b676d7Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
696972b676d7Smrgfi
697072b676d7Smrg
697172b676d7Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
697272b676d7Smrg    case $host_os in
697372b676d7Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
697472b676d7Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
697572b676d7Smrg    esac
697672b676d7Smrgfi
697772b676d7Smrgif test x$DRIVER_MAN_DIR = x    ; then
697872b676d7Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
697972b676d7Smrgfi
698072b676d7Smrg
698172b676d7Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
698272b676d7Smrg    case $host_os in
698372b676d7Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
698472b676d7Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
698572b676d7Smrg    esac
698672b676d7Smrgfi
698772b676d7Smrgif test x$ADMIN_MAN_DIR = x    ; then
698872b676d7Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
698972b676d7Smrgfi
699072b676d7Smrg
699172b676d7Smrg
699272b676d7SmrgAC_SUBST([APP_MAN_SUFFIX])
699372b676d7SmrgAC_SUBST([LIB_MAN_SUFFIX])
699472b676d7SmrgAC_SUBST([FILE_MAN_SUFFIX])
699572b676d7SmrgAC_SUBST([MISC_MAN_SUFFIX])
699672b676d7SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
699772b676d7SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
699872b676d7SmrgAC_SUBST([APP_MAN_DIR])
699972b676d7SmrgAC_SUBST([LIB_MAN_DIR])
700072b676d7SmrgAC_SUBST([FILE_MAN_DIR])
700172b676d7SmrgAC_SUBST([MISC_MAN_DIR])
700272b676d7SmrgAC_SUBST([DRIVER_MAN_DIR])
700372b676d7SmrgAC_SUBST([ADMIN_MAN_DIR])
700472b676d7Smrg]) # XORG_MANPAGE_SECTIONS
700572b676d7Smrg
700672b676d7Smrg# XORG_CHECK_LINUXDOC
700772b676d7Smrg# -------------------
700872b676d7Smrg# Minimum version: 1.0.0
700972b676d7Smrg#
701072b676d7Smrg# Defines the variable MAKE_TEXT if the necessary tools and
701172b676d7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
701272b676d7Smrg# Whether or not the necessary tools and files are found can be checked
701372b676d7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
701472b676d7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
7015e47418d9Smrgif test x$XORG_SGML_PATH = x ; then
7016e47418d9Smrg    XORG_SGML_PATH=$prefix/share/sgml
7017e47418d9Smrgfi
701872b676d7SmrgHAVE_DEFS_ENT=
701972b676d7Smrg
70201fd23544Smrgif test x"$cross_compiling" = x"yes" ; then
70211fd23544Smrg  HAVE_DEFS_ENT=no
70221fd23544Smrgelse
70231fd23544Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
70241fd23544Smrgfi
702572b676d7Smrg
702672b676d7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
702772b676d7SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
702872b676d7Smrg
702972b676d7SmrgAC_MSG_CHECKING([Whether to build documentation])
703072b676d7Smrg
703172b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
703272b676d7Smrg   BUILDDOC=yes
703372b676d7Smrgelse
703472b676d7Smrg   BUILDDOC=no
703572b676d7Smrgfi
703672b676d7Smrg
703772b676d7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
703872b676d7Smrg
703972b676d7SmrgAC_MSG_RESULT([$BUILDDOC])
704072b676d7Smrg
704172b676d7SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
704272b676d7Smrg
704372b676d7Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
704472b676d7Smrg   BUILDPDFDOC=yes
704572b676d7Smrgelse
704672b676d7Smrg   BUILDPDFDOC=no
704772b676d7Smrgfi
704872b676d7Smrg
704972b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
705072b676d7Smrg
705172b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC])
705272b676d7Smrg
705372b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
705472b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
705572b676d7SmrgMAKE_PDF="$PS2PDF"
705672b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
705772b676d7Smrg
705872b676d7SmrgAC_SUBST(MAKE_TEXT)
705972b676d7SmrgAC_SUBST(MAKE_PS)
706072b676d7SmrgAC_SUBST(MAKE_PDF)
706172b676d7SmrgAC_SUBST(MAKE_HTML)
706272b676d7Smrg]) # XORG_CHECK_LINUXDOC
706372b676d7Smrg
706472b676d7Smrg# XORG_CHECK_DOCBOOK
706572b676d7Smrg# -------------------
706672b676d7Smrg# Minimum version: 1.0.0
706772b676d7Smrg#
706872b676d7Smrg# Checks for the ability to build output formats from SGML DocBook source.
706972b676d7Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
707072b676d7Smrg# indicates whether the necessary tools and files are found and, if set,
707172b676d7Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
707272b676d7SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
7073e47418d9Smrgif test x$XORG_SGML_PATH = x ; then
7074e47418d9Smrg    XORG_SGML_PATH=$prefix/share/sgml
7075e47418d9Smrgfi
707672b676d7SmrgHAVE_DEFS_ENT=
707772b676d7SmrgBUILDTXTDOC=no
707872b676d7SmrgBUILDPDFDOC=no
707972b676d7SmrgBUILDPSDOC=no
708072b676d7SmrgBUILDHTMLDOC=no
708172b676d7Smrg
708272b676d7SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
708372b676d7Smrg
708472b676d7SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
708572b676d7SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
708672b676d7SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
708772b676d7SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
708872b676d7Smrg
708972b676d7SmrgAC_MSG_CHECKING([Whether to build text documentation])
709072b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
709172b676d7Smrg   test x$BUILD_TXTDOC != xno; then
709272b676d7Smrg	BUILDTXTDOC=yes
709372b676d7Smrgfi
709472b676d7SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
709572b676d7SmrgAC_MSG_RESULT([$BUILDTXTDOC])
709672b676d7Smrg
709772b676d7SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
709872b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
709972b676d7Smrg   test x$BUILD_PDFDOC != xno; then
710072b676d7Smrg	BUILDPDFDOC=yes
710172b676d7Smrgfi
710272b676d7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
710372b676d7SmrgAC_MSG_RESULT([$BUILDPDFDOC])
710472b676d7Smrg
710572b676d7SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
710672b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
710772b676d7Smrg   test x$BUILD_PSDOC != xno; then
710872b676d7Smrg	BUILDPSDOC=yes
710972b676d7Smrgfi
711072b676d7SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
711172b676d7SmrgAC_MSG_RESULT([$BUILDPSDOC])
711272b676d7Smrg
711372b676d7SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
711472b676d7Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
711572b676d7Smrg   test x$BUILD_HTMLDOC != xno; then
711672b676d7Smrg	BUILDHTMLDOC=yes
711772b676d7Smrgfi
711872b676d7SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
711972b676d7SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
712072b676d7Smrg
712172b676d7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
712272b676d7SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
712372b676d7SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
712472b676d7SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
712572b676d7Smrg
712672b676d7SmrgAC_SUBST(MAKE_TEXT)
712772b676d7SmrgAC_SUBST(MAKE_PS)
712872b676d7SmrgAC_SUBST(MAKE_PDF)
712972b676d7SmrgAC_SUBST(MAKE_HTML)
713072b676d7Smrg]) # XORG_CHECK_DOCBOOK
713172b676d7Smrg
713272b676d7Smrg# XORG_CHECK_MALLOC_ZERO
713372b676d7Smrg# ----------------------
713472b676d7Smrg# Minimum version: 1.0.0
713572b676d7Smrg#
713672b676d7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
713772b676d7Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
713872b676d7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
713972b676d7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
714072b676d7SmrgAC_ARG_ENABLE(malloc0returnsnull,
714172b676d7Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
714272b676d7Smrg		       [malloc(0) returns NULL (default: auto)]),
714372b676d7Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
714472b676d7Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
714572b676d7Smrg
714672b676d7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
714772b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
714872b676d7Smrg	AC_RUN_IFELSE([
714972b676d7Smrgchar *malloc();
715072b676d7Smrgchar *realloc();
715172b676d7Smrgchar *calloc();
715272b676d7Smrgmain() {
715372b676d7Smrg    char *m0, *r0, *c0, *p;
715472b676d7Smrg    m0 = malloc(0);
715572b676d7Smrg    p = malloc(10);
715672b676d7Smrg    r0 = realloc(p,0);
715772b676d7Smrg    c0 = calloc(0);
715872b676d7Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
715972b676d7Smrg}],
716072b676d7Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
716172b676d7Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
716272b676d7Smrgfi
716372b676d7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
716472b676d7Smrg
716572b676d7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
716672b676d7Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
716772b676d7Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
716872b676d7Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
716972b676d7Smrgelse
717072b676d7Smrg	MALLOC_ZERO_CFLAGS=""
717172b676d7Smrg	XMALLOC_ZERO_CFLAGS=""
717272b676d7Smrg	XTMALLOC_ZERO_CFLAGS=""
717372b676d7Smrgfi
717472b676d7Smrg
717572b676d7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
717672b676d7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
717772b676d7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
717872b676d7Smrg]) # XORG_CHECK_MALLOC_ZERO
717972b676d7Smrg
718072b676d7Smrg# XORG_WITH_LINT()
718172b676d7Smrg# ----------------
718272b676d7Smrg# Minimum version: 1.1.0
718372b676d7Smrg#
718472b676d7Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
718572b676d7Smrg# is specified.   (Use --with-lint=sparse for sparse.)
718672b676d7Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
718772b676d7Smrg# Sets $LINT_FLAGS to flags to pass to source checker
718872b676d7Smrg# Sets LINT automake conditional if enabled (default: disabled)
718972b676d7Smrg#
719072b676d7SmrgAC_DEFUN([XORG_WITH_LINT],[
719172b676d7Smrg
719272b676d7Smrg# Allow checking code with lint, sparse, etc.
719372b676d7SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
719472b676d7Smrg		[Use a lint-style source code checker (default: disabled)])],
719572b676d7Smrg		[use_lint=$withval], [use_lint=no])
719672b676d7Smrgif test "x$use_lint" = "xyes" ; then
719772b676d7Smrg	LINT="lint"
719872b676d7Smrgelse
719972b676d7Smrg	LINT="$use_lint"
720072b676d7Smrgfi
720172b676d7Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
720272b676d7Smrg    case $LINT in
720372b676d7Smrg	lint|*/lint)
720472b676d7Smrg	    case $host_os in
720572b676d7Smrg		solaris*)
720672b676d7Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
720772b676d7Smrg			;;
720872b676d7Smrg	    esac
720972b676d7Smrg	    ;;
721072b676d7Smrg    esac
721172b676d7Smrgfi
721272b676d7Smrg
721372b676d7SmrgAC_SUBST(LINT)
721472b676d7SmrgAC_SUBST(LINT_FLAGS)
721572b676d7SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
721672b676d7Smrg
721772b676d7Smrg]) # XORG_WITH_LINT
721872b676d7Smrg
721972b676d7Smrg# XORG_LINT_LIBRARY(LIBNAME)
722072b676d7Smrg# --------------------------
722172b676d7Smrg# Minimum version: 1.1.0
722272b676d7Smrg#
722372b676d7Smrg# Sets up flags for building lint libraries for checking programs that call
722472b676d7Smrg# functions in the library.
722572b676d7Smrg# Disabled by default, enable with --enable-lint-library
722672b676d7Smrg# Sets: 
722772b676d7Smrg#	@LINTLIB@		- name of lint library file to make
722872b676d7Smrg#	MAKE_LINT_LIB		- automake conditional
722972b676d7Smrg#
723072b676d7Smrg
723172b676d7SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
723272b676d7SmrgAC_REQUIRE([XORG_WITH_LINT])
723372b676d7Smrg# Build lint "library" for more indepth checks of programs calling this library
723472b676d7SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
723572b676d7Smrg	[Create lint library (default: disabled)])],
723672b676d7Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
723772b676d7Smrgif test "x$make_lint_lib" != "xno" ; then
723872b676d7Smrg	if test "x$LINT" = "xno" ; then
723972b676d7Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
724072b676d7Smrg	fi
724172b676d7Smrg	if test "x$make_lint_lib" = "xyes" ; then
724272b676d7Smrg		LINTLIB=llib-l$1.ln
724372b676d7Smrg	else
724472b676d7Smrg		LINTLIB=$make_lint_lib
724572b676d7Smrg	fi
724672b676d7Smrgfi
724772b676d7SmrgAC_SUBST(LINTLIB)
724872b676d7SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
724972b676d7Smrg
725072b676d7Smrg]) # XORG_LINT_LIBRARY
725172b676d7Smrg
7252e47418d9Smrg# XORG_CWARNFLAGS
7253e47418d9Smrg# ---------------
7254e47418d9Smrg# Minimum version: 1.2.0
7255e47418d9Smrg#
7256e47418d9Smrg# Defines CWARNFLAGS to enable C compiler warnings.
7257e47418d9Smrg#
7258e47418d9SmrgAC_DEFUN([XORG_CWARNFLAGS], [
7259e47418d9SmrgAC_REQUIRE([AC_PROG_CC])
7260e47418d9Smrgif  test "x$GCC" = xyes ; then
7261e47418d9Smrg    CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
7262e47418d9Smrg-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
7263e47418d9Smrg-Wbad-function-cast"
7264e47418d9Smrg    case `gcc -dumpversion` in
7265e47418d9Smrg    3.4.* | 4.*)
7266e47418d9Smrg	CWARNFLAGS+=" -Wold-style-definition -Wdeclaration-after-statement"
7267e47418d9Smrg	;;
7268e47418d9Smrg    esac
7269e47418d9Smrgelse
7270e47418d9Smrg    AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
7271e47418d9Smrg    if test "x$SUNCC" = "xyes"; then
7272e47418d9Smrg	CWARNFLAGS="-v"
7273e47418d9Smrg    fi
7274e47418d9Smrgfi
7275e47418d9SmrgAC_SUBST(CWARNFLAGS)
7276e47418d9Smrg]) # XORG_CWARNFLAGS
727772b676d7Smrgdnl Copyright 2005 Red Hat, Inc
727872b676d7Smrgdnl
727972b676d7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
728072b676d7Smrgdnl documentation for any purpose is hereby granted without fee, provided that
728172b676d7Smrgdnl the above copyright notice appear in all copies and that both that
728272b676d7Smrgdnl copyright notice and this permission notice appear in supporting
728372b676d7Smrgdnl documentation.
728472b676d7Smrgdnl
728572b676d7Smrgdnl The above copyright notice and this permission notice shall be included
728672b676d7Smrgdnl in all copies or substantial portions of the Software.
728772b676d7Smrgdnl
728872b676d7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
728972b676d7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
729072b676d7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
729172b676d7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
729272b676d7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
729372b676d7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
729472b676d7Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
729572b676d7Smrgdnl
729672b676d7Smrgdnl Except as contained in this notice, the name of the copyright holders shall
729772b676d7Smrgdnl not be used in advertising or otherwise to promote the sale, use or
729872b676d7Smrgdnl other dealings in this Software without prior written authorization
729972b676d7Smrgdnl from the copyright holders.
730072b676d7Smrgdnl
730172b676d7Smrg
730272b676d7Smrg# XORG_RELEASE_VERSION
730372b676d7Smrg# --------------------
730472b676d7Smrg# Adds --with/without-release-string and changes the PACKAGE and
730572b676d7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
73061fd23544Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
73071fd23544Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
730872b676d7Smrg 
730972b676d7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
731072b676d7Smrg	AC_ARG_WITH(release-version,
731172b676d7Smrg			AC_HELP_STRING([--with-release-version=STRING],
731272b676d7Smrg				[Use release version string in package name]),
731372b676d7Smrg			[RELEASE_VERSION="$withval"],
731472b676d7Smrg			[RELEASE_VERSION=""])
731572b676d7Smrg	if test "x$RELEASE_VERSION" != "x"; then
731672b676d7Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
731772b676d7Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
731872b676d7Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
731972b676d7Smrg	fi
73201fd23544Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
73211fd23544Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
73221fd23544Smrg		[Major version of this package])
73231fd23544Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
73241fd23544Smrg	if test "x$PVM" = "x"; then
73251fd23544Smrg		PVM="0"
73261fd23544Smrg	fi
73271fd23544Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
73281fd23544Smrg		[$PVM],
73291fd23544Smrg		[Minor version of this package])
73301fd23544Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
73311fd23544Smrg	if test "x$PVP" = "x"; then
73321fd23544Smrg		PVP="0"
73331fd23544Smrg	fi
73341fd23544Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
73351fd23544Smrg		[$PVP],
73361fd23544Smrg		[Patch version of this package])
733772b676d7Smrg])
733872b676d7Smrg
7339e47418d9Smrg# XORG_CHANGELOG()
7340e47418d9Smrg# ----------------
7341e47418d9Smrg# Minimum version: 1.2.0
7342e47418d9Smrg#
7343e47418d9Smrg# Defines the variable CHANGELOG_CMD as the command to generate
7344e47418d9Smrg# ChangeLog from git.
7345e47418d9Smrg#
7346e47418d9Smrg# Arrange that distcleancheck ignores ChangeLog left over by distclean.
7347e47418d9Smrg#
7348e47418d9SmrgAC_DEFUN([XORG_CHANGELOG], [
7349e47418d9SmrgCHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
7350e47418d9Smrgmv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
7351e47418d9Smrgecho 'git directory not found: installing possibly empty changelog.' >&2)"
7352e47418d9SmrgAC_SUBST([CHANGELOG_CMD])
7353e47418d9SmrgAC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
7354e47418d9Smrg]) # XORG_CHANGELOG
7355e47418d9Smrg
7356e47418d9Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
735772b676d7Smrg#
735872b676d7Smrg# This file is free software; the Free Software Foundation
735972b676d7Smrg# gives unlimited permission to copy and/or distribute it,
736072b676d7Smrg# with or without modifications, as long as this notice is preserved.
736172b676d7Smrg
736272b676d7Smrg# AM_AUTOMAKE_VERSION(VERSION)
736372b676d7Smrg# ----------------------------
736472b676d7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
736572b676d7Smrg# generated from the m4 files accompanying Automake X.Y.
73661fd23544Smrg# (This private macro should not be called outside this file.)
73671fd23544SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
7368e47418d9Smrg[am__api_version='1.11'
73691fd23544Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
73701fd23544Smrgdnl require some minimum version.  Point them to the right macro.
7371e47418d9Smrgm4_if([$1], [1.11], [],
73721fd23544Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
73731fd23544Smrg])
73741fd23544Smrg
73751fd23544Smrg# _AM_AUTOCONF_VERSION(VERSION)
73761fd23544Smrg# -----------------------------
73771fd23544Smrg# aclocal traces this macro to find the Autoconf version.
73781fd23544Smrg# This is a private macro too.  Using m4_define simplifies
73791fd23544Smrg# the logic in aclocal, which can simply ignore this definition.
73801fd23544Smrgm4_define([_AM_AUTOCONF_VERSION], [])
738172b676d7Smrg
738272b676d7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
738372b676d7Smrg# -------------------------------
73841fd23544Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
7385e47418d9Smrg# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
738672b676d7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
7387e47418d9Smrg[AM_AUTOMAKE_VERSION([1.11])dnl
73881fd23544Smrgm4_ifndef([AC_AUTOCONF_VERSION],
73891fd23544Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
7390e47418d9Smrg_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
739172b676d7Smrg
739272b676d7Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
739372b676d7Smrg
739472b676d7Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
739572b676d7Smrg#
739672b676d7Smrg# This file is free software; the Free Software Foundation
739772b676d7Smrg# gives unlimited permission to copy and/or distribute it,
739872b676d7Smrg# with or without modifications, as long as this notice is preserved.
739972b676d7Smrg
740072b676d7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
740172b676d7Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
740272b676d7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
740372b676d7Smrg#
740472b676d7Smrg# Of course, Automake must honor this variable whenever it calls a
740572b676d7Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
740672b676d7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
740772b676d7Smrg# depending on how configure is run.  This is pretty annoying, since
740872b676d7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
740972b676d7Smrg# source directory, any form will work fine, but in subdirectories a
741072b676d7Smrg# relative path needs to be adjusted first.
741172b676d7Smrg#
741272b676d7Smrg# $ac_aux_dir/missing
741372b676d7Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
741472b676d7Smrg# $top_srcdir/$ac_aux_dir/missing
741572b676d7Smrg#    fails if $ac_aux_dir is absolute,
741672b676d7Smrg#    fails when called from a subdirectory in a VPATH build with
741772b676d7Smrg#          a relative $ac_aux_dir
741872b676d7Smrg#
741972b676d7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
742072b676d7Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
742172b676d7Smrg# harmless because $srcdir is `.', but things will broke when you
742272b676d7Smrg# start a VPATH build or use an absolute $srcdir.
742372b676d7Smrg#
742472b676d7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
742572b676d7Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
742672b676d7Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
742772b676d7Smrg# and then we would define $MISSING as
742872b676d7Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
742972b676d7Smrg# This will work as long as MISSING is not called from configure, because
743072b676d7Smrg# unfortunately $(top_srcdir) has no meaning in configure.
743172b676d7Smrg# However there are other variables, like CC, which are often used in
743272b676d7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
743372b676d7Smrg#
743472b676d7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
743572b676d7Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
743672b676d7Smrg# configured tree to be moved without reconfiguration.
743772b676d7Smrg
743872b676d7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
743972b676d7Smrg[dnl Rely on autoconf to set up CDPATH properly.
744072b676d7SmrgAC_PREREQ([2.50])dnl
744172b676d7Smrg# expand $ac_aux_dir to an absolute path
744272b676d7Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
744372b676d7Smrg])
744472b676d7Smrg
744572b676d7Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
744672b676d7Smrg
7447e47418d9Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
744872b676d7Smrg# Free Software Foundation, Inc.
744972b676d7Smrg#
745072b676d7Smrg# This file is free software; the Free Software Foundation
745172b676d7Smrg# gives unlimited permission to copy and/or distribute it,
745272b676d7Smrg# with or without modifications, as long as this notice is preserved.
745372b676d7Smrg
7454e47418d9Smrg# serial 9
745572b676d7Smrg
745672b676d7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
745772b676d7Smrg# -------------------------------------
745872b676d7Smrg# Define a conditional.
745972b676d7SmrgAC_DEFUN([AM_CONDITIONAL],
746072b676d7Smrg[AC_PREREQ(2.52)dnl
746172b676d7Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
746272b676d7Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
74631fd23544SmrgAC_SUBST([$1_TRUE])dnl
74641fd23544SmrgAC_SUBST([$1_FALSE])dnl
74651fd23544Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
74661fd23544Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
7467e47418d9Smrgm4_define([_AM_COND_VALUE_$1], [$2])dnl
746872b676d7Smrgif $2; then
746972b676d7Smrg  $1_TRUE=
747072b676d7Smrg  $1_FALSE='#'
747172b676d7Smrgelse
747272b676d7Smrg  $1_TRUE='#'
747372b676d7Smrg  $1_FALSE=
747472b676d7Smrgfi
747572b676d7SmrgAC_CONFIG_COMMANDS_PRE(
747672b676d7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
747772b676d7Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
747872b676d7SmrgUsually this means the macro was only invoked conditionally.]])
747972b676d7Smrgfi])])
748072b676d7Smrg
7481e47418d9Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
748272b676d7Smrg# Free Software Foundation, Inc.
748372b676d7Smrg#
748472b676d7Smrg# This file is free software; the Free Software Foundation
748572b676d7Smrg# gives unlimited permission to copy and/or distribute it,
748672b676d7Smrg# with or without modifications, as long as this notice is preserved.
748772b676d7Smrg
7488e47418d9Smrg# serial 10
748972b676d7Smrg
749072b676d7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
749172b676d7Smrg# written in clear, in which case automake, when reading aclocal.m4,
749272b676d7Smrg# will think it sees a *use*, and therefore will trigger all it's
749372b676d7Smrg# C support machinery.  Also note that it means that autoscan, seeing
749472b676d7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
749572b676d7Smrg
749672b676d7Smrg
749772b676d7Smrg# _AM_DEPENDENCIES(NAME)
749872b676d7Smrg# ----------------------
749972b676d7Smrg# See how the compiler implements dependency checking.
750072b676d7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
750172b676d7Smrg# We try a few techniques and use that to set a single cache variable.
750272b676d7Smrg#
750372b676d7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
750472b676d7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
750572b676d7Smrg# dependency, and given that the user is not expected to run this macro,
750672b676d7Smrg# just rely on AC_PROG_CC.
750772b676d7SmrgAC_DEFUN([_AM_DEPENDENCIES],
750872b676d7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
750972b676d7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
751072b676d7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
751172b676d7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
751272b676d7Smrg
751372b676d7Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
751472b676d7Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
751572b676d7Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
75161fd23544Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
751772b676d7Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
751872b676d7Smrg                   [depcc="$$1"   am_compiler_list=])
751972b676d7Smrg
752072b676d7SmrgAC_CACHE_CHECK([dependency style of $depcc],
752172b676d7Smrg               [am_cv_$1_dependencies_compiler_type],
752272b676d7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
752372b676d7Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
752472b676d7Smrg  # making bogus files that we don't know about and never remove.  For
752572b676d7Smrg  # instance it was reported that on HP-UX the gcc test will end up
752672b676d7Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
752772b676d7Smrg  # in D'.
752872b676d7Smrg  mkdir conftest.dir
752972b676d7Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
753072b676d7Smrg  # using a relative directory.
753172b676d7Smrg  cp "$am_depcomp" conftest.dir
753272b676d7Smrg  cd conftest.dir
753372b676d7Smrg  # We will build objects and dependencies in a subdirectory because
753472b676d7Smrg  # it helps to detect inapplicable dependency modes.  For instance
753572b676d7Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
753672b676d7Smrg  # side effect of compilation, but ICC will put the dependencies in
753772b676d7Smrg  # the current directory while Tru64 will put them in the object
753872b676d7Smrg  # directory.
753972b676d7Smrg  mkdir sub
754072b676d7Smrg
754172b676d7Smrg  am_cv_$1_dependencies_compiler_type=none
754272b676d7Smrg  if test "$am_compiler_list" = ""; then
754372b676d7Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
754472b676d7Smrg  fi
7545e47418d9Smrg  am__universal=false
7546e47418d9Smrg  m4_case([$1], [CC],
7547e47418d9Smrg    [case " $depcc " in #(
7548e47418d9Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
7549e47418d9Smrg     esac],
7550e47418d9Smrg    [CXX],
7551e47418d9Smrg    [case " $depcc " in #(
7552e47418d9Smrg     *\ -arch\ *\ -arch\ *) am__universal=true ;;
7553e47418d9Smrg     esac])
7554e47418d9Smrg
755572b676d7Smrg  for depmode in $am_compiler_list; do
755672b676d7Smrg    # Setup a source with many dependencies, because some compilers
755772b676d7Smrg    # like to wrap large dependency lists on column 80 (with \), and
755872b676d7Smrg    # we should not choose a depcomp mode which is confused by this.
755972b676d7Smrg    #
756072b676d7Smrg    # We need to recreate these files for each test, as the compiler may
756172b676d7Smrg    # overwrite some of them when testing with obscure command lines.
756272b676d7Smrg    # This happens at least with the AIX C compiler.
756372b676d7Smrg    : > sub/conftest.c
756472b676d7Smrg    for i in 1 2 3 4 5 6; do
756572b676d7Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
756672b676d7Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
756772b676d7Smrg      # Solaris 8's {/usr,}/bin/sh.
756872b676d7Smrg      touch sub/conftst$i.h
756972b676d7Smrg    done
757072b676d7Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
757172b676d7Smrg
7572e47418d9Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
7573e47418d9Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
7574e47418d9Smrg    # handle `-M -o', and we need to detect this.  Also, some Intel
7575e47418d9Smrg    # versions had trouble with output in subdirs
7576e47418d9Smrg    am__obj=sub/conftest.${OBJEXT-o}
7577e47418d9Smrg    am__minus_obj="-o $am__obj"
757872b676d7Smrg    case $depmode in
7579e47418d9Smrg    gcc)
7580e47418d9Smrg      # This depmode causes a compiler race in universal mode.
7581e47418d9Smrg      test "$am__universal" = false || continue
7582e47418d9Smrg      ;;
758372b676d7Smrg    nosideeffect)
758472b676d7Smrg      # after this tag, mechanisms are not by side-effect, so they'll
758572b676d7Smrg      # only be used when explicitly requested
758672b676d7Smrg      if test "x$enable_dependency_tracking" = xyes; then
758772b676d7Smrg	continue
758872b676d7Smrg      else
758972b676d7Smrg	break
759072b676d7Smrg      fi
759172b676d7Smrg      ;;
7592e47418d9Smrg    msvisualcpp | msvcmsys)
7593e47418d9Smrg      # This compiler won't grok `-c -o', but also, the minuso test has
7594e47418d9Smrg      # not run yet.  These depmodes are late enough in the game, and
7595e47418d9Smrg      # so weak that their functioning should not be impacted.
7596e47418d9Smrg      am__obj=conftest.${OBJEXT-o}
7597e47418d9Smrg      am__minus_obj=
7598e47418d9Smrg      ;;
759972b676d7Smrg    none) break ;;
760072b676d7Smrg    esac
760172b676d7Smrg    if depmode=$depmode \
7602e47418d9Smrg       source=sub/conftest.c object=$am__obj \
760372b676d7Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7604e47418d9Smrg       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
760572b676d7Smrg         >/dev/null 2>conftest.err &&
76061fd23544Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
760772b676d7Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7608e47418d9Smrg       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
760972b676d7Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
761072b676d7Smrg      # icc doesn't choke on unknown options, it will just issue warnings
761172b676d7Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
761272b676d7Smrg      # that says an option was ignored or not supported.
761372b676d7Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
761472b676d7Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
761572b676d7Smrg      # The diagnosis changed in icc 8.0:
761672b676d7Smrg      #   icc: Command line remark: option '-MP' not supported
761772b676d7Smrg      if (grep 'ignoring option' conftest.err ||
761872b676d7Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
761972b676d7Smrg        am_cv_$1_dependencies_compiler_type=$depmode
762072b676d7Smrg        break
762172b676d7Smrg      fi
762272b676d7Smrg    fi
762372b676d7Smrg  done
762472b676d7Smrg
762572b676d7Smrg  cd ..
762672b676d7Smrg  rm -rf conftest.dir
762772b676d7Smrgelse
762872b676d7Smrg  am_cv_$1_dependencies_compiler_type=none
762972b676d7Smrgfi
763072b676d7Smrg])
763172b676d7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
763272b676d7SmrgAM_CONDITIONAL([am__fastdep$1], [
763372b676d7Smrg  test "x$enable_dependency_tracking" != xno \
763472b676d7Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
763572b676d7Smrg])
763672b676d7Smrg
763772b676d7Smrg
763872b676d7Smrg# AM_SET_DEPDIR
763972b676d7Smrg# -------------
764072b676d7Smrg# Choose a directory name for dependency files.
764172b676d7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
764272b676d7SmrgAC_DEFUN([AM_SET_DEPDIR],
764372b676d7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
764472b676d7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
764572b676d7Smrg])
764672b676d7Smrg
764772b676d7Smrg
764872b676d7Smrg# AM_DEP_TRACK
764972b676d7Smrg# ------------
765072b676d7SmrgAC_DEFUN([AM_DEP_TRACK],
765172b676d7Smrg[AC_ARG_ENABLE(dependency-tracking,
765272b676d7Smrg[  --disable-dependency-tracking  speeds up one-time build
765372b676d7Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
765472b676d7Smrgif test "x$enable_dependency_tracking" != xno; then
765572b676d7Smrg  am_depcomp="$ac_aux_dir/depcomp"
765672b676d7Smrg  AMDEPBACKSLASH='\'
765772b676d7Smrgfi
765872b676d7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
76591fd23544SmrgAC_SUBST([AMDEPBACKSLASH])dnl
76601fd23544Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
766172b676d7Smrg])
766272b676d7Smrg
766372b676d7Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
766472b676d7Smrg
7665e47418d9Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
766672b676d7Smrg# Free Software Foundation, Inc.
766772b676d7Smrg#
766872b676d7Smrg# This file is free software; the Free Software Foundation
766972b676d7Smrg# gives unlimited permission to copy and/or distribute it,
767072b676d7Smrg# with or without modifications, as long as this notice is preserved.
767172b676d7Smrg
7672e47418d9Smrg#serial 5
767372b676d7Smrg
767472b676d7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
767572b676d7Smrg# ------------------------------
767672b676d7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7677e47418d9Smrg[{
7678e47418d9Smrg  # Autoconf 2.62 quotes --file arguments for eval, but not when files
7679e47418d9Smrg  # are listed without --file.  Let's play safe and only enable the eval
7680e47418d9Smrg  # if we detect the quoting.
7681e47418d9Smrg  case $CONFIG_FILES in
7682e47418d9Smrg  *\'*) eval set x "$CONFIG_FILES" ;;
7683e47418d9Smrg  *)   set x $CONFIG_FILES ;;
7684e47418d9Smrg  esac
7685e47418d9Smrg  shift
7686e47418d9Smrg  for mf
7687e47418d9Smrg  do
7688e47418d9Smrg    # Strip MF so we end up with the name of the file.
7689e47418d9Smrg    mf=`echo "$mf" | sed -e 's/:.*$//'`
7690e47418d9Smrg    # Check whether this is an Automake generated Makefile or not.
7691e47418d9Smrg    # We used to match only the files named `Makefile.in', but
7692e47418d9Smrg    # some people rename them; so instead we look at the file content.
7693e47418d9Smrg    # Grep'ing the first line is not enough: some people post-process
7694e47418d9Smrg    # each Makefile.in and add a new line on top of each file to say so.
7695e47418d9Smrg    # Grep'ing the whole file is not good either: AIX grep has a line
7696e47418d9Smrg    # limit of 2048, but all sed's we know have understand at least 4000.
7697e47418d9Smrg    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
7698e47418d9Smrg      dirpart=`AS_DIRNAME("$mf")`
7699e47418d9Smrg    else
7700e47418d9Smrg      continue
7701e47418d9Smrg    fi
7702e47418d9Smrg    # Extract the definition of DEPDIR, am__include, and am__quote
7703e47418d9Smrg    # from the Makefile without running `make'.
7704e47418d9Smrg    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7705e47418d9Smrg    test -z "$DEPDIR" && continue
7706e47418d9Smrg    am__include=`sed -n 's/^am__include = //p' < "$mf"`
7707e47418d9Smrg    test -z "am__include" && continue
7708e47418d9Smrg    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7709e47418d9Smrg    # When using ansi2knr, U may be empty or an underscore; expand it
7710e47418d9Smrg    U=`sed -n 's/^U = //p' < "$mf"`
7711e47418d9Smrg    # Find all dependency output files, they are included files with
7712e47418d9Smrg    # $(DEPDIR) in their names.  We invoke sed twice because it is the
7713e47418d9Smrg    # simplest approach to changing $(DEPDIR) to its actual value in the
7714e47418d9Smrg    # expansion.
7715e47418d9Smrg    for file in `sed -n "
7716e47418d9Smrg      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7717e47418d9Smrg	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7718e47418d9Smrg      # Make sure the directory exists.
7719e47418d9Smrg      test -f "$dirpart/$file" && continue
7720e47418d9Smrg      fdir=`AS_DIRNAME(["$file"])`
7721e47418d9Smrg      AS_MKDIR_P([$dirpart/$fdir])
7722e47418d9Smrg      # echo "creating $dirpart/$file"
7723e47418d9Smrg      echo '# dummy' > "$dirpart/$file"
7724e47418d9Smrg    done
772572b676d7Smrg  done
7726e47418d9Smrg}
772772b676d7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
772872b676d7Smrg
772972b676d7Smrg
773072b676d7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
773172b676d7Smrg# -----------------------------
773272b676d7Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
773372b676d7Smrg#
773472b676d7Smrg# This code is only required when automatic dependency tracking
773572b676d7Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
773672b676d7Smrg# need in order to bootstrap the dependency handling code.
773772b676d7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
773872b676d7Smrg[AC_CONFIG_COMMANDS([depfiles],
773972b676d7Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
774072b676d7Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
774172b676d7Smrg])
774272b676d7Smrg
774372b676d7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
774472b676d7Smrg# Free Software Foundation, Inc.
774572b676d7Smrg#
774672b676d7Smrg# This file is free software; the Free Software Foundation
774772b676d7Smrg# gives unlimited permission to copy and/or distribute it,
774872b676d7Smrg# with or without modifications, as long as this notice is preserved.
774972b676d7Smrg
775072b676d7Smrg# serial 8
775172b676d7Smrg
775272b676d7Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
775372b676d7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
775472b676d7Smrg
775572b676d7Smrg# Do all the work for Automake.                             -*- Autoconf -*-
775672b676d7Smrg
77571fd23544Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
7758e47418d9Smrg# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
775972b676d7Smrg#
776072b676d7Smrg# This file is free software; the Free Software Foundation
776172b676d7Smrg# gives unlimited permission to copy and/or distribute it,
776272b676d7Smrg# with or without modifications, as long as this notice is preserved.
776372b676d7Smrg
7764e47418d9Smrg# serial 16
776572b676d7Smrg
776672b676d7Smrg# This macro actually does too much.  Some checks are only needed if
776772b676d7Smrg# your package does certain things.  But this isn't really a big deal.
776872b676d7Smrg
776972b676d7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
777072b676d7Smrg# AM_INIT_AUTOMAKE([OPTIONS])
777172b676d7Smrg# -----------------------------------------------
777272b676d7Smrg# The call with PACKAGE and VERSION arguments is the old style
777372b676d7Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
777472b676d7Smrg# and VERSION should now be passed to AC_INIT and removed from
777572b676d7Smrg# the call to AM_INIT_AUTOMAKE.
777672b676d7Smrg# We support both call styles for the transition.  After
777772b676d7Smrg# the next Automake release, Autoconf can make the AC_INIT
777872b676d7Smrg# arguments mandatory, and then we can depend on a new Autoconf
777972b676d7Smrg# release and drop the old call support.
778072b676d7SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
7781e47418d9Smrg[AC_PREREQ([2.62])dnl
778272b676d7Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
778372b676d7Smrgdnl the ones we care about.
778472b676d7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
778572b676d7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
778672b676d7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
77871fd23544Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
77881fd23544Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
77891fd23544Smrg  # is not polluted with repeated "-I."
77901fd23544Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
77911fd23544Smrg  # test to see if srcdir already configured
77921fd23544Smrg  if test -f $srcdir/config.status; then
77931fd23544Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
77941fd23544Smrg  fi
779572b676d7Smrgfi
779672b676d7Smrg
779772b676d7Smrg# test whether we have cygpath
779872b676d7Smrgif test -z "$CYGPATH_W"; then
779972b676d7Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
780072b676d7Smrg    CYGPATH_W='cygpath -w'
780172b676d7Smrg  else
780272b676d7Smrg    CYGPATH_W=echo
780372b676d7Smrg  fi
780472b676d7Smrgfi
780572b676d7SmrgAC_SUBST([CYGPATH_W])
780672b676d7Smrg
780772b676d7Smrg# Define the identity of the package.
780872b676d7Smrgdnl Distinguish between old-style and new-style calls.
780972b676d7Smrgm4_ifval([$2],
781072b676d7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
781172b676d7Smrg AC_SUBST([PACKAGE], [$1])dnl
781272b676d7Smrg AC_SUBST([VERSION], [$2])],
781372b676d7Smrg[_AM_SET_OPTIONS([$1])dnl
78141fd23544Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
78151fd23544Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
78161fd23544Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
781772b676d7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
781872b676d7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
781972b676d7Smrg
782072b676d7Smrg_AM_IF_OPTION([no-define],,
782172b676d7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
782272b676d7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
782372b676d7Smrg
782472b676d7Smrg# Some tools Automake needs.
782572b676d7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
782672b676d7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
782772b676d7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
782872b676d7SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
782972b676d7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
783072b676d7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
783172b676d7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
7832e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7833e47418d9SmrgAC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
783472b676d7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
783572b676d7Smrg# We need awk for the "check" target.  The system "awk" is bad on
783672b676d7Smrg# some platforms.
783772b676d7SmrgAC_REQUIRE([AC_PROG_AWK])dnl
783872b676d7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
783972b676d7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
784072b676d7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7841e47418d9Smrg	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7842e47418d9Smrg			     [_AM_PROG_TAR([v7])])])
784372b676d7Smrg_AM_IF_OPTION([no-dependencies],,
784472b676d7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
7845e47418d9Smrg		  [_AM_DEPENDENCIES(CC)],
7846e47418d9Smrg		  [define([AC_PROG_CC],
7847e47418d9Smrg			  defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
784872b676d7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
7849e47418d9Smrg		  [_AM_DEPENDENCIES(CXX)],
7850e47418d9Smrg		  [define([AC_PROG_CXX],
7851e47418d9Smrg			  defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
78521fd23544SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
7853e47418d9Smrg		  [_AM_DEPENDENCIES(OBJC)],
7854e47418d9Smrg		  [define([AC_PROG_OBJC],
7855e47418d9Smrg			  defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
785672b676d7Smrg])
7857e47418d9Smrg_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
7858e47418d9Smrgdnl The `parallel-tests' driver may need to know about EXEEXT, so add the
7859e47418d9Smrgdnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This macro
7860e47418d9Smrgdnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
7861e47418d9SmrgAC_CONFIG_COMMANDS_PRE(dnl
7862e47418d9Smrg[m4_provide_if([_AM_COMPILER_EXEEXT],
7863e47418d9Smrg  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
786472b676d7Smrg])
786572b676d7Smrg
7866e47418d9Smrgdnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
7867e47418d9Smrgdnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
7868e47418d9Smrgdnl mangled by Autoconf and run in a shell conditional statement.
7869e47418d9Smrgm4_define([_AC_COMPILER_EXEEXT],
7870e47418d9Smrgm4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
7871e47418d9Smrg
787272b676d7Smrg
787372b676d7Smrg# When config.status generates a header, we must update the stamp-h file.
787472b676d7Smrg# This file resides in the same directory as the config header
787572b676d7Smrg# that is generated.  The stamp files are numbered to have different names.
787672b676d7Smrg
787772b676d7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
787872b676d7Smrg# loop where config.status creates the headers, so we can generate
787972b676d7Smrg# our stamp files there.
788072b676d7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
788172b676d7Smrg[# Compute $1's index in $config_headers.
78821fd23544Smrg_am_arg=$1
788372b676d7Smrg_am_stamp_count=1
788472b676d7Smrgfor _am_header in $config_headers :; do
788572b676d7Smrg  case $_am_header in
78861fd23544Smrg    $_am_arg | $_am_arg:* )
788772b676d7Smrg      break ;;
788872b676d7Smrg    * )
788972b676d7Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
789072b676d7Smrg  esac
789172b676d7Smrgdone
78921fd23544Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
789372b676d7Smrg
7894e47418d9Smrg# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
789572b676d7Smrg#
789672b676d7Smrg# This file is free software; the Free Software Foundation
789772b676d7Smrg# gives unlimited permission to copy and/or distribute it,
789872b676d7Smrg# with or without modifications, as long as this notice is preserved.
789972b676d7Smrg
790072b676d7Smrg# AM_PROG_INSTALL_SH
790172b676d7Smrg# ------------------
790272b676d7Smrg# Define $install_sh.
790372b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
790472b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7905e47418d9Smrgif test x"${install_sh}" != xset; then
7906e47418d9Smrg  case $am_aux_dir in
7907e47418d9Smrg  *\ * | *\	*)
7908e47418d9Smrg    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
7909e47418d9Smrg  *)
7910e47418d9Smrg    install_sh="\${SHELL} $am_aux_dir/install-sh"
7911e47418d9Smrg  esac
7912e47418d9Smrgfi
791372b676d7SmrgAC_SUBST(install_sh)])
791472b676d7Smrg
791572b676d7Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
791672b676d7Smrg#
791772b676d7Smrg# This file is free software; the Free Software Foundation
791872b676d7Smrg# gives unlimited permission to copy and/or distribute it,
791972b676d7Smrg# with or without modifications, as long as this notice is preserved.
792072b676d7Smrg
792172b676d7Smrg# serial 2
792272b676d7Smrg
792372b676d7Smrg# Check whether the underlying file-system supports filenames
792472b676d7Smrg# with a leading dot.  For instance MS-DOS doesn't.
792572b676d7SmrgAC_DEFUN([AM_SET_LEADING_DOT],
792672b676d7Smrg[rm -rf .tst 2>/dev/null
792772b676d7Smrgmkdir .tst 2>/dev/null
792872b676d7Smrgif test -d .tst; then
792972b676d7Smrg  am__leading_dot=.
793072b676d7Smrgelse
793172b676d7Smrg  am__leading_dot=_
793272b676d7Smrgfi
793372b676d7Smrgrmdir .tst 2>/dev/null
793472b676d7SmrgAC_SUBST([am__leading_dot])])
793572b676d7Smrg
793672b676d7Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
793772b676d7Smrg# From Jim Meyering
793872b676d7Smrg
7939e47418d9Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008
794072b676d7Smrg# Free Software Foundation, Inc.
794172b676d7Smrg#
794272b676d7Smrg# This file is free software; the Free Software Foundation
794372b676d7Smrg# gives unlimited permission to copy and/or distribute it,
794472b676d7Smrg# with or without modifications, as long as this notice is preserved.
794572b676d7Smrg
7946e47418d9Smrg# serial 5
794772b676d7Smrg
7948e47418d9Smrg# AM_MAINTAINER_MODE([DEFAULT-MODE])
7949e47418d9Smrg# ----------------------------------
7950e47418d9Smrg# Control maintainer-specific portions of Makefiles.
7951e47418d9Smrg# Default is to disable them, unless `enable' is passed literally.
7952e47418d9Smrg# For symmetry, `disable' may be passed as well.  Anyway, the user
7953e47418d9Smrg# can override the default with the --enable/--disable switch.
795472b676d7SmrgAC_DEFUN([AM_MAINTAINER_MODE],
7955e47418d9Smrg[m4_case(m4_default([$1], [disable]),
7956e47418d9Smrg       [enable], [m4_define([am_maintainer_other], [disable])],
7957e47418d9Smrg       [disable], [m4_define([am_maintainer_other], [enable])],
7958e47418d9Smrg       [m4_define([am_maintainer_other], [enable])
7959e47418d9Smrg        m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
7960e47418d9SmrgAC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
7961e47418d9Smrg  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
7962e47418d9Smrg  AC_ARG_ENABLE([maintainer-mode],
7963e47418d9Smrg[  --][am_maintainer_other][-maintainer-mode  am_maintainer_other make rules and dependencies not useful
796472b676d7Smrg			  (and sometimes confusing) to the casual installer],
7965e47418d9Smrg      [USE_MAINTAINER_MODE=$enableval],
7966e47418d9Smrg      [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
796772b676d7Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7968e47418d9Smrg  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
796972b676d7Smrg  MAINT=$MAINTAINER_MODE_TRUE
7970e47418d9Smrg  AC_SUBST([MAINT])dnl
797172b676d7Smrg]
797272b676d7Smrg)
797372b676d7Smrg
797472b676d7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
797572b676d7Smrg
797672b676d7Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
797772b676d7Smrg
7978e47418d9Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2009  Free Software Foundation, Inc.
797972b676d7Smrg#
798072b676d7Smrg# This file is free software; the Free Software Foundation
798172b676d7Smrg# gives unlimited permission to copy and/or distribute it,
798272b676d7Smrg# with or without modifications, as long as this notice is preserved.
798372b676d7Smrg
7984e47418d9Smrg# serial 4
798572b676d7Smrg
798672b676d7Smrg# AM_MAKE_INCLUDE()
798772b676d7Smrg# -----------------
798872b676d7Smrg# Check to see how make treats includes.
798972b676d7SmrgAC_DEFUN([AM_MAKE_INCLUDE],
799072b676d7Smrg[am_make=${MAKE-make}
799172b676d7Smrgcat > confinc << 'END'
799272b676d7Smrgam__doit:
7993e47418d9Smrg	@echo this is the am__doit target
799472b676d7Smrg.PHONY: am__doit
799572b676d7SmrgEND
799672b676d7Smrg# If we don't find an include directive, just comment out the code.
799772b676d7SmrgAC_MSG_CHECKING([for style of include used by $am_make])
799872b676d7Smrgam__include="#"
799972b676d7Smrgam__quote=
800072b676d7Smrg_am_result=none
800172b676d7Smrg# First try GNU make style include.
800272b676d7Smrgecho "include confinc" > confmf
8003e47418d9Smrg# Ignore all kinds of additional output from `make'.
8004e47418d9Smrgcase `$am_make -s -f confmf 2> /dev/null` in #(
8005e47418d9Smrg*the\ am__doit\ target*)
8006e47418d9Smrg  am__include=include
8007e47418d9Smrg  am__quote=
8008e47418d9Smrg  _am_result=GNU
8009e47418d9Smrg  ;;
8010e47418d9Smrgesac
801172b676d7Smrg# Now try BSD make style include.
801272b676d7Smrgif test "$am__include" = "#"; then
801372b676d7Smrg   echo '.include "confinc"' > confmf
8014e47418d9Smrg   case `$am_make -s -f confmf 2> /dev/null` in #(
8015e47418d9Smrg   *the\ am__doit\ target*)
8016e47418d9Smrg     am__include=.include
8017e47418d9Smrg     am__quote="\""
8018e47418d9Smrg     _am_result=BSD
8019e47418d9Smrg     ;;
8020e47418d9Smrg   esac
802172b676d7Smrgfi
802272b676d7SmrgAC_SUBST([am__include])
802372b676d7SmrgAC_SUBST([am__quote])
802472b676d7SmrgAC_MSG_RESULT([$_am_result])
802572b676d7Smrgrm -f confinc confmf
802672b676d7Smrg])
802772b676d7Smrg
802872b676d7Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
802972b676d7Smrg
8030e47418d9Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
803172b676d7Smrg# Free Software Foundation, Inc.
803272b676d7Smrg#
803372b676d7Smrg# This file is free software; the Free Software Foundation
803472b676d7Smrg# gives unlimited permission to copy and/or distribute it,
803572b676d7Smrg# with or without modifications, as long as this notice is preserved.
803672b676d7Smrg
8037e47418d9Smrg# serial 6
803872b676d7Smrg
803972b676d7Smrg# AM_MISSING_PROG(NAME, PROGRAM)
804072b676d7Smrg# ------------------------------
804172b676d7SmrgAC_DEFUN([AM_MISSING_PROG],
804272b676d7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
804372b676d7Smrg$1=${$1-"${am_missing_run}$2"}
804472b676d7SmrgAC_SUBST($1)])
804572b676d7Smrg
804672b676d7Smrg
804772b676d7Smrg# AM_MISSING_HAS_RUN
804872b676d7Smrg# ------------------
804972b676d7Smrg# Define MISSING if not defined so far and test if it supports --run.
805072b676d7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
805172b676d7SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
805272b676d7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
80531fd23544SmrgAC_REQUIRE_AUX_FILE([missing])dnl
8054e47418d9Smrgif test x"${MISSING+set}" != xset; then
8055e47418d9Smrg  case $am_aux_dir in
8056e47418d9Smrg  *\ * | *\	*)
8057e47418d9Smrg    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
8058e47418d9Smrg  *)
8059e47418d9Smrg    MISSING="\${SHELL} $am_aux_dir/missing" ;;
8060e47418d9Smrg  esac
8061e47418d9Smrgfi
806272b676d7Smrg# Use eval to expand $SHELL
806372b676d7Smrgif eval "$MISSING --run true"; then
806472b676d7Smrg  am_missing_run="$MISSING --run "
806572b676d7Smrgelse
806672b676d7Smrg  am_missing_run=
806772b676d7Smrg  AC_MSG_WARN([`missing' script is too old or missing])
806872b676d7Smrgfi
806972b676d7Smrg])
807072b676d7Smrg
80711fd23544Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
807272b676d7Smrg#
807372b676d7Smrg# This file is free software; the Free Software Foundation
807472b676d7Smrg# gives unlimited permission to copy and/or distribute it,
807572b676d7Smrg# with or without modifications, as long as this notice is preserved.
807672b676d7Smrg
807772b676d7Smrg# AM_PROG_MKDIR_P
807872b676d7Smrg# ---------------
80791fd23544Smrg# Check for `mkdir -p'.
808072b676d7SmrgAC_DEFUN([AM_PROG_MKDIR_P],
80811fd23544Smrg[AC_PREREQ([2.60])dnl
80821fd23544SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
80831fd23544Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
80841fd23544Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
80851fd23544Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
80861fd23544Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
80871fd23544Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
80881fd23544Smrgdnl adjustment using top_builddir (which is defined more often than
80891fd23544Smrgdnl MKDIR_P).
80901fd23544SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
80911fd23544Smrgcase $mkdir_p in
80921fd23544Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
80931fd23544Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
80941fd23544Smrgesac
80951fd23544Smrg])
809672b676d7Smrg
809772b676d7Smrg# Helper functions for option handling.                     -*- Autoconf -*-
809872b676d7Smrg
8099e47418d9Smrg# Copyright (C) 2001, 2002, 2003, 2005, 2008  Free Software Foundation, Inc.
810072b676d7Smrg#
810172b676d7Smrg# This file is free software; the Free Software Foundation
810272b676d7Smrg# gives unlimited permission to copy and/or distribute it,
810372b676d7Smrg# with or without modifications, as long as this notice is preserved.
810472b676d7Smrg
8105e47418d9Smrg# serial 4
810672b676d7Smrg
810772b676d7Smrg# _AM_MANGLE_OPTION(NAME)
810872b676d7Smrg# -----------------------
810972b676d7SmrgAC_DEFUN([_AM_MANGLE_OPTION],
811072b676d7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
811172b676d7Smrg
811272b676d7Smrg# _AM_SET_OPTION(NAME)
811372b676d7Smrg# ------------------------------
811472b676d7Smrg# Set option NAME.  Presently that only means defining a flag for this option.
811572b676d7SmrgAC_DEFUN([_AM_SET_OPTION],
811672b676d7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
811772b676d7Smrg
811872b676d7Smrg# _AM_SET_OPTIONS(OPTIONS)
811972b676d7Smrg# ----------------------------------
812072b676d7Smrg# OPTIONS is a space-separated list of Automake options.
812172b676d7SmrgAC_DEFUN([_AM_SET_OPTIONS],
8122e47418d9Smrg[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
812372b676d7Smrg
812472b676d7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
812572b676d7Smrg# -------------------------------------------
812672b676d7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
812772b676d7SmrgAC_DEFUN([_AM_IF_OPTION],
812872b676d7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
812972b676d7Smrg
813072b676d7Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
813172b676d7Smrg
8132e47418d9Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
813372b676d7Smrg# Free Software Foundation, Inc.
813472b676d7Smrg#
813572b676d7Smrg# This file is free software; the Free Software Foundation
813672b676d7Smrg# gives unlimited permission to copy and/or distribute it,
813772b676d7Smrg# with or without modifications, as long as this notice is preserved.
813872b676d7Smrg
8139e47418d9Smrg# serial 5
814072b676d7Smrg
814172b676d7Smrg# AM_SANITY_CHECK
814272b676d7Smrg# ---------------
814372b676d7SmrgAC_DEFUN([AM_SANITY_CHECK],
814472b676d7Smrg[AC_MSG_CHECKING([whether build environment is sane])
814572b676d7Smrg# Just in case
814672b676d7Smrgsleep 1
814772b676d7Smrgecho timestamp > conftest.file
8148e47418d9Smrg# Reject unsafe characters in $srcdir or the absolute working directory
8149e47418d9Smrg# name.  Accept space and tab only in the latter.
8150e47418d9Smrgam_lf='
8151e47418d9Smrg'
8152e47418d9Smrgcase `pwd` in
8153e47418d9Smrg  *[[\\\"\#\$\&\'\`$am_lf]]*)
8154e47418d9Smrg    AC_MSG_ERROR([unsafe absolute working directory name]);;
8155e47418d9Smrgesac
8156e47418d9Smrgcase $srcdir in
8157e47418d9Smrg  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
8158e47418d9Smrg    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
8159e47418d9Smrgesac
8160e47418d9Smrg
816172b676d7Smrg# Do `set' in a subshell so we don't clobber the current shell's
816272b676d7Smrg# arguments.  Must try -L first in case configure is actually a
816372b676d7Smrg# symlink; some systems play weird games with the mod time of symlinks
816472b676d7Smrg# (eg FreeBSD returns the mod time of the symlink's containing
816572b676d7Smrg# directory).
816672b676d7Smrgif (
8167e47418d9Smrg   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
816872b676d7Smrg   if test "$[*]" = "X"; then
816972b676d7Smrg      # -L didn't work.
8170e47418d9Smrg      set X `ls -t "$srcdir/configure" conftest.file`
817172b676d7Smrg   fi
817272b676d7Smrg   rm -f conftest.file
817372b676d7Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
817472b676d7Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
817572b676d7Smrg
817672b676d7Smrg      # If neither matched, then we have a broken ls.  This can happen
817772b676d7Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
817872b676d7Smrg      # broken ls alias from the environment.  This has actually
817972b676d7Smrg      # happened.  Such a system could not be considered "sane".
818072b676d7Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
818172b676d7Smrgalias in your environment])
818272b676d7Smrg   fi
818372b676d7Smrg
818472b676d7Smrg   test "$[2]" = conftest.file
818572b676d7Smrg   )
818672b676d7Smrgthen
818772b676d7Smrg   # Ok.
818872b676d7Smrg   :
818972b676d7Smrgelse
819072b676d7Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
819172b676d7SmrgCheck your system clock])
819272b676d7Smrgfi
819372b676d7SmrgAC_MSG_RESULT(yes)])
819472b676d7Smrg
819572b676d7Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
819672b676d7Smrg#
819772b676d7Smrg# This file is free software; the Free Software Foundation
819872b676d7Smrg# gives unlimited permission to copy and/or distribute it,
819972b676d7Smrg# with or without modifications, as long as this notice is preserved.
820072b676d7Smrg
820172b676d7Smrg# AM_PROG_INSTALL_STRIP
820272b676d7Smrg# ---------------------
820372b676d7Smrg# One issue with vendor `install' (even GNU) is that you can't
820472b676d7Smrg# specify the program used to strip binaries.  This is especially
820572b676d7Smrg# annoying in cross-compiling environments, where the build's strip
820672b676d7Smrg# is unlikely to handle the host's binaries.
820772b676d7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
820872b676d7Smrg# always use install-sh in `make install-strip', and initialize
820972b676d7Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
821072b676d7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
821172b676d7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
821272b676d7Smrg# Installed binaries are usually stripped using `strip' when the user
821372b676d7Smrg# run `make install-strip'.  However `strip' might not be the right
821472b676d7Smrg# tool to use in cross-compilation environments, therefore Automake
821572b676d7Smrg# will honor the `STRIP' environment variable to overrule this program.
821672b676d7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
821772b676d7Smrgif test "$cross_compiling" != no; then
821872b676d7Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
821972b676d7Smrgfi
82201fd23544SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
822172b676d7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
822272b676d7Smrg
8223e47418d9Smrg# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
82241fd23544Smrg#
82251fd23544Smrg# This file is free software; the Free Software Foundation
82261fd23544Smrg# gives unlimited permission to copy and/or distribute it,
82271fd23544Smrg# with or without modifications, as long as this notice is preserved.
82281fd23544Smrg
8229e47418d9Smrg# serial 2
8230e47418d9Smrg
82311fd23544Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
82321fd23544Smrg# ---------------------------
82331fd23544Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
82341fd23544Smrg# This macro is traced by Automake.
82351fd23544SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
82361fd23544Smrg
8237e47418d9Smrg# AM_SUBST_NOTMAKE(VARIABLE)
8238e47418d9Smrg# ---------------------------
8239e47418d9Smrg# Public sister of _AM_SUBST_NOTMAKE.
8240e47418d9SmrgAC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
8241e47418d9Smrg
824272b676d7Smrg# Check how to create a tarball.                            -*- Autoconf -*-
824372b676d7Smrg
824472b676d7Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
824572b676d7Smrg#
824672b676d7Smrg# This file is free software; the Free Software Foundation
824772b676d7Smrg# gives unlimited permission to copy and/or distribute it,
824872b676d7Smrg# with or without modifications, as long as this notice is preserved.
824972b676d7Smrg
825072b676d7Smrg# serial 2
825172b676d7Smrg
825272b676d7Smrg# _AM_PROG_TAR(FORMAT)
825372b676d7Smrg# --------------------
825472b676d7Smrg# Check how to create a tarball in format FORMAT.
825572b676d7Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
825672b676d7Smrg#
825772b676d7Smrg# Substitute a variable $(am__tar) that is a command
825872b676d7Smrg# writing to stdout a FORMAT-tarball containing the directory
825972b676d7Smrg# $tardir.
826072b676d7Smrg#     tardir=directory && $(am__tar) > result.tar
826172b676d7Smrg#
826272b676d7Smrg# Substitute a variable $(am__untar) that extract such
826372b676d7Smrg# a tarball read from stdin.
826472b676d7Smrg#     $(am__untar) < result.tar
826572b676d7SmrgAC_DEFUN([_AM_PROG_TAR],
826672b676d7Smrg[# Always define AMTAR for backward compatibility.
826772b676d7SmrgAM_MISSING_PROG([AMTAR], [tar])
826872b676d7Smrgm4_if([$1], [v7],
826972b676d7Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
827072b676d7Smrg     [m4_case([$1], [ustar],, [pax],,
827172b676d7Smrg              [m4_fatal([Unknown tar format])])
827272b676d7SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
827372b676d7Smrg# Loop over all known methods to create a tar archive until one works.
827472b676d7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
827572b676d7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
827672b676d7Smrg# Do not fold the above two line into one, because Tru64 sh and
827772b676d7Smrg# Solaris sh will not grok spaces in the rhs of `-'.
827872b676d7Smrgfor _am_tool in $_am_tools
827972b676d7Smrgdo
828072b676d7Smrg  case $_am_tool in
828172b676d7Smrg  gnutar)
828272b676d7Smrg    for _am_tar in tar gnutar gtar;
828372b676d7Smrg    do
828472b676d7Smrg      AM_RUN_LOG([$_am_tar --version]) && break
828572b676d7Smrg    done
828672b676d7Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
828772b676d7Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
828872b676d7Smrg    am__untar="$_am_tar -xf -"
828972b676d7Smrg    ;;
829072b676d7Smrg  plaintar)
829172b676d7Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
829272b676d7Smrg    # ustar tarball either.
829372b676d7Smrg    (tar --version) >/dev/null 2>&1 && continue
829472b676d7Smrg    am__tar='tar chf - "$$tardir"'
829572b676d7Smrg    am__tar_='tar chf - "$tardir"'
829672b676d7Smrg    am__untar='tar xf -'
829772b676d7Smrg    ;;
829872b676d7Smrg  pax)
829972b676d7Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
830072b676d7Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
830172b676d7Smrg    am__untar='pax -r'
830272b676d7Smrg    ;;
830372b676d7Smrg  cpio)
830472b676d7Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
830572b676d7Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
830672b676d7Smrg    am__untar='cpio -i -H $1 -d'
830772b676d7Smrg    ;;
830872b676d7Smrg  none)
830972b676d7Smrg    am__tar=false
831072b676d7Smrg    am__tar_=false
831172b676d7Smrg    am__untar=false
831272b676d7Smrg    ;;
831372b676d7Smrg  esac
831472b676d7Smrg
831572b676d7Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
831672b676d7Smrg  # and am__untar set.
831772b676d7Smrg  test -n "${am_cv_prog_tar_$1}" && break
831872b676d7Smrg
831972b676d7Smrg  # tar/untar a dummy directory, and stop if the command works
832072b676d7Smrg  rm -rf conftest.dir
832172b676d7Smrg  mkdir conftest.dir
832272b676d7Smrg  echo GrepMe > conftest.dir/file
832372b676d7Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
832472b676d7Smrg  rm -rf conftest.dir
832572b676d7Smrg  if test -s conftest.tar; then
832672b676d7Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
832772b676d7Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
832872b676d7Smrg  fi
832972b676d7Smrgdone
833072b676d7Smrgrm -rf conftest.dir
833172b676d7Smrg
833272b676d7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
833372b676d7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
833472b676d7SmrgAC_SUBST([am__tar])
833572b676d7SmrgAC_SUBST([am__untar])
833672b676d7Smrg]) # _AM_PROG_TAR
833772b676d7Smrg
8338e47418d9Smrgdnl Copyright 2005 Red Hat, Inc
8339e47418d9Smrgdnl 
8340e47418d9Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
8341e47418d9Smrgdnl documentation for any purpose is hereby granted without fee, provided that
8342e47418d9Smrgdnl the above copyright notice appear in all copies and that both that
8343e47418d9Smrgdnl copyright notice and this permission notice appear in supporting
8344e47418d9Smrgdnl documentation.
8345e47418d9Smrgdnl 
8346e47418d9Smrgdnl The above copyright notice and this permission notice shall be included
8347e47418d9Smrgdnl in all copies or substantial portions of the Software.
8348e47418d9Smrgdnl 
8349e47418d9Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8350e47418d9Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
8351e47418d9Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
8352e47418d9Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
8353e47418d9Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
8354e47418d9Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
8355e47418d9Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
8356e47418d9Smrgdnl 
8357e47418d9Smrgdnl Except as contained in this notice, the name of the copyright holders shall
8358e47418d9Smrgdnl not be used in advertising or otherwise to promote the sale, use or
8359e47418d9Smrgdnl other dealings in this Software without prior written authorization
8360e47418d9Smrgdnl from the copyright holders.
8361e47418d9Smrgdnl 
8362e47418d9Smrg
8363e47418d9Smrg# XORG_DRIVER_CHECK_EXT()
8364e47418d9Smrg# --------------------------
8365e47418d9Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
8366e47418d9Smrg# is defined, then add $1 to $REQUIRED_MODULES.
8367e47418d9Smrg
8368e47418d9SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
8369e47418d9Smrg	SAVE_CFLAGS="$CFLAGS"
8370e47418d9Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
8371e47418d9Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
8372e47418d9Smrg#include "xorg-server.h"
8373e47418d9Smrg#if !defined $1
8374e47418d9Smrg#error $1 not defined
8375e47418d9Smrg#endif
8376e47418d9Smrg		]])],
8377e47418d9Smrg		[_EXT_CHECK=yes],
8378e47418d9Smrg		[_EXT_CHECK=no])
8379e47418d9Smrg	CFLAGS="$SAVE_CFLAGS"
8380e47418d9Smrg	AC_MSG_CHECKING([if $1 is defined])
8381e47418d9Smrg	AC_MSG_RESULT([$_EXT_CHECK])
8382e47418d9Smrg	if test "$_EXT_CHECK" != no; then
8383e47418d9Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
8384e47418d9Smrg	fi
8385e47418d9Smrg])
8386e47418d9Smrg
8387