aclocal.m4 revision 191cded7
1191cded7Smrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2191cded7Smrg
3191cded7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4191cded7Smrg# 2005  Free Software Foundation, Inc.
5191cded7Smrg# This file is free software; the Free Software Foundation
6191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7191cded7Smrg# with or without modifications, as long as this notice is preserved.
8191cded7Smrg
9191cded7Smrg# This program is distributed in the hope that it will be useful,
10191cded7Smrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11191cded7Smrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12191cded7Smrg# PARTICULAR PURPOSE.
13191cded7Smrg
14191cded7Smrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15191cded7Smrg
16191cded7Smrg# serial 48 AC_PROG_LIBTOOL
17191cded7Smrg
18191cded7Smrg
19191cded7Smrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20191cded7Smrg# -----------------------------------------------------------
21191cded7Smrg# If this macro is not defined by Autoconf, define it here.
22191cded7Smrgm4_ifdef([AC_PROVIDE_IFELSE],
23191cded7Smrg         [],
24191cded7Smrg         [m4_define([AC_PROVIDE_IFELSE],
25191cded7Smrg	         [m4_ifdef([AC_PROVIDE_$1],
26191cded7Smrg		           [$2], [$3])])])
27191cded7Smrg
28191cded7Smrg
29191cded7Smrg# AC_PROG_LIBTOOL
30191cded7Smrg# ---------------
31191cded7SmrgAC_DEFUN([AC_PROG_LIBTOOL],
32191cded7Smrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33191cded7Smrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34191cded7Smrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35191cded7Smrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
36191cded7Smrg    [AC_LIBTOOL_CXX],
37191cded7Smrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
38191cded7Smrg  ])])
39191cded7Smrgdnl And a similar setup for Fortran 77 support
40191cded7Smrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
41191cded7Smrg    [AC_LIBTOOL_F77],
42191cded7Smrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
43191cded7Smrg])])
44191cded7Smrg
45191cded7Smrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46191cded7Smrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47191cded7Smrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48191cded7Smrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
49191cded7Smrg    [AC_LIBTOOL_GCJ],
50191cded7Smrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
51191cded7Smrg      [AC_LIBTOOL_GCJ],
52191cded7Smrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
53191cded7Smrg	[AC_LIBTOOL_GCJ],
54191cded7Smrg      [ifdef([AC_PROG_GCJ],
55191cded7Smrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56191cded7Smrg       ifdef([A][M_PROG_GCJ],
57191cded7Smrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58191cded7Smrg       ifdef([LT_AC_PROG_GCJ],
59191cded7Smrg	     [define([LT_AC_PROG_GCJ],
60191cded7Smrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
61191cded7Smrg])])# AC_PROG_LIBTOOL
62191cded7Smrg
63191cded7Smrg
64191cded7Smrg# _AC_PROG_LIBTOOL
65191cded7Smrg# ----------------
66191cded7SmrgAC_DEFUN([_AC_PROG_LIBTOOL],
67191cded7Smrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
68191cded7SmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69191cded7SmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70191cded7SmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
71191cded7Smrg
72191cded7Smrg# This can be used to rebuild libtool when needed
73191cded7SmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
74191cded7Smrg
75191cded7Smrg# Always use our own libtool.
76191cded7SmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
77191cded7SmrgAC_SUBST(LIBTOOL)dnl
78191cded7Smrg
79191cded7Smrg# Prevent multiple expansion
80191cded7Smrgdefine([AC_PROG_LIBTOOL], [])
81191cded7Smrg])# _AC_PROG_LIBTOOL
82191cded7Smrg
83191cded7Smrg
84191cded7Smrg# AC_LIBTOOL_SETUP
85191cded7Smrg# ----------------
86191cded7SmrgAC_DEFUN([AC_LIBTOOL_SETUP],
87191cded7Smrg[AC_PREREQ(2.50)dnl
88191cded7SmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
89191cded7SmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
90191cded7SmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91191cded7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
92191cded7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
93191cded7SmrgAC_REQUIRE([AC_PROG_CC])dnl
94191cded7SmrgAC_REQUIRE([AC_PROG_LD])dnl
95191cded7SmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96191cded7SmrgAC_REQUIRE([AC_PROG_NM])dnl
97191cded7Smrg
98191cded7SmrgAC_REQUIRE([AC_PROG_LN_S])dnl
99191cded7SmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
100191cded7Smrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
101191cded7SmrgAC_REQUIRE([AC_OBJEXT])dnl
102191cded7SmrgAC_REQUIRE([AC_EXEEXT])dnl
103191cded7Smrgdnl
104191cded7Smrg
105191cded7SmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
106191cded7SmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
107191cded7SmrgAC_LIBTOOL_OBJDIR
108191cded7Smrg
109191cded7SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
110191cded7Smrg_LT_AC_PROG_ECHO_BACKSLASH
111191cded7Smrg
112191cded7Smrgcase $host_os in
113191cded7Smrgaix3*)
114191cded7Smrg  # AIX sometimes has problems with the GCC collect2 program.  For some
115191cded7Smrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
116191cded7Smrg  # vanish in a puff of smoke.
117191cded7Smrg  if test "X${COLLECT_NAMES+set}" != Xset; then
118191cded7Smrg    COLLECT_NAMES=
119191cded7Smrg    export COLLECT_NAMES
120191cded7Smrg  fi
121191cded7Smrg  ;;
122191cded7Smrgesac
123191cded7Smrg
124191cded7Smrg# Sed substitution that helps us do robust quoting.  It backslashifies
125191cded7Smrg# metacharacters that are still active within double-quoted strings.
126191cded7SmrgXsed='sed -e 1s/^X//'
127191cded7Smrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128191cded7Smrg
129191cded7Smrg# Same as above, but do not quote variable references.
130191cded7Smrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
131191cded7Smrg
132191cded7Smrg# Sed substitution to delay expansion of an escaped shell variable in a
133191cded7Smrg# double_quote_subst'ed string.
134191cded7Smrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
135191cded7Smrg
136191cded7Smrg# Sed substitution to avoid accidental globbing in evaled expressions
137191cded7Smrgno_glob_subst='s/\*/\\\*/g'
138191cded7Smrg
139191cded7Smrg# Constants:
140191cded7Smrgrm="rm -f"
141191cded7Smrg
142191cded7Smrg# Global variables:
143191cded7Smrgdefault_ofile=libtool
144191cded7Smrgcan_build_shared=yes
145191cded7Smrg
146191cded7Smrg# All known linkers require a `.a' archive for static linking (except MSVC,
147191cded7Smrg# which needs '.lib').
148191cded7Smrglibext=a
149191cded7Smrgltmain="$ac_aux_dir/ltmain.sh"
150191cded7Smrgofile="$default_ofile"
151191cded7Smrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
152191cded7Smrg
153191cded7SmrgAC_CHECK_TOOL(AR, ar, false)
154191cded7SmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
155191cded7SmrgAC_CHECK_TOOL(STRIP, strip, :)
156191cded7Smrg
157191cded7Smrgold_CC="$CC"
158191cded7Smrgold_CFLAGS="$CFLAGS"
159191cded7Smrg
160191cded7Smrg# Set sane defaults for various variables
161191cded7Smrgtest -z "$AR" && AR=ar
162191cded7Smrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
163191cded7Smrgtest -z "$AS" && AS=as
164191cded7Smrgtest -z "$CC" && CC=cc
165191cded7Smrgtest -z "$LTCC" && LTCC=$CC
166191cded7Smrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
167191cded7Smrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
168191cded7Smrgtest -z "$LD" && LD=ld
169191cded7Smrgtest -z "$LN_S" && LN_S="ln -s"
170191cded7Smrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
171191cded7Smrgtest -z "$NM" && NM=nm
172191cded7Smrgtest -z "$SED" && SED=sed
173191cded7Smrgtest -z "$OBJDUMP" && OBJDUMP=objdump
174191cded7Smrgtest -z "$RANLIB" && RANLIB=:
175191cded7Smrgtest -z "$STRIP" && STRIP=:
176191cded7Smrgtest -z "$ac_objext" && ac_objext=o
177191cded7Smrg
178191cded7Smrg# Determine commands to create old-style static archives.
179191cded7Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
180191cded7Smrgold_postinstall_cmds='chmod 644 $oldlib'
181191cded7Smrgold_postuninstall_cmds=
182191cded7Smrg
183191cded7Smrgif test -n "$RANLIB"; then
184191cded7Smrg  case $host_os in
185191cded7Smrg  openbsd*)
186191cded7Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
187191cded7Smrg    ;;
188191cded7Smrg  *)
189191cded7Smrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
190191cded7Smrg    ;;
191191cded7Smrg  esac
192191cded7Smrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
193191cded7Smrgfi
194191cded7Smrg
195191cded7Smrg_LT_CC_BASENAME([$compiler])
196191cded7Smrg
197191cded7Smrg# Only perform the check for file, if the check method requires it
198191cded7Smrgcase $deplibs_check_method in
199191cded7Smrgfile_magic*)
200191cded7Smrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
201191cded7Smrg    AC_PATH_MAGIC
202191cded7Smrg  fi
203191cded7Smrg  ;;
204191cded7Smrgesac
205191cded7Smrg
206191cded7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
207191cded7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
208191cded7Smrgenable_win32_dll=yes, enable_win32_dll=no)
209191cded7Smrg
210191cded7SmrgAC_ARG_ENABLE([libtool-lock],
211191cded7Smrg    [AC_HELP_STRING([--disable-libtool-lock],
212191cded7Smrg	[avoid locking (might break parallel builds)])])
213191cded7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
214191cded7Smrg
215191cded7SmrgAC_ARG_WITH([pic],
216191cded7Smrg    [AC_HELP_STRING([--with-pic],
217191cded7Smrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
218191cded7Smrg    [pic_mode="$withval"],
219191cded7Smrg    [pic_mode=default])
220191cded7Smrgtest -z "$pic_mode" && pic_mode=default
221191cded7Smrg
222191cded7Smrg# Use C for the default configuration in the libtool script
223191cded7Smrgtagname=
224191cded7SmrgAC_LIBTOOL_LANG_C_CONFIG
225191cded7Smrg_LT_AC_TAGCONFIG
226191cded7Smrg])# AC_LIBTOOL_SETUP
227191cded7Smrg
228191cded7Smrg
229191cded7Smrg# _LT_AC_SYS_COMPILER
230191cded7Smrg# -------------------
231191cded7SmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
232191cded7Smrg[AC_REQUIRE([AC_PROG_CC])dnl
233191cded7Smrg
234191cded7Smrg# If no C compiler was specified, use CC.
235191cded7SmrgLTCC=${LTCC-"$CC"}
236191cded7Smrg
237191cded7Smrg# If no C compiler flags were specified, use CFLAGS.
238191cded7SmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
239191cded7Smrg
240191cded7Smrg# Allow CC to be a program name with arguments.
241191cded7Smrgcompiler=$CC
242191cded7Smrg])# _LT_AC_SYS_COMPILER
243191cded7Smrg
244191cded7Smrg
245191cded7Smrg# _LT_CC_BASENAME(CC)
246191cded7Smrg# -------------------
247191cded7Smrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
248191cded7SmrgAC_DEFUN([_LT_CC_BASENAME],
249191cded7Smrg[for cc_temp in $1""; do
250191cded7Smrg  case $cc_temp in
251191cded7Smrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
252191cded7Smrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
253191cded7Smrg    \-*) ;;
254191cded7Smrg    *) break;;
255191cded7Smrg  esac
256191cded7Smrgdone
257191cded7Smrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
258191cded7Smrg])
259191cded7Smrg
260191cded7Smrg
261191cded7Smrg# _LT_COMPILER_BOILERPLATE
262191cded7Smrg# ------------------------
263191cded7Smrg# Check for compiler boilerplate output or warnings with
264191cded7Smrg# the simple compiler test code.
265191cded7SmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
266191cded7Smrg[ac_outfile=conftest.$ac_objext
267191cded7Smrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
268191cded7Smrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
269191cded7Smrg_lt_compiler_boilerplate=`cat conftest.err`
270191cded7Smrg$rm conftest*
271191cded7Smrg])# _LT_COMPILER_BOILERPLATE
272191cded7Smrg
273191cded7Smrg
274191cded7Smrg# _LT_LINKER_BOILERPLATE
275191cded7Smrg# ----------------------
276191cded7Smrg# Check for linker boilerplate output or warnings with
277191cded7Smrg# the simple link test code.
278191cded7SmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
279191cded7Smrg[ac_outfile=conftest.$ac_objext
280191cded7Smrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
281191cded7Smrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
282191cded7Smrg_lt_linker_boilerplate=`cat conftest.err`
283191cded7Smrg$rm conftest*
284191cded7Smrg])# _LT_LINKER_BOILERPLATE
285191cded7Smrg
286191cded7Smrg
287191cded7Smrg# _LT_AC_SYS_LIBPATH_AIX
288191cded7Smrg# ----------------------
289191cded7Smrg# Links a minimal program and checks the executable
290191cded7Smrg# for the system default hardcoded library path. In most cases,
291191cded7Smrg# this is /usr/lib:/lib, but when the MPI compilers are used
292191cded7Smrg# the location of the communication and MPI libs are included too.
293191cded7Smrg# If we don't find anything, use the default library path according
294191cded7Smrg# to the aix ld manual.
295191cded7SmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
296191cded7Smrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
297191cded7Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
298191cded7Smrg}'`
299191cded7Smrg# Check for a 64-bit object if we didn't find anything.
300191cded7Smrgif 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; }
301191cded7Smrg}'`; fi],[])
302191cded7Smrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
303191cded7Smrg])# _LT_AC_SYS_LIBPATH_AIX
304191cded7Smrg
305191cded7Smrg
306191cded7Smrg# _LT_AC_SHELL_INIT(ARG)
307191cded7Smrg# ----------------------
308191cded7SmrgAC_DEFUN([_LT_AC_SHELL_INIT],
309191cded7Smrg[ifdef([AC_DIVERSION_NOTICE],
310191cded7Smrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
311191cded7Smrg	 [AC_DIVERT_PUSH(NOTICE)])
312191cded7Smrg$1
313191cded7SmrgAC_DIVERT_POP
314191cded7Smrg])# _LT_AC_SHELL_INIT
315191cded7Smrg
316191cded7Smrg
317191cded7Smrg# _LT_AC_PROG_ECHO_BACKSLASH
318191cded7Smrg# --------------------------
319191cded7Smrg# Add some code to the start of the generated configure script which
320191cded7Smrg# will find an echo command which doesn't interpret backslashes.
321191cded7SmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
322191cded7Smrg[_LT_AC_SHELL_INIT([
323191cded7Smrg# Check that we are running under the correct shell.
324191cded7SmrgSHELL=${CONFIG_SHELL-/bin/sh}
325191cded7Smrg
326191cded7Smrgcase X$ECHO in
327191cded7SmrgX*--fallback-echo)
328191cded7Smrg  # Remove one level of quotation (which was required for Make).
329191cded7Smrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
330191cded7Smrg  ;;
331191cded7Smrgesac
332191cded7Smrg
333191cded7Smrgecho=${ECHO-echo}
334191cded7Smrgif test "X[$]1" = X--no-reexec; then
335191cded7Smrg  # Discard the --no-reexec flag, and continue.
336191cded7Smrg  shift
337191cded7Smrgelif test "X[$]1" = X--fallback-echo; then
338191cded7Smrg  # Avoid inline document here, it may be left over
339191cded7Smrg  :
340191cded7Smrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
341191cded7Smrg  # Yippee, $echo works!
342191cded7Smrg  :
343191cded7Smrgelse
344191cded7Smrg  # Restart under the correct shell.
345191cded7Smrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
346191cded7Smrgfi
347191cded7Smrg
348191cded7Smrgif test "X[$]1" = X--fallback-echo; then
349191cded7Smrg  # used as fallback echo
350191cded7Smrg  shift
351191cded7Smrg  cat <<EOF
352191cded7Smrg[$]*
353191cded7SmrgEOF
354191cded7Smrg  exit 0
355191cded7Smrgfi
356191cded7Smrg
357191cded7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
358191cded7Smrg# if CDPATH is set.
359191cded7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
360191cded7Smrg
361191cded7Smrgif test -z "$ECHO"; then
362191cded7Smrgif test "X${echo_test_string+set}" != Xset; then
363191cded7Smrg# find a string as large as possible, as long as the shell can cope with it
364191cded7Smrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
365191cded7Smrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
366191cded7Smrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
367191cded7Smrg       echo_test_string=`eval $cmd` &&
368191cded7Smrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
369191cded7Smrg    then
370191cded7Smrg      break
371191cded7Smrg    fi
372191cded7Smrg  done
373191cded7Smrgfi
374191cded7Smrg
375191cded7Smrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
376191cded7Smrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
377191cded7Smrg   test "X$echo_testing_string" = "X$echo_test_string"; then
378191cded7Smrg  :
379191cded7Smrgelse
380191cded7Smrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
381191cded7Smrg  # backslashes.  This makes it impossible to quote backslashes using
382191cded7Smrg  #   echo "$something" | sed 's/\\/\\\\/g'
383191cded7Smrg  #
384191cded7Smrg  # So, first we look for a working echo in the user's PATH.
385191cded7Smrg
386191cded7Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
387191cded7Smrg  for dir in $PATH /usr/ucb; do
388191cded7Smrg    IFS="$lt_save_ifs"
389191cded7Smrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
390191cded7Smrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
391191cded7Smrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
392191cded7Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
393191cded7Smrg      echo="$dir/echo"
394191cded7Smrg      break
395191cded7Smrg    fi
396191cded7Smrg  done
397191cded7Smrg  IFS="$lt_save_ifs"
398191cded7Smrg
399191cded7Smrg  if test "X$echo" = Xecho; then
400191cded7Smrg    # We didn't find a better echo, so look for alternatives.
401191cded7Smrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
402191cded7Smrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
403191cded7Smrg       test "X$echo_testing_string" = "X$echo_test_string"; then
404191cded7Smrg      # This shell has a builtin print -r that does the trick.
405191cded7Smrg      echo='print -r'
406191cded7Smrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
407191cded7Smrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
408191cded7Smrg      # If we have ksh, try running configure again with it.
409191cded7Smrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
410191cded7Smrg      export ORIGINAL_CONFIG_SHELL
411191cded7Smrg      CONFIG_SHELL=/bin/ksh
412191cded7Smrg      export CONFIG_SHELL
413191cded7Smrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
414191cded7Smrg    else
415191cded7Smrg      # Try using printf.
416191cded7Smrg      echo='printf %s\n'
417191cded7Smrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
418191cded7Smrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
419191cded7Smrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
420191cded7Smrg	# Cool, printf works
421191cded7Smrg	:
422191cded7Smrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
423191cded7Smrg	   test "X$echo_testing_string" = 'X\t' &&
424191cded7Smrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
425191cded7Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
426191cded7Smrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
427191cded7Smrg	export CONFIG_SHELL
428191cded7Smrg	SHELL="$CONFIG_SHELL"
429191cded7Smrg	export SHELL
430191cded7Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
431191cded7Smrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
432191cded7Smrg	   test "X$echo_testing_string" = 'X\t' &&
433191cded7Smrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
434191cded7Smrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
435191cded7Smrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
436191cded7Smrg      else
437191cded7Smrg	# maybe with a smaller string...
438191cded7Smrg	prev=:
439191cded7Smrg
440191cded7Smrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
441191cded7Smrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
442191cded7Smrg	  then
443191cded7Smrg	    break
444191cded7Smrg	  fi
445191cded7Smrg	  prev="$cmd"
446191cded7Smrg	done
447191cded7Smrg
448191cded7Smrg	if test "$prev" != 'sed 50q "[$]0"'; then
449191cded7Smrg	  echo_test_string=`eval $prev`
450191cded7Smrg	  export echo_test_string
451191cded7Smrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
452191cded7Smrg	else
453191cded7Smrg	  # Oops.  We lost completely, so just stick with echo.
454191cded7Smrg	  echo=echo
455191cded7Smrg	fi
456191cded7Smrg      fi
457191cded7Smrg    fi
458191cded7Smrg  fi
459191cded7Smrgfi
460191cded7Smrgfi
461191cded7Smrg
462191cded7Smrg# Copy echo and quote the copy suitably for passing to libtool from
463191cded7Smrg# the Makefile, instead of quoting the original, which is used later.
464191cded7SmrgECHO=$echo
465191cded7Smrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
466191cded7Smrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
467191cded7Smrgfi
468191cded7Smrg
469191cded7SmrgAC_SUBST(ECHO)
470191cded7Smrg])])# _LT_AC_PROG_ECHO_BACKSLASH
471191cded7Smrg
472191cded7Smrg
473191cded7Smrg# _LT_AC_LOCK
474191cded7Smrg# -----------
475191cded7SmrgAC_DEFUN([_LT_AC_LOCK],
476191cded7Smrg[AC_ARG_ENABLE([libtool-lock],
477191cded7Smrg    [AC_HELP_STRING([--disable-libtool-lock],
478191cded7Smrg	[avoid locking (might break parallel builds)])])
479191cded7Smrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
480191cded7Smrg
481191cded7Smrg# Some flags need to be propagated to the compiler or linker for good
482191cded7Smrg# libtool support.
483191cded7Smrgcase $host in
484191cded7Smrgia64-*-hpux*)
485191cded7Smrg  # Find out which ABI we are using.
486191cded7Smrg  echo 'int i;' > conftest.$ac_ext
487191cded7Smrg  if AC_TRY_EVAL(ac_compile); then
488191cded7Smrg    case `/usr/bin/file conftest.$ac_objext` in
489191cded7Smrg    *ELF-32*)
490191cded7Smrg      HPUX_IA64_MODE="32"
491191cded7Smrg      ;;
492191cded7Smrg    *ELF-64*)
493191cded7Smrg      HPUX_IA64_MODE="64"
494191cded7Smrg      ;;
495191cded7Smrg    esac
496191cded7Smrg  fi
497191cded7Smrg  rm -rf conftest*
498191cded7Smrg  ;;
499191cded7Smrg*-*-irix6*)
500191cded7Smrg  # Find out which ABI we are using.
501191cded7Smrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
502191cded7Smrg  if AC_TRY_EVAL(ac_compile); then
503191cded7Smrg   if test "$lt_cv_prog_gnu_ld" = yes; then
504191cded7Smrg    case `/usr/bin/file conftest.$ac_objext` in
505191cded7Smrg    *32-bit*)
506191cded7Smrg      LD="${LD-ld} -melf32bsmip"
507191cded7Smrg      ;;
508191cded7Smrg    *N32*)
509191cded7Smrg      LD="${LD-ld} -melf32bmipn32"
510191cded7Smrg      ;;
511191cded7Smrg    *64-bit*)
512191cded7Smrg      LD="${LD-ld} -melf64bmip"
513191cded7Smrg      ;;
514191cded7Smrg    esac
515191cded7Smrg   else
516191cded7Smrg    case `/usr/bin/file conftest.$ac_objext` in
517191cded7Smrg    *32-bit*)
518191cded7Smrg      LD="${LD-ld} -32"
519191cded7Smrg      ;;
520191cded7Smrg    *N32*)
521191cded7Smrg      LD="${LD-ld} -n32"
522191cded7Smrg      ;;
523191cded7Smrg    *64-bit*)
524191cded7Smrg      LD="${LD-ld} -64"
525191cded7Smrg      ;;
526191cded7Smrg    esac
527191cded7Smrg   fi
528191cded7Smrg  fi
529191cded7Smrg  rm -rf conftest*
530191cded7Smrg  ;;
531191cded7Smrg
532191cded7Smrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
533191cded7Smrg  # Find out which ABI we are using.
534191cded7Smrg  echo 'int i;' > conftest.$ac_ext
535191cded7Smrg  if AC_TRY_EVAL(ac_compile); then
536191cded7Smrg    case `/usr/bin/file conftest.o` in
537191cded7Smrg    *32-bit*)
538191cded7Smrg      case $host in
539191cded7Smrg        x86_64-*linux*)
540191cded7Smrg          LD="${LD-ld} -m elf_i386"
541191cded7Smrg          ;;
542191cded7Smrg        ppc64-*linux*|powerpc64-*linux*)
543191cded7Smrg          LD="${LD-ld} -m elf32ppclinux"
544191cded7Smrg          ;;
545191cded7Smrg        s390x-*linux*)
546191cded7Smrg          LD="${LD-ld} -m elf_s390"
547191cded7Smrg          ;;
548191cded7Smrg        sparc64-*linux*)
549191cded7Smrg          LD="${LD-ld} -m elf32_sparc"
550191cded7Smrg          ;;
551191cded7Smrg      esac
552191cded7Smrg      ;;
553191cded7Smrg    *64-bit*)
554191cded7Smrg      case $host in
555191cded7Smrg        x86_64-*linux*)
556191cded7Smrg          LD="${LD-ld} -m elf_x86_64"
557191cded7Smrg          ;;
558191cded7Smrg        ppc*-*linux*|powerpc*-*linux*)
559191cded7Smrg          LD="${LD-ld} -m elf64ppc"
560191cded7Smrg          ;;
561191cded7Smrg        s390*-*linux*)
562191cded7Smrg          LD="${LD-ld} -m elf64_s390"
563191cded7Smrg          ;;
564191cded7Smrg        sparc*-*linux*)
565191cded7Smrg          LD="${LD-ld} -m elf64_sparc"
566191cded7Smrg          ;;
567191cded7Smrg      esac
568191cded7Smrg      ;;
569191cded7Smrg    esac
570191cded7Smrg  fi
571191cded7Smrg  rm -rf conftest*
572191cded7Smrg  ;;
573191cded7Smrg
574191cded7Smrg*-*-sco3.2v5*)
575191cded7Smrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
576191cded7Smrg  SAVE_CFLAGS="$CFLAGS"
577191cded7Smrg  CFLAGS="$CFLAGS -belf"
578191cded7Smrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
579191cded7Smrg    [AC_LANG_PUSH(C)
580191cded7Smrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
581191cded7Smrg     AC_LANG_POP])
582191cded7Smrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
583191cded7Smrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
584191cded7Smrg    CFLAGS="$SAVE_CFLAGS"
585191cded7Smrg  fi
586191cded7Smrg  ;;
587191cded7Smrgsparc*-*solaris*)
588191cded7Smrg  # Find out which ABI we are using.
589191cded7Smrg  echo 'int i;' > conftest.$ac_ext
590191cded7Smrg  if AC_TRY_EVAL(ac_compile); then
591191cded7Smrg    case `/usr/bin/file conftest.o` in
592191cded7Smrg    *64-bit*)
593191cded7Smrg      case $lt_cv_prog_gnu_ld in
594191cded7Smrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
595191cded7Smrg      *)    LD="${LD-ld} -64" ;;
596191cded7Smrg      esac
597191cded7Smrg      ;;
598191cded7Smrg    esac
599191cded7Smrg  fi
600191cded7Smrg  rm -rf conftest*
601191cded7Smrg  ;;
602191cded7Smrg
603191cded7SmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
604191cded7Smrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
605191cded7Smrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
606191cded7Smrg  AC_CHECK_TOOL(AS, as, false)
607191cded7Smrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
608191cded7Smrg  ;;
609191cded7Smrg  ])
610191cded7Smrgesac
611191cded7Smrg
612191cded7Smrgneed_locks="$enable_libtool_lock"
613191cded7Smrg
614191cded7Smrg])# _LT_AC_LOCK
615191cded7Smrg
616191cded7Smrg
617191cded7Smrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
618191cded7Smrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
619191cded7Smrg# ----------------------------------------------------------------
620191cded7Smrg# Check whether the given compiler option works
621191cded7SmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
622191cded7Smrg[AC_REQUIRE([LT_AC_PROG_SED])
623191cded7SmrgAC_CACHE_CHECK([$1], [$2],
624191cded7Smrg  [$2=no
625191cded7Smrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
626191cded7Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
627191cded7Smrg   lt_compiler_flag="$3"
628191cded7Smrg   # Insert the option either (1) after the last *FLAGS variable, or
629191cded7Smrg   # (2) before a word containing "conftest.", or (3) at the end.
630191cded7Smrg   # Note that $ac_compile itself does not contain backslashes and begins
631191cded7Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
632191cded7Smrg   # The option is referenced via a variable to avoid confusing sed.
633191cded7Smrg   lt_compile=`echo "$ac_compile" | $SED \
634191cded7Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
635191cded7Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
636191cded7Smrg   -e 's:$: $lt_compiler_flag:'`
637191cded7Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
638191cded7Smrg   (eval "$lt_compile" 2>conftest.err)
639191cded7Smrg   ac_status=$?
640191cded7Smrg   cat conftest.err >&AS_MESSAGE_LOG_FD
641191cded7Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
642191cded7Smrg   if (exit $ac_status) && test -s "$ac_outfile"; then
643191cded7Smrg     # The compiler can only warn and ignore the option if not recognized
644191cded7Smrg     # So say no if there are warnings other than the usual output.
645191cded7Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
646191cded7Smrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
647191cded7Smrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
648191cded7Smrg       $2=yes
649191cded7Smrg     fi
650191cded7Smrg   fi
651191cded7Smrg   $rm conftest*
652191cded7Smrg])
653191cded7Smrg
654191cded7Smrgif test x"[$]$2" = xyes; then
655191cded7Smrg    ifelse([$5], , :, [$5])
656191cded7Smrgelse
657191cded7Smrg    ifelse([$6], , :, [$6])
658191cded7Smrgfi
659191cded7Smrg])# AC_LIBTOOL_COMPILER_OPTION
660191cded7Smrg
661191cded7Smrg
662191cded7Smrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
663191cded7Smrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
664191cded7Smrg# ------------------------------------------------------------
665191cded7Smrg# Check whether the given compiler option works
666191cded7SmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
667191cded7Smrg[AC_CACHE_CHECK([$1], [$2],
668191cded7Smrg  [$2=no
669191cded7Smrg   save_LDFLAGS="$LDFLAGS"
670191cded7Smrg   LDFLAGS="$LDFLAGS $3"
671191cded7Smrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
672191cded7Smrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
673191cded7Smrg     # The linker can only warn and ignore the option if not recognized
674191cded7Smrg     # So say no if there are warnings
675191cded7Smrg     if test -s conftest.err; then
676191cded7Smrg       # Append any errors to the config.log.
677191cded7Smrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
678191cded7Smrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
679191cded7Smrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
680191cded7Smrg       if diff conftest.exp conftest.er2 >/dev/null; then
681191cded7Smrg         $2=yes
682191cded7Smrg       fi
683191cded7Smrg     else
684191cded7Smrg       $2=yes
685191cded7Smrg     fi
686191cded7Smrg   fi
687191cded7Smrg   $rm conftest*
688191cded7Smrg   LDFLAGS="$save_LDFLAGS"
689191cded7Smrg])
690191cded7Smrg
691191cded7Smrgif test x"[$]$2" = xyes; then
692191cded7Smrg    ifelse([$4], , :, [$4])
693191cded7Smrgelse
694191cded7Smrg    ifelse([$5], , :, [$5])
695191cded7Smrgfi
696191cded7Smrg])# AC_LIBTOOL_LINKER_OPTION
697191cded7Smrg
698191cded7Smrg
699191cded7Smrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
700191cded7Smrg# --------------------------
701191cded7SmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
702191cded7Smrg[# find the maximum length of command line arguments
703191cded7SmrgAC_MSG_CHECKING([the maximum length of command line arguments])
704191cded7SmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
705191cded7Smrg  i=0
706191cded7Smrg  teststring="ABCD"
707191cded7Smrg
708191cded7Smrg  case $build_os in
709191cded7Smrg  msdosdjgpp*)
710191cded7Smrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
711191cded7Smrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
712191cded7Smrg    # during glob expansion).  Even if it were fixed, the result of this
713191cded7Smrg    # check would be larger than it should be.
714191cded7Smrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
715191cded7Smrg    ;;
716191cded7Smrg
717191cded7Smrg  gnu*)
718191cded7Smrg    # Under GNU Hurd, this test is not required because there is
719191cded7Smrg    # no limit to the length of command line arguments.
720191cded7Smrg    # Libtool will interpret -1 as no limit whatsoever
721191cded7Smrg    lt_cv_sys_max_cmd_len=-1;
722191cded7Smrg    ;;
723191cded7Smrg
724191cded7Smrg  cygwin* | mingw*)
725191cded7Smrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
726191cded7Smrg    # about 5 minutes as the teststring grows exponentially.
727191cded7Smrg    # Worse, since 9x/ME are not pre-emptively multitasking,
728191cded7Smrg    # you end up with a "frozen" computer, even though with patience
729191cded7Smrg    # the test eventually succeeds (with a max line length of 256k).
730191cded7Smrg    # Instead, let's just punt: use the minimum linelength reported by
731191cded7Smrg    # all of the supported platforms: 8192 (on NT/2K/XP).
732191cded7Smrg    lt_cv_sys_max_cmd_len=8192;
733191cded7Smrg    ;;
734191cded7Smrg
735191cded7Smrg  amigaos*)
736191cded7Smrg    # On AmigaOS with pdksh, this test takes hours, literally.
737191cded7Smrg    # So we just punt and use a minimum line length of 8192.
738191cded7Smrg    lt_cv_sys_max_cmd_len=8192;
739191cded7Smrg    ;;
740191cded7Smrg
741191cded7Smrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
742191cded7Smrg    # This has been around since 386BSD, at least.  Likely further.
743191cded7Smrg    if test -x /sbin/sysctl; then
744191cded7Smrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
745191cded7Smrg    elif test -x /usr/sbin/sysctl; then
746191cded7Smrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
747191cded7Smrg    else
748191cded7Smrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
749191cded7Smrg    fi
750191cded7Smrg    # And add a safety zone
751191cded7Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
752191cded7Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
753191cded7Smrg    ;;
754191cded7Smrg
755191cded7Smrg  interix*)
756191cded7Smrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
757191cded7Smrg    lt_cv_sys_max_cmd_len=196608
758191cded7Smrg    ;;
759191cded7Smrg
760191cded7Smrg  osf*)
761191cded7Smrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
762191cded7Smrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
763191cded7Smrg    # nice to cause kernel panics so lets avoid the loop below.
764191cded7Smrg    # First set a reasonable default.
765191cded7Smrg    lt_cv_sys_max_cmd_len=16384
766191cded7Smrg    #
767191cded7Smrg    if test -x /sbin/sysconfig; then
768191cded7Smrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
769191cded7Smrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
770191cded7Smrg      esac
771191cded7Smrg    fi
772191cded7Smrg    ;;
773191cded7Smrg  sco3.2v5*)
774191cded7Smrg    lt_cv_sys_max_cmd_len=102400
775191cded7Smrg    ;;
776191cded7Smrg  sysv5* | sco5v6* | sysv4.2uw2*)
777191cded7Smrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
778191cded7Smrg    if test -n "$kargmax"; then
779191cded7Smrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
780191cded7Smrg    else
781191cded7Smrg      lt_cv_sys_max_cmd_len=32768
782191cded7Smrg    fi
783191cded7Smrg    ;;
784191cded7Smrg  *)
785191cded7Smrg    # If test is not a shell built-in, we'll probably end up computing a
786191cded7Smrg    # maximum length that is only half of the actual maximum length, but
787191cded7Smrg    # we can't tell.
788191cded7Smrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
789191cded7Smrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
790191cded7Smrg	       = "XX$teststring") >/dev/null 2>&1 &&
791191cded7Smrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
792191cded7Smrg	    lt_cv_sys_max_cmd_len=$new_result &&
793191cded7Smrg	    test $i != 17 # 1/2 MB should be enough
794191cded7Smrg    do
795191cded7Smrg      i=`expr $i + 1`
796191cded7Smrg      teststring=$teststring$teststring
797191cded7Smrg    done
798191cded7Smrg    teststring=
799191cded7Smrg    # Add a significant safety factor because C++ compilers can tack on massive
800191cded7Smrg    # amounts of additional arguments before passing them to the linker.
801191cded7Smrg    # It appears as though 1/2 is a usable value.
802191cded7Smrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
803191cded7Smrg    ;;
804191cded7Smrg  esac
805191cded7Smrg])
806191cded7Smrgif test -n $lt_cv_sys_max_cmd_len ; then
807191cded7Smrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
808191cded7Smrgelse
809191cded7Smrg  AC_MSG_RESULT(none)
810191cded7Smrgfi
811191cded7Smrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
812191cded7Smrg
813191cded7Smrg
814191cded7Smrg# _LT_AC_CHECK_DLFCN
815191cded7Smrg# ------------------
816191cded7SmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
817191cded7Smrg[AC_CHECK_HEADERS(dlfcn.h)dnl
818191cded7Smrg])# _LT_AC_CHECK_DLFCN
819191cded7Smrg
820191cded7Smrg
821191cded7Smrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
822191cded7Smrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
823191cded7Smrg# ---------------------------------------------------------------------
824191cded7SmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
825191cded7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
826191cded7Smrgif test "$cross_compiling" = yes; then :
827191cded7Smrg  [$4]
828191cded7Smrgelse
829191cded7Smrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
830191cded7Smrg  lt_status=$lt_dlunknown
831191cded7Smrg  cat > conftest.$ac_ext <<EOF
832191cded7Smrg[#line __oline__ "configure"
833191cded7Smrg#include "confdefs.h"
834191cded7Smrg
835191cded7Smrg#if HAVE_DLFCN_H
836191cded7Smrg#include <dlfcn.h>
837191cded7Smrg#endif
838191cded7Smrg
839191cded7Smrg#include <stdio.h>
840191cded7Smrg
841191cded7Smrg#ifdef RTLD_GLOBAL
842191cded7Smrg#  define LT_DLGLOBAL		RTLD_GLOBAL
843191cded7Smrg#else
844191cded7Smrg#  ifdef DL_GLOBAL
845191cded7Smrg#    define LT_DLGLOBAL		DL_GLOBAL
846191cded7Smrg#  else
847191cded7Smrg#    define LT_DLGLOBAL		0
848191cded7Smrg#  endif
849191cded7Smrg#endif
850191cded7Smrg
851191cded7Smrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
852191cded7Smrg   find out it does not work in some platform. */
853191cded7Smrg#ifndef LT_DLLAZY_OR_NOW
854191cded7Smrg#  ifdef RTLD_LAZY
855191cded7Smrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
856191cded7Smrg#  else
857191cded7Smrg#    ifdef DL_LAZY
858191cded7Smrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
859191cded7Smrg#    else
860191cded7Smrg#      ifdef RTLD_NOW
861191cded7Smrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
862191cded7Smrg#      else
863191cded7Smrg#        ifdef DL_NOW
864191cded7Smrg#          define LT_DLLAZY_OR_NOW	DL_NOW
865191cded7Smrg#        else
866191cded7Smrg#          define LT_DLLAZY_OR_NOW	0
867191cded7Smrg#        endif
868191cded7Smrg#      endif
869191cded7Smrg#    endif
870191cded7Smrg#  endif
871191cded7Smrg#endif
872191cded7Smrg
873191cded7Smrg#ifdef __cplusplus
874191cded7Smrgextern "C" void exit (int);
875191cded7Smrg#endif
876191cded7Smrg
877191cded7Smrgvoid fnord() { int i=42;}
878191cded7Smrgint main ()
879191cded7Smrg{
880191cded7Smrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
881191cded7Smrg  int status = $lt_dlunknown;
882191cded7Smrg
883191cded7Smrg  if (self)
884191cded7Smrg    {
885191cded7Smrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
886191cded7Smrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
887191cded7Smrg      /* dlclose (self); */
888191cded7Smrg    }
889191cded7Smrg  else
890191cded7Smrg    puts (dlerror ());
891191cded7Smrg
892191cded7Smrg    exit (status);
893191cded7Smrg}]
894191cded7SmrgEOF
895191cded7Smrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
896191cded7Smrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
897191cded7Smrg    lt_status=$?
898191cded7Smrg    case x$lt_status in
899191cded7Smrg      x$lt_dlno_uscore) $1 ;;
900191cded7Smrg      x$lt_dlneed_uscore) $2 ;;
901191cded7Smrg      x$lt_dlunknown|x*) $3 ;;
902191cded7Smrg    esac
903191cded7Smrg  else :
904191cded7Smrg    # compilation failed
905191cded7Smrg    $3
906191cded7Smrg  fi
907191cded7Smrgfi
908191cded7Smrgrm -fr conftest*
909191cded7Smrg])# _LT_AC_TRY_DLOPEN_SELF
910191cded7Smrg
911191cded7Smrg
912191cded7Smrg# AC_LIBTOOL_DLOPEN_SELF
913191cded7Smrg# ----------------------
914191cded7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
915191cded7Smrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
916191cded7Smrgif test "x$enable_dlopen" != xyes; then
917191cded7Smrg  enable_dlopen=unknown
918191cded7Smrg  enable_dlopen_self=unknown
919191cded7Smrg  enable_dlopen_self_static=unknown
920191cded7Smrgelse
921191cded7Smrg  lt_cv_dlopen=no
922191cded7Smrg  lt_cv_dlopen_libs=
923191cded7Smrg
924191cded7Smrg  case $host_os in
925191cded7Smrg  beos*)
926191cded7Smrg    lt_cv_dlopen="load_add_on"
927191cded7Smrg    lt_cv_dlopen_libs=
928191cded7Smrg    lt_cv_dlopen_self=yes
929191cded7Smrg    ;;
930191cded7Smrg
931191cded7Smrg  mingw* | pw32*)
932191cded7Smrg    lt_cv_dlopen="LoadLibrary"
933191cded7Smrg    lt_cv_dlopen_libs=
934191cded7Smrg   ;;
935191cded7Smrg
936191cded7Smrg  cygwin*)
937191cded7Smrg    lt_cv_dlopen="dlopen"
938191cded7Smrg    lt_cv_dlopen_libs=
939191cded7Smrg   ;;
940191cded7Smrg
941191cded7Smrg  darwin*)
942191cded7Smrg  # if libdl is installed we need to link against it
943191cded7Smrg    AC_CHECK_LIB([dl], [dlopen],
944191cded7Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
945191cded7Smrg    lt_cv_dlopen="dyld"
946191cded7Smrg    lt_cv_dlopen_libs=
947191cded7Smrg    lt_cv_dlopen_self=yes
948191cded7Smrg    ])
949191cded7Smrg   ;;
950191cded7Smrg
951191cded7Smrg  *)
952191cded7Smrg    AC_CHECK_FUNC([shl_load],
953191cded7Smrg	  [lt_cv_dlopen="shl_load"],
954191cded7Smrg      [AC_CHECK_LIB([dld], [shl_load],
955191cded7Smrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
956191cded7Smrg	[AC_CHECK_FUNC([dlopen],
957191cded7Smrg	      [lt_cv_dlopen="dlopen"],
958191cded7Smrg	  [AC_CHECK_LIB([dl], [dlopen],
959191cded7Smrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
960191cded7Smrg	    [AC_CHECK_LIB([svld], [dlopen],
961191cded7Smrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
962191cded7Smrg	      [AC_CHECK_LIB([dld], [dld_link],
963191cded7Smrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
964191cded7Smrg	      ])
965191cded7Smrg	    ])
966191cded7Smrg	  ])
967191cded7Smrg	])
968191cded7Smrg      ])
969191cded7Smrg    ;;
970191cded7Smrg  esac
971191cded7Smrg
972191cded7Smrg  if test "x$lt_cv_dlopen" != xno; then
973191cded7Smrg    enable_dlopen=yes
974191cded7Smrg  else
975191cded7Smrg    enable_dlopen=no
976191cded7Smrg  fi
977191cded7Smrg
978191cded7Smrg  case $lt_cv_dlopen in
979191cded7Smrg  dlopen)
980191cded7Smrg    save_CPPFLAGS="$CPPFLAGS"
981191cded7Smrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
982191cded7Smrg
983191cded7Smrg    save_LDFLAGS="$LDFLAGS"
984191cded7Smrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
985191cded7Smrg
986191cded7Smrg    save_LIBS="$LIBS"
987191cded7Smrg    LIBS="$lt_cv_dlopen_libs $LIBS"
988191cded7Smrg
989191cded7Smrg    AC_CACHE_CHECK([whether a program can dlopen itself],
990191cded7Smrg	  lt_cv_dlopen_self, [dnl
991191cded7Smrg	  _LT_AC_TRY_DLOPEN_SELF(
992191cded7Smrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
993191cded7Smrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
994191cded7Smrg    ])
995191cded7Smrg
996191cded7Smrg    if test "x$lt_cv_dlopen_self" = xyes; then
997191cded7Smrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
998191cded7Smrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
999191cded7Smrg    	  lt_cv_dlopen_self_static, [dnl
1000191cded7Smrg	  _LT_AC_TRY_DLOPEN_SELF(
1001191cded7Smrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1002191cded7Smrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1003191cded7Smrg      ])
1004191cded7Smrg    fi
1005191cded7Smrg
1006191cded7Smrg    CPPFLAGS="$save_CPPFLAGS"
1007191cded7Smrg    LDFLAGS="$save_LDFLAGS"
1008191cded7Smrg    LIBS="$save_LIBS"
1009191cded7Smrg    ;;
1010191cded7Smrg  esac
1011191cded7Smrg
1012191cded7Smrg  case $lt_cv_dlopen_self in
1013191cded7Smrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1014191cded7Smrg  *) enable_dlopen_self=unknown ;;
1015191cded7Smrg  esac
1016191cded7Smrg
1017191cded7Smrg  case $lt_cv_dlopen_self_static in
1018191cded7Smrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1019191cded7Smrg  *) enable_dlopen_self_static=unknown ;;
1020191cded7Smrg  esac
1021191cded7Smrgfi
1022191cded7Smrg])# AC_LIBTOOL_DLOPEN_SELF
1023191cded7Smrg
1024191cded7Smrg
1025191cded7Smrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1026191cded7Smrg# ---------------------------------
1027191cded7Smrg# Check to see if options -c and -o are simultaneously supported by compiler
1028191cded7SmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1029191cded7Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1030191cded7SmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1031191cded7Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1032191cded7Smrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1033191cded7Smrg   $rm -r conftest 2>/dev/null
1034191cded7Smrg   mkdir conftest
1035191cded7Smrg   cd conftest
1036191cded7Smrg   mkdir out
1037191cded7Smrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1038191cded7Smrg
1039191cded7Smrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1040191cded7Smrg   # Insert the option either (1) after the last *FLAGS variable, or
1041191cded7Smrg   # (2) before a word containing "conftest.", or (3) at the end.
1042191cded7Smrg   # Note that $ac_compile itself does not contain backslashes and begins
1043191cded7Smrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1044191cded7Smrg   lt_compile=`echo "$ac_compile" | $SED \
1045191cded7Smrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1046191cded7Smrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1047191cded7Smrg   -e 's:$: $lt_compiler_flag:'`
1048191cded7Smrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1049191cded7Smrg   (eval "$lt_compile" 2>out/conftest.err)
1050191cded7Smrg   ac_status=$?
1051191cded7Smrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1052191cded7Smrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1053191cded7Smrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1054191cded7Smrg   then
1055191cded7Smrg     # The compiler can only warn and ignore the option if not recognized
1056191cded7Smrg     # So say no if there are warnings
1057191cded7Smrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1058191cded7Smrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1059191cded7Smrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1060191cded7Smrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1061191cded7Smrg     fi
1062191cded7Smrg   fi
1063191cded7Smrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1064191cded7Smrg   $rm conftest*
1065191cded7Smrg   # SGI C++ compiler will create directory out/ii_files/ for
1066191cded7Smrg   # template instantiation
1067191cded7Smrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1068191cded7Smrg   $rm out/* && rmdir out
1069191cded7Smrg   cd ..
1070191cded7Smrg   rmdir conftest
1071191cded7Smrg   $rm conftest*
1072191cded7Smrg])
1073191cded7Smrg])# AC_LIBTOOL_PROG_CC_C_O
1074191cded7Smrg
1075191cded7Smrg
1076191cded7Smrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1077191cded7Smrg# -----------------------------------------
1078191cded7Smrg# Check to see if we can do hard links to lock some files if needed
1079191cded7SmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1080191cded7Smrg[AC_REQUIRE([_LT_AC_LOCK])dnl
1081191cded7Smrg
1082191cded7Smrghard_links="nottested"
1083191cded7Smrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1084191cded7Smrg  # do not overwrite the value of need_locks provided by the user
1085191cded7Smrg  AC_MSG_CHECKING([if we can lock with hard links])
1086191cded7Smrg  hard_links=yes
1087191cded7Smrg  $rm conftest*
1088191cded7Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1089191cded7Smrg  touch conftest.a
1090191cded7Smrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1091191cded7Smrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1092191cded7Smrg  AC_MSG_RESULT([$hard_links])
1093191cded7Smrg  if test "$hard_links" = no; then
1094191cded7Smrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1095191cded7Smrg    need_locks=warn
1096191cded7Smrg  fi
1097191cded7Smrgelse
1098191cded7Smrg  need_locks=no
1099191cded7Smrgfi
1100191cded7Smrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1101191cded7Smrg
1102191cded7Smrg
1103191cded7Smrg# AC_LIBTOOL_OBJDIR
1104191cded7Smrg# -----------------
1105191cded7SmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
1106191cded7Smrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1107191cded7Smrg[rm -f .libs 2>/dev/null
1108191cded7Smrgmkdir .libs 2>/dev/null
1109191cded7Smrgif test -d .libs; then
1110191cded7Smrg  lt_cv_objdir=.libs
1111191cded7Smrgelse
1112191cded7Smrg  # MS-DOS does not allow filenames that begin with a dot.
1113191cded7Smrg  lt_cv_objdir=_libs
1114191cded7Smrgfi
1115191cded7Smrgrmdir .libs 2>/dev/null])
1116191cded7Smrgobjdir=$lt_cv_objdir
1117191cded7Smrg])# AC_LIBTOOL_OBJDIR
1118191cded7Smrg
1119191cded7Smrg
1120191cded7Smrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1121191cded7Smrg# ----------------------------------------------
1122191cded7Smrg# Check hardcoding attributes.
1123191cded7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1124191cded7Smrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1125191cded7Smrg_LT_AC_TAGVAR(hardcode_action, $1)=
1126191cded7Smrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1127191cded7Smrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1128191cded7Smrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1129191cded7Smrg
1130191cded7Smrg  # We can hardcode non-existant directories.
1131191cded7Smrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1132191cded7Smrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1133191cded7Smrg     # have to relink, otherwise we might link with an installed library
1134191cded7Smrg     # when we should be linking with a yet-to-be-installed one
1135191cded7Smrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1136191cded7Smrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1137191cded7Smrg    # Linking always hardcodes the temporary library directory.
1138191cded7Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1139191cded7Smrg  else
1140191cded7Smrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1141191cded7Smrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1142191cded7Smrg  fi
1143191cded7Smrgelse
1144191cded7Smrg  # We cannot hardcode anything, or else we can only hardcode existing
1145191cded7Smrg  # directories.
1146191cded7Smrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1147191cded7Smrgfi
1148191cded7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1149191cded7Smrg
1150191cded7Smrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1151191cded7Smrg  # Fast installation is not supported
1152191cded7Smrg  enable_fast_install=no
1153191cded7Smrgelif test "$shlibpath_overrides_runpath" = yes ||
1154191cded7Smrg     test "$enable_shared" = no; then
1155191cded7Smrg  # Fast installation is not necessary
1156191cded7Smrg  enable_fast_install=needless
1157191cded7Smrgfi
1158191cded7Smrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1159191cded7Smrg
1160191cded7Smrg
1161191cded7Smrg# AC_LIBTOOL_SYS_LIB_STRIP
1162191cded7Smrg# ------------------------
1163191cded7SmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1164191cded7Smrg[striplib=
1165191cded7Smrgold_striplib=
1166191cded7SmrgAC_MSG_CHECKING([whether stripping libraries is possible])
1167191cded7Smrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1168191cded7Smrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1169191cded7Smrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1170191cded7Smrg  AC_MSG_RESULT([yes])
1171191cded7Smrgelse
1172191cded7Smrg# FIXME - insert some real tests, host_os isn't really good enough
1173191cded7Smrg  case $host_os in
1174191cded7Smrg   darwin*)
1175191cded7Smrg       if test -n "$STRIP" ; then
1176191cded7Smrg         striplib="$STRIP -x"
1177191cded7Smrg         AC_MSG_RESULT([yes])
1178191cded7Smrg       else
1179191cded7Smrg  AC_MSG_RESULT([no])
1180191cded7Smrgfi
1181191cded7Smrg       ;;
1182191cded7Smrg   *)
1183191cded7Smrg  AC_MSG_RESULT([no])
1184191cded7Smrg    ;;
1185191cded7Smrg  esac
1186191cded7Smrgfi
1187191cded7Smrg])# AC_LIBTOOL_SYS_LIB_STRIP
1188191cded7Smrg
1189191cded7Smrg
1190191cded7Smrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1191191cded7Smrg# -----------------------------
1192191cded7Smrg# PORTME Fill in your ld.so characteristics
1193191cded7SmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1194191cded7Smrg[AC_MSG_CHECKING([dynamic linker characteristics])
1195191cded7Smrglibrary_names_spec=
1196191cded7Smrglibname_spec='lib$name'
1197191cded7Smrgsoname_spec=
1198191cded7Smrgshrext_cmds=".so"
1199191cded7Smrgpostinstall_cmds=
1200191cded7Smrgpostuninstall_cmds=
1201191cded7Smrgfinish_cmds=
1202191cded7Smrgfinish_eval=
1203191cded7Smrgshlibpath_var=
1204191cded7Smrgshlibpath_overrides_runpath=unknown
1205191cded7Smrgversion_type=none
1206191cded7Smrgdynamic_linker="$host_os ld.so"
1207191cded7Smrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
1208191cded7Smrgif test "$GCC" = yes; then
1209191cded7Smrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1210191cded7Smrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1211191cded7Smrg    # if the path contains ";" then we assume it to be the separator
1212191cded7Smrg    # otherwise default to the standard path separator (i.e. ":") - it is
1213191cded7Smrg    # assumed that no part of a normal pathname contains ";" but that should
1214191cded7Smrg    # okay in the real world where ";" in dirpaths is itself problematic.
1215191cded7Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1216191cded7Smrg  else
1217191cded7Smrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1218191cded7Smrg  fi
1219191cded7Smrgelse
1220191cded7Smrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1221191cded7Smrgfi
1222191cded7Smrgneed_lib_prefix=unknown
1223191cded7Smrghardcode_into_libs=no
1224191cded7Smrg
1225191cded7Smrg# when you set need_version to no, make sure it does not cause -set_version
1226191cded7Smrg# flags to be left without arguments
1227191cded7Smrgneed_version=unknown
1228191cded7Smrg
1229191cded7Smrgcase $host_os in
1230191cded7Smrgaix3*)
1231191cded7Smrg  version_type=linux
1232191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1233191cded7Smrg  shlibpath_var=LIBPATH
1234191cded7Smrg
1235191cded7Smrg  # AIX 3 has no versioning support, so we append a major version to the name.
1236191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1237191cded7Smrg  ;;
1238191cded7Smrg
1239191cded7Smrgaix4* | aix5*)
1240191cded7Smrg  version_type=linux
1241191cded7Smrg  need_lib_prefix=no
1242191cded7Smrg  need_version=no
1243191cded7Smrg  hardcode_into_libs=yes
1244191cded7Smrg  if test "$host_cpu" = ia64; then
1245191cded7Smrg    # AIX 5 supports IA64
1246191cded7Smrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1247191cded7Smrg    shlibpath_var=LD_LIBRARY_PATH
1248191cded7Smrg  else
1249191cded7Smrg    # With GCC up to 2.95.x, collect2 would create an import file
1250191cded7Smrg    # for dependence libraries.  The import file would start with
1251191cded7Smrg    # the line `#! .'.  This would cause the generated library to
1252191cded7Smrg    # depend on `.', always an invalid library.  This was fixed in
1253191cded7Smrg    # development snapshots of GCC prior to 3.0.
1254191cded7Smrg    case $host_os in
1255191cded7Smrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
1256191cded7Smrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1257191cded7Smrg	   echo ' yes '
1258191cded7Smrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1259191cded7Smrg	:
1260191cded7Smrg      else
1261191cded7Smrg	can_build_shared=no
1262191cded7Smrg      fi
1263191cded7Smrg      ;;
1264191cded7Smrg    esac
1265191cded7Smrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1266191cded7Smrg    # soname into executable. Probably we can add versioning support to
1267191cded7Smrg    # collect2, so additional links can be useful in future.
1268191cded7Smrg    if test "$aix_use_runtimelinking" = yes; then
1269191cded7Smrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1270191cded7Smrg      # instead of lib<name>.a to let people know that these are not
1271191cded7Smrg      # typical AIX shared libraries.
1272191cded7Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1273191cded7Smrg    else
1274191cded7Smrg      # We preserve .a as extension for shared libraries through AIX4.2
1275191cded7Smrg      # and later when we are not doing run time linking.
1276191cded7Smrg      library_names_spec='${libname}${release}.a $libname.a'
1277191cded7Smrg      soname_spec='${libname}${release}${shared_ext}$major'
1278191cded7Smrg    fi
1279191cded7Smrg    shlibpath_var=LIBPATH
1280191cded7Smrg  fi
1281191cded7Smrg  ;;
1282191cded7Smrg
1283191cded7Smrgamigaos*)
1284191cded7Smrg  library_names_spec='$libname.ixlibrary $libname.a'
1285191cded7Smrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1286191cded7Smrg  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'
1287191cded7Smrg  ;;
1288191cded7Smrg
1289191cded7Smrgbeos*)
1290191cded7Smrg  library_names_spec='${libname}${shared_ext}'
1291191cded7Smrg  dynamic_linker="$host_os ld.so"
1292191cded7Smrg  shlibpath_var=LIBRARY_PATH
1293191cded7Smrg  ;;
1294191cded7Smrg
1295191cded7Smrgbsdi[[45]]*)
1296191cded7Smrg  version_type=linux
1297191cded7Smrg  need_version=no
1298191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1299191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1300191cded7Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1301191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1302191cded7Smrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1303191cded7Smrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1304191cded7Smrg  # the default ld.so.conf also contains /usr/contrib/lib and
1305191cded7Smrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1306191cded7Smrg  # libtool to hard-code these into programs
1307191cded7Smrg  ;;
1308191cded7Smrg
1309191cded7Smrgcygwin* | mingw* | pw32*)
1310191cded7Smrg  version_type=windows
1311191cded7Smrg  shrext_cmds=".dll"
1312191cded7Smrg  need_version=no
1313191cded7Smrg  need_lib_prefix=no
1314191cded7Smrg
1315191cded7Smrg  case $GCC,$host_os in
1316191cded7Smrg  yes,cygwin* | yes,mingw* | yes,pw32*)
1317191cded7Smrg    library_names_spec='$libname.dll.a'
1318191cded7Smrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1319191cded7Smrg    postinstall_cmds='base_file=`basename \${file}`~
1320191cded7Smrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1321191cded7Smrg      dldir=$destdir/`dirname \$dlpath`~
1322191cded7Smrg      test -d \$dldir || mkdir -p \$dldir~
1323191cded7Smrg      $install_prog $dir/$dlname \$dldir/$dlname~
1324191cded7Smrg      chmod a+x \$dldir/$dlname'
1325191cded7Smrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1326191cded7Smrg      dlpath=$dir/\$dldll~
1327191cded7Smrg       $rm \$dlpath'
1328191cded7Smrg    shlibpath_overrides_runpath=yes
1329191cded7Smrg
1330191cded7Smrg    case $host_os in
1331191cded7Smrg    cygwin*)
1332191cded7Smrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1333191cded7Smrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1334191cded7Smrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1335191cded7Smrg      ;;
1336191cded7Smrg    mingw*)
1337191cded7Smrg      # MinGW DLLs use traditional 'lib' prefix
1338191cded7Smrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1339191cded7Smrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1340191cded7Smrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1341191cded7Smrg        # It is most probably a Windows format PATH printed by
1342191cded7Smrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1343191cded7Smrg        # path with ; separators, and with drive letters. We can handle the
1344191cded7Smrg        # drive letters (cygwin fileutils understands them), so leave them,
1345191cded7Smrg        # especially as we might pass files found there to a mingw objdump,
1346191cded7Smrg        # which wouldn't understand a cygwinified path. Ahh.
1347191cded7Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1348191cded7Smrg      else
1349191cded7Smrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1350191cded7Smrg      fi
1351191cded7Smrg      ;;
1352191cded7Smrg    pw32*)
1353191cded7Smrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
1354191cded7Smrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1355191cded7Smrg      ;;
1356191cded7Smrg    esac
1357191cded7Smrg    ;;
1358191cded7Smrg
1359191cded7Smrg  *)
1360191cded7Smrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1361191cded7Smrg    ;;
1362191cded7Smrg  esac
1363191cded7Smrg  dynamic_linker='Win32 ld.exe'
1364191cded7Smrg  # FIXME: first we should search . and the directory the executable is in
1365191cded7Smrg  shlibpath_var=PATH
1366191cded7Smrg  ;;
1367191cded7Smrg
1368191cded7Smrgdarwin* | rhapsody*)
1369191cded7Smrg  dynamic_linker="$host_os dyld"
1370191cded7Smrg  version_type=darwin
1371191cded7Smrg  need_lib_prefix=no
1372191cded7Smrg  need_version=no
1373191cded7Smrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1374191cded7Smrg  soname_spec='${libname}${release}${major}$shared_ext'
1375191cded7Smrg  shlibpath_overrides_runpath=yes
1376191cded7Smrg  shlibpath_var=DYLD_LIBRARY_PATH
1377191cded7Smrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1378191cded7Smrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1379191cded7Smrg  if test "$GCC" = yes; then
1380191cded7Smrg    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"`
1381191cded7Smrg  else
1382191cded7Smrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1383191cded7Smrg  fi
1384191cded7Smrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1385191cded7Smrg  ;;
1386191cded7Smrg
1387191cded7Smrgdgux*)
1388191cded7Smrg  version_type=linux
1389191cded7Smrg  need_lib_prefix=no
1390191cded7Smrg  need_version=no
1391191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1392191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1393191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1394191cded7Smrg  ;;
1395191cded7Smrg
1396191cded7Smrgfreebsd1*)
1397191cded7Smrg  dynamic_linker=no
1398191cded7Smrg  ;;
1399191cded7Smrg
1400191cded7Smrgkfreebsd*-gnu)
1401191cded7Smrg  version_type=linux
1402191cded7Smrg  need_lib_prefix=no
1403191cded7Smrg  need_version=no
1404191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1405191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1406191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1407191cded7Smrg  shlibpath_overrides_runpath=no
1408191cded7Smrg  hardcode_into_libs=yes
1409191cded7Smrg  dynamic_linker='GNU ld.so'
1410191cded7Smrg  ;;
1411191cded7Smrg
1412191cded7Smrgfreebsd* | dragonfly*)
1413191cded7Smrg  # DragonFly does not have aout.  When/if they implement a new
1414191cded7Smrg  # versioning mechanism, adjust this.
1415191cded7Smrg  if test -x /usr/bin/objformat; then
1416191cded7Smrg    objformat=`/usr/bin/objformat`
1417191cded7Smrg  else
1418191cded7Smrg    case $host_os in
1419191cded7Smrg    freebsd[[123]]*) objformat=aout ;;
1420191cded7Smrg    *) objformat=elf ;;
1421191cded7Smrg    esac
1422191cded7Smrg  fi
1423191cded7Smrg  version_type=freebsd-$objformat
1424191cded7Smrg  case $version_type in
1425191cded7Smrg    freebsd-elf*)
1426191cded7Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1427191cded7Smrg      need_version=no
1428191cded7Smrg      need_lib_prefix=no
1429191cded7Smrg      ;;
1430191cded7Smrg    freebsd-*)
1431191cded7Smrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1432191cded7Smrg      need_version=yes
1433191cded7Smrg      ;;
1434191cded7Smrg  esac
1435191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1436191cded7Smrg  case $host_os in
1437191cded7Smrg  freebsd2*)
1438191cded7Smrg    shlibpath_overrides_runpath=yes
1439191cded7Smrg    ;;
1440191cded7Smrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1441191cded7Smrg    shlibpath_overrides_runpath=yes
1442191cded7Smrg    hardcode_into_libs=yes
1443191cded7Smrg    ;;
1444191cded7Smrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1445191cded7Smrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1446191cded7Smrg    shlibpath_overrides_runpath=no
1447191cded7Smrg    hardcode_into_libs=yes
1448191cded7Smrg    ;;
1449191cded7Smrg  freebsd*) # from 4.6 on
1450191cded7Smrg    shlibpath_overrides_runpath=yes
1451191cded7Smrg    hardcode_into_libs=yes
1452191cded7Smrg    ;;
1453191cded7Smrg  esac
1454191cded7Smrg  ;;
1455191cded7Smrg
1456191cded7Smrggnu*)
1457191cded7Smrg  version_type=linux
1458191cded7Smrg  need_lib_prefix=no
1459191cded7Smrg  need_version=no
1460191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1461191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1462191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1463191cded7Smrg  hardcode_into_libs=yes
1464191cded7Smrg  ;;
1465191cded7Smrg
1466191cded7Smrghpux9* | hpux10* | hpux11*)
1467191cded7Smrg  # Give a soname corresponding to the major version so that dld.sl refuses to
1468191cded7Smrg  # link against other versions.
1469191cded7Smrg  version_type=sunos
1470191cded7Smrg  need_lib_prefix=no
1471191cded7Smrg  need_version=no
1472191cded7Smrg  case $host_cpu in
1473191cded7Smrg  ia64*)
1474191cded7Smrg    shrext_cmds='.so'
1475191cded7Smrg    hardcode_into_libs=yes
1476191cded7Smrg    dynamic_linker="$host_os dld.so"
1477191cded7Smrg    shlibpath_var=LD_LIBRARY_PATH
1478191cded7Smrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1479191cded7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1480191cded7Smrg    soname_spec='${libname}${release}${shared_ext}$major'
1481191cded7Smrg    if test "X$HPUX_IA64_MODE" = X32; then
1482191cded7Smrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1483191cded7Smrg    else
1484191cded7Smrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1485191cded7Smrg    fi
1486191cded7Smrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1487191cded7Smrg    ;;
1488191cded7Smrg   hppa*64*)
1489191cded7Smrg     shrext_cmds='.sl'
1490191cded7Smrg     hardcode_into_libs=yes
1491191cded7Smrg     dynamic_linker="$host_os dld.sl"
1492191cded7Smrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1493191cded7Smrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1494191cded7Smrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1495191cded7Smrg     soname_spec='${libname}${release}${shared_ext}$major'
1496191cded7Smrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1497191cded7Smrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1498191cded7Smrg     ;;
1499191cded7Smrg   *)
1500191cded7Smrg    shrext_cmds='.sl'
1501191cded7Smrg    dynamic_linker="$host_os dld.sl"
1502191cded7Smrg    shlibpath_var=SHLIB_PATH
1503191cded7Smrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1504191cded7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1505191cded7Smrg    soname_spec='${libname}${release}${shared_ext}$major'
1506191cded7Smrg    ;;
1507191cded7Smrg  esac
1508191cded7Smrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1509191cded7Smrg  postinstall_cmds='chmod 555 $lib'
1510191cded7Smrg  ;;
1511191cded7Smrg
1512191cded7Smrginterix3*)
1513191cded7Smrg  version_type=linux
1514191cded7Smrg  need_lib_prefix=no
1515191cded7Smrg  need_version=no
1516191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1517191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1518191cded7Smrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1519191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1520191cded7Smrg  shlibpath_overrides_runpath=no
1521191cded7Smrg  hardcode_into_libs=yes
1522191cded7Smrg  ;;
1523191cded7Smrg
1524191cded7Smrgirix5* | irix6* | nonstopux*)
1525191cded7Smrg  case $host_os in
1526191cded7Smrg    nonstopux*) version_type=nonstopux ;;
1527191cded7Smrg    *)
1528191cded7Smrg	if test "$lt_cv_prog_gnu_ld" = yes; then
1529191cded7Smrg		version_type=linux
1530191cded7Smrg	else
1531191cded7Smrg		version_type=irix
1532191cded7Smrg	fi ;;
1533191cded7Smrg  esac
1534191cded7Smrg  need_lib_prefix=no
1535191cded7Smrg  need_version=no
1536191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1537191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1538191cded7Smrg  case $host_os in
1539191cded7Smrg  irix5* | nonstopux*)
1540191cded7Smrg    libsuff= shlibsuff=
1541191cded7Smrg    ;;
1542191cded7Smrg  *)
1543191cded7Smrg    case $LD in # libtool.m4 will add one of these switches to LD
1544191cded7Smrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1545191cded7Smrg      libsuff= shlibsuff= libmagic=32-bit;;
1546191cded7Smrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1547191cded7Smrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
1548191cded7Smrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1549191cded7Smrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1550191cded7Smrg    *) libsuff= shlibsuff= libmagic=never-match;;
1551191cded7Smrg    esac
1552191cded7Smrg    ;;
1553191cded7Smrg  esac
1554191cded7Smrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1555191cded7Smrg  shlibpath_overrides_runpath=no
1556191cded7Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1557191cded7Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1558191cded7Smrg  hardcode_into_libs=yes
1559191cded7Smrg  ;;
1560191cded7Smrg
1561191cded7Smrg# No shared lib support for Linux oldld, aout, or coff.
1562191cded7Smrglinux*oldld* | linux*aout* | linux*coff*)
1563191cded7Smrg  dynamic_linker=no
1564191cded7Smrg  ;;
1565191cded7Smrg
1566191cded7Smrg# This must be Linux ELF.
1567191cded7Smrglinux*)
1568191cded7Smrg  version_type=linux
1569191cded7Smrg  need_lib_prefix=no
1570191cded7Smrg  need_version=no
1571191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1572191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1573191cded7Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1574191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1575191cded7Smrg  shlibpath_overrides_runpath=no
1576191cded7Smrg  # This implies no fast_install, which is unacceptable.
1577191cded7Smrg  # Some rework will be needed to allow for fast_install
1578191cded7Smrg  # before this can be enabled.
1579191cded7Smrg  hardcode_into_libs=yes
1580191cded7Smrg
1581191cded7Smrg  # find out which ABI we are using
1582191cded7Smrg  libsuff=
1583191cded7Smrg  case "$host_cpu" in
1584191cded7Smrg  x86_64*|s390x*|powerpc64*)
1585191cded7Smrg    echo '[#]line __oline__ "configure"' > conftest.$ac_ext
1586191cded7Smrg    if AC_TRY_EVAL(ac_compile); then
1587191cded7Smrg      case `/usr/bin/file conftest.$ac_objext` in
1588191cded7Smrg      *64-bit*)
1589191cded7Smrg        libsuff=64
1590191cded7Smrg        sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}"
1591191cded7Smrg        ;;
1592191cded7Smrg      esac
1593191cded7Smrg    fi
1594191cded7Smrg    rm -rf conftest*
1595191cded7Smrg    ;;
1596191cded7Smrg  esac
1597191cded7Smrg
1598191cded7Smrg  # Append ld.so.conf contents to the search path
1599191cded7Smrg  if test -f /etc/ld.so.conf; then
1600191cded7Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1601191cded7Smrg    sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_ld_extra"
1602191cded7Smrg  fi
1603191cded7Smrg
1604191cded7Smrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
1605191cded7Smrg  # powerpc, because MkLinux only supported shared libraries with the
1606191cded7Smrg  # GNU dynamic linker.  Since this was broken with cross compilers,
1607191cded7Smrg  # most powerpc-linux boxes support dynamic linking these days and
1608191cded7Smrg  # people can always --disable-shared, the test was removed, and we
1609191cded7Smrg  # assume the GNU/Linux dynamic linker is in use.
1610191cded7Smrg  dynamic_linker='GNU/Linux ld.so'
1611191cded7Smrg  ;;
1612191cded7Smrg
1613191cded7Smrgknetbsd*-gnu)
1614191cded7Smrg  version_type=linux
1615191cded7Smrg  need_lib_prefix=no
1616191cded7Smrg  need_version=no
1617191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1618191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1619191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1620191cded7Smrg  shlibpath_overrides_runpath=no
1621191cded7Smrg  hardcode_into_libs=yes
1622191cded7Smrg  dynamic_linker='GNU ld.so'
1623191cded7Smrg  ;;
1624191cded7Smrg
1625191cded7Smrgnetbsd*)
1626191cded7Smrg  version_type=sunos
1627191cded7Smrg  need_lib_prefix=no
1628191cded7Smrg  need_version=no
1629191cded7Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1630191cded7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1631191cded7Smrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1632191cded7Smrg    dynamic_linker='NetBSD (a.out) ld.so'
1633191cded7Smrg  else
1634191cded7Smrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1635191cded7Smrg    soname_spec='${libname}${release}${shared_ext}$major'
1636191cded7Smrg    dynamic_linker='NetBSD ld.elf_so'
1637191cded7Smrg  fi
1638191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1639191cded7Smrg  shlibpath_overrides_runpath=yes
1640191cded7Smrg  hardcode_into_libs=yes
1641191cded7Smrg  ;;
1642191cded7Smrg
1643191cded7Smrgnewsos6)
1644191cded7Smrg  version_type=linux
1645191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1646191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1647191cded7Smrg  shlibpath_overrides_runpath=yes
1648191cded7Smrg  ;;
1649191cded7Smrg
1650191cded7Smrgnto-qnx*)
1651191cded7Smrg  version_type=linux
1652191cded7Smrg  need_lib_prefix=no
1653191cded7Smrg  need_version=no
1654191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1655191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1656191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1657191cded7Smrg  shlibpath_overrides_runpath=yes
1658191cded7Smrg  ;;
1659191cded7Smrg
1660191cded7Smrgopenbsd*)
1661191cded7Smrg  version_type=sunos
1662191cded7Smrg  sys_lib_dlsearch_path_spec="/usr/lib"
1663191cded7Smrg  need_lib_prefix=no
1664191cded7Smrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1665191cded7Smrg  case $host_os in
1666191cded7Smrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1667191cded7Smrg    *)                         need_version=no  ;;
1668191cded7Smrg  esac
1669191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1670191cded7Smrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1671191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1672191cded7Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1673191cded7Smrg    case $host_os in
1674191cded7Smrg      openbsd2.[[89]] | openbsd2.[[89]].*)
1675191cded7Smrg	shlibpath_overrides_runpath=no
1676191cded7Smrg	;;
1677191cded7Smrg      *)
1678191cded7Smrg	shlibpath_overrides_runpath=yes
1679191cded7Smrg	;;
1680191cded7Smrg      esac
1681191cded7Smrg  else
1682191cded7Smrg    shlibpath_overrides_runpath=yes
1683191cded7Smrg  fi
1684191cded7Smrg  ;;
1685191cded7Smrg
1686191cded7Smrgos2*)
1687191cded7Smrg  libname_spec='$name'
1688191cded7Smrg  shrext_cmds=".dll"
1689191cded7Smrg  need_lib_prefix=no
1690191cded7Smrg  library_names_spec='$libname${shared_ext} $libname.a'
1691191cded7Smrg  dynamic_linker='OS/2 ld.exe'
1692191cded7Smrg  shlibpath_var=LIBPATH
1693191cded7Smrg  ;;
1694191cded7Smrg
1695191cded7Smrgosf3* | osf4* | osf5*)
1696191cded7Smrg  version_type=osf
1697191cded7Smrg  need_lib_prefix=no
1698191cded7Smrg  need_version=no
1699191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1700191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1701191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1702191cded7Smrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1703191cded7Smrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1704191cded7Smrg  ;;
1705191cded7Smrg
1706191cded7Smrgsolaris*)
1707191cded7Smrg  version_type=linux
1708191cded7Smrg  need_lib_prefix=no
1709191cded7Smrg  need_version=no
1710191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1711191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1712191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1713191cded7Smrg  shlibpath_overrides_runpath=yes
1714191cded7Smrg  hardcode_into_libs=yes
1715191cded7Smrg  # ldd complains unless libraries are executable
1716191cded7Smrg  postinstall_cmds='chmod +x $lib'
1717191cded7Smrg  ;;
1718191cded7Smrg
1719191cded7Smrgsunos4*)
1720191cded7Smrg  version_type=sunos
1721191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1722191cded7Smrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1723191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1724191cded7Smrg  shlibpath_overrides_runpath=yes
1725191cded7Smrg  if test "$with_gnu_ld" = yes; then
1726191cded7Smrg    need_lib_prefix=no
1727191cded7Smrg  fi
1728191cded7Smrg  need_version=yes
1729191cded7Smrg  ;;
1730191cded7Smrg
1731191cded7Smrgsysv4 | sysv4.3*)
1732191cded7Smrg  version_type=linux
1733191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1734191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1735191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1736191cded7Smrg  case $host_vendor in
1737191cded7Smrg    sni)
1738191cded7Smrg      shlibpath_overrides_runpath=no
1739191cded7Smrg      need_lib_prefix=no
1740191cded7Smrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
1741191cded7Smrg      runpath_var=LD_RUN_PATH
1742191cded7Smrg      ;;
1743191cded7Smrg    siemens)
1744191cded7Smrg      need_lib_prefix=no
1745191cded7Smrg      ;;
1746191cded7Smrg    motorola)
1747191cded7Smrg      need_lib_prefix=no
1748191cded7Smrg      need_version=no
1749191cded7Smrg      shlibpath_overrides_runpath=no
1750191cded7Smrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1751191cded7Smrg      ;;
1752191cded7Smrg  esac
1753191cded7Smrg  ;;
1754191cded7Smrg
1755191cded7Smrgsysv4*MP*)
1756191cded7Smrg  if test -d /usr/nec ;then
1757191cded7Smrg    version_type=linux
1758191cded7Smrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1759191cded7Smrg    soname_spec='$libname${shared_ext}.$major'
1760191cded7Smrg    shlibpath_var=LD_LIBRARY_PATH
1761191cded7Smrg  fi
1762191cded7Smrg  ;;
1763191cded7Smrg
1764191cded7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1765191cded7Smrg  version_type=freebsd-elf
1766191cded7Smrg  need_lib_prefix=no
1767191cded7Smrg  need_version=no
1768191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1769191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1770191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1771191cded7Smrg  hardcode_into_libs=yes
1772191cded7Smrg  if test "$with_gnu_ld" = yes; then
1773191cded7Smrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1774191cded7Smrg    shlibpath_overrides_runpath=no
1775191cded7Smrg  else
1776191cded7Smrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1777191cded7Smrg    shlibpath_overrides_runpath=yes
1778191cded7Smrg    case $host_os in
1779191cded7Smrg      sco3.2v5*)
1780191cded7Smrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1781191cded7Smrg	;;
1782191cded7Smrg    esac
1783191cded7Smrg  fi
1784191cded7Smrg  sys_lib_dlsearch_path_spec='/usr/lib'
1785191cded7Smrg  ;;
1786191cded7Smrg
1787191cded7Smrguts4*)
1788191cded7Smrg  version_type=linux
1789191cded7Smrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1790191cded7Smrg  soname_spec='${libname}${release}${shared_ext}$major'
1791191cded7Smrg  shlibpath_var=LD_LIBRARY_PATH
1792191cded7Smrg  ;;
1793191cded7Smrg
1794191cded7Smrg*)
1795191cded7Smrg  dynamic_linker=no
1796191cded7Smrg  ;;
1797191cded7Smrgesac
1798191cded7SmrgAC_MSG_RESULT([$dynamic_linker])
1799191cded7Smrgtest "$dynamic_linker" = no && can_build_shared=no
1800191cded7Smrg
1801191cded7Smrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1802191cded7Smrgif test "$GCC" = yes; then
1803191cded7Smrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1804191cded7Smrgfi
1805191cded7Smrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1806191cded7Smrg
1807191cded7Smrg
1808191cded7Smrg# _LT_AC_TAGCONFIG
1809191cded7Smrg# ----------------
1810191cded7SmrgAC_DEFUN([_LT_AC_TAGCONFIG],
1811191cded7Smrg[AC_ARG_WITH([tags],
1812191cded7Smrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1813191cded7Smrg        [include additional configurations @<:@automatic@:>@])],
1814191cded7Smrg    [tagnames="$withval"])
1815191cded7Smrg
1816191cded7Smrgif test -f "$ltmain" && test -n "$tagnames"; then
1817191cded7Smrg  if test ! -f "${ofile}"; then
1818191cded7Smrg    AC_MSG_WARN([output file `$ofile' does not exist])
1819191cded7Smrg  fi
1820191cded7Smrg
1821191cded7Smrg  if test -z "$LTCC"; then
1822191cded7Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1823191cded7Smrg    if test -z "$LTCC"; then
1824191cded7Smrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1825191cded7Smrg    else
1826191cded7Smrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1827191cded7Smrg    fi
1828191cded7Smrg  fi
1829191cded7Smrg  if test -z "$LTCFLAGS"; then
1830191cded7Smrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1831191cded7Smrg  fi
1832191cded7Smrg
1833191cded7Smrg  # Extract list of available tagged configurations in $ofile.
1834191cded7Smrg  # Note that this assumes the entire list is on one line.
1835191cded7Smrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1836191cded7Smrg
1837191cded7Smrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1838191cded7Smrg  for tagname in $tagnames; do
1839191cded7Smrg    IFS="$lt_save_ifs"
1840191cded7Smrg    # Check whether tagname contains only valid characters
1841191cded7Smrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1842191cded7Smrg    "") ;;
1843191cded7Smrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1844191cded7Smrg	;;
1845191cded7Smrg    esac
1846191cded7Smrg
1847191cded7Smrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1848191cded7Smrg    then
1849191cded7Smrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1850191cded7Smrg    fi
1851191cded7Smrg
1852191cded7Smrg    # Update the list of available tags.
1853191cded7Smrg    if test -n "$tagname"; then
1854191cded7Smrg      echo appending configuration tag \"$tagname\" to $ofile
1855191cded7Smrg
1856191cded7Smrg      case $tagname in
1857191cded7Smrg      CXX)
1858191cded7Smrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1859191cded7Smrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1860191cded7Smrg	    (test "X$CXX" != "Xg++"))) ; then
1861191cded7Smrg	  AC_LIBTOOL_LANG_CXX_CONFIG
1862191cded7Smrg	else
1863191cded7Smrg	  tagname=""
1864191cded7Smrg	fi
1865191cded7Smrg	;;
1866191cded7Smrg
1867191cded7Smrg      F77)
1868191cded7Smrg	if test -n "$F77" && test "X$F77" != "Xno"; then
1869191cded7Smrg	  AC_LIBTOOL_LANG_F77_CONFIG
1870191cded7Smrg	else
1871191cded7Smrg	  tagname=""
1872191cded7Smrg	fi
1873191cded7Smrg	;;
1874191cded7Smrg
1875191cded7Smrg      GCJ)
1876191cded7Smrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1877191cded7Smrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
1878191cded7Smrg	else
1879191cded7Smrg	  tagname=""
1880191cded7Smrg	fi
1881191cded7Smrg	;;
1882191cded7Smrg
1883191cded7Smrg      RC)
1884191cded7Smrg	AC_LIBTOOL_LANG_RC_CONFIG
1885191cded7Smrg	;;
1886191cded7Smrg
1887191cded7Smrg      *)
1888191cded7Smrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
1889191cded7Smrg	;;
1890191cded7Smrg      esac
1891191cded7Smrg
1892191cded7Smrg      # Append the new tag name to the list of available tags.
1893191cded7Smrg      if test -n "$tagname" ; then
1894191cded7Smrg      available_tags="$available_tags $tagname"
1895191cded7Smrg    fi
1896191cded7Smrg    fi
1897191cded7Smrg  done
1898191cded7Smrg  IFS="$lt_save_ifs"
1899191cded7Smrg
1900191cded7Smrg  # Now substitute the updated list of available tags.
1901191cded7Smrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1902191cded7Smrg    mv "${ofile}T" "$ofile"
1903191cded7Smrg    chmod +x "$ofile"
1904191cded7Smrg  else
1905191cded7Smrg    rm -f "${ofile}T"
1906191cded7Smrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1907191cded7Smrg  fi
1908191cded7Smrgfi
1909191cded7Smrg])# _LT_AC_TAGCONFIG
1910191cded7Smrg
1911191cded7Smrg
1912191cded7Smrg# AC_LIBTOOL_DLOPEN
1913191cded7Smrg# -----------------
1914191cded7Smrg# enable checks for dlopen support
1915191cded7SmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
1916191cded7Smrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1917191cded7Smrg])# AC_LIBTOOL_DLOPEN
1918191cded7Smrg
1919191cded7Smrg
1920191cded7Smrg# AC_LIBTOOL_WIN32_DLL
1921191cded7Smrg# --------------------
1922191cded7Smrg# declare package support for building win32 DLLs
1923191cded7SmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1924191cded7Smrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1925191cded7Smrg])# AC_LIBTOOL_WIN32_DLL
1926191cded7Smrg
1927191cded7Smrg
1928191cded7Smrg# AC_ENABLE_SHARED([DEFAULT])
1929191cded7Smrg# ---------------------------
1930191cded7Smrg# implement the --enable-shared flag
1931191cded7Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1932191cded7SmrgAC_DEFUN([AC_ENABLE_SHARED],
1933191cded7Smrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1934191cded7SmrgAC_ARG_ENABLE([shared],
1935191cded7Smrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1936191cded7Smrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1937191cded7Smrg    [p=${PACKAGE-default}
1938191cded7Smrg    case $enableval in
1939191cded7Smrg    yes) enable_shared=yes ;;
1940191cded7Smrg    no) enable_shared=no ;;
1941191cded7Smrg    *)
1942191cded7Smrg      enable_shared=no
1943191cded7Smrg      # Look at the argument we got.  We use all the common list separators.
1944191cded7Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1945191cded7Smrg      for pkg in $enableval; do
1946191cded7Smrg	IFS="$lt_save_ifs"
1947191cded7Smrg	if test "X$pkg" = "X$p"; then
1948191cded7Smrg	  enable_shared=yes
1949191cded7Smrg	fi
1950191cded7Smrg      done
1951191cded7Smrg      IFS="$lt_save_ifs"
1952191cded7Smrg      ;;
1953191cded7Smrg    esac],
1954191cded7Smrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1955191cded7Smrg])# AC_ENABLE_SHARED
1956191cded7Smrg
1957191cded7Smrg
1958191cded7Smrg# AC_DISABLE_SHARED
1959191cded7Smrg# -----------------
1960191cded7Smrg# set the default shared flag to --disable-shared
1961191cded7SmrgAC_DEFUN([AC_DISABLE_SHARED],
1962191cded7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1963191cded7SmrgAC_ENABLE_SHARED(no)
1964191cded7Smrg])# AC_DISABLE_SHARED
1965191cded7Smrg
1966191cded7Smrg
1967191cded7Smrg# AC_ENABLE_STATIC([DEFAULT])
1968191cded7Smrg# ---------------------------
1969191cded7Smrg# implement the --enable-static flag
1970191cded7Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1971191cded7SmrgAC_DEFUN([AC_ENABLE_STATIC],
1972191cded7Smrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1973191cded7SmrgAC_ARG_ENABLE([static],
1974191cded7Smrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1975191cded7Smrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1976191cded7Smrg    [p=${PACKAGE-default}
1977191cded7Smrg    case $enableval in
1978191cded7Smrg    yes) enable_static=yes ;;
1979191cded7Smrg    no) enable_static=no ;;
1980191cded7Smrg    *)
1981191cded7Smrg     enable_static=no
1982191cded7Smrg      # Look at the argument we got.  We use all the common list separators.
1983191cded7Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1984191cded7Smrg      for pkg in $enableval; do
1985191cded7Smrg	IFS="$lt_save_ifs"
1986191cded7Smrg	if test "X$pkg" = "X$p"; then
1987191cded7Smrg	  enable_static=yes
1988191cded7Smrg	fi
1989191cded7Smrg      done
1990191cded7Smrg      IFS="$lt_save_ifs"
1991191cded7Smrg      ;;
1992191cded7Smrg    esac],
1993191cded7Smrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1994191cded7Smrg])# AC_ENABLE_STATIC
1995191cded7Smrg
1996191cded7Smrg
1997191cded7Smrg# AC_DISABLE_STATIC
1998191cded7Smrg# -----------------
1999191cded7Smrg# set the default static flag to --disable-static
2000191cded7SmrgAC_DEFUN([AC_DISABLE_STATIC],
2001191cded7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2002191cded7SmrgAC_ENABLE_STATIC(no)
2003191cded7Smrg])# AC_DISABLE_STATIC
2004191cded7Smrg
2005191cded7Smrg
2006191cded7Smrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
2007191cded7Smrg# ---------------------------------
2008191cded7Smrg# implement the --enable-fast-install flag
2009191cded7Smrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2010191cded7SmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
2011191cded7Smrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2012191cded7SmrgAC_ARG_ENABLE([fast-install],
2013191cded7Smrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2014191cded7Smrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2015191cded7Smrg    [p=${PACKAGE-default}
2016191cded7Smrg    case $enableval in
2017191cded7Smrg    yes) enable_fast_install=yes ;;
2018191cded7Smrg    no) enable_fast_install=no ;;
2019191cded7Smrg    *)
2020191cded7Smrg      enable_fast_install=no
2021191cded7Smrg      # Look at the argument we got.  We use all the common list separators.
2022191cded7Smrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2023191cded7Smrg      for pkg in $enableval; do
2024191cded7Smrg	IFS="$lt_save_ifs"
2025191cded7Smrg	if test "X$pkg" = "X$p"; then
2026191cded7Smrg	  enable_fast_install=yes
2027191cded7Smrg	fi
2028191cded7Smrg      done
2029191cded7Smrg      IFS="$lt_save_ifs"
2030191cded7Smrg      ;;
2031191cded7Smrg    esac],
2032191cded7Smrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2033191cded7Smrg])# AC_ENABLE_FAST_INSTALL
2034191cded7Smrg
2035191cded7Smrg
2036191cded7Smrg# AC_DISABLE_FAST_INSTALL
2037191cded7Smrg# -----------------------
2038191cded7Smrg# set the default to --disable-fast-install
2039191cded7SmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2040191cded7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2041191cded7SmrgAC_ENABLE_FAST_INSTALL(no)
2042191cded7Smrg])# AC_DISABLE_FAST_INSTALL
2043191cded7Smrg
2044191cded7Smrg
2045191cded7Smrg# AC_LIBTOOL_PICMODE([MODE])
2046191cded7Smrg# --------------------------
2047191cded7Smrg# implement the --with-pic flag
2048191cded7Smrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2049191cded7SmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
2050191cded7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2051191cded7Smrgpic_mode=ifelse($#,1,$1,default)
2052191cded7Smrg])# AC_LIBTOOL_PICMODE
2053191cded7Smrg
2054191cded7Smrg
2055191cded7Smrg# AC_PROG_EGREP
2056191cded7Smrg# -------------
2057191cded7Smrg# This is predefined starting with Autoconf 2.54, so this conditional
2058191cded7Smrg# definition can be removed once we require Autoconf 2.54 or later.
2059191cded7Smrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2060191cded7Smrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2061191cded7Smrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2062191cded7Smrg    then ac_cv_prog_egrep='grep -E'
2063191cded7Smrg    else ac_cv_prog_egrep='egrep'
2064191cded7Smrg    fi])
2065191cded7Smrg EGREP=$ac_cv_prog_egrep
2066191cded7Smrg AC_SUBST([EGREP])
2067191cded7Smrg])])
2068191cded7Smrg
2069191cded7Smrg
2070191cded7Smrg# AC_PATH_TOOL_PREFIX
2071191cded7Smrg# -------------------
2072191cded7Smrg# find a file program which can recognise shared library
2073191cded7SmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
2074191cded7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2075191cded7SmrgAC_MSG_CHECKING([for $1])
2076191cded7SmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2077191cded7Smrg[case $MAGIC_CMD in
2078191cded7Smrg[[\\/*] |  ?:[\\/]*])
2079191cded7Smrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2080191cded7Smrg  ;;
2081191cded7Smrg*)
2082191cded7Smrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2083191cded7Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2084191cded7Smrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2085191cded7Smrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2086191cded7Smrgdnl not every word.  This closes a longstanding sh security hole.
2087191cded7Smrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
2088191cded7Smrg  for ac_dir in $ac_dummy; do
2089191cded7Smrg    IFS="$lt_save_ifs"
2090191cded7Smrg    test -z "$ac_dir" && ac_dir=.
2091191cded7Smrg    if test -f $ac_dir/$1; then
2092191cded7Smrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2093191cded7Smrg      if test -n "$file_magic_test_file"; then
2094191cded7Smrg	case $deplibs_check_method in
2095191cded7Smrg	"file_magic "*)
2096191cded7Smrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2097191cded7Smrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2098191cded7Smrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2099191cded7Smrg	    $EGREP "$file_magic_regex" > /dev/null; then
2100191cded7Smrg	    :
2101191cded7Smrg	  else
2102191cded7Smrg	    cat <<EOF 1>&2
2103191cded7Smrg
2104191cded7Smrg*** Warning: the command libtool uses to detect shared libraries,
2105191cded7Smrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2106191cded7Smrg*** The result is that libtool may fail to recognize shared libraries
2107191cded7Smrg*** as such.  This will affect the creation of libtool libraries that
2108191cded7Smrg*** depend on shared libraries, but programs linked with such libtool
2109191cded7Smrg*** libraries will work regardless of this problem.  Nevertheless, you
2110191cded7Smrg*** may want to report the problem to your system manager and/or to
2111191cded7Smrg*** bug-libtool@gnu.org
2112191cded7Smrg
2113191cded7SmrgEOF
2114191cded7Smrg	  fi ;;
2115191cded7Smrg	esac
2116191cded7Smrg      fi
2117191cded7Smrg      break
2118191cded7Smrg    fi
2119191cded7Smrg  done
2120191cded7Smrg  IFS="$lt_save_ifs"
2121191cded7Smrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2122191cded7Smrg  ;;
2123191cded7Smrgesac])
2124191cded7SmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2125191cded7Smrgif test -n "$MAGIC_CMD"; then
2126191cded7Smrg  AC_MSG_RESULT($MAGIC_CMD)
2127191cded7Smrgelse
2128191cded7Smrg  AC_MSG_RESULT(no)
2129191cded7Smrgfi
2130191cded7Smrg])# AC_PATH_TOOL_PREFIX
2131191cded7Smrg
2132191cded7Smrg
2133191cded7Smrg# AC_PATH_MAGIC
2134191cded7Smrg# -------------
2135191cded7Smrg# find a file program which can recognise a shared library
2136191cded7SmrgAC_DEFUN([AC_PATH_MAGIC],
2137191cded7Smrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2138191cded7Smrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2139191cded7Smrg  if test -n "$ac_tool_prefix"; then
2140191cded7Smrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2141191cded7Smrg  else
2142191cded7Smrg    MAGIC_CMD=:
2143191cded7Smrg  fi
2144191cded7Smrgfi
2145191cded7Smrg])# AC_PATH_MAGIC
2146191cded7Smrg
2147191cded7Smrg
2148191cded7Smrg# AC_PROG_LD
2149191cded7Smrg# ----------
2150191cded7Smrg# find the pathname to the GNU or non-GNU linker
2151191cded7SmrgAC_DEFUN([AC_PROG_LD],
2152191cded7Smrg[AC_ARG_WITH([gnu-ld],
2153191cded7Smrg    [AC_HELP_STRING([--with-gnu-ld],
2154191cded7Smrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2155191cded7Smrg    [test "$withval" = no || with_gnu_ld=yes],
2156191cded7Smrg    [with_gnu_ld=no])
2157191cded7SmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
2158191cded7SmrgAC_REQUIRE([AC_PROG_CC])dnl
2159191cded7SmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2160191cded7SmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2161191cded7Smrgac_prog=ld
2162191cded7Smrgif test "$GCC" = yes; then
2163191cded7Smrg  # Check if gcc -print-prog-name=ld gives a path.
2164191cded7Smrg  AC_MSG_CHECKING([for ld used by $CC])
2165191cded7Smrg  case $host in
2166191cded7Smrg  *-*-mingw*)
2167191cded7Smrg    # gcc leaves a trailing carriage return which upsets mingw
2168191cded7Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2169191cded7Smrg  *)
2170191cded7Smrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2171191cded7Smrg  esac
2172191cded7Smrg  case $ac_prog in
2173191cded7Smrg    # Accept absolute paths.
2174191cded7Smrg    [[\\/]]* | ?:[[\\/]]*)
2175191cded7Smrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2176191cded7Smrg      # Canonicalize the pathname of ld
2177191cded7Smrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2178191cded7Smrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2179191cded7Smrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2180191cded7Smrg      done
2181191cded7Smrg      test -z "$LD" && LD="$ac_prog"
2182191cded7Smrg      ;;
2183191cded7Smrg  "")
2184191cded7Smrg    # If it fails, then pretend we aren't using GCC.
2185191cded7Smrg    ac_prog=ld
2186191cded7Smrg    ;;
2187191cded7Smrg  *)
2188191cded7Smrg    # If it is relative, then search for the first ld in PATH.
2189191cded7Smrg    with_gnu_ld=unknown
2190191cded7Smrg    ;;
2191191cded7Smrg  esac
2192191cded7Smrgelif test "$with_gnu_ld" = yes; then
2193191cded7Smrg  AC_MSG_CHECKING([for GNU ld])
2194191cded7Smrgelse
2195191cded7Smrg  AC_MSG_CHECKING([for non-GNU ld])
2196191cded7Smrgfi
2197191cded7SmrgAC_CACHE_VAL(lt_cv_path_LD,
2198191cded7Smrg[if test -z "$LD"; then
2199191cded7Smrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2200191cded7Smrg  for ac_dir in $PATH; do
2201191cded7Smrg    IFS="$lt_save_ifs"
2202191cded7Smrg    test -z "$ac_dir" && ac_dir=.
2203191cded7Smrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2204191cded7Smrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2205191cded7Smrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2206191cded7Smrg      # but apparently some variants of GNU ld only accept -v.
2207191cded7Smrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2208191cded7Smrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2209191cded7Smrg      *GNU* | *'with BFD'*)
2210191cded7Smrg	test "$with_gnu_ld" != no && break
2211191cded7Smrg	;;
2212191cded7Smrg      *)
2213191cded7Smrg	test "$with_gnu_ld" != yes && break
2214191cded7Smrg	;;
2215191cded7Smrg      esac
2216191cded7Smrg    fi
2217191cded7Smrg  done
2218191cded7Smrg  IFS="$lt_save_ifs"
2219191cded7Smrgelse
2220191cded7Smrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2221191cded7Smrgfi])
2222191cded7SmrgLD="$lt_cv_path_LD"
2223191cded7Smrgif test -n "$LD"; then
2224191cded7Smrg  AC_MSG_RESULT($LD)
2225191cded7Smrgelse
2226191cded7Smrg  AC_MSG_RESULT(no)
2227191cded7Smrgfi
2228191cded7Smrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2229191cded7SmrgAC_PROG_LD_GNU
2230191cded7Smrg])# AC_PROG_LD
2231191cded7Smrg
2232191cded7Smrg
2233191cded7Smrg# AC_PROG_LD_GNU
2234191cded7Smrg# --------------
2235191cded7SmrgAC_DEFUN([AC_PROG_LD_GNU],
2236191cded7Smrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2237191cded7SmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2238191cded7Smrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2239191cded7Smrgcase `$LD -v 2>&1 </dev/null` in
2240191cded7Smrg*GNU* | *'with BFD'*)
2241191cded7Smrg  lt_cv_prog_gnu_ld=yes
2242191cded7Smrg  ;;
2243191cded7Smrg*)
2244191cded7Smrg  lt_cv_prog_gnu_ld=no
2245191cded7Smrg  ;;
2246191cded7Smrgesac])
2247191cded7Smrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2248191cded7Smrg])# AC_PROG_LD_GNU
2249191cded7Smrg
2250191cded7Smrg
2251191cded7Smrg# AC_PROG_LD_RELOAD_FLAG
2252191cded7Smrg# ----------------------
2253191cded7Smrg# find reload flag for linker
2254191cded7Smrg#   -- PORTME Some linkers may need a different reload flag.
2255191cded7SmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2256191cded7Smrg[AC_CACHE_CHECK([for $LD option to reload object files],
2257191cded7Smrg  lt_cv_ld_reload_flag,
2258191cded7Smrg  [lt_cv_ld_reload_flag='-r'])
2259191cded7Smrgreload_flag=$lt_cv_ld_reload_flag
2260191cded7Smrgcase $reload_flag in
2261191cded7Smrg"" | " "*) ;;
2262191cded7Smrg*) reload_flag=" $reload_flag" ;;
2263191cded7Smrgesac
2264191cded7Smrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2265191cded7Smrgcase $host_os in
2266191cded7Smrg  darwin*)
2267191cded7Smrg    if test "$GCC" = yes; then
2268191cded7Smrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2269191cded7Smrg    else
2270191cded7Smrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2271191cded7Smrg    fi
2272191cded7Smrg    ;;
2273191cded7Smrgesac
2274191cded7Smrg])# AC_PROG_LD_RELOAD_FLAG
2275191cded7Smrg
2276191cded7Smrg
2277191cded7Smrg# AC_DEPLIBS_CHECK_METHOD
2278191cded7Smrg# -----------------------
2279191cded7Smrg# how to check for library dependencies
2280191cded7Smrg#  -- PORTME fill in with the dynamic library characteristics
2281191cded7SmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2282191cded7Smrg[AC_CACHE_CHECK([how to recognise dependent libraries],
2283191cded7Smrglt_cv_deplibs_check_method,
2284191cded7Smrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2285191cded7Smrglt_cv_file_magic_test_file=
2286191cded7Smrglt_cv_deplibs_check_method='unknown'
2287191cded7Smrg# Need to set the preceding variable on all platforms that support
2288191cded7Smrg# interlibrary dependencies.
2289191cded7Smrg# 'none' -- dependencies not supported.
2290191cded7Smrg# `unknown' -- same as none, but documents that we really don't know.
2291191cded7Smrg# 'pass_all' -- all dependencies passed with no checks.
2292191cded7Smrg# 'test_compile' -- check by making test program.
2293191cded7Smrg# 'file_magic [[regex]]' -- check by looking for files in library path
2294191cded7Smrg# which responds to the $file_magic_cmd with a given extended regex.
2295191cded7Smrg# If you have `file' or equivalent on your system and you're not sure
2296191cded7Smrg# whether `pass_all' will *always* work, you probably want this one.
2297191cded7Smrg
2298191cded7Smrgcase $host_os in
2299191cded7Smrgaix4* | aix5*)
2300191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2301191cded7Smrg  ;;
2302191cded7Smrg
2303191cded7Smrgbeos*)
2304191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2305191cded7Smrg  ;;
2306191cded7Smrg
2307191cded7Smrgbsdi[[45]]*)
2308191cded7Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2309191cded7Smrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
2310191cded7Smrg  lt_cv_file_magic_test_file=/shlib/libc.so
2311191cded7Smrg  ;;
2312191cded7Smrg
2313191cded7Smrgcygwin*)
2314191cded7Smrg  # func_win32_libid is a shell function defined in ltmain.sh
2315191cded7Smrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2316191cded7Smrg  lt_cv_file_magic_cmd='func_win32_libid'
2317191cded7Smrg  ;;
2318191cded7Smrg
2319191cded7Smrgmingw* | pw32*)
2320191cded7Smrg  # Base MSYS/MinGW do not provide the 'file' command needed by
2321191cded7Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2322191cded7Smrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2323191cded7Smrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
2324191cded7Smrg  ;;
2325191cded7Smrg
2326191cded7Smrgdarwin* | rhapsody*)
2327191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2328191cded7Smrg  ;;
2329191cded7Smrg
2330191cded7Smrgfreebsd* | kfreebsd*-gnu | dragonfly*)
2331191cded7Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2332191cded7Smrg    case $host_cpu in
2333191cded7Smrg    i*86 )
2334191cded7Smrg      # Not sure whether the presence of OpenBSD here was a mistake.
2335191cded7Smrg      # Let's accept both of them until this is cleared up.
2336191cded7Smrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2337191cded7Smrg      lt_cv_file_magic_cmd=/usr/bin/file
2338191cded7Smrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2339191cded7Smrg      ;;
2340191cded7Smrg    esac
2341191cded7Smrg  else
2342191cded7Smrg    lt_cv_deplibs_check_method=pass_all
2343191cded7Smrg  fi
2344191cded7Smrg  ;;
2345191cded7Smrg
2346191cded7Smrggnu*)
2347191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2348191cded7Smrg  ;;
2349191cded7Smrg
2350191cded7Smrghpux10.20* | hpux11*)
2351191cded7Smrg  lt_cv_file_magic_cmd=/usr/bin/file
2352191cded7Smrg  case $host_cpu in
2353191cded7Smrg  ia64*)
2354191cded7Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2355191cded7Smrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2356191cded7Smrg    ;;
2357191cded7Smrg  hppa*64*)
2358191cded7Smrg    [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]']
2359191cded7Smrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2360191cded7Smrg    ;;
2361191cded7Smrg  *)
2362191cded7Smrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2363191cded7Smrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2364191cded7Smrg    ;;
2365191cded7Smrg  esac
2366191cded7Smrg  ;;
2367191cded7Smrg
2368191cded7Smrginterix3*)
2369191cded7Smrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2370191cded7Smrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2371191cded7Smrg  ;;
2372191cded7Smrg
2373191cded7Smrgirix5* | irix6* | nonstopux*)
2374191cded7Smrg  case $LD in
2375191cded7Smrg  *-32|*"-32 ") libmagic=32-bit;;
2376191cded7Smrg  *-n32|*"-n32 ") libmagic=N32;;
2377191cded7Smrg  *-64|*"-64 ") libmagic=64-bit;;
2378191cded7Smrg  *) libmagic=never-match;;
2379191cded7Smrg  esac
2380191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2381191cded7Smrg  ;;
2382191cded7Smrg
2383191cded7Smrg# This must be Linux ELF.
2384191cded7Smrglinux*)
2385191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2386191cded7Smrg  ;;
2387191cded7Smrg
2388191cded7Smrgnetbsd*)
2389191cded7Smrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2390191cded7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2391191cded7Smrg  else
2392191cded7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2393191cded7Smrg  fi
2394191cded7Smrg  ;;
2395191cded7Smrg
2396191cded7Smrgnewos6*)
2397191cded7Smrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2398191cded7Smrg  lt_cv_file_magic_cmd=/usr/bin/file
2399191cded7Smrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2400191cded7Smrg  ;;
2401191cded7Smrg
2402191cded7Smrgnto-qnx*)
2403191cded7Smrg  lt_cv_deplibs_check_method=unknown
2404191cded7Smrg  ;;
2405191cded7Smrg
2406191cded7Smrgopenbsd*)
2407191cded7Smrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2408191cded7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2409191cded7Smrg  else
2410191cded7Smrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2411191cded7Smrg  fi
2412191cded7Smrg  ;;
2413191cded7Smrg
2414191cded7Smrgosf3* | osf4* | osf5*)
2415191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2416191cded7Smrg  ;;
2417191cded7Smrg
2418191cded7Smrgsolaris*)
2419191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2420191cded7Smrg  ;;
2421191cded7Smrg
2422191cded7Smrgsysv4 | sysv4.3*)
2423191cded7Smrg  case $host_vendor in
2424191cded7Smrg  motorola)
2425191cded7Smrg    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]]'
2426191cded7Smrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2427191cded7Smrg    ;;
2428191cded7Smrg  ncr)
2429191cded7Smrg    lt_cv_deplibs_check_method=pass_all
2430191cded7Smrg    ;;
2431191cded7Smrg  sequent)
2432191cded7Smrg    lt_cv_file_magic_cmd='/bin/file'
2433191cded7Smrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2434191cded7Smrg    ;;
2435191cded7Smrg  sni)
2436191cded7Smrg    lt_cv_file_magic_cmd='/bin/file'
2437191cded7Smrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2438191cded7Smrg    lt_cv_file_magic_test_file=/lib/libc.so
2439191cded7Smrg    ;;
2440191cded7Smrg  siemens)
2441191cded7Smrg    lt_cv_deplibs_check_method=pass_all
2442191cded7Smrg    ;;
2443191cded7Smrg  pc)
2444191cded7Smrg    lt_cv_deplibs_check_method=pass_all
2445191cded7Smrg    ;;
2446191cded7Smrg  esac
2447191cded7Smrg  ;;
2448191cded7Smrg
2449191cded7Smrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2450191cded7Smrg  lt_cv_deplibs_check_method=pass_all
2451191cded7Smrg  ;;
2452191cded7Smrgesac
2453191cded7Smrg])
2454191cded7Smrgfile_magic_cmd=$lt_cv_file_magic_cmd
2455191cded7Smrgdeplibs_check_method=$lt_cv_deplibs_check_method
2456191cded7Smrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
2457191cded7Smrg])# AC_DEPLIBS_CHECK_METHOD
2458191cded7Smrg
2459191cded7Smrg
2460191cded7Smrg# AC_PROG_NM
2461191cded7Smrg# ----------
2462191cded7Smrg# find the pathname to a BSD-compatible name lister
2463191cded7SmrgAC_DEFUN([AC_PROG_NM],
2464191cded7Smrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2465191cded7Smrg[if test -n "$NM"; then
2466191cded7Smrg  # Let the user override the test.
2467191cded7Smrg  lt_cv_path_NM="$NM"
2468191cded7Smrgelse
2469191cded7Smrg  lt_nm_to_check="${ac_tool_prefix}nm"
2470191cded7Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
2471191cded7Smrg    lt_nm_to_check="$lt_nm_to_check nm"
2472191cded7Smrg  fi
2473191cded7Smrg  for lt_tmp_nm in $lt_nm_to_check; do
2474191cded7Smrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2475191cded7Smrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2476191cded7Smrg      IFS="$lt_save_ifs"
2477191cded7Smrg      test -z "$ac_dir" && ac_dir=.
2478191cded7Smrg      tmp_nm="$ac_dir/$lt_tmp_nm"
2479191cded7Smrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2480191cded7Smrg	# Check to see if the nm accepts a BSD-compat flag.
2481191cded7Smrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2482191cded7Smrg	#   nm: unknown option "B" ignored
2483191cded7Smrg	# Tru64's nm complains that /dev/null is an invalid object file
2484191cded7Smrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2485191cded7Smrg	*/dev/null* | *'Invalid file or object type'*)
2486191cded7Smrg	  lt_cv_path_NM="$tmp_nm -B"
2487191cded7Smrg	  break
2488191cded7Smrg	  ;;
2489191cded7Smrg	*)
2490191cded7Smrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2491191cded7Smrg	  */dev/null*)
2492191cded7Smrg	    lt_cv_path_NM="$tmp_nm -p"
2493191cded7Smrg	    break
2494191cded7Smrg	    ;;
2495191cded7Smrg	  *)
2496191cded7Smrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2497191cded7Smrg	    continue # so that we can try to find one that supports BSD flags
2498191cded7Smrg	    ;;
2499191cded7Smrg	  esac
2500191cded7Smrg	  ;;
2501191cded7Smrg	esac
2502191cded7Smrg      fi
2503191cded7Smrg    done
2504191cded7Smrg    IFS="$lt_save_ifs"
2505191cded7Smrg  done
2506191cded7Smrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2507191cded7Smrgfi])
2508191cded7SmrgNM="$lt_cv_path_NM"
2509191cded7Smrg])# AC_PROG_NM
2510191cded7Smrg
2511191cded7Smrg
2512191cded7Smrg# AC_CHECK_LIBM
2513191cded7Smrg# -------------
2514191cded7Smrg# check for math library
2515191cded7SmrgAC_DEFUN([AC_CHECK_LIBM],
2516191cded7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2517191cded7SmrgLIBM=
2518191cded7Smrgcase $host in
2519191cded7Smrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2520191cded7Smrg  # These system don't have libm, or don't need it
2521191cded7Smrg  ;;
2522191cded7Smrg*-ncr-sysv4.3*)
2523191cded7Smrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2524191cded7Smrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2525191cded7Smrg  ;;
2526191cded7Smrg*)
2527191cded7Smrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
2528191cded7Smrg  ;;
2529191cded7Smrgesac
2530191cded7Smrg])# AC_CHECK_LIBM
2531191cded7Smrg
2532191cded7Smrg
2533191cded7Smrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2534191cded7Smrg# -----------------------------------
2535191cded7Smrg# sets LIBLTDL to the link flags for the libltdl convenience library and
2536191cded7Smrg# LTDLINCL to the include flags for the libltdl header and adds
2537191cded7Smrg# --enable-ltdl-convenience to the configure arguments.  Note that
2538191cded7Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2539191cded7Smrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2540191cded7Smrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2541191cded7Smrg# (note the single quotes!).  If your package is not flat and you're not
2542191cded7Smrg# using automake, define top_builddir and top_srcdir appropriately in
2543191cded7Smrg# the Makefiles.
2544191cded7SmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2545191cded7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2546191cded7Smrg  case $enable_ltdl_convenience in
2547191cded7Smrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2548191cded7Smrg  "") enable_ltdl_convenience=yes
2549191cded7Smrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2550191cded7Smrg  esac
2551191cded7Smrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2552191cded7Smrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2553191cded7Smrg  # For backwards non-gettext consistent compatibility...
2554191cded7Smrg  INCLTDL="$LTDLINCL"
2555191cded7Smrg])# AC_LIBLTDL_CONVENIENCE
2556191cded7Smrg
2557191cded7Smrg
2558191cded7Smrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2559191cded7Smrg# -----------------------------------
2560191cded7Smrg# sets LIBLTDL to the link flags for the libltdl installable library and
2561191cded7Smrg# LTDLINCL to the include flags for the libltdl header and adds
2562191cded7Smrg# --enable-ltdl-install to the configure arguments.  Note that
2563191cded7Smrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2564191cded7Smrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
2565191cded7Smrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2566191cded7Smrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
2567191cded7Smrg# flat and you're not using automake, define top_builddir and top_srcdir
2568191cded7Smrg# appropriately in the Makefiles.
2569191cded7Smrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2570191cded7SmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2571191cded7Smrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2572191cded7Smrg  AC_CHECK_LIB(ltdl, lt_dlinit,
2573191cded7Smrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2574191cded7Smrg  [if test x"$enable_ltdl_install" = xno; then
2575191cded7Smrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
2576191cded7Smrg   else
2577191cded7Smrg     enable_ltdl_install=yes
2578191cded7Smrg   fi
2579191cded7Smrg  ])
2580191cded7Smrg  if test x"$enable_ltdl_install" = x"yes"; then
2581191cded7Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2582191cded7Smrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2583191cded7Smrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2584191cded7Smrg  else
2585191cded7Smrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2586191cded7Smrg    LIBLTDL="-lltdl"
2587191cded7Smrg    LTDLINCL=
2588191cded7Smrg  fi
2589191cded7Smrg  # For backwards non-gettext consistent compatibility...
2590191cded7Smrg  INCLTDL="$LTDLINCL"
2591191cded7Smrg])# AC_LIBLTDL_INSTALLABLE
2592191cded7Smrg
2593191cded7Smrg
2594191cded7Smrg# AC_LIBTOOL_CXX
2595191cded7Smrg# --------------
2596191cded7Smrg# enable support for C++ libraries
2597191cded7SmrgAC_DEFUN([AC_LIBTOOL_CXX],
2598191cded7Smrg[AC_REQUIRE([_LT_AC_LANG_CXX])
2599191cded7Smrg])# AC_LIBTOOL_CXX
2600191cded7Smrg
2601191cded7Smrg
2602191cded7Smrg# _LT_AC_LANG_CXX
2603191cded7Smrg# ---------------
2604191cded7SmrgAC_DEFUN([_LT_AC_LANG_CXX],
2605191cded7Smrg[AC_REQUIRE([AC_PROG_CXX])
2606191cded7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2607191cded7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2608191cded7Smrg])# _LT_AC_LANG_CXX
2609191cded7Smrg
2610191cded7Smrg# _LT_AC_PROG_CXXCPP
2611191cded7Smrg# ------------------
2612191cded7SmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
2613191cded7Smrg[
2614191cded7SmrgAC_REQUIRE([AC_PROG_CXX])
2615191cded7Smrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2616191cded7Smrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2617191cded7Smrg    (test "X$CXX" != "Xg++"))) ; then
2618191cded7Smrg  AC_PROG_CXXCPP
2619191cded7Smrgfi
2620191cded7Smrg])# _LT_AC_PROG_CXXCPP
2621191cded7Smrg
2622191cded7Smrg# AC_LIBTOOL_F77
2623191cded7Smrg# --------------
2624191cded7Smrg# enable support for Fortran 77 libraries
2625191cded7SmrgAC_DEFUN([AC_LIBTOOL_F77],
2626191cded7Smrg[AC_REQUIRE([_LT_AC_LANG_F77])
2627191cded7Smrg])# AC_LIBTOOL_F77
2628191cded7Smrg
2629191cded7Smrg
2630191cded7Smrg# _LT_AC_LANG_F77
2631191cded7Smrg# ---------------
2632191cded7SmrgAC_DEFUN([_LT_AC_LANG_F77],
2633191cded7Smrg[AC_REQUIRE([AC_PROG_F77])
2634191cded7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2635191cded7Smrg])# _LT_AC_LANG_F77
2636191cded7Smrg
2637191cded7Smrg
2638191cded7Smrg# AC_LIBTOOL_GCJ
2639191cded7Smrg# --------------
2640191cded7Smrg# enable support for GCJ libraries
2641191cded7SmrgAC_DEFUN([AC_LIBTOOL_GCJ],
2642191cded7Smrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
2643191cded7Smrg])# AC_LIBTOOL_GCJ
2644191cded7Smrg
2645191cded7Smrg
2646191cded7Smrg# _LT_AC_LANG_GCJ
2647191cded7Smrg# ---------------
2648191cded7SmrgAC_DEFUN([_LT_AC_LANG_GCJ],
2649191cded7Smrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2650191cded7Smrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2651191cded7Smrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2652191cded7Smrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2653191cded7Smrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2654191cded7Smrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2655191cded7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2656191cded7Smrg])# _LT_AC_LANG_GCJ
2657191cded7Smrg
2658191cded7Smrg
2659191cded7Smrg# AC_LIBTOOL_RC
2660191cded7Smrg# -------------
2661191cded7Smrg# enable support for Windows resource files
2662191cded7SmrgAC_DEFUN([AC_LIBTOOL_RC],
2663191cded7Smrg[AC_REQUIRE([LT_AC_PROG_RC])
2664191cded7Smrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2665191cded7Smrg])# AC_LIBTOOL_RC
2666191cded7Smrg
2667191cded7Smrg
2668191cded7Smrg# AC_LIBTOOL_LANG_C_CONFIG
2669191cded7Smrg# ------------------------
2670191cded7Smrg# Ensure that the configuration vars for the C compiler are
2671191cded7Smrg# suitably defined.  Those variables are subsequently used by
2672191cded7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2673191cded7SmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2674191cded7SmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2675191cded7Smrg[lt_save_CC="$CC"
2676191cded7SmrgAC_LANG_PUSH(C)
2677191cded7Smrg
2678191cded7Smrg# Source file extension for C test sources.
2679191cded7Smrgac_ext=c
2680191cded7Smrg
2681191cded7Smrg# Object file extension for compiled C test sources.
2682191cded7Smrgobjext=o
2683191cded7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
2684191cded7Smrg
2685191cded7Smrg# Code to be used in simple compile tests
2686191cded7Smrglt_simple_compile_test_code="int some_variable = 0;\n"
2687191cded7Smrg
2688191cded7Smrg# Code to be used in simple link tests
2689191cded7Smrglt_simple_link_test_code='int main(){return(0);}\n'
2690191cded7Smrg
2691191cded7Smrg_LT_AC_SYS_COMPILER
2692191cded7Smrg
2693191cded7Smrg# save warnings/boilerplate of simple test code
2694191cded7Smrg_LT_COMPILER_BOILERPLATE
2695191cded7Smrg_LT_LINKER_BOILERPLATE
2696191cded7Smrg
2697191cded7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2698191cded7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
2699191cded7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
2700191cded7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2701191cded7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
2702191cded7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2703191cded7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2704191cded7SmrgAC_LIBTOOL_SYS_LIB_STRIP
2705191cded7SmrgAC_LIBTOOL_DLOPEN_SELF
2706191cded7Smrg
2707191cded7Smrg# Report which library types will actually be built
2708191cded7SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
2709191cded7SmrgAC_MSG_RESULT([$can_build_shared])
2710191cded7Smrg
2711191cded7SmrgAC_MSG_CHECKING([whether to build shared libraries])
2712191cded7Smrgtest "$can_build_shared" = "no" && enable_shared=no
2713191cded7Smrg
2714191cded7Smrg# On AIX, shared libraries and static libraries use the same namespace, and
2715191cded7Smrg# are all built from PIC.
2716191cded7Smrgcase $host_os in
2717191cded7Smrgaix3*)
2718191cded7Smrg  test "$enable_shared" = yes && enable_static=no
2719191cded7Smrg  if test -n "$RANLIB"; then
2720191cded7Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2721191cded7Smrg    postinstall_cmds='$RANLIB $lib'
2722191cded7Smrg  fi
2723191cded7Smrg  ;;
2724191cded7Smrg
2725191cded7Smrgaix4* | aix5*)
2726191cded7Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2727191cded7Smrg    test "$enable_shared" = yes && enable_static=no
2728191cded7Smrg  fi
2729191cded7Smrg    ;;
2730191cded7Smrgesac
2731191cded7SmrgAC_MSG_RESULT([$enable_shared])
2732191cded7Smrg
2733191cded7SmrgAC_MSG_CHECKING([whether to build static libraries])
2734191cded7Smrg# Make sure either enable_shared or enable_static is yes.
2735191cded7Smrgtest "$enable_shared" = yes || enable_static=yes
2736191cded7SmrgAC_MSG_RESULT([$enable_static])
2737191cded7Smrg
2738191cded7SmrgAC_LIBTOOL_CONFIG($1)
2739191cded7Smrg
2740191cded7SmrgAC_LANG_POP
2741191cded7SmrgCC="$lt_save_CC"
2742191cded7Smrg])# AC_LIBTOOL_LANG_C_CONFIG
2743191cded7Smrg
2744191cded7Smrg
2745191cded7Smrg# AC_LIBTOOL_LANG_CXX_CONFIG
2746191cded7Smrg# --------------------------
2747191cded7Smrg# Ensure that the configuration vars for the C compiler are
2748191cded7Smrg# suitably defined.  Those variables are subsequently used by
2749191cded7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2750191cded7SmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2751191cded7SmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2752191cded7Smrg[AC_LANG_PUSH(C++)
2753191cded7SmrgAC_REQUIRE([AC_PROG_CXX])
2754191cded7SmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2755191cded7Smrg
2756191cded7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2757191cded7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2758191cded7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
2759191cded7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2760191cded7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2761191cded7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
2762191cded7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2763191cded7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2764191cded7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2765191cded7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2766191cded7Smrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2767191cded7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2768191cded7Smrg_LT_AC_TAGVAR(module_cmds, $1)=
2769191cded7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2770191cded7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2771191cded7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2772191cded7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
2773191cded7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2774191cded7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2775191cded7Smrg
2776191cded7Smrg# Dependencies to place before and after the object being linked:
2777191cded7Smrg_LT_AC_TAGVAR(predep_objects, $1)=
2778191cded7Smrg_LT_AC_TAGVAR(postdep_objects, $1)=
2779191cded7Smrg_LT_AC_TAGVAR(predeps, $1)=
2780191cded7Smrg_LT_AC_TAGVAR(postdeps, $1)=
2781191cded7Smrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2782191cded7Smrg
2783191cded7Smrg# Source file extension for C++ test sources.
2784191cded7Smrgac_ext=cpp
2785191cded7Smrg
2786191cded7Smrg# Object file extension for compiled C++ test sources.
2787191cded7Smrgobjext=o
2788191cded7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
2789191cded7Smrg
2790191cded7Smrg# Code to be used in simple compile tests
2791191cded7Smrglt_simple_compile_test_code="int some_variable = 0;\n"
2792191cded7Smrg
2793191cded7Smrg# Code to be used in simple link tests
2794191cded7Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2795191cded7Smrg
2796191cded7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2797191cded7Smrg_LT_AC_SYS_COMPILER
2798191cded7Smrg
2799191cded7Smrg# save warnings/boilerplate of simple test code
2800191cded7Smrg_LT_COMPILER_BOILERPLATE
2801191cded7Smrg_LT_LINKER_BOILERPLATE
2802191cded7Smrg
2803191cded7Smrg# Allow CC to be a program name with arguments.
2804191cded7Smrglt_save_CC=$CC
2805191cded7Smrglt_save_LD=$LD
2806191cded7Smrglt_save_GCC=$GCC
2807191cded7SmrgGCC=$GXX
2808191cded7Smrglt_save_with_gnu_ld=$with_gnu_ld
2809191cded7Smrglt_save_path_LD=$lt_cv_path_LD
2810191cded7Smrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2811191cded7Smrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2812191cded7Smrgelse
2813191cded7Smrg  $as_unset lt_cv_prog_gnu_ld
2814191cded7Smrgfi
2815191cded7Smrgif test -n "${lt_cv_path_LDCXX+set}"; then
2816191cded7Smrg  lt_cv_path_LD=$lt_cv_path_LDCXX
2817191cded7Smrgelse
2818191cded7Smrg  $as_unset lt_cv_path_LD
2819191cded7Smrgfi
2820191cded7Smrgtest -z "${LDCXX+set}" || LD=$LDCXX
2821191cded7SmrgCC=${CXX-"c++"}
2822191cded7Smrgcompiler=$CC
2823191cded7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
2824191cded7Smrg_LT_CC_BASENAME([$compiler])
2825191cded7Smrg
2826191cded7Smrg# We don't want -fno-exception wen compiling C++ code, so set the
2827191cded7Smrg# no_builtin_flag separately
2828191cded7Smrgif test "$GXX" = yes; then
2829191cded7Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2830191cded7Smrgelse
2831191cded7Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2832191cded7Smrgfi
2833191cded7Smrg
2834191cded7Smrgif test "$GXX" = yes; then
2835191cded7Smrg  # Set up default GNU C++ configuration
2836191cded7Smrg
2837191cded7Smrg  AC_PROG_LD
2838191cded7Smrg
2839191cded7Smrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2840191cded7Smrg  # archiving commands below assume that GNU ld is being used.
2841191cded7Smrg  if test "$with_gnu_ld" = yes; then
2842191cded7Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2843191cded7Smrg    _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'
2844191cded7Smrg
2845191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2846191cded7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2847191cded7Smrg
2848191cded7Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
2849191cded7Smrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2850191cded7Smrg    #     investigate it a little bit more. (MM)
2851191cded7Smrg    wlarc='${wl}'
2852191cded7Smrg
2853191cded7Smrg    # ancient GNU ld didn't support --whole-archive et. al.
2854191cded7Smrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2855191cded7Smrg	grep 'no-whole-archive' > /dev/null; then
2856191cded7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2857191cded7Smrg    else
2858191cded7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2859191cded7Smrg    fi
2860191cded7Smrg  else
2861191cded7Smrg    with_gnu_ld=no
2862191cded7Smrg    wlarc=
2863191cded7Smrg
2864191cded7Smrg    # A generic and very simple default shared library creation
2865191cded7Smrg    # command for GNU C++ for the case where it uses the native
2866191cded7Smrg    # linker, instead of GNU ld.  If possible, this setting should
2867191cded7Smrg    # overridden to take advantage of the native linker features on
2868191cded7Smrg    # the platform it is being used on.
2869191cded7Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2870191cded7Smrg  fi
2871191cded7Smrg
2872191cded7Smrg  # Commands to make compiler produce verbose output that lists
2873191cded7Smrg  # what "hidden" libraries, object files and flags are used when
2874191cded7Smrg  # linking a shared library.
2875191cded7Smrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2876191cded7Smrg
2877191cded7Smrgelse
2878191cded7Smrg  GXX=no
2879191cded7Smrg  with_gnu_ld=no
2880191cded7Smrg  wlarc=
2881191cded7Smrgfi
2882191cded7Smrg
2883191cded7Smrg# PORTME: fill in a description of your system's C++ link characteristics
2884191cded7SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2885191cded7Smrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2886191cded7Smrgcase $host_os in
2887191cded7Smrg  aix3*)
2888191cded7Smrg    # FIXME: insert proper C++ library support
2889191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2890191cded7Smrg    ;;
2891191cded7Smrg  aix4* | aix5*)
2892191cded7Smrg    if test "$host_cpu" = ia64; then
2893191cded7Smrg      # On IA64, the linker does run time linking by default, so we don't
2894191cded7Smrg      # have to do anything special.
2895191cded7Smrg      aix_use_runtimelinking=no
2896191cded7Smrg      exp_sym_flag='-Bexport'
2897191cded7Smrg      no_entry_flag=""
2898191cded7Smrg    else
2899191cded7Smrg      aix_use_runtimelinking=no
2900191cded7Smrg
2901191cded7Smrg      # Test if we are trying to use run time linking or normal
2902191cded7Smrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2903191cded7Smrg      # need to do runtime linking.
2904191cded7Smrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2905191cded7Smrg	for ld_flag in $LDFLAGS; do
2906191cded7Smrg	  case $ld_flag in
2907191cded7Smrg	  *-brtl*)
2908191cded7Smrg	    aix_use_runtimelinking=yes
2909191cded7Smrg	    break
2910191cded7Smrg	    ;;
2911191cded7Smrg	  esac
2912191cded7Smrg	done
2913191cded7Smrg	;;
2914191cded7Smrg      esac
2915191cded7Smrg
2916191cded7Smrg      exp_sym_flag='-bexport'
2917191cded7Smrg      no_entry_flag='-bnoentry'
2918191cded7Smrg    fi
2919191cded7Smrg
2920191cded7Smrg    # When large executables or shared objects are built, AIX ld can
2921191cded7Smrg    # have problems creating the table of contents.  If linking a library
2922191cded7Smrg    # or program results in "error TOC overflow" add -mminimal-toc to
2923191cded7Smrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2924191cded7Smrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2925191cded7Smrg
2926191cded7Smrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
2927191cded7Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2928191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2929191cded7Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2930191cded7Smrg
2931191cded7Smrg    if test "$GXX" = yes; then
2932191cded7Smrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2933191cded7Smrg      # We only want to do this on AIX 4.2 and lower, the check
2934191cded7Smrg      # below for broken collect2 doesn't work under 4.3+
2935191cded7Smrg	collect2name=`${CC} -print-prog-name=collect2`
2936191cded7Smrg	if test -f "$collect2name" && \
2937191cded7Smrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2938191cded7Smrg	then
2939191cded7Smrg	  # We have reworked collect2
2940191cded7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2941191cded7Smrg	else
2942191cded7Smrg	  # We have old collect2
2943191cded7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2944191cded7Smrg	  # It fails to find uninstalled libraries when the uninstalled
2945191cded7Smrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
2946191cded7Smrg	  # to unsupported forces relinking
2947191cded7Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2948191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2949191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2950191cded7Smrg	fi
2951191cded7Smrg	;;
2952191cded7Smrg      esac
2953191cded7Smrg      shared_flag='-shared'
2954191cded7Smrg      if test "$aix_use_runtimelinking" = yes; then
2955191cded7Smrg	shared_flag="$shared_flag "'${wl}-G'
2956191cded7Smrg      fi
2957191cded7Smrg    else
2958191cded7Smrg      # not using gcc
2959191cded7Smrg      if test "$host_cpu" = ia64; then
2960191cded7Smrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2961191cded7Smrg	# chokes on -Wl,-G. The following line is correct:
2962191cded7Smrg	shared_flag='-G'
2963191cded7Smrg      else
2964191cded7Smrg	if test "$aix_use_runtimelinking" = yes; then
2965191cded7Smrg	  shared_flag='${wl}-G'
2966191cded7Smrg	else
2967191cded7Smrg	  shared_flag='${wl}-bM:SRE'
2968191cded7Smrg	fi
2969191cded7Smrg      fi
2970191cded7Smrg    fi
2971191cded7Smrg
2972191cded7Smrg    # It seems that -bexpall does not export symbols beginning with
2973191cded7Smrg    # underscore (_), so it is better to generate a list of symbols to export.
2974191cded7Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2975191cded7Smrg    if test "$aix_use_runtimelinking" = yes; then
2976191cded7Smrg      # Warning - without using the other runtime loading flags (-brtl),
2977191cded7Smrg      # -berok will link without error, but may produce a broken library.
2978191cded7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2979191cded7Smrg      # Determine the default libpath from the value encoded in an empty executable.
2980191cded7Smrg      _LT_AC_SYS_LIBPATH_AIX
2981191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2982191cded7Smrg
2983191cded7Smrg      _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"
2984191cded7Smrg     else
2985191cded7Smrg      if test "$host_cpu" = ia64; then
2986191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2987191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2988191cded7Smrg	_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"
2989191cded7Smrg      else
2990191cded7Smrg	# Determine the default libpath from the value encoded in an empty executable.
2991191cded7Smrg	_LT_AC_SYS_LIBPATH_AIX
2992191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2993191cded7Smrg	# Warning - without using the other run time loading flags,
2994191cded7Smrg	# -berok will link without error, but may produce a broken library.
2995191cded7Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2996191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2997191cded7Smrg	# Exported symbols can be pulled into shared objects from archives
2998191cded7Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2999191cded7Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3000191cded7Smrg	# This is similar to how AIX traditionally builds its shared libraries.
3001191cded7Smrg	_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'
3002191cded7Smrg      fi
3003191cded7Smrg    fi
3004191cded7Smrg    ;;
3005191cded7Smrg
3006191cded7Smrg  beos*)
3007191cded7Smrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3008191cded7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3009191cded7Smrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3010191cded7Smrg      # support --undefined.  This deserves some investigation.  FIXME
3011191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3012191cded7Smrg    else
3013191cded7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3014191cded7Smrg    fi
3015191cded7Smrg    ;;
3016191cded7Smrg
3017191cded7Smrg  chorus*)
3018191cded7Smrg    case $cc_basename in
3019191cded7Smrg      *)
3020191cded7Smrg	# FIXME: insert proper C++ library support
3021191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3022191cded7Smrg	;;
3023191cded7Smrg    esac
3024191cded7Smrg    ;;
3025191cded7Smrg
3026191cded7Smrg  cygwin* | mingw* | pw32*)
3027191cded7Smrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3028191cded7Smrg    # as there is no search path for DLLs.
3029191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3030191cded7Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3031191cded7Smrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3032191cded7Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3033191cded7Smrg
3034191cded7Smrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3035191cded7Smrg      _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'
3036191cded7Smrg      # If the export-symbols file already is a .def file (1st line
3037191cded7Smrg      # is EXPORTS), use it as is; otherwise, prepend...
3038191cded7Smrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3039191cded7Smrg	cp $export_symbols $output_objdir/$soname.def;
3040191cded7Smrg      else
3041191cded7Smrg	echo EXPORTS > $output_objdir/$soname.def;
3042191cded7Smrg	cat $export_symbols >> $output_objdir/$soname.def;
3043191cded7Smrg      fi~
3044191cded7Smrg      $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'
3045191cded7Smrg    else
3046191cded7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3047191cded7Smrg    fi
3048191cded7Smrg  ;;
3049191cded7Smrg      darwin* | rhapsody*)
3050191cded7Smrg        case $host_os in
3051191cded7Smrg        rhapsody* | darwin1.[[012]])
3052191cded7Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3053191cded7Smrg         ;;
3054191cded7Smrg       *) # Darwin 1.3 on
3055191cded7Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3056191cded7Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3057191cded7Smrg         else
3058191cded7Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
3059191cded7Smrg             10.[[012]])
3060191cded7Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3061191cded7Smrg               ;;
3062191cded7Smrg             10.*)
3063191cded7Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3064191cded7Smrg               ;;
3065191cded7Smrg           esac
3066191cded7Smrg         fi
3067191cded7Smrg         ;;
3068191cded7Smrg        esac
3069191cded7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3070191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3071191cded7Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3072191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3073191cded7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3074191cded7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3075191cded7Smrg
3076191cded7Smrg    if test "$GXX" = yes ; then
3077191cded7Smrg      lt_int_apple_cc_single_mod=no
3078191cded7Smrg      output_verbose_link_cmd='echo'
3079191cded7Smrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3080191cded7Smrg       lt_int_apple_cc_single_mod=yes
3081191cded7Smrg      fi
3082191cded7Smrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3083191cded7Smrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3084191cded7Smrg      else
3085191cded7Smrg          _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'
3086191cded7Smrg        fi
3087191cded7Smrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3088191cded7Smrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3089191cded7Smrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3090191cded7Smrg            _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}'
3091191cded7Smrg          else
3092191cded7Smrg            _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}'
3093191cded7Smrg          fi
3094191cded7Smrg            _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}'
3095191cded7Smrg      else
3096191cded7Smrg      case $cc_basename in
3097191cded7Smrg        xlc*)
3098191cded7Smrg         output_verbose_link_cmd='echo'
3099191cded7Smrg          _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'
3100191cded7Smrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3101191cded7Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3102191cded7Smrg          _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}'
3103191cded7Smrg          _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}'
3104191cded7Smrg          ;;
3105191cded7Smrg       *)
3106191cded7Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3107191cded7Smrg          ;;
3108191cded7Smrg      esac
3109191cded7Smrg      fi
3110191cded7Smrg        ;;
3111191cded7Smrg
3112191cded7Smrg  dgux*)
3113191cded7Smrg    case $cc_basename in
3114191cded7Smrg      ec++*)
3115191cded7Smrg	# FIXME: insert proper C++ library support
3116191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3117191cded7Smrg	;;
3118191cded7Smrg      ghcx*)
3119191cded7Smrg	# Green Hills C++ Compiler
3120191cded7Smrg	# FIXME: insert proper C++ library support
3121191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3122191cded7Smrg	;;
3123191cded7Smrg      *)
3124191cded7Smrg	# FIXME: insert proper C++ library support
3125191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3126191cded7Smrg	;;
3127191cded7Smrg    esac
3128191cded7Smrg    ;;
3129191cded7Smrg  freebsd[[12]]*)
3130191cded7Smrg    # C++ shared libraries reported to be fairly broken before switch to ELF
3131191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3132191cded7Smrg    ;;
3133191cded7Smrg  freebsd-elf*)
3134191cded7Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3135191cded7Smrg    ;;
3136191cded7Smrg  freebsd* | kfreebsd*-gnu | dragonfly*)
3137191cded7Smrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3138191cded7Smrg    # conventions
3139191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3140191cded7Smrg    ;;
3141191cded7Smrg  gnu*)
3142191cded7Smrg    ;;
3143191cded7Smrg  hpux9*)
3144191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3145191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3146191cded7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3147191cded7Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3148191cded7Smrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3149191cded7Smrg				# but as the default
3150191cded7Smrg				# location of the library.
3151191cded7Smrg
3152191cded7Smrg    case $cc_basename in
3153191cded7Smrg    CC*)
3154191cded7Smrg      # FIXME: insert proper C++ library support
3155191cded7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3156191cded7Smrg      ;;
3157191cded7Smrg    aCC*)
3158191cded7Smrg      _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'
3159191cded7Smrg      # Commands to make compiler produce verbose output that lists
3160191cded7Smrg      # what "hidden" libraries, object files and flags are used when
3161191cded7Smrg      # linking a shared library.
3162191cded7Smrg      #
3163191cded7Smrg      # There doesn't appear to be a way to prevent this compiler from
3164191cded7Smrg      # explicitly linking system object files so we need to strip them
3165191cded7Smrg      # from the output so that they don't get included in the library
3166191cded7Smrg      # dependencies.
3167191cded7Smrg      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'
3168191cded7Smrg      ;;
3169191cded7Smrg    *)
3170191cded7Smrg      if test "$GXX" = yes; then
3171191cded7Smrg        _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'
3172191cded7Smrg      else
3173191cded7Smrg        # FIXME: insert proper C++ library support
3174191cded7Smrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3175191cded7Smrg      fi
3176191cded7Smrg      ;;
3177191cded7Smrg    esac
3178191cded7Smrg    ;;
3179191cded7Smrg  hpux10*|hpux11*)
3180191cded7Smrg    if test $with_gnu_ld = no; then
3181191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3182191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3183191cded7Smrg
3184191cded7Smrg      case $host_cpu in
3185191cded7Smrg      hppa*64*|ia64*)
3186191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3187191cded7Smrg        ;;
3188191cded7Smrg      *)
3189191cded7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3190191cded7Smrg        ;;
3191191cded7Smrg      esac
3192191cded7Smrg    fi
3193191cded7Smrg    case $host_cpu in
3194191cded7Smrg    hppa*64*|ia64*)
3195191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3196191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3197191cded7Smrg      ;;
3198191cded7Smrg    *)
3199191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3200191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3201191cded7Smrg					      # but as the default
3202191cded7Smrg					      # location of the library.
3203191cded7Smrg      ;;
3204191cded7Smrg    esac
3205191cded7Smrg
3206191cded7Smrg    case $cc_basename in
3207191cded7Smrg      CC*)
3208191cded7Smrg	# FIXME: insert proper C++ library support
3209191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3210191cded7Smrg	;;
3211191cded7Smrg      aCC*)
3212191cded7Smrg	case $host_cpu in
3213191cded7Smrg	hppa*64*)
3214191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3215191cded7Smrg	  ;;
3216191cded7Smrg	ia64*)
3217191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3218191cded7Smrg	  ;;
3219191cded7Smrg	*)
3220191cded7Smrg	  _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'
3221191cded7Smrg	  ;;
3222191cded7Smrg	esac
3223191cded7Smrg	# Commands to make compiler produce verbose output that lists
3224191cded7Smrg	# what "hidden" libraries, object files and flags are used when
3225191cded7Smrg	# linking a shared library.
3226191cded7Smrg	#
3227191cded7Smrg	# There doesn't appear to be a way to prevent this compiler from
3228191cded7Smrg	# explicitly linking system object files so we need to strip them
3229191cded7Smrg	# from the output so that they don't get included in the library
3230191cded7Smrg	# dependencies.
3231191cded7Smrg	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'
3232191cded7Smrg	;;
3233191cded7Smrg      *)
3234191cded7Smrg	if test "$GXX" = yes; then
3235191cded7Smrg	  if test $with_gnu_ld = no; then
3236191cded7Smrg	    case $host_cpu in
3237191cded7Smrg	    hppa*64*)
3238191cded7Smrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3239191cded7Smrg	      ;;
3240191cded7Smrg	    ia64*)
3241191cded7Smrg	      _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'
3242191cded7Smrg	      ;;
3243191cded7Smrg	    *)
3244191cded7Smrg	      _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'
3245191cded7Smrg	      ;;
3246191cded7Smrg	    esac
3247191cded7Smrg	  fi
3248191cded7Smrg	else
3249191cded7Smrg	  # FIXME: insert proper C++ library support
3250191cded7Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3251191cded7Smrg	fi
3252191cded7Smrg	;;
3253191cded7Smrg    esac
3254191cded7Smrg    ;;
3255191cded7Smrg  interix3*)
3256191cded7Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3257191cded7Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3258191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3259191cded7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3260191cded7Smrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3261191cded7Smrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
3262191cded7Smrg    # default) and relocated if they conflict, which is a slow very memory
3263191cded7Smrg    # consuming and fragmenting process.  To avoid this, we pick a random,
3264191cded7Smrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3265191cded7Smrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3266191cded7Smrg    _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'
3267191cded7Smrg    _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'
3268191cded7Smrg    ;;
3269191cded7Smrg  irix5* | irix6*)
3270191cded7Smrg    case $cc_basename in
3271191cded7Smrg      CC*)
3272191cded7Smrg	# SGI C++
3273191cded7Smrg	_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'
3274191cded7Smrg
3275191cded7Smrg	# Archives containing C++ object files must be created using
3276191cded7Smrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3277191cded7Smrg	# necessary to make sure instantiated templates are included
3278191cded7Smrg	# in the archive.
3279191cded7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3280191cded7Smrg	;;
3281191cded7Smrg      *)
3282191cded7Smrg	if test "$GXX" = yes; then
3283191cded7Smrg	  if test "$with_gnu_ld" = no; then
3284191cded7Smrg	    _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'
3285191cded7Smrg	  else
3286191cded7Smrg	    _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'
3287191cded7Smrg	  fi
3288191cded7Smrg	fi
3289191cded7Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3290191cded7Smrg	;;
3291191cded7Smrg    esac
3292191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3293191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3294191cded7Smrg    ;;
3295191cded7Smrg  linux*)
3296191cded7Smrg    case $cc_basename in
3297191cded7Smrg      KCC*)
3298191cded7Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3299191cded7Smrg
3300191cded7Smrg	# KCC will only create a shared library if the output file
3301191cded7Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3302191cded7Smrg	# to its proper name (with version) after linking.
3303191cded7Smrg	_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'
3304191cded7Smrg	_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'
3305191cded7Smrg	# Commands to make compiler produce verbose output that lists
3306191cded7Smrg	# what "hidden" libraries, object files and flags are used when
3307191cded7Smrg	# linking a shared library.
3308191cded7Smrg	#
3309191cded7Smrg	# There doesn't appear to be a way to prevent this compiler from
3310191cded7Smrg	# explicitly linking system object files so we need to strip them
3311191cded7Smrg	# from the output so that they don't get included in the library
3312191cded7Smrg	# dependencies.
3313191cded7Smrg	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'
3314191cded7Smrg
3315191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3316191cded7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3317191cded7Smrg
3318191cded7Smrg	# Archives containing C++ object files must be created using
3319191cded7Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3320191cded7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3321191cded7Smrg	;;
3322191cded7Smrg      icpc*)
3323191cded7Smrg	# Intel C++
3324191cded7Smrg	with_gnu_ld=yes
3325191cded7Smrg	# version 8.0 and above of icpc choke on multiply defined symbols
3326191cded7Smrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
3327191cded7Smrg	# earlier do not add the objects themselves.
3328191cded7Smrg	case `$CC -V 2>&1` in
3329191cded7Smrg	*"Version 7."*)
3330191cded7Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3331191cded7Smrg  	  _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'
3332191cded7Smrg	  ;;
3333191cded7Smrg	*)  # Version 8.0 or newer
3334191cded7Smrg	  tmp_idyn=
3335191cded7Smrg	  case $host_cpu in
3336191cded7Smrg	    ia64*) tmp_idyn=' -i_dynamic';;
3337191cded7Smrg	  esac
3338191cded7Smrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3339191cded7Smrg	  _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'
3340191cded7Smrg	  ;;
3341191cded7Smrg	esac
3342191cded7Smrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3343191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3344191cded7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3345191cded7Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3346191cded7Smrg	;;
3347191cded7Smrg      pgCC*)
3348191cded7Smrg        # Portland Group C++ compiler
3349191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3350191cded7Smrg  	_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'
3351191cded7Smrg
3352191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3353191cded7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3354191cded7Smrg	_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'
3355191cded7Smrg        ;;
3356191cded7Smrg      cxx*)
3357191cded7Smrg	# Compaq C++
3358191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3359191cded7Smrg	_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'
3360191cded7Smrg
3361191cded7Smrg	runpath_var=LD_RUN_PATH
3362191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3363191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3364191cded7Smrg
3365191cded7Smrg	# Commands to make compiler produce verbose output that lists
3366191cded7Smrg	# what "hidden" libraries, object files and flags are used when
3367191cded7Smrg	# linking a shared library.
3368191cded7Smrg	#
3369191cded7Smrg	# There doesn't appear to be a way to prevent this compiler from
3370191cded7Smrg	# explicitly linking system object files so we need to strip them
3371191cded7Smrg	# from the output so that they don't get included in the library
3372191cded7Smrg	# dependencies.
3373191cded7Smrg	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'
3374191cded7Smrg	;;
3375191cded7Smrg    esac
3376191cded7Smrg    ;;
3377191cded7Smrg  lynxos*)
3378191cded7Smrg    # FIXME: insert proper C++ library support
3379191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3380191cded7Smrg    ;;
3381191cded7Smrg  m88k*)
3382191cded7Smrg    # FIXME: insert proper C++ library support
3383191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3384191cded7Smrg    ;;
3385191cded7Smrg  mvs*)
3386191cded7Smrg    case $cc_basename in
3387191cded7Smrg      cxx*)
3388191cded7Smrg	# FIXME: insert proper C++ library support
3389191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3390191cded7Smrg	;;
3391191cded7Smrg      *)
3392191cded7Smrg	# FIXME: insert proper C++ library support
3393191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3394191cded7Smrg	;;
3395191cded7Smrg    esac
3396191cded7Smrg    ;;
3397191cded7Smrg  netbsd*)
3398191cded7Smrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3399191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3400191cded7Smrg      wlarc=
3401191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3402191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3403191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3404191cded7Smrg    fi
3405191cded7Smrg    # Workaround some broken pre-1.5 toolchains
3406191cded7Smrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3407191cded7Smrg    ;;
3408191cded7Smrg  openbsd2*)
3409191cded7Smrg    # C++ shared libraries are fairly broken
3410191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3411191cded7Smrg    ;;
3412191cded7Smrg  openbsd*)
3413191cded7Smrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3414191cded7Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3415191cded7Smrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3416191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3417191cded7Smrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3418191cded7Smrg      _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'
3419191cded7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3420191cded7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3421191cded7Smrg    fi
3422191cded7Smrg    output_verbose_link_cmd='echo'
3423191cded7Smrg    ;;
3424191cded7Smrg  osf3*)
3425191cded7Smrg    case $cc_basename in
3426191cded7Smrg      KCC*)
3427191cded7Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3428191cded7Smrg
3429191cded7Smrg	# KCC will only create a shared library if the output file
3430191cded7Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3431191cded7Smrg	# to its proper name (with version) after linking.
3432191cded7Smrg	_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'
3433191cded7Smrg
3434191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3435191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3436191cded7Smrg
3437191cded7Smrg	# Archives containing C++ object files must be created using
3438191cded7Smrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3439191cded7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3440191cded7Smrg
3441191cded7Smrg	;;
3442191cded7Smrg      RCC*)
3443191cded7Smrg	# Rational C++ 2.4.1
3444191cded7Smrg	# FIXME: insert proper C++ library support
3445191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3446191cded7Smrg	;;
3447191cded7Smrg      cxx*)
3448191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3449191cded7Smrg	_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'
3450191cded7Smrg
3451191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3452191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3453191cded7Smrg
3454191cded7Smrg	# Commands to make compiler produce verbose output that lists
3455191cded7Smrg	# what "hidden" libraries, object files and flags are used when
3456191cded7Smrg	# linking a shared library.
3457191cded7Smrg	#
3458191cded7Smrg	# There doesn't appear to be a way to prevent this compiler from
3459191cded7Smrg	# explicitly linking system object files so we need to strip them
3460191cded7Smrg	# from the output so that they don't get included in the library
3461191cded7Smrg	# dependencies.
3462191cded7Smrg	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'
3463191cded7Smrg	;;
3464191cded7Smrg      *)
3465191cded7Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3466191cded7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3467191cded7Smrg	  _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'
3468191cded7Smrg
3469191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3470191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3471191cded7Smrg
3472191cded7Smrg	  # Commands to make compiler produce verbose output that lists
3473191cded7Smrg	  # what "hidden" libraries, object files and flags are used when
3474191cded7Smrg	  # linking a shared library.
3475191cded7Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3476191cded7Smrg
3477191cded7Smrg	else
3478191cded7Smrg	  # FIXME: insert proper C++ library support
3479191cded7Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3480191cded7Smrg	fi
3481191cded7Smrg	;;
3482191cded7Smrg    esac
3483191cded7Smrg    ;;
3484191cded7Smrg  osf4* | osf5*)
3485191cded7Smrg    case $cc_basename in
3486191cded7Smrg      KCC*)
3487191cded7Smrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3488191cded7Smrg
3489191cded7Smrg	# KCC will only create a shared library if the output file
3490191cded7Smrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3491191cded7Smrg	# to its proper name (with version) after linking.
3492191cded7Smrg	_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'
3493191cded7Smrg
3494191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3495191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3496191cded7Smrg
3497191cded7Smrg	# Archives containing C++ object files must be created using
3498191cded7Smrg	# the KAI C++ compiler.
3499191cded7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3500191cded7Smrg	;;
3501191cded7Smrg      RCC*)
3502191cded7Smrg	# Rational C++ 2.4.1
3503191cded7Smrg	# FIXME: insert proper C++ library support
3504191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3505191cded7Smrg	;;
3506191cded7Smrg      cxx*)
3507191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3508191cded7Smrg	_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'
3509191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3510191cded7Smrg	  echo "-hidden">> $lib.exp~
3511191cded7Smrg	  $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~
3512191cded7Smrg	  $rm $lib.exp'
3513191cded7Smrg
3514191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3515191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3516191cded7Smrg
3517191cded7Smrg	# Commands to make compiler produce verbose output that lists
3518191cded7Smrg	# what "hidden" libraries, object files and flags are used when
3519191cded7Smrg	# linking a shared library.
3520191cded7Smrg	#
3521191cded7Smrg	# There doesn't appear to be a way to prevent this compiler from
3522191cded7Smrg	# explicitly linking system object files so we need to strip them
3523191cded7Smrg	# from the output so that they don't get included in the library
3524191cded7Smrg	# dependencies.
3525191cded7Smrg	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'
3526191cded7Smrg	;;
3527191cded7Smrg      *)
3528191cded7Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3529191cded7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3530191cded7Smrg	 _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'
3531191cded7Smrg
3532191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3533191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3534191cded7Smrg
3535191cded7Smrg	  # Commands to make compiler produce verbose output that lists
3536191cded7Smrg	  # what "hidden" libraries, object files and flags are used when
3537191cded7Smrg	  # linking a shared library.
3538191cded7Smrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3539191cded7Smrg
3540191cded7Smrg	else
3541191cded7Smrg	  # FIXME: insert proper C++ library support
3542191cded7Smrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3543191cded7Smrg	fi
3544191cded7Smrg	;;
3545191cded7Smrg    esac
3546191cded7Smrg    ;;
3547191cded7Smrg  psos*)
3548191cded7Smrg    # FIXME: insert proper C++ library support
3549191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3550191cded7Smrg    ;;
3551191cded7Smrg  sunos4*)
3552191cded7Smrg    case $cc_basename in
3553191cded7Smrg      CC*)
3554191cded7Smrg	# Sun C++ 4.x
3555191cded7Smrg	# FIXME: insert proper C++ library support
3556191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3557191cded7Smrg	;;
3558191cded7Smrg      lcc*)
3559191cded7Smrg	# Lucid
3560191cded7Smrg	# FIXME: insert proper C++ library support
3561191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3562191cded7Smrg	;;
3563191cded7Smrg      *)
3564191cded7Smrg	# FIXME: insert proper C++ library support
3565191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3566191cded7Smrg	;;
3567191cded7Smrg    esac
3568191cded7Smrg    ;;
3569191cded7Smrg  solaris*)
3570191cded7Smrg    case $cc_basename in
3571191cded7Smrg      CC*)
3572191cded7Smrg	# Sun C++ 4.2, 5.x and Centerline C++
3573191cded7Smrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3574191cded7Smrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3575191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3576191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3577191cded7Smrg	$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'
3578191cded7Smrg
3579191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3580191cded7Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3581191cded7Smrg	case $host_os in
3582191cded7Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3583191cded7Smrg	  *)
3584191cded7Smrg	    # The C++ compiler is used as linker so we must use $wl
3585191cded7Smrg	    # flag to pass the commands to the underlying system
3586191cded7Smrg	    # linker. We must also pass each convience library through
3587191cded7Smrg	    # to the system linker between allextract/defaultextract.
3588191cded7Smrg	    # The C++ compiler will combine linker options so we
3589191cded7Smrg	    # cannot just pass the convience library names through
3590191cded7Smrg	    # without $wl.
3591191cded7Smrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3592191cded7Smrg	    _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'
3593191cded7Smrg	    ;;
3594191cded7Smrg	esac
3595191cded7Smrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3596191cded7Smrg
3597191cded7Smrg	output_verbose_link_cmd='echo'
3598191cded7Smrg
3599191cded7Smrg	# Archives containing C++ object files must be created using
3600191cded7Smrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3601191cded7Smrg	# necessary to make sure instantiated templates are included
3602191cded7Smrg	# in the archive.
3603191cded7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3604191cded7Smrg	;;
3605191cded7Smrg      gcx*)
3606191cded7Smrg	# Green Hills C++ Compiler
3607191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3608191cded7Smrg
3609191cded7Smrg	# The C++ compiler must be used to create the archive.
3610191cded7Smrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3611191cded7Smrg	;;
3612191cded7Smrg      *)
3613191cded7Smrg	# GNU C++ compiler with Solaris linker
3614191cded7Smrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3615191cded7Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3616191cded7Smrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3617191cded7Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3618191cded7Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3619191cded7Smrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3620191cded7Smrg
3621191cded7Smrg	    # Commands to make compiler produce verbose output that lists
3622191cded7Smrg	    # what "hidden" libraries, object files and flags are used when
3623191cded7Smrg	    # linking a shared library.
3624191cded7Smrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3625191cded7Smrg	  else
3626191cded7Smrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3627191cded7Smrg	    # platform.
3628191cded7Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3629191cded7Smrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3630191cded7Smrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3631191cded7Smrg
3632191cded7Smrg	    # Commands to make compiler produce verbose output that lists
3633191cded7Smrg	    # what "hidden" libraries, object files and flags are used when
3634191cded7Smrg	    # linking a shared library.
3635191cded7Smrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3636191cded7Smrg	  fi
3637191cded7Smrg
3638191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3639191cded7Smrg	fi
3640191cded7Smrg	;;
3641191cded7Smrg    esac
3642191cded7Smrg    ;;
3643191cded7Smrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3644191cded7Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3645191cded7Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3646191cded7Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3647191cded7Smrg    runpath_var='LD_RUN_PATH'
3648191cded7Smrg
3649191cded7Smrg    case $cc_basename in
3650191cded7Smrg      CC*)
3651191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3652191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3653191cded7Smrg	;;
3654191cded7Smrg      *)
3655191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3656191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3657191cded7Smrg	;;
3658191cded7Smrg    esac
3659191cded7Smrg    ;;
3660191cded7Smrg  sysv5* | sco3.2v5* | sco5v6*)
3661191cded7Smrg    # Note: We can NOT use -z defs as we might desire, because we do not
3662191cded7Smrg    # link with -lc, and that would cause any symbols used from libc to
3663191cded7Smrg    # always be unresolved, which means just about no library would
3664191cded7Smrg    # ever link correctly.  If we're not using GNU ld we use -z text
3665191cded7Smrg    # though, which does catch some bad symbols but isn't as heavy-handed
3666191cded7Smrg    # as -z defs.
3667191cded7Smrg    # For security reasons, it is highly recommended that you always
3668191cded7Smrg    # use absolute paths for naming shared libraries, and exclude the
3669191cded7Smrg    # DT_RUNPATH tag from executables and libraries.  But doing so
3670191cded7Smrg    # requires that you compile everything twice, which is a pain.
3671191cded7Smrg    # So that behaviour is only enabled if SCOABSPATH is set to a
3672191cded7Smrg    # non-empty value in the environment.  Most likely only useful for
3673191cded7Smrg    # creating official distributions of packages.
3674191cded7Smrg    # This is a hack until libtool officially supports absolute path
3675191cded7Smrg    # names for shared libraries.
3676191cded7Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3677191cded7Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3678191cded7Smrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3679191cded7Smrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3680191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3681191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3682191cded7Smrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3683191cded7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3684191cded7Smrg    runpath_var='LD_RUN_PATH'
3685191cded7Smrg
3686191cded7Smrg    case $cc_basename in
3687191cded7Smrg      CC*)
3688191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3689191cded7Smrg	_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'
3690191cded7Smrg	;;
3691191cded7Smrg      *)
3692191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3693191cded7Smrg	_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'
3694191cded7Smrg	;;
3695191cded7Smrg    esac
3696191cded7Smrg    ;;
3697191cded7Smrg  tandem*)
3698191cded7Smrg    case $cc_basename in
3699191cded7Smrg      NCC*)
3700191cded7Smrg	# NonStop-UX NCC 3.20
3701191cded7Smrg	# FIXME: insert proper C++ library support
3702191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3703191cded7Smrg	;;
3704191cded7Smrg      *)
3705191cded7Smrg	# FIXME: insert proper C++ library support
3706191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3707191cded7Smrg	;;
3708191cded7Smrg    esac
3709191cded7Smrg    ;;
3710191cded7Smrg  vxworks*)
3711191cded7Smrg    # FIXME: insert proper C++ library support
3712191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3713191cded7Smrg    ;;
3714191cded7Smrg  *)
3715191cded7Smrg    # FIXME: insert proper C++ library support
3716191cded7Smrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3717191cded7Smrg    ;;
3718191cded7Smrgesac
3719191cded7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3720191cded7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3721191cded7Smrg
3722191cded7Smrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
3723191cded7Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
3724191cded7Smrg
3725191cded7SmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
3726191cded7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3727191cded7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
3728191cded7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3729191cded7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3730191cded7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3731191cded7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3732191cded7Smrg
3733191cded7SmrgAC_LIBTOOL_CONFIG($1)
3734191cded7Smrg
3735191cded7SmrgAC_LANG_POP
3736191cded7SmrgCC=$lt_save_CC
3737191cded7SmrgLDCXX=$LD
3738191cded7SmrgLD=$lt_save_LD
3739191cded7SmrgGCC=$lt_save_GCC
3740191cded7Smrgwith_gnu_ldcxx=$with_gnu_ld
3741191cded7Smrgwith_gnu_ld=$lt_save_with_gnu_ld
3742191cded7Smrglt_cv_path_LDCXX=$lt_cv_path_LD
3743191cded7Smrglt_cv_path_LD=$lt_save_path_LD
3744191cded7Smrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3745191cded7Smrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3746191cded7Smrg])# AC_LIBTOOL_LANG_CXX_CONFIG
3747191cded7Smrg
3748191cded7Smrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3749191cded7Smrg# ------------------------------------
3750191cded7Smrg# Figure out "hidden" library dependencies from verbose
3751191cded7Smrg# compiler output when linking a shared library.
3752191cded7Smrg# Parse the compiler output and extract the necessary
3753191cded7Smrg# objects, libraries and library flags.
3754191cded7SmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3755191cded7Smrgdnl we can't use the lt_simple_compile_test_code here,
3756191cded7Smrgdnl because it contains code intended for an executable,
3757191cded7Smrgdnl not a library.  It's possible we should let each
3758191cded7Smrgdnl tag define a new lt_????_link_test_code variable,
3759191cded7Smrgdnl but it's only used here...
3760191cded7Smrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3761191cded7Smrgint a;
3762191cded7Smrgvoid foo (void) { a = 0; }
3763191cded7SmrgEOF
3764191cded7Smrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3765191cded7Smrgclass Foo
3766191cded7Smrg{
3767191cded7Smrgpublic:
3768191cded7Smrg  Foo (void) { a = 0; }
3769191cded7Smrgprivate:
3770191cded7Smrg  int a;
3771191cded7Smrg};
3772191cded7SmrgEOF
3773191cded7Smrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3774191cded7Smrg      subroutine foo
3775191cded7Smrg      implicit none
3776191cded7Smrg      integer*4 a
3777191cded7Smrg      a=0
3778191cded7Smrg      return
3779191cded7Smrg      end
3780191cded7SmrgEOF
3781191cded7Smrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3782191cded7Smrgpublic class foo {
3783191cded7Smrg  private int a;
3784191cded7Smrg  public void bar (void) {
3785191cded7Smrg    a = 0;
3786191cded7Smrg  }
3787191cded7Smrg};
3788191cded7SmrgEOF
3789191cded7Smrg])
3790191cded7Smrgdnl Parse the compiler output and extract the necessary
3791191cded7Smrgdnl objects, libraries and library flags.
3792191cded7Smrgif AC_TRY_EVAL(ac_compile); then
3793191cded7Smrg  # Parse the compiler output and extract the necessary
3794191cded7Smrg  # objects, libraries and library flags.
3795191cded7Smrg
3796191cded7Smrg  # Sentinel used to keep track of whether or not we are before
3797191cded7Smrg  # the conftest object file.
3798191cded7Smrg  pre_test_object_deps_done=no
3799191cded7Smrg
3800191cded7Smrg  # The `*' in the case matches for architectures that use `case' in
3801191cded7Smrg  # $output_verbose_cmd can trigger glob expansion during the loop
3802191cded7Smrg  # eval without this substitution.
3803191cded7Smrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3804191cded7Smrg
3805191cded7Smrg  for p in `eval $output_verbose_link_cmd`; do
3806191cded7Smrg    case $p in
3807191cded7Smrg
3808191cded7Smrg    -L* | -R* | -l*)
3809191cded7Smrg       # Some compilers place space between "-{L,R}" and the path.
3810191cded7Smrg       # Remove the space.
3811191cded7Smrg       if test $p = "-L" \
3812191cded7Smrg	  || test $p = "-R"; then
3813191cded7Smrg	 prev=$p
3814191cded7Smrg	 continue
3815191cded7Smrg       else
3816191cded7Smrg	 prev=
3817191cded7Smrg       fi
3818191cded7Smrg
3819191cded7Smrg       if test "$pre_test_object_deps_done" = no; then
3820191cded7Smrg	 case $p in
3821191cded7Smrg	 -L* | -R*)
3822191cded7Smrg	   # Internal compiler library paths should come after those
3823191cded7Smrg	   # provided the user.  The postdeps already come after the
3824191cded7Smrg	   # user supplied libs so there is no need to process them.
3825191cded7Smrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3826191cded7Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3827191cded7Smrg	   else
3828191cded7Smrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3829191cded7Smrg	   fi
3830191cded7Smrg	   ;;
3831191cded7Smrg	 # The "-l" case would never come before the object being
3832191cded7Smrg	 # linked, so don't bother handling this case.
3833191cded7Smrg	 esac
3834191cded7Smrg       else
3835191cded7Smrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3836191cded7Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3837191cded7Smrg	 else
3838191cded7Smrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3839191cded7Smrg	 fi
3840191cded7Smrg       fi
3841191cded7Smrg       ;;
3842191cded7Smrg
3843191cded7Smrg    *.$objext)
3844191cded7Smrg       # This assumes that the test object file only shows up
3845191cded7Smrg       # once in the compiler output.
3846191cded7Smrg       if test "$p" = "conftest.$objext"; then
3847191cded7Smrg	 pre_test_object_deps_done=yes
3848191cded7Smrg	 continue
3849191cded7Smrg       fi
3850191cded7Smrg
3851191cded7Smrg       if test "$pre_test_object_deps_done" = no; then
3852191cded7Smrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3853191cded7Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3854191cded7Smrg	 else
3855191cded7Smrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3856191cded7Smrg	 fi
3857191cded7Smrg       else
3858191cded7Smrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3859191cded7Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3860191cded7Smrg	 else
3861191cded7Smrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3862191cded7Smrg	 fi
3863191cded7Smrg       fi
3864191cded7Smrg       ;;
3865191cded7Smrg
3866191cded7Smrg    *) ;; # Ignore the rest.
3867191cded7Smrg
3868191cded7Smrg    esac
3869191cded7Smrg  done
3870191cded7Smrg
3871191cded7Smrg  # Clean up.
3872191cded7Smrg  rm -f a.out a.exe
3873191cded7Smrgelse
3874191cded7Smrg  echo "libtool.m4: error: problem compiling $1 test program"
3875191cded7Smrgfi
3876191cded7Smrg
3877191cded7Smrg$rm -f confest.$objext
3878191cded7Smrg
3879191cded7Smrg# PORTME: override above test on systems where it is broken
3880191cded7Smrgifelse([$1],[CXX],
3881191cded7Smrg[case $host_os in
3882191cded7Smrginterix3*)
3883191cded7Smrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3884191cded7Smrg  # hack all around it, let's just trust "g++" to DTRT.
3885191cded7Smrg  _LT_AC_TAGVAR(predep_objects,$1)=
3886191cded7Smrg  _LT_AC_TAGVAR(postdep_objects,$1)=
3887191cded7Smrg  _LT_AC_TAGVAR(postdeps,$1)=
3888191cded7Smrg  ;;
3889191cded7Smrg
3890191cded7Smrgsolaris*)
3891191cded7Smrg  case $cc_basename in
3892191cded7Smrg  CC*)
3893191cded7Smrg    # Adding this requires a known-good setup of shared libraries for
3894191cded7Smrg    # Sun compiler versions before 5.6, else PIC objects from an old
3895191cded7Smrg    # archive will be linked into the output, leading to subtle bugs.
3896191cded7Smrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3897191cded7Smrg    ;;
3898191cded7Smrg  esac
3899191cded7Smrg  ;;
3900191cded7Smrgesac
3901191cded7Smrg])
3902191cded7Smrg
3903191cded7Smrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
3904191cded7Smrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3905191cded7Smrgesac
3906191cded7Smrg])# AC_LIBTOOL_POSTDEP_PREDEP
3907191cded7Smrg
3908191cded7Smrg# AC_LIBTOOL_LANG_F77_CONFIG
3909191cded7Smrg# --------------------------
3910191cded7Smrg# Ensure that the configuration vars for the C compiler are
3911191cded7Smrg# suitably defined.  Those variables are subsequently used by
3912191cded7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3913191cded7SmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3914191cded7SmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3915191cded7Smrg[AC_REQUIRE([AC_PROG_F77])
3916191cded7SmrgAC_LANG_PUSH(Fortran 77)
3917191cded7Smrg
3918191cded7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3919191cded7Smrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3920191cded7Smrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
3921191cded7Smrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3922191cded7Smrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3923191cded7Smrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
3924191cded7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3925191cded7Smrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3926191cded7Smrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3927191cded7Smrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3928191cded7Smrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3929191cded7Smrg_LT_AC_TAGVAR(module_cmds, $1)=
3930191cded7Smrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3931191cded7Smrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3932191cded7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3933191cded7Smrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
3934191cded7Smrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3935191cded7Smrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3936191cded7Smrg
3937191cded7Smrg# Source file extension for f77 test sources.
3938191cded7Smrgac_ext=f
3939191cded7Smrg
3940191cded7Smrg# Object file extension for compiled f77 test sources.
3941191cded7Smrgobjext=o
3942191cded7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
3943191cded7Smrg
3944191cded7Smrg# Code to be used in simple compile tests
3945191cded7Smrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
3946191cded7Smrg
3947191cded7Smrg# Code to be used in simple link tests
3948191cded7Smrglt_simple_link_test_code="      program t\n      end\n"
3949191cded7Smrg
3950191cded7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3951191cded7Smrg_LT_AC_SYS_COMPILER
3952191cded7Smrg
3953191cded7Smrg# save warnings/boilerplate of simple test code
3954191cded7Smrg_LT_COMPILER_BOILERPLATE
3955191cded7Smrg_LT_LINKER_BOILERPLATE
3956191cded7Smrg
3957191cded7Smrg# Allow CC to be a program name with arguments.
3958191cded7Smrglt_save_CC="$CC"
3959191cded7SmrgCC=${F77-"f77"}
3960191cded7Smrgcompiler=$CC
3961191cded7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
3962191cded7Smrg_LT_CC_BASENAME([$compiler])
3963191cded7Smrg
3964191cded7SmrgAC_MSG_CHECKING([if libtool supports shared libraries])
3965191cded7SmrgAC_MSG_RESULT([$can_build_shared])
3966191cded7Smrg
3967191cded7SmrgAC_MSG_CHECKING([whether to build shared libraries])
3968191cded7Smrgtest "$can_build_shared" = "no" && enable_shared=no
3969191cded7Smrg
3970191cded7Smrg# On AIX, shared libraries and static libraries use the same namespace, and
3971191cded7Smrg# are all built from PIC.
3972191cded7Smrgcase $host_os in
3973191cded7Smrgaix3*)
3974191cded7Smrg  test "$enable_shared" = yes && enable_static=no
3975191cded7Smrg  if test -n "$RANLIB"; then
3976191cded7Smrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3977191cded7Smrg    postinstall_cmds='$RANLIB $lib'
3978191cded7Smrg  fi
3979191cded7Smrg  ;;
3980191cded7Smrgaix4* | aix5*)
3981191cded7Smrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3982191cded7Smrg    test "$enable_shared" = yes && enable_static=no
3983191cded7Smrg  fi
3984191cded7Smrg  ;;
3985191cded7Smrgesac
3986191cded7SmrgAC_MSG_RESULT([$enable_shared])
3987191cded7Smrg
3988191cded7SmrgAC_MSG_CHECKING([whether to build static libraries])
3989191cded7Smrg# Make sure either enable_shared or enable_static is yes.
3990191cded7Smrgtest "$enable_shared" = yes || enable_static=yes
3991191cded7SmrgAC_MSG_RESULT([$enable_static])
3992191cded7Smrg
3993191cded7Smrg_LT_AC_TAGVAR(GCC, $1)="$G77"
3994191cded7Smrg_LT_AC_TAGVAR(LD, $1)="$LD"
3995191cded7Smrg
3996191cded7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3997191cded7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
3998191cded7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3999191cded7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4000191cded7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4001191cded7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4002191cded7Smrg
4003191cded7SmrgAC_LIBTOOL_CONFIG($1)
4004191cded7Smrg
4005191cded7SmrgAC_LANG_POP
4006191cded7SmrgCC="$lt_save_CC"
4007191cded7Smrg])# AC_LIBTOOL_LANG_F77_CONFIG
4008191cded7Smrg
4009191cded7Smrg
4010191cded7Smrg# AC_LIBTOOL_LANG_GCJ_CONFIG
4011191cded7Smrg# --------------------------
4012191cded7Smrg# Ensure that the configuration vars for the C compiler are
4013191cded7Smrg# suitably defined.  Those variables are subsequently used by
4014191cded7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4015191cded7SmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4016191cded7SmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4017191cded7Smrg[AC_LANG_SAVE
4018191cded7Smrg
4019191cded7Smrg# Source file extension for Java test sources.
4020191cded7Smrgac_ext=java
4021191cded7Smrg
4022191cded7Smrg# Object file extension for compiled Java test sources.
4023191cded7Smrgobjext=o
4024191cded7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
4025191cded7Smrg
4026191cded7Smrg# Code to be used in simple compile tests
4027191cded7Smrglt_simple_compile_test_code="class foo {}\n"
4028191cded7Smrg
4029191cded7Smrg# Code to be used in simple link tests
4030191cded7Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4031191cded7Smrg
4032191cded7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4033191cded7Smrg_LT_AC_SYS_COMPILER
4034191cded7Smrg
4035191cded7Smrg# save warnings/boilerplate of simple test code
4036191cded7Smrg_LT_COMPILER_BOILERPLATE
4037191cded7Smrg_LT_LINKER_BOILERPLATE
4038191cded7Smrg
4039191cded7Smrg# Allow CC to be a program name with arguments.
4040191cded7Smrglt_save_CC="$CC"
4041191cded7SmrgCC=${GCJ-"gcj"}
4042191cded7Smrgcompiler=$CC
4043191cded7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
4044191cded7Smrg_LT_CC_BASENAME([$compiler])
4045191cded7Smrg
4046191cded7Smrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
4047191cded7Smrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4048191cded7Smrg
4049191cded7Smrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4050191cded7Smrg
4051191cded7SmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4052191cded7SmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4053191cded7SmrgAC_LIBTOOL_PROG_CC_C_O($1)
4054191cded7SmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4055191cded7SmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4056191cded7SmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4057191cded7SmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4058191cded7Smrg
4059191cded7SmrgAC_LIBTOOL_CONFIG($1)
4060191cded7Smrg
4061191cded7SmrgAC_LANG_RESTORE
4062191cded7SmrgCC="$lt_save_CC"
4063191cded7Smrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
4064191cded7Smrg
4065191cded7Smrg
4066191cded7Smrg# AC_LIBTOOL_LANG_RC_CONFIG
4067191cded7Smrg# -------------------------
4068191cded7Smrg# Ensure that the configuration vars for the Windows resource compiler are
4069191cded7Smrg# suitably defined.  Those variables are subsequently used by
4070191cded7Smrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4071191cded7SmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4072191cded7SmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4073191cded7Smrg[AC_LANG_SAVE
4074191cded7Smrg
4075191cded7Smrg# Source file extension for RC test sources.
4076191cded7Smrgac_ext=rc
4077191cded7Smrg
4078191cded7Smrg# Object file extension for compiled RC test sources.
4079191cded7Smrgobjext=o
4080191cded7Smrg_LT_AC_TAGVAR(objext, $1)=$objext
4081191cded7Smrg
4082191cded7Smrg# Code to be used in simple compile tests
4083191cded7Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4084191cded7Smrg
4085191cded7Smrg# Code to be used in simple link tests
4086191cded7Smrglt_simple_link_test_code="$lt_simple_compile_test_code"
4087191cded7Smrg
4088191cded7Smrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4089191cded7Smrg_LT_AC_SYS_COMPILER
4090191cded7Smrg
4091191cded7Smrg# save warnings/boilerplate of simple test code
4092191cded7Smrg_LT_COMPILER_BOILERPLATE
4093191cded7Smrg_LT_LINKER_BOILERPLATE
4094191cded7Smrg
4095191cded7Smrg# Allow CC to be a program name with arguments.
4096191cded7Smrglt_save_CC="$CC"
4097191cded7SmrgCC=${RC-"windres"}
4098191cded7Smrgcompiler=$CC
4099191cded7Smrg_LT_AC_TAGVAR(compiler, $1)=$CC
4100191cded7Smrg_LT_CC_BASENAME([$compiler])
4101191cded7Smrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4102191cded7Smrg
4103191cded7SmrgAC_LIBTOOL_CONFIG($1)
4104191cded7Smrg
4105191cded7SmrgAC_LANG_RESTORE
4106191cded7SmrgCC="$lt_save_CC"
4107191cded7Smrg])# AC_LIBTOOL_LANG_RC_CONFIG
4108191cded7Smrg
4109191cded7Smrg
4110191cded7Smrg# AC_LIBTOOL_CONFIG([TAGNAME])
4111191cded7Smrg# ----------------------------
4112191cded7Smrg# If TAGNAME is not passed, then create an initial libtool script
4113191cded7Smrg# with a default configuration from the untagged config vars.  Otherwise
4114191cded7Smrg# add code to config.status for appending the configuration named by
4115191cded7Smrg# TAGNAME from the matching tagged config vars.
4116191cded7SmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
4117191cded7Smrg[# The else clause should only fire when bootstrapping the
4118191cded7Smrg# libtool distribution, otherwise you forgot to ship ltmain.sh
4119191cded7Smrg# with your package, and you will get complaints that there are
4120191cded7Smrg# no rules to generate ltmain.sh.
4121191cded7Smrgif test -f "$ltmain"; then
4122191cded7Smrg  # See if we are running on zsh, and set the options which allow our commands through
4123191cded7Smrg  # without removal of \ escapes.
4124191cded7Smrg  if test -n "${ZSH_VERSION+set}" ; then
4125191cded7Smrg    setopt NO_GLOB_SUBST
4126191cded7Smrg  fi
4127191cded7Smrg  # Now quote all the things that may contain metacharacters while being
4128191cded7Smrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4129191cded7Smrg  # variables and quote the copies for generation of the libtool script.
4130191cded7Smrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4131191cded7Smrg    SED SHELL STRIP \
4132191cded7Smrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4133191cded7Smrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4134191cded7Smrg    deplibs_check_method reload_flag reload_cmds need_locks \
4135191cded7Smrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4136191cded7Smrg    lt_cv_sys_global_symbol_to_c_name_address \
4137191cded7Smrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4138191cded7Smrg    old_postinstall_cmds old_postuninstall_cmds \
4139191cded7Smrg    _LT_AC_TAGVAR(compiler, $1) \
4140191cded7Smrg    _LT_AC_TAGVAR(CC, $1) \
4141191cded7Smrg    _LT_AC_TAGVAR(LD, $1) \
4142191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4143191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4144191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4145191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4146191cded7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4147191cded7Smrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4148191cded7Smrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4149191cded7Smrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4150191cded7Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4151191cded7Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4152191cded7Smrg    _LT_AC_TAGVAR(predep_objects, $1) \
4153191cded7Smrg    _LT_AC_TAGVAR(postdep_objects, $1) \
4154191cded7Smrg    _LT_AC_TAGVAR(predeps, $1) \
4155191cded7Smrg    _LT_AC_TAGVAR(postdeps, $1) \
4156191cded7Smrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4157191cded7Smrg    _LT_AC_TAGVAR(archive_cmds, $1) \
4158191cded7Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4159191cded7Smrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4160191cded7Smrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4161191cded7Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4162191cded7Smrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4163191cded7Smrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4164191cded7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4165191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4166191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4167191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4168191cded7Smrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4169191cded7Smrg    _LT_AC_TAGVAR(module_cmds, $1) \
4170191cded7Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4171191cded7Smrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4172191cded7Smrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4173191cded7Smrg    _LT_AC_TAGVAR(include_expsyms, $1); do
4174191cded7Smrg
4175191cded7Smrg    case $var in
4176191cded7Smrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4177191cded7Smrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4178191cded7Smrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
4179191cded7Smrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4180191cded7Smrg    _LT_AC_TAGVAR(module_cmds, $1) | \
4181191cded7Smrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4182191cded7Smrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4183191cded7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4184191cded7Smrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4185191cded7Smrg    postinstall_cmds | postuninstall_cmds | \
4186191cded7Smrg    old_postinstall_cmds | old_postuninstall_cmds | \
4187191cded7Smrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4188191cded7Smrg      # Double-quote double-evaled strings.
4189191cded7Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4190191cded7Smrg      ;;
4191191cded7Smrg    *)
4192191cded7Smrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4193191cded7Smrg      ;;
4194191cded7Smrg    esac
4195191cded7Smrg  done
4196191cded7Smrg
4197191cded7Smrg  case $lt_echo in
4198191cded7Smrg  *'\[$]0 --fallback-echo"')
4199191cded7Smrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4200191cded7Smrg    ;;
4201191cded7Smrg  esac
4202191cded7Smrg
4203191cded7Smrgifelse([$1], [],
4204191cded7Smrg  [cfgfile="${ofile}T"
4205191cded7Smrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4206191cded7Smrg  $rm -f "$cfgfile"
4207191cded7Smrg  AC_MSG_NOTICE([creating $ofile])],
4208191cded7Smrg  [cfgfile="$ofile"])
4209191cded7Smrg
4210191cded7Smrg  cat <<__EOF__ >> "$cfgfile"
4211191cded7Smrgifelse([$1], [],
4212191cded7Smrg[#! $SHELL
4213191cded7Smrg
4214191cded7Smrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4215191cded7Smrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4216191cded7Smrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4217191cded7Smrg#
4218191cded7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4219191cded7Smrg# Free Software Foundation, Inc.
4220191cded7Smrg#
4221191cded7Smrg# This file is part of GNU Libtool:
4222191cded7Smrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4223191cded7Smrg#
4224191cded7Smrg# This program is free software; you can redistribute it and/or modify
4225191cded7Smrg# it under the terms of the GNU General Public License as published by
4226191cded7Smrg# the Free Software Foundation; either version 2 of the License, or
4227191cded7Smrg# (at your option) any later version.
4228191cded7Smrg#
4229191cded7Smrg# This program is distributed in the hope that it will be useful, but
4230191cded7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
4231191cded7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4232191cded7Smrg# General Public License for more details.
4233191cded7Smrg#
4234191cded7Smrg# You should have received a copy of the GNU General Public License
4235191cded7Smrg# along with this program; if not, write to the Free Software
4236191cded7Smrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4237191cded7Smrg#
4238191cded7Smrg# As a special exception to the GNU General Public License, if you
4239191cded7Smrg# distribute this file as part of a program that contains a
4240191cded7Smrg# configuration script generated by Autoconf, you may include it under
4241191cded7Smrg# the same distribution terms that you use for the rest of that program.
4242191cded7Smrg
4243191cded7Smrg# A sed program that does not truncate output.
4244191cded7SmrgSED=$lt_SED
4245191cded7Smrg
4246191cded7Smrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4247191cded7SmrgXsed="$SED -e 1s/^X//"
4248191cded7Smrg
4249191cded7Smrg# The HP-UX ksh and POSIX shell print the target directory to stdout
4250191cded7Smrg# if CDPATH is set.
4251191cded7Smrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4252191cded7Smrg
4253191cded7Smrg# The names of the tagged configurations supported by this script.
4254191cded7Smrgavailable_tags=
4255191cded7Smrg
4256191cded7Smrg# ### BEGIN LIBTOOL CONFIG],
4257191cded7Smrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4258191cded7Smrg
4259191cded7Smrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4260191cded7Smrg
4261191cded7Smrg# Shell to use when invoking shell scripts.
4262191cded7SmrgSHELL=$lt_SHELL
4263191cded7Smrg
4264191cded7Smrg# Whether or not to build shared libraries.
4265191cded7Smrgbuild_libtool_libs=$enable_shared
4266191cded7Smrg
4267191cded7Smrg# Whether or not to build static libraries.
4268191cded7Smrgbuild_old_libs=$enable_static
4269191cded7Smrg
4270191cded7Smrg# Whether or not to add -lc for building shared libraries.
4271191cded7Smrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4272191cded7Smrg
4273191cded7Smrg# Whether or not to disallow shared libs when runtime libs are static
4274191cded7Smrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4275191cded7Smrg
4276191cded7Smrg# Whether or not to optimize for fast installation.
4277191cded7Smrgfast_install=$enable_fast_install
4278191cded7Smrg
4279191cded7Smrg# The host system.
4280191cded7Smrghost_alias=$host_alias
4281191cded7Smrghost=$host
4282191cded7Smrghost_os=$host_os
4283191cded7Smrg
4284191cded7Smrg# The build system.
4285191cded7Smrgbuild_alias=$build_alias
4286191cded7Smrgbuild=$build
4287191cded7Smrgbuild_os=$build_os
4288191cded7Smrg
4289191cded7Smrg# An echo program that does not interpret backslashes.
4290191cded7Smrgecho=$lt_echo
4291191cded7Smrg
4292191cded7Smrg# The archiver.
4293191cded7SmrgAR=$lt_AR
4294191cded7SmrgAR_FLAGS=$lt_AR_FLAGS
4295191cded7Smrg
4296191cded7Smrg# A C compiler.
4297191cded7SmrgLTCC=$lt_LTCC
4298191cded7Smrg
4299191cded7Smrg# LTCC compiler flags.
4300191cded7SmrgLTCFLAGS=$lt_LTCFLAGS
4301191cded7Smrg
4302191cded7Smrg# A language-specific compiler.
4303191cded7SmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4304191cded7Smrg
4305191cded7Smrg# Is the compiler the GNU C compiler?
4306191cded7Smrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4307191cded7Smrg
4308191cded7Smrg# An ERE matcher.
4309191cded7SmrgEGREP=$lt_EGREP
4310191cded7Smrg
4311191cded7Smrg# The linker used to build libraries.
4312191cded7SmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4313191cded7Smrg
4314191cded7Smrg# Whether we need hard or soft links.
4315191cded7SmrgLN_S=$lt_LN_S
4316191cded7Smrg
4317191cded7Smrg# A BSD-compatible nm program.
4318191cded7SmrgNM=$lt_NM
4319191cded7Smrg
4320191cded7Smrg# A symbol stripping program
4321191cded7SmrgSTRIP=$lt_STRIP
4322191cded7Smrg
4323191cded7Smrg# Used to examine libraries when file_magic_cmd begins "file"
4324191cded7SmrgMAGIC_CMD=$MAGIC_CMD
4325191cded7Smrg
4326191cded7Smrg# Used on cygwin: DLL creation program.
4327191cded7SmrgDLLTOOL="$DLLTOOL"
4328191cded7Smrg
4329191cded7Smrg# Used on cygwin: object dumper.
4330191cded7SmrgOBJDUMP="$OBJDUMP"
4331191cded7Smrg
4332191cded7Smrg# Used on cygwin: assembler.
4333191cded7SmrgAS="$AS"
4334191cded7Smrg
4335191cded7Smrg# The name of the directory that contains temporary libtool files.
4336191cded7Smrgobjdir=$objdir
4337191cded7Smrg
4338191cded7Smrg# How to create reloadable object files.
4339191cded7Smrgreload_flag=$lt_reload_flag
4340191cded7Smrgreload_cmds=$lt_reload_cmds
4341191cded7Smrg
4342191cded7Smrg# How to pass a linker flag through the compiler.
4343191cded7Smrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4344191cded7Smrg
4345191cded7Smrg# Object file suffix (normally "o").
4346191cded7Smrgobjext="$ac_objext"
4347191cded7Smrg
4348191cded7Smrg# Old archive suffix (normally "a").
4349191cded7Smrglibext="$libext"
4350191cded7Smrg
4351191cded7Smrg# Shared library suffix (normally ".so").
4352191cded7Smrgshrext_cmds='$shrext_cmds'
4353191cded7Smrg
4354191cded7Smrg# Executable file suffix (normally "").
4355191cded7Smrgexeext="$exeext"
4356191cded7Smrg
4357191cded7Smrg# Additional compiler flags for building library objects.
4358191cded7Smrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4359191cded7Smrgpic_mode=$pic_mode
4360191cded7Smrg
4361191cded7Smrg# What is the maximum length of a command?
4362191cded7Smrgmax_cmd_len=$lt_cv_sys_max_cmd_len
4363191cded7Smrg
4364191cded7Smrg# Does compiler simultaneously support -c and -o options?
4365191cded7Smrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4366191cded7Smrg
4367191cded7Smrg# Must we lock files when doing compilation?
4368191cded7Smrgneed_locks=$lt_need_locks
4369191cded7Smrg
4370191cded7Smrg# Do we need the lib prefix for modules?
4371191cded7Smrgneed_lib_prefix=$need_lib_prefix
4372191cded7Smrg
4373191cded7Smrg# Do we need a version for libraries?
4374191cded7Smrgneed_version=$need_version
4375191cded7Smrg
4376191cded7Smrg# Whether dlopen is supported.
4377191cded7Smrgdlopen_support=$enable_dlopen
4378191cded7Smrg
4379191cded7Smrg# Whether dlopen of programs is supported.
4380191cded7Smrgdlopen_self=$enable_dlopen_self
4381191cded7Smrg
4382191cded7Smrg# Whether dlopen of statically linked programs is supported.
4383191cded7Smrgdlopen_self_static=$enable_dlopen_self_static
4384191cded7Smrg
4385191cded7Smrg# Compiler flag to prevent dynamic linking.
4386191cded7Smrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4387191cded7Smrg
4388191cded7Smrg# Compiler flag to turn off builtin functions.
4389191cded7Smrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4390191cded7Smrg
4391191cded7Smrg# Compiler flag to allow reflexive dlopens.
4392191cded7Smrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4393191cded7Smrg
4394191cded7Smrg# Compiler flag to generate shared objects directly from archives.
4395191cded7Smrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4396191cded7Smrg
4397191cded7Smrg# Compiler flag to generate thread-safe objects.
4398191cded7Smrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4399191cded7Smrg
4400191cded7Smrg# Library versioning type.
4401191cded7Smrgversion_type=$version_type
4402191cded7Smrg
4403191cded7Smrg# Format of library name prefix.
4404191cded7Smrglibname_spec=$lt_libname_spec
4405191cded7Smrg
4406191cded7Smrg# List of archive names.  First name is the real one, the rest are links.
4407191cded7Smrg# The last name is the one that the linker finds with -lNAME.
4408191cded7Smrglibrary_names_spec=$lt_library_names_spec
4409191cded7Smrg
4410191cded7Smrg# The coded name of the library, if different from the real name.
4411191cded7Smrgsoname_spec=$lt_soname_spec
4412191cded7Smrg
4413191cded7Smrg# Commands used to build and install an old-style archive.
4414191cded7SmrgRANLIB=$lt_RANLIB
4415191cded7Smrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4416191cded7Smrgold_postinstall_cmds=$lt_old_postinstall_cmds
4417191cded7Smrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
4418191cded7Smrg
4419191cded7Smrg# Create an old-style archive from a shared archive.
4420191cded7Smrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4421191cded7Smrg
4422191cded7Smrg# Create a temporary old-style archive to link instead of a shared archive.
4423191cded7Smrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4424191cded7Smrg
4425191cded7Smrg# Commands used to build and install a shared archive.
4426191cded7Smrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4427191cded7Smrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4428191cded7Smrgpostinstall_cmds=$lt_postinstall_cmds
4429191cded7Smrgpostuninstall_cmds=$lt_postuninstall_cmds
4430191cded7Smrg
4431191cded7Smrg# Commands used to build a loadable module (assumed same as above if empty)
4432191cded7Smrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4433191cded7Smrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4434191cded7Smrg
4435191cded7Smrg# Commands to strip libraries.
4436191cded7Smrgold_striplib=$lt_old_striplib
4437191cded7Smrgstriplib=$lt_striplib
4438191cded7Smrg
4439191cded7Smrg# Dependencies to place before the objects being linked to create a
4440191cded7Smrg# shared library.
4441191cded7Smrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4442191cded7Smrg
4443191cded7Smrg# Dependencies to place after the objects being linked to create a
4444191cded7Smrg# shared library.
4445191cded7Smrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4446191cded7Smrg
4447191cded7Smrg# Dependencies to place before the objects being linked to create a
4448191cded7Smrg# shared library.
4449191cded7Smrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4450191cded7Smrg
4451191cded7Smrg# Dependencies to place after the objects being linked to create a
4452191cded7Smrg# shared library.
4453191cded7Smrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4454191cded7Smrg
4455191cded7Smrg# The library search path used internally by the compiler when linking
4456191cded7Smrg# a shared library.
4457191cded7Smrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4458191cded7Smrg
4459191cded7Smrg# Method to check whether dependent libraries are shared objects.
4460191cded7Smrgdeplibs_check_method=$lt_deplibs_check_method
4461191cded7Smrg
4462191cded7Smrg# Command to use when deplibs_check_method == file_magic.
4463191cded7Smrgfile_magic_cmd=$lt_file_magic_cmd
4464191cded7Smrg
4465191cded7Smrg# Flag that allows shared libraries with undefined symbols to be built.
4466191cded7Smrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4467191cded7Smrg
4468191cded7Smrg# Flag that forces no undefined symbols.
4469191cded7Smrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4470191cded7Smrg
4471191cded7Smrg# Commands used to finish a libtool library installation in a directory.
4472191cded7Smrgfinish_cmds=$lt_finish_cmds
4473191cded7Smrg
4474191cded7Smrg# Same as above, but a single script fragment to be evaled but not shown.
4475191cded7Smrgfinish_eval=$lt_finish_eval
4476191cded7Smrg
4477191cded7Smrg# Take the output of nm and produce a listing of raw symbols and C names.
4478191cded7Smrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4479191cded7Smrg
4480191cded7Smrg# Transform the output of nm in a proper C declaration
4481191cded7Smrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4482191cded7Smrg
4483191cded7Smrg# Transform the output of nm in a C name address pair
4484191cded7Smrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4485191cded7Smrg
4486191cded7Smrg# This is the shared library runtime path variable.
4487191cded7Smrgrunpath_var=$runpath_var
4488191cded7Smrg
4489191cded7Smrg# This is the shared library path variable.
4490191cded7Smrgshlibpath_var=$shlibpath_var
4491191cded7Smrg
4492191cded7Smrg# Is shlibpath searched before the hard-coded library search path?
4493191cded7Smrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
4494191cded7Smrg
4495191cded7Smrg# How to hardcode a shared library path into an executable.
4496191cded7Smrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4497191cded7Smrg
4498191cded7Smrg# Whether we should hardcode library paths into libraries.
4499191cded7Smrghardcode_into_libs=$hardcode_into_libs
4500191cded7Smrg
4501191cded7Smrg# Flag to hardcode \$libdir into a binary during linking.
4502191cded7Smrg# This must work even if \$libdir does not exist.
4503191cded7Smrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4504191cded7Smrg
4505191cded7Smrg# If ld is used when linking, flag to hardcode \$libdir into
4506191cded7Smrg# a binary during linking. This must work even if \$libdir does
4507191cded7Smrg# not exist.
4508191cded7Smrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4509191cded7Smrg
4510191cded7Smrg# Whether we need a single -rpath flag with a separated argument.
4511191cded7Smrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4512191cded7Smrg
4513191cded7Smrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4514191cded7Smrg# resulting binary.
4515191cded7Smrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4516191cded7Smrg
4517191cded7Smrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4518191cded7Smrg# resulting binary.
4519191cded7Smrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4520191cded7Smrg
4521191cded7Smrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4522191cded7Smrg# the resulting binary.
4523191cded7Smrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4524191cded7Smrg
4525191cded7Smrg# Set to yes if building a shared library automatically hardcodes DIR into the library
4526191cded7Smrg# and all subsequent libraries and executables linked against it.
4527191cded7Smrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4528191cded7Smrg
4529191cded7Smrg# Variables whose values should be saved in libtool wrapper scripts and
4530191cded7Smrg# restored at relink time.
4531191cded7Smrgvariables_saved_for_relink="$variables_saved_for_relink"
4532191cded7Smrg
4533191cded7Smrg# Whether libtool must link a program against all its dependency libraries.
4534191cded7Smrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4535191cded7Smrg
4536191cded7Smrg# Compile-time system search path for libraries
4537191cded7Smrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4538191cded7Smrg
4539191cded7Smrg# Run-time system search path for libraries
4540191cded7Smrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4541191cded7Smrg
4542191cded7Smrg# Fix the shell variable \$srcfile for the compiler.
4543191cded7Smrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4544191cded7Smrg
4545191cded7Smrg# Set to yes if exported symbols are required.
4546191cded7Smrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4547191cded7Smrg
4548191cded7Smrg# The commands to list exported symbols.
4549191cded7Smrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4550191cded7Smrg
4551191cded7Smrg# The commands to extract the exported symbol list from a shared archive.
4552191cded7Smrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
4553191cded7Smrg
4554191cded7Smrg# Symbols that should not be listed in the preloaded symbols.
4555191cded7Smrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4556191cded7Smrg
4557191cded7Smrg# Symbols that must always be exported.
4558191cded7Smrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4559191cded7Smrg
4560191cded7Smrgifelse([$1],[],
4561191cded7Smrg[# ### END LIBTOOL CONFIG],
4562191cded7Smrg[# ### END LIBTOOL TAG CONFIG: $tagname])
4563191cded7Smrg
4564191cded7Smrg__EOF__
4565191cded7Smrg
4566191cded7Smrgifelse([$1],[], [
4567191cded7Smrg  case $host_os in
4568191cded7Smrg  aix3*)
4569191cded7Smrg    cat <<\EOF >> "$cfgfile"
4570191cded7Smrg
4571191cded7Smrg# AIX sometimes has problems with the GCC collect2 program.  For some
4572191cded7Smrg# reason, if we set the COLLECT_NAMES environment variable, the problems
4573191cded7Smrg# vanish in a puff of smoke.
4574191cded7Smrgif test "X${COLLECT_NAMES+set}" != Xset; then
4575191cded7Smrg  COLLECT_NAMES=
4576191cded7Smrg  export COLLECT_NAMES
4577191cded7Smrgfi
4578191cded7SmrgEOF
4579191cded7Smrg    ;;
4580191cded7Smrg  esac
4581191cded7Smrg
4582191cded7Smrg  # We use sed instead of cat because bash on DJGPP gets confused if
4583191cded7Smrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4584191cded7Smrg  # text mode, it properly converts lines to CR/LF.  This bash problem
4585191cded7Smrg  # is reportedly fixed, but why not run on old versions too?
4586191cded7Smrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4587191cded7Smrg
4588191cded7Smrg  mv -f "$cfgfile" "$ofile" || \
4589191cded7Smrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4590191cded7Smrg  chmod +x "$ofile"
4591191cded7Smrg])
4592191cded7Smrgelse
4593191cded7Smrg  # If there is no Makefile yet, we rely on a make rule to execute
4594191cded7Smrg  # `config.status --recheck' to rerun these tests and create the
4595191cded7Smrg  # libtool script then.
4596191cded7Smrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4597191cded7Smrg  if test -f "$ltmain_in"; then
4598191cded7Smrg    test -f Makefile && make "$ltmain"
4599191cded7Smrg  fi
4600191cded7Smrgfi
4601191cded7Smrg])# AC_LIBTOOL_CONFIG
4602191cded7Smrg
4603191cded7Smrg
4604191cded7Smrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4605191cded7Smrg# -------------------------------------------
4606191cded7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4607191cded7Smrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4608191cded7Smrg
4609191cded7Smrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4610191cded7Smrg
4611191cded7Smrgif test "$GCC" = yes; then
4612191cded7Smrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4613191cded7Smrg
4614191cded7Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4615191cded7Smrg    lt_cv_prog_compiler_rtti_exceptions,
4616191cded7Smrg    [-fno-rtti -fno-exceptions], [],
4617191cded7Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4618191cded7Smrgfi
4619191cded7Smrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4620191cded7Smrg
4621191cded7Smrg
4622191cded7Smrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4623191cded7Smrg# ---------------------------------
4624191cded7SmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4625191cded7Smrg[AC_REQUIRE([AC_CANONICAL_HOST])
4626191cded7SmrgAC_REQUIRE([AC_PROG_NM])
4627191cded7SmrgAC_REQUIRE([AC_OBJEXT])
4628191cded7Smrg# Check for command to grab the raw symbol name followed by C symbol from nm.
4629191cded7SmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4630191cded7SmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4631191cded7Smrg[
4632191cded7Smrg# These are sane defaults that work on at least a few old systems.
4633191cded7Smrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4634191cded7Smrg
4635191cded7Smrg# Character class describing NM global symbol codes.
4636191cded7Smrgsymcode='[[BCDEGRST]]'
4637191cded7Smrg
4638191cded7Smrg# Regexp to match symbols that can be accessed directly from C.
4639191cded7Smrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4640191cded7Smrg
4641191cded7Smrg# Transform an extracted symbol line into a proper C declaration
4642191cded7Smrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4643191cded7Smrg
4644191cded7Smrg# Transform an extracted symbol line into symbol name and symbol address
4645191cded7Smrglt_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'"
4646191cded7Smrg
4647191cded7Smrg# Define system-specific variables.
4648191cded7Smrgcase $host_os in
4649191cded7Smrgaix*)
4650191cded7Smrg  symcode='[[BCDT]]'
4651191cded7Smrg  ;;
4652191cded7Smrgcygwin* | mingw* | pw32*)
4653191cded7Smrg  symcode='[[ABCDGISTW]]'
4654191cded7Smrg  ;;
4655191cded7Smrghpux*) # Its linker distinguishes data from code symbols
4656191cded7Smrg  if test "$host_cpu" = ia64; then
4657191cded7Smrg    symcode='[[ABCDEGRST]]'
4658191cded7Smrg  fi
4659191cded7Smrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4660191cded7Smrg  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'"
4661191cded7Smrg  ;;
4662191cded7Smrglinux*)
4663191cded7Smrg  if test "$host_cpu" = ia64; then
4664191cded7Smrg    symcode='[[ABCDGIRSTW]]'
4665191cded7Smrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4666191cded7Smrg    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'"
4667191cded7Smrg  fi
4668191cded7Smrg  ;;
4669191cded7Smrgirix* | nonstopux*)
4670191cded7Smrg  symcode='[[BCDEGRST]]'
4671191cded7Smrg  ;;
4672191cded7Smrgosf*)
4673191cded7Smrg  symcode='[[BCDEGQRST]]'
4674191cded7Smrg  ;;
4675191cded7Smrgsolaris*)
4676191cded7Smrg  symcode='[[BDRT]]'
4677191cded7Smrg  ;;
4678191cded7Smrgsco3.2v5*)
4679191cded7Smrg  symcode='[[DT]]'
4680191cded7Smrg  ;;
4681191cded7Smrgsysv4.2uw2*)
4682191cded7Smrg  symcode='[[DT]]'
4683191cded7Smrg  ;;
4684191cded7Smrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
4685191cded7Smrg  symcode='[[ABDT]]'
4686191cded7Smrg  ;;
4687191cded7Smrgsysv4)
4688191cded7Smrg  symcode='[[DFNSTU]]'
4689191cded7Smrg  ;;
4690191cded7Smrgesac
4691191cded7Smrg
4692191cded7Smrg# Handle CRLF in mingw tool chain
4693191cded7Smrgopt_cr=
4694191cded7Smrgcase $build_os in
4695191cded7Smrgmingw*)
4696191cded7Smrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4697191cded7Smrg  ;;
4698191cded7Smrgesac
4699191cded7Smrg
4700191cded7Smrg# If we're using GNU nm, then use its standard symbol codes.
4701191cded7Smrgcase `$NM -V 2>&1` in
4702191cded7Smrg*GNU* | *'with BFD'*)
4703191cded7Smrg  symcode='[[ABCDGIRSTW]]' ;;
4704191cded7Smrgesac
4705191cded7Smrg
4706191cded7Smrg# Try without a prefix undercore, then with it.
4707191cded7Smrgfor ac_symprfx in "" "_"; do
4708191cded7Smrg
4709191cded7Smrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4710191cded7Smrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4711191cded7Smrg
4712191cded7Smrg  # Write the raw and C identifiers.
4713191cded7Smrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4714191cded7Smrg
4715191cded7Smrg  # Check to see that the pipe works correctly.
4716191cded7Smrg  pipe_works=no
4717191cded7Smrg
4718191cded7Smrg  rm -f conftest*
4719191cded7Smrg  cat > conftest.$ac_ext <<EOF
4720191cded7Smrg#ifdef __cplusplus
4721191cded7Smrgextern "C" {
4722191cded7Smrg#endif
4723191cded7Smrgchar nm_test_var;
4724191cded7Smrgvoid nm_test_func(){}
4725191cded7Smrg#ifdef __cplusplus
4726191cded7Smrg}
4727191cded7Smrg#endif
4728191cded7Smrgint main(){nm_test_var='a';nm_test_func();return(0);}
4729191cded7SmrgEOF
4730191cded7Smrg
4731191cded7Smrg  if AC_TRY_EVAL(ac_compile); then
4732191cded7Smrg    # Now try to grab the symbols.
4733191cded7Smrg    nlist=conftest.nm
4734191cded7Smrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4735191cded7Smrg      # Try sorting and uniquifying the output.
4736191cded7Smrg      if sort "$nlist" | uniq > "$nlist"T; then
4737191cded7Smrg	mv -f "$nlist"T "$nlist"
4738191cded7Smrg      else
4739191cded7Smrg	rm -f "$nlist"T
4740191cded7Smrg      fi
4741191cded7Smrg
4742191cded7Smrg      # Make sure that we snagged all the symbols we need.
4743191cded7Smrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4744191cded7Smrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4745191cded7Smrg	  cat <<EOF > conftest.$ac_ext
4746191cded7Smrg#ifdef __cplusplus
4747191cded7Smrgextern "C" {
4748191cded7Smrg#endif
4749191cded7Smrg
4750191cded7SmrgEOF
4751191cded7Smrg	  # Now generate the symbol file.
4752191cded7Smrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4753191cded7Smrg
4754191cded7Smrg	  cat <<EOF >> conftest.$ac_ext
4755191cded7Smrg#if defined (__STDC__) && __STDC__
4756191cded7Smrg# define lt_ptr_t void *
4757191cded7Smrg#else
4758191cded7Smrg# define lt_ptr_t char *
4759191cded7Smrg# define const
4760191cded7Smrg#endif
4761191cded7Smrg
4762191cded7Smrg/* The mapping between symbol names and symbols. */
4763191cded7Smrgconst struct {
4764191cded7Smrg  const char *name;
4765191cded7Smrg  lt_ptr_t address;
4766191cded7Smrg}
4767191cded7Smrglt_preloaded_symbols[[]] =
4768191cded7Smrg{
4769191cded7SmrgEOF
4770191cded7Smrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4771191cded7Smrg	  cat <<\EOF >> conftest.$ac_ext
4772191cded7Smrg  {0, (lt_ptr_t) 0}
4773191cded7Smrg};
4774191cded7Smrg
4775191cded7Smrg#ifdef __cplusplus
4776191cded7Smrg}
4777191cded7Smrg#endif
4778191cded7SmrgEOF
4779191cded7Smrg	  # Now try linking the two files.
4780191cded7Smrg	  mv conftest.$ac_objext conftstm.$ac_objext
4781191cded7Smrg	  lt_save_LIBS="$LIBS"
4782191cded7Smrg	  lt_save_CFLAGS="$CFLAGS"
4783191cded7Smrg	  LIBS="conftstm.$ac_objext"
4784191cded7Smrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4785191cded7Smrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4786191cded7Smrg	    pipe_works=yes
4787191cded7Smrg	  fi
4788191cded7Smrg	  LIBS="$lt_save_LIBS"
4789191cded7Smrg	  CFLAGS="$lt_save_CFLAGS"
4790191cded7Smrg	else
4791191cded7Smrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4792191cded7Smrg	fi
4793191cded7Smrg      else
4794191cded7Smrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4795191cded7Smrg      fi
4796191cded7Smrg    else
4797191cded7Smrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4798191cded7Smrg    fi
4799191cded7Smrg  else
4800191cded7Smrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4801191cded7Smrg    cat conftest.$ac_ext >&5
4802191cded7Smrg  fi
4803191cded7Smrg  rm -f conftest* conftst*
4804191cded7Smrg
4805191cded7Smrg  # Do not use the global_symbol_pipe unless it works.
4806191cded7Smrg  if test "$pipe_works" = yes; then
4807191cded7Smrg    break
4808191cded7Smrg  else
4809191cded7Smrg    lt_cv_sys_global_symbol_pipe=
4810191cded7Smrg  fi
4811191cded7Smrgdone
4812191cded7Smrg])
4813191cded7Smrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4814191cded7Smrg  lt_cv_sys_global_symbol_to_cdecl=
4815191cded7Smrgfi
4816191cded7Smrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4817191cded7Smrg  AC_MSG_RESULT(failed)
4818191cded7Smrgelse
4819191cded7Smrg  AC_MSG_RESULT(ok)
4820191cded7Smrgfi
4821191cded7Smrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4822191cded7Smrg
4823191cded7Smrg
4824191cded7Smrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4825191cded7Smrg# ---------------------------------------
4826191cded7SmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4827191cded7Smrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4828191cded7Smrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4829191cded7Smrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4830191cded7Smrg
4831191cded7SmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
4832191cded7Smrg ifelse([$1],[CXX],[
4833191cded7Smrg  # C++ specific cases for pic, static, wl, etc.
4834191cded7Smrg  if test "$GXX" = yes; then
4835191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4836191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4837191cded7Smrg
4838191cded7Smrg    case $host_os in
4839191cded7Smrg    aix*)
4840191cded7Smrg      # All AIX code is PIC.
4841191cded7Smrg      if test "$host_cpu" = ia64; then
4842191cded7Smrg	# AIX 5 now supports IA64 processor
4843191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4844191cded7Smrg      fi
4845191cded7Smrg      ;;
4846191cded7Smrg    amigaos*)
4847191cded7Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
4848191cded7Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
4849191cded7Smrg      # like `-m68040'.
4850191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4851191cded7Smrg      ;;
4852191cded7Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4853191cded7Smrg      # PIC is the default for these OSes.
4854191cded7Smrg      ;;
4855191cded7Smrg    mingw* | os2* | pw32*)
4856191cded7Smrg      # This hack is so that the source file can tell whether it is being
4857191cded7Smrg      # built for inclusion in a dll (and should export symbols for example).
4858191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4859191cded7Smrg      ;;
4860191cded7Smrg    darwin* | rhapsody*)
4861191cded7Smrg      # PIC is the default on this platform
4862191cded7Smrg      # Common symbols not allowed in MH_DYLIB files
4863191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4864191cded7Smrg      ;;
4865191cded7Smrg    *djgpp*)
4866191cded7Smrg      # DJGPP does not support shared libraries at all
4867191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4868191cded7Smrg      ;;
4869191cded7Smrg    interix3*)
4870191cded7Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4871191cded7Smrg      # Instead, we relocate shared libraries at runtime.
4872191cded7Smrg      ;;
4873191cded7Smrg    sysv4*MP*)
4874191cded7Smrg      if test -d /usr/nec; then
4875191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4876191cded7Smrg      fi
4877191cded7Smrg      ;;
4878191cded7Smrg    hpux*)
4879191cded7Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4880191cded7Smrg      # not for PA HP-UX.
4881191cded7Smrg      case $host_cpu in
4882191cded7Smrg      hppa*64*|ia64*)
4883191cded7Smrg	;;
4884191cded7Smrg      *)
4885191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4886191cded7Smrg	;;
4887191cded7Smrg      esac
4888191cded7Smrg      ;;
4889191cded7Smrg    *)
4890191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4891191cded7Smrg      ;;
4892191cded7Smrg    esac
4893191cded7Smrg  else
4894191cded7Smrg    case $host_os in
4895191cded7Smrg      aix4* | aix5*)
4896191cded7Smrg	# All AIX code is PIC.
4897191cded7Smrg	if test "$host_cpu" = ia64; then
4898191cded7Smrg	  # AIX 5 now supports IA64 processor
4899191cded7Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4900191cded7Smrg	else
4901191cded7Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4902191cded7Smrg	fi
4903191cded7Smrg	;;
4904191cded7Smrg      chorus*)
4905191cded7Smrg	case $cc_basename in
4906191cded7Smrg	cxch68*)
4907191cded7Smrg	  # Green Hills C++ Compiler
4908191cded7Smrg	  # _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"
4909191cded7Smrg	  ;;
4910191cded7Smrg	esac
4911191cded7Smrg	;;
4912191cded7Smrg       darwin*)
4913191cded7Smrg         # PIC is the default on this platform
4914191cded7Smrg         # Common symbols not allowed in MH_DYLIB files
4915191cded7Smrg         case $cc_basename in
4916191cded7Smrg           xlc*)
4917191cded7Smrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4918191cded7Smrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4919191cded7Smrg           ;;
4920191cded7Smrg         esac
4921191cded7Smrg       ;;
4922191cded7Smrg      dgux*)
4923191cded7Smrg	case $cc_basename in
4924191cded7Smrg	  ec++*)
4925191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4926191cded7Smrg	    ;;
4927191cded7Smrg	  ghcx*)
4928191cded7Smrg	    # Green Hills C++ Compiler
4929191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4930191cded7Smrg	    ;;
4931191cded7Smrg	  *)
4932191cded7Smrg	    ;;
4933191cded7Smrg	esac
4934191cded7Smrg	;;
4935191cded7Smrg      freebsd* | kfreebsd*-gnu | dragonfly*)
4936191cded7Smrg	# FreeBSD uses GNU C++
4937191cded7Smrg	;;
4938191cded7Smrg      hpux9* | hpux10* | hpux11*)
4939191cded7Smrg	case $cc_basename in
4940191cded7Smrg	  CC*)
4941191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4942191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4943191cded7Smrg	    if test "$host_cpu" != ia64; then
4944191cded7Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4945191cded7Smrg	    fi
4946191cded7Smrg	    ;;
4947191cded7Smrg	  aCC*)
4948191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4949191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4950191cded7Smrg	    case $host_cpu in
4951191cded7Smrg	    hppa*64*|ia64*)
4952191cded7Smrg	      # +Z the default
4953191cded7Smrg	      ;;
4954191cded7Smrg	    *)
4955191cded7Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4956191cded7Smrg	      ;;
4957191cded7Smrg	    esac
4958191cded7Smrg	    ;;
4959191cded7Smrg	  *)
4960191cded7Smrg	    ;;
4961191cded7Smrg	esac
4962191cded7Smrg	;;
4963191cded7Smrg      interix*)
4964191cded7Smrg	# This is c89, which is MS Visual C++ (no shared libs)
4965191cded7Smrg	# Anyone wants to do a port?
4966191cded7Smrg	;;
4967191cded7Smrg      irix5* | irix6* | nonstopux*)
4968191cded7Smrg	case $cc_basename in
4969191cded7Smrg	  CC*)
4970191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4971191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4972191cded7Smrg	    # CC pic flag -KPIC is the default.
4973191cded7Smrg	    ;;
4974191cded7Smrg	  *)
4975191cded7Smrg	    ;;
4976191cded7Smrg	esac
4977191cded7Smrg	;;
4978191cded7Smrg      linux*)
4979191cded7Smrg	case $cc_basename in
4980191cded7Smrg	  KCC*)
4981191cded7Smrg	    # KAI C++ Compiler
4982191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4983191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4984191cded7Smrg	    ;;
4985191cded7Smrg	  icpc* | ecpc*)
4986191cded7Smrg	    # Intel C++
4987191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4988191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4989191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4990191cded7Smrg	    ;;
4991191cded7Smrg	  pgCC*)
4992191cded7Smrg	    # Portland Group C++ compiler.
4993191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4994191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4995191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4996191cded7Smrg	    ;;
4997191cded7Smrg	  cxx*)
4998191cded7Smrg	    # Compaq C++
4999191cded7Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5000191cded7Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5001191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5002191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5003191cded7Smrg	    ;;
5004191cded7Smrg	  *)
5005191cded7Smrg	    ;;
5006191cded7Smrg	esac
5007191cded7Smrg	;;
5008191cded7Smrg      lynxos*)
5009191cded7Smrg	;;
5010191cded7Smrg      m88k*)
5011191cded7Smrg	;;
5012191cded7Smrg      mvs*)
5013191cded7Smrg	case $cc_basename in
5014191cded7Smrg	  cxx*)
5015191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5016191cded7Smrg	    ;;
5017191cded7Smrg	  *)
5018191cded7Smrg	    ;;
5019191cded7Smrg	esac
5020191cded7Smrg	;;
5021191cded7Smrg      netbsd*)
5022191cded7Smrg	;;
5023191cded7Smrg      osf3* | osf4* | osf5*)
5024191cded7Smrg	case $cc_basename in
5025191cded7Smrg	  KCC*)
5026191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5027191cded7Smrg	    ;;
5028191cded7Smrg	  RCC*)
5029191cded7Smrg	    # Rational C++ 2.4.1
5030191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5031191cded7Smrg	    ;;
5032191cded7Smrg	  cxx*)
5033191cded7Smrg	    # Digital/Compaq C++
5034191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5035191cded7Smrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5036191cded7Smrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5037191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5038191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5039191cded7Smrg	    ;;
5040191cded7Smrg	  *)
5041191cded7Smrg	    ;;
5042191cded7Smrg	esac
5043191cded7Smrg	;;
5044191cded7Smrg      psos*)
5045191cded7Smrg	;;
5046191cded7Smrg      solaris*)
5047191cded7Smrg	case $cc_basename in
5048191cded7Smrg	  CC*)
5049191cded7Smrg	    # Sun C++ 4.2, 5.x and Centerline C++
5050191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5051191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5052191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5053191cded7Smrg	    ;;
5054191cded7Smrg	  gcx*)
5055191cded7Smrg	    # Green Hills C++ Compiler
5056191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5057191cded7Smrg	    ;;
5058191cded7Smrg	  *)
5059191cded7Smrg	    ;;
5060191cded7Smrg	esac
5061191cded7Smrg	;;
5062191cded7Smrg      sunos4*)
5063191cded7Smrg	case $cc_basename in
5064191cded7Smrg	  CC*)
5065191cded7Smrg	    # Sun C++ 4.x
5066191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5067191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5068191cded7Smrg	    ;;
5069191cded7Smrg	  lcc*)
5070191cded7Smrg	    # Lucid
5071191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5072191cded7Smrg	    ;;
5073191cded7Smrg	  *)
5074191cded7Smrg	    ;;
5075191cded7Smrg	esac
5076191cded7Smrg	;;
5077191cded7Smrg      tandem*)
5078191cded7Smrg	case $cc_basename in
5079191cded7Smrg	  NCC*)
5080191cded7Smrg	    # NonStop-UX NCC 3.20
5081191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5082191cded7Smrg	    ;;
5083191cded7Smrg	  *)
5084191cded7Smrg	    ;;
5085191cded7Smrg	esac
5086191cded7Smrg	;;
5087191cded7Smrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5088191cded7Smrg	case $cc_basename in
5089191cded7Smrg	  CC*)
5090191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5091191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5092191cded7Smrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5093191cded7Smrg	    ;;
5094191cded7Smrg	esac
5095191cded7Smrg	;;
5096191cded7Smrg      vxworks*)
5097191cded7Smrg	;;
5098191cded7Smrg      *)
5099191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5100191cded7Smrg	;;
5101191cded7Smrg    esac
5102191cded7Smrg  fi
5103191cded7Smrg],
5104191cded7Smrg[
5105191cded7Smrg  if test "$GCC" = yes; then
5106191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5107191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5108191cded7Smrg
5109191cded7Smrg    case $host_os in
5110191cded7Smrg      aix*)
5111191cded7Smrg      # All AIX code is PIC.
5112191cded7Smrg      if test "$host_cpu" = ia64; then
5113191cded7Smrg	# AIX 5 now supports IA64 processor
5114191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5115191cded7Smrg      fi
5116191cded7Smrg      ;;
5117191cded7Smrg
5118191cded7Smrg    amigaos*)
5119191cded7Smrg      # FIXME: we need at least 68020 code to build shared libraries, but
5120191cded7Smrg      # adding the `-m68020' flag to GCC prevents building anything better,
5121191cded7Smrg      # like `-m68040'.
5122191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5123191cded7Smrg      ;;
5124191cded7Smrg
5125191cded7Smrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5126191cded7Smrg      # PIC is the default for these OSes.
5127191cded7Smrg      ;;
5128191cded7Smrg
5129191cded7Smrg    mingw* | pw32* | os2*)
5130191cded7Smrg      # This hack is so that the source file can tell whether it is being
5131191cded7Smrg      # built for inclusion in a dll (and should export symbols for example).
5132191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5133191cded7Smrg      ;;
5134191cded7Smrg
5135191cded7Smrg    darwin* | rhapsody*)
5136191cded7Smrg      # PIC is the default on this platform
5137191cded7Smrg      # Common symbols not allowed in MH_DYLIB files
5138191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5139191cded7Smrg      ;;
5140191cded7Smrg
5141191cded7Smrg    interix3*)
5142191cded7Smrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5143191cded7Smrg      # Instead, we relocate shared libraries at runtime.
5144191cded7Smrg      ;;
5145191cded7Smrg
5146191cded7Smrg    msdosdjgpp*)
5147191cded7Smrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
5148191cded7Smrg      # on systems that don't support them.
5149191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5150191cded7Smrg      enable_shared=no
5151191cded7Smrg      ;;
5152191cded7Smrg
5153191cded7Smrg    sysv4*MP*)
5154191cded7Smrg      if test -d /usr/nec; then
5155191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5156191cded7Smrg      fi
5157191cded7Smrg      ;;
5158191cded7Smrg
5159191cded7Smrg    hpux*)
5160191cded7Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5161191cded7Smrg      # not for PA HP-UX.
5162191cded7Smrg      case $host_cpu in
5163191cded7Smrg      hppa*64*|ia64*)
5164191cded7Smrg	# +Z the default
5165191cded7Smrg	;;
5166191cded7Smrg      *)
5167191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5168191cded7Smrg	;;
5169191cded7Smrg      esac
5170191cded7Smrg      ;;
5171191cded7Smrg
5172191cded7Smrg    *)
5173191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5174191cded7Smrg      ;;
5175191cded7Smrg    esac
5176191cded7Smrg  else
5177191cded7Smrg    # PORTME Check for flag to pass linker flags through the system compiler.
5178191cded7Smrg    case $host_os in
5179191cded7Smrg    aix*)
5180191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5181191cded7Smrg      if test "$host_cpu" = ia64; then
5182191cded7Smrg	# AIX 5 now supports IA64 processor
5183191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5184191cded7Smrg      else
5185191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5186191cded7Smrg      fi
5187191cded7Smrg      ;;
5188191cded7Smrg      darwin*)
5189191cded7Smrg        # PIC is the default on this platform
5190191cded7Smrg        # Common symbols not allowed in MH_DYLIB files
5191191cded7Smrg       case $cc_basename in
5192191cded7Smrg         xlc*)
5193191cded7Smrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5194191cded7Smrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5195191cded7Smrg         ;;
5196191cded7Smrg       esac
5197191cded7Smrg       ;;
5198191cded7Smrg
5199191cded7Smrg    mingw* | pw32* | os2*)
5200191cded7Smrg      # This hack is so that the source file can tell whether it is being
5201191cded7Smrg      # built for inclusion in a dll (and should export symbols for example).
5202191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5203191cded7Smrg      ;;
5204191cded7Smrg
5205191cded7Smrg    hpux9* | hpux10* | hpux11*)
5206191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5207191cded7Smrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5208191cded7Smrg      # not for PA HP-UX.
5209191cded7Smrg      case $host_cpu in
5210191cded7Smrg      hppa*64*|ia64*)
5211191cded7Smrg	# +Z the default
5212191cded7Smrg	;;
5213191cded7Smrg      *)
5214191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5215191cded7Smrg	;;
5216191cded7Smrg      esac
5217191cded7Smrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5218191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5219191cded7Smrg      ;;
5220191cded7Smrg
5221191cded7Smrg    irix5* | irix6* | nonstopux*)
5222191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5223191cded7Smrg      # PIC (with -KPIC) is the default.
5224191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5225191cded7Smrg      ;;
5226191cded7Smrg
5227191cded7Smrg    newsos6)
5228191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5229191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5230191cded7Smrg      ;;
5231191cded7Smrg
5232191cded7Smrg    linux*)
5233191cded7Smrg      case $cc_basename in
5234191cded7Smrg      icc* | ecc*)
5235191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5236191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5237191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5238191cded7Smrg        ;;
5239191cded7Smrg      pgcc* | pgf77* | pgf90* | pgf95*)
5240191cded7Smrg        # Portland Group compilers (*not* the Pentium gcc compiler,
5241191cded7Smrg	# which looks to be a dead project)
5242191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5243191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5244191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5245191cded7Smrg        ;;
5246191cded7Smrg      ccc*)
5247191cded7Smrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5248191cded7Smrg        # All Alpha code is PIC.
5249191cded7Smrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5250191cded7Smrg        ;;
5251191cded7Smrg      esac
5252191cded7Smrg      ;;
5253191cded7Smrg
5254191cded7Smrg    osf3* | osf4* | osf5*)
5255191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5256191cded7Smrg      # All OSF/1 code is PIC.
5257191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5258191cded7Smrg      ;;
5259191cded7Smrg
5260191cded7Smrg    solaris*)
5261191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5262191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5263191cded7Smrg      case $cc_basename in
5264191cded7Smrg      f77* | f90* | f95*)
5265191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5266191cded7Smrg      *)
5267191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5268191cded7Smrg      esac
5269191cded7Smrg      ;;
5270191cded7Smrg
5271191cded7Smrg    sunos4*)
5272191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5273191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5274191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5275191cded7Smrg      ;;
5276191cded7Smrg
5277191cded7Smrg    sysv4 | sysv4.2uw2* | sysv4.3*)
5278191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5279191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5280191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5281191cded7Smrg      ;;
5282191cded7Smrg
5283191cded7Smrg    sysv4*MP*)
5284191cded7Smrg      if test -d /usr/nec ;then
5285191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5286191cded7Smrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5287191cded7Smrg      fi
5288191cded7Smrg      ;;
5289191cded7Smrg
5290191cded7Smrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5291191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5292191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5293191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5294191cded7Smrg      ;;
5295191cded7Smrg
5296191cded7Smrg    unicos*)
5297191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5298191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5299191cded7Smrg      ;;
5300191cded7Smrg
5301191cded7Smrg    uts4*)
5302191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5303191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5304191cded7Smrg      ;;
5305191cded7Smrg
5306191cded7Smrg    *)
5307191cded7Smrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5308191cded7Smrg      ;;
5309191cded7Smrg    esac
5310191cded7Smrg  fi
5311191cded7Smrg])
5312191cded7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5313191cded7Smrg
5314191cded7Smrg#
5315191cded7Smrg# Check to make sure the PIC flag actually works.
5316191cded7Smrg#
5317191cded7Smrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5318191cded7Smrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5319191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5320191cded7Smrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5321191cded7Smrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5322191cded7Smrg     "" | " "*) ;;
5323191cded7Smrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5324191cded7Smrg     esac],
5325191cded7Smrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5326191cded7Smrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5327191cded7Smrgfi
5328191cded7Smrgcase $host_os in
5329191cded7Smrg  # For platforms which do not support PIC, -DPIC is meaningless:
5330191cded7Smrg  *djgpp*)
5331191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5332191cded7Smrg    ;;
5333191cded7Smrg  *)
5334191cded7Smrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5335191cded7Smrg    ;;
5336191cded7Smrgesac
5337191cded7Smrg
5338191cded7Smrg#
5339191cded7Smrg# Check to make sure the static flag actually works.
5340191cded7Smrg#
5341191cded7Smrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5342191cded7SmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5343191cded7Smrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5344191cded7Smrg  $lt_tmp_static_flag,
5345191cded7Smrg  [],
5346191cded7Smrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5347191cded7Smrg])
5348191cded7Smrg
5349191cded7Smrg
5350191cded7Smrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5351191cded7Smrg# ------------------------------------
5352191cded7Smrg# See if the linker supports building shared libraries.
5353191cded7SmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5354191cded7Smrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5355191cded7Smrgifelse([$1],[CXX],[
5356191cded7Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5357191cded7Smrg  case $host_os in
5358191cded7Smrg  aix4* | aix5*)
5359191cded7Smrg    # If we're using GNU nm, then we don't want the "-C" option.
5360191cded7Smrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5361191cded7Smrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5362191cded7Smrg      _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'
5363191cded7Smrg    else
5364191cded7Smrg      _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'
5365191cded7Smrg    fi
5366191cded7Smrg    ;;
5367191cded7Smrg  pw32*)
5368191cded7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5369191cded7Smrg  ;;
5370191cded7Smrg  cygwin* | mingw*)
5371191cded7Smrg    _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'
5372191cded7Smrg  ;;
5373191cded7Smrg  *)
5374191cded7Smrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5375191cded7Smrg  ;;
5376191cded7Smrg  esac
5377191cded7Smrg],[
5378191cded7Smrg  runpath_var=
5379191cded7Smrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5380191cded7Smrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5381191cded7Smrg  _LT_AC_TAGVAR(archive_cmds, $1)=
5382191cded7Smrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5383191cded7Smrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5384191cded7Smrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5385191cded7Smrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5386191cded7Smrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5387191cded7Smrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5388191cded7Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5389191cded7Smrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5390191cded7Smrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5391191cded7Smrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5392191cded7Smrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5393191cded7Smrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5394191cded7Smrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5395191cded7Smrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5396191cded7Smrg  _LT_AC_TAGVAR(module_cmds, $1)=
5397191cded7Smrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5398191cded7Smrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5399191cded7Smrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5400191cded7Smrg  # include_expsyms should be a list of space-separated symbols to be *always*
5401191cded7Smrg  # included in the symbol list
5402191cded7Smrg  _LT_AC_TAGVAR(include_expsyms, $1)=
5403191cded7Smrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5404191cded7Smrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5405191cded7Smrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5406191cded7Smrg  # as well as any symbol that contains `d'.
5407191cded7Smrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5408191cded7Smrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5409191cded7Smrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5410191cded7Smrg  # the symbol is explicitly referenced.  Since portable code cannot
5411191cded7Smrg  # rely on this symbol name, it's probably fine to never include it in
5412191cded7Smrg  # preloaded symbol tables.
5413191cded7Smrg  extract_expsyms_cmds=
5414191cded7Smrg  # Just being paranoid about ensuring that cc_basename is set.
5415191cded7Smrg  _LT_CC_BASENAME([$compiler])
5416191cded7Smrg  case $host_os in
5417191cded7Smrg  cygwin* | mingw* | pw32*)
5418191cded7Smrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5419191cded7Smrg    # When not using gcc, we currently assume that we are using
5420191cded7Smrg    # Microsoft Visual C++.
5421191cded7Smrg    if test "$GCC" != yes; then
5422191cded7Smrg      with_gnu_ld=no
5423191cded7Smrg    fi
5424191cded7Smrg    ;;
5425191cded7Smrg  interix*)
5426191cded7Smrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
5427191cded7Smrg    with_gnu_ld=yes
5428191cded7Smrg    ;;
5429191cded7Smrg  openbsd*)
5430191cded7Smrg    with_gnu_ld=no
5431191cded7Smrg    ;;
5432191cded7Smrg  esac
5433191cded7Smrg
5434191cded7Smrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5435191cded7Smrg  if test "$with_gnu_ld" = yes; then
5436191cded7Smrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5437191cded7Smrg    wlarc='${wl}'
5438191cded7Smrg
5439191cded7Smrg    # Set some defaults for GNU ld with shared library support. These
5440191cded7Smrg    # are reset later if shared libraries are not supported. Putting them
5441191cded7Smrg    # here allows them to be overridden if necessary.
5442191cded7Smrg    runpath_var=LD_RUN_PATH
5443191cded7Smrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5444191cded7Smrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5445191cded7Smrg    # ancient GNU ld didn't support --whole-archive et. al.
5446191cded7Smrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5447191cded7Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5448191cded7Smrg      else
5449191cded7Smrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5450191cded7Smrg    fi
5451191cded7Smrg    supports_anon_versioning=no
5452191cded7Smrg    case `$LD -v 2>/dev/null` in
5453191cded7Smrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5454191cded7Smrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5455191cded7Smrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5456191cded7Smrg      *\ 2.11.*) ;; # other 2.11 versions
5457191cded7Smrg      *) supports_anon_versioning=yes ;;
5458191cded7Smrg    esac
5459191cded7Smrg
5460191cded7Smrg    # See if GNU ld supports shared libraries.
5461191cded7Smrg    case $host_os in
5462191cded7Smrg    aix3* | aix4* | aix5*)
5463191cded7Smrg      # On AIX/PPC, the GNU linker is very broken
5464191cded7Smrg      if test "$host_cpu" != ia64; then
5465191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5466191cded7Smrg	cat <<EOF 1>&2
5467191cded7Smrg
5468191cded7Smrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5469191cded7Smrg*** to be unable to reliably create shared libraries on AIX.
5470191cded7Smrg*** Therefore, libtool is disabling shared libraries support.  If you
5471191cded7Smrg*** really care for shared libraries, you may want to modify your PATH
5472191cded7Smrg*** so that a non-GNU linker is found, and then restart.
5473191cded7Smrg
5474191cded7SmrgEOF
5475191cded7Smrg      fi
5476191cded7Smrg      ;;
5477191cded7Smrg
5478191cded7Smrg    amigaos*)
5479191cded7Smrg      _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)'
5480191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5481191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5482191cded7Smrg
5483191cded7Smrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5484191cded7Smrg      # that the semantics of dynamic libraries on AmigaOS, at least up
5485191cded7Smrg      # to version 4, is to share data among multiple programs linked
5486191cded7Smrg      # with the same dynamic library.  Since this doesn't match the
5487191cded7Smrg      # behavior of shared libraries on other platforms, we can't use
5488191cded7Smrg      # them.
5489191cded7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5490191cded7Smrg      ;;
5491191cded7Smrg
5492191cded7Smrg    beos*)
5493191cded7Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5494191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5495191cded7Smrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5496191cded7Smrg	# support --undefined.  This deserves some investigation.  FIXME
5497191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5498191cded7Smrg      else
5499191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5500191cded7Smrg      fi
5501191cded7Smrg      ;;
5502191cded7Smrg
5503191cded7Smrg    cygwin* | mingw* | pw32*)
5504191cded7Smrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5505191cded7Smrg      # as there is no search path for DLLs.
5506191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5507191cded7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5508191cded7Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5509191cded7Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5510191cded7Smrg      _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'
5511191cded7Smrg
5512191cded7Smrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5513191cded7Smrg        _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'
5514191cded7Smrg	# If the export-symbols file already is a .def file (1st line
5515191cded7Smrg	# is EXPORTS), use it as is; otherwise, prepend...
5516191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5517191cded7Smrg	  cp $export_symbols $output_objdir/$soname.def;
5518191cded7Smrg	else
5519191cded7Smrg	  echo EXPORTS > $output_objdir/$soname.def;
5520191cded7Smrg	  cat $export_symbols >> $output_objdir/$soname.def;
5521191cded7Smrg	fi~
5522191cded7Smrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5523191cded7Smrg      else
5524191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5525191cded7Smrg      fi
5526191cded7Smrg      ;;
5527191cded7Smrg
5528191cded7Smrg    interix3*)
5529191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5530191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5531191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5532191cded7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5533191cded7Smrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5534191cded7Smrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5535191cded7Smrg      # default) and relocated if they conflict, which is a slow very memory
5536191cded7Smrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5537191cded7Smrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5538191cded7Smrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5539191cded7Smrg      _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'
5540191cded7Smrg      _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'
5541191cded7Smrg      ;;
5542191cded7Smrg
5543191cded7Smrg    linux*)
5544191cded7Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5545191cded7Smrg	tmp_addflag=
5546191cded7Smrg	case $cc_basename,$host_cpu in
5547191cded7Smrg	pgcc*)				# Portland Group C compiler
5548191cded7Smrg	  _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'
5549191cded7Smrg	  tmp_addflag=' $pic_flag'
5550191cded7Smrg	  ;;
5551191cded7Smrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5552191cded7Smrg	  _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'
5553191cded7Smrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5554191cded7Smrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5555191cded7Smrg	  tmp_addflag=' -i_dynamic' ;;
5556191cded7Smrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5557191cded7Smrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5558191cded7Smrg	ifc* | ifort*)			# Intel Fortran compiler
5559191cded7Smrg	  tmp_addflag=' -nofor_main' ;;
5560191cded7Smrg	esac
5561191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5562191cded7Smrg
5563191cded7Smrg	if test $supports_anon_versioning = yes; then
5564191cded7Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5565191cded7Smrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5566191cded7Smrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
5567191cded7Smrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5568191cded7Smrg	fi
5569191cded7Smrg      else
5570191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5571191cded7Smrg      fi
5572191cded7Smrg      ;;
5573191cded7Smrg
5574191cded7Smrg    netbsd*)
5575191cded7Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5576191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5577191cded7Smrg	wlarc=
5578191cded7Smrg      else
5579191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5580191cded7Smrg	_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'
5581191cded7Smrg      fi
5582191cded7Smrg      ;;
5583191cded7Smrg
5584191cded7Smrg    solaris*)
5585191cded7Smrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5586191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5587191cded7Smrg	cat <<EOF 1>&2
5588191cded7Smrg
5589191cded7Smrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5590191cded7Smrg*** create shared libraries on Solaris systems.  Therefore, libtool
5591191cded7Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5592191cded7Smrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5593191cded7Smrg*** your PATH or compiler configuration so that the native linker is
5594191cded7Smrg*** used, and then restart.
5595191cded7Smrg
5596191cded7SmrgEOF
5597191cded7Smrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5598191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5599191cded7Smrg	_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'
5600191cded7Smrg      else
5601191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5602191cded7Smrg      fi
5603191cded7Smrg      ;;
5604191cded7Smrg
5605191cded7Smrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5606191cded7Smrg      case `$LD -v 2>&1` in
5607191cded7Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
5608191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5609191cded7Smrg	cat <<_LT_EOF 1>&2
5610191cded7Smrg
5611191cded7Smrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5612191cded7Smrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5613191cded7Smrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5614191cded7Smrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5615191cded7Smrg*** your PATH or compiler configuration so that the native linker is
5616191cded7Smrg*** used, and then restart.
5617191cded7Smrg
5618191cded7Smrg_LT_EOF
5619191cded7Smrg	;;
5620191cded7Smrg	*)
5621191cded7Smrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5622191cded7Smrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5623191cded7Smrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5624191cded7Smrg	    _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'
5625191cded7Smrg	  else
5626191cded7Smrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5627191cded7Smrg	  fi
5628191cded7Smrg	;;
5629191cded7Smrg      esac
5630191cded7Smrg      ;;
5631191cded7Smrg
5632191cded7Smrg    sunos4*)
5633191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5634191cded7Smrg      wlarc=
5635191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5636191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5637191cded7Smrg      ;;
5638191cded7Smrg
5639191cded7Smrg    *)
5640191cded7Smrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5641191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5642191cded7Smrg	_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'
5643191cded7Smrg      else
5644191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5645191cded7Smrg      fi
5646191cded7Smrg      ;;
5647191cded7Smrg    esac
5648191cded7Smrg
5649191cded7Smrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5650191cded7Smrg      runpath_var=
5651191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5652191cded7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5653191cded7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5654191cded7Smrg    fi
5655191cded7Smrg  else
5656191cded7Smrg    # PORTME fill in a description of your system's linker (not GNU ld)
5657191cded7Smrg    case $host_os in
5658191cded7Smrg    aix3*)
5659191cded7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5660191cded7Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5661191cded7Smrg      _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'
5662191cded7Smrg      # Note: this linker hardcodes the directories in LIBPATH if there
5663191cded7Smrg      # are no directories specified by -L.
5664191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5665191cded7Smrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5666191cded7Smrg	# Neither direct hardcoding nor static linking is supported with a
5667191cded7Smrg	# broken collect2.
5668191cded7Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5669191cded7Smrg      fi
5670191cded7Smrg      ;;
5671191cded7Smrg
5672191cded7Smrg    aix4* | aix5*)
5673191cded7Smrg      if test "$host_cpu" = ia64; then
5674191cded7Smrg	# On IA64, the linker does run time linking by default, so we don't
5675191cded7Smrg	# have to do anything special.
5676191cded7Smrg	aix_use_runtimelinking=no
5677191cded7Smrg	exp_sym_flag='-Bexport'
5678191cded7Smrg	no_entry_flag=""
5679191cded7Smrg      else
5680191cded7Smrg	# If we're using GNU nm, then we don't want the "-C" option.
5681191cded7Smrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5682191cded7Smrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5683191cded7Smrg	  _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'
5684191cded7Smrg	else
5685191cded7Smrg	  _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'
5686191cded7Smrg	fi
5687191cded7Smrg	aix_use_runtimelinking=no
5688191cded7Smrg
5689191cded7Smrg	# Test if we are trying to use run time linking or normal
5690191cded7Smrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5691191cded7Smrg	# need to do runtime linking.
5692191cded7Smrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5693191cded7Smrg	  for ld_flag in $LDFLAGS; do
5694191cded7Smrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5695191cded7Smrg  	    aix_use_runtimelinking=yes
5696191cded7Smrg  	    break
5697191cded7Smrg  	  fi
5698191cded7Smrg	  done
5699191cded7Smrg	  ;;
5700191cded7Smrg	esac
5701191cded7Smrg
5702191cded7Smrg	exp_sym_flag='-bexport'
5703191cded7Smrg	no_entry_flag='-bnoentry'
5704191cded7Smrg      fi
5705191cded7Smrg
5706191cded7Smrg      # When large executables or shared objects are built, AIX ld can
5707191cded7Smrg      # have problems creating the table of contents.  If linking a library
5708191cded7Smrg      # or program results in "error TOC overflow" add -mminimal-toc to
5709191cded7Smrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5710191cded7Smrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5711191cded7Smrg
5712191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
5713191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5714191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5715191cded7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5716191cded7Smrg
5717191cded7Smrg      if test "$GCC" = yes; then
5718191cded7Smrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5719191cded7Smrg	# We only want to do this on AIX 4.2 and lower, the check
5720191cded7Smrg	# below for broken collect2 doesn't work under 4.3+
5721191cded7Smrg	  collect2name=`${CC} -print-prog-name=collect2`
5722191cded7Smrg	  if test -f "$collect2name" && \
5723191cded7Smrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5724191cded7Smrg	  then
5725191cded7Smrg  	  # We have reworked collect2
5726191cded7Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5727191cded7Smrg	  else
5728191cded7Smrg  	  # We have old collect2
5729191cded7Smrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5730191cded7Smrg  	  # It fails to find uninstalled libraries when the uninstalled
5731191cded7Smrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5732191cded7Smrg  	  # to unsupported forces relinking
5733191cded7Smrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5734191cded7Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5735191cded7Smrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5736191cded7Smrg	  fi
5737191cded7Smrg	  ;;
5738191cded7Smrg	esac
5739191cded7Smrg	shared_flag='-shared'
5740191cded7Smrg	if test "$aix_use_runtimelinking" = yes; then
5741191cded7Smrg	  shared_flag="$shared_flag "'${wl}-G'
5742191cded7Smrg	fi
5743191cded7Smrg      else
5744191cded7Smrg	# not using gcc
5745191cded7Smrg	if test "$host_cpu" = ia64; then
5746191cded7Smrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5747191cded7Smrg  	# chokes on -Wl,-G. The following line is correct:
5748191cded7Smrg	  shared_flag='-G'
5749191cded7Smrg	else
5750191cded7Smrg	  if test "$aix_use_runtimelinking" = yes; then
5751191cded7Smrg	    shared_flag='${wl}-G'
5752191cded7Smrg	  else
5753191cded7Smrg	    shared_flag='${wl}-bM:SRE'
5754191cded7Smrg	  fi
5755191cded7Smrg	fi
5756191cded7Smrg      fi
5757191cded7Smrg
5758191cded7Smrg      # It seems that -bexpall does not export symbols beginning with
5759191cded7Smrg      # underscore (_), so it is better to generate a list of symbols to export.
5760191cded7Smrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5761191cded7Smrg      if test "$aix_use_runtimelinking" = yes; then
5762191cded7Smrg	# Warning - without using the other runtime loading flags (-brtl),
5763191cded7Smrg	# -berok will link without error, but may produce a broken library.
5764191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5765191cded7Smrg       # Determine the default libpath from the value encoded in an empty executable.
5766191cded7Smrg       _LT_AC_SYS_LIBPATH_AIX
5767191cded7Smrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5768191cded7Smrg	_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"
5769191cded7Smrg       else
5770191cded7Smrg	if test "$host_cpu" = ia64; then
5771191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5772191cded7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5773191cded7Smrg	  _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"
5774191cded7Smrg	else
5775191cded7Smrg	 # Determine the default libpath from the value encoded in an empty executable.
5776191cded7Smrg	 _LT_AC_SYS_LIBPATH_AIX
5777191cded7Smrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5778191cded7Smrg	  # Warning - without using the other run time loading flags,
5779191cded7Smrg	  # -berok will link without error, but may produce a broken library.
5780191cded7Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5781191cded7Smrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5782191cded7Smrg	  # Exported symbols can be pulled into shared objects from archives
5783191cded7Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5784191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5785191cded7Smrg	  # This is similar to how AIX traditionally builds its shared libraries.
5786191cded7Smrg	  _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'
5787191cded7Smrg	fi
5788191cded7Smrg      fi
5789191cded7Smrg      ;;
5790191cded7Smrg
5791191cded7Smrg    amigaos*)
5792191cded7Smrg      _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)'
5793191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5794191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5795191cded7Smrg      # see comment about different semantics on the GNU ld section
5796191cded7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5797191cded7Smrg      ;;
5798191cded7Smrg
5799191cded7Smrg    bsdi[[45]]*)
5800191cded7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5801191cded7Smrg      ;;
5802191cded7Smrg
5803191cded7Smrg    cygwin* | mingw* | pw32*)
5804191cded7Smrg      # When not using gcc, we currently assume that we are using
5805191cded7Smrg      # Microsoft Visual C++.
5806191cded7Smrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
5807191cded7Smrg      # no search path for DLLs.
5808191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5809191cded7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5810191cded7Smrg      # Tell ltmain to make .lib files, not .a files.
5811191cded7Smrg      libext=lib
5812191cded7Smrg      # Tell ltmain to make .dll files, not .so files.
5813191cded7Smrg      shrext_cmds=".dll"
5814191cded7Smrg      # FIXME: Setting linknames here is a bad hack.
5815191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5816191cded7Smrg      # The linker will automatically build a .lib file if we build a DLL.
5817191cded7Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5818191cded7Smrg      # FIXME: Should let the user specify the lib program.
5819191cded7Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5820191cded7Smrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5821191cded7Smrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5822191cded7Smrg      ;;
5823191cded7Smrg
5824191cded7Smrg    darwin* | rhapsody*)
5825191cded7Smrg      case $host_os in
5826191cded7Smrg        rhapsody* | darwin1.[[012]])
5827191cded7Smrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5828191cded7Smrg         ;;
5829191cded7Smrg       *) # Darwin 1.3 on
5830191cded7Smrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5831191cded7Smrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5832191cded7Smrg         else
5833191cded7Smrg           case ${MACOSX_DEPLOYMENT_TARGET} in
5834191cded7Smrg             10.[[012]])
5835191cded7Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5836191cded7Smrg               ;;
5837191cded7Smrg             10.*)
5838191cded7Smrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5839191cded7Smrg               ;;
5840191cded7Smrg           esac
5841191cded7Smrg         fi
5842191cded7Smrg         ;;
5843191cded7Smrg      esac
5844191cded7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5845191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5846191cded7Smrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5847191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5848191cded7Smrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5849191cded7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5850191cded7Smrg    if test "$GCC" = yes ; then
5851191cded7Smrg    	output_verbose_link_cmd='echo'
5852191cded7Smrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5853191cded7Smrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5854191cded7Smrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5855191cded7Smrg      _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}'
5856191cded7Smrg      _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}'
5857191cded7Smrg    else
5858191cded7Smrg      case $cc_basename in
5859191cded7Smrg        xlc*)
5860191cded7Smrg         output_verbose_link_cmd='echo'
5861191cded7Smrg         _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'
5862191cded7Smrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5863191cded7Smrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5864191cded7Smrg         _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}'
5865191cded7Smrg          _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}'
5866191cded7Smrg          ;;
5867191cded7Smrg       *)
5868191cded7Smrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5869191cded7Smrg          ;;
5870191cded7Smrg      esac
5871191cded7Smrg    fi
5872191cded7Smrg      ;;
5873191cded7Smrg
5874191cded7Smrg    dgux*)
5875191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5876191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5877191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5878191cded7Smrg      ;;
5879191cded7Smrg
5880191cded7Smrg    freebsd1*)
5881191cded7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5882191cded7Smrg      ;;
5883191cded7Smrg
5884191cded7Smrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5885191cded7Smrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
5886191cded7Smrg    # does not break anything, and helps significantly (at the cost of a little
5887191cded7Smrg    # extra space).
5888191cded7Smrg    freebsd2.2*)
5889191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5890191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5891191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5892191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5893191cded7Smrg      ;;
5894191cded7Smrg
5895191cded7Smrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5896191cded7Smrg    freebsd2*)
5897191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5898191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5899191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5900191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5901191cded7Smrg      ;;
5902191cded7Smrg
5903191cded7Smrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5904191cded7Smrg    freebsd* | kfreebsd*-gnu | dragonfly*)
5905191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5906191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5907191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5908191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5909191cded7Smrg      ;;
5910191cded7Smrg
5911191cded7Smrg    hpux9*)
5912191cded7Smrg      if test "$GCC" = yes; then
5913191cded7Smrg	_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'
5914191cded7Smrg      else
5915191cded7Smrg	_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'
5916191cded7Smrg      fi
5917191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5918191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5919191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5920191cded7Smrg
5921191cded7Smrg      # hardcode_minus_L: Not really in the search PATH,
5922191cded7Smrg      # but as the default location of the library.
5923191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5924191cded7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5925191cded7Smrg      ;;
5926191cded7Smrg
5927191cded7Smrg    hpux10*)
5928191cded7Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5929191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5930191cded7Smrg      else
5931191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5932191cded7Smrg      fi
5933191cded7Smrg      if test "$with_gnu_ld" = no; then
5934191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5935191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5936191cded7Smrg
5937191cded7Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5938191cded7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5939191cded7Smrg
5940191cded7Smrg	# hardcode_minus_L: Not really in the search PATH,
5941191cded7Smrg	# but as the default location of the library.
5942191cded7Smrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5943191cded7Smrg      fi
5944191cded7Smrg      ;;
5945191cded7Smrg
5946191cded7Smrg    hpux11*)
5947191cded7Smrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5948191cded7Smrg	case $host_cpu in
5949191cded7Smrg	hppa*64*)
5950191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5951191cded7Smrg	  ;;
5952191cded7Smrg	ia64*)
5953191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5954191cded7Smrg	  ;;
5955191cded7Smrg	*)
5956191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5957191cded7Smrg	  ;;
5958191cded7Smrg	esac
5959191cded7Smrg      else
5960191cded7Smrg	case $host_cpu in
5961191cded7Smrg	hppa*64*)
5962191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5963191cded7Smrg	  ;;
5964191cded7Smrg	ia64*)
5965191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5966191cded7Smrg	  ;;
5967191cded7Smrg	*)
5968191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5969191cded7Smrg	  ;;
5970191cded7Smrg	esac
5971191cded7Smrg      fi
5972191cded7Smrg      if test "$with_gnu_ld" = no; then
5973191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5974191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5975191cded7Smrg
5976191cded7Smrg	case $host_cpu in
5977191cded7Smrg	hppa*64*|ia64*)
5978191cded7Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5979191cded7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5980191cded7Smrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5981191cded7Smrg	  ;;
5982191cded7Smrg	*)
5983191cded7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5984191cded7Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5985191cded7Smrg
5986191cded7Smrg	  # hardcode_minus_L: Not really in the search PATH,
5987191cded7Smrg	  # but as the default location of the library.
5988191cded7Smrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5989191cded7Smrg	  ;;
5990191cded7Smrg	esac
5991191cded7Smrg      fi
5992191cded7Smrg      ;;
5993191cded7Smrg
5994191cded7Smrg    irix5* | irix6* | nonstopux*)
5995191cded7Smrg      if test "$GCC" = yes; then
5996191cded7Smrg	_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'
5997191cded7Smrg      else
5998191cded7Smrg	_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'
5999191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6000191cded7Smrg      fi
6001191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6002191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6003191cded7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6004191cded7Smrg      ;;
6005191cded7Smrg
6006191cded7Smrg    netbsd*)
6007191cded7Smrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6008191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6009191cded7Smrg      else
6010191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6011191cded7Smrg      fi
6012191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6013191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6014191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6015191cded7Smrg      ;;
6016191cded7Smrg
6017191cded7Smrg    newsos6)
6018191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6020191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6021191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6022191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6023191cded7Smrg      ;;
6024191cded7Smrg
6025191cded7Smrg    openbsd*)
6026191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6027191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6028191cded7Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6029191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6030191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6031191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6032191cded7Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6033191cded7Smrg      else
6034191cded7Smrg       case $host_os in
6035191cded7Smrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6036191cded7Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6037191cded7Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6038191cded7Smrg	   ;;
6039191cded7Smrg	 *)
6040191cded7Smrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6041191cded7Smrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6042191cded7Smrg	   ;;
6043191cded7Smrg       esac
6044191cded7Smrg      fi
6045191cded7Smrg      ;;
6046191cded7Smrg
6047191cded7Smrg    os2*)
6048191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6049191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6050191cded7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6051191cded7Smrg      _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'
6052191cded7Smrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6053191cded7Smrg      ;;
6054191cded7Smrg
6055191cded7Smrg    osf3*)
6056191cded7Smrg      if test "$GCC" = yes; then
6057191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6058191cded7Smrg	_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'
6059191cded7Smrg      else
6060191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6061191cded7Smrg	_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'
6062191cded7Smrg      fi
6063191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6064191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6065191cded7Smrg      ;;
6066191cded7Smrg
6067191cded7Smrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6068191cded7Smrg      if test "$GCC" = yes; then
6069191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6070191cded7Smrg	_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'
6071191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6072191cded7Smrg      else
6073191cded7Smrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6074191cded7Smrg	_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'
6075191cded7Smrg	_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~
6076191cded7Smrg	$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'
6077191cded7Smrg
6078191cded7Smrg	# Both c and cxx compiler support -rpath directly
6079191cded7Smrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6080191cded7Smrg      fi
6081191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6082191cded7Smrg      ;;
6083191cded7Smrg
6084191cded7Smrg    solaris*)
6085191cded7Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6086191cded7Smrg      if test "$GCC" = yes; then
6087191cded7Smrg	wlarc='${wl}'
6088191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6089191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6090191cded7Smrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6091191cded7Smrg      else
6092191cded7Smrg	wlarc=''
6093191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6094191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6095191cded7Smrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6096191cded7Smrg      fi
6097191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6098191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6099191cded7Smrg      case $host_os in
6100191cded7Smrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6101191cded7Smrg      *)
6102191cded7Smrg 	# The compiler driver will combine linker options so we
6103191cded7Smrg 	# cannot just pass the convience library names through
6104191cded7Smrg 	# without $wl, iff we do not link with $LD.
6105191cded7Smrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6106191cded7Smrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6107191cded7Smrg 	case $wlarc in
6108191cded7Smrg 	'')
6109191cded7Smrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6110191cded7Smrg 	*)
6111191cded7Smrg 	  _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' ;;
6112191cded7Smrg 	esac ;;
6113191cded7Smrg      esac
6114191cded7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6115191cded7Smrg      ;;
6116191cded7Smrg
6117191cded7Smrg    sunos4*)
6118191cded7Smrg      if test "x$host_vendor" = xsequent; then
6119191cded7Smrg	# Use $CC to link under sequent, because it throws in some extra .o
6120191cded7Smrg	# files that make .init and .fini sections work.
6121191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6122191cded7Smrg      else
6123191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6124191cded7Smrg      fi
6125191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6126191cded7Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6127191cded7Smrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6128191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6129191cded7Smrg      ;;
6130191cded7Smrg
6131191cded7Smrg    sysv4)
6132191cded7Smrg      case $host_vendor in
6133191cded7Smrg	sni)
6134191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6135191cded7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6136191cded7Smrg	;;
6137191cded7Smrg	siemens)
6138191cded7Smrg	  ## LD is ld it makes a PLAMLIB
6139191cded7Smrg	  ## CC just makes a GrossModule.
6140191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6141191cded7Smrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6142191cded7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6143191cded7Smrg        ;;
6144191cded7Smrg	motorola)
6145191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6146191cded7Smrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6147191cded7Smrg	;;
6148191cded7Smrg      esac
6149191cded7Smrg      runpath_var='LD_RUN_PATH'
6150191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6151191cded7Smrg      ;;
6152191cded7Smrg
6153191cded7Smrg    sysv4.3*)
6154191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6155191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6156191cded7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6157191cded7Smrg      ;;
6158191cded7Smrg
6159191cded7Smrg    sysv4*MP*)
6160191cded7Smrg      if test -d /usr/nec; then
6161191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6162191cded7Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6163191cded7Smrg	runpath_var=LD_RUN_PATH
6164191cded7Smrg	hardcode_runpath_var=yes
6165191cded7Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6166191cded7Smrg      fi
6167191cded7Smrg      ;;
6168191cded7Smrg
6169191cded7Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6170191cded7Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6171191cded7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6172191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6173191cded7Smrg      runpath_var='LD_RUN_PATH'
6174191cded7Smrg
6175191cded7Smrg      if test "$GCC" = yes; then
6176191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6177191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6178191cded7Smrg      else
6179191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6180191cded7Smrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6181191cded7Smrg      fi
6182191cded7Smrg      ;;
6183191cded7Smrg
6184191cded7Smrg    sysv5* | sco3.2v5* | sco5v6*)
6185191cded7Smrg      # Note: We can NOT use -z defs as we might desire, because we do not
6186191cded7Smrg      # link with -lc, and that would cause any symbols used from libc to
6187191cded7Smrg      # always be unresolved, which means just about no library would
6188191cded7Smrg      # ever link correctly.  If we're not using GNU ld we use -z text
6189191cded7Smrg      # though, which does catch some bad symbols but isn't as heavy-handed
6190191cded7Smrg      # as -z defs.
6191191cded7Smrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6192191cded7Smrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6193191cded7Smrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6194191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6195191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6196191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6197191cded7Smrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6198191cded7Smrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6199191cded7Smrg      runpath_var='LD_RUN_PATH'
6200191cded7Smrg
6201191cded7Smrg      if test "$GCC" = yes; then
6202191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6203191cded7Smrg	_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'
6204191cded7Smrg      else
6205191cded7Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6206191cded7Smrg	_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'
6207191cded7Smrg      fi
6208191cded7Smrg      ;;
6209191cded7Smrg
6210191cded7Smrg    uts4*)
6211191cded7Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6212191cded7Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6213191cded7Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6214191cded7Smrg      ;;
6215191cded7Smrg
6216191cded7Smrg    *)
6217191cded7Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6218191cded7Smrg      ;;
6219191cded7Smrg    esac
6220191cded7Smrg  fi
6221191cded7Smrg])
6222191cded7SmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6223191cded7Smrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6224191cded7Smrg
6225191cded7Smrg#
6226191cded7Smrg# Do we need to explicitly link libc?
6227191cded7Smrg#
6228191cded7Smrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6229191cded7Smrgx|xyes)
6230191cded7Smrg  # Assume -lc should be added
6231191cded7Smrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6232191cded7Smrg
6233191cded7Smrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
6234191cded7Smrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6235191cded7Smrg    *'~'*)
6236191cded7Smrg      # FIXME: we may have to deal with multi-command sequences.
6237191cded7Smrg      ;;
6238191cded7Smrg    '$CC '*)
6239191cded7Smrg      # Test whether the compiler implicitly links with -lc since on some
6240191cded7Smrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6241191cded7Smrg      # to ld, don't add -lc before -lgcc.
6242191cded7Smrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6243191cded7Smrg      $rm conftest*
6244191cded7Smrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6245191cded7Smrg
6246191cded7Smrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6247191cded7Smrg        soname=conftest
6248191cded7Smrg        lib=conftest
6249191cded7Smrg        libobjs=conftest.$ac_objext
6250191cded7Smrg        deplibs=
6251191cded7Smrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6252191cded7Smrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6253191cded7Smrg        compiler_flags=-v
6254191cded7Smrg        linker_flags=-v
6255191cded7Smrg        verstring=
6256191cded7Smrg        output_objdir=.
6257191cded7Smrg        libname=conftest
6258191cded7Smrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6259191cded7Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6260191cded7Smrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6261191cded7Smrg        then
6262191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6263191cded7Smrg        else
6264191cded7Smrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6265191cded7Smrg        fi
6266191cded7Smrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6267191cded7Smrg      else
6268191cded7Smrg        cat conftest.err 1>&5
6269191cded7Smrg      fi
6270191cded7Smrg      $rm conftest*
6271191cded7Smrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6272191cded7Smrg      ;;
6273191cded7Smrg    esac
6274191cded7Smrg  fi
6275191cded7Smrg  ;;
6276191cded7Smrgesac
6277191cded7Smrg])# AC_LIBTOOL_PROG_LD_SHLIBS
6278191cded7Smrg
6279191cded7Smrg
6280191cded7Smrg# _LT_AC_FILE_LTDLL_C
6281191cded7Smrg# -------------------
6282191cded7Smrg# Be careful that the start marker always follows a newline.
6283191cded7SmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6284191cded7Smrg# /* ltdll.c starts here */
6285191cded7Smrg# #define WIN32_LEAN_AND_MEAN
6286191cded7Smrg# #include <windows.h>
6287191cded7Smrg# #undef WIN32_LEAN_AND_MEAN
6288191cded7Smrg# #include <stdio.h>
6289191cded7Smrg#
6290191cded7Smrg# #ifndef __CYGWIN__
6291191cded7Smrg# #  ifdef __CYGWIN32__
6292191cded7Smrg# #    define __CYGWIN__ __CYGWIN32__
6293191cded7Smrg# #  endif
6294191cded7Smrg# #endif
6295191cded7Smrg#
6296191cded7Smrg# #ifdef __cplusplus
6297191cded7Smrg# extern "C" {
6298191cded7Smrg# #endif
6299191cded7Smrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6300191cded7Smrg# #ifdef __cplusplus
6301191cded7Smrg# }
6302191cded7Smrg# #endif
6303191cded7Smrg#
6304191cded7Smrg# #ifdef __CYGWIN__
6305191cded7Smrg# #include <cygwin/cygwin_dll.h>
6306191cded7Smrg# DECLARE_CYGWIN_DLL( DllMain );
6307191cded7Smrg# #endif
6308191cded7Smrg# HINSTANCE __hDllInstance_base;
6309191cded7Smrg#
6310191cded7Smrg# BOOL APIENTRY
6311191cded7Smrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6312191cded7Smrg# {
6313191cded7Smrg#   __hDllInstance_base = hInst;
6314191cded7Smrg#   return TRUE;
6315191cded7Smrg# }
6316191cded7Smrg# /* ltdll.c ends here */
6317191cded7Smrg])# _LT_AC_FILE_LTDLL_C
6318191cded7Smrg
6319191cded7Smrg
6320191cded7Smrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6321191cded7Smrg# ---------------------------------
6322191cded7SmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6323191cded7Smrg
6324191cded7Smrg
6325191cded7Smrg# old names
6326191cded7SmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6327191cded7SmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6328191cded7SmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6329191cded7SmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6330191cded7SmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6331191cded7SmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6332191cded7SmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6333191cded7Smrg
6334191cded7Smrg# This is just to silence aclocal about the macro not being used
6335191cded7Smrgifelse([AC_DISABLE_FAST_INSTALL])
6336191cded7Smrg
6337191cded7SmrgAC_DEFUN([LT_AC_PROG_GCJ],
6338191cded7Smrg[AC_CHECK_TOOL(GCJ, gcj, no)
6339191cded7Smrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6340191cded7Smrg  AC_SUBST(GCJFLAGS)
6341191cded7Smrg])
6342191cded7Smrg
6343191cded7SmrgAC_DEFUN([LT_AC_PROG_RC],
6344191cded7Smrg[AC_CHECK_TOOL(RC, windres, no)
6345191cded7Smrg])
6346191cded7Smrg
6347191cded7Smrg# NOTE: This macro has been submitted for inclusion into   #
6348191cded7Smrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6349191cded7Smrg#  a released version of Autoconf we should remove this    #
6350191cded7Smrg#  macro and use it instead.                               #
6351191cded7Smrg# LT_AC_PROG_SED
6352191cded7Smrg# --------------
6353191cded7Smrg# Check for a fully-functional sed program, that truncates
6354191cded7Smrg# as few characters as possible.  Prefer GNU sed if found.
6355191cded7SmrgAC_DEFUN([LT_AC_PROG_SED],
6356191cded7Smrg[AC_MSG_CHECKING([for a sed that does not truncate output])
6357191cded7SmrgAC_CACHE_VAL(lt_cv_path_SED,
6358191cded7Smrg[# Loop through the user's path and test for sed and gsed.
6359191cded7Smrg# Then use that list of sed's as ones to test for truncation.
6360191cded7Smrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6361191cded7Smrgfor as_dir in $PATH
6362191cded7Smrgdo
6363191cded7Smrg  IFS=$as_save_IFS
6364191cded7Smrg  test -z "$as_dir" && as_dir=.
6365191cded7Smrg  for lt_ac_prog in sed gsed; do
6366191cded7Smrg    for ac_exec_ext in '' $ac_executable_extensions; do
6367191cded7Smrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6368191cded7Smrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6369191cded7Smrg      fi
6370191cded7Smrg    done
6371191cded7Smrg  done
6372191cded7Smrgdone
6373191cded7Smrglt_ac_max=0
6374191cded7Smrglt_ac_count=0
6375191cded7Smrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6376191cded7Smrg# along with /bin/sed that truncates output.
6377191cded7Smrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6378191cded7Smrg  test ! -f $lt_ac_sed && continue
6379191cded7Smrg  cat /dev/null > conftest.in
6380191cded7Smrg  lt_ac_count=0
6381191cded7Smrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6382191cded7Smrg  # Check for GNU sed and select it if it is found.
6383191cded7Smrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6384191cded7Smrg    lt_cv_path_SED=$lt_ac_sed
6385191cded7Smrg    break
6386191cded7Smrg  fi
6387191cded7Smrg  while true; do
6388191cded7Smrg    cat conftest.in conftest.in >conftest.tmp
6389191cded7Smrg    mv conftest.tmp conftest.in
6390191cded7Smrg    cp conftest.in conftest.nl
6391191cded7Smrg    echo >>conftest.nl
6392191cded7Smrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6393191cded7Smrg    cmp -s conftest.out conftest.nl || break
6394191cded7Smrg    # 10000 chars as input seems more than enough
6395191cded7Smrg    test $lt_ac_count -gt 10 && break
6396191cded7Smrg    lt_ac_count=`expr $lt_ac_count + 1`
6397191cded7Smrg    if test $lt_ac_count -gt $lt_ac_max; then
6398191cded7Smrg      lt_ac_max=$lt_ac_count
6399191cded7Smrg      lt_cv_path_SED=$lt_ac_sed
6400191cded7Smrg    fi
6401191cded7Smrg  done
6402191cded7Smrgdone
6403191cded7Smrg])
6404191cded7SmrgSED=$lt_cv_path_SED
6405191cded7SmrgAC_MSG_RESULT([$SED])
6406191cded7Smrg])
6407191cded7Smrg
6408191cded7Smrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6409191cded7Smrg# 
6410191cded7Smrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6411191cded7Smrg#
6412191cded7Smrg# This program is free software; you can redistribute it and/or modify
6413191cded7Smrg# it under the terms of the GNU General Public License as published by
6414191cded7Smrg# the Free Software Foundation; either version 2 of the License, or
6415191cded7Smrg# (at your option) any later version.
6416191cded7Smrg#
6417191cded7Smrg# This program is distributed in the hope that it will be useful, but
6418191cded7Smrg# WITHOUT ANY WARRANTY; without even the implied warranty of
6419191cded7Smrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6420191cded7Smrg# General Public License for more details.
6421191cded7Smrg#
6422191cded7Smrg# You should have received a copy of the GNU General Public License
6423191cded7Smrg# along with this program; if not, write to the Free Software
6424191cded7Smrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6425191cded7Smrg#
6426191cded7Smrg# As a special exception to the GNU General Public License, if you
6427191cded7Smrg# distribute this file as part of a program that contains a
6428191cded7Smrg# configuration script generated by Autoconf, you may include it under
6429191cded7Smrg# the same distribution terms that you use for the rest of that program.
6430191cded7Smrg
6431191cded7Smrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6432191cded7Smrg# ----------------------------------
6433191cded7SmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
6434191cded7Smrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6435191cded7Smrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6436191cded7SmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6437191cded7Smrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6438191cded7Smrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6439191cded7Smrgfi
6440191cded7Smrgif test -n "$PKG_CONFIG"; then
6441191cded7Smrg	_pkg_min_version=m4_default([$1], [0.9.0])
6442191cded7Smrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6443191cded7Smrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6444191cded7Smrg		AC_MSG_RESULT([yes])
6445191cded7Smrg	else
6446191cded7Smrg		AC_MSG_RESULT([no])
6447191cded7Smrg		PKG_CONFIG=""
6448191cded7Smrg	fi
6449191cded7Smrg		
6450191cded7Smrgfi[]dnl
6451191cded7Smrg])# PKG_PROG_PKG_CONFIG
6452191cded7Smrg
6453191cded7Smrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6454191cded7Smrg#
6455191cded7Smrg# Check to see whether a particular set of modules exists.  Similar
6456191cded7Smrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6457191cded7Smrg#
6458191cded7Smrg#
6459191cded7Smrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6460191cded7Smrg# this or PKG_CHECK_MODULES is called, or make sure to call
6461191cded7Smrg# PKG_CHECK_EXISTS manually
6462191cded7Smrg# --------------------------------------------------------------
6463191cded7SmrgAC_DEFUN([PKG_CHECK_EXISTS],
6464191cded7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6465191cded7Smrgif test -n "$PKG_CONFIG" && \
6466191cded7Smrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6467191cded7Smrg  m4_ifval([$2], [$2], [:])
6468191cded7Smrgm4_ifvaln([$3], [else
6469191cded7Smrg  $3])dnl
6470191cded7Smrgfi])
6471191cded7Smrg
6472191cded7Smrg
6473191cded7Smrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6474191cded7Smrg# ---------------------------------------------
6475191cded7Smrgm4_define([_PKG_CONFIG],
6476191cded7Smrg[if test -n "$PKG_CONFIG"; then
6477191cded7Smrg    if test -n "$$1"; then
6478191cded7Smrg        pkg_cv_[]$1="$$1"
6479191cded7Smrg    else
6480191cded7Smrg        PKG_CHECK_EXISTS([$3],
6481191cded7Smrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6482191cded7Smrg			 [pkg_failed=yes])
6483191cded7Smrg    fi
6484191cded7Smrgelse
6485191cded7Smrg	pkg_failed=untried
6486191cded7Smrgfi[]dnl
6487191cded7Smrg])# _PKG_CONFIG
6488191cded7Smrg
6489191cded7Smrg# _PKG_SHORT_ERRORS_SUPPORTED
6490191cded7Smrg# -----------------------------
6491191cded7SmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6492191cded7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6493191cded7Smrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6494191cded7Smrg        _pkg_short_errors_supported=yes
6495191cded7Smrgelse
6496191cded7Smrg        _pkg_short_errors_supported=no
6497191cded7Smrgfi[]dnl
6498191cded7Smrg])# _PKG_SHORT_ERRORS_SUPPORTED
6499191cded7Smrg
6500191cded7Smrg
6501191cded7Smrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6502191cded7Smrg# [ACTION-IF-NOT-FOUND])
6503191cded7Smrg#
6504191cded7Smrg#
6505191cded7Smrg# Note that if there is a possibility the first call to
6506191cded7Smrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
6507191cded7Smrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6508191cded7Smrg#
6509191cded7Smrg#
6510191cded7Smrg# --------------------------------------------------------------
6511191cded7SmrgAC_DEFUN([PKG_CHECK_MODULES],
6512191cded7Smrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6513191cded7SmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6514191cded7SmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6515191cded7Smrg
6516191cded7Smrgpkg_failed=no
6517191cded7SmrgAC_MSG_CHECKING([for $1])
6518191cded7Smrg
6519191cded7Smrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6520191cded7Smrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6521191cded7Smrg
6522191cded7Smrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6523191cded7Smrgand $1[]_LIBS to avoid the need to call pkg-config.
6524191cded7SmrgSee the pkg-config man page for more details.])
6525191cded7Smrg
6526191cded7Smrgif test $pkg_failed = yes; then
6527191cded7Smrg        _PKG_SHORT_ERRORS_SUPPORTED
6528191cded7Smrg        if test $_pkg_short_errors_supported = yes; then
6529191cded7Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6530191cded7Smrg        else 
6531191cded7Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6532191cded7Smrg        fi
6533191cded7Smrg	# Put the nasty error message in config.log where it belongs
6534191cded7Smrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6535191cded7Smrg
6536191cded7Smrg	ifelse([$4], , [AC_MSG_ERROR(dnl
6537191cded7Smrg[Package requirements ($2) were not met:
6538191cded7Smrg
6539191cded7Smrg$$1_PKG_ERRORS
6540191cded7Smrg
6541191cded7SmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
6542191cded7Smrginstalled software in a non-standard prefix.
6543191cded7Smrg
6544191cded7Smrg_PKG_TEXT
6545191cded7Smrg])],
6546191cded7Smrg		[$4])
6547191cded7Smrgelif test $pkg_failed = untried; then
6548191cded7Smrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
6549191cded7Smrg[The pkg-config script could not be found or is too old.  Make sure it
6550191cded7Smrgis in your PATH or set the PKG_CONFIG environment variable to the full
6551191cded7Smrgpath to pkg-config.
6552191cded7Smrg
6553191cded7Smrg_PKG_TEXT
6554191cded7Smrg
6555191cded7SmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6556191cded7Smrg		[$4])
6557191cded7Smrgelse
6558191cded7Smrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6559191cded7Smrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6560191cded7Smrg        AC_MSG_RESULT([yes])
6561191cded7Smrg	ifelse([$3], , :, [$3])
6562191cded7Smrgfi[]dnl
6563191cded7Smrg])# PKG_CHECK_MODULES
6564191cded7Smrg
6565191cded7Smrgdnl $Id: aclocal.m4,v 1.1.1.1 2008/07/30 02:58:07 mrg Exp $
6566191cded7Smrgdnl
6567191cded7Smrgdnl Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
6568191cded7Smrgdnl 
6569191cded7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
6570191cded7Smrgdnl documentation for any purpose is hereby granted without fee, provided that
6571191cded7Smrgdnl the above copyright notice appear in all copies and that both that
6572191cded7Smrgdnl copyright notice and this permission notice appear in supporting
6573191cded7Smrgdnl documentation.
6574191cded7Smrgdnl 
6575191cded7Smrgdnl The above copyright notice and this permission notice shall be included
6576191cded7Smrgdnl in all copies or substantial portions of the Software.
6577191cded7Smrgdnl 
6578191cded7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6579191cded7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6580191cded7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6581191cded7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6582191cded7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6583191cded7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6584191cded7Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
6585191cded7Smrgdnl 
6586191cded7Smrgdnl Except as contained in this notice, the name of the copyright holders shall
6587191cded7Smrgdnl not be used in advertising or otherwise to promote the sale, use or
6588191cded7Smrgdnl other dealings in this Software without prior written authorization
6589191cded7Smrgdnl from the copyright holders.
6590191cded7Smrgdnl 
6591191cded7Smrg
6592191cded7Smrg# XORG_PROG_RAWCPP()
6593191cded7Smrg# ------------------
6594191cded7Smrg# Find cpp program and necessary flags for use in pre-processing text files
6595191cded7Smrg# such as man pages and config files
6596191cded7SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
6597191cded7SmrgAC_REQUIRE([AC_PROG_CPP])
6598191cded7SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
6599191cded7Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
6600191cded7Smrg
6601191cded7Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
6602191cded7Smrg# which is not the best choice for supporting other OS'es, but covers most
6603191cded7Smrg# of the ones we need for now.
6604191cded7SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
6605191cded7SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
6606191cded7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6607191cded7Smrg	AC_MSG_RESULT([no])
6608191cded7Smrgelse
6609191cded7Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
6610191cded7Smrg		RAWCPPFLAGS=-undef
6611191cded7Smrg		AC_MSG_RESULT([yes])
6612191cded7Smrg	else
6613191cded7Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
6614191cded7Smrg	fi
6615191cded7Smrgfi
6616191cded7Smrgrm -f conftest.$ac_ext
6617191cded7Smrg
6618191cded7SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
6619191cded7SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
6620191cded7Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
6621191cded7Smrg	AC_MSG_RESULT([no])
6622191cded7Smrgelse
6623191cded7Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
6624191cded7Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
6625191cded7Smrg		AC_MSG_RESULT([yes])
6626191cded7Smrg	else
6627191cded7Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
6628191cded7Smrg	fi
6629191cded7Smrgfi
6630191cded7Smrgrm -f conftest.$ac_ext
6631191cded7SmrgAC_SUBST(RAWCPPFLAGS)
6632191cded7Smrg]) # XORG_PROG_RAWCPP
6633191cded7Smrg
6634191cded7Smrg# XORG_MANPAGE_SECTIONS()
6635191cded7Smrg# -----------------------
6636191cded7Smrg# Determine which sections man pages go in for the different man page types
6637191cded7Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
6638191cded7Smrg# Not sure if there's any better way than just hardcoding by OS name.
6639191cded7Smrg# Override default settings by setting environment variables
6640191cded7Smrg
6641191cded7SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
6642191cded7SmrgAC_REQUIRE([AC_CANONICAL_HOST])
6643191cded7Smrg
6644191cded7Smrgif test x$APP_MAN_SUFFIX = x    ; then
6645191cded7Smrg    case $host_os in
6646191cded7Smrg	linux*)	APP_MAN_SUFFIX=1x ;;
6647191cded7Smrg	*)	APP_MAN_SUFFIX=1  ;;
6648191cded7Smrg    esac
6649191cded7Smrgfi
6650191cded7Smrgif test x$APP_MAN_DIR = x    ; then
6651191cded7Smrg    case $host_os in
6652191cded7Smrg	linux*)	APP_MAN_DIR='$(mandir)/man1' ;;
6653191cded7Smrg	*)	APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)' ;;
6654191cded7Smrg    esac
6655191cded7Smrgfi
6656191cded7Smrg
6657191cded7Smrgif test x$LIB_MAN_SUFFIX = x    ; then
6658191cded7Smrg    case $host_os in
6659191cded7Smrg	linux*)	LIB_MAN_SUFFIX=3x ;;
6660191cded7Smrg	*)	LIB_MAN_SUFFIX=3  ;;
6661191cded7Smrg    esac
6662191cded7Smrgfi
6663191cded7Smrgif test x$LIB_MAN_DIR = x    ; then
6664191cded7Smrg    case $host_os in
6665191cded7Smrg	linux*)	LIB_MAN_DIR='$(mandir)/man3' ;;
6666191cded7Smrg	*)	LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)' ;;
6667191cded7Smrg    esac
6668191cded7Smrgfi
6669191cded7Smrg
6670191cded7Smrgif test x$FILE_MAN_SUFFIX = x    ; then
6671191cded7Smrg    case $host_os in
6672191cded7Smrg	linux*)		FILE_MAN_SUFFIX=5x ;;
6673191cded7Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
6674191cded7Smrg	*)		FILE_MAN_SUFFIX=5  ;;
6675191cded7Smrg    esac
6676191cded7Smrgfi
6677191cded7Smrgif test x$FILE_MAN_DIR = x    ; then
6678191cded7Smrg    case $host_os in
6679191cded7Smrg	linux*)	FILE_MAN_DIR='$(mandir)/man5' ;;
6680191cded7Smrg	*)	FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)' ;;
6681191cded7Smrg    esac
6682191cded7Smrgfi
6683191cded7Smrg
6684191cded7Smrg# In Imake's linux.cf, the misc man suffix & dir was only changed for 
6685191cded7Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
6686191cded7Smrgif test x$MISC_MAN_SUFFIX = x    ; then
6687191cded7Smrg    case $host_os in
6688191cded7Smrg#	linux*)		MISC_MAN_SUFFIX=7x ;;
6689191cded7Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
6690191cded7Smrg	*)		MISC_MAN_SUFFIX=7  ;;
6691191cded7Smrg    esac
6692191cded7Smrgfi
6693191cded7Smrgif test x$MISC_MAN_DIR = x    ; then
6694191cded7Smrg    case $host_os in
6695191cded7Smrg#	linux*)	MISC_MAN_DIR='$(mandir)/man7' ;;
6696191cded7Smrg	*)	MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)' ;;
6697191cded7Smrg    esac
6698191cded7Smrgfi
6699191cded7Smrg
6700191cded7Smrg# In Imake's linux.cf, the driver man suffix & dir was only changed for 
6701191cded7Smrg# LinuxDebian, not other Linuxes, so we leave it unchanged here
6702191cded7Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
6703191cded7Smrg    case $host_os in
6704191cded7Smrg#	linux*)		DRIVER_MAN_SUFFIX=4x ;;
6705191cded7Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
6706191cded7Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
6707191cded7Smrg    esac
6708191cded7Smrgfi
6709191cded7Smrgif test x$DRIVER_MAN_DIR = x    ; then
6710191cded7Smrg    case $host_os in
6711191cded7Smrg#	linux*)	DRIVER_MAN_DIR='$(mandir)/man4' ;;
6712191cded7Smrg	*)	DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)' ;;
6713191cded7Smrg    esac
6714191cded7Smrgfi
6715191cded7Smrg
6716191cded7Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
6717191cded7Smrg    case $host_os in
6718191cded7Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
6719191cded7Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
6720191cded7Smrg    esac
6721191cded7Smrgfi
6722191cded7Smrgif test x$ADMIN_MAN_DIR = x    ; then
6723191cded7Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
6724191cded7Smrgfi
6725191cded7Smrg
6726191cded7Smrg
6727191cded7SmrgAC_SUBST([APP_MAN_SUFFIX])
6728191cded7SmrgAC_SUBST([LIB_MAN_SUFFIX])
6729191cded7SmrgAC_SUBST([FILE_MAN_SUFFIX])
6730191cded7SmrgAC_SUBST([MISC_MAN_SUFFIX])
6731191cded7SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
6732191cded7SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
6733191cded7SmrgAC_SUBST([APP_MAN_DIR])
6734191cded7SmrgAC_SUBST([LIB_MAN_DIR])
6735191cded7SmrgAC_SUBST([FILE_MAN_DIR])
6736191cded7SmrgAC_SUBST([MISC_MAN_DIR])
6737191cded7SmrgAC_SUBST([DRIVER_MAN_DIR])
6738191cded7SmrgAC_SUBST([ADMIN_MAN_DIR])
6739191cded7Smrg]) # XORG_MANPAGE_SECTIONS
6740191cded7Smrg
6741191cded7Smrg# XORG_CHECK_LINUXDOC
6742191cded7Smrg# -------------------
6743191cded7Smrg# Defines the variable MAKE_TEXT if the necessary tools and
6744191cded7Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
6745191cded7Smrg# Whether or not the necessary tools and files are found can be checked
6746191cded7Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
6747191cded7SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
6748191cded7SmrgAC_CHECK_FILE(
6749191cded7Smrg	[$prefix/share/X11/sgml/defs.ent], 
6750191cded7Smrg	[DEFS_ENT_PATH=$prefix/share/X11/sgml],
6751191cded7Smrg	[DEFS_ENT_PATH=]
6752191cded7Smrg)
6753191cded7Smrg
6754191cded7SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
6755191cded7SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
6756191cded7Smrg
6757191cded7SmrgAC_MSG_CHECKING([Whether to build documentation])
6758191cded7Smrg
6759191cded7Smrgif test x$DEFS_ENT_PATH != x && test x$LINUXDOC != x ; then
6760191cded7Smrg   BUILDDOC=yes
6761191cded7Smrgelse
6762191cded7Smrg   BUILDDOC=no
6763191cded7Smrgfi
6764191cded7Smrg
6765191cded7SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
6766191cded7Smrg
6767191cded7SmrgAC_MSG_RESULT([$BUILDDOC])
6768191cded7Smrg
6769191cded7SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
6770191cded7Smrg
6771191cded7Smrgif test x$PS2PDF != x ; then
6772191cded7Smrg   BUILDPDFDOC=yes
6773191cded7Smrgelse
6774191cded7Smrg   BUILDPDFDOC=no
6775191cded7Smrgfi
6776191cded7Smrg
6777191cded7SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
6778191cded7Smrg
6779191cded7SmrgAC_MSG_RESULT([$BUILDPDFDOC])
6780191cded7Smrg
6781191cded7SmrgMAKE_TEXT="SGML_SEARCH_PATH=$DEFS_ENT_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
6782191cded7SmrgMAKE_PS="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
6783191cded7SmrgMAKE_PDF="$PS2PDF"
6784191cded7SmrgMAKE_HTML="SGML_SEARCH_PATH=$DEFS_ENT_PATH $LINUXDOC  -B html --split=0"
6785191cded7Smrg
6786191cded7SmrgAC_SUBST(MAKE_TEXT)
6787191cded7SmrgAC_SUBST(MAKE_PS)
6788191cded7SmrgAC_SUBST(MAKE_PDF)
6789191cded7SmrgAC_SUBST(MAKE_HTML)
6790191cded7Smrg]) # XORG_CHECK_LINUXDOC
6791191cded7Smrg
6792191cded7Smrg# XORG_CHECK_MALLOC_ZERO
6793191cded7Smrg# ----------------------
6794191cded7Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
6795191cded7Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
6796191cded7Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
6797191cded7SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
6798191cded7SmrgAC_ARG_ENABLE(malloc0returnsnull,
6799191cded7Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
6800191cded7Smrg		       [malloc(0) returns NULL (default: auto)]),
6801191cded7Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
6802191cded7Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
6803191cded7Smrg
6804191cded7SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
6805191cded7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
6806191cded7Smrg	AC_RUN_IFELSE([
6807191cded7Smrgchar *malloc();
6808191cded7Smrgchar *realloc();
6809191cded7Smrgchar *calloc();
6810191cded7Smrgmain() {
6811191cded7Smrg    char *m0, *r0, *c0, *p;
6812191cded7Smrg    m0 = malloc(0);
6813191cded7Smrg    p = malloc(10);
6814191cded7Smrg    r0 = realloc(p,0);
6815191cded7Smrg    c0 = calloc(0);
6816191cded7Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
6817191cded7Smrg}],
6818191cded7Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
6819191cded7Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
6820191cded7Smrgfi
6821191cded7SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
6822191cded7Smrg
6823191cded7Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
6824191cded7Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
6825191cded7Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
6826191cded7Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
6827191cded7Smrgelse
6828191cded7Smrg	MALLOC_ZERO_CFLAGS=""
6829191cded7Smrg	XMALLOC_ZERO_CFLAGS=""
6830191cded7Smrg	XTMALLOC_ZERO_CFLAGS=""
6831191cded7Smrgfi
6832191cded7Smrg
6833191cded7SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
6834191cded7SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
6835191cded7SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
6836191cded7Smrg]) # XORG_CHECK_MALLOC_ZERO
6837191cded7Smrg
6838191cded7Smrgdnl Copyright 2005 Red Hat, Inc
6839191cded7Smrgdnl
6840191cded7Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
6841191cded7Smrgdnl documentation for any purpose is hereby granted without fee, provided that
6842191cded7Smrgdnl the above copyright notice appear in all copies and that both that
6843191cded7Smrgdnl copyright notice and this permission notice appear in supporting
6844191cded7Smrgdnl documentation.
6845191cded7Smrgdnl
6846191cded7Smrgdnl The above copyright notice and this permission notice shall be included
6847191cded7Smrgdnl in all copies or substantial portions of the Software.
6848191cded7Smrgdnl
6849191cded7Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
6850191cded7Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
6851191cded7Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
6852191cded7Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
6853191cded7Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
6854191cded7Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
6855191cded7Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
6856191cded7Smrgdnl
6857191cded7Smrgdnl Except as contained in this notice, the name of the copyright holders shall
6858191cded7Smrgdnl not be used in advertising or otherwise to promote the sale, use or
6859191cded7Smrgdnl other dealings in this Software without prior written authorization
6860191cded7Smrgdnl from the copyright holders.
6861191cded7Smrgdnl
6862191cded7Smrg
6863191cded7Smrg# XORG_RELEASE_VERSION
6864191cded7Smrg# --------------------
6865191cded7Smrg# Adds --with/without-release-string and changes the PACKAGE and
6866191cded7Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
6867191cded7Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.
6868191cded7Smrg 
6869191cded7SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
6870191cded7Smrg	AC_ARG_WITH(release-version,
6871191cded7Smrg			AC_HELP_STRING([--with-release-version=STRING],
6872191cded7Smrg				[Use release version string in package name]),
6873191cded7Smrg			[RELEASE_VERSION="$withval"],
6874191cded7Smrg			[RELEASE_VERSION=""])
6875191cded7Smrg	if test "x$RELEASE_VERSION" != "x"; then
6876191cded7Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
6877191cded7Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
6878191cded7Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
6879191cded7Smrg	fi
6880191cded7Smrg])
6881191cded7Smrg
6882191cded7Smrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
6883191cded7Smrg#
6884191cded7Smrg# This file is free software; the Free Software Foundation
6885191cded7Smrg# gives unlimited permission to copy and/or distribute it,
6886191cded7Smrg# with or without modifications, as long as this notice is preserved.
6887191cded7Smrg
6888191cded7Smrg# AM_AUTOMAKE_VERSION(VERSION)
6889191cded7Smrg# ----------------------------
6890191cded7Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
6891191cded7Smrg# generated from the m4 files accompanying Automake X.Y.
6892191cded7SmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6893191cded7Smrg
6894191cded7Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
6895191cded7Smrg# -------------------------------
6896191cded7Smrg# Call AM_AUTOMAKE_VERSION so it can be traced.
6897191cded7Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6898191cded7SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6899191cded7Smrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
6900191cded7Smrg
6901191cded7Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6902191cded7Smrg
6903191cded7Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6904191cded7Smrg#
6905191cded7Smrg# This file is free software; the Free Software Foundation
6906191cded7Smrg# gives unlimited permission to copy and/or distribute it,
6907191cded7Smrg# with or without modifications, as long as this notice is preserved.
6908191cded7Smrg
6909191cded7Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6910191cded7Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6911191cded7Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6912191cded7Smrg#
6913191cded7Smrg# Of course, Automake must honor this variable whenever it calls a
6914191cded7Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
6915191cded7Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
6916191cded7Smrg# depending on how configure is run.  This is pretty annoying, since
6917191cded7Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6918191cded7Smrg# source directory, any form will work fine, but in subdirectories a
6919191cded7Smrg# relative path needs to be adjusted first.
6920191cded7Smrg#
6921191cded7Smrg# $ac_aux_dir/missing
6922191cded7Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
6923191cded7Smrg# $top_srcdir/$ac_aux_dir/missing
6924191cded7Smrg#    fails if $ac_aux_dir is absolute,
6925191cded7Smrg#    fails when called from a subdirectory in a VPATH build with
6926191cded7Smrg#          a relative $ac_aux_dir
6927191cded7Smrg#
6928191cded7Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6929191cded7Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
6930191cded7Smrg# harmless because $srcdir is `.', but things will broke when you
6931191cded7Smrg# start a VPATH build or use an absolute $srcdir.
6932191cded7Smrg#
6933191cded7Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6934191cded7Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6935191cded7Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6936191cded7Smrg# and then we would define $MISSING as
6937191cded7Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
6938191cded7Smrg# This will work as long as MISSING is not called from configure, because
6939191cded7Smrg# unfortunately $(top_srcdir) has no meaning in configure.
6940191cded7Smrg# However there are other variables, like CC, which are often used in
6941191cded7Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
6942191cded7Smrg#
6943191cded7Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
6944191cded7Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
6945191cded7Smrg# configured tree to be moved without reconfiguration.
6946191cded7Smrg
6947191cded7SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
6948191cded7Smrg[dnl Rely on autoconf to set up CDPATH properly.
6949191cded7SmrgAC_PREREQ([2.50])dnl
6950191cded7Smrg# expand $ac_aux_dir to an absolute path
6951191cded7Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
6952191cded7Smrg])
6953191cded7Smrg
6954191cded7Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
6955191cded7Smrg
6956191cded7Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6957191cded7Smrg# Free Software Foundation, Inc.
6958191cded7Smrg#
6959191cded7Smrg# This file is free software; the Free Software Foundation
6960191cded7Smrg# gives unlimited permission to copy and/or distribute it,
6961191cded7Smrg# with or without modifications, as long as this notice is preserved.
6962191cded7Smrg
6963191cded7Smrg# serial 7
6964191cded7Smrg
6965191cded7Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6966191cded7Smrg# -------------------------------------
6967191cded7Smrg# Define a conditional.
6968191cded7SmrgAC_DEFUN([AM_CONDITIONAL],
6969191cded7Smrg[AC_PREREQ(2.52)dnl
6970191cded7Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6971191cded7Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6972191cded7SmrgAC_SUBST([$1_TRUE])
6973191cded7SmrgAC_SUBST([$1_FALSE])
6974191cded7Smrgif $2; then
6975191cded7Smrg  $1_TRUE=
6976191cded7Smrg  $1_FALSE='#'
6977191cded7Smrgelse
6978191cded7Smrg  $1_TRUE='#'
6979191cded7Smrg  $1_FALSE=
6980191cded7Smrgfi
6981191cded7SmrgAC_CONFIG_COMMANDS_PRE(
6982191cded7Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6983191cded7Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
6984191cded7SmrgUsually this means the macro was only invoked conditionally.]])
6985191cded7Smrgfi])])
6986191cded7Smrg
6987191cded7Smrg
6988191cded7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6989191cded7Smrg# Free Software Foundation, Inc.
6990191cded7Smrg#
6991191cded7Smrg# This file is free software; the Free Software Foundation
6992191cded7Smrg# gives unlimited permission to copy and/or distribute it,
6993191cded7Smrg# with or without modifications, as long as this notice is preserved.
6994191cded7Smrg
6995191cded7Smrg# serial 8
6996191cded7Smrg
6997191cded7Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6998191cded7Smrg# written in clear, in which case automake, when reading aclocal.m4,
6999191cded7Smrg# will think it sees a *use*, and therefore will trigger all it's
7000191cded7Smrg# C support machinery.  Also note that it means that autoscan, seeing
7001191cded7Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
7002191cded7Smrg
7003191cded7Smrg
7004191cded7Smrg# _AM_DEPENDENCIES(NAME)
7005191cded7Smrg# ----------------------
7006191cded7Smrg# See how the compiler implements dependency checking.
7007191cded7Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
7008191cded7Smrg# We try a few techniques and use that to set a single cache variable.
7009191cded7Smrg#
7010191cded7Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
7011191cded7Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
7012191cded7Smrg# dependency, and given that the user is not expected to run this macro,
7013191cded7Smrg# just rely on AC_PROG_CC.
7014191cded7SmrgAC_DEFUN([_AM_DEPENDENCIES],
7015191cded7Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
7016191cded7SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
7017191cded7SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
7018191cded7SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
7019191cded7Smrg
7020191cded7Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
7021191cded7Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
7022191cded7Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
7023191cded7Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
7024191cded7Smrg                   [depcc="$$1"   am_compiler_list=])
7025191cded7Smrg
7026191cded7SmrgAC_CACHE_CHECK([dependency style of $depcc],
7027191cded7Smrg               [am_cv_$1_dependencies_compiler_type],
7028191cded7Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
7029191cded7Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
7030191cded7Smrg  # making bogus files that we don't know about and never remove.  For
7031191cded7Smrg  # instance it was reported that on HP-UX the gcc test will end up
7032191cded7Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
7033191cded7Smrg  # in D'.
7034191cded7Smrg  mkdir conftest.dir
7035191cded7Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
7036191cded7Smrg  # using a relative directory.
7037191cded7Smrg  cp "$am_depcomp" conftest.dir
7038191cded7Smrg  cd conftest.dir
7039191cded7Smrg  # We will build objects and dependencies in a subdirectory because
7040191cded7Smrg  # it helps to detect inapplicable dependency modes.  For instance
7041191cded7Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
7042191cded7Smrg  # side effect of compilation, but ICC will put the dependencies in
7043191cded7Smrg  # the current directory while Tru64 will put them in the object
7044191cded7Smrg  # directory.
7045191cded7Smrg  mkdir sub
7046191cded7Smrg
7047191cded7Smrg  am_cv_$1_dependencies_compiler_type=none
7048191cded7Smrg  if test "$am_compiler_list" = ""; then
7049191cded7Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7050191cded7Smrg  fi
7051191cded7Smrg  for depmode in $am_compiler_list; do
7052191cded7Smrg    # Setup a source with many dependencies, because some compilers
7053191cded7Smrg    # like to wrap large dependency lists on column 80 (with \), and
7054191cded7Smrg    # we should not choose a depcomp mode which is confused by this.
7055191cded7Smrg    #
7056191cded7Smrg    # We need to recreate these files for each test, as the compiler may
7057191cded7Smrg    # overwrite some of them when testing with obscure command lines.
7058191cded7Smrg    # This happens at least with the AIX C compiler.
7059191cded7Smrg    : > sub/conftest.c
7060191cded7Smrg    for i in 1 2 3 4 5 6; do
7061191cded7Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
7062191cded7Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
7063191cded7Smrg      # Solaris 8's {/usr,}/bin/sh.
7064191cded7Smrg      touch sub/conftst$i.h
7065191cded7Smrg    done
7066191cded7Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7067191cded7Smrg
7068191cded7Smrg    case $depmode in
7069191cded7Smrg    nosideeffect)
7070191cded7Smrg      # after this tag, mechanisms are not by side-effect, so they'll
7071191cded7Smrg      # only be used when explicitly requested
7072191cded7Smrg      if test "x$enable_dependency_tracking" = xyes; then
7073191cded7Smrg	continue
7074191cded7Smrg      else
7075191cded7Smrg	break
7076191cded7Smrg      fi
7077191cded7Smrg      ;;
7078191cded7Smrg    none) break ;;
7079191cded7Smrg    esac
7080191cded7Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
7081191cded7Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
7082191cded7Smrg    # handle `-M -o', and we need to detect this.
7083191cded7Smrg    if depmode=$depmode \
7084191cded7Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
7085191cded7Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
7086191cded7Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
7087191cded7Smrg         >/dev/null 2>conftest.err &&
7088191cded7Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
7089191cded7Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
7090191cded7Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
7091191cded7Smrg      # icc doesn't choke on unknown options, it will just issue warnings
7092191cded7Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
7093191cded7Smrg      # that says an option was ignored or not supported.
7094191cded7Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
7095191cded7Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
7096191cded7Smrg      # The diagnosis changed in icc 8.0:
7097191cded7Smrg      #   icc: Command line remark: option '-MP' not supported
7098191cded7Smrg      if (grep 'ignoring option' conftest.err ||
7099191cded7Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
7100191cded7Smrg        am_cv_$1_dependencies_compiler_type=$depmode
7101191cded7Smrg        break
7102191cded7Smrg      fi
7103191cded7Smrg    fi
7104191cded7Smrg  done
7105191cded7Smrg
7106191cded7Smrg  cd ..
7107191cded7Smrg  rm -rf conftest.dir
7108191cded7Smrgelse
7109191cded7Smrg  am_cv_$1_dependencies_compiler_type=none
7110191cded7Smrgfi
7111191cded7Smrg])
7112191cded7SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
7113191cded7SmrgAM_CONDITIONAL([am__fastdep$1], [
7114191cded7Smrg  test "x$enable_dependency_tracking" != xno \
7115191cded7Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
7116191cded7Smrg])
7117191cded7Smrg
7118191cded7Smrg
7119191cded7Smrg# AM_SET_DEPDIR
7120191cded7Smrg# -------------
7121191cded7Smrg# Choose a directory name for dependency files.
7122191cded7Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
7123191cded7SmrgAC_DEFUN([AM_SET_DEPDIR],
7124191cded7Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
7125191cded7SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
7126191cded7Smrg])
7127191cded7Smrg
7128191cded7Smrg
7129191cded7Smrg# AM_DEP_TRACK
7130191cded7Smrg# ------------
7131191cded7SmrgAC_DEFUN([AM_DEP_TRACK],
7132191cded7Smrg[AC_ARG_ENABLE(dependency-tracking,
7133191cded7Smrg[  --disable-dependency-tracking  speeds up one-time build
7134191cded7Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
7135191cded7Smrgif test "x$enable_dependency_tracking" != xno; then
7136191cded7Smrg  am_depcomp="$ac_aux_dir/depcomp"
7137191cded7Smrg  AMDEPBACKSLASH='\'
7138191cded7Smrgfi
7139191cded7SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
7140191cded7SmrgAC_SUBST([AMDEPBACKSLASH])
7141191cded7Smrg])
7142191cded7Smrg
7143191cded7Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
7144191cded7Smrg
7145191cded7Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
7146191cded7Smrg# Free Software Foundation, Inc.
7147191cded7Smrg#
7148191cded7Smrg# This file is free software; the Free Software Foundation
7149191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7150191cded7Smrg# with or without modifications, as long as this notice is preserved.
7151191cded7Smrg
7152191cded7Smrg#serial 3
7153191cded7Smrg
7154191cded7Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
7155191cded7Smrg# ------------------------------
7156191cded7SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
7157191cded7Smrg[for mf in $CONFIG_FILES; do
7158191cded7Smrg  # Strip MF so we end up with the name of the file.
7159191cded7Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
7160191cded7Smrg  # Check whether this is an Automake generated Makefile or not.
7161191cded7Smrg  # We used to match only the files named `Makefile.in', but
7162191cded7Smrg  # some people rename them; so instead we look at the file content.
7163191cded7Smrg  # Grep'ing the first line is not enough: some people post-process
7164191cded7Smrg  # each Makefile.in and add a new line on top of each file to say so.
7165191cded7Smrg  # So let's grep whole file.
7166191cded7Smrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
7167191cded7Smrg    dirpart=`AS_DIRNAME("$mf")`
7168191cded7Smrg  else
7169191cded7Smrg    continue
7170191cded7Smrg  fi
7171191cded7Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
7172191cded7Smrg  # from the Makefile without running `make'.
7173191cded7Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
7174191cded7Smrg  test -z "$DEPDIR" && continue
7175191cded7Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
7176191cded7Smrg  test -z "am__include" && continue
7177191cded7Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
7178191cded7Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
7179191cded7Smrg  U=`sed -n 's/^U = //p' < "$mf"`
7180191cded7Smrg  # Find all dependency output files, they are included files with
7181191cded7Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
7182191cded7Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
7183191cded7Smrg  # expansion.
7184191cded7Smrg  for file in `sed -n "
7185191cded7Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
7186191cded7Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
7187191cded7Smrg    # Make sure the directory exists.
7188191cded7Smrg    test -f "$dirpart/$file" && continue
7189191cded7Smrg    fdir=`AS_DIRNAME(["$file"])`
7190191cded7Smrg    AS_MKDIR_P([$dirpart/$fdir])
7191191cded7Smrg    # echo "creating $dirpart/$file"
7192191cded7Smrg    echo '# dummy' > "$dirpart/$file"
7193191cded7Smrg  done
7194191cded7Smrgdone
7195191cded7Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
7196191cded7Smrg
7197191cded7Smrg
7198191cded7Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
7199191cded7Smrg# -----------------------------
7200191cded7Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
7201191cded7Smrg#
7202191cded7Smrg# This code is only required when automatic dependency tracking
7203191cded7Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
7204191cded7Smrg# need in order to bootstrap the dependency handling code.
7205191cded7SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
7206191cded7Smrg[AC_CONFIG_COMMANDS([depfiles],
7207191cded7Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
7208191cded7Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
7209191cded7Smrg])
7210191cded7Smrg
7211191cded7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7212191cded7Smrg# Free Software Foundation, Inc.
7213191cded7Smrg#
7214191cded7Smrg# This file is free software; the Free Software Foundation
7215191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7216191cded7Smrg# with or without modifications, as long as this notice is preserved.
7217191cded7Smrg
7218191cded7Smrg# serial 8
7219191cded7Smrg
7220191cded7Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
7221191cded7SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
7222191cded7Smrg
7223191cded7Smrg# Do all the work for Automake.                             -*- Autoconf -*-
7224191cded7Smrg
7225191cded7Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
7226191cded7Smrg# Free Software Foundation, Inc.
7227191cded7Smrg#
7228191cded7Smrg# This file is free software; the Free Software Foundation
7229191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7230191cded7Smrg# with or without modifications, as long as this notice is preserved.
7231191cded7Smrg
7232191cded7Smrg# serial 12
7233191cded7Smrg
7234191cded7Smrg# This macro actually does too much.  Some checks are only needed if
7235191cded7Smrg# your package does certain things.  But this isn't really a big deal.
7236191cded7Smrg
7237191cded7Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
7238191cded7Smrg# AM_INIT_AUTOMAKE([OPTIONS])
7239191cded7Smrg# -----------------------------------------------
7240191cded7Smrg# The call with PACKAGE and VERSION arguments is the old style
7241191cded7Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
7242191cded7Smrg# and VERSION should now be passed to AC_INIT and removed from
7243191cded7Smrg# the call to AM_INIT_AUTOMAKE.
7244191cded7Smrg# We support both call styles for the transition.  After
7245191cded7Smrg# the next Automake release, Autoconf can make the AC_INIT
7246191cded7Smrg# arguments mandatory, and then we can depend on a new Autoconf
7247191cded7Smrg# release and drop the old call support.
7248191cded7SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
7249191cded7Smrg[AC_PREREQ([2.58])dnl
7250191cded7Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
7251191cded7Smrgdnl the ones we care about.
7252191cded7Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
7253191cded7SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
7254191cded7SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
7255191cded7Smrg# test to see if srcdir already configured
7256191cded7Smrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
7257191cded7Smrg   test -f $srcdir/config.status; then
7258191cded7Smrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
7259191cded7Smrgfi
7260191cded7Smrg
7261191cded7Smrg# test whether we have cygpath
7262191cded7Smrgif test -z "$CYGPATH_W"; then
7263191cded7Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
7264191cded7Smrg    CYGPATH_W='cygpath -w'
7265191cded7Smrg  else
7266191cded7Smrg    CYGPATH_W=echo
7267191cded7Smrg  fi
7268191cded7Smrgfi
7269191cded7SmrgAC_SUBST([CYGPATH_W])
7270191cded7Smrg
7271191cded7Smrg# Define the identity of the package.
7272191cded7Smrgdnl Distinguish between old-style and new-style calls.
7273191cded7Smrgm4_ifval([$2],
7274191cded7Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
7275191cded7Smrg AC_SUBST([PACKAGE], [$1])dnl
7276191cded7Smrg AC_SUBST([VERSION], [$2])],
7277191cded7Smrg[_AM_SET_OPTIONS([$1])dnl
7278191cded7Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
7279191cded7Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
7280191cded7Smrg
7281191cded7Smrg_AM_IF_OPTION([no-define],,
7282191cded7Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
7283191cded7Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
7284191cded7Smrg
7285191cded7Smrg# Some tools Automake needs.
7286191cded7SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
7287191cded7SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
7288191cded7SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
7289191cded7SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
7290191cded7SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
7291191cded7SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
7292191cded7SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
7293191cded7SmrgAM_PROG_INSTALL_SH
7294191cded7SmrgAM_PROG_INSTALL_STRIP
7295191cded7SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
7296191cded7Smrg# We need awk for the "check" target.  The system "awk" is bad on
7297191cded7Smrg# some platforms.
7298191cded7SmrgAC_REQUIRE([AC_PROG_AWK])dnl
7299191cded7SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
7300191cded7SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
7301191cded7Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
7302191cded7Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
7303191cded7Smrg	      		     [_AM_PROG_TAR([v7])])])
7304191cded7Smrg_AM_IF_OPTION([no-dependencies],,
7305191cded7Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
7306191cded7Smrg                  [_AM_DEPENDENCIES(CC)],
7307191cded7Smrg                  [define([AC_PROG_CC],
7308191cded7Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
7309191cded7SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
7310191cded7Smrg                  [_AM_DEPENDENCIES(CXX)],
7311191cded7Smrg                  [define([AC_PROG_CXX],
7312191cded7Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
7313191cded7Smrg])
7314191cded7Smrg])
7315191cded7Smrg
7316191cded7Smrg
7317191cded7Smrg# When config.status generates a header, we must update the stamp-h file.
7318191cded7Smrg# This file resides in the same directory as the config header
7319191cded7Smrg# that is generated.  The stamp files are numbered to have different names.
7320191cded7Smrg
7321191cded7Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
7322191cded7Smrg# loop where config.status creates the headers, so we can generate
7323191cded7Smrg# our stamp files there.
7324191cded7SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
7325191cded7Smrg[# Compute $1's index in $config_headers.
7326191cded7Smrg_am_stamp_count=1
7327191cded7Smrgfor _am_header in $config_headers :; do
7328191cded7Smrg  case $_am_header in
7329191cded7Smrg    $1 | $1:* )
7330191cded7Smrg      break ;;
7331191cded7Smrg    * )
7332191cded7Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
7333191cded7Smrg  esac
7334191cded7Smrgdone
7335191cded7Smrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
7336191cded7Smrg
7337191cded7Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7338191cded7Smrg#
7339191cded7Smrg# This file is free software; the Free Software Foundation
7340191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7341191cded7Smrg# with or without modifications, as long as this notice is preserved.
7342191cded7Smrg
7343191cded7Smrg# AM_PROG_INSTALL_SH
7344191cded7Smrg# ------------------
7345191cded7Smrg# Define $install_sh.
7346191cded7SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
7347191cded7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7348191cded7Smrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
7349191cded7SmrgAC_SUBST(install_sh)])
7350191cded7Smrg
7351191cded7Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7352191cded7Smrg#
7353191cded7Smrg# This file is free software; the Free Software Foundation
7354191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7355191cded7Smrg# with or without modifications, as long as this notice is preserved.
7356191cded7Smrg
7357191cded7Smrg# serial 2
7358191cded7Smrg
7359191cded7Smrg# Check whether the underlying file-system supports filenames
7360191cded7Smrg# with a leading dot.  For instance MS-DOS doesn't.
7361191cded7SmrgAC_DEFUN([AM_SET_LEADING_DOT],
7362191cded7Smrg[rm -rf .tst 2>/dev/null
7363191cded7Smrgmkdir .tst 2>/dev/null
7364191cded7Smrgif test -d .tst; then
7365191cded7Smrg  am__leading_dot=.
7366191cded7Smrgelse
7367191cded7Smrg  am__leading_dot=_
7368191cded7Smrgfi
7369191cded7Smrgrmdir .tst 2>/dev/null
7370191cded7SmrgAC_SUBST([am__leading_dot])])
7371191cded7Smrg
7372191cded7Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
7373191cded7Smrg# From Jim Meyering
7374191cded7Smrg
7375191cded7Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7376191cded7Smrg# Free Software Foundation, Inc.
7377191cded7Smrg#
7378191cded7Smrg# This file is free software; the Free Software Foundation
7379191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7380191cded7Smrg# with or without modifications, as long as this notice is preserved.
7381191cded7Smrg
7382191cded7Smrg# serial 4
7383191cded7Smrg
7384191cded7SmrgAC_DEFUN([AM_MAINTAINER_MODE],
7385191cded7Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7386191cded7Smrg  dnl maintainer-mode is disabled by default
7387191cded7Smrg  AC_ARG_ENABLE(maintainer-mode,
7388191cded7Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
7389191cded7Smrg			  (and sometimes confusing) to the casual installer],
7390191cded7Smrg      USE_MAINTAINER_MODE=$enableval,
7391191cded7Smrg      USE_MAINTAINER_MODE=no)
7392191cded7Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7393191cded7Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7394191cded7Smrg  MAINT=$MAINTAINER_MODE_TRUE
7395191cded7Smrg  AC_SUBST(MAINT)dnl
7396191cded7Smrg]
7397191cded7Smrg)
7398191cded7Smrg
7399191cded7SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7400191cded7Smrg
7401191cded7Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
7402191cded7Smrg
7403191cded7Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7404191cded7Smrg#
7405191cded7Smrg# This file is free software; the Free Software Foundation
7406191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7407191cded7Smrg# with or without modifications, as long as this notice is preserved.
7408191cded7Smrg
7409191cded7Smrg# serial 3
7410191cded7Smrg
7411191cded7Smrg# AM_MAKE_INCLUDE()
7412191cded7Smrg# -----------------
7413191cded7Smrg# Check to see how make treats includes.
7414191cded7SmrgAC_DEFUN([AM_MAKE_INCLUDE],
7415191cded7Smrg[am_make=${MAKE-make}
7416191cded7Smrgcat > confinc << 'END'
7417191cded7Smrgam__doit:
7418191cded7Smrg	@echo done
7419191cded7Smrg.PHONY: am__doit
7420191cded7SmrgEND
7421191cded7Smrg# If we don't find an include directive, just comment out the code.
7422191cded7SmrgAC_MSG_CHECKING([for style of include used by $am_make])
7423191cded7Smrgam__include="#"
7424191cded7Smrgam__quote=
7425191cded7Smrg_am_result=none
7426191cded7Smrg# First try GNU make style include.
7427191cded7Smrgecho "include confinc" > confmf
7428191cded7Smrg# We grep out `Entering directory' and `Leaving directory'
7429191cded7Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
7430191cded7Smrg# In particular we don't look at `^make:' because GNU make might
7431191cded7Smrg# be invoked under some other name (usually "gmake"), in which
7432191cded7Smrg# case it prints its new name instead of `make'.
7433191cded7Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7434191cded7Smrg   am__include=include
7435191cded7Smrg   am__quote=
7436191cded7Smrg   _am_result=GNU
7437191cded7Smrgfi
7438191cded7Smrg# Now try BSD make style include.
7439191cded7Smrgif test "$am__include" = "#"; then
7440191cded7Smrg   echo '.include "confinc"' > confmf
7441191cded7Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7442191cded7Smrg      am__include=.include
7443191cded7Smrg      am__quote="\""
7444191cded7Smrg      _am_result=BSD
7445191cded7Smrg   fi
7446191cded7Smrgfi
7447191cded7SmrgAC_SUBST([am__include])
7448191cded7SmrgAC_SUBST([am__quote])
7449191cded7SmrgAC_MSG_RESULT([$_am_result])
7450191cded7Smrgrm -f confinc confmf
7451191cded7Smrg])
7452191cded7Smrg
7453191cded7Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7454191cded7Smrg
7455191cded7Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
7456191cded7Smrg# Free Software Foundation, Inc.
7457191cded7Smrg#
7458191cded7Smrg# This file is free software; the Free Software Foundation
7459191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7460191cded7Smrg# with or without modifications, as long as this notice is preserved.
7461191cded7Smrg
7462191cded7Smrg# serial 4
7463191cded7Smrg
7464191cded7Smrg# AM_MISSING_PROG(NAME, PROGRAM)
7465191cded7Smrg# ------------------------------
7466191cded7SmrgAC_DEFUN([AM_MISSING_PROG],
7467191cded7Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7468191cded7Smrg$1=${$1-"${am_missing_run}$2"}
7469191cded7SmrgAC_SUBST($1)])
7470191cded7Smrg
7471191cded7Smrg
7472191cded7Smrg# AM_MISSING_HAS_RUN
7473191cded7Smrg# ------------------
7474191cded7Smrg# Define MISSING if not defined so far and test if it supports --run.
7475191cded7Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
7476191cded7SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7477191cded7Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7478191cded7Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7479191cded7Smrg# Use eval to expand $SHELL
7480191cded7Smrgif eval "$MISSING --run true"; then
7481191cded7Smrg  am_missing_run="$MISSING --run "
7482191cded7Smrgelse
7483191cded7Smrg  am_missing_run=
7484191cded7Smrg  AC_MSG_WARN([`missing' script is too old or missing])
7485191cded7Smrgfi
7486191cded7Smrg])
7487191cded7Smrg
7488191cded7Smrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
7489191cded7Smrg#
7490191cded7Smrg# This file is free software; the Free Software Foundation
7491191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7492191cded7Smrg# with or without modifications, as long as this notice is preserved.
7493191cded7Smrg
7494191cded7Smrg# AM_PROG_MKDIR_P
7495191cded7Smrg# ---------------
7496191cded7Smrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7497191cded7Smrg#
7498191cded7Smrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7499191cded7Smrg# created by `make install' are always world readable, even if the
7500191cded7Smrg# installer happens to have an overly restrictive umask (e.g. 077).
7501191cded7Smrg# This was a mistake.  There are at least two reasons why we must not
7502191cded7Smrg# use `-m 0755':
7503191cded7Smrg#   - it causes special bits like SGID to be ignored,
7504191cded7Smrg#   - it may be too restrictive (some setups expect 775 directories).
7505191cded7Smrg#
7506191cded7Smrg# Do not use -m 0755 and let people choose whatever they expect by
7507191cded7Smrg# setting umask.
7508191cded7Smrg#
7509191cded7Smrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7510191cded7Smrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
7511191cded7Smrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7512191cded7Smrg# concurrently, both version can detect that a/ is missing, but only
7513191cded7Smrg# one can create it and the other will error out.  Consequently we
7514191cded7Smrg# restrict ourselves to GNU make (using the --version option ensures
7515191cded7Smrg# this.)
7516191cded7SmrgAC_DEFUN([AM_PROG_MKDIR_P],
7517191cded7Smrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7518191cded7Smrg  # We used to keeping the `.' as first argument, in order to
7519191cded7Smrg  # allow $(mkdir_p) to be used without argument.  As in
7520191cded7Smrg  #   $(mkdir_p) $(somedir)
7521191cded7Smrg  # where $(somedir) is conditionally defined.  However this is wrong
7522191cded7Smrg  # for two reasons:
7523191cded7Smrg  #  1. if the package is installed by a user who cannot write `.'
7524191cded7Smrg  #     make install will fail,
7525191cded7Smrg  #  2. the above comment should most certainly read
7526191cded7Smrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
7527191cded7Smrg  #     so it does not work when $(somedir) is undefined and
7528191cded7Smrg  #     $(DESTDIR) is not.
7529191cded7Smrg  #  To support the latter case, we have to write
7530191cded7Smrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7531191cded7Smrg  #  so the `.' trick is pointless.
7532191cded7Smrg  mkdir_p='mkdir -p --'
7533191cded7Smrgelse
7534191cded7Smrg  # On NextStep and OpenStep, the `mkdir' command does not
7535191cded7Smrg  # recognize any option.  It will interpret all options as
7536191cded7Smrg  # directories to create, and then abort because `.' already
7537191cded7Smrg  # exists.
7538191cded7Smrg  for d in ./-p ./--version;
7539191cded7Smrg  do
7540191cded7Smrg    test -d $d && rmdir $d
7541191cded7Smrg  done
7542191cded7Smrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7543191cded7Smrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
7544191cded7Smrg    mkdir_p='$(mkinstalldirs)'
7545191cded7Smrg  else
7546191cded7Smrg    mkdir_p='$(install_sh) -d'
7547191cded7Smrg  fi
7548191cded7Smrgfi
7549191cded7SmrgAC_SUBST([mkdir_p])])
7550191cded7Smrg
7551191cded7Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7552191cded7Smrg
7553191cded7Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7554191cded7Smrg#
7555191cded7Smrg# This file is free software; the Free Software Foundation
7556191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7557191cded7Smrg# with or without modifications, as long as this notice is preserved.
7558191cded7Smrg
7559191cded7Smrg# serial 3
7560191cded7Smrg
7561191cded7Smrg# _AM_MANGLE_OPTION(NAME)
7562191cded7Smrg# -----------------------
7563191cded7SmrgAC_DEFUN([_AM_MANGLE_OPTION],
7564191cded7Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7565191cded7Smrg
7566191cded7Smrg# _AM_SET_OPTION(NAME)
7567191cded7Smrg# ------------------------------
7568191cded7Smrg# Set option NAME.  Presently that only means defining a flag for this option.
7569191cded7SmrgAC_DEFUN([_AM_SET_OPTION],
7570191cded7Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7571191cded7Smrg
7572191cded7Smrg# _AM_SET_OPTIONS(OPTIONS)
7573191cded7Smrg# ----------------------------------
7574191cded7Smrg# OPTIONS is a space-separated list of Automake options.
7575191cded7SmrgAC_DEFUN([_AM_SET_OPTIONS],
7576191cded7Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7577191cded7Smrg
7578191cded7Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7579191cded7Smrg# -------------------------------------------
7580191cded7Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7581191cded7SmrgAC_DEFUN([_AM_IF_OPTION],
7582191cded7Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7583191cded7Smrg
7584191cded7Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7585191cded7Smrg
7586191cded7Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7587191cded7Smrg# Free Software Foundation, Inc.
7588191cded7Smrg#
7589191cded7Smrg# This file is free software; the Free Software Foundation
7590191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7591191cded7Smrg# with or without modifications, as long as this notice is preserved.
7592191cded7Smrg
7593191cded7Smrg# serial 4
7594191cded7Smrg
7595191cded7Smrg# AM_SANITY_CHECK
7596191cded7Smrg# ---------------
7597191cded7SmrgAC_DEFUN([AM_SANITY_CHECK],
7598191cded7Smrg[AC_MSG_CHECKING([whether build environment is sane])
7599191cded7Smrg# Just in case
7600191cded7Smrgsleep 1
7601191cded7Smrgecho timestamp > conftest.file
7602191cded7Smrg# Do `set' in a subshell so we don't clobber the current shell's
7603191cded7Smrg# arguments.  Must try -L first in case configure is actually a
7604191cded7Smrg# symlink; some systems play weird games with the mod time of symlinks
7605191cded7Smrg# (eg FreeBSD returns the mod time of the symlink's containing
7606191cded7Smrg# directory).
7607191cded7Smrgif (
7608191cded7Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7609191cded7Smrg   if test "$[*]" = "X"; then
7610191cded7Smrg      # -L didn't work.
7611191cded7Smrg      set X `ls -t $srcdir/configure conftest.file`
7612191cded7Smrg   fi
7613191cded7Smrg   rm -f conftest.file
7614191cded7Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
7615191cded7Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7616191cded7Smrg
7617191cded7Smrg      # If neither matched, then we have a broken ls.  This can happen
7618191cded7Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
7619191cded7Smrg      # broken ls alias from the environment.  This has actually
7620191cded7Smrg      # happened.  Such a system could not be considered "sane".
7621191cded7Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7622191cded7Smrgalias in your environment])
7623191cded7Smrg   fi
7624191cded7Smrg
7625191cded7Smrg   test "$[2]" = conftest.file
7626191cded7Smrg   )
7627191cded7Smrgthen
7628191cded7Smrg   # Ok.
7629191cded7Smrg   :
7630191cded7Smrgelse
7631191cded7Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
7632191cded7SmrgCheck your system clock])
7633191cded7Smrgfi
7634191cded7SmrgAC_MSG_RESULT(yes)])
7635191cded7Smrg
7636191cded7Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7637191cded7Smrg#
7638191cded7Smrg# This file is free software; the Free Software Foundation
7639191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7640191cded7Smrg# with or without modifications, as long as this notice is preserved.
7641191cded7Smrg
7642191cded7Smrg# AM_PROG_INSTALL_STRIP
7643191cded7Smrg# ---------------------
7644191cded7Smrg# One issue with vendor `install' (even GNU) is that you can't
7645191cded7Smrg# specify the program used to strip binaries.  This is especially
7646191cded7Smrg# annoying in cross-compiling environments, where the build's strip
7647191cded7Smrg# is unlikely to handle the host's binaries.
7648191cded7Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
7649191cded7Smrg# always use install-sh in `make install-strip', and initialize
7650191cded7Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
7651191cded7SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
7652191cded7Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7653191cded7Smrg# Installed binaries are usually stripped using `strip' when the user
7654191cded7Smrg# run `make install-strip'.  However `strip' might not be the right
7655191cded7Smrg# tool to use in cross-compilation environments, therefore Automake
7656191cded7Smrg# will honor the `STRIP' environment variable to overrule this program.
7657191cded7Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7658191cded7Smrgif test "$cross_compiling" != no; then
7659191cded7Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
7660191cded7Smrgfi
7661191cded7SmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7662191cded7SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
7663191cded7Smrg
7664191cded7Smrg# Check how to create a tarball.                            -*- Autoconf -*-
7665191cded7Smrg
7666191cded7Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7667191cded7Smrg#
7668191cded7Smrg# This file is free software; the Free Software Foundation
7669191cded7Smrg# gives unlimited permission to copy and/or distribute it,
7670191cded7Smrg# with or without modifications, as long as this notice is preserved.
7671191cded7Smrg
7672191cded7Smrg# serial 2
7673191cded7Smrg
7674191cded7Smrg# _AM_PROG_TAR(FORMAT)
7675191cded7Smrg# --------------------
7676191cded7Smrg# Check how to create a tarball in format FORMAT.
7677191cded7Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
7678191cded7Smrg#
7679191cded7Smrg# Substitute a variable $(am__tar) that is a command
7680191cded7Smrg# writing to stdout a FORMAT-tarball containing the directory
7681191cded7Smrg# $tardir.
7682191cded7Smrg#     tardir=directory && $(am__tar) > result.tar
7683191cded7Smrg#
7684191cded7Smrg# Substitute a variable $(am__untar) that extract such
7685191cded7Smrg# a tarball read from stdin.
7686191cded7Smrg#     $(am__untar) < result.tar
7687191cded7SmrgAC_DEFUN([_AM_PROG_TAR],
7688191cded7Smrg[# Always define AMTAR for backward compatibility.
7689191cded7SmrgAM_MISSING_PROG([AMTAR], [tar])
7690191cded7Smrgm4_if([$1], [v7],
7691191cded7Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7692191cded7Smrg     [m4_case([$1], [ustar],, [pax],,
7693191cded7Smrg              [m4_fatal([Unknown tar format])])
7694191cded7SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
7695191cded7Smrg# Loop over all known methods to create a tar archive until one works.
7696191cded7Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7697191cded7Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7698191cded7Smrg# Do not fold the above two line into one, because Tru64 sh and
7699191cded7Smrg# Solaris sh will not grok spaces in the rhs of `-'.
7700191cded7Smrgfor _am_tool in $_am_tools
7701191cded7Smrgdo
7702191cded7Smrg  case $_am_tool in
7703191cded7Smrg  gnutar)
7704191cded7Smrg    for _am_tar in tar gnutar gtar;
7705191cded7Smrg    do
7706191cded7Smrg      AM_RUN_LOG([$_am_tar --version]) && break
7707191cded7Smrg    done
7708191cded7Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7709191cded7Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7710191cded7Smrg    am__untar="$_am_tar -xf -"
7711191cded7Smrg    ;;
7712191cded7Smrg  plaintar)
7713191cded7Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
7714191cded7Smrg    # ustar tarball either.
7715191cded7Smrg    (tar --version) >/dev/null 2>&1 && continue
7716191cded7Smrg    am__tar='tar chf - "$$tardir"'
7717191cded7Smrg    am__tar_='tar chf - "$tardir"'
7718191cded7Smrg    am__untar='tar xf -'
7719191cded7Smrg    ;;
7720191cded7Smrg  pax)
7721191cded7Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
7722191cded7Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
7723191cded7Smrg    am__untar='pax -r'
7724191cded7Smrg    ;;
7725191cded7Smrg  cpio)
7726191cded7Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7727191cded7Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7728191cded7Smrg    am__untar='cpio -i -H $1 -d'
7729191cded7Smrg    ;;
7730191cded7Smrg  none)
7731191cded7Smrg    am__tar=false
7732191cded7Smrg    am__tar_=false
7733191cded7Smrg    am__untar=false
7734191cded7Smrg    ;;
7735191cded7Smrg  esac
7736191cded7Smrg
7737191cded7Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
7738191cded7Smrg  # and am__untar set.
7739191cded7Smrg  test -n "${am_cv_prog_tar_$1}" && break
7740191cded7Smrg
7741191cded7Smrg  # tar/untar a dummy directory, and stop if the command works
7742191cded7Smrg  rm -rf conftest.dir
7743191cded7Smrg  mkdir conftest.dir
7744191cded7Smrg  echo GrepMe > conftest.dir/file
7745191cded7Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7746191cded7Smrg  rm -rf conftest.dir
7747191cded7Smrg  if test -s conftest.tar; then
7748191cded7Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
7749191cded7Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7750191cded7Smrg  fi
7751191cded7Smrgdone
7752191cded7Smrgrm -rf conftest.dir
7753191cded7Smrg
7754191cded7SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7755191cded7SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
7756191cded7SmrgAC_SUBST([am__tar])
7757191cded7SmrgAC_SUBST([am__untar])
7758191cded7Smrg]) # _AM_PROG_TAR
7759191cded7Smrg
7760