aclocal.m4 revision 8697ee19
18697ee19Smrg# generated automatically by aclocal 1.10.1 -*- Autoconf -*-
2ab47cfaaSmrg
3ab47cfaaSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
48697ee19Smrg# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
5ab47cfaaSmrg# This file is free software; the Free Software Foundation
6ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
8ab47cfaaSmrg
9ab47cfaaSmrg# This program is distributed in the hope that it will be useful,
10ab47cfaaSmrg# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11ab47cfaaSmrg# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12ab47cfaaSmrg# PARTICULAR PURPOSE.
13ab47cfaaSmrg
148697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION],
158697ee19Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
168697ee19Smrgm4_if(AC_AUTOCONF_VERSION, [2.61],,
178697ee19Smrg[m4_warning([this file was generated for autoconf 2.61.
188697ee19SmrgYou have another version of autoconf.  It may work, but is not guaranteed to.
198697ee19SmrgIf you have problems, you may need to regenerate the build system entirely.
208697ee19SmrgTo do so, use the procedure documented by the package, typically `autoreconf'.])])
218697ee19Smrg
22ab47cfaaSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
23ab47cfaaSmrg
248697ee19Smrg# serial 51 AC_PROG_LIBTOOL
25ab47cfaaSmrg
26ab47cfaaSmrg
27ab47cfaaSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
28ab47cfaaSmrg# -----------------------------------------------------------
29ab47cfaaSmrg# If this macro is not defined by Autoconf, define it here.
30ab47cfaaSmrgm4_ifdef([AC_PROVIDE_IFELSE],
31ab47cfaaSmrg         [],
32ab47cfaaSmrg         [m4_define([AC_PROVIDE_IFELSE],
33ab47cfaaSmrg	         [m4_ifdef([AC_PROVIDE_$1],
34ab47cfaaSmrg		           [$2], [$3])])])
35ab47cfaaSmrg
36ab47cfaaSmrg
37ab47cfaaSmrg# AC_PROG_LIBTOOL
38ab47cfaaSmrg# ---------------
39ab47cfaaSmrgAC_DEFUN([AC_PROG_LIBTOOL],
40ab47cfaaSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41ab47cfaaSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42ab47cfaaSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43ab47cfaaSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
44ab47cfaaSmrg    [AC_LIBTOOL_CXX],
45ab47cfaaSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
46ab47cfaaSmrg  ])])
47ab47cfaaSmrgdnl And a similar setup for Fortran 77 support
48ab47cfaaSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
49ab47cfaaSmrg    [AC_LIBTOOL_F77],
50ab47cfaaSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
51ab47cfaaSmrg])])
52ab47cfaaSmrg
53ab47cfaaSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
54ab47cfaaSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
55ab47cfaaSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
56ab47cfaaSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
57ab47cfaaSmrg    [AC_LIBTOOL_GCJ],
58ab47cfaaSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
59ab47cfaaSmrg      [AC_LIBTOOL_GCJ],
60ab47cfaaSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
61ab47cfaaSmrg	[AC_LIBTOOL_GCJ],
62ab47cfaaSmrg      [ifdef([AC_PROG_GCJ],
63ab47cfaaSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
64ab47cfaaSmrg       ifdef([A][M_PROG_GCJ],
65ab47cfaaSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
66ab47cfaaSmrg       ifdef([LT_AC_PROG_GCJ],
67ab47cfaaSmrg	     [define([LT_AC_PROG_GCJ],
68ab47cfaaSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
69ab47cfaaSmrg])])# AC_PROG_LIBTOOL
70ab47cfaaSmrg
71ab47cfaaSmrg
72ab47cfaaSmrg# _AC_PROG_LIBTOOL
73ab47cfaaSmrg# ----------------
74ab47cfaaSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
75ab47cfaaSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
76ab47cfaaSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
77ab47cfaaSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
78ab47cfaaSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
79ab47cfaaSmrg
80ab47cfaaSmrg# This can be used to rebuild libtool when needed
81ab47cfaaSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
82ab47cfaaSmrg
83ab47cfaaSmrg# Always use our own libtool.
84ab47cfaaSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
85ab47cfaaSmrgAC_SUBST(LIBTOOL)dnl
86ab47cfaaSmrg
87ab47cfaaSmrg# Prevent multiple expansion
88ab47cfaaSmrgdefine([AC_PROG_LIBTOOL], [])
89ab47cfaaSmrg])# _AC_PROG_LIBTOOL
90ab47cfaaSmrg
91ab47cfaaSmrg
92ab47cfaaSmrg# AC_LIBTOOL_SETUP
93ab47cfaaSmrg# ----------------
94ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
95ab47cfaaSmrg[AC_PREREQ(2.50)dnl
96ab47cfaaSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
97ab47cfaaSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
98ab47cfaaSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
99ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
100ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
101ab47cfaaSmrgAC_REQUIRE([AC_PROG_CC])dnl
102ab47cfaaSmrgAC_REQUIRE([AC_PROG_LD])dnl
103ab47cfaaSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
104ab47cfaaSmrgAC_REQUIRE([AC_PROG_NM])dnl
105ab47cfaaSmrg
106ab47cfaaSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
107ab47cfaaSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
108ab47cfaaSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
109ab47cfaaSmrgAC_REQUIRE([AC_OBJEXT])dnl
110ab47cfaaSmrgAC_REQUIRE([AC_EXEEXT])dnl
111ab47cfaaSmrgdnl
112ab47cfaaSmrg
113ab47cfaaSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
114ab47cfaaSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
115ab47cfaaSmrgAC_LIBTOOL_OBJDIR
116ab47cfaaSmrg
117ab47cfaaSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
118ab47cfaaSmrg_LT_AC_PROG_ECHO_BACKSLASH
119ab47cfaaSmrg
120ab47cfaaSmrgcase $host_os in
121ab47cfaaSmrgaix3*)
122ab47cfaaSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
123ab47cfaaSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
124ab47cfaaSmrg  # vanish in a puff of smoke.
125ab47cfaaSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
126ab47cfaaSmrg    COLLECT_NAMES=
127ab47cfaaSmrg    export COLLECT_NAMES
128ab47cfaaSmrg  fi
129ab47cfaaSmrg  ;;
130ab47cfaaSmrgesac
131ab47cfaaSmrg
132ab47cfaaSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
133ab47cfaaSmrg# metacharacters that are still active within double-quoted strings.
134ab47cfaaSmrgXsed='sed -e 1s/^X//'
135ab47cfaaSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
136ab47cfaaSmrg
137ab47cfaaSmrg# Same as above, but do not quote variable references.
138ab47cfaaSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
139ab47cfaaSmrg
140ab47cfaaSmrg# Sed substitution to delay expansion of an escaped shell variable in a
141ab47cfaaSmrg# double_quote_subst'ed string.
142ab47cfaaSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
143ab47cfaaSmrg
144ab47cfaaSmrg# Sed substitution to avoid accidental globbing in evaled expressions
145ab47cfaaSmrgno_glob_subst='s/\*/\\\*/g'
146ab47cfaaSmrg
147ab47cfaaSmrg# Constants:
148ab47cfaaSmrgrm="rm -f"
149ab47cfaaSmrg
150ab47cfaaSmrg# Global variables:
151ab47cfaaSmrgdefault_ofile=libtool
152ab47cfaaSmrgcan_build_shared=yes
153ab47cfaaSmrg
154ab47cfaaSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
155ab47cfaaSmrg# which needs '.lib').
156ab47cfaaSmrglibext=a
157ab47cfaaSmrgltmain="$ac_aux_dir/ltmain.sh"
158ab47cfaaSmrgofile="$default_ofile"
159ab47cfaaSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
160ab47cfaaSmrg
161ab47cfaaSmrgAC_CHECK_TOOL(AR, ar, false)
162ab47cfaaSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
163ab47cfaaSmrgAC_CHECK_TOOL(STRIP, strip, :)
164ab47cfaaSmrg
165ab47cfaaSmrgold_CC="$CC"
166ab47cfaaSmrgold_CFLAGS="$CFLAGS"
167ab47cfaaSmrg
168ab47cfaaSmrg# Set sane defaults for various variables
169ab47cfaaSmrgtest -z "$AR" && AR=ar
170ab47cfaaSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
171ab47cfaaSmrgtest -z "$AS" && AS=as
172ab47cfaaSmrgtest -z "$CC" && CC=cc
173ab47cfaaSmrgtest -z "$LTCC" && LTCC=$CC
174ab47cfaaSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
175ab47cfaaSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
176ab47cfaaSmrgtest -z "$LD" && LD=ld
177ab47cfaaSmrgtest -z "$LN_S" && LN_S="ln -s"
178ab47cfaaSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
179ab47cfaaSmrgtest -z "$NM" && NM=nm
180ab47cfaaSmrgtest -z "$SED" && SED=sed
181ab47cfaaSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
182ab47cfaaSmrgtest -z "$RANLIB" && RANLIB=:
183ab47cfaaSmrgtest -z "$STRIP" && STRIP=:
184ab47cfaaSmrgtest -z "$ac_objext" && ac_objext=o
185ab47cfaaSmrg
186ab47cfaaSmrg# Determine commands to create old-style static archives.
1878697ee19Smrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
188ab47cfaaSmrgold_postinstall_cmds='chmod 644 $oldlib'
189ab47cfaaSmrgold_postuninstall_cmds=
190ab47cfaaSmrg
191ab47cfaaSmrgif test -n "$RANLIB"; then
192ab47cfaaSmrg  case $host_os in
193ab47cfaaSmrg  openbsd*)
194ab47cfaaSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
195ab47cfaaSmrg    ;;
196ab47cfaaSmrg  *)
197ab47cfaaSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
198ab47cfaaSmrg    ;;
199ab47cfaaSmrg  esac
200ab47cfaaSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
201ab47cfaaSmrgfi
202ab47cfaaSmrg
203ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
204ab47cfaaSmrg
205ab47cfaaSmrg# Only perform the check for file, if the check method requires it
206ab47cfaaSmrgcase $deplibs_check_method in
207ab47cfaaSmrgfile_magic*)
208ab47cfaaSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
209ab47cfaaSmrg    AC_PATH_MAGIC
210ab47cfaaSmrg  fi
211ab47cfaaSmrg  ;;
212ab47cfaaSmrgesac
213ab47cfaaSmrg
214ab47cfaaSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
215ab47cfaaSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
216ab47cfaaSmrgenable_win32_dll=yes, enable_win32_dll=no)
217ab47cfaaSmrg
218ab47cfaaSmrgAC_ARG_ENABLE([libtool-lock],
219ab47cfaaSmrg    [AC_HELP_STRING([--disable-libtool-lock],
220ab47cfaaSmrg	[avoid locking (might break parallel builds)])])
221ab47cfaaSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
222ab47cfaaSmrg
223ab47cfaaSmrgAC_ARG_WITH([pic],
224ab47cfaaSmrg    [AC_HELP_STRING([--with-pic],
225ab47cfaaSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
226ab47cfaaSmrg    [pic_mode="$withval"],
227ab47cfaaSmrg    [pic_mode=default])
228ab47cfaaSmrgtest -z "$pic_mode" && pic_mode=default
229ab47cfaaSmrg
230ab47cfaaSmrg# Use C for the default configuration in the libtool script
231ab47cfaaSmrgtagname=
232ab47cfaaSmrgAC_LIBTOOL_LANG_C_CONFIG
233ab47cfaaSmrg_LT_AC_TAGCONFIG
234ab47cfaaSmrg])# AC_LIBTOOL_SETUP
235ab47cfaaSmrg
236ab47cfaaSmrg
237ab47cfaaSmrg# _LT_AC_SYS_COMPILER
238ab47cfaaSmrg# -------------------
239ab47cfaaSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
240ab47cfaaSmrg[AC_REQUIRE([AC_PROG_CC])dnl
241ab47cfaaSmrg
242ab47cfaaSmrg# If no C compiler was specified, use CC.
243ab47cfaaSmrgLTCC=${LTCC-"$CC"}
244ab47cfaaSmrg
245ab47cfaaSmrg# If no C compiler flags were specified, use CFLAGS.
246ab47cfaaSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
247ab47cfaaSmrg
248ab47cfaaSmrg# Allow CC to be a program name with arguments.
249ab47cfaaSmrgcompiler=$CC
250ab47cfaaSmrg])# _LT_AC_SYS_COMPILER
251ab47cfaaSmrg
252ab47cfaaSmrg
253ab47cfaaSmrg# _LT_CC_BASENAME(CC)
254ab47cfaaSmrg# -------------------
255ab47cfaaSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
256ab47cfaaSmrgAC_DEFUN([_LT_CC_BASENAME],
257ab47cfaaSmrg[for cc_temp in $1""; do
258ab47cfaaSmrg  case $cc_temp in
259ab47cfaaSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
260ab47cfaaSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
261ab47cfaaSmrg    \-*) ;;
262ab47cfaaSmrg    *) break;;
263ab47cfaaSmrg  esac
264ab47cfaaSmrgdone
265ab47cfaaSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
266ab47cfaaSmrg])
267ab47cfaaSmrg
268ab47cfaaSmrg
269ab47cfaaSmrg# _LT_COMPILER_BOILERPLATE
270ab47cfaaSmrg# ------------------------
271ab47cfaaSmrg# Check for compiler boilerplate output or warnings with
272ab47cfaaSmrg# the simple compiler test code.
273ab47cfaaSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
2748697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2758697ee19Smrgac_outfile=conftest.$ac_objext
2768697ee19Smrgecho "$lt_simple_compile_test_code" >conftest.$ac_ext
277ab47cfaaSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
278ab47cfaaSmrg_lt_compiler_boilerplate=`cat conftest.err`
279ab47cfaaSmrg$rm conftest*
280ab47cfaaSmrg])# _LT_COMPILER_BOILERPLATE
281ab47cfaaSmrg
282ab47cfaaSmrg
283ab47cfaaSmrg# _LT_LINKER_BOILERPLATE
284ab47cfaaSmrg# ----------------------
285ab47cfaaSmrg# Check for linker boilerplate output or warnings with
286ab47cfaaSmrg# the simple link test code.
287ab47cfaaSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
2888697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
2898697ee19Smrgac_outfile=conftest.$ac_objext
2908697ee19Smrgecho "$lt_simple_link_test_code" >conftest.$ac_ext
291ab47cfaaSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
292ab47cfaaSmrg_lt_linker_boilerplate=`cat conftest.err`
293ab47cfaaSmrg$rm conftest*
294ab47cfaaSmrg])# _LT_LINKER_BOILERPLATE
295ab47cfaaSmrg
296ab47cfaaSmrg
297ab47cfaaSmrg# _LT_AC_SYS_LIBPATH_AIX
298ab47cfaaSmrg# ----------------------
299ab47cfaaSmrg# Links a minimal program and checks the executable
300ab47cfaaSmrg# for the system default hardcoded library path. In most cases,
301ab47cfaaSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
302ab47cfaaSmrg# the location of the communication and MPI libs are included too.
303ab47cfaaSmrg# If we don't find anything, use the default library path according
304ab47cfaaSmrg# to the aix ld manual.
305ab47cfaaSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
3068697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
3078697ee19SmrgAC_LINK_IFELSE(AC_LANG_PROGRAM,[
3088697ee19Smrglt_aix_libpath_sed='
3098697ee19Smrg    /Import File Strings/,/^$/ {
3108697ee19Smrg	/^0/ {
3118697ee19Smrg	    s/^0  *\(.*\)$/\1/
3128697ee19Smrg	    p
3138697ee19Smrg	}
3148697ee19Smrg    }'
3158697ee19Smrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
316ab47cfaaSmrg# Check for a 64-bit object if we didn't find anything.
3178697ee19Smrgif test -z "$aix_libpath"; then
3188697ee19Smrg  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
3198697ee19Smrgfi],[])
320ab47cfaaSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
321ab47cfaaSmrg])# _LT_AC_SYS_LIBPATH_AIX
322ab47cfaaSmrg
323ab47cfaaSmrg
324ab47cfaaSmrg# _LT_AC_SHELL_INIT(ARG)
325ab47cfaaSmrg# ----------------------
326ab47cfaaSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
327ab47cfaaSmrg[ifdef([AC_DIVERSION_NOTICE],
328ab47cfaaSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
329ab47cfaaSmrg	 [AC_DIVERT_PUSH(NOTICE)])
330ab47cfaaSmrg$1
331ab47cfaaSmrgAC_DIVERT_POP
332ab47cfaaSmrg])# _LT_AC_SHELL_INIT
333ab47cfaaSmrg
334ab47cfaaSmrg
335ab47cfaaSmrg# _LT_AC_PROG_ECHO_BACKSLASH
336ab47cfaaSmrg# --------------------------
337ab47cfaaSmrg# Add some code to the start of the generated configure script which
338ab47cfaaSmrg# will find an echo command which doesn't interpret backslashes.
339ab47cfaaSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
340ab47cfaaSmrg[_LT_AC_SHELL_INIT([
341ab47cfaaSmrg# Check that we are running under the correct shell.
342ab47cfaaSmrgSHELL=${CONFIG_SHELL-/bin/sh}
343ab47cfaaSmrg
344ab47cfaaSmrgcase X$ECHO in
345ab47cfaaSmrgX*--fallback-echo)
346ab47cfaaSmrg  # Remove one level of quotation (which was required for Make).
347ab47cfaaSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
348ab47cfaaSmrg  ;;
349ab47cfaaSmrgesac
350ab47cfaaSmrg
351ab47cfaaSmrgecho=${ECHO-echo}
352ab47cfaaSmrgif test "X[$]1" = X--no-reexec; then
353ab47cfaaSmrg  # Discard the --no-reexec flag, and continue.
354ab47cfaaSmrg  shift
355ab47cfaaSmrgelif test "X[$]1" = X--fallback-echo; then
356ab47cfaaSmrg  # Avoid inline document here, it may be left over
357ab47cfaaSmrg  :
358ab47cfaaSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
359ab47cfaaSmrg  # Yippee, $echo works!
360ab47cfaaSmrg  :
361ab47cfaaSmrgelse
362ab47cfaaSmrg  # Restart under the correct shell.
363ab47cfaaSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
364ab47cfaaSmrgfi
365ab47cfaaSmrg
366ab47cfaaSmrgif test "X[$]1" = X--fallback-echo; then
367ab47cfaaSmrg  # used as fallback echo
368ab47cfaaSmrg  shift
369ab47cfaaSmrg  cat <<EOF
370ab47cfaaSmrg[$]*
371ab47cfaaSmrgEOF
372ab47cfaaSmrg  exit 0
373ab47cfaaSmrgfi
374ab47cfaaSmrg
375ab47cfaaSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
376ab47cfaaSmrg# if CDPATH is set.
377ab47cfaaSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
378ab47cfaaSmrg
379ab47cfaaSmrgif test -z "$ECHO"; then
380ab47cfaaSmrgif test "X${echo_test_string+set}" != Xset; then
381ab47cfaaSmrg# find a string as large as possible, as long as the shell can cope with it
382ab47cfaaSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
383ab47cfaaSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
384ab47cfaaSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
385ab47cfaaSmrg       echo_test_string=`eval $cmd` &&
386ab47cfaaSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
387ab47cfaaSmrg    then
388ab47cfaaSmrg      break
389ab47cfaaSmrg    fi
390ab47cfaaSmrg  done
391ab47cfaaSmrgfi
392ab47cfaaSmrg
393ab47cfaaSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
394ab47cfaaSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
395ab47cfaaSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
396ab47cfaaSmrg  :
397ab47cfaaSmrgelse
398ab47cfaaSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
399ab47cfaaSmrg  # backslashes.  This makes it impossible to quote backslashes using
400ab47cfaaSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
401ab47cfaaSmrg  #
402ab47cfaaSmrg  # So, first we look for a working echo in the user's PATH.
403ab47cfaaSmrg
404ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
405ab47cfaaSmrg  for dir in $PATH /usr/ucb; do
406ab47cfaaSmrg    IFS="$lt_save_ifs"
407ab47cfaaSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
408ab47cfaaSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
409ab47cfaaSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
410ab47cfaaSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
411ab47cfaaSmrg      echo="$dir/echo"
412ab47cfaaSmrg      break
413ab47cfaaSmrg    fi
414ab47cfaaSmrg  done
415ab47cfaaSmrg  IFS="$lt_save_ifs"
416ab47cfaaSmrg
417ab47cfaaSmrg  if test "X$echo" = Xecho; then
418ab47cfaaSmrg    # We didn't find a better echo, so look for alternatives.
419ab47cfaaSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
420ab47cfaaSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
421ab47cfaaSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
422ab47cfaaSmrg      # This shell has a builtin print -r that does the trick.
423ab47cfaaSmrg      echo='print -r'
424ab47cfaaSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
425ab47cfaaSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
426ab47cfaaSmrg      # If we have ksh, try running configure again with it.
427ab47cfaaSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
428ab47cfaaSmrg      export ORIGINAL_CONFIG_SHELL
429ab47cfaaSmrg      CONFIG_SHELL=/bin/ksh
430ab47cfaaSmrg      export CONFIG_SHELL
431ab47cfaaSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
432ab47cfaaSmrg    else
433ab47cfaaSmrg      # Try using printf.
434ab47cfaaSmrg      echo='printf %s\n'
435ab47cfaaSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
436ab47cfaaSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
437ab47cfaaSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
438ab47cfaaSmrg	# Cool, printf works
439ab47cfaaSmrg	:
440ab47cfaaSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
441ab47cfaaSmrg	   test "X$echo_testing_string" = 'X\t' &&
442ab47cfaaSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
443ab47cfaaSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
444ab47cfaaSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
445ab47cfaaSmrg	export CONFIG_SHELL
446ab47cfaaSmrg	SHELL="$CONFIG_SHELL"
447ab47cfaaSmrg	export SHELL
448ab47cfaaSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
449ab47cfaaSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
450ab47cfaaSmrg	   test "X$echo_testing_string" = 'X\t' &&
451ab47cfaaSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
452ab47cfaaSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
453ab47cfaaSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
454ab47cfaaSmrg      else
455ab47cfaaSmrg	# maybe with a smaller string...
456ab47cfaaSmrg	prev=:
457ab47cfaaSmrg
458ab47cfaaSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
459ab47cfaaSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
460ab47cfaaSmrg	  then
461ab47cfaaSmrg	    break
462ab47cfaaSmrg	  fi
463ab47cfaaSmrg	  prev="$cmd"
464ab47cfaaSmrg	done
465ab47cfaaSmrg
466ab47cfaaSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
467ab47cfaaSmrg	  echo_test_string=`eval $prev`
468ab47cfaaSmrg	  export echo_test_string
469ab47cfaaSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
470ab47cfaaSmrg	else
471ab47cfaaSmrg	  # Oops.  We lost completely, so just stick with echo.
472ab47cfaaSmrg	  echo=echo
473ab47cfaaSmrg	fi
474ab47cfaaSmrg      fi
475ab47cfaaSmrg    fi
476ab47cfaaSmrg  fi
477ab47cfaaSmrgfi
478ab47cfaaSmrgfi
479ab47cfaaSmrg
480ab47cfaaSmrg# Copy echo and quote the copy suitably for passing to libtool from
481ab47cfaaSmrg# the Makefile, instead of quoting the original, which is used later.
482ab47cfaaSmrgECHO=$echo
483ab47cfaaSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
484ab47cfaaSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
485ab47cfaaSmrgfi
486ab47cfaaSmrg
487ab47cfaaSmrgAC_SUBST(ECHO)
488ab47cfaaSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
489ab47cfaaSmrg
490ab47cfaaSmrg
491ab47cfaaSmrg# _LT_AC_LOCK
492ab47cfaaSmrg# -----------
493ab47cfaaSmrgAC_DEFUN([_LT_AC_LOCK],
494ab47cfaaSmrg[AC_ARG_ENABLE([libtool-lock],
495ab47cfaaSmrg    [AC_HELP_STRING([--disable-libtool-lock],
496ab47cfaaSmrg	[avoid locking (might break parallel builds)])])
497ab47cfaaSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
498ab47cfaaSmrg
499ab47cfaaSmrg# Some flags need to be propagated to the compiler or linker for good
500ab47cfaaSmrg# libtool support.
501ab47cfaaSmrgcase $host in
502ab47cfaaSmrgia64-*-hpux*)
503ab47cfaaSmrg  # Find out which ABI we are using.
504ab47cfaaSmrg  echo 'int i;' > conftest.$ac_ext
505ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
506ab47cfaaSmrg    case `/usr/bin/file conftest.$ac_objext` in
507ab47cfaaSmrg    *ELF-32*)
508ab47cfaaSmrg      HPUX_IA64_MODE="32"
509ab47cfaaSmrg      ;;
510ab47cfaaSmrg    *ELF-64*)
511ab47cfaaSmrg      HPUX_IA64_MODE="64"
512ab47cfaaSmrg      ;;
513ab47cfaaSmrg    esac
514ab47cfaaSmrg  fi
515ab47cfaaSmrg  rm -rf conftest*
516ab47cfaaSmrg  ;;
517ab47cfaaSmrg*-*-irix6*)
518ab47cfaaSmrg  # Find out which ABI we are using.
519ab47cfaaSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
520ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
521ab47cfaaSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
522ab47cfaaSmrg    case `/usr/bin/file conftest.$ac_objext` in
523ab47cfaaSmrg    *32-bit*)
524ab47cfaaSmrg      LD="${LD-ld} -melf32bsmip"
525ab47cfaaSmrg      ;;
526ab47cfaaSmrg    *N32*)
527ab47cfaaSmrg      LD="${LD-ld} -melf32bmipn32"
528ab47cfaaSmrg      ;;
529ab47cfaaSmrg    *64-bit*)
530ab47cfaaSmrg      LD="${LD-ld} -melf64bmip"
531ab47cfaaSmrg      ;;
532ab47cfaaSmrg    esac
533ab47cfaaSmrg   else
534ab47cfaaSmrg    case `/usr/bin/file conftest.$ac_objext` in
535ab47cfaaSmrg    *32-bit*)
536ab47cfaaSmrg      LD="${LD-ld} -32"
537ab47cfaaSmrg      ;;
538ab47cfaaSmrg    *N32*)
539ab47cfaaSmrg      LD="${LD-ld} -n32"
540ab47cfaaSmrg      ;;
541ab47cfaaSmrg    *64-bit*)
542ab47cfaaSmrg      LD="${LD-ld} -64"
543ab47cfaaSmrg      ;;
544ab47cfaaSmrg    esac
545ab47cfaaSmrg   fi
546ab47cfaaSmrg  fi
547ab47cfaaSmrg  rm -rf conftest*
548ab47cfaaSmrg  ;;
549ab47cfaaSmrg
5508697ee19Smrgx86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
5518697ee19Smrgs390*-*linux*|sparc*-*linux*)
552ab47cfaaSmrg  # Find out which ABI we are using.
553ab47cfaaSmrg  echo 'int i;' > conftest.$ac_ext
554ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
555ab47cfaaSmrg    case `/usr/bin/file conftest.o` in
556ab47cfaaSmrg    *32-bit*)
557ab47cfaaSmrg      case $host in
5588697ee19Smrg        x86_64-*kfreebsd*-gnu)
5598697ee19Smrg          LD="${LD-ld} -m elf_i386_fbsd"
5608697ee19Smrg          ;;
561ab47cfaaSmrg        x86_64-*linux*)
562ab47cfaaSmrg          LD="${LD-ld} -m elf_i386"
563ab47cfaaSmrg          ;;
564ab47cfaaSmrg        ppc64-*linux*|powerpc64-*linux*)
565ab47cfaaSmrg          LD="${LD-ld} -m elf32ppclinux"
566ab47cfaaSmrg          ;;
567ab47cfaaSmrg        s390x-*linux*)
568ab47cfaaSmrg          LD="${LD-ld} -m elf_s390"
569ab47cfaaSmrg          ;;
570ab47cfaaSmrg        sparc64-*linux*)
571ab47cfaaSmrg          LD="${LD-ld} -m elf32_sparc"
572ab47cfaaSmrg          ;;
573ab47cfaaSmrg      esac
574ab47cfaaSmrg      ;;
575ab47cfaaSmrg    *64-bit*)
5768697ee19Smrg      libsuff=64
577ab47cfaaSmrg      case $host in
5788697ee19Smrg        x86_64-*kfreebsd*-gnu)
5798697ee19Smrg          LD="${LD-ld} -m elf_x86_64_fbsd"
5808697ee19Smrg          ;;
581ab47cfaaSmrg        x86_64-*linux*)
582ab47cfaaSmrg          LD="${LD-ld} -m elf_x86_64"
583ab47cfaaSmrg          ;;
584ab47cfaaSmrg        ppc*-*linux*|powerpc*-*linux*)
585ab47cfaaSmrg          LD="${LD-ld} -m elf64ppc"
586ab47cfaaSmrg          ;;
587ab47cfaaSmrg        s390*-*linux*)
588ab47cfaaSmrg          LD="${LD-ld} -m elf64_s390"
589ab47cfaaSmrg          ;;
590ab47cfaaSmrg        sparc*-*linux*)
591ab47cfaaSmrg          LD="${LD-ld} -m elf64_sparc"
592ab47cfaaSmrg          ;;
593ab47cfaaSmrg      esac
594ab47cfaaSmrg      ;;
595ab47cfaaSmrg    esac
596ab47cfaaSmrg  fi
597ab47cfaaSmrg  rm -rf conftest*
598ab47cfaaSmrg  ;;
599ab47cfaaSmrg
600ab47cfaaSmrg*-*-sco3.2v5*)
601ab47cfaaSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
602ab47cfaaSmrg  SAVE_CFLAGS="$CFLAGS"
603ab47cfaaSmrg  CFLAGS="$CFLAGS -belf"
604ab47cfaaSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
605ab47cfaaSmrg    [AC_LANG_PUSH(C)
606ab47cfaaSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
607ab47cfaaSmrg     AC_LANG_POP])
608ab47cfaaSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
609ab47cfaaSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
610ab47cfaaSmrg    CFLAGS="$SAVE_CFLAGS"
611ab47cfaaSmrg  fi
612ab47cfaaSmrg  ;;
613ab47cfaaSmrgsparc*-*solaris*)
614ab47cfaaSmrg  # Find out which ABI we are using.
615ab47cfaaSmrg  echo 'int i;' > conftest.$ac_ext
616ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
617ab47cfaaSmrg    case `/usr/bin/file conftest.o` in
618ab47cfaaSmrg    *64-bit*)
619ab47cfaaSmrg      case $lt_cv_prog_gnu_ld in
620ab47cfaaSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
621ab47cfaaSmrg      *)    LD="${LD-ld} -64" ;;
622ab47cfaaSmrg      esac
623ab47cfaaSmrg      ;;
624ab47cfaaSmrg    esac
625ab47cfaaSmrg  fi
626ab47cfaaSmrg  rm -rf conftest*
627ab47cfaaSmrg  ;;
628ab47cfaaSmrg
629ab47cfaaSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
630ab47cfaaSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
631ab47cfaaSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
632ab47cfaaSmrg  AC_CHECK_TOOL(AS, as, false)
633ab47cfaaSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
634ab47cfaaSmrg  ;;
635ab47cfaaSmrg  ])
636ab47cfaaSmrgesac
637ab47cfaaSmrg
638ab47cfaaSmrgneed_locks="$enable_libtool_lock"
639ab47cfaaSmrg
640ab47cfaaSmrg])# _LT_AC_LOCK
641ab47cfaaSmrg
642ab47cfaaSmrg
643ab47cfaaSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
644ab47cfaaSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
645ab47cfaaSmrg# ----------------------------------------------------------------
646ab47cfaaSmrg# Check whether the given compiler option works
647ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
648ab47cfaaSmrg[AC_REQUIRE([LT_AC_PROG_SED])
649ab47cfaaSmrgAC_CACHE_CHECK([$1], [$2],
650ab47cfaaSmrg  [$2=no
651ab47cfaaSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
6528697ee19Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
653ab47cfaaSmrg   lt_compiler_flag="$3"
654ab47cfaaSmrg   # Insert the option either (1) after the last *FLAGS variable, or
655ab47cfaaSmrg   # (2) before a word containing "conftest.", or (3) at the end.
656ab47cfaaSmrg   # Note that $ac_compile itself does not contain backslashes and begins
657ab47cfaaSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
658ab47cfaaSmrg   # The option is referenced via a variable to avoid confusing sed.
659ab47cfaaSmrg   lt_compile=`echo "$ac_compile" | $SED \
660ab47cfaaSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
661ab47cfaaSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
662ab47cfaaSmrg   -e 's:$: $lt_compiler_flag:'`
663ab47cfaaSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
664ab47cfaaSmrg   (eval "$lt_compile" 2>conftest.err)
665ab47cfaaSmrg   ac_status=$?
666ab47cfaaSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
667ab47cfaaSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
668ab47cfaaSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
669ab47cfaaSmrg     # The compiler can only warn and ignore the option if not recognized
670ab47cfaaSmrg     # So say no if there are warnings other than the usual output.
671ab47cfaaSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
672ab47cfaaSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
673ab47cfaaSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
674ab47cfaaSmrg       $2=yes
675ab47cfaaSmrg     fi
676ab47cfaaSmrg   fi
677ab47cfaaSmrg   $rm conftest*
678ab47cfaaSmrg])
679ab47cfaaSmrg
680ab47cfaaSmrgif test x"[$]$2" = xyes; then
681ab47cfaaSmrg    ifelse([$5], , :, [$5])
682ab47cfaaSmrgelse
683ab47cfaaSmrg    ifelse([$6], , :, [$6])
684ab47cfaaSmrgfi
685ab47cfaaSmrg])# AC_LIBTOOL_COMPILER_OPTION
686ab47cfaaSmrg
687ab47cfaaSmrg
688ab47cfaaSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
689ab47cfaaSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
690ab47cfaaSmrg# ------------------------------------------------------------
691ab47cfaaSmrg# Check whether the given compiler option works
692ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
6938697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
6948697ee19SmrgAC_CACHE_CHECK([$1], [$2],
695ab47cfaaSmrg  [$2=no
696ab47cfaaSmrg   save_LDFLAGS="$LDFLAGS"
697ab47cfaaSmrg   LDFLAGS="$LDFLAGS $3"
6988697ee19Smrg   echo "$lt_simple_link_test_code" > conftest.$ac_ext
699ab47cfaaSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
700ab47cfaaSmrg     # The linker can only warn and ignore the option if not recognized
701ab47cfaaSmrg     # So say no if there are warnings
702ab47cfaaSmrg     if test -s conftest.err; then
703ab47cfaaSmrg       # Append any errors to the config.log.
704ab47cfaaSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
705ab47cfaaSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
706ab47cfaaSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
707ab47cfaaSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
708ab47cfaaSmrg         $2=yes
709ab47cfaaSmrg       fi
710ab47cfaaSmrg     else
711ab47cfaaSmrg       $2=yes
712ab47cfaaSmrg     fi
713ab47cfaaSmrg   fi
714ab47cfaaSmrg   $rm conftest*
715ab47cfaaSmrg   LDFLAGS="$save_LDFLAGS"
716ab47cfaaSmrg])
717ab47cfaaSmrg
718ab47cfaaSmrgif test x"[$]$2" = xyes; then
719ab47cfaaSmrg    ifelse([$4], , :, [$4])
720ab47cfaaSmrgelse
721ab47cfaaSmrg    ifelse([$5], , :, [$5])
722ab47cfaaSmrgfi
723ab47cfaaSmrg])# AC_LIBTOOL_LINKER_OPTION
724ab47cfaaSmrg
725ab47cfaaSmrg
726ab47cfaaSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
727ab47cfaaSmrg# --------------------------
728ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
729ab47cfaaSmrg[# find the maximum length of command line arguments
730ab47cfaaSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
731ab47cfaaSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
732ab47cfaaSmrg  i=0
733ab47cfaaSmrg  teststring="ABCD"
734ab47cfaaSmrg
735ab47cfaaSmrg  case $build_os in
736ab47cfaaSmrg  msdosdjgpp*)
737ab47cfaaSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
738ab47cfaaSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
739ab47cfaaSmrg    # during glob expansion).  Even if it were fixed, the result of this
740ab47cfaaSmrg    # check would be larger than it should be.
741ab47cfaaSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
742ab47cfaaSmrg    ;;
743ab47cfaaSmrg
744ab47cfaaSmrg  gnu*)
745ab47cfaaSmrg    # Under GNU Hurd, this test is not required because there is
746ab47cfaaSmrg    # no limit to the length of command line arguments.
747ab47cfaaSmrg    # Libtool will interpret -1 as no limit whatsoever
748ab47cfaaSmrg    lt_cv_sys_max_cmd_len=-1;
749ab47cfaaSmrg    ;;
750ab47cfaaSmrg
751ab47cfaaSmrg  cygwin* | mingw*)
752ab47cfaaSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
753ab47cfaaSmrg    # about 5 minutes as the teststring grows exponentially.
754ab47cfaaSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
755ab47cfaaSmrg    # you end up with a "frozen" computer, even though with patience
756ab47cfaaSmrg    # the test eventually succeeds (with a max line length of 256k).
757ab47cfaaSmrg    # Instead, let's just punt: use the minimum linelength reported by
758ab47cfaaSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
759ab47cfaaSmrg    lt_cv_sys_max_cmd_len=8192;
760ab47cfaaSmrg    ;;
761ab47cfaaSmrg
762ab47cfaaSmrg  amigaos*)
763ab47cfaaSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
764ab47cfaaSmrg    # So we just punt and use a minimum line length of 8192.
765ab47cfaaSmrg    lt_cv_sys_max_cmd_len=8192;
766ab47cfaaSmrg    ;;
767ab47cfaaSmrg
768ab47cfaaSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
769ab47cfaaSmrg    # This has been around since 386BSD, at least.  Likely further.
770ab47cfaaSmrg    if test -x /sbin/sysctl; then
771ab47cfaaSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
772ab47cfaaSmrg    elif test -x /usr/sbin/sysctl; then
773ab47cfaaSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
774ab47cfaaSmrg    else
775ab47cfaaSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
776ab47cfaaSmrg    fi
777ab47cfaaSmrg    # And add a safety zone
778ab47cfaaSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
779ab47cfaaSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
780ab47cfaaSmrg    ;;
781ab47cfaaSmrg
782ab47cfaaSmrg  interix*)
783ab47cfaaSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
784ab47cfaaSmrg    lt_cv_sys_max_cmd_len=196608
785ab47cfaaSmrg    ;;
786ab47cfaaSmrg
787ab47cfaaSmrg  osf*)
788ab47cfaaSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
789ab47cfaaSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
790ab47cfaaSmrg    # nice to cause kernel panics so lets avoid the loop below.
791ab47cfaaSmrg    # First set a reasonable default.
792ab47cfaaSmrg    lt_cv_sys_max_cmd_len=16384
793ab47cfaaSmrg    #
794ab47cfaaSmrg    if test -x /sbin/sysconfig; then
795ab47cfaaSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
796ab47cfaaSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
797ab47cfaaSmrg      esac
798ab47cfaaSmrg    fi
799ab47cfaaSmrg    ;;
800ab47cfaaSmrg  sco3.2v5*)
801ab47cfaaSmrg    lt_cv_sys_max_cmd_len=102400
802ab47cfaaSmrg    ;;
803ab47cfaaSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
804ab47cfaaSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
805ab47cfaaSmrg    if test -n "$kargmax"; then
806ab47cfaaSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
807ab47cfaaSmrg    else
808ab47cfaaSmrg      lt_cv_sys_max_cmd_len=32768
809ab47cfaaSmrg    fi
810ab47cfaaSmrg    ;;
811ab47cfaaSmrg  *)
8128697ee19Smrg    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
8138697ee19Smrg    if test -n "$lt_cv_sys_max_cmd_len"; then
8148697ee19Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
8158697ee19Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
8168697ee19Smrg    else
8178697ee19Smrg      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
8188697ee19Smrg      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
819ab47cfaaSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
8208697ee19Smrg	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
8218697ee19Smrg	      lt_cv_sys_max_cmd_len=$new_result &&
8228697ee19Smrg	      test $i != 17 # 1/2 MB should be enough
8238697ee19Smrg      do
8248697ee19Smrg        i=`expr $i + 1`
8258697ee19Smrg        teststring=$teststring$teststring
8268697ee19Smrg      done
8278697ee19Smrg      teststring=
8288697ee19Smrg      # Add a significant safety factor because C++ compilers can tack on massive
8298697ee19Smrg      # amounts of additional arguments before passing them to the linker.
8308697ee19Smrg      # It appears as though 1/2 is a usable value.
8318697ee19Smrg      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
8328697ee19Smrg    fi
833ab47cfaaSmrg    ;;
834ab47cfaaSmrg  esac
835ab47cfaaSmrg])
836ab47cfaaSmrgif test -n $lt_cv_sys_max_cmd_len ; then
837ab47cfaaSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
838ab47cfaaSmrgelse
839ab47cfaaSmrg  AC_MSG_RESULT(none)
840ab47cfaaSmrgfi
841ab47cfaaSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
842ab47cfaaSmrg
843ab47cfaaSmrg
844ab47cfaaSmrg# _LT_AC_CHECK_DLFCN
845ab47cfaaSmrg# ------------------
846ab47cfaaSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
847ab47cfaaSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
848ab47cfaaSmrg])# _LT_AC_CHECK_DLFCN
849ab47cfaaSmrg
850ab47cfaaSmrg
851ab47cfaaSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
852ab47cfaaSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
853ab47cfaaSmrg# ---------------------------------------------------------------------
854ab47cfaaSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
855ab47cfaaSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
856ab47cfaaSmrgif test "$cross_compiling" = yes; then :
857ab47cfaaSmrg  [$4]
858ab47cfaaSmrgelse
859ab47cfaaSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
860ab47cfaaSmrg  lt_status=$lt_dlunknown
861ab47cfaaSmrg  cat > conftest.$ac_ext <<EOF
862ab47cfaaSmrg[#line __oline__ "configure"
863ab47cfaaSmrg#include "confdefs.h"
864ab47cfaaSmrg
865ab47cfaaSmrg#if HAVE_DLFCN_H
866ab47cfaaSmrg#include <dlfcn.h>
867ab47cfaaSmrg#endif
868ab47cfaaSmrg
869ab47cfaaSmrg#include <stdio.h>
870ab47cfaaSmrg
871ab47cfaaSmrg#ifdef RTLD_GLOBAL
872ab47cfaaSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
873ab47cfaaSmrg#else
874ab47cfaaSmrg#  ifdef DL_GLOBAL
875ab47cfaaSmrg#    define LT_DLGLOBAL		DL_GLOBAL
876ab47cfaaSmrg#  else
877ab47cfaaSmrg#    define LT_DLGLOBAL		0
878ab47cfaaSmrg#  endif
879ab47cfaaSmrg#endif
880ab47cfaaSmrg
881ab47cfaaSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
882ab47cfaaSmrg   find out it does not work in some platform. */
883ab47cfaaSmrg#ifndef LT_DLLAZY_OR_NOW
884ab47cfaaSmrg#  ifdef RTLD_LAZY
885ab47cfaaSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
886ab47cfaaSmrg#  else
887ab47cfaaSmrg#    ifdef DL_LAZY
888ab47cfaaSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
889ab47cfaaSmrg#    else
890ab47cfaaSmrg#      ifdef RTLD_NOW
891ab47cfaaSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
892ab47cfaaSmrg#      else
893ab47cfaaSmrg#        ifdef DL_NOW
894ab47cfaaSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
895ab47cfaaSmrg#        else
896ab47cfaaSmrg#          define LT_DLLAZY_OR_NOW	0
897ab47cfaaSmrg#        endif
898ab47cfaaSmrg#      endif
899ab47cfaaSmrg#    endif
900ab47cfaaSmrg#  endif
901ab47cfaaSmrg#endif
902ab47cfaaSmrg
903ab47cfaaSmrg#ifdef __cplusplus
904ab47cfaaSmrgextern "C" void exit (int);
905ab47cfaaSmrg#endif
906ab47cfaaSmrg
907ab47cfaaSmrgvoid fnord() { int i=42;}
908ab47cfaaSmrgint main ()
909ab47cfaaSmrg{
910ab47cfaaSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
911ab47cfaaSmrg  int status = $lt_dlunknown;
912ab47cfaaSmrg
913ab47cfaaSmrg  if (self)
914ab47cfaaSmrg    {
915ab47cfaaSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
916ab47cfaaSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
917ab47cfaaSmrg      /* dlclose (self); */
918ab47cfaaSmrg    }
919ab47cfaaSmrg  else
920ab47cfaaSmrg    puts (dlerror ());
921ab47cfaaSmrg
922ab47cfaaSmrg    exit (status);
923ab47cfaaSmrg}]
924ab47cfaaSmrgEOF
925ab47cfaaSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
926ab47cfaaSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
927ab47cfaaSmrg    lt_status=$?
928ab47cfaaSmrg    case x$lt_status in
929ab47cfaaSmrg      x$lt_dlno_uscore) $1 ;;
930ab47cfaaSmrg      x$lt_dlneed_uscore) $2 ;;
931ab47cfaaSmrg      x$lt_dlunknown|x*) $3 ;;
932ab47cfaaSmrg    esac
933ab47cfaaSmrg  else :
934ab47cfaaSmrg    # compilation failed
935ab47cfaaSmrg    $3
936ab47cfaaSmrg  fi
937ab47cfaaSmrgfi
938ab47cfaaSmrgrm -fr conftest*
939ab47cfaaSmrg])# _LT_AC_TRY_DLOPEN_SELF
940ab47cfaaSmrg
941ab47cfaaSmrg
942ab47cfaaSmrg# AC_LIBTOOL_DLOPEN_SELF
943ab47cfaaSmrg# ----------------------
944ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
945ab47cfaaSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
946ab47cfaaSmrgif test "x$enable_dlopen" != xyes; then
947ab47cfaaSmrg  enable_dlopen=unknown
948ab47cfaaSmrg  enable_dlopen_self=unknown
949ab47cfaaSmrg  enable_dlopen_self_static=unknown
950ab47cfaaSmrgelse
951ab47cfaaSmrg  lt_cv_dlopen=no
952ab47cfaaSmrg  lt_cv_dlopen_libs=
953ab47cfaaSmrg
954ab47cfaaSmrg  case $host_os in
955ab47cfaaSmrg  beos*)
956ab47cfaaSmrg    lt_cv_dlopen="load_add_on"
957ab47cfaaSmrg    lt_cv_dlopen_libs=
958ab47cfaaSmrg    lt_cv_dlopen_self=yes
959ab47cfaaSmrg    ;;
960ab47cfaaSmrg
961ab47cfaaSmrg  mingw* | pw32*)
962ab47cfaaSmrg    lt_cv_dlopen="LoadLibrary"
963ab47cfaaSmrg    lt_cv_dlopen_libs=
964ab47cfaaSmrg   ;;
965ab47cfaaSmrg
966ab47cfaaSmrg  cygwin*)
967ab47cfaaSmrg    lt_cv_dlopen="dlopen"
968ab47cfaaSmrg    lt_cv_dlopen_libs=
969ab47cfaaSmrg   ;;
970ab47cfaaSmrg
971ab47cfaaSmrg  darwin*)
972ab47cfaaSmrg  # if libdl is installed we need to link against it
973ab47cfaaSmrg    AC_CHECK_LIB([dl], [dlopen],
974ab47cfaaSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
975ab47cfaaSmrg    lt_cv_dlopen="dyld"
976ab47cfaaSmrg    lt_cv_dlopen_libs=
977ab47cfaaSmrg    lt_cv_dlopen_self=yes
978ab47cfaaSmrg    ])
979ab47cfaaSmrg   ;;
980ab47cfaaSmrg
981ab47cfaaSmrg  *)
982ab47cfaaSmrg    AC_CHECK_FUNC([shl_load],
983ab47cfaaSmrg	  [lt_cv_dlopen="shl_load"],
984ab47cfaaSmrg      [AC_CHECK_LIB([dld], [shl_load],
985ab47cfaaSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
986ab47cfaaSmrg	[AC_CHECK_FUNC([dlopen],
987ab47cfaaSmrg	      [lt_cv_dlopen="dlopen"],
988ab47cfaaSmrg	  [AC_CHECK_LIB([dl], [dlopen],
989ab47cfaaSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
990ab47cfaaSmrg	    [AC_CHECK_LIB([svld], [dlopen],
991ab47cfaaSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
992ab47cfaaSmrg	      [AC_CHECK_LIB([dld], [dld_link],
993ab47cfaaSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
994ab47cfaaSmrg	      ])
995ab47cfaaSmrg	    ])
996ab47cfaaSmrg	  ])
997ab47cfaaSmrg	])
998ab47cfaaSmrg      ])
999ab47cfaaSmrg    ;;
1000ab47cfaaSmrg  esac
1001ab47cfaaSmrg
1002ab47cfaaSmrg  if test "x$lt_cv_dlopen" != xno; then
1003ab47cfaaSmrg    enable_dlopen=yes
1004ab47cfaaSmrg  else
1005ab47cfaaSmrg    enable_dlopen=no
1006ab47cfaaSmrg  fi
1007ab47cfaaSmrg
1008ab47cfaaSmrg  case $lt_cv_dlopen in
1009ab47cfaaSmrg  dlopen)
1010ab47cfaaSmrg    save_CPPFLAGS="$CPPFLAGS"
1011ab47cfaaSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1012ab47cfaaSmrg
1013ab47cfaaSmrg    save_LDFLAGS="$LDFLAGS"
1014ab47cfaaSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1015ab47cfaaSmrg
1016ab47cfaaSmrg    save_LIBS="$LIBS"
1017ab47cfaaSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
1018ab47cfaaSmrg
1019ab47cfaaSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
1020ab47cfaaSmrg	  lt_cv_dlopen_self, [dnl
1021ab47cfaaSmrg	  _LT_AC_TRY_DLOPEN_SELF(
1022ab47cfaaSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1023ab47cfaaSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1024ab47cfaaSmrg    ])
1025ab47cfaaSmrg
1026ab47cfaaSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
1027ab47cfaaSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1028ab47cfaaSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1029ab47cfaaSmrg    	  lt_cv_dlopen_self_static, [dnl
1030ab47cfaaSmrg	  _LT_AC_TRY_DLOPEN_SELF(
1031ab47cfaaSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1032ab47cfaaSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1033ab47cfaaSmrg      ])
1034ab47cfaaSmrg    fi
1035ab47cfaaSmrg
1036ab47cfaaSmrg    CPPFLAGS="$save_CPPFLAGS"
1037ab47cfaaSmrg    LDFLAGS="$save_LDFLAGS"
1038ab47cfaaSmrg    LIBS="$save_LIBS"
1039ab47cfaaSmrg    ;;
1040ab47cfaaSmrg  esac
1041ab47cfaaSmrg
1042ab47cfaaSmrg  case $lt_cv_dlopen_self in
1043ab47cfaaSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1044ab47cfaaSmrg  *) enable_dlopen_self=unknown ;;
1045ab47cfaaSmrg  esac
1046ab47cfaaSmrg
1047ab47cfaaSmrg  case $lt_cv_dlopen_self_static in
1048ab47cfaaSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1049ab47cfaaSmrg  *) enable_dlopen_self_static=unknown ;;
1050ab47cfaaSmrg  esac
1051ab47cfaaSmrgfi
1052ab47cfaaSmrg])# AC_LIBTOOL_DLOPEN_SELF
1053ab47cfaaSmrg
1054ab47cfaaSmrg
1055ab47cfaaSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1056ab47cfaaSmrg# ---------------------------------
1057ab47cfaaSmrg# Check to see if options -c and -o are simultaneously supported by compiler
1058ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
10598697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
10608697ee19SmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1061ab47cfaaSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1062ab47cfaaSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1063ab47cfaaSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1064ab47cfaaSmrg   $rm -r conftest 2>/dev/null
1065ab47cfaaSmrg   mkdir conftest
1066ab47cfaaSmrg   cd conftest
1067ab47cfaaSmrg   mkdir out
10688697ee19Smrg   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1069ab47cfaaSmrg
1070ab47cfaaSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1071ab47cfaaSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1072ab47cfaaSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1073ab47cfaaSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1074ab47cfaaSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1075ab47cfaaSmrg   lt_compile=`echo "$ac_compile" | $SED \
1076ab47cfaaSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1077ab47cfaaSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1078ab47cfaaSmrg   -e 's:$: $lt_compiler_flag:'`
1079ab47cfaaSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1080ab47cfaaSmrg   (eval "$lt_compile" 2>out/conftest.err)
1081ab47cfaaSmrg   ac_status=$?
1082ab47cfaaSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1083ab47cfaaSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1084ab47cfaaSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1085ab47cfaaSmrg   then
1086ab47cfaaSmrg     # The compiler can only warn and ignore the option if not recognized
1087ab47cfaaSmrg     # So say no if there are warnings
1088ab47cfaaSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1089ab47cfaaSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1090ab47cfaaSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1091ab47cfaaSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1092ab47cfaaSmrg     fi
1093ab47cfaaSmrg   fi
1094ab47cfaaSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1095ab47cfaaSmrg   $rm conftest*
1096ab47cfaaSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1097ab47cfaaSmrg   # template instantiation
1098ab47cfaaSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1099ab47cfaaSmrg   $rm out/* && rmdir out
1100ab47cfaaSmrg   cd ..
1101ab47cfaaSmrg   rmdir conftest
1102ab47cfaaSmrg   $rm conftest*
1103ab47cfaaSmrg])
1104ab47cfaaSmrg])# AC_LIBTOOL_PROG_CC_C_O
1105ab47cfaaSmrg
1106ab47cfaaSmrg
1107ab47cfaaSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1108ab47cfaaSmrg# -----------------------------------------
1109ab47cfaaSmrg# Check to see if we can do hard links to lock some files if needed
1110ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1111ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
1112ab47cfaaSmrg
1113ab47cfaaSmrghard_links="nottested"
1114ab47cfaaSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1115ab47cfaaSmrg  # do not overwrite the value of need_locks provided by the user
1116ab47cfaaSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1117ab47cfaaSmrg  hard_links=yes
1118ab47cfaaSmrg  $rm conftest*
1119ab47cfaaSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1120ab47cfaaSmrg  touch conftest.a
1121ab47cfaaSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1122ab47cfaaSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1123ab47cfaaSmrg  AC_MSG_RESULT([$hard_links])
1124ab47cfaaSmrg  if test "$hard_links" = no; then
1125ab47cfaaSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1126ab47cfaaSmrg    need_locks=warn
1127ab47cfaaSmrg  fi
1128ab47cfaaSmrgelse
1129ab47cfaaSmrg  need_locks=no
1130ab47cfaaSmrgfi
1131ab47cfaaSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1132ab47cfaaSmrg
1133ab47cfaaSmrg
1134ab47cfaaSmrg# AC_LIBTOOL_OBJDIR
1135ab47cfaaSmrg# -----------------
1136ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
1137ab47cfaaSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1138ab47cfaaSmrg[rm -f .libs 2>/dev/null
1139ab47cfaaSmrgmkdir .libs 2>/dev/null
1140ab47cfaaSmrgif test -d .libs; then
1141ab47cfaaSmrg  lt_cv_objdir=.libs
1142ab47cfaaSmrgelse
1143ab47cfaaSmrg  # MS-DOS does not allow filenames that begin with a dot.
1144ab47cfaaSmrg  lt_cv_objdir=_libs
1145ab47cfaaSmrgfi
1146ab47cfaaSmrgrmdir .libs 2>/dev/null])
1147ab47cfaaSmrgobjdir=$lt_cv_objdir
1148ab47cfaaSmrg])# AC_LIBTOOL_OBJDIR
1149ab47cfaaSmrg
1150ab47cfaaSmrg
1151ab47cfaaSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1152ab47cfaaSmrg# ----------------------------------------------
1153ab47cfaaSmrg# Check hardcoding attributes.
1154ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1155ab47cfaaSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1156ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
1157ab47cfaaSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1158ab47cfaaSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1159ab47cfaaSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1160ab47cfaaSmrg
1161ab47cfaaSmrg  # We can hardcode non-existant directories.
1162ab47cfaaSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1163ab47cfaaSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1164ab47cfaaSmrg     # have to relink, otherwise we might link with an installed library
1165ab47cfaaSmrg     # when we should be linking with a yet-to-be-installed one
1166ab47cfaaSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1167ab47cfaaSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1168ab47cfaaSmrg    # Linking always hardcodes the temporary library directory.
1169ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1170ab47cfaaSmrg  else
1171ab47cfaaSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1172ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1173ab47cfaaSmrg  fi
1174ab47cfaaSmrgelse
1175ab47cfaaSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1176ab47cfaaSmrg  # directories.
1177ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1178ab47cfaaSmrgfi
1179ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1180ab47cfaaSmrg
1181ab47cfaaSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1182ab47cfaaSmrg  # Fast installation is not supported
1183ab47cfaaSmrg  enable_fast_install=no
1184ab47cfaaSmrgelif test "$shlibpath_overrides_runpath" = yes ||
1185ab47cfaaSmrg     test "$enable_shared" = no; then
1186ab47cfaaSmrg  # Fast installation is not necessary
1187ab47cfaaSmrg  enable_fast_install=needless
1188ab47cfaaSmrgfi
1189ab47cfaaSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1190ab47cfaaSmrg
1191ab47cfaaSmrg
1192ab47cfaaSmrg# AC_LIBTOOL_SYS_LIB_STRIP
1193ab47cfaaSmrg# ------------------------
1194ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1195ab47cfaaSmrg[striplib=
1196ab47cfaaSmrgold_striplib=
1197ab47cfaaSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
1198ab47cfaaSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1199ab47cfaaSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1200ab47cfaaSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1201ab47cfaaSmrg  AC_MSG_RESULT([yes])
1202ab47cfaaSmrgelse
1203ab47cfaaSmrg# FIXME - insert some real tests, host_os isn't really good enough
1204ab47cfaaSmrg  case $host_os in
1205ab47cfaaSmrg   darwin*)
1206ab47cfaaSmrg       if test -n "$STRIP" ; then
1207ab47cfaaSmrg         striplib="$STRIP -x"
12088697ee19Smrg         old_striplib="$STRIP -S"
1209ab47cfaaSmrg         AC_MSG_RESULT([yes])
1210ab47cfaaSmrg       else
1211ab47cfaaSmrg  AC_MSG_RESULT([no])
1212ab47cfaaSmrgfi
1213ab47cfaaSmrg       ;;
1214ab47cfaaSmrg   *)
1215ab47cfaaSmrg  AC_MSG_RESULT([no])
1216ab47cfaaSmrg    ;;
1217ab47cfaaSmrg  esac
1218ab47cfaaSmrgfi
1219ab47cfaaSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
1220ab47cfaaSmrg
1221ab47cfaaSmrg
1222ab47cfaaSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1223ab47cfaaSmrg# -----------------------------
1224ab47cfaaSmrg# PORTME Fill in your ld.so characteristics
1225ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
12268697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
12278697ee19SmrgAC_MSG_CHECKING([dynamic linker characteristics])
1228ab47cfaaSmrglibrary_names_spec=
1229ab47cfaaSmrglibname_spec='lib$name'
1230ab47cfaaSmrgsoname_spec=
1231ab47cfaaSmrgshrext_cmds=".so"
1232ab47cfaaSmrgpostinstall_cmds=
1233ab47cfaaSmrgpostuninstall_cmds=
1234ab47cfaaSmrgfinish_cmds=
1235ab47cfaaSmrgfinish_eval=
1236ab47cfaaSmrgshlibpath_var=
1237ab47cfaaSmrgshlibpath_overrides_runpath=unknown
1238ab47cfaaSmrgversion_type=none
1239ab47cfaaSmrgdynamic_linker="$host_os ld.so"
1240ab47cfaaSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
12418697ee19Smrgm4_if($1,[],[
1242ab47cfaaSmrgif test "$GCC" = yes; then
12438697ee19Smrg  case $host_os in
12448697ee19Smrg    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
12458697ee19Smrg    *) lt_awk_arg="/^libraries:/" ;;
12468697ee19Smrg  esac
12478697ee19Smrg  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
12488697ee19Smrg  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1249ab47cfaaSmrg    # if the path contains ";" then we assume it to be the separator
1250ab47cfaaSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
1251ab47cfaaSmrg    # assumed that no part of a normal pathname contains ";" but that should
1252ab47cfaaSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
12538697ee19Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1254ab47cfaaSmrg  else
12558697ee19Smrg    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1256ab47cfaaSmrg  fi
12578697ee19Smrg  # Ok, now we have the path, separated by spaces, we can step through it
12588697ee19Smrg  # and add multilib dir if necessary.
12598697ee19Smrg  lt_tmp_lt_search_path_spec=
12608697ee19Smrg  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
12618697ee19Smrg  for lt_sys_path in $lt_search_path_spec; do
12628697ee19Smrg    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
12638697ee19Smrg      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
12648697ee19Smrg    else
12658697ee19Smrg      test -d "$lt_sys_path" && \
12668697ee19Smrg	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
12678697ee19Smrg    fi
12688697ee19Smrg  done
12698697ee19Smrg  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
12708697ee19SmrgBEGIN {RS=" "; FS="/|\n";} {
12718697ee19Smrg  lt_foo="";
12728697ee19Smrg  lt_count=0;
12738697ee19Smrg  for (lt_i = NF; lt_i > 0; lt_i--) {
12748697ee19Smrg    if ($lt_i != "" && $lt_i != ".") {
12758697ee19Smrg      if ($lt_i == "..") {
12768697ee19Smrg        lt_count++;
12778697ee19Smrg      } else {
12788697ee19Smrg        if (lt_count == 0) {
12798697ee19Smrg          lt_foo="/" $lt_i lt_foo;
12808697ee19Smrg        } else {
12818697ee19Smrg          lt_count--;
12828697ee19Smrg        }
12838697ee19Smrg      }
12848697ee19Smrg    }
12858697ee19Smrg  }
12868697ee19Smrg  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
12878697ee19Smrg  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
12888697ee19Smrg}'`
12898697ee19Smrg  sys_lib_search_path_spec=`echo $lt_search_path_spec`
1290ab47cfaaSmrgelse
1291ab47cfaaSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
12928697ee19Smrgfi])
1293ab47cfaaSmrgneed_lib_prefix=unknown
1294ab47cfaaSmrghardcode_into_libs=no
1295ab47cfaaSmrg
1296ab47cfaaSmrg# when you set need_version to no, make sure it does not cause -set_version
1297ab47cfaaSmrg# flags to be left without arguments
1298ab47cfaaSmrgneed_version=unknown
1299ab47cfaaSmrg
1300ab47cfaaSmrgcase $host_os in
1301ab47cfaaSmrgaix3*)
1302ab47cfaaSmrg  version_type=linux
1303ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1304ab47cfaaSmrg  shlibpath_var=LIBPATH
1305ab47cfaaSmrg
1306ab47cfaaSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
1307ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1308ab47cfaaSmrg  ;;
1309ab47cfaaSmrg
1310ab47cfaaSmrgaix4* | aix5*)
1311ab47cfaaSmrg  version_type=linux
1312ab47cfaaSmrg  need_lib_prefix=no
1313ab47cfaaSmrg  need_version=no
1314ab47cfaaSmrg  hardcode_into_libs=yes
1315ab47cfaaSmrg  if test "$host_cpu" = ia64; then
1316ab47cfaaSmrg    # AIX 5 supports IA64
1317ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1318ab47cfaaSmrg    shlibpath_var=LD_LIBRARY_PATH
1319ab47cfaaSmrg  else
1320ab47cfaaSmrg    # With GCC up to 2.95.x, collect2 would create an import file
1321ab47cfaaSmrg    # for dependence libraries.  The import file would start with
1322ab47cfaaSmrg    # the line `#! .'.  This would cause the generated library to
1323ab47cfaaSmrg    # depend on `.', always an invalid library.  This was fixed in
1324ab47cfaaSmrg    # development snapshots of GCC prior to 3.0.
1325ab47cfaaSmrg    case $host_os in
1326ab47cfaaSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
1327ab47cfaaSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1328ab47cfaaSmrg	   echo ' yes '
1329ab47cfaaSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1330ab47cfaaSmrg	:
1331ab47cfaaSmrg      else
1332ab47cfaaSmrg	can_build_shared=no
1333ab47cfaaSmrg      fi
1334ab47cfaaSmrg      ;;
1335ab47cfaaSmrg    esac
1336ab47cfaaSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1337ab47cfaaSmrg    # soname into executable. Probably we can add versioning support to
1338ab47cfaaSmrg    # collect2, so additional links can be useful in future.
1339ab47cfaaSmrg    if test "$aix_use_runtimelinking" = yes; then
1340ab47cfaaSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1341ab47cfaaSmrg      # instead of lib<name>.a to let people know that these are not
1342ab47cfaaSmrg      # typical AIX shared libraries.
1343ab47cfaaSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1344ab47cfaaSmrg    else
1345ab47cfaaSmrg      # We preserve .a as extension for shared libraries through AIX4.2
1346ab47cfaaSmrg      # and later when we are not doing run time linking.
1347ab47cfaaSmrg      library_names_spec='${libname}${release}.a $libname.a'
1348ab47cfaaSmrg      soname_spec='${libname}${release}${shared_ext}$major'
1349ab47cfaaSmrg    fi
1350ab47cfaaSmrg    shlibpath_var=LIBPATH
1351ab47cfaaSmrg  fi
1352ab47cfaaSmrg  ;;
1353ab47cfaaSmrg
1354ab47cfaaSmrgamigaos*)
1355ab47cfaaSmrg  library_names_spec='$libname.ixlibrary $libname.a'
1356ab47cfaaSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1357ab47cfaaSmrg  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'
1358ab47cfaaSmrg  ;;
1359ab47cfaaSmrg
1360ab47cfaaSmrgbeos*)
1361ab47cfaaSmrg  library_names_spec='${libname}${shared_ext}'
1362ab47cfaaSmrg  dynamic_linker="$host_os ld.so"
1363ab47cfaaSmrg  shlibpath_var=LIBRARY_PATH
1364ab47cfaaSmrg  ;;
1365ab47cfaaSmrg
1366ab47cfaaSmrgbsdi[[45]]*)
1367ab47cfaaSmrg  version_type=linux
1368ab47cfaaSmrg  need_version=no
1369ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1370ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1371ab47cfaaSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1372ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1373ab47cfaaSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1374ab47cfaaSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1375ab47cfaaSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
1376ab47cfaaSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1377ab47cfaaSmrg  # libtool to hard-code these into programs
1378ab47cfaaSmrg  ;;
1379ab47cfaaSmrg
1380ab47cfaaSmrgcygwin* | mingw* | pw32*)
1381ab47cfaaSmrg  version_type=windows
1382ab47cfaaSmrg  shrext_cmds=".dll"
1383ab47cfaaSmrg  need_version=no
1384ab47cfaaSmrg  need_lib_prefix=no
1385ab47cfaaSmrg
1386ab47cfaaSmrg  case $GCC,$host_os in
1387ab47cfaaSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
1388ab47cfaaSmrg    library_names_spec='$libname.dll.a'
1389ab47cfaaSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1390ab47cfaaSmrg    postinstall_cmds='base_file=`basename \${file}`~
1391ab47cfaaSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1392ab47cfaaSmrg      dldir=$destdir/`dirname \$dlpath`~
1393ab47cfaaSmrg      test -d \$dldir || mkdir -p \$dldir~
1394ab47cfaaSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
1395ab47cfaaSmrg      chmod a+x \$dldir/$dlname'
1396ab47cfaaSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1397ab47cfaaSmrg      dlpath=$dir/\$dldll~
1398ab47cfaaSmrg       $rm \$dlpath'
1399ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1400ab47cfaaSmrg
1401ab47cfaaSmrg    case $host_os in
1402ab47cfaaSmrg    cygwin*)
1403ab47cfaaSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1404ab47cfaaSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1405ab47cfaaSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1406ab47cfaaSmrg      ;;
1407ab47cfaaSmrg    mingw*)
1408ab47cfaaSmrg      # MinGW DLLs use traditional 'lib' prefix
1409ab47cfaaSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1410ab47cfaaSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1411ab47cfaaSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1412ab47cfaaSmrg        # It is most probably a Windows format PATH printed by
1413ab47cfaaSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1414ab47cfaaSmrg        # path with ; separators, and with drive letters. We can handle the
1415ab47cfaaSmrg        # drive letters (cygwin fileutils understands them), so leave them,
1416ab47cfaaSmrg        # especially as we might pass files found there to a mingw objdump,
1417ab47cfaaSmrg        # which wouldn't understand a cygwinified path. Ahh.
1418ab47cfaaSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1419ab47cfaaSmrg      else
1420ab47cfaaSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1421ab47cfaaSmrg      fi
1422ab47cfaaSmrg      ;;
1423ab47cfaaSmrg    pw32*)
1424ab47cfaaSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
1425ab47cfaaSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1426ab47cfaaSmrg      ;;
1427ab47cfaaSmrg    esac
1428ab47cfaaSmrg    ;;
1429ab47cfaaSmrg
1430ab47cfaaSmrg  *)
1431ab47cfaaSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1432ab47cfaaSmrg    ;;
1433ab47cfaaSmrg  esac
1434ab47cfaaSmrg  dynamic_linker='Win32 ld.exe'
1435ab47cfaaSmrg  # FIXME: first we should search . and the directory the executable is in
1436ab47cfaaSmrg  shlibpath_var=PATH
1437ab47cfaaSmrg  ;;
1438ab47cfaaSmrg
1439ab47cfaaSmrgdarwin* | rhapsody*)
1440ab47cfaaSmrg  dynamic_linker="$host_os dyld"
1441ab47cfaaSmrg  version_type=darwin
1442ab47cfaaSmrg  need_lib_prefix=no
1443ab47cfaaSmrg  need_version=no
1444ab47cfaaSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1445ab47cfaaSmrg  soname_spec='${libname}${release}${major}$shared_ext'
1446ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1447ab47cfaaSmrg  shlibpath_var=DYLD_LIBRARY_PATH
1448ab47cfaaSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
14498697ee19Smrg  m4_if([$1], [],[
14508697ee19Smrg  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) 
1451ab47cfaaSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1452ab47cfaaSmrg  ;;
1453ab47cfaaSmrg
1454ab47cfaaSmrgdgux*)
1455ab47cfaaSmrg  version_type=linux
1456ab47cfaaSmrg  need_lib_prefix=no
1457ab47cfaaSmrg  need_version=no
1458ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1459ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1460ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1461ab47cfaaSmrg  ;;
1462ab47cfaaSmrg
1463ab47cfaaSmrgfreebsd1*)
1464ab47cfaaSmrg  dynamic_linker=no
1465ab47cfaaSmrg  ;;
1466ab47cfaaSmrg
1467ab47cfaaSmrgfreebsd* | dragonfly*)
1468ab47cfaaSmrg  # DragonFly does not have aout.  When/if they implement a new
1469ab47cfaaSmrg  # versioning mechanism, adjust this.
1470ab47cfaaSmrg  if test -x /usr/bin/objformat; then
1471ab47cfaaSmrg    objformat=`/usr/bin/objformat`
1472ab47cfaaSmrg  else
1473ab47cfaaSmrg    case $host_os in
1474ab47cfaaSmrg    freebsd[[123]]*) objformat=aout ;;
1475ab47cfaaSmrg    *) objformat=elf ;;
1476ab47cfaaSmrg    esac
1477ab47cfaaSmrg  fi
1478ab47cfaaSmrg  version_type=freebsd-$objformat
1479ab47cfaaSmrg  case $version_type in
1480ab47cfaaSmrg    freebsd-elf*)
1481ab47cfaaSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1482ab47cfaaSmrg      need_version=no
1483ab47cfaaSmrg      need_lib_prefix=no
1484ab47cfaaSmrg      ;;
1485ab47cfaaSmrg    freebsd-*)
1486ab47cfaaSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1487ab47cfaaSmrg      need_version=yes
1488ab47cfaaSmrg      ;;
1489ab47cfaaSmrg  esac
1490ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1491ab47cfaaSmrg  case $host_os in
1492ab47cfaaSmrg  freebsd2*)
1493ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1494ab47cfaaSmrg    ;;
1495ab47cfaaSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1496ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1497ab47cfaaSmrg    hardcode_into_libs=yes
1498ab47cfaaSmrg    ;;
1499ab47cfaaSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1500ab47cfaaSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1501ab47cfaaSmrg    shlibpath_overrides_runpath=no
1502ab47cfaaSmrg    hardcode_into_libs=yes
1503ab47cfaaSmrg    ;;
15048697ee19Smrg  *) # from 4.6 on, and DragonFly
1505ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1506ab47cfaaSmrg    hardcode_into_libs=yes
1507ab47cfaaSmrg    ;;
1508ab47cfaaSmrg  esac
1509ab47cfaaSmrg  ;;
1510ab47cfaaSmrg
1511ab47cfaaSmrggnu*)
1512ab47cfaaSmrg  version_type=linux
1513ab47cfaaSmrg  need_lib_prefix=no
1514ab47cfaaSmrg  need_version=no
1515ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1516ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1517ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1518ab47cfaaSmrg  hardcode_into_libs=yes
1519ab47cfaaSmrg  ;;
1520ab47cfaaSmrg
1521ab47cfaaSmrghpux9* | hpux10* | hpux11*)
1522ab47cfaaSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
1523ab47cfaaSmrg  # link against other versions.
1524ab47cfaaSmrg  version_type=sunos
1525ab47cfaaSmrg  need_lib_prefix=no
1526ab47cfaaSmrg  need_version=no
1527ab47cfaaSmrg  case $host_cpu in
1528ab47cfaaSmrg  ia64*)
1529ab47cfaaSmrg    shrext_cmds='.so'
1530ab47cfaaSmrg    hardcode_into_libs=yes
1531ab47cfaaSmrg    dynamic_linker="$host_os dld.so"
1532ab47cfaaSmrg    shlibpath_var=LD_LIBRARY_PATH
1533ab47cfaaSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1534ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1535ab47cfaaSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1536ab47cfaaSmrg    if test "X$HPUX_IA64_MODE" = X32; then
1537ab47cfaaSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1538ab47cfaaSmrg    else
1539ab47cfaaSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1540ab47cfaaSmrg    fi
1541ab47cfaaSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1542ab47cfaaSmrg    ;;
1543ab47cfaaSmrg   hppa*64*)
1544ab47cfaaSmrg     shrext_cmds='.sl'
1545ab47cfaaSmrg     hardcode_into_libs=yes
1546ab47cfaaSmrg     dynamic_linker="$host_os dld.sl"
1547ab47cfaaSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1548ab47cfaaSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1549ab47cfaaSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1550ab47cfaaSmrg     soname_spec='${libname}${release}${shared_ext}$major'
1551ab47cfaaSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1552ab47cfaaSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1553ab47cfaaSmrg     ;;
1554ab47cfaaSmrg   *)
1555ab47cfaaSmrg    shrext_cmds='.sl'
1556ab47cfaaSmrg    dynamic_linker="$host_os dld.sl"
1557ab47cfaaSmrg    shlibpath_var=SHLIB_PATH
1558ab47cfaaSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1559ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1560ab47cfaaSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1561ab47cfaaSmrg    ;;
1562ab47cfaaSmrg  esac
1563ab47cfaaSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1564ab47cfaaSmrg  postinstall_cmds='chmod 555 $lib'
1565ab47cfaaSmrg  ;;
1566ab47cfaaSmrg
15678697ee19Smrginterix[[3-9]]*)
1568ab47cfaaSmrg  version_type=linux
1569ab47cfaaSmrg  need_lib_prefix=no
1570ab47cfaaSmrg  need_version=no
1571ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1572ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1573ab47cfaaSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1574ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1575ab47cfaaSmrg  shlibpath_overrides_runpath=no
1576ab47cfaaSmrg  hardcode_into_libs=yes
1577ab47cfaaSmrg  ;;
1578ab47cfaaSmrg
1579ab47cfaaSmrgirix5* | irix6* | nonstopux*)
1580ab47cfaaSmrg  case $host_os in
1581ab47cfaaSmrg    nonstopux*) version_type=nonstopux ;;
1582ab47cfaaSmrg    *)
1583ab47cfaaSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
1584ab47cfaaSmrg		version_type=linux
1585ab47cfaaSmrg	else
1586ab47cfaaSmrg		version_type=irix
1587ab47cfaaSmrg	fi ;;
1588ab47cfaaSmrg  esac
1589ab47cfaaSmrg  need_lib_prefix=no
1590ab47cfaaSmrg  need_version=no
1591ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1592ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1593ab47cfaaSmrg  case $host_os in
1594ab47cfaaSmrg  irix5* | nonstopux*)
1595ab47cfaaSmrg    libsuff= shlibsuff=
1596ab47cfaaSmrg    ;;
1597ab47cfaaSmrg  *)
1598ab47cfaaSmrg    case $LD in # libtool.m4 will add one of these switches to LD
1599ab47cfaaSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1600ab47cfaaSmrg      libsuff= shlibsuff= libmagic=32-bit;;
1601ab47cfaaSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1602ab47cfaaSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
1603ab47cfaaSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1604ab47cfaaSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1605ab47cfaaSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
1606ab47cfaaSmrg    esac
1607ab47cfaaSmrg    ;;
1608ab47cfaaSmrg  esac
1609ab47cfaaSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1610ab47cfaaSmrg  shlibpath_overrides_runpath=no
1611ab47cfaaSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1612ab47cfaaSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1613ab47cfaaSmrg  hardcode_into_libs=yes
1614ab47cfaaSmrg  ;;
1615ab47cfaaSmrg
1616ab47cfaaSmrg# No shared lib support for Linux oldld, aout, or coff.
1617ab47cfaaSmrglinux*oldld* | linux*aout* | linux*coff*)
1618ab47cfaaSmrg  dynamic_linker=no
1619ab47cfaaSmrg  ;;
1620ab47cfaaSmrg
1621ab47cfaaSmrg# This must be Linux ELF.
1622ab47cfaaSmrglinux* | k*bsd*-gnu)
1623ab47cfaaSmrg  version_type=linux
1624ab47cfaaSmrg  need_lib_prefix=no
1625ab47cfaaSmrg  need_version=no
1626ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1627ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1628ab47cfaaSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1629ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1630ab47cfaaSmrg  shlibpath_overrides_runpath=no
1631ab47cfaaSmrg  # This implies no fast_install, which is unacceptable.
1632ab47cfaaSmrg  # Some rework will be needed to allow for fast_install
1633ab47cfaaSmrg  # before this can be enabled.
1634ab47cfaaSmrg  hardcode_into_libs=yes
16358697ee19Smrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
16368697ee19Smrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1637ab47cfaaSmrg
1638ab47cfaaSmrg  # Append ld.so.conf contents to the search path
1639ab47cfaaSmrg  if test -f /etc/ld.so.conf; then
16408697ee19Smrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
16418697ee19Smrg    sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra"
1642ab47cfaaSmrg  fi
1643ab47cfaaSmrg
1644ab47cfaaSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
1645ab47cfaaSmrg  # powerpc, because MkLinux only supported shared libraries with the
1646ab47cfaaSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
1647ab47cfaaSmrg  # most powerpc-linux boxes support dynamic linking these days and
1648ab47cfaaSmrg  # people can always --disable-shared, the test was removed, and we
1649ab47cfaaSmrg  # assume the GNU/Linux dynamic linker is in use.
1650ab47cfaaSmrg  dynamic_linker='GNU/Linux ld.so'
1651ab47cfaaSmrg  ;;
1652ab47cfaaSmrg
1653ab47cfaaSmrgnetbsd*)
1654ab47cfaaSmrg  version_type=sunos
1655ab47cfaaSmrg  need_lib_prefix=no
1656ab47cfaaSmrg  need_version=no
1657ab47cfaaSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1658ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1659ab47cfaaSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1660ab47cfaaSmrg    dynamic_linker='NetBSD (a.out) ld.so'
1661ab47cfaaSmrg  else
1662ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1663ab47cfaaSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1664ab47cfaaSmrg    dynamic_linker='NetBSD ld.elf_so'
1665ab47cfaaSmrg  fi
1666ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1667ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1668ab47cfaaSmrg  hardcode_into_libs=yes
1669ab47cfaaSmrg  ;;
1670ab47cfaaSmrg
1671ab47cfaaSmrgnewsos6)
1672ab47cfaaSmrg  version_type=linux
1673ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1674ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1675ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1676ab47cfaaSmrg  ;;
1677ab47cfaaSmrg
1678ab47cfaaSmrgnto-qnx*)
1679ab47cfaaSmrg  version_type=linux
1680ab47cfaaSmrg  need_lib_prefix=no
1681ab47cfaaSmrg  need_version=no
1682ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1683ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1684ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1685ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1686ab47cfaaSmrg  ;;
1687ab47cfaaSmrg
1688ab47cfaaSmrgopenbsd*)
1689ab47cfaaSmrg  version_type=sunos
1690ab47cfaaSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
1691ab47cfaaSmrg  need_lib_prefix=no
1692ab47cfaaSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1693ab47cfaaSmrg  case $host_os in
1694ab47cfaaSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1695ab47cfaaSmrg    *)                         need_version=no  ;;
1696ab47cfaaSmrg  esac
1697ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1698ab47cfaaSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1699ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1700ab47cfaaSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1701ab47cfaaSmrg    case $host_os in
1702ab47cfaaSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
1703ab47cfaaSmrg	shlibpath_overrides_runpath=no
1704ab47cfaaSmrg	;;
1705ab47cfaaSmrg      *)
1706ab47cfaaSmrg	shlibpath_overrides_runpath=yes
1707ab47cfaaSmrg	;;
1708ab47cfaaSmrg      esac
1709ab47cfaaSmrg  else
1710ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1711ab47cfaaSmrg  fi
1712ab47cfaaSmrg  ;;
1713ab47cfaaSmrg
1714ab47cfaaSmrgos2*)
1715ab47cfaaSmrg  libname_spec='$name'
1716ab47cfaaSmrg  shrext_cmds=".dll"
1717ab47cfaaSmrg  need_lib_prefix=no
1718ab47cfaaSmrg  library_names_spec='$libname${shared_ext} $libname.a'
1719ab47cfaaSmrg  dynamic_linker='OS/2 ld.exe'
1720ab47cfaaSmrg  shlibpath_var=LIBPATH
1721ab47cfaaSmrg  ;;
1722ab47cfaaSmrg
1723ab47cfaaSmrgosf3* | osf4* | osf5*)
1724ab47cfaaSmrg  version_type=osf
1725ab47cfaaSmrg  need_lib_prefix=no
1726ab47cfaaSmrg  need_version=no
1727ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1728ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1729ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1730ab47cfaaSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1731ab47cfaaSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1732ab47cfaaSmrg  ;;
1733ab47cfaaSmrg
17348697ee19Smrgrdos*)
17358697ee19Smrg  dynamic_linker=no
17368697ee19Smrg  ;;
17378697ee19Smrg
1738ab47cfaaSmrgsolaris*)
1739ab47cfaaSmrg  version_type=linux
1740ab47cfaaSmrg  need_lib_prefix=no
1741ab47cfaaSmrg  need_version=no
1742ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1743ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1744ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1745ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1746ab47cfaaSmrg  hardcode_into_libs=yes
1747ab47cfaaSmrg  # ldd complains unless libraries are executable
1748ab47cfaaSmrg  postinstall_cmds='chmod +x $lib'
1749ab47cfaaSmrg  ;;
1750ab47cfaaSmrg
1751ab47cfaaSmrgsunos4*)
1752ab47cfaaSmrg  version_type=sunos
1753ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1754ab47cfaaSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1755ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1756ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1757ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
1758ab47cfaaSmrg    need_lib_prefix=no
1759ab47cfaaSmrg  fi
1760ab47cfaaSmrg  need_version=yes
1761ab47cfaaSmrg  ;;
1762ab47cfaaSmrg
1763ab47cfaaSmrgsysv4 | sysv4.3*)
1764ab47cfaaSmrg  version_type=linux
1765ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1766ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1767ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1768ab47cfaaSmrg  case $host_vendor in
1769ab47cfaaSmrg    sni)
1770ab47cfaaSmrg      shlibpath_overrides_runpath=no
1771ab47cfaaSmrg      need_lib_prefix=no
1772ab47cfaaSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
1773ab47cfaaSmrg      runpath_var=LD_RUN_PATH
1774ab47cfaaSmrg      ;;
1775ab47cfaaSmrg    siemens)
1776ab47cfaaSmrg      need_lib_prefix=no
1777ab47cfaaSmrg      ;;
1778ab47cfaaSmrg    motorola)
1779ab47cfaaSmrg      need_lib_prefix=no
1780ab47cfaaSmrg      need_version=no
1781ab47cfaaSmrg      shlibpath_overrides_runpath=no
1782ab47cfaaSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1783ab47cfaaSmrg      ;;
1784ab47cfaaSmrg  esac
1785ab47cfaaSmrg  ;;
1786ab47cfaaSmrg
1787ab47cfaaSmrgsysv4*MP*)
1788ab47cfaaSmrg  if test -d /usr/nec ;then
1789ab47cfaaSmrg    version_type=linux
1790ab47cfaaSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1791ab47cfaaSmrg    soname_spec='$libname${shared_ext}.$major'
1792ab47cfaaSmrg    shlibpath_var=LD_LIBRARY_PATH
1793ab47cfaaSmrg  fi
1794ab47cfaaSmrg  ;;
1795ab47cfaaSmrg
1796ab47cfaaSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1797ab47cfaaSmrg  version_type=freebsd-elf
1798ab47cfaaSmrg  need_lib_prefix=no
1799ab47cfaaSmrg  need_version=no
1800ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1801ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1802ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1803ab47cfaaSmrg  hardcode_into_libs=yes
1804ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
1805ab47cfaaSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1806ab47cfaaSmrg    shlibpath_overrides_runpath=no
1807ab47cfaaSmrg  else
1808ab47cfaaSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1809ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1810ab47cfaaSmrg    case $host_os in
1811ab47cfaaSmrg      sco3.2v5*)
1812ab47cfaaSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1813ab47cfaaSmrg	;;
1814ab47cfaaSmrg    esac
1815ab47cfaaSmrg  fi
1816ab47cfaaSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
1817ab47cfaaSmrg  ;;
1818ab47cfaaSmrg
1819ab47cfaaSmrguts4*)
1820ab47cfaaSmrg  version_type=linux
1821ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1822ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1823ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1824ab47cfaaSmrg  ;;
1825ab47cfaaSmrg
1826ab47cfaaSmrg*)
1827ab47cfaaSmrg  dynamic_linker=no
1828ab47cfaaSmrg  ;;
1829ab47cfaaSmrgesac
1830ab47cfaaSmrgAC_MSG_RESULT([$dynamic_linker])
1831ab47cfaaSmrgtest "$dynamic_linker" = no && can_build_shared=no
1832ab47cfaaSmrg
1833ab47cfaaSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1834ab47cfaaSmrgif test "$GCC" = yes; then
1835ab47cfaaSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1836ab47cfaaSmrgfi
1837ab47cfaaSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1838ab47cfaaSmrg
1839ab47cfaaSmrg
1840ab47cfaaSmrg# _LT_AC_TAGCONFIG
1841ab47cfaaSmrg# ----------------
1842ab47cfaaSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
18438697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
18448697ee19SmrgAC_ARG_WITH([tags],
1845ab47cfaaSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1846ab47cfaaSmrg        [include additional configurations @<:@automatic@:>@])],
1847ab47cfaaSmrg    [tagnames="$withval"])
1848ab47cfaaSmrg
1849ab47cfaaSmrgif test -f "$ltmain" && test -n "$tagnames"; then
1850ab47cfaaSmrg  if test ! -f "${ofile}"; then
1851ab47cfaaSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
1852ab47cfaaSmrg  fi
1853ab47cfaaSmrg
1854ab47cfaaSmrg  if test -z "$LTCC"; then
1855ab47cfaaSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1856ab47cfaaSmrg    if test -z "$LTCC"; then
1857ab47cfaaSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1858ab47cfaaSmrg    else
1859ab47cfaaSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1860ab47cfaaSmrg    fi
1861ab47cfaaSmrg  fi
1862ab47cfaaSmrg  if test -z "$LTCFLAGS"; then
1863ab47cfaaSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1864ab47cfaaSmrg  fi
1865ab47cfaaSmrg
1866ab47cfaaSmrg  # Extract list of available tagged configurations in $ofile.
1867ab47cfaaSmrg  # Note that this assumes the entire list is on one line.
1868ab47cfaaSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1869ab47cfaaSmrg
1870ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1871ab47cfaaSmrg  for tagname in $tagnames; do
1872ab47cfaaSmrg    IFS="$lt_save_ifs"
1873ab47cfaaSmrg    # Check whether tagname contains only valid characters
1874ab47cfaaSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1875ab47cfaaSmrg    "") ;;
1876ab47cfaaSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1877ab47cfaaSmrg	;;
1878ab47cfaaSmrg    esac
1879ab47cfaaSmrg
1880ab47cfaaSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1881ab47cfaaSmrg    then
1882ab47cfaaSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1883ab47cfaaSmrg    fi
1884ab47cfaaSmrg
1885ab47cfaaSmrg    # Update the list of available tags.
1886ab47cfaaSmrg    if test -n "$tagname"; then
1887ab47cfaaSmrg      echo appending configuration tag \"$tagname\" to $ofile
1888ab47cfaaSmrg
1889ab47cfaaSmrg      case $tagname in
1890ab47cfaaSmrg      CXX)
1891ab47cfaaSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1892ab47cfaaSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1893ab47cfaaSmrg	    (test "X$CXX" != "Xg++"))) ; then
1894ab47cfaaSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
1895ab47cfaaSmrg	else
1896ab47cfaaSmrg	  tagname=""
1897ab47cfaaSmrg	fi
1898ab47cfaaSmrg	;;
1899ab47cfaaSmrg
1900ab47cfaaSmrg      F77)
1901ab47cfaaSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
1902ab47cfaaSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
1903ab47cfaaSmrg	else
1904ab47cfaaSmrg	  tagname=""
1905ab47cfaaSmrg	fi
1906ab47cfaaSmrg	;;
1907ab47cfaaSmrg
1908ab47cfaaSmrg      GCJ)
1909ab47cfaaSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1910ab47cfaaSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
1911ab47cfaaSmrg	else
1912ab47cfaaSmrg	  tagname=""
1913ab47cfaaSmrg	fi
1914ab47cfaaSmrg	;;
1915ab47cfaaSmrg
1916ab47cfaaSmrg      RC)
1917ab47cfaaSmrg	AC_LIBTOOL_LANG_RC_CONFIG
1918ab47cfaaSmrg	;;
1919ab47cfaaSmrg
1920ab47cfaaSmrg      *)
1921ab47cfaaSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
1922ab47cfaaSmrg	;;
1923ab47cfaaSmrg      esac
1924ab47cfaaSmrg
1925ab47cfaaSmrg      # Append the new tag name to the list of available tags.
1926ab47cfaaSmrg      if test -n "$tagname" ; then
1927ab47cfaaSmrg      available_tags="$available_tags $tagname"
1928ab47cfaaSmrg    fi
1929ab47cfaaSmrg    fi
1930ab47cfaaSmrg  done
1931ab47cfaaSmrg  IFS="$lt_save_ifs"
1932ab47cfaaSmrg
1933ab47cfaaSmrg  # Now substitute the updated list of available tags.
1934ab47cfaaSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1935ab47cfaaSmrg    mv "${ofile}T" "$ofile"
1936ab47cfaaSmrg    chmod +x "$ofile"
1937ab47cfaaSmrg  else
1938ab47cfaaSmrg    rm -f "${ofile}T"
1939ab47cfaaSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1940ab47cfaaSmrg  fi
1941ab47cfaaSmrgfi
1942ab47cfaaSmrg])# _LT_AC_TAGCONFIG
1943ab47cfaaSmrg
1944ab47cfaaSmrg
1945ab47cfaaSmrg# AC_LIBTOOL_DLOPEN
1946ab47cfaaSmrg# -----------------
1947ab47cfaaSmrg# enable checks for dlopen support
1948ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
1949ab47cfaaSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1950ab47cfaaSmrg])# AC_LIBTOOL_DLOPEN
1951ab47cfaaSmrg
1952ab47cfaaSmrg
1953ab47cfaaSmrg# AC_LIBTOOL_WIN32_DLL
1954ab47cfaaSmrg# --------------------
1955ab47cfaaSmrg# declare package support for building win32 DLLs
1956ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1957ab47cfaaSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1958ab47cfaaSmrg])# AC_LIBTOOL_WIN32_DLL
1959ab47cfaaSmrg
1960ab47cfaaSmrg
1961ab47cfaaSmrg# AC_ENABLE_SHARED([DEFAULT])
1962ab47cfaaSmrg# ---------------------------
1963ab47cfaaSmrg# implement the --enable-shared flag
1964ab47cfaaSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1965ab47cfaaSmrgAC_DEFUN([AC_ENABLE_SHARED],
1966ab47cfaaSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1967ab47cfaaSmrgAC_ARG_ENABLE([shared],
1968ab47cfaaSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1969ab47cfaaSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1970ab47cfaaSmrg    [p=${PACKAGE-default}
1971ab47cfaaSmrg    case $enableval in
1972ab47cfaaSmrg    yes) enable_shared=yes ;;
1973ab47cfaaSmrg    no) enable_shared=no ;;
1974ab47cfaaSmrg    *)
1975ab47cfaaSmrg      enable_shared=no
1976ab47cfaaSmrg      # Look at the argument we got.  We use all the common list separators.
1977ab47cfaaSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1978ab47cfaaSmrg      for pkg in $enableval; do
1979ab47cfaaSmrg	IFS="$lt_save_ifs"
1980ab47cfaaSmrg	if test "X$pkg" = "X$p"; then
1981ab47cfaaSmrg	  enable_shared=yes
1982ab47cfaaSmrg	fi
1983ab47cfaaSmrg      done
1984ab47cfaaSmrg      IFS="$lt_save_ifs"
1985ab47cfaaSmrg      ;;
1986ab47cfaaSmrg    esac],
1987ab47cfaaSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1988ab47cfaaSmrg])# AC_ENABLE_SHARED
1989ab47cfaaSmrg
1990ab47cfaaSmrg
1991ab47cfaaSmrg# AC_DISABLE_SHARED
1992ab47cfaaSmrg# -----------------
1993ab47cfaaSmrg# set the default shared flag to --disable-shared
1994ab47cfaaSmrgAC_DEFUN([AC_DISABLE_SHARED],
1995ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1996ab47cfaaSmrgAC_ENABLE_SHARED(no)
1997ab47cfaaSmrg])# AC_DISABLE_SHARED
1998ab47cfaaSmrg
1999ab47cfaaSmrg
2000ab47cfaaSmrg# AC_ENABLE_STATIC([DEFAULT])
2001ab47cfaaSmrg# ---------------------------
2002ab47cfaaSmrg# implement the --enable-static flag
2003ab47cfaaSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2004ab47cfaaSmrgAC_DEFUN([AC_ENABLE_STATIC],
2005ab47cfaaSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2006ab47cfaaSmrgAC_ARG_ENABLE([static],
2007ab47cfaaSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
2008ab47cfaaSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
2009ab47cfaaSmrg    [p=${PACKAGE-default}
2010ab47cfaaSmrg    case $enableval in
2011ab47cfaaSmrg    yes) enable_static=yes ;;
2012ab47cfaaSmrg    no) enable_static=no ;;
2013ab47cfaaSmrg    *)
2014ab47cfaaSmrg     enable_static=no
2015ab47cfaaSmrg      # Look at the argument we got.  We use all the common list separators.
2016ab47cfaaSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2017ab47cfaaSmrg      for pkg in $enableval; do
2018ab47cfaaSmrg	IFS="$lt_save_ifs"
2019ab47cfaaSmrg	if test "X$pkg" = "X$p"; then
2020ab47cfaaSmrg	  enable_static=yes
2021ab47cfaaSmrg	fi
2022ab47cfaaSmrg      done
2023ab47cfaaSmrg      IFS="$lt_save_ifs"
2024ab47cfaaSmrg      ;;
2025ab47cfaaSmrg    esac],
2026ab47cfaaSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2027ab47cfaaSmrg])# AC_ENABLE_STATIC
2028ab47cfaaSmrg
2029ab47cfaaSmrg
2030ab47cfaaSmrg# AC_DISABLE_STATIC
2031ab47cfaaSmrg# -----------------
2032ab47cfaaSmrg# set the default static flag to --disable-static
2033ab47cfaaSmrgAC_DEFUN([AC_DISABLE_STATIC],
2034ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2035ab47cfaaSmrgAC_ENABLE_STATIC(no)
2036ab47cfaaSmrg])# AC_DISABLE_STATIC
2037ab47cfaaSmrg
2038ab47cfaaSmrg
2039ab47cfaaSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
2040ab47cfaaSmrg# ---------------------------------
2041ab47cfaaSmrg# implement the --enable-fast-install flag
2042ab47cfaaSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2043ab47cfaaSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
2044ab47cfaaSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2045ab47cfaaSmrgAC_ARG_ENABLE([fast-install],
2046ab47cfaaSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
2047ab47cfaaSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
2048ab47cfaaSmrg    [p=${PACKAGE-default}
2049ab47cfaaSmrg    case $enableval in
2050ab47cfaaSmrg    yes) enable_fast_install=yes ;;
2051ab47cfaaSmrg    no) enable_fast_install=no ;;
2052ab47cfaaSmrg    *)
2053ab47cfaaSmrg      enable_fast_install=no
2054ab47cfaaSmrg      # Look at the argument we got.  We use all the common list separators.
2055ab47cfaaSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2056ab47cfaaSmrg      for pkg in $enableval; do
2057ab47cfaaSmrg	IFS="$lt_save_ifs"
2058ab47cfaaSmrg	if test "X$pkg" = "X$p"; then
2059ab47cfaaSmrg	  enable_fast_install=yes
2060ab47cfaaSmrg	fi
2061ab47cfaaSmrg      done
2062ab47cfaaSmrg      IFS="$lt_save_ifs"
2063ab47cfaaSmrg      ;;
2064ab47cfaaSmrg    esac],
2065ab47cfaaSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2066ab47cfaaSmrg])# AC_ENABLE_FAST_INSTALL
2067ab47cfaaSmrg
2068ab47cfaaSmrg
2069ab47cfaaSmrg# AC_DISABLE_FAST_INSTALL
2070ab47cfaaSmrg# -----------------------
2071ab47cfaaSmrg# set the default to --disable-fast-install
2072ab47cfaaSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2073ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2074ab47cfaaSmrgAC_ENABLE_FAST_INSTALL(no)
2075ab47cfaaSmrg])# AC_DISABLE_FAST_INSTALL
2076ab47cfaaSmrg
2077ab47cfaaSmrg
2078ab47cfaaSmrg# AC_LIBTOOL_PICMODE([MODE])
2079ab47cfaaSmrg# --------------------------
2080ab47cfaaSmrg# implement the --with-pic flag
2081ab47cfaaSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2082ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
2083ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2084ab47cfaaSmrgpic_mode=ifelse($#,1,$1,default)
2085ab47cfaaSmrg])# AC_LIBTOOL_PICMODE
2086ab47cfaaSmrg
2087ab47cfaaSmrg
2088ab47cfaaSmrg# AC_PROG_EGREP
2089ab47cfaaSmrg# -------------
2090ab47cfaaSmrg# This is predefined starting with Autoconf 2.54, so this conditional
2091ab47cfaaSmrg# definition can be removed once we require Autoconf 2.54 or later.
2092ab47cfaaSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2093ab47cfaaSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2094ab47cfaaSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2095ab47cfaaSmrg    then ac_cv_prog_egrep='grep -E'
2096ab47cfaaSmrg    else ac_cv_prog_egrep='egrep'
2097ab47cfaaSmrg    fi])
2098ab47cfaaSmrg EGREP=$ac_cv_prog_egrep
2099ab47cfaaSmrg AC_SUBST([EGREP])
2100ab47cfaaSmrg])])
2101ab47cfaaSmrg
2102ab47cfaaSmrg
2103ab47cfaaSmrg# AC_PATH_TOOL_PREFIX
2104ab47cfaaSmrg# -------------------
21058697ee19Smrg# find a file program which can recognize shared library
2106ab47cfaaSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
2107ab47cfaaSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2108ab47cfaaSmrgAC_MSG_CHECKING([for $1])
2109ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2110ab47cfaaSmrg[case $MAGIC_CMD in
2111ab47cfaaSmrg[[\\/*] |  ?:[\\/]*])
2112ab47cfaaSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2113ab47cfaaSmrg  ;;
2114ab47cfaaSmrg*)
2115ab47cfaaSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2116ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2117ab47cfaaSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2118ab47cfaaSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2119ab47cfaaSmrgdnl not every word.  This closes a longstanding sh security hole.
2120ab47cfaaSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
2121ab47cfaaSmrg  for ac_dir in $ac_dummy; do
2122ab47cfaaSmrg    IFS="$lt_save_ifs"
2123ab47cfaaSmrg    test -z "$ac_dir" && ac_dir=.
2124ab47cfaaSmrg    if test -f $ac_dir/$1; then
2125ab47cfaaSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2126ab47cfaaSmrg      if test -n "$file_magic_test_file"; then
2127ab47cfaaSmrg	case $deplibs_check_method in
2128ab47cfaaSmrg	"file_magic "*)
2129ab47cfaaSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2130ab47cfaaSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2131ab47cfaaSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2132ab47cfaaSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2133ab47cfaaSmrg	    :
2134ab47cfaaSmrg	  else
2135ab47cfaaSmrg	    cat <<EOF 1>&2
2136ab47cfaaSmrg
2137ab47cfaaSmrg*** Warning: the command libtool uses to detect shared libraries,
2138ab47cfaaSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2139ab47cfaaSmrg*** The result is that libtool may fail to recognize shared libraries
2140ab47cfaaSmrg*** as such.  This will affect the creation of libtool libraries that
2141ab47cfaaSmrg*** depend on shared libraries, but programs linked with such libtool
2142ab47cfaaSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2143ab47cfaaSmrg*** may want to report the problem to your system manager and/or to
2144ab47cfaaSmrg*** bug-libtool@gnu.org
2145ab47cfaaSmrg
2146ab47cfaaSmrgEOF
2147ab47cfaaSmrg	  fi ;;
2148ab47cfaaSmrg	esac
2149ab47cfaaSmrg      fi
2150ab47cfaaSmrg      break
2151ab47cfaaSmrg    fi
2152ab47cfaaSmrg  done
2153ab47cfaaSmrg  IFS="$lt_save_ifs"
2154ab47cfaaSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2155ab47cfaaSmrg  ;;
2156ab47cfaaSmrgesac])
2157ab47cfaaSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2158ab47cfaaSmrgif test -n "$MAGIC_CMD"; then
2159ab47cfaaSmrg  AC_MSG_RESULT($MAGIC_CMD)
2160ab47cfaaSmrgelse
2161ab47cfaaSmrg  AC_MSG_RESULT(no)
2162ab47cfaaSmrgfi
2163ab47cfaaSmrg])# AC_PATH_TOOL_PREFIX
2164ab47cfaaSmrg
2165ab47cfaaSmrg
2166ab47cfaaSmrg# AC_PATH_MAGIC
2167ab47cfaaSmrg# -------------
21688697ee19Smrg# find a file program which can recognize a shared library
2169ab47cfaaSmrgAC_DEFUN([AC_PATH_MAGIC],
2170ab47cfaaSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2171ab47cfaaSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2172ab47cfaaSmrg  if test -n "$ac_tool_prefix"; then
2173ab47cfaaSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2174ab47cfaaSmrg  else
2175ab47cfaaSmrg    MAGIC_CMD=:
2176ab47cfaaSmrg  fi
2177ab47cfaaSmrgfi
2178ab47cfaaSmrg])# AC_PATH_MAGIC
2179ab47cfaaSmrg
2180ab47cfaaSmrg
2181ab47cfaaSmrg# AC_PROG_LD
2182ab47cfaaSmrg# ----------
2183ab47cfaaSmrg# find the pathname to the GNU or non-GNU linker
2184ab47cfaaSmrgAC_DEFUN([AC_PROG_LD],
2185ab47cfaaSmrg[AC_ARG_WITH([gnu-ld],
2186ab47cfaaSmrg    [AC_HELP_STRING([--with-gnu-ld],
2187ab47cfaaSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2188ab47cfaaSmrg    [test "$withval" = no || with_gnu_ld=yes],
2189ab47cfaaSmrg    [with_gnu_ld=no])
2190ab47cfaaSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
2191ab47cfaaSmrgAC_REQUIRE([AC_PROG_CC])dnl
2192ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2193ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2194ab47cfaaSmrgac_prog=ld
2195ab47cfaaSmrgif test "$GCC" = yes; then
2196ab47cfaaSmrg  # Check if gcc -print-prog-name=ld gives a path.
2197ab47cfaaSmrg  AC_MSG_CHECKING([for ld used by $CC])
2198ab47cfaaSmrg  case $host in
2199ab47cfaaSmrg  *-*-mingw*)
2200ab47cfaaSmrg    # gcc leaves a trailing carriage return which upsets mingw
2201ab47cfaaSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2202ab47cfaaSmrg  *)
2203ab47cfaaSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2204ab47cfaaSmrg  esac
2205ab47cfaaSmrg  case $ac_prog in
2206ab47cfaaSmrg    # Accept absolute paths.
2207ab47cfaaSmrg    [[\\/]]* | ?:[[\\/]]*)
2208ab47cfaaSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2209ab47cfaaSmrg      # Canonicalize the pathname of ld
2210ab47cfaaSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2211ab47cfaaSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2212ab47cfaaSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2213ab47cfaaSmrg      done
2214ab47cfaaSmrg      test -z "$LD" && LD="$ac_prog"
2215ab47cfaaSmrg      ;;
2216ab47cfaaSmrg  "")
2217ab47cfaaSmrg    # If it fails, then pretend we aren't using GCC.
2218ab47cfaaSmrg    ac_prog=ld
2219ab47cfaaSmrg    ;;
2220ab47cfaaSmrg  *)
2221ab47cfaaSmrg    # If it is relative, then search for the first ld in PATH.
2222ab47cfaaSmrg    with_gnu_ld=unknown
2223ab47cfaaSmrg    ;;
2224ab47cfaaSmrg  esac
2225ab47cfaaSmrgelif test "$with_gnu_ld" = yes; then
2226ab47cfaaSmrg  AC_MSG_CHECKING([for GNU ld])
2227ab47cfaaSmrgelse
2228ab47cfaaSmrg  AC_MSG_CHECKING([for non-GNU ld])
2229ab47cfaaSmrgfi
2230ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_LD,
2231ab47cfaaSmrg[if test -z "$LD"; then
2232ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2233ab47cfaaSmrg  for ac_dir in $PATH; do
2234ab47cfaaSmrg    IFS="$lt_save_ifs"
2235ab47cfaaSmrg    test -z "$ac_dir" && ac_dir=.
2236ab47cfaaSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2237ab47cfaaSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2238ab47cfaaSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2239ab47cfaaSmrg      # but apparently some variants of GNU ld only accept -v.
2240ab47cfaaSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2241ab47cfaaSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2242ab47cfaaSmrg      *GNU* | *'with BFD'*)
2243ab47cfaaSmrg	test "$with_gnu_ld" != no && break
2244ab47cfaaSmrg	;;
2245ab47cfaaSmrg      *)
2246ab47cfaaSmrg	test "$with_gnu_ld" != yes && break
2247ab47cfaaSmrg	;;
2248ab47cfaaSmrg      esac
2249ab47cfaaSmrg    fi
2250ab47cfaaSmrg  done
2251ab47cfaaSmrg  IFS="$lt_save_ifs"
2252ab47cfaaSmrgelse
2253ab47cfaaSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2254ab47cfaaSmrgfi])
2255ab47cfaaSmrgLD="$lt_cv_path_LD"
2256ab47cfaaSmrgif test -n "$LD"; then
2257ab47cfaaSmrg  AC_MSG_RESULT($LD)
2258ab47cfaaSmrgelse
2259ab47cfaaSmrg  AC_MSG_RESULT(no)
2260ab47cfaaSmrgfi
2261ab47cfaaSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2262ab47cfaaSmrgAC_PROG_LD_GNU
2263ab47cfaaSmrg])# AC_PROG_LD
2264ab47cfaaSmrg
2265ab47cfaaSmrg
2266ab47cfaaSmrg# AC_PROG_LD_GNU
2267ab47cfaaSmrg# --------------
2268ab47cfaaSmrgAC_DEFUN([AC_PROG_LD_GNU],
2269ab47cfaaSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2270ab47cfaaSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2271ab47cfaaSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2272ab47cfaaSmrgcase `$LD -v 2>&1 </dev/null` in
2273ab47cfaaSmrg*GNU* | *'with BFD'*)
2274ab47cfaaSmrg  lt_cv_prog_gnu_ld=yes
2275ab47cfaaSmrg  ;;
2276ab47cfaaSmrg*)
2277ab47cfaaSmrg  lt_cv_prog_gnu_ld=no
2278ab47cfaaSmrg  ;;
2279ab47cfaaSmrgesac])
2280ab47cfaaSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2281ab47cfaaSmrg])# AC_PROG_LD_GNU
2282ab47cfaaSmrg
2283ab47cfaaSmrg
2284ab47cfaaSmrg# AC_PROG_LD_RELOAD_FLAG
2285ab47cfaaSmrg# ----------------------
2286ab47cfaaSmrg# find reload flag for linker
2287ab47cfaaSmrg#   -- PORTME Some linkers may need a different reload flag.
2288ab47cfaaSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2289ab47cfaaSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2290ab47cfaaSmrg  lt_cv_ld_reload_flag,
2291ab47cfaaSmrg  [lt_cv_ld_reload_flag='-r'])
2292ab47cfaaSmrgreload_flag=$lt_cv_ld_reload_flag
2293ab47cfaaSmrgcase $reload_flag in
2294ab47cfaaSmrg"" | " "*) ;;
2295ab47cfaaSmrg*) reload_flag=" $reload_flag" ;;
2296ab47cfaaSmrgesac
2297ab47cfaaSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2298ab47cfaaSmrgcase $host_os in
2299ab47cfaaSmrg  darwin*)
2300ab47cfaaSmrg    if test "$GCC" = yes; then
2301ab47cfaaSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2302ab47cfaaSmrg    else
2303ab47cfaaSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2304ab47cfaaSmrg    fi
2305ab47cfaaSmrg    ;;
2306ab47cfaaSmrgesac
2307ab47cfaaSmrg])# AC_PROG_LD_RELOAD_FLAG
2308ab47cfaaSmrg
2309ab47cfaaSmrg
2310ab47cfaaSmrg# AC_DEPLIBS_CHECK_METHOD
2311ab47cfaaSmrg# -----------------------
2312ab47cfaaSmrg# how to check for library dependencies
2313ab47cfaaSmrg#  -- PORTME fill in with the dynamic library characteristics
2314ab47cfaaSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
23158697ee19Smrg[AC_CACHE_CHECK([how to recognize dependent libraries],
2316ab47cfaaSmrglt_cv_deplibs_check_method,
2317ab47cfaaSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2318ab47cfaaSmrglt_cv_file_magic_test_file=
2319ab47cfaaSmrglt_cv_deplibs_check_method='unknown'
2320ab47cfaaSmrg# Need to set the preceding variable on all platforms that support
2321ab47cfaaSmrg# interlibrary dependencies.
2322ab47cfaaSmrg# 'none' -- dependencies not supported.
2323ab47cfaaSmrg# `unknown' -- same as none, but documents that we really don't know.
2324ab47cfaaSmrg# 'pass_all' -- all dependencies passed with no checks.
2325ab47cfaaSmrg# 'test_compile' -- check by making test program.
2326ab47cfaaSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
2327ab47cfaaSmrg# which responds to the $file_magic_cmd with a given extended regex.
2328ab47cfaaSmrg# If you have `file' or equivalent on your system and you're not sure
2329ab47cfaaSmrg# whether `pass_all' will *always* work, you probably want this one.
2330ab47cfaaSmrg
2331ab47cfaaSmrgcase $host_os in
2332ab47cfaaSmrgaix4* | aix5*)
2333ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2334ab47cfaaSmrg  ;;
2335ab47cfaaSmrg
2336ab47cfaaSmrgbeos*)
2337ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2338ab47cfaaSmrg  ;;
2339ab47cfaaSmrg
2340ab47cfaaSmrgbsdi[[45]]*)
2341ab47cfaaSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2342ab47cfaaSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
2343ab47cfaaSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
2344ab47cfaaSmrg  ;;
2345ab47cfaaSmrg
2346ab47cfaaSmrgcygwin*)
2347ab47cfaaSmrg  # func_win32_libid is a shell function defined in ltmain.sh
2348ab47cfaaSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2349ab47cfaaSmrg  lt_cv_file_magic_cmd='func_win32_libid'
2350ab47cfaaSmrg  ;;
2351ab47cfaaSmrg
2352ab47cfaaSmrgmingw* | pw32*)
2353ab47cfaaSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
23548697ee19Smrg  # func_win32_libid shell function, so use a weaker test based on 'objdump',
23558697ee19Smrg  # unless we find 'file', for example because we are cross-compiling.
23568697ee19Smrg  if ( file / ) >/dev/null 2>&1; then
23578697ee19Smrg    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
23588697ee19Smrg    lt_cv_file_magic_cmd='func_win32_libid'
23598697ee19Smrg  else
23608697ee19Smrg    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
23618697ee19Smrg    lt_cv_file_magic_cmd='$OBJDUMP -f'
23628697ee19Smrg  fi
2363ab47cfaaSmrg  ;;
2364ab47cfaaSmrg
2365ab47cfaaSmrgdarwin* | rhapsody*)
2366ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2367ab47cfaaSmrg  ;;
2368ab47cfaaSmrg
2369ab47cfaaSmrgfreebsd* | dragonfly*)
2370ab47cfaaSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2371ab47cfaaSmrg    case $host_cpu in
2372ab47cfaaSmrg    i*86 )
2373ab47cfaaSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
2374ab47cfaaSmrg      # Let's accept both of them until this is cleared up.
2375ab47cfaaSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2376ab47cfaaSmrg      lt_cv_file_magic_cmd=/usr/bin/file
2377ab47cfaaSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2378ab47cfaaSmrg      ;;
2379ab47cfaaSmrg    esac
2380ab47cfaaSmrg  else
2381ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2382ab47cfaaSmrg  fi
2383ab47cfaaSmrg  ;;
2384ab47cfaaSmrg
2385ab47cfaaSmrggnu*)
2386ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2387ab47cfaaSmrg  ;;
2388ab47cfaaSmrg
2389ab47cfaaSmrghpux10.20* | hpux11*)
2390ab47cfaaSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2391ab47cfaaSmrg  case $host_cpu in
2392ab47cfaaSmrg  ia64*)
2393ab47cfaaSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2394ab47cfaaSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2395ab47cfaaSmrg    ;;
2396ab47cfaaSmrg  hppa*64*)
2397ab47cfaaSmrg    [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]']
2398ab47cfaaSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2399ab47cfaaSmrg    ;;
2400ab47cfaaSmrg  *)
2401ab47cfaaSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2402ab47cfaaSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2403ab47cfaaSmrg    ;;
2404ab47cfaaSmrg  esac
2405ab47cfaaSmrg  ;;
2406ab47cfaaSmrg
24078697ee19Smrginterix[[3-9]]*)
2408ab47cfaaSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2409ab47cfaaSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2410ab47cfaaSmrg  ;;
2411ab47cfaaSmrg
2412ab47cfaaSmrgirix5* | irix6* | nonstopux*)
2413ab47cfaaSmrg  case $LD in
2414ab47cfaaSmrg  *-32|*"-32 ") libmagic=32-bit;;
2415ab47cfaaSmrg  *-n32|*"-n32 ") libmagic=N32;;
2416ab47cfaaSmrg  *-64|*"-64 ") libmagic=64-bit;;
2417ab47cfaaSmrg  *) libmagic=never-match;;
2418ab47cfaaSmrg  esac
2419ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2420ab47cfaaSmrg  ;;
2421ab47cfaaSmrg
2422ab47cfaaSmrg# This must be Linux ELF.
2423ab47cfaaSmrglinux* | k*bsd*-gnu)
2424ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2425ab47cfaaSmrg  ;;
2426ab47cfaaSmrg
24278697ee19Smrgnetbsd*)
2428ab47cfaaSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2429ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2430ab47cfaaSmrg  else
2431ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2432ab47cfaaSmrg  fi
2433ab47cfaaSmrg  ;;
2434ab47cfaaSmrg
2435ab47cfaaSmrgnewos6*)
2436ab47cfaaSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2437ab47cfaaSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2438ab47cfaaSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2439ab47cfaaSmrg  ;;
2440ab47cfaaSmrg
2441ab47cfaaSmrgnto-qnx*)
2442ab47cfaaSmrg  lt_cv_deplibs_check_method=unknown
2443ab47cfaaSmrg  ;;
2444ab47cfaaSmrg
2445ab47cfaaSmrgopenbsd*)
2446ab47cfaaSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2447ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2448ab47cfaaSmrg  else
2449ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2450ab47cfaaSmrg  fi
2451ab47cfaaSmrg  ;;
2452ab47cfaaSmrg
2453ab47cfaaSmrgosf3* | osf4* | osf5*)
2454ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2455ab47cfaaSmrg  ;;
2456ab47cfaaSmrg
24578697ee19Smrgrdos*)
24588697ee19Smrg  lt_cv_deplibs_check_method=pass_all
24598697ee19Smrg  ;;
24608697ee19Smrg
2461ab47cfaaSmrgsolaris*)
2462ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2463ab47cfaaSmrg  ;;
2464ab47cfaaSmrg
2465ab47cfaaSmrgsysv4 | sysv4.3*)
2466ab47cfaaSmrg  case $host_vendor in
2467ab47cfaaSmrg  motorola)
2468ab47cfaaSmrg    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]]'
2469ab47cfaaSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2470ab47cfaaSmrg    ;;
2471ab47cfaaSmrg  ncr)
2472ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2473ab47cfaaSmrg    ;;
2474ab47cfaaSmrg  sequent)
2475ab47cfaaSmrg    lt_cv_file_magic_cmd='/bin/file'
2476ab47cfaaSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2477ab47cfaaSmrg    ;;
2478ab47cfaaSmrg  sni)
2479ab47cfaaSmrg    lt_cv_file_magic_cmd='/bin/file'
2480ab47cfaaSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2481ab47cfaaSmrg    lt_cv_file_magic_test_file=/lib/libc.so
2482ab47cfaaSmrg    ;;
2483ab47cfaaSmrg  siemens)
2484ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2485ab47cfaaSmrg    ;;
2486ab47cfaaSmrg  pc)
2487ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2488ab47cfaaSmrg    ;;
2489ab47cfaaSmrg  esac
2490ab47cfaaSmrg  ;;
2491ab47cfaaSmrg
2492ab47cfaaSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2493ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2494ab47cfaaSmrg  ;;
2495ab47cfaaSmrgesac
2496ab47cfaaSmrg])
2497ab47cfaaSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
2498ab47cfaaSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
2499ab47cfaaSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
2500ab47cfaaSmrg])# AC_DEPLIBS_CHECK_METHOD
2501ab47cfaaSmrg
2502ab47cfaaSmrg
2503ab47cfaaSmrg# AC_PROG_NM
2504ab47cfaaSmrg# ----------
2505ab47cfaaSmrg# find the pathname to a BSD-compatible name lister
2506ab47cfaaSmrgAC_DEFUN([AC_PROG_NM],
2507ab47cfaaSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2508ab47cfaaSmrg[if test -n "$NM"; then
2509ab47cfaaSmrg  # Let the user override the test.
2510ab47cfaaSmrg  lt_cv_path_NM="$NM"
2511ab47cfaaSmrgelse
2512ab47cfaaSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
25138697ee19Smrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2514ab47cfaaSmrg    lt_nm_to_check="$lt_nm_to_check nm"
2515ab47cfaaSmrg  fi
2516ab47cfaaSmrg  for lt_tmp_nm in $lt_nm_to_check; do
2517ab47cfaaSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2518ab47cfaaSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2519ab47cfaaSmrg      IFS="$lt_save_ifs"
2520ab47cfaaSmrg      test -z "$ac_dir" && ac_dir=.
2521ab47cfaaSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
2522ab47cfaaSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2523ab47cfaaSmrg	# Check to see if the nm accepts a BSD-compat flag.
2524ab47cfaaSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2525ab47cfaaSmrg	#   nm: unknown option "B" ignored
2526ab47cfaaSmrg	# Tru64's nm complains that /dev/null is an invalid object file
2527ab47cfaaSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2528ab47cfaaSmrg	*/dev/null* | *'Invalid file or object type'*)
2529ab47cfaaSmrg	  lt_cv_path_NM="$tmp_nm -B"
2530ab47cfaaSmrg	  break
2531ab47cfaaSmrg	  ;;
2532ab47cfaaSmrg	*)
2533ab47cfaaSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2534ab47cfaaSmrg	  */dev/null*)
2535ab47cfaaSmrg	    lt_cv_path_NM="$tmp_nm -p"
2536ab47cfaaSmrg	    break
2537ab47cfaaSmrg	    ;;
2538ab47cfaaSmrg	  *)
2539ab47cfaaSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2540ab47cfaaSmrg	    continue # so that we can try to find one that supports BSD flags
2541ab47cfaaSmrg	    ;;
2542ab47cfaaSmrg	  esac
2543ab47cfaaSmrg	  ;;
2544ab47cfaaSmrg	esac
2545ab47cfaaSmrg      fi
2546ab47cfaaSmrg    done
2547ab47cfaaSmrg    IFS="$lt_save_ifs"
2548ab47cfaaSmrg  done
2549ab47cfaaSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2550ab47cfaaSmrgfi])
2551ab47cfaaSmrgNM="$lt_cv_path_NM"
2552ab47cfaaSmrg])# AC_PROG_NM
2553ab47cfaaSmrg
2554ab47cfaaSmrg
2555ab47cfaaSmrg# AC_CHECK_LIBM
2556ab47cfaaSmrg# -------------
2557ab47cfaaSmrg# check for math library
2558ab47cfaaSmrgAC_DEFUN([AC_CHECK_LIBM],
2559ab47cfaaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2560ab47cfaaSmrgLIBM=
2561ab47cfaaSmrgcase $host in
2562ab47cfaaSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2563ab47cfaaSmrg  # These system don't have libm, or don't need it
2564ab47cfaaSmrg  ;;
2565ab47cfaaSmrg*-ncr-sysv4.3*)
2566ab47cfaaSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2567ab47cfaaSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2568ab47cfaaSmrg  ;;
2569ab47cfaaSmrg*)
2570ab47cfaaSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
2571ab47cfaaSmrg  ;;
2572ab47cfaaSmrgesac
2573ab47cfaaSmrg])# AC_CHECK_LIBM
2574ab47cfaaSmrg
2575ab47cfaaSmrg
2576ab47cfaaSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2577ab47cfaaSmrg# -----------------------------------
2578ab47cfaaSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
2579ab47cfaaSmrg# LTDLINCL to the include flags for the libltdl header and adds
2580ab47cfaaSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
2581ab47cfaaSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2582ab47cfaaSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2583ab47cfaaSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2584ab47cfaaSmrg# (note the single quotes!).  If your package is not flat and you're not
2585ab47cfaaSmrg# using automake, define top_builddir and top_srcdir appropriately in
2586ab47cfaaSmrg# the Makefiles.
2587ab47cfaaSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2588ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2589ab47cfaaSmrg  case $enable_ltdl_convenience in
2590ab47cfaaSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2591ab47cfaaSmrg  "") enable_ltdl_convenience=yes
2592ab47cfaaSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2593ab47cfaaSmrg  esac
2594ab47cfaaSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2595ab47cfaaSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2596ab47cfaaSmrg  # For backwards non-gettext consistent compatibility...
2597ab47cfaaSmrg  INCLTDL="$LTDLINCL"
2598ab47cfaaSmrg])# AC_LIBLTDL_CONVENIENCE
2599ab47cfaaSmrg
2600ab47cfaaSmrg
2601ab47cfaaSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2602ab47cfaaSmrg# -----------------------------------
2603ab47cfaaSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
2604ab47cfaaSmrg# LTDLINCL to the include flags for the libltdl header and adds
2605ab47cfaaSmrg# --enable-ltdl-install to the configure arguments.  Note that
2606ab47cfaaSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2607ab47cfaaSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
2608ab47cfaaSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2609ab47cfaaSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
2610ab47cfaaSmrg# flat and you're not using automake, define top_builddir and top_srcdir
2611ab47cfaaSmrg# appropriately in the Makefiles.
2612ab47cfaaSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2613ab47cfaaSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2614ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2615ab47cfaaSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
2616ab47cfaaSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2617ab47cfaaSmrg  [if test x"$enable_ltdl_install" = xno; then
2618ab47cfaaSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
2619ab47cfaaSmrg   else
2620ab47cfaaSmrg     enable_ltdl_install=yes
2621ab47cfaaSmrg   fi
2622ab47cfaaSmrg  ])
2623ab47cfaaSmrg  if test x"$enable_ltdl_install" = x"yes"; then
2624ab47cfaaSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2625ab47cfaaSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2626ab47cfaaSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2627ab47cfaaSmrg  else
2628ab47cfaaSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2629ab47cfaaSmrg    LIBLTDL="-lltdl"
2630ab47cfaaSmrg    LTDLINCL=
2631ab47cfaaSmrg  fi
2632ab47cfaaSmrg  # For backwards non-gettext consistent compatibility...
2633ab47cfaaSmrg  INCLTDL="$LTDLINCL"
2634ab47cfaaSmrg])# AC_LIBLTDL_INSTALLABLE
2635ab47cfaaSmrg
2636ab47cfaaSmrg
2637ab47cfaaSmrg# AC_LIBTOOL_CXX
2638ab47cfaaSmrg# --------------
2639ab47cfaaSmrg# enable support for C++ libraries
2640ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_CXX],
2641ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
2642ab47cfaaSmrg])# AC_LIBTOOL_CXX
2643ab47cfaaSmrg
2644ab47cfaaSmrg
2645ab47cfaaSmrg# _LT_AC_LANG_CXX
2646ab47cfaaSmrg# ---------------
2647ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_CXX],
2648ab47cfaaSmrg[AC_REQUIRE([AC_PROG_CXX])
2649ab47cfaaSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2650ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2651ab47cfaaSmrg])# _LT_AC_LANG_CXX
2652ab47cfaaSmrg
2653ab47cfaaSmrg# _LT_AC_PROG_CXXCPP
2654ab47cfaaSmrg# ------------------
2655ab47cfaaSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
2656ab47cfaaSmrg[
2657ab47cfaaSmrgAC_REQUIRE([AC_PROG_CXX])
2658ab47cfaaSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2659ab47cfaaSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2660ab47cfaaSmrg    (test "X$CXX" != "Xg++"))) ; then
2661ab47cfaaSmrg  AC_PROG_CXXCPP
2662ab47cfaaSmrgfi
2663ab47cfaaSmrg])# _LT_AC_PROG_CXXCPP
2664ab47cfaaSmrg
2665ab47cfaaSmrg# AC_LIBTOOL_F77
2666ab47cfaaSmrg# --------------
2667ab47cfaaSmrg# enable support for Fortran 77 libraries
2668ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_F77],
2669ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
2670ab47cfaaSmrg])# AC_LIBTOOL_F77
2671ab47cfaaSmrg
2672ab47cfaaSmrg
2673ab47cfaaSmrg# _LT_AC_LANG_F77
2674ab47cfaaSmrg# ---------------
2675ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_F77],
2676ab47cfaaSmrg[AC_REQUIRE([AC_PROG_F77])
2677ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2678ab47cfaaSmrg])# _LT_AC_LANG_F77
2679ab47cfaaSmrg
2680ab47cfaaSmrg
2681ab47cfaaSmrg# AC_LIBTOOL_GCJ
2682ab47cfaaSmrg# --------------
2683ab47cfaaSmrg# enable support for GCJ libraries
2684ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
2685ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
2686ab47cfaaSmrg])# AC_LIBTOOL_GCJ
2687ab47cfaaSmrg
2688ab47cfaaSmrg
2689ab47cfaaSmrg# _LT_AC_LANG_GCJ
2690ab47cfaaSmrg# ---------------
2691ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
2692ab47cfaaSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2693ab47cfaaSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2694ab47cfaaSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2695ab47cfaaSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2696ab47cfaaSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2697ab47cfaaSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2698ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2699ab47cfaaSmrg])# _LT_AC_LANG_GCJ
2700ab47cfaaSmrg
2701ab47cfaaSmrg
2702ab47cfaaSmrg# AC_LIBTOOL_RC
2703ab47cfaaSmrg# -------------
2704ab47cfaaSmrg# enable support for Windows resource files
2705ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_RC],
2706ab47cfaaSmrg[AC_REQUIRE([LT_AC_PROG_RC])
2707ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2708ab47cfaaSmrg])# AC_LIBTOOL_RC
2709ab47cfaaSmrg
2710ab47cfaaSmrg
2711ab47cfaaSmrg# AC_LIBTOOL_LANG_C_CONFIG
2712ab47cfaaSmrg# ------------------------
2713ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
2714ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
2715ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2716ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2717ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2718ab47cfaaSmrg[lt_save_CC="$CC"
2719ab47cfaaSmrgAC_LANG_PUSH(C)
2720ab47cfaaSmrg
2721ab47cfaaSmrg# Source file extension for C test sources.
2722ab47cfaaSmrgac_ext=c
2723ab47cfaaSmrg
2724ab47cfaaSmrg# Object file extension for compiled C test sources.
2725ab47cfaaSmrgobjext=o
2726ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2727ab47cfaaSmrg
2728ab47cfaaSmrg# Code to be used in simple compile tests
27298697ee19Smrglt_simple_compile_test_code="int some_variable = 0;"
2730ab47cfaaSmrg
2731ab47cfaaSmrg# Code to be used in simple link tests
27328697ee19Smrglt_simple_link_test_code='int main(){return(0);}'
2733ab47cfaaSmrg
2734ab47cfaaSmrg_LT_AC_SYS_COMPILER
2735ab47cfaaSmrg
2736ab47cfaaSmrg# save warnings/boilerplate of simple test code
2737ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
2738ab47cfaaSmrg_LT_LINKER_BOILERPLATE
2739ab47cfaaSmrg
2740ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2741ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
2742ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
2743ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2744ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
2745ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2746ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2747ab47cfaaSmrgAC_LIBTOOL_SYS_LIB_STRIP
2748ab47cfaaSmrgAC_LIBTOOL_DLOPEN_SELF
2749ab47cfaaSmrg
2750ab47cfaaSmrg# Report which library types will actually be built
2751ab47cfaaSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
2752ab47cfaaSmrgAC_MSG_RESULT([$can_build_shared])
2753ab47cfaaSmrg
2754ab47cfaaSmrgAC_MSG_CHECKING([whether to build shared libraries])
2755ab47cfaaSmrgtest "$can_build_shared" = "no" && enable_shared=no
2756ab47cfaaSmrg
2757ab47cfaaSmrg# On AIX, shared libraries and static libraries use the same namespace, and
2758ab47cfaaSmrg# are all built from PIC.
2759ab47cfaaSmrgcase $host_os in
2760ab47cfaaSmrgaix3*)
2761ab47cfaaSmrg  test "$enable_shared" = yes && enable_static=no
2762ab47cfaaSmrg  if test -n "$RANLIB"; then
2763ab47cfaaSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2764ab47cfaaSmrg    postinstall_cmds='$RANLIB $lib'
2765ab47cfaaSmrg  fi
2766ab47cfaaSmrg  ;;
2767ab47cfaaSmrg
2768ab47cfaaSmrgaix4* | aix5*)
2769ab47cfaaSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2770ab47cfaaSmrg    test "$enable_shared" = yes && enable_static=no
2771ab47cfaaSmrg  fi
2772ab47cfaaSmrg    ;;
2773ab47cfaaSmrgesac
2774ab47cfaaSmrgAC_MSG_RESULT([$enable_shared])
2775ab47cfaaSmrg
2776ab47cfaaSmrgAC_MSG_CHECKING([whether to build static libraries])
2777ab47cfaaSmrg# Make sure either enable_shared or enable_static is yes.
2778ab47cfaaSmrgtest "$enable_shared" = yes || enable_static=yes
2779ab47cfaaSmrgAC_MSG_RESULT([$enable_static])
2780ab47cfaaSmrg
2781ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
2782ab47cfaaSmrg
2783ab47cfaaSmrgAC_LANG_POP
2784ab47cfaaSmrgCC="$lt_save_CC"
2785ab47cfaaSmrg])# AC_LIBTOOL_LANG_C_CONFIG
2786ab47cfaaSmrg
2787ab47cfaaSmrg
2788ab47cfaaSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
2789ab47cfaaSmrg# --------------------------
2790ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
2791ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
2792ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2793ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2794ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2795ab47cfaaSmrg[AC_LANG_PUSH(C++)
2796ab47cfaaSmrgAC_REQUIRE([AC_PROG_CXX])
2797ab47cfaaSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2798ab47cfaaSmrg
2799ab47cfaaSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2800ab47cfaaSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2801ab47cfaaSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
2802ab47cfaaSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2803ab47cfaaSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2804ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
2805ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2806ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2807ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2808ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2809ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2810ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2811ab47cfaaSmrg_LT_AC_TAGVAR(module_cmds, $1)=
2812ab47cfaaSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2813ab47cfaaSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2814ab47cfaaSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2815ab47cfaaSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
2816ab47cfaaSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2817ab47cfaaSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2818ab47cfaaSmrg
2819ab47cfaaSmrg# Dependencies to place before and after the object being linked:
2820ab47cfaaSmrg_LT_AC_TAGVAR(predep_objects, $1)=
2821ab47cfaaSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
2822ab47cfaaSmrg_LT_AC_TAGVAR(predeps, $1)=
2823ab47cfaaSmrg_LT_AC_TAGVAR(postdeps, $1)=
2824ab47cfaaSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2825ab47cfaaSmrg
2826ab47cfaaSmrg# Source file extension for C++ test sources.
2827ab47cfaaSmrgac_ext=cpp
2828ab47cfaaSmrg
2829ab47cfaaSmrg# Object file extension for compiled C++ test sources.
2830ab47cfaaSmrgobjext=o
2831ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2832ab47cfaaSmrg
2833ab47cfaaSmrg# Code to be used in simple compile tests
28348697ee19Smrglt_simple_compile_test_code="int some_variable = 0;"
2835ab47cfaaSmrg
2836ab47cfaaSmrg# Code to be used in simple link tests
28378697ee19Smrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2838ab47cfaaSmrg
2839ab47cfaaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2840ab47cfaaSmrg_LT_AC_SYS_COMPILER
2841ab47cfaaSmrg
2842ab47cfaaSmrg# save warnings/boilerplate of simple test code
2843ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
2844ab47cfaaSmrg_LT_LINKER_BOILERPLATE
2845ab47cfaaSmrg
2846ab47cfaaSmrg# Allow CC to be a program name with arguments.
2847ab47cfaaSmrglt_save_CC=$CC
2848ab47cfaaSmrglt_save_LD=$LD
2849ab47cfaaSmrglt_save_GCC=$GCC
2850ab47cfaaSmrgGCC=$GXX
2851ab47cfaaSmrglt_save_with_gnu_ld=$with_gnu_ld
2852ab47cfaaSmrglt_save_path_LD=$lt_cv_path_LD
2853ab47cfaaSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2854ab47cfaaSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2855ab47cfaaSmrgelse
2856ab47cfaaSmrg  $as_unset lt_cv_prog_gnu_ld
2857ab47cfaaSmrgfi
2858ab47cfaaSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
2859ab47cfaaSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
2860ab47cfaaSmrgelse
2861ab47cfaaSmrg  $as_unset lt_cv_path_LD
2862ab47cfaaSmrgfi
2863ab47cfaaSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
2864ab47cfaaSmrgCC=${CXX-"c++"}
2865ab47cfaaSmrgcompiler=$CC
2866ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
2867ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
2868ab47cfaaSmrg
2869ab47cfaaSmrg# We don't want -fno-exception wen compiling C++ code, so set the
2870ab47cfaaSmrg# no_builtin_flag separately
2871ab47cfaaSmrgif test "$GXX" = yes; then
2872ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2873ab47cfaaSmrgelse
2874ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2875ab47cfaaSmrgfi
2876ab47cfaaSmrg
2877ab47cfaaSmrgif test "$GXX" = yes; then
2878ab47cfaaSmrg  # Set up default GNU C++ configuration
2879ab47cfaaSmrg
2880ab47cfaaSmrg  AC_PROG_LD
2881ab47cfaaSmrg
2882ab47cfaaSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2883ab47cfaaSmrg  # archiving commands below assume that GNU ld is being used.
2884ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
2885ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2886ab47cfaaSmrg    _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'
2887ab47cfaaSmrg
2888ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2889ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2890ab47cfaaSmrg
2891ab47cfaaSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
2892ab47cfaaSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2893ab47cfaaSmrg    #     investigate it a little bit more. (MM)
2894ab47cfaaSmrg    wlarc='${wl}'
2895ab47cfaaSmrg
2896ab47cfaaSmrg    # ancient GNU ld didn't support --whole-archive et. al.
2897ab47cfaaSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2898ab47cfaaSmrg	grep 'no-whole-archive' > /dev/null; then
2899ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2900ab47cfaaSmrg    else
2901ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2902ab47cfaaSmrg    fi
2903ab47cfaaSmrg  else
2904ab47cfaaSmrg    with_gnu_ld=no
2905ab47cfaaSmrg    wlarc=
2906ab47cfaaSmrg
2907ab47cfaaSmrg    # A generic and very simple default shared library creation
2908ab47cfaaSmrg    # command for GNU C++ for the case where it uses the native
2909ab47cfaaSmrg    # linker, instead of GNU ld.  If possible, this setting should
2910ab47cfaaSmrg    # overridden to take advantage of the native linker features on
2911ab47cfaaSmrg    # the platform it is being used on.
2912ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2913ab47cfaaSmrg  fi
2914ab47cfaaSmrg
2915ab47cfaaSmrg  # Commands to make compiler produce verbose output that lists
2916ab47cfaaSmrg  # what "hidden" libraries, object files and flags are used when
2917ab47cfaaSmrg  # linking a shared library.
2918ab47cfaaSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2919ab47cfaaSmrg
2920ab47cfaaSmrgelse
2921ab47cfaaSmrg  GXX=no
2922ab47cfaaSmrg  with_gnu_ld=no
2923ab47cfaaSmrg  wlarc=
2924ab47cfaaSmrgfi
2925ab47cfaaSmrg
2926ab47cfaaSmrg# PORTME: fill in a description of your system's C++ link characteristics
2927ab47cfaaSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2928ab47cfaaSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2929ab47cfaaSmrgcase $host_os in
2930ab47cfaaSmrg  aix3*)
2931ab47cfaaSmrg    # FIXME: insert proper C++ library support
2932ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2933ab47cfaaSmrg    ;;
2934ab47cfaaSmrg  aix4* | aix5*)
2935ab47cfaaSmrg    if test "$host_cpu" = ia64; then
2936ab47cfaaSmrg      # On IA64, the linker does run time linking by default, so we don't
2937ab47cfaaSmrg      # have to do anything special.
2938ab47cfaaSmrg      aix_use_runtimelinking=no
2939ab47cfaaSmrg      exp_sym_flag='-Bexport'
2940ab47cfaaSmrg      no_entry_flag=""
2941ab47cfaaSmrg    else
2942ab47cfaaSmrg      aix_use_runtimelinking=no
2943ab47cfaaSmrg
2944ab47cfaaSmrg      # Test if we are trying to use run time linking or normal
2945ab47cfaaSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2946ab47cfaaSmrg      # need to do runtime linking.
2947ab47cfaaSmrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2948ab47cfaaSmrg	for ld_flag in $LDFLAGS; do
2949ab47cfaaSmrg	  case $ld_flag in
2950ab47cfaaSmrg	  *-brtl*)
2951ab47cfaaSmrg	    aix_use_runtimelinking=yes
2952ab47cfaaSmrg	    break
2953ab47cfaaSmrg	    ;;
2954ab47cfaaSmrg	  esac
2955ab47cfaaSmrg	done
2956ab47cfaaSmrg	;;
2957ab47cfaaSmrg      esac
2958ab47cfaaSmrg
2959ab47cfaaSmrg      exp_sym_flag='-bexport'
2960ab47cfaaSmrg      no_entry_flag='-bnoentry'
2961ab47cfaaSmrg    fi
2962ab47cfaaSmrg
2963ab47cfaaSmrg    # When large executables or shared objects are built, AIX ld can
2964ab47cfaaSmrg    # have problems creating the table of contents.  If linking a library
2965ab47cfaaSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
2966ab47cfaaSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2967ab47cfaaSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2968ab47cfaaSmrg
2969ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
2970ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2971ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2972ab47cfaaSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2973ab47cfaaSmrg
2974ab47cfaaSmrg    if test "$GXX" = yes; then
2975ab47cfaaSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2976ab47cfaaSmrg      # We only want to do this on AIX 4.2 and lower, the check
2977ab47cfaaSmrg      # below for broken collect2 doesn't work under 4.3+
2978ab47cfaaSmrg	collect2name=`${CC} -print-prog-name=collect2`
2979ab47cfaaSmrg	if test -f "$collect2name" && \
2980ab47cfaaSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2981ab47cfaaSmrg	then
2982ab47cfaaSmrg	  # We have reworked collect2
29838697ee19Smrg	  :
2984ab47cfaaSmrg	else
2985ab47cfaaSmrg	  # We have old collect2
2986ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2987ab47cfaaSmrg	  # It fails to find uninstalled libraries when the uninstalled
2988ab47cfaaSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
2989ab47cfaaSmrg	  # to unsupported forces relinking
2990ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2991ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2992ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2993ab47cfaaSmrg	fi
2994ab47cfaaSmrg	;;
2995ab47cfaaSmrg      esac
2996ab47cfaaSmrg      shared_flag='-shared'
2997ab47cfaaSmrg      if test "$aix_use_runtimelinking" = yes; then
2998ab47cfaaSmrg	shared_flag="$shared_flag "'${wl}-G'
2999ab47cfaaSmrg      fi
3000ab47cfaaSmrg    else
3001ab47cfaaSmrg      # not using gcc
3002ab47cfaaSmrg      if test "$host_cpu" = ia64; then
3003ab47cfaaSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3004ab47cfaaSmrg	# chokes on -Wl,-G. The following line is correct:
3005ab47cfaaSmrg	shared_flag='-G'
3006ab47cfaaSmrg      else
3007ab47cfaaSmrg	if test "$aix_use_runtimelinking" = yes; then
3008ab47cfaaSmrg	  shared_flag='${wl}-G'
3009ab47cfaaSmrg	else
3010ab47cfaaSmrg	  shared_flag='${wl}-bM:SRE'
3011ab47cfaaSmrg	fi
3012ab47cfaaSmrg      fi
3013ab47cfaaSmrg    fi
3014ab47cfaaSmrg
3015ab47cfaaSmrg    # It seems that -bexpall does not export symbols beginning with
3016ab47cfaaSmrg    # underscore (_), so it is better to generate a list of symbols to export.
3017ab47cfaaSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3018ab47cfaaSmrg    if test "$aix_use_runtimelinking" = yes; then
3019ab47cfaaSmrg      # Warning - without using the other runtime loading flags (-brtl),
3020ab47cfaaSmrg      # -berok will link without error, but may produce a broken library.
3021ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3022ab47cfaaSmrg      # Determine the default libpath from the value encoded in an empty executable.
3023ab47cfaaSmrg      _LT_AC_SYS_LIBPATH_AIX
3024ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3025ab47cfaaSmrg
3026ab47cfaaSmrg      _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"
3027ab47cfaaSmrg     else
3028ab47cfaaSmrg      if test "$host_cpu" = ia64; then
3029ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3030ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3031ab47cfaaSmrg	_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"
3032ab47cfaaSmrg      else
3033ab47cfaaSmrg	# Determine the default libpath from the value encoded in an empty executable.
3034ab47cfaaSmrg	_LT_AC_SYS_LIBPATH_AIX
3035ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3036ab47cfaaSmrg	# Warning - without using the other run time loading flags,
3037ab47cfaaSmrg	# -berok will link without error, but may produce a broken library.
3038ab47cfaaSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3039ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3040ab47cfaaSmrg	# Exported symbols can be pulled into shared objects from archives
3041ab47cfaaSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3042ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3043ab47cfaaSmrg	# This is similar to how AIX traditionally builds its shared libraries.
3044ab47cfaaSmrg	_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'
3045ab47cfaaSmrg      fi
3046ab47cfaaSmrg    fi
3047ab47cfaaSmrg    ;;
3048ab47cfaaSmrg
3049ab47cfaaSmrg  beos*)
3050ab47cfaaSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3051ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3052ab47cfaaSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3053ab47cfaaSmrg      # support --undefined.  This deserves some investigation.  FIXME
3054ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3055ab47cfaaSmrg    else
3056ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3057ab47cfaaSmrg    fi
3058ab47cfaaSmrg    ;;
3059ab47cfaaSmrg
3060ab47cfaaSmrg  chorus*)
3061ab47cfaaSmrg    case $cc_basename in
3062ab47cfaaSmrg      *)
3063ab47cfaaSmrg	# FIXME: insert proper C++ library support
3064ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3065ab47cfaaSmrg	;;
3066ab47cfaaSmrg    esac
3067ab47cfaaSmrg    ;;
3068ab47cfaaSmrg
3069ab47cfaaSmrg  cygwin* | mingw* | pw32*)
3070ab47cfaaSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3071ab47cfaaSmrg    # as there is no search path for DLLs.
3072ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3073ab47cfaaSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3074ab47cfaaSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3075ab47cfaaSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3076ab47cfaaSmrg
3077ab47cfaaSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3078ab47cfaaSmrg      _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'
3079ab47cfaaSmrg      # If the export-symbols file already is a .def file (1st line
3080ab47cfaaSmrg      # is EXPORTS), use it as is; otherwise, prepend...
3081ab47cfaaSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3082ab47cfaaSmrg	cp $export_symbols $output_objdir/$soname.def;
3083ab47cfaaSmrg      else
3084ab47cfaaSmrg	echo EXPORTS > $output_objdir/$soname.def;
3085ab47cfaaSmrg	cat $export_symbols >> $output_objdir/$soname.def;
3086ab47cfaaSmrg      fi~
3087ab47cfaaSmrg      $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'
3088ab47cfaaSmrg    else
3089ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3090ab47cfaaSmrg    fi
3091ab47cfaaSmrg  ;;
3092ab47cfaaSmrg      darwin* | rhapsody*)
3093ab47cfaaSmrg        case $host_os in
3094ab47cfaaSmrg        rhapsody* | darwin1.[[012]])
3095ab47cfaaSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3096ab47cfaaSmrg         ;;
3097ab47cfaaSmrg       *) # Darwin 1.3 on
3098ab47cfaaSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3099ab47cfaaSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3100ab47cfaaSmrg         else
3101ab47cfaaSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
3102ab47cfaaSmrg             10.[[012]])
3103ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3104ab47cfaaSmrg               ;;
3105ab47cfaaSmrg             10.*)
3106ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3107ab47cfaaSmrg               ;;
3108ab47cfaaSmrg           esac
3109ab47cfaaSmrg         fi
3110ab47cfaaSmrg         ;;
3111ab47cfaaSmrg        esac
3112ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3113ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3114ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3115ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3116ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3117ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3118ab47cfaaSmrg
3119ab47cfaaSmrg    if test "$GXX" = yes ; then
3120ab47cfaaSmrg      lt_int_apple_cc_single_mod=no
3121ab47cfaaSmrg      output_verbose_link_cmd='echo'
3122ab47cfaaSmrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3123ab47cfaaSmrg       lt_int_apple_cc_single_mod=yes
3124ab47cfaaSmrg      fi
3125ab47cfaaSmrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3126ab47cfaaSmrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3127ab47cfaaSmrg      else
3128ab47cfaaSmrg          _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'
3129ab47cfaaSmrg        fi
3130ab47cfaaSmrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3131ab47cfaaSmrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3132ab47cfaaSmrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3133ab47cfaaSmrg            _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}'
3134ab47cfaaSmrg          else
3135ab47cfaaSmrg            _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}'
3136ab47cfaaSmrg          fi
3137ab47cfaaSmrg            _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}'
3138ab47cfaaSmrg      else
3139ab47cfaaSmrg      case $cc_basename in
3140ab47cfaaSmrg        xlc*)
3141ab47cfaaSmrg         output_verbose_link_cmd='echo'
31428697ee19Smrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3143ab47cfaaSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3144ab47cfaaSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
31458697ee19Smrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3146ab47cfaaSmrg          _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}'
3147ab47cfaaSmrg          ;;
3148ab47cfaaSmrg       *)
3149ab47cfaaSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3150ab47cfaaSmrg          ;;
3151ab47cfaaSmrg      esac
3152ab47cfaaSmrg      fi
3153ab47cfaaSmrg        ;;
3154ab47cfaaSmrg
3155ab47cfaaSmrg  dgux*)
3156ab47cfaaSmrg    case $cc_basename in
3157ab47cfaaSmrg      ec++*)
3158ab47cfaaSmrg	# FIXME: insert proper C++ library support
3159ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3160ab47cfaaSmrg	;;
3161ab47cfaaSmrg      ghcx*)
3162ab47cfaaSmrg	# Green Hills C++ Compiler
3163ab47cfaaSmrg	# FIXME: insert proper C++ library support
3164ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3165ab47cfaaSmrg	;;
3166ab47cfaaSmrg      *)
3167ab47cfaaSmrg	# FIXME: insert proper C++ library support
3168ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3169ab47cfaaSmrg	;;
3170ab47cfaaSmrg    esac
3171ab47cfaaSmrg    ;;
3172ab47cfaaSmrg  freebsd[[12]]*)
3173ab47cfaaSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
3174ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3175ab47cfaaSmrg    ;;
3176ab47cfaaSmrg  freebsd-elf*)
3177ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3178ab47cfaaSmrg    ;;
3179ab47cfaaSmrg  freebsd* | dragonfly*)
3180ab47cfaaSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3181ab47cfaaSmrg    # conventions
3182ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3183ab47cfaaSmrg    ;;
3184ab47cfaaSmrg  gnu*)
3185ab47cfaaSmrg    ;;
3186ab47cfaaSmrg  hpux9*)
3187ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3188ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3189ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3190ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3191ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3192ab47cfaaSmrg				# but as the default
3193ab47cfaaSmrg				# location of the library.
3194ab47cfaaSmrg
3195ab47cfaaSmrg    case $cc_basename in
3196ab47cfaaSmrg    CC*)
3197ab47cfaaSmrg      # FIXME: insert proper C++ library support
3198ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3199ab47cfaaSmrg      ;;
3200ab47cfaaSmrg    aCC*)
3201ab47cfaaSmrg      _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'
3202ab47cfaaSmrg      # Commands to make compiler produce verbose output that lists
3203ab47cfaaSmrg      # what "hidden" libraries, object files and flags are used when
3204ab47cfaaSmrg      # linking a shared library.
3205ab47cfaaSmrg      #
3206ab47cfaaSmrg      # There doesn't appear to be a way to prevent this compiler from
3207ab47cfaaSmrg      # explicitly linking system object files so we need to strip them
3208ab47cfaaSmrg      # from the output so that they don't get included in the library
3209ab47cfaaSmrg      # dependencies.
3210ab47cfaaSmrg      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'
3211ab47cfaaSmrg      ;;
3212ab47cfaaSmrg    *)
3213ab47cfaaSmrg      if test "$GXX" = yes; then
3214ab47cfaaSmrg        _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'
3215ab47cfaaSmrg      else
3216ab47cfaaSmrg        # FIXME: insert proper C++ library support
3217ab47cfaaSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3218ab47cfaaSmrg      fi
3219ab47cfaaSmrg      ;;
3220ab47cfaaSmrg    esac
3221ab47cfaaSmrg    ;;
3222ab47cfaaSmrg  hpux10*|hpux11*)
3223ab47cfaaSmrg    if test $with_gnu_ld = no; then
3224ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3225ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3226ab47cfaaSmrg
3227ab47cfaaSmrg      case $host_cpu in
32288697ee19Smrg      hppa*64*|ia64*) ;;
3229ab47cfaaSmrg      *)
3230ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3231ab47cfaaSmrg        ;;
3232ab47cfaaSmrg      esac
3233ab47cfaaSmrg    fi
3234ab47cfaaSmrg    case $host_cpu in
3235ab47cfaaSmrg    hppa*64*|ia64*)
3236ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3237ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3238ab47cfaaSmrg      ;;
3239ab47cfaaSmrg    *)
3240ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3241ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3242ab47cfaaSmrg					      # but as the default
3243ab47cfaaSmrg					      # location of the library.
3244ab47cfaaSmrg      ;;
3245ab47cfaaSmrg    esac
3246ab47cfaaSmrg
3247ab47cfaaSmrg    case $cc_basename in
3248ab47cfaaSmrg      CC*)
3249ab47cfaaSmrg	# FIXME: insert proper C++ library support
3250ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3251ab47cfaaSmrg	;;
3252ab47cfaaSmrg      aCC*)
3253ab47cfaaSmrg	case $host_cpu in
3254ab47cfaaSmrg	hppa*64*)
3255ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3256ab47cfaaSmrg	  ;;
3257ab47cfaaSmrg	ia64*)
3258ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3259ab47cfaaSmrg	  ;;
3260ab47cfaaSmrg	*)
3261ab47cfaaSmrg	  _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'
3262ab47cfaaSmrg	  ;;
3263ab47cfaaSmrg	esac
3264ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3265ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3266ab47cfaaSmrg	# linking a shared library.
3267ab47cfaaSmrg	#
3268ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3269ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3270ab47cfaaSmrg	# from the output so that they don't get included in the library
3271ab47cfaaSmrg	# dependencies.
3272ab47cfaaSmrg	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'
3273ab47cfaaSmrg	;;
3274ab47cfaaSmrg      *)
3275ab47cfaaSmrg	if test "$GXX" = yes; then
3276ab47cfaaSmrg	  if test $with_gnu_ld = no; then
3277ab47cfaaSmrg	    case $host_cpu in
3278ab47cfaaSmrg	    hppa*64*)
3279ab47cfaaSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3280ab47cfaaSmrg	      ;;
3281ab47cfaaSmrg	    ia64*)
3282ab47cfaaSmrg	      _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'
3283ab47cfaaSmrg	      ;;
3284ab47cfaaSmrg	    *)
3285ab47cfaaSmrg	      _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'
3286ab47cfaaSmrg	      ;;
3287ab47cfaaSmrg	    esac
3288ab47cfaaSmrg	  fi
3289ab47cfaaSmrg	else
3290ab47cfaaSmrg	  # FIXME: insert proper C++ library support
3291ab47cfaaSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3292ab47cfaaSmrg	fi
3293ab47cfaaSmrg	;;
3294ab47cfaaSmrg    esac
3295ab47cfaaSmrg    ;;
32968697ee19Smrg  interix[[3-9]]*)
3297ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3298ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3299ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3300ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3301ab47cfaaSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3302ab47cfaaSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
3303ab47cfaaSmrg    # default) and relocated if they conflict, which is a slow very memory
3304ab47cfaaSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
3305ab47cfaaSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3306ab47cfaaSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3307ab47cfaaSmrg    _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'
3308ab47cfaaSmrg    _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'
3309ab47cfaaSmrg    ;;
3310ab47cfaaSmrg  irix5* | irix6*)
3311ab47cfaaSmrg    case $cc_basename in
3312ab47cfaaSmrg      CC*)
3313ab47cfaaSmrg	# SGI C++
3314ab47cfaaSmrg	_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'
3315ab47cfaaSmrg
3316ab47cfaaSmrg	# Archives containing C++ object files must be created using
3317ab47cfaaSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3318ab47cfaaSmrg	# necessary to make sure instantiated templates are included
3319ab47cfaaSmrg	# in the archive.
3320ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3321ab47cfaaSmrg	;;
3322ab47cfaaSmrg      *)
3323ab47cfaaSmrg	if test "$GXX" = yes; then
3324ab47cfaaSmrg	  if test "$with_gnu_ld" = no; then
3325ab47cfaaSmrg	    _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'
3326ab47cfaaSmrg	  else
3327ab47cfaaSmrg	    _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'
3328ab47cfaaSmrg	  fi
3329ab47cfaaSmrg	fi
3330ab47cfaaSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3331ab47cfaaSmrg	;;
3332ab47cfaaSmrg    esac
3333ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3334ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3335ab47cfaaSmrg    ;;
3336ab47cfaaSmrg  linux* | k*bsd*-gnu)
3337ab47cfaaSmrg    case $cc_basename in
3338ab47cfaaSmrg      KCC*)
3339ab47cfaaSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3340ab47cfaaSmrg
3341ab47cfaaSmrg	# KCC will only create a shared library if the output file
3342ab47cfaaSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3343ab47cfaaSmrg	# to its proper name (with version) after linking.
3344ab47cfaaSmrg	_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'
3345ab47cfaaSmrg	_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'
3346ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3347ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3348ab47cfaaSmrg	# linking a shared library.
3349ab47cfaaSmrg	#
3350ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3351ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3352ab47cfaaSmrg	# from the output so that they don't get included in the library
3353ab47cfaaSmrg	# dependencies.
3354ab47cfaaSmrg	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'
3355ab47cfaaSmrg
3356ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3357ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3358ab47cfaaSmrg
3359ab47cfaaSmrg	# Archives containing C++ object files must be created using
3360ab47cfaaSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3361ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3362ab47cfaaSmrg	;;
3363ab47cfaaSmrg      icpc*)
3364ab47cfaaSmrg	# Intel C++
3365ab47cfaaSmrg	with_gnu_ld=yes
3366ab47cfaaSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
3367ab47cfaaSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
3368ab47cfaaSmrg	# earlier do not add the objects themselves.
3369ab47cfaaSmrg	case `$CC -V 2>&1` in
3370ab47cfaaSmrg	*"Version 7."*)
3371ab47cfaaSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3372ab47cfaaSmrg  	  _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'
3373ab47cfaaSmrg	  ;;
3374ab47cfaaSmrg	*)  # Version 8.0 or newer
3375ab47cfaaSmrg	  tmp_idyn=
3376ab47cfaaSmrg	  case $host_cpu in
3377ab47cfaaSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
3378ab47cfaaSmrg	  esac
3379ab47cfaaSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3380ab47cfaaSmrg	  _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'
3381ab47cfaaSmrg	  ;;
3382ab47cfaaSmrg	esac
3383ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3384ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3385ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3386ab47cfaaSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3387ab47cfaaSmrg	;;
3388ab47cfaaSmrg      pgCC*)
3389ab47cfaaSmrg        # Portland Group C++ compiler
3390ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3391ab47cfaaSmrg  	_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'
3392ab47cfaaSmrg
3393ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3394ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3395ab47cfaaSmrg	_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'
3396ab47cfaaSmrg        ;;
3397ab47cfaaSmrg      cxx*)
3398ab47cfaaSmrg	# Compaq C++
3399ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3400ab47cfaaSmrg	_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'
3401ab47cfaaSmrg
3402ab47cfaaSmrg	runpath_var=LD_RUN_PATH
3403ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3404ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3405ab47cfaaSmrg
3406ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3407ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3408ab47cfaaSmrg	# linking a shared library.
3409ab47cfaaSmrg	#
3410ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3411ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3412ab47cfaaSmrg	# from the output so that they don't get included in the library
3413ab47cfaaSmrg	# dependencies.
3414ab47cfaaSmrg	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'
3415ab47cfaaSmrg	;;
34168697ee19Smrg      *)
34178697ee19Smrg	case `$CC -V 2>&1 | sed 5q` in
34188697ee19Smrg	*Sun\ C*)
34198697ee19Smrg	  # Sun C++ 5.9
34208697ee19Smrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
34218697ee19Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
34228697ee19Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
34238697ee19Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
34248697ee19Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
34258697ee19Smrg
34268697ee19Smrg	  # Not sure whether something based on
34278697ee19Smrg	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
34288697ee19Smrg	  # would be better.
34298697ee19Smrg	  output_verbose_link_cmd='echo'
34308697ee19Smrg
34318697ee19Smrg	  # Archives containing C++ object files must be created using
34328697ee19Smrg	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
34338697ee19Smrg	  # necessary to make sure instantiated templates are included
34348697ee19Smrg	  # in the archive.
34358697ee19Smrg	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
34368697ee19Smrg	  ;;
34378697ee19Smrg	esac
34388697ee19Smrg	;;
3439ab47cfaaSmrg    esac
3440ab47cfaaSmrg    ;;
3441ab47cfaaSmrg  lynxos*)
3442ab47cfaaSmrg    # FIXME: insert proper C++ library support
3443ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3444ab47cfaaSmrg    ;;
3445ab47cfaaSmrg  m88k*)
3446ab47cfaaSmrg    # FIXME: insert proper C++ library support
3447ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3448ab47cfaaSmrg    ;;
3449ab47cfaaSmrg  mvs*)
3450ab47cfaaSmrg    case $cc_basename in
3451ab47cfaaSmrg      cxx*)
3452ab47cfaaSmrg	# FIXME: insert proper C++ library support
3453ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3454ab47cfaaSmrg	;;
3455ab47cfaaSmrg      *)
3456ab47cfaaSmrg	# FIXME: insert proper C++ library support
3457ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3458ab47cfaaSmrg	;;
3459ab47cfaaSmrg    esac
3460ab47cfaaSmrg    ;;
34618697ee19Smrg  netbsd*)
3462ab47cfaaSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3463ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3464ab47cfaaSmrg      wlarc=
3465ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3466ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3467ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3468ab47cfaaSmrg    fi
3469ab47cfaaSmrg    # Workaround some broken pre-1.5 toolchains
3470ab47cfaaSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3471ab47cfaaSmrg    ;;
3472ab47cfaaSmrg  openbsd2*)
3473ab47cfaaSmrg    # C++ shared libraries are fairly broken
3474ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3475ab47cfaaSmrg    ;;
3476ab47cfaaSmrg  openbsd*)
34778697ee19Smrg    if test -f /usr/libexec/ld.so; then
34788697ee19Smrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
34798697ee19Smrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
34808697ee19Smrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
34818697ee19Smrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
34828697ee19Smrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
34838697ee19Smrg	_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'
34848697ee19Smrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
34858697ee19Smrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
34868697ee19Smrg      fi
34878697ee19Smrg      output_verbose_link_cmd='echo'
34888697ee19Smrg    else
34898697ee19Smrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3490ab47cfaaSmrg    fi
3491ab47cfaaSmrg    ;;
3492ab47cfaaSmrg  osf3*)
3493ab47cfaaSmrg    case $cc_basename in
3494ab47cfaaSmrg      KCC*)
3495ab47cfaaSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3496ab47cfaaSmrg
3497ab47cfaaSmrg	# KCC will only create a shared library if the output file
3498ab47cfaaSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3499ab47cfaaSmrg	# to its proper name (with version) after linking.
3500ab47cfaaSmrg	_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'
3501ab47cfaaSmrg
3502ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3503ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3504ab47cfaaSmrg
3505ab47cfaaSmrg	# Archives containing C++ object files must be created using
3506ab47cfaaSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3507ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3508ab47cfaaSmrg
3509ab47cfaaSmrg	;;
3510ab47cfaaSmrg      RCC*)
3511ab47cfaaSmrg	# Rational C++ 2.4.1
3512ab47cfaaSmrg	# FIXME: insert proper C++ library support
3513ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3514ab47cfaaSmrg	;;
3515ab47cfaaSmrg      cxx*)
3516ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3517ab47cfaaSmrg	_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'
3518ab47cfaaSmrg
3519ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3520ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3521ab47cfaaSmrg
3522ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3523ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3524ab47cfaaSmrg	# linking a shared library.
3525ab47cfaaSmrg	#
3526ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3527ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3528ab47cfaaSmrg	# from the output so that they don't get included in the library
3529ab47cfaaSmrg	# dependencies.
3530ab47cfaaSmrg	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'
3531ab47cfaaSmrg	;;
3532ab47cfaaSmrg      *)
3533ab47cfaaSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3534ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3535ab47cfaaSmrg	  _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'
3536ab47cfaaSmrg
3537ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3538ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3539ab47cfaaSmrg
3540ab47cfaaSmrg	  # Commands to make compiler produce verbose output that lists
3541ab47cfaaSmrg	  # what "hidden" libraries, object files and flags are used when
3542ab47cfaaSmrg	  # linking a shared library.
3543ab47cfaaSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3544ab47cfaaSmrg
3545ab47cfaaSmrg	else
3546ab47cfaaSmrg	  # FIXME: insert proper C++ library support
3547ab47cfaaSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3548ab47cfaaSmrg	fi
3549ab47cfaaSmrg	;;
3550ab47cfaaSmrg    esac
3551ab47cfaaSmrg    ;;
3552ab47cfaaSmrg  osf4* | osf5*)
3553ab47cfaaSmrg    case $cc_basename in
3554ab47cfaaSmrg      KCC*)
3555ab47cfaaSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3556ab47cfaaSmrg
3557ab47cfaaSmrg	# KCC will only create a shared library if the output file
3558ab47cfaaSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3559ab47cfaaSmrg	# to its proper name (with version) after linking.
3560ab47cfaaSmrg	_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'
3561ab47cfaaSmrg
3562ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3563ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3564ab47cfaaSmrg
3565ab47cfaaSmrg	# Archives containing C++ object files must be created using
3566ab47cfaaSmrg	# the KAI C++ compiler.
3567ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3568ab47cfaaSmrg	;;
3569ab47cfaaSmrg      RCC*)
3570ab47cfaaSmrg	# Rational C++ 2.4.1
3571ab47cfaaSmrg	# FIXME: insert proper C++ library support
3572ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3573ab47cfaaSmrg	;;
3574ab47cfaaSmrg      cxx*)
3575ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3576ab47cfaaSmrg	_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'
3577ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3578ab47cfaaSmrg	  echo "-hidden">> $lib.exp~
3579ab47cfaaSmrg	  $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~
3580ab47cfaaSmrg	  $rm $lib.exp'
3581ab47cfaaSmrg
3582ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3583ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3584ab47cfaaSmrg
3585ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3586ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3587ab47cfaaSmrg	# linking a shared library.
3588ab47cfaaSmrg	#
3589ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3590ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3591ab47cfaaSmrg	# from the output so that they don't get included in the library
3592ab47cfaaSmrg	# dependencies.
3593ab47cfaaSmrg	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'
3594ab47cfaaSmrg	;;
3595ab47cfaaSmrg      *)
3596ab47cfaaSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3597ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3598ab47cfaaSmrg	 _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'
3599ab47cfaaSmrg
3600ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3601ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3602ab47cfaaSmrg
3603ab47cfaaSmrg	  # Commands to make compiler produce verbose output that lists
3604ab47cfaaSmrg	  # what "hidden" libraries, object files and flags are used when
3605ab47cfaaSmrg	  # linking a shared library.
3606ab47cfaaSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3607ab47cfaaSmrg
3608ab47cfaaSmrg	else
3609ab47cfaaSmrg	  # FIXME: insert proper C++ library support
3610ab47cfaaSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3611ab47cfaaSmrg	fi
3612ab47cfaaSmrg	;;
3613ab47cfaaSmrg    esac
3614ab47cfaaSmrg    ;;
3615ab47cfaaSmrg  psos*)
3616ab47cfaaSmrg    # FIXME: insert proper C++ library support
3617ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3618ab47cfaaSmrg    ;;
3619ab47cfaaSmrg  sunos4*)
3620ab47cfaaSmrg    case $cc_basename in
3621ab47cfaaSmrg      CC*)
3622ab47cfaaSmrg	# Sun C++ 4.x
3623ab47cfaaSmrg	# FIXME: insert proper C++ library support
3624ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3625ab47cfaaSmrg	;;
3626ab47cfaaSmrg      lcc*)
3627ab47cfaaSmrg	# Lucid
3628ab47cfaaSmrg	# FIXME: insert proper C++ library support
3629ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3630ab47cfaaSmrg	;;
3631ab47cfaaSmrg      *)
3632ab47cfaaSmrg	# FIXME: insert proper C++ library support
3633ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3634ab47cfaaSmrg	;;
3635ab47cfaaSmrg    esac
3636ab47cfaaSmrg    ;;
3637ab47cfaaSmrg  solaris*)
3638ab47cfaaSmrg    case $cc_basename in
3639ab47cfaaSmrg      CC*)
3640ab47cfaaSmrg	# Sun C++ 4.2, 5.x and Centerline C++
3641ab47cfaaSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3642ab47cfaaSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3643ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3644ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3645ab47cfaaSmrg	$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'
3646ab47cfaaSmrg
3647ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3648ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3649ab47cfaaSmrg	case $host_os in
3650ab47cfaaSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3651ab47cfaaSmrg	  *)
36528697ee19Smrg	    # The compiler driver will combine and reorder linker options,
36538697ee19Smrg	    # but understands `-z linker_flag'.
3654ab47cfaaSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
36558697ee19Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3656ab47cfaaSmrg	    ;;
3657ab47cfaaSmrg	esac
3658ab47cfaaSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3659ab47cfaaSmrg
3660ab47cfaaSmrg	output_verbose_link_cmd='echo'
3661ab47cfaaSmrg
3662ab47cfaaSmrg	# Archives containing C++ object files must be created using
3663ab47cfaaSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3664ab47cfaaSmrg	# necessary to make sure instantiated templates are included
3665ab47cfaaSmrg	# in the archive.
3666ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3667ab47cfaaSmrg	;;
3668ab47cfaaSmrg      gcx*)
3669ab47cfaaSmrg	# Green Hills C++ Compiler
3670ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3671ab47cfaaSmrg
3672ab47cfaaSmrg	# The C++ compiler must be used to create the archive.
3673ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3674ab47cfaaSmrg	;;
3675ab47cfaaSmrg      *)
3676ab47cfaaSmrg	# GNU C++ compiler with Solaris linker
3677ab47cfaaSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3678ab47cfaaSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3679ab47cfaaSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3680ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3681ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3682ab47cfaaSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3683ab47cfaaSmrg
3684ab47cfaaSmrg	    # Commands to make compiler produce verbose output that lists
3685ab47cfaaSmrg	    # what "hidden" libraries, object files and flags are used when
3686ab47cfaaSmrg	    # linking a shared library.
3687ab47cfaaSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3688ab47cfaaSmrg	  else
3689ab47cfaaSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3690ab47cfaaSmrg	    # platform.
3691ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3692ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3693ab47cfaaSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3694ab47cfaaSmrg
3695ab47cfaaSmrg	    # Commands to make compiler produce verbose output that lists
3696ab47cfaaSmrg	    # what "hidden" libraries, object files and flags are used when
3697ab47cfaaSmrg	    # linking a shared library.
3698ab47cfaaSmrg	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3699ab47cfaaSmrg	  fi
3700ab47cfaaSmrg
3701ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
37028697ee19Smrg	  case $host_os in
37038697ee19Smrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
37048697ee19Smrg	  *)
37058697ee19Smrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
37068697ee19Smrg	    ;;
37078697ee19Smrg	  esac
3708ab47cfaaSmrg	fi
3709ab47cfaaSmrg	;;
3710ab47cfaaSmrg    esac
3711ab47cfaaSmrg    ;;
3712ab47cfaaSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3713ab47cfaaSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3714ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3715ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3716ab47cfaaSmrg    runpath_var='LD_RUN_PATH'
3717ab47cfaaSmrg
3718ab47cfaaSmrg    case $cc_basename in
3719ab47cfaaSmrg      CC*)
3720ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3721ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3722ab47cfaaSmrg	;;
3723ab47cfaaSmrg      *)
3724ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3725ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3726ab47cfaaSmrg	;;
3727ab47cfaaSmrg    esac
3728ab47cfaaSmrg    ;;
3729ab47cfaaSmrg  sysv5* | sco3.2v5* | sco5v6*)
3730ab47cfaaSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
3731ab47cfaaSmrg    # link with -lc, and that would cause any symbols used from libc to
3732ab47cfaaSmrg    # always be unresolved, which means just about no library would
3733ab47cfaaSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
3734ab47cfaaSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
3735ab47cfaaSmrg    # as -z defs.
3736ab47cfaaSmrg    # For security reasons, it is highly recommended that you always
3737ab47cfaaSmrg    # use absolute paths for naming shared libraries, and exclude the
3738ab47cfaaSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
3739ab47cfaaSmrg    # requires that you compile everything twice, which is a pain.
3740ab47cfaaSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
3741ab47cfaaSmrg    # non-empty value in the environment.  Most likely only useful for
3742ab47cfaaSmrg    # creating official distributions of packages.
3743ab47cfaaSmrg    # This is a hack until libtool officially supports absolute path
3744ab47cfaaSmrg    # names for shared libraries.
3745ab47cfaaSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3746ab47cfaaSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3747ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3748ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3749ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3750ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3751ab47cfaaSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3752ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3753ab47cfaaSmrg    runpath_var='LD_RUN_PATH'
3754ab47cfaaSmrg
3755ab47cfaaSmrg    case $cc_basename in
3756ab47cfaaSmrg      CC*)
3757ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3758ab47cfaaSmrg	_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'
3759ab47cfaaSmrg	;;
3760ab47cfaaSmrg      *)
3761ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3762ab47cfaaSmrg	_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'
3763ab47cfaaSmrg	;;
3764ab47cfaaSmrg    esac
3765ab47cfaaSmrg    ;;
3766ab47cfaaSmrg  tandem*)
3767ab47cfaaSmrg    case $cc_basename in
3768ab47cfaaSmrg      NCC*)
3769ab47cfaaSmrg	# NonStop-UX NCC 3.20
3770ab47cfaaSmrg	# FIXME: insert proper C++ library support
3771ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3772ab47cfaaSmrg	;;
3773ab47cfaaSmrg      *)
3774ab47cfaaSmrg	# FIXME: insert proper C++ library support
3775ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3776ab47cfaaSmrg	;;
3777ab47cfaaSmrg    esac
3778ab47cfaaSmrg    ;;
3779ab47cfaaSmrg  vxworks*)
3780ab47cfaaSmrg    # FIXME: insert proper C++ library support
3781ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3782ab47cfaaSmrg    ;;
3783ab47cfaaSmrg  *)
3784ab47cfaaSmrg    # FIXME: insert proper C++ library support
3785ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3786ab47cfaaSmrg    ;;
3787ab47cfaaSmrgesac
3788ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3789ab47cfaaSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3790ab47cfaaSmrg
3791ab47cfaaSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
3792ab47cfaaSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
3793ab47cfaaSmrg
3794ab47cfaaSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
3795ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3796ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
3797ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3798ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3799ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3800ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3801ab47cfaaSmrg
3802ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
3803ab47cfaaSmrg
3804ab47cfaaSmrgAC_LANG_POP
3805ab47cfaaSmrgCC=$lt_save_CC
3806ab47cfaaSmrgLDCXX=$LD
3807ab47cfaaSmrgLD=$lt_save_LD
3808ab47cfaaSmrgGCC=$lt_save_GCC
3809ab47cfaaSmrgwith_gnu_ldcxx=$with_gnu_ld
3810ab47cfaaSmrgwith_gnu_ld=$lt_save_with_gnu_ld
3811ab47cfaaSmrglt_cv_path_LDCXX=$lt_cv_path_LD
3812ab47cfaaSmrglt_cv_path_LD=$lt_save_path_LD
3813ab47cfaaSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3814ab47cfaaSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3815ab47cfaaSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
3816ab47cfaaSmrg
3817ab47cfaaSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3818ab47cfaaSmrg# ------------------------------------
3819ab47cfaaSmrg# Figure out "hidden" library dependencies from verbose
3820ab47cfaaSmrg# compiler output when linking a shared library.
3821ab47cfaaSmrg# Parse the compiler output and extract the necessary
3822ab47cfaaSmrg# objects, libraries and library flags.
3823ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3824ab47cfaaSmrgdnl we can't use the lt_simple_compile_test_code here,
3825ab47cfaaSmrgdnl because it contains code intended for an executable,
3826ab47cfaaSmrgdnl not a library.  It's possible we should let each
3827ab47cfaaSmrgdnl tag define a new lt_????_link_test_code variable,
3828ab47cfaaSmrgdnl but it's only used here...
3829ab47cfaaSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3830ab47cfaaSmrgint a;
3831ab47cfaaSmrgvoid foo (void) { a = 0; }
3832ab47cfaaSmrgEOF
3833ab47cfaaSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3834ab47cfaaSmrgclass Foo
3835ab47cfaaSmrg{
3836ab47cfaaSmrgpublic:
3837ab47cfaaSmrg  Foo (void) { a = 0; }
3838ab47cfaaSmrgprivate:
3839ab47cfaaSmrg  int a;
3840ab47cfaaSmrg};
3841ab47cfaaSmrgEOF
3842ab47cfaaSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3843ab47cfaaSmrg      subroutine foo
3844ab47cfaaSmrg      implicit none
3845ab47cfaaSmrg      integer*4 a
3846ab47cfaaSmrg      a=0
3847ab47cfaaSmrg      return
3848ab47cfaaSmrg      end
3849ab47cfaaSmrgEOF
3850ab47cfaaSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3851ab47cfaaSmrgpublic class foo {
3852ab47cfaaSmrg  private int a;
3853ab47cfaaSmrg  public void bar (void) {
3854ab47cfaaSmrg    a = 0;
3855ab47cfaaSmrg  }
3856ab47cfaaSmrg};
3857ab47cfaaSmrgEOF
3858ab47cfaaSmrg])
3859ab47cfaaSmrgdnl Parse the compiler output and extract the necessary
3860ab47cfaaSmrgdnl objects, libraries and library flags.
3861ab47cfaaSmrgif AC_TRY_EVAL(ac_compile); then
3862ab47cfaaSmrg  # Parse the compiler output and extract the necessary
3863ab47cfaaSmrg  # objects, libraries and library flags.
3864ab47cfaaSmrg
3865ab47cfaaSmrg  # Sentinel used to keep track of whether or not we are before
3866ab47cfaaSmrg  # the conftest object file.
3867ab47cfaaSmrg  pre_test_object_deps_done=no
3868ab47cfaaSmrg
3869ab47cfaaSmrg  # The `*' in the case matches for architectures that use `case' in
3870ab47cfaaSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
3871ab47cfaaSmrg  # eval without this substitution.
3872ab47cfaaSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3873ab47cfaaSmrg
3874ab47cfaaSmrg  for p in `eval $output_verbose_link_cmd`; do
3875ab47cfaaSmrg    case $p in
3876ab47cfaaSmrg
3877ab47cfaaSmrg    -L* | -R* | -l*)
3878ab47cfaaSmrg       # Some compilers place space between "-{L,R}" and the path.
3879ab47cfaaSmrg       # Remove the space.
3880ab47cfaaSmrg       if test $p = "-L" \
3881ab47cfaaSmrg	  || test $p = "-R"; then
3882ab47cfaaSmrg	 prev=$p
3883ab47cfaaSmrg	 continue
3884ab47cfaaSmrg       else
3885ab47cfaaSmrg	 prev=
3886ab47cfaaSmrg       fi
3887ab47cfaaSmrg
3888ab47cfaaSmrg       if test "$pre_test_object_deps_done" = no; then
3889ab47cfaaSmrg	 case $p in
3890ab47cfaaSmrg	 -L* | -R*)
3891ab47cfaaSmrg	   # Internal compiler library paths should come after those
3892ab47cfaaSmrg	   # provided the user.  The postdeps already come after the
3893ab47cfaaSmrg	   # user supplied libs so there is no need to process them.
3894ab47cfaaSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3895ab47cfaaSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3896ab47cfaaSmrg	   else
3897ab47cfaaSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3898ab47cfaaSmrg	   fi
3899ab47cfaaSmrg	   ;;
3900ab47cfaaSmrg	 # The "-l" case would never come before the object being
3901ab47cfaaSmrg	 # linked, so don't bother handling this case.
3902ab47cfaaSmrg	 esac
3903ab47cfaaSmrg       else
3904ab47cfaaSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3905ab47cfaaSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3906ab47cfaaSmrg	 else
3907ab47cfaaSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3908ab47cfaaSmrg	 fi
3909ab47cfaaSmrg       fi
3910ab47cfaaSmrg       ;;
3911ab47cfaaSmrg
3912ab47cfaaSmrg    *.$objext)
3913ab47cfaaSmrg       # This assumes that the test object file only shows up
3914ab47cfaaSmrg       # once in the compiler output.
3915ab47cfaaSmrg       if test "$p" = "conftest.$objext"; then
3916ab47cfaaSmrg	 pre_test_object_deps_done=yes
3917ab47cfaaSmrg	 continue
3918ab47cfaaSmrg       fi
3919ab47cfaaSmrg
3920ab47cfaaSmrg       if test "$pre_test_object_deps_done" = no; then
3921ab47cfaaSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3922ab47cfaaSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3923ab47cfaaSmrg	 else
3924ab47cfaaSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3925ab47cfaaSmrg	 fi
3926ab47cfaaSmrg       else
3927ab47cfaaSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3928ab47cfaaSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3929ab47cfaaSmrg	 else
3930ab47cfaaSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3931ab47cfaaSmrg	 fi
3932ab47cfaaSmrg       fi
3933ab47cfaaSmrg       ;;
3934ab47cfaaSmrg
3935ab47cfaaSmrg    *) ;; # Ignore the rest.
3936ab47cfaaSmrg
3937ab47cfaaSmrg    esac
3938ab47cfaaSmrg  done
3939ab47cfaaSmrg
3940ab47cfaaSmrg  # Clean up.
3941ab47cfaaSmrg  rm -f a.out a.exe
3942ab47cfaaSmrgelse
3943ab47cfaaSmrg  echo "libtool.m4: error: problem compiling $1 test program"
3944ab47cfaaSmrgfi
3945ab47cfaaSmrg
3946ab47cfaaSmrg$rm -f confest.$objext
3947ab47cfaaSmrg
3948ab47cfaaSmrg# PORTME: override above test on systems where it is broken
3949ab47cfaaSmrgifelse([$1],[CXX],
3950ab47cfaaSmrg[case $host_os in
39518697ee19Smrginterix[[3-9]]*)
3952ab47cfaaSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3953ab47cfaaSmrg  # hack all around it, let's just trust "g++" to DTRT.
3954ab47cfaaSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
3955ab47cfaaSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
3956ab47cfaaSmrg  _LT_AC_TAGVAR(postdeps,$1)=
3957ab47cfaaSmrg  ;;
3958ab47cfaaSmrg
39598697ee19Smrglinux*)
39608697ee19Smrg  case `$CC -V 2>&1 | sed 5q` in
39618697ee19Smrg  *Sun\ C*)
39628697ee19Smrg    # Sun C++ 5.9
39638697ee19Smrg    #
39648697ee19Smrg    # The more standards-conforming stlport4 library is
39658697ee19Smrg    # incompatible with the Cstd library. Avoid specifying
39668697ee19Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
39678697ee19Smrg    # -library=stlport4 depends on it.
39688697ee19Smrg    case " $CXX $CXXFLAGS " in
39698697ee19Smrg    *" -library=stlport4 "*)
39708697ee19Smrg      solaris_use_stlport4=yes
39718697ee19Smrg      ;;
39728697ee19Smrg    esac
39738697ee19Smrg    if test "$solaris_use_stlport4" != yes; then
39748697ee19Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
39758697ee19Smrg    fi
39768697ee19Smrg    ;;
39778697ee19Smrg  esac
39788697ee19Smrg  ;;
39798697ee19Smrg
3980ab47cfaaSmrgsolaris*)
3981ab47cfaaSmrg  case $cc_basename in
3982ab47cfaaSmrg  CC*)
39838697ee19Smrg    # The more standards-conforming stlport4 library is
39848697ee19Smrg    # incompatible with the Cstd library. Avoid specifying
39858697ee19Smrg    # it if it's in CXXFLAGS. Ignore libCrun as
39868697ee19Smrg    # -library=stlport4 depends on it.
39878697ee19Smrg    case " $CXX $CXXFLAGS " in
39888697ee19Smrg    *" -library=stlport4 "*)
39898697ee19Smrg      solaris_use_stlport4=yes
39908697ee19Smrg      ;;
39918697ee19Smrg    esac
39928697ee19Smrg
3993ab47cfaaSmrg    # Adding this requires a known-good setup of shared libraries for
3994ab47cfaaSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
3995ab47cfaaSmrg    # archive will be linked into the output, leading to subtle bugs.
39968697ee19Smrg    if test "$solaris_use_stlport4" != yes; then
39978697ee19Smrg      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
39988697ee19Smrg    fi
3999ab47cfaaSmrg    ;;
4000ab47cfaaSmrg  esac
4001ab47cfaaSmrg  ;;
4002ab47cfaaSmrgesac
4003ab47cfaaSmrg])
4004ab47cfaaSmrg
4005ab47cfaaSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
4006ab47cfaaSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4007ab47cfaaSmrgesac
4008ab47cfaaSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
4009ab47cfaaSmrg
4010ab47cfaaSmrg# AC_LIBTOOL_LANG_F77_CONFIG
4011ab47cfaaSmrg# --------------------------
4012ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
4013ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
4014ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4015ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
4016ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
4017ab47cfaaSmrg[AC_REQUIRE([AC_PROG_F77])
4018ab47cfaaSmrgAC_LANG_PUSH(Fortran 77)
4019ab47cfaaSmrg
4020ab47cfaaSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4021ab47cfaaSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
4022ab47cfaaSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
4023ab47cfaaSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
4024ab47cfaaSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
4025ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
4026ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
4027ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
4028ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
4029ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
4030ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
4031ab47cfaaSmrg_LT_AC_TAGVAR(module_cmds, $1)=
4032ab47cfaaSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
4033ab47cfaaSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
4034ab47cfaaSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4035ab47cfaaSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
4036ab47cfaaSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
4037ab47cfaaSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
4038ab47cfaaSmrg
4039ab47cfaaSmrg# Source file extension for f77 test sources.
4040ab47cfaaSmrgac_ext=f
4041ab47cfaaSmrg
4042ab47cfaaSmrg# Object file extension for compiled f77 test sources.
4043ab47cfaaSmrgobjext=o
4044ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4045ab47cfaaSmrg
4046ab47cfaaSmrg# Code to be used in simple compile tests
40478697ee19Smrglt_simple_compile_test_code="\
40488697ee19Smrg      subroutine t
40498697ee19Smrg      return
40508697ee19Smrg      end
40518697ee19Smrg"
4052ab47cfaaSmrg
4053ab47cfaaSmrg# Code to be used in simple link tests
40548697ee19Smrglt_simple_link_test_code="\
40558697ee19Smrg      program t
40568697ee19Smrg      end
40578697ee19Smrg"
4058ab47cfaaSmrg
4059ab47cfaaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4060ab47cfaaSmrg_LT_AC_SYS_COMPILER
4061ab47cfaaSmrg
4062ab47cfaaSmrg# save warnings/boilerplate of simple test code
4063ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
4064ab47cfaaSmrg_LT_LINKER_BOILERPLATE
4065ab47cfaaSmrg
4066ab47cfaaSmrg# Allow CC to be a program name with arguments.
4067ab47cfaaSmrglt_save_CC="$CC"
4068ab47cfaaSmrgCC=${F77-"f77"}
4069ab47cfaaSmrgcompiler=$CC
4070ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4071ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
4072ab47cfaaSmrg
4073ab47cfaaSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
4074ab47cfaaSmrgAC_MSG_RESULT([$can_build_shared])
4075ab47cfaaSmrg
4076ab47cfaaSmrgAC_MSG_CHECKING([whether to build shared libraries])
4077ab47cfaaSmrgtest "$can_build_shared" = "no" && enable_shared=no
4078ab47cfaaSmrg
4079ab47cfaaSmrg# On AIX, shared libraries and static libraries use the same namespace, and
4080ab47cfaaSmrg# are all built from PIC.
4081ab47cfaaSmrgcase $host_os in
4082ab47cfaaSmrgaix3*)
4083ab47cfaaSmrg  test "$enable_shared" = yes && enable_static=no
4084ab47cfaaSmrg  if test -n "$RANLIB"; then
4085ab47cfaaSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
4086ab47cfaaSmrg    postinstall_cmds='$RANLIB $lib'
4087ab47cfaaSmrg  fi
4088ab47cfaaSmrg  ;;
4089ab47cfaaSmrgaix4* | aix5*)
4090ab47cfaaSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
4091ab47cfaaSmrg    test "$enable_shared" = yes && enable_static=no
4092ab47cfaaSmrg  fi
4093ab47cfaaSmrg  ;;
4094ab47cfaaSmrgesac
4095ab47cfaaSmrgAC_MSG_RESULT([$enable_shared])
4096ab47cfaaSmrg
4097ab47cfaaSmrgAC_MSG_CHECKING([whether to build static libraries])
4098ab47cfaaSmrg# Make sure either enable_shared or enable_static is yes.
4099ab47cfaaSmrgtest "$enable_shared" = yes || enable_static=yes
4100ab47cfaaSmrgAC_MSG_RESULT([$enable_static])
4101ab47cfaaSmrg
4102ab47cfaaSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
4103ab47cfaaSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
4104ab47cfaaSmrg
4105ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4106ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4107ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4108ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4109ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4110ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4111ab47cfaaSmrg
4112ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
4113ab47cfaaSmrg
4114ab47cfaaSmrgAC_LANG_POP
4115ab47cfaaSmrgCC="$lt_save_CC"
4116ab47cfaaSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
4117ab47cfaaSmrg
4118ab47cfaaSmrg
4119ab47cfaaSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
4120ab47cfaaSmrg# --------------------------
4121ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
4122ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
4123ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4124ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
4125ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4126ab47cfaaSmrg[AC_LANG_SAVE
4127ab47cfaaSmrg
4128ab47cfaaSmrg# Source file extension for Java test sources.
4129ab47cfaaSmrgac_ext=java
4130ab47cfaaSmrg
4131ab47cfaaSmrg# Object file extension for compiled Java test sources.
4132ab47cfaaSmrgobjext=o
4133ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4134ab47cfaaSmrg
4135ab47cfaaSmrg# Code to be used in simple compile tests
41368697ee19Smrglt_simple_compile_test_code="class foo {}"
4137ab47cfaaSmrg
4138ab47cfaaSmrg# Code to be used in simple link tests
41398697ee19Smrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
4140ab47cfaaSmrg
4141ab47cfaaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4142ab47cfaaSmrg_LT_AC_SYS_COMPILER
4143ab47cfaaSmrg
4144ab47cfaaSmrg# save warnings/boilerplate of simple test code
4145ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
4146ab47cfaaSmrg_LT_LINKER_BOILERPLATE
4147ab47cfaaSmrg
4148ab47cfaaSmrg# Allow CC to be a program name with arguments.
4149ab47cfaaSmrglt_save_CC="$CC"
4150ab47cfaaSmrgCC=${GCJ-"gcj"}
4151ab47cfaaSmrgcompiler=$CC
4152ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4153ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
4154ab47cfaaSmrg
4155ab47cfaaSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
4156ab47cfaaSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4157ab47cfaaSmrg
4158ab47cfaaSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4159ab47cfaaSmrg
4160ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4161ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4162ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4163ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4164ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4165ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4166ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4167ab47cfaaSmrg
4168ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
4169ab47cfaaSmrg
4170ab47cfaaSmrgAC_LANG_RESTORE
4171ab47cfaaSmrgCC="$lt_save_CC"
4172ab47cfaaSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
4173ab47cfaaSmrg
4174ab47cfaaSmrg
4175ab47cfaaSmrg# AC_LIBTOOL_LANG_RC_CONFIG
4176ab47cfaaSmrg# -------------------------
4177ab47cfaaSmrg# Ensure that the configuration vars for the Windows resource compiler are
4178ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
4179ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4180ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4181ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4182ab47cfaaSmrg[AC_LANG_SAVE
4183ab47cfaaSmrg
4184ab47cfaaSmrg# Source file extension for RC test sources.
4185ab47cfaaSmrgac_ext=rc
4186ab47cfaaSmrg
4187ab47cfaaSmrg# Object file extension for compiled RC test sources.
4188ab47cfaaSmrgobjext=o
4189ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4190ab47cfaaSmrg
4191ab47cfaaSmrg# Code to be used in simple compile tests
41928697ee19Smrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
4193ab47cfaaSmrg
4194ab47cfaaSmrg# Code to be used in simple link tests
4195ab47cfaaSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
4196ab47cfaaSmrg
4197ab47cfaaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4198ab47cfaaSmrg_LT_AC_SYS_COMPILER
4199ab47cfaaSmrg
4200ab47cfaaSmrg# save warnings/boilerplate of simple test code
4201ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
4202ab47cfaaSmrg_LT_LINKER_BOILERPLATE
4203ab47cfaaSmrg
4204ab47cfaaSmrg# Allow CC to be a program name with arguments.
4205ab47cfaaSmrglt_save_CC="$CC"
4206ab47cfaaSmrgCC=${RC-"windres"}
4207ab47cfaaSmrgcompiler=$CC
4208ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4209ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
4210ab47cfaaSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4211ab47cfaaSmrg
4212ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
4213ab47cfaaSmrg
4214ab47cfaaSmrgAC_LANG_RESTORE
4215ab47cfaaSmrgCC="$lt_save_CC"
4216ab47cfaaSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
4217ab47cfaaSmrg
4218ab47cfaaSmrg
4219ab47cfaaSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
4220ab47cfaaSmrg# ----------------------------
4221ab47cfaaSmrg# If TAGNAME is not passed, then create an initial libtool script
4222ab47cfaaSmrg# with a default configuration from the untagged config vars.  Otherwise
4223ab47cfaaSmrg# add code to config.status for appending the configuration named by
4224ab47cfaaSmrg# TAGNAME from the matching tagged config vars.
4225ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
4226ab47cfaaSmrg[# The else clause should only fire when bootstrapping the
4227ab47cfaaSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
4228ab47cfaaSmrg# with your package, and you will get complaints that there are
4229ab47cfaaSmrg# no rules to generate ltmain.sh.
4230ab47cfaaSmrgif test -f "$ltmain"; then
4231ab47cfaaSmrg  # See if we are running on zsh, and set the options which allow our commands through
4232ab47cfaaSmrg  # without removal of \ escapes.
4233ab47cfaaSmrg  if test -n "${ZSH_VERSION+set}" ; then
4234ab47cfaaSmrg    setopt NO_GLOB_SUBST
4235ab47cfaaSmrg  fi
4236ab47cfaaSmrg  # Now quote all the things that may contain metacharacters while being
4237ab47cfaaSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4238ab47cfaaSmrg  # variables and quote the copies for generation of the libtool script.
4239ab47cfaaSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4240ab47cfaaSmrg    SED SHELL STRIP \
4241ab47cfaaSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4242ab47cfaaSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4243ab47cfaaSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
4244ab47cfaaSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4245ab47cfaaSmrg    lt_cv_sys_global_symbol_to_c_name_address \
4246ab47cfaaSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4247ab47cfaaSmrg    old_postinstall_cmds old_postuninstall_cmds \
4248ab47cfaaSmrg    _LT_AC_TAGVAR(compiler, $1) \
4249ab47cfaaSmrg    _LT_AC_TAGVAR(CC, $1) \
4250ab47cfaaSmrg    _LT_AC_TAGVAR(LD, $1) \
4251ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4252ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4253ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4254ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4255ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4256ab47cfaaSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4257ab47cfaaSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4258ab47cfaaSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4259ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4260ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4261ab47cfaaSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
4262ab47cfaaSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
4263ab47cfaaSmrg    _LT_AC_TAGVAR(predeps, $1) \
4264ab47cfaaSmrg    _LT_AC_TAGVAR(postdeps, $1) \
4265ab47cfaaSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4266ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
4267ab47cfaaSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4268ab47cfaaSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4269ab47cfaaSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4270ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4271ab47cfaaSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4272ab47cfaaSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4273ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4274ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4275ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4276ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4277ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4278ab47cfaaSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
4279ab47cfaaSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4280ab47cfaaSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
42818697ee19Smrg    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4282ab47cfaaSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4283ab47cfaaSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
4284ab47cfaaSmrg
4285ab47cfaaSmrg    case $var in
4286ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4287ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4288ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
4289ab47cfaaSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4290ab47cfaaSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
4291ab47cfaaSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4292ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4293ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4294ab47cfaaSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4295ab47cfaaSmrg    postinstall_cmds | postuninstall_cmds | \
4296ab47cfaaSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
4297ab47cfaaSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4298ab47cfaaSmrg      # Double-quote double-evaled strings.
4299ab47cfaaSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4300ab47cfaaSmrg      ;;
4301ab47cfaaSmrg    *)
4302ab47cfaaSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4303ab47cfaaSmrg      ;;
4304ab47cfaaSmrg    esac
4305ab47cfaaSmrg  done
4306ab47cfaaSmrg
4307ab47cfaaSmrg  case $lt_echo in
4308ab47cfaaSmrg  *'\[$]0 --fallback-echo"')
4309ab47cfaaSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4310ab47cfaaSmrg    ;;
4311ab47cfaaSmrg  esac
4312ab47cfaaSmrg
4313ab47cfaaSmrgifelse([$1], [],
4314ab47cfaaSmrg  [cfgfile="${ofile}T"
4315ab47cfaaSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4316ab47cfaaSmrg  $rm -f "$cfgfile"
4317ab47cfaaSmrg  AC_MSG_NOTICE([creating $ofile])],
4318ab47cfaaSmrg  [cfgfile="$ofile"])
4319ab47cfaaSmrg
4320ab47cfaaSmrg  cat <<__EOF__ >> "$cfgfile"
4321ab47cfaaSmrgifelse([$1], [],
4322ab47cfaaSmrg[#! $SHELL
4323ab47cfaaSmrg
4324ab47cfaaSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4325ab47cfaaSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4326ab47cfaaSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4327ab47cfaaSmrg#
43288697ee19Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
4329ab47cfaaSmrg# Free Software Foundation, Inc.
4330ab47cfaaSmrg#
4331ab47cfaaSmrg# This file is part of GNU Libtool:
4332ab47cfaaSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4333ab47cfaaSmrg#
4334ab47cfaaSmrg# This program is free software; you can redistribute it and/or modify
4335ab47cfaaSmrg# it under the terms of the GNU General Public License as published by
4336ab47cfaaSmrg# the Free Software Foundation; either version 2 of the License, or
4337ab47cfaaSmrg# (at your option) any later version.
4338ab47cfaaSmrg#
4339ab47cfaaSmrg# This program is distributed in the hope that it will be useful, but
4340ab47cfaaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
4341ab47cfaaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4342ab47cfaaSmrg# General Public License for more details.
4343ab47cfaaSmrg#
4344ab47cfaaSmrg# You should have received a copy of the GNU General Public License
4345ab47cfaaSmrg# along with this program; if not, write to the Free Software
4346ab47cfaaSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4347ab47cfaaSmrg#
4348ab47cfaaSmrg# As a special exception to the GNU General Public License, if you
4349ab47cfaaSmrg# distribute this file as part of a program that contains a
4350ab47cfaaSmrg# configuration script generated by Autoconf, you may include it under
4351ab47cfaaSmrg# the same distribution terms that you use for the rest of that program.
4352ab47cfaaSmrg
4353ab47cfaaSmrg# A sed program that does not truncate output.
4354ab47cfaaSmrgSED=$lt_SED
4355ab47cfaaSmrg
4356ab47cfaaSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4357ab47cfaaSmrgXsed="$SED -e 1s/^X//"
4358ab47cfaaSmrg
4359ab47cfaaSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
4360ab47cfaaSmrg# if CDPATH is set.
4361ab47cfaaSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4362ab47cfaaSmrg
4363ab47cfaaSmrg# The names of the tagged configurations supported by this script.
4364ab47cfaaSmrgavailable_tags=
4365ab47cfaaSmrg
4366ab47cfaaSmrg# ### BEGIN LIBTOOL CONFIG],
4367ab47cfaaSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4368ab47cfaaSmrg
4369ab47cfaaSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4370ab47cfaaSmrg
4371ab47cfaaSmrg# Shell to use when invoking shell scripts.
4372ab47cfaaSmrgSHELL=$lt_SHELL
4373ab47cfaaSmrg
4374ab47cfaaSmrg# Whether or not to build shared libraries.
4375ab47cfaaSmrgbuild_libtool_libs=$enable_shared
4376ab47cfaaSmrg
4377ab47cfaaSmrg# Whether or not to build static libraries.
4378ab47cfaaSmrgbuild_old_libs=$enable_static
4379ab47cfaaSmrg
4380ab47cfaaSmrg# Whether or not to add -lc for building shared libraries.
4381ab47cfaaSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4382ab47cfaaSmrg
4383ab47cfaaSmrg# Whether or not to disallow shared libs when runtime libs are static
4384ab47cfaaSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4385ab47cfaaSmrg
4386ab47cfaaSmrg# Whether or not to optimize for fast installation.
4387ab47cfaaSmrgfast_install=$enable_fast_install
4388ab47cfaaSmrg
4389ab47cfaaSmrg# The host system.
4390ab47cfaaSmrghost_alias=$host_alias
4391ab47cfaaSmrghost=$host
4392ab47cfaaSmrghost_os=$host_os
4393ab47cfaaSmrg
4394ab47cfaaSmrg# The build system.
4395ab47cfaaSmrgbuild_alias=$build_alias
4396ab47cfaaSmrgbuild=$build
4397ab47cfaaSmrgbuild_os=$build_os
4398ab47cfaaSmrg
4399ab47cfaaSmrg# An echo program that does not interpret backslashes.
4400ab47cfaaSmrgecho=$lt_echo
4401ab47cfaaSmrg
4402ab47cfaaSmrg# The archiver.
4403ab47cfaaSmrgAR=$lt_AR
4404ab47cfaaSmrgAR_FLAGS=$lt_AR_FLAGS
4405ab47cfaaSmrg
4406ab47cfaaSmrg# A C compiler.
4407ab47cfaaSmrgLTCC=$lt_LTCC
4408ab47cfaaSmrg
4409ab47cfaaSmrg# LTCC compiler flags.
4410ab47cfaaSmrgLTCFLAGS=$lt_LTCFLAGS
4411ab47cfaaSmrg
4412ab47cfaaSmrg# A language-specific compiler.
4413ab47cfaaSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4414ab47cfaaSmrg
4415ab47cfaaSmrg# Is the compiler the GNU C compiler?
4416ab47cfaaSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4417ab47cfaaSmrg
4418ab47cfaaSmrg# An ERE matcher.
4419ab47cfaaSmrgEGREP=$lt_EGREP
4420ab47cfaaSmrg
4421ab47cfaaSmrg# The linker used to build libraries.
4422ab47cfaaSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4423ab47cfaaSmrg
4424ab47cfaaSmrg# Whether we need hard or soft links.
4425ab47cfaaSmrgLN_S=$lt_LN_S
4426ab47cfaaSmrg
4427ab47cfaaSmrg# A BSD-compatible nm program.
4428ab47cfaaSmrgNM=$lt_NM
4429ab47cfaaSmrg
4430ab47cfaaSmrg# A symbol stripping program
4431ab47cfaaSmrgSTRIP=$lt_STRIP
4432ab47cfaaSmrg
4433ab47cfaaSmrg# Used to examine libraries when file_magic_cmd begins "file"
4434ab47cfaaSmrgMAGIC_CMD=$MAGIC_CMD
4435ab47cfaaSmrg
4436ab47cfaaSmrg# Used on cygwin: DLL creation program.
4437ab47cfaaSmrgDLLTOOL="$DLLTOOL"
4438ab47cfaaSmrg
4439ab47cfaaSmrg# Used on cygwin: object dumper.
4440ab47cfaaSmrgOBJDUMP="$OBJDUMP"
4441ab47cfaaSmrg
4442ab47cfaaSmrg# Used on cygwin: assembler.
4443ab47cfaaSmrgAS="$AS"
4444ab47cfaaSmrg
4445ab47cfaaSmrg# The name of the directory that contains temporary libtool files.
4446ab47cfaaSmrgobjdir=$objdir
4447ab47cfaaSmrg
4448ab47cfaaSmrg# How to create reloadable object files.
4449ab47cfaaSmrgreload_flag=$lt_reload_flag
4450ab47cfaaSmrgreload_cmds=$lt_reload_cmds
4451ab47cfaaSmrg
4452ab47cfaaSmrg# How to pass a linker flag through the compiler.
4453ab47cfaaSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4454ab47cfaaSmrg
4455ab47cfaaSmrg# Object file suffix (normally "o").
4456ab47cfaaSmrgobjext="$ac_objext"
4457ab47cfaaSmrg
4458ab47cfaaSmrg# Old archive suffix (normally "a").
4459ab47cfaaSmrglibext="$libext"
4460ab47cfaaSmrg
4461ab47cfaaSmrg# Shared library suffix (normally ".so").
4462ab47cfaaSmrgshrext_cmds='$shrext_cmds'
4463ab47cfaaSmrg
4464ab47cfaaSmrg# Executable file suffix (normally "").
4465ab47cfaaSmrgexeext="$exeext"
4466ab47cfaaSmrg
4467ab47cfaaSmrg# Additional compiler flags for building library objects.
4468ab47cfaaSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4469ab47cfaaSmrgpic_mode=$pic_mode
4470ab47cfaaSmrg
4471ab47cfaaSmrg# What is the maximum length of a command?
4472ab47cfaaSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
4473ab47cfaaSmrg
4474ab47cfaaSmrg# Does compiler simultaneously support -c and -o options?
4475ab47cfaaSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4476ab47cfaaSmrg
4477ab47cfaaSmrg# Must we lock files when doing compilation?
4478ab47cfaaSmrgneed_locks=$lt_need_locks
4479ab47cfaaSmrg
4480ab47cfaaSmrg# Do we need the lib prefix for modules?
4481ab47cfaaSmrgneed_lib_prefix=$need_lib_prefix
4482ab47cfaaSmrg
4483ab47cfaaSmrg# Do we need a version for libraries?
4484ab47cfaaSmrgneed_version=$need_version
4485ab47cfaaSmrg
4486ab47cfaaSmrg# Whether dlopen is supported.
4487ab47cfaaSmrgdlopen_support=$enable_dlopen
4488ab47cfaaSmrg
4489ab47cfaaSmrg# Whether dlopen of programs is supported.
4490ab47cfaaSmrgdlopen_self=$enable_dlopen_self
4491ab47cfaaSmrg
4492ab47cfaaSmrg# Whether dlopen of statically linked programs is supported.
4493ab47cfaaSmrgdlopen_self_static=$enable_dlopen_self_static
4494ab47cfaaSmrg
4495ab47cfaaSmrg# Compiler flag to prevent dynamic linking.
4496ab47cfaaSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4497ab47cfaaSmrg
4498ab47cfaaSmrg# Compiler flag to turn off builtin functions.
4499ab47cfaaSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4500ab47cfaaSmrg
4501ab47cfaaSmrg# Compiler flag to allow reflexive dlopens.
4502ab47cfaaSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4503ab47cfaaSmrg
4504ab47cfaaSmrg# Compiler flag to generate shared objects directly from archives.
4505ab47cfaaSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4506ab47cfaaSmrg
4507ab47cfaaSmrg# Compiler flag to generate thread-safe objects.
4508ab47cfaaSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4509ab47cfaaSmrg
4510ab47cfaaSmrg# Library versioning type.
4511ab47cfaaSmrgversion_type=$version_type
4512ab47cfaaSmrg
4513ab47cfaaSmrg# Format of library name prefix.
4514ab47cfaaSmrglibname_spec=$lt_libname_spec
4515ab47cfaaSmrg
4516ab47cfaaSmrg# List of archive names.  First name is the real one, the rest are links.
4517ab47cfaaSmrg# The last name is the one that the linker finds with -lNAME.
4518ab47cfaaSmrglibrary_names_spec=$lt_library_names_spec
4519ab47cfaaSmrg
4520ab47cfaaSmrg# The coded name of the library, if different from the real name.
4521ab47cfaaSmrgsoname_spec=$lt_soname_spec
4522ab47cfaaSmrg
4523ab47cfaaSmrg# Commands used to build and install an old-style archive.
4524ab47cfaaSmrgRANLIB=$lt_RANLIB
4525ab47cfaaSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4526ab47cfaaSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
4527ab47cfaaSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
4528ab47cfaaSmrg
4529ab47cfaaSmrg# Create an old-style archive from a shared archive.
4530ab47cfaaSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4531ab47cfaaSmrg
4532ab47cfaaSmrg# Create a temporary old-style archive to link instead of a shared archive.
4533ab47cfaaSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4534ab47cfaaSmrg
4535ab47cfaaSmrg# Commands used to build and install a shared archive.
4536ab47cfaaSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4537ab47cfaaSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4538ab47cfaaSmrgpostinstall_cmds=$lt_postinstall_cmds
4539ab47cfaaSmrgpostuninstall_cmds=$lt_postuninstall_cmds
4540ab47cfaaSmrg
4541ab47cfaaSmrg# Commands used to build a loadable module (assumed same as above if empty)
4542ab47cfaaSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4543ab47cfaaSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4544ab47cfaaSmrg
4545ab47cfaaSmrg# Commands to strip libraries.
4546ab47cfaaSmrgold_striplib=$lt_old_striplib
4547ab47cfaaSmrgstriplib=$lt_striplib
4548ab47cfaaSmrg
4549ab47cfaaSmrg# Dependencies to place before the objects being linked to create a
4550ab47cfaaSmrg# shared library.
4551ab47cfaaSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4552ab47cfaaSmrg
4553ab47cfaaSmrg# Dependencies to place after the objects being linked to create a
4554ab47cfaaSmrg# shared library.
4555ab47cfaaSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4556ab47cfaaSmrg
4557ab47cfaaSmrg# Dependencies to place before the objects being linked to create a
4558ab47cfaaSmrg# shared library.
4559ab47cfaaSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4560ab47cfaaSmrg
4561ab47cfaaSmrg# Dependencies to place after the objects being linked to create a
4562ab47cfaaSmrg# shared library.
4563ab47cfaaSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4564ab47cfaaSmrg
4565ab47cfaaSmrg# The library search path used internally by the compiler when linking
4566ab47cfaaSmrg# a shared library.
4567ab47cfaaSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4568ab47cfaaSmrg
4569ab47cfaaSmrg# Method to check whether dependent libraries are shared objects.
4570ab47cfaaSmrgdeplibs_check_method=$lt_deplibs_check_method
4571ab47cfaaSmrg
4572ab47cfaaSmrg# Command to use when deplibs_check_method == file_magic.
4573ab47cfaaSmrgfile_magic_cmd=$lt_file_magic_cmd
4574ab47cfaaSmrg
4575ab47cfaaSmrg# Flag that allows shared libraries with undefined symbols to be built.
4576ab47cfaaSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4577ab47cfaaSmrg
4578ab47cfaaSmrg# Flag that forces no undefined symbols.
4579ab47cfaaSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4580ab47cfaaSmrg
4581ab47cfaaSmrg# Commands used to finish a libtool library installation in a directory.
4582ab47cfaaSmrgfinish_cmds=$lt_finish_cmds
4583ab47cfaaSmrg
4584ab47cfaaSmrg# Same as above, but a single script fragment to be evaled but not shown.
4585ab47cfaaSmrgfinish_eval=$lt_finish_eval
4586ab47cfaaSmrg
4587ab47cfaaSmrg# Take the output of nm and produce a listing of raw symbols and C names.
4588ab47cfaaSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4589ab47cfaaSmrg
4590ab47cfaaSmrg# Transform the output of nm in a proper C declaration
4591ab47cfaaSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4592ab47cfaaSmrg
4593ab47cfaaSmrg# Transform the output of nm in a C name address pair
4594ab47cfaaSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4595ab47cfaaSmrg
4596ab47cfaaSmrg# This is the shared library runtime path variable.
4597ab47cfaaSmrgrunpath_var=$runpath_var
4598ab47cfaaSmrg
4599ab47cfaaSmrg# This is the shared library path variable.
4600ab47cfaaSmrgshlibpath_var=$shlibpath_var
4601ab47cfaaSmrg
4602ab47cfaaSmrg# Is shlibpath searched before the hard-coded library search path?
4603ab47cfaaSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
4604ab47cfaaSmrg
4605ab47cfaaSmrg# How to hardcode a shared library path into an executable.
4606ab47cfaaSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4607ab47cfaaSmrg
4608ab47cfaaSmrg# Whether we should hardcode library paths into libraries.
4609ab47cfaaSmrghardcode_into_libs=$hardcode_into_libs
4610ab47cfaaSmrg
4611ab47cfaaSmrg# Flag to hardcode \$libdir into a binary during linking.
4612ab47cfaaSmrg# This must work even if \$libdir does not exist.
4613ab47cfaaSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4614ab47cfaaSmrg
4615ab47cfaaSmrg# If ld is used when linking, flag to hardcode \$libdir into
4616ab47cfaaSmrg# a binary during linking. This must work even if \$libdir does
4617ab47cfaaSmrg# not exist.
4618ab47cfaaSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4619ab47cfaaSmrg
4620ab47cfaaSmrg# Whether we need a single -rpath flag with a separated argument.
4621ab47cfaaSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4622ab47cfaaSmrg
4623ab47cfaaSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4624ab47cfaaSmrg# resulting binary.
4625ab47cfaaSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4626ab47cfaaSmrg
4627ab47cfaaSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4628ab47cfaaSmrg# resulting binary.
4629ab47cfaaSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4630ab47cfaaSmrg
4631ab47cfaaSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4632ab47cfaaSmrg# the resulting binary.
4633ab47cfaaSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4634ab47cfaaSmrg
4635ab47cfaaSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
4636ab47cfaaSmrg# and all subsequent libraries and executables linked against it.
4637ab47cfaaSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4638ab47cfaaSmrg
4639ab47cfaaSmrg# Variables whose values should be saved in libtool wrapper scripts and
4640ab47cfaaSmrg# restored at relink time.
4641ab47cfaaSmrgvariables_saved_for_relink="$variables_saved_for_relink"
4642ab47cfaaSmrg
4643ab47cfaaSmrg# Whether libtool must link a program against all its dependency libraries.
4644ab47cfaaSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4645ab47cfaaSmrg
4646ab47cfaaSmrg# Compile-time system search path for libraries
4647ab47cfaaSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4648ab47cfaaSmrg
4649ab47cfaaSmrg# Run-time system search path for libraries
4650ab47cfaaSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4651ab47cfaaSmrg
4652ab47cfaaSmrg# Fix the shell variable \$srcfile for the compiler.
46538697ee19Smrgfix_srcfile_path=$lt_fix_srcfile_path
4654ab47cfaaSmrg
4655ab47cfaaSmrg# Set to yes if exported symbols are required.
4656ab47cfaaSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4657ab47cfaaSmrg
4658ab47cfaaSmrg# The commands to list exported symbols.
4659ab47cfaaSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4660ab47cfaaSmrg
4661ab47cfaaSmrg# The commands to extract the exported symbol list from a shared archive.
4662ab47cfaaSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
4663ab47cfaaSmrg
4664ab47cfaaSmrg# Symbols that should not be listed in the preloaded symbols.
4665ab47cfaaSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4666ab47cfaaSmrg
4667ab47cfaaSmrg# Symbols that must always be exported.
4668ab47cfaaSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4669ab47cfaaSmrg
4670ab47cfaaSmrgifelse([$1],[],
4671ab47cfaaSmrg[# ### END LIBTOOL CONFIG],
4672ab47cfaaSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
4673ab47cfaaSmrg
4674ab47cfaaSmrg__EOF__
4675ab47cfaaSmrg
4676ab47cfaaSmrgifelse([$1],[], [
4677ab47cfaaSmrg  case $host_os in
4678ab47cfaaSmrg  aix3*)
4679ab47cfaaSmrg    cat <<\EOF >> "$cfgfile"
4680ab47cfaaSmrg
4681ab47cfaaSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
4682ab47cfaaSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
4683ab47cfaaSmrg# vanish in a puff of smoke.
4684ab47cfaaSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
4685ab47cfaaSmrg  COLLECT_NAMES=
4686ab47cfaaSmrg  export COLLECT_NAMES
4687ab47cfaaSmrgfi
4688ab47cfaaSmrgEOF
4689ab47cfaaSmrg    ;;
4690ab47cfaaSmrg  esac
4691ab47cfaaSmrg
4692ab47cfaaSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
4693ab47cfaaSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4694ab47cfaaSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
4695ab47cfaaSmrg  # is reportedly fixed, but why not run on old versions too?
4696ab47cfaaSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4697ab47cfaaSmrg
4698ab47cfaaSmrg  mv -f "$cfgfile" "$ofile" || \
4699ab47cfaaSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4700ab47cfaaSmrg  chmod +x "$ofile"
4701ab47cfaaSmrg])
4702ab47cfaaSmrgelse
4703ab47cfaaSmrg  # If there is no Makefile yet, we rely on a make rule to execute
4704ab47cfaaSmrg  # `config.status --recheck' to rerun these tests and create the
4705ab47cfaaSmrg  # libtool script then.
4706ab47cfaaSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4707ab47cfaaSmrg  if test -f "$ltmain_in"; then
4708ab47cfaaSmrg    test -f Makefile && make "$ltmain"
4709ab47cfaaSmrg  fi
4710ab47cfaaSmrgfi
4711ab47cfaaSmrg])# AC_LIBTOOL_CONFIG
4712ab47cfaaSmrg
4713ab47cfaaSmrg
4714ab47cfaaSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4715ab47cfaaSmrg# -------------------------------------------
4716ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4717ab47cfaaSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4718ab47cfaaSmrg
4719ab47cfaaSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4720ab47cfaaSmrg
4721ab47cfaaSmrgif test "$GCC" = yes; then
4722ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4723ab47cfaaSmrg
4724ab47cfaaSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4725ab47cfaaSmrg    lt_cv_prog_compiler_rtti_exceptions,
4726ab47cfaaSmrg    [-fno-rtti -fno-exceptions], [],
4727ab47cfaaSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4728ab47cfaaSmrgfi
4729ab47cfaaSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4730ab47cfaaSmrg
4731ab47cfaaSmrg
4732ab47cfaaSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4733ab47cfaaSmrg# ---------------------------------
4734ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4735ab47cfaaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
47368697ee19SmrgAC_REQUIRE([LT_AC_PROG_SED])
4737ab47cfaaSmrgAC_REQUIRE([AC_PROG_NM])
4738ab47cfaaSmrgAC_REQUIRE([AC_OBJEXT])
4739ab47cfaaSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
4740ab47cfaaSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4741ab47cfaaSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4742ab47cfaaSmrg[
4743ab47cfaaSmrg# These are sane defaults that work on at least a few old systems.
4744ab47cfaaSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4745ab47cfaaSmrg
4746ab47cfaaSmrg# Character class describing NM global symbol codes.
4747ab47cfaaSmrgsymcode='[[BCDEGRST]]'
4748ab47cfaaSmrg
4749ab47cfaaSmrg# Regexp to match symbols that can be accessed directly from C.
4750ab47cfaaSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4751ab47cfaaSmrg
4752ab47cfaaSmrg# Transform an extracted symbol line into a proper C declaration
4753ab47cfaaSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4754ab47cfaaSmrg
4755ab47cfaaSmrg# Transform an extracted symbol line into symbol name and symbol address
4756ab47cfaaSmrglt_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'"
4757ab47cfaaSmrg
4758ab47cfaaSmrg# Define system-specific variables.
4759ab47cfaaSmrgcase $host_os in
4760ab47cfaaSmrgaix*)
4761ab47cfaaSmrg  symcode='[[BCDT]]'
4762ab47cfaaSmrg  ;;
4763ab47cfaaSmrgcygwin* | mingw* | pw32*)
4764ab47cfaaSmrg  symcode='[[ABCDGISTW]]'
4765ab47cfaaSmrg  ;;
4766ab47cfaaSmrghpux*) # Its linker distinguishes data from code symbols
4767ab47cfaaSmrg  if test "$host_cpu" = ia64; then
4768ab47cfaaSmrg    symcode='[[ABCDEGRST]]'
4769ab47cfaaSmrg  fi
4770ab47cfaaSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4771ab47cfaaSmrg  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'"
4772ab47cfaaSmrg  ;;
4773ab47cfaaSmrglinux* | k*bsd*-gnu)
4774ab47cfaaSmrg  if test "$host_cpu" = ia64; then
4775ab47cfaaSmrg    symcode='[[ABCDGIRSTW]]'
4776ab47cfaaSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4777ab47cfaaSmrg    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'"
4778ab47cfaaSmrg  fi
4779ab47cfaaSmrg  ;;
4780ab47cfaaSmrgirix* | nonstopux*)
4781ab47cfaaSmrg  symcode='[[BCDEGRST]]'
4782ab47cfaaSmrg  ;;
4783ab47cfaaSmrgosf*)
4784ab47cfaaSmrg  symcode='[[BCDEGQRST]]'
4785ab47cfaaSmrg  ;;
4786ab47cfaaSmrgsolaris*)
4787ab47cfaaSmrg  symcode='[[BDRT]]'
4788ab47cfaaSmrg  ;;
4789ab47cfaaSmrgsco3.2v5*)
4790ab47cfaaSmrg  symcode='[[DT]]'
4791ab47cfaaSmrg  ;;
4792ab47cfaaSmrgsysv4.2uw2*)
4793ab47cfaaSmrg  symcode='[[DT]]'
4794ab47cfaaSmrg  ;;
4795ab47cfaaSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
4796ab47cfaaSmrg  symcode='[[ABDT]]'
4797ab47cfaaSmrg  ;;
4798ab47cfaaSmrgsysv4)
4799ab47cfaaSmrg  symcode='[[DFNSTU]]'
4800ab47cfaaSmrg  ;;
4801ab47cfaaSmrgesac
4802ab47cfaaSmrg
4803ab47cfaaSmrg# Handle CRLF in mingw tool chain
4804ab47cfaaSmrgopt_cr=
4805ab47cfaaSmrgcase $build_os in
4806ab47cfaaSmrgmingw*)
4807ab47cfaaSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4808ab47cfaaSmrg  ;;
4809ab47cfaaSmrgesac
4810ab47cfaaSmrg
4811ab47cfaaSmrg# If we're using GNU nm, then use its standard symbol codes.
4812ab47cfaaSmrgcase `$NM -V 2>&1` in
4813ab47cfaaSmrg*GNU* | *'with BFD'*)
4814ab47cfaaSmrg  symcode='[[ABCDGIRSTW]]' ;;
4815ab47cfaaSmrgesac
4816ab47cfaaSmrg
4817ab47cfaaSmrg# Try without a prefix undercore, then with it.
4818ab47cfaaSmrgfor ac_symprfx in "" "_"; do
4819ab47cfaaSmrg
4820ab47cfaaSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4821ab47cfaaSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4822ab47cfaaSmrg
4823ab47cfaaSmrg  # Write the raw and C identifiers.
4824ab47cfaaSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4825ab47cfaaSmrg
4826ab47cfaaSmrg  # Check to see that the pipe works correctly.
4827ab47cfaaSmrg  pipe_works=no
4828ab47cfaaSmrg
4829ab47cfaaSmrg  rm -f conftest*
4830ab47cfaaSmrg  cat > conftest.$ac_ext <<EOF
4831ab47cfaaSmrg#ifdef __cplusplus
4832ab47cfaaSmrgextern "C" {
4833ab47cfaaSmrg#endif
4834ab47cfaaSmrgchar nm_test_var;
4835ab47cfaaSmrgvoid nm_test_func(){}
4836ab47cfaaSmrg#ifdef __cplusplus
4837ab47cfaaSmrg}
4838ab47cfaaSmrg#endif
4839ab47cfaaSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
4840ab47cfaaSmrgEOF
4841ab47cfaaSmrg
4842ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
4843ab47cfaaSmrg    # Now try to grab the symbols.
4844ab47cfaaSmrg    nlist=conftest.nm
4845ab47cfaaSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4846ab47cfaaSmrg      # Try sorting and uniquifying the output.
4847ab47cfaaSmrg      if sort "$nlist" | uniq > "$nlist"T; then
4848ab47cfaaSmrg	mv -f "$nlist"T "$nlist"
4849ab47cfaaSmrg      else
4850ab47cfaaSmrg	rm -f "$nlist"T
4851ab47cfaaSmrg      fi
4852ab47cfaaSmrg
4853ab47cfaaSmrg      # Make sure that we snagged all the symbols we need.
4854ab47cfaaSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4855ab47cfaaSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4856ab47cfaaSmrg	  cat <<EOF > conftest.$ac_ext
4857ab47cfaaSmrg#ifdef __cplusplus
4858ab47cfaaSmrgextern "C" {
4859ab47cfaaSmrg#endif
4860ab47cfaaSmrg
4861ab47cfaaSmrgEOF
4862ab47cfaaSmrg	  # Now generate the symbol file.
4863ab47cfaaSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4864ab47cfaaSmrg
4865ab47cfaaSmrg	  cat <<EOF >> conftest.$ac_ext
4866ab47cfaaSmrg#if defined (__STDC__) && __STDC__
4867ab47cfaaSmrg# define lt_ptr_t void *
4868ab47cfaaSmrg#else
4869ab47cfaaSmrg# define lt_ptr_t char *
4870ab47cfaaSmrg# define const
4871ab47cfaaSmrg#endif
4872ab47cfaaSmrg
4873ab47cfaaSmrg/* The mapping between symbol names and symbols. */
4874ab47cfaaSmrgconst struct {
4875ab47cfaaSmrg  const char *name;
4876ab47cfaaSmrg  lt_ptr_t address;
4877ab47cfaaSmrg}
4878ab47cfaaSmrglt_preloaded_symbols[[]] =
4879ab47cfaaSmrg{
4880ab47cfaaSmrgEOF
4881ab47cfaaSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4882ab47cfaaSmrg	  cat <<\EOF >> conftest.$ac_ext
4883ab47cfaaSmrg  {0, (lt_ptr_t) 0}
4884ab47cfaaSmrg};
4885ab47cfaaSmrg
4886ab47cfaaSmrg#ifdef __cplusplus
4887ab47cfaaSmrg}
4888ab47cfaaSmrg#endif
4889ab47cfaaSmrgEOF
4890ab47cfaaSmrg	  # Now try linking the two files.
4891ab47cfaaSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
4892ab47cfaaSmrg	  lt_save_LIBS="$LIBS"
4893ab47cfaaSmrg	  lt_save_CFLAGS="$CFLAGS"
4894ab47cfaaSmrg	  LIBS="conftstm.$ac_objext"
4895ab47cfaaSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4896ab47cfaaSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4897ab47cfaaSmrg	    pipe_works=yes
4898ab47cfaaSmrg	  fi
4899ab47cfaaSmrg	  LIBS="$lt_save_LIBS"
4900ab47cfaaSmrg	  CFLAGS="$lt_save_CFLAGS"
4901ab47cfaaSmrg	else
4902ab47cfaaSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4903ab47cfaaSmrg	fi
4904ab47cfaaSmrg      else
4905ab47cfaaSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4906ab47cfaaSmrg      fi
4907ab47cfaaSmrg    else
4908ab47cfaaSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4909ab47cfaaSmrg    fi
4910ab47cfaaSmrg  else
4911ab47cfaaSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4912ab47cfaaSmrg    cat conftest.$ac_ext >&5
4913ab47cfaaSmrg  fi
4914ab47cfaaSmrg  rm -f conftest* conftst*
4915ab47cfaaSmrg
4916ab47cfaaSmrg  # Do not use the global_symbol_pipe unless it works.
4917ab47cfaaSmrg  if test "$pipe_works" = yes; then
4918ab47cfaaSmrg    break
4919ab47cfaaSmrg  else
4920ab47cfaaSmrg    lt_cv_sys_global_symbol_pipe=
4921ab47cfaaSmrg  fi
4922ab47cfaaSmrgdone
4923ab47cfaaSmrg])
4924ab47cfaaSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4925ab47cfaaSmrg  lt_cv_sys_global_symbol_to_cdecl=
4926ab47cfaaSmrgfi
4927ab47cfaaSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4928ab47cfaaSmrg  AC_MSG_RESULT(failed)
4929ab47cfaaSmrgelse
4930ab47cfaaSmrg  AC_MSG_RESULT(ok)
4931ab47cfaaSmrgfi
4932ab47cfaaSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4933ab47cfaaSmrg
4934ab47cfaaSmrg
4935ab47cfaaSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4936ab47cfaaSmrg# ---------------------------------------
4937ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4938ab47cfaaSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4939ab47cfaaSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4940ab47cfaaSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4941ab47cfaaSmrg
4942ab47cfaaSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
4943ab47cfaaSmrg ifelse([$1],[CXX],[
4944ab47cfaaSmrg  # C++ specific cases for pic, static, wl, etc.
4945ab47cfaaSmrg  if test "$GXX" = yes; then
4946ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4947ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4948ab47cfaaSmrg
4949ab47cfaaSmrg    case $host_os in
4950ab47cfaaSmrg    aix*)
4951ab47cfaaSmrg      # All AIX code is PIC.
4952ab47cfaaSmrg      if test "$host_cpu" = ia64; then
4953ab47cfaaSmrg	# AIX 5 now supports IA64 processor
4954ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4955ab47cfaaSmrg      fi
4956ab47cfaaSmrg      ;;
4957ab47cfaaSmrg    amigaos*)
4958ab47cfaaSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
4959ab47cfaaSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
4960ab47cfaaSmrg      # like `-m68040'.
4961ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4962ab47cfaaSmrg      ;;
49638697ee19Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4964ab47cfaaSmrg      # PIC is the default for these OSes.
4965ab47cfaaSmrg      ;;
49668697ee19Smrg    mingw* | cygwin* | os2* | pw32*)
4967ab47cfaaSmrg      # This hack is so that the source file can tell whether it is being
4968ab47cfaaSmrg      # built for inclusion in a dll (and should export symbols for example).
49698697ee19Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
49708697ee19Smrg      # (--disable-auto-import) libraries
4971ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4972ab47cfaaSmrg      ;;
4973ab47cfaaSmrg    darwin* | rhapsody*)
4974ab47cfaaSmrg      # PIC is the default on this platform
4975ab47cfaaSmrg      # Common symbols not allowed in MH_DYLIB files
4976ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4977ab47cfaaSmrg      ;;
4978ab47cfaaSmrg    *djgpp*)
4979ab47cfaaSmrg      # DJGPP does not support shared libraries at all
4980ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4981ab47cfaaSmrg      ;;
49828697ee19Smrg    interix[[3-9]]*)
4983ab47cfaaSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4984ab47cfaaSmrg      # Instead, we relocate shared libraries at runtime.
4985ab47cfaaSmrg      ;;
4986ab47cfaaSmrg    sysv4*MP*)
4987ab47cfaaSmrg      if test -d /usr/nec; then
4988ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4989ab47cfaaSmrg      fi
4990ab47cfaaSmrg      ;;
4991ab47cfaaSmrg    hpux*)
4992ab47cfaaSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4993ab47cfaaSmrg      # not for PA HP-UX.
4994ab47cfaaSmrg      case $host_cpu in
4995ab47cfaaSmrg      hppa*64*|ia64*)
4996ab47cfaaSmrg	;;
4997ab47cfaaSmrg      *)
4998ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4999ab47cfaaSmrg	;;
5000ab47cfaaSmrg      esac
5001ab47cfaaSmrg      ;;
5002ab47cfaaSmrg    *)
5003ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5004ab47cfaaSmrg      ;;
5005ab47cfaaSmrg    esac
5006ab47cfaaSmrg  else
5007ab47cfaaSmrg    case $host_os in
5008ab47cfaaSmrg      aix4* | aix5*)
5009ab47cfaaSmrg	# All AIX code is PIC.
5010ab47cfaaSmrg	if test "$host_cpu" = ia64; then
5011ab47cfaaSmrg	  # AIX 5 now supports IA64 processor
5012ab47cfaaSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5013ab47cfaaSmrg	else
5014ab47cfaaSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5015ab47cfaaSmrg	fi
5016ab47cfaaSmrg	;;
5017ab47cfaaSmrg      chorus*)
5018ab47cfaaSmrg	case $cc_basename in
5019ab47cfaaSmrg	cxch68*)
5020ab47cfaaSmrg	  # Green Hills C++ Compiler
5021ab47cfaaSmrg	  # _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"
5022ab47cfaaSmrg	  ;;
5023ab47cfaaSmrg	esac
5024ab47cfaaSmrg	;;
5025ab47cfaaSmrg       darwin*)
5026ab47cfaaSmrg         # PIC is the default on this platform
5027ab47cfaaSmrg         # Common symbols not allowed in MH_DYLIB files
5028ab47cfaaSmrg         case $cc_basename in
5029ab47cfaaSmrg           xlc*)
5030ab47cfaaSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5031ab47cfaaSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5032ab47cfaaSmrg           ;;
5033ab47cfaaSmrg         esac
5034ab47cfaaSmrg       ;;
5035ab47cfaaSmrg      dgux*)
5036ab47cfaaSmrg	case $cc_basename in
5037ab47cfaaSmrg	  ec++*)
5038ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5039ab47cfaaSmrg	    ;;
5040ab47cfaaSmrg	  ghcx*)
5041ab47cfaaSmrg	    # Green Hills C++ Compiler
5042ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5043ab47cfaaSmrg	    ;;
5044ab47cfaaSmrg	  *)
5045ab47cfaaSmrg	    ;;
5046ab47cfaaSmrg	esac
5047ab47cfaaSmrg	;;
5048ab47cfaaSmrg      freebsd* | dragonfly*)
5049ab47cfaaSmrg	# FreeBSD uses GNU C++
5050ab47cfaaSmrg	;;
5051ab47cfaaSmrg      hpux9* | hpux10* | hpux11*)
5052ab47cfaaSmrg	case $cc_basename in
5053ab47cfaaSmrg	  CC*)
5054ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5055ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5056ab47cfaaSmrg	    if test "$host_cpu" != ia64; then
5057ab47cfaaSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5058ab47cfaaSmrg	    fi
5059ab47cfaaSmrg	    ;;
5060ab47cfaaSmrg	  aCC*)
5061ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5062ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5063ab47cfaaSmrg	    case $host_cpu in
5064ab47cfaaSmrg	    hppa*64*|ia64*)
5065ab47cfaaSmrg	      # +Z the default
5066ab47cfaaSmrg	      ;;
5067ab47cfaaSmrg	    *)
5068ab47cfaaSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5069ab47cfaaSmrg	      ;;
5070ab47cfaaSmrg	    esac
5071ab47cfaaSmrg	    ;;
5072ab47cfaaSmrg	  *)
5073ab47cfaaSmrg	    ;;
5074ab47cfaaSmrg	esac
5075ab47cfaaSmrg	;;
5076ab47cfaaSmrg      interix*)
5077ab47cfaaSmrg	# This is c89, which is MS Visual C++ (no shared libs)
5078ab47cfaaSmrg	# Anyone wants to do a port?
5079ab47cfaaSmrg	;;
5080ab47cfaaSmrg      irix5* | irix6* | nonstopux*)
5081ab47cfaaSmrg	case $cc_basename in
5082ab47cfaaSmrg	  CC*)
5083ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5084ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5085ab47cfaaSmrg	    # CC pic flag -KPIC is the default.
5086ab47cfaaSmrg	    ;;
5087ab47cfaaSmrg	  *)
5088ab47cfaaSmrg	    ;;
5089ab47cfaaSmrg	esac
5090ab47cfaaSmrg	;;
5091ab47cfaaSmrg      linux* | k*bsd*-gnu)
5092ab47cfaaSmrg	case $cc_basename in
5093ab47cfaaSmrg	  KCC*)
5094ab47cfaaSmrg	    # KAI C++ Compiler
5095ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5096ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5097ab47cfaaSmrg	    ;;
5098ab47cfaaSmrg	  icpc* | ecpc*)
5099ab47cfaaSmrg	    # Intel C++
5100ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5101ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5102ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5103ab47cfaaSmrg	    ;;
5104ab47cfaaSmrg	  pgCC*)
5105ab47cfaaSmrg	    # Portland Group C++ compiler.
5106ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5107ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5108ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5109ab47cfaaSmrg	    ;;
5110ab47cfaaSmrg	  cxx*)
5111ab47cfaaSmrg	    # Compaq C++
5112ab47cfaaSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5113ab47cfaaSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5114ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5115ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5116ab47cfaaSmrg	    ;;
5117ab47cfaaSmrg	  *)
51188697ee19Smrg	    case `$CC -V 2>&1 | sed 5q` in
51198697ee19Smrg	    *Sun\ C*)
51208697ee19Smrg	      # Sun C++ 5.9
51218697ee19Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
51228697ee19Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
51238697ee19Smrg	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
51248697ee19Smrg	      ;;
51258697ee19Smrg	    esac
5126ab47cfaaSmrg	    ;;
5127ab47cfaaSmrg	esac
5128ab47cfaaSmrg	;;
5129ab47cfaaSmrg      lynxos*)
5130ab47cfaaSmrg	;;
5131ab47cfaaSmrg      m88k*)
5132ab47cfaaSmrg	;;
5133ab47cfaaSmrg      mvs*)
5134ab47cfaaSmrg	case $cc_basename in
5135ab47cfaaSmrg	  cxx*)
5136ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
5137ab47cfaaSmrg	    ;;
5138ab47cfaaSmrg	  *)
5139ab47cfaaSmrg	    ;;
5140ab47cfaaSmrg	esac
5141ab47cfaaSmrg	;;
51428697ee19Smrg      netbsd*)
5143ab47cfaaSmrg	;;
5144ab47cfaaSmrg      osf3* | osf4* | osf5*)
5145ab47cfaaSmrg	case $cc_basename in
5146ab47cfaaSmrg	  KCC*)
5147ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5148ab47cfaaSmrg	    ;;
5149ab47cfaaSmrg	  RCC*)
5150ab47cfaaSmrg	    # Rational C++ 2.4.1
5151ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5152ab47cfaaSmrg	    ;;
5153ab47cfaaSmrg	  cxx*)
5154ab47cfaaSmrg	    # Digital/Compaq C++
5155ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5156ab47cfaaSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5157ab47cfaaSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5158ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5159ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5160ab47cfaaSmrg	    ;;
5161ab47cfaaSmrg	  *)
5162ab47cfaaSmrg	    ;;
5163ab47cfaaSmrg	esac
5164ab47cfaaSmrg	;;
5165ab47cfaaSmrg      psos*)
5166ab47cfaaSmrg	;;
5167ab47cfaaSmrg      solaris*)
5168ab47cfaaSmrg	case $cc_basename in
5169ab47cfaaSmrg	  CC*)
5170ab47cfaaSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
5171ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5172ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5173ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5174ab47cfaaSmrg	    ;;
5175ab47cfaaSmrg	  gcx*)
5176ab47cfaaSmrg	    # Green Hills C++ Compiler
5177ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5178ab47cfaaSmrg	    ;;
5179ab47cfaaSmrg	  *)
5180ab47cfaaSmrg	    ;;
5181ab47cfaaSmrg	esac
5182ab47cfaaSmrg	;;
5183ab47cfaaSmrg      sunos4*)
5184ab47cfaaSmrg	case $cc_basename in
5185ab47cfaaSmrg	  CC*)
5186ab47cfaaSmrg	    # Sun C++ 4.x
5187ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5188ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5189ab47cfaaSmrg	    ;;
5190ab47cfaaSmrg	  lcc*)
5191ab47cfaaSmrg	    # Lucid
5192ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5193ab47cfaaSmrg	    ;;
5194ab47cfaaSmrg	  *)
5195ab47cfaaSmrg	    ;;
5196ab47cfaaSmrg	esac
5197ab47cfaaSmrg	;;
5198ab47cfaaSmrg      tandem*)
5199ab47cfaaSmrg	case $cc_basename in
5200ab47cfaaSmrg	  NCC*)
5201ab47cfaaSmrg	    # NonStop-UX NCC 3.20
5202ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5203ab47cfaaSmrg	    ;;
5204ab47cfaaSmrg	  *)
5205ab47cfaaSmrg	    ;;
5206ab47cfaaSmrg	esac
5207ab47cfaaSmrg	;;
5208ab47cfaaSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5209ab47cfaaSmrg	case $cc_basename in
5210ab47cfaaSmrg	  CC*)
5211ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5212ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5213ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5214ab47cfaaSmrg	    ;;
5215ab47cfaaSmrg	esac
5216ab47cfaaSmrg	;;
5217ab47cfaaSmrg      vxworks*)
5218ab47cfaaSmrg	;;
5219ab47cfaaSmrg      *)
5220ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5221ab47cfaaSmrg	;;
5222ab47cfaaSmrg    esac
5223ab47cfaaSmrg  fi
5224ab47cfaaSmrg],
5225ab47cfaaSmrg[
5226ab47cfaaSmrg  if test "$GCC" = yes; then
5227ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5228ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5229ab47cfaaSmrg
5230ab47cfaaSmrg    case $host_os in
5231ab47cfaaSmrg      aix*)
5232ab47cfaaSmrg      # All AIX code is PIC.
5233ab47cfaaSmrg      if test "$host_cpu" = ia64; then
5234ab47cfaaSmrg	# AIX 5 now supports IA64 processor
5235ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5236ab47cfaaSmrg      fi
5237ab47cfaaSmrg      ;;
5238ab47cfaaSmrg
5239ab47cfaaSmrg    amigaos*)
5240ab47cfaaSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
5241ab47cfaaSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
5242ab47cfaaSmrg      # like `-m68040'.
5243ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5244ab47cfaaSmrg      ;;
5245ab47cfaaSmrg
52468697ee19Smrg    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5247ab47cfaaSmrg      # PIC is the default for these OSes.
5248ab47cfaaSmrg      ;;
5249ab47cfaaSmrg
52508697ee19Smrg    mingw* | cygwin* | pw32* | os2*)
5251ab47cfaaSmrg      # This hack is so that the source file can tell whether it is being
5252ab47cfaaSmrg      # built for inclusion in a dll (and should export symbols for example).
52538697ee19Smrg      # Although the cygwin gcc ignores -fPIC, still need this for old-style
52548697ee19Smrg      # (--disable-auto-import) libraries
5255ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5256ab47cfaaSmrg      ;;
5257ab47cfaaSmrg
5258ab47cfaaSmrg    darwin* | rhapsody*)
5259ab47cfaaSmrg      # PIC is the default on this platform
5260ab47cfaaSmrg      # Common symbols not allowed in MH_DYLIB files
5261ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5262ab47cfaaSmrg      ;;
5263ab47cfaaSmrg
52648697ee19Smrg    interix[[3-9]]*)
5265ab47cfaaSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5266ab47cfaaSmrg      # Instead, we relocate shared libraries at runtime.
5267ab47cfaaSmrg      ;;
5268ab47cfaaSmrg
5269ab47cfaaSmrg    msdosdjgpp*)
5270ab47cfaaSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
5271ab47cfaaSmrg      # on systems that don't support them.
5272ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5273ab47cfaaSmrg      enable_shared=no
5274ab47cfaaSmrg      ;;
5275ab47cfaaSmrg
5276ab47cfaaSmrg    sysv4*MP*)
5277ab47cfaaSmrg      if test -d /usr/nec; then
5278ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5279ab47cfaaSmrg      fi
5280ab47cfaaSmrg      ;;
5281ab47cfaaSmrg
5282ab47cfaaSmrg    hpux*)
5283ab47cfaaSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5284ab47cfaaSmrg      # not for PA HP-UX.
5285ab47cfaaSmrg      case $host_cpu in
5286ab47cfaaSmrg      hppa*64*|ia64*)
5287ab47cfaaSmrg	# +Z the default
5288ab47cfaaSmrg	;;
5289ab47cfaaSmrg      *)
5290ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5291ab47cfaaSmrg	;;
5292ab47cfaaSmrg      esac
5293ab47cfaaSmrg      ;;
5294ab47cfaaSmrg
5295ab47cfaaSmrg    *)
5296ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5297ab47cfaaSmrg      ;;
5298ab47cfaaSmrg    esac
5299ab47cfaaSmrg  else
5300ab47cfaaSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
5301ab47cfaaSmrg    case $host_os in
5302ab47cfaaSmrg    aix*)
5303ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5304ab47cfaaSmrg      if test "$host_cpu" = ia64; then
5305ab47cfaaSmrg	# AIX 5 now supports IA64 processor
5306ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5307ab47cfaaSmrg      else
5308ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5309ab47cfaaSmrg      fi
5310ab47cfaaSmrg      ;;
5311ab47cfaaSmrg      darwin*)
5312ab47cfaaSmrg        # PIC is the default on this platform
5313ab47cfaaSmrg        # Common symbols not allowed in MH_DYLIB files
5314ab47cfaaSmrg       case $cc_basename in
5315ab47cfaaSmrg         xlc*)
5316ab47cfaaSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5317ab47cfaaSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5318ab47cfaaSmrg         ;;
5319ab47cfaaSmrg       esac
5320ab47cfaaSmrg       ;;
5321ab47cfaaSmrg
53228697ee19Smrg    mingw* | cygwin* | pw32* | os2*)
5323ab47cfaaSmrg      # This hack is so that the source file can tell whether it is being
5324ab47cfaaSmrg      # built for inclusion in a dll (and should export symbols for example).
5325ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5326ab47cfaaSmrg      ;;
5327ab47cfaaSmrg
5328ab47cfaaSmrg    hpux9* | hpux10* | hpux11*)
5329ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5330ab47cfaaSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5331ab47cfaaSmrg      # not for PA HP-UX.
5332ab47cfaaSmrg      case $host_cpu in
5333ab47cfaaSmrg      hppa*64*|ia64*)
5334ab47cfaaSmrg	# +Z the default
5335ab47cfaaSmrg	;;
5336ab47cfaaSmrg      *)
5337ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5338ab47cfaaSmrg	;;
5339ab47cfaaSmrg      esac
5340ab47cfaaSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5341ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5342ab47cfaaSmrg      ;;
5343ab47cfaaSmrg
5344ab47cfaaSmrg    irix5* | irix6* | nonstopux*)
5345ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5346ab47cfaaSmrg      # PIC (with -KPIC) is the default.
5347ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5348ab47cfaaSmrg      ;;
5349ab47cfaaSmrg
5350ab47cfaaSmrg    newsos6)
5351ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5352ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5353ab47cfaaSmrg      ;;
5354ab47cfaaSmrg
5355ab47cfaaSmrg    linux* | k*bsd*-gnu)
5356ab47cfaaSmrg      case $cc_basename in
5357ab47cfaaSmrg      icc* | ecc*)
5358ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5359ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5360ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5361ab47cfaaSmrg        ;;
5362ab47cfaaSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
5363ab47cfaaSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
5364ab47cfaaSmrg	# which looks to be a dead project)
5365ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5366ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5367ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5368ab47cfaaSmrg        ;;
5369ab47cfaaSmrg      ccc*)
5370ab47cfaaSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5371ab47cfaaSmrg        # All Alpha code is PIC.
5372ab47cfaaSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5373ab47cfaaSmrg        ;;
53748697ee19Smrg      *)
53758697ee19Smrg        case `$CC -V 2>&1 | sed 5q` in
53768697ee19Smrg	*Sun\ C*)
53778697ee19Smrg	  # Sun C 5.9
53788697ee19Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
53798697ee19Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53808697ee19Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
53818697ee19Smrg	  ;;
53828697ee19Smrg	*Sun\ F*)
53838697ee19Smrg	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
53848697ee19Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
53858697ee19Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
53868697ee19Smrg	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
53878697ee19Smrg	  ;;
53888697ee19Smrg	esac
53898697ee19Smrg	;;
5390ab47cfaaSmrg      esac
5391ab47cfaaSmrg      ;;
5392ab47cfaaSmrg
5393ab47cfaaSmrg    osf3* | osf4* | osf5*)
5394ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5395ab47cfaaSmrg      # All OSF/1 code is PIC.
5396ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5397ab47cfaaSmrg      ;;
5398ab47cfaaSmrg
53998697ee19Smrg    rdos*)
54008697ee19Smrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
54018697ee19Smrg      ;;
54028697ee19Smrg
5403ab47cfaaSmrg    solaris*)
5404ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5405ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5406ab47cfaaSmrg      case $cc_basename in
5407ab47cfaaSmrg      f77* | f90* | f95*)
5408ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5409ab47cfaaSmrg      *)
5410ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5411ab47cfaaSmrg      esac
5412ab47cfaaSmrg      ;;
5413ab47cfaaSmrg
5414ab47cfaaSmrg    sunos4*)
5415ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5416ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5417ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5418ab47cfaaSmrg      ;;
5419ab47cfaaSmrg
5420ab47cfaaSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
5421ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5422ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5423ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5424ab47cfaaSmrg      ;;
5425ab47cfaaSmrg
5426ab47cfaaSmrg    sysv4*MP*)
5427ab47cfaaSmrg      if test -d /usr/nec ;then
5428ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5429ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5430ab47cfaaSmrg      fi
5431ab47cfaaSmrg      ;;
5432ab47cfaaSmrg
5433ab47cfaaSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5434ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5435ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5436ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5437ab47cfaaSmrg      ;;
5438ab47cfaaSmrg
5439ab47cfaaSmrg    unicos*)
5440ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5441ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5442ab47cfaaSmrg      ;;
5443ab47cfaaSmrg
5444ab47cfaaSmrg    uts4*)
5445ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5446ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5447ab47cfaaSmrg      ;;
5448ab47cfaaSmrg
5449ab47cfaaSmrg    *)
5450ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5451ab47cfaaSmrg      ;;
5452ab47cfaaSmrg    esac
5453ab47cfaaSmrg  fi
5454ab47cfaaSmrg])
5455ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5456ab47cfaaSmrg
5457ab47cfaaSmrg#
5458ab47cfaaSmrg# Check to make sure the PIC flag actually works.
5459ab47cfaaSmrg#
5460ab47cfaaSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5461ab47cfaaSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5462ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5463ab47cfaaSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5464ab47cfaaSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5465ab47cfaaSmrg     "" | " "*) ;;
5466ab47cfaaSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5467ab47cfaaSmrg     esac],
5468ab47cfaaSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5469ab47cfaaSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5470ab47cfaaSmrgfi
5471ab47cfaaSmrgcase $host_os in
5472ab47cfaaSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
5473ab47cfaaSmrg  *djgpp*)
5474ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5475ab47cfaaSmrg    ;;
5476ab47cfaaSmrg  *)
5477ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5478ab47cfaaSmrg    ;;
5479ab47cfaaSmrgesac
5480ab47cfaaSmrg
5481ab47cfaaSmrg#
5482ab47cfaaSmrg# Check to make sure the static flag actually works.
5483ab47cfaaSmrg#
5484ab47cfaaSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5485ab47cfaaSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5486ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5487ab47cfaaSmrg  $lt_tmp_static_flag,
5488ab47cfaaSmrg  [],
5489ab47cfaaSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5490ab47cfaaSmrg])
5491ab47cfaaSmrg
5492ab47cfaaSmrg
5493ab47cfaaSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5494ab47cfaaSmrg# ------------------------------------
5495ab47cfaaSmrg# See if the linker supports building shared libraries.
5496ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
54978697ee19Smrg[AC_REQUIRE([LT_AC_PROG_SED])dnl
54988697ee19SmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5499ab47cfaaSmrgifelse([$1],[CXX],[
5500ab47cfaaSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5501ab47cfaaSmrg  case $host_os in
5502ab47cfaaSmrg  aix4* | aix5*)
5503ab47cfaaSmrg    # If we're using GNU nm, then we don't want the "-C" option.
5504ab47cfaaSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5505ab47cfaaSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5506ab47cfaaSmrg      _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'
5507ab47cfaaSmrg    else
5508ab47cfaaSmrg      _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'
5509ab47cfaaSmrg    fi
5510ab47cfaaSmrg    ;;
5511ab47cfaaSmrg  pw32*)
5512ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5513ab47cfaaSmrg  ;;
5514ab47cfaaSmrg  cygwin* | mingw*)
55158697ee19Smrg    _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'
5516ab47cfaaSmrg  ;;
5517ab47cfaaSmrg  *)
5518ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5519ab47cfaaSmrg  ;;
5520ab47cfaaSmrg  esac
5521ab47cfaaSmrg],[
5522ab47cfaaSmrg  runpath_var=
5523ab47cfaaSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5524ab47cfaaSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5525ab47cfaaSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
5526ab47cfaaSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5527ab47cfaaSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5528ab47cfaaSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5529ab47cfaaSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5530ab47cfaaSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5531ab47cfaaSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5532ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5533ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5534ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5535ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5536ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5537ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5538ab47cfaaSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5539ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5540ab47cfaaSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
5541ab47cfaaSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5542ab47cfaaSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5543ab47cfaaSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5544ab47cfaaSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
5545ab47cfaaSmrg  # included in the symbol list
5546ab47cfaaSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
5547ab47cfaaSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5548ab47cfaaSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5549ab47cfaaSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5550ab47cfaaSmrg  # as well as any symbol that contains `d'.
5551ab47cfaaSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5552ab47cfaaSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5553ab47cfaaSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5554ab47cfaaSmrg  # the symbol is explicitly referenced.  Since portable code cannot
5555ab47cfaaSmrg  # rely on this symbol name, it's probably fine to never include it in
5556ab47cfaaSmrg  # preloaded symbol tables.
5557ab47cfaaSmrg  extract_expsyms_cmds=
5558ab47cfaaSmrg  # Just being paranoid about ensuring that cc_basename is set.
5559ab47cfaaSmrg  _LT_CC_BASENAME([$compiler])
5560ab47cfaaSmrg  case $host_os in
5561ab47cfaaSmrg  cygwin* | mingw* | pw32*)
5562ab47cfaaSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5563ab47cfaaSmrg    # When not using gcc, we currently assume that we are using
5564ab47cfaaSmrg    # Microsoft Visual C++.
5565ab47cfaaSmrg    if test "$GCC" != yes; then
5566ab47cfaaSmrg      with_gnu_ld=no
5567ab47cfaaSmrg    fi
5568ab47cfaaSmrg    ;;
5569ab47cfaaSmrg  interix*)
5570ab47cfaaSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
5571ab47cfaaSmrg    with_gnu_ld=yes
5572ab47cfaaSmrg    ;;
5573ab47cfaaSmrg  openbsd*)
5574ab47cfaaSmrg    with_gnu_ld=no
5575ab47cfaaSmrg    ;;
5576ab47cfaaSmrg  esac
5577ab47cfaaSmrg
5578ab47cfaaSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5579ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
5580ab47cfaaSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5581ab47cfaaSmrg    wlarc='${wl}'
5582ab47cfaaSmrg
5583ab47cfaaSmrg    # Set some defaults for GNU ld with shared library support. These
5584ab47cfaaSmrg    # are reset later if shared libraries are not supported. Putting them
5585ab47cfaaSmrg    # here allows them to be overridden if necessary.
5586ab47cfaaSmrg    runpath_var=LD_RUN_PATH
5587ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5588ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5589ab47cfaaSmrg    # ancient GNU ld didn't support --whole-archive et. al.
5590ab47cfaaSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5591ab47cfaaSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5592ab47cfaaSmrg      else
5593ab47cfaaSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5594ab47cfaaSmrg    fi
5595ab47cfaaSmrg    supports_anon_versioning=no
5596ab47cfaaSmrg    case `$LD -v 2>/dev/null` in
5597ab47cfaaSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5598ab47cfaaSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5599ab47cfaaSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5600ab47cfaaSmrg      *\ 2.11.*) ;; # other 2.11 versions
5601ab47cfaaSmrg      *) supports_anon_versioning=yes ;;
5602ab47cfaaSmrg    esac
5603ab47cfaaSmrg
5604ab47cfaaSmrg    # See if GNU ld supports shared libraries.
5605ab47cfaaSmrg    case $host_os in
5606ab47cfaaSmrg    aix3* | aix4* | aix5*)
5607ab47cfaaSmrg      # On AIX/PPC, the GNU linker is very broken
5608ab47cfaaSmrg      if test "$host_cpu" != ia64; then
5609ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5610ab47cfaaSmrg	cat <<EOF 1>&2
5611ab47cfaaSmrg
5612ab47cfaaSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5613ab47cfaaSmrg*** to be unable to reliably create shared libraries on AIX.
5614ab47cfaaSmrg*** Therefore, libtool is disabling shared libraries support.  If you
5615ab47cfaaSmrg*** really care for shared libraries, you may want to modify your PATH
5616ab47cfaaSmrg*** so that a non-GNU linker is found, and then restart.
5617ab47cfaaSmrg
5618ab47cfaaSmrgEOF
5619ab47cfaaSmrg      fi
5620ab47cfaaSmrg      ;;
5621ab47cfaaSmrg
5622ab47cfaaSmrg    amigaos*)
5623ab47cfaaSmrg      _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)'
5624ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5625ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5626ab47cfaaSmrg
5627ab47cfaaSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5628ab47cfaaSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
5629ab47cfaaSmrg      # to version 4, is to share data among multiple programs linked
5630ab47cfaaSmrg      # with the same dynamic library.  Since this doesn't match the
5631ab47cfaaSmrg      # behavior of shared libraries on other platforms, we can't use
5632ab47cfaaSmrg      # them.
5633ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5634ab47cfaaSmrg      ;;
5635ab47cfaaSmrg
5636ab47cfaaSmrg    beos*)
5637ab47cfaaSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5638ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5639ab47cfaaSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5640ab47cfaaSmrg	# support --undefined.  This deserves some investigation.  FIXME
5641ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5642ab47cfaaSmrg      else
5643ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5644ab47cfaaSmrg      fi
5645ab47cfaaSmrg      ;;
5646ab47cfaaSmrg
5647ab47cfaaSmrg    cygwin* | mingw* | pw32*)
5648ab47cfaaSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5649ab47cfaaSmrg      # as there is no search path for DLLs.
5650ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5651ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5652ab47cfaaSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5653ab47cfaaSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
56548697ee19Smrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5655ab47cfaaSmrg
5656ab47cfaaSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5657ab47cfaaSmrg        _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'
5658ab47cfaaSmrg	# If the export-symbols file already is a .def file (1st line
5659ab47cfaaSmrg	# is EXPORTS), use it as is; otherwise, prepend...
5660ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5661ab47cfaaSmrg	  cp $export_symbols $output_objdir/$soname.def;
5662ab47cfaaSmrg	else
5663ab47cfaaSmrg	  echo EXPORTS > $output_objdir/$soname.def;
5664ab47cfaaSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
5665ab47cfaaSmrg	fi~
5666ab47cfaaSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5667ab47cfaaSmrg      else
5668ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5669ab47cfaaSmrg      fi
5670ab47cfaaSmrg      ;;
5671ab47cfaaSmrg
56728697ee19Smrg    interix[[3-9]]*)
5673ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5674ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5675ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5676ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5677ab47cfaaSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5678ab47cfaaSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5679ab47cfaaSmrg      # default) and relocated if they conflict, which is a slow very memory
5680ab47cfaaSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5681ab47cfaaSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5682ab47cfaaSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5683ab47cfaaSmrg      _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'
5684ab47cfaaSmrg      _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'
5685ab47cfaaSmrg      ;;
5686ab47cfaaSmrg
56878697ee19Smrg    gnu* | linux* | k*bsd*-gnu)
5688ab47cfaaSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5689ab47cfaaSmrg	tmp_addflag=
5690ab47cfaaSmrg	case $cc_basename,$host_cpu in
5691ab47cfaaSmrg	pgcc*)				# Portland Group C compiler
5692ab47cfaaSmrg	  _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'
5693ab47cfaaSmrg	  tmp_addflag=' $pic_flag'
5694ab47cfaaSmrg	  ;;
5695ab47cfaaSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5696ab47cfaaSmrg	  _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'
5697ab47cfaaSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5698ab47cfaaSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5699ab47cfaaSmrg	  tmp_addflag=' -i_dynamic' ;;
5700ab47cfaaSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5701ab47cfaaSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5702ab47cfaaSmrg	ifc* | ifort*)			# Intel Fortran compiler
5703ab47cfaaSmrg	  tmp_addflag=' -nofor_main' ;;
5704ab47cfaaSmrg	esac
57058697ee19Smrg	case `$CC -V 2>&1 | sed 5q` in
57068697ee19Smrg	*Sun\ C*)			# Sun C 5.9
57078697ee19Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
57088697ee19Smrg	  tmp_sharedflag='-G' ;;
57098697ee19Smrg	*Sun\ F*)			# Sun Fortran 8.3
57108697ee19Smrg	  tmp_sharedflag='-G' ;;
57118697ee19Smrg	*)
57128697ee19Smrg	  tmp_sharedflag='-shared' ;;
57138697ee19Smrg	esac
57148697ee19Smrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5715ab47cfaaSmrg
5716ab47cfaaSmrg	if test $supports_anon_versioning = yes; then
5717ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5718ab47cfaaSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5719ab47cfaaSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
57208697ee19Smrg	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5721ab47cfaaSmrg	fi
5722ab47cfaaSmrg      else
5723ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5724ab47cfaaSmrg      fi
5725ab47cfaaSmrg      ;;
5726ab47cfaaSmrg
57278697ee19Smrg    netbsd*)
5728ab47cfaaSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5729ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5730ab47cfaaSmrg	wlarc=
5731ab47cfaaSmrg      else
5732ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5733ab47cfaaSmrg	_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'
5734ab47cfaaSmrg      fi
5735ab47cfaaSmrg      ;;
5736ab47cfaaSmrg
5737ab47cfaaSmrg    solaris*)
5738ab47cfaaSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5739ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5740ab47cfaaSmrg	cat <<EOF 1>&2
5741ab47cfaaSmrg
5742ab47cfaaSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5743ab47cfaaSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
5744ab47cfaaSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5745ab47cfaaSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5746ab47cfaaSmrg*** your PATH or compiler configuration so that the native linker is
5747ab47cfaaSmrg*** used, and then restart.
5748ab47cfaaSmrg
5749ab47cfaaSmrgEOF
5750ab47cfaaSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5751ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5752ab47cfaaSmrg	_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'
5753ab47cfaaSmrg      else
5754ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5755ab47cfaaSmrg      fi
5756ab47cfaaSmrg      ;;
5757ab47cfaaSmrg
5758ab47cfaaSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5759ab47cfaaSmrg      case `$LD -v 2>&1` in
57608697ee19Smrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5761ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5762ab47cfaaSmrg	cat <<_LT_EOF 1>&2
5763ab47cfaaSmrg
5764ab47cfaaSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5765ab47cfaaSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5766ab47cfaaSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5767ab47cfaaSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5768ab47cfaaSmrg*** your PATH or compiler configuration so that the native linker is
5769ab47cfaaSmrg*** used, and then restart.
5770ab47cfaaSmrg
5771ab47cfaaSmrg_LT_EOF
5772ab47cfaaSmrg	;;
5773ab47cfaaSmrg	*)
5774ab47cfaaSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5775ab47cfaaSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5776ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5777ab47cfaaSmrg	    _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'
5778ab47cfaaSmrg	  else
5779ab47cfaaSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5780ab47cfaaSmrg	  fi
5781ab47cfaaSmrg	;;
5782ab47cfaaSmrg      esac
5783ab47cfaaSmrg      ;;
5784ab47cfaaSmrg
5785ab47cfaaSmrg    sunos4*)
5786ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5787ab47cfaaSmrg      wlarc=
5788ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5789ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5790ab47cfaaSmrg      ;;
5791ab47cfaaSmrg
5792ab47cfaaSmrg    *)
5793ab47cfaaSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5794ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5795ab47cfaaSmrg	_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'
5796ab47cfaaSmrg      else
5797ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5798ab47cfaaSmrg      fi
5799ab47cfaaSmrg      ;;
5800ab47cfaaSmrg    esac
5801ab47cfaaSmrg
5802ab47cfaaSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5803ab47cfaaSmrg      runpath_var=
5804ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5805ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5806ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5807ab47cfaaSmrg    fi
5808ab47cfaaSmrg  else
5809ab47cfaaSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
5810ab47cfaaSmrg    case $host_os in
5811ab47cfaaSmrg    aix3*)
5812ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5813ab47cfaaSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5814ab47cfaaSmrg      _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'
5815ab47cfaaSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
5816ab47cfaaSmrg      # are no directories specified by -L.
5817ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5818ab47cfaaSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5819ab47cfaaSmrg	# Neither direct hardcoding nor static linking is supported with a
5820ab47cfaaSmrg	# broken collect2.
5821ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5822ab47cfaaSmrg      fi
5823ab47cfaaSmrg      ;;
5824ab47cfaaSmrg
5825ab47cfaaSmrg    aix4* | aix5*)
5826ab47cfaaSmrg      if test "$host_cpu" = ia64; then
5827ab47cfaaSmrg	# On IA64, the linker does run time linking by default, so we don't
5828ab47cfaaSmrg	# have to do anything special.
5829ab47cfaaSmrg	aix_use_runtimelinking=no
5830ab47cfaaSmrg	exp_sym_flag='-Bexport'
5831ab47cfaaSmrg	no_entry_flag=""
5832ab47cfaaSmrg      else
5833ab47cfaaSmrg	# If we're using GNU nm, then we don't want the "-C" option.
5834ab47cfaaSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5835ab47cfaaSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5836ab47cfaaSmrg	  _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'
5837ab47cfaaSmrg	else
5838ab47cfaaSmrg	  _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'
5839ab47cfaaSmrg	fi
5840ab47cfaaSmrg	aix_use_runtimelinking=no
5841ab47cfaaSmrg
5842ab47cfaaSmrg	# Test if we are trying to use run time linking or normal
5843ab47cfaaSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5844ab47cfaaSmrg	# need to do runtime linking.
5845ab47cfaaSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5846ab47cfaaSmrg	  for ld_flag in $LDFLAGS; do
5847ab47cfaaSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5848ab47cfaaSmrg  	    aix_use_runtimelinking=yes
5849ab47cfaaSmrg  	    break
5850ab47cfaaSmrg  	  fi
5851ab47cfaaSmrg	  done
5852ab47cfaaSmrg	  ;;
5853ab47cfaaSmrg	esac
5854ab47cfaaSmrg
5855ab47cfaaSmrg	exp_sym_flag='-bexport'
5856ab47cfaaSmrg	no_entry_flag='-bnoentry'
5857ab47cfaaSmrg      fi
5858ab47cfaaSmrg
5859ab47cfaaSmrg      # When large executables or shared objects are built, AIX ld can
5860ab47cfaaSmrg      # have problems creating the table of contents.  If linking a library
5861ab47cfaaSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
5862ab47cfaaSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5863ab47cfaaSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5864ab47cfaaSmrg
5865ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
5866ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5867ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5868ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5869ab47cfaaSmrg
5870ab47cfaaSmrg      if test "$GCC" = yes; then
5871ab47cfaaSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5872ab47cfaaSmrg	# We only want to do this on AIX 4.2 and lower, the check
5873ab47cfaaSmrg	# below for broken collect2 doesn't work under 4.3+
5874ab47cfaaSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5875ab47cfaaSmrg	  if test -f "$collect2name" && \
5876ab47cfaaSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5877ab47cfaaSmrg	  then
5878ab47cfaaSmrg  	  # We have reworked collect2
58798697ee19Smrg  	  :
5880ab47cfaaSmrg	  else
5881ab47cfaaSmrg  	  # We have old collect2
5882ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5883ab47cfaaSmrg  	  # It fails to find uninstalled libraries when the uninstalled
5884ab47cfaaSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5885ab47cfaaSmrg  	  # to unsupported forces relinking
5886ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5887ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5888ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5889ab47cfaaSmrg	  fi
5890ab47cfaaSmrg	  ;;
5891ab47cfaaSmrg	esac
5892ab47cfaaSmrg	shared_flag='-shared'
5893ab47cfaaSmrg	if test "$aix_use_runtimelinking" = yes; then
5894ab47cfaaSmrg	  shared_flag="$shared_flag "'${wl}-G'
5895ab47cfaaSmrg	fi
5896ab47cfaaSmrg      else
5897ab47cfaaSmrg	# not using gcc
5898ab47cfaaSmrg	if test "$host_cpu" = ia64; then
5899ab47cfaaSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5900ab47cfaaSmrg  	# chokes on -Wl,-G. The following line is correct:
5901ab47cfaaSmrg	  shared_flag='-G'
5902ab47cfaaSmrg	else
5903ab47cfaaSmrg	  if test "$aix_use_runtimelinking" = yes; then
5904ab47cfaaSmrg	    shared_flag='${wl}-G'
5905ab47cfaaSmrg	  else
5906ab47cfaaSmrg	    shared_flag='${wl}-bM:SRE'
5907ab47cfaaSmrg	  fi
5908ab47cfaaSmrg	fi
5909ab47cfaaSmrg      fi
5910ab47cfaaSmrg
5911ab47cfaaSmrg      # It seems that -bexpall does not export symbols beginning with
5912ab47cfaaSmrg      # underscore (_), so it is better to generate a list of symbols to export.
5913ab47cfaaSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5914ab47cfaaSmrg      if test "$aix_use_runtimelinking" = yes; then
5915ab47cfaaSmrg	# Warning - without using the other runtime loading flags (-brtl),
5916ab47cfaaSmrg	# -berok will link without error, but may produce a broken library.
5917ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5918ab47cfaaSmrg       # Determine the default libpath from the value encoded in an empty executable.
5919ab47cfaaSmrg       _LT_AC_SYS_LIBPATH_AIX
5920ab47cfaaSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5921ab47cfaaSmrg	_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"
5922ab47cfaaSmrg       else
5923ab47cfaaSmrg	if test "$host_cpu" = ia64; then
5924ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5925ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5926ab47cfaaSmrg	  _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"
5927ab47cfaaSmrg	else
5928ab47cfaaSmrg	 # Determine the default libpath from the value encoded in an empty executable.
5929ab47cfaaSmrg	 _LT_AC_SYS_LIBPATH_AIX
5930ab47cfaaSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5931ab47cfaaSmrg	  # Warning - without using the other run time loading flags,
5932ab47cfaaSmrg	  # -berok will link without error, but may produce a broken library.
5933ab47cfaaSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5934ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5935ab47cfaaSmrg	  # Exported symbols can be pulled into shared objects from archives
5936ab47cfaaSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5937ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5938ab47cfaaSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
5939ab47cfaaSmrg	  _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'
5940ab47cfaaSmrg	fi
5941ab47cfaaSmrg      fi
5942ab47cfaaSmrg      ;;
5943ab47cfaaSmrg
5944ab47cfaaSmrg    amigaos*)
5945ab47cfaaSmrg      _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)'
5946ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5947ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5948ab47cfaaSmrg      # see comment about different semantics on the GNU ld section
5949ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5950ab47cfaaSmrg      ;;
5951ab47cfaaSmrg
5952ab47cfaaSmrg    bsdi[[45]]*)
5953ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5954ab47cfaaSmrg      ;;
5955ab47cfaaSmrg
5956ab47cfaaSmrg    cygwin* | mingw* | pw32*)
5957ab47cfaaSmrg      # When not using gcc, we currently assume that we are using
5958ab47cfaaSmrg      # Microsoft Visual C++.
5959ab47cfaaSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
5960ab47cfaaSmrg      # no search path for DLLs.
5961ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5962ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5963ab47cfaaSmrg      # Tell ltmain to make .lib files, not .a files.
5964ab47cfaaSmrg      libext=lib
5965ab47cfaaSmrg      # Tell ltmain to make .dll files, not .so files.
5966ab47cfaaSmrg      shrext_cmds=".dll"
5967ab47cfaaSmrg      # FIXME: Setting linknames here is a bad hack.
5968ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5969ab47cfaaSmrg      # The linker will automatically build a .lib file if we build a DLL.
5970ab47cfaaSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5971ab47cfaaSmrg      # FIXME: Should let the user specify the lib program.
59728697ee19Smrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5973ab47cfaaSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5974ab47cfaaSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5975ab47cfaaSmrg      ;;
5976ab47cfaaSmrg
5977ab47cfaaSmrg    darwin* | rhapsody*)
5978ab47cfaaSmrg      case $host_os in
5979ab47cfaaSmrg        rhapsody* | darwin1.[[012]])
5980ab47cfaaSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5981ab47cfaaSmrg         ;;
5982ab47cfaaSmrg       *) # Darwin 1.3 on
5983ab47cfaaSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5984ab47cfaaSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5985ab47cfaaSmrg         else
5986ab47cfaaSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
5987ab47cfaaSmrg             10.[[012]])
5988ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5989ab47cfaaSmrg               ;;
5990ab47cfaaSmrg             10.*)
5991ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5992ab47cfaaSmrg               ;;
5993ab47cfaaSmrg           esac
5994ab47cfaaSmrg         fi
5995ab47cfaaSmrg         ;;
5996ab47cfaaSmrg      esac
5997ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5998ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5999ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
6000ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
6001ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
6002ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6003ab47cfaaSmrg    if test "$GCC" = yes ; then
6004ab47cfaaSmrg    	output_verbose_link_cmd='echo'
6005ab47cfaaSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
6006ab47cfaaSmrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6007ab47cfaaSmrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
6008ab47cfaaSmrg      _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}'
6009ab47cfaaSmrg      _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}'
6010ab47cfaaSmrg    else
6011ab47cfaaSmrg      case $cc_basename in
6012ab47cfaaSmrg        xlc*)
6013ab47cfaaSmrg         output_verbose_link_cmd='echo'
60148697ee19Smrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
6015ab47cfaaSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
6016ab47cfaaSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
60178697ee19Smrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
6018ab47cfaaSmrg          _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}'
6019ab47cfaaSmrg          ;;
6020ab47cfaaSmrg       *)
6021ab47cfaaSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
6022ab47cfaaSmrg          ;;
6023ab47cfaaSmrg      esac
6024ab47cfaaSmrg    fi
6025ab47cfaaSmrg      ;;
6026ab47cfaaSmrg
6027ab47cfaaSmrg    dgux*)
6028ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6029ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6030ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6031ab47cfaaSmrg      ;;
6032ab47cfaaSmrg
6033ab47cfaaSmrg    freebsd1*)
6034ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6035ab47cfaaSmrg      ;;
6036ab47cfaaSmrg
6037ab47cfaaSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
6038ab47cfaaSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
6039ab47cfaaSmrg    # does not break anything, and helps significantly (at the cost of a little
6040ab47cfaaSmrg    # extra space).
6041ab47cfaaSmrg    freebsd2.2*)
6042ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
6043ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6044ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6045ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6046ab47cfaaSmrg      ;;
6047ab47cfaaSmrg
6048ab47cfaaSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
6049ab47cfaaSmrg    freebsd2*)
6050ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6051ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6052ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6053ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6054ab47cfaaSmrg      ;;
6055ab47cfaaSmrg
6056ab47cfaaSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
6057ab47cfaaSmrg    freebsd* | dragonfly*)
6058ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
6059ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6060ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6061ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6062ab47cfaaSmrg      ;;
6063ab47cfaaSmrg
6064ab47cfaaSmrg    hpux9*)
6065ab47cfaaSmrg      if test "$GCC" = yes; then
6066ab47cfaaSmrg	_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'
6067ab47cfaaSmrg      else
6068ab47cfaaSmrg	_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'
6069ab47cfaaSmrg      fi
6070ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6071ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6072ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6073ab47cfaaSmrg
6074ab47cfaaSmrg      # hardcode_minus_L: Not really in the search PATH,
6075ab47cfaaSmrg      # but as the default location of the library.
6076ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6077ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6078ab47cfaaSmrg      ;;
6079ab47cfaaSmrg
6080ab47cfaaSmrg    hpux10*)
6081ab47cfaaSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6082ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6083ab47cfaaSmrg      else
6084ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
6085ab47cfaaSmrg      fi
6086ab47cfaaSmrg      if test "$with_gnu_ld" = no; then
6087ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6088ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6089ab47cfaaSmrg
6090ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
6091ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6092ab47cfaaSmrg
6093ab47cfaaSmrg	# hardcode_minus_L: Not really in the search PATH,
6094ab47cfaaSmrg	# but as the default location of the library.
6095ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6096ab47cfaaSmrg      fi
6097ab47cfaaSmrg      ;;
6098ab47cfaaSmrg
6099ab47cfaaSmrg    hpux11*)
6100ab47cfaaSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
6101ab47cfaaSmrg	case $host_cpu in
6102ab47cfaaSmrg	hppa*64*)
6103ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6104ab47cfaaSmrg	  ;;
6105ab47cfaaSmrg	ia64*)
6106ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6107ab47cfaaSmrg	  ;;
6108ab47cfaaSmrg	*)
6109ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6110ab47cfaaSmrg	  ;;
6111ab47cfaaSmrg	esac
6112ab47cfaaSmrg      else
6113ab47cfaaSmrg	case $host_cpu in
6114ab47cfaaSmrg	hppa*64*)
6115ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6116ab47cfaaSmrg	  ;;
6117ab47cfaaSmrg	ia64*)
6118ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
6119ab47cfaaSmrg	  ;;
6120ab47cfaaSmrg	*)
6121ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
6122ab47cfaaSmrg	  ;;
6123ab47cfaaSmrg	esac
6124ab47cfaaSmrg      fi
6125ab47cfaaSmrg      if test "$with_gnu_ld" = no; then
6126ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
6127ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6128ab47cfaaSmrg
6129ab47cfaaSmrg	case $host_cpu in
6130ab47cfaaSmrg	hppa*64*|ia64*)
6131ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
6132ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6133ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6134ab47cfaaSmrg	  ;;
6135ab47cfaaSmrg	*)
6136ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6137ab47cfaaSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6138ab47cfaaSmrg
6139ab47cfaaSmrg	  # hardcode_minus_L: Not really in the search PATH,
6140ab47cfaaSmrg	  # but as the default location of the library.
6141ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6142ab47cfaaSmrg	  ;;
6143ab47cfaaSmrg	esac
6144ab47cfaaSmrg      fi
6145ab47cfaaSmrg      ;;
6146ab47cfaaSmrg
6147ab47cfaaSmrg    irix5* | irix6* | nonstopux*)
6148ab47cfaaSmrg      if test "$GCC" = yes; then
6149ab47cfaaSmrg	_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'
6150ab47cfaaSmrg      else
6151ab47cfaaSmrg	_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'
6152ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
6153ab47cfaaSmrg      fi
6154ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6155ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6156ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6157ab47cfaaSmrg      ;;
6158ab47cfaaSmrg
61598697ee19Smrg    netbsd*)
6160ab47cfaaSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6161ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
6162ab47cfaaSmrg      else
6163ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
6164ab47cfaaSmrg      fi
6165ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6166ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6167ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6168ab47cfaaSmrg      ;;
6169ab47cfaaSmrg
6170ab47cfaaSmrg    newsos6)
6171ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6172ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6173ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6174ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6175ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6176ab47cfaaSmrg      ;;
6177ab47cfaaSmrg
6178ab47cfaaSmrg    openbsd*)
61798697ee19Smrg      if test -f /usr/libexec/ld.so; then
61808697ee19Smrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
61818697ee19Smrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
61828697ee19Smrg	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
61838697ee19Smrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
61848697ee19Smrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
61858697ee19Smrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
61868697ee19Smrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
61878697ee19Smrg	else
61888697ee19Smrg	  case $host_os in
61898697ee19Smrg	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
61908697ee19Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
61918697ee19Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
61928697ee19Smrg	     ;;
61938697ee19Smrg	   *)
61948697ee19Smrg	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
61958697ee19Smrg	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
61968697ee19Smrg	     ;;
61978697ee19Smrg	  esac
61988697ee19Smrg        fi
6199ab47cfaaSmrg      else
62008697ee19Smrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6201ab47cfaaSmrg      fi
6202ab47cfaaSmrg      ;;
6203ab47cfaaSmrg
6204ab47cfaaSmrg    os2*)
6205ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6206ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6207ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6208ab47cfaaSmrg      _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'
6209ab47cfaaSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6210ab47cfaaSmrg      ;;
6211ab47cfaaSmrg
6212ab47cfaaSmrg    osf3*)
6213ab47cfaaSmrg      if test "$GCC" = yes; then
6214ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6215ab47cfaaSmrg	_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'
6216ab47cfaaSmrg      else
6217ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6218ab47cfaaSmrg	_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'
6219ab47cfaaSmrg      fi
6220ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6221ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6222ab47cfaaSmrg      ;;
6223ab47cfaaSmrg
6224ab47cfaaSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6225ab47cfaaSmrg      if test "$GCC" = yes; then
6226ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6227ab47cfaaSmrg	_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'
6228ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6229ab47cfaaSmrg      else
6230ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6231ab47cfaaSmrg	_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'
6232ab47cfaaSmrg	_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~
6233ab47cfaaSmrg	$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'
6234ab47cfaaSmrg
6235ab47cfaaSmrg	# Both c and cxx compiler support -rpath directly
6236ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6237ab47cfaaSmrg      fi
6238ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6239ab47cfaaSmrg      ;;
6240ab47cfaaSmrg
6241ab47cfaaSmrg    solaris*)
6242ab47cfaaSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6243ab47cfaaSmrg      if test "$GCC" = yes; then
6244ab47cfaaSmrg	wlarc='${wl}'
6245ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6246ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6247ab47cfaaSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6248ab47cfaaSmrg      else
6249ab47cfaaSmrg	wlarc=''
6250ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6251ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6252ab47cfaaSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6253ab47cfaaSmrg      fi
6254ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6255ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6256ab47cfaaSmrg      case $host_os in
6257ab47cfaaSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6258ab47cfaaSmrg      *)
62598697ee19Smrg	# The compiler driver will combine and reorder linker options,
62608697ee19Smrg	# but understands `-z linker_flag'.  GCC discards it without `$wl',
62618697ee19Smrg	# but is careful enough not to reorder.
6262ab47cfaaSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
62638697ee19Smrg	if test "$GCC" = yes; then
62648697ee19Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
62658697ee19Smrg	else
62668697ee19Smrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
62678697ee19Smrg	fi
62688697ee19Smrg	;;
6269ab47cfaaSmrg      esac
6270ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6271ab47cfaaSmrg      ;;
6272ab47cfaaSmrg
6273ab47cfaaSmrg    sunos4*)
6274ab47cfaaSmrg      if test "x$host_vendor" = xsequent; then
6275ab47cfaaSmrg	# Use $CC to link under sequent, because it throws in some extra .o
6276ab47cfaaSmrg	# files that make .init and .fini sections work.
6277ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6278ab47cfaaSmrg      else
6279ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6280ab47cfaaSmrg      fi
6281ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6282ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6283ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6284ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6285ab47cfaaSmrg      ;;
6286ab47cfaaSmrg
6287ab47cfaaSmrg    sysv4)
6288ab47cfaaSmrg      case $host_vendor in
6289ab47cfaaSmrg	sni)
6290ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6291ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6292ab47cfaaSmrg	;;
6293ab47cfaaSmrg	siemens)
6294ab47cfaaSmrg	  ## LD is ld it makes a PLAMLIB
6295ab47cfaaSmrg	  ## CC just makes a GrossModule.
6296ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6297ab47cfaaSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6298ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6299ab47cfaaSmrg        ;;
6300ab47cfaaSmrg	motorola)
6301ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6302ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6303ab47cfaaSmrg	;;
6304ab47cfaaSmrg      esac
6305ab47cfaaSmrg      runpath_var='LD_RUN_PATH'
6306ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6307ab47cfaaSmrg      ;;
6308ab47cfaaSmrg
6309ab47cfaaSmrg    sysv4.3*)
6310ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6311ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6312ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6313ab47cfaaSmrg      ;;
6314ab47cfaaSmrg
6315ab47cfaaSmrg    sysv4*MP*)
6316ab47cfaaSmrg      if test -d /usr/nec; then
6317ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6318ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6319ab47cfaaSmrg	runpath_var=LD_RUN_PATH
6320ab47cfaaSmrg	hardcode_runpath_var=yes
6321ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6322ab47cfaaSmrg      fi
6323ab47cfaaSmrg      ;;
6324ab47cfaaSmrg
63258697ee19Smrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6326ab47cfaaSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6327ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6328ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6329ab47cfaaSmrg      runpath_var='LD_RUN_PATH'
6330ab47cfaaSmrg
6331ab47cfaaSmrg      if test "$GCC" = yes; then
6332ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6333ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6334ab47cfaaSmrg      else
6335ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6336ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6337ab47cfaaSmrg      fi
6338ab47cfaaSmrg      ;;
6339ab47cfaaSmrg
6340ab47cfaaSmrg    sysv5* | sco3.2v5* | sco5v6*)
6341ab47cfaaSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
6342ab47cfaaSmrg      # link with -lc, and that would cause any symbols used from libc to
6343ab47cfaaSmrg      # always be unresolved, which means just about no library would
6344ab47cfaaSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
6345ab47cfaaSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
6346ab47cfaaSmrg      # as -z defs.
6347ab47cfaaSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6348ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6349ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6350ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6351ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6352ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6353ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6354ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6355ab47cfaaSmrg      runpath_var='LD_RUN_PATH'
6356ab47cfaaSmrg
6357ab47cfaaSmrg      if test "$GCC" = yes; then
6358ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6359ab47cfaaSmrg	_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'
6360ab47cfaaSmrg      else
6361ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6362ab47cfaaSmrg	_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'
6363ab47cfaaSmrg      fi
6364ab47cfaaSmrg      ;;
6365ab47cfaaSmrg
6366ab47cfaaSmrg    uts4*)
6367ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6368ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6369ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6370ab47cfaaSmrg      ;;
6371ab47cfaaSmrg
6372ab47cfaaSmrg    *)
6373ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6374ab47cfaaSmrg      ;;
6375ab47cfaaSmrg    esac
6376ab47cfaaSmrg  fi
6377ab47cfaaSmrg])
6378ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6379ab47cfaaSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6380ab47cfaaSmrg
6381ab47cfaaSmrg#
6382ab47cfaaSmrg# Do we need to explicitly link libc?
6383ab47cfaaSmrg#
6384ab47cfaaSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6385ab47cfaaSmrgx|xyes)
6386ab47cfaaSmrg  # Assume -lc should be added
6387ab47cfaaSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6388ab47cfaaSmrg
6389ab47cfaaSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
6390ab47cfaaSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6391ab47cfaaSmrg    *'~'*)
6392ab47cfaaSmrg      # FIXME: we may have to deal with multi-command sequences.
6393ab47cfaaSmrg      ;;
6394ab47cfaaSmrg    '$CC '*)
6395ab47cfaaSmrg      # Test whether the compiler implicitly links with -lc since on some
6396ab47cfaaSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6397ab47cfaaSmrg      # to ld, don't add -lc before -lgcc.
6398ab47cfaaSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6399ab47cfaaSmrg      $rm conftest*
64008697ee19Smrg      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6401ab47cfaaSmrg
6402ab47cfaaSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6403ab47cfaaSmrg        soname=conftest
6404ab47cfaaSmrg        lib=conftest
6405ab47cfaaSmrg        libobjs=conftest.$ac_objext
6406ab47cfaaSmrg        deplibs=
6407ab47cfaaSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6408ab47cfaaSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6409ab47cfaaSmrg        compiler_flags=-v
6410ab47cfaaSmrg        linker_flags=-v
6411ab47cfaaSmrg        verstring=
6412ab47cfaaSmrg        output_objdir=.
6413ab47cfaaSmrg        libname=conftest
6414ab47cfaaSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6415ab47cfaaSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6416ab47cfaaSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6417ab47cfaaSmrg        then
6418ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6419ab47cfaaSmrg        else
6420ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6421ab47cfaaSmrg        fi
6422ab47cfaaSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6423ab47cfaaSmrg      else
6424ab47cfaaSmrg        cat conftest.err 1>&5
6425ab47cfaaSmrg      fi
6426ab47cfaaSmrg      $rm conftest*
6427ab47cfaaSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6428ab47cfaaSmrg      ;;
6429ab47cfaaSmrg    esac
6430ab47cfaaSmrg  fi
6431ab47cfaaSmrg  ;;
6432ab47cfaaSmrgesac
6433ab47cfaaSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
6434ab47cfaaSmrg
6435ab47cfaaSmrg
6436ab47cfaaSmrg# _LT_AC_FILE_LTDLL_C
6437ab47cfaaSmrg# -------------------
6438ab47cfaaSmrg# Be careful that the start marker always follows a newline.
6439ab47cfaaSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6440ab47cfaaSmrg# /* ltdll.c starts here */
6441ab47cfaaSmrg# #define WIN32_LEAN_AND_MEAN
6442ab47cfaaSmrg# #include <windows.h>
6443ab47cfaaSmrg# #undef WIN32_LEAN_AND_MEAN
6444ab47cfaaSmrg# #include <stdio.h>
6445ab47cfaaSmrg#
6446ab47cfaaSmrg# #ifndef __CYGWIN__
6447ab47cfaaSmrg# #  ifdef __CYGWIN32__
6448ab47cfaaSmrg# #    define __CYGWIN__ __CYGWIN32__
6449ab47cfaaSmrg# #  endif
6450ab47cfaaSmrg# #endif
6451ab47cfaaSmrg#
6452ab47cfaaSmrg# #ifdef __cplusplus
6453ab47cfaaSmrg# extern "C" {
6454ab47cfaaSmrg# #endif
6455ab47cfaaSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6456ab47cfaaSmrg# #ifdef __cplusplus
6457ab47cfaaSmrg# }
6458ab47cfaaSmrg# #endif
6459ab47cfaaSmrg#
6460ab47cfaaSmrg# #ifdef __CYGWIN__
6461ab47cfaaSmrg# #include <cygwin/cygwin_dll.h>
6462ab47cfaaSmrg# DECLARE_CYGWIN_DLL( DllMain );
6463ab47cfaaSmrg# #endif
6464ab47cfaaSmrg# HINSTANCE __hDllInstance_base;
6465ab47cfaaSmrg#
6466ab47cfaaSmrg# BOOL APIENTRY
6467ab47cfaaSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6468ab47cfaaSmrg# {
6469ab47cfaaSmrg#   __hDllInstance_base = hInst;
6470ab47cfaaSmrg#   return TRUE;
6471ab47cfaaSmrg# }
6472ab47cfaaSmrg# /* ltdll.c ends here */
6473ab47cfaaSmrg])# _LT_AC_FILE_LTDLL_C
6474ab47cfaaSmrg
6475ab47cfaaSmrg
6476ab47cfaaSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6477ab47cfaaSmrg# ---------------------------------
6478ab47cfaaSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6479ab47cfaaSmrg
6480ab47cfaaSmrg
6481ab47cfaaSmrg# old names
6482ab47cfaaSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6483ab47cfaaSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6484ab47cfaaSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6485ab47cfaaSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6486ab47cfaaSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6487ab47cfaaSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6488ab47cfaaSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6489ab47cfaaSmrg
6490ab47cfaaSmrg# This is just to silence aclocal about the macro not being used
6491ab47cfaaSmrgifelse([AC_DISABLE_FAST_INSTALL])
6492ab47cfaaSmrg
6493ab47cfaaSmrgAC_DEFUN([LT_AC_PROG_GCJ],
6494ab47cfaaSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
6495ab47cfaaSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6496ab47cfaaSmrg  AC_SUBST(GCJFLAGS)
6497ab47cfaaSmrg])
6498ab47cfaaSmrg
6499ab47cfaaSmrgAC_DEFUN([LT_AC_PROG_RC],
6500ab47cfaaSmrg[AC_CHECK_TOOL(RC, windres, no)
6501ab47cfaaSmrg])
6502ab47cfaaSmrg
65038697ee19Smrg
65048697ee19Smrg# Cheap backport of AS_EXECUTABLE_P and required macros
65058697ee19Smrg# from Autoconf 2.59; we should not use $as_executable_p directly.
65068697ee19Smrg
65078697ee19Smrg# _AS_TEST_PREPARE
65088697ee19Smrg# ----------------
65098697ee19Smrgm4_ifndef([_AS_TEST_PREPARE],
65108697ee19Smrg[m4_defun([_AS_TEST_PREPARE],
65118697ee19Smrg[if test -x / >/dev/null 2>&1; then
65128697ee19Smrg  as_executable_p='test -x'
65138697ee19Smrgelse
65148697ee19Smrg  as_executable_p='test -f'
65158697ee19Smrgfi
65168697ee19Smrg])])# _AS_TEST_PREPARE
65178697ee19Smrg
65188697ee19Smrg# AS_EXECUTABLE_P
65198697ee19Smrg# ---------------
65208697ee19Smrg# Check whether a file is executable.
65218697ee19Smrgm4_ifndef([AS_EXECUTABLE_P],
65228697ee19Smrg[m4_defun([AS_EXECUTABLE_P],
65238697ee19Smrg[AS_REQUIRE([_AS_TEST_PREPARE])dnl
65248697ee19Smrg$as_executable_p $1[]dnl
65258697ee19Smrg])])# AS_EXECUTABLE_P
65268697ee19Smrg
6527ab47cfaaSmrg# NOTE: This macro has been submitted for inclusion into   #
6528ab47cfaaSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6529ab47cfaaSmrg#  a released version of Autoconf we should remove this    #
6530ab47cfaaSmrg#  macro and use it instead.                               #
6531ab47cfaaSmrg# LT_AC_PROG_SED
6532ab47cfaaSmrg# --------------
6533ab47cfaaSmrg# Check for a fully-functional sed program, that truncates
6534ab47cfaaSmrg# as few characters as possible.  Prefer GNU sed if found.
6535ab47cfaaSmrgAC_DEFUN([LT_AC_PROG_SED],
6536ab47cfaaSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
6537ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_SED,
6538ab47cfaaSmrg[# Loop through the user's path and test for sed and gsed.
6539ab47cfaaSmrg# Then use that list of sed's as ones to test for truncation.
6540ab47cfaaSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6541ab47cfaaSmrgfor as_dir in $PATH
6542ab47cfaaSmrgdo
6543ab47cfaaSmrg  IFS=$as_save_IFS
6544ab47cfaaSmrg  test -z "$as_dir" && as_dir=.
6545ab47cfaaSmrg  for lt_ac_prog in sed gsed; do
6546ab47cfaaSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
65478697ee19Smrg      if AS_EXECUTABLE_P(["$as_dir/$lt_ac_prog$ac_exec_ext"]); then
6548ab47cfaaSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6549ab47cfaaSmrg      fi
6550ab47cfaaSmrg    done
6551ab47cfaaSmrg  done
6552ab47cfaaSmrgdone
65538697ee19SmrgIFS=$as_save_IFS
6554ab47cfaaSmrglt_ac_max=0
6555ab47cfaaSmrglt_ac_count=0
6556ab47cfaaSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6557ab47cfaaSmrg# along with /bin/sed that truncates output.
6558ab47cfaaSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6559ab47cfaaSmrg  test ! -f $lt_ac_sed && continue
6560ab47cfaaSmrg  cat /dev/null > conftest.in
6561ab47cfaaSmrg  lt_ac_count=0
6562ab47cfaaSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6563ab47cfaaSmrg  # Check for GNU sed and select it if it is found.
6564ab47cfaaSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6565ab47cfaaSmrg    lt_cv_path_SED=$lt_ac_sed
6566ab47cfaaSmrg    break
6567ab47cfaaSmrg  fi
6568ab47cfaaSmrg  while true; do
6569ab47cfaaSmrg    cat conftest.in conftest.in >conftest.tmp
6570ab47cfaaSmrg    mv conftest.tmp conftest.in
6571ab47cfaaSmrg    cp conftest.in conftest.nl
6572ab47cfaaSmrg    echo >>conftest.nl
6573ab47cfaaSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6574ab47cfaaSmrg    cmp -s conftest.out conftest.nl || break
6575ab47cfaaSmrg    # 10000 chars as input seems more than enough
6576ab47cfaaSmrg    test $lt_ac_count -gt 10 && break
6577ab47cfaaSmrg    lt_ac_count=`expr $lt_ac_count + 1`
6578ab47cfaaSmrg    if test $lt_ac_count -gt $lt_ac_max; then
6579ab47cfaaSmrg      lt_ac_max=$lt_ac_count
6580ab47cfaaSmrg      lt_cv_path_SED=$lt_ac_sed
6581ab47cfaaSmrg    fi
6582ab47cfaaSmrg  done
6583ab47cfaaSmrgdone
6584ab47cfaaSmrg])
6585ab47cfaaSmrgSED=$lt_cv_path_SED
65868697ee19SmrgAC_SUBST([SED])
6587ab47cfaaSmrgAC_MSG_RESULT([$SED])
6588ab47cfaaSmrg])
6589ab47cfaaSmrg
6590ab47cfaaSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6591ab47cfaaSmrg# 
6592ab47cfaaSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6593ab47cfaaSmrg#
6594ab47cfaaSmrg# This program is free software; you can redistribute it and/or modify
6595ab47cfaaSmrg# it under the terms of the GNU General Public License as published by
6596ab47cfaaSmrg# the Free Software Foundation; either version 2 of the License, or
6597ab47cfaaSmrg# (at your option) any later version.
6598ab47cfaaSmrg#
6599ab47cfaaSmrg# This program is distributed in the hope that it will be useful, but
6600ab47cfaaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
6601ab47cfaaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6602ab47cfaaSmrg# General Public License for more details.
6603ab47cfaaSmrg#
6604ab47cfaaSmrg# You should have received a copy of the GNU General Public License
6605ab47cfaaSmrg# along with this program; if not, write to the Free Software
6606ab47cfaaSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6607ab47cfaaSmrg#
6608ab47cfaaSmrg# As a special exception to the GNU General Public License, if you
6609ab47cfaaSmrg# distribute this file as part of a program that contains a
6610ab47cfaaSmrg# configuration script generated by Autoconf, you may include it under
6611ab47cfaaSmrg# the same distribution terms that you use for the rest of that program.
6612ab47cfaaSmrg
6613ab47cfaaSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6614ab47cfaaSmrg# ----------------------------------
6615ab47cfaaSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
6616ab47cfaaSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6617ab47cfaaSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6618ab47cfaaSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6619ab47cfaaSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6620ab47cfaaSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6621ab47cfaaSmrgfi
6622ab47cfaaSmrgif test -n "$PKG_CONFIG"; then
6623ab47cfaaSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
6624ab47cfaaSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6625ab47cfaaSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6626ab47cfaaSmrg		AC_MSG_RESULT([yes])
6627ab47cfaaSmrg	else
6628ab47cfaaSmrg		AC_MSG_RESULT([no])
6629ab47cfaaSmrg		PKG_CONFIG=""
6630ab47cfaaSmrg	fi
6631ab47cfaaSmrg		
6632ab47cfaaSmrgfi[]dnl
6633ab47cfaaSmrg])# PKG_PROG_PKG_CONFIG
6634ab47cfaaSmrg
6635ab47cfaaSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6636ab47cfaaSmrg#
6637ab47cfaaSmrg# Check to see whether a particular set of modules exists.  Similar
6638ab47cfaaSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6639ab47cfaaSmrg#
6640ab47cfaaSmrg#
6641ab47cfaaSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6642ab47cfaaSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
6643ab47cfaaSmrg# PKG_CHECK_EXISTS manually
6644ab47cfaaSmrg# --------------------------------------------------------------
6645ab47cfaaSmrgAC_DEFUN([PKG_CHECK_EXISTS],
6646ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6647ab47cfaaSmrgif test -n "$PKG_CONFIG" && \
6648ab47cfaaSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6649ab47cfaaSmrg  m4_ifval([$2], [$2], [:])
6650ab47cfaaSmrgm4_ifvaln([$3], [else
6651ab47cfaaSmrg  $3])dnl
6652ab47cfaaSmrgfi])
6653ab47cfaaSmrg
6654ab47cfaaSmrg
6655ab47cfaaSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6656ab47cfaaSmrg# ---------------------------------------------
6657ab47cfaaSmrgm4_define([_PKG_CONFIG],
66588697ee19Smrg[if test -n "$$1"; then
66598697ee19Smrg    pkg_cv_[]$1="$$1"
66608697ee19Smrg elif test -n "$PKG_CONFIG"; then
66618697ee19Smrg    PKG_CHECK_EXISTS([$3],
66628697ee19Smrg                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
66638697ee19Smrg		     [pkg_failed=yes])
66648697ee19Smrg else
66658697ee19Smrg    pkg_failed=untried
6666ab47cfaaSmrgfi[]dnl
6667ab47cfaaSmrg])# _PKG_CONFIG
6668ab47cfaaSmrg
6669ab47cfaaSmrg# _PKG_SHORT_ERRORS_SUPPORTED
6670ab47cfaaSmrg# -----------------------------
6671ab47cfaaSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6672ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6673ab47cfaaSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6674ab47cfaaSmrg        _pkg_short_errors_supported=yes
6675ab47cfaaSmrgelse
6676ab47cfaaSmrg        _pkg_short_errors_supported=no
6677ab47cfaaSmrgfi[]dnl
6678ab47cfaaSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
6679ab47cfaaSmrg
6680ab47cfaaSmrg
6681ab47cfaaSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6682ab47cfaaSmrg# [ACTION-IF-NOT-FOUND])
6683ab47cfaaSmrg#
6684ab47cfaaSmrg#
6685ab47cfaaSmrg# Note that if there is a possibility the first call to
6686ab47cfaaSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
6687ab47cfaaSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6688ab47cfaaSmrg#
6689ab47cfaaSmrg#
6690ab47cfaaSmrg# --------------------------------------------------------------
6691ab47cfaaSmrgAC_DEFUN([PKG_CHECK_MODULES],
6692ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6693ab47cfaaSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6694ab47cfaaSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6695ab47cfaaSmrg
6696ab47cfaaSmrgpkg_failed=no
6697ab47cfaaSmrgAC_MSG_CHECKING([for $1])
6698ab47cfaaSmrg
6699ab47cfaaSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6700ab47cfaaSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6701ab47cfaaSmrg
6702ab47cfaaSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6703ab47cfaaSmrgand $1[]_LIBS to avoid the need to call pkg-config.
6704ab47cfaaSmrgSee the pkg-config man page for more details.])
6705ab47cfaaSmrg
6706ab47cfaaSmrgif test $pkg_failed = yes; then
6707ab47cfaaSmrg        _PKG_SHORT_ERRORS_SUPPORTED
6708ab47cfaaSmrg        if test $_pkg_short_errors_supported = yes; then
67098697ee19Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
6710ab47cfaaSmrg        else 
67118697ee19Smrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
6712ab47cfaaSmrg        fi
6713ab47cfaaSmrg	# Put the nasty error message in config.log where it belongs
6714ab47cfaaSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6715ab47cfaaSmrg
6716ab47cfaaSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
6717ab47cfaaSmrg[Package requirements ($2) were not met:
6718ab47cfaaSmrg
6719ab47cfaaSmrg$$1_PKG_ERRORS
6720ab47cfaaSmrg
6721ab47cfaaSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
6722ab47cfaaSmrginstalled software in a non-standard prefix.
6723ab47cfaaSmrg
6724ab47cfaaSmrg_PKG_TEXT
6725ab47cfaaSmrg])],
6726ab47cfaaSmrg		[AC_MSG_RESULT([no])
6727ab47cfaaSmrg                $4])
6728ab47cfaaSmrgelif test $pkg_failed = untried; then
6729ab47cfaaSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
6730ab47cfaaSmrg[The pkg-config script could not be found or is too old.  Make sure it
6731ab47cfaaSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
6732ab47cfaaSmrgpath to pkg-config.
6733ab47cfaaSmrg
6734ab47cfaaSmrg_PKG_TEXT
6735ab47cfaaSmrg
67368697ee19SmrgTo get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
6737ab47cfaaSmrg		[$4])
6738ab47cfaaSmrgelse
6739ab47cfaaSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6740ab47cfaaSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6741ab47cfaaSmrg        AC_MSG_RESULT([yes])
6742ab47cfaaSmrg	ifelse([$3], , :, [$3])
6743ab47cfaaSmrgfi[]dnl
6744ab47cfaaSmrg])# PKG_CHECK_MODULES
6745ab47cfaaSmrg
67468697ee19Smrgdnl
67478697ee19Smrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
67488697ee19Smrgdnl 
67498697ee19Smrgdnl Permission is hereby granted, free of charge, to any person obtaining a
67508697ee19Smrgdnl copy of this software and associated documentation files (the
67518697ee19Smrgdnl "Software"), to deal in the Software without restriction, including
67528697ee19Smrgdnl without limitation the rights to use, copy, modify, merge, publish,
67538697ee19Smrgdnl distribute, and/or sell copies of the Software, and to permit persons
67548697ee19Smrgdnl to whom the Software is furnished to do so, provided that the above
67558697ee19Smrgdnl copyright notice(s) and this permission notice appear in all copies of
67568697ee19Smrgdnl the Software and that both the above copyright notice(s) and this
67578697ee19Smrgdnl permission notice appear in supporting documentation.
67588697ee19Smrgdnl
67598697ee19Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
67608697ee19Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
67618697ee19Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
67628697ee19Smrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
67638697ee19Smrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
67648697ee19Smrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
67658697ee19Smrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
67668697ee19Smrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
67678697ee19Smrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
67688697ee19Smrgdnl
67698697ee19Smrgdnl Except as contained in this notice, the name of a copyright holder
67708697ee19Smrgdnl shall not be used in advertising or otherwise to promote the sale, use
67718697ee19Smrgdnl or other dealings in this Software without prior written authorization
67728697ee19Smrgdnl of the copyright holder.
6773ab47cfaaSmrg
67748697ee19Smrg# XORG_MACROS_VERSION(required-version)
67758697ee19Smrg# -------------------------------------
67768697ee19Smrg# Minimum version: 1.1.0
6777ab47cfaaSmrg#
67788697ee19Smrg# If you're using a macro added in Version 1.1 or newer, include this in
67798697ee19Smrg# your configure.ac with the minimum required version, such as:
67808697ee19Smrg# XORG_MACROS_VERSION(1.1)
6781ab47cfaaSmrg#
67828697ee19Smrg# To force at least a version with this macro defined, also add:
67838697ee19Smrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
6784ab47cfaaSmrg#
6785ab47cfaaSmrg#
67868697ee19Smrg# See the "minimum version" comment for each macro you use to see what 
67878697ee19Smrg# version you require.
67888697ee19SmrgAC_DEFUN([XORG_MACROS_VERSION],[
67898697ee19Smrg	[XORG_MACROS_needed_version=$1
67908697ee19Smrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
67918697ee19Smrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
67928697ee19Smrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
67938697ee19Smrg	[XORG_MACROS_version=1.1.6
67948697ee19Smrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
67958697ee19Smrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
67968697ee19Smrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
67978697ee19Smrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
67988697ee19Smrg	fi
67998697ee19Smrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
68008697ee19Smrg		AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
68018697ee19Smrg	fi
68028697ee19Smrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
68038697ee19Smrg]) # XORG_MACROS_VERSION
6804ab47cfaaSmrg
68058697ee19Smrg# XORG_PROG_RAWCPP()
68068697ee19Smrg# ------------------
68078697ee19Smrg# Minimum version: 1.0.0
6808ab47cfaaSmrg#
68098697ee19Smrg# Find cpp program and necessary flags for use in pre-processing text files
68108697ee19Smrg# such as man pages and config files
68118697ee19SmrgAC_DEFUN([XORG_PROG_RAWCPP],[
68128697ee19SmrgAC_REQUIRE([AC_PROG_CPP])
68138697ee19SmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
68148697ee19Smrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
6815ab47cfaaSmrg
68168697ee19Smrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
68178697ee19Smrg# which is not the best choice for supporting other OS'es, but covers most
68188697ee19Smrg# of the ones we need for now.
68198697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
68208697ee19SmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
68218697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
68228697ee19Smrg	AC_MSG_RESULT([no])
6823ab47cfaaSmrgelse
68248697ee19Smrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
68258697ee19Smrg		RAWCPPFLAGS=-undef
68268697ee19Smrg		AC_MSG_RESULT([yes])
68278697ee19Smrg	else
68288697ee19Smrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
68298697ee19Smrg	fi
6830ab47cfaaSmrgfi
68318697ee19Smrgrm -f conftest.$ac_ext
6832ab47cfaaSmrg
68338697ee19SmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
68348697ee19SmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
68358697ee19Smrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
68368697ee19Smrg	AC_MSG_RESULT([no])
68378697ee19Smrgelse
68388697ee19Smrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
68398697ee19Smrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
68408697ee19Smrg		AC_MSG_RESULT([yes])
68418697ee19Smrg	else
68428697ee19Smrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
68438697ee19Smrg	fi
68448697ee19Smrgfi
68458697ee19Smrgrm -f conftest.$ac_ext
68468697ee19SmrgAC_SUBST(RAWCPPFLAGS)
68478697ee19Smrg]) # XORG_PROG_RAWCPP
6848ab47cfaaSmrg
68498697ee19Smrg# XORG_MANPAGE_SECTIONS()
68508697ee19Smrg# -----------------------
68518697ee19Smrg# Minimum version: 1.0.0
6852ab47cfaaSmrg#
68538697ee19Smrg# Determine which sections man pages go in for the different man page types
68548697ee19Smrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
68558697ee19Smrg# Not sure if there's any better way than just hardcoding by OS name.
68568697ee19Smrg# Override default settings by setting environment variables
6857ab47cfaaSmrg
68588697ee19SmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
68598697ee19SmrgAC_REQUIRE([AC_CANONICAL_HOST])
6860ab47cfaaSmrg
68618697ee19Smrgif test x$APP_MAN_SUFFIX = x    ; then
68628697ee19Smrg    APP_MAN_SUFFIX=1
68638697ee19Smrgfi
68648697ee19Smrgif test x$APP_MAN_DIR = x    ; then
68658697ee19Smrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
68668697ee19Smrgfi
6867ab47cfaaSmrg
68688697ee19Smrgif test x$LIB_MAN_SUFFIX = x    ; then
68698697ee19Smrg    LIB_MAN_SUFFIX=3
68708697ee19Smrgfi
68718697ee19Smrgif test x$LIB_MAN_DIR = x    ; then
68728697ee19Smrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
68738697ee19Smrgfi
6874ab47cfaaSmrg
68758697ee19Smrgif test x$FILE_MAN_SUFFIX = x    ; then
68768697ee19Smrg    case $host_os in
68778697ee19Smrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
68788697ee19Smrg	*)		FILE_MAN_SUFFIX=5  ;;
6879ab47cfaaSmrg    esac
6880ab47cfaaSmrgfi
68818697ee19Smrgif test x$FILE_MAN_DIR = x    ; then
68828697ee19Smrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
68838697ee19Smrgfi
6884ab47cfaaSmrg
68858697ee19Smrgif test x$MISC_MAN_SUFFIX = x    ; then
68868697ee19Smrg    case $host_os in
68878697ee19Smrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
68888697ee19Smrg	*)		MISC_MAN_SUFFIX=7  ;;
68898697ee19Smrg    esac
68908697ee19Smrgfi
68918697ee19Smrgif test x$MISC_MAN_DIR = x    ; then
68928697ee19Smrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
68938697ee19Smrgfi
6894ab47cfaaSmrg
68958697ee19Smrgif test x$DRIVER_MAN_SUFFIX = x    ; then
68968697ee19Smrg    case $host_os in
68978697ee19Smrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
68988697ee19Smrg	*)		DRIVER_MAN_SUFFIX=4  ;;
68998697ee19Smrg    esac
69008697ee19Smrgfi
69018697ee19Smrgif test x$DRIVER_MAN_DIR = x    ; then
69028697ee19Smrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
69038697ee19Smrgfi
6904ab47cfaaSmrg
69058697ee19Smrgif test x$ADMIN_MAN_SUFFIX = x    ; then
69068697ee19Smrg    case $host_os in
69078697ee19Smrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
69088697ee19Smrg	*)		ADMIN_MAN_SUFFIX=8  ;;
69098697ee19Smrg    esac
69108697ee19Smrgfi
69118697ee19Smrgif test x$ADMIN_MAN_DIR = x    ; then
69128697ee19Smrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
6913ab47cfaaSmrgfi
6914ab47cfaaSmrg
6915ab47cfaaSmrg
69168697ee19SmrgAC_SUBST([APP_MAN_SUFFIX])
69178697ee19SmrgAC_SUBST([LIB_MAN_SUFFIX])
69188697ee19SmrgAC_SUBST([FILE_MAN_SUFFIX])
69198697ee19SmrgAC_SUBST([MISC_MAN_SUFFIX])
69208697ee19SmrgAC_SUBST([DRIVER_MAN_SUFFIX])
69218697ee19SmrgAC_SUBST([ADMIN_MAN_SUFFIX])
69228697ee19SmrgAC_SUBST([APP_MAN_DIR])
69238697ee19SmrgAC_SUBST([LIB_MAN_DIR])
69248697ee19SmrgAC_SUBST([FILE_MAN_DIR])
69258697ee19SmrgAC_SUBST([MISC_MAN_DIR])
69268697ee19SmrgAC_SUBST([DRIVER_MAN_DIR])
69278697ee19SmrgAC_SUBST([ADMIN_MAN_DIR])
69288697ee19Smrg]) # XORG_MANPAGE_SECTIONS
6929ab47cfaaSmrg
69308697ee19Smrg# XORG_CHECK_LINUXDOC
69318697ee19Smrg# -------------------
69328697ee19Smrg# Minimum version: 1.0.0
6933ab47cfaaSmrg#
69348697ee19Smrg# Defines the variable MAKE_TEXT if the necessary tools and
69358697ee19Smrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
69368697ee19Smrg# Whether or not the necessary tools and files are found can be checked
69378697ee19Smrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
69388697ee19SmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
69398697ee19SmrgXORG_SGML_PATH=$prefix/share/sgml
69408697ee19SmrgHAVE_DEFS_ENT=
6941ab47cfaaSmrg
69428697ee19Smrgif test x"$cross_compiling" = x"yes" ; then
69438697ee19Smrg  HAVE_DEFS_ENT=no
69448697ee19Smrgelse
69458697ee19Smrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
69468697ee19Smrgfi
6947ab47cfaaSmrg
69488697ee19SmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
69498697ee19SmrgAC_PATH_PROG(PS2PDF, ps2pdf)
6950ab47cfaaSmrg
69518697ee19SmrgAC_MSG_CHECKING([Whether to build documentation])
6952ab47cfaaSmrg
69538697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
69548697ee19Smrg   BUILDDOC=yes
69558697ee19Smrgelse
69568697ee19Smrg   BUILDDOC=no
69578697ee19Smrgfi
6958ab47cfaaSmrg
69598697ee19SmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
6960ab47cfaaSmrg
69618697ee19SmrgAC_MSG_RESULT([$BUILDDOC])
6962ab47cfaaSmrg
69638697ee19SmrgAC_MSG_CHECKING([Whether to build pdf documentation])
6964ab47cfaaSmrg
69658697ee19Smrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
69668697ee19Smrg   BUILDPDFDOC=yes
69678697ee19Smrgelse
69688697ee19Smrg   BUILDPDFDOC=no
6969ab47cfaaSmrgfi
6970ab47cfaaSmrg
69718697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
6972ab47cfaaSmrg
69738697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC])
6974ab47cfaaSmrg
69758697ee19SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
69768697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
69778697ee19SmrgMAKE_PDF="$PS2PDF"
69788697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
6979ab47cfaaSmrg
69808697ee19SmrgAC_SUBST(MAKE_TEXT)
69818697ee19SmrgAC_SUBST(MAKE_PS)
69828697ee19SmrgAC_SUBST(MAKE_PDF)
69838697ee19SmrgAC_SUBST(MAKE_HTML)
69848697ee19Smrg]) # XORG_CHECK_LINUXDOC
6985ab47cfaaSmrg
69868697ee19Smrg# XORG_CHECK_DOCBOOK
69878697ee19Smrg# -------------------
69888697ee19Smrg# Minimum version: 1.0.0
6989ab47cfaaSmrg#
69908697ee19Smrg# Checks for the ability to build output formats from SGML DocBook source.
69918697ee19Smrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
69928697ee19Smrg# indicates whether the necessary tools and files are found and, if set,
69938697ee19Smrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
69948697ee19SmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
69958697ee19SmrgXORG_SGML_PATH=$prefix/share/sgml
69968697ee19SmrgHAVE_DEFS_ENT=
69978697ee19SmrgBUILDTXTDOC=no
69988697ee19SmrgBUILDPDFDOC=no
69998697ee19SmrgBUILDPSDOC=no
70008697ee19SmrgBUILDHTMLDOC=no
7001ab47cfaaSmrg
70028697ee19SmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7003ab47cfaaSmrg
70048697ee19SmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
70058697ee19SmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
70068697ee19SmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
70078697ee19SmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
7008ab47cfaaSmrg
70098697ee19SmrgAC_MSG_CHECKING([Whether to build text documentation])
70108697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
70118697ee19Smrg   test x$BUILD_TXTDOC != xno; then
70128697ee19Smrg	BUILDTXTDOC=yes
70138697ee19Smrgfi
70148697ee19SmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
70158697ee19SmrgAC_MSG_RESULT([$BUILDTXTDOC])
7016ab47cfaaSmrg
70178697ee19SmrgAC_MSG_CHECKING([Whether to build PDF documentation])
70188697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
70198697ee19Smrg   test x$BUILD_PDFDOC != xno; then
70208697ee19Smrg	BUILDPDFDOC=yes
7021ab47cfaaSmrgfi
70228697ee19SmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
70238697ee19SmrgAC_MSG_RESULT([$BUILDPDFDOC])
7024ab47cfaaSmrg
70258697ee19SmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
70268697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
70278697ee19Smrg   test x$BUILD_PSDOC != xno; then
70288697ee19Smrg	BUILDPSDOC=yes
70298697ee19Smrgfi
70308697ee19SmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
70318697ee19SmrgAC_MSG_RESULT([$BUILDPSDOC])
7032ab47cfaaSmrg
70338697ee19SmrgAC_MSG_CHECKING([Whether to build HTML documentation])
70348697ee19Smrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
70358697ee19Smrg   test x$BUILD_HTMLDOC != xno; then
70368697ee19Smrg	BUILDHTMLDOC=yes
70378697ee19Smrgfi
70388697ee19SmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
70398697ee19SmrgAC_MSG_RESULT([$BUILDHTMLDOC])
7040ab47cfaaSmrg
70418697ee19SmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
70428697ee19SmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
70438697ee19SmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
70448697ee19SmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
7045ab47cfaaSmrg
70468697ee19SmrgAC_SUBST(MAKE_TEXT)
70478697ee19SmrgAC_SUBST(MAKE_PS)
70488697ee19SmrgAC_SUBST(MAKE_PDF)
70498697ee19SmrgAC_SUBST(MAKE_HTML)
70508697ee19Smrg]) # XORG_CHECK_DOCBOOK
7051ab47cfaaSmrg
70528697ee19Smrg# XORG_CHECK_MALLOC_ZERO
70538697ee19Smrg# ----------------------
70548697ee19Smrg# Minimum version: 1.0.0
7055ab47cfaaSmrg#
70568697ee19Smrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
70578697ee19Smrg# malloc(0) returns NULL.  Packages should add one of these cflags to
70588697ee19Smrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
70598697ee19SmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
70608697ee19SmrgAC_ARG_ENABLE(malloc0returnsnull,
70618697ee19Smrg	AC_HELP_STRING([--enable-malloc0returnsnull],
70628697ee19Smrg		       [malloc(0) returns NULL (default: auto)]),
70638697ee19Smrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
70648697ee19Smrg	[MALLOC_ZERO_RETURNS_NULL=auto])
7065ab47cfaaSmrg
70668697ee19SmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
70678697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
70688697ee19Smrg	AC_RUN_IFELSE([
70698697ee19Smrgchar *malloc();
70708697ee19Smrgchar *realloc();
70718697ee19Smrgchar *calloc();
70728697ee19Smrgmain() {
70738697ee19Smrg    char *m0, *r0, *c0, *p;
70748697ee19Smrg    m0 = malloc(0);
70758697ee19Smrg    p = malloc(10);
70768697ee19Smrg    r0 = realloc(p,0);
70778697ee19Smrg    c0 = calloc(0);
70788697ee19Smrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
70798697ee19Smrg}],
70808697ee19Smrg		[MALLOC_ZERO_RETURNS_NULL=yes],
70818697ee19Smrg		[MALLOC_ZERO_RETURNS_NULL=no])
7082ab47cfaaSmrgfi
70838697ee19SmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
70848697ee19Smrg
70858697ee19Smrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
70868697ee19Smrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
70878697ee19Smrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
70888697ee19Smrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
70898697ee19Smrgelse
70908697ee19Smrg	MALLOC_ZERO_CFLAGS=""
70918697ee19Smrg	XMALLOC_ZERO_CFLAGS=""
70928697ee19Smrg	XTMALLOC_ZERO_CFLAGS=""
7093ab47cfaaSmrgfi
7094ab47cfaaSmrg
70958697ee19SmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
70968697ee19SmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
70978697ee19SmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
70988697ee19Smrg]) # XORG_CHECK_MALLOC_ZERO
7099ab47cfaaSmrg
71008697ee19Smrg# XORG_WITH_LINT()
71018697ee19Smrg# ----------------
71028697ee19Smrg# Minimum version: 1.1.0
7103ab47cfaaSmrg#
71048697ee19Smrg# Sets up flags for source checkers such as lint and sparse if --with-lint
71058697ee19Smrg# is specified.   (Use --with-lint=sparse for sparse.)
71068697ee19Smrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
71078697ee19Smrg# Sets $LINT_FLAGS to flags to pass to source checker
71088697ee19Smrg# Sets LINT automake conditional if enabled (default: disabled)
71098697ee19Smrg#
71108697ee19SmrgAC_DEFUN([XORG_WITH_LINT],[
7111ab47cfaaSmrg
71128697ee19Smrg# Allow checking code with lint, sparse, etc.
71138697ee19SmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
71148697ee19Smrg		[Use a lint-style source code checker (default: disabled)])],
71158697ee19Smrg		[use_lint=$withval], [use_lint=no])
71168697ee19Smrgif test "x$use_lint" = "xyes" ; then
71178697ee19Smrg	LINT="lint"
7118ab47cfaaSmrgelse
71198697ee19Smrg	LINT="$use_lint"
71208697ee19Smrgfi
71218697ee19Smrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
71228697ee19Smrg    case $LINT in
71238697ee19Smrg	lint|*/lint)
71248697ee19Smrg	    case $host_os in
71258697ee19Smrg		solaris*)
71268697ee19Smrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
71278697ee19Smrg			;;
71288697ee19Smrg	    esac
71298697ee19Smrg	    ;;
71308697ee19Smrg    esac
7131ab47cfaaSmrgfi
7132ab47cfaaSmrg
71338697ee19SmrgAC_SUBST(LINT)
71348697ee19SmrgAC_SUBST(LINT_FLAGS)
71358697ee19SmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
7136ab47cfaaSmrg
71378697ee19Smrg]) # XORG_WITH_LINT
71388697ee19Smrg
71398697ee19Smrg# XORG_LINT_LIBRARY(LIBNAME)
71408697ee19Smrg# --------------------------
71418697ee19Smrg# Minimum version: 1.1.0
7142ab47cfaaSmrg#
71438697ee19Smrg# Sets up flags for building lint libraries for checking programs that call
71448697ee19Smrg# functions in the library.
71458697ee19Smrg# Disabled by default, enable with --enable-lint-library
71468697ee19Smrg# Sets: 
71478697ee19Smrg#	@LINTLIB@		- name of lint library file to make
71488697ee19Smrg#	MAKE_LINT_LIB		- automake conditional
7149ab47cfaaSmrg#
71508697ee19Smrg
71518697ee19SmrgAC_DEFUN([XORG_LINT_LIBRARY],[
71528697ee19SmrgAC_REQUIRE([XORG_WITH_LINT])
71538697ee19Smrg# Build lint "library" for more indepth checks of programs calling this library
71548697ee19SmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
71558697ee19Smrg	[Create lint library (default: disabled)])],
71568697ee19Smrg	[make_lint_lib=$enableval], [make_lint_lib=no])
71578697ee19Smrgif test "x$make_lint_lib" != "xno" ; then
71588697ee19Smrg	if test "x$LINT" = "xno" ; then
71598697ee19Smrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
71608697ee19Smrg	fi
71618697ee19Smrg	if test "x$make_lint_lib" = "xyes" ; then
71628697ee19Smrg		LINTLIB=llib-l$1.ln
71638697ee19Smrg	else
71648697ee19Smrg		LINTLIB=$make_lint_lib
71658697ee19Smrg	fi
7166ab47cfaaSmrgfi
71678697ee19SmrgAC_SUBST(LINTLIB)
71688697ee19SmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
7169ab47cfaaSmrg
71708697ee19Smrg]) # XORG_LINT_LIBRARY
7171ab47cfaaSmrg
71728697ee19Smrgdnl Copyright 2005 Red Hat, Inc
71738697ee19Smrgdnl 
71748697ee19Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
71758697ee19Smrgdnl documentation for any purpose is hereby granted without fee, provided that
71768697ee19Smrgdnl the above copyright notice appear in all copies and that both that
71778697ee19Smrgdnl copyright notice and this permission notice appear in supporting
71788697ee19Smrgdnl documentation.
71798697ee19Smrgdnl 
71808697ee19Smrgdnl The above copyright notice and this permission notice shall be included
71818697ee19Smrgdnl in all copies or substantial portions of the Software.
71828697ee19Smrgdnl 
71838697ee19Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
71848697ee19Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
71858697ee19Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
71868697ee19Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
71878697ee19Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
71888697ee19Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
71898697ee19Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
71908697ee19Smrgdnl 
71918697ee19Smrgdnl Except as contained in this notice, the name of the copyright holders shall
71928697ee19Smrgdnl not be used in advertising or otherwise to promote the sale, use or
71938697ee19Smrgdnl other dealings in this Software without prior written authorization
71948697ee19Smrgdnl from the copyright holders.
71958697ee19Smrgdnl 
7196ab47cfaaSmrg
71978697ee19Smrg# XORG_DRIVER_CHECK_EXT()
71988697ee19Smrg# --------------------------
71998697ee19Smrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
72008697ee19Smrg# is defined, then add $1 to $REQUIRED_MODULES.
7201ab47cfaaSmrg
72028697ee19SmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
72038697ee19Smrg	SAVE_CFLAGS="$CFLAGS"
72048697ee19Smrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
72058697ee19Smrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
72068697ee19Smrg#include "xorg-server.h"
72078697ee19Smrg#if !defined $1
72088697ee19Smrg#error $1 not defined
72098697ee19Smrg#endif
72108697ee19Smrg		]])],
72118697ee19Smrg		[_EXT_CHECK=yes],
72128697ee19Smrg		[_EXT_CHECK=no])
72138697ee19Smrg	CFLAGS="$SAVE_CFLAGS"
72148697ee19Smrg	AC_MSG_CHECKING([if $1 is defined])
72158697ee19Smrg	AC_MSG_RESULT([$_EXT_CHECK])
72168697ee19Smrg	if test "$_EXT_CHECK" != no; then
72178697ee19Smrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
72188697ee19Smrg	fi
72198697ee19Smrg])
7220ab47cfaaSmrg
72218697ee19Smrgdnl Copyright 2005 Red Hat, Inc
72228697ee19Smrgdnl
72238697ee19Smrgdnl Permission to use, copy, modify, distribute, and sell this software and its
72248697ee19Smrgdnl documentation for any purpose is hereby granted without fee, provided that
72258697ee19Smrgdnl the above copyright notice appear in all copies and that both that
72268697ee19Smrgdnl copyright notice and this permission notice appear in supporting
72278697ee19Smrgdnl documentation.
72288697ee19Smrgdnl
72298697ee19Smrgdnl The above copyright notice and this permission notice shall be included
72308697ee19Smrgdnl in all copies or substantial portions of the Software.
72318697ee19Smrgdnl
72328697ee19Smrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
72338697ee19Smrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
72348697ee19Smrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
72358697ee19Smrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
72368697ee19Smrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
72378697ee19Smrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
72388697ee19Smrgdnl OTHER DEALINGS IN THE SOFTWARE.
72398697ee19Smrgdnl
72408697ee19Smrgdnl Except as contained in this notice, the name of the copyright holders shall
72418697ee19Smrgdnl not be used in advertising or otherwise to promote the sale, use or
72428697ee19Smrgdnl other dealings in this Software without prior written authorization
72438697ee19Smrgdnl from the copyright holders.
72448697ee19Smrgdnl
7245ab47cfaaSmrg
72468697ee19Smrg# XORG_RELEASE_VERSION
72478697ee19Smrg# --------------------
72488697ee19Smrg# Adds --with/without-release-string and changes the PACKAGE and
72498697ee19Smrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
72508697ee19Smrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
72518697ee19Smrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
72528697ee19Smrg 
72538697ee19SmrgAC_DEFUN([XORG_RELEASE_VERSION],[
72548697ee19Smrg	AC_ARG_WITH(release-version,
72558697ee19Smrg			AC_HELP_STRING([--with-release-version=STRING],
72568697ee19Smrg				[Use release version string in package name]),
72578697ee19Smrg			[RELEASE_VERSION="$withval"],
72588697ee19Smrg			[RELEASE_VERSION=""])
72598697ee19Smrg	if test "x$RELEASE_VERSION" != "x"; then
72608697ee19Smrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
72618697ee19Smrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
72628697ee19Smrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
72638697ee19Smrg	fi
72648697ee19Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
72658697ee19Smrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
72668697ee19Smrg		[Major version of this package])
72678697ee19Smrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
72688697ee19Smrg	if test "x$PVM" = "x"; then
72698697ee19Smrg		PVM="0"
72708697ee19Smrg	fi
72718697ee19Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
72728697ee19Smrg		[$PVM],
72738697ee19Smrg		[Minor version of this package])
72748697ee19Smrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
72758697ee19Smrg	if test "x$PVP" = "x"; then
72768697ee19Smrg		PVP="0"
72778697ee19Smrg	fi
72788697ee19Smrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
72798697ee19Smrg		[$PVP],
72808697ee19Smrg		[Patch version of this package])
72818697ee19Smrg])
7282ab47cfaaSmrg
72838697ee19Smrg# Copyright (C) 2002, 2003, 2005, 2006, 2007  Free Software Foundation, Inc.
7284ab47cfaaSmrg#
7285ab47cfaaSmrg# This file is free software; the Free Software Foundation
7286ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7287ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7288ab47cfaaSmrg
72898697ee19Smrg# AM_AUTOMAKE_VERSION(VERSION)
72908697ee19Smrg# ----------------------------
72918697ee19Smrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
72928697ee19Smrg# generated from the m4 files accompanying Automake X.Y.
72938697ee19Smrg# (This private macro should not be called outside this file.)
72948697ee19SmrgAC_DEFUN([AM_AUTOMAKE_VERSION],
72958697ee19Smrg[am__api_version='1.10'
72968697ee19Smrgdnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
72978697ee19Smrgdnl require some minimum version.  Point them to the right macro.
72988697ee19Smrgm4_if([$1], [1.10.1], [],
72998697ee19Smrg      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
73008697ee19Smrg])
7301ab47cfaaSmrg
73028697ee19Smrg# _AM_AUTOCONF_VERSION(VERSION)
73038697ee19Smrg# -----------------------------
73048697ee19Smrg# aclocal traces this macro to find the Autoconf version.
73058697ee19Smrg# This is a private macro too.  Using m4_define simplifies
73068697ee19Smrg# the logic in aclocal, which can simply ignore this definition.
73078697ee19Smrgm4_define([_AM_AUTOCONF_VERSION], [])
7308ab47cfaaSmrg
73098697ee19Smrg# AM_SET_CURRENT_AUTOMAKE_VERSION
73108697ee19Smrg# -------------------------------
73118697ee19Smrg# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
73128697ee19Smrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
73138697ee19SmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
73148697ee19Smrg[AM_AUTOMAKE_VERSION([1.10.1])dnl
73158697ee19Smrgm4_ifndef([AC_AUTOCONF_VERSION],
73168697ee19Smrg  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
73178697ee19Smrg_AM_AUTOCONF_VERSION(AC_AUTOCONF_VERSION)])
7318ab47cfaaSmrg
73198697ee19Smrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
7320ab47cfaaSmrg
7321ab47cfaaSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7322ab47cfaaSmrg#
7323ab47cfaaSmrg# This file is free software; the Free Software Foundation
7324ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7325ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7326ab47cfaaSmrg
73278697ee19Smrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
73288697ee19Smrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
73298697ee19Smrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
73308697ee19Smrg#
73318697ee19Smrg# Of course, Automake must honor this variable whenever it calls a
73328697ee19Smrg# tool from the auxiliary directory.  The problem is that $srcdir (and
73338697ee19Smrg# therefore $ac_aux_dir as well) can be either absolute or relative,
73348697ee19Smrg# depending on how configure is run.  This is pretty annoying, since
73358697ee19Smrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
73368697ee19Smrg# source directory, any form will work fine, but in subdirectories a
73378697ee19Smrg# relative path needs to be adjusted first.
73388697ee19Smrg#
73398697ee19Smrg# $ac_aux_dir/missing
73408697ee19Smrg#    fails when called from a subdirectory if $ac_aux_dir is relative
73418697ee19Smrg# $top_srcdir/$ac_aux_dir/missing
73428697ee19Smrg#    fails if $ac_aux_dir is absolute,
73438697ee19Smrg#    fails when called from a subdirectory in a VPATH build with
73448697ee19Smrg#          a relative $ac_aux_dir
73458697ee19Smrg#
73468697ee19Smrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
73478697ee19Smrg# are both prefixed by $srcdir.  In an in-source build this is usually
73488697ee19Smrg# harmless because $srcdir is `.', but things will broke when you
73498697ee19Smrg# start a VPATH build or use an absolute $srcdir.
73508697ee19Smrg#
73518697ee19Smrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
73528697ee19Smrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
73538697ee19Smrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
73548697ee19Smrg# and then we would define $MISSING as
73558697ee19Smrg#   MISSING="\${SHELL} $am_aux_dir/missing"
73568697ee19Smrg# This will work as long as MISSING is not called from configure, because
73578697ee19Smrg# unfortunately $(top_srcdir) has no meaning in configure.
73588697ee19Smrg# However there are other variables, like CC, which are often used in
73598697ee19Smrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
73608697ee19Smrg#
73618697ee19Smrg# Another solution, used here, is to always expand $ac_aux_dir to an
73628697ee19Smrg# absolute PATH.  The drawback is that using absolute paths prevent a
73638697ee19Smrg# configured tree to be moved without reconfiguration.
7364ab47cfaaSmrg
73658697ee19SmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
73668697ee19Smrg[dnl Rely on autoconf to set up CDPATH properly.
73678697ee19SmrgAC_PREREQ([2.50])dnl
73688697ee19Smrg# expand $ac_aux_dir to an absolute path
73698697ee19Smrgam_aux_dir=`cd $ac_aux_dir && pwd`
73708697ee19Smrg])
7371ab47cfaaSmrg
73728697ee19Smrg# AM_CONDITIONAL                                            -*- Autoconf -*-
73738697ee19Smrg
73748697ee19Smrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006
73758697ee19Smrg# Free Software Foundation, Inc.
7376ab47cfaaSmrg#
7377ab47cfaaSmrg# This file is free software; the Free Software Foundation
7378ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7379ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7380ab47cfaaSmrg
73818697ee19Smrg# serial 8
7382ab47cfaaSmrg
73838697ee19Smrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
73848697ee19Smrg# -------------------------------------
73858697ee19Smrg# Define a conditional.
73868697ee19SmrgAC_DEFUN([AM_CONDITIONAL],
73878697ee19Smrg[AC_PREREQ(2.52)dnl
73888697ee19Smrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
73898697ee19Smrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
73908697ee19SmrgAC_SUBST([$1_TRUE])dnl
73918697ee19SmrgAC_SUBST([$1_FALSE])dnl
73928697ee19Smrg_AM_SUBST_NOTMAKE([$1_TRUE])dnl
73938697ee19Smrg_AM_SUBST_NOTMAKE([$1_FALSE])dnl
73948697ee19Smrgif $2; then
73958697ee19Smrg  $1_TRUE=
73968697ee19Smrg  $1_FALSE='#'
73978697ee19Smrgelse
73988697ee19Smrg  $1_TRUE='#'
73998697ee19Smrg  $1_FALSE=
74008697ee19Smrgfi
74018697ee19SmrgAC_CONFIG_COMMANDS_PRE(
74028697ee19Smrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
74038697ee19Smrg  AC_MSG_ERROR([[conditional "$1" was never defined.
74048697ee19SmrgUsually this means the macro was only invoked conditionally.]])
74058697ee19Smrgfi])])
74068697ee19Smrg
74078697ee19Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
74088697ee19Smrg# Free Software Foundation, Inc.
7409ab47cfaaSmrg#
74108697ee19Smrg# This file is free software; the Free Software Foundation
74118697ee19Smrg# gives unlimited permission to copy and/or distribute it,
74128697ee19Smrg# with or without modifications, as long as this notice is preserved.
74138697ee19Smrg
74148697ee19Smrg# serial 9
74158697ee19Smrg
74168697ee19Smrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
74178697ee19Smrg# written in clear, in which case automake, when reading aclocal.m4,
74188697ee19Smrg# will think it sees a *use*, and therefore will trigger all it's
74198697ee19Smrg# C support machinery.  Also note that it means that autoscan, seeing
74208697ee19Smrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
74218697ee19Smrg
74228697ee19Smrg
74238697ee19Smrg# _AM_DEPENDENCIES(NAME)
74248697ee19Smrg# ----------------------
74258697ee19Smrg# See how the compiler implements dependency checking.
74268697ee19Smrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
74278697ee19Smrg# We try a few techniques and use that to set a single cache variable.
7428ab47cfaaSmrg#
74298697ee19Smrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
74308697ee19Smrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
74318697ee19Smrg# dependency, and given that the user is not expected to run this macro,
74328697ee19Smrg# just rely on AC_PROG_CC.
74338697ee19SmrgAC_DEFUN([_AM_DEPENDENCIES],
74348697ee19Smrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
74358697ee19SmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
74368697ee19SmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
74378697ee19SmrgAC_REQUIRE([AM_DEP_TRACK])dnl
7438ab47cfaaSmrg
74398697ee19Smrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
74408697ee19Smrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
74418697ee19Smrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
74428697ee19Smrg       [$1], UPC,  [depcc="$UPC"  am_compiler_list=],
74438697ee19Smrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
74448697ee19Smrg                   [depcc="$$1"   am_compiler_list=])
7445ab47cfaaSmrg
74468697ee19SmrgAC_CACHE_CHECK([dependency style of $depcc],
74478697ee19Smrg               [am_cv_$1_dependencies_compiler_type],
74488697ee19Smrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
74498697ee19Smrg  # We make a subdir and do the tests there.  Otherwise we can end up
74508697ee19Smrg  # making bogus files that we don't know about and never remove.  For
74518697ee19Smrg  # instance it was reported that on HP-UX the gcc test will end up
74528697ee19Smrg  # making a dummy file named `D' -- because `-MD' means `put the output
74538697ee19Smrg  # in D'.
7454ab47cfaaSmrg  mkdir conftest.dir
74558697ee19Smrg  # Copy depcomp to subdir because otherwise we won't find it if we're
74568697ee19Smrg  # using a relative directory.
74578697ee19Smrg  cp "$am_depcomp" conftest.dir
74588697ee19Smrg  cd conftest.dir
74598697ee19Smrg  # We will build objects and dependencies in a subdirectory because
74608697ee19Smrg  # it helps to detect inapplicable dependency modes.  For instance
74618697ee19Smrg  # both Tru64's cc and ICC support -MD to output dependencies as a
74628697ee19Smrg  # side effect of compilation, but ICC will put the dependencies in
74638697ee19Smrg  # the current directory while Tru64 will put them in the object
74648697ee19Smrg  # directory.
74658697ee19Smrg  mkdir sub
74668697ee19Smrg
74678697ee19Smrg  am_cv_$1_dependencies_compiler_type=none
74688697ee19Smrg  if test "$am_compiler_list" = ""; then
74698697ee19Smrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
7470ab47cfaaSmrg  fi
74718697ee19Smrg  for depmode in $am_compiler_list; do
74728697ee19Smrg    # Setup a source with many dependencies, because some compilers
74738697ee19Smrg    # like to wrap large dependency lists on column 80 (with \), and
74748697ee19Smrg    # we should not choose a depcomp mode which is confused by this.
74758697ee19Smrg    #
74768697ee19Smrg    # We need to recreate these files for each test, as the compiler may
74778697ee19Smrg    # overwrite some of them when testing with obscure command lines.
74788697ee19Smrg    # This happens at least with the AIX C compiler.
74798697ee19Smrg    : > sub/conftest.c
74808697ee19Smrg    for i in 1 2 3 4 5 6; do
74818697ee19Smrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
74828697ee19Smrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
74838697ee19Smrg      # Solaris 8's {/usr,}/bin/sh.
74848697ee19Smrg      touch sub/conftst$i.h
74858697ee19Smrg    done
74868697ee19Smrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
7487ab47cfaaSmrg
74888697ee19Smrg    case $depmode in
74898697ee19Smrg    nosideeffect)
74908697ee19Smrg      # after this tag, mechanisms are not by side-effect, so they'll
74918697ee19Smrg      # only be used when explicitly requested
74928697ee19Smrg      if test "x$enable_dependency_tracking" = xyes; then
74938697ee19Smrg	continue
74948697ee19Smrg      else
74958697ee19Smrg	break
74968697ee19Smrg      fi
74978697ee19Smrg      ;;
74988697ee19Smrg    none) break ;;
74998697ee19Smrg    esac
75008697ee19Smrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
75018697ee19Smrg    # mode.  It turns out that the SunPro C++ compiler does not properly
75028697ee19Smrg    # handle `-M -o', and we need to detect this.
75038697ee19Smrg    if depmode=$depmode \
75048697ee19Smrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
75058697ee19Smrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
75068697ee19Smrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
75078697ee19Smrg         >/dev/null 2>conftest.err &&
75088697ee19Smrg       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
75098697ee19Smrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
75108697ee19Smrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
75118697ee19Smrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
75128697ee19Smrg      # icc doesn't choke on unknown options, it will just issue warnings
75138697ee19Smrg      # or remarks (even with -Werror).  So we grep stderr for any message
75148697ee19Smrg      # that says an option was ignored or not supported.
75158697ee19Smrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
75168697ee19Smrg      #   icc: Command line warning: ignoring option '-M'; no argument required
75178697ee19Smrg      # The diagnosis changed in icc 8.0:
75188697ee19Smrg      #   icc: Command line remark: option '-MP' not supported
75198697ee19Smrg      if (grep 'ignoring option' conftest.err ||
75208697ee19Smrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
75218697ee19Smrg        am_cv_$1_dependencies_compiler_type=$depmode
75228697ee19Smrg        break
75238697ee19Smrg      fi
75248697ee19Smrg    fi
75258697ee19Smrg  done
7526ab47cfaaSmrg
75278697ee19Smrg  cd ..
75288697ee19Smrg  rm -rf conftest.dir
75298697ee19Smrgelse
75308697ee19Smrg  am_cv_$1_dependencies_compiler_type=none
75318697ee19Smrgfi
75328697ee19Smrg])
75338697ee19SmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
75348697ee19SmrgAM_CONDITIONAL([am__fastdep$1], [
75358697ee19Smrg  test "x$enable_dependency_tracking" != xno \
75368697ee19Smrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
75378697ee19Smrg])
7538ab47cfaaSmrg
75398697ee19Smrg
75408697ee19Smrg# AM_SET_DEPDIR
75418697ee19Smrg# -------------
75428697ee19Smrg# Choose a directory name for dependency files.
75438697ee19Smrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
75448697ee19SmrgAC_DEFUN([AM_SET_DEPDIR],
75458697ee19Smrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
75468697ee19SmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
75478697ee19Smrg])
75488697ee19Smrg
75498697ee19Smrg
75508697ee19Smrg# AM_DEP_TRACK
75518697ee19Smrg# ------------
75528697ee19SmrgAC_DEFUN([AM_DEP_TRACK],
75538697ee19Smrg[AC_ARG_ENABLE(dependency-tracking,
75548697ee19Smrg[  --disable-dependency-tracking  speeds up one-time build
75558697ee19Smrg  --enable-dependency-tracking   do not reject slow dependency extractors])
75568697ee19Smrgif test "x$enable_dependency_tracking" != xno; then
75578697ee19Smrg  am_depcomp="$ac_aux_dir/depcomp"
75588697ee19Smrg  AMDEPBACKSLASH='\'
75598697ee19Smrgfi
75608697ee19SmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
75618697ee19SmrgAC_SUBST([AMDEPBACKSLASH])dnl
75628697ee19Smrg_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
75638697ee19Smrg])
75648697ee19Smrg
75658697ee19Smrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
75668697ee19Smrg
75678697ee19Smrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
75688697ee19Smrg# Free Software Foundation, Inc.
7569ab47cfaaSmrg#
75708697ee19Smrg# This file is free software; the Free Software Foundation
75718697ee19Smrg# gives unlimited permission to copy and/or distribute it,
75728697ee19Smrg# with or without modifications, as long as this notice is preserved.
75738697ee19Smrg
75748697ee19Smrg#serial 3
75758697ee19Smrg
75768697ee19Smrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
75778697ee19Smrg# ------------------------------
75788697ee19SmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
75798697ee19Smrg[for mf in $CONFIG_FILES; do
75808697ee19Smrg  # Strip MF so we end up with the name of the file.
75818697ee19Smrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
75828697ee19Smrg  # Check whether this is an Automake generated Makefile or not.
75838697ee19Smrg  # We used to match only the files named `Makefile.in', but
75848697ee19Smrg  # some people rename them; so instead we look at the file content.
75858697ee19Smrg  # Grep'ing the first line is not enough: some people post-process
75868697ee19Smrg  # each Makefile.in and add a new line on top of each file to say so.
75878697ee19Smrg  # Grep'ing the whole file is not good either: AIX grep has a line
75888697ee19Smrg  # limit of 2048, but all sed's we know have understand at least 4000.
75898697ee19Smrg  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
75908697ee19Smrg    dirpart=`AS_DIRNAME("$mf")`
75918697ee19Smrg  else
75928697ee19Smrg    continue
75938697ee19Smrg  fi
75948697ee19Smrg  # Extract the definition of DEPDIR, am__include, and am__quote
75958697ee19Smrg  # from the Makefile without running `make'.
75968697ee19Smrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
75978697ee19Smrg  test -z "$DEPDIR" && continue
75988697ee19Smrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
75998697ee19Smrg  test -z "am__include" && continue
76008697ee19Smrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
76018697ee19Smrg  # When using ansi2knr, U may be empty or an underscore; expand it
76028697ee19Smrg  U=`sed -n 's/^U = //p' < "$mf"`
76038697ee19Smrg  # Find all dependency output files, they are included files with
76048697ee19Smrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
76058697ee19Smrg  # simplest approach to changing $(DEPDIR) to its actual value in the
76068697ee19Smrg  # expansion.
76078697ee19Smrg  for file in `sed -n "
76088697ee19Smrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
76098697ee19Smrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
76108697ee19Smrg    # Make sure the directory exists.
76118697ee19Smrg    test -f "$dirpart/$file" && continue
76128697ee19Smrg    fdir=`AS_DIRNAME(["$file"])`
76138697ee19Smrg    AS_MKDIR_P([$dirpart/$fdir])
76148697ee19Smrg    # echo "creating $dirpart/$file"
76158697ee19Smrg    echo '# dummy' > "$dirpart/$file"
76168697ee19Smrg  done
76178697ee19Smrgdone
76188697ee19Smrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
76198697ee19Smrg
76208697ee19Smrg
76218697ee19Smrg# AM_OUTPUT_DEPENDENCY_COMMANDS
76228697ee19Smrg# -----------------------------
76238697ee19Smrg# This macro should only be invoked once -- use via AC_REQUIRE.
7624ab47cfaaSmrg#
76258697ee19Smrg# This code is only required when automatic dependency tracking
76268697ee19Smrg# is enabled.  FIXME.  This creates each `.P' file that we will
76278697ee19Smrg# need in order to bootstrap the dependency handling code.
76288697ee19SmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
76298697ee19Smrg[AC_CONFIG_COMMANDS([depfiles],
76308697ee19Smrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
76318697ee19Smrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
76328697ee19Smrg])
76338697ee19Smrg
76348697ee19Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
76358697ee19Smrg# Free Software Foundation, Inc.
7636ab47cfaaSmrg#
76378697ee19Smrg# This file is free software; the Free Software Foundation
76388697ee19Smrg# gives unlimited permission to copy and/or distribute it,
76398697ee19Smrg# with or without modifications, as long as this notice is preserved.
76408697ee19Smrg
76418697ee19Smrg# serial 8
76428697ee19Smrg
76438697ee19Smrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
76448697ee19SmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
76458697ee19Smrg
76468697ee19Smrg# Do all the work for Automake.                             -*- Autoconf -*-
76478697ee19Smrg
76488697ee19Smrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
76498697ee19Smrg# 2005, 2006, 2008 Free Software Foundation, Inc.
7650ab47cfaaSmrg#
76518697ee19Smrg# This file is free software; the Free Software Foundation
76528697ee19Smrg# gives unlimited permission to copy and/or distribute it,
76538697ee19Smrg# with or without modifications, as long as this notice is preserved.
76548697ee19Smrg
76558697ee19Smrg# serial 13
76568697ee19Smrg
76578697ee19Smrg# This macro actually does too much.  Some checks are only needed if
76588697ee19Smrg# your package does certain things.  But this isn't really a big deal.
76598697ee19Smrg
76608697ee19Smrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
76618697ee19Smrg# AM_INIT_AUTOMAKE([OPTIONS])
76628697ee19Smrg# -----------------------------------------------
76638697ee19Smrg# The call with PACKAGE and VERSION arguments is the old style
76648697ee19Smrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
76658697ee19Smrg# and VERSION should now be passed to AC_INIT and removed from
76668697ee19Smrg# the call to AM_INIT_AUTOMAKE.
76678697ee19Smrg# We support both call styles for the transition.  After
76688697ee19Smrg# the next Automake release, Autoconf can make the AC_INIT
76698697ee19Smrg# arguments mandatory, and then we can depend on a new Autoconf
76708697ee19Smrg# release and drop the old call support.
76718697ee19SmrgAC_DEFUN([AM_INIT_AUTOMAKE],
76728697ee19Smrg[AC_PREREQ([2.60])dnl
76738697ee19Smrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
76748697ee19Smrgdnl the ones we care about.
76758697ee19Smrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
76768697ee19SmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
76778697ee19SmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
76788697ee19Smrgif test "`cd $srcdir && pwd`" != "`pwd`"; then
76798697ee19Smrg  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
76808697ee19Smrg  # is not polluted with repeated "-I."
76818697ee19Smrg  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
76828697ee19Smrg  # test to see if srcdir already configured
76838697ee19Smrg  if test -f $srcdir/config.status; then
76848697ee19Smrg    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
76858697ee19Smrg  fi
76868697ee19Smrgfi
76878697ee19Smrg
76888697ee19Smrg# test whether we have cygpath
76898697ee19Smrgif test -z "$CYGPATH_W"; then
76908697ee19Smrg  if (cygpath --version) >/dev/null 2>/dev/null; then
76918697ee19Smrg    CYGPATH_W='cygpath -w'
76928697ee19Smrg  else
76938697ee19Smrg    CYGPATH_W=echo
76948697ee19Smrg  fi
76958697ee19Smrgfi
76968697ee19SmrgAC_SUBST([CYGPATH_W])
76978697ee19Smrg
76988697ee19Smrg# Define the identity of the package.
76998697ee19Smrgdnl Distinguish between old-style and new-style calls.
77008697ee19Smrgm4_ifval([$2],
77018697ee19Smrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
77028697ee19Smrg AC_SUBST([PACKAGE], [$1])dnl
77038697ee19Smrg AC_SUBST([VERSION], [$2])],
77048697ee19Smrg[_AM_SET_OPTIONS([$1])dnl
77058697ee19Smrgdnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
77068697ee19Smrgm4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
77078697ee19Smrg  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
77088697ee19Smrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
77098697ee19Smrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
77108697ee19Smrg
77118697ee19Smrg_AM_IF_OPTION([no-define],,
77128697ee19Smrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
77138697ee19Smrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
77148697ee19Smrg
77158697ee19Smrg# Some tools Automake needs.
77168697ee19SmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
77178697ee19SmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
77188697ee19SmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
77198697ee19SmrgAM_MISSING_PROG(AUTOCONF, autoconf)
77208697ee19SmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
77218697ee19SmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
77228697ee19SmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
77238697ee19SmrgAM_PROG_INSTALL_SH
77248697ee19SmrgAM_PROG_INSTALL_STRIP
77258697ee19SmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
77268697ee19Smrg# We need awk for the "check" target.  The system "awk" is bad on
77278697ee19Smrg# some platforms.
77288697ee19SmrgAC_REQUIRE([AC_PROG_AWK])dnl
77298697ee19SmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
77308697ee19SmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
77318697ee19Smrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
77328697ee19Smrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
77338697ee19Smrg	      		     [_AM_PROG_TAR([v7])])])
77348697ee19Smrg_AM_IF_OPTION([no-dependencies],,
77358697ee19Smrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
77368697ee19Smrg                  [_AM_DEPENDENCIES(CC)],
77378697ee19Smrg                  [define([AC_PROG_CC],
77388697ee19Smrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
77398697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
77408697ee19Smrg                  [_AM_DEPENDENCIES(CXX)],
77418697ee19Smrg                  [define([AC_PROG_CXX],
77428697ee19Smrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
77438697ee19SmrgAC_PROVIDE_IFELSE([AC_PROG_OBJC],
77448697ee19Smrg                  [_AM_DEPENDENCIES(OBJC)],
77458697ee19Smrg                  [define([AC_PROG_OBJC],
77468697ee19Smrg                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
77478697ee19Smrg])
77488697ee19Smrg])
7749ab47cfaaSmrg
7750ab47cfaaSmrg
77518697ee19Smrg# When config.status generates a header, we must update the stamp-h file.
77528697ee19Smrg# This file resides in the same directory as the config header
77538697ee19Smrg# that is generated.  The stamp files are numbered to have different names.
7754ab47cfaaSmrg
77558697ee19Smrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
77568697ee19Smrg# loop where config.status creates the headers, so we can generate
77578697ee19Smrg# our stamp files there.
77588697ee19SmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
77598697ee19Smrg[# Compute $1's index in $config_headers.
77608697ee19Smrg_am_arg=$1
77618697ee19Smrg_am_stamp_count=1
77628697ee19Smrgfor _am_header in $config_headers :; do
77638697ee19Smrg  case $_am_header in
77648697ee19Smrg    $_am_arg | $_am_arg:* )
77658697ee19Smrg      break ;;
77668697ee19Smrg    * )
77678697ee19Smrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
77688697ee19Smrg  esac
77698697ee19Smrgdone
77708697ee19Smrgecho "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
7771ab47cfaaSmrg
77728697ee19Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7773ab47cfaaSmrg#
77748697ee19Smrg# This file is free software; the Free Software Foundation
77758697ee19Smrg# gives unlimited permission to copy and/or distribute it,
77768697ee19Smrg# with or without modifications, as long as this notice is preserved.
7777ab47cfaaSmrg
77788697ee19Smrg# AM_PROG_INSTALL_SH
77798697ee19Smrg# ------------------
77808697ee19Smrg# Define $install_sh.
77818697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_SH],
77828697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
77838697ee19Smrginstall_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
77848697ee19SmrgAC_SUBST(install_sh)])
7785ab47cfaaSmrg
77868697ee19Smrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
77878697ee19Smrg#
77888697ee19Smrg# This file is free software; the Free Software Foundation
77898697ee19Smrg# gives unlimited permission to copy and/or distribute it,
77908697ee19Smrg# with or without modifications, as long as this notice is preserved.
7791ab47cfaaSmrg
77928697ee19Smrg# serial 2
7793ab47cfaaSmrg
77948697ee19Smrg# Check whether the underlying file-system supports filenames
77958697ee19Smrg# with a leading dot.  For instance MS-DOS doesn't.
77968697ee19SmrgAC_DEFUN([AM_SET_LEADING_DOT],
77978697ee19Smrg[rm -rf .tst 2>/dev/null
77988697ee19Smrgmkdir .tst 2>/dev/null
77998697ee19Smrgif test -d .tst; then
78008697ee19Smrg  am__leading_dot=.
78018697ee19Smrgelse
78028697ee19Smrg  am__leading_dot=_
7803ab47cfaaSmrgfi
78048697ee19Smrgrmdir .tst 2>/dev/null
78058697ee19SmrgAC_SUBST([am__leading_dot])])
7806ab47cfaaSmrg
78078697ee19Smrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
78088697ee19Smrg# From Jim Meyering
7809ab47cfaaSmrg
78108697ee19Smrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
78118697ee19Smrg# Free Software Foundation, Inc.
78128697ee19Smrg#
78138697ee19Smrg# This file is free software; the Free Software Foundation
78148697ee19Smrg# gives unlimited permission to copy and/or distribute it,
78158697ee19Smrg# with or without modifications, as long as this notice is preserved.
7816ab47cfaaSmrg
78178697ee19Smrg# serial 4
7818ab47cfaaSmrg
78198697ee19SmrgAC_DEFUN([AM_MAINTAINER_MODE],
78208697ee19Smrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
78218697ee19Smrg  dnl maintainer-mode is disabled by default
78228697ee19Smrg  AC_ARG_ENABLE(maintainer-mode,
78238697ee19Smrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
78248697ee19Smrg			  (and sometimes confusing) to the casual installer],
78258697ee19Smrg      USE_MAINTAINER_MODE=$enableval,
78268697ee19Smrg      USE_MAINTAINER_MODE=no)
78278697ee19Smrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
78288697ee19Smrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
78298697ee19Smrg  MAINT=$MAINTAINER_MODE_TRUE
78308697ee19Smrg  AC_SUBST(MAINT)dnl
78318697ee19Smrg]
78328697ee19Smrg)
7833ab47cfaaSmrg
78348697ee19SmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7835ab47cfaaSmrg
78368697ee19Smrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
7837ab47cfaaSmrg
78388697ee19Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
78398697ee19Smrg#
78408697ee19Smrg# This file is free software; the Free Software Foundation
78418697ee19Smrg# gives unlimited permission to copy and/or distribute it,
78428697ee19Smrg# with or without modifications, as long as this notice is preserved.
7843ab47cfaaSmrg
78448697ee19Smrg# serial 3
7845ab47cfaaSmrg
78468697ee19Smrg# AM_MAKE_INCLUDE()
78478697ee19Smrg# -----------------
78488697ee19Smrg# Check to see how make treats includes.
78498697ee19SmrgAC_DEFUN([AM_MAKE_INCLUDE],
78508697ee19Smrg[am_make=${MAKE-make}
78518697ee19Smrgcat > confinc << 'END'
78528697ee19Smrgam__doit:
78538697ee19Smrg	@echo done
78548697ee19Smrg.PHONY: am__doit
78558697ee19SmrgEND
78568697ee19Smrg# If we don't find an include directive, just comment out the code.
78578697ee19SmrgAC_MSG_CHECKING([for style of include used by $am_make])
78588697ee19Smrgam__include="#"
78598697ee19Smrgam__quote=
78608697ee19Smrg_am_result=none
78618697ee19Smrg# First try GNU make style include.
78628697ee19Smrgecho "include confinc" > confmf
78638697ee19Smrg# We grep out `Entering directory' and `Leaving directory'
78648697ee19Smrg# messages which can occur if `w' ends up in MAKEFLAGS.
78658697ee19Smrg# In particular we don't look at `^make:' because GNU make might
78668697ee19Smrg# be invoked under some other name (usually "gmake"), in which
78678697ee19Smrg# case it prints its new name instead of `make'.
78688697ee19Smrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
78698697ee19Smrg   am__include=include
78708697ee19Smrg   am__quote=
78718697ee19Smrg   _am_result=GNU
78728697ee19Smrgfi
78738697ee19Smrg# Now try BSD make style include.
78748697ee19Smrgif test "$am__include" = "#"; then
78758697ee19Smrg   echo '.include "confinc"' > confmf
78768697ee19Smrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
78778697ee19Smrg      am__include=.include
78788697ee19Smrg      am__quote="\""
78798697ee19Smrg      _am_result=BSD
78808697ee19Smrg   fi
7881ab47cfaaSmrgfi
78828697ee19SmrgAC_SUBST([am__include])
78838697ee19SmrgAC_SUBST([am__quote])
78848697ee19SmrgAC_MSG_RESULT([$_am_result])
78858697ee19Smrgrm -f confinc confmf
78868697ee19Smrg])
78878697ee19Smrg
78888697ee19Smrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7889ab47cfaaSmrg
78908697ee19Smrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
78918697ee19Smrg# Free Software Foundation, Inc.
78928697ee19Smrg#
78938697ee19Smrg# This file is free software; the Free Software Foundation
78948697ee19Smrg# gives unlimited permission to copy and/or distribute it,
78958697ee19Smrg# with or without modifications, as long as this notice is preserved.
7896ab47cfaaSmrg
78978697ee19Smrg# serial 5
7898ab47cfaaSmrg
78998697ee19Smrg# AM_MISSING_PROG(NAME, PROGRAM)
79008697ee19Smrg# ------------------------------
79018697ee19SmrgAC_DEFUN([AM_MISSING_PROG],
79028697ee19Smrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
79038697ee19Smrg$1=${$1-"${am_missing_run}$2"}
79048697ee19SmrgAC_SUBST($1)])
7905ab47cfaaSmrg
79068697ee19Smrg
79078697ee19Smrg# AM_MISSING_HAS_RUN
79088697ee19Smrg# ------------------
79098697ee19Smrg# Define MISSING if not defined so far and test if it supports --run.
79108697ee19Smrg# If it does, set am_missing_run to use it, otherwise, to nothing.
79118697ee19SmrgAC_DEFUN([AM_MISSING_HAS_RUN],
79128697ee19Smrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
79138697ee19SmrgAC_REQUIRE_AUX_FILE([missing])dnl
79148697ee19Smrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
79158697ee19Smrg# Use eval to expand $SHELL
79168697ee19Smrgif eval "$MISSING --run true"; then
79178697ee19Smrg  am_missing_run="$MISSING --run "
7918ab47cfaaSmrgelse
79198697ee19Smrg  am_missing_run=
79208697ee19Smrg  AC_MSG_WARN([`missing' script is too old or missing])
7921ab47cfaaSmrgfi
79228697ee19Smrg])
7923ab47cfaaSmrg
79248697ee19Smrg# Copyright (C) 2003, 2004, 2005, 2006  Free Software Foundation, Inc.
79258697ee19Smrg#
79268697ee19Smrg# This file is free software; the Free Software Foundation
79278697ee19Smrg# gives unlimited permission to copy and/or distribute it,
79288697ee19Smrg# with or without modifications, as long as this notice is preserved.
7929ab47cfaaSmrg
79308697ee19Smrg# AM_PROG_MKDIR_P
79318697ee19Smrg# ---------------
79328697ee19Smrg# Check for `mkdir -p'.
79338697ee19SmrgAC_DEFUN([AM_PROG_MKDIR_P],
79348697ee19Smrg[AC_PREREQ([2.60])dnl
79358697ee19SmrgAC_REQUIRE([AC_PROG_MKDIR_P])dnl
79368697ee19Smrgdnl Automake 1.8 to 1.9.6 used to define mkdir_p.  We now use MKDIR_P,
79378697ee19Smrgdnl while keeping a definition of mkdir_p for backward compatibility.
79388697ee19Smrgdnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
79398697ee19Smrgdnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
79408697ee19Smrgdnl Makefile.ins that do not define MKDIR_P, so we do our own
79418697ee19Smrgdnl adjustment using top_builddir (which is defined more often than
79428697ee19Smrgdnl MKDIR_P).
79438697ee19SmrgAC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
79448697ee19Smrgcase $mkdir_p in
79458697ee19Smrg  [[\\/$]]* | ?:[[\\/]]*) ;;
79468697ee19Smrg  */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
79478697ee19Smrgesac
79488697ee19Smrg])
7949ab47cfaaSmrg
79508697ee19Smrg# Helper functions for option handling.                     -*- Autoconf -*-
7951ab47cfaaSmrg
79528697ee19Smrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7953ab47cfaaSmrg#
79548697ee19Smrg# This file is free software; the Free Software Foundation
79558697ee19Smrg# gives unlimited permission to copy and/or distribute it,
79568697ee19Smrg# with or without modifications, as long as this notice is preserved.
7957ab47cfaaSmrg
79588697ee19Smrg# serial 3
7959ab47cfaaSmrg
79608697ee19Smrg# _AM_MANGLE_OPTION(NAME)
79618697ee19Smrg# -----------------------
79628697ee19SmrgAC_DEFUN([_AM_MANGLE_OPTION],
79638697ee19Smrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7964ab47cfaaSmrg
79658697ee19Smrg# _AM_SET_OPTION(NAME)
79668697ee19Smrg# ------------------------------
79678697ee19Smrg# Set option NAME.  Presently that only means defining a flag for this option.
79688697ee19SmrgAC_DEFUN([_AM_SET_OPTION],
79698697ee19Smrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7970ab47cfaaSmrg
79718697ee19Smrg# _AM_SET_OPTIONS(OPTIONS)
79728697ee19Smrg# ----------------------------------
79738697ee19Smrg# OPTIONS is a space-separated list of Automake options.
79748697ee19SmrgAC_DEFUN([_AM_SET_OPTIONS],
79758697ee19Smrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7976ab47cfaaSmrg
79778697ee19Smrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
79788697ee19Smrg# -------------------------------------------
79798697ee19Smrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
79808697ee19SmrgAC_DEFUN([_AM_IF_OPTION],
79818697ee19Smrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7982ab47cfaaSmrg
79838697ee19Smrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7984ab47cfaaSmrg
79858697ee19Smrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
79868697ee19Smrg# Free Software Foundation, Inc.
7987ab47cfaaSmrg#
79888697ee19Smrg# This file is free software; the Free Software Foundation
79898697ee19Smrg# gives unlimited permission to copy and/or distribute it,
79908697ee19Smrg# with or without modifications, as long as this notice is preserved.
7991ab47cfaaSmrg
79928697ee19Smrg# serial 4
7993ab47cfaaSmrg
79948697ee19Smrg# AM_SANITY_CHECK
79958697ee19Smrg# ---------------
79968697ee19SmrgAC_DEFUN([AM_SANITY_CHECK],
79978697ee19Smrg[AC_MSG_CHECKING([whether build environment is sane])
79988697ee19Smrg# Just in case
79998697ee19Smrgsleep 1
80008697ee19Smrgecho timestamp > conftest.file
80018697ee19Smrg# Do `set' in a subshell so we don't clobber the current shell's
80028697ee19Smrg# arguments.  Must try -L first in case configure is actually a
80038697ee19Smrg# symlink; some systems play weird games with the mod time of symlinks
80048697ee19Smrg# (eg FreeBSD returns the mod time of the symlink's containing
80058697ee19Smrg# directory).
80068697ee19Smrgif (
80078697ee19Smrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
80088697ee19Smrg   if test "$[*]" = "X"; then
80098697ee19Smrg      # -L didn't work.
80108697ee19Smrg      set X `ls -t $srcdir/configure conftest.file`
80118697ee19Smrg   fi
80128697ee19Smrg   rm -f conftest.file
80138697ee19Smrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
80148697ee19Smrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
8015ab47cfaaSmrg
80168697ee19Smrg      # If neither matched, then we have a broken ls.  This can happen
80178697ee19Smrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
80188697ee19Smrg      # broken ls alias from the environment.  This has actually
80198697ee19Smrg      # happened.  Such a system could not be considered "sane".
80208697ee19Smrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
80218697ee19Smrgalias in your environment])
80228697ee19Smrg   fi
8023ab47cfaaSmrg
80248697ee19Smrg   test "$[2]" = conftest.file
80258697ee19Smrg   )
80268697ee19Smrgthen
80278697ee19Smrg   # Ok.
80288697ee19Smrg   :
80298697ee19Smrgelse
80308697ee19Smrg   AC_MSG_ERROR([newly created file is older than distributed files!
80318697ee19SmrgCheck your system clock])
80328697ee19Smrgfi
80338697ee19SmrgAC_MSG_RESULT(yes)])
8034ab47cfaaSmrg
80358697ee19Smrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
8036ab47cfaaSmrg#
80378697ee19Smrg# This file is free software; the Free Software Foundation
80388697ee19Smrg# gives unlimited permission to copy and/or distribute it,
80398697ee19Smrg# with or without modifications, as long as this notice is preserved.
8040ab47cfaaSmrg
80418697ee19Smrg# AM_PROG_INSTALL_STRIP
80428697ee19Smrg# ---------------------
80438697ee19Smrg# One issue with vendor `install' (even GNU) is that you can't
80448697ee19Smrg# specify the program used to strip binaries.  This is especially
80458697ee19Smrg# annoying in cross-compiling environments, where the build's strip
80468697ee19Smrg# is unlikely to handle the host's binaries.
80478697ee19Smrg# Fortunately install-sh will honor a STRIPPROG variable, so we
80488697ee19Smrg# always use install-sh in `make install-strip', and initialize
80498697ee19Smrg# STRIPPROG with the value of the STRIP variable (set by the user).
80508697ee19SmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
80518697ee19Smrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
80528697ee19Smrg# Installed binaries are usually stripped using `strip' when the user
80538697ee19Smrg# run `make install-strip'.  However `strip' might not be the right
80548697ee19Smrg# tool to use in cross-compilation environments, therefore Automake
80558697ee19Smrg# will honor the `STRIP' environment variable to overrule this program.
80568697ee19Smrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
80578697ee19Smrgif test "$cross_compiling" != no; then
80588697ee19Smrg  AC_CHECK_TOOL([STRIP], [strip], :)
8059ab47cfaaSmrgfi
80608697ee19SmrgINSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
80618697ee19SmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
8062ab47cfaaSmrg
80638697ee19Smrg# Copyright (C) 2006  Free Software Foundation, Inc.
80648697ee19Smrg#
80658697ee19Smrg# This file is free software; the Free Software Foundation
80668697ee19Smrg# gives unlimited permission to copy and/or distribute it,
80678697ee19Smrg# with or without modifications, as long as this notice is preserved.
8068ab47cfaaSmrg
80698697ee19Smrg# _AM_SUBST_NOTMAKE(VARIABLE)
80708697ee19Smrg# ---------------------------
80718697ee19Smrg# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
80728697ee19Smrg# This macro is traced by Automake.
80738697ee19SmrgAC_DEFUN([_AM_SUBST_NOTMAKE])
8074ab47cfaaSmrg
80758697ee19Smrg# Check how to create a tarball.                            -*- Autoconf -*-
8076ab47cfaaSmrg
80778697ee19Smrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
80788697ee19Smrg#
80798697ee19Smrg# This file is free software; the Free Software Foundation
80808697ee19Smrg# gives unlimited permission to copy and/or distribute it,
80818697ee19Smrg# with or without modifications, as long as this notice is preserved.
8082ab47cfaaSmrg
80838697ee19Smrg# serial 2
8084ab47cfaaSmrg
80858697ee19Smrg# _AM_PROG_TAR(FORMAT)
8086ab47cfaaSmrg# --------------------
80878697ee19Smrg# Check how to create a tarball in format FORMAT.
80888697ee19Smrg# FORMAT should be one of `v7', `ustar', or `pax'.
80898697ee19Smrg#
80908697ee19Smrg# Substitute a variable $(am__tar) that is a command
80918697ee19Smrg# writing to stdout a FORMAT-tarball containing the directory
80928697ee19Smrg# $tardir.
80938697ee19Smrg#     tardir=directory && $(am__tar) > result.tar
80948697ee19Smrg#
80958697ee19Smrg# Substitute a variable $(am__untar) that extract such
80968697ee19Smrg# a tarball read from stdin.
80978697ee19Smrg#     $(am__untar) < result.tar
80988697ee19SmrgAC_DEFUN([_AM_PROG_TAR],
80998697ee19Smrg[# Always define AMTAR for backward compatibility.
81008697ee19SmrgAM_MISSING_PROG([AMTAR], [tar])
81018697ee19Smrgm4_if([$1], [v7],
81028697ee19Smrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
81038697ee19Smrg     [m4_case([$1], [ustar],, [pax],,
81048697ee19Smrg              [m4_fatal([Unknown tar format])])
81058697ee19SmrgAC_MSG_CHECKING([how to create a $1 tar archive])
81068697ee19Smrg# Loop over all known methods to create a tar archive until one works.
81078697ee19Smrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
81088697ee19Smrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
81098697ee19Smrg# Do not fold the above two line into one, because Tru64 sh and
81108697ee19Smrg# Solaris sh will not grok spaces in the rhs of `-'.
81118697ee19Smrgfor _am_tool in $_am_tools
81128697ee19Smrgdo
81138697ee19Smrg  case $_am_tool in
81148697ee19Smrg  gnutar)
81158697ee19Smrg    for _am_tar in tar gnutar gtar;
81168697ee19Smrg    do
81178697ee19Smrg      AM_RUN_LOG([$_am_tar --version]) && break
81188697ee19Smrg    done
81198697ee19Smrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
81208697ee19Smrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
81218697ee19Smrg    am__untar="$_am_tar -xf -"
81228697ee19Smrg    ;;
81238697ee19Smrg  plaintar)
81248697ee19Smrg    # Must skip GNU tar: if it does not support --format= it doesn't create
81258697ee19Smrg    # ustar tarball either.
81268697ee19Smrg    (tar --version) >/dev/null 2>&1 && continue
81278697ee19Smrg    am__tar='tar chf - "$$tardir"'
81288697ee19Smrg    am__tar_='tar chf - "$tardir"'
81298697ee19Smrg    am__untar='tar xf -'
81308697ee19Smrg    ;;
81318697ee19Smrg  pax)
81328697ee19Smrg    am__tar='pax -L -x $1 -w "$$tardir"'
81338697ee19Smrg    am__tar_='pax -L -x $1 -w "$tardir"'
81348697ee19Smrg    am__untar='pax -r'
81358697ee19Smrg    ;;
81368697ee19Smrg  cpio)
81378697ee19Smrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
81388697ee19Smrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
81398697ee19Smrg    am__untar='cpio -i -H $1 -d'
81408697ee19Smrg    ;;
81418697ee19Smrg  none)
81428697ee19Smrg    am__tar=false
81438697ee19Smrg    am__tar_=false
81448697ee19Smrg    am__untar=false
81458697ee19Smrg    ;;
81468697ee19Smrg  esac
81478697ee19Smrg
81488697ee19Smrg  # If the value was cached, stop now.  We just wanted to have am__tar
81498697ee19Smrg  # and am__untar set.
81508697ee19Smrg  test -n "${am_cv_prog_tar_$1}" && break
81518697ee19Smrg
81528697ee19Smrg  # tar/untar a dummy directory, and stop if the command works
81538697ee19Smrg  rm -rf conftest.dir
81548697ee19Smrg  mkdir conftest.dir
81558697ee19Smrg  echo GrepMe > conftest.dir/file
81568697ee19Smrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
81578697ee19Smrg  rm -rf conftest.dir
81588697ee19Smrg  if test -s conftest.tar; then
81598697ee19Smrg    AM_RUN_LOG([$am__untar <conftest.tar])
81608697ee19Smrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
81618697ee19Smrg  fi
81628697ee19Smrgdone
81638697ee19Smrgrm -rf conftest.dir
81648697ee19Smrg
81658697ee19SmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
81668697ee19SmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
81678697ee19SmrgAC_SUBST([am__tar])
81688697ee19SmrgAC_SUBST([am__untar])
81698697ee19Smrg]) # _AM_PROG_TAR
8170ab47cfaaSmrg
8171