171d7fec4Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
271d7fec4Smrg
371d7fec4Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
471d7fec4Smrg# 2005  Free Software Foundation, Inc.
571d7fec4Smrg# This file is free software; the Free Software Foundation
671d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
771d7fec4Smrg# with or without modifications, as long as this notice is preserved.
871d7fec4Smrg
971d7fec4Smrg# This program is distributed in the hope that it will be useful,
1071d7fec4Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
1171d7fec4Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
1271d7fec4Smrg# PARTICULAR PURPOSE.
1371d7fec4Smrg
1471d7fec4Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
1571d7fec4Smrg
1671d7fec4Smrg# serial 48 AC_PROG_LIBTOOL
1771d7fec4Smrg
1871d7fec4Smrg
1971d7fec4Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
2071d7fec4Smrg# -----------------------------------------------------------
2171d7fec4Smrg# If this macro is not defined by Autoconf, define it here.
2271d7fec4Smrgm4_ifdef([AC_PROVIDE_IFELSE],
2371d7fec4Smrg         [],
2471d7fec4Smrg         [m4_define([AC_PROVIDE_IFELSE],
2571d7fec4Smrg	         [m4_ifdef([AC_PROVIDE_$1],
2671d7fec4Smrg		           [$2], [$3])])])
2771d7fec4Smrg
2871d7fec4Smrg
2971d7fec4Smrg# AC_PROG_LIBTOOL
3071d7fec4Smrg# ---------------
3171d7fec4SmrgAC_DEFUN([AC_PROG_LIBTOOL],
3271d7fec4Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
3371d7fec4Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
3471d7fec4Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
3571d7fec4Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
3671d7fec4Smrg    [AC_LIBTOOL_CXX],
3771d7fec4Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
3871d7fec4Smrg  ])])
3971d7fec4Smrgdnl And a similar setup for Fortran 77 support
4071d7fec4Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
4171d7fec4Smrg    [AC_LIBTOOL_F77],
4271d7fec4Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
4371d7fec4Smrg])])
4471d7fec4Smrg
4571d7fec4Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
4671d7fec4Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
4771d7fec4Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
4871d7fec4Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
4971d7fec4Smrg    [AC_LIBTOOL_GCJ],
5071d7fec4Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
5171d7fec4Smrg      [AC_LIBTOOL_GCJ],
5271d7fec4Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
5371d7fec4Smrg	[AC_LIBTOOL_GCJ],
5471d7fec4Smrg      [ifdef([AC_PROG_GCJ],
5571d7fec4Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5671d7fec4Smrg       ifdef([A][M_PROG_GCJ],
5771d7fec4Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
5871d7fec4Smrg       ifdef([LT_AC_PROG_GCJ],
5971d7fec4Smrg	     [define([LT_AC_PROG_GCJ],
6071d7fec4Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
6171d7fec4Smrg])])# AC_PROG_LIBTOOL
6271d7fec4Smrg
6371d7fec4Smrg
6471d7fec4Smrg# _AC_PROG_LIBTOOL
6571d7fec4Smrg# ----------------
6671d7fec4SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
6771d7fec4Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
6871d7fec4SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
6971d7fec4SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
7071d7fec4SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
7171d7fec4Smrg
7271d7fec4Smrg# This can be used to rebuild libtool when needed
7371d7fec4SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7471d7fec4Smrg
7571d7fec4Smrg# Always use our own libtool.
7671d7fec4SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
7771d7fec4SmrgAC_SUBST(LIBTOOL)dnl
7871d7fec4Smrg
7971d7fec4Smrg# Prevent multiple expansion
8071d7fec4Smrgdefine([AC_PROG_LIBTOOL], [])
8171d7fec4Smrg])# _AC_PROG_LIBTOOL
8271d7fec4Smrg
8371d7fec4Smrg
8471d7fec4Smrg# AC_LIBTOOL_SETUP
8571d7fec4Smrg# ----------------
8671d7fec4SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
8771d7fec4Smrg[AC_PREREQ(2.50)dnl
8871d7fec4SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
8971d7fec4SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
9071d7fec4SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
9171d7fec4SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
9271d7fec4SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
9371d7fec4SmrgAC_REQUIRE([AC_PROG_CC])dnl
9471d7fec4SmrgAC_REQUIRE([AC_PROG_LD])dnl
9571d7fec4SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
9671d7fec4SmrgAC_REQUIRE([AC_PROG_NM])dnl
9771d7fec4Smrg
9871d7fec4SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
9971d7fec4SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
10071d7fec4Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
10171d7fec4SmrgAC_REQUIRE([AC_OBJEXT])dnl
10271d7fec4SmrgAC_REQUIRE([AC_EXEEXT])dnl
10371d7fec4Smrgdnl
10471d7fec4Smrg
10571d7fec4SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
10671d7fec4SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
10771d7fec4SmrgAC_LIBTOOL_OBJDIR
10871d7fec4Smrg
10971d7fec4SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
11071d7fec4Smrg_LT_AC_PROG_ECHO_BACKSLASH
11171d7fec4Smrg
11271d7fec4Smrgcase $host_os in
11371d7fec4Smrgaix3*)
11471d7fec4Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
11571d7fec4Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
11671d7fec4Smrg  # vanish in a puff of smoke.
11771d7fec4Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
11871d7fec4Smrg    COLLECT_NAMES=
11971d7fec4Smrg    export COLLECT_NAMES
12071d7fec4Smrg  fi
12171d7fec4Smrg  ;;
12271d7fec4Smrgesac
12371d7fec4Smrg
12471d7fec4Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
12571d7fec4Smrg# metacharacters that are still active within double-quoted strings.
12671d7fec4SmrgXsed='sed -e 1s/^X//'
12771d7fec4Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
12871d7fec4Smrg
12971d7fec4Smrg# Same as above, but do not quote variable references.
13071d7fec4Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
13171d7fec4Smrg
13271d7fec4Smrg# Sed substitution to delay expansion of an escaped shell variable in a
13371d7fec4Smrg# double_quote_subst'ed string.
13471d7fec4Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
13571d7fec4Smrg
13671d7fec4Smrg# Sed substitution to avoid accidental globbing in evaled expressions
13771d7fec4Smrgno_glob_subst='s/\*/\\\*/g'
13871d7fec4Smrg
13971d7fec4Smrg# Constants:
14071d7fec4Smrgrm="rm -f"
14171d7fec4Smrg
14271d7fec4Smrg# Global variables:
14371d7fec4Smrgdefault_ofile=libtool
14471d7fec4Smrgcan_build_shared=yes
14571d7fec4Smrg
14671d7fec4Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
14771d7fec4Smrg# which needs '.lib').
14871d7fec4Smrglibext=a
14971d7fec4Smrgltmain="$ac_aux_dir/ltmain.sh"
15071d7fec4Smrgofile="$default_ofile"
15171d7fec4Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
15271d7fec4Smrg
15371d7fec4SmrgAC_CHECK_TOOL(AR, ar, false)
15471d7fec4SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
15571d7fec4SmrgAC_CHECK_TOOL(STRIP, strip, :)
15671d7fec4Smrg
15771d7fec4Smrgold_CC="$CC"
15871d7fec4Smrgold_CFLAGS="$CFLAGS"
15971d7fec4Smrg
16071d7fec4Smrg# Set sane defaults for various variables
16171d7fec4Smrgtest -z "$AR" && AR=ar
16271d7fec4Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
16371d7fec4Smrgtest -z "$AS" && AS=as
16471d7fec4Smrgtest -z "$CC" && CC=cc
16571d7fec4Smrgtest -z "$LTCC" && LTCC=$CC
16671d7fec4Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
16771d7fec4Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
16871d7fec4Smrgtest -z "$LD" && LD=ld
16971d7fec4Smrgtest -z "$LN_S" && LN_S="ln -s"
17071d7fec4Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
17171d7fec4Smrgtest -z "$NM" && NM=nm
17271d7fec4Smrgtest -z "$SED" && SED=sed
17371d7fec4Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
17471d7fec4Smrgtest -z "$RANLIB" && RANLIB=:
17571d7fec4Smrgtest -z "$STRIP" && STRIP=:
17671d7fec4Smrgtest -z "$ac_objext" && ac_objext=o
17771d7fec4Smrg
17871d7fec4Smrg# Determine commands to create old-style static archives.
17971d7fec4Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
18071d7fec4Smrgold_postinstall_cmds='chmod 644 $oldlib'
18171d7fec4Smrgold_postuninstall_cmds=
18271d7fec4Smrg
18371d7fec4Smrgif test -n "$RANLIB"; then
18471d7fec4Smrg  case $host_os in
18571d7fec4Smrg  openbsd*)
18671d7fec4Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
18771d7fec4Smrg    ;;
18871d7fec4Smrg  *)
18971d7fec4Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
19071d7fec4Smrg    ;;
19171d7fec4Smrg  esac
19271d7fec4Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
19371d7fec4Smrgfi
19471d7fec4Smrg
19571d7fec4Smrg_LT_CC_BASENAME([$compiler])
19671d7fec4Smrg
19771d7fec4Smrg# Only perform the check for file, if the check method requires it
19871d7fec4Smrgcase $deplibs_check_method in
19971d7fec4Smrgfile_magic*)
20071d7fec4Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
20171d7fec4Smrg    AC_PATH_MAGIC
20271d7fec4Smrg  fi
20371d7fec4Smrg  ;;
20471d7fec4Smrgesac
20571d7fec4Smrg
20671d7fec4SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
20771d7fec4SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
20871d7fec4Smrgenable_win32_dll=yes, enable_win32_dll=no)
20971d7fec4Smrg
21071d7fec4SmrgAC_ARG_ENABLE([libtool-lock],
21171d7fec4Smrg    [AC_HELP_STRING([--disable-libtool-lock],
21271d7fec4Smrg	[avoid locking (might break parallel builds)])])
21371d7fec4Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
21471d7fec4Smrg
21571d7fec4SmrgAC_ARG_WITH([pic],
21671d7fec4Smrg    [AC_HELP_STRING([--with-pic],
21771d7fec4Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
21871d7fec4Smrg    [pic_mode="$withval"],
21971d7fec4Smrg    [pic_mode=default])
22071d7fec4Smrgtest -z "$pic_mode" && pic_mode=default
22171d7fec4Smrg
22271d7fec4Smrg# Use C for the default configuration in the libtool script
22371d7fec4Smrgtagname=
22471d7fec4SmrgAC_LIBTOOL_LANG_C_CONFIG
22571d7fec4Smrg_LT_AC_TAGCONFIG
22671d7fec4Smrg])# AC_LIBTOOL_SETUP
22771d7fec4Smrg
22871d7fec4Smrg
22971d7fec4Smrg# _LT_AC_SYS_COMPILER
23071d7fec4Smrg# -------------------
23171d7fec4SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
23271d7fec4Smrg[AC_REQUIRE([AC_PROG_CC])dnl
23371d7fec4Smrg
23471d7fec4Smrg# If no C compiler was specified, use CC.
23571d7fec4SmrgLTCC=${LTCC-"$CC"}
23671d7fec4Smrg
23771d7fec4Smrg# If no C compiler flags were specified, use CFLAGS.
23871d7fec4SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
23971d7fec4Smrg
24071d7fec4Smrg# Allow CC to be a program name with arguments.
24171d7fec4Smrgcompiler=$CC
24271d7fec4Smrg])# _LT_AC_SYS_COMPILER
24371d7fec4Smrg
24471d7fec4Smrg
24571d7fec4Smrg# _LT_CC_BASENAME(CC)
24671d7fec4Smrg# -------------------
24771d7fec4Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
24871d7fec4SmrgAC_DEFUN([_LT_CC_BASENAME],
24971d7fec4Smrg[for cc_temp in $1""; do
25071d7fec4Smrg  case $cc_temp in
25171d7fec4Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
25271d7fec4Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
25371d7fec4Smrg    \-*) ;;
25471d7fec4Smrg    *) break;;
25571d7fec4Smrg  esac
25671d7fec4Smrgdone
25771d7fec4Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
25871d7fec4Smrg])
25971d7fec4Smrg
26071d7fec4Smrg
26171d7fec4Smrg# _LT_COMPILER_BOILERPLATE
26271d7fec4Smrg# ------------------------
26371d7fec4Smrg# Check for compiler boilerplate output or warnings with
26471d7fec4Smrg# the simple compiler test code.
26571d7fec4SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
26671d7fec4Smrg[ac_outfile=conftest.$ac_objext
26771d7fec4Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
26871d7fec4Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
26971d7fec4Smrg_lt_compiler_boilerplate=`cat conftest.err`
27071d7fec4Smrg$rm conftest*
27171d7fec4Smrg])# _LT_COMPILER_BOILERPLATE
27271d7fec4Smrg
27371d7fec4Smrg
27471d7fec4Smrg# _LT_LINKER_BOILERPLATE
27571d7fec4Smrg# ----------------------
27671d7fec4Smrg# Check for linker boilerplate output or warnings with
27771d7fec4Smrg# the simple link test code.
27871d7fec4SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
27971d7fec4Smrg[ac_outfile=conftest.$ac_objext
28071d7fec4Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
28171d7fec4Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
28271d7fec4Smrg_lt_linker_boilerplate=`cat conftest.err`
28371d7fec4Smrg$rm conftest*
28471d7fec4Smrg])# _LT_LINKER_BOILERPLATE
28571d7fec4Smrg
28671d7fec4Smrg
28771d7fec4Smrg# _LT_AC_SYS_LIBPATH_AIX
28871d7fec4Smrg# ----------------------
28971d7fec4Smrg# Links a minimal program and checks the executable
29071d7fec4Smrg# for the system default hardcoded library path. In most cases,
29171d7fec4Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
29271d7fec4Smrg# the location of the communication and MPI libs are included too.
29371d7fec4Smrg# If we don't find anything, use the default library path according
29471d7fec4Smrg# to the aix ld manual.
29571d7fec4SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
29671d7fec4Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
29771d7fec4Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
29871d7fec4Smrg}'`
29971d7fec4Smrg# Check for a 64-bit object if we didn't find anything.
30071d7fec4Smrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
30171d7fec4Smrg}'`; fi],[])
30271d7fec4Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
30371d7fec4Smrg])# _LT_AC_SYS_LIBPATH_AIX
30471d7fec4Smrg
30571d7fec4Smrg
30671d7fec4Smrg# _LT_AC_SHELL_INIT(ARG)
30771d7fec4Smrg# ----------------------
30871d7fec4SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
30971d7fec4Smrg[ifdef([AC_DIVERSION_NOTICE],
31071d7fec4Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
31171d7fec4Smrg	 [AC_DIVERT_PUSH(NOTICE)])
31271d7fec4Smrg$1
31371d7fec4SmrgAC_DIVERT_POP
31471d7fec4Smrg])# _LT_AC_SHELL_INIT
31571d7fec4Smrg
31671d7fec4Smrg
31771d7fec4Smrg# _LT_AC_PROG_ECHO_BACKSLASH
31871d7fec4Smrg# --------------------------
31971d7fec4Smrg# Add some code to the start of the generated configure script which
32071d7fec4Smrg# will find an echo command which doesn't interpret backslashes.
32171d7fec4SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
32271d7fec4Smrg[_LT_AC_SHELL_INIT([
32371d7fec4Smrg# Check that we are running under the correct shell.
32471d7fec4SmrgSHELL=${CONFIG_SHELL-/bin/sh}
32571d7fec4Smrg
32671d7fec4Smrgcase X$ECHO in
32771d7fec4SmrgX*--fallback-echo)
32871d7fec4Smrg  # Remove one level of quotation (which was required for Make).
32971d7fec4Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
33071d7fec4Smrg  ;;
33171d7fec4Smrgesac
33271d7fec4Smrg
33371d7fec4Smrgecho=${ECHO-echo}
33471d7fec4Smrgif test "X[$]1" = X--no-reexec; then
33571d7fec4Smrg  # Discard the --no-reexec flag, and continue.
33671d7fec4Smrg  shift
33771d7fec4Smrgelif test "X[$]1" = X--fallback-echo; then
33871d7fec4Smrg  # Avoid inline document here, it may be left over
33971d7fec4Smrg  :
34071d7fec4Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
34171d7fec4Smrg  # Yippee, $echo works!
34271d7fec4Smrg  :
34371d7fec4Smrgelse
34471d7fec4Smrg  # Restart under the correct shell.
34571d7fec4Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
34671d7fec4Smrgfi
34771d7fec4Smrg
34871d7fec4Smrgif test "X[$]1" = X--fallback-echo; then
34971d7fec4Smrg  # used as fallback echo
35071d7fec4Smrg  shift
35171d7fec4Smrg  cat <<EOF
35271d7fec4Smrg[$]*
35371d7fec4SmrgEOF
35471d7fec4Smrg  exit 0
35571d7fec4Smrgfi
35671d7fec4Smrg
35771d7fec4Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
35871d7fec4Smrg# if CDPATH is set.
35971d7fec4Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36071d7fec4Smrg
36171d7fec4Smrgif test -z "$ECHO"; then
36271d7fec4Smrgif test "X${echo_test_string+set}" != Xset; then
36371d7fec4Smrg# find a string as large as possible, as long as the shell can cope with it
36471d7fec4Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
36571d7fec4Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
36671d7fec4Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
36771d7fec4Smrg       echo_test_string=`eval $cmd` &&
36871d7fec4Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
36971d7fec4Smrg    then
37071d7fec4Smrg      break
37171d7fec4Smrg    fi
37271d7fec4Smrg  done
37371d7fec4Smrgfi
37471d7fec4Smrg
37571d7fec4Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
37671d7fec4Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
37771d7fec4Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
37871d7fec4Smrg  :
37971d7fec4Smrgelse
38071d7fec4Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
38171d7fec4Smrg  # backslashes.  This makes it impossible to quote backslashes using
38271d7fec4Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
38371d7fec4Smrg  #
38471d7fec4Smrg  # So, first we look for a working echo in the user's PATH.
38571d7fec4Smrg
38671d7fec4Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
38771d7fec4Smrg  for dir in $PATH /usr/ucb; do
38871d7fec4Smrg    IFS="$lt_save_ifs"
38971d7fec4Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
39071d7fec4Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
39171d7fec4Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
39271d7fec4Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
39371d7fec4Smrg      echo="$dir/echo"
39471d7fec4Smrg      break
39571d7fec4Smrg    fi
39671d7fec4Smrg  done
39771d7fec4Smrg  IFS="$lt_save_ifs"
39871d7fec4Smrg
39971d7fec4Smrg  if test "X$echo" = Xecho; then
40071d7fec4Smrg    # We didn't find a better echo, so look for alternatives.
40171d7fec4Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
40271d7fec4Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
40371d7fec4Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
40471d7fec4Smrg      # This shell has a builtin print -r that does the trick.
40571d7fec4Smrg      echo='print -r'
40671d7fec4Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
40771d7fec4Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
40871d7fec4Smrg      # If we have ksh, try running configure again with it.
40971d7fec4Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
41071d7fec4Smrg      export ORIGINAL_CONFIG_SHELL
41171d7fec4Smrg      CONFIG_SHELL=/bin/ksh
41271d7fec4Smrg      export CONFIG_SHELL
41371d7fec4Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
41471d7fec4Smrg    else
41571d7fec4Smrg      # Try using printf.
41671d7fec4Smrg      echo='printf %s\n'
41771d7fec4Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
41871d7fec4Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
41971d7fec4Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
42071d7fec4Smrg	# Cool, printf works
42171d7fec4Smrg	:
42271d7fec4Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
42371d7fec4Smrg	   test "X$echo_testing_string" = 'X\t' &&
42471d7fec4Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
42571d7fec4Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
42671d7fec4Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
42771d7fec4Smrg	export CONFIG_SHELL
42871d7fec4Smrg	SHELL="$CONFIG_SHELL"
42971d7fec4Smrg	export SHELL
43071d7fec4Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
43171d7fec4Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
43271d7fec4Smrg	   test "X$echo_testing_string" = 'X\t' &&
43371d7fec4Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
43471d7fec4Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
43571d7fec4Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
43671d7fec4Smrg      else
43771d7fec4Smrg	# maybe with a smaller string...
43871d7fec4Smrg	prev=:
43971d7fec4Smrg
44071d7fec4Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
44171d7fec4Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
44271d7fec4Smrg	  then
44371d7fec4Smrg	    break
44471d7fec4Smrg	  fi
44571d7fec4Smrg	  prev="$cmd"
44671d7fec4Smrg	done
44771d7fec4Smrg
44871d7fec4Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
44971d7fec4Smrg	  echo_test_string=`eval $prev`
45071d7fec4Smrg	  export echo_test_string
45171d7fec4Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
45271d7fec4Smrg	else
45371d7fec4Smrg	  # Oops.  We lost completely, so just stick with echo.
45471d7fec4Smrg	  echo=echo
45571d7fec4Smrg	fi
45671d7fec4Smrg      fi
45771d7fec4Smrg    fi
45871d7fec4Smrg  fi
45971d7fec4Smrgfi
46071d7fec4Smrgfi
46171d7fec4Smrg
46271d7fec4Smrg# Copy echo and quote the copy suitably for passing to libtool from
46371d7fec4Smrg# the Makefile, instead of quoting the original, which is used later.
46471d7fec4SmrgECHO=$echo
46571d7fec4Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
46671d7fec4Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
46771d7fec4Smrgfi
46871d7fec4Smrg
46971d7fec4SmrgAC_SUBST(ECHO)
47071d7fec4Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
47171d7fec4Smrg
47271d7fec4Smrg
47371d7fec4Smrg# _LT_AC_LOCK
47471d7fec4Smrg# -----------
47571d7fec4SmrgAC_DEFUN([_LT_AC_LOCK],
47671d7fec4Smrg[AC_ARG_ENABLE([libtool-lock],
47771d7fec4Smrg    [AC_HELP_STRING([--disable-libtool-lock],
47871d7fec4Smrg	[avoid locking (might break parallel builds)])])
47971d7fec4Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
48071d7fec4Smrg
48171d7fec4Smrg# Some flags need to be propagated to the compiler or linker for good
48271d7fec4Smrg# libtool support.
48371d7fec4Smrgcase $host in
48471d7fec4Smrgia64-*-hpux*)
48571d7fec4Smrg  # Find out which ABI we are using.
48671d7fec4Smrg  echo 'int i;' > conftest.$ac_ext
48771d7fec4Smrg  if AC_TRY_EVAL(ac_compile); then
48871d7fec4Smrg    case `/usr/bin/file conftest.$ac_objext` in
48971d7fec4Smrg    *ELF-32*)
49071d7fec4Smrg      HPUX_IA64_MODE="32"
49171d7fec4Smrg      ;;
49271d7fec4Smrg    *ELF-64*)
49371d7fec4Smrg      HPUX_IA64_MODE="64"
49471d7fec4Smrg      ;;
49571d7fec4Smrg    esac
49671d7fec4Smrg  fi
49771d7fec4Smrg  rm -rf conftest*
49871d7fec4Smrg  ;;
49971d7fec4Smrg*-*-irix6*)
50071d7fec4Smrg  # Find out which ABI we are using.
50171d7fec4Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
50271d7fec4Smrg  if AC_TRY_EVAL(ac_compile); then
50371d7fec4Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
50471d7fec4Smrg    case `/usr/bin/file conftest.$ac_objext` in
50571d7fec4Smrg    *32-bit*)
50671d7fec4Smrg      LD="${LD-ld} -melf32bsmip"
50771d7fec4Smrg      ;;
50871d7fec4Smrg    *N32*)
50971d7fec4Smrg      LD="${LD-ld} -melf32bmipn32"
51071d7fec4Smrg      ;;
51171d7fec4Smrg    *64-bit*)
51271d7fec4Smrg      LD="${LD-ld} -melf64bmip"
51371d7fec4Smrg      ;;
51471d7fec4Smrg    esac
51571d7fec4Smrg   else
51671d7fec4Smrg    case `/usr/bin/file conftest.$ac_objext` in
51771d7fec4Smrg    *32-bit*)
51871d7fec4Smrg      LD="${LD-ld} -32"
51971d7fec4Smrg      ;;
52071d7fec4Smrg    *N32*)
52171d7fec4Smrg      LD="${LD-ld} -n32"
52271d7fec4Smrg      ;;
52371d7fec4Smrg    *64-bit*)
52471d7fec4Smrg      LD="${LD-ld} -64"
52571d7fec4Smrg      ;;
52671d7fec4Smrg    esac
52771d7fec4Smrg   fi
52871d7fec4Smrg  fi
52971d7fec4Smrg  rm -rf conftest*
53071d7fec4Smrg  ;;
53171d7fec4Smrg
53271d7fec4Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
53371d7fec4Smrg  # Find out which ABI we are using.
53471d7fec4Smrg  echo 'int i;' > conftest.$ac_ext
53571d7fec4Smrg  if AC_TRY_EVAL(ac_compile); then
53671d7fec4Smrg    case `/usr/bin/file conftest.o` in
53771d7fec4Smrg    *32-bit*)
53871d7fec4Smrg      case $host in
53971d7fec4Smrg        x86_64-*linux*)
54071d7fec4Smrg          LD="${LD-ld} -m elf_i386"
54171d7fec4Smrg          ;;
54271d7fec4Smrg        ppc64-*linux*|powerpc64-*linux*)
54371d7fec4Smrg          LD="${LD-ld} -m elf32ppclinux"
54471d7fec4Smrg          ;;
54571d7fec4Smrg        s390x-*linux*)
54671d7fec4Smrg          LD="${LD-ld} -m elf_s390"
54771d7fec4Smrg          ;;
54871d7fec4Smrg        sparc64-*linux*)
54971d7fec4Smrg          LD="${LD-ld} -m elf32_sparc"
55071d7fec4Smrg          ;;
55171d7fec4Smrg      esac
55271d7fec4Smrg      ;;
55371d7fec4Smrg    *64-bit*)
55471d7fec4Smrg      case $host in
55571d7fec4Smrg        x86_64-*linux*)
55671d7fec4Smrg          LD="${LD-ld} -m elf_x86_64"
55771d7fec4Smrg          ;;
55871d7fec4Smrg        ppc*-*linux*|powerpc*-*linux*)
55971d7fec4Smrg          LD="${LD-ld} -m elf64ppc"
56071d7fec4Smrg          ;;
56171d7fec4Smrg        s390*-*linux*)
56271d7fec4Smrg          LD="${LD-ld} -m elf64_s390"
56371d7fec4Smrg          ;;
56471d7fec4Smrg        sparc*-*linux*)
56571d7fec4Smrg          LD="${LD-ld} -m elf64_sparc"
56671d7fec4Smrg          ;;
56771d7fec4Smrg      esac
56871d7fec4Smrg      ;;
56971d7fec4Smrg    esac
57071d7fec4Smrg  fi
57171d7fec4Smrg  rm -rf conftest*
57271d7fec4Smrg  ;;
57371d7fec4Smrg
57471d7fec4Smrg*-*-sco3.2v5*)
57571d7fec4Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
57671d7fec4Smrg  SAVE_CFLAGS="$CFLAGS"
57771d7fec4Smrg  CFLAGS="$CFLAGS -belf"
57871d7fec4Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
57971d7fec4Smrg    [AC_LANG_PUSH(C)
58071d7fec4Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
58171d7fec4Smrg     AC_LANG_POP])
58271d7fec4Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
58371d7fec4Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
58471d7fec4Smrg    CFLAGS="$SAVE_CFLAGS"
58571d7fec4Smrg  fi
58671d7fec4Smrg  ;;
58771d7fec4Smrgsparc*-*solaris*)
58871d7fec4Smrg  # Find out which ABI we are using.
58971d7fec4Smrg  echo 'int i;' > conftest.$ac_ext
59071d7fec4Smrg  if AC_TRY_EVAL(ac_compile); then
59171d7fec4Smrg    case `/usr/bin/file conftest.o` in
59271d7fec4Smrg    *64-bit*)
59371d7fec4Smrg      case $lt_cv_prog_gnu_ld in
59471d7fec4Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
59571d7fec4Smrg      *)    LD="${LD-ld} -64" ;;
59671d7fec4Smrg      esac
59771d7fec4Smrg      ;;
59871d7fec4Smrg    esac
59971d7fec4Smrg  fi
60071d7fec4Smrg  rm -rf conftest*
60171d7fec4Smrg  ;;
60271d7fec4Smrg
60371d7fec4SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
60471d7fec4Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
60571d7fec4Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
60671d7fec4Smrg  AC_CHECK_TOOL(AS, as, false)
60771d7fec4Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
60871d7fec4Smrg  ;;
60971d7fec4Smrg  ])
61071d7fec4Smrgesac
61171d7fec4Smrg
61271d7fec4Smrgneed_locks="$enable_libtool_lock"
61371d7fec4Smrg
61471d7fec4Smrg])# _LT_AC_LOCK
61571d7fec4Smrg
61671d7fec4Smrg
61771d7fec4Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
61871d7fec4Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
61971d7fec4Smrg# ----------------------------------------------------------------
62071d7fec4Smrg# Check whether the given compiler option works
62171d7fec4SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
62271d7fec4Smrg[AC_REQUIRE([LT_AC_PROG_SED])
62371d7fec4SmrgAC_CACHE_CHECK([$1], [$2],
62471d7fec4Smrg  [$2=no
62571d7fec4Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
62671d7fec4Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
62771d7fec4Smrg   lt_compiler_flag="$3"
62871d7fec4Smrg   # Insert the option either (1) after the last *FLAGS variable, or
62971d7fec4Smrg   # (2) before a word containing "conftest.", or (3) at the end.
63071d7fec4Smrg   # Note that $ac_compile itself does not contain backslashes and begins
63171d7fec4Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
63271d7fec4Smrg   # The option is referenced via a variable to avoid confusing sed.
63371d7fec4Smrg   lt_compile=`echo "$ac_compile" | $SED \
63471d7fec4Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
63571d7fec4Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
63671d7fec4Smrg   -e 's:$: $lt_compiler_flag:'`
63771d7fec4Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
63871d7fec4Smrg   (eval "$lt_compile" 2>conftest.err)
63971d7fec4Smrg   ac_status=$?
64071d7fec4Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
64171d7fec4Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
64271d7fec4Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
64371d7fec4Smrg     # The compiler can only warn and ignore the option if not recognized
64471d7fec4Smrg     # So say no if there are warnings other than the usual output.
64571d7fec4Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
64671d7fec4Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
64771d7fec4Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
64871d7fec4Smrg       $2=yes
64971d7fec4Smrg     fi
65071d7fec4Smrg   fi
65171d7fec4Smrg   $rm conftest*
65271d7fec4Smrg])
65371d7fec4Smrg
65471d7fec4Smrgif test x"[$]$2" = xyes; then
65571d7fec4Smrg    ifelse([$5], , :, [$5])
65671d7fec4Smrgelse
65771d7fec4Smrg    ifelse([$6], , :, [$6])
65871d7fec4Smrgfi
65971d7fec4Smrg])# AC_LIBTOOL_COMPILER_OPTION
66071d7fec4Smrg
66171d7fec4Smrg
66271d7fec4Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
66371d7fec4Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
66471d7fec4Smrg# ------------------------------------------------------------
66571d7fec4Smrg# Check whether the given compiler option works
66671d7fec4SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
66771d7fec4Smrg[AC_CACHE_CHECK([$1], [$2],
66871d7fec4Smrg  [$2=no
66971d7fec4Smrg   save_LDFLAGS="$LDFLAGS"
67071d7fec4Smrg   LDFLAGS="$LDFLAGS $3"
67171d7fec4Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
67271d7fec4Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
67371d7fec4Smrg     # The linker can only warn and ignore the option if not recognized
67471d7fec4Smrg     # So say no if there are warnings
67571d7fec4Smrg     if test -s conftest.err; then
67671d7fec4Smrg       # Append any errors to the config.log.
67771d7fec4Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
67871d7fec4Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
67971d7fec4Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
68071d7fec4Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
68171d7fec4Smrg         $2=yes
68271d7fec4Smrg       fi
68371d7fec4Smrg     else
68471d7fec4Smrg       $2=yes
68571d7fec4Smrg     fi
68671d7fec4Smrg   fi
68771d7fec4Smrg   $rm conftest*
68871d7fec4Smrg   LDFLAGS="$save_LDFLAGS"
68971d7fec4Smrg])
69071d7fec4Smrg
69171d7fec4Smrgif test x"[$]$2" = xyes; then
69271d7fec4Smrg    ifelse([$4], , :, [$4])
69371d7fec4Smrgelse
69471d7fec4Smrg    ifelse([$5], , :, [$5])
69571d7fec4Smrgfi
69671d7fec4Smrg])# AC_LIBTOOL_LINKER_OPTION
69771d7fec4Smrg
69871d7fec4Smrg
69971d7fec4Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
70071d7fec4Smrg# --------------------------
70171d7fec4SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
70271d7fec4Smrg[# find the maximum length of command line arguments
70371d7fec4SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
70471d7fec4SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
70571d7fec4Smrg  i=0
70671d7fec4Smrg  teststring="ABCD"
70771d7fec4Smrg
70871d7fec4Smrg  case $build_os in
70971d7fec4Smrg  msdosdjgpp*)
71071d7fec4Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
71171d7fec4Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
71271d7fec4Smrg    # during glob expansion).  Even if it were fixed, the result of this
71371d7fec4Smrg    # check would be larger than it should be.
71471d7fec4Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
71571d7fec4Smrg    ;;
71671d7fec4Smrg
71771d7fec4Smrg  gnu*)
71871d7fec4Smrg    # Under GNU Hurd, this test is not required because there is
71971d7fec4Smrg    # no limit to the length of command line arguments.
72071d7fec4Smrg    # Libtool will interpret -1 as no limit whatsoever
72171d7fec4Smrg    lt_cv_sys_max_cmd_len=-1;
72271d7fec4Smrg    ;;
72371d7fec4Smrg
72471d7fec4Smrg  cygwin* | mingw*)
72571d7fec4Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
72671d7fec4Smrg    # about 5 minutes as the teststring grows exponentially.
72771d7fec4Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
72871d7fec4Smrg    # you end up with a "frozen" computer, even though with patience
72971d7fec4Smrg    # the test eventually succeeds (with a max line length of 256k).
73071d7fec4Smrg    # Instead, let's just punt: use the minimum linelength reported by
73171d7fec4Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
73271d7fec4Smrg    lt_cv_sys_max_cmd_len=8192;
73371d7fec4Smrg    ;;
73471d7fec4Smrg
73571d7fec4Smrg  amigaos*)
73671d7fec4Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
73771d7fec4Smrg    # So we just punt and use a minimum line length of 8192.
73871d7fec4Smrg    lt_cv_sys_max_cmd_len=8192;
73971d7fec4Smrg    ;;
74071d7fec4Smrg
74171d7fec4Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
74271d7fec4Smrg    # This has been around since 386BSD, at least.  Likely further.
74371d7fec4Smrg    if test -x /sbin/sysctl; then
74471d7fec4Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
74571d7fec4Smrg    elif test -x /usr/sbin/sysctl; then
74671d7fec4Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
74771d7fec4Smrg    else
74871d7fec4Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
74971d7fec4Smrg    fi
75071d7fec4Smrg    # And add a safety zone
75171d7fec4Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
75271d7fec4Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
75371d7fec4Smrg    ;;
75471d7fec4Smrg
75571d7fec4Smrg  interix*)
75671d7fec4Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
75771d7fec4Smrg    lt_cv_sys_max_cmd_len=196608
75871d7fec4Smrg    ;;
75971d7fec4Smrg
76071d7fec4Smrg  osf*)
76171d7fec4Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
76271d7fec4Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
76371d7fec4Smrg    # nice to cause kernel panics so lets avoid the loop below.
76471d7fec4Smrg    # First set a reasonable default.
76571d7fec4Smrg    lt_cv_sys_max_cmd_len=16384
76671d7fec4Smrg    #
76771d7fec4Smrg    if test -x /sbin/sysconfig; then
76871d7fec4Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
76971d7fec4Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
77071d7fec4Smrg      esac
77171d7fec4Smrg    fi
77271d7fec4Smrg    ;;
77371d7fec4Smrg  sco3.2v5*)
77471d7fec4Smrg    lt_cv_sys_max_cmd_len=102400
77571d7fec4Smrg    ;;
77671d7fec4Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
77771d7fec4Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
77871d7fec4Smrg    if test -n "$kargmax"; then
77971d7fec4Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
78071d7fec4Smrg    else
78171d7fec4Smrg      lt_cv_sys_max_cmd_len=32768
78271d7fec4Smrg    fi
78371d7fec4Smrg    ;;
78471d7fec4Smrg  *)
78571d7fec4Smrg    # If test is not a shell built-in, we'll probably end up computing a
78671d7fec4Smrg    # maximum length that is only half of the actual maximum length, but
78771d7fec4Smrg    # we can't tell.
78871d7fec4Smrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
78971d7fec4Smrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
79071d7fec4Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
79171d7fec4Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
79271d7fec4Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
79371d7fec4Smrg	    test $i != 17 # 1/2 MB should be enough
79471d7fec4Smrg    do
79571d7fec4Smrg      i=`expr $i + 1`
79671d7fec4Smrg      teststring=$teststring$teststring
79771d7fec4Smrg    done
79871d7fec4Smrg    teststring=
79971d7fec4Smrg    # Add a significant safety factor because C++ compilers can tack on massive
80071d7fec4Smrg    # amounts of additional arguments before passing them to the linker.
80171d7fec4Smrg    # It appears as though 1/2 is a usable value.
80271d7fec4Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
80371d7fec4Smrg    ;;
80471d7fec4Smrg  esac
80571d7fec4Smrg])
80671d7fec4Smrgif test -n $lt_cv_sys_max_cmd_len ; then
80771d7fec4Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
80871d7fec4Smrgelse
80971d7fec4Smrg  AC_MSG_RESULT(none)
81071d7fec4Smrgfi
81171d7fec4Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
81271d7fec4Smrg
81371d7fec4Smrg
81471d7fec4Smrg# _LT_AC_CHECK_DLFCN
81571d7fec4Smrg# ------------------
81671d7fec4SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
81771d7fec4Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
81871d7fec4Smrg])# _LT_AC_CHECK_DLFCN
81971d7fec4Smrg
82071d7fec4Smrg
82171d7fec4Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
82271d7fec4Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
82371d7fec4Smrg# ---------------------------------------------------------------------
82471d7fec4SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
82571d7fec4Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
82671d7fec4Smrgif test "$cross_compiling" = yes; then :
82771d7fec4Smrg  [$4]
82871d7fec4Smrgelse
82971d7fec4Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
83071d7fec4Smrg  lt_status=$lt_dlunknown
83171d7fec4Smrg  cat > conftest.$ac_ext <<EOF
83271d7fec4Smrg[#line __oline__ "configure"
83371d7fec4Smrg#include "confdefs.h"
83471d7fec4Smrg
83571d7fec4Smrg#if HAVE_DLFCN_H
83671d7fec4Smrg#include <dlfcn.h>
83771d7fec4Smrg#endif
83871d7fec4Smrg
83971d7fec4Smrg#include <stdio.h>
84071d7fec4Smrg
84171d7fec4Smrg#ifdef RTLD_GLOBAL
84271d7fec4Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
84371d7fec4Smrg#else
84471d7fec4Smrg#  ifdef DL_GLOBAL
84571d7fec4Smrg#    define LT_DLGLOBAL		DL_GLOBAL
84671d7fec4Smrg#  else
84771d7fec4Smrg#    define LT_DLGLOBAL		0
84871d7fec4Smrg#  endif
84971d7fec4Smrg#endif
85071d7fec4Smrg
85171d7fec4Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
85271d7fec4Smrg   find out it does not work in some platform. */
85371d7fec4Smrg#ifndef LT_DLLAZY_OR_NOW
85471d7fec4Smrg#  ifdef RTLD_LAZY
85571d7fec4Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
85671d7fec4Smrg#  else
85771d7fec4Smrg#    ifdef DL_LAZY
85871d7fec4Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
85971d7fec4Smrg#    else
86071d7fec4Smrg#      ifdef RTLD_NOW
86171d7fec4Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
86271d7fec4Smrg#      else
86371d7fec4Smrg#        ifdef DL_NOW
86471d7fec4Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
86571d7fec4Smrg#        else
86671d7fec4Smrg#          define LT_DLLAZY_OR_NOW	0
86771d7fec4Smrg#        endif
86871d7fec4Smrg#      endif
86971d7fec4Smrg#    endif
87071d7fec4Smrg#  endif
87171d7fec4Smrg#endif
87271d7fec4Smrg
87371d7fec4Smrg#ifdef __cplusplus
87471d7fec4Smrgextern "C" void exit (int);
87571d7fec4Smrg#endif
87671d7fec4Smrg
87771d7fec4Smrgvoid fnord() { int i=42;}
87871d7fec4Smrgint main ()
87971d7fec4Smrg{
88071d7fec4Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
88171d7fec4Smrg  int status = $lt_dlunknown;
88271d7fec4Smrg
88371d7fec4Smrg  if (self)
88471d7fec4Smrg    {
88571d7fec4Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
88671d7fec4Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
88771d7fec4Smrg      /* dlclose (self); */
88871d7fec4Smrg    }
88971d7fec4Smrg  else
89071d7fec4Smrg    puts (dlerror ());
89171d7fec4Smrg
89271d7fec4Smrg    exit (status);
89371d7fec4Smrg}]
89471d7fec4SmrgEOF
89571d7fec4Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
89671d7fec4Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
89771d7fec4Smrg    lt_status=$?
89871d7fec4Smrg    case x$lt_status in
89971d7fec4Smrg      x$lt_dlno_uscore) $1 ;;
90071d7fec4Smrg      x$lt_dlneed_uscore) $2 ;;
90171d7fec4Smrg      x$lt_dlunknown|x*) $3 ;;
90271d7fec4Smrg    esac
90371d7fec4Smrg  else :
90471d7fec4Smrg    # compilation failed
90571d7fec4Smrg    $3
90671d7fec4Smrg  fi
90771d7fec4Smrgfi
90871d7fec4Smrgrm -fr conftest*
90971d7fec4Smrg])# _LT_AC_TRY_DLOPEN_SELF
91071d7fec4Smrg
91171d7fec4Smrg
91271d7fec4Smrg# AC_LIBTOOL_DLOPEN_SELF
91371d7fec4Smrg# ----------------------
91471d7fec4SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
91571d7fec4Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
91671d7fec4Smrgif test "x$enable_dlopen" != xyes; then
91771d7fec4Smrg  enable_dlopen=unknown
91871d7fec4Smrg  enable_dlopen_self=unknown
91971d7fec4Smrg  enable_dlopen_self_static=unknown
92071d7fec4Smrgelse
92171d7fec4Smrg  lt_cv_dlopen=no
92271d7fec4Smrg  lt_cv_dlopen_libs=
92371d7fec4Smrg
92471d7fec4Smrg  case $host_os in
92571d7fec4Smrg  beos*)
92671d7fec4Smrg    lt_cv_dlopen="load_add_on"
92771d7fec4Smrg    lt_cv_dlopen_libs=
92871d7fec4Smrg    lt_cv_dlopen_self=yes
92971d7fec4Smrg    ;;
93071d7fec4Smrg
93171d7fec4Smrg  mingw* | pw32*)
93271d7fec4Smrg    lt_cv_dlopen="LoadLibrary"
93371d7fec4Smrg    lt_cv_dlopen_libs=
93471d7fec4Smrg   ;;
93571d7fec4Smrg
93671d7fec4Smrg  cygwin*)
93771d7fec4Smrg    lt_cv_dlopen="dlopen"
93871d7fec4Smrg    lt_cv_dlopen_libs=
93971d7fec4Smrg   ;;
94071d7fec4Smrg
94171d7fec4Smrg  darwin*)
94271d7fec4Smrg  # if libdl is installed we need to link against it
94371d7fec4Smrg    AC_CHECK_LIB([dl], [dlopen],
94471d7fec4Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
94571d7fec4Smrg    lt_cv_dlopen="dyld"
94671d7fec4Smrg    lt_cv_dlopen_libs=
94771d7fec4Smrg    lt_cv_dlopen_self=yes
94871d7fec4Smrg    ])
94971d7fec4Smrg   ;;
95071d7fec4Smrg
95171d7fec4Smrg  *)
95271d7fec4Smrg    AC_CHECK_FUNC([shl_load],
95371d7fec4Smrg	  [lt_cv_dlopen="shl_load"],
95471d7fec4Smrg      [AC_CHECK_LIB([dld], [shl_load],
95571d7fec4Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
95671d7fec4Smrg	[AC_CHECK_FUNC([dlopen],
95771d7fec4Smrg	      [lt_cv_dlopen="dlopen"],
95871d7fec4Smrg	  [AC_CHECK_LIB([dl], [dlopen],
95971d7fec4Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
96071d7fec4Smrg	    [AC_CHECK_LIB([svld], [dlopen],
96171d7fec4Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
96271d7fec4Smrg	      [AC_CHECK_LIB([dld], [dld_link],
96371d7fec4Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
96471d7fec4Smrg	      ])
96571d7fec4Smrg	    ])
96671d7fec4Smrg	  ])
96771d7fec4Smrg	])
96871d7fec4Smrg      ])
96971d7fec4Smrg    ;;
97071d7fec4Smrg  esac
97171d7fec4Smrg
97271d7fec4Smrg  if test "x$lt_cv_dlopen" != xno; then
97371d7fec4Smrg    enable_dlopen=yes
97471d7fec4Smrg  else
97571d7fec4Smrg    enable_dlopen=no
97671d7fec4Smrg  fi
97771d7fec4Smrg
97871d7fec4Smrg  case $lt_cv_dlopen in
97971d7fec4Smrg  dlopen)
98071d7fec4Smrg    save_CPPFLAGS="$CPPFLAGS"
98171d7fec4Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
98271d7fec4Smrg
98371d7fec4Smrg    save_LDFLAGS="$LDFLAGS"
98471d7fec4Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
98571d7fec4Smrg
98671d7fec4Smrg    save_LIBS="$LIBS"
98771d7fec4Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
98871d7fec4Smrg
98971d7fec4Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
99071d7fec4Smrg	  lt_cv_dlopen_self, [dnl
99171d7fec4Smrg	  _LT_AC_TRY_DLOPEN_SELF(
99271d7fec4Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
99371d7fec4Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
99471d7fec4Smrg    ])
99571d7fec4Smrg
99671d7fec4Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
99771d7fec4Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
99871d7fec4Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
99971d7fec4Smrg    	  lt_cv_dlopen_self_static, [dnl
100071d7fec4Smrg	  _LT_AC_TRY_DLOPEN_SELF(
100171d7fec4Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
100271d7fec4Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
100371d7fec4Smrg      ])
100471d7fec4Smrg    fi
100571d7fec4Smrg
100671d7fec4Smrg    CPPFLAGS="$save_CPPFLAGS"
100771d7fec4Smrg    LDFLAGS="$save_LDFLAGS"
100871d7fec4Smrg    LIBS="$save_LIBS"
100971d7fec4Smrg    ;;
101071d7fec4Smrg  esac
101171d7fec4Smrg
101271d7fec4Smrg  case $lt_cv_dlopen_self in
101371d7fec4Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
101471d7fec4Smrg  *) enable_dlopen_self=unknown ;;
101571d7fec4Smrg  esac
101671d7fec4Smrg
101771d7fec4Smrg  case $lt_cv_dlopen_self_static in
101871d7fec4Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
101971d7fec4Smrg  *) enable_dlopen_self_static=unknown ;;
102071d7fec4Smrg  esac
102171d7fec4Smrgfi
102271d7fec4Smrg])# AC_LIBTOOL_DLOPEN_SELF
102371d7fec4Smrg
102471d7fec4Smrg
102571d7fec4Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
102671d7fec4Smrg# ---------------------------------
102771d7fec4Smrg# Check to see if options -c and -o are simultaneously supported by compiler
102871d7fec4SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
102971d7fec4Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
103071d7fec4SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
103171d7fec4Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
103271d7fec4Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
103371d7fec4Smrg   $rm -r conftest 2>/dev/null
103471d7fec4Smrg   mkdir conftest
103571d7fec4Smrg   cd conftest
103671d7fec4Smrg   mkdir out
103771d7fec4Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
103871d7fec4Smrg
103971d7fec4Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
104071d7fec4Smrg   # Insert the option either (1) after the last *FLAGS variable, or
104171d7fec4Smrg   # (2) before a word containing "conftest.", or (3) at the end.
104271d7fec4Smrg   # Note that $ac_compile itself does not contain backslashes and begins
104371d7fec4Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
104471d7fec4Smrg   lt_compile=`echo "$ac_compile" | $SED \
104571d7fec4Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
104671d7fec4Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
104771d7fec4Smrg   -e 's:$: $lt_compiler_flag:'`
104871d7fec4Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
104971d7fec4Smrg   (eval "$lt_compile" 2>out/conftest.err)
105071d7fec4Smrg   ac_status=$?
105171d7fec4Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
105271d7fec4Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
105371d7fec4Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
105471d7fec4Smrg   then
105571d7fec4Smrg     # The compiler can only warn and ignore the option if not recognized
105671d7fec4Smrg     # So say no if there are warnings
105771d7fec4Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
105871d7fec4Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
105971d7fec4Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
106071d7fec4Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
106171d7fec4Smrg     fi
106271d7fec4Smrg   fi
106371d7fec4Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
106471d7fec4Smrg   $rm conftest*
106571d7fec4Smrg   # SGI C++ compiler will create directory out/ii_files/ for
106671d7fec4Smrg   # template instantiation
106771d7fec4Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
106871d7fec4Smrg   $rm out/* && rmdir out
106971d7fec4Smrg   cd ..
107071d7fec4Smrg   rmdir conftest
107171d7fec4Smrg   $rm conftest*
107271d7fec4Smrg])
107371d7fec4Smrg])# AC_LIBTOOL_PROG_CC_C_O
107471d7fec4Smrg
107571d7fec4Smrg
107671d7fec4Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
107771d7fec4Smrg# -----------------------------------------
107871d7fec4Smrg# Check to see if we can do hard links to lock some files if needed
107971d7fec4SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
108071d7fec4Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
108171d7fec4Smrg
108271d7fec4Smrghard_links="nottested"
108371d7fec4Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
108471d7fec4Smrg  # do not overwrite the value of need_locks provided by the user
108571d7fec4Smrg  AC_MSG_CHECKING([if we can lock with hard links])
108671d7fec4Smrg  hard_links=yes
108771d7fec4Smrg  $rm conftest*
108871d7fec4Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
108971d7fec4Smrg  touch conftest.a
109071d7fec4Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
109171d7fec4Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
109271d7fec4Smrg  AC_MSG_RESULT([$hard_links])
109371d7fec4Smrg  if test "$hard_links" = no; then
109471d7fec4Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
109571d7fec4Smrg    need_locks=warn
109671d7fec4Smrg  fi
109771d7fec4Smrgelse
109871d7fec4Smrg  need_locks=no
109971d7fec4Smrgfi
110071d7fec4Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
110171d7fec4Smrg
110271d7fec4Smrg
110371d7fec4Smrg# AC_LIBTOOL_OBJDIR
110471d7fec4Smrg# -----------------
110571d7fec4SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
110671d7fec4Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
110771d7fec4Smrg[rm -f .libs 2>/dev/null
110871d7fec4Smrgmkdir .libs 2>/dev/null
110971d7fec4Smrgif test -d .libs; then
111071d7fec4Smrg  lt_cv_objdir=.libs
111171d7fec4Smrgelse
111271d7fec4Smrg  # MS-DOS does not allow filenames that begin with a dot.
111371d7fec4Smrg  lt_cv_objdir=_libs
111471d7fec4Smrgfi
111571d7fec4Smrgrmdir .libs 2>/dev/null])
111671d7fec4Smrgobjdir=$lt_cv_objdir
111771d7fec4Smrg])# AC_LIBTOOL_OBJDIR
111871d7fec4Smrg
111971d7fec4Smrg
112071d7fec4Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
112171d7fec4Smrg# ----------------------------------------------
112271d7fec4Smrg# Check hardcoding attributes.
112371d7fec4SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
112471d7fec4Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
112571d7fec4Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
112671d7fec4Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
112771d7fec4Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
112871d7fec4Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
112971d7fec4Smrg
113071d7fec4Smrg  # We can hardcode non-existant directories.
113171d7fec4Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
113271d7fec4Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
113371d7fec4Smrg     # have to relink, otherwise we might link with an installed library
113471d7fec4Smrg     # when we should be linking with a yet-to-be-installed one
113571d7fec4Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
113671d7fec4Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
113771d7fec4Smrg    # Linking always hardcodes the temporary library directory.
113871d7fec4Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
113971d7fec4Smrg  else
114071d7fec4Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
114171d7fec4Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
114271d7fec4Smrg  fi
114371d7fec4Smrgelse
114471d7fec4Smrg  # We cannot hardcode anything, or else we can only hardcode existing
114571d7fec4Smrg  # directories.
114671d7fec4Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
114771d7fec4Smrgfi
114871d7fec4SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
114971d7fec4Smrg
115071d7fec4Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
115171d7fec4Smrg  # Fast installation is not supported
115271d7fec4Smrg  enable_fast_install=no
115371d7fec4Smrgelif test "$shlibpath_overrides_runpath" = yes ||
115471d7fec4Smrg     test "$enable_shared" = no; then
115571d7fec4Smrg  # Fast installation is not necessary
115671d7fec4Smrg  enable_fast_install=needless
115771d7fec4Smrgfi
115871d7fec4Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
115971d7fec4Smrg
116071d7fec4Smrg
116171d7fec4Smrg# AC_LIBTOOL_SYS_LIB_STRIP
116271d7fec4Smrg# ------------------------
116371d7fec4SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
116471d7fec4Smrg[striplib=
116571d7fec4Smrgold_striplib=
116671d7fec4SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
116771d7fec4Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
116871d7fec4Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
116971d7fec4Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
117071d7fec4Smrg  AC_MSG_RESULT([yes])
117171d7fec4Smrgelse
117271d7fec4Smrg# FIXME - insert some real tests, host_os isn't really good enough
117371d7fec4Smrg  case $host_os in
117471d7fec4Smrg   darwin*)
117571d7fec4Smrg       if test -n "$STRIP" ; then
117671d7fec4Smrg         striplib="$STRIP -x"
117771d7fec4Smrg         AC_MSG_RESULT([yes])
117871d7fec4Smrg       else
117971d7fec4Smrg  AC_MSG_RESULT([no])
118071d7fec4Smrgfi
118171d7fec4Smrg       ;;
118271d7fec4Smrg   *)
118371d7fec4Smrg  AC_MSG_RESULT([no])
118471d7fec4Smrg    ;;
118571d7fec4Smrg  esac
118671d7fec4Smrgfi
118771d7fec4Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
118871d7fec4Smrg
118971d7fec4Smrg
119071d7fec4Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
119171d7fec4Smrg# -----------------------------
119271d7fec4Smrg# PORTME Fill in your ld.so characteristics
119371d7fec4SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
119471d7fec4Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
119571d7fec4Smrglibrary_names_spec=
119671d7fec4Smrglibname_spec='lib$name'
119771d7fec4Smrgsoname_spec=
119871d7fec4Smrgshrext_cmds=".so"
119971d7fec4Smrgpostinstall_cmds=
120071d7fec4Smrgpostuninstall_cmds=
120171d7fec4Smrgfinish_cmds=
120271d7fec4Smrgfinish_eval=
120371d7fec4Smrgshlibpath_var=
120471d7fec4Smrgshlibpath_overrides_runpath=unknown
120571d7fec4Smrgversion_type=none
120671d7fec4Smrgdynamic_linker="$host_os ld.so"
120771d7fec4Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
120871d7fec4Smrgif test "$GCC" = yes; then
120971d7fec4Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
121071d7fec4Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
121171d7fec4Smrg    # if the path contains ";" then we assume it to be the separator
121271d7fec4Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
121371d7fec4Smrg    # assumed that no part of a normal pathname contains ";" but that should
121471d7fec4Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
121571d7fec4Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
121671d7fec4Smrg  else
121771d7fec4Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
121871d7fec4Smrg  fi
121971d7fec4Smrgelse
122071d7fec4Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
122171d7fec4Smrgfi
122271d7fec4Smrgneed_lib_prefix=unknown
122371d7fec4Smrghardcode_into_libs=no
122471d7fec4Smrg
122571d7fec4Smrg# when you set need_version to no, make sure it does not cause -set_version
122671d7fec4Smrg# flags to be left without arguments
122771d7fec4Smrgneed_version=unknown
122871d7fec4Smrg
122971d7fec4Smrgcase $host_os in
123071d7fec4Smrgaix3*)
123171d7fec4Smrg  version_type=linux
123271d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
123371d7fec4Smrg  shlibpath_var=LIBPATH
123471d7fec4Smrg
123571d7fec4Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
123671d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
123771d7fec4Smrg  ;;
123871d7fec4Smrg
123971d7fec4Smrgaix4* | aix5*)
124071d7fec4Smrg  version_type=linux
124171d7fec4Smrg  need_lib_prefix=no
124271d7fec4Smrg  need_version=no
124371d7fec4Smrg  hardcode_into_libs=yes
124471d7fec4Smrg  if test "$host_cpu" = ia64; then
124571d7fec4Smrg    # AIX 5 supports IA64
124671d7fec4Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
124771d7fec4Smrg    shlibpath_var=LD_LIBRARY_PATH
124871d7fec4Smrg  else
124971d7fec4Smrg    # With GCC up to 2.95.x, collect2 would create an import file
125071d7fec4Smrg    # for dependence libraries.  The import file would start with
125171d7fec4Smrg    # the line `#! .'.  This would cause the generated library to
125271d7fec4Smrg    # depend on `.', always an invalid library.  This was fixed in
125371d7fec4Smrg    # development snapshots of GCC prior to 3.0.
125471d7fec4Smrg    case $host_os in
125571d7fec4Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
125671d7fec4Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
125771d7fec4Smrg	   echo ' yes '
125871d7fec4Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
125971d7fec4Smrg	:
126071d7fec4Smrg      else
126171d7fec4Smrg	can_build_shared=no
126271d7fec4Smrg      fi
126371d7fec4Smrg      ;;
126471d7fec4Smrg    esac
126571d7fec4Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
126671d7fec4Smrg    # soname into executable. Probably we can add versioning support to
126771d7fec4Smrg    # collect2, so additional links can be useful in future.
126871d7fec4Smrg    if test "$aix_use_runtimelinking" = yes; then
126971d7fec4Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
127071d7fec4Smrg      # instead of lib<name>.a to let people know that these are not
127171d7fec4Smrg      # typical AIX shared libraries.
127271d7fec4Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
127371d7fec4Smrg    else
127471d7fec4Smrg      # We preserve .a as extension for shared libraries through AIX4.2
127571d7fec4Smrg      # and later when we are not doing run time linking.
127671d7fec4Smrg      library_names_spec='${libname}${release}.a $libname.a'
127771d7fec4Smrg      soname_spec='${libname}${release}${shared_ext}$major'
127871d7fec4Smrg    fi
127971d7fec4Smrg    shlibpath_var=LIBPATH
128071d7fec4Smrg  fi
128171d7fec4Smrg  ;;
128271d7fec4Smrg
128371d7fec4Smrgamigaos*)
128471d7fec4Smrg  library_names_spec='$libname.ixlibrary $libname.a'
128571d7fec4Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
128671d7fec4Smrg  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'
128771d7fec4Smrg  ;;
128871d7fec4Smrg
128971d7fec4Smrgbeos*)
129071d7fec4Smrg  library_names_spec='${libname}${shared_ext}'
129171d7fec4Smrg  dynamic_linker="$host_os ld.so"
129271d7fec4Smrg  shlibpath_var=LIBRARY_PATH
129371d7fec4Smrg  ;;
129471d7fec4Smrg
129571d7fec4Smrgbsdi[[45]]*)
129671d7fec4Smrg  version_type=linux
129771d7fec4Smrg  need_version=no
129871d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
129971d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
130071d7fec4Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
130171d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
130271d7fec4Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
130371d7fec4Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
130471d7fec4Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
130571d7fec4Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
130671d7fec4Smrg  # libtool to hard-code these into programs
130771d7fec4Smrg  ;;
130871d7fec4Smrg
130971d7fec4Smrgcygwin* | mingw* | pw32*)
131071d7fec4Smrg  version_type=windows
131171d7fec4Smrg  shrext_cmds=".dll"
131271d7fec4Smrg  need_version=no
131371d7fec4Smrg  need_lib_prefix=no
131471d7fec4Smrg
131571d7fec4Smrg  case $GCC,$host_os in
131671d7fec4Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
131771d7fec4Smrg    library_names_spec='$libname.dll.a'
131871d7fec4Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
131971d7fec4Smrg    postinstall_cmds='base_file=`basename \${file}`~
132071d7fec4Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
132171d7fec4Smrg      dldir=$destdir/`dirname \$dlpath`~
132271d7fec4Smrg      test -d \$dldir || mkdir -p \$dldir~
132371d7fec4Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
132471d7fec4Smrg      chmod a+x \$dldir/$dlname'
132571d7fec4Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
132671d7fec4Smrg      dlpath=$dir/\$dldll~
132771d7fec4Smrg       $rm \$dlpath'
132871d7fec4Smrg    shlibpath_overrides_runpath=yes
132971d7fec4Smrg
133071d7fec4Smrg    case $host_os in
133171d7fec4Smrg    cygwin*)
133271d7fec4Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
133371d7fec4Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
133471d7fec4Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
133571d7fec4Smrg      ;;
133671d7fec4Smrg    mingw*)
133771d7fec4Smrg      # MinGW DLLs use traditional 'lib' prefix
133871d7fec4Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
133971d7fec4Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
134071d7fec4Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
134171d7fec4Smrg        # It is most probably a Windows format PATH printed by
134271d7fec4Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
134371d7fec4Smrg        # path with ; separators, and with drive letters. We can handle the
134471d7fec4Smrg        # drive letters (cygwin fileutils understands them), so leave them,
134571d7fec4Smrg        # especially as we might pass files found there to a mingw objdump,
134671d7fec4Smrg        # which wouldn't understand a cygwinified path. Ahh.
134771d7fec4Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
134871d7fec4Smrg      else
134971d7fec4Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
135071d7fec4Smrg      fi
135171d7fec4Smrg      ;;
135271d7fec4Smrg    pw32*)
135371d7fec4Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
135471d7fec4Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
135571d7fec4Smrg      ;;
135671d7fec4Smrg    esac
135771d7fec4Smrg    ;;
135871d7fec4Smrg
135971d7fec4Smrg  *)
136071d7fec4Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
136171d7fec4Smrg    ;;
136271d7fec4Smrg  esac
136371d7fec4Smrg  dynamic_linker='Win32 ld.exe'
136471d7fec4Smrg  # FIXME: first we should search . and the directory the executable is in
136571d7fec4Smrg  shlibpath_var=PATH
136671d7fec4Smrg  ;;
136771d7fec4Smrg
136871d7fec4Smrgdarwin* | rhapsody*)
136971d7fec4Smrg  dynamic_linker="$host_os dyld"
137071d7fec4Smrg  version_type=darwin
137171d7fec4Smrg  need_lib_prefix=no
137271d7fec4Smrg  need_version=no
137371d7fec4Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
137471d7fec4Smrg  soname_spec='${libname}${release}${major}$shared_ext'
137571d7fec4Smrg  shlibpath_overrides_runpath=yes
137671d7fec4Smrg  shlibpath_var=DYLD_LIBRARY_PATH
137771d7fec4Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
137871d7fec4Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
137971d7fec4Smrg  if test "$GCC" = yes; then
138071d7fec4Smrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
138171d7fec4Smrg  else
138271d7fec4Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
138371d7fec4Smrg  fi
138471d7fec4Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
138571d7fec4Smrg  ;;
138671d7fec4Smrg
138771d7fec4Smrgdgux*)
138871d7fec4Smrg  version_type=linux
138971d7fec4Smrg  need_lib_prefix=no
139071d7fec4Smrg  need_version=no
139171d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
139271d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
139371d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
139471d7fec4Smrg  ;;
139571d7fec4Smrg
139671d7fec4Smrgfreebsd1*)
139771d7fec4Smrg  dynamic_linker=no
139871d7fec4Smrg  ;;
139971d7fec4Smrg
140071d7fec4Smrgkfreebsd*-gnu)
140171d7fec4Smrg  version_type=linux
140271d7fec4Smrg  need_lib_prefix=no
140371d7fec4Smrg  need_version=no
140471d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
140571d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
140671d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
140771d7fec4Smrg  shlibpath_overrides_runpath=no
140871d7fec4Smrg  hardcode_into_libs=yes
140971d7fec4Smrg  dynamic_linker='GNU ld.so'
141071d7fec4Smrg  ;;
141171d7fec4Smrg
141271d7fec4Smrgfreebsd* | dragonfly*)
141371d7fec4Smrg  # DragonFly does not have aout.  When/if they implement a new
141471d7fec4Smrg  # versioning mechanism, adjust this.
141571d7fec4Smrg  if test -x /usr/bin/objformat; then
141671d7fec4Smrg    objformat=`/usr/bin/objformat`
141771d7fec4Smrg  else
141871d7fec4Smrg    case $host_os in
141971d7fec4Smrg    freebsd[[123]]*) objformat=aout ;;
142071d7fec4Smrg    *) objformat=elf ;;
142171d7fec4Smrg    esac
142271d7fec4Smrg  fi
142371d7fec4Smrg  version_type=freebsd-$objformat
142471d7fec4Smrg  case $version_type in
142571d7fec4Smrg    freebsd-elf*)
142671d7fec4Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
142771d7fec4Smrg      need_version=no
142871d7fec4Smrg      need_lib_prefix=no
142971d7fec4Smrg      ;;
143071d7fec4Smrg    freebsd-*)
143171d7fec4Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
143271d7fec4Smrg      need_version=yes
143371d7fec4Smrg      ;;
143471d7fec4Smrg  esac
143571d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
143671d7fec4Smrg  case $host_os in
143771d7fec4Smrg  freebsd2*)
143871d7fec4Smrg    shlibpath_overrides_runpath=yes
143971d7fec4Smrg    ;;
144071d7fec4Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
144171d7fec4Smrg    shlibpath_overrides_runpath=yes
144271d7fec4Smrg    hardcode_into_libs=yes
144371d7fec4Smrg    ;;
144471d7fec4Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
144571d7fec4Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
144671d7fec4Smrg    shlibpath_overrides_runpath=no
144771d7fec4Smrg    hardcode_into_libs=yes
144871d7fec4Smrg    ;;
144971d7fec4Smrg  freebsd*) # from 4.6 on
145071d7fec4Smrg    shlibpath_overrides_runpath=yes
145171d7fec4Smrg    hardcode_into_libs=yes
145271d7fec4Smrg    ;;
145371d7fec4Smrg  esac
145471d7fec4Smrg  ;;
145571d7fec4Smrg
145671d7fec4Smrggnu*)
145771d7fec4Smrg  version_type=linux
145871d7fec4Smrg  need_lib_prefix=no
145971d7fec4Smrg  need_version=no
146071d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
146171d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
146271d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
146371d7fec4Smrg  hardcode_into_libs=yes
146471d7fec4Smrg  ;;
146571d7fec4Smrg
146671d7fec4Smrghpux9* | hpux10* | hpux11*)
146771d7fec4Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
146871d7fec4Smrg  # link against other versions.
146971d7fec4Smrg  version_type=sunos
147071d7fec4Smrg  need_lib_prefix=no
147171d7fec4Smrg  need_version=no
147271d7fec4Smrg  case $host_cpu in
147371d7fec4Smrg  ia64*)
147471d7fec4Smrg    shrext_cmds='.so'
147571d7fec4Smrg    hardcode_into_libs=yes
147671d7fec4Smrg    dynamic_linker="$host_os dld.so"
147771d7fec4Smrg    shlibpath_var=LD_LIBRARY_PATH
147871d7fec4Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
147971d7fec4Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
148071d7fec4Smrg    soname_spec='${libname}${release}${shared_ext}$major'
148171d7fec4Smrg    if test "X$HPUX_IA64_MODE" = X32; then
148271d7fec4Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
148371d7fec4Smrg    else
148471d7fec4Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
148571d7fec4Smrg    fi
148671d7fec4Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
148771d7fec4Smrg    ;;
148871d7fec4Smrg   hppa*64*)
148971d7fec4Smrg     shrext_cmds='.sl'
149071d7fec4Smrg     hardcode_into_libs=yes
149171d7fec4Smrg     dynamic_linker="$host_os dld.sl"
149271d7fec4Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
149371d7fec4Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
149471d7fec4Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
149571d7fec4Smrg     soname_spec='${libname}${release}${shared_ext}$major'
149671d7fec4Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
149771d7fec4Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
149871d7fec4Smrg     ;;
149971d7fec4Smrg   *)
150071d7fec4Smrg    shrext_cmds='.sl'
150171d7fec4Smrg    dynamic_linker="$host_os dld.sl"
150271d7fec4Smrg    shlibpath_var=SHLIB_PATH
150371d7fec4Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
150471d7fec4Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
150571d7fec4Smrg    soname_spec='${libname}${release}${shared_ext}$major'
150671d7fec4Smrg    ;;
150771d7fec4Smrg  esac
150871d7fec4Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
150971d7fec4Smrg  postinstall_cmds='chmod 555 $lib'
151071d7fec4Smrg  ;;
151171d7fec4Smrg
151271d7fec4Smrginterix3*)
151371d7fec4Smrg  version_type=linux
151471d7fec4Smrg  need_lib_prefix=no
151571d7fec4Smrg  need_version=no
151671d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
151771d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
151871d7fec4Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
151971d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
152071d7fec4Smrg  shlibpath_overrides_runpath=no
152171d7fec4Smrg  hardcode_into_libs=yes
152271d7fec4Smrg  ;;
152371d7fec4Smrg
152471d7fec4Smrgirix5* | irix6* | nonstopux*)
152571d7fec4Smrg  case $host_os in
152671d7fec4Smrg    nonstopux*) version_type=nonstopux ;;
152771d7fec4Smrg    *)
152871d7fec4Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
152971d7fec4Smrg		version_type=linux
153071d7fec4Smrg	else
153171d7fec4Smrg		version_type=irix
153271d7fec4Smrg	fi ;;
153371d7fec4Smrg  esac
153471d7fec4Smrg  need_lib_prefix=no
153571d7fec4Smrg  need_version=no
153671d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
153771d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
153871d7fec4Smrg  case $host_os in
153971d7fec4Smrg  irix5* | nonstopux*)
154071d7fec4Smrg    libsuff= shlibsuff=
154171d7fec4Smrg    ;;
154271d7fec4Smrg  *)
154371d7fec4Smrg    case $LD in # libtool.m4 will add one of these switches to LD
154471d7fec4Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
154571d7fec4Smrg      libsuff= shlibsuff= libmagic=32-bit;;
154671d7fec4Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
154771d7fec4Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
154871d7fec4Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
154971d7fec4Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
155071d7fec4Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
155171d7fec4Smrg    esac
155271d7fec4Smrg    ;;
155371d7fec4Smrg  esac
155471d7fec4Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
155571d7fec4Smrg  shlibpath_overrides_runpath=no
155671d7fec4Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
155771d7fec4Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
155871d7fec4Smrg  hardcode_into_libs=yes
155971d7fec4Smrg  ;;
156071d7fec4Smrg
156171d7fec4Smrg# No shared lib support for Linux oldld, aout, or coff.
156271d7fec4Smrglinux*oldld* | linux*aout* | linux*coff*)
156371d7fec4Smrg  dynamic_linker=no
156471d7fec4Smrg  ;;
156571d7fec4Smrg
156671d7fec4Smrg# This must be Linux ELF.
156771d7fec4Smrglinux*)
156871d7fec4Smrg  version_type=linux
156971d7fec4Smrg  need_lib_prefix=no
157071d7fec4Smrg  need_version=no
157171d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
157271d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
157371d7fec4Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
157471d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
157571d7fec4Smrg  shlibpath_overrides_runpath=no
157671d7fec4Smrg  # This implies no fast_install, which is unacceptable.
157771d7fec4Smrg  # Some rework will be needed to allow for fast_install
157871d7fec4Smrg  # before this can be enabled.
157971d7fec4Smrg  hardcode_into_libs=yes
158071d7fec4Smrg
158171d7fec4Smrg  # find out which ABI we are using
158271d7fec4Smrg  libsuff=
158371d7fec4Smrg  case "$host_cpu" in
158471d7fec4Smrg  x86_64*|s390x*|powerpc64*)
158571d7fec4Smrg    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
158671d7fec4Smrg    if AC_TRY_EVAL(ac_compile); then
158771d7fec4Smrg      case `/usr/bin/file conftest.$ac_objext` in
158871d7fec4Smrg      *64-bit*)
158971d7fec4Smrg        libsuff=64
159071d7fec4Smrg        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
159171d7fec4Smrg        ;;
159271d7fec4Smrg      esac
159371d7fec4Smrg    fi
159471d7fec4Smrg    rm -rf conftest*
159571d7fec4Smrg    ;;
159671d7fec4Smrg  esac
159771d7fec4Smrg
159871d7fec4Smrg  # Append ld.so.conf contents to the search path
159971d7fec4Smrg  if test -f /etc/ld.so.conf; then
160071d7fec4Smrg    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/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
160171d7fec4Smrg    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
160271d7fec4Smrg  fi
160371d7fec4Smrg
160471d7fec4Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
160571d7fec4Smrg  # powerpc, because MkLinux only supported shared libraries with the
160671d7fec4Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
160771d7fec4Smrg  # most powerpc-linux boxes support dynamic linking these days and
160871d7fec4Smrg  # people can always --disable-shared, the test was removed, and we
160971d7fec4Smrg  # assume the GNU/Linux dynamic linker is in use.
161071d7fec4Smrg  dynamic_linker='GNU/Linux ld.so'
161171d7fec4Smrg  ;;
161271d7fec4Smrg
161371d7fec4Smrgknetbsd*-gnu)
161471d7fec4Smrg  version_type=linux
161571d7fec4Smrg  need_lib_prefix=no
161671d7fec4Smrg  need_version=no
161771d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
161871d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
161971d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
162071d7fec4Smrg  shlibpath_overrides_runpath=no
162171d7fec4Smrg  hardcode_into_libs=yes
162271d7fec4Smrg  dynamic_linker='GNU ld.so'
162371d7fec4Smrg  ;;
162471d7fec4Smrg
162571d7fec4Smrgnetbsd*)
162671d7fec4Smrg  version_type=sunos
162771d7fec4Smrg  need_lib_prefix=no
162871d7fec4Smrg  need_version=no
162971d7fec4Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
163071d7fec4Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
163171d7fec4Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
163271d7fec4Smrg    dynamic_linker='NetBSD (a.out) ld.so'
163371d7fec4Smrg  else
163471d7fec4Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
163571d7fec4Smrg    soname_spec='${libname}${release}${shared_ext}$major'
163671d7fec4Smrg    dynamic_linker='NetBSD ld.elf_so'
163771d7fec4Smrg  fi
163871d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
163971d7fec4Smrg  shlibpath_overrides_runpath=yes
164071d7fec4Smrg  hardcode_into_libs=yes
164171d7fec4Smrg  ;;
164271d7fec4Smrg
164371d7fec4Smrgnewsos6)
164471d7fec4Smrg  version_type=linux
164571d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
164671d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
164771d7fec4Smrg  shlibpath_overrides_runpath=yes
164871d7fec4Smrg  ;;
164971d7fec4Smrg
165071d7fec4Smrgnto-qnx*)
165171d7fec4Smrg  version_type=linux
165271d7fec4Smrg  need_lib_prefix=no
165371d7fec4Smrg  need_version=no
165471d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
165571d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
165671d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
165771d7fec4Smrg  shlibpath_overrides_runpath=yes
165871d7fec4Smrg  ;;
165971d7fec4Smrg
166071d7fec4Smrgopenbsd*)
166171d7fec4Smrg  version_type=sunos
166271d7fec4Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
166371d7fec4Smrg  need_lib_prefix=no
166471d7fec4Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
166571d7fec4Smrg  case $host_os in
166671d7fec4Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
166771d7fec4Smrg    *)                         need_version=no  ;;
166871d7fec4Smrg  esac
166971d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
167071d7fec4Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
167171d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
167271d7fec4Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
167371d7fec4Smrg    case $host_os in
167471d7fec4Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
167571d7fec4Smrg	shlibpath_overrides_runpath=no
167671d7fec4Smrg	;;
167771d7fec4Smrg      *)
167871d7fec4Smrg	shlibpath_overrides_runpath=yes
167971d7fec4Smrg	;;
168071d7fec4Smrg      esac
168171d7fec4Smrg  else
168271d7fec4Smrg    shlibpath_overrides_runpath=yes
168371d7fec4Smrg  fi
168471d7fec4Smrg  ;;
168571d7fec4Smrg
168671d7fec4Smrgos2*)
168771d7fec4Smrg  libname_spec='$name'
168871d7fec4Smrg  shrext_cmds=".dll"
168971d7fec4Smrg  need_lib_prefix=no
169071d7fec4Smrg  library_names_spec='$libname${shared_ext} $libname.a'
169171d7fec4Smrg  dynamic_linker='OS/2 ld.exe'
169271d7fec4Smrg  shlibpath_var=LIBPATH
169371d7fec4Smrg  ;;
169471d7fec4Smrg
169571d7fec4Smrgosf3* | osf4* | osf5*)
169671d7fec4Smrg  version_type=osf
169771d7fec4Smrg  need_lib_prefix=no
169871d7fec4Smrg  need_version=no
169971d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
170071d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
170171d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
170271d7fec4Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
170371d7fec4Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
170471d7fec4Smrg  ;;
170571d7fec4Smrg
170671d7fec4Smrgsolaris*)
170771d7fec4Smrg  version_type=linux
170871d7fec4Smrg  need_lib_prefix=no
170971d7fec4Smrg  need_version=no
171071d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
171171d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
171271d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
171371d7fec4Smrg  shlibpath_overrides_runpath=yes
171471d7fec4Smrg  hardcode_into_libs=yes
171571d7fec4Smrg  # ldd complains unless libraries are executable
171671d7fec4Smrg  postinstall_cmds='chmod +x $lib'
171771d7fec4Smrg  ;;
171871d7fec4Smrg
171971d7fec4Smrgsunos4*)
172071d7fec4Smrg  version_type=sunos
172171d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
172271d7fec4Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
172371d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
172471d7fec4Smrg  shlibpath_overrides_runpath=yes
172571d7fec4Smrg  if test "$with_gnu_ld" = yes; then
172671d7fec4Smrg    need_lib_prefix=no
172771d7fec4Smrg  fi
172871d7fec4Smrg  need_version=yes
172971d7fec4Smrg  ;;
173071d7fec4Smrg
173171d7fec4Smrgsysv4 | sysv4.3*)
173271d7fec4Smrg  version_type=linux
173371d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
173471d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
173571d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
173671d7fec4Smrg  case $host_vendor in
173771d7fec4Smrg    sni)
173871d7fec4Smrg      shlibpath_overrides_runpath=no
173971d7fec4Smrg      need_lib_prefix=no
174071d7fec4Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
174171d7fec4Smrg      runpath_var=LD_RUN_PATH
174271d7fec4Smrg      ;;
174371d7fec4Smrg    siemens)
174471d7fec4Smrg      need_lib_prefix=no
174571d7fec4Smrg      ;;
174671d7fec4Smrg    motorola)
174771d7fec4Smrg      need_lib_prefix=no
174871d7fec4Smrg      need_version=no
174971d7fec4Smrg      shlibpath_overrides_runpath=no
175071d7fec4Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
175171d7fec4Smrg      ;;
175271d7fec4Smrg  esac
175371d7fec4Smrg  ;;
175471d7fec4Smrg
175571d7fec4Smrgsysv4*MP*)
175671d7fec4Smrg  if test -d /usr/nec ;then
175771d7fec4Smrg    version_type=linux
175871d7fec4Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
175971d7fec4Smrg    soname_spec='$libname${shared_ext}.$major'
176071d7fec4Smrg    shlibpath_var=LD_LIBRARY_PATH
176171d7fec4Smrg  fi
176271d7fec4Smrg  ;;
176371d7fec4Smrg
176471d7fec4Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
176571d7fec4Smrg  version_type=freebsd-elf
176671d7fec4Smrg  need_lib_prefix=no
176771d7fec4Smrg  need_version=no
176871d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
176971d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
177071d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
177171d7fec4Smrg  hardcode_into_libs=yes
177271d7fec4Smrg  if test "$with_gnu_ld" = yes; then
177371d7fec4Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
177471d7fec4Smrg    shlibpath_overrides_runpath=no
177571d7fec4Smrg  else
177671d7fec4Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
177771d7fec4Smrg    shlibpath_overrides_runpath=yes
177871d7fec4Smrg    case $host_os in
177971d7fec4Smrg      sco3.2v5*)
178071d7fec4Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
178171d7fec4Smrg	;;
178271d7fec4Smrg    esac
178371d7fec4Smrg  fi
178471d7fec4Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
178571d7fec4Smrg  ;;
178671d7fec4Smrg
178771d7fec4Smrguts4*)
178871d7fec4Smrg  version_type=linux
178971d7fec4Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
179071d7fec4Smrg  soname_spec='${libname}${release}${shared_ext}$major'
179171d7fec4Smrg  shlibpath_var=LD_LIBRARY_PATH
179271d7fec4Smrg  ;;
179371d7fec4Smrg
179471d7fec4Smrg*)
179571d7fec4Smrg  dynamic_linker=no
179671d7fec4Smrg  ;;
179771d7fec4Smrgesac
179871d7fec4SmrgAC_MSG_RESULT([$dynamic_linker])
179971d7fec4Smrgtest "$dynamic_linker" = no && can_build_shared=no
180071d7fec4Smrg
180171d7fec4Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
180271d7fec4Smrgif test "$GCC" = yes; then
180371d7fec4Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
180471d7fec4Smrgfi
180571d7fec4Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
180671d7fec4Smrg
180771d7fec4Smrg
180871d7fec4Smrg# _LT_AC_TAGCONFIG
180971d7fec4Smrg# ----------------
181071d7fec4SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
181171d7fec4Smrg[AC_ARG_WITH([tags],
181271d7fec4Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
181371d7fec4Smrg        [include additional configurations @<:@automatic@:>@])],
181471d7fec4Smrg    [tagnames="$withval"])
181571d7fec4Smrg
181671d7fec4Smrgif test -f "$ltmain" && test -n "$tagnames"; then
181771d7fec4Smrg  if test ! -f "${ofile}"; then
181871d7fec4Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
181971d7fec4Smrg  fi
182071d7fec4Smrg
182171d7fec4Smrg  if test -z "$LTCC"; then
182271d7fec4Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
182371d7fec4Smrg    if test -z "$LTCC"; then
182471d7fec4Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
182571d7fec4Smrg    else
182671d7fec4Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
182771d7fec4Smrg    fi
182871d7fec4Smrg  fi
182971d7fec4Smrg  if test -z "$LTCFLAGS"; then
183071d7fec4Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
183171d7fec4Smrg  fi
183271d7fec4Smrg
183371d7fec4Smrg  # Extract list of available tagged configurations in $ofile.
183471d7fec4Smrg  # Note that this assumes the entire list is on one line.
183571d7fec4Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
183671d7fec4Smrg
183771d7fec4Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
183871d7fec4Smrg  for tagname in $tagnames; do
183971d7fec4Smrg    IFS="$lt_save_ifs"
184071d7fec4Smrg    # Check whether tagname contains only valid characters
184171d7fec4Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
184271d7fec4Smrg    "") ;;
184371d7fec4Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
184471d7fec4Smrg	;;
184571d7fec4Smrg    esac
184671d7fec4Smrg
184771d7fec4Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
184871d7fec4Smrg    then
184971d7fec4Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
185071d7fec4Smrg    fi
185171d7fec4Smrg
185271d7fec4Smrg    # Update the list of available tags.
185371d7fec4Smrg    if test -n "$tagname"; then
185471d7fec4Smrg      echo appending configuration tag \"$tagname\" to $ofile
185571d7fec4Smrg
185671d7fec4Smrg      case $tagname in
185771d7fec4Smrg      CXX)
185871d7fec4Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
185971d7fec4Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
186071d7fec4Smrg	    (test "X$CXX" != "Xg++"))) ; then
186171d7fec4Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
186271d7fec4Smrg	else
186371d7fec4Smrg	  tagname=""
186471d7fec4Smrg	fi
186571d7fec4Smrg	;;
186671d7fec4Smrg
186771d7fec4Smrg      F77)
186871d7fec4Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
186971d7fec4Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
187071d7fec4Smrg	else
187171d7fec4Smrg	  tagname=""
187271d7fec4Smrg	fi
187371d7fec4Smrg	;;
187471d7fec4Smrg
187571d7fec4Smrg      GCJ)
187671d7fec4Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
187771d7fec4Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
187871d7fec4Smrg	else
187971d7fec4Smrg	  tagname=""
188071d7fec4Smrg	fi
188171d7fec4Smrg	;;
188271d7fec4Smrg
188371d7fec4Smrg      RC)
188471d7fec4Smrg	AC_LIBTOOL_LANG_RC_CONFIG
188571d7fec4Smrg	;;
188671d7fec4Smrg
188771d7fec4Smrg      *)
188871d7fec4Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
188971d7fec4Smrg	;;
189071d7fec4Smrg      esac
189171d7fec4Smrg
189271d7fec4Smrg      # Append the new tag name to the list of available tags.
189371d7fec4Smrg      if test -n "$tagname" ; then
189471d7fec4Smrg      available_tags="$available_tags $tagname"
189571d7fec4Smrg    fi
189671d7fec4Smrg    fi
189771d7fec4Smrg  done
189871d7fec4Smrg  IFS="$lt_save_ifs"
189971d7fec4Smrg
190071d7fec4Smrg  # Now substitute the updated list of available tags.
190171d7fec4Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
190271d7fec4Smrg    mv "${ofile}T" "$ofile"
190371d7fec4Smrg    chmod +x "$ofile"
190471d7fec4Smrg  else
190571d7fec4Smrg    rm -f "${ofile}T"
190671d7fec4Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
190771d7fec4Smrg  fi
190871d7fec4Smrgfi
190971d7fec4Smrg])# _LT_AC_TAGCONFIG
191071d7fec4Smrg
191171d7fec4Smrg
191271d7fec4Smrg# AC_LIBTOOL_DLOPEN
191371d7fec4Smrg# -----------------
191471d7fec4Smrg# enable checks for dlopen support
191571d7fec4SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
191671d7fec4Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
191771d7fec4Smrg])# AC_LIBTOOL_DLOPEN
191871d7fec4Smrg
191971d7fec4Smrg
192071d7fec4Smrg# AC_LIBTOOL_WIN32_DLL
192171d7fec4Smrg# --------------------
192271d7fec4Smrg# declare package support for building win32 DLLs
192371d7fec4SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
192471d7fec4Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
192571d7fec4Smrg])# AC_LIBTOOL_WIN32_DLL
192671d7fec4Smrg
192771d7fec4Smrg
192871d7fec4Smrg# AC_ENABLE_SHARED([DEFAULT])
192971d7fec4Smrg# ---------------------------
193071d7fec4Smrg# implement the --enable-shared flag
193171d7fec4Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
193271d7fec4SmrgAC_DEFUN([AC_ENABLE_SHARED],
193371d7fec4Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
193471d7fec4SmrgAC_ARG_ENABLE([shared],
193571d7fec4Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
193671d7fec4Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
193771d7fec4Smrg    [p=${PACKAGE-default}
193871d7fec4Smrg    case $enableval in
193971d7fec4Smrg    yes) enable_shared=yes ;;
194071d7fec4Smrg    no) enable_shared=no ;;
194171d7fec4Smrg    *)
194271d7fec4Smrg      enable_shared=no
194371d7fec4Smrg      # Look at the argument we got.  We use all the common list separators.
194471d7fec4Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
194571d7fec4Smrg      for pkg in $enableval; do
194671d7fec4Smrg	IFS="$lt_save_ifs"
194771d7fec4Smrg	if test "X$pkg" = "X$p"; then
194871d7fec4Smrg	  enable_shared=yes
194971d7fec4Smrg	fi
195071d7fec4Smrg      done
195171d7fec4Smrg      IFS="$lt_save_ifs"
195271d7fec4Smrg      ;;
195371d7fec4Smrg    esac],
195471d7fec4Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
195571d7fec4Smrg])# AC_ENABLE_SHARED
195671d7fec4Smrg
195771d7fec4Smrg
195871d7fec4Smrg# AC_DISABLE_SHARED
195971d7fec4Smrg# -----------------
196071d7fec4Smrg# set the default shared flag to --disable-shared
196171d7fec4SmrgAC_DEFUN([AC_DISABLE_SHARED],
196271d7fec4Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
196371d7fec4SmrgAC_ENABLE_SHARED(no)
196471d7fec4Smrg])# AC_DISABLE_SHARED
196571d7fec4Smrg
196671d7fec4Smrg
196771d7fec4Smrg# AC_ENABLE_STATIC([DEFAULT])
196871d7fec4Smrg# ---------------------------
196971d7fec4Smrg# implement the --enable-static flag
197071d7fec4Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
197171d7fec4SmrgAC_DEFUN([AC_ENABLE_STATIC],
197271d7fec4Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
197371d7fec4SmrgAC_ARG_ENABLE([static],
197471d7fec4Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
197571d7fec4Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
197671d7fec4Smrg    [p=${PACKAGE-default}
197771d7fec4Smrg    case $enableval in
197871d7fec4Smrg    yes) enable_static=yes ;;
197971d7fec4Smrg    no) enable_static=no ;;
198071d7fec4Smrg    *)
198171d7fec4Smrg     enable_static=no
198271d7fec4Smrg      # Look at the argument we got.  We use all the common list separators.
198371d7fec4Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
198471d7fec4Smrg      for pkg in $enableval; do
198571d7fec4Smrg	IFS="$lt_save_ifs"
198671d7fec4Smrg	if test "X$pkg" = "X$p"; then
198771d7fec4Smrg	  enable_static=yes
198871d7fec4Smrg	fi
198971d7fec4Smrg      done
199071d7fec4Smrg      IFS="$lt_save_ifs"
199171d7fec4Smrg      ;;
199271d7fec4Smrg    esac],
199371d7fec4Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
199471d7fec4Smrg])# AC_ENABLE_STATIC
199571d7fec4Smrg
199671d7fec4Smrg
199771d7fec4Smrg# AC_DISABLE_STATIC
199871d7fec4Smrg# -----------------
199971d7fec4Smrg# set the default static flag to --disable-static
200071d7fec4SmrgAC_DEFUN([AC_DISABLE_STATIC],
200171d7fec4Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
200271d7fec4SmrgAC_ENABLE_STATIC(no)
200371d7fec4Smrg])# AC_DISABLE_STATIC
200471d7fec4Smrg
200571d7fec4Smrg
200671d7fec4Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
200771d7fec4Smrg# ---------------------------------
200871d7fec4Smrg# implement the --enable-fast-install flag
200971d7fec4Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
201071d7fec4SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
201171d7fec4Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
201271d7fec4SmrgAC_ARG_ENABLE([fast-install],
201371d7fec4Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
201471d7fec4Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
201571d7fec4Smrg    [p=${PACKAGE-default}
201671d7fec4Smrg    case $enableval in
201771d7fec4Smrg    yes) enable_fast_install=yes ;;
201871d7fec4Smrg    no) enable_fast_install=no ;;
201971d7fec4Smrg    *)
202071d7fec4Smrg      enable_fast_install=no
202171d7fec4Smrg      # Look at the argument we got.  We use all the common list separators.
202271d7fec4Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
202371d7fec4Smrg      for pkg in $enableval; do
202471d7fec4Smrg	IFS="$lt_save_ifs"
202571d7fec4Smrg	if test "X$pkg" = "X$p"; then
202671d7fec4Smrg	  enable_fast_install=yes
202771d7fec4Smrg	fi
202871d7fec4Smrg      done
202971d7fec4Smrg      IFS="$lt_save_ifs"
203071d7fec4Smrg      ;;
203171d7fec4Smrg    esac],
203271d7fec4Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
203371d7fec4Smrg])# AC_ENABLE_FAST_INSTALL
203471d7fec4Smrg
203571d7fec4Smrg
203671d7fec4Smrg# AC_DISABLE_FAST_INSTALL
203771d7fec4Smrg# -----------------------
203871d7fec4Smrg# set the default to --disable-fast-install
203971d7fec4SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
204071d7fec4Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
204171d7fec4SmrgAC_ENABLE_FAST_INSTALL(no)
204271d7fec4Smrg])# AC_DISABLE_FAST_INSTALL
204371d7fec4Smrg
204471d7fec4Smrg
204571d7fec4Smrg# AC_LIBTOOL_PICMODE([MODE])
204671d7fec4Smrg# --------------------------
204771d7fec4Smrg# implement the --with-pic flag
204871d7fec4Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
204971d7fec4SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
205071d7fec4Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
205171d7fec4Smrgpic_mode=ifelse($#,1,$1,default)
205271d7fec4Smrg])# AC_LIBTOOL_PICMODE
205371d7fec4Smrg
205471d7fec4Smrg
205571d7fec4Smrg# AC_PROG_EGREP
205671d7fec4Smrg# -------------
205771d7fec4Smrg# This is predefined starting with Autoconf 2.54, so this conditional
205871d7fec4Smrg# definition can be removed once we require Autoconf 2.54 or later.
205971d7fec4Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
206071d7fec4Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
206171d7fec4Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
206271d7fec4Smrg    then ac_cv_prog_egrep='grep -E'
206371d7fec4Smrg    else ac_cv_prog_egrep='egrep'
206471d7fec4Smrg    fi])
206571d7fec4Smrg EGREP=$ac_cv_prog_egrep
206671d7fec4Smrg AC_SUBST([EGREP])
206771d7fec4Smrg])])
206871d7fec4Smrg
206971d7fec4Smrg
207071d7fec4Smrg# AC_PATH_TOOL_PREFIX
207171d7fec4Smrg# -------------------
207271d7fec4Smrg# find a file program which can recognise shared library
207371d7fec4SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
207471d7fec4Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
207571d7fec4SmrgAC_MSG_CHECKING([for $1])
207671d7fec4SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
207771d7fec4Smrg[case $MAGIC_CMD in
207871d7fec4Smrg[[\\/*] |  ?:[\\/]*])
207971d7fec4Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
208071d7fec4Smrg  ;;
208171d7fec4Smrg*)
208271d7fec4Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
208371d7fec4Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
208471d7fec4Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
208571d7fec4Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
208671d7fec4Smrgdnl not every word.  This closes a longstanding sh security hole.
208771d7fec4Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
208871d7fec4Smrg  for ac_dir in $ac_dummy; do
208971d7fec4Smrg    IFS="$lt_save_ifs"
209071d7fec4Smrg    test -z "$ac_dir" && ac_dir=.
209171d7fec4Smrg    if test -f $ac_dir/$1; then
209271d7fec4Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
209371d7fec4Smrg      if test -n "$file_magic_test_file"; then
209471d7fec4Smrg	case $deplibs_check_method in
209571d7fec4Smrg	"file_magic "*)
209671d7fec4Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
209771d7fec4Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
209871d7fec4Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
209971d7fec4Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
210071d7fec4Smrg	    :
210171d7fec4Smrg	  else
210271d7fec4Smrg	    cat <<EOF 1>&2
210371d7fec4Smrg
210471d7fec4Smrg*** Warning: the command libtool uses to detect shared libraries,
210571d7fec4Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
210671d7fec4Smrg*** The result is that libtool may fail to recognize shared libraries
210771d7fec4Smrg*** as such.  This will affect the creation of libtool libraries that
210871d7fec4Smrg*** depend on shared libraries, but programs linked with such libtool
210971d7fec4Smrg*** libraries will work regardless of this problem.  Nevertheless, you
211071d7fec4Smrg*** may want to report the problem to your system manager and/or to
211171d7fec4Smrg*** bug-libtool@gnu.org
211271d7fec4Smrg
211371d7fec4SmrgEOF
211471d7fec4Smrg	  fi ;;
211571d7fec4Smrg	esac
211671d7fec4Smrg      fi
211771d7fec4Smrg      break
211871d7fec4Smrg    fi
211971d7fec4Smrg  done
212071d7fec4Smrg  IFS="$lt_save_ifs"
212171d7fec4Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
212271d7fec4Smrg  ;;
212371d7fec4Smrgesac])
212471d7fec4SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
212571d7fec4Smrgif test -n "$MAGIC_CMD"; then
212671d7fec4Smrg  AC_MSG_RESULT($MAGIC_CMD)
212771d7fec4Smrgelse
212871d7fec4Smrg  AC_MSG_RESULT(no)
212971d7fec4Smrgfi
213071d7fec4Smrg])# AC_PATH_TOOL_PREFIX
213171d7fec4Smrg
213271d7fec4Smrg
213371d7fec4Smrg# AC_PATH_MAGIC
213471d7fec4Smrg# -------------
213571d7fec4Smrg# find a file program which can recognise a shared library
213671d7fec4SmrgAC_DEFUN([AC_PATH_MAGIC],
213771d7fec4Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
213871d7fec4Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
213971d7fec4Smrg  if test -n "$ac_tool_prefix"; then
214071d7fec4Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
214171d7fec4Smrg  else
214271d7fec4Smrg    MAGIC_CMD=:
214371d7fec4Smrg  fi
214471d7fec4Smrgfi
214571d7fec4Smrg])# AC_PATH_MAGIC
214671d7fec4Smrg
214771d7fec4Smrg
214871d7fec4Smrg# AC_PROG_LD
214971d7fec4Smrg# ----------
215071d7fec4Smrg# find the pathname to the GNU or non-GNU linker
215171d7fec4SmrgAC_DEFUN([AC_PROG_LD],
215271d7fec4Smrg[AC_ARG_WITH([gnu-ld],
215371d7fec4Smrg    [AC_HELP_STRING([--with-gnu-ld],
215471d7fec4Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
215571d7fec4Smrg    [test "$withval" = no || with_gnu_ld=yes],
215671d7fec4Smrg    [with_gnu_ld=no])
215771d7fec4SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
215871d7fec4SmrgAC_REQUIRE([AC_PROG_CC])dnl
215971d7fec4SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
216071d7fec4SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
216171d7fec4Smrgac_prog=ld
216271d7fec4Smrgif test "$GCC" = yes; then
216371d7fec4Smrg  # Check if gcc -print-prog-name=ld gives a path.
216471d7fec4Smrg  AC_MSG_CHECKING([for ld used by $CC])
216571d7fec4Smrg  case $host in
216671d7fec4Smrg  *-*-mingw*)
216771d7fec4Smrg    # gcc leaves a trailing carriage return which upsets mingw
216871d7fec4Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
216971d7fec4Smrg  *)
217071d7fec4Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
217171d7fec4Smrg  esac
217271d7fec4Smrg  case $ac_prog in
217371d7fec4Smrg    # Accept absolute paths.
217471d7fec4Smrg    [[\\/]]* | ?:[[\\/]]*)
217571d7fec4Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
217671d7fec4Smrg      # Canonicalize the pathname of ld
217771d7fec4Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
217871d7fec4Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
217971d7fec4Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
218071d7fec4Smrg      done
218171d7fec4Smrg      test -z "$LD" && LD="$ac_prog"
218271d7fec4Smrg      ;;
218371d7fec4Smrg  "")
218471d7fec4Smrg    # If it fails, then pretend we aren't using GCC.
218571d7fec4Smrg    ac_prog=ld
218671d7fec4Smrg    ;;
218771d7fec4Smrg  *)
218871d7fec4Smrg    # If it is relative, then search for the first ld in PATH.
218971d7fec4Smrg    with_gnu_ld=unknown
219071d7fec4Smrg    ;;
219171d7fec4Smrg  esac
219271d7fec4Smrgelif test "$with_gnu_ld" = yes; then
219371d7fec4Smrg  AC_MSG_CHECKING([for GNU ld])
219471d7fec4Smrgelse
219571d7fec4Smrg  AC_MSG_CHECKING([for non-GNU ld])
219671d7fec4Smrgfi
219771d7fec4SmrgAC_CACHE_VAL(lt_cv_path_LD,
219871d7fec4Smrg[if test -z "$LD"; then
219971d7fec4Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
220071d7fec4Smrg  for ac_dir in $PATH; do
220171d7fec4Smrg    IFS="$lt_save_ifs"
220271d7fec4Smrg    test -z "$ac_dir" && ac_dir=.
220371d7fec4Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
220471d7fec4Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
220571d7fec4Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
220671d7fec4Smrg      # but apparently some variants of GNU ld only accept -v.
220771d7fec4Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
220871d7fec4Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
220971d7fec4Smrg      *GNU* | *'with BFD'*)
221071d7fec4Smrg	test "$with_gnu_ld" != no && break
221171d7fec4Smrg	;;
221271d7fec4Smrg      *)
221371d7fec4Smrg	test "$with_gnu_ld" != yes && break
221471d7fec4Smrg	;;
221571d7fec4Smrg      esac
221671d7fec4Smrg    fi
221771d7fec4Smrg  done
221871d7fec4Smrg  IFS="$lt_save_ifs"
221971d7fec4Smrgelse
222071d7fec4Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
222171d7fec4Smrgfi])
222271d7fec4SmrgLD="$lt_cv_path_LD"
222371d7fec4Smrgif test -n "$LD"; then
222471d7fec4Smrg  AC_MSG_RESULT($LD)
222571d7fec4Smrgelse
222671d7fec4Smrg  AC_MSG_RESULT(no)
222771d7fec4Smrgfi
222871d7fec4Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
222971d7fec4SmrgAC_PROG_LD_GNU
223071d7fec4Smrg])# AC_PROG_LD
223171d7fec4Smrg
223271d7fec4Smrg
223371d7fec4Smrg# AC_PROG_LD_GNU
223471d7fec4Smrg# --------------
223571d7fec4SmrgAC_DEFUN([AC_PROG_LD_GNU],
223671d7fec4Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
223771d7fec4SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
223871d7fec4Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
223971d7fec4Smrgcase `$LD -v 2>&1 </dev/null` in
224071d7fec4Smrg*GNU* | *'with BFD'*)
224171d7fec4Smrg  lt_cv_prog_gnu_ld=yes
224271d7fec4Smrg  ;;
224371d7fec4Smrg*)
224471d7fec4Smrg  lt_cv_prog_gnu_ld=no
224571d7fec4Smrg  ;;
224671d7fec4Smrgesac])
224771d7fec4Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
224871d7fec4Smrg])# AC_PROG_LD_GNU
224971d7fec4Smrg
225071d7fec4Smrg
225171d7fec4Smrg# AC_PROG_LD_RELOAD_FLAG
225271d7fec4Smrg# ----------------------
225371d7fec4Smrg# find reload flag for linker
225471d7fec4Smrg#   -- PORTME Some linkers may need a different reload flag.
225571d7fec4SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
225671d7fec4Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
225771d7fec4Smrg  lt_cv_ld_reload_flag,
225871d7fec4Smrg  [lt_cv_ld_reload_flag='-r'])
225971d7fec4Smrgreload_flag=$lt_cv_ld_reload_flag
226071d7fec4Smrgcase $reload_flag in
226171d7fec4Smrg"" | " "*) ;;
226271d7fec4Smrg*) reload_flag=" $reload_flag" ;;
226371d7fec4Smrgesac
226471d7fec4Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
226571d7fec4Smrgcase $host_os in
226671d7fec4Smrg  darwin*)
226771d7fec4Smrg    if test "$GCC" = yes; then
226871d7fec4Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
226971d7fec4Smrg    else
227071d7fec4Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
227171d7fec4Smrg    fi
227271d7fec4Smrg    ;;
227371d7fec4Smrgesac
227471d7fec4Smrg])# AC_PROG_LD_RELOAD_FLAG
227571d7fec4Smrg
227671d7fec4Smrg
227771d7fec4Smrg# AC_DEPLIBS_CHECK_METHOD
227871d7fec4Smrg# -----------------------
227971d7fec4Smrg# how to check for library dependencies
228071d7fec4Smrg#  -- PORTME fill in with the dynamic library characteristics
228171d7fec4SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
228271d7fec4Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
228371d7fec4Smrglt_cv_deplibs_check_method,
228471d7fec4Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
228571d7fec4Smrglt_cv_file_magic_test_file=
228671d7fec4Smrglt_cv_deplibs_check_method='unknown'
228771d7fec4Smrg# Need to set the preceding variable on all platforms that support
228871d7fec4Smrg# interlibrary dependencies.
228971d7fec4Smrg# 'none' -- dependencies not supported.
229071d7fec4Smrg# `unknown' -- same as none, but documents that we really don't know.
229171d7fec4Smrg# 'pass_all' -- all dependencies passed with no checks.
229271d7fec4Smrg# 'test_compile' -- check by making test program.
229371d7fec4Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
229471d7fec4Smrg# which responds to the $file_magic_cmd with a given extended regex.
229571d7fec4Smrg# If you have `file' or equivalent on your system and you're not sure
229671d7fec4Smrg# whether `pass_all' will *always* work, you probably want this one.
229771d7fec4Smrg
229871d7fec4Smrgcase $host_os in
229971d7fec4Smrgaix4* | aix5*)
230071d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
230171d7fec4Smrg  ;;
230271d7fec4Smrg
230371d7fec4Smrgbeos*)
230471d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
230571d7fec4Smrg  ;;
230671d7fec4Smrg
230771d7fec4Smrgbsdi[[45]]*)
230871d7fec4Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
230971d7fec4Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
231071d7fec4Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
231171d7fec4Smrg  ;;
231271d7fec4Smrg
231371d7fec4Smrgcygwin*)
231471d7fec4Smrg  # func_win32_libid is a shell function defined in ltmain.sh
231571d7fec4Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
231671d7fec4Smrg  lt_cv_file_magic_cmd='func_win32_libid'
231771d7fec4Smrg  ;;
231871d7fec4Smrg
231971d7fec4Smrgmingw* | pw32*)
232071d7fec4Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
232171d7fec4Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
232271d7fec4Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
232371d7fec4Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
232471d7fec4Smrg  ;;
232571d7fec4Smrg
232671d7fec4Smrgdarwin* | rhapsody*)
232771d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
232871d7fec4Smrg  ;;
232971d7fec4Smrg
233071d7fec4Smrgfreebsd* | kfreebsd*-gnu | dragonfly*)
233171d7fec4Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
233271d7fec4Smrg    case $host_cpu in
233371d7fec4Smrg    i*86 )
233471d7fec4Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
233571d7fec4Smrg      # Let's accept both of them until this is cleared up.
233671d7fec4Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
233771d7fec4Smrg      lt_cv_file_magic_cmd=/usr/bin/file
233871d7fec4Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
233971d7fec4Smrg      ;;
234071d7fec4Smrg    esac
234171d7fec4Smrg  else
234271d7fec4Smrg    lt_cv_deplibs_check_method=pass_all
234371d7fec4Smrg  fi
234471d7fec4Smrg  ;;
234571d7fec4Smrg
234671d7fec4Smrggnu*)
234771d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
234871d7fec4Smrg  ;;
234971d7fec4Smrg
235071d7fec4Smrghpux10.20* | hpux11*)
235171d7fec4Smrg  lt_cv_file_magic_cmd=/usr/bin/file
235271d7fec4Smrg  case $host_cpu in
235371d7fec4Smrg  ia64*)
235471d7fec4Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
235571d7fec4Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
235671d7fec4Smrg    ;;
235771d7fec4Smrg  hppa*64*)
235871d7fec4Smrg    [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]']
235971d7fec4Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
236071d7fec4Smrg    ;;
236171d7fec4Smrg  *)
236271d7fec4Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
236371d7fec4Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
236471d7fec4Smrg    ;;
236571d7fec4Smrg  esac
236671d7fec4Smrg  ;;
236771d7fec4Smrg
236871d7fec4Smrginterix3*)
236971d7fec4Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
237071d7fec4Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
237171d7fec4Smrg  ;;
237271d7fec4Smrg
237371d7fec4Smrgirix5* | irix6* | nonstopux*)
237471d7fec4Smrg  case $LD in
237571d7fec4Smrg  *-32|*"-32 ") libmagic=32-bit;;
237671d7fec4Smrg  *-n32|*"-n32 ") libmagic=N32;;
237771d7fec4Smrg  *-64|*"-64 ") libmagic=64-bit;;
237871d7fec4Smrg  *) libmagic=never-match;;
237971d7fec4Smrg  esac
238071d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
238171d7fec4Smrg  ;;
238271d7fec4Smrg
238371d7fec4Smrg# This must be Linux ELF.
238471d7fec4Smrglinux*)
238571d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
238671d7fec4Smrg  ;;
238771d7fec4Smrg
238871d7fec4Smrgnetbsd*)
238971d7fec4Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
239071d7fec4Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
239171d7fec4Smrg  else
239271d7fec4Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
239371d7fec4Smrg  fi
239471d7fec4Smrg  ;;
239571d7fec4Smrg
239671d7fec4Smrgnewos6*)
239771d7fec4Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
239871d7fec4Smrg  lt_cv_file_magic_cmd=/usr/bin/file
239971d7fec4Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
240071d7fec4Smrg  ;;
240171d7fec4Smrg
240271d7fec4Smrgnto-qnx*)
240371d7fec4Smrg  lt_cv_deplibs_check_method=unknown
240471d7fec4Smrg  ;;
240571d7fec4Smrg
240671d7fec4Smrgopenbsd*)
240771d7fec4Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
240871d7fec4Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
240971d7fec4Smrg  else
241071d7fec4Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
241171d7fec4Smrg  fi
241271d7fec4Smrg  ;;
241371d7fec4Smrg
241471d7fec4Smrgosf3* | osf4* | osf5*)
241571d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
241671d7fec4Smrg  ;;
241771d7fec4Smrg
241871d7fec4Smrgsolaris*)
241971d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
242071d7fec4Smrg  ;;
242171d7fec4Smrg
242271d7fec4Smrgsysv4 | sysv4.3*)
242371d7fec4Smrg  case $host_vendor in
242471d7fec4Smrg  motorola)
242571d7fec4Smrg    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]]'
242671d7fec4Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
242771d7fec4Smrg    ;;
242871d7fec4Smrg  ncr)
242971d7fec4Smrg    lt_cv_deplibs_check_method=pass_all
243071d7fec4Smrg    ;;
243171d7fec4Smrg  sequent)
243271d7fec4Smrg    lt_cv_file_magic_cmd='/bin/file'
243371d7fec4Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
243471d7fec4Smrg    ;;
243571d7fec4Smrg  sni)
243671d7fec4Smrg    lt_cv_file_magic_cmd='/bin/file'
243771d7fec4Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
243871d7fec4Smrg    lt_cv_file_magic_test_file=/lib/libc.so
243971d7fec4Smrg    ;;
244071d7fec4Smrg  siemens)
244171d7fec4Smrg    lt_cv_deplibs_check_method=pass_all
244271d7fec4Smrg    ;;
244371d7fec4Smrg  pc)
244471d7fec4Smrg    lt_cv_deplibs_check_method=pass_all
244571d7fec4Smrg    ;;
244671d7fec4Smrg  esac
244771d7fec4Smrg  ;;
244871d7fec4Smrg
244971d7fec4Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
245071d7fec4Smrg  lt_cv_deplibs_check_method=pass_all
245171d7fec4Smrg  ;;
245271d7fec4Smrgesac
245371d7fec4Smrg])
245471d7fec4Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
245571d7fec4Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
245671d7fec4Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
245771d7fec4Smrg])# AC_DEPLIBS_CHECK_METHOD
245871d7fec4Smrg
245971d7fec4Smrg
246071d7fec4Smrg# AC_PROG_NM
246171d7fec4Smrg# ----------
246271d7fec4Smrg# find the pathname to a BSD-compatible name lister
246371d7fec4SmrgAC_DEFUN([AC_PROG_NM],
246471d7fec4Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
246571d7fec4Smrg[if test -n "$NM"; then
246671d7fec4Smrg  # Let the user override the test.
246771d7fec4Smrg  lt_cv_path_NM="$NM"
246871d7fec4Smrgelse
246971d7fec4Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
247071d7fec4Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
247171d7fec4Smrg    lt_nm_to_check="$lt_nm_to_check nm"
247271d7fec4Smrg  fi
247371d7fec4Smrg  for lt_tmp_nm in $lt_nm_to_check; do
247471d7fec4Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
247571d7fec4Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
247671d7fec4Smrg      IFS="$lt_save_ifs"
247771d7fec4Smrg      test -z "$ac_dir" && ac_dir=.
247871d7fec4Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
247971d7fec4Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
248071d7fec4Smrg	# Check to see if the nm accepts a BSD-compat flag.
248171d7fec4Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
248271d7fec4Smrg	#   nm: unknown option "B" ignored
248371d7fec4Smrg	# Tru64's nm complains that /dev/null is an invalid object file
248471d7fec4Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
248571d7fec4Smrg	*/dev/null* | *'Invalid file or object type'*)
248671d7fec4Smrg	  lt_cv_path_NM="$tmp_nm -B"
248771d7fec4Smrg	  break
248871d7fec4Smrg	  ;;
248971d7fec4Smrg	*)
249071d7fec4Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
249171d7fec4Smrg	  */dev/null*)
249271d7fec4Smrg	    lt_cv_path_NM="$tmp_nm -p"
249371d7fec4Smrg	    break
249471d7fec4Smrg	    ;;
249571d7fec4Smrg	  *)
249671d7fec4Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
249771d7fec4Smrg	    continue # so that we can try to find one that supports BSD flags
249871d7fec4Smrg	    ;;
249971d7fec4Smrg	  esac
250071d7fec4Smrg	  ;;
250171d7fec4Smrg	esac
250271d7fec4Smrg      fi
250371d7fec4Smrg    done
250471d7fec4Smrg    IFS="$lt_save_ifs"
250571d7fec4Smrg  done
250671d7fec4Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
250771d7fec4Smrgfi])
250871d7fec4SmrgNM="$lt_cv_path_NM"
250971d7fec4Smrg])# AC_PROG_NM
251071d7fec4Smrg
251171d7fec4Smrg
251271d7fec4Smrg# AC_CHECK_LIBM
251371d7fec4Smrg# -------------
251471d7fec4Smrg# check for math library
251571d7fec4SmrgAC_DEFUN([AC_CHECK_LIBM],
251671d7fec4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
251771d7fec4SmrgLIBM=
251871d7fec4Smrgcase $host in
251971d7fec4Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
252071d7fec4Smrg  # These system don't have libm, or don't need it
252171d7fec4Smrg  ;;
252271d7fec4Smrg*-ncr-sysv4.3*)
252371d7fec4Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
252471d7fec4Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
252571d7fec4Smrg  ;;
252671d7fec4Smrg*)
252771d7fec4Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
252871d7fec4Smrg  ;;
252971d7fec4Smrgesac
253071d7fec4Smrg])# AC_CHECK_LIBM
253171d7fec4Smrg
253271d7fec4Smrg
253371d7fec4Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
253471d7fec4Smrg# -----------------------------------
253571d7fec4Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
253671d7fec4Smrg# LTDLINCL to the include flags for the libltdl header and adds
253771d7fec4Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
253871d7fec4Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
253971d7fec4Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
254071d7fec4Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
254171d7fec4Smrg# (note the single quotes!).  If your package is not flat and you're not
254271d7fec4Smrg# using automake, define top_builddir and top_srcdir appropriately in
254371d7fec4Smrg# the Makefiles.
254471d7fec4SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
254571d7fec4Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
254671d7fec4Smrg  case $enable_ltdl_convenience in
254771d7fec4Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
254871d7fec4Smrg  "") enable_ltdl_convenience=yes
254971d7fec4Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
255071d7fec4Smrg  esac
255171d7fec4Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
255271d7fec4Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
255371d7fec4Smrg  # For backwards non-gettext consistent compatibility...
255471d7fec4Smrg  INCLTDL="$LTDLINCL"
255571d7fec4Smrg])# AC_LIBLTDL_CONVENIENCE
255671d7fec4Smrg
255771d7fec4Smrg
255871d7fec4Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
255971d7fec4Smrg# -----------------------------------
256071d7fec4Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
256171d7fec4Smrg# LTDLINCL to the include flags for the libltdl header and adds
256271d7fec4Smrg# --enable-ltdl-install to the configure arguments.  Note that
256371d7fec4Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
256471d7fec4Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
256571d7fec4Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
256671d7fec4Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
256771d7fec4Smrg# flat and you're not using automake, define top_builddir and top_srcdir
256871d7fec4Smrg# appropriately in the Makefiles.
256971d7fec4Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
257071d7fec4SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
257171d7fec4Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
257271d7fec4Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
257371d7fec4Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
257471d7fec4Smrg  [if test x"$enable_ltdl_install" = xno; then
257571d7fec4Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
257671d7fec4Smrg   else
257771d7fec4Smrg     enable_ltdl_install=yes
257871d7fec4Smrg   fi
257971d7fec4Smrg  ])
258071d7fec4Smrg  if test x"$enable_ltdl_install" = x"yes"; then
258171d7fec4Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
258271d7fec4Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
258371d7fec4Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
258471d7fec4Smrg  else
258571d7fec4Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
258671d7fec4Smrg    LIBLTDL="-lltdl"
258771d7fec4Smrg    LTDLINCL=
258871d7fec4Smrg  fi
258971d7fec4Smrg  # For backwards non-gettext consistent compatibility...
259071d7fec4Smrg  INCLTDL="$LTDLINCL"
259171d7fec4Smrg])# AC_LIBLTDL_INSTALLABLE
259271d7fec4Smrg
259371d7fec4Smrg
259471d7fec4Smrg# AC_LIBTOOL_CXX
259571d7fec4Smrg# --------------
259671d7fec4Smrg# enable support for C++ libraries
259771d7fec4SmrgAC_DEFUN([AC_LIBTOOL_CXX],
259871d7fec4Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
259971d7fec4Smrg])# AC_LIBTOOL_CXX
260071d7fec4Smrg
260171d7fec4Smrg
260271d7fec4Smrg# _LT_AC_LANG_CXX
260371d7fec4Smrg# ---------------
260471d7fec4SmrgAC_DEFUN([_LT_AC_LANG_CXX],
260571d7fec4Smrg[AC_REQUIRE([AC_PROG_CXX])
260671d7fec4SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
260771d7fec4Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
260871d7fec4Smrg])# _LT_AC_LANG_CXX
260971d7fec4Smrg
261071d7fec4Smrg# _LT_AC_PROG_CXXCPP
261171d7fec4Smrg# ------------------
261271d7fec4SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
261371d7fec4Smrg[
261471d7fec4SmrgAC_REQUIRE([AC_PROG_CXX])
261571d7fec4Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
261671d7fec4Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
261771d7fec4Smrg    (test "X$CXX" != "Xg++"))) ; then
261871d7fec4Smrg  AC_PROG_CXXCPP
261971d7fec4Smrgfi
262071d7fec4Smrg])# _LT_AC_PROG_CXXCPP
262171d7fec4Smrg
262271d7fec4Smrg# AC_LIBTOOL_F77
262371d7fec4Smrg# --------------
262471d7fec4Smrg# enable support for Fortran 77 libraries
262571d7fec4SmrgAC_DEFUN([AC_LIBTOOL_F77],
262671d7fec4Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
262771d7fec4Smrg])# AC_LIBTOOL_F77
262871d7fec4Smrg
262971d7fec4Smrg
263071d7fec4Smrg# _LT_AC_LANG_F77
263171d7fec4Smrg# ---------------
263271d7fec4SmrgAC_DEFUN([_LT_AC_LANG_F77],
263371d7fec4Smrg[AC_REQUIRE([AC_PROG_F77])
263471d7fec4Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
263571d7fec4Smrg])# _LT_AC_LANG_F77
263671d7fec4Smrg
263771d7fec4Smrg
263871d7fec4Smrg# AC_LIBTOOL_GCJ
263971d7fec4Smrg# --------------
264071d7fec4Smrg# enable support for GCJ libraries
264171d7fec4SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
264271d7fec4Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
264371d7fec4Smrg])# AC_LIBTOOL_GCJ
264471d7fec4Smrg
264571d7fec4Smrg
264671d7fec4Smrg# _LT_AC_LANG_GCJ
264771d7fec4Smrg# ---------------
264871d7fec4SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
264971d7fec4Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
265071d7fec4Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
265171d7fec4Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
265271d7fec4Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
265371d7fec4Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
265471d7fec4Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
265571d7fec4Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
265671d7fec4Smrg])# _LT_AC_LANG_GCJ
265771d7fec4Smrg
265871d7fec4Smrg
265971d7fec4Smrg# AC_LIBTOOL_RC
266071d7fec4Smrg# -------------
266171d7fec4Smrg# enable support for Windows resource files
266271d7fec4SmrgAC_DEFUN([AC_LIBTOOL_RC],
266371d7fec4Smrg[AC_REQUIRE([LT_AC_PROG_RC])
266471d7fec4Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
266571d7fec4Smrg])# AC_LIBTOOL_RC
266671d7fec4Smrg
266771d7fec4Smrg
266871d7fec4Smrg# AC_LIBTOOL_LANG_C_CONFIG
266971d7fec4Smrg# ------------------------
267071d7fec4Smrg# Ensure that the configuration vars for the C compiler are
267171d7fec4Smrg# suitably defined.  Those variables are subsequently used by
267271d7fec4Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
267371d7fec4SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
267471d7fec4SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
267571d7fec4Smrg[lt_save_CC="$CC"
267671d7fec4SmrgAC_LANG_PUSH(C)
267771d7fec4Smrg
267871d7fec4Smrg# Source file extension for C test sources.
267971d7fec4Smrgac_ext=c
268071d7fec4Smrg
268171d7fec4Smrg# Object file extension for compiled C test sources.
268271d7fec4Smrgobjext=o
268371d7fec4Smrg_LT_AC_TAGVAR(objext, $1)=$objext
268471d7fec4Smrg
268571d7fec4Smrg# Code to be used in simple compile tests
268671d7fec4Smrglt_simple_compile_test_code="int some_variable = 0;\n"
268771d7fec4Smrg
268871d7fec4Smrg# Code to be used in simple link tests
268971d7fec4Smrglt_simple_link_test_code='int main(){return(0);}\n'
269071d7fec4Smrg
269171d7fec4Smrg_LT_AC_SYS_COMPILER
269271d7fec4Smrg
269371d7fec4Smrg# save warnings/boilerplate of simple test code
269471d7fec4Smrg_LT_COMPILER_BOILERPLATE
269571d7fec4Smrg_LT_LINKER_BOILERPLATE
269671d7fec4Smrg
269771d7fec4SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
269871d7fec4SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
269971d7fec4SmrgAC_LIBTOOL_PROG_CC_C_O($1)
270071d7fec4SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
270171d7fec4SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
270271d7fec4SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
270371d7fec4SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
270471d7fec4SmrgAC_LIBTOOL_SYS_LIB_STRIP
270571d7fec4SmrgAC_LIBTOOL_DLOPEN_SELF
270671d7fec4Smrg
270771d7fec4Smrg# Report which library types will actually be built
270871d7fec4SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
270971d7fec4SmrgAC_MSG_RESULT([$can_build_shared])
271071d7fec4Smrg
271171d7fec4SmrgAC_MSG_CHECKING([whether to build shared libraries])
271271d7fec4Smrgtest "$can_build_shared" = "no" && enable_shared=no
271371d7fec4Smrg
271471d7fec4Smrg# On AIX, shared libraries and static libraries use the same namespace, and
271571d7fec4Smrg# are all built from PIC.
271671d7fec4Smrgcase $host_os in
271771d7fec4Smrgaix3*)
271871d7fec4Smrg  test "$enable_shared" = yes && enable_static=no
271971d7fec4Smrg  if test -n "$RANLIB"; then
272071d7fec4Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
272171d7fec4Smrg    postinstall_cmds='$RANLIB $lib'
272271d7fec4Smrg  fi
272371d7fec4Smrg  ;;
272471d7fec4Smrg
272571d7fec4Smrgaix4* | aix5*)
272671d7fec4Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
272771d7fec4Smrg    test "$enable_shared" = yes && enable_static=no
272871d7fec4Smrg  fi
272971d7fec4Smrg    ;;
273071d7fec4Smrgesac
273171d7fec4SmrgAC_MSG_RESULT([$enable_shared])
273271d7fec4Smrg
273371d7fec4SmrgAC_MSG_CHECKING([whether to build static libraries])
273471d7fec4Smrg# Make sure either enable_shared or enable_static is yes.
273571d7fec4Smrgtest "$enable_shared" = yes || enable_static=yes
273671d7fec4SmrgAC_MSG_RESULT([$enable_static])
273771d7fec4Smrg
273871d7fec4SmrgAC_LIBTOOL_CONFIG($1)
273971d7fec4Smrg
274071d7fec4SmrgAC_LANG_POP
274171d7fec4SmrgCC="$lt_save_CC"
274271d7fec4Smrg])# AC_LIBTOOL_LANG_C_CONFIG
274371d7fec4Smrg
274471d7fec4Smrg
274571d7fec4Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
274671d7fec4Smrg# --------------------------
274771d7fec4Smrg# Ensure that the configuration vars for the C compiler are
274871d7fec4Smrg# suitably defined.  Those variables are subsequently used by
274971d7fec4Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
275071d7fec4SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
275171d7fec4SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
275271d7fec4Smrg[AC_LANG_PUSH(C++)
275371d7fec4SmrgAC_REQUIRE([AC_PROG_CXX])
275471d7fec4SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
275571d7fec4Smrg
275671d7fec4Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
275771d7fec4Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
275871d7fec4Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
275971d7fec4Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
276071d7fec4Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
276171d7fec4Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
276271d7fec4Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
276371d7fec4Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
276471d7fec4Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
276571d7fec4Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
276671d7fec4Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
276771d7fec4Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
276871d7fec4Smrg_LT_AC_TAGVAR(module_cmds, $1)=
276971d7fec4Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
277071d7fec4Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
277171d7fec4Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
277271d7fec4Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
277371d7fec4Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
277471d7fec4Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
277571d7fec4Smrg
277671d7fec4Smrg# Dependencies to place before and after the object being linked:
277771d7fec4Smrg_LT_AC_TAGVAR(predep_objects, $1)=
277871d7fec4Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
277971d7fec4Smrg_LT_AC_TAGVAR(predeps, $1)=
278071d7fec4Smrg_LT_AC_TAGVAR(postdeps, $1)=
278171d7fec4Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
278271d7fec4Smrg
278371d7fec4Smrg# Source file extension for C++ test sources.
278471d7fec4Smrgac_ext=cpp
278571d7fec4Smrg
278671d7fec4Smrg# Object file extension for compiled C++ test sources.
278771d7fec4Smrgobjext=o
278871d7fec4Smrg_LT_AC_TAGVAR(objext, $1)=$objext
278971d7fec4Smrg
279071d7fec4Smrg# Code to be used in simple compile tests
279171d7fec4Smrglt_simple_compile_test_code="int some_variable = 0;\n"
279271d7fec4Smrg
279371d7fec4Smrg# Code to be used in simple link tests
279471d7fec4Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
279571d7fec4Smrg
279671d7fec4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
279771d7fec4Smrg_LT_AC_SYS_COMPILER
279871d7fec4Smrg
279971d7fec4Smrg# save warnings/boilerplate of simple test code
280071d7fec4Smrg_LT_COMPILER_BOILERPLATE
280171d7fec4Smrg_LT_LINKER_BOILERPLATE
280271d7fec4Smrg
280371d7fec4Smrg# Allow CC to be a program name with arguments.
280471d7fec4Smrglt_save_CC=$CC
280571d7fec4Smrglt_save_LD=$LD
280671d7fec4Smrglt_save_GCC=$GCC
280771d7fec4SmrgGCC=$GXX
280871d7fec4Smrglt_save_with_gnu_ld=$with_gnu_ld
280971d7fec4Smrglt_save_path_LD=$lt_cv_path_LD
281071d7fec4Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
281171d7fec4Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
281271d7fec4Smrgelse
281371d7fec4Smrg  $as_unset lt_cv_prog_gnu_ld
281471d7fec4Smrgfi
281571d7fec4Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
281671d7fec4Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
281771d7fec4Smrgelse
281871d7fec4Smrg  $as_unset lt_cv_path_LD
281971d7fec4Smrgfi
282071d7fec4Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
282171d7fec4SmrgCC=${CXX-"c++"}
282271d7fec4Smrgcompiler=$CC
282371d7fec4Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
282471d7fec4Smrg_LT_CC_BASENAME([$compiler])
282571d7fec4Smrg
282671d7fec4Smrg# We don't want -fno-exception wen compiling C++ code, so set the
282771d7fec4Smrg# no_builtin_flag separately
282871d7fec4Smrgif test "$GXX" = yes; then
282971d7fec4Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
283071d7fec4Smrgelse
283171d7fec4Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
283271d7fec4Smrgfi
283371d7fec4Smrg
283471d7fec4Smrgif test "$GXX" = yes; then
283571d7fec4Smrg  # Set up default GNU C++ configuration
283671d7fec4Smrg
283771d7fec4Smrg  AC_PROG_LD
283871d7fec4Smrg
283971d7fec4Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
284071d7fec4Smrg  # archiving commands below assume that GNU ld is being used.
284171d7fec4Smrg  if test "$with_gnu_ld" = yes; then
284271d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
284371d7fec4Smrg    _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'
284471d7fec4Smrg
284571d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
284671d7fec4Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
284771d7fec4Smrg
284871d7fec4Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
284971d7fec4Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
285071d7fec4Smrg    #     investigate it a little bit more. (MM)
285171d7fec4Smrg    wlarc='${wl}'
285271d7fec4Smrg
285371d7fec4Smrg    # ancient GNU ld didn't support --whole-archive et. al.
285471d7fec4Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
285571d7fec4Smrg	grep 'no-whole-archive' > /dev/null; then
285671d7fec4Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
285771d7fec4Smrg    else
285871d7fec4Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
285971d7fec4Smrg    fi
286071d7fec4Smrg  else
286171d7fec4Smrg    with_gnu_ld=no
286271d7fec4Smrg    wlarc=
286371d7fec4Smrg
286471d7fec4Smrg    # A generic and very simple default shared library creation
286571d7fec4Smrg    # command for GNU C++ for the case where it uses the native
286671d7fec4Smrg    # linker, instead of GNU ld.  If possible, this setting should
286771d7fec4Smrg    # overridden to take advantage of the native linker features on
286871d7fec4Smrg    # the platform it is being used on.
286971d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
287071d7fec4Smrg  fi
287171d7fec4Smrg
287271d7fec4Smrg  # Commands to make compiler produce verbose output that lists
287371d7fec4Smrg  # what "hidden" libraries, object files and flags are used when
287471d7fec4Smrg  # linking a shared library.
287571d7fec4Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
287671d7fec4Smrg
287771d7fec4Smrgelse
287871d7fec4Smrg  GXX=no
287971d7fec4Smrg  with_gnu_ld=no
288071d7fec4Smrg  wlarc=
288171d7fec4Smrgfi
288271d7fec4Smrg
288371d7fec4Smrg# PORTME: fill in a description of your system's C++ link characteristics
288471d7fec4SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
288571d7fec4Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
288671d7fec4Smrgcase $host_os in
288771d7fec4Smrg  aix3*)
288871d7fec4Smrg    # FIXME: insert proper C++ library support
288971d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
289071d7fec4Smrg    ;;
289171d7fec4Smrg  aix4* | aix5*)
289271d7fec4Smrg    if test "$host_cpu" = ia64; then
289371d7fec4Smrg      # On IA64, the linker does run time linking by default, so we don't
289471d7fec4Smrg      # have to do anything special.
289571d7fec4Smrg      aix_use_runtimelinking=no
289671d7fec4Smrg      exp_sym_flag='-Bexport'
289771d7fec4Smrg      no_entry_flag=""
289871d7fec4Smrg    else
289971d7fec4Smrg      aix_use_runtimelinking=no
290071d7fec4Smrg
290171d7fec4Smrg      # Test if we are trying to use run time linking or normal
290271d7fec4Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
290371d7fec4Smrg      # need to do runtime linking.
290471d7fec4Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
290571d7fec4Smrg	for ld_flag in $LDFLAGS; do
290671d7fec4Smrg	  case $ld_flag in
290771d7fec4Smrg	  *-brtl*)
290871d7fec4Smrg	    aix_use_runtimelinking=yes
290971d7fec4Smrg	    break
291071d7fec4Smrg	    ;;
291171d7fec4Smrg	  esac
291271d7fec4Smrg	done
291371d7fec4Smrg	;;
291471d7fec4Smrg      esac
291571d7fec4Smrg
291671d7fec4Smrg      exp_sym_flag='-bexport'
291771d7fec4Smrg      no_entry_flag='-bnoentry'
291871d7fec4Smrg    fi
291971d7fec4Smrg
292071d7fec4Smrg    # When large executables or shared objects are built, AIX ld can
292171d7fec4Smrg    # have problems creating the table of contents.  If linking a library
292271d7fec4Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
292371d7fec4Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
292471d7fec4Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
292571d7fec4Smrg
292671d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
292771d7fec4Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
292871d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
292971d7fec4Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
293071d7fec4Smrg
293171d7fec4Smrg    if test "$GXX" = yes; then
293271d7fec4Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
293371d7fec4Smrg      # We only want to do this on AIX 4.2 and lower, the check
293471d7fec4Smrg      # below for broken collect2 doesn't work under 4.3+
293571d7fec4Smrg	collect2name=`${CC} -print-prog-name=collect2`
293671d7fec4Smrg	if test -f "$collect2name" && \
293771d7fec4Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
293871d7fec4Smrg	then
293971d7fec4Smrg	  # We have reworked collect2
294071d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
294171d7fec4Smrg	else
294271d7fec4Smrg	  # We have old collect2
294371d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
294471d7fec4Smrg	  # It fails to find uninstalled libraries when the uninstalled
294571d7fec4Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
294671d7fec4Smrg	  # to unsupported forces relinking
294771d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
294871d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
294971d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
295071d7fec4Smrg	fi
295171d7fec4Smrg	;;
295271d7fec4Smrg      esac
295371d7fec4Smrg      shared_flag='-shared'
295471d7fec4Smrg      if test "$aix_use_runtimelinking" = yes; then
295571d7fec4Smrg	shared_flag="$shared_flag "'${wl}-G'
295671d7fec4Smrg      fi
295771d7fec4Smrg    else
295871d7fec4Smrg      # not using gcc
295971d7fec4Smrg      if test "$host_cpu" = ia64; then
296071d7fec4Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
296171d7fec4Smrg	# chokes on -Wl,-G. The following line is correct:
296271d7fec4Smrg	shared_flag='-G'
296371d7fec4Smrg      else
296471d7fec4Smrg	if test "$aix_use_runtimelinking" = yes; then
296571d7fec4Smrg	  shared_flag='${wl}-G'
296671d7fec4Smrg	else
296771d7fec4Smrg	  shared_flag='${wl}-bM:SRE'
296871d7fec4Smrg	fi
296971d7fec4Smrg      fi
297071d7fec4Smrg    fi
297171d7fec4Smrg
297271d7fec4Smrg    # It seems that -bexpall does not export symbols beginning with
297371d7fec4Smrg    # underscore (_), so it is better to generate a list of symbols to export.
297471d7fec4Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
297571d7fec4Smrg    if test "$aix_use_runtimelinking" = yes; then
297671d7fec4Smrg      # Warning - without using the other runtime loading flags (-brtl),
297771d7fec4Smrg      # -berok will link without error, but may produce a broken library.
297871d7fec4Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
297971d7fec4Smrg      # Determine the default libpath from the value encoded in an empty executable.
298071d7fec4Smrg      _LT_AC_SYS_LIBPATH_AIX
298171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
298271d7fec4Smrg
298371d7fec4Smrg      _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"
298471d7fec4Smrg     else
298571d7fec4Smrg      if test "$host_cpu" = ia64; then
298671d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
298771d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
298871d7fec4Smrg	_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"
298971d7fec4Smrg      else
299071d7fec4Smrg	# Determine the default libpath from the value encoded in an empty executable.
299171d7fec4Smrg	_LT_AC_SYS_LIBPATH_AIX
299271d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
299371d7fec4Smrg	# Warning - without using the other run time loading flags,
299471d7fec4Smrg	# -berok will link without error, but may produce a broken library.
299571d7fec4Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
299671d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
299771d7fec4Smrg	# Exported symbols can be pulled into shared objects from archives
299871d7fec4Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
299971d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
300071d7fec4Smrg	# This is similar to how AIX traditionally builds its shared libraries.
300171d7fec4Smrg	_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'
300271d7fec4Smrg      fi
300371d7fec4Smrg    fi
300471d7fec4Smrg    ;;
300571d7fec4Smrg
300671d7fec4Smrg  beos*)
300771d7fec4Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
300871d7fec4Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
300971d7fec4Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
301071d7fec4Smrg      # support --undefined.  This deserves some investigation.  FIXME
301171d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
301271d7fec4Smrg    else
301371d7fec4Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
301471d7fec4Smrg    fi
301571d7fec4Smrg    ;;
301671d7fec4Smrg
301771d7fec4Smrg  chorus*)
301871d7fec4Smrg    case $cc_basename in
301971d7fec4Smrg      *)
302071d7fec4Smrg	# FIXME: insert proper C++ library support
302171d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
302271d7fec4Smrg	;;
302371d7fec4Smrg    esac
302471d7fec4Smrg    ;;
302571d7fec4Smrg
302671d7fec4Smrg  cygwin* | mingw* | pw32*)
302771d7fec4Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
302871d7fec4Smrg    # as there is no search path for DLLs.
302971d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
303071d7fec4Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
303171d7fec4Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
303271d7fec4Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
303371d7fec4Smrg
303471d7fec4Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
303571d7fec4Smrg      _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'
303671d7fec4Smrg      # If the export-symbols file already is a .def file (1st line
303771d7fec4Smrg      # is EXPORTS), use it as is; otherwise, prepend...
303871d7fec4Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
303971d7fec4Smrg	cp $export_symbols $output_objdir/$soname.def;
304071d7fec4Smrg      else
304171d7fec4Smrg	echo EXPORTS > $output_objdir/$soname.def;
304271d7fec4Smrg	cat $export_symbols >> $output_objdir/$soname.def;
304371d7fec4Smrg      fi~
304471d7fec4Smrg      $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'
304571d7fec4Smrg    else
304671d7fec4Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
304771d7fec4Smrg    fi
304871d7fec4Smrg  ;;
304971d7fec4Smrg      darwin* | rhapsody*)
305071d7fec4Smrg        case $host_os in
305171d7fec4Smrg        rhapsody* | darwin1.[[012]])
305271d7fec4Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
305371d7fec4Smrg         ;;
305471d7fec4Smrg       *) # Darwin 1.3 on
305571d7fec4Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
305671d7fec4Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
305771d7fec4Smrg         else
305871d7fec4Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
305971d7fec4Smrg             10.[[012]])
306071d7fec4Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
306171d7fec4Smrg               ;;
306271d7fec4Smrg             10.*)
306371d7fec4Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
306471d7fec4Smrg               ;;
306571d7fec4Smrg           esac
306671d7fec4Smrg         fi
306771d7fec4Smrg         ;;
306871d7fec4Smrg        esac
306971d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
307071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
307171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
307271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
307371d7fec4Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
307471d7fec4Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
307571d7fec4Smrg
307671d7fec4Smrg    if test "$GXX" = yes ; then
307771d7fec4Smrg      lt_int_apple_cc_single_mod=no
307871d7fec4Smrg      output_verbose_link_cmd='echo'
307971d7fec4Smrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
308071d7fec4Smrg       lt_int_apple_cc_single_mod=yes
308171d7fec4Smrg      fi
308271d7fec4Smrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
308371d7fec4Smrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
308471d7fec4Smrg      else
308571d7fec4Smrg          _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'
308671d7fec4Smrg        fi
308771d7fec4Smrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
308871d7fec4Smrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
308971d7fec4Smrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
309071d7fec4Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
309171d7fec4Smrg          else
309271d7fec4Smrg            _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "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~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
309371d7fec4Smrg          fi
309471d7fec4Smrg            _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}'
309571d7fec4Smrg      else
309671d7fec4Smrg      case $cc_basename in
309771d7fec4Smrg        xlc*)
309871d7fec4Smrg         output_verbose_link_cmd='echo'
309971d7fec4Smrg          _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` $verstring'
310071d7fec4Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
310171d7fec4Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
310271d7fec4Smrg          _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
310371d7fec4Smrg          _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}'
310471d7fec4Smrg          ;;
310571d7fec4Smrg       *)
310671d7fec4Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
310771d7fec4Smrg          ;;
310871d7fec4Smrg      esac
310971d7fec4Smrg      fi
311071d7fec4Smrg        ;;
311171d7fec4Smrg
311271d7fec4Smrg  dgux*)
311371d7fec4Smrg    case $cc_basename in
311471d7fec4Smrg      ec++*)
311571d7fec4Smrg	# FIXME: insert proper C++ library support
311671d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
311771d7fec4Smrg	;;
311871d7fec4Smrg      ghcx*)
311971d7fec4Smrg	# Green Hills C++ Compiler
312071d7fec4Smrg	# FIXME: insert proper C++ library support
312171d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
312271d7fec4Smrg	;;
312371d7fec4Smrg      *)
312471d7fec4Smrg	# FIXME: insert proper C++ library support
312571d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
312671d7fec4Smrg	;;
312771d7fec4Smrg    esac
312871d7fec4Smrg    ;;
312971d7fec4Smrg  freebsd[[12]]*)
313071d7fec4Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
313171d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
313271d7fec4Smrg    ;;
313371d7fec4Smrg  freebsd-elf*)
313471d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
313571d7fec4Smrg    ;;
313671d7fec4Smrg  freebsd* | kfreebsd*-gnu | dragonfly*)
313771d7fec4Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
313871d7fec4Smrg    # conventions
313971d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
314071d7fec4Smrg    ;;
314171d7fec4Smrg  gnu*)
314271d7fec4Smrg    ;;
314371d7fec4Smrg  hpux9*)
314471d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
314571d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
314671d7fec4Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
314771d7fec4Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
314871d7fec4Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
314971d7fec4Smrg				# but as the default
315071d7fec4Smrg				# location of the library.
315171d7fec4Smrg
315271d7fec4Smrg    case $cc_basename in
315371d7fec4Smrg    CC*)
315471d7fec4Smrg      # FIXME: insert proper C++ library support
315571d7fec4Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
315671d7fec4Smrg      ;;
315771d7fec4Smrg    aCC*)
315871d7fec4Smrg      _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'
315971d7fec4Smrg      # Commands to make compiler produce verbose output that lists
316071d7fec4Smrg      # what "hidden" libraries, object files and flags are used when
316171d7fec4Smrg      # linking a shared library.
316271d7fec4Smrg      #
316371d7fec4Smrg      # There doesn't appear to be a way to prevent this compiler from
316471d7fec4Smrg      # explicitly linking system object files so we need to strip them
316571d7fec4Smrg      # from the output so that they don't get included in the library
316671d7fec4Smrg      # dependencies.
316771d7fec4Smrg      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'
316871d7fec4Smrg      ;;
316971d7fec4Smrg    *)
317071d7fec4Smrg      if test "$GXX" = yes; then
317171d7fec4Smrg        _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'
317271d7fec4Smrg      else
317371d7fec4Smrg        # FIXME: insert proper C++ library support
317471d7fec4Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
317571d7fec4Smrg      fi
317671d7fec4Smrg      ;;
317771d7fec4Smrg    esac
317871d7fec4Smrg    ;;
317971d7fec4Smrg  hpux10*|hpux11*)
318071d7fec4Smrg    if test $with_gnu_ld = no; then
318171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
318271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
318371d7fec4Smrg
318471d7fec4Smrg      case $host_cpu in
318571d7fec4Smrg      hppa*64*|ia64*)
318671d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
318771d7fec4Smrg        ;;
318871d7fec4Smrg      *)
318971d7fec4Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
319071d7fec4Smrg        ;;
319171d7fec4Smrg      esac
319271d7fec4Smrg    fi
319371d7fec4Smrg    case $host_cpu in
319471d7fec4Smrg    hppa*64*|ia64*)
319571d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
319671d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
319771d7fec4Smrg      ;;
319871d7fec4Smrg    *)
319971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
320071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
320171d7fec4Smrg					      # but as the default
320271d7fec4Smrg					      # location of the library.
320371d7fec4Smrg      ;;
320471d7fec4Smrg    esac
320571d7fec4Smrg
320671d7fec4Smrg    case $cc_basename in
320771d7fec4Smrg      CC*)
320871d7fec4Smrg	# FIXME: insert proper C++ library support
320971d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
321071d7fec4Smrg	;;
321171d7fec4Smrg      aCC*)
321271d7fec4Smrg	case $host_cpu in
321371d7fec4Smrg	hppa*64*)
321471d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
321571d7fec4Smrg	  ;;
321671d7fec4Smrg	ia64*)
321771d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
321871d7fec4Smrg	  ;;
321971d7fec4Smrg	*)
322071d7fec4Smrg	  _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'
322171d7fec4Smrg	  ;;
322271d7fec4Smrg	esac
322371d7fec4Smrg	# Commands to make compiler produce verbose output that lists
322471d7fec4Smrg	# what "hidden" libraries, object files and flags are used when
322571d7fec4Smrg	# linking a shared library.
322671d7fec4Smrg	#
322771d7fec4Smrg	# There doesn't appear to be a way to prevent this compiler from
322871d7fec4Smrg	# explicitly linking system object files so we need to strip them
322971d7fec4Smrg	# from the output so that they don't get included in the library
323071d7fec4Smrg	# dependencies.
323171d7fec4Smrg	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'
323271d7fec4Smrg	;;
323371d7fec4Smrg      *)
323471d7fec4Smrg	if test "$GXX" = yes; then
323571d7fec4Smrg	  if test $with_gnu_ld = no; then
323671d7fec4Smrg	    case $host_cpu in
323771d7fec4Smrg	    hppa*64*)
323871d7fec4Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
323971d7fec4Smrg	      ;;
324071d7fec4Smrg	    ia64*)
324171d7fec4Smrg	      _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'
324271d7fec4Smrg	      ;;
324371d7fec4Smrg	    *)
324471d7fec4Smrg	      _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'
324571d7fec4Smrg	      ;;
324671d7fec4Smrg	    esac
324771d7fec4Smrg	  fi
324871d7fec4Smrg	else
324971d7fec4Smrg	  # FIXME: insert proper C++ library support
325071d7fec4Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
325171d7fec4Smrg	fi
325271d7fec4Smrg	;;
325371d7fec4Smrg    esac
325471d7fec4Smrg    ;;
325571d7fec4Smrg  interix3*)
325671d7fec4Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
325771d7fec4Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
325871d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
325971d7fec4Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
326071d7fec4Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
326171d7fec4Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
326271d7fec4Smrg    # default) and relocated if they conflict, which is a slow very memory
326371d7fec4Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
326471d7fec4Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
326571d7fec4Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
326671d7fec4Smrg    _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'
326771d7fec4Smrg    _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'
326871d7fec4Smrg    ;;
326971d7fec4Smrg  irix5* | irix6*)
327071d7fec4Smrg    case $cc_basename in
327171d7fec4Smrg      CC*)
327271d7fec4Smrg	# SGI C++
327371d7fec4Smrg	_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'
327471d7fec4Smrg
327571d7fec4Smrg	# Archives containing C++ object files must be created using
327671d7fec4Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
327771d7fec4Smrg	# necessary to make sure instantiated templates are included
327871d7fec4Smrg	# in the archive.
327971d7fec4Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
328071d7fec4Smrg	;;
328171d7fec4Smrg      *)
328271d7fec4Smrg	if test "$GXX" = yes; then
328371d7fec4Smrg	  if test "$with_gnu_ld" = no; then
328471d7fec4Smrg	    _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'
328571d7fec4Smrg	  else
328671d7fec4Smrg	    _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'
328771d7fec4Smrg	  fi
328871d7fec4Smrg	fi
328971d7fec4Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
329071d7fec4Smrg	;;
329171d7fec4Smrg    esac
329271d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
329371d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
329471d7fec4Smrg    ;;
329571d7fec4Smrg  linux*)
329671d7fec4Smrg    case $cc_basename in
329771d7fec4Smrg      KCC*)
329871d7fec4Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
329971d7fec4Smrg
330071d7fec4Smrg	# KCC will only create a shared library if the output file
330171d7fec4Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
330271d7fec4Smrg	# to its proper name (with version) after linking.
330371d7fec4Smrg	_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'
330471d7fec4Smrg	_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'
330571d7fec4Smrg	# Commands to make compiler produce verbose output that lists
330671d7fec4Smrg	# what "hidden" libraries, object files and flags are used when
330771d7fec4Smrg	# linking a shared library.
330871d7fec4Smrg	#
330971d7fec4Smrg	# There doesn't appear to be a way to prevent this compiler from
331071d7fec4Smrg	# explicitly linking system object files so we need to strip them
331171d7fec4Smrg	# from the output so that they don't get included in the library
331271d7fec4Smrg	# dependencies.
331371d7fec4Smrg	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'
331471d7fec4Smrg
331571d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
331671d7fec4Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
331771d7fec4Smrg
331871d7fec4Smrg	# Archives containing C++ object files must be created using
331971d7fec4Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
332071d7fec4Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
332171d7fec4Smrg	;;
332271d7fec4Smrg      icpc*)
332371d7fec4Smrg	# Intel C++
332471d7fec4Smrg	with_gnu_ld=yes
332571d7fec4Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
332671d7fec4Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
332771d7fec4Smrg	# earlier do not add the objects themselves.
332871d7fec4Smrg	case `$CC -V 2>&1` in
332971d7fec4Smrg	*"Version 7."*)
333071d7fec4Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
333171d7fec4Smrg  	  _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'
333271d7fec4Smrg	  ;;
333371d7fec4Smrg	*)  # Version 8.0 or newer
333471d7fec4Smrg	  tmp_idyn=
333571d7fec4Smrg	  case $host_cpu in
333671d7fec4Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
333771d7fec4Smrg	  esac
333871d7fec4Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
333971d7fec4Smrg	  _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'
334071d7fec4Smrg	  ;;
334171d7fec4Smrg	esac
334271d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
334371d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
334471d7fec4Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
334571d7fec4Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
334671d7fec4Smrg	;;
334771d7fec4Smrg      pgCC*)
334871d7fec4Smrg        # Portland Group C++ compiler
334971d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
335071d7fec4Smrg  	_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'
335171d7fec4Smrg
335271d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
335371d7fec4Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
335471d7fec4Smrg	_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'
335571d7fec4Smrg        ;;
335671d7fec4Smrg      cxx*)
335771d7fec4Smrg	# Compaq C++
335871d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
335971d7fec4Smrg	_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'
336071d7fec4Smrg
336171d7fec4Smrg	runpath_var=LD_RUN_PATH
336271d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
336371d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
336471d7fec4Smrg
336571d7fec4Smrg	# Commands to make compiler produce verbose output that lists
336671d7fec4Smrg	# what "hidden" libraries, object files and flags are used when
336771d7fec4Smrg	# linking a shared library.
336871d7fec4Smrg	#
336971d7fec4Smrg	# There doesn't appear to be a way to prevent this compiler from
337071d7fec4Smrg	# explicitly linking system object files so we need to strip them
337171d7fec4Smrg	# from the output so that they don't get included in the library
337271d7fec4Smrg	# dependencies.
337371d7fec4Smrg	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'
337471d7fec4Smrg	;;
337571d7fec4Smrg    esac
337671d7fec4Smrg    ;;
337771d7fec4Smrg  lynxos*)
337871d7fec4Smrg    # FIXME: insert proper C++ library support
337971d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
338071d7fec4Smrg    ;;
338171d7fec4Smrg  m88k*)
338271d7fec4Smrg    # FIXME: insert proper C++ library support
338371d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
338471d7fec4Smrg    ;;
338571d7fec4Smrg  mvs*)
338671d7fec4Smrg    case $cc_basename in
338771d7fec4Smrg      cxx*)
338871d7fec4Smrg	# FIXME: insert proper C++ library support
338971d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
339071d7fec4Smrg	;;
339171d7fec4Smrg      *)
339271d7fec4Smrg	# FIXME: insert proper C++ library support
339371d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
339471d7fec4Smrg	;;
339571d7fec4Smrg    esac
339671d7fec4Smrg    ;;
339771d7fec4Smrg  netbsd*)
339871d7fec4Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
339971d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
340071d7fec4Smrg      wlarc=
340171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
340271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
340371d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
340471d7fec4Smrg    fi
340571d7fec4Smrg    # Workaround some broken pre-1.5 toolchains
340671d7fec4Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
340771d7fec4Smrg    ;;
340871d7fec4Smrg  openbsd2*)
340971d7fec4Smrg    # C++ shared libraries are fairly broken
341071d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
341171d7fec4Smrg    ;;
341271d7fec4Smrg  openbsd*)
341371d7fec4Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
341471d7fec4Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
341571d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
341671d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
341771d7fec4Smrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
341871d7fec4Smrg      _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'
341971d7fec4Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
342071d7fec4Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
342171d7fec4Smrg    fi
342271d7fec4Smrg    output_verbose_link_cmd='echo'
342371d7fec4Smrg    ;;
342471d7fec4Smrg  osf3*)
342571d7fec4Smrg    case $cc_basename in
342671d7fec4Smrg      KCC*)
342771d7fec4Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
342871d7fec4Smrg
342971d7fec4Smrg	# KCC will only create a shared library if the output file
343071d7fec4Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
343171d7fec4Smrg	# to its proper name (with version) after linking.
343271d7fec4Smrg	_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'
343371d7fec4Smrg
343471d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
343571d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
343671d7fec4Smrg
343771d7fec4Smrg	# Archives containing C++ object files must be created using
343871d7fec4Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
343971d7fec4Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
344071d7fec4Smrg
344171d7fec4Smrg	;;
344271d7fec4Smrg      RCC*)
344371d7fec4Smrg	# Rational C++ 2.4.1
344471d7fec4Smrg	# FIXME: insert proper C++ library support
344571d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
344671d7fec4Smrg	;;
344771d7fec4Smrg      cxx*)
344871d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
344971d7fec4Smrg	_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'
345071d7fec4Smrg
345171d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
345271d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
345371d7fec4Smrg
345471d7fec4Smrg	# Commands to make compiler produce verbose output that lists
345571d7fec4Smrg	# what "hidden" libraries, object files and flags are used when
345671d7fec4Smrg	# linking a shared library.
345771d7fec4Smrg	#
345871d7fec4Smrg	# There doesn't appear to be a way to prevent this compiler from
345971d7fec4Smrg	# explicitly linking system object files so we need to strip them
346071d7fec4Smrg	# from the output so that they don't get included in the library
346171d7fec4Smrg	# dependencies.
346271d7fec4Smrg	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'
346371d7fec4Smrg	;;
346471d7fec4Smrg      *)
346571d7fec4Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
346671d7fec4Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
346771d7fec4Smrg	  _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'
346871d7fec4Smrg
346971d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
347071d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
347171d7fec4Smrg
347271d7fec4Smrg	  # Commands to make compiler produce verbose output that lists
347371d7fec4Smrg	  # what "hidden" libraries, object files and flags are used when
347471d7fec4Smrg	  # linking a shared library.
347571d7fec4Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
347671d7fec4Smrg
347771d7fec4Smrg	else
347871d7fec4Smrg	  # FIXME: insert proper C++ library support
347971d7fec4Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
348071d7fec4Smrg	fi
348171d7fec4Smrg	;;
348271d7fec4Smrg    esac
348371d7fec4Smrg    ;;
348471d7fec4Smrg  osf4* | osf5*)
348571d7fec4Smrg    case $cc_basename in
348671d7fec4Smrg      KCC*)
348771d7fec4Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
348871d7fec4Smrg
348971d7fec4Smrg	# KCC will only create a shared library if the output file
349071d7fec4Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
349171d7fec4Smrg	# to its proper name (with version) after linking.
349271d7fec4Smrg	_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'
349371d7fec4Smrg
349471d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
349571d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
349671d7fec4Smrg
349771d7fec4Smrg	# Archives containing C++ object files must be created using
349871d7fec4Smrg	# the KAI C++ compiler.
349971d7fec4Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
350071d7fec4Smrg	;;
350171d7fec4Smrg      RCC*)
350271d7fec4Smrg	# Rational C++ 2.4.1
350371d7fec4Smrg	# FIXME: insert proper C++ library support
350471d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
350571d7fec4Smrg	;;
350671d7fec4Smrg      cxx*)
350771d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
350871d7fec4Smrg	_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'
350971d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
351071d7fec4Smrg	  echo "-hidden">> $lib.exp~
351171d7fec4Smrg	  $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~
351271d7fec4Smrg	  $rm $lib.exp'
351371d7fec4Smrg
351471d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
351571d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
351671d7fec4Smrg
351771d7fec4Smrg	# Commands to make compiler produce verbose output that lists
351871d7fec4Smrg	# what "hidden" libraries, object files and flags are used when
351971d7fec4Smrg	# linking a shared library.
352071d7fec4Smrg	#
352171d7fec4Smrg	# There doesn't appear to be a way to prevent this compiler from
352271d7fec4Smrg	# explicitly linking system object files so we need to strip them
352371d7fec4Smrg	# from the output so that they don't get included in the library
352471d7fec4Smrg	# dependencies.
352571d7fec4Smrg	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'
352671d7fec4Smrg	;;
352771d7fec4Smrg      *)
352871d7fec4Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
352971d7fec4Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
353071d7fec4Smrg	 _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'
353171d7fec4Smrg
353271d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
353371d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
353471d7fec4Smrg
353571d7fec4Smrg	  # Commands to make compiler produce verbose output that lists
353671d7fec4Smrg	  # what "hidden" libraries, object files and flags are used when
353771d7fec4Smrg	  # linking a shared library.
353871d7fec4Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
353971d7fec4Smrg
354071d7fec4Smrg	else
354171d7fec4Smrg	  # FIXME: insert proper C++ library support
354271d7fec4Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
354371d7fec4Smrg	fi
354471d7fec4Smrg	;;
354571d7fec4Smrg    esac
354671d7fec4Smrg    ;;
354771d7fec4Smrg  psos*)
354871d7fec4Smrg    # FIXME: insert proper C++ library support
354971d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
355071d7fec4Smrg    ;;
355171d7fec4Smrg  sunos4*)
355271d7fec4Smrg    case $cc_basename in
355371d7fec4Smrg      CC*)
355471d7fec4Smrg	# Sun C++ 4.x
355571d7fec4Smrg	# FIXME: insert proper C++ library support
355671d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
355771d7fec4Smrg	;;
355871d7fec4Smrg      lcc*)
355971d7fec4Smrg	# Lucid
356071d7fec4Smrg	# FIXME: insert proper C++ library support
356171d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
356271d7fec4Smrg	;;
356371d7fec4Smrg      *)
356471d7fec4Smrg	# FIXME: insert proper C++ library support
356571d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
356671d7fec4Smrg	;;
356771d7fec4Smrg    esac
356871d7fec4Smrg    ;;
356971d7fec4Smrg  solaris*)
357071d7fec4Smrg    case $cc_basename in
357171d7fec4Smrg      CC*)
357271d7fec4Smrg	# Sun C++ 4.2, 5.x and Centerline C++
357371d7fec4Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
357471d7fec4Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
357571d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
357671d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
357771d7fec4Smrg	$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'
357871d7fec4Smrg
357971d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
358071d7fec4Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
358171d7fec4Smrg	case $host_os in
358271d7fec4Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
358371d7fec4Smrg	  *)
358471d7fec4Smrg	    # The C++ compiler is used as linker so we must use $wl
358571d7fec4Smrg	    # flag to pass the commands to the underlying system
358671d7fec4Smrg	    # linker. We must also pass each convience library through
358771d7fec4Smrg	    # to the system linker between allextract/defaultextract.
358871d7fec4Smrg	    # The C++ compiler will combine linker options so we
358971d7fec4Smrg	    # cannot just pass the convience library names through
359071d7fec4Smrg	    # without $wl.
359171d7fec4Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
359271d7fec4Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
359371d7fec4Smrg	    ;;
359471d7fec4Smrg	esac
359571d7fec4Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
359671d7fec4Smrg
359771d7fec4Smrg	output_verbose_link_cmd='echo'
359871d7fec4Smrg
359971d7fec4Smrg	# Archives containing C++ object files must be created using
360071d7fec4Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
360171d7fec4Smrg	# necessary to make sure instantiated templates are included
360271d7fec4Smrg	# in the archive.
360371d7fec4Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
360471d7fec4Smrg	;;
360571d7fec4Smrg      gcx*)
360671d7fec4Smrg	# Green Hills C++ Compiler
360771d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
360871d7fec4Smrg
360971d7fec4Smrg	# The C++ compiler must be used to create the archive.
361071d7fec4Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
361171d7fec4Smrg	;;
361271d7fec4Smrg      *)
361371d7fec4Smrg	# GNU C++ compiler with Solaris linker
361471d7fec4Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
361571d7fec4Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
361671d7fec4Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
361771d7fec4Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
361871d7fec4Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
361971d7fec4Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
362071d7fec4Smrg
362171d7fec4Smrg	    # Commands to make compiler produce verbose output that lists
362271d7fec4Smrg	    # what "hidden" libraries, object files and flags are used when
362371d7fec4Smrg	    # linking a shared library.
362471d7fec4Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
362571d7fec4Smrg	  else
362671d7fec4Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
362771d7fec4Smrg	    # platform.
362871d7fec4Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
362971d7fec4Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
363071d7fec4Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
363171d7fec4Smrg
363271d7fec4Smrg	    # Commands to make compiler produce verbose output that lists
363371d7fec4Smrg	    # what "hidden" libraries, object files and flags are used when
363471d7fec4Smrg	    # linking a shared library.
363571d7fec4Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
363671d7fec4Smrg	  fi
363771d7fec4Smrg
363871d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
363971d7fec4Smrg	fi
364071d7fec4Smrg	;;
364171d7fec4Smrg    esac
364271d7fec4Smrg    ;;
364371d7fec4Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
364471d7fec4Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
364571d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
364671d7fec4Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
364771d7fec4Smrg    runpath_var='LD_RUN_PATH'
364871d7fec4Smrg
364971d7fec4Smrg    case $cc_basename in
365071d7fec4Smrg      CC*)
365171d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
365271d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
365371d7fec4Smrg	;;
365471d7fec4Smrg      *)
365571d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
365671d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
365771d7fec4Smrg	;;
365871d7fec4Smrg    esac
365971d7fec4Smrg    ;;
366071d7fec4Smrg  sysv5* | sco3.2v5* | sco5v6*)
366171d7fec4Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
366271d7fec4Smrg    # link with -lc, and that would cause any symbols used from libc to
366371d7fec4Smrg    # always be unresolved, which means just about no library would
366471d7fec4Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
366571d7fec4Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
366671d7fec4Smrg    # as -z defs.
366771d7fec4Smrg    # For security reasons, it is highly recommended that you always
366871d7fec4Smrg    # use absolute paths for naming shared libraries, and exclude the
366971d7fec4Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
367071d7fec4Smrg    # requires that you compile everything twice, which is a pain.
367171d7fec4Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
367271d7fec4Smrg    # non-empty value in the environment.  Most likely only useful for
367371d7fec4Smrg    # creating official distributions of packages.
367471d7fec4Smrg    # This is a hack until libtool officially supports absolute path
367571d7fec4Smrg    # names for shared libraries.
367671d7fec4Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
367771d7fec4Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
367871d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
367971d7fec4Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
368071d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
368171d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
368271d7fec4Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
368371d7fec4Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
368471d7fec4Smrg    runpath_var='LD_RUN_PATH'
368571d7fec4Smrg
368671d7fec4Smrg    case $cc_basename in
368771d7fec4Smrg      CC*)
368871d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
368971d7fec4Smrg	_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'
369071d7fec4Smrg	;;
369171d7fec4Smrg      *)
369271d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
369371d7fec4Smrg	_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'
369471d7fec4Smrg	;;
369571d7fec4Smrg    esac
369671d7fec4Smrg    ;;
369771d7fec4Smrg  tandem*)
369871d7fec4Smrg    case $cc_basename in
369971d7fec4Smrg      NCC*)
370071d7fec4Smrg	# NonStop-UX NCC 3.20
370171d7fec4Smrg	# FIXME: insert proper C++ library support
370271d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
370371d7fec4Smrg	;;
370471d7fec4Smrg      *)
370571d7fec4Smrg	# FIXME: insert proper C++ library support
370671d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
370771d7fec4Smrg	;;
370871d7fec4Smrg    esac
370971d7fec4Smrg    ;;
371071d7fec4Smrg  vxworks*)
371171d7fec4Smrg    # FIXME: insert proper C++ library support
371271d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
371371d7fec4Smrg    ;;
371471d7fec4Smrg  *)
371571d7fec4Smrg    # FIXME: insert proper C++ library support
371671d7fec4Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
371771d7fec4Smrg    ;;
371871d7fec4Smrgesac
371971d7fec4SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
372071d7fec4Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
372171d7fec4Smrg
372271d7fec4Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
372371d7fec4Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
372471d7fec4Smrg
372571d7fec4SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
372671d7fec4SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
372771d7fec4SmrgAC_LIBTOOL_PROG_CC_C_O($1)
372871d7fec4SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
372971d7fec4SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
373071d7fec4SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
373171d7fec4SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
373271d7fec4Smrg
373371d7fec4SmrgAC_LIBTOOL_CONFIG($1)
373471d7fec4Smrg
373571d7fec4SmrgAC_LANG_POP
373671d7fec4SmrgCC=$lt_save_CC
373771d7fec4SmrgLDCXX=$LD
373871d7fec4SmrgLD=$lt_save_LD
373971d7fec4SmrgGCC=$lt_save_GCC
374071d7fec4Smrgwith_gnu_ldcxx=$with_gnu_ld
374171d7fec4Smrgwith_gnu_ld=$lt_save_with_gnu_ld
374271d7fec4Smrglt_cv_path_LDCXX=$lt_cv_path_LD
374371d7fec4Smrglt_cv_path_LD=$lt_save_path_LD
374471d7fec4Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
374571d7fec4Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
374671d7fec4Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
374771d7fec4Smrg
374871d7fec4Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
374971d7fec4Smrg# ------------------------------------
375071d7fec4Smrg# Figure out "hidden" library dependencies from verbose
375171d7fec4Smrg# compiler output when linking a shared library.
375271d7fec4Smrg# Parse the compiler output and extract the necessary
375371d7fec4Smrg# objects, libraries and library flags.
375471d7fec4SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
375571d7fec4Smrgdnl we can't use the lt_simple_compile_test_code here,
375671d7fec4Smrgdnl because it contains code intended for an executable,
375771d7fec4Smrgdnl not a library.  It's possible we should let each
375871d7fec4Smrgdnl tag define a new lt_????_link_test_code variable,
375971d7fec4Smrgdnl but it's only used here...
376071d7fec4Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
376171d7fec4Smrgint a;
376271d7fec4Smrgvoid foo (void) { a = 0; }
376371d7fec4SmrgEOF
376471d7fec4Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
376571d7fec4Smrgclass Foo
376671d7fec4Smrg{
376771d7fec4Smrgpublic:
376871d7fec4Smrg  Foo (void) { a = 0; }
376971d7fec4Smrgprivate:
377071d7fec4Smrg  int a;
377171d7fec4Smrg};
377271d7fec4SmrgEOF
377371d7fec4Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
377471d7fec4Smrg      subroutine foo
377571d7fec4Smrg      implicit none
377671d7fec4Smrg      integer*4 a
377771d7fec4Smrg      a=0
377871d7fec4Smrg      return
377971d7fec4Smrg      end
378071d7fec4SmrgEOF
378171d7fec4Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
378271d7fec4Smrgpublic class foo {
378371d7fec4Smrg  private int a;
378471d7fec4Smrg  public void bar (void) {
378571d7fec4Smrg    a = 0;
378671d7fec4Smrg  }
378771d7fec4Smrg};
378871d7fec4SmrgEOF
378971d7fec4Smrg])
379071d7fec4Smrgdnl Parse the compiler output and extract the necessary
379171d7fec4Smrgdnl objects, libraries and library flags.
379271d7fec4Smrgif AC_TRY_EVAL(ac_compile); then
379371d7fec4Smrg  # Parse the compiler output and extract the necessary
379471d7fec4Smrg  # objects, libraries and library flags.
379571d7fec4Smrg
379671d7fec4Smrg  # Sentinel used to keep track of whether or not we are before
379771d7fec4Smrg  # the conftest object file.
379871d7fec4Smrg  pre_test_object_deps_done=no
379971d7fec4Smrg
380071d7fec4Smrg  # The `*' in the case matches for architectures that use `case' in
380171d7fec4Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
380271d7fec4Smrg  # eval without this substitution.
380371d7fec4Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
380471d7fec4Smrg
380571d7fec4Smrg  for p in `eval $output_verbose_link_cmd`; do
380671d7fec4Smrg    case $p in
380771d7fec4Smrg
380871d7fec4Smrg    -L* | -R* | -l*)
380971d7fec4Smrg       # Some compilers place space between "-{L,R}" and the path.
381071d7fec4Smrg       # Remove the space.
381171d7fec4Smrg       if test $p = "-L" \
381271d7fec4Smrg	  || test $p = "-R"; then
381371d7fec4Smrg	 prev=$p
381471d7fec4Smrg	 continue
381571d7fec4Smrg       else
381671d7fec4Smrg	 prev=
381771d7fec4Smrg       fi
381871d7fec4Smrg
381971d7fec4Smrg       if test "$pre_test_object_deps_done" = no; then
382071d7fec4Smrg	 case $p in
382171d7fec4Smrg	 -L* | -R*)
382271d7fec4Smrg	   # Internal compiler library paths should come after those
382371d7fec4Smrg	   # provided the user.  The postdeps already come after the
382471d7fec4Smrg	   # user supplied libs so there is no need to process them.
382571d7fec4Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
382671d7fec4Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
382771d7fec4Smrg	   else
382871d7fec4Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
382971d7fec4Smrg	   fi
383071d7fec4Smrg	   ;;
383171d7fec4Smrg	 # The "-l" case would never come before the object being
383271d7fec4Smrg	 # linked, so don't bother handling this case.
383371d7fec4Smrg	 esac
383471d7fec4Smrg       else
383571d7fec4Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
383671d7fec4Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
383771d7fec4Smrg	 else
383871d7fec4Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
383971d7fec4Smrg	 fi
384071d7fec4Smrg       fi
384171d7fec4Smrg       ;;
384271d7fec4Smrg
384371d7fec4Smrg    *.$objext)
384471d7fec4Smrg       # This assumes that the test object file only shows up
384571d7fec4Smrg       # once in the compiler output.
384671d7fec4Smrg       if test "$p" = "conftest.$objext"; then
384771d7fec4Smrg	 pre_test_object_deps_done=yes
384871d7fec4Smrg	 continue
384971d7fec4Smrg       fi
385071d7fec4Smrg
385171d7fec4Smrg       if test "$pre_test_object_deps_done" = no; then
385271d7fec4Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
385371d7fec4Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
385471d7fec4Smrg	 else
385571d7fec4Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
385671d7fec4Smrg	 fi
385771d7fec4Smrg       else
385871d7fec4Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
385971d7fec4Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
386071d7fec4Smrg	 else
386171d7fec4Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
386271d7fec4Smrg	 fi
386371d7fec4Smrg       fi
386471d7fec4Smrg       ;;
386571d7fec4Smrg
386671d7fec4Smrg    *) ;; # Ignore the rest.
386771d7fec4Smrg
386871d7fec4Smrg    esac
386971d7fec4Smrg  done
387071d7fec4Smrg
387171d7fec4Smrg  # Clean up.
387271d7fec4Smrg  rm -f a.out a.exe
387371d7fec4Smrgelse
387471d7fec4Smrg  echo "libtool.m4: error: problem compiling $1 test program"
387571d7fec4Smrgfi
387671d7fec4Smrg
387771d7fec4Smrg$rm -f confest.$objext
387871d7fec4Smrg
387971d7fec4Smrg# PORTME: override above test on systems where it is broken
388071d7fec4Smrgifelse([$1],[CXX],
388171d7fec4Smrg[case $host_os in
388271d7fec4Smrginterix3*)
388371d7fec4Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
388471d7fec4Smrg  # hack all around it, let's just trust "g++" to DTRT.
388571d7fec4Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
388671d7fec4Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
388771d7fec4Smrg  _LT_AC_TAGVAR(postdeps,$1)=
388871d7fec4Smrg  ;;
388971d7fec4Smrg
389071d7fec4Smrgsolaris*)
389171d7fec4Smrg  case $cc_basename in
389271d7fec4Smrg  CC*)
389371d7fec4Smrg    # Adding this requires a known-good setup of shared libraries for
389471d7fec4Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
389571d7fec4Smrg    # archive will be linked into the output, leading to subtle bugs.
389671d7fec4Smrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
389771d7fec4Smrg    ;;
389871d7fec4Smrg  esac
389971d7fec4Smrg  ;;
390071d7fec4Smrgesac
390171d7fec4Smrg])
390271d7fec4Smrg
390371d7fec4Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
390471d7fec4Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
390571d7fec4Smrgesac
390671d7fec4Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
390771d7fec4Smrg
390871d7fec4Smrg# AC_LIBTOOL_LANG_F77_CONFIG
390971d7fec4Smrg# --------------------------
391071d7fec4Smrg# Ensure that the configuration vars for the C compiler are
391171d7fec4Smrg# suitably defined.  Those variables are subsequently used by
391271d7fec4Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
391371d7fec4SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
391471d7fec4SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
391571d7fec4Smrg[AC_REQUIRE([AC_PROG_F77])
391671d7fec4SmrgAC_LANG_PUSH(Fortran 77)
391771d7fec4Smrg
391871d7fec4Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
391971d7fec4Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
392071d7fec4Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
392171d7fec4Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
392271d7fec4Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
392371d7fec4Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
392471d7fec4Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
392571d7fec4Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
392671d7fec4Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
392771d7fec4Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
392871d7fec4Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
392971d7fec4Smrg_LT_AC_TAGVAR(module_cmds, $1)=
393071d7fec4Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
393171d7fec4Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
393271d7fec4Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
393371d7fec4Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
393471d7fec4Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
393571d7fec4Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
393671d7fec4Smrg
393771d7fec4Smrg# Source file extension for f77 test sources.
393871d7fec4Smrgac_ext=f
393971d7fec4Smrg
394071d7fec4Smrg# Object file extension for compiled f77 test sources.
394171d7fec4Smrgobjext=o
394271d7fec4Smrg_LT_AC_TAGVAR(objext, $1)=$objext
394371d7fec4Smrg
394471d7fec4Smrg# Code to be used in simple compile tests
394571d7fec4Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
394671d7fec4Smrg
394771d7fec4Smrg# Code to be used in simple link tests
394871d7fec4Smrglt_simple_link_test_code="      program t\n      end\n"
394971d7fec4Smrg
395071d7fec4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
395171d7fec4Smrg_LT_AC_SYS_COMPILER
395271d7fec4Smrg
395371d7fec4Smrg# save warnings/boilerplate of simple test code
395471d7fec4Smrg_LT_COMPILER_BOILERPLATE
395571d7fec4Smrg_LT_LINKER_BOILERPLATE
395671d7fec4Smrg
395771d7fec4Smrg# Allow CC to be a program name with arguments.
395871d7fec4Smrglt_save_CC="$CC"
395971d7fec4SmrgCC=${F77-"f77"}
396071d7fec4Smrgcompiler=$CC
396171d7fec4Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
396271d7fec4Smrg_LT_CC_BASENAME([$compiler])
396371d7fec4Smrg
396471d7fec4SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
396571d7fec4SmrgAC_MSG_RESULT([$can_build_shared])
396671d7fec4Smrg
396771d7fec4SmrgAC_MSG_CHECKING([whether to build shared libraries])
396871d7fec4Smrgtest "$can_build_shared" = "no" && enable_shared=no
396971d7fec4Smrg
397071d7fec4Smrg# On AIX, shared libraries and static libraries use the same namespace, and
397171d7fec4Smrg# are all built from PIC.
397271d7fec4Smrgcase $host_os in
397371d7fec4Smrgaix3*)
397471d7fec4Smrg  test "$enable_shared" = yes && enable_static=no
397571d7fec4Smrg  if test -n "$RANLIB"; then
397671d7fec4Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
397771d7fec4Smrg    postinstall_cmds='$RANLIB $lib'
397871d7fec4Smrg  fi
397971d7fec4Smrg  ;;
398071d7fec4Smrgaix4* | aix5*)
398171d7fec4Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
398271d7fec4Smrg    test "$enable_shared" = yes && enable_static=no
398371d7fec4Smrg  fi
398471d7fec4Smrg  ;;
398571d7fec4Smrgesac
398671d7fec4SmrgAC_MSG_RESULT([$enable_shared])
398771d7fec4Smrg
398871d7fec4SmrgAC_MSG_CHECKING([whether to build static libraries])
398971d7fec4Smrg# Make sure either enable_shared or enable_static is yes.
399071d7fec4Smrgtest "$enable_shared" = yes || enable_static=yes
399171d7fec4SmrgAC_MSG_RESULT([$enable_static])
399271d7fec4Smrg
399371d7fec4Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
399471d7fec4Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
399571d7fec4Smrg
399671d7fec4SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
399771d7fec4SmrgAC_LIBTOOL_PROG_CC_C_O($1)
399871d7fec4SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
399971d7fec4SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
400071d7fec4SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
400171d7fec4SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
400271d7fec4Smrg
400371d7fec4SmrgAC_LIBTOOL_CONFIG($1)
400471d7fec4Smrg
400571d7fec4SmrgAC_LANG_POP
400671d7fec4SmrgCC="$lt_save_CC"
400771d7fec4Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
400871d7fec4Smrg
400971d7fec4Smrg
401071d7fec4Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
401171d7fec4Smrg# --------------------------
401271d7fec4Smrg# Ensure that the configuration vars for the C compiler are
401371d7fec4Smrg# suitably defined.  Those variables are subsequently used by
401471d7fec4Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
401571d7fec4SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
401671d7fec4SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
401771d7fec4Smrg[AC_LANG_SAVE
401871d7fec4Smrg
401971d7fec4Smrg# Source file extension for Java test sources.
402071d7fec4Smrgac_ext=java
402171d7fec4Smrg
402271d7fec4Smrg# Object file extension for compiled Java test sources.
402371d7fec4Smrgobjext=o
402471d7fec4Smrg_LT_AC_TAGVAR(objext, $1)=$objext
402571d7fec4Smrg
402671d7fec4Smrg# Code to be used in simple compile tests
402771d7fec4Smrglt_simple_compile_test_code="class foo {}\n"
402871d7fec4Smrg
402971d7fec4Smrg# Code to be used in simple link tests
403071d7fec4Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
403171d7fec4Smrg
403271d7fec4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
403371d7fec4Smrg_LT_AC_SYS_COMPILER
403471d7fec4Smrg
403571d7fec4Smrg# save warnings/boilerplate of simple test code
403671d7fec4Smrg_LT_COMPILER_BOILERPLATE
403771d7fec4Smrg_LT_LINKER_BOILERPLATE
403871d7fec4Smrg
403971d7fec4Smrg# Allow CC to be a program name with arguments.
404071d7fec4Smrglt_save_CC="$CC"
404171d7fec4SmrgCC=${GCJ-"gcj"}
404271d7fec4Smrgcompiler=$CC
404371d7fec4Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
404471d7fec4Smrg_LT_CC_BASENAME([$compiler])
404571d7fec4Smrg
404671d7fec4Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
404771d7fec4Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
404871d7fec4Smrg
404971d7fec4Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
405071d7fec4Smrg
405171d7fec4SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
405271d7fec4SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
405371d7fec4SmrgAC_LIBTOOL_PROG_CC_C_O($1)
405471d7fec4SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
405571d7fec4SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
405671d7fec4SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
405771d7fec4SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
405871d7fec4Smrg
405971d7fec4SmrgAC_LIBTOOL_CONFIG($1)
406071d7fec4Smrg
406171d7fec4SmrgAC_LANG_RESTORE
406271d7fec4SmrgCC="$lt_save_CC"
406371d7fec4Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
406471d7fec4Smrg
406571d7fec4Smrg
406671d7fec4Smrg# AC_LIBTOOL_LANG_RC_CONFIG
406771d7fec4Smrg# -------------------------
406871d7fec4Smrg# Ensure that the configuration vars for the Windows resource compiler are
406971d7fec4Smrg# suitably defined.  Those variables are subsequently used by
407071d7fec4Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
407171d7fec4SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
407271d7fec4SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
407371d7fec4Smrg[AC_LANG_SAVE
407471d7fec4Smrg
407571d7fec4Smrg# Source file extension for RC test sources.
407671d7fec4Smrgac_ext=rc
407771d7fec4Smrg
407871d7fec4Smrg# Object file extension for compiled RC test sources.
407971d7fec4Smrgobjext=o
408071d7fec4Smrg_LT_AC_TAGVAR(objext, $1)=$objext
408171d7fec4Smrg
408271d7fec4Smrg# Code to be used in simple compile tests
408371d7fec4Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
408471d7fec4Smrg
408571d7fec4Smrg# Code to be used in simple link tests
408671d7fec4Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
408771d7fec4Smrg
408871d7fec4Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
408971d7fec4Smrg_LT_AC_SYS_COMPILER
409071d7fec4Smrg
409171d7fec4Smrg# save warnings/boilerplate of simple test code
409271d7fec4Smrg_LT_COMPILER_BOILERPLATE
409371d7fec4Smrg_LT_LINKER_BOILERPLATE
409471d7fec4Smrg
409571d7fec4Smrg# Allow CC to be a program name with arguments.
409671d7fec4Smrglt_save_CC="$CC"
409771d7fec4SmrgCC=${RC-"windres"}
409871d7fec4Smrgcompiler=$CC
409971d7fec4Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
410071d7fec4Smrg_LT_CC_BASENAME([$compiler])
410171d7fec4Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
410271d7fec4Smrg
410371d7fec4SmrgAC_LIBTOOL_CONFIG($1)
410471d7fec4Smrg
410571d7fec4SmrgAC_LANG_RESTORE
410671d7fec4SmrgCC="$lt_save_CC"
410771d7fec4Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
410871d7fec4Smrg
410971d7fec4Smrg
411071d7fec4Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
411171d7fec4Smrg# ----------------------------
411271d7fec4Smrg# If TAGNAME is not passed, then create an initial libtool script
411371d7fec4Smrg# with a default configuration from the untagged config vars.  Otherwise
411471d7fec4Smrg# add code to config.status for appending the configuration named by
411571d7fec4Smrg# TAGNAME from the matching tagged config vars.
411671d7fec4SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
411771d7fec4Smrg[# The else clause should only fire when bootstrapping the
411871d7fec4Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
411971d7fec4Smrg# with your package, and you will get complaints that there are
412071d7fec4Smrg# no rules to generate ltmain.sh.
412171d7fec4Smrgif test -f "$ltmain"; then
412271d7fec4Smrg  # See if we are running on zsh, and set the options which allow our commands through
412371d7fec4Smrg  # without removal of \ escapes.
412471d7fec4Smrg  if test -n "${ZSH_VERSION+set}" ; then
412571d7fec4Smrg    setopt NO_GLOB_SUBST
412671d7fec4Smrg  fi
412771d7fec4Smrg  # Now quote all the things that may contain metacharacters while being
412871d7fec4Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
412971d7fec4Smrg  # variables and quote the copies for generation of the libtool script.
413071d7fec4Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
413171d7fec4Smrg    SED SHELL STRIP \
413271d7fec4Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
413371d7fec4Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
413471d7fec4Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
413571d7fec4Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
413671d7fec4Smrg    lt_cv_sys_global_symbol_to_c_name_address \
413771d7fec4Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
413871d7fec4Smrg    old_postinstall_cmds old_postuninstall_cmds \
413971d7fec4Smrg    _LT_AC_TAGVAR(compiler, $1) \
414071d7fec4Smrg    _LT_AC_TAGVAR(CC, $1) \
414171d7fec4Smrg    _LT_AC_TAGVAR(LD, $1) \
414271d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
414371d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
414471d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
414571d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
414671d7fec4Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
414771d7fec4Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
414871d7fec4Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
414971d7fec4Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
415071d7fec4Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
415171d7fec4Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
415271d7fec4Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
415371d7fec4Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
415471d7fec4Smrg    _LT_AC_TAGVAR(predeps, $1) \
415571d7fec4Smrg    _LT_AC_TAGVAR(postdeps, $1) \
415671d7fec4Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
415771d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
415871d7fec4Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
415971d7fec4Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
416071d7fec4Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
416171d7fec4Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
416271d7fec4Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
416371d7fec4Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
416471d7fec4Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
416571d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
416671d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
416771d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
416871d7fec4Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
416971d7fec4Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
417071d7fec4Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
417171d7fec4Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
417271d7fec4Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
417371d7fec4Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
417471d7fec4Smrg
417571d7fec4Smrg    case $var in
417671d7fec4Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
417771d7fec4Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
417871d7fec4Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
417971d7fec4Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
418071d7fec4Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
418171d7fec4Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
418271d7fec4Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
418371d7fec4Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
418471d7fec4Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
418571d7fec4Smrg    postinstall_cmds | postuninstall_cmds | \
418671d7fec4Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
418771d7fec4Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
418871d7fec4Smrg      # Double-quote double-evaled strings.
418971d7fec4Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
419071d7fec4Smrg      ;;
419171d7fec4Smrg    *)
419271d7fec4Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
419371d7fec4Smrg      ;;
419471d7fec4Smrg    esac
419571d7fec4Smrg  done
419671d7fec4Smrg
419771d7fec4Smrg  case $lt_echo in
419871d7fec4Smrg  *'\[$]0 --fallback-echo"')
419971d7fec4Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
420071d7fec4Smrg    ;;
420171d7fec4Smrg  esac
420271d7fec4Smrg
420371d7fec4Smrgifelse([$1], [],
420471d7fec4Smrg  [cfgfile="${ofile}T"
420571d7fec4Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
420671d7fec4Smrg  $rm -f "$cfgfile"
420771d7fec4Smrg  AC_MSG_NOTICE([creating $ofile])],
420871d7fec4Smrg  [cfgfile="$ofile"])
420971d7fec4Smrg
421071d7fec4Smrg  cat <<__EOF__ >> "$cfgfile"
421171d7fec4Smrgifelse([$1], [],
421271d7fec4Smrg[#! $SHELL
421371d7fec4Smrg
421471d7fec4Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
421571d7fec4Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
421671d7fec4Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
421771d7fec4Smrg#
421871d7fec4Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
421971d7fec4Smrg# Free Software Foundation, Inc.
422071d7fec4Smrg#
422171d7fec4Smrg# This file is part of GNU Libtool:
422271d7fec4Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
422371d7fec4Smrg#
422471d7fec4Smrg# This program is free software; you can redistribute it and/or modify
422571d7fec4Smrg# it under the terms of the GNU General Public License as published by
422671d7fec4Smrg# the Free Software Foundation; either version 2 of the License, or
422771d7fec4Smrg# (at your option) any later version.
422871d7fec4Smrg#
422971d7fec4Smrg# This program is distributed in the hope that it will be useful, but
423071d7fec4Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
423171d7fec4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
423271d7fec4Smrg# General Public License for more details.
423371d7fec4Smrg#
423471d7fec4Smrg# You should have received a copy of the GNU General Public License
423571d7fec4Smrg# along with this program; if not, write to the Free Software
423671d7fec4Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
423771d7fec4Smrg#
423871d7fec4Smrg# As a special exception to the GNU General Public License, if you
423971d7fec4Smrg# distribute this file as part of a program that contains a
424071d7fec4Smrg# configuration script generated by Autoconf, you may include it under
424171d7fec4Smrg# the same distribution terms that you use for the rest of that program.
424271d7fec4Smrg
424371d7fec4Smrg# A sed program that does not truncate output.
424471d7fec4SmrgSED=$lt_SED
424571d7fec4Smrg
424671d7fec4Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
424771d7fec4SmrgXsed="$SED -e 1s/^X//"
424871d7fec4Smrg
424971d7fec4Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
425071d7fec4Smrg# if CDPATH is set.
425171d7fec4Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
425271d7fec4Smrg
425371d7fec4Smrg# The names of the tagged configurations supported by this script.
425471d7fec4Smrgavailable_tags=
425571d7fec4Smrg
425671d7fec4Smrg# ### BEGIN LIBTOOL CONFIG],
425771d7fec4Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
425871d7fec4Smrg
425971d7fec4Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
426071d7fec4Smrg
426171d7fec4Smrg# Shell to use when invoking shell scripts.
426271d7fec4SmrgSHELL=$lt_SHELL
426371d7fec4Smrg
426471d7fec4Smrg# Whether or not to build shared libraries.
426571d7fec4Smrgbuild_libtool_libs=$enable_shared
426671d7fec4Smrg
426771d7fec4Smrg# Whether or not to build static libraries.
426871d7fec4Smrgbuild_old_libs=$enable_static
426971d7fec4Smrg
427071d7fec4Smrg# Whether or not to add -lc for building shared libraries.
427171d7fec4Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
427271d7fec4Smrg
427371d7fec4Smrg# Whether or not to disallow shared libs when runtime libs are static
427471d7fec4Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
427571d7fec4Smrg
427671d7fec4Smrg# Whether or not to optimize for fast installation.
427771d7fec4Smrgfast_install=$enable_fast_install
427871d7fec4Smrg
427971d7fec4Smrg# The host system.
428071d7fec4Smrghost_alias=$host_alias
428171d7fec4Smrghost=$host
428271d7fec4Smrghost_os=$host_os
428371d7fec4Smrg
428471d7fec4Smrg# The build system.
428571d7fec4Smrgbuild_alias=$build_alias
428671d7fec4Smrgbuild=$build
428771d7fec4Smrgbuild_os=$build_os
428871d7fec4Smrg
428971d7fec4Smrg# An echo program that does not interpret backslashes.
429071d7fec4Smrgecho=$lt_echo
429171d7fec4Smrg
429271d7fec4Smrg# The archiver.
429371d7fec4SmrgAR=$lt_AR
429471d7fec4SmrgAR_FLAGS=$lt_AR_FLAGS
429571d7fec4Smrg
429671d7fec4Smrg# A C compiler.
429771d7fec4SmrgLTCC=$lt_LTCC
429871d7fec4Smrg
429971d7fec4Smrg# LTCC compiler flags.
430071d7fec4SmrgLTCFLAGS=$lt_LTCFLAGS
430171d7fec4Smrg
430271d7fec4Smrg# A language-specific compiler.
430371d7fec4SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
430471d7fec4Smrg
430571d7fec4Smrg# Is the compiler the GNU C compiler?
430671d7fec4Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
430771d7fec4Smrg
430871d7fec4Smrggcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\`
430971d7fec4Smrggcc_ver=\`gcc -dumpversion\`
431071d7fec4Smrg
431171d7fec4Smrg# An ERE matcher.
431271d7fec4SmrgEGREP=$lt_EGREP
431371d7fec4Smrg
431471d7fec4Smrg# The linker used to build libraries.
431571d7fec4SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
431671d7fec4Smrg
431771d7fec4Smrg# Whether we need hard or soft links.
431871d7fec4SmrgLN_S=$lt_LN_S
431971d7fec4Smrg
432071d7fec4Smrg# A BSD-compatible nm program.
432171d7fec4SmrgNM=$lt_NM
432271d7fec4Smrg
432371d7fec4Smrg# A symbol stripping program
432471d7fec4SmrgSTRIP=$lt_STRIP
432571d7fec4Smrg
432671d7fec4Smrg# Used to examine libraries when file_magic_cmd begins "file"
432771d7fec4SmrgMAGIC_CMD=$MAGIC_CMD
432871d7fec4Smrg
432971d7fec4Smrg# Used on cygwin: DLL creation program.
433071d7fec4SmrgDLLTOOL="$DLLTOOL"
433171d7fec4Smrg
433271d7fec4Smrg# Used on cygwin: object dumper.
433371d7fec4SmrgOBJDUMP="$OBJDUMP"
433471d7fec4Smrg
433571d7fec4Smrg# Used on cygwin: assembler.
433671d7fec4SmrgAS="$AS"
433771d7fec4Smrg
433871d7fec4Smrg# The name of the directory that contains temporary libtool files.
433971d7fec4Smrgobjdir=$objdir
434071d7fec4Smrg
434171d7fec4Smrg# How to create reloadable object files.
434271d7fec4Smrgreload_flag=$lt_reload_flag
434371d7fec4Smrgreload_cmds=$lt_reload_cmds
434471d7fec4Smrg
434571d7fec4Smrg# How to pass a linker flag through the compiler.
434671d7fec4Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
434771d7fec4Smrg
434871d7fec4Smrg# Object file suffix (normally "o").
434971d7fec4Smrgobjext="$ac_objext"
435071d7fec4Smrg
435171d7fec4Smrg# Old archive suffix (normally "a").
435271d7fec4Smrglibext="$libext"
435371d7fec4Smrg
435471d7fec4Smrg# Shared library suffix (normally ".so").
435571d7fec4Smrgshrext_cmds='$shrext_cmds'
435671d7fec4Smrg
435771d7fec4Smrg# Executable file suffix (normally "").
435871d7fec4Smrgexeext="$exeext"
435971d7fec4Smrg
436071d7fec4Smrg# Additional compiler flags for building library objects.
436171d7fec4Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
436271d7fec4Smrgpic_mode=$pic_mode
436371d7fec4Smrg
436471d7fec4Smrg# What is the maximum length of a command?
436571d7fec4Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
436671d7fec4Smrg
436771d7fec4Smrg# Does compiler simultaneously support -c and -o options?
436871d7fec4Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
436971d7fec4Smrg
437071d7fec4Smrg# Must we lock files when doing compilation?
437171d7fec4Smrgneed_locks=$lt_need_locks
437271d7fec4Smrg
437371d7fec4Smrg# Do we need the lib prefix for modules?
437471d7fec4Smrgneed_lib_prefix=$need_lib_prefix
437571d7fec4Smrg
437671d7fec4Smrg# Do we need a version for libraries?
437771d7fec4Smrgneed_version=$need_version
437871d7fec4Smrg
437971d7fec4Smrg# Whether dlopen is supported.
438071d7fec4Smrgdlopen_support=$enable_dlopen
438171d7fec4Smrg
438271d7fec4Smrg# Whether dlopen of programs is supported.
438371d7fec4Smrgdlopen_self=$enable_dlopen_self
438471d7fec4Smrg
438571d7fec4Smrg# Whether dlopen of statically linked programs is supported.
438671d7fec4Smrgdlopen_self_static=$enable_dlopen_self_static
438771d7fec4Smrg
438871d7fec4Smrg# Compiler flag to prevent dynamic linking.
438971d7fec4Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
439071d7fec4Smrg
439171d7fec4Smrg# Compiler flag to turn off builtin functions.
439271d7fec4Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
439371d7fec4Smrg
439471d7fec4Smrg# Compiler flag to allow reflexive dlopens.
439571d7fec4Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
439671d7fec4Smrg
439771d7fec4Smrg# Compiler flag to generate shared objects directly from archives.
439871d7fec4Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
439971d7fec4Smrg
440071d7fec4Smrg# Compiler flag to generate thread-safe objects.
440171d7fec4Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
440271d7fec4Smrg
440371d7fec4Smrg# Library versioning type.
440471d7fec4Smrgversion_type=$version_type
440571d7fec4Smrg
440671d7fec4Smrg# Format of library name prefix.
440771d7fec4Smrglibname_spec=$lt_libname_spec
440871d7fec4Smrg
440971d7fec4Smrg# List of archive names.  First name is the real one, the rest are links.
441071d7fec4Smrg# The last name is the one that the linker finds with -lNAME.
441171d7fec4Smrglibrary_names_spec=$lt_library_names_spec
441271d7fec4Smrg
441371d7fec4Smrg# The coded name of the library, if different from the real name.
441471d7fec4Smrgsoname_spec=$lt_soname_spec
441571d7fec4Smrg
441671d7fec4Smrg# Commands used to build and install an old-style archive.
441771d7fec4SmrgRANLIB=$lt_RANLIB
441871d7fec4Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
441971d7fec4Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
442071d7fec4Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
442171d7fec4Smrg
442271d7fec4Smrg# Create an old-style archive from a shared archive.
442371d7fec4Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
442471d7fec4Smrg
442571d7fec4Smrg# Create a temporary old-style archive to link instead of a shared archive.
442671d7fec4Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
442771d7fec4Smrg
442871d7fec4Smrg# Commands used to build and install a shared archive.
442971d7fec4Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
443071d7fec4Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
443171d7fec4Smrgpostinstall_cmds=$lt_postinstall_cmds
443271d7fec4Smrgpostuninstall_cmds=$lt_postuninstall_cmds
443371d7fec4Smrg
443471d7fec4Smrg# Commands used to build a loadable module (assumed same as above if empty)
443571d7fec4Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
443671d7fec4Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
443771d7fec4Smrg
443871d7fec4Smrg# Commands to strip libraries.
443971d7fec4Smrgold_striplib=$lt_old_striplib
444071d7fec4Smrgstriplib=$lt_striplib
444171d7fec4Smrg
444271d7fec4Smrg# Dependencies to place before the objects being linked to create a
444371d7fec4Smrg# shared library.
444471d7fec4Smrgpredep_objects=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
444571d7fec4Smrg
444671d7fec4Smrg# Dependencies to place after the objects being linked to create a
444771d7fec4Smrg# shared library.
444871d7fec4Smrgpostdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
444971d7fec4Smrg
445071d7fec4Smrg# Dependencies to place before the objects being linked to create a
445171d7fec4Smrg# shared library.
445271d7fec4Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
445371d7fec4Smrg
445471d7fec4Smrg# Dependencies to place after the objects being linked to create a
445571d7fec4Smrg# shared library.
445671d7fec4Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
445771d7fec4Smrg
445871d7fec4Smrg# The library search path used internally by the compiler when linking
445971d7fec4Smrg# a shared library.
446071d7fec4Smrgcompiler_lib_search_path=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
446171d7fec4Smrg
446271d7fec4Smrg# Method to check whether dependent libraries are shared objects.
446371d7fec4Smrgdeplibs_check_method=$lt_deplibs_check_method
446471d7fec4Smrg
446571d7fec4Smrg# Command to use when deplibs_check_method == file_magic.
446671d7fec4Smrgfile_magic_cmd=$lt_file_magic_cmd
446771d7fec4Smrg
446871d7fec4Smrg# Flag that allows shared libraries with undefined symbols to be built.
446971d7fec4Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
447071d7fec4Smrg
447171d7fec4Smrg# Flag that forces no undefined symbols.
447271d7fec4Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
447371d7fec4Smrg
447471d7fec4Smrg# Commands used to finish a libtool library installation in a directory.
447571d7fec4Smrgfinish_cmds=$lt_finish_cmds
447671d7fec4Smrg
447771d7fec4Smrg# Same as above, but a single script fragment to be evaled but not shown.
447871d7fec4Smrgfinish_eval=$lt_finish_eval
447971d7fec4Smrg
448071d7fec4Smrg# Take the output of nm and produce a listing of raw symbols and C names.
448171d7fec4Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
448271d7fec4Smrg
448371d7fec4Smrg# Transform the output of nm in a proper C declaration
448471d7fec4Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
448571d7fec4Smrg
448671d7fec4Smrg# Transform the output of nm in a C name address pair
448771d7fec4Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
448871d7fec4Smrg
448971d7fec4Smrg# This is the shared library runtime path variable.
449071d7fec4Smrgrunpath_var=$runpath_var
449171d7fec4Smrg
449271d7fec4Smrg# This is the shared library path variable.
449371d7fec4Smrgshlibpath_var=$shlibpath_var
449471d7fec4Smrg
449571d7fec4Smrg# Is shlibpath searched before the hard-coded library search path?
449671d7fec4Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
449771d7fec4Smrg
449871d7fec4Smrg# How to hardcode a shared library path into an executable.
449971d7fec4Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
450071d7fec4Smrg
450171d7fec4Smrg# Whether we should hardcode library paths into libraries.
450271d7fec4Smrghardcode_into_libs=$hardcode_into_libs
450371d7fec4Smrg
450471d7fec4Smrg# Flag to hardcode \$libdir into a binary during linking.
450571d7fec4Smrg# This must work even if \$libdir does not exist.
450671d7fec4Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
450771d7fec4Smrg
450871d7fec4Smrg# If ld is used when linking, flag to hardcode \$libdir into
450971d7fec4Smrg# a binary during linking. This must work even if \$libdir does
451071d7fec4Smrg# not exist.
451171d7fec4Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
451271d7fec4Smrg
451371d7fec4Smrg# Whether we need a single -rpath flag with a separated argument.
451471d7fec4Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
451571d7fec4Smrg
451671d7fec4Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
451771d7fec4Smrg# resulting binary.
451871d7fec4Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
451971d7fec4Smrg
452071d7fec4Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
452171d7fec4Smrg# resulting binary.
452271d7fec4Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
452371d7fec4Smrg
452471d7fec4Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
452571d7fec4Smrg# the resulting binary.
452671d7fec4Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
452771d7fec4Smrg
452871d7fec4Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
452971d7fec4Smrg# and all subsequent libraries and executables linked against it.
453071d7fec4Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
453171d7fec4Smrg
453271d7fec4Smrg# Variables whose values should be saved in libtool wrapper scripts and
453371d7fec4Smrg# restored at relink time.
453471d7fec4Smrgvariables_saved_for_relink="$variables_saved_for_relink"
453571d7fec4Smrg
453671d7fec4Smrg# Whether libtool must link a program against all its dependency libraries.
453771d7fec4Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
453871d7fec4Smrg
453971d7fec4Smrg# Compile-time system search path for libraries
454071d7fec4Smrgsys_lib_search_path_spec=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\`
454171d7fec4Smrg
454271d7fec4Smrg# Run-time system search path for libraries
454371d7fec4Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
454471d7fec4Smrg
454571d7fec4Smrg# Fix the shell variable \$srcfile for the compiler.
454671d7fec4Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
454771d7fec4Smrg
454871d7fec4Smrg# Set to yes if exported symbols are required.
454971d7fec4Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
455071d7fec4Smrg
455171d7fec4Smrg# The commands to list exported symbols.
455271d7fec4Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
455371d7fec4Smrg
455471d7fec4Smrg# The commands to extract the exported symbol list from a shared archive.
455571d7fec4Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
455671d7fec4Smrg
455771d7fec4Smrg# Symbols that should not be listed in the preloaded symbols.
455871d7fec4Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
455971d7fec4Smrg
456071d7fec4Smrg# Symbols that must always be exported.
456171d7fec4Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
456271d7fec4Smrg
456371d7fec4Smrgifelse([$1],[],
456471d7fec4Smrg[# ### END LIBTOOL CONFIG],
456571d7fec4Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
456671d7fec4Smrg
456771d7fec4Smrg__EOF__
456871d7fec4Smrg
456971d7fec4Smrgifelse([$1],[], [
457071d7fec4Smrg  case $host_os in
457171d7fec4Smrg  aix3*)
457271d7fec4Smrg    cat <<\EOF >> "$cfgfile"
457371d7fec4Smrg
457471d7fec4Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
457571d7fec4Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
457671d7fec4Smrg# vanish in a puff of smoke.
457771d7fec4Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
457871d7fec4Smrg  COLLECT_NAMES=
457971d7fec4Smrg  export COLLECT_NAMES
458071d7fec4Smrgfi
458171d7fec4SmrgEOF
458271d7fec4Smrg    ;;
458371d7fec4Smrg  esac
458471d7fec4Smrg
458571d7fec4Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
458671d7fec4Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
458771d7fec4Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
458871d7fec4Smrg  # is reportedly fixed, but why not run on old versions too?
458971d7fec4Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
459071d7fec4Smrg
459171d7fec4Smrg  mv -f "$cfgfile" "$ofile" || \
459271d7fec4Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
459371d7fec4Smrg  chmod +x "$ofile"
459471d7fec4Smrg])
459571d7fec4Smrgelse
459671d7fec4Smrg  # If there is no Makefile yet, we rely on a make rule to execute
459771d7fec4Smrg  # `config.status --recheck' to rerun these tests and create the
459871d7fec4Smrg  # libtool script then.
459971d7fec4Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
460071d7fec4Smrg  if test -f "$ltmain_in"; then
460171d7fec4Smrg    test -f Makefile && make "$ltmain"
460271d7fec4Smrg  fi
460371d7fec4Smrgfi
460471d7fec4Smrg])# AC_LIBTOOL_CONFIG
460571d7fec4Smrg
460671d7fec4Smrg
460771d7fec4Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
460871d7fec4Smrg# -------------------------------------------
460971d7fec4SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
461071d7fec4Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
461171d7fec4Smrg
461271d7fec4Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
461371d7fec4Smrg
461471d7fec4Smrgif test "$GCC" = yes; then
461571d7fec4Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
461671d7fec4Smrg
461771d7fec4Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
461871d7fec4Smrg    lt_cv_prog_compiler_rtti_exceptions,
461971d7fec4Smrg    [-fno-rtti -fno-exceptions], [],
462071d7fec4Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
462171d7fec4Smrgfi
462271d7fec4Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
462371d7fec4Smrg
462471d7fec4Smrg
462571d7fec4Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
462671d7fec4Smrg# ---------------------------------
462771d7fec4SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
462871d7fec4Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
462971d7fec4SmrgAC_REQUIRE([AC_PROG_NM])
463071d7fec4SmrgAC_REQUIRE([AC_OBJEXT])
463171d7fec4Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
463271d7fec4SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
463371d7fec4SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
463471d7fec4Smrg[
463571d7fec4Smrg# These are sane defaults that work on at least a few old systems.
463671d7fec4Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
463771d7fec4Smrg
463871d7fec4Smrg# Character class describing NM global symbol codes.
463971d7fec4Smrgsymcode='[[BCDEGRST]]'
464071d7fec4Smrg
464171d7fec4Smrg# Regexp to match symbols that can be accessed directly from C.
464271d7fec4Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
464371d7fec4Smrg
464471d7fec4Smrg# Transform an extracted symbol line into a proper C declaration
464571d7fec4Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
464671d7fec4Smrg
464771d7fec4Smrg# Transform an extracted symbol line into symbol name and symbol address
464871d7fec4Smrglt_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'"
464971d7fec4Smrg
465071d7fec4Smrg# Define system-specific variables.
465171d7fec4Smrgcase $host_os in
465271d7fec4Smrgaix*)
465371d7fec4Smrg  symcode='[[BCDT]]'
465471d7fec4Smrg  ;;
465571d7fec4Smrgcygwin* | mingw* | pw32*)
465671d7fec4Smrg  symcode='[[ABCDGISTW]]'
465771d7fec4Smrg  ;;
465871d7fec4Smrghpux*) # Its linker distinguishes data from code symbols
465971d7fec4Smrg  if test "$host_cpu" = ia64; then
466071d7fec4Smrg    symcode='[[ABCDEGRST]]'
466171d7fec4Smrg  fi
466271d7fec4Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
466371d7fec4Smrg  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'"
466471d7fec4Smrg  ;;
466571d7fec4Smrglinux*)
466671d7fec4Smrg  if test "$host_cpu" = ia64; then
466771d7fec4Smrg    symcode='[[ABCDGIRSTW]]'
466871d7fec4Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
466971d7fec4Smrg    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'"
467071d7fec4Smrg  fi
467171d7fec4Smrg  ;;
467271d7fec4Smrgirix* | nonstopux*)
467371d7fec4Smrg  symcode='[[BCDEGRST]]'
467471d7fec4Smrg  ;;
467571d7fec4Smrgosf*)
467671d7fec4Smrg  symcode='[[BCDEGQRST]]'
467771d7fec4Smrg  ;;
467871d7fec4Smrgsolaris*)
467971d7fec4Smrg  symcode='[[BDRT]]'
468071d7fec4Smrg  ;;
468171d7fec4Smrgsco3.2v5*)
468271d7fec4Smrg  symcode='[[DT]]'
468371d7fec4Smrg  ;;
468471d7fec4Smrgsysv4.2uw2*)
468571d7fec4Smrg  symcode='[[DT]]'
468671d7fec4Smrg  ;;
468771d7fec4Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
468871d7fec4Smrg  symcode='[[ABDT]]'
468971d7fec4Smrg  ;;
469071d7fec4Smrgsysv4)
469171d7fec4Smrg  symcode='[[DFNSTU]]'
469271d7fec4Smrg  ;;
469371d7fec4Smrgesac
469471d7fec4Smrg
469571d7fec4Smrg# Handle CRLF in mingw tool chain
469671d7fec4Smrgopt_cr=
469771d7fec4Smrgcase $build_os in
469871d7fec4Smrgmingw*)
469971d7fec4Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
470071d7fec4Smrg  ;;
470171d7fec4Smrgesac
470271d7fec4Smrg
470371d7fec4Smrg# If we're using GNU nm, then use its standard symbol codes.
470471d7fec4Smrgcase `$NM -V 2>&1` in
470571d7fec4Smrg*GNU* | *'with BFD'*)
470671d7fec4Smrg  symcode='[[ABCDGIRSTW]]' ;;
470771d7fec4Smrgesac
470871d7fec4Smrg
470971d7fec4Smrg# Try without a prefix undercore, then with it.
471071d7fec4Smrgfor ac_symprfx in "" "_"; do
471171d7fec4Smrg
471271d7fec4Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
471371d7fec4Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
471471d7fec4Smrg
471571d7fec4Smrg  # Write the raw and C identifiers.
471671d7fec4Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
471771d7fec4Smrg
471871d7fec4Smrg  # Check to see that the pipe works correctly.
471971d7fec4Smrg  pipe_works=no
472071d7fec4Smrg
472171d7fec4Smrg  rm -f conftest*
472271d7fec4Smrg  cat > conftest.$ac_ext <<EOF
472371d7fec4Smrg#ifdef __cplusplus
472471d7fec4Smrgextern "C" {
472571d7fec4Smrg#endif
472671d7fec4Smrgchar nm_test_var;
472771d7fec4Smrgvoid nm_test_func(){}
472871d7fec4Smrg#ifdef __cplusplus
472971d7fec4Smrg}
473071d7fec4Smrg#endif
473171d7fec4Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
473271d7fec4SmrgEOF
473371d7fec4Smrg
473471d7fec4Smrg  if AC_TRY_EVAL(ac_compile); then
473571d7fec4Smrg    # Now try to grab the symbols.
473671d7fec4Smrg    nlist=conftest.nm
473771d7fec4Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
473871d7fec4Smrg      # Try sorting and uniquifying the output.
473971d7fec4Smrg      if sort "$nlist" | uniq > "$nlist"T; then
474071d7fec4Smrg	mv -f "$nlist"T "$nlist"
474171d7fec4Smrg      else
474271d7fec4Smrg	rm -f "$nlist"T
474371d7fec4Smrg      fi
474471d7fec4Smrg
474571d7fec4Smrg      # Make sure that we snagged all the symbols we need.
474671d7fec4Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
474771d7fec4Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
474871d7fec4Smrg	  cat <<EOF > conftest.$ac_ext
474971d7fec4Smrg#ifdef __cplusplus
475071d7fec4Smrgextern "C" {
475171d7fec4Smrg#endif
475271d7fec4Smrg
475371d7fec4SmrgEOF
475471d7fec4Smrg	  # Now generate the symbol file.
475571d7fec4Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
475671d7fec4Smrg
475771d7fec4Smrg	  cat <<EOF >> conftest.$ac_ext
475871d7fec4Smrg#if defined (__STDC__) && __STDC__
475971d7fec4Smrg# define lt_ptr_t void *
476071d7fec4Smrg#else
476171d7fec4Smrg# define lt_ptr_t char *
476271d7fec4Smrg# define const
476371d7fec4Smrg#endif
476471d7fec4Smrg
476571d7fec4Smrg/* The mapping between symbol names and symbols. */
476671d7fec4Smrgconst struct {
476771d7fec4Smrg  const char *name;
476871d7fec4Smrg  lt_ptr_t address;
476971d7fec4Smrg}
477071d7fec4Smrglt_preloaded_symbols[[]] =
477171d7fec4Smrg{
477271d7fec4SmrgEOF
477371d7fec4Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
477471d7fec4Smrg	  cat <<\EOF >> conftest.$ac_ext
477571d7fec4Smrg  {0, (lt_ptr_t) 0}
477671d7fec4Smrg};
477771d7fec4Smrg
477871d7fec4Smrg#ifdef __cplusplus
477971d7fec4Smrg}
478071d7fec4Smrg#endif
478171d7fec4SmrgEOF
478271d7fec4Smrg	  # Now try linking the two files.
478371d7fec4Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
478471d7fec4Smrg	  lt_save_LIBS="$LIBS"
478571d7fec4Smrg	  lt_save_CFLAGS="$CFLAGS"
478671d7fec4Smrg	  LIBS="conftstm.$ac_objext"
478771d7fec4Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
478871d7fec4Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
478971d7fec4Smrg	    pipe_works=yes
479071d7fec4Smrg	  fi
479171d7fec4Smrg	  LIBS="$lt_save_LIBS"
479271d7fec4Smrg	  CFLAGS="$lt_save_CFLAGS"
479371d7fec4Smrg	else
479471d7fec4Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
479571d7fec4Smrg	fi
479671d7fec4Smrg      else
479771d7fec4Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
479871d7fec4Smrg      fi
479971d7fec4Smrg    else
480071d7fec4Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
480171d7fec4Smrg    fi
480271d7fec4Smrg  else
480371d7fec4Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
480471d7fec4Smrg    cat conftest.$ac_ext >&5
480571d7fec4Smrg  fi
480671d7fec4Smrg  rm -f conftest* conftst*
480771d7fec4Smrg
480871d7fec4Smrg  # Do not use the global_symbol_pipe unless it works.
480971d7fec4Smrg  if test "$pipe_works" = yes; then
481071d7fec4Smrg    break
481171d7fec4Smrg  else
481271d7fec4Smrg    lt_cv_sys_global_symbol_pipe=
481371d7fec4Smrg  fi
481471d7fec4Smrgdone
481571d7fec4Smrg])
481671d7fec4Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
481771d7fec4Smrg  lt_cv_sys_global_symbol_to_cdecl=
481871d7fec4Smrgfi
481971d7fec4Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
482071d7fec4Smrg  AC_MSG_RESULT(failed)
482171d7fec4Smrgelse
482271d7fec4Smrg  AC_MSG_RESULT(ok)
482371d7fec4Smrgfi
482471d7fec4Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
482571d7fec4Smrg
482671d7fec4Smrg
482771d7fec4Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
482871d7fec4Smrg# ---------------------------------------
482971d7fec4SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
483071d7fec4Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
483171d7fec4Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
483271d7fec4Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
483371d7fec4Smrg
483471d7fec4SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
483571d7fec4Smrg ifelse([$1],[CXX],[
483671d7fec4Smrg  # C++ specific cases for pic, static, wl, etc.
483771d7fec4Smrg  if test "$GXX" = yes; then
483871d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
483971d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
484071d7fec4Smrg
484171d7fec4Smrg    case $host_os in
484271d7fec4Smrg    aix*)
484371d7fec4Smrg      # All AIX code is PIC.
484471d7fec4Smrg      if test "$host_cpu" = ia64; then
484571d7fec4Smrg	# AIX 5 now supports IA64 processor
484671d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
484771d7fec4Smrg      fi
484871d7fec4Smrg      ;;
484971d7fec4Smrg    amigaos*)
485071d7fec4Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
485171d7fec4Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
485271d7fec4Smrg      # like `-m68040'.
485371d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
485471d7fec4Smrg      ;;
485571d7fec4Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
485671d7fec4Smrg      # PIC is the default for these OSes.
485771d7fec4Smrg      ;;
485871d7fec4Smrg    mingw* | os2* | pw32*)
485971d7fec4Smrg      # This hack is so that the source file can tell whether it is being
486071d7fec4Smrg      # built for inclusion in a dll (and should export symbols for example).
486171d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
486271d7fec4Smrg      ;;
486371d7fec4Smrg    darwin* | rhapsody*)
486471d7fec4Smrg      # PIC is the default on this platform
486571d7fec4Smrg      # Common symbols not allowed in MH_DYLIB files
486671d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
486771d7fec4Smrg      ;;
486871d7fec4Smrg    *djgpp*)
486971d7fec4Smrg      # DJGPP does not support shared libraries at all
487071d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
487171d7fec4Smrg      ;;
487271d7fec4Smrg    interix3*)
487371d7fec4Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
487471d7fec4Smrg      # Instead, we relocate shared libraries at runtime.
487571d7fec4Smrg      ;;
487671d7fec4Smrg    sysv4*MP*)
487771d7fec4Smrg      if test -d /usr/nec; then
487871d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
487971d7fec4Smrg      fi
488071d7fec4Smrg      ;;
488171d7fec4Smrg    hpux*)
488271d7fec4Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
488371d7fec4Smrg      # not for PA HP-UX.
488471d7fec4Smrg      case $host_cpu in
488571d7fec4Smrg      hppa*64*|ia64*)
488671d7fec4Smrg	;;
488771d7fec4Smrg      *)
488871d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
488971d7fec4Smrg	;;
489071d7fec4Smrg      esac
489171d7fec4Smrg      ;;
489271d7fec4Smrg    *)
489371d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
489471d7fec4Smrg      ;;
489571d7fec4Smrg    esac
489671d7fec4Smrg  else
489771d7fec4Smrg    case $host_os in
489871d7fec4Smrg      aix4* | aix5*)
489971d7fec4Smrg	# All AIX code is PIC.
490071d7fec4Smrg	if test "$host_cpu" = ia64; then
490171d7fec4Smrg	  # AIX 5 now supports IA64 processor
490271d7fec4Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
490371d7fec4Smrg	else
490471d7fec4Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
490571d7fec4Smrg	fi
490671d7fec4Smrg	;;
490771d7fec4Smrg      chorus*)
490871d7fec4Smrg	case $cc_basename in
490971d7fec4Smrg	cxch68*)
491071d7fec4Smrg	  # Green Hills C++ Compiler
491171d7fec4Smrg	  # _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"
491271d7fec4Smrg	  ;;
491371d7fec4Smrg	esac
491471d7fec4Smrg	;;
491571d7fec4Smrg       darwin*)
491671d7fec4Smrg         # PIC is the default on this platform
491771d7fec4Smrg         # Common symbols not allowed in MH_DYLIB files
491871d7fec4Smrg         case $cc_basename in
491971d7fec4Smrg           xlc*)
492071d7fec4Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
492171d7fec4Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
492271d7fec4Smrg           ;;
492371d7fec4Smrg         esac
492471d7fec4Smrg       ;;
492571d7fec4Smrg      dgux*)
492671d7fec4Smrg	case $cc_basename in
492771d7fec4Smrg	  ec++*)
492871d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
492971d7fec4Smrg	    ;;
493071d7fec4Smrg	  ghcx*)
493171d7fec4Smrg	    # Green Hills C++ Compiler
493271d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
493371d7fec4Smrg	    ;;
493471d7fec4Smrg	  *)
493571d7fec4Smrg	    ;;
493671d7fec4Smrg	esac
493771d7fec4Smrg	;;
493871d7fec4Smrg      freebsd* | kfreebsd*-gnu | dragonfly*)
493971d7fec4Smrg	# FreeBSD uses GNU C++
494071d7fec4Smrg	;;
494171d7fec4Smrg      hpux9* | hpux10* | hpux11*)
494271d7fec4Smrg	case $cc_basename in
494371d7fec4Smrg	  CC*)
494471d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
494571d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
494671d7fec4Smrg	    if test "$host_cpu" != ia64; then
494771d7fec4Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
494871d7fec4Smrg	    fi
494971d7fec4Smrg	    ;;
495071d7fec4Smrg	  aCC*)
495171d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
495271d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
495371d7fec4Smrg	    case $host_cpu in
495471d7fec4Smrg	    hppa*64*|ia64*)
495571d7fec4Smrg	      # +Z the default
495671d7fec4Smrg	      ;;
495771d7fec4Smrg	    *)
495871d7fec4Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
495971d7fec4Smrg	      ;;
496071d7fec4Smrg	    esac
496171d7fec4Smrg	    ;;
496271d7fec4Smrg	  *)
496371d7fec4Smrg	    ;;
496471d7fec4Smrg	esac
496571d7fec4Smrg	;;
496671d7fec4Smrg      interix*)
496771d7fec4Smrg	# This is c89, which is MS Visual C++ (no shared libs)
496871d7fec4Smrg	# Anyone wants to do a port?
496971d7fec4Smrg	;;
497071d7fec4Smrg      irix5* | irix6* | nonstopux*)
497171d7fec4Smrg	case $cc_basename in
497271d7fec4Smrg	  CC*)
497371d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
497471d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
497571d7fec4Smrg	    # CC pic flag -KPIC is the default.
497671d7fec4Smrg	    ;;
497771d7fec4Smrg	  *)
497871d7fec4Smrg	    ;;
497971d7fec4Smrg	esac
498071d7fec4Smrg	;;
498171d7fec4Smrg      linux*)
498271d7fec4Smrg	case $cc_basename in
498371d7fec4Smrg	  KCC*)
498471d7fec4Smrg	    # KAI C++ Compiler
498571d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
498671d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
498771d7fec4Smrg	    ;;
498871d7fec4Smrg	  icpc* | ecpc*)
498971d7fec4Smrg	    # Intel C++
499071d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
499171d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
499271d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
499371d7fec4Smrg	    ;;
499471d7fec4Smrg	  pgCC*)
499571d7fec4Smrg	    # Portland Group C++ compiler.
499671d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
499771d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
499871d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
499971d7fec4Smrg	    ;;
500071d7fec4Smrg	  cxx*)
500171d7fec4Smrg	    # Compaq C++
500271d7fec4Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
500371d7fec4Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
500471d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
500571d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
500671d7fec4Smrg	    ;;
500771d7fec4Smrg	  *)
500871d7fec4Smrg	    ;;
500971d7fec4Smrg	esac
501071d7fec4Smrg	;;
501171d7fec4Smrg      lynxos*)
501271d7fec4Smrg	;;
501371d7fec4Smrg      m88k*)
501471d7fec4Smrg	;;
501571d7fec4Smrg      mvs*)
501671d7fec4Smrg	case $cc_basename in
501771d7fec4Smrg	  cxx*)
501871d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
501971d7fec4Smrg	    ;;
502071d7fec4Smrg	  *)
502171d7fec4Smrg	    ;;
502271d7fec4Smrg	esac
502371d7fec4Smrg	;;
502471d7fec4Smrg      netbsd*)
502571d7fec4Smrg	;;
502671d7fec4Smrg      osf3* | osf4* | osf5*)
502771d7fec4Smrg	case $cc_basename in
502871d7fec4Smrg	  KCC*)
502971d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
503071d7fec4Smrg	    ;;
503171d7fec4Smrg	  RCC*)
503271d7fec4Smrg	    # Rational C++ 2.4.1
503371d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
503471d7fec4Smrg	    ;;
503571d7fec4Smrg	  cxx*)
503671d7fec4Smrg	    # Digital/Compaq C++
503771d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
503871d7fec4Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
503971d7fec4Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
504071d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
504171d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
504271d7fec4Smrg	    ;;
504371d7fec4Smrg	  *)
504471d7fec4Smrg	    ;;
504571d7fec4Smrg	esac
504671d7fec4Smrg	;;
504771d7fec4Smrg      psos*)
504871d7fec4Smrg	;;
504971d7fec4Smrg      solaris*)
505071d7fec4Smrg	case $cc_basename in
505171d7fec4Smrg	  CC*)
505271d7fec4Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
505371d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
505471d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
505571d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
505671d7fec4Smrg	    ;;
505771d7fec4Smrg	  gcx*)
505871d7fec4Smrg	    # Green Hills C++ Compiler
505971d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
506071d7fec4Smrg	    ;;
506171d7fec4Smrg	  *)
506271d7fec4Smrg	    ;;
506371d7fec4Smrg	esac
506471d7fec4Smrg	;;
506571d7fec4Smrg      sunos4*)
506671d7fec4Smrg	case $cc_basename in
506771d7fec4Smrg	  CC*)
506871d7fec4Smrg	    # Sun C++ 4.x
506971d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
507071d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
507171d7fec4Smrg	    ;;
507271d7fec4Smrg	  lcc*)
507371d7fec4Smrg	    # Lucid
507471d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
507571d7fec4Smrg	    ;;
507671d7fec4Smrg	  *)
507771d7fec4Smrg	    ;;
507871d7fec4Smrg	esac
507971d7fec4Smrg	;;
508071d7fec4Smrg      tandem*)
508171d7fec4Smrg	case $cc_basename in
508271d7fec4Smrg	  NCC*)
508371d7fec4Smrg	    # NonStop-UX NCC 3.20
508471d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
508571d7fec4Smrg	    ;;
508671d7fec4Smrg	  *)
508771d7fec4Smrg	    ;;
508871d7fec4Smrg	esac
508971d7fec4Smrg	;;
509071d7fec4Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
509171d7fec4Smrg	case $cc_basename in
509271d7fec4Smrg	  CC*)
509371d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
509471d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
509571d7fec4Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
509671d7fec4Smrg	    ;;
509771d7fec4Smrg	esac
509871d7fec4Smrg	;;
509971d7fec4Smrg      vxworks*)
510071d7fec4Smrg	;;
510171d7fec4Smrg      *)
510271d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
510371d7fec4Smrg	;;
510471d7fec4Smrg    esac
510571d7fec4Smrg  fi
510671d7fec4Smrg],
510771d7fec4Smrg[
510871d7fec4Smrg  if test "$GCC" = yes; then
510971d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
511071d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
511171d7fec4Smrg
511271d7fec4Smrg    case $host_os in
511371d7fec4Smrg      aix*)
511471d7fec4Smrg      # All AIX code is PIC.
511571d7fec4Smrg      if test "$host_cpu" = ia64; then
511671d7fec4Smrg	# AIX 5 now supports IA64 processor
511771d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
511871d7fec4Smrg      fi
511971d7fec4Smrg      ;;
512071d7fec4Smrg
512171d7fec4Smrg    amigaos*)
512271d7fec4Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
512371d7fec4Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
512471d7fec4Smrg      # like `-m68040'.
512571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
512671d7fec4Smrg      ;;
512771d7fec4Smrg
512871d7fec4Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
512971d7fec4Smrg      # PIC is the default for these OSes.
513071d7fec4Smrg      ;;
513171d7fec4Smrg
513271d7fec4Smrg    mingw* | pw32* | os2*)
513371d7fec4Smrg      # This hack is so that the source file can tell whether it is being
513471d7fec4Smrg      # built for inclusion in a dll (and should export symbols for example).
513571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
513671d7fec4Smrg      ;;
513771d7fec4Smrg
513871d7fec4Smrg    darwin* | rhapsody*)
513971d7fec4Smrg      # PIC is the default on this platform
514071d7fec4Smrg      # Common symbols not allowed in MH_DYLIB files
514171d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
514271d7fec4Smrg      ;;
514371d7fec4Smrg
514471d7fec4Smrg    interix3*)
514571d7fec4Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
514671d7fec4Smrg      # Instead, we relocate shared libraries at runtime.
514771d7fec4Smrg      ;;
514871d7fec4Smrg
514971d7fec4Smrg    msdosdjgpp*)
515071d7fec4Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
515171d7fec4Smrg      # on systems that don't support them.
515271d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
515371d7fec4Smrg      enable_shared=no
515471d7fec4Smrg      ;;
515571d7fec4Smrg
515671d7fec4Smrg    sysv4*MP*)
515771d7fec4Smrg      if test -d /usr/nec; then
515871d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
515971d7fec4Smrg      fi
516071d7fec4Smrg      ;;
516171d7fec4Smrg
516271d7fec4Smrg    hpux*)
516371d7fec4Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
516471d7fec4Smrg      # not for PA HP-UX.
516571d7fec4Smrg      case $host_cpu in
516671d7fec4Smrg      hppa*64*|ia64*)
516771d7fec4Smrg	# +Z the default
516871d7fec4Smrg	;;
516971d7fec4Smrg      *)
517071d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
517171d7fec4Smrg	;;
517271d7fec4Smrg      esac
517371d7fec4Smrg      ;;
517471d7fec4Smrg
517571d7fec4Smrg    *)
517671d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
517771d7fec4Smrg      ;;
517871d7fec4Smrg    esac
517971d7fec4Smrg  else
518071d7fec4Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
518171d7fec4Smrg    case $host_os in
518271d7fec4Smrg    aix*)
518371d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
518471d7fec4Smrg      if test "$host_cpu" = ia64; then
518571d7fec4Smrg	# AIX 5 now supports IA64 processor
518671d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
518771d7fec4Smrg      else
518871d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
518971d7fec4Smrg      fi
519071d7fec4Smrg      ;;
519171d7fec4Smrg      darwin*)
519271d7fec4Smrg        # PIC is the default on this platform
519371d7fec4Smrg        # Common symbols not allowed in MH_DYLIB files
519471d7fec4Smrg       case $cc_basename in
519571d7fec4Smrg         xlc*)
519671d7fec4Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
519771d7fec4Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
519871d7fec4Smrg         ;;
519971d7fec4Smrg       esac
520071d7fec4Smrg       ;;
520171d7fec4Smrg
520271d7fec4Smrg    mingw* | pw32* | os2*)
520371d7fec4Smrg      # This hack is so that the source file can tell whether it is being
520471d7fec4Smrg      # built for inclusion in a dll (and should export symbols for example).
520571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
520671d7fec4Smrg      ;;
520771d7fec4Smrg
520871d7fec4Smrg    hpux9* | hpux10* | hpux11*)
520971d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
521071d7fec4Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
521171d7fec4Smrg      # not for PA HP-UX.
521271d7fec4Smrg      case $host_cpu in
521371d7fec4Smrg      hppa*64*|ia64*)
521471d7fec4Smrg	# +Z the default
521571d7fec4Smrg	;;
521671d7fec4Smrg      *)
521771d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
521871d7fec4Smrg	;;
521971d7fec4Smrg      esac
522071d7fec4Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
522171d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
522271d7fec4Smrg      ;;
522371d7fec4Smrg
522471d7fec4Smrg    irix5* | irix6* | nonstopux*)
522571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
522671d7fec4Smrg      # PIC (with -KPIC) is the default.
522771d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
522871d7fec4Smrg      ;;
522971d7fec4Smrg
523071d7fec4Smrg    newsos6)
523171d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
523271d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
523371d7fec4Smrg      ;;
523471d7fec4Smrg
523571d7fec4Smrg    linux*)
523671d7fec4Smrg      case $cc_basename in
523771d7fec4Smrg      icc* | ecc*)
523871d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
523971d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
524071d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
524171d7fec4Smrg        ;;
524271d7fec4Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
524371d7fec4Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
524471d7fec4Smrg	# which looks to be a dead project)
524571d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
524671d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
524771d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
524871d7fec4Smrg        ;;
524971d7fec4Smrg      ccc*)
525071d7fec4Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
525171d7fec4Smrg        # All Alpha code is PIC.
525271d7fec4Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
525371d7fec4Smrg        ;;
525471d7fec4Smrg      esac
525571d7fec4Smrg      ;;
525671d7fec4Smrg
525771d7fec4Smrg    osf3* | osf4* | osf5*)
525871d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
525971d7fec4Smrg      # All OSF/1 code is PIC.
526071d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
526171d7fec4Smrg      ;;
526271d7fec4Smrg
526371d7fec4Smrg    solaris*)
526471d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
526571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
526671d7fec4Smrg      case $cc_basename in
526771d7fec4Smrg      f77* | f90* | f95*)
526871d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
526971d7fec4Smrg      *)
527071d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
527171d7fec4Smrg      esac
527271d7fec4Smrg      ;;
527371d7fec4Smrg
527471d7fec4Smrg    sunos4*)
527571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
527671d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
527771d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
527871d7fec4Smrg      ;;
527971d7fec4Smrg
528071d7fec4Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
528171d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
528271d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
528371d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
528471d7fec4Smrg      ;;
528571d7fec4Smrg
528671d7fec4Smrg    sysv4*MP*)
528771d7fec4Smrg      if test -d /usr/nec ;then
528871d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
528971d7fec4Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
529071d7fec4Smrg      fi
529171d7fec4Smrg      ;;
529271d7fec4Smrg
529371d7fec4Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
529471d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
529571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
529671d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
529771d7fec4Smrg      ;;
529871d7fec4Smrg
529971d7fec4Smrg    unicos*)
530071d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
530171d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
530271d7fec4Smrg      ;;
530371d7fec4Smrg
530471d7fec4Smrg    uts4*)
530571d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
530671d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
530771d7fec4Smrg      ;;
530871d7fec4Smrg
530971d7fec4Smrg    *)
531071d7fec4Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
531171d7fec4Smrg      ;;
531271d7fec4Smrg    esac
531371d7fec4Smrg  fi
531471d7fec4Smrg])
531571d7fec4SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
531671d7fec4Smrg
531771d7fec4Smrg#
531871d7fec4Smrg# Check to make sure the PIC flag actually works.
531971d7fec4Smrg#
532071d7fec4Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
532171d7fec4Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
532271d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
532371d7fec4Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
532471d7fec4Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
532571d7fec4Smrg     "" | " "*) ;;
532671d7fec4Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
532771d7fec4Smrg     esac],
532871d7fec4Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
532971d7fec4Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
533071d7fec4Smrgfi
533171d7fec4Smrgcase $host_os in
533271d7fec4Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
533371d7fec4Smrg  *djgpp*)
533471d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
533571d7fec4Smrg    ;;
533671d7fec4Smrg  *)
533771d7fec4Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
533871d7fec4Smrg    ;;
533971d7fec4Smrgesac
534071d7fec4Smrg
534171d7fec4Smrg#
534271d7fec4Smrg# Check to make sure the static flag actually works.
534371d7fec4Smrg#
534471d7fec4Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
534571d7fec4SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
534671d7fec4Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
534771d7fec4Smrg  $lt_tmp_static_flag,
534871d7fec4Smrg  [],
534971d7fec4Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
535071d7fec4Smrg])
535171d7fec4Smrg
535271d7fec4Smrg
535371d7fec4Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
535471d7fec4Smrg# ------------------------------------
535571d7fec4Smrg# See if the linker supports building shared libraries.
535671d7fec4SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
535771d7fec4Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
535871d7fec4Smrgifelse([$1],[CXX],[
535971d7fec4Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
536071d7fec4Smrg  case $host_os in
536171d7fec4Smrg  aix4* | aix5*)
536271d7fec4Smrg    # If we're using GNU nm, then we don't want the "-C" option.
536371d7fec4Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
536471d7fec4Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
536571d7fec4Smrg      _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'
536671d7fec4Smrg    else
536771d7fec4Smrg      _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'
536871d7fec4Smrg    fi
536971d7fec4Smrg    ;;
537071d7fec4Smrg  pw32*)
537171d7fec4Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
537271d7fec4Smrg  ;;
537371d7fec4Smrg  cygwin* | mingw*)
537471d7fec4Smrg    _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'
537571d7fec4Smrg  ;;
537671d7fec4Smrg  *)
537771d7fec4Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
537871d7fec4Smrg  ;;
537971d7fec4Smrg  esac
538071d7fec4Smrg],[
538171d7fec4Smrg  runpath_var=
538271d7fec4Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
538371d7fec4Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
538471d7fec4Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
538571d7fec4Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
538671d7fec4Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
538771d7fec4Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
538871d7fec4Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
538971d7fec4Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
539071d7fec4Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
539171d7fec4Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
539271d7fec4Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
539371d7fec4Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
539471d7fec4Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
539571d7fec4Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
539671d7fec4Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
539771d7fec4Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
539871d7fec4Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
539971d7fec4Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
540071d7fec4Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
540171d7fec4Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
540271d7fec4Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
540371d7fec4Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
540471d7fec4Smrg  # included in the symbol list
540571d7fec4Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
540671d7fec4Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
540771d7fec4Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
540871d7fec4Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
540971d7fec4Smrg  # as well as any symbol that contains `d'.
541071d7fec4Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
541171d7fec4Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
541271d7fec4Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
541371d7fec4Smrg  # the symbol is explicitly referenced.  Since portable code cannot
541471d7fec4Smrg  # rely on this symbol name, it's probably fine to never include it in
541571d7fec4Smrg  # preloaded symbol tables.
541671d7fec4Smrg  extract_expsyms_cmds=
541771d7fec4Smrg  # Just being paranoid about ensuring that cc_basename is set.
541871d7fec4Smrg  _LT_CC_BASENAME([$compiler])
541971d7fec4Smrg  case $host_os in
542071d7fec4Smrg  cygwin* | mingw* | pw32*)
542171d7fec4Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
542271d7fec4Smrg    # When not using gcc, we currently assume that we are using
542371d7fec4Smrg    # Microsoft Visual C++.
542471d7fec4Smrg    if test "$GCC" != yes; then
542571d7fec4Smrg      with_gnu_ld=no
542671d7fec4Smrg    fi
542771d7fec4Smrg    ;;
542871d7fec4Smrg  interix*)
542971d7fec4Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
543071d7fec4Smrg    with_gnu_ld=yes
543171d7fec4Smrg    ;;
543271d7fec4Smrg  openbsd*)
543371d7fec4Smrg    with_gnu_ld=no
543471d7fec4Smrg    ;;
543571d7fec4Smrg  esac
543671d7fec4Smrg
543771d7fec4Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
543871d7fec4Smrg  if test "$with_gnu_ld" = yes; then
543971d7fec4Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
544071d7fec4Smrg    wlarc='${wl}'
544171d7fec4Smrg
544271d7fec4Smrg    # Set some defaults for GNU ld with shared library support. These
544371d7fec4Smrg    # are reset later if shared libraries are not supported. Putting them
544471d7fec4Smrg    # here allows them to be overridden if necessary.
544571d7fec4Smrg    runpath_var=LD_RUN_PATH
544671d7fec4Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
544771d7fec4Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
544871d7fec4Smrg    # ancient GNU ld didn't support --whole-archive et. al.
544971d7fec4Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
545071d7fec4Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
545171d7fec4Smrg      else
545271d7fec4Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
545371d7fec4Smrg    fi
545471d7fec4Smrg    supports_anon_versioning=no
545571d7fec4Smrg    case `$LD -v 2>/dev/null` in
545671d7fec4Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
545771d7fec4Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
545871d7fec4Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
545971d7fec4Smrg      *\ 2.11.*) ;; # other 2.11 versions
546071d7fec4Smrg      *) supports_anon_versioning=yes ;;
546171d7fec4Smrg    esac
546271d7fec4Smrg
546371d7fec4Smrg    # See if GNU ld supports shared libraries.
546471d7fec4Smrg    case $host_os in
546571d7fec4Smrg    aix3* | aix4* | aix5*)
546671d7fec4Smrg      # On AIX/PPC, the GNU linker is very broken
546771d7fec4Smrg      if test "$host_cpu" != ia64; then
546871d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
546971d7fec4Smrg	cat <<EOF 1>&2
547071d7fec4Smrg
547171d7fec4Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
547271d7fec4Smrg*** to be unable to reliably create shared libraries on AIX.
547371d7fec4Smrg*** Therefore, libtool is disabling shared libraries support.  If you
547471d7fec4Smrg*** really care for shared libraries, you may want to modify your PATH
547571d7fec4Smrg*** so that a non-GNU linker is found, and then restart.
547671d7fec4Smrg
547771d7fec4SmrgEOF
547871d7fec4Smrg      fi
547971d7fec4Smrg      ;;
548071d7fec4Smrg
548171d7fec4Smrg    amigaos*)
548271d7fec4Smrg      _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)'
548371d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
548471d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
548571d7fec4Smrg
548671d7fec4Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
548771d7fec4Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
548871d7fec4Smrg      # to version 4, is to share data among multiple programs linked
548971d7fec4Smrg      # with the same dynamic library.  Since this doesn't match the
549071d7fec4Smrg      # behavior of shared libraries on other platforms, we can't use
549171d7fec4Smrg      # them.
549271d7fec4Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
549371d7fec4Smrg      ;;
549471d7fec4Smrg
549571d7fec4Smrg    beos*)
549671d7fec4Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
549771d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
549871d7fec4Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
549971d7fec4Smrg	# support --undefined.  This deserves some investigation.  FIXME
550071d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
550171d7fec4Smrg      else
550271d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
550371d7fec4Smrg      fi
550471d7fec4Smrg      ;;
550571d7fec4Smrg
550671d7fec4Smrg    cygwin* | mingw* | pw32*)
550771d7fec4Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
550871d7fec4Smrg      # as there is no search path for DLLs.
550971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
551071d7fec4Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
551171d7fec4Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
551271d7fec4Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
551371d7fec4Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
551471d7fec4Smrg
551571d7fec4Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
551671d7fec4Smrg        _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'
551771d7fec4Smrg	# If the export-symbols file already is a .def file (1st line
551871d7fec4Smrg	# is EXPORTS), use it as is; otherwise, prepend...
551971d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
552071d7fec4Smrg	  cp $export_symbols $output_objdir/$soname.def;
552171d7fec4Smrg	else
552271d7fec4Smrg	  echo EXPORTS > $output_objdir/$soname.def;
552371d7fec4Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
552471d7fec4Smrg	fi~
552571d7fec4Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
552671d7fec4Smrg      else
552771d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
552871d7fec4Smrg      fi
552971d7fec4Smrg      ;;
553071d7fec4Smrg
553171d7fec4Smrg    interix3*)
553271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
553371d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
553471d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
553571d7fec4Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
553671d7fec4Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
553771d7fec4Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
553871d7fec4Smrg      # default) and relocated if they conflict, which is a slow very memory
553971d7fec4Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
554071d7fec4Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
554171d7fec4Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
554271d7fec4Smrg      _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'
554371d7fec4Smrg      _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'
554471d7fec4Smrg      ;;
554571d7fec4Smrg
554671d7fec4Smrg    linux*)
554771d7fec4Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
554871d7fec4Smrg	tmp_addflag=
554971d7fec4Smrg	case $cc_basename,$host_cpu in
555071d7fec4Smrg	pgcc*)				# Portland Group C compiler
555171d7fec4Smrg	  _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'
555271d7fec4Smrg	  tmp_addflag=' $pic_flag'
555371d7fec4Smrg	  ;;
555471d7fec4Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
555571d7fec4Smrg	  _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'
555671d7fec4Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
555771d7fec4Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
555871d7fec4Smrg	  tmp_addflag=' -i_dynamic' ;;
555971d7fec4Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
556071d7fec4Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
556171d7fec4Smrg	ifc* | ifort*)			# Intel Fortran compiler
556271d7fec4Smrg	  tmp_addflag=' -nofor_main' ;;
556371d7fec4Smrg	esac
556471d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
556571d7fec4Smrg
556671d7fec4Smrg	if test $supports_anon_versioning = yes; then
556771d7fec4Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
556871d7fec4Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
556971d7fec4Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
557071d7fec4Smrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
557171d7fec4Smrg	fi
557271d7fec4Smrg      else
557371d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
557471d7fec4Smrg      fi
557571d7fec4Smrg      ;;
557671d7fec4Smrg
557771d7fec4Smrg    netbsd*)
557871d7fec4Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
557971d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
558071d7fec4Smrg	wlarc=
558171d7fec4Smrg      else
558271d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
558371d7fec4Smrg	_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'
558471d7fec4Smrg      fi
558571d7fec4Smrg      ;;
558671d7fec4Smrg
558771d7fec4Smrg    solaris*)
558871d7fec4Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
558971d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
559071d7fec4Smrg	cat <<EOF 1>&2
559171d7fec4Smrg
559271d7fec4Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
559371d7fec4Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
559471d7fec4Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
559571d7fec4Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
559671d7fec4Smrg*** your PATH or compiler configuration so that the native linker is
559771d7fec4Smrg*** used, and then restart.
559871d7fec4Smrg
559971d7fec4SmrgEOF
560071d7fec4Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
560171d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
560271d7fec4Smrg	_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'
560371d7fec4Smrg      else
560471d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
560571d7fec4Smrg      fi
560671d7fec4Smrg      ;;
560771d7fec4Smrg
560871d7fec4Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
560971d7fec4Smrg      case `$LD -v 2>&1` in
561071d7fec4Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
561171d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
561271d7fec4Smrg	cat <<_LT_EOF 1>&2
561371d7fec4Smrg
561471d7fec4Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
561571d7fec4Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
561671d7fec4Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
561771d7fec4Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
561871d7fec4Smrg*** your PATH or compiler configuration so that the native linker is
561971d7fec4Smrg*** used, and then restart.
562071d7fec4Smrg
562171d7fec4Smrg_LT_EOF
562271d7fec4Smrg	;;
562371d7fec4Smrg	*)
562471d7fec4Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
562571d7fec4Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
562671d7fec4Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
562771d7fec4Smrg	    _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'
562871d7fec4Smrg	  else
562971d7fec4Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
563071d7fec4Smrg	  fi
563171d7fec4Smrg	;;
563271d7fec4Smrg      esac
563371d7fec4Smrg      ;;
563471d7fec4Smrg
563571d7fec4Smrg    sunos4*)
563671d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
563771d7fec4Smrg      wlarc=
563871d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
563971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
564071d7fec4Smrg      ;;
564171d7fec4Smrg
564271d7fec4Smrg    *)
564371d7fec4Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
564471d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
564571d7fec4Smrg	_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'
564671d7fec4Smrg      else
564771d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
564871d7fec4Smrg      fi
564971d7fec4Smrg      ;;
565071d7fec4Smrg    esac
565171d7fec4Smrg
565271d7fec4Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
565371d7fec4Smrg      runpath_var=
565471d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
565571d7fec4Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
565671d7fec4Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
565771d7fec4Smrg    fi
565871d7fec4Smrg  else
565971d7fec4Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
566071d7fec4Smrg    case $host_os in
566171d7fec4Smrg    aix3*)
566271d7fec4Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
566371d7fec4Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
566471d7fec4Smrg      _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'
566571d7fec4Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
566671d7fec4Smrg      # are no directories specified by -L.
566771d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
566871d7fec4Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
566971d7fec4Smrg	# Neither direct hardcoding nor static linking is supported with a
567071d7fec4Smrg	# broken collect2.
567171d7fec4Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
567271d7fec4Smrg      fi
567371d7fec4Smrg      ;;
567471d7fec4Smrg
567571d7fec4Smrg    aix4* | aix5*)
567671d7fec4Smrg      if test "$host_cpu" = ia64; then
567771d7fec4Smrg	# On IA64, the linker does run time linking by default, so we don't
567871d7fec4Smrg	# have to do anything special.
567971d7fec4Smrg	aix_use_runtimelinking=no
568071d7fec4Smrg	exp_sym_flag='-Bexport'
568171d7fec4Smrg	no_entry_flag=""
568271d7fec4Smrg      else
568371d7fec4Smrg	# If we're using GNU nm, then we don't want the "-C" option.
568471d7fec4Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
568571d7fec4Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
568671d7fec4Smrg	  _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'
568771d7fec4Smrg	else
568871d7fec4Smrg	  _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'
568971d7fec4Smrg	fi
569071d7fec4Smrg	aix_use_runtimelinking=no
569171d7fec4Smrg
569271d7fec4Smrg	# Test if we are trying to use run time linking or normal
569371d7fec4Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
569471d7fec4Smrg	# need to do runtime linking.
569571d7fec4Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
569671d7fec4Smrg	  for ld_flag in $LDFLAGS; do
569771d7fec4Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
569871d7fec4Smrg  	    aix_use_runtimelinking=yes
569971d7fec4Smrg  	    break
570071d7fec4Smrg  	  fi
570171d7fec4Smrg	  done
570271d7fec4Smrg	  ;;
570371d7fec4Smrg	esac
570471d7fec4Smrg
570571d7fec4Smrg	exp_sym_flag='-bexport'
570671d7fec4Smrg	no_entry_flag='-bnoentry'
570771d7fec4Smrg      fi
570871d7fec4Smrg
570971d7fec4Smrg      # When large executables or shared objects are built, AIX ld can
571071d7fec4Smrg      # have problems creating the table of contents.  If linking a library
571171d7fec4Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
571271d7fec4Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
571371d7fec4Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
571471d7fec4Smrg
571571d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
571671d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
571771d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
571871d7fec4Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
571971d7fec4Smrg
572071d7fec4Smrg      if test "$GCC" = yes; then
572171d7fec4Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
572271d7fec4Smrg	# We only want to do this on AIX 4.2 and lower, the check
572371d7fec4Smrg	# below for broken collect2 doesn't work under 4.3+
572471d7fec4Smrg	  collect2name=`${CC} -print-prog-name=collect2`
572571d7fec4Smrg	  if test -f "$collect2name" && \
572671d7fec4Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
572771d7fec4Smrg	  then
572871d7fec4Smrg  	  # We have reworked collect2
572971d7fec4Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
573071d7fec4Smrg	  else
573171d7fec4Smrg  	  # We have old collect2
573271d7fec4Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
573371d7fec4Smrg  	  # It fails to find uninstalled libraries when the uninstalled
573471d7fec4Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
573571d7fec4Smrg  	  # to unsupported forces relinking
573671d7fec4Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
573771d7fec4Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
573871d7fec4Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
573971d7fec4Smrg	  fi
574071d7fec4Smrg	  ;;
574171d7fec4Smrg	esac
574271d7fec4Smrg	shared_flag='-shared'
574371d7fec4Smrg	if test "$aix_use_runtimelinking" = yes; then
574471d7fec4Smrg	  shared_flag="$shared_flag "'${wl}-G'
574571d7fec4Smrg	fi
574671d7fec4Smrg      else
574771d7fec4Smrg	# not using gcc
574871d7fec4Smrg	if test "$host_cpu" = ia64; then
574971d7fec4Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
575071d7fec4Smrg  	# chokes on -Wl,-G. The following line is correct:
575171d7fec4Smrg	  shared_flag='-G'
575271d7fec4Smrg	else
575371d7fec4Smrg	  if test "$aix_use_runtimelinking" = yes; then
575471d7fec4Smrg	    shared_flag='${wl}-G'
575571d7fec4Smrg	  else
575671d7fec4Smrg	    shared_flag='${wl}-bM:SRE'
575771d7fec4Smrg	  fi
575871d7fec4Smrg	fi
575971d7fec4Smrg      fi
576071d7fec4Smrg
576171d7fec4Smrg      # It seems that -bexpall does not export symbols beginning with
576271d7fec4Smrg      # underscore (_), so it is better to generate a list of symbols to export.
576371d7fec4Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
576471d7fec4Smrg      if test "$aix_use_runtimelinking" = yes; then
576571d7fec4Smrg	# Warning - without using the other runtime loading flags (-brtl),
576671d7fec4Smrg	# -berok will link without error, but may produce a broken library.
576771d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
576871d7fec4Smrg       # Determine the default libpath from the value encoded in an empty executable.
576971d7fec4Smrg       _LT_AC_SYS_LIBPATH_AIX
577071d7fec4Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
577171d7fec4Smrg	_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"
577271d7fec4Smrg       else
577371d7fec4Smrg	if test "$host_cpu" = ia64; then
577471d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
577571d7fec4Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
577671d7fec4Smrg	  _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"
577771d7fec4Smrg	else
577871d7fec4Smrg	 # Determine the default libpath from the value encoded in an empty executable.
577971d7fec4Smrg	 _LT_AC_SYS_LIBPATH_AIX
578071d7fec4Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
578171d7fec4Smrg	  # Warning - without using the other run time loading flags,
578271d7fec4Smrg	  # -berok will link without error, but may produce a broken library.
578371d7fec4Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
578471d7fec4Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
578571d7fec4Smrg	  # Exported symbols can be pulled into shared objects from archives
578671d7fec4Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
578771d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
578871d7fec4Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
578971d7fec4Smrg	  _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'
579071d7fec4Smrg	fi
579171d7fec4Smrg      fi
579271d7fec4Smrg      ;;
579371d7fec4Smrg
579471d7fec4Smrg    amigaos*)
579571d7fec4Smrg      _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)'
579671d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
579771d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
579871d7fec4Smrg      # see comment about different semantics on the GNU ld section
579971d7fec4Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
580071d7fec4Smrg      ;;
580171d7fec4Smrg
580271d7fec4Smrg    bsdi[[45]]*)
580371d7fec4Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
580471d7fec4Smrg      ;;
580571d7fec4Smrg
580671d7fec4Smrg    cygwin* | mingw* | pw32*)
580771d7fec4Smrg      # When not using gcc, we currently assume that we are using
580871d7fec4Smrg      # Microsoft Visual C++.
580971d7fec4Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
581071d7fec4Smrg      # no search path for DLLs.
581171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
581271d7fec4Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
581371d7fec4Smrg      # Tell ltmain to make .lib files, not .a files.
581471d7fec4Smrg      libext=lib
581571d7fec4Smrg      # Tell ltmain to make .dll files, not .so files.
581671d7fec4Smrg      shrext_cmds=".dll"
581771d7fec4Smrg      # FIXME: Setting linknames here is a bad hack.
581871d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
581971d7fec4Smrg      # The linker will automatically build a .lib file if we build a DLL.
582071d7fec4Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
582171d7fec4Smrg      # FIXME: Should let the user specify the lib program.
582271d7fec4Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
582371d7fec4Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
582471d7fec4Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
582571d7fec4Smrg      ;;
582671d7fec4Smrg
582771d7fec4Smrg    darwin* | rhapsody*)
582871d7fec4Smrg      case $host_os in
582971d7fec4Smrg        rhapsody* | darwin1.[[012]])
583071d7fec4Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
583171d7fec4Smrg         ;;
583271d7fec4Smrg       *) # Darwin 1.3 on
583371d7fec4Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
583471d7fec4Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
583571d7fec4Smrg         else
583671d7fec4Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
583771d7fec4Smrg             10.[[012]])
583871d7fec4Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
583971d7fec4Smrg               ;;
584071d7fec4Smrg             10.*)
584171d7fec4Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
584271d7fec4Smrg               ;;
584371d7fec4Smrg           esac
584471d7fec4Smrg         fi
584571d7fec4Smrg         ;;
584671d7fec4Smrg      esac
584771d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
584871d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
584971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
585071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
585171d7fec4Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
585271d7fec4Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
585371d7fec4Smrg    if test "$GCC" = yes ; then
585471d7fec4Smrg    	output_verbose_link_cmd='echo'
585571d7fec4Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
585671d7fec4Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
585771d7fec4Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
585871d7fec4Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
585971d7fec4Smrg      _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}'
586071d7fec4Smrg    else
586171d7fec4Smrg      case $cc_basename in
586271d7fec4Smrg        xlc*)
586371d7fec4Smrg         output_verbose_link_cmd='echo'
586471d7fec4Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
586571d7fec4Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
586671d7fec4Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
586771d7fec4Smrg         _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 $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
586871d7fec4Smrg          _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}'
586971d7fec4Smrg          ;;
587071d7fec4Smrg       *)
587171d7fec4Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
587271d7fec4Smrg          ;;
587371d7fec4Smrg      esac
587471d7fec4Smrg    fi
587571d7fec4Smrg      ;;
587671d7fec4Smrg
587771d7fec4Smrg    dgux*)
587871d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
587971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
588071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
588171d7fec4Smrg      ;;
588271d7fec4Smrg
588371d7fec4Smrg    freebsd1*)
588471d7fec4Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
588571d7fec4Smrg      ;;
588671d7fec4Smrg
588771d7fec4Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
588871d7fec4Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
588971d7fec4Smrg    # does not break anything, and helps significantly (at the cost of a little
589071d7fec4Smrg    # extra space).
589171d7fec4Smrg    freebsd2.2*)
589271d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
589371d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
589471d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
589571d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
589671d7fec4Smrg      ;;
589771d7fec4Smrg
589871d7fec4Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
589971d7fec4Smrg    freebsd2*)
590071d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
590171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
590271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
590371d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
590471d7fec4Smrg      ;;
590571d7fec4Smrg
590671d7fec4Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
590771d7fec4Smrg    freebsd* | kfreebsd*-gnu | dragonfly*)
590871d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
590971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
591071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
591171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
591271d7fec4Smrg      ;;
591371d7fec4Smrg
591471d7fec4Smrg    hpux9*)
591571d7fec4Smrg      if test "$GCC" = yes; then
591671d7fec4Smrg	_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'
591771d7fec4Smrg      else
591871d7fec4Smrg	_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'
591971d7fec4Smrg      fi
592071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
592171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
592271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
592371d7fec4Smrg
592471d7fec4Smrg      # hardcode_minus_L: Not really in the search PATH,
592571d7fec4Smrg      # but as the default location of the library.
592671d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
592771d7fec4Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
592871d7fec4Smrg      ;;
592971d7fec4Smrg
593071d7fec4Smrg    hpux10*)
593171d7fec4Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
593271d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
593371d7fec4Smrg      else
593471d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
593571d7fec4Smrg      fi
593671d7fec4Smrg      if test "$with_gnu_ld" = no; then
593771d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
593871d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
593971d7fec4Smrg
594071d7fec4Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
594171d7fec4Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
594271d7fec4Smrg
594371d7fec4Smrg	# hardcode_minus_L: Not really in the search PATH,
594471d7fec4Smrg	# but as the default location of the library.
594571d7fec4Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
594671d7fec4Smrg      fi
594771d7fec4Smrg      ;;
594871d7fec4Smrg
594971d7fec4Smrg    hpux11*)
595071d7fec4Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
595171d7fec4Smrg	case $host_cpu in
595271d7fec4Smrg	hppa*64*)
595371d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
595471d7fec4Smrg	  ;;
595571d7fec4Smrg	ia64*)
595671d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
595771d7fec4Smrg	  ;;
595871d7fec4Smrg	*)
595971d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
596071d7fec4Smrg	  ;;
596171d7fec4Smrg	esac
596271d7fec4Smrg      else
596371d7fec4Smrg	case $host_cpu in
596471d7fec4Smrg	hppa*64*)
596571d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
596671d7fec4Smrg	  ;;
596771d7fec4Smrg	ia64*)
596871d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
596971d7fec4Smrg	  ;;
597071d7fec4Smrg	*)
597171d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
597271d7fec4Smrg	  ;;
597371d7fec4Smrg	esac
597471d7fec4Smrg      fi
597571d7fec4Smrg      if test "$with_gnu_ld" = no; then
597671d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
597771d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
597871d7fec4Smrg
597971d7fec4Smrg	case $host_cpu in
598071d7fec4Smrg	hppa*64*|ia64*)
598171d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
598271d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
598371d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
598471d7fec4Smrg	  ;;
598571d7fec4Smrg	*)
598671d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
598771d7fec4Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
598871d7fec4Smrg
598971d7fec4Smrg	  # hardcode_minus_L: Not really in the search PATH,
599071d7fec4Smrg	  # but as the default location of the library.
599171d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
599271d7fec4Smrg	  ;;
599371d7fec4Smrg	esac
599471d7fec4Smrg      fi
599571d7fec4Smrg      ;;
599671d7fec4Smrg
599771d7fec4Smrg    irix5* | irix6* | nonstopux*)
599871d7fec4Smrg      if test "$GCC" = yes; then
599971d7fec4Smrg	_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'
600071d7fec4Smrg      else
600171d7fec4Smrg	_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'
600271d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
600371d7fec4Smrg      fi
600471d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
600571d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
600671d7fec4Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
600771d7fec4Smrg      ;;
600871d7fec4Smrg
600971d7fec4Smrg    netbsd*)
601071d7fec4Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
601171d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
601271d7fec4Smrg      else
601371d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
601471d7fec4Smrg      fi
601571d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
601671d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
601771d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
601871d7fec4Smrg      ;;
601971d7fec4Smrg
602071d7fec4Smrg    newsos6)
602171d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
602271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
602371d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
602471d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
602571d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
602671d7fec4Smrg      ;;
602771d7fec4Smrg
602871d7fec4Smrg    openbsd*)
602971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
603071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
603171d7fec4Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
603271d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
603371d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
603471d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
603571d7fec4Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
603671d7fec4Smrg      else
603771d7fec4Smrg       case $host_os in
603871d7fec4Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
603971d7fec4Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
604071d7fec4Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
604171d7fec4Smrg	   ;;
604271d7fec4Smrg	 *)
604371d7fec4Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
604471d7fec4Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
604571d7fec4Smrg	   ;;
604671d7fec4Smrg       esac
604771d7fec4Smrg      fi
604871d7fec4Smrg      ;;
604971d7fec4Smrg
605071d7fec4Smrg    os2*)
605171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
605271d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
605371d7fec4Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
605471d7fec4Smrg      _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'
605571d7fec4Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
605671d7fec4Smrg      ;;
605771d7fec4Smrg
605871d7fec4Smrg    osf3*)
605971d7fec4Smrg      if test "$GCC" = yes; then
606071d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
606171d7fec4Smrg	_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'
606271d7fec4Smrg      else
606371d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
606471d7fec4Smrg	_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'
606571d7fec4Smrg      fi
606671d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
606771d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
606871d7fec4Smrg      ;;
606971d7fec4Smrg
607071d7fec4Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
607171d7fec4Smrg      if test "$GCC" = yes; then
607271d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
607371d7fec4Smrg	_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'
607471d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
607571d7fec4Smrg      else
607671d7fec4Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
607771d7fec4Smrg	_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'
607871d7fec4Smrg	_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~
607971d7fec4Smrg	$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'
608071d7fec4Smrg
608171d7fec4Smrg	# Both c and cxx compiler support -rpath directly
608271d7fec4Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
608371d7fec4Smrg      fi
608471d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
608571d7fec4Smrg      ;;
608671d7fec4Smrg
608771d7fec4Smrg    solaris*)
608871d7fec4Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
608971d7fec4Smrg      if test "$GCC" = yes; then
609071d7fec4Smrg	wlarc='${wl}'
609171d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
609271d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
609371d7fec4Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
609471d7fec4Smrg      else
609571d7fec4Smrg	wlarc=''
609671d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
609771d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
609871d7fec4Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
609971d7fec4Smrg      fi
610071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
610171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
610271d7fec4Smrg      case $host_os in
610371d7fec4Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
610471d7fec4Smrg      *)
610571d7fec4Smrg 	# The compiler driver will combine linker options so we
610671d7fec4Smrg 	# cannot just pass the convience library names through
610771d7fec4Smrg 	# without $wl, iff we do not link with $LD.
610871d7fec4Smrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
610971d7fec4Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
611071d7fec4Smrg 	case $wlarc in
611171d7fec4Smrg 	'')
611271d7fec4Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
611371d7fec4Smrg 	*)
611471d7fec4Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
611571d7fec4Smrg 	esac ;;
611671d7fec4Smrg      esac
611771d7fec4Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
611871d7fec4Smrg      ;;
611971d7fec4Smrg
612071d7fec4Smrg    sunos4*)
612171d7fec4Smrg      if test "x$host_vendor" = xsequent; then
612271d7fec4Smrg	# Use $CC to link under sequent, because it throws in some extra .o
612371d7fec4Smrg	# files that make .init and .fini sections work.
612471d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
612571d7fec4Smrg      else
612671d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
612771d7fec4Smrg      fi
612871d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
612971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
613071d7fec4Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
613171d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
613271d7fec4Smrg      ;;
613371d7fec4Smrg
613471d7fec4Smrg    sysv4)
613571d7fec4Smrg      case $host_vendor in
613671d7fec4Smrg	sni)
613771d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
613871d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
613971d7fec4Smrg	;;
614071d7fec4Smrg	siemens)
614171d7fec4Smrg	  ## LD is ld it makes a PLAMLIB
614271d7fec4Smrg	  ## CC just makes a GrossModule.
614371d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
614471d7fec4Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
614571d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
614671d7fec4Smrg        ;;
614771d7fec4Smrg	motorola)
614871d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
614971d7fec4Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
615071d7fec4Smrg	;;
615171d7fec4Smrg      esac
615271d7fec4Smrg      runpath_var='LD_RUN_PATH'
615371d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
615471d7fec4Smrg      ;;
615571d7fec4Smrg
615671d7fec4Smrg    sysv4.3*)
615771d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
615871d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
615971d7fec4Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
616071d7fec4Smrg      ;;
616171d7fec4Smrg
616271d7fec4Smrg    sysv4*MP*)
616371d7fec4Smrg      if test -d /usr/nec; then
616471d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
616571d7fec4Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
616671d7fec4Smrg	runpath_var=LD_RUN_PATH
616771d7fec4Smrg	hardcode_runpath_var=yes
616871d7fec4Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
616971d7fec4Smrg      fi
617071d7fec4Smrg      ;;
617171d7fec4Smrg
617271d7fec4Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
617371d7fec4Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
617471d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
617571d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
617671d7fec4Smrg      runpath_var='LD_RUN_PATH'
617771d7fec4Smrg
617871d7fec4Smrg      if test "$GCC" = yes; then
617971d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
618071d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
618171d7fec4Smrg      else
618271d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
618371d7fec4Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
618471d7fec4Smrg      fi
618571d7fec4Smrg      ;;
618671d7fec4Smrg
618771d7fec4Smrg    sysv5* | sco3.2v5* | sco5v6*)
618871d7fec4Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
618971d7fec4Smrg      # link with -lc, and that would cause any symbols used from libc to
619071d7fec4Smrg      # always be unresolved, which means just about no library would
619171d7fec4Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
619271d7fec4Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
619371d7fec4Smrg      # as -z defs.
619471d7fec4Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
619571d7fec4Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
619671d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
619771d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
619871d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
619971d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
620071d7fec4Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
620171d7fec4Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
620271d7fec4Smrg      runpath_var='LD_RUN_PATH'
620371d7fec4Smrg
620471d7fec4Smrg      if test "$GCC" = yes; then
620571d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
620671d7fec4Smrg	_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'
620771d7fec4Smrg      else
620871d7fec4Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
620971d7fec4Smrg	_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'
621071d7fec4Smrg      fi
621171d7fec4Smrg      ;;
621271d7fec4Smrg
621371d7fec4Smrg    uts4*)
621471d7fec4Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
621571d7fec4Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
621671d7fec4Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
621771d7fec4Smrg      ;;
621871d7fec4Smrg
621971d7fec4Smrg    *)
622071d7fec4Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
622171d7fec4Smrg      ;;
622271d7fec4Smrg    esac
622371d7fec4Smrg  fi
622471d7fec4Smrg])
622571d7fec4SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
622671d7fec4Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
622771d7fec4Smrg
622871d7fec4Smrg#
622971d7fec4Smrg# Do we need to explicitly link libc?
623071d7fec4Smrg#
623171d7fec4Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
623271d7fec4Smrgx|xyes)
623371d7fec4Smrg  # Assume -lc should be added
623471d7fec4Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
623571d7fec4Smrg
623671d7fec4Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
623771d7fec4Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
623871d7fec4Smrg    *'~'*)
623971d7fec4Smrg      # FIXME: we may have to deal with multi-command sequences.
624071d7fec4Smrg      ;;
624171d7fec4Smrg    '$CC '*)
624271d7fec4Smrg      # Test whether the compiler implicitly links with -lc since on some
624371d7fec4Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
624471d7fec4Smrg      # to ld, don't add -lc before -lgcc.
624571d7fec4Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
624671d7fec4Smrg      $rm conftest*
624771d7fec4Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
624871d7fec4Smrg
624971d7fec4Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
625071d7fec4Smrg        soname=conftest
625171d7fec4Smrg        lib=conftest
625271d7fec4Smrg        libobjs=conftest.$ac_objext
625371d7fec4Smrg        deplibs=
625471d7fec4Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
625571d7fec4Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
625671d7fec4Smrg        compiler_flags=-v
625771d7fec4Smrg        linker_flags=-v
625871d7fec4Smrg        verstring=
625971d7fec4Smrg        output_objdir=.
626071d7fec4Smrg        libname=conftest
626171d7fec4Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
626271d7fec4Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
626371d7fec4Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
626471d7fec4Smrg        then
626571d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
626671d7fec4Smrg        else
626771d7fec4Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
626871d7fec4Smrg        fi
626971d7fec4Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
627071d7fec4Smrg      else
627171d7fec4Smrg        cat conftest.err 1>&5
627271d7fec4Smrg      fi
627371d7fec4Smrg      $rm conftest*
627471d7fec4Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
627571d7fec4Smrg      ;;
627671d7fec4Smrg    esac
627771d7fec4Smrg  fi
627871d7fec4Smrg  ;;
627971d7fec4Smrgesac
628071d7fec4Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
628171d7fec4Smrg
628271d7fec4Smrg
628371d7fec4Smrg# _LT_AC_FILE_LTDLL_C
628471d7fec4Smrg# -------------------
628571d7fec4Smrg# Be careful that the start marker always follows a newline.
628671d7fec4SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
628771d7fec4Smrg# /* ltdll.c starts here */
628871d7fec4Smrg# #define WIN32_LEAN_AND_MEAN
628971d7fec4Smrg# #include <windows.h>
629071d7fec4Smrg# #undef WIN32_LEAN_AND_MEAN
629171d7fec4Smrg# #include <stdio.h>
629271d7fec4Smrg#
629371d7fec4Smrg# #ifndef __CYGWIN__
629471d7fec4Smrg# #  ifdef __CYGWIN32__
629571d7fec4Smrg# #    define __CYGWIN__ __CYGWIN32__
629671d7fec4Smrg# #  endif
629771d7fec4Smrg# #endif
629871d7fec4Smrg#
629971d7fec4Smrg# #ifdef __cplusplus
630071d7fec4Smrg# extern "C" {
630171d7fec4Smrg# #endif
630271d7fec4Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
630371d7fec4Smrg# #ifdef __cplusplus
630471d7fec4Smrg# }
630571d7fec4Smrg# #endif
630671d7fec4Smrg#
630771d7fec4Smrg# #ifdef __CYGWIN__
630871d7fec4Smrg# #include <cygwin/cygwin_dll.h>
630971d7fec4Smrg# DECLARE_CYGWIN_DLL( DllMain );
631071d7fec4Smrg# #endif
631171d7fec4Smrg# HINSTANCE __hDllInstance_base;
631271d7fec4Smrg#
631371d7fec4Smrg# BOOL APIENTRY
631471d7fec4Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
631571d7fec4Smrg# {
631671d7fec4Smrg#   __hDllInstance_base = hInst;
631771d7fec4Smrg#   return TRUE;
631871d7fec4Smrg# }
631971d7fec4Smrg# /* ltdll.c ends here */
632071d7fec4Smrg])# _LT_AC_FILE_LTDLL_C
632171d7fec4Smrg
632271d7fec4Smrg
632371d7fec4Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
632471d7fec4Smrg# ---------------------------------
632571d7fec4SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
632671d7fec4Smrg
632771d7fec4Smrg
632871d7fec4Smrg# old names
632971d7fec4SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
633071d7fec4SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
633171d7fec4SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
633271d7fec4SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
633371d7fec4SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
633471d7fec4SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
633571d7fec4SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
633671d7fec4Smrg
633771d7fec4Smrg# This is just to silence aclocal about the macro not being used
633871d7fec4Smrgifelse([AC_DISABLE_FAST_INSTALL])
633971d7fec4Smrg
634071d7fec4SmrgAC_DEFUN([LT_AC_PROG_GCJ],
634171d7fec4Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
634271d7fec4Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
634371d7fec4Smrg  AC_SUBST(GCJFLAGS)
634471d7fec4Smrg])
634571d7fec4Smrg
634671d7fec4SmrgAC_DEFUN([LT_AC_PROG_RC],
634771d7fec4Smrg[AC_CHECK_TOOL(RC, windres, no)
634871d7fec4Smrg])
634971d7fec4Smrg
635071d7fec4Smrg# NOTE: This macro has been submitted for inclusion into   #
635171d7fec4Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
635271d7fec4Smrg#  a released version of Autoconf we should remove this    #
635371d7fec4Smrg#  macro and use it instead.                               #
635471d7fec4Smrg# LT_AC_PROG_SED
635571d7fec4Smrg# --------------
635671d7fec4Smrg# Check for a fully-functional sed program, that truncates
635771d7fec4Smrg# as few characters as possible.  Prefer GNU sed if found.
635871d7fec4SmrgAC_DEFUN([LT_AC_PROG_SED],
635971d7fec4Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
636071d7fec4SmrgAC_CACHE_VAL(lt_cv_path_SED,
636171d7fec4Smrg[# Loop through the user's path and test for sed and gsed.
636271d7fec4Smrg# Then use that list of sed's as ones to test for truncation.
636371d7fec4Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
636471d7fec4Smrgfor as_dir in $PATH
636571d7fec4Smrgdo
636671d7fec4Smrg  IFS=$as_save_IFS
636771d7fec4Smrg  test -z "$as_dir" && as_dir=.
636871d7fec4Smrg  for lt_ac_prog in sed gsed; do
636971d7fec4Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
637071d7fec4Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
637171d7fec4Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
637271d7fec4Smrg      fi
637371d7fec4Smrg    done
637471d7fec4Smrg  done
637571d7fec4Smrgdone
637671d7fec4SmrgIFS=$as_save_IFS
637771d7fec4Smrglt_ac_max=0
637871d7fec4Smrglt_ac_count=0
637971d7fec4Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
638071d7fec4Smrg# along with /bin/sed that truncates output.
638171d7fec4Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
638271d7fec4Smrg  test ! -f $lt_ac_sed && continue
638371d7fec4Smrg  cat /dev/null > conftest.in
638471d7fec4Smrg  lt_ac_count=0
638571d7fec4Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
638671d7fec4Smrg  # Check for GNU sed and select it if it is found.
638771d7fec4Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
638871d7fec4Smrg    lt_cv_path_SED=$lt_ac_sed
638971d7fec4Smrg    break
639071d7fec4Smrg  fi
639171d7fec4Smrg  while true; do
639271d7fec4Smrg    cat conftest.in conftest.in >conftest.tmp
639371d7fec4Smrg    mv conftest.tmp conftest.in
639471d7fec4Smrg    cp conftest.in conftest.nl
639571d7fec4Smrg    echo >>conftest.nl
639671d7fec4Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
639771d7fec4Smrg    cmp -s conftest.out conftest.nl || break
639871d7fec4Smrg    # 10000 chars as input seems more than enough
639971d7fec4Smrg    test $lt_ac_count -gt 10 && break
640071d7fec4Smrg    lt_ac_count=`expr $lt_ac_count + 1`
640171d7fec4Smrg    if test $lt_ac_count -gt $lt_ac_max; then
640271d7fec4Smrg      lt_ac_max=$lt_ac_count
640371d7fec4Smrg      lt_cv_path_SED=$lt_ac_sed
640471d7fec4Smrg    fi
640571d7fec4Smrg  done
640671d7fec4Smrgdone
640771d7fec4Smrg])
640871d7fec4SmrgSED=$lt_cv_path_SED
640971d7fec4SmrgAC_SUBST([SED])
641071d7fec4SmrgAC_MSG_RESULT([$SED])
641171d7fec4Smrg])
641271d7fec4Smrg
641371d7fec4Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
641471d7fec4Smrg# 
641571d7fec4Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
641671d7fec4Smrg#
641771d7fec4Smrg# This program is free software; you can redistribute it and/or modify
641871d7fec4Smrg# it under the terms of the GNU General Public License as published by
641971d7fec4Smrg# the Free Software Foundation; either version 2 of the License, or
642071d7fec4Smrg# (at your option) any later version.
642171d7fec4Smrg#
642271d7fec4Smrg# This program is distributed in the hope that it will be useful, but
642371d7fec4Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
642471d7fec4Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
642571d7fec4Smrg# General Public License for more details.
642671d7fec4Smrg#
642771d7fec4Smrg# You should have received a copy of the GNU General Public License
642871d7fec4Smrg# along with this program; if not, write to the Free Software
642971d7fec4Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
643071d7fec4Smrg#
643171d7fec4Smrg# As a special exception to the GNU General Public License, if you
643271d7fec4Smrg# distribute this file as part of a program that contains a
643371d7fec4Smrg# configuration script generated by Autoconf, you may include it under
643471d7fec4Smrg# the same distribution terms that you use for the rest of that program.
643571d7fec4Smrg
643671d7fec4Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
643771d7fec4Smrg# ----------------------------------
643871d7fec4SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
643971d7fec4Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
644071d7fec4Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
644171d7fec4SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
644271d7fec4Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
644371d7fec4Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
644471d7fec4Smrgfi
644571d7fec4Smrgif test -n "$PKG_CONFIG"; then
644671d7fec4Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
644771d7fec4Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
644871d7fec4Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
644971d7fec4Smrg		AC_MSG_RESULT([yes])
645071d7fec4Smrg	else
645171d7fec4Smrg		AC_MSG_RESULT([no])
645271d7fec4Smrg		PKG_CONFIG=""
645371d7fec4Smrg	fi
645471d7fec4Smrg		
645571d7fec4Smrgfi[]dnl
645671d7fec4Smrg])# PKG_PROG_PKG_CONFIG
645771d7fec4Smrg
645871d7fec4Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
645971d7fec4Smrg#
646071d7fec4Smrg# Check to see whether a particular set of modules exists.  Similar
646171d7fec4Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
646271d7fec4Smrg#
646371d7fec4Smrg#
646471d7fec4Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
646571d7fec4Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
646671d7fec4Smrg# PKG_CHECK_EXISTS manually
646771d7fec4Smrg# --------------------------------------------------------------
646871d7fec4SmrgAC_DEFUN([PKG_CHECK_EXISTS],
646971d7fec4Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
647071d7fec4Smrgif test -n "$PKG_CONFIG" && \
647171d7fec4Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
647271d7fec4Smrg  m4_ifval([$2], [$2], [:])
647371d7fec4Smrgm4_ifvaln([$3], [else
647471d7fec4Smrg  $3])dnl
647571d7fec4Smrgfi])
647671d7fec4Smrg
647771d7fec4Smrg
647871d7fec4Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
647971d7fec4Smrg# ---------------------------------------------
648071d7fec4Smrgm4_define([_PKG_CONFIG],
648171d7fec4Smrg[if test -n "$PKG_CONFIG"; then
648271d7fec4Smrg    if test -n "$$1"; then
648371d7fec4Smrg        pkg_cv_[]$1="$$1"
648471d7fec4Smrg    else
648571d7fec4Smrg        PKG_CHECK_EXISTS([$3],
648671d7fec4Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
648771d7fec4Smrg			 [pkg_failed=yes])
648871d7fec4Smrg    fi
648971d7fec4Smrgelse
649071d7fec4Smrg	pkg_failed=untried
649171d7fec4Smrgfi[]dnl
649271d7fec4Smrg])# _PKG_CONFIG
649371d7fec4Smrg
649471d7fec4Smrg# _PKG_SHORT_ERRORS_SUPPORTED
649571d7fec4Smrg# -----------------------------
649671d7fec4SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
649771d7fec4Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
649871d7fec4Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
649971d7fec4Smrg        _pkg_short_errors_supported=yes
650071d7fec4Smrgelse
650171d7fec4Smrg        _pkg_short_errors_supported=no
650271d7fec4Smrgfi[]dnl
650371d7fec4Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
650471d7fec4Smrg
650571d7fec4Smrg
650671d7fec4Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
650771d7fec4Smrg# [ACTION-IF-NOT-FOUND])
650871d7fec4Smrg#
650971d7fec4Smrg#
651071d7fec4Smrg# Note that if there is a possibility the first call to
651171d7fec4Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
651271d7fec4Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
651371d7fec4Smrg#
651471d7fec4Smrg#
651571d7fec4Smrg# --------------------------------------------------------------
651671d7fec4SmrgAC_DEFUN([PKG_CHECK_MODULES],
651771d7fec4Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
651871d7fec4SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
651971d7fec4SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
652071d7fec4Smrg
652171d7fec4Smrgpkg_failed=no
652271d7fec4SmrgAC_MSG_CHECKING([for $1])
652371d7fec4Smrg
652471d7fec4Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
652571d7fec4Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
652671d7fec4Smrg
652771d7fec4Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
652871d7fec4Smrgand $1[]_LIBS to avoid the need to call pkg-config.
652971d7fec4SmrgSee the pkg-config man page for more details.])
653071d7fec4Smrg
653171d7fec4Smrgif test $pkg_failed = yes; then
653271d7fec4Smrg        _PKG_SHORT_ERRORS_SUPPORTED
653371d7fec4Smrg        if test $_pkg_short_errors_supported = yes; then
653471d7fec4Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
653571d7fec4Smrg        else 
653671d7fec4Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
653771d7fec4Smrg        fi
653871d7fec4Smrg	# Put the nasty error message in config.log where it belongs
653971d7fec4Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
654071d7fec4Smrg
654171d7fec4Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
654271d7fec4Smrg[Package requirements ($2) were not met:
654371d7fec4Smrg
654471d7fec4Smrg$$1_PKG_ERRORS
654571d7fec4Smrg
654671d7fec4SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
654771d7fec4Smrginstalled software in a non-standard prefix.
654871d7fec4Smrg
654971d7fec4Smrg_PKG_TEXT
655071d7fec4Smrg])],
655171d7fec4Smrg		[AC_MSG_RESULT([no])
655271d7fec4Smrg                $4])
655371d7fec4Smrgelif test $pkg_failed = untried; then
655471d7fec4Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
655571d7fec4Smrg[The pkg-config script could not be found or is too old.  Make sure it
655671d7fec4Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
655771d7fec4Smrgpath to pkg-config.
655871d7fec4Smrg
655971d7fec4Smrg_PKG_TEXT
656071d7fec4Smrg
656171d7fec4SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
656271d7fec4Smrg		[$4])
656371d7fec4Smrgelse
656471d7fec4Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
656571d7fec4Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
656671d7fec4Smrg        AC_MSG_RESULT([yes])
656771d7fec4Smrg	ifelse([$3], , :, [$3])
656871d7fec4Smrgfi[]dnl
656971d7fec4Smrg])# PKG_CHECK_MODULES
657071d7fec4Smrg
657171d7fec4Smrgdnl
657271d7fec4Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
657371d7fec4Smrgdnl 
657471d7fec4Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
657571d7fec4Smrgdnl copy of this software and associated documentation files (the
657671d7fec4Smrgdnl "Software"), to deal in the Software without restriction, including
657771d7fec4Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
657871d7fec4Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
657971d7fec4Smrgdnl to whom the Software is furnished to do so, provided that the above
658071d7fec4Smrgdnl copyright notice(s) and this permission notice appear in all copies of
658171d7fec4Smrgdnl the Software and that both the above copyright notice(s) and this
658271d7fec4Smrgdnl permission notice appear in supporting documentation.
658371d7fec4Smrgdnl
658471d7fec4Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
658571d7fec4Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
658671d7fec4Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
658771d7fec4Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
658871d7fec4Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
658971d7fec4Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
659071d7fec4Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
659171d7fec4Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
659271d7fec4Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
659371d7fec4Smrgdnl
659471d7fec4Smrgdnl Except as contained in this notice, the name of a copyright holder
659571d7fec4Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
659671d7fec4Smrgdnl or other dealings in this Software without prior written authorization
659771d7fec4Smrgdnl of the copyright holder.
659871d7fec4Smrg
659971d7fec4Smrg# XORG_MACROS_VERSION(required-version)
660071d7fec4Smrg# -------------------------------------
660171d7fec4Smrg# Minimum version: 1.1.0
660271d7fec4Smrg#
660371d7fec4Smrg# If you're using a macro added in Version 1.1 or newer, include this in
660471d7fec4Smrg# your configure.ac with the minimum required version, such as:
660571d7fec4Smrg# XORG_MACROS_VERSION(1.1)
660671d7fec4Smrg#
660771d7fec4Smrg# To force at least a version with this macro defined, also add:
660871d7fec4Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
660971d7fec4Smrg#
661071d7fec4Smrg#
661171d7fec4Smrg# See the "minimum version" comment for each macro you use to see what 
661271d7fec4Smrg# version you require.
661371d7fec4SmrgAC_DEFUN([XORG_MACROS_VERSION],[
661471d7fec4Smrg	[XORG_MACROS_needed_version=$1
661571d7fec4Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
661671d7fec4Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
661771d7fec4Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
661871d7fec4Smrg	[XORG_MACROS_version=1.1.1
661971d7fec4Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
662071d7fec4Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
662171d7fec4Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
662271d7fec4Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
662371d7fec4Smrg	fi
662471d7fec4Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
662571d7fec4Smrg		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])
662671d7fec4Smrg	fi
662771d7fec4Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
662871d7fec4Smrg]) # XORG_MACROS_VERSION
662971d7fec4Smrg
663071d7fec4Smrg# XORG_PROG_RAWCPP()
663171d7fec4Smrg# ------------------
663271d7fec4Smrg# Minimum version: 1.0.0
663371d7fec4Smrg#
663471d7fec4Smrg# Find cpp program and necessary flags for use in pre-processing text files
663571d7fec4Smrg# such as man pages and config files
663671d7fec4SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
663771d7fec4SmrgAC_REQUIRE([AC_PROG_CPP])
663871d7fec4SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
663971d7fec4Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
664071d7fec4Smrg
664171d7fec4Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
664271d7fec4Smrg# which is not the best choice for supporting other OS'es, but covers most
664371d7fec4Smrg# of the ones we need for now.
664471d7fec4SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
664571d7fec4SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
664671d7fec4Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
664771d7fec4Smrg	AC_MSG_RESULT([no])
664871d7fec4Smrgelse
664971d7fec4Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
665071d7fec4Smrg		RAWCPPFLAGS=-undef
665171d7fec4Smrg		AC_MSG_RESULT([yes])
665271d7fec4Smrg	else
665371d7fec4Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
665471d7fec4Smrg	fi
665571d7fec4Smrgfi
665671d7fec4Smrgrm -f conftest.$ac_ext
665771d7fec4Smrg
665871d7fec4SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
665971d7fec4SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
666071d7fec4Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
666171d7fec4Smrg	AC_MSG_RESULT([no])
666271d7fec4Smrgelse
666371d7fec4Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
666471d7fec4Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
666571d7fec4Smrg		AC_MSG_RESULT([yes])
666671d7fec4Smrg	else
666771d7fec4Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
666871d7fec4Smrg	fi
666971d7fec4Smrgfi
667071d7fec4Smrgrm -f conftest.$ac_ext
667171d7fec4SmrgAC_SUBST(RAWCPPFLAGS)
667271d7fec4Smrg]) # XORG_PROG_RAWCPP
667371d7fec4Smrg
667471d7fec4Smrg# XORG_MANPAGE_SECTIONS()
667571d7fec4Smrg# -----------------------
667671d7fec4Smrg# Minimum version: 1.0.0
667771d7fec4Smrg#
667871d7fec4Smrg# Determine which sections man pages go in for the different man page types
667971d7fec4Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
668071d7fec4Smrg# Not sure if there's any better way than just hardcoding by OS name.
668171d7fec4Smrg# Override default settings by setting environment variables
668271d7fec4Smrg
668371d7fec4SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
668471d7fec4SmrgAC_REQUIRE([AC_CANONICAL_HOST])
668571d7fec4Smrg
668671d7fec4Smrgif test x$APP_MAN_SUFFIX = x    ; then
668771d7fec4Smrg    APP_MAN_SUFFIX=1
668871d7fec4Smrgfi
668971d7fec4Smrgif test x$APP_MAN_DIR = x    ; then
669071d7fec4Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
669171d7fec4Smrgfi
669271d7fec4Smrg
669371d7fec4Smrgif test x$LIB_MAN_SUFFIX = x    ; then
669471d7fec4Smrg    LIB_MAN_SUFFIX=3
669571d7fec4Smrgfi
669671d7fec4Smrgif test x$LIB_MAN_DIR = x    ; then
669771d7fec4Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
669871d7fec4Smrgfi
669971d7fec4Smrg
670071d7fec4Smrgif test x$FILE_MAN_SUFFIX = x    ; then
670171d7fec4Smrg    case $host_os in
670271d7fec4Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
670371d7fec4Smrg	*)		FILE_MAN_SUFFIX=5  ;;
670471d7fec4Smrg    esac
670571d7fec4Smrgfi
670671d7fec4Smrgif test x$FILE_MAN_DIR = x    ; then
670771d7fec4Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
670871d7fec4Smrgfi
670971d7fec4Smrg
671071d7fec4Smrgif test x$MISC_MAN_SUFFIX = x    ; then
671171d7fec4Smrg    case $host_os in
671271d7fec4Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
671371d7fec4Smrg	*)		MISC_MAN_SUFFIX=7  ;;
671471d7fec4Smrg    esac
671571d7fec4Smrgfi
671671d7fec4Smrgif test x$MISC_MAN_DIR = x    ; then
671771d7fec4Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
671871d7fec4Smrgfi
671971d7fec4Smrg
672071d7fec4Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
672171d7fec4Smrg    case $host_os in
672271d7fec4Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
672371d7fec4Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
672471d7fec4Smrg    esac
672571d7fec4Smrgfi
672671d7fec4Smrgif test x$DRIVER_MAN_DIR = x    ; then
672771d7fec4Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
672871d7fec4Smrgfi
672971d7fec4Smrg
673071d7fec4Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
673171d7fec4Smrg    case $host_os in
673271d7fec4Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
673371d7fec4Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
673471d7fec4Smrg    esac
673571d7fec4Smrgfi
673671d7fec4Smrgif test x$ADMIN_MAN_DIR = x    ; then
673771d7fec4Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
673871d7fec4Smrgfi
673971d7fec4Smrg
674071d7fec4Smrg
674171d7fec4SmrgAC_SUBST([APP_MAN_SUFFIX])
674271d7fec4SmrgAC_SUBST([LIB_MAN_SUFFIX])
674371d7fec4SmrgAC_SUBST([FILE_MAN_SUFFIX])
674471d7fec4SmrgAC_SUBST([MISC_MAN_SUFFIX])
674571d7fec4SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
674671d7fec4SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
674771d7fec4SmrgAC_SUBST([APP_MAN_DIR])
674871d7fec4SmrgAC_SUBST([LIB_MAN_DIR])
674971d7fec4SmrgAC_SUBST([FILE_MAN_DIR])
675071d7fec4SmrgAC_SUBST([MISC_MAN_DIR])
675171d7fec4SmrgAC_SUBST([DRIVER_MAN_DIR])
675271d7fec4SmrgAC_SUBST([ADMIN_MAN_DIR])
675371d7fec4Smrg]) # XORG_MANPAGE_SECTIONS
675471d7fec4Smrg
675571d7fec4Smrg# XORG_CHECK_LINUXDOC
675671d7fec4Smrg# -------------------
675771d7fec4Smrg# Minimum version: 1.0.0
675871d7fec4Smrg#
675971d7fec4Smrg# Defines the variable MAKE_TEXT if the necessary tools and
676071d7fec4Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
676171d7fec4Smrg# Whether or not the necessary tools and files are found can be checked
676271d7fec4Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
676371d7fec4SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
676471d7fec4SmrgAC_CHECK_FILE(
676571d7fec4Smrg	[$prefix/share/X11/sgml/defs.ent], 
676671d7fec4Smrg	[DEFS_ENT_PATH=$prefix/share/X11/sgml],
676771d7fec4Smrg	[DEFS_ENT_PATH=]
676871d7fec4Smrg)
676971d7fec4Smrg
677071d7fec4SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
677171d7fec4SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
677271d7fec4Smrg
677371d7fec4SmrgAC_MSG_CHECKING([Whether to build documentation])
677471d7fec4Smrg
677571d7fec4Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
677671d7fec4Smrg   BUILDDOC=yes
677771d7fec4Smrgelse
677871d7fec4Smrg   BUILDDOC=no
677971d7fec4Smrgfi
678071d7fec4Smrg
678171d7fec4SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
678271d7fec4Smrg
678371d7fec4SmrgAC_MSG_RESULT([$BUILDDOC])
678471d7fec4Smrg
678571d7fec4SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
678671d7fec4Smrg
678771d7fec4Smrgif test x$PS2PDF != x ; then
678871d7fec4Smrg   BUILDPDFDOC=yes
678971d7fec4Smrgelse
679071d7fec4Smrg   BUILDPDFDOC=no
679171d7fec4Smrgfi
679271d7fec4Smrg
679371d7fec4SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
679471d7fec4Smrg
679571d7fec4SmrgAC_MSG_RESULT([$BUILDPDFDOC])
679671d7fec4Smrg
679771d7fec4SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
679871d7fec4SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
679971d7fec4SmrgMAKE_PDF="$PS2PDF"
680071d7fec4SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
680171d7fec4Smrg
680271d7fec4SmrgAC_SUBST(MAKE_TEXT)
680371d7fec4SmrgAC_SUBST(MAKE_PS)
680471d7fec4SmrgAC_SUBST(MAKE_PDF)
680571d7fec4SmrgAC_SUBST(MAKE_HTML)
680671d7fec4Smrg]) # XORG_CHECK_LINUXDOC
680771d7fec4Smrg
680871d7fec4Smrg# XORG_CHECK_MALLOC_ZERO
680971d7fec4Smrg# ----------------------
681071d7fec4Smrg# Minimum version: 1.0.0
681171d7fec4Smrg#
681271d7fec4Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
681371d7fec4Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
681471d7fec4Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
681571d7fec4SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
681671d7fec4SmrgAC_ARG_ENABLE(malloc0returnsnull,
681771d7fec4Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
681871d7fec4Smrg		       [malloc(0) returns NULL (default: auto)]),
681971d7fec4Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
682071d7fec4Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
682171d7fec4Smrg
682271d7fec4SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
682371d7fec4Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
682471d7fec4Smrg	AC_RUN_IFELSE([
682571d7fec4Smrgchar *malloc();
682671d7fec4Smrgchar *realloc();
682771d7fec4Smrgchar *calloc();
682871d7fec4Smrgmain() {
682971d7fec4Smrg    char *m0, *r0, *c0, *p;
683071d7fec4Smrg    m0 = malloc(0);
683171d7fec4Smrg    p = malloc(10);
683271d7fec4Smrg    r0 = realloc(p,0);
683371d7fec4Smrg    c0 = calloc(0);
683471d7fec4Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
683571d7fec4Smrg}],
683671d7fec4Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
683771d7fec4Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
683871d7fec4Smrgfi
683971d7fec4SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
684071d7fec4Smrg
684171d7fec4Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
684271d7fec4Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
684371d7fec4Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
684471d7fec4Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
684571d7fec4Smrgelse
684671d7fec4Smrg	MALLOC_ZERO_CFLAGS=""
684771d7fec4Smrg	XMALLOC_ZERO_CFLAGS=""
684871d7fec4Smrg	XTMALLOC_ZERO_CFLAGS=""
684971d7fec4Smrgfi
685071d7fec4Smrg
685171d7fec4SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
685271d7fec4SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
685371d7fec4SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
685471d7fec4Smrg]) # XORG_CHECK_MALLOC_ZERO
685571d7fec4Smrg
685671d7fec4Smrg# XORG_WITH_LINT()
685771d7fec4Smrg# ----------------
685871d7fec4Smrg# Minimum version: 1.1.0
685971d7fec4Smrg#
686071d7fec4Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
686171d7fec4Smrg# is specified.   (Use --with-lint=sparse for sparse.)
686271d7fec4Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
686371d7fec4Smrg# Sets $LINT_FLAGS to flags to pass to source checker
686471d7fec4Smrg# Sets LINT automake conditional if enabled (default: disabled)
686571d7fec4Smrg#
686671d7fec4SmrgAC_DEFUN([XORG_WITH_LINT],[
686771d7fec4Smrg
686871d7fec4Smrg# Allow checking code with lint, sparse, etc.
686971d7fec4SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
687071d7fec4Smrg		[Use a lint-style source code checker (default: disabled)])],
687171d7fec4Smrg		[use_lint=$withval], [use_lint=no])
687271d7fec4Smrgif test "x$use_lint" = "xyes" ; then
687371d7fec4Smrg	LINT="lint"
687471d7fec4Smrgelse
687571d7fec4Smrg	LINT="$use_lint"
687671d7fec4Smrgfi
687771d7fec4Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
687871d7fec4Smrg    case $LINT in
687971d7fec4Smrg	lint|*/lint)
688071d7fec4Smrg	    case $host_os in
688171d7fec4Smrg		solaris*)
688271d7fec4Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
688371d7fec4Smrg			;;
688471d7fec4Smrg	    esac
688571d7fec4Smrg	    ;;
688671d7fec4Smrg    esac
688771d7fec4Smrgfi
688871d7fec4Smrg
688971d7fec4SmrgAC_SUBST(LINT)
689071d7fec4SmrgAC_SUBST(LINT_FLAGS)
689171d7fec4SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
689271d7fec4Smrg
689371d7fec4Smrg]) # XORG_WITH_LINT
689471d7fec4Smrg
689571d7fec4Smrg# XORG_LINT_LIBRARY(LIBNAME)
689671d7fec4Smrg# --------------------------
689771d7fec4Smrg# Minimum version: 1.1.0
689871d7fec4Smrg#
689971d7fec4Smrg# Sets up flags for building lint libraries for checking programs that call
690071d7fec4Smrg# functions in the library.
690171d7fec4Smrg# Disabled by default, enable with --enable-lint-library
690271d7fec4Smrg# Sets: 
690371d7fec4Smrg#	@LINTLIB@		- name of lint library file to make
690471d7fec4Smrg#	MAKE_LINT_LIB		- automake conditional
690571d7fec4Smrg#
690671d7fec4Smrg
690771d7fec4SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
690871d7fec4SmrgAC_REQUIRE([XORG_WITH_LINT])
690971d7fec4Smrg# Build lint "library" for more indepth checks of programs calling this library
691071d7fec4SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
691171d7fec4Smrg	[Create lint library (default: disabled)])],
691271d7fec4Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
691371d7fec4Smrgif test "x$make_lint_lib" != "xno" ; then
691471d7fec4Smrg	if test "x$LINT" = "xno" ; then
691571d7fec4Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
691671d7fec4Smrg	fi
691771d7fec4Smrg	if test "x$make_lint_lib" = "xyes" ; then
691871d7fec4Smrg		LINTLIB=llib-l$1.ln
691971d7fec4Smrg	else
692071d7fec4Smrg		LINTLIB=$make_lint_lib
692171d7fec4Smrg	fi
692271d7fec4Smrgfi
692371d7fec4SmrgAC_SUBST(LINTLIB)
692471d7fec4SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
692571d7fec4Smrg
692671d7fec4Smrg]) # XORG_LINT_LIBRARY
692771d7fec4Smrg
692871d7fec4Smrgdnl Copyright 2005 Red Hat, Inc
692971d7fec4Smrgdnl 
693071d7fec4Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
693171d7fec4Smrgdnl documentation for any purpose is hereby granted without fee, provided that
693271d7fec4Smrgdnl the above copyright notice appear in all copies and that both that
693371d7fec4Smrgdnl copyright notice and this permission notice appear in supporting
693471d7fec4Smrgdnl documentation.
693571d7fec4Smrgdnl 
693671d7fec4Smrgdnl The above copyright notice and this permission notice shall be included
693771d7fec4Smrgdnl in all copies or substantial portions of the Software.
693871d7fec4Smrgdnl 
693971d7fec4Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
694071d7fec4Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
694171d7fec4Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
694271d7fec4Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
694371d7fec4Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
694471d7fec4Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
694571d7fec4Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
694671d7fec4Smrgdnl 
694771d7fec4Smrgdnl Except as contained in this notice, the name of the copyright holders shall
694871d7fec4Smrgdnl not be used in advertising or otherwise to promote the sale, use or
694971d7fec4Smrgdnl other dealings in this Software without prior written authorization
695071d7fec4Smrgdnl from the copyright holders.
695171d7fec4Smrgdnl 
695271d7fec4Smrg
695371d7fec4Smrg# XORG_DRIVER_CHECK_EXT()
695471d7fec4Smrg# --------------------------
695571d7fec4Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
695671d7fec4Smrg# is defined, then add $1 to $REQUIRED_MODULES.
695771d7fec4Smrg
695871d7fec4SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
695971d7fec4Smrg	SAVE_CFLAGS="$CFLAGS"
696071d7fec4Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
696171d7fec4Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
696271d7fec4Smrg#include "xorg-server.h"
696371d7fec4Smrg#if !defined $1
696471d7fec4Smrg#error $1 not defined
696571d7fec4Smrg#endif
696671d7fec4Smrg		]])],
696771d7fec4Smrg		[_EXT_CHECK=yes],
696871d7fec4Smrg		[_EXT_CHECK=no])
696971d7fec4Smrg	CFLAGS="$SAVE_CFLAGS"
697071d7fec4Smrg	AC_MSG_CHECKING([if $1 is defined])
697171d7fec4Smrg	AC_MSG_RESULT([$_EXT_CHECK])
697271d7fec4Smrg	if test "$_EXT_CHECK" != no; then
697371d7fec4Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
697471d7fec4Smrg	fi
697571d7fec4Smrg])
697671d7fec4Smrg
697771d7fec4Smrgdnl Copyright 2005 Red Hat, Inc
697871d7fec4Smrgdnl
697971d7fec4Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
698071d7fec4Smrgdnl documentation for any purpose is hereby granted without fee, provided that
698171d7fec4Smrgdnl the above copyright notice appear in all copies and that both that
698271d7fec4Smrgdnl copyright notice and this permission notice appear in supporting
698371d7fec4Smrgdnl documentation.
698471d7fec4Smrgdnl
698571d7fec4Smrgdnl The above copyright notice and this permission notice shall be included
698671d7fec4Smrgdnl in all copies or substantial portions of the Software.
698771d7fec4Smrgdnl
698871d7fec4Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
698971d7fec4Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
699071d7fec4Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
699171d7fec4Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
699271d7fec4Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
699371d7fec4Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
699471d7fec4Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
699571d7fec4Smrgdnl
699671d7fec4Smrgdnl Except as contained in this notice, the name of the copyright holders shall
699771d7fec4Smrgdnl not be used in advertising or otherwise to promote the sale, use or
699871d7fec4Smrgdnl other dealings in this Software without prior written authorization
699971d7fec4Smrgdnl from the copyright holders.
700071d7fec4Smrgdnl
700171d7fec4Smrg
700271d7fec4Smrg# XORG_RELEASE_VERSION
700371d7fec4Smrg# --------------------
700471d7fec4Smrg# Adds --with/without-release-string and changes the PACKAGE and
700571d7fec4Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
700671d7fec4Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
700771d7fec4Smrg 
700871d7fec4SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
700971d7fec4Smrg	AC_ARG_WITH(release-version,
701071d7fec4Smrg			AC_HELP_STRING([--with-release-version=STRING],
701171d7fec4Smrg				[Use release version string in package name]),
701271d7fec4Smrg			[RELEASE_VERSION="$withval"],
701371d7fec4Smrg			[RELEASE_VERSION=""])
701471d7fec4Smrg	if test "x$RELEASE_VERSION" != "x"; then
701571d7fec4Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
701671d7fec4Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
701771d7fec4Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
701871d7fec4Smrg	fi
701971d7fec4Smrg])
702071d7fec4Smrg
702171d7fec4Smrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
702271d7fec4Smrg#
702371d7fec4Smrg# This file is free software; the Free Software Foundation
702471d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
702571d7fec4Smrg# with or without modifications, as long as this notice is preserved.
702671d7fec4Smrg
702771d7fec4Smrg# AM_AUTOMAKE_VERSION(VERSION)
702871d7fec4Smrg# ----------------------------
702971d7fec4Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
703071d7fec4Smrg# generated from the m4 files accompanying Automake X.Y.
703171d7fec4SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
703271d7fec4Smrg
703371d7fec4Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
703471d7fec4Smrg# -------------------------------
703571d7fec4Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
703671d7fec4Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
703771d7fec4SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
703871d7fec4Smrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
703971d7fec4Smrg
704071d7fec4Smrg# Figure out how to run the assembler.                      -*- Autoconf -*-
704171d7fec4Smrg
704271d7fec4Smrg# Copyright (C) 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
704371d7fec4Smrg#
704471d7fec4Smrg# This file is free software; the Free Software Foundation
704571d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
704671d7fec4Smrg# with or without modifications, as long as this notice is preserved.
704771d7fec4Smrg
704871d7fec4Smrg# serial 4
704971d7fec4Smrg
705071d7fec4Smrg# AM_PROG_AS
705171d7fec4Smrg# ----------
705271d7fec4SmrgAC_DEFUN([AM_PROG_AS],
705371d7fec4Smrg[# By default we simply use the C compiler to build assembly code.
705471d7fec4SmrgAC_REQUIRE([AC_PROG_CC])
705571d7fec4Smrgtest "${CCAS+set}" = set || CCAS=$CC
705671d7fec4Smrgtest "${CCASFLAGS+set}" = set || CCASFLAGS=$CFLAGS
705771d7fec4SmrgAC_ARG_VAR([CCAS],      [assembler compiler command (defaults to CC)])
705871d7fec4SmrgAC_ARG_VAR([CCASFLAGS], [assembler compiler flags (defaults to CFLAGS)])
705971d7fec4Smrg])
706071d7fec4Smrg
706171d7fec4Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
706271d7fec4Smrg
706371d7fec4Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
706471d7fec4Smrg#
706571d7fec4Smrg# This file is free software; the Free Software Foundation
706671d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
706771d7fec4Smrg# with or without modifications, as long as this notice is preserved.
706871d7fec4Smrg
706971d7fec4Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
707071d7fec4Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
707171d7fec4Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
707271d7fec4Smrg#
707371d7fec4Smrg# Of course, Automake must honor this variable whenever it calls a
707471d7fec4Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
707571d7fec4Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
707671d7fec4Smrg# depending on how configure is run.  This is pretty annoying, since
707771d7fec4Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
707871d7fec4Smrg# source directory, any form will work fine, but in subdirectories a
707971d7fec4Smrg# relative path needs to be adjusted first.
708071d7fec4Smrg#
708171d7fec4Smrg# $ac_aux_dir/missing
708271d7fec4Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
708371d7fec4Smrg# $top_srcdir/$ac_aux_dir/missing
708471d7fec4Smrg#    fails if $ac_aux_dir is absolute,
708571d7fec4Smrg#    fails when called from a subdirectory in a VPATH build with
708671d7fec4Smrg#          a relative $ac_aux_dir
708771d7fec4Smrg#
708871d7fec4Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
708971d7fec4Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
709071d7fec4Smrg# harmless because $srcdir is `.', but things will broke when you
709171d7fec4Smrg# start a VPATH build or use an absolute $srcdir.
709271d7fec4Smrg#
709371d7fec4Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
709471d7fec4Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
709571d7fec4Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
709671d7fec4Smrg# and then we would define $MISSING as
709771d7fec4Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
709871d7fec4Smrg# This will work as long as MISSING is not called from configure, because
709971d7fec4Smrg# unfortunately $(top_srcdir) has no meaning in configure.
710071d7fec4Smrg# However there are other variables, like CC, which are often used in
710171d7fec4Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
710271d7fec4Smrg#
710371d7fec4Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
710471d7fec4Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
710571d7fec4Smrg# configured tree to be moved without reconfiguration.
710671d7fec4Smrg
710771d7fec4SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
710871d7fec4Smrg[dnl Rely on autoconf to set up CDPATH properly.
710971d7fec4SmrgAC_PREREQ([2.50])dnl
711071d7fec4Smrg# expand $ac_aux_dir to an absolute path
711171d7fec4Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
711271d7fec4Smrg])
711371d7fec4Smrg
711471d7fec4Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
711571d7fec4Smrg
711671d7fec4Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
711771d7fec4Smrg# Free Software Foundation, Inc.
711871d7fec4Smrg#
711971d7fec4Smrg# This file is free software; the Free Software Foundation
712071d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
712171d7fec4Smrg# with or without modifications, as long as this notice is preserved.
712271d7fec4Smrg
712371d7fec4Smrg# serial 7
712471d7fec4Smrg
712571d7fec4Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
712671d7fec4Smrg# -------------------------------------
712771d7fec4Smrg# Define a conditional.
712871d7fec4SmrgAC_DEFUN([AM_CONDITIONAL],
712971d7fec4Smrg[AC_PREREQ(2.52)dnl
713071d7fec4Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
713171d7fec4Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
713271d7fec4SmrgAC_SUBST([$1_TRUE])
713371d7fec4SmrgAC_SUBST([$1_FALSE])
713471d7fec4Smrgif $2; then
713571d7fec4Smrg  $1_TRUE=
713671d7fec4Smrg  $1_FALSE='#'
713771d7fec4Smrgelse
713871d7fec4Smrg  $1_TRUE='#'
713971d7fec4Smrg  $1_FALSE=
714071d7fec4Smrgfi
714171d7fec4SmrgAC_CONFIG_COMMANDS_PRE(
714271d7fec4Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
714371d7fec4Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
714471d7fec4SmrgUsually this means the macro was only invoked conditionally.]])
714571d7fec4Smrgfi])])
714671d7fec4Smrg
714771d7fec4Smrg
714871d7fec4Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
714971d7fec4Smrg# Free Software Foundation, Inc.
715071d7fec4Smrg#
715171d7fec4Smrg# This file is free software; the Free Software Foundation
715271d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
715371d7fec4Smrg# with or without modifications, as long as this notice is preserved.
715471d7fec4Smrg
715571d7fec4Smrg# serial 8
715671d7fec4Smrg
715771d7fec4Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
715871d7fec4Smrg# written in clear, in which case automake, when reading aclocal.m4,
715971d7fec4Smrg# will think it sees a *use*, and therefore will trigger all it's
716071d7fec4Smrg# C support machinery.  Also note that it means that autoscan, seeing
716171d7fec4Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
716271d7fec4Smrg
716371d7fec4Smrg
716471d7fec4Smrg# _AM_DEPENDENCIES(NAME)
716571d7fec4Smrg# ----------------------
716671d7fec4Smrg# See how the compiler implements dependency checking.
716771d7fec4Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
716871d7fec4Smrg# We try a few techniques and use that to set a single cache variable.
716971d7fec4Smrg#
717071d7fec4Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
717171d7fec4Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
717271d7fec4Smrg# dependency, and given that the user is not expected to run this macro,
717371d7fec4Smrg# just rely on AC_PROG_CC.
717471d7fec4SmrgAC_DEFUN([_AM_DEPENDENCIES],
717571d7fec4Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
717671d7fec4SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
717771d7fec4SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
717871d7fec4SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
717971d7fec4Smrg
718071d7fec4Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
718171d7fec4Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
718271d7fec4Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
718371d7fec4Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
718471d7fec4Smrg                   [depcc="$$1"   am_compiler_list=])
718571d7fec4Smrg
718671d7fec4SmrgAC_CACHE_CHECK([dependency style of $depcc],
718771d7fec4Smrg               [am_cv_$1_dependencies_compiler_type],
718871d7fec4Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
718971d7fec4Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
719071d7fec4Smrg  # making bogus files that we don't know about and never remove.  For
719171d7fec4Smrg  # instance it was reported that on HP-UX the gcc test will end up
719271d7fec4Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
719371d7fec4Smrg  # in D'.
719471d7fec4Smrg  mkdir conftest.dir
719571d7fec4Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
719671d7fec4Smrg  # using a relative directory.
719771d7fec4Smrg  cp "$am_depcomp" conftest.dir
719871d7fec4Smrg  cd conftest.dir
719971d7fec4Smrg  # We will build objects and dependencies in a subdirectory because
720071d7fec4Smrg  # it helps to detect inapplicable dependency modes.  For instance
720171d7fec4Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
720271d7fec4Smrg  # side effect of compilation, but ICC will put the dependencies in
720371d7fec4Smrg  # the current directory while Tru64 will put them in the object
720471d7fec4Smrg  # directory.
720571d7fec4Smrg  mkdir sub
720671d7fec4Smrg
720771d7fec4Smrg  am_cv_$1_dependencies_compiler_type=none
720871d7fec4Smrg  if test "$am_compiler_list" = ""; then
720971d7fec4Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
721071d7fec4Smrg  fi
721171d7fec4Smrg  for depmode in $am_compiler_list; do
721271d7fec4Smrg    # Setup a source with many dependencies, because some compilers
721371d7fec4Smrg    # like to wrap large dependency lists on column 80 (with \), and
721471d7fec4Smrg    # we should not choose a depcomp mode which is confused by this.
721571d7fec4Smrg    #
721671d7fec4Smrg    # We need to recreate these files for each test, as the compiler may
721771d7fec4Smrg    # overwrite some of them when testing with obscure command lines.
721871d7fec4Smrg    # This happens at least with the AIX C compiler.
721971d7fec4Smrg    : > sub/conftest.c
722071d7fec4Smrg    for i in 1 2 3 4 5 6; do
722171d7fec4Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
722271d7fec4Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
722371d7fec4Smrg      # Solaris 8's {/usr,}/bin/sh.
722471d7fec4Smrg      touch sub/conftst$i.h
722571d7fec4Smrg    done
722671d7fec4Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
722771d7fec4Smrg
722871d7fec4Smrg    case $depmode in
722971d7fec4Smrg    nosideeffect)
723071d7fec4Smrg      # after this tag, mechanisms are not by side-effect, so they'll
723171d7fec4Smrg      # only be used when explicitly requested
723271d7fec4Smrg      if test "x$enable_dependency_tracking" = xyes; then
723371d7fec4Smrg	continue
723471d7fec4Smrg      else
723571d7fec4Smrg	break
723671d7fec4Smrg      fi
723771d7fec4Smrg      ;;
723871d7fec4Smrg    none) break ;;
723971d7fec4Smrg    esac
724071d7fec4Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
724171d7fec4Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
724271d7fec4Smrg    # handle `-M -o', and we need to detect this.
724371d7fec4Smrg    if depmode=$depmode \
724471d7fec4Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
724571d7fec4Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
724671d7fec4Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
724771d7fec4Smrg         >/dev/null 2>conftest.err &&
724871d7fec4Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
724971d7fec4Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
725071d7fec4Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
725171d7fec4Smrg      # icc doesn't choke on unknown options, it will just issue warnings
725271d7fec4Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
725371d7fec4Smrg      # that says an option was ignored or not supported.
725471d7fec4Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
725571d7fec4Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
725671d7fec4Smrg      # The diagnosis changed in icc 8.0:
725771d7fec4Smrg      #   icc: Command line remark: option '-MP' not supported
725871d7fec4Smrg      if (grep 'ignoring option' conftest.err ||
725971d7fec4Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
726071d7fec4Smrg        am_cv_$1_dependencies_compiler_type=$depmode
726171d7fec4Smrg        break
726271d7fec4Smrg      fi
726371d7fec4Smrg    fi
726471d7fec4Smrg  done
726571d7fec4Smrg
726671d7fec4Smrg  cd ..
726771d7fec4Smrg  rm -rf conftest.dir
726871d7fec4Smrgelse
726971d7fec4Smrg  am_cv_$1_dependencies_compiler_type=none
727071d7fec4Smrgfi
727171d7fec4Smrg])
727271d7fec4SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
727371d7fec4SmrgAM_CONDITIONAL([am__fastdep$1], [
727471d7fec4Smrg  test "x$enable_dependency_tracking" != xno \
727571d7fec4Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
727671d7fec4Smrg])
727771d7fec4Smrg
727871d7fec4Smrg
727971d7fec4Smrg# AM_SET_DEPDIR
728071d7fec4Smrg# -------------
728171d7fec4Smrg# Choose a directory name for dependency files.
728271d7fec4Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
728371d7fec4SmrgAC_DEFUN([AM_SET_DEPDIR],
728471d7fec4Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
728571d7fec4SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
728671d7fec4Smrg])
728771d7fec4Smrg
728871d7fec4Smrg
728971d7fec4Smrg# AM_DEP_TRACK
729071d7fec4Smrg# ------------
729171d7fec4SmrgAC_DEFUN([AM_DEP_TRACK],
729271d7fec4Smrg[AC_ARG_ENABLE(dependency-tracking,
729371d7fec4Smrg[  --disable-dependency-tracking  speeds up one-time build
729471d7fec4Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
729571d7fec4Smrgif test "x$enable_dependency_tracking" != xno; then
729671d7fec4Smrg  am_depcomp="$ac_aux_dir/depcomp"
729771d7fec4Smrg  AMDEPBACKSLASH='\'
729871d7fec4Smrgfi
729971d7fec4SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
730071d7fec4SmrgAC_SUBST([AMDEPBACKSLASH])
730171d7fec4Smrg])
730271d7fec4Smrg
730371d7fec4Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
730471d7fec4Smrg
730571d7fec4Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
730671d7fec4Smrg# Free Software Foundation, Inc.
730771d7fec4Smrg#
730871d7fec4Smrg# This file is free software; the Free Software Foundation
730971d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
731071d7fec4Smrg# with or without modifications, as long as this notice is preserved.
731171d7fec4Smrg
731271d7fec4Smrg#serial 3
731371d7fec4Smrg
731471d7fec4Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
731571d7fec4Smrg# ------------------------------
731671d7fec4SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
731771d7fec4Smrg[for mf in $CONFIG_FILES; do
731871d7fec4Smrg  # Strip MF so we end up with the name of the file.
731971d7fec4Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
732071d7fec4Smrg  # Check whether this is an Automake generated Makefile or not.
732171d7fec4Smrg  # We used to match only the files named `Makefile.in', but
732271d7fec4Smrg  # some people rename them; so instead we look at the file content.
732371d7fec4Smrg  # Grep'ing the first line is not enough: some people post-process
732471d7fec4Smrg  # each Makefile.in and add a new line on top of each file to say so.
732571d7fec4Smrg  # So let's grep whole file.
732671d7fec4Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
732771d7fec4Smrg    dirpart=`AS_DIRNAME("$mf")`
732871d7fec4Smrg  else
732971d7fec4Smrg    continue
733071d7fec4Smrg  fi
733171d7fec4Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
733271d7fec4Smrg  # from the Makefile without running `make'.
733371d7fec4Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
733471d7fec4Smrg  test -z "$DEPDIR" && continue
733571d7fec4Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
733671d7fec4Smrg  test -z "am__include" && continue
733771d7fec4Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
733871d7fec4Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
733971d7fec4Smrg  U=`sed -n 's/^U = //p' < "$mf"`
734071d7fec4Smrg  # Find all dependency output files, they are included files with
734171d7fec4Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
734271d7fec4Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
734371d7fec4Smrg  # expansion.
734471d7fec4Smrg  for file in `sed -n "
734571d7fec4Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
734671d7fec4Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
734771d7fec4Smrg    # Make sure the directory exists.
734871d7fec4Smrg    test -f "$dirpart/$file" && continue
734971d7fec4Smrg    fdir=`AS_DIRNAME(["$file"])`
735071d7fec4Smrg    AS_MKDIR_P([$dirpart/$fdir])
735171d7fec4Smrg    # echo "creating $dirpart/$file"
735271d7fec4Smrg    echo '# dummy' > "$dirpart/$file"
735371d7fec4Smrg  done
735471d7fec4Smrgdone
735571d7fec4Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
735671d7fec4Smrg
735771d7fec4Smrg
735871d7fec4Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
735971d7fec4Smrg# -----------------------------
736071d7fec4Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
736171d7fec4Smrg#
736271d7fec4Smrg# This code is only required when automatic dependency tracking
736371d7fec4Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
736471d7fec4Smrg# need in order to bootstrap the dependency handling code.
736571d7fec4SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
736671d7fec4Smrg[AC_CONFIG_COMMANDS([depfiles],
736771d7fec4Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
736871d7fec4Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
736971d7fec4Smrg])
737071d7fec4Smrg
737171d7fec4Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
737271d7fec4Smrg# Free Software Foundation, Inc.
737371d7fec4Smrg#
737471d7fec4Smrg# This file is free software; the Free Software Foundation
737571d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
737671d7fec4Smrg# with or without modifications, as long as this notice is preserved.
737771d7fec4Smrg
737871d7fec4Smrg# serial 8
737971d7fec4Smrg
738071d7fec4Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
738171d7fec4SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
738271d7fec4Smrg
738371d7fec4Smrg# Do all the work for Automake.                             -*- Autoconf -*-
738471d7fec4Smrg
738571d7fec4Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
738671d7fec4Smrg# Free Software Foundation, Inc.
738771d7fec4Smrg#
738871d7fec4Smrg# This file is free software; the Free Software Foundation
738971d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
739071d7fec4Smrg# with or without modifications, as long as this notice is preserved.
739171d7fec4Smrg
739271d7fec4Smrg# serial 12
739371d7fec4Smrg
739471d7fec4Smrg# This macro actually does too much.  Some checks are only needed if
739571d7fec4Smrg# your package does certain things.  But this isn't really a big deal.
739671d7fec4Smrg
739771d7fec4Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
739871d7fec4Smrg# AM_INIT_AUTOMAKE([OPTIONS])
739971d7fec4Smrg# -----------------------------------------------
740071d7fec4Smrg# The call with PACKAGE and VERSION arguments is the old style
740171d7fec4Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
740271d7fec4Smrg# and VERSION should now be passed to AC_INIT and removed from
740371d7fec4Smrg# the call to AM_INIT_AUTOMAKE.
740471d7fec4Smrg# We support both call styles for the transition.  After
740571d7fec4Smrg# the next Automake release, Autoconf can make the AC_INIT
740671d7fec4Smrg# arguments mandatory, and then we can depend on a new Autoconf
740771d7fec4Smrg# release and drop the old call support.
740871d7fec4SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
740971d7fec4Smrg[AC_PREREQ([2.58])dnl
741071d7fec4Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
741171d7fec4Smrgdnl the ones we care about.
741271d7fec4Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
741371d7fec4SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
741471d7fec4SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
741571d7fec4Smrg# test to see if srcdir already configured
741671d7fec4Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
741771d7fec4Smrg   test -f $srcdir/config.status; then
741871d7fec4Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
741971d7fec4Smrgfi
742071d7fec4Smrg
742171d7fec4Smrg# test whether we have cygpath
742271d7fec4Smrgif test -z "$CYGPATH_W"; then
742371d7fec4Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
742471d7fec4Smrg    CYGPATH_W='cygpath -w'
742571d7fec4Smrg  else
742671d7fec4Smrg    CYGPATH_W=echo
742771d7fec4Smrg  fi
742871d7fec4Smrgfi
742971d7fec4SmrgAC_SUBST([CYGPATH_W])
743071d7fec4Smrg
743171d7fec4Smrg# Define the identity of the package.
743271d7fec4Smrgdnl Distinguish between old-style and new-style calls.
743371d7fec4Smrgm4_ifval([$2],
743471d7fec4Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
743571d7fec4Smrg AC_SUBST([PACKAGE], [$1])dnl
743671d7fec4Smrg AC_SUBST([VERSION], [$2])],
743771d7fec4Smrg[_AM_SET_OPTIONS([$1])dnl
743871d7fec4Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
743971d7fec4Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
744071d7fec4Smrg
744171d7fec4Smrg_AM_IF_OPTION([no-define],,
744271d7fec4Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
744371d7fec4Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
744471d7fec4Smrg
744571d7fec4Smrg# Some tools Automake needs.
744671d7fec4SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
744771d7fec4SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
744871d7fec4SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
744971d7fec4SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
745071d7fec4SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
745171d7fec4SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
745271d7fec4SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
745371d7fec4SmrgAM_PROG_INSTALL_SH
745471d7fec4SmrgAM_PROG_INSTALL_STRIP
745571d7fec4SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
745671d7fec4Smrg# We need awk for the "check" target.  The system "awk" is bad on
745771d7fec4Smrg# some platforms.
745871d7fec4SmrgAC_REQUIRE([AC_PROG_AWK])dnl
745971d7fec4SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
746071d7fec4SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
746171d7fec4Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
746271d7fec4Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
746371d7fec4Smrg	      		     [_AM_PROG_TAR([v7])])])
746471d7fec4Smrg_AM_IF_OPTION([no-dependencies],,
746571d7fec4Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
746671d7fec4Smrg                  [_AM_DEPENDENCIES(CC)],
746771d7fec4Smrg                  [define([AC_PROG_CC],
746871d7fec4Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
746971d7fec4SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
747071d7fec4Smrg                  [_AM_DEPENDENCIES(CXX)],
747171d7fec4Smrg                  [define([AC_PROG_CXX],
747271d7fec4Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
747371d7fec4Smrg])
747471d7fec4Smrg])
747571d7fec4Smrg
747671d7fec4Smrg
747771d7fec4Smrg# When config.status generates a header, we must update the stamp-h file.
747871d7fec4Smrg# This file resides in the same directory as the config header
747971d7fec4Smrg# that is generated.  The stamp files are numbered to have different names.
748071d7fec4Smrg
748171d7fec4Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
748271d7fec4Smrg# loop where config.status creates the headers, so we can generate
748371d7fec4Smrg# our stamp files there.
748471d7fec4SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
748571d7fec4Smrg[# Compute $1's index in $config_headers.
748671d7fec4Smrg_am_stamp_count=1
748771d7fec4Smrgfor _am_header in $config_headers :; do
748871d7fec4Smrg  case $_am_header in
748971d7fec4Smrg    $1 | $1:* )
749071d7fec4Smrg      break ;;
749171d7fec4Smrg    * )
749271d7fec4Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
749371d7fec4Smrg  esac
749471d7fec4Smrgdone
749571d7fec4Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
749671d7fec4Smrg
749771d7fec4Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
749871d7fec4Smrg#
749971d7fec4Smrg# This file is free software; the Free Software Foundation
750071d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
750171d7fec4Smrg# with or without modifications, as long as this notice is preserved.
750271d7fec4Smrg
750371d7fec4Smrg# AM_PROG_INSTALL_SH
750471d7fec4Smrg# ------------------
750571d7fec4Smrg# Define $install_sh.
750671d7fec4SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
750771d7fec4Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
750871d7fec4Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
750971d7fec4SmrgAC_SUBST(install_sh)])
751071d7fec4Smrg
751171d7fec4Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
751271d7fec4Smrg#
751371d7fec4Smrg# This file is free software; the Free Software Foundation
751471d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
751571d7fec4Smrg# with or without modifications, as long as this notice is preserved.
751671d7fec4Smrg
751771d7fec4Smrg# serial 2
751871d7fec4Smrg
751971d7fec4Smrg# Check whether the underlying file-system supports filenames
752071d7fec4Smrg# with a leading dot.  For instance MS-DOS doesn't.
752171d7fec4SmrgAC_DEFUN([AM_SET_LEADING_DOT],
752271d7fec4Smrg[rm -rf .tst 2>/dev/null
752371d7fec4Smrgmkdir .tst 2>/dev/null
752471d7fec4Smrgif test -d .tst; then
752571d7fec4Smrg  am__leading_dot=.
752671d7fec4Smrgelse
752771d7fec4Smrg  am__leading_dot=_
752871d7fec4Smrgfi
752971d7fec4Smrgrmdir .tst 2>/dev/null
753071d7fec4SmrgAC_SUBST([am__leading_dot])])
753171d7fec4Smrg
753271d7fec4Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
753371d7fec4Smrg# From Jim Meyering
753471d7fec4Smrg
753571d7fec4Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
753671d7fec4Smrg# Free Software Foundation, Inc.
753771d7fec4Smrg#
753871d7fec4Smrg# This file is free software; the Free Software Foundation
753971d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
754071d7fec4Smrg# with or without modifications, as long as this notice is preserved.
754171d7fec4Smrg
754271d7fec4Smrg# serial 4
754371d7fec4Smrg
754471d7fec4SmrgAC_DEFUN([AM_MAINTAINER_MODE],
754571d7fec4Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
754671d7fec4Smrg  dnl maintainer-mode is disabled by default
754771d7fec4Smrg  AC_ARG_ENABLE(maintainer-mode,
754871d7fec4Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
754971d7fec4Smrg			  (and sometimes confusing) to the casual installer],
755071d7fec4Smrg      USE_MAINTAINER_MODE=$enableval,
755171d7fec4Smrg      USE_MAINTAINER_MODE=no)
755271d7fec4Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
755371d7fec4Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
755471d7fec4Smrg  MAINT=$MAINTAINER_MODE_TRUE
755571d7fec4Smrg  AC_SUBST(MAINT)dnl
755671d7fec4Smrg]
755771d7fec4Smrg)
755871d7fec4Smrg
755971d7fec4SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
756071d7fec4Smrg
756171d7fec4Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
756271d7fec4Smrg
756371d7fec4Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
756471d7fec4Smrg#
756571d7fec4Smrg# This file is free software; the Free Software Foundation
756671d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
756771d7fec4Smrg# with or without modifications, as long as this notice is preserved.
756871d7fec4Smrg
756971d7fec4Smrg# serial 3
757071d7fec4Smrg
757171d7fec4Smrg# AM_MAKE_INCLUDE()
757271d7fec4Smrg# -----------------
757371d7fec4Smrg# Check to see how make treats includes.
757471d7fec4SmrgAC_DEFUN([AM_MAKE_INCLUDE],
757571d7fec4Smrg[am_make=${MAKE-make}
757671d7fec4Smrgcat > confinc << 'END'
757771d7fec4Smrgam__doit:
757871d7fec4Smrg	@echo done
757971d7fec4Smrg.PHONY: am__doit
758071d7fec4SmrgEND
758171d7fec4Smrg# If we don't find an include directive, just comment out the code.
758271d7fec4SmrgAC_MSG_CHECKING([for style of include used by $am_make])
758371d7fec4Smrgam__include="#"
758471d7fec4Smrgam__quote=
758571d7fec4Smrg_am_result=none
758671d7fec4Smrg# First try GNU make style include.
758771d7fec4Smrgecho "include confinc" > confmf
758871d7fec4Smrg# We grep out `Entering directory' and `Leaving directory'
758971d7fec4Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
759071d7fec4Smrg# In particular we don't look at `^make:' because GNU make might
759171d7fec4Smrg# be invoked under some other name (usually "gmake"), in which
759271d7fec4Smrg# case it prints its new name instead of `make'.
759371d7fec4Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
759471d7fec4Smrg   am__include=include
759571d7fec4Smrg   am__quote=
759671d7fec4Smrg   _am_result=GNU
759771d7fec4Smrgfi
759871d7fec4Smrg# Now try BSD make style include.
759971d7fec4Smrgif test "$am__include" = "#"; then
760071d7fec4Smrg   echo '.include "confinc"' > confmf
760171d7fec4Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
760271d7fec4Smrg      am__include=.include
760371d7fec4Smrg      am__quote="\""
760471d7fec4Smrg      _am_result=BSD
760571d7fec4Smrg   fi
760671d7fec4Smrgfi
760771d7fec4SmrgAC_SUBST([am__include])
760871d7fec4SmrgAC_SUBST([am__quote])
760971d7fec4SmrgAC_MSG_RESULT([$_am_result])
761071d7fec4Smrgrm -f confinc confmf
761171d7fec4Smrg])
761271d7fec4Smrg
761371d7fec4Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
761471d7fec4Smrg
761571d7fec4Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
761671d7fec4Smrg# Free Software Foundation, Inc.
761771d7fec4Smrg#
761871d7fec4Smrg# This file is free software; the Free Software Foundation
761971d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
762071d7fec4Smrg# with or without modifications, as long as this notice is preserved.
762171d7fec4Smrg
762271d7fec4Smrg# serial 4
762371d7fec4Smrg
762471d7fec4Smrg# AM_MISSING_PROG(NAME, PROGRAM)
762571d7fec4Smrg# ------------------------------
762671d7fec4SmrgAC_DEFUN([AM_MISSING_PROG],
762771d7fec4Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
762871d7fec4Smrg$1=${$1-"${am_missing_run}$2"}
762971d7fec4SmrgAC_SUBST($1)])
763071d7fec4Smrg
763171d7fec4Smrg
763271d7fec4Smrg# AM_MISSING_HAS_RUN
763371d7fec4Smrg# ------------------
763471d7fec4Smrg# Define MISSING if not defined so far and test if it supports --run.
763571d7fec4Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
763671d7fec4SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
763771d7fec4Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
763871d7fec4Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
763971d7fec4Smrg# Use eval to expand $SHELL
764071d7fec4Smrgif eval "$MISSING --run true"; then
764171d7fec4Smrg  am_missing_run="$MISSING --run "
764271d7fec4Smrgelse
764371d7fec4Smrg  am_missing_run=
764471d7fec4Smrg  AC_MSG_WARN([`missing' script is too old or missing])
764571d7fec4Smrgfi
764671d7fec4Smrg])
764771d7fec4Smrg
764871d7fec4Smrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
764971d7fec4Smrg#
765071d7fec4Smrg# This file is free software; the Free Software Foundation
765171d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
765271d7fec4Smrg# with or without modifications, as long as this notice is preserved.
765371d7fec4Smrg
765471d7fec4Smrg# AM_PROG_MKDIR_P
765571d7fec4Smrg# ---------------
765671d7fec4Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
765771d7fec4Smrg#
765871d7fec4Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
765971d7fec4Smrg# created by `make install' are always world readable, even if the
766071d7fec4Smrg# installer happens to have an overly restrictive umask (e.g. 077).
766171d7fec4Smrg# This was a mistake.  There are at least two reasons why we must not
766271d7fec4Smrg# use `-m 0755':
766371d7fec4Smrg#   - it causes special bits like SGID to be ignored,
766471d7fec4Smrg#   - it may be too restrictive (some setups expect 775 directories).
766571d7fec4Smrg#
766671d7fec4Smrg# Do not use -m 0755 and let people choose whatever they expect by
766771d7fec4Smrg# setting umask.
766871d7fec4Smrg#
766971d7fec4Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
767071d7fec4Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
767171d7fec4Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
767271d7fec4Smrg# concurrently, both version can detect that a/ is missing, but only
767371d7fec4Smrg# one can create it and the other will error out.  Consequently we
767471d7fec4Smrg# restrict ourselves to GNU make (using the --version option ensures
767571d7fec4Smrg# this.)
767671d7fec4SmrgAC_DEFUN([AM_PROG_MKDIR_P],
767771d7fec4Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
767871d7fec4Smrg  # We used to keeping the `.' as first argument, in order to
767971d7fec4Smrg  # allow $(mkdir_p) to be used without argument.  As in
768071d7fec4Smrg  #   $(mkdir_p) $(somedir)
768171d7fec4Smrg  # where $(somedir) is conditionally defined.  However this is wrong
768271d7fec4Smrg  # for two reasons:
768371d7fec4Smrg  #  1. if the package is installed by a user who cannot write `.'
768471d7fec4Smrg  #     make install will fail,
768571d7fec4Smrg  #  2. the above comment should most certainly read
768671d7fec4Smrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
768771d7fec4Smrg  #     so it does not work when $(somedir) is undefined and
768871d7fec4Smrg  #     $(DESTDIR) is not.
768971d7fec4Smrg  #  To support the latter case, we have to write
769071d7fec4Smrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
769171d7fec4Smrg  #  so the `.' trick is pointless.
769271d7fec4Smrg  mkdir_p='mkdir -p --'
769371d7fec4Smrgelse
769471d7fec4Smrg  # On NextStep and OpenStep, the `mkdir' command does not
769571d7fec4Smrg  # recognize any option.  It will interpret all options as
769671d7fec4Smrg  # directories to create, and then abort because `.' already
769771d7fec4Smrg  # exists.
769871d7fec4Smrg  for d in ./-p ./--version;
769971d7fec4Smrg  do
770071d7fec4Smrg    test -d $d && rmdir $d
770171d7fec4Smrg  done
770271d7fec4Smrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
770371d7fec4Smrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
770471d7fec4Smrg    mkdir_p='$(mkinstalldirs)'
770571d7fec4Smrg  else
770671d7fec4Smrg    mkdir_p='$(install_sh) -d'
770771d7fec4Smrg  fi
770871d7fec4Smrgfi
770971d7fec4SmrgAC_SUBST([mkdir_p])])
771071d7fec4Smrg
771171d7fec4Smrg# Helper functions for option handling.                     -*- Autoconf -*-
771271d7fec4Smrg
771371d7fec4Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
771471d7fec4Smrg#
771571d7fec4Smrg# This file is free software; the Free Software Foundation
771671d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
771771d7fec4Smrg# with or without modifications, as long as this notice is preserved.
771871d7fec4Smrg
771971d7fec4Smrg# serial 3
772071d7fec4Smrg
772171d7fec4Smrg# _AM_MANGLE_OPTION(NAME)
772271d7fec4Smrg# -----------------------
772371d7fec4SmrgAC_DEFUN([_AM_MANGLE_OPTION],
772471d7fec4Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
772571d7fec4Smrg
772671d7fec4Smrg# _AM_SET_OPTION(NAME)
772771d7fec4Smrg# ------------------------------
772871d7fec4Smrg# Set option NAME.  Presently that only means defining a flag for this option.
772971d7fec4SmrgAC_DEFUN([_AM_SET_OPTION],
773071d7fec4Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
773171d7fec4Smrg
773271d7fec4Smrg# _AM_SET_OPTIONS(OPTIONS)
773371d7fec4Smrg# ----------------------------------
773471d7fec4Smrg# OPTIONS is a space-separated list of Automake options.
773571d7fec4SmrgAC_DEFUN([_AM_SET_OPTIONS],
773671d7fec4Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
773771d7fec4Smrg
773871d7fec4Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
773971d7fec4Smrg# -------------------------------------------
774071d7fec4Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
774171d7fec4SmrgAC_DEFUN([_AM_IF_OPTION],
774271d7fec4Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
774371d7fec4Smrg
774471d7fec4Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
774571d7fec4Smrg
774671d7fec4Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
774771d7fec4Smrg# Free Software Foundation, Inc.
774871d7fec4Smrg#
774971d7fec4Smrg# This file is free software; the Free Software Foundation
775071d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
775171d7fec4Smrg# with or without modifications, as long as this notice is preserved.
775271d7fec4Smrg
775371d7fec4Smrg# serial 4
775471d7fec4Smrg
775571d7fec4Smrg# AM_SANITY_CHECK
775671d7fec4Smrg# ---------------
775771d7fec4SmrgAC_DEFUN([AM_SANITY_CHECK],
775871d7fec4Smrg[AC_MSG_CHECKING([whether build environment is sane])
775971d7fec4Smrg# Just in case
776071d7fec4Smrgsleep 1
776171d7fec4Smrgecho timestamp > conftest.file
776271d7fec4Smrg# Do `set' in a subshell so we don't clobber the current shell's
776371d7fec4Smrg# arguments.  Must try -L first in case configure is actually a
776471d7fec4Smrg# symlink; some systems play weird games with the mod time of symlinks
776571d7fec4Smrg# (eg FreeBSD returns the mod time of the symlink's containing
776671d7fec4Smrg# directory).
776771d7fec4Smrgif (
776871d7fec4Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
776971d7fec4Smrg   if test "$[*]" = "X"; then
777071d7fec4Smrg      # -L didn't work.
777171d7fec4Smrg      set X `ls -t $srcdir/configure conftest.file`
777271d7fec4Smrg   fi
777371d7fec4Smrg   rm -f conftest.file
777471d7fec4Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
777571d7fec4Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
777671d7fec4Smrg
777771d7fec4Smrg      # If neither matched, then we have a broken ls.  This can happen
777871d7fec4Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
777971d7fec4Smrg      # broken ls alias from the environment.  This has actually
778071d7fec4Smrg      # happened.  Such a system could not be considered "sane".
778171d7fec4Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
778271d7fec4Smrgalias in your environment])
778371d7fec4Smrg   fi
778471d7fec4Smrg
778571d7fec4Smrg   test "$[2]" = conftest.file
778671d7fec4Smrg   )
778771d7fec4Smrgthen
778871d7fec4Smrg   # Ok.
778971d7fec4Smrg   :
779071d7fec4Smrgelse
779171d7fec4Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
779271d7fec4SmrgCheck your system clock])
779371d7fec4Smrgfi
779471d7fec4SmrgAC_MSG_RESULT(yes)])
779571d7fec4Smrg
779671d7fec4Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
779771d7fec4Smrg#
779871d7fec4Smrg# This file is free software; the Free Software Foundation
779971d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
780071d7fec4Smrg# with or without modifications, as long as this notice is preserved.
780171d7fec4Smrg
780271d7fec4Smrg# AM_PROG_INSTALL_STRIP
780371d7fec4Smrg# ---------------------
780471d7fec4Smrg# One issue with vendor `install' (even GNU) is that you can't
780571d7fec4Smrg# specify the program used to strip binaries.  This is especially
780671d7fec4Smrg# annoying in cross-compiling environments, where the build's strip
780771d7fec4Smrg# is unlikely to handle the host's binaries.
780871d7fec4Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
780971d7fec4Smrg# always use install-sh in `make install-strip', and initialize
781071d7fec4Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
781171d7fec4SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
781271d7fec4Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
781371d7fec4Smrg# Installed binaries are usually stripped using `strip' when the user
781471d7fec4Smrg# run `make install-strip'.  However `strip' might not be the right
781571d7fec4Smrg# tool to use in cross-compilation environments, therefore Automake
781671d7fec4Smrg# will honor the `STRIP' environment variable to overrule this program.
781771d7fec4Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
781871d7fec4Smrgif test "$cross_compiling" != no; then
781971d7fec4Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
782071d7fec4Smrgfi
782171d7fec4SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
782271d7fec4SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
782371d7fec4Smrg
782471d7fec4Smrg# Check how to create a tarball.                            -*- Autoconf -*-
782571d7fec4Smrg
782671d7fec4Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
782771d7fec4Smrg#
782871d7fec4Smrg# This file is free software; the Free Software Foundation
782971d7fec4Smrg# gives unlimited permission to copy and/or distribute it,
783071d7fec4Smrg# with or without modifications, as long as this notice is preserved.
783171d7fec4Smrg
783271d7fec4Smrg# serial 2
783371d7fec4Smrg
783471d7fec4Smrg# _AM_PROG_TAR(FORMAT)
783571d7fec4Smrg# --------------------
783671d7fec4Smrg# Check how to create a tarball in format FORMAT.
783771d7fec4Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
783871d7fec4Smrg#
783971d7fec4Smrg# Substitute a variable $(am__tar) that is a command
784071d7fec4Smrg# writing to stdout a FORMAT-tarball containing the directory
784171d7fec4Smrg# $tardir.
784271d7fec4Smrg#     tardir=directory && $(am__tar) > result.tar
784371d7fec4Smrg#
784471d7fec4Smrg# Substitute a variable $(am__untar) that extract such
784571d7fec4Smrg# a tarball read from stdin.
784671d7fec4Smrg#     $(am__untar) < result.tar
784771d7fec4SmrgAC_DEFUN([_AM_PROG_TAR],
784871d7fec4Smrg[# Always define AMTAR for backward compatibility.
784971d7fec4SmrgAM_MISSING_PROG([AMTAR], [tar])
785071d7fec4Smrgm4_if([$1], [v7],
785171d7fec4Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
785271d7fec4Smrg     [m4_case([$1], [ustar],, [pax],,
785371d7fec4Smrg              [m4_fatal([Unknown tar format])])
785471d7fec4SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
785571d7fec4Smrg# Loop over all known methods to create a tar archive until one works.
785671d7fec4Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
785771d7fec4Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
785871d7fec4Smrg# Do not fold the above two line into one, because Tru64 sh and
785971d7fec4Smrg# Solaris sh will not grok spaces in the rhs of `-'.
786071d7fec4Smrgfor _am_tool in $_am_tools
786171d7fec4Smrgdo
786271d7fec4Smrg  case $_am_tool in
786371d7fec4Smrg  gnutar)
786471d7fec4Smrg    for _am_tar in tar gnutar gtar;
786571d7fec4Smrg    do
786671d7fec4Smrg      AM_RUN_LOG([$_am_tar --version]) && break
786771d7fec4Smrg    done
786871d7fec4Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
786971d7fec4Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
787071d7fec4Smrg    am__untar="$_am_tar -xf -"
787171d7fec4Smrg    ;;
787271d7fec4Smrg  plaintar)
787371d7fec4Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
787471d7fec4Smrg    # ustar tarball either.
787571d7fec4Smrg    (tar --version) >/dev/null 2>&1 && continue
787671d7fec4Smrg    am__tar='tar chf - "$$tardir"'
787771d7fec4Smrg    am__tar_='tar chf - "$tardir"'
787871d7fec4Smrg    am__untar='tar xf -'
787971d7fec4Smrg    ;;
788071d7fec4Smrg  pax)
788171d7fec4Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
788271d7fec4Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
788371d7fec4Smrg    am__untar='pax -r'
788471d7fec4Smrg    ;;
788571d7fec4Smrg  cpio)
788671d7fec4Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
788771d7fec4Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
788871d7fec4Smrg    am__untar='cpio -i -H $1 -d'
788971d7fec4Smrg    ;;
789071d7fec4Smrg  none)
789171d7fec4Smrg    am__tar=false
789271d7fec4Smrg    am__tar_=false
789371d7fec4Smrg    am__untar=false
789471d7fec4Smrg    ;;
789571d7fec4Smrg  esac
789671d7fec4Smrg
789771d7fec4Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
789871d7fec4Smrg  # and am__untar set.
789971d7fec4Smrg  test -n "${am_cv_prog_tar_$1}" && break
790071d7fec4Smrg
790171d7fec4Smrg  # tar/untar a dummy directory, and stop if the command works
790271d7fec4Smrg  rm -rf conftest.dir
790371d7fec4Smrg  mkdir conftest.dir
790471d7fec4Smrg  echo GrepMe > conftest.dir/file
790571d7fec4Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
790671d7fec4Smrg  rm -rf conftest.dir
790771d7fec4Smrg  if test -s conftest.tar; then
790871d7fec4Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
790971d7fec4Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
791071d7fec4Smrg  fi
791171d7fec4Smrgdone
791271d7fec4Smrgrm -rf conftest.dir
791371d7fec4Smrg
791471d7fec4SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
791571d7fec4SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
791671d7fec4SmrgAC_SUBST([am__tar])
791771d7fec4SmrgAC_SUBST([am__untar])
791871d7fec4Smrg]) # _AM_PROG_TAR
791971d7fec4Smrg
7920