aclocal.m4 revision ab47cfaa
1ab47cfaaSmrg# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2ab47cfaaSmrg
3ab47cfaaSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4ab47cfaaSmrg# 2005  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
14ab47cfaaSmrg# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15ab47cfaaSmrg
16ab47cfaaSmrg# serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL
17ab47cfaaSmrg
18ab47cfaaSmrg
19ab47cfaaSmrg# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20ab47cfaaSmrg# -----------------------------------------------------------
21ab47cfaaSmrg# If this macro is not defined by Autoconf, define it here.
22ab47cfaaSmrgm4_ifdef([AC_PROVIDE_IFELSE],
23ab47cfaaSmrg         [],
24ab47cfaaSmrg         [m4_define([AC_PROVIDE_IFELSE],
25ab47cfaaSmrg	         [m4_ifdef([AC_PROVIDE_$1],
26ab47cfaaSmrg		           [$2], [$3])])])
27ab47cfaaSmrg
28ab47cfaaSmrg
29ab47cfaaSmrg# AC_PROG_LIBTOOL
30ab47cfaaSmrg# ---------------
31ab47cfaaSmrgAC_DEFUN([AC_PROG_LIBTOOL],
32ab47cfaaSmrg[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33ab47cfaaSmrgdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34ab47cfaaSmrgdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35ab47cfaaSmrg  AC_PROVIDE_IFELSE([AC_PROG_CXX],
36ab47cfaaSmrg    [AC_LIBTOOL_CXX],
37ab47cfaaSmrg    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
38ab47cfaaSmrg  ])])
39ab47cfaaSmrgdnl And a similar setup for Fortran 77 support
40ab47cfaaSmrg  AC_PROVIDE_IFELSE([AC_PROG_F77],
41ab47cfaaSmrg    [AC_LIBTOOL_F77],
42ab47cfaaSmrg    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
43ab47cfaaSmrg])])
44ab47cfaaSmrg
45ab47cfaaSmrgdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46ab47cfaaSmrgdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47ab47cfaaSmrgdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48ab47cfaaSmrg  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
49ab47cfaaSmrg    [AC_LIBTOOL_GCJ],
50ab47cfaaSmrg    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
51ab47cfaaSmrg      [AC_LIBTOOL_GCJ],
52ab47cfaaSmrg      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
53ab47cfaaSmrg	[AC_LIBTOOL_GCJ],
54ab47cfaaSmrg      [ifdef([AC_PROG_GCJ],
55ab47cfaaSmrg	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56ab47cfaaSmrg       ifdef([A][M_PROG_GCJ],
57ab47cfaaSmrg	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58ab47cfaaSmrg       ifdef([LT_AC_PROG_GCJ],
59ab47cfaaSmrg	     [define([LT_AC_PROG_GCJ],
60ab47cfaaSmrg		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
61ab47cfaaSmrg])])# AC_PROG_LIBTOOL
62ab47cfaaSmrg
63ab47cfaaSmrg
64ab47cfaaSmrg# _AC_PROG_LIBTOOL
65ab47cfaaSmrg# ----------------
66ab47cfaaSmrgAC_DEFUN([_AC_PROG_LIBTOOL],
67ab47cfaaSmrg[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
68ab47cfaaSmrgAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69ab47cfaaSmrgAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70ab47cfaaSmrgAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
71ab47cfaaSmrg
72ab47cfaaSmrg# This can be used to rebuild libtool when needed
73ab47cfaaSmrgLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
74ab47cfaaSmrg
75ab47cfaaSmrg# Always use our own libtool.
76ab47cfaaSmrgLIBTOOL='$(SHELL) $(top_builddir)/libtool'
77ab47cfaaSmrgAC_SUBST(LIBTOOL)dnl
78ab47cfaaSmrg
79ab47cfaaSmrg# Prevent multiple expansion
80ab47cfaaSmrgdefine([AC_PROG_LIBTOOL], [])
81ab47cfaaSmrg])# _AC_PROG_LIBTOOL
82ab47cfaaSmrg
83ab47cfaaSmrg
84ab47cfaaSmrg# AC_LIBTOOL_SETUP
85ab47cfaaSmrg# ----------------
86ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SETUP],
87ab47cfaaSmrg[AC_PREREQ(2.50)dnl
88ab47cfaaSmrgAC_REQUIRE([AC_ENABLE_SHARED])dnl
89ab47cfaaSmrgAC_REQUIRE([AC_ENABLE_STATIC])dnl
90ab47cfaaSmrgAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
92ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
93ab47cfaaSmrgAC_REQUIRE([AC_PROG_CC])dnl
94ab47cfaaSmrgAC_REQUIRE([AC_PROG_LD])dnl
95ab47cfaaSmrgAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96ab47cfaaSmrgAC_REQUIRE([AC_PROG_NM])dnl
97ab47cfaaSmrg
98ab47cfaaSmrgAC_REQUIRE([AC_PROG_LN_S])dnl
99ab47cfaaSmrgAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
100ab47cfaaSmrg# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
101ab47cfaaSmrgAC_REQUIRE([AC_OBJEXT])dnl
102ab47cfaaSmrgAC_REQUIRE([AC_EXEEXT])dnl
103ab47cfaaSmrgdnl
104ab47cfaaSmrg
105ab47cfaaSmrgAC_LIBTOOL_SYS_MAX_CMD_LEN
106ab47cfaaSmrgAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
107ab47cfaaSmrgAC_LIBTOOL_OBJDIR
108ab47cfaaSmrg
109ab47cfaaSmrgAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
110ab47cfaaSmrg_LT_AC_PROG_ECHO_BACKSLASH
111ab47cfaaSmrg
112ab47cfaaSmrgcase $host_os in
113ab47cfaaSmrgaix3*)
114ab47cfaaSmrg  # AIX sometimes has problems with the GCC collect2 program.  For some
115ab47cfaaSmrg  # reason, if we set the COLLECT_NAMES environment variable, the problems
116ab47cfaaSmrg  # vanish in a puff of smoke.
117ab47cfaaSmrg  if test "X${COLLECT_NAMES+set}" != Xset; then
118ab47cfaaSmrg    COLLECT_NAMES=
119ab47cfaaSmrg    export COLLECT_NAMES
120ab47cfaaSmrg  fi
121ab47cfaaSmrg  ;;
122ab47cfaaSmrgesac
123ab47cfaaSmrg
124ab47cfaaSmrg# Sed substitution that helps us do robust quoting.  It backslashifies
125ab47cfaaSmrg# metacharacters that are still active within double-quoted strings.
126ab47cfaaSmrgXsed='sed -e 1s/^X//'
127ab47cfaaSmrg[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128ab47cfaaSmrg
129ab47cfaaSmrg# Same as above, but do not quote variable references.
130ab47cfaaSmrg[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
131ab47cfaaSmrg
132ab47cfaaSmrg# Sed substitution to delay expansion of an escaped shell variable in a
133ab47cfaaSmrg# double_quote_subst'ed string.
134ab47cfaaSmrgdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
135ab47cfaaSmrg
136ab47cfaaSmrg# Sed substitution to avoid accidental globbing in evaled expressions
137ab47cfaaSmrgno_glob_subst='s/\*/\\\*/g'
138ab47cfaaSmrg
139ab47cfaaSmrg# Constants:
140ab47cfaaSmrgrm="rm -f"
141ab47cfaaSmrg
142ab47cfaaSmrg# Global variables:
143ab47cfaaSmrgdefault_ofile=libtool
144ab47cfaaSmrgcan_build_shared=yes
145ab47cfaaSmrg
146ab47cfaaSmrg# All known linkers require a `.a' archive for static linking (except MSVC,
147ab47cfaaSmrg# which needs '.lib').
148ab47cfaaSmrglibext=a
149ab47cfaaSmrgltmain="$ac_aux_dir/ltmain.sh"
150ab47cfaaSmrgofile="$default_ofile"
151ab47cfaaSmrgwith_gnu_ld="$lt_cv_prog_gnu_ld"
152ab47cfaaSmrg
153ab47cfaaSmrgAC_CHECK_TOOL(AR, ar, false)
154ab47cfaaSmrgAC_CHECK_TOOL(RANLIB, ranlib, :)
155ab47cfaaSmrgAC_CHECK_TOOL(STRIP, strip, :)
156ab47cfaaSmrg
157ab47cfaaSmrgold_CC="$CC"
158ab47cfaaSmrgold_CFLAGS="$CFLAGS"
159ab47cfaaSmrg
160ab47cfaaSmrg# Set sane defaults for various variables
161ab47cfaaSmrgtest -z "$AR" && AR=ar
162ab47cfaaSmrgtest -z "$AR_FLAGS" && AR_FLAGS=cru
163ab47cfaaSmrgtest -z "$AS" && AS=as
164ab47cfaaSmrgtest -z "$CC" && CC=cc
165ab47cfaaSmrgtest -z "$LTCC" && LTCC=$CC
166ab47cfaaSmrgtest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
167ab47cfaaSmrgtest -z "$DLLTOOL" && DLLTOOL=dlltool
168ab47cfaaSmrgtest -z "$LD" && LD=ld
169ab47cfaaSmrgtest -z "$LN_S" && LN_S="ln -s"
170ab47cfaaSmrgtest -z "$MAGIC_CMD" && MAGIC_CMD=file
171ab47cfaaSmrgtest -z "$NM" && NM=nm
172ab47cfaaSmrgtest -z "$SED" && SED=sed
173ab47cfaaSmrgtest -z "$OBJDUMP" && OBJDUMP=objdump
174ab47cfaaSmrgtest -z "$RANLIB" && RANLIB=:
175ab47cfaaSmrgtest -z "$STRIP" && STRIP=:
176ab47cfaaSmrgtest -z "$ac_objext" && ac_objext=o
177ab47cfaaSmrg
178ab47cfaaSmrg# Determine commands to create old-style static archives.
179ab47cfaaSmrgold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
180ab47cfaaSmrgold_postinstall_cmds='chmod 644 $oldlib'
181ab47cfaaSmrgold_postuninstall_cmds=
182ab47cfaaSmrg
183ab47cfaaSmrgif test -n "$RANLIB"; then
184ab47cfaaSmrg  case $host_os in
185ab47cfaaSmrg  openbsd*)
186ab47cfaaSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
187ab47cfaaSmrg    ;;
188ab47cfaaSmrg  *)
189ab47cfaaSmrg    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
190ab47cfaaSmrg    ;;
191ab47cfaaSmrg  esac
192ab47cfaaSmrg  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
193ab47cfaaSmrgfi
194ab47cfaaSmrg
195ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
196ab47cfaaSmrg
197ab47cfaaSmrg# Only perform the check for file, if the check method requires it
198ab47cfaaSmrgcase $deplibs_check_method in
199ab47cfaaSmrgfile_magic*)
200ab47cfaaSmrg  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
201ab47cfaaSmrg    AC_PATH_MAGIC
202ab47cfaaSmrg  fi
203ab47cfaaSmrg  ;;
204ab47cfaaSmrgesac
205ab47cfaaSmrg
206ab47cfaaSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
207ab47cfaaSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
208ab47cfaaSmrgenable_win32_dll=yes, enable_win32_dll=no)
209ab47cfaaSmrg
210ab47cfaaSmrgAC_ARG_ENABLE([libtool-lock],
211ab47cfaaSmrg    [AC_HELP_STRING([--disable-libtool-lock],
212ab47cfaaSmrg	[avoid locking (might break parallel builds)])])
213ab47cfaaSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
214ab47cfaaSmrg
215ab47cfaaSmrgAC_ARG_WITH([pic],
216ab47cfaaSmrg    [AC_HELP_STRING([--with-pic],
217ab47cfaaSmrg	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
218ab47cfaaSmrg    [pic_mode="$withval"],
219ab47cfaaSmrg    [pic_mode=default])
220ab47cfaaSmrgtest -z "$pic_mode" && pic_mode=default
221ab47cfaaSmrg
222ab47cfaaSmrg# Use C for the default configuration in the libtool script
223ab47cfaaSmrgtagname=
224ab47cfaaSmrgAC_LIBTOOL_LANG_C_CONFIG
225ab47cfaaSmrg_LT_AC_TAGCONFIG
226ab47cfaaSmrg])# AC_LIBTOOL_SETUP
227ab47cfaaSmrg
228ab47cfaaSmrg
229ab47cfaaSmrg# _LT_AC_SYS_COMPILER
230ab47cfaaSmrg# -------------------
231ab47cfaaSmrgAC_DEFUN([_LT_AC_SYS_COMPILER],
232ab47cfaaSmrg[AC_REQUIRE([AC_PROG_CC])dnl
233ab47cfaaSmrg
234ab47cfaaSmrg# If no C compiler was specified, use CC.
235ab47cfaaSmrgLTCC=${LTCC-"$CC"}
236ab47cfaaSmrg
237ab47cfaaSmrg# If no C compiler flags were specified, use CFLAGS.
238ab47cfaaSmrgLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
239ab47cfaaSmrg
240ab47cfaaSmrg# Allow CC to be a program name with arguments.
241ab47cfaaSmrgcompiler=$CC
242ab47cfaaSmrg])# _LT_AC_SYS_COMPILER
243ab47cfaaSmrg
244ab47cfaaSmrg
245ab47cfaaSmrg# _LT_CC_BASENAME(CC)
246ab47cfaaSmrg# -------------------
247ab47cfaaSmrg# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
248ab47cfaaSmrgAC_DEFUN([_LT_CC_BASENAME],
249ab47cfaaSmrg[for cc_temp in $1""; do
250ab47cfaaSmrg  case $cc_temp in
251ab47cfaaSmrg    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
252ab47cfaaSmrg    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
253ab47cfaaSmrg    \-*) ;;
254ab47cfaaSmrg    *) break;;
255ab47cfaaSmrg  esac
256ab47cfaaSmrgdone
257ab47cfaaSmrgcc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
258ab47cfaaSmrg])
259ab47cfaaSmrg
260ab47cfaaSmrg
261ab47cfaaSmrg# _LT_COMPILER_BOILERPLATE
262ab47cfaaSmrg# ------------------------
263ab47cfaaSmrg# Check for compiler boilerplate output or warnings with
264ab47cfaaSmrg# the simple compiler test code.
265ab47cfaaSmrgAC_DEFUN([_LT_COMPILER_BOILERPLATE],
266ab47cfaaSmrg[ac_outfile=conftest.$ac_objext
267ab47cfaaSmrgprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
268ab47cfaaSmrgeval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
269ab47cfaaSmrg_lt_compiler_boilerplate=`cat conftest.err`
270ab47cfaaSmrg$rm conftest*
271ab47cfaaSmrg])# _LT_COMPILER_BOILERPLATE
272ab47cfaaSmrg
273ab47cfaaSmrg
274ab47cfaaSmrg# _LT_LINKER_BOILERPLATE
275ab47cfaaSmrg# ----------------------
276ab47cfaaSmrg# Check for linker boilerplate output or warnings with
277ab47cfaaSmrg# the simple link test code.
278ab47cfaaSmrgAC_DEFUN([_LT_LINKER_BOILERPLATE],
279ab47cfaaSmrg[ac_outfile=conftest.$ac_objext
280ab47cfaaSmrgprintf "$lt_simple_link_test_code" >conftest.$ac_ext
281ab47cfaaSmrgeval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
282ab47cfaaSmrg_lt_linker_boilerplate=`cat conftest.err`
283ab47cfaaSmrg$rm conftest*
284ab47cfaaSmrg])# _LT_LINKER_BOILERPLATE
285ab47cfaaSmrg
286ab47cfaaSmrg
287ab47cfaaSmrg# _LT_AC_SYS_LIBPATH_AIX
288ab47cfaaSmrg# ----------------------
289ab47cfaaSmrg# Links a minimal program and checks the executable
290ab47cfaaSmrg# for the system default hardcoded library path. In most cases,
291ab47cfaaSmrg# this is /usr/lib:/lib, but when the MPI compilers are used
292ab47cfaaSmrg# the location of the communication and MPI libs are included too.
293ab47cfaaSmrg# If we don't find anything, use the default library path according
294ab47cfaaSmrg# to the aix ld manual.
295ab47cfaaSmrgAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
296ab47cfaaSmrg[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
297ab47cfaaSmrgaix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
298ab47cfaaSmrg}'`
299ab47cfaaSmrg# Check for a 64-bit object if we didn't find anything.
300ab47cfaaSmrgif test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
301ab47cfaaSmrg}'`; fi],[])
302ab47cfaaSmrgif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
303ab47cfaaSmrg])# _LT_AC_SYS_LIBPATH_AIX
304ab47cfaaSmrg
305ab47cfaaSmrg
306ab47cfaaSmrg# _LT_AC_SHELL_INIT(ARG)
307ab47cfaaSmrg# ----------------------
308ab47cfaaSmrgAC_DEFUN([_LT_AC_SHELL_INIT],
309ab47cfaaSmrg[ifdef([AC_DIVERSION_NOTICE],
310ab47cfaaSmrg	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
311ab47cfaaSmrg	 [AC_DIVERT_PUSH(NOTICE)])
312ab47cfaaSmrg$1
313ab47cfaaSmrgAC_DIVERT_POP
314ab47cfaaSmrg])# _LT_AC_SHELL_INIT
315ab47cfaaSmrg
316ab47cfaaSmrg
317ab47cfaaSmrg# _LT_AC_PROG_ECHO_BACKSLASH
318ab47cfaaSmrg# --------------------------
319ab47cfaaSmrg# Add some code to the start of the generated configure script which
320ab47cfaaSmrg# will find an echo command which doesn't interpret backslashes.
321ab47cfaaSmrgAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
322ab47cfaaSmrg[_LT_AC_SHELL_INIT([
323ab47cfaaSmrg# Check that we are running under the correct shell.
324ab47cfaaSmrgSHELL=${CONFIG_SHELL-/bin/sh}
325ab47cfaaSmrg
326ab47cfaaSmrgcase X$ECHO in
327ab47cfaaSmrgX*--fallback-echo)
328ab47cfaaSmrg  # Remove one level of quotation (which was required for Make).
329ab47cfaaSmrg  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
330ab47cfaaSmrg  ;;
331ab47cfaaSmrgesac
332ab47cfaaSmrg
333ab47cfaaSmrgecho=${ECHO-echo}
334ab47cfaaSmrgif test "X[$]1" = X--no-reexec; then
335ab47cfaaSmrg  # Discard the --no-reexec flag, and continue.
336ab47cfaaSmrg  shift
337ab47cfaaSmrgelif test "X[$]1" = X--fallback-echo; then
338ab47cfaaSmrg  # Avoid inline document here, it may be left over
339ab47cfaaSmrg  :
340ab47cfaaSmrgelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
341ab47cfaaSmrg  # Yippee, $echo works!
342ab47cfaaSmrg  :
343ab47cfaaSmrgelse
344ab47cfaaSmrg  # Restart under the correct shell.
345ab47cfaaSmrg  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
346ab47cfaaSmrgfi
347ab47cfaaSmrg
348ab47cfaaSmrgif test "X[$]1" = X--fallback-echo; then
349ab47cfaaSmrg  # used as fallback echo
350ab47cfaaSmrg  shift
351ab47cfaaSmrg  cat <<EOF
352ab47cfaaSmrg[$]*
353ab47cfaaSmrgEOF
354ab47cfaaSmrg  exit 0
355ab47cfaaSmrgfi
356ab47cfaaSmrg
357ab47cfaaSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
358ab47cfaaSmrg# if CDPATH is set.
359ab47cfaaSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
360ab47cfaaSmrg
361ab47cfaaSmrgif test -z "$ECHO"; then
362ab47cfaaSmrgif test "X${echo_test_string+set}" != Xset; then
363ab47cfaaSmrg# find a string as large as possible, as long as the shell can cope with it
364ab47cfaaSmrg  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
365ab47cfaaSmrg    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
366ab47cfaaSmrg    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
367ab47cfaaSmrg       echo_test_string=`eval $cmd` &&
368ab47cfaaSmrg       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
369ab47cfaaSmrg    then
370ab47cfaaSmrg      break
371ab47cfaaSmrg    fi
372ab47cfaaSmrg  done
373ab47cfaaSmrgfi
374ab47cfaaSmrg
375ab47cfaaSmrgif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
376ab47cfaaSmrg   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
377ab47cfaaSmrg   test "X$echo_testing_string" = "X$echo_test_string"; then
378ab47cfaaSmrg  :
379ab47cfaaSmrgelse
380ab47cfaaSmrg  # The Solaris, AIX, and Digital Unix default echo programs unquote
381ab47cfaaSmrg  # backslashes.  This makes it impossible to quote backslashes using
382ab47cfaaSmrg  #   echo "$something" | sed 's/\\/\\\\/g'
383ab47cfaaSmrg  #
384ab47cfaaSmrg  # So, first we look for a working echo in the user's PATH.
385ab47cfaaSmrg
386ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
387ab47cfaaSmrg  for dir in $PATH /usr/ucb; do
388ab47cfaaSmrg    IFS="$lt_save_ifs"
389ab47cfaaSmrg    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
390ab47cfaaSmrg       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
391ab47cfaaSmrg       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
392ab47cfaaSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
393ab47cfaaSmrg      echo="$dir/echo"
394ab47cfaaSmrg      break
395ab47cfaaSmrg    fi
396ab47cfaaSmrg  done
397ab47cfaaSmrg  IFS="$lt_save_ifs"
398ab47cfaaSmrg
399ab47cfaaSmrg  if test "X$echo" = Xecho; then
400ab47cfaaSmrg    # We didn't find a better echo, so look for alternatives.
401ab47cfaaSmrg    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
402ab47cfaaSmrg       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
403ab47cfaaSmrg       test "X$echo_testing_string" = "X$echo_test_string"; then
404ab47cfaaSmrg      # This shell has a builtin print -r that does the trick.
405ab47cfaaSmrg      echo='print -r'
406ab47cfaaSmrg    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
407ab47cfaaSmrg	 test "X$CONFIG_SHELL" != X/bin/ksh; then
408ab47cfaaSmrg      # If we have ksh, try running configure again with it.
409ab47cfaaSmrg      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
410ab47cfaaSmrg      export ORIGINAL_CONFIG_SHELL
411ab47cfaaSmrg      CONFIG_SHELL=/bin/ksh
412ab47cfaaSmrg      export CONFIG_SHELL
413ab47cfaaSmrg      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
414ab47cfaaSmrg    else
415ab47cfaaSmrg      # Try using printf.
416ab47cfaaSmrg      echo='printf %s\n'
417ab47cfaaSmrg      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
418ab47cfaaSmrg	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
419ab47cfaaSmrg	 test "X$echo_testing_string" = "X$echo_test_string"; then
420ab47cfaaSmrg	# Cool, printf works
421ab47cfaaSmrg	:
422ab47cfaaSmrg      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
423ab47cfaaSmrg	   test "X$echo_testing_string" = 'X\t' &&
424ab47cfaaSmrg	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
425ab47cfaaSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
426ab47cfaaSmrg	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
427ab47cfaaSmrg	export CONFIG_SHELL
428ab47cfaaSmrg	SHELL="$CONFIG_SHELL"
429ab47cfaaSmrg	export SHELL
430ab47cfaaSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
431ab47cfaaSmrg      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
432ab47cfaaSmrg	   test "X$echo_testing_string" = 'X\t' &&
433ab47cfaaSmrg	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
434ab47cfaaSmrg	   test "X$echo_testing_string" = "X$echo_test_string"; then
435ab47cfaaSmrg	echo="$CONFIG_SHELL [$]0 --fallback-echo"
436ab47cfaaSmrg      else
437ab47cfaaSmrg	# maybe with a smaller string...
438ab47cfaaSmrg	prev=:
439ab47cfaaSmrg
440ab47cfaaSmrg	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
441ab47cfaaSmrg	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
442ab47cfaaSmrg	  then
443ab47cfaaSmrg	    break
444ab47cfaaSmrg	  fi
445ab47cfaaSmrg	  prev="$cmd"
446ab47cfaaSmrg	done
447ab47cfaaSmrg
448ab47cfaaSmrg	if test "$prev" != 'sed 50q "[$]0"'; then
449ab47cfaaSmrg	  echo_test_string=`eval $prev`
450ab47cfaaSmrg	  export echo_test_string
451ab47cfaaSmrg	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
452ab47cfaaSmrg	else
453ab47cfaaSmrg	  # Oops.  We lost completely, so just stick with echo.
454ab47cfaaSmrg	  echo=echo
455ab47cfaaSmrg	fi
456ab47cfaaSmrg      fi
457ab47cfaaSmrg    fi
458ab47cfaaSmrg  fi
459ab47cfaaSmrgfi
460ab47cfaaSmrgfi
461ab47cfaaSmrg
462ab47cfaaSmrg# Copy echo and quote the copy suitably for passing to libtool from
463ab47cfaaSmrg# the Makefile, instead of quoting the original, which is used later.
464ab47cfaaSmrgECHO=$echo
465ab47cfaaSmrgif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
466ab47cfaaSmrg   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
467ab47cfaaSmrgfi
468ab47cfaaSmrg
469ab47cfaaSmrgAC_SUBST(ECHO)
470ab47cfaaSmrg])])# _LT_AC_PROG_ECHO_BACKSLASH
471ab47cfaaSmrg
472ab47cfaaSmrg
473ab47cfaaSmrg# _LT_AC_LOCK
474ab47cfaaSmrg# -----------
475ab47cfaaSmrgAC_DEFUN([_LT_AC_LOCK],
476ab47cfaaSmrg[AC_ARG_ENABLE([libtool-lock],
477ab47cfaaSmrg    [AC_HELP_STRING([--disable-libtool-lock],
478ab47cfaaSmrg	[avoid locking (might break parallel builds)])])
479ab47cfaaSmrgtest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
480ab47cfaaSmrg
481ab47cfaaSmrg# Some flags need to be propagated to the compiler or linker for good
482ab47cfaaSmrg# libtool support.
483ab47cfaaSmrgcase $host in
484ab47cfaaSmrgia64-*-hpux*)
485ab47cfaaSmrg  # Find out which ABI we are using.
486ab47cfaaSmrg  echo 'int i;' > conftest.$ac_ext
487ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
488ab47cfaaSmrg    case `/usr/bin/file conftest.$ac_objext` in
489ab47cfaaSmrg    *ELF-32*)
490ab47cfaaSmrg      HPUX_IA64_MODE="32"
491ab47cfaaSmrg      ;;
492ab47cfaaSmrg    *ELF-64*)
493ab47cfaaSmrg      HPUX_IA64_MODE="64"
494ab47cfaaSmrg      ;;
495ab47cfaaSmrg    esac
496ab47cfaaSmrg  fi
497ab47cfaaSmrg  rm -rf conftest*
498ab47cfaaSmrg  ;;
499ab47cfaaSmrg*-*-irix6*)
500ab47cfaaSmrg  # Find out which ABI we are using.
501ab47cfaaSmrg  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
502ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
503ab47cfaaSmrg   if test "$lt_cv_prog_gnu_ld" = yes; then
504ab47cfaaSmrg    case `/usr/bin/file conftest.$ac_objext` in
505ab47cfaaSmrg    *32-bit*)
506ab47cfaaSmrg      LD="${LD-ld} -melf32bsmip"
507ab47cfaaSmrg      ;;
508ab47cfaaSmrg    *N32*)
509ab47cfaaSmrg      LD="${LD-ld} -melf32bmipn32"
510ab47cfaaSmrg      ;;
511ab47cfaaSmrg    *64-bit*)
512ab47cfaaSmrg      LD="${LD-ld} -melf64bmip"
513ab47cfaaSmrg      ;;
514ab47cfaaSmrg    esac
515ab47cfaaSmrg   else
516ab47cfaaSmrg    case `/usr/bin/file conftest.$ac_objext` in
517ab47cfaaSmrg    *32-bit*)
518ab47cfaaSmrg      LD="${LD-ld} -32"
519ab47cfaaSmrg      ;;
520ab47cfaaSmrg    *N32*)
521ab47cfaaSmrg      LD="${LD-ld} -n32"
522ab47cfaaSmrg      ;;
523ab47cfaaSmrg    *64-bit*)
524ab47cfaaSmrg      LD="${LD-ld} -64"
525ab47cfaaSmrg      ;;
526ab47cfaaSmrg    esac
527ab47cfaaSmrg   fi
528ab47cfaaSmrg  fi
529ab47cfaaSmrg  rm -rf conftest*
530ab47cfaaSmrg  ;;
531ab47cfaaSmrg
532ab47cfaaSmrgx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
533ab47cfaaSmrg  # Find out which ABI we are using.
534ab47cfaaSmrg  echo 'int i;' > conftest.$ac_ext
535ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
536ab47cfaaSmrg    case `/usr/bin/file conftest.o` in
537ab47cfaaSmrg    *32-bit*)
538ab47cfaaSmrg      case $host in
539ab47cfaaSmrg        x86_64-*linux*)
540ab47cfaaSmrg          LD="${LD-ld} -m elf_i386"
541ab47cfaaSmrg          ;;
542ab47cfaaSmrg        ppc64-*linux*|powerpc64-*linux*)
543ab47cfaaSmrg          LD="${LD-ld} -m elf32ppclinux"
544ab47cfaaSmrg          ;;
545ab47cfaaSmrg        s390x-*linux*)
546ab47cfaaSmrg          LD="${LD-ld} -m elf_s390"
547ab47cfaaSmrg          ;;
548ab47cfaaSmrg        sparc64-*linux*)
549ab47cfaaSmrg          LD="${LD-ld} -m elf32_sparc"
550ab47cfaaSmrg          ;;
551ab47cfaaSmrg      esac
552ab47cfaaSmrg      ;;
553ab47cfaaSmrg    *64-bit*)
554ab47cfaaSmrg      case $host in
555ab47cfaaSmrg        x86_64-*linux*)
556ab47cfaaSmrg          LD="${LD-ld} -m elf_x86_64"
557ab47cfaaSmrg          ;;
558ab47cfaaSmrg        ppc*-*linux*|powerpc*-*linux*)
559ab47cfaaSmrg          LD="${LD-ld} -m elf64ppc"
560ab47cfaaSmrg          ;;
561ab47cfaaSmrg        s390*-*linux*)
562ab47cfaaSmrg          LD="${LD-ld} -m elf64_s390"
563ab47cfaaSmrg          ;;
564ab47cfaaSmrg        sparc*-*linux*)
565ab47cfaaSmrg          LD="${LD-ld} -m elf64_sparc"
566ab47cfaaSmrg          ;;
567ab47cfaaSmrg      esac
568ab47cfaaSmrg      ;;
569ab47cfaaSmrg    esac
570ab47cfaaSmrg  fi
571ab47cfaaSmrg  rm -rf conftest*
572ab47cfaaSmrg  ;;
573ab47cfaaSmrg
574ab47cfaaSmrg*-*-sco3.2v5*)
575ab47cfaaSmrg  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
576ab47cfaaSmrg  SAVE_CFLAGS="$CFLAGS"
577ab47cfaaSmrg  CFLAGS="$CFLAGS -belf"
578ab47cfaaSmrg  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
579ab47cfaaSmrg    [AC_LANG_PUSH(C)
580ab47cfaaSmrg     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
581ab47cfaaSmrg     AC_LANG_POP])
582ab47cfaaSmrg  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
583ab47cfaaSmrg    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
584ab47cfaaSmrg    CFLAGS="$SAVE_CFLAGS"
585ab47cfaaSmrg  fi
586ab47cfaaSmrg  ;;
587ab47cfaaSmrgsparc*-*solaris*)
588ab47cfaaSmrg  # Find out which ABI we are using.
589ab47cfaaSmrg  echo 'int i;' > conftest.$ac_ext
590ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
591ab47cfaaSmrg    case `/usr/bin/file conftest.o` in
592ab47cfaaSmrg    *64-bit*)
593ab47cfaaSmrg      case $lt_cv_prog_gnu_ld in
594ab47cfaaSmrg      yes*) LD="${LD-ld} -m elf64_sparc" ;;
595ab47cfaaSmrg      *)    LD="${LD-ld} -64" ;;
596ab47cfaaSmrg      esac
597ab47cfaaSmrg      ;;
598ab47cfaaSmrg    esac
599ab47cfaaSmrg  fi
600ab47cfaaSmrg  rm -rf conftest*
601ab47cfaaSmrg  ;;
602ab47cfaaSmrg
603ab47cfaaSmrgAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
604ab47cfaaSmrg[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
605ab47cfaaSmrg  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
606ab47cfaaSmrg  AC_CHECK_TOOL(AS, as, false)
607ab47cfaaSmrg  AC_CHECK_TOOL(OBJDUMP, objdump, false)
608ab47cfaaSmrg  ;;
609ab47cfaaSmrg  ])
610ab47cfaaSmrgesac
611ab47cfaaSmrg
612ab47cfaaSmrgneed_locks="$enable_libtool_lock"
613ab47cfaaSmrg
614ab47cfaaSmrg])# _LT_AC_LOCK
615ab47cfaaSmrg
616ab47cfaaSmrg
617ab47cfaaSmrg# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
618ab47cfaaSmrg#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
619ab47cfaaSmrg# ----------------------------------------------------------------
620ab47cfaaSmrg# Check whether the given compiler option works
621ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
622ab47cfaaSmrg[AC_REQUIRE([LT_AC_PROG_SED])
623ab47cfaaSmrgAC_CACHE_CHECK([$1], [$2],
624ab47cfaaSmrg  [$2=no
625ab47cfaaSmrg  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
626ab47cfaaSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
627ab47cfaaSmrg   lt_compiler_flag="$3"
628ab47cfaaSmrg   # Insert the option either (1) after the last *FLAGS variable, or
629ab47cfaaSmrg   # (2) before a word containing "conftest.", or (3) at the end.
630ab47cfaaSmrg   # Note that $ac_compile itself does not contain backslashes and begins
631ab47cfaaSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
632ab47cfaaSmrg   # The option is referenced via a variable to avoid confusing sed.
633ab47cfaaSmrg   lt_compile=`echo "$ac_compile" | $SED \
634ab47cfaaSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
635ab47cfaaSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
636ab47cfaaSmrg   -e 's:$: $lt_compiler_flag:'`
637ab47cfaaSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
638ab47cfaaSmrg   (eval "$lt_compile" 2>conftest.err)
639ab47cfaaSmrg   ac_status=$?
640ab47cfaaSmrg   cat conftest.err >&AS_MESSAGE_LOG_FD
641ab47cfaaSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
642ab47cfaaSmrg   if (exit $ac_status) && test -s "$ac_outfile"; then
643ab47cfaaSmrg     # The compiler can only warn and ignore the option if not recognized
644ab47cfaaSmrg     # So say no if there are warnings other than the usual output.
645ab47cfaaSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
646ab47cfaaSmrg     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
647ab47cfaaSmrg     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
648ab47cfaaSmrg       $2=yes
649ab47cfaaSmrg     fi
650ab47cfaaSmrg   fi
651ab47cfaaSmrg   $rm conftest*
652ab47cfaaSmrg])
653ab47cfaaSmrg
654ab47cfaaSmrgif test x"[$]$2" = xyes; then
655ab47cfaaSmrg    ifelse([$5], , :, [$5])
656ab47cfaaSmrgelse
657ab47cfaaSmrg    ifelse([$6], , :, [$6])
658ab47cfaaSmrgfi
659ab47cfaaSmrg])# AC_LIBTOOL_COMPILER_OPTION
660ab47cfaaSmrg
661ab47cfaaSmrg
662ab47cfaaSmrg# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
663ab47cfaaSmrg#                          [ACTION-SUCCESS], [ACTION-FAILURE])
664ab47cfaaSmrg# ------------------------------------------------------------
665ab47cfaaSmrg# Check whether the given compiler option works
666ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
667ab47cfaaSmrg[AC_CACHE_CHECK([$1], [$2],
668ab47cfaaSmrg  [$2=no
669ab47cfaaSmrg   save_LDFLAGS="$LDFLAGS"
670ab47cfaaSmrg   LDFLAGS="$LDFLAGS $3"
671ab47cfaaSmrg   printf "$lt_simple_link_test_code" > conftest.$ac_ext
672ab47cfaaSmrg   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
673ab47cfaaSmrg     # The linker can only warn and ignore the option if not recognized
674ab47cfaaSmrg     # So say no if there are warnings
675ab47cfaaSmrg     if test -s conftest.err; then
676ab47cfaaSmrg       # Append any errors to the config.log.
677ab47cfaaSmrg       cat conftest.err 1>&AS_MESSAGE_LOG_FD
678ab47cfaaSmrg       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
679ab47cfaaSmrg       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
680ab47cfaaSmrg       if diff conftest.exp conftest.er2 >/dev/null; then
681ab47cfaaSmrg         $2=yes
682ab47cfaaSmrg       fi
683ab47cfaaSmrg     else
684ab47cfaaSmrg       $2=yes
685ab47cfaaSmrg     fi
686ab47cfaaSmrg   fi
687ab47cfaaSmrg   $rm conftest*
688ab47cfaaSmrg   LDFLAGS="$save_LDFLAGS"
689ab47cfaaSmrg])
690ab47cfaaSmrg
691ab47cfaaSmrgif test x"[$]$2" = xyes; then
692ab47cfaaSmrg    ifelse([$4], , :, [$4])
693ab47cfaaSmrgelse
694ab47cfaaSmrg    ifelse([$5], , :, [$5])
695ab47cfaaSmrgfi
696ab47cfaaSmrg])# AC_LIBTOOL_LINKER_OPTION
697ab47cfaaSmrg
698ab47cfaaSmrg
699ab47cfaaSmrg# AC_LIBTOOL_SYS_MAX_CMD_LEN
700ab47cfaaSmrg# --------------------------
701ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
702ab47cfaaSmrg[# find the maximum length of command line arguments
703ab47cfaaSmrgAC_MSG_CHECKING([the maximum length of command line arguments])
704ab47cfaaSmrgAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
705ab47cfaaSmrg  i=0
706ab47cfaaSmrg  teststring="ABCD"
707ab47cfaaSmrg
708ab47cfaaSmrg  case $build_os in
709ab47cfaaSmrg  msdosdjgpp*)
710ab47cfaaSmrg    # On DJGPP, this test can blow up pretty badly due to problems in libc
711ab47cfaaSmrg    # (any single argument exceeding 2000 bytes causes a buffer overrun
712ab47cfaaSmrg    # during glob expansion).  Even if it were fixed, the result of this
713ab47cfaaSmrg    # check would be larger than it should be.
714ab47cfaaSmrg    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
715ab47cfaaSmrg    ;;
716ab47cfaaSmrg
717ab47cfaaSmrg  gnu*)
718ab47cfaaSmrg    # Under GNU Hurd, this test is not required because there is
719ab47cfaaSmrg    # no limit to the length of command line arguments.
720ab47cfaaSmrg    # Libtool will interpret -1 as no limit whatsoever
721ab47cfaaSmrg    lt_cv_sys_max_cmd_len=-1;
722ab47cfaaSmrg    ;;
723ab47cfaaSmrg
724ab47cfaaSmrg  cygwin* | mingw*)
725ab47cfaaSmrg    # On Win9x/ME, this test blows up -- it succeeds, but takes
726ab47cfaaSmrg    # about 5 minutes as the teststring grows exponentially.
727ab47cfaaSmrg    # Worse, since 9x/ME are not pre-emptively multitasking,
728ab47cfaaSmrg    # you end up with a "frozen" computer, even though with patience
729ab47cfaaSmrg    # the test eventually succeeds (with a max line length of 256k).
730ab47cfaaSmrg    # Instead, let's just punt: use the minimum linelength reported by
731ab47cfaaSmrg    # all of the supported platforms: 8192 (on NT/2K/XP).
732ab47cfaaSmrg    lt_cv_sys_max_cmd_len=8192;
733ab47cfaaSmrg    ;;
734ab47cfaaSmrg
735ab47cfaaSmrg  amigaos*)
736ab47cfaaSmrg    # On AmigaOS with pdksh, this test takes hours, literally.
737ab47cfaaSmrg    # So we just punt and use a minimum line length of 8192.
738ab47cfaaSmrg    lt_cv_sys_max_cmd_len=8192;
739ab47cfaaSmrg    ;;
740ab47cfaaSmrg
741ab47cfaaSmrg  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
742ab47cfaaSmrg    # This has been around since 386BSD, at least.  Likely further.
743ab47cfaaSmrg    if test -x /sbin/sysctl; then
744ab47cfaaSmrg      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
745ab47cfaaSmrg    elif test -x /usr/sbin/sysctl; then
746ab47cfaaSmrg      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
747ab47cfaaSmrg    else
748ab47cfaaSmrg      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
749ab47cfaaSmrg    fi
750ab47cfaaSmrg    # And add a safety zone
751ab47cfaaSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
752ab47cfaaSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
753ab47cfaaSmrg    ;;
754ab47cfaaSmrg
755ab47cfaaSmrg  interix*)
756ab47cfaaSmrg    # We know the value 262144 and hardcode it with a safety zone (like BSD)
757ab47cfaaSmrg    lt_cv_sys_max_cmd_len=196608
758ab47cfaaSmrg    ;;
759ab47cfaaSmrg
760ab47cfaaSmrg  osf*)
761ab47cfaaSmrg    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
762ab47cfaaSmrg    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
763ab47cfaaSmrg    # nice to cause kernel panics so lets avoid the loop below.
764ab47cfaaSmrg    # First set a reasonable default.
765ab47cfaaSmrg    lt_cv_sys_max_cmd_len=16384
766ab47cfaaSmrg    #
767ab47cfaaSmrg    if test -x /sbin/sysconfig; then
768ab47cfaaSmrg      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
769ab47cfaaSmrg        *1*) lt_cv_sys_max_cmd_len=-1 ;;
770ab47cfaaSmrg      esac
771ab47cfaaSmrg    fi
772ab47cfaaSmrg    ;;
773ab47cfaaSmrg  sco3.2v5*)
774ab47cfaaSmrg    lt_cv_sys_max_cmd_len=102400
775ab47cfaaSmrg    ;;
776ab47cfaaSmrg  sysv5* | sco5v6* | sysv4.2uw2*)
777ab47cfaaSmrg    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
778ab47cfaaSmrg    if test -n "$kargmax"; then
779ab47cfaaSmrg      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
780ab47cfaaSmrg    else
781ab47cfaaSmrg      lt_cv_sys_max_cmd_len=32768
782ab47cfaaSmrg    fi
783ab47cfaaSmrg    ;;
784ab47cfaaSmrg  *)
785ab47cfaaSmrg    # If test is not a shell built-in, we'll probably end up computing a
786ab47cfaaSmrg    # maximum length that is only half of the actual maximum length, but
787ab47cfaaSmrg    # we can't tell.
788ab47cfaaSmrg    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
789ab47cfaaSmrg    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
790ab47cfaaSmrg	       = "XX$teststring") >/dev/null 2>&1 &&
791ab47cfaaSmrg	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
792ab47cfaaSmrg	    lt_cv_sys_max_cmd_len=$new_result &&
793ab47cfaaSmrg	    test $i != 17 # 1/2 MB should be enough
794ab47cfaaSmrg    do
795ab47cfaaSmrg      i=`expr $i + 1`
796ab47cfaaSmrg      teststring=$teststring$teststring
797ab47cfaaSmrg    done
798ab47cfaaSmrg    teststring=
799ab47cfaaSmrg    # Add a significant safety factor because C++ compilers can tack on massive
800ab47cfaaSmrg    # amounts of additional arguments before passing them to the linker.
801ab47cfaaSmrg    # It appears as though 1/2 is a usable value.
802ab47cfaaSmrg    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
803ab47cfaaSmrg    ;;
804ab47cfaaSmrg  esac
805ab47cfaaSmrg])
806ab47cfaaSmrgif test -n $lt_cv_sys_max_cmd_len ; then
807ab47cfaaSmrg  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
808ab47cfaaSmrgelse
809ab47cfaaSmrg  AC_MSG_RESULT(none)
810ab47cfaaSmrgfi
811ab47cfaaSmrg])# AC_LIBTOOL_SYS_MAX_CMD_LEN
812ab47cfaaSmrg
813ab47cfaaSmrg
814ab47cfaaSmrg# _LT_AC_CHECK_DLFCN
815ab47cfaaSmrg# ------------------
816ab47cfaaSmrgAC_DEFUN([_LT_AC_CHECK_DLFCN],
817ab47cfaaSmrg[AC_CHECK_HEADERS(dlfcn.h)dnl
818ab47cfaaSmrg])# _LT_AC_CHECK_DLFCN
819ab47cfaaSmrg
820ab47cfaaSmrg
821ab47cfaaSmrg# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
822ab47cfaaSmrg#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
823ab47cfaaSmrg# ---------------------------------------------------------------------
824ab47cfaaSmrgAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
825ab47cfaaSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
826ab47cfaaSmrgif test "$cross_compiling" = yes; then :
827ab47cfaaSmrg  [$4]
828ab47cfaaSmrgelse
829ab47cfaaSmrg  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
830ab47cfaaSmrg  lt_status=$lt_dlunknown
831ab47cfaaSmrg  cat > conftest.$ac_ext <<EOF
832ab47cfaaSmrg[#line __oline__ "configure"
833ab47cfaaSmrg#include "confdefs.h"
834ab47cfaaSmrg
835ab47cfaaSmrg#if HAVE_DLFCN_H
836ab47cfaaSmrg#include <dlfcn.h>
837ab47cfaaSmrg#endif
838ab47cfaaSmrg
839ab47cfaaSmrg#include <stdio.h>
840ab47cfaaSmrg
841ab47cfaaSmrg#ifdef RTLD_GLOBAL
842ab47cfaaSmrg#  define LT_DLGLOBAL		RTLD_GLOBAL
843ab47cfaaSmrg#else
844ab47cfaaSmrg#  ifdef DL_GLOBAL
845ab47cfaaSmrg#    define LT_DLGLOBAL		DL_GLOBAL
846ab47cfaaSmrg#  else
847ab47cfaaSmrg#    define LT_DLGLOBAL		0
848ab47cfaaSmrg#  endif
849ab47cfaaSmrg#endif
850ab47cfaaSmrg
851ab47cfaaSmrg/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
852ab47cfaaSmrg   find out it does not work in some platform. */
853ab47cfaaSmrg#ifndef LT_DLLAZY_OR_NOW
854ab47cfaaSmrg#  ifdef RTLD_LAZY
855ab47cfaaSmrg#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
856ab47cfaaSmrg#  else
857ab47cfaaSmrg#    ifdef DL_LAZY
858ab47cfaaSmrg#      define LT_DLLAZY_OR_NOW		DL_LAZY
859ab47cfaaSmrg#    else
860ab47cfaaSmrg#      ifdef RTLD_NOW
861ab47cfaaSmrg#        define LT_DLLAZY_OR_NOW	RTLD_NOW
862ab47cfaaSmrg#      else
863ab47cfaaSmrg#        ifdef DL_NOW
864ab47cfaaSmrg#          define LT_DLLAZY_OR_NOW	DL_NOW
865ab47cfaaSmrg#        else
866ab47cfaaSmrg#          define LT_DLLAZY_OR_NOW	0
867ab47cfaaSmrg#        endif
868ab47cfaaSmrg#      endif
869ab47cfaaSmrg#    endif
870ab47cfaaSmrg#  endif
871ab47cfaaSmrg#endif
872ab47cfaaSmrg
873ab47cfaaSmrg#ifdef __cplusplus
874ab47cfaaSmrgextern "C" void exit (int);
875ab47cfaaSmrg#endif
876ab47cfaaSmrg
877ab47cfaaSmrgvoid fnord() { int i=42;}
878ab47cfaaSmrgint main ()
879ab47cfaaSmrg{
880ab47cfaaSmrg  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
881ab47cfaaSmrg  int status = $lt_dlunknown;
882ab47cfaaSmrg
883ab47cfaaSmrg  if (self)
884ab47cfaaSmrg    {
885ab47cfaaSmrg      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
886ab47cfaaSmrg      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
887ab47cfaaSmrg      /* dlclose (self); */
888ab47cfaaSmrg    }
889ab47cfaaSmrg  else
890ab47cfaaSmrg    puts (dlerror ());
891ab47cfaaSmrg
892ab47cfaaSmrg    exit (status);
893ab47cfaaSmrg}]
894ab47cfaaSmrgEOF
895ab47cfaaSmrg  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
896ab47cfaaSmrg    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
897ab47cfaaSmrg    lt_status=$?
898ab47cfaaSmrg    case x$lt_status in
899ab47cfaaSmrg      x$lt_dlno_uscore) $1 ;;
900ab47cfaaSmrg      x$lt_dlneed_uscore) $2 ;;
901ab47cfaaSmrg      x$lt_dlunknown|x*) $3 ;;
902ab47cfaaSmrg    esac
903ab47cfaaSmrg  else :
904ab47cfaaSmrg    # compilation failed
905ab47cfaaSmrg    $3
906ab47cfaaSmrg  fi
907ab47cfaaSmrgfi
908ab47cfaaSmrgrm -fr conftest*
909ab47cfaaSmrg])# _LT_AC_TRY_DLOPEN_SELF
910ab47cfaaSmrg
911ab47cfaaSmrg
912ab47cfaaSmrg# AC_LIBTOOL_DLOPEN_SELF
913ab47cfaaSmrg# ----------------------
914ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
915ab47cfaaSmrg[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
916ab47cfaaSmrgif test "x$enable_dlopen" != xyes; then
917ab47cfaaSmrg  enable_dlopen=unknown
918ab47cfaaSmrg  enable_dlopen_self=unknown
919ab47cfaaSmrg  enable_dlopen_self_static=unknown
920ab47cfaaSmrgelse
921ab47cfaaSmrg  lt_cv_dlopen=no
922ab47cfaaSmrg  lt_cv_dlopen_libs=
923ab47cfaaSmrg
924ab47cfaaSmrg  case $host_os in
925ab47cfaaSmrg  beos*)
926ab47cfaaSmrg    lt_cv_dlopen="load_add_on"
927ab47cfaaSmrg    lt_cv_dlopen_libs=
928ab47cfaaSmrg    lt_cv_dlopen_self=yes
929ab47cfaaSmrg    ;;
930ab47cfaaSmrg
931ab47cfaaSmrg  mingw* | pw32*)
932ab47cfaaSmrg    lt_cv_dlopen="LoadLibrary"
933ab47cfaaSmrg    lt_cv_dlopen_libs=
934ab47cfaaSmrg   ;;
935ab47cfaaSmrg
936ab47cfaaSmrg  cygwin*)
937ab47cfaaSmrg    lt_cv_dlopen="dlopen"
938ab47cfaaSmrg    lt_cv_dlopen_libs=
939ab47cfaaSmrg   ;;
940ab47cfaaSmrg
941ab47cfaaSmrg  darwin*)
942ab47cfaaSmrg  # if libdl is installed we need to link against it
943ab47cfaaSmrg    AC_CHECK_LIB([dl], [dlopen],
944ab47cfaaSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
945ab47cfaaSmrg    lt_cv_dlopen="dyld"
946ab47cfaaSmrg    lt_cv_dlopen_libs=
947ab47cfaaSmrg    lt_cv_dlopen_self=yes
948ab47cfaaSmrg    ])
949ab47cfaaSmrg   ;;
950ab47cfaaSmrg
951ab47cfaaSmrg  *)
952ab47cfaaSmrg    AC_CHECK_FUNC([shl_load],
953ab47cfaaSmrg	  [lt_cv_dlopen="shl_load"],
954ab47cfaaSmrg      [AC_CHECK_LIB([dld], [shl_load],
955ab47cfaaSmrg	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
956ab47cfaaSmrg	[AC_CHECK_FUNC([dlopen],
957ab47cfaaSmrg	      [lt_cv_dlopen="dlopen"],
958ab47cfaaSmrg	  [AC_CHECK_LIB([dl], [dlopen],
959ab47cfaaSmrg		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
960ab47cfaaSmrg	    [AC_CHECK_LIB([svld], [dlopen],
961ab47cfaaSmrg		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
962ab47cfaaSmrg	      [AC_CHECK_LIB([dld], [dld_link],
963ab47cfaaSmrg		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
964ab47cfaaSmrg	      ])
965ab47cfaaSmrg	    ])
966ab47cfaaSmrg	  ])
967ab47cfaaSmrg	])
968ab47cfaaSmrg      ])
969ab47cfaaSmrg    ;;
970ab47cfaaSmrg  esac
971ab47cfaaSmrg
972ab47cfaaSmrg  if test "x$lt_cv_dlopen" != xno; then
973ab47cfaaSmrg    enable_dlopen=yes
974ab47cfaaSmrg  else
975ab47cfaaSmrg    enable_dlopen=no
976ab47cfaaSmrg  fi
977ab47cfaaSmrg
978ab47cfaaSmrg  case $lt_cv_dlopen in
979ab47cfaaSmrg  dlopen)
980ab47cfaaSmrg    save_CPPFLAGS="$CPPFLAGS"
981ab47cfaaSmrg    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
982ab47cfaaSmrg
983ab47cfaaSmrg    save_LDFLAGS="$LDFLAGS"
984ab47cfaaSmrg    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
985ab47cfaaSmrg
986ab47cfaaSmrg    save_LIBS="$LIBS"
987ab47cfaaSmrg    LIBS="$lt_cv_dlopen_libs $LIBS"
988ab47cfaaSmrg
989ab47cfaaSmrg    AC_CACHE_CHECK([whether a program can dlopen itself],
990ab47cfaaSmrg	  lt_cv_dlopen_self, [dnl
991ab47cfaaSmrg	  _LT_AC_TRY_DLOPEN_SELF(
992ab47cfaaSmrg	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
993ab47cfaaSmrg	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
994ab47cfaaSmrg    ])
995ab47cfaaSmrg
996ab47cfaaSmrg    if test "x$lt_cv_dlopen_self" = xyes; then
997ab47cfaaSmrg      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
998ab47cfaaSmrg      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
999ab47cfaaSmrg    	  lt_cv_dlopen_self_static, [dnl
1000ab47cfaaSmrg	  _LT_AC_TRY_DLOPEN_SELF(
1001ab47cfaaSmrg	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1002ab47cfaaSmrg	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1003ab47cfaaSmrg      ])
1004ab47cfaaSmrg    fi
1005ab47cfaaSmrg
1006ab47cfaaSmrg    CPPFLAGS="$save_CPPFLAGS"
1007ab47cfaaSmrg    LDFLAGS="$save_LDFLAGS"
1008ab47cfaaSmrg    LIBS="$save_LIBS"
1009ab47cfaaSmrg    ;;
1010ab47cfaaSmrg  esac
1011ab47cfaaSmrg
1012ab47cfaaSmrg  case $lt_cv_dlopen_self in
1013ab47cfaaSmrg  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1014ab47cfaaSmrg  *) enable_dlopen_self=unknown ;;
1015ab47cfaaSmrg  esac
1016ab47cfaaSmrg
1017ab47cfaaSmrg  case $lt_cv_dlopen_self_static in
1018ab47cfaaSmrg  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1019ab47cfaaSmrg  *) enable_dlopen_self_static=unknown ;;
1020ab47cfaaSmrg  esac
1021ab47cfaaSmrgfi
1022ab47cfaaSmrg])# AC_LIBTOOL_DLOPEN_SELF
1023ab47cfaaSmrg
1024ab47cfaaSmrg
1025ab47cfaaSmrg# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1026ab47cfaaSmrg# ---------------------------------
1027ab47cfaaSmrg# Check to see if options -c and -o are simultaneously supported by compiler
1028ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1029ab47cfaaSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1030ab47cfaaSmrgAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1031ab47cfaaSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1032ab47cfaaSmrg  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1033ab47cfaaSmrg   $rm -r conftest 2>/dev/null
1034ab47cfaaSmrg   mkdir conftest
1035ab47cfaaSmrg   cd conftest
1036ab47cfaaSmrg   mkdir out
1037ab47cfaaSmrg   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1038ab47cfaaSmrg
1039ab47cfaaSmrg   lt_compiler_flag="-o out/conftest2.$ac_objext"
1040ab47cfaaSmrg   # Insert the option either (1) after the last *FLAGS variable, or
1041ab47cfaaSmrg   # (2) before a word containing "conftest.", or (3) at the end.
1042ab47cfaaSmrg   # Note that $ac_compile itself does not contain backslashes and begins
1043ab47cfaaSmrg   # with a dollar sign (not a hyphen), so the echo should work correctly.
1044ab47cfaaSmrg   lt_compile=`echo "$ac_compile" | $SED \
1045ab47cfaaSmrg   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1046ab47cfaaSmrg   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1047ab47cfaaSmrg   -e 's:$: $lt_compiler_flag:'`
1048ab47cfaaSmrg   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1049ab47cfaaSmrg   (eval "$lt_compile" 2>out/conftest.err)
1050ab47cfaaSmrg   ac_status=$?
1051ab47cfaaSmrg   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1052ab47cfaaSmrg   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1053ab47cfaaSmrg   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1054ab47cfaaSmrg   then
1055ab47cfaaSmrg     # The compiler can only warn and ignore the option if not recognized
1056ab47cfaaSmrg     # So say no if there are warnings
1057ab47cfaaSmrg     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1058ab47cfaaSmrg     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1059ab47cfaaSmrg     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1060ab47cfaaSmrg       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1061ab47cfaaSmrg     fi
1062ab47cfaaSmrg   fi
1063ab47cfaaSmrg   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1064ab47cfaaSmrg   $rm conftest*
1065ab47cfaaSmrg   # SGI C++ compiler will create directory out/ii_files/ for
1066ab47cfaaSmrg   # template instantiation
1067ab47cfaaSmrg   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1068ab47cfaaSmrg   $rm out/* && rmdir out
1069ab47cfaaSmrg   cd ..
1070ab47cfaaSmrg   rmdir conftest
1071ab47cfaaSmrg   $rm conftest*
1072ab47cfaaSmrg])
1073ab47cfaaSmrg])# AC_LIBTOOL_PROG_CC_C_O
1074ab47cfaaSmrg
1075ab47cfaaSmrg
1076ab47cfaaSmrg# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1077ab47cfaaSmrg# -----------------------------------------
1078ab47cfaaSmrg# Check to see if we can do hard links to lock some files if needed
1079ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1080ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LOCK])dnl
1081ab47cfaaSmrg
1082ab47cfaaSmrghard_links="nottested"
1083ab47cfaaSmrgif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1084ab47cfaaSmrg  # do not overwrite the value of need_locks provided by the user
1085ab47cfaaSmrg  AC_MSG_CHECKING([if we can lock with hard links])
1086ab47cfaaSmrg  hard_links=yes
1087ab47cfaaSmrg  $rm conftest*
1088ab47cfaaSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1089ab47cfaaSmrg  touch conftest.a
1090ab47cfaaSmrg  ln conftest.a conftest.b 2>&5 || hard_links=no
1091ab47cfaaSmrg  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1092ab47cfaaSmrg  AC_MSG_RESULT([$hard_links])
1093ab47cfaaSmrg  if test "$hard_links" = no; then
1094ab47cfaaSmrg    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1095ab47cfaaSmrg    need_locks=warn
1096ab47cfaaSmrg  fi
1097ab47cfaaSmrgelse
1098ab47cfaaSmrg  need_locks=no
1099ab47cfaaSmrgfi
1100ab47cfaaSmrg])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1101ab47cfaaSmrg
1102ab47cfaaSmrg
1103ab47cfaaSmrg# AC_LIBTOOL_OBJDIR
1104ab47cfaaSmrg# -----------------
1105ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_OBJDIR],
1106ab47cfaaSmrg[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1107ab47cfaaSmrg[rm -f .libs 2>/dev/null
1108ab47cfaaSmrgmkdir .libs 2>/dev/null
1109ab47cfaaSmrgif test -d .libs; then
1110ab47cfaaSmrg  lt_cv_objdir=.libs
1111ab47cfaaSmrgelse
1112ab47cfaaSmrg  # MS-DOS does not allow filenames that begin with a dot.
1113ab47cfaaSmrg  lt_cv_objdir=_libs
1114ab47cfaaSmrgfi
1115ab47cfaaSmrgrmdir .libs 2>/dev/null])
1116ab47cfaaSmrgobjdir=$lt_cv_objdir
1117ab47cfaaSmrg])# AC_LIBTOOL_OBJDIR
1118ab47cfaaSmrg
1119ab47cfaaSmrg
1120ab47cfaaSmrg# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1121ab47cfaaSmrg# ----------------------------------------------
1122ab47cfaaSmrg# Check hardcoding attributes.
1123ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1124ab47cfaaSmrg[AC_MSG_CHECKING([how to hardcode library paths into programs])
1125ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_action, $1)=
1126ab47cfaaSmrgif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1127ab47cfaaSmrg   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1128ab47cfaaSmrg   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1129ab47cfaaSmrg
1130ab47cfaaSmrg  # We can hardcode non-existant directories.
1131ab47cfaaSmrg  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1132ab47cfaaSmrg     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1133ab47cfaaSmrg     # have to relink, otherwise we might link with an installed library
1134ab47cfaaSmrg     # when we should be linking with a yet-to-be-installed one
1135ab47cfaaSmrg     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1136ab47cfaaSmrg     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1137ab47cfaaSmrg    # Linking always hardcodes the temporary library directory.
1138ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1139ab47cfaaSmrg  else
1140ab47cfaaSmrg    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1141ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1142ab47cfaaSmrg  fi
1143ab47cfaaSmrgelse
1144ab47cfaaSmrg  # We cannot hardcode anything, or else we can only hardcode existing
1145ab47cfaaSmrg  # directories.
1146ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1147ab47cfaaSmrgfi
1148ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1149ab47cfaaSmrg
1150ab47cfaaSmrgif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1151ab47cfaaSmrg  # Fast installation is not supported
1152ab47cfaaSmrg  enable_fast_install=no
1153ab47cfaaSmrgelif test "$shlibpath_overrides_runpath" = yes ||
1154ab47cfaaSmrg     test "$enable_shared" = no; then
1155ab47cfaaSmrg  # Fast installation is not necessary
1156ab47cfaaSmrg  enable_fast_install=needless
1157ab47cfaaSmrgfi
1158ab47cfaaSmrg])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1159ab47cfaaSmrg
1160ab47cfaaSmrg
1161ab47cfaaSmrg# AC_LIBTOOL_SYS_LIB_STRIP
1162ab47cfaaSmrg# ------------------------
1163ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1164ab47cfaaSmrg[striplib=
1165ab47cfaaSmrgold_striplib=
1166ab47cfaaSmrgAC_MSG_CHECKING([whether stripping libraries is possible])
1167ab47cfaaSmrgif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1168ab47cfaaSmrg  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1169ab47cfaaSmrg  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1170ab47cfaaSmrg  AC_MSG_RESULT([yes])
1171ab47cfaaSmrgelse
1172ab47cfaaSmrg# FIXME - insert some real tests, host_os isn't really good enough
1173ab47cfaaSmrg  case $host_os in
1174ab47cfaaSmrg   darwin*)
1175ab47cfaaSmrg       if test -n "$STRIP" ; then
1176ab47cfaaSmrg         striplib="$STRIP -x"
1177ab47cfaaSmrg         AC_MSG_RESULT([yes])
1178ab47cfaaSmrg       else
1179ab47cfaaSmrg  AC_MSG_RESULT([no])
1180ab47cfaaSmrgfi
1181ab47cfaaSmrg       ;;
1182ab47cfaaSmrg   *)
1183ab47cfaaSmrg  AC_MSG_RESULT([no])
1184ab47cfaaSmrg    ;;
1185ab47cfaaSmrg  esac
1186ab47cfaaSmrgfi
1187ab47cfaaSmrg])# AC_LIBTOOL_SYS_LIB_STRIP
1188ab47cfaaSmrg
1189ab47cfaaSmrg
1190ab47cfaaSmrg# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1191ab47cfaaSmrg# -----------------------------
1192ab47cfaaSmrg# PORTME Fill in your ld.so characteristics
1193ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1194ab47cfaaSmrg[AC_MSG_CHECKING([dynamic linker characteristics])
1195ab47cfaaSmrglibrary_names_spec=
1196ab47cfaaSmrglibname_spec='lib$name'
1197ab47cfaaSmrgsoname_spec=
1198ab47cfaaSmrgshrext_cmds=".so"
1199ab47cfaaSmrgpostinstall_cmds=
1200ab47cfaaSmrgpostuninstall_cmds=
1201ab47cfaaSmrgfinish_cmds=
1202ab47cfaaSmrgfinish_eval=
1203ab47cfaaSmrgshlibpath_var=
1204ab47cfaaSmrgshlibpath_overrides_runpath=unknown
1205ab47cfaaSmrgversion_type=none
1206ab47cfaaSmrgdynamic_linker="$host_os ld.so"
1207ab47cfaaSmrgsys_lib_dlsearch_path_spec="/lib /usr/lib"
1208ab47cfaaSmrgif test "$GCC" = yes; then
1209ab47cfaaSmrg  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1210ab47cfaaSmrg  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1211ab47cfaaSmrg    # if the path contains ";" then we assume it to be the separator
1212ab47cfaaSmrg    # otherwise default to the standard path separator (i.e. ":") - it is
1213ab47cfaaSmrg    # assumed that no part of a normal pathname contains ";" but that should
1214ab47cfaaSmrg    # okay in the real world where ";" in dirpaths is itself problematic.
1215ab47cfaaSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1216ab47cfaaSmrg  else
1217ab47cfaaSmrg    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1218ab47cfaaSmrg  fi
1219ab47cfaaSmrgelse
1220ab47cfaaSmrg  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1221ab47cfaaSmrgfi
1222ab47cfaaSmrgneed_lib_prefix=unknown
1223ab47cfaaSmrghardcode_into_libs=no
1224ab47cfaaSmrg
1225ab47cfaaSmrg# when you set need_version to no, make sure it does not cause -set_version
1226ab47cfaaSmrg# flags to be left without arguments
1227ab47cfaaSmrgneed_version=unknown
1228ab47cfaaSmrg
1229ab47cfaaSmrgcase $host_os in
1230ab47cfaaSmrgaix3*)
1231ab47cfaaSmrg  version_type=linux
1232ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1233ab47cfaaSmrg  shlibpath_var=LIBPATH
1234ab47cfaaSmrg
1235ab47cfaaSmrg  # AIX 3 has no versioning support, so we append a major version to the name.
1236ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1237ab47cfaaSmrg  ;;
1238ab47cfaaSmrg
1239ab47cfaaSmrgaix4* | aix5*)
1240ab47cfaaSmrg  version_type=linux
1241ab47cfaaSmrg  need_lib_prefix=no
1242ab47cfaaSmrg  need_version=no
1243ab47cfaaSmrg  hardcode_into_libs=yes
1244ab47cfaaSmrg  if test "$host_cpu" = ia64; then
1245ab47cfaaSmrg    # AIX 5 supports IA64
1246ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1247ab47cfaaSmrg    shlibpath_var=LD_LIBRARY_PATH
1248ab47cfaaSmrg  else
1249ab47cfaaSmrg    # With GCC up to 2.95.x, collect2 would create an import file
1250ab47cfaaSmrg    # for dependence libraries.  The import file would start with
1251ab47cfaaSmrg    # the line `#! .'.  This would cause the generated library to
1252ab47cfaaSmrg    # depend on `.', always an invalid library.  This was fixed in
1253ab47cfaaSmrg    # development snapshots of GCC prior to 3.0.
1254ab47cfaaSmrg    case $host_os in
1255ab47cfaaSmrg      aix4 | aix4.[[01]] | aix4.[[01]].*)
1256ab47cfaaSmrg      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1257ab47cfaaSmrg	   echo ' yes '
1258ab47cfaaSmrg	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1259ab47cfaaSmrg	:
1260ab47cfaaSmrg      else
1261ab47cfaaSmrg	can_build_shared=no
1262ab47cfaaSmrg      fi
1263ab47cfaaSmrg      ;;
1264ab47cfaaSmrg    esac
1265ab47cfaaSmrg    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1266ab47cfaaSmrg    # soname into executable. Probably we can add versioning support to
1267ab47cfaaSmrg    # collect2, so additional links can be useful in future.
1268ab47cfaaSmrg    if test "$aix_use_runtimelinking" = yes; then
1269ab47cfaaSmrg      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1270ab47cfaaSmrg      # instead of lib<name>.a to let people know that these are not
1271ab47cfaaSmrg      # typical AIX shared libraries.
1272ab47cfaaSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1273ab47cfaaSmrg    else
1274ab47cfaaSmrg      # We preserve .a as extension for shared libraries through AIX4.2
1275ab47cfaaSmrg      # and later when we are not doing run time linking.
1276ab47cfaaSmrg      library_names_spec='${libname}${release}.a $libname.a'
1277ab47cfaaSmrg      soname_spec='${libname}${release}${shared_ext}$major'
1278ab47cfaaSmrg    fi
1279ab47cfaaSmrg    shlibpath_var=LIBPATH
1280ab47cfaaSmrg  fi
1281ab47cfaaSmrg  ;;
1282ab47cfaaSmrg
1283ab47cfaaSmrgamigaos*)
1284ab47cfaaSmrg  library_names_spec='$libname.ixlibrary $libname.a'
1285ab47cfaaSmrg  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1286ab47cfaaSmrg  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'
1287ab47cfaaSmrg  ;;
1288ab47cfaaSmrg
1289ab47cfaaSmrgbeos*)
1290ab47cfaaSmrg  library_names_spec='${libname}${shared_ext}'
1291ab47cfaaSmrg  dynamic_linker="$host_os ld.so"
1292ab47cfaaSmrg  shlibpath_var=LIBRARY_PATH
1293ab47cfaaSmrg  ;;
1294ab47cfaaSmrg
1295ab47cfaaSmrgbsdi[[45]]*)
1296ab47cfaaSmrg  version_type=linux
1297ab47cfaaSmrg  need_version=no
1298ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1299ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1300ab47cfaaSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1301ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1302ab47cfaaSmrg  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1303ab47cfaaSmrg  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1304ab47cfaaSmrg  # the default ld.so.conf also contains /usr/contrib/lib and
1305ab47cfaaSmrg  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1306ab47cfaaSmrg  # libtool to hard-code these into programs
1307ab47cfaaSmrg  ;;
1308ab47cfaaSmrg
1309ab47cfaaSmrgcygwin* | mingw* | pw32*)
1310ab47cfaaSmrg  version_type=windows
1311ab47cfaaSmrg  shrext_cmds=".dll"
1312ab47cfaaSmrg  need_version=no
1313ab47cfaaSmrg  need_lib_prefix=no
1314ab47cfaaSmrg
1315ab47cfaaSmrg  case $GCC,$host_os in
1316ab47cfaaSmrg  yes,cygwin* | yes,mingw* | yes,pw32*)
1317ab47cfaaSmrg    library_names_spec='$libname.dll.a'
1318ab47cfaaSmrg    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1319ab47cfaaSmrg    postinstall_cmds='base_file=`basename \${file}`~
1320ab47cfaaSmrg      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1321ab47cfaaSmrg      dldir=$destdir/`dirname \$dlpath`~
1322ab47cfaaSmrg      test -d \$dldir || mkdir -p \$dldir~
1323ab47cfaaSmrg      $install_prog $dir/$dlname \$dldir/$dlname~
1324ab47cfaaSmrg      chmod a+x \$dldir/$dlname'
1325ab47cfaaSmrg    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1326ab47cfaaSmrg      dlpath=$dir/\$dldll~
1327ab47cfaaSmrg       $rm \$dlpath'
1328ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1329ab47cfaaSmrg
1330ab47cfaaSmrg    case $host_os in
1331ab47cfaaSmrg    cygwin*)
1332ab47cfaaSmrg      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1333ab47cfaaSmrg      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1334ab47cfaaSmrg      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1335ab47cfaaSmrg      ;;
1336ab47cfaaSmrg    mingw*)
1337ab47cfaaSmrg      # MinGW DLLs use traditional 'lib' prefix
1338ab47cfaaSmrg      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1339ab47cfaaSmrg      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1340ab47cfaaSmrg      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1341ab47cfaaSmrg        # It is most probably a Windows format PATH printed by
1342ab47cfaaSmrg        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1343ab47cfaaSmrg        # path with ; separators, and with drive letters. We can handle the
1344ab47cfaaSmrg        # drive letters (cygwin fileutils understands them), so leave them,
1345ab47cfaaSmrg        # especially as we might pass files found there to a mingw objdump,
1346ab47cfaaSmrg        # which wouldn't understand a cygwinified path. Ahh.
1347ab47cfaaSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1348ab47cfaaSmrg      else
1349ab47cfaaSmrg        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1350ab47cfaaSmrg      fi
1351ab47cfaaSmrg      ;;
1352ab47cfaaSmrg    pw32*)
1353ab47cfaaSmrg      # pw32 DLLs use 'pw' prefix rather than 'lib'
1354ab47cfaaSmrg      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1355ab47cfaaSmrg      ;;
1356ab47cfaaSmrg    esac
1357ab47cfaaSmrg    ;;
1358ab47cfaaSmrg
1359ab47cfaaSmrg  *)
1360ab47cfaaSmrg    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1361ab47cfaaSmrg    ;;
1362ab47cfaaSmrg  esac
1363ab47cfaaSmrg  dynamic_linker='Win32 ld.exe'
1364ab47cfaaSmrg  # FIXME: first we should search . and the directory the executable is in
1365ab47cfaaSmrg  shlibpath_var=PATH
1366ab47cfaaSmrg  ;;
1367ab47cfaaSmrg
1368ab47cfaaSmrgdarwin* | rhapsody*)
1369ab47cfaaSmrg  dynamic_linker="$host_os dyld"
1370ab47cfaaSmrg  version_type=darwin
1371ab47cfaaSmrg  need_lib_prefix=no
1372ab47cfaaSmrg  need_version=no
1373ab47cfaaSmrg  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1374ab47cfaaSmrg  soname_spec='${libname}${release}${major}$shared_ext'
1375ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1376ab47cfaaSmrg  shlibpath_var=DYLD_LIBRARY_PATH
1377ab47cfaaSmrg  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1378ab47cfaaSmrg  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1379ab47cfaaSmrg  if test "$GCC" = yes; then
1380ab47cfaaSmrg    sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"`
1381ab47cfaaSmrg  else
1382ab47cfaaSmrg    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1383ab47cfaaSmrg  fi
1384ab47cfaaSmrg  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1385ab47cfaaSmrg  ;;
1386ab47cfaaSmrg
1387ab47cfaaSmrgdgux*)
1388ab47cfaaSmrg  version_type=linux
1389ab47cfaaSmrg  need_lib_prefix=no
1390ab47cfaaSmrg  need_version=no
1391ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1392ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1393ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1394ab47cfaaSmrg  ;;
1395ab47cfaaSmrg
1396ab47cfaaSmrgfreebsd1*)
1397ab47cfaaSmrg  dynamic_linker=no
1398ab47cfaaSmrg  ;;
1399ab47cfaaSmrg
1400ab47cfaaSmrgfreebsd* | dragonfly*)
1401ab47cfaaSmrg  # DragonFly does not have aout.  When/if they implement a new
1402ab47cfaaSmrg  # versioning mechanism, adjust this.
1403ab47cfaaSmrg  if test -x /usr/bin/objformat; then
1404ab47cfaaSmrg    objformat=`/usr/bin/objformat`
1405ab47cfaaSmrg  else
1406ab47cfaaSmrg    case $host_os in
1407ab47cfaaSmrg    freebsd[[123]]*) objformat=aout ;;
1408ab47cfaaSmrg    *) objformat=elf ;;
1409ab47cfaaSmrg    esac
1410ab47cfaaSmrg  fi
1411ab47cfaaSmrg  version_type=freebsd-$objformat
1412ab47cfaaSmrg  case $version_type in
1413ab47cfaaSmrg    freebsd-elf*)
1414ab47cfaaSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1415ab47cfaaSmrg      need_version=no
1416ab47cfaaSmrg      need_lib_prefix=no
1417ab47cfaaSmrg      ;;
1418ab47cfaaSmrg    freebsd-*)
1419ab47cfaaSmrg      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1420ab47cfaaSmrg      need_version=yes
1421ab47cfaaSmrg      ;;
1422ab47cfaaSmrg  esac
1423ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1424ab47cfaaSmrg  case $host_os in
1425ab47cfaaSmrg  freebsd2*)
1426ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1427ab47cfaaSmrg    ;;
1428ab47cfaaSmrg  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1429ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1430ab47cfaaSmrg    hardcode_into_libs=yes
1431ab47cfaaSmrg    ;;
1432ab47cfaaSmrg  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1433ab47cfaaSmrg  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1434ab47cfaaSmrg    shlibpath_overrides_runpath=no
1435ab47cfaaSmrg    hardcode_into_libs=yes
1436ab47cfaaSmrg    ;;
1437ab47cfaaSmrg  freebsd*) # from 4.6 on
1438ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1439ab47cfaaSmrg    hardcode_into_libs=yes
1440ab47cfaaSmrg    ;;
1441ab47cfaaSmrg  esac
1442ab47cfaaSmrg  ;;
1443ab47cfaaSmrg
1444ab47cfaaSmrggnu*)
1445ab47cfaaSmrg  version_type=linux
1446ab47cfaaSmrg  need_lib_prefix=no
1447ab47cfaaSmrg  need_version=no
1448ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1449ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1450ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1451ab47cfaaSmrg  hardcode_into_libs=yes
1452ab47cfaaSmrg  ;;
1453ab47cfaaSmrg
1454ab47cfaaSmrghpux9* | hpux10* | hpux11*)
1455ab47cfaaSmrg  # Give a soname corresponding to the major version so that dld.sl refuses to
1456ab47cfaaSmrg  # link against other versions.
1457ab47cfaaSmrg  version_type=sunos
1458ab47cfaaSmrg  need_lib_prefix=no
1459ab47cfaaSmrg  need_version=no
1460ab47cfaaSmrg  case $host_cpu in
1461ab47cfaaSmrg  ia64*)
1462ab47cfaaSmrg    shrext_cmds='.so'
1463ab47cfaaSmrg    hardcode_into_libs=yes
1464ab47cfaaSmrg    dynamic_linker="$host_os dld.so"
1465ab47cfaaSmrg    shlibpath_var=LD_LIBRARY_PATH
1466ab47cfaaSmrg    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1467ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1468ab47cfaaSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1469ab47cfaaSmrg    if test "X$HPUX_IA64_MODE" = X32; then
1470ab47cfaaSmrg      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1471ab47cfaaSmrg    else
1472ab47cfaaSmrg      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1473ab47cfaaSmrg    fi
1474ab47cfaaSmrg    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1475ab47cfaaSmrg    ;;
1476ab47cfaaSmrg   hppa*64*)
1477ab47cfaaSmrg     shrext_cmds='.sl'
1478ab47cfaaSmrg     hardcode_into_libs=yes
1479ab47cfaaSmrg     dynamic_linker="$host_os dld.sl"
1480ab47cfaaSmrg     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1481ab47cfaaSmrg     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1482ab47cfaaSmrg     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1483ab47cfaaSmrg     soname_spec='${libname}${release}${shared_ext}$major'
1484ab47cfaaSmrg     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1485ab47cfaaSmrg     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1486ab47cfaaSmrg     ;;
1487ab47cfaaSmrg   *)
1488ab47cfaaSmrg    shrext_cmds='.sl'
1489ab47cfaaSmrg    dynamic_linker="$host_os dld.sl"
1490ab47cfaaSmrg    shlibpath_var=SHLIB_PATH
1491ab47cfaaSmrg    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1492ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1493ab47cfaaSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1494ab47cfaaSmrg    ;;
1495ab47cfaaSmrg  esac
1496ab47cfaaSmrg  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1497ab47cfaaSmrg  postinstall_cmds='chmod 555 $lib'
1498ab47cfaaSmrg  ;;
1499ab47cfaaSmrg
1500ab47cfaaSmrginterix3*)
1501ab47cfaaSmrg  version_type=linux
1502ab47cfaaSmrg  need_lib_prefix=no
1503ab47cfaaSmrg  need_version=no
1504ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1505ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1506ab47cfaaSmrg  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1507ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1508ab47cfaaSmrg  shlibpath_overrides_runpath=no
1509ab47cfaaSmrg  hardcode_into_libs=yes
1510ab47cfaaSmrg  ;;
1511ab47cfaaSmrg
1512ab47cfaaSmrgirix5* | irix6* | nonstopux*)
1513ab47cfaaSmrg  case $host_os in
1514ab47cfaaSmrg    nonstopux*) version_type=nonstopux ;;
1515ab47cfaaSmrg    *)
1516ab47cfaaSmrg	if test "$lt_cv_prog_gnu_ld" = yes; then
1517ab47cfaaSmrg		version_type=linux
1518ab47cfaaSmrg	else
1519ab47cfaaSmrg		version_type=irix
1520ab47cfaaSmrg	fi ;;
1521ab47cfaaSmrg  esac
1522ab47cfaaSmrg  need_lib_prefix=no
1523ab47cfaaSmrg  need_version=no
1524ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1525ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1526ab47cfaaSmrg  case $host_os in
1527ab47cfaaSmrg  irix5* | nonstopux*)
1528ab47cfaaSmrg    libsuff= shlibsuff=
1529ab47cfaaSmrg    ;;
1530ab47cfaaSmrg  *)
1531ab47cfaaSmrg    case $LD in # libtool.m4 will add one of these switches to LD
1532ab47cfaaSmrg    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1533ab47cfaaSmrg      libsuff= shlibsuff= libmagic=32-bit;;
1534ab47cfaaSmrg    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1535ab47cfaaSmrg      libsuff=32 shlibsuff=N32 libmagic=N32;;
1536ab47cfaaSmrg    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1537ab47cfaaSmrg      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1538ab47cfaaSmrg    *) libsuff= shlibsuff= libmagic=never-match;;
1539ab47cfaaSmrg    esac
1540ab47cfaaSmrg    ;;
1541ab47cfaaSmrg  esac
1542ab47cfaaSmrg  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1543ab47cfaaSmrg  shlibpath_overrides_runpath=no
1544ab47cfaaSmrg  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1545ab47cfaaSmrg  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1546ab47cfaaSmrg  hardcode_into_libs=yes
1547ab47cfaaSmrg  ;;
1548ab47cfaaSmrg
1549ab47cfaaSmrg# No shared lib support for Linux oldld, aout, or coff.
1550ab47cfaaSmrglinux*oldld* | linux*aout* | linux*coff*)
1551ab47cfaaSmrg  dynamic_linker=no
1552ab47cfaaSmrg  ;;
1553ab47cfaaSmrg
1554ab47cfaaSmrg# This must be Linux ELF.
1555ab47cfaaSmrglinux* | k*bsd*-gnu)
1556ab47cfaaSmrg  version_type=linux
1557ab47cfaaSmrg  need_lib_prefix=no
1558ab47cfaaSmrg  need_version=no
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  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1562ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1563ab47cfaaSmrg  shlibpath_overrides_runpath=no
1564ab47cfaaSmrg  # This implies no fast_install, which is unacceptable.
1565ab47cfaaSmrg  # Some rework will be needed to allow for fast_install
1566ab47cfaaSmrg  # before this can be enabled.
1567ab47cfaaSmrg  hardcode_into_libs=yes
1568ab47cfaaSmrg
1569ab47cfaaSmrg  # Append ld.so.conf contents to the search path
1570ab47cfaaSmrg  if test -f /etc/ld.so.conf; then
1571ab47cfaaSmrg    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1572ab47cfaaSmrg    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1573ab47cfaaSmrg  fi
1574ab47cfaaSmrg
1575ab47cfaaSmrg  # We used to test for /lib/ld.so.1 and disable shared libraries on
1576ab47cfaaSmrg  # powerpc, because MkLinux only supported shared libraries with the
1577ab47cfaaSmrg  # GNU dynamic linker.  Since this was broken with cross compilers,
1578ab47cfaaSmrg  # most powerpc-linux boxes support dynamic linking these days and
1579ab47cfaaSmrg  # people can always --disable-shared, the test was removed, and we
1580ab47cfaaSmrg  # assume the GNU/Linux dynamic linker is in use.
1581ab47cfaaSmrg  dynamic_linker='GNU/Linux ld.so'
1582ab47cfaaSmrg  ;;
1583ab47cfaaSmrg
1584ab47cfaaSmrgnetbsdelf*-gnu)
1585ab47cfaaSmrg  version_type=linux
1586ab47cfaaSmrg  need_lib_prefix=no
1587ab47cfaaSmrg  need_version=no
1588ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1589ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1590ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1591ab47cfaaSmrg  shlibpath_overrides_runpath=no
1592ab47cfaaSmrg  hardcode_into_libs=yes
1593ab47cfaaSmrg  dynamic_linker='NetBSD ld.elf_so'
1594ab47cfaaSmrg  ;;
1595ab47cfaaSmrg
1596ab47cfaaSmrgnetbsd*)
1597ab47cfaaSmrg  version_type=sunos
1598ab47cfaaSmrg  need_lib_prefix=no
1599ab47cfaaSmrg  need_version=no
1600ab47cfaaSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1601ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1602ab47cfaaSmrg    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1603ab47cfaaSmrg    dynamic_linker='NetBSD (a.out) ld.so'
1604ab47cfaaSmrg  else
1605ab47cfaaSmrg    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1606ab47cfaaSmrg    soname_spec='${libname}${release}${shared_ext}$major'
1607ab47cfaaSmrg    dynamic_linker='NetBSD ld.elf_so'
1608ab47cfaaSmrg  fi
1609ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1610ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1611ab47cfaaSmrg  hardcode_into_libs=yes
1612ab47cfaaSmrg  ;;
1613ab47cfaaSmrg
1614ab47cfaaSmrgnewsos6)
1615ab47cfaaSmrg  version_type=linux
1616ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1617ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1618ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1619ab47cfaaSmrg  ;;
1620ab47cfaaSmrg
1621ab47cfaaSmrgnto-qnx*)
1622ab47cfaaSmrg  version_type=linux
1623ab47cfaaSmrg  need_lib_prefix=no
1624ab47cfaaSmrg  need_version=no
1625ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1626ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1627ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1628ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1629ab47cfaaSmrg  ;;
1630ab47cfaaSmrg
1631ab47cfaaSmrgopenbsd*)
1632ab47cfaaSmrg  version_type=sunos
1633ab47cfaaSmrg  sys_lib_dlsearch_path_spec="/usr/lib"
1634ab47cfaaSmrg  need_lib_prefix=no
1635ab47cfaaSmrg  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1636ab47cfaaSmrg  case $host_os in
1637ab47cfaaSmrg    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1638ab47cfaaSmrg    *)                         need_version=no  ;;
1639ab47cfaaSmrg  esac
1640ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1641ab47cfaaSmrg  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1642ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1643ab47cfaaSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1644ab47cfaaSmrg    case $host_os in
1645ab47cfaaSmrg      openbsd2.[[89]] | openbsd2.[[89]].*)
1646ab47cfaaSmrg	shlibpath_overrides_runpath=no
1647ab47cfaaSmrg	;;
1648ab47cfaaSmrg      *)
1649ab47cfaaSmrg	shlibpath_overrides_runpath=yes
1650ab47cfaaSmrg	;;
1651ab47cfaaSmrg      esac
1652ab47cfaaSmrg  else
1653ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1654ab47cfaaSmrg  fi
1655ab47cfaaSmrg  ;;
1656ab47cfaaSmrg
1657ab47cfaaSmrgos2*)
1658ab47cfaaSmrg  libname_spec='$name'
1659ab47cfaaSmrg  shrext_cmds=".dll"
1660ab47cfaaSmrg  need_lib_prefix=no
1661ab47cfaaSmrg  library_names_spec='$libname${shared_ext} $libname.a'
1662ab47cfaaSmrg  dynamic_linker='OS/2 ld.exe'
1663ab47cfaaSmrg  shlibpath_var=LIBPATH
1664ab47cfaaSmrg  ;;
1665ab47cfaaSmrg
1666ab47cfaaSmrgosf3* | osf4* | osf5*)
1667ab47cfaaSmrg  version_type=osf
1668ab47cfaaSmrg  need_lib_prefix=no
1669ab47cfaaSmrg  need_version=no
1670ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1671ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1672ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1673ab47cfaaSmrg  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1674ab47cfaaSmrg  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1675ab47cfaaSmrg  ;;
1676ab47cfaaSmrg
1677ab47cfaaSmrgsolaris*)
1678ab47cfaaSmrg  version_type=linux
1679ab47cfaaSmrg  need_lib_prefix=no
1680ab47cfaaSmrg  need_version=no
1681ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1682ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1683ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1684ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1685ab47cfaaSmrg  hardcode_into_libs=yes
1686ab47cfaaSmrg  # ldd complains unless libraries are executable
1687ab47cfaaSmrg  postinstall_cmds='chmod +x $lib'
1688ab47cfaaSmrg  ;;
1689ab47cfaaSmrg
1690ab47cfaaSmrgsunos4*)
1691ab47cfaaSmrg  version_type=sunos
1692ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1693ab47cfaaSmrg  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1694ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1695ab47cfaaSmrg  shlibpath_overrides_runpath=yes
1696ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
1697ab47cfaaSmrg    need_lib_prefix=no
1698ab47cfaaSmrg  fi
1699ab47cfaaSmrg  need_version=yes
1700ab47cfaaSmrg  ;;
1701ab47cfaaSmrg
1702ab47cfaaSmrgsysv4 | sysv4.3*)
1703ab47cfaaSmrg  version_type=linux
1704ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1705ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1706ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1707ab47cfaaSmrg  case $host_vendor in
1708ab47cfaaSmrg    sni)
1709ab47cfaaSmrg      shlibpath_overrides_runpath=no
1710ab47cfaaSmrg      need_lib_prefix=no
1711ab47cfaaSmrg      export_dynamic_flag_spec='${wl}-Blargedynsym'
1712ab47cfaaSmrg      runpath_var=LD_RUN_PATH
1713ab47cfaaSmrg      ;;
1714ab47cfaaSmrg    siemens)
1715ab47cfaaSmrg      need_lib_prefix=no
1716ab47cfaaSmrg      ;;
1717ab47cfaaSmrg    motorola)
1718ab47cfaaSmrg      need_lib_prefix=no
1719ab47cfaaSmrg      need_version=no
1720ab47cfaaSmrg      shlibpath_overrides_runpath=no
1721ab47cfaaSmrg      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1722ab47cfaaSmrg      ;;
1723ab47cfaaSmrg  esac
1724ab47cfaaSmrg  ;;
1725ab47cfaaSmrg
1726ab47cfaaSmrgsysv4*MP*)
1727ab47cfaaSmrg  if test -d /usr/nec ;then
1728ab47cfaaSmrg    version_type=linux
1729ab47cfaaSmrg    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1730ab47cfaaSmrg    soname_spec='$libname${shared_ext}.$major'
1731ab47cfaaSmrg    shlibpath_var=LD_LIBRARY_PATH
1732ab47cfaaSmrg  fi
1733ab47cfaaSmrg  ;;
1734ab47cfaaSmrg
1735ab47cfaaSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1736ab47cfaaSmrg  version_type=freebsd-elf
1737ab47cfaaSmrg  need_lib_prefix=no
1738ab47cfaaSmrg  need_version=no
1739ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1740ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1741ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1742ab47cfaaSmrg  hardcode_into_libs=yes
1743ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
1744ab47cfaaSmrg    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1745ab47cfaaSmrg    shlibpath_overrides_runpath=no
1746ab47cfaaSmrg  else
1747ab47cfaaSmrg    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1748ab47cfaaSmrg    shlibpath_overrides_runpath=yes
1749ab47cfaaSmrg    case $host_os in
1750ab47cfaaSmrg      sco3.2v5*)
1751ab47cfaaSmrg        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1752ab47cfaaSmrg	;;
1753ab47cfaaSmrg    esac
1754ab47cfaaSmrg  fi
1755ab47cfaaSmrg  sys_lib_dlsearch_path_spec='/usr/lib'
1756ab47cfaaSmrg  ;;
1757ab47cfaaSmrg
1758ab47cfaaSmrguts4*)
1759ab47cfaaSmrg  version_type=linux
1760ab47cfaaSmrg  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1761ab47cfaaSmrg  soname_spec='${libname}${release}${shared_ext}$major'
1762ab47cfaaSmrg  shlibpath_var=LD_LIBRARY_PATH
1763ab47cfaaSmrg  ;;
1764ab47cfaaSmrg
1765ab47cfaaSmrg*)
1766ab47cfaaSmrg  dynamic_linker=no
1767ab47cfaaSmrg  ;;
1768ab47cfaaSmrgesac
1769ab47cfaaSmrgAC_MSG_RESULT([$dynamic_linker])
1770ab47cfaaSmrgtest "$dynamic_linker" = no && can_build_shared=no
1771ab47cfaaSmrg
1772ab47cfaaSmrgvariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1773ab47cfaaSmrgif test "$GCC" = yes; then
1774ab47cfaaSmrg  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1775ab47cfaaSmrgfi
1776ab47cfaaSmrg])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1777ab47cfaaSmrg
1778ab47cfaaSmrg
1779ab47cfaaSmrg# _LT_AC_TAGCONFIG
1780ab47cfaaSmrg# ----------------
1781ab47cfaaSmrgAC_DEFUN([_LT_AC_TAGCONFIG],
1782ab47cfaaSmrg[AC_ARG_WITH([tags],
1783ab47cfaaSmrg    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1784ab47cfaaSmrg        [include additional configurations @<:@automatic@:>@])],
1785ab47cfaaSmrg    [tagnames="$withval"])
1786ab47cfaaSmrg
1787ab47cfaaSmrgif test -f "$ltmain" && test -n "$tagnames"; then
1788ab47cfaaSmrg  if test ! -f "${ofile}"; then
1789ab47cfaaSmrg    AC_MSG_WARN([output file `$ofile' does not exist])
1790ab47cfaaSmrg  fi
1791ab47cfaaSmrg
1792ab47cfaaSmrg  if test -z "$LTCC"; then
1793ab47cfaaSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1794ab47cfaaSmrg    if test -z "$LTCC"; then
1795ab47cfaaSmrg      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1796ab47cfaaSmrg    else
1797ab47cfaaSmrg      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1798ab47cfaaSmrg    fi
1799ab47cfaaSmrg  fi
1800ab47cfaaSmrg  if test -z "$LTCFLAGS"; then
1801ab47cfaaSmrg    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1802ab47cfaaSmrg  fi
1803ab47cfaaSmrg
1804ab47cfaaSmrg  # Extract list of available tagged configurations in $ofile.
1805ab47cfaaSmrg  # Note that this assumes the entire list is on one line.
1806ab47cfaaSmrg  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1807ab47cfaaSmrg
1808ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1809ab47cfaaSmrg  for tagname in $tagnames; do
1810ab47cfaaSmrg    IFS="$lt_save_ifs"
1811ab47cfaaSmrg    # Check whether tagname contains only valid characters
1812ab47cfaaSmrg    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1813ab47cfaaSmrg    "") ;;
1814ab47cfaaSmrg    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1815ab47cfaaSmrg	;;
1816ab47cfaaSmrg    esac
1817ab47cfaaSmrg
1818ab47cfaaSmrg    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1819ab47cfaaSmrg    then
1820ab47cfaaSmrg      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1821ab47cfaaSmrg    fi
1822ab47cfaaSmrg
1823ab47cfaaSmrg    # Update the list of available tags.
1824ab47cfaaSmrg    if test -n "$tagname"; then
1825ab47cfaaSmrg      echo appending configuration tag \"$tagname\" to $ofile
1826ab47cfaaSmrg
1827ab47cfaaSmrg      case $tagname in
1828ab47cfaaSmrg      CXX)
1829ab47cfaaSmrg	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1830ab47cfaaSmrg	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1831ab47cfaaSmrg	    (test "X$CXX" != "Xg++"))) ; then
1832ab47cfaaSmrg	  AC_LIBTOOL_LANG_CXX_CONFIG
1833ab47cfaaSmrg	else
1834ab47cfaaSmrg	  tagname=""
1835ab47cfaaSmrg	fi
1836ab47cfaaSmrg	;;
1837ab47cfaaSmrg
1838ab47cfaaSmrg      F77)
1839ab47cfaaSmrg	if test -n "$F77" && test "X$F77" != "Xno"; then
1840ab47cfaaSmrg	  AC_LIBTOOL_LANG_F77_CONFIG
1841ab47cfaaSmrg	else
1842ab47cfaaSmrg	  tagname=""
1843ab47cfaaSmrg	fi
1844ab47cfaaSmrg	;;
1845ab47cfaaSmrg
1846ab47cfaaSmrg      GCJ)
1847ab47cfaaSmrg	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1848ab47cfaaSmrg	  AC_LIBTOOL_LANG_GCJ_CONFIG
1849ab47cfaaSmrg	else
1850ab47cfaaSmrg	  tagname=""
1851ab47cfaaSmrg	fi
1852ab47cfaaSmrg	;;
1853ab47cfaaSmrg
1854ab47cfaaSmrg      RC)
1855ab47cfaaSmrg	AC_LIBTOOL_LANG_RC_CONFIG
1856ab47cfaaSmrg	;;
1857ab47cfaaSmrg
1858ab47cfaaSmrg      *)
1859ab47cfaaSmrg	AC_MSG_ERROR([Unsupported tag name: $tagname])
1860ab47cfaaSmrg	;;
1861ab47cfaaSmrg      esac
1862ab47cfaaSmrg
1863ab47cfaaSmrg      # Append the new tag name to the list of available tags.
1864ab47cfaaSmrg      if test -n "$tagname" ; then
1865ab47cfaaSmrg      available_tags="$available_tags $tagname"
1866ab47cfaaSmrg    fi
1867ab47cfaaSmrg    fi
1868ab47cfaaSmrg  done
1869ab47cfaaSmrg  IFS="$lt_save_ifs"
1870ab47cfaaSmrg
1871ab47cfaaSmrg  # Now substitute the updated list of available tags.
1872ab47cfaaSmrg  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1873ab47cfaaSmrg    mv "${ofile}T" "$ofile"
1874ab47cfaaSmrg    chmod +x "$ofile"
1875ab47cfaaSmrg  else
1876ab47cfaaSmrg    rm -f "${ofile}T"
1877ab47cfaaSmrg    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1878ab47cfaaSmrg  fi
1879ab47cfaaSmrgfi
1880ab47cfaaSmrg])# _LT_AC_TAGCONFIG
1881ab47cfaaSmrg
1882ab47cfaaSmrg
1883ab47cfaaSmrg# AC_LIBTOOL_DLOPEN
1884ab47cfaaSmrg# -----------------
1885ab47cfaaSmrg# enable checks for dlopen support
1886ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_DLOPEN],
1887ab47cfaaSmrg [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1888ab47cfaaSmrg])# AC_LIBTOOL_DLOPEN
1889ab47cfaaSmrg
1890ab47cfaaSmrg
1891ab47cfaaSmrg# AC_LIBTOOL_WIN32_DLL
1892ab47cfaaSmrg# --------------------
1893ab47cfaaSmrg# declare package support for building win32 DLLs
1894ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1895ab47cfaaSmrg[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1896ab47cfaaSmrg])# AC_LIBTOOL_WIN32_DLL
1897ab47cfaaSmrg
1898ab47cfaaSmrg
1899ab47cfaaSmrg# AC_ENABLE_SHARED([DEFAULT])
1900ab47cfaaSmrg# ---------------------------
1901ab47cfaaSmrg# implement the --enable-shared flag
1902ab47cfaaSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1903ab47cfaaSmrgAC_DEFUN([AC_ENABLE_SHARED],
1904ab47cfaaSmrg[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1905ab47cfaaSmrgAC_ARG_ENABLE([shared],
1906ab47cfaaSmrg    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1907ab47cfaaSmrg	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1908ab47cfaaSmrg    [p=${PACKAGE-default}
1909ab47cfaaSmrg    case $enableval in
1910ab47cfaaSmrg    yes) enable_shared=yes ;;
1911ab47cfaaSmrg    no) enable_shared=no ;;
1912ab47cfaaSmrg    *)
1913ab47cfaaSmrg      enable_shared=no
1914ab47cfaaSmrg      # Look at the argument we got.  We use all the common list separators.
1915ab47cfaaSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1916ab47cfaaSmrg      for pkg in $enableval; do
1917ab47cfaaSmrg	IFS="$lt_save_ifs"
1918ab47cfaaSmrg	if test "X$pkg" = "X$p"; then
1919ab47cfaaSmrg	  enable_shared=yes
1920ab47cfaaSmrg	fi
1921ab47cfaaSmrg      done
1922ab47cfaaSmrg      IFS="$lt_save_ifs"
1923ab47cfaaSmrg      ;;
1924ab47cfaaSmrg    esac],
1925ab47cfaaSmrg    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1926ab47cfaaSmrg])# AC_ENABLE_SHARED
1927ab47cfaaSmrg
1928ab47cfaaSmrg
1929ab47cfaaSmrg# AC_DISABLE_SHARED
1930ab47cfaaSmrg# -----------------
1931ab47cfaaSmrg# set the default shared flag to --disable-shared
1932ab47cfaaSmrgAC_DEFUN([AC_DISABLE_SHARED],
1933ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1934ab47cfaaSmrgAC_ENABLE_SHARED(no)
1935ab47cfaaSmrg])# AC_DISABLE_SHARED
1936ab47cfaaSmrg
1937ab47cfaaSmrg
1938ab47cfaaSmrg# AC_ENABLE_STATIC([DEFAULT])
1939ab47cfaaSmrg# ---------------------------
1940ab47cfaaSmrg# implement the --enable-static flag
1941ab47cfaaSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1942ab47cfaaSmrgAC_DEFUN([AC_ENABLE_STATIC],
1943ab47cfaaSmrg[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1944ab47cfaaSmrgAC_ARG_ENABLE([static],
1945ab47cfaaSmrg    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1946ab47cfaaSmrg	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1947ab47cfaaSmrg    [p=${PACKAGE-default}
1948ab47cfaaSmrg    case $enableval in
1949ab47cfaaSmrg    yes) enable_static=yes ;;
1950ab47cfaaSmrg    no) enable_static=no ;;
1951ab47cfaaSmrg    *)
1952ab47cfaaSmrg     enable_static=no
1953ab47cfaaSmrg      # Look at the argument we got.  We use all the common list separators.
1954ab47cfaaSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1955ab47cfaaSmrg      for pkg in $enableval; do
1956ab47cfaaSmrg	IFS="$lt_save_ifs"
1957ab47cfaaSmrg	if test "X$pkg" = "X$p"; then
1958ab47cfaaSmrg	  enable_static=yes
1959ab47cfaaSmrg	fi
1960ab47cfaaSmrg      done
1961ab47cfaaSmrg      IFS="$lt_save_ifs"
1962ab47cfaaSmrg      ;;
1963ab47cfaaSmrg    esac],
1964ab47cfaaSmrg    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1965ab47cfaaSmrg])# AC_ENABLE_STATIC
1966ab47cfaaSmrg
1967ab47cfaaSmrg
1968ab47cfaaSmrg# AC_DISABLE_STATIC
1969ab47cfaaSmrg# -----------------
1970ab47cfaaSmrg# set the default static flag to --disable-static
1971ab47cfaaSmrgAC_DEFUN([AC_DISABLE_STATIC],
1972ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1973ab47cfaaSmrgAC_ENABLE_STATIC(no)
1974ab47cfaaSmrg])# AC_DISABLE_STATIC
1975ab47cfaaSmrg
1976ab47cfaaSmrg
1977ab47cfaaSmrg# AC_ENABLE_FAST_INSTALL([DEFAULT])
1978ab47cfaaSmrg# ---------------------------------
1979ab47cfaaSmrg# implement the --enable-fast-install flag
1980ab47cfaaSmrg# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1981ab47cfaaSmrgAC_DEFUN([AC_ENABLE_FAST_INSTALL],
1982ab47cfaaSmrg[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1983ab47cfaaSmrgAC_ARG_ENABLE([fast-install],
1984ab47cfaaSmrg    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1985ab47cfaaSmrg    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1986ab47cfaaSmrg    [p=${PACKAGE-default}
1987ab47cfaaSmrg    case $enableval in
1988ab47cfaaSmrg    yes) enable_fast_install=yes ;;
1989ab47cfaaSmrg    no) enable_fast_install=no ;;
1990ab47cfaaSmrg    *)
1991ab47cfaaSmrg      enable_fast_install=no
1992ab47cfaaSmrg      # Look at the argument we got.  We use all the common list separators.
1993ab47cfaaSmrg      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1994ab47cfaaSmrg      for pkg in $enableval; do
1995ab47cfaaSmrg	IFS="$lt_save_ifs"
1996ab47cfaaSmrg	if test "X$pkg" = "X$p"; then
1997ab47cfaaSmrg	  enable_fast_install=yes
1998ab47cfaaSmrg	fi
1999ab47cfaaSmrg      done
2000ab47cfaaSmrg      IFS="$lt_save_ifs"
2001ab47cfaaSmrg      ;;
2002ab47cfaaSmrg    esac],
2003ab47cfaaSmrg    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2004ab47cfaaSmrg])# AC_ENABLE_FAST_INSTALL
2005ab47cfaaSmrg
2006ab47cfaaSmrg
2007ab47cfaaSmrg# AC_DISABLE_FAST_INSTALL
2008ab47cfaaSmrg# -----------------------
2009ab47cfaaSmrg# set the default to --disable-fast-install
2010ab47cfaaSmrgAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2011ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2012ab47cfaaSmrgAC_ENABLE_FAST_INSTALL(no)
2013ab47cfaaSmrg])# AC_DISABLE_FAST_INSTALL
2014ab47cfaaSmrg
2015ab47cfaaSmrg
2016ab47cfaaSmrg# AC_LIBTOOL_PICMODE([MODE])
2017ab47cfaaSmrg# --------------------------
2018ab47cfaaSmrg# implement the --with-pic flag
2019ab47cfaaSmrg# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2020ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PICMODE],
2021ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2022ab47cfaaSmrgpic_mode=ifelse($#,1,$1,default)
2023ab47cfaaSmrg])# AC_LIBTOOL_PICMODE
2024ab47cfaaSmrg
2025ab47cfaaSmrg
2026ab47cfaaSmrg# AC_PROG_EGREP
2027ab47cfaaSmrg# -------------
2028ab47cfaaSmrg# This is predefined starting with Autoconf 2.54, so this conditional
2029ab47cfaaSmrg# definition can be removed once we require Autoconf 2.54 or later.
2030ab47cfaaSmrgm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2031ab47cfaaSmrg[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2032ab47cfaaSmrg   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2033ab47cfaaSmrg    then ac_cv_prog_egrep='grep -E'
2034ab47cfaaSmrg    else ac_cv_prog_egrep='egrep'
2035ab47cfaaSmrg    fi])
2036ab47cfaaSmrg EGREP=$ac_cv_prog_egrep
2037ab47cfaaSmrg AC_SUBST([EGREP])
2038ab47cfaaSmrg])])
2039ab47cfaaSmrg
2040ab47cfaaSmrg
2041ab47cfaaSmrg# AC_PATH_TOOL_PREFIX
2042ab47cfaaSmrg# -------------------
2043ab47cfaaSmrg# find a file program which can recognise shared library
2044ab47cfaaSmrgAC_DEFUN([AC_PATH_TOOL_PREFIX],
2045ab47cfaaSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2046ab47cfaaSmrgAC_MSG_CHECKING([for $1])
2047ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2048ab47cfaaSmrg[case $MAGIC_CMD in
2049ab47cfaaSmrg[[\\/*] |  ?:[\\/]*])
2050ab47cfaaSmrg  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2051ab47cfaaSmrg  ;;
2052ab47cfaaSmrg*)
2053ab47cfaaSmrg  lt_save_MAGIC_CMD="$MAGIC_CMD"
2054ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2055ab47cfaaSmrgdnl $ac_dummy forces splitting on constant user-supplied paths.
2056ab47cfaaSmrgdnl POSIX.2 word splitting is done only on the output of word expansions,
2057ab47cfaaSmrgdnl not every word.  This closes a longstanding sh security hole.
2058ab47cfaaSmrg  ac_dummy="ifelse([$2], , $PATH, [$2])"
2059ab47cfaaSmrg  for ac_dir in $ac_dummy; do
2060ab47cfaaSmrg    IFS="$lt_save_ifs"
2061ab47cfaaSmrg    test -z "$ac_dir" && ac_dir=.
2062ab47cfaaSmrg    if test -f $ac_dir/$1; then
2063ab47cfaaSmrg      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2064ab47cfaaSmrg      if test -n "$file_magic_test_file"; then
2065ab47cfaaSmrg	case $deplibs_check_method in
2066ab47cfaaSmrg	"file_magic "*)
2067ab47cfaaSmrg	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2068ab47cfaaSmrg	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2069ab47cfaaSmrg	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2070ab47cfaaSmrg	    $EGREP "$file_magic_regex" > /dev/null; then
2071ab47cfaaSmrg	    :
2072ab47cfaaSmrg	  else
2073ab47cfaaSmrg	    cat <<EOF 1>&2
2074ab47cfaaSmrg
2075ab47cfaaSmrg*** Warning: the command libtool uses to detect shared libraries,
2076ab47cfaaSmrg*** $file_magic_cmd, produces output that libtool cannot recognize.
2077ab47cfaaSmrg*** The result is that libtool may fail to recognize shared libraries
2078ab47cfaaSmrg*** as such.  This will affect the creation of libtool libraries that
2079ab47cfaaSmrg*** depend on shared libraries, but programs linked with such libtool
2080ab47cfaaSmrg*** libraries will work regardless of this problem.  Nevertheless, you
2081ab47cfaaSmrg*** may want to report the problem to your system manager and/or to
2082ab47cfaaSmrg*** bug-libtool@gnu.org
2083ab47cfaaSmrg
2084ab47cfaaSmrgEOF
2085ab47cfaaSmrg	  fi ;;
2086ab47cfaaSmrg	esac
2087ab47cfaaSmrg      fi
2088ab47cfaaSmrg      break
2089ab47cfaaSmrg    fi
2090ab47cfaaSmrg  done
2091ab47cfaaSmrg  IFS="$lt_save_ifs"
2092ab47cfaaSmrg  MAGIC_CMD="$lt_save_MAGIC_CMD"
2093ab47cfaaSmrg  ;;
2094ab47cfaaSmrgesac])
2095ab47cfaaSmrgMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2096ab47cfaaSmrgif test -n "$MAGIC_CMD"; then
2097ab47cfaaSmrg  AC_MSG_RESULT($MAGIC_CMD)
2098ab47cfaaSmrgelse
2099ab47cfaaSmrg  AC_MSG_RESULT(no)
2100ab47cfaaSmrgfi
2101ab47cfaaSmrg])# AC_PATH_TOOL_PREFIX
2102ab47cfaaSmrg
2103ab47cfaaSmrg
2104ab47cfaaSmrg# AC_PATH_MAGIC
2105ab47cfaaSmrg# -------------
2106ab47cfaaSmrg# find a file program which can recognise a shared library
2107ab47cfaaSmrgAC_DEFUN([AC_PATH_MAGIC],
2108ab47cfaaSmrg[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2109ab47cfaaSmrgif test -z "$lt_cv_path_MAGIC_CMD"; then
2110ab47cfaaSmrg  if test -n "$ac_tool_prefix"; then
2111ab47cfaaSmrg    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2112ab47cfaaSmrg  else
2113ab47cfaaSmrg    MAGIC_CMD=:
2114ab47cfaaSmrg  fi
2115ab47cfaaSmrgfi
2116ab47cfaaSmrg])# AC_PATH_MAGIC
2117ab47cfaaSmrg
2118ab47cfaaSmrg
2119ab47cfaaSmrg# AC_PROG_LD
2120ab47cfaaSmrg# ----------
2121ab47cfaaSmrg# find the pathname to the GNU or non-GNU linker
2122ab47cfaaSmrgAC_DEFUN([AC_PROG_LD],
2123ab47cfaaSmrg[AC_ARG_WITH([gnu-ld],
2124ab47cfaaSmrg    [AC_HELP_STRING([--with-gnu-ld],
2125ab47cfaaSmrg	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2126ab47cfaaSmrg    [test "$withval" = no || with_gnu_ld=yes],
2127ab47cfaaSmrg    [with_gnu_ld=no])
2128ab47cfaaSmrgAC_REQUIRE([LT_AC_PROG_SED])dnl
2129ab47cfaaSmrgAC_REQUIRE([AC_PROG_CC])dnl
2130ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_HOST])dnl
2131ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2132ab47cfaaSmrgac_prog=ld
2133ab47cfaaSmrgif test "$GCC" = yes; then
2134ab47cfaaSmrg  # Check if gcc -print-prog-name=ld gives a path.
2135ab47cfaaSmrg  AC_MSG_CHECKING([for ld used by $CC])
2136ab47cfaaSmrg  case $host in
2137ab47cfaaSmrg  *-*-mingw*)
2138ab47cfaaSmrg    # gcc leaves a trailing carriage return which upsets mingw
2139ab47cfaaSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2140ab47cfaaSmrg  *)
2141ab47cfaaSmrg    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2142ab47cfaaSmrg  esac
2143ab47cfaaSmrg  case $ac_prog in
2144ab47cfaaSmrg    # Accept absolute paths.
2145ab47cfaaSmrg    [[\\/]]* | ?:[[\\/]]*)
2146ab47cfaaSmrg      re_direlt='/[[^/]][[^/]]*/\.\./'
2147ab47cfaaSmrg      # Canonicalize the pathname of ld
2148ab47cfaaSmrg      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2149ab47cfaaSmrg      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2150ab47cfaaSmrg	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2151ab47cfaaSmrg      done
2152ab47cfaaSmrg      test -z "$LD" && LD="$ac_prog"
2153ab47cfaaSmrg      ;;
2154ab47cfaaSmrg  "")
2155ab47cfaaSmrg    # If it fails, then pretend we aren't using GCC.
2156ab47cfaaSmrg    ac_prog=ld
2157ab47cfaaSmrg    ;;
2158ab47cfaaSmrg  *)
2159ab47cfaaSmrg    # If it is relative, then search for the first ld in PATH.
2160ab47cfaaSmrg    with_gnu_ld=unknown
2161ab47cfaaSmrg    ;;
2162ab47cfaaSmrg  esac
2163ab47cfaaSmrgelif test "$with_gnu_ld" = yes; then
2164ab47cfaaSmrg  AC_MSG_CHECKING([for GNU ld])
2165ab47cfaaSmrgelse
2166ab47cfaaSmrg  AC_MSG_CHECKING([for non-GNU ld])
2167ab47cfaaSmrgfi
2168ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_LD,
2169ab47cfaaSmrg[if test -z "$LD"; then
2170ab47cfaaSmrg  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2171ab47cfaaSmrg  for ac_dir in $PATH; do
2172ab47cfaaSmrg    IFS="$lt_save_ifs"
2173ab47cfaaSmrg    test -z "$ac_dir" && ac_dir=.
2174ab47cfaaSmrg    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2175ab47cfaaSmrg      lt_cv_path_LD="$ac_dir/$ac_prog"
2176ab47cfaaSmrg      # Check to see if the program is GNU ld.  I'd rather use --version,
2177ab47cfaaSmrg      # but apparently some variants of GNU ld only accept -v.
2178ab47cfaaSmrg      # Break only if it was the GNU/non-GNU ld that we prefer.
2179ab47cfaaSmrg      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2180ab47cfaaSmrg      *GNU* | *'with BFD'*)
2181ab47cfaaSmrg	test "$with_gnu_ld" != no && break
2182ab47cfaaSmrg	;;
2183ab47cfaaSmrg      *)
2184ab47cfaaSmrg	test "$with_gnu_ld" != yes && break
2185ab47cfaaSmrg	;;
2186ab47cfaaSmrg      esac
2187ab47cfaaSmrg    fi
2188ab47cfaaSmrg  done
2189ab47cfaaSmrg  IFS="$lt_save_ifs"
2190ab47cfaaSmrgelse
2191ab47cfaaSmrg  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2192ab47cfaaSmrgfi])
2193ab47cfaaSmrgLD="$lt_cv_path_LD"
2194ab47cfaaSmrgif test -n "$LD"; then
2195ab47cfaaSmrg  AC_MSG_RESULT($LD)
2196ab47cfaaSmrgelse
2197ab47cfaaSmrg  AC_MSG_RESULT(no)
2198ab47cfaaSmrgfi
2199ab47cfaaSmrgtest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2200ab47cfaaSmrgAC_PROG_LD_GNU
2201ab47cfaaSmrg])# AC_PROG_LD
2202ab47cfaaSmrg
2203ab47cfaaSmrg
2204ab47cfaaSmrg# AC_PROG_LD_GNU
2205ab47cfaaSmrg# --------------
2206ab47cfaaSmrgAC_DEFUN([AC_PROG_LD_GNU],
2207ab47cfaaSmrg[AC_REQUIRE([AC_PROG_EGREP])dnl
2208ab47cfaaSmrgAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2209ab47cfaaSmrg[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2210ab47cfaaSmrgcase `$LD -v 2>&1 </dev/null` in
2211ab47cfaaSmrg*GNU* | *'with BFD'*)
2212ab47cfaaSmrg  lt_cv_prog_gnu_ld=yes
2213ab47cfaaSmrg  ;;
2214ab47cfaaSmrg*)
2215ab47cfaaSmrg  lt_cv_prog_gnu_ld=no
2216ab47cfaaSmrg  ;;
2217ab47cfaaSmrgesac])
2218ab47cfaaSmrgwith_gnu_ld=$lt_cv_prog_gnu_ld
2219ab47cfaaSmrg])# AC_PROG_LD_GNU
2220ab47cfaaSmrg
2221ab47cfaaSmrg
2222ab47cfaaSmrg# AC_PROG_LD_RELOAD_FLAG
2223ab47cfaaSmrg# ----------------------
2224ab47cfaaSmrg# find reload flag for linker
2225ab47cfaaSmrg#   -- PORTME Some linkers may need a different reload flag.
2226ab47cfaaSmrgAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2227ab47cfaaSmrg[AC_CACHE_CHECK([for $LD option to reload object files],
2228ab47cfaaSmrg  lt_cv_ld_reload_flag,
2229ab47cfaaSmrg  [lt_cv_ld_reload_flag='-r'])
2230ab47cfaaSmrgreload_flag=$lt_cv_ld_reload_flag
2231ab47cfaaSmrgcase $reload_flag in
2232ab47cfaaSmrg"" | " "*) ;;
2233ab47cfaaSmrg*) reload_flag=" $reload_flag" ;;
2234ab47cfaaSmrgesac
2235ab47cfaaSmrgreload_cmds='$LD$reload_flag -o $output$reload_objs'
2236ab47cfaaSmrgcase $host_os in
2237ab47cfaaSmrg  darwin*)
2238ab47cfaaSmrg    if test "$GCC" = yes; then
2239ab47cfaaSmrg      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2240ab47cfaaSmrg    else
2241ab47cfaaSmrg      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2242ab47cfaaSmrg    fi
2243ab47cfaaSmrg    ;;
2244ab47cfaaSmrgesac
2245ab47cfaaSmrg])# AC_PROG_LD_RELOAD_FLAG
2246ab47cfaaSmrg
2247ab47cfaaSmrg
2248ab47cfaaSmrg# AC_DEPLIBS_CHECK_METHOD
2249ab47cfaaSmrg# -----------------------
2250ab47cfaaSmrg# how to check for library dependencies
2251ab47cfaaSmrg#  -- PORTME fill in with the dynamic library characteristics
2252ab47cfaaSmrgAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2253ab47cfaaSmrg[AC_CACHE_CHECK([how to recognise dependent libraries],
2254ab47cfaaSmrglt_cv_deplibs_check_method,
2255ab47cfaaSmrg[lt_cv_file_magic_cmd='$MAGIC_CMD'
2256ab47cfaaSmrglt_cv_file_magic_test_file=
2257ab47cfaaSmrglt_cv_deplibs_check_method='unknown'
2258ab47cfaaSmrg# Need to set the preceding variable on all platforms that support
2259ab47cfaaSmrg# interlibrary dependencies.
2260ab47cfaaSmrg# 'none' -- dependencies not supported.
2261ab47cfaaSmrg# `unknown' -- same as none, but documents that we really don't know.
2262ab47cfaaSmrg# 'pass_all' -- all dependencies passed with no checks.
2263ab47cfaaSmrg# 'test_compile' -- check by making test program.
2264ab47cfaaSmrg# 'file_magic [[regex]]' -- check by looking for files in library path
2265ab47cfaaSmrg# which responds to the $file_magic_cmd with a given extended regex.
2266ab47cfaaSmrg# If you have `file' or equivalent on your system and you're not sure
2267ab47cfaaSmrg# whether `pass_all' will *always* work, you probably want this one.
2268ab47cfaaSmrg
2269ab47cfaaSmrgcase $host_os in
2270ab47cfaaSmrgaix4* | aix5*)
2271ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2272ab47cfaaSmrg  ;;
2273ab47cfaaSmrg
2274ab47cfaaSmrgbeos*)
2275ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2276ab47cfaaSmrg  ;;
2277ab47cfaaSmrg
2278ab47cfaaSmrgbsdi[[45]]*)
2279ab47cfaaSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2280ab47cfaaSmrg  lt_cv_file_magic_cmd='/usr/bin/file -L'
2281ab47cfaaSmrg  lt_cv_file_magic_test_file=/shlib/libc.so
2282ab47cfaaSmrg  ;;
2283ab47cfaaSmrg
2284ab47cfaaSmrgcygwin*)
2285ab47cfaaSmrg  # func_win32_libid is a shell function defined in ltmain.sh
2286ab47cfaaSmrg  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2287ab47cfaaSmrg  lt_cv_file_magic_cmd='func_win32_libid'
2288ab47cfaaSmrg  ;;
2289ab47cfaaSmrg
2290ab47cfaaSmrgmingw* | pw32*)
2291ab47cfaaSmrg  # Base MSYS/MinGW do not provide the 'file' command needed by
2292ab47cfaaSmrg  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2293ab47cfaaSmrg  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2294ab47cfaaSmrg  lt_cv_file_magic_cmd='$OBJDUMP -f'
2295ab47cfaaSmrg  ;;
2296ab47cfaaSmrg
2297ab47cfaaSmrgdarwin* | rhapsody*)
2298ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2299ab47cfaaSmrg  ;;
2300ab47cfaaSmrg
2301ab47cfaaSmrgfreebsd* | dragonfly*)
2302ab47cfaaSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2303ab47cfaaSmrg    case $host_cpu in
2304ab47cfaaSmrg    i*86 )
2305ab47cfaaSmrg      # Not sure whether the presence of OpenBSD here was a mistake.
2306ab47cfaaSmrg      # Let's accept both of them until this is cleared up.
2307ab47cfaaSmrg      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2308ab47cfaaSmrg      lt_cv_file_magic_cmd=/usr/bin/file
2309ab47cfaaSmrg      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2310ab47cfaaSmrg      ;;
2311ab47cfaaSmrg    esac
2312ab47cfaaSmrg  else
2313ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2314ab47cfaaSmrg  fi
2315ab47cfaaSmrg  ;;
2316ab47cfaaSmrg
2317ab47cfaaSmrggnu*)
2318ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2319ab47cfaaSmrg  ;;
2320ab47cfaaSmrg
2321ab47cfaaSmrghpux10.20* | hpux11*)
2322ab47cfaaSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2323ab47cfaaSmrg  case $host_cpu in
2324ab47cfaaSmrg  ia64*)
2325ab47cfaaSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2326ab47cfaaSmrg    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2327ab47cfaaSmrg    ;;
2328ab47cfaaSmrg  hppa*64*)
2329ab47cfaaSmrg    [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]']
2330ab47cfaaSmrg    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2331ab47cfaaSmrg    ;;
2332ab47cfaaSmrg  *)
2333ab47cfaaSmrg    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2334ab47cfaaSmrg    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2335ab47cfaaSmrg    ;;
2336ab47cfaaSmrg  esac
2337ab47cfaaSmrg  ;;
2338ab47cfaaSmrg
2339ab47cfaaSmrginterix3*)
2340ab47cfaaSmrg  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2341ab47cfaaSmrg  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2342ab47cfaaSmrg  ;;
2343ab47cfaaSmrg
2344ab47cfaaSmrgirix5* | irix6* | nonstopux*)
2345ab47cfaaSmrg  case $LD in
2346ab47cfaaSmrg  *-32|*"-32 ") libmagic=32-bit;;
2347ab47cfaaSmrg  *-n32|*"-n32 ") libmagic=N32;;
2348ab47cfaaSmrg  *-64|*"-64 ") libmagic=64-bit;;
2349ab47cfaaSmrg  *) libmagic=never-match;;
2350ab47cfaaSmrg  esac
2351ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2352ab47cfaaSmrg  ;;
2353ab47cfaaSmrg
2354ab47cfaaSmrg# This must be Linux ELF.
2355ab47cfaaSmrglinux* | k*bsd*-gnu)
2356ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2357ab47cfaaSmrg  ;;
2358ab47cfaaSmrg
2359ab47cfaaSmrgnetbsd* | netbsdelf*-gnu)
2360ab47cfaaSmrg  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2361ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2362ab47cfaaSmrg  else
2363ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2364ab47cfaaSmrg  fi
2365ab47cfaaSmrg  ;;
2366ab47cfaaSmrg
2367ab47cfaaSmrgnewos6*)
2368ab47cfaaSmrg  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2369ab47cfaaSmrg  lt_cv_file_magic_cmd=/usr/bin/file
2370ab47cfaaSmrg  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2371ab47cfaaSmrg  ;;
2372ab47cfaaSmrg
2373ab47cfaaSmrgnto-qnx*)
2374ab47cfaaSmrg  lt_cv_deplibs_check_method=unknown
2375ab47cfaaSmrg  ;;
2376ab47cfaaSmrg
2377ab47cfaaSmrgopenbsd*)
2378ab47cfaaSmrg  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2379ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2380ab47cfaaSmrg  else
2381ab47cfaaSmrg    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2382ab47cfaaSmrg  fi
2383ab47cfaaSmrg  ;;
2384ab47cfaaSmrg
2385ab47cfaaSmrgosf3* | osf4* | osf5*)
2386ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2387ab47cfaaSmrg  ;;
2388ab47cfaaSmrg
2389ab47cfaaSmrgsolaris*)
2390ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2391ab47cfaaSmrg  ;;
2392ab47cfaaSmrg
2393ab47cfaaSmrgsysv4 | sysv4.3*)
2394ab47cfaaSmrg  case $host_vendor in
2395ab47cfaaSmrg  motorola)
2396ab47cfaaSmrg    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]]'
2397ab47cfaaSmrg    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2398ab47cfaaSmrg    ;;
2399ab47cfaaSmrg  ncr)
2400ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2401ab47cfaaSmrg    ;;
2402ab47cfaaSmrg  sequent)
2403ab47cfaaSmrg    lt_cv_file_magic_cmd='/bin/file'
2404ab47cfaaSmrg    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2405ab47cfaaSmrg    ;;
2406ab47cfaaSmrg  sni)
2407ab47cfaaSmrg    lt_cv_file_magic_cmd='/bin/file'
2408ab47cfaaSmrg    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2409ab47cfaaSmrg    lt_cv_file_magic_test_file=/lib/libc.so
2410ab47cfaaSmrg    ;;
2411ab47cfaaSmrg  siemens)
2412ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2413ab47cfaaSmrg    ;;
2414ab47cfaaSmrg  pc)
2415ab47cfaaSmrg    lt_cv_deplibs_check_method=pass_all
2416ab47cfaaSmrg    ;;
2417ab47cfaaSmrg  esac
2418ab47cfaaSmrg  ;;
2419ab47cfaaSmrg
2420ab47cfaaSmrgsysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2421ab47cfaaSmrg  lt_cv_deplibs_check_method=pass_all
2422ab47cfaaSmrg  ;;
2423ab47cfaaSmrgesac
2424ab47cfaaSmrg])
2425ab47cfaaSmrgfile_magic_cmd=$lt_cv_file_magic_cmd
2426ab47cfaaSmrgdeplibs_check_method=$lt_cv_deplibs_check_method
2427ab47cfaaSmrgtest -z "$deplibs_check_method" && deplibs_check_method=unknown
2428ab47cfaaSmrg])# AC_DEPLIBS_CHECK_METHOD
2429ab47cfaaSmrg
2430ab47cfaaSmrg
2431ab47cfaaSmrg# AC_PROG_NM
2432ab47cfaaSmrg# ----------
2433ab47cfaaSmrg# find the pathname to a BSD-compatible name lister
2434ab47cfaaSmrgAC_DEFUN([AC_PROG_NM],
2435ab47cfaaSmrg[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2436ab47cfaaSmrg[if test -n "$NM"; then
2437ab47cfaaSmrg  # Let the user override the test.
2438ab47cfaaSmrg  lt_cv_path_NM="$NM"
2439ab47cfaaSmrgelse
2440ab47cfaaSmrg  lt_nm_to_check="${ac_tool_prefix}nm"
2441ab47cfaaSmrg  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
2442ab47cfaaSmrg    lt_nm_to_check="$lt_nm_to_check nm"
2443ab47cfaaSmrg  fi
2444ab47cfaaSmrg  for lt_tmp_nm in $lt_nm_to_check; do
2445ab47cfaaSmrg    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2446ab47cfaaSmrg    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2447ab47cfaaSmrg      IFS="$lt_save_ifs"
2448ab47cfaaSmrg      test -z "$ac_dir" && ac_dir=.
2449ab47cfaaSmrg      tmp_nm="$ac_dir/$lt_tmp_nm"
2450ab47cfaaSmrg      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2451ab47cfaaSmrg	# Check to see if the nm accepts a BSD-compat flag.
2452ab47cfaaSmrg	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2453ab47cfaaSmrg	#   nm: unknown option "B" ignored
2454ab47cfaaSmrg	# Tru64's nm complains that /dev/null is an invalid object file
2455ab47cfaaSmrg	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2456ab47cfaaSmrg	*/dev/null* | *'Invalid file or object type'*)
2457ab47cfaaSmrg	  lt_cv_path_NM="$tmp_nm -B"
2458ab47cfaaSmrg	  break
2459ab47cfaaSmrg	  ;;
2460ab47cfaaSmrg	*)
2461ab47cfaaSmrg	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2462ab47cfaaSmrg	  */dev/null*)
2463ab47cfaaSmrg	    lt_cv_path_NM="$tmp_nm -p"
2464ab47cfaaSmrg	    break
2465ab47cfaaSmrg	    ;;
2466ab47cfaaSmrg	  *)
2467ab47cfaaSmrg	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2468ab47cfaaSmrg	    continue # so that we can try to find one that supports BSD flags
2469ab47cfaaSmrg	    ;;
2470ab47cfaaSmrg	  esac
2471ab47cfaaSmrg	  ;;
2472ab47cfaaSmrg	esac
2473ab47cfaaSmrg      fi
2474ab47cfaaSmrg    done
2475ab47cfaaSmrg    IFS="$lt_save_ifs"
2476ab47cfaaSmrg  done
2477ab47cfaaSmrg  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2478ab47cfaaSmrgfi])
2479ab47cfaaSmrgNM="$lt_cv_path_NM"
2480ab47cfaaSmrg])# AC_PROG_NM
2481ab47cfaaSmrg
2482ab47cfaaSmrg
2483ab47cfaaSmrg# AC_CHECK_LIBM
2484ab47cfaaSmrg# -------------
2485ab47cfaaSmrg# check for math library
2486ab47cfaaSmrgAC_DEFUN([AC_CHECK_LIBM],
2487ab47cfaaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2488ab47cfaaSmrgLIBM=
2489ab47cfaaSmrgcase $host in
2490ab47cfaaSmrg*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2491ab47cfaaSmrg  # These system don't have libm, or don't need it
2492ab47cfaaSmrg  ;;
2493ab47cfaaSmrg*-ncr-sysv4.3*)
2494ab47cfaaSmrg  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2495ab47cfaaSmrg  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2496ab47cfaaSmrg  ;;
2497ab47cfaaSmrg*)
2498ab47cfaaSmrg  AC_CHECK_LIB(m, cos, LIBM="-lm")
2499ab47cfaaSmrg  ;;
2500ab47cfaaSmrgesac
2501ab47cfaaSmrg])# AC_CHECK_LIBM
2502ab47cfaaSmrg
2503ab47cfaaSmrg
2504ab47cfaaSmrg# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2505ab47cfaaSmrg# -----------------------------------
2506ab47cfaaSmrg# sets LIBLTDL to the link flags for the libltdl convenience library and
2507ab47cfaaSmrg# LTDLINCL to the include flags for the libltdl header and adds
2508ab47cfaaSmrg# --enable-ltdl-convenience to the configure arguments.  Note that
2509ab47cfaaSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2510ab47cfaaSmrg# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2511ab47cfaaSmrg# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2512ab47cfaaSmrg# (note the single quotes!).  If your package is not flat and you're not
2513ab47cfaaSmrg# using automake, define top_builddir and top_srcdir appropriately in
2514ab47cfaaSmrg# the Makefiles.
2515ab47cfaaSmrgAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2516ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2517ab47cfaaSmrg  case $enable_ltdl_convenience in
2518ab47cfaaSmrg  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2519ab47cfaaSmrg  "") enable_ltdl_convenience=yes
2520ab47cfaaSmrg      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2521ab47cfaaSmrg  esac
2522ab47cfaaSmrg  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2523ab47cfaaSmrg  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2524ab47cfaaSmrg  # For backwards non-gettext consistent compatibility...
2525ab47cfaaSmrg  INCLTDL="$LTDLINCL"
2526ab47cfaaSmrg])# AC_LIBLTDL_CONVENIENCE
2527ab47cfaaSmrg
2528ab47cfaaSmrg
2529ab47cfaaSmrg# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2530ab47cfaaSmrg# -----------------------------------
2531ab47cfaaSmrg# sets LIBLTDL to the link flags for the libltdl installable library and
2532ab47cfaaSmrg# LTDLINCL to the include flags for the libltdl header and adds
2533ab47cfaaSmrg# --enable-ltdl-install to the configure arguments.  Note that
2534ab47cfaaSmrg# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2535ab47cfaaSmrg# and an installed libltdl is not found, it is assumed to be `libltdl'.
2536ab47cfaaSmrg# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2537ab47cfaaSmrg# '${top_srcdir}/' (note the single quotes!).  If your package is not
2538ab47cfaaSmrg# flat and you're not using automake, define top_builddir and top_srcdir
2539ab47cfaaSmrg# appropriately in the Makefiles.
2540ab47cfaaSmrg# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2541ab47cfaaSmrgAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2542ab47cfaaSmrg[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2543ab47cfaaSmrg  AC_CHECK_LIB(ltdl, lt_dlinit,
2544ab47cfaaSmrg  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2545ab47cfaaSmrg  [if test x"$enable_ltdl_install" = xno; then
2546ab47cfaaSmrg     AC_MSG_WARN([libltdl not installed, but installation disabled])
2547ab47cfaaSmrg   else
2548ab47cfaaSmrg     enable_ltdl_install=yes
2549ab47cfaaSmrg   fi
2550ab47cfaaSmrg  ])
2551ab47cfaaSmrg  if test x"$enable_ltdl_install" = x"yes"; then
2552ab47cfaaSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2553ab47cfaaSmrg    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2554ab47cfaaSmrg    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2555ab47cfaaSmrg  else
2556ab47cfaaSmrg    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2557ab47cfaaSmrg    LIBLTDL="-lltdl"
2558ab47cfaaSmrg    LTDLINCL=
2559ab47cfaaSmrg  fi
2560ab47cfaaSmrg  # For backwards non-gettext consistent compatibility...
2561ab47cfaaSmrg  INCLTDL="$LTDLINCL"
2562ab47cfaaSmrg])# AC_LIBLTDL_INSTALLABLE
2563ab47cfaaSmrg
2564ab47cfaaSmrg
2565ab47cfaaSmrg# AC_LIBTOOL_CXX
2566ab47cfaaSmrg# --------------
2567ab47cfaaSmrg# enable support for C++ libraries
2568ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_CXX],
2569ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LANG_CXX])
2570ab47cfaaSmrg])# AC_LIBTOOL_CXX
2571ab47cfaaSmrg
2572ab47cfaaSmrg
2573ab47cfaaSmrg# _LT_AC_LANG_CXX
2574ab47cfaaSmrg# ---------------
2575ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_CXX],
2576ab47cfaaSmrg[AC_REQUIRE([AC_PROG_CXX])
2577ab47cfaaSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2578ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2579ab47cfaaSmrg])# _LT_AC_LANG_CXX
2580ab47cfaaSmrg
2581ab47cfaaSmrg# _LT_AC_PROG_CXXCPP
2582ab47cfaaSmrg# ------------------
2583ab47cfaaSmrgAC_DEFUN([_LT_AC_PROG_CXXCPP],
2584ab47cfaaSmrg[
2585ab47cfaaSmrgAC_REQUIRE([AC_PROG_CXX])
2586ab47cfaaSmrgif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2587ab47cfaaSmrg    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2588ab47cfaaSmrg    (test "X$CXX" != "Xg++"))) ; then
2589ab47cfaaSmrg  AC_PROG_CXXCPP
2590ab47cfaaSmrgfi
2591ab47cfaaSmrg])# _LT_AC_PROG_CXXCPP
2592ab47cfaaSmrg
2593ab47cfaaSmrg# AC_LIBTOOL_F77
2594ab47cfaaSmrg# --------------
2595ab47cfaaSmrg# enable support for Fortran 77 libraries
2596ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_F77],
2597ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LANG_F77])
2598ab47cfaaSmrg])# AC_LIBTOOL_F77
2599ab47cfaaSmrg
2600ab47cfaaSmrg
2601ab47cfaaSmrg# _LT_AC_LANG_F77
2602ab47cfaaSmrg# ---------------
2603ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_F77],
2604ab47cfaaSmrg[AC_REQUIRE([AC_PROG_F77])
2605ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2606ab47cfaaSmrg])# _LT_AC_LANG_F77
2607ab47cfaaSmrg
2608ab47cfaaSmrg
2609ab47cfaaSmrg# AC_LIBTOOL_GCJ
2610ab47cfaaSmrg# --------------
2611ab47cfaaSmrg# enable support for GCJ libraries
2612ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_GCJ],
2613ab47cfaaSmrg[AC_REQUIRE([_LT_AC_LANG_GCJ])
2614ab47cfaaSmrg])# AC_LIBTOOL_GCJ
2615ab47cfaaSmrg
2616ab47cfaaSmrg
2617ab47cfaaSmrg# _LT_AC_LANG_GCJ
2618ab47cfaaSmrg# ---------------
2619ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_GCJ],
2620ab47cfaaSmrg[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2621ab47cfaaSmrg  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2622ab47cfaaSmrg    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2623ab47cfaaSmrg      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2624ab47cfaaSmrg	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2625ab47cfaaSmrg	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2626ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2627ab47cfaaSmrg])# _LT_AC_LANG_GCJ
2628ab47cfaaSmrg
2629ab47cfaaSmrg
2630ab47cfaaSmrg# AC_LIBTOOL_RC
2631ab47cfaaSmrg# -------------
2632ab47cfaaSmrg# enable support for Windows resource files
2633ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_RC],
2634ab47cfaaSmrg[AC_REQUIRE([LT_AC_PROG_RC])
2635ab47cfaaSmrg_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2636ab47cfaaSmrg])# AC_LIBTOOL_RC
2637ab47cfaaSmrg
2638ab47cfaaSmrg
2639ab47cfaaSmrg# AC_LIBTOOL_LANG_C_CONFIG
2640ab47cfaaSmrg# ------------------------
2641ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
2642ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
2643ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2644ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2645ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2646ab47cfaaSmrg[lt_save_CC="$CC"
2647ab47cfaaSmrgAC_LANG_PUSH(C)
2648ab47cfaaSmrg
2649ab47cfaaSmrg# Source file extension for C test sources.
2650ab47cfaaSmrgac_ext=c
2651ab47cfaaSmrg
2652ab47cfaaSmrg# Object file extension for compiled C test sources.
2653ab47cfaaSmrgobjext=o
2654ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2655ab47cfaaSmrg
2656ab47cfaaSmrg# Code to be used in simple compile tests
2657ab47cfaaSmrglt_simple_compile_test_code="int some_variable = 0;\n"
2658ab47cfaaSmrg
2659ab47cfaaSmrg# Code to be used in simple link tests
2660ab47cfaaSmrglt_simple_link_test_code='int main(){return(0);}\n'
2661ab47cfaaSmrg
2662ab47cfaaSmrg_LT_AC_SYS_COMPILER
2663ab47cfaaSmrg
2664ab47cfaaSmrg# save warnings/boilerplate of simple test code
2665ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
2666ab47cfaaSmrg_LT_LINKER_BOILERPLATE
2667ab47cfaaSmrg
2668ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2669ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
2670ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
2671ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2672ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
2673ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2674ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2675ab47cfaaSmrgAC_LIBTOOL_SYS_LIB_STRIP
2676ab47cfaaSmrgAC_LIBTOOL_DLOPEN_SELF
2677ab47cfaaSmrg
2678ab47cfaaSmrg# Report which library types will actually be built
2679ab47cfaaSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
2680ab47cfaaSmrgAC_MSG_RESULT([$can_build_shared])
2681ab47cfaaSmrg
2682ab47cfaaSmrgAC_MSG_CHECKING([whether to build shared libraries])
2683ab47cfaaSmrgtest "$can_build_shared" = "no" && enable_shared=no
2684ab47cfaaSmrg
2685ab47cfaaSmrg# On AIX, shared libraries and static libraries use the same namespace, and
2686ab47cfaaSmrg# are all built from PIC.
2687ab47cfaaSmrgcase $host_os in
2688ab47cfaaSmrgaix3*)
2689ab47cfaaSmrg  test "$enable_shared" = yes && enable_static=no
2690ab47cfaaSmrg  if test -n "$RANLIB"; then
2691ab47cfaaSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2692ab47cfaaSmrg    postinstall_cmds='$RANLIB $lib'
2693ab47cfaaSmrg  fi
2694ab47cfaaSmrg  ;;
2695ab47cfaaSmrg
2696ab47cfaaSmrgaix4* | aix5*)
2697ab47cfaaSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2698ab47cfaaSmrg    test "$enable_shared" = yes && enable_static=no
2699ab47cfaaSmrg  fi
2700ab47cfaaSmrg    ;;
2701ab47cfaaSmrgesac
2702ab47cfaaSmrgAC_MSG_RESULT([$enable_shared])
2703ab47cfaaSmrg
2704ab47cfaaSmrgAC_MSG_CHECKING([whether to build static libraries])
2705ab47cfaaSmrg# Make sure either enable_shared or enable_static is yes.
2706ab47cfaaSmrgtest "$enable_shared" = yes || enable_static=yes
2707ab47cfaaSmrgAC_MSG_RESULT([$enable_static])
2708ab47cfaaSmrg
2709ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
2710ab47cfaaSmrg
2711ab47cfaaSmrgAC_LANG_POP
2712ab47cfaaSmrgCC="$lt_save_CC"
2713ab47cfaaSmrg])# AC_LIBTOOL_LANG_C_CONFIG
2714ab47cfaaSmrg
2715ab47cfaaSmrg
2716ab47cfaaSmrg# AC_LIBTOOL_LANG_CXX_CONFIG
2717ab47cfaaSmrg# --------------------------
2718ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
2719ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
2720ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2721ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2722ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2723ab47cfaaSmrg[AC_LANG_PUSH(C++)
2724ab47cfaaSmrgAC_REQUIRE([AC_PROG_CXX])
2725ab47cfaaSmrgAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2726ab47cfaaSmrg
2727ab47cfaaSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2728ab47cfaaSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2729ab47cfaaSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
2730ab47cfaaSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2731ab47cfaaSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2732ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
2733ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2734ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2735ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2736ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2737ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2738ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2739ab47cfaaSmrg_LT_AC_TAGVAR(module_cmds, $1)=
2740ab47cfaaSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2741ab47cfaaSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2742ab47cfaaSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2743ab47cfaaSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
2744ab47cfaaSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2745ab47cfaaSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2746ab47cfaaSmrg
2747ab47cfaaSmrg# Dependencies to place before and after the object being linked:
2748ab47cfaaSmrg_LT_AC_TAGVAR(predep_objects, $1)=
2749ab47cfaaSmrg_LT_AC_TAGVAR(postdep_objects, $1)=
2750ab47cfaaSmrg_LT_AC_TAGVAR(predeps, $1)=
2751ab47cfaaSmrg_LT_AC_TAGVAR(postdeps, $1)=
2752ab47cfaaSmrg_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2753ab47cfaaSmrg
2754ab47cfaaSmrg# Source file extension for C++ test sources.
2755ab47cfaaSmrgac_ext=cpp
2756ab47cfaaSmrg
2757ab47cfaaSmrg# Object file extension for compiled C++ test sources.
2758ab47cfaaSmrgobjext=o
2759ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
2760ab47cfaaSmrg
2761ab47cfaaSmrg# Code to be used in simple compile tests
2762ab47cfaaSmrglt_simple_compile_test_code="int some_variable = 0;\n"
2763ab47cfaaSmrg
2764ab47cfaaSmrg# Code to be used in simple link tests
2765ab47cfaaSmrglt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2766ab47cfaaSmrg
2767ab47cfaaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2768ab47cfaaSmrg_LT_AC_SYS_COMPILER
2769ab47cfaaSmrg
2770ab47cfaaSmrg# save warnings/boilerplate of simple test code
2771ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
2772ab47cfaaSmrg_LT_LINKER_BOILERPLATE
2773ab47cfaaSmrg
2774ab47cfaaSmrg# Allow CC to be a program name with arguments.
2775ab47cfaaSmrglt_save_CC=$CC
2776ab47cfaaSmrglt_save_LD=$LD
2777ab47cfaaSmrglt_save_GCC=$GCC
2778ab47cfaaSmrgGCC=$GXX
2779ab47cfaaSmrglt_save_with_gnu_ld=$with_gnu_ld
2780ab47cfaaSmrglt_save_path_LD=$lt_cv_path_LD
2781ab47cfaaSmrgif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2782ab47cfaaSmrg  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2783ab47cfaaSmrgelse
2784ab47cfaaSmrg  $as_unset lt_cv_prog_gnu_ld
2785ab47cfaaSmrgfi
2786ab47cfaaSmrgif test -n "${lt_cv_path_LDCXX+set}"; then
2787ab47cfaaSmrg  lt_cv_path_LD=$lt_cv_path_LDCXX
2788ab47cfaaSmrgelse
2789ab47cfaaSmrg  $as_unset lt_cv_path_LD
2790ab47cfaaSmrgfi
2791ab47cfaaSmrgtest -z "${LDCXX+set}" || LD=$LDCXX
2792ab47cfaaSmrgCC=${CXX-"c++"}
2793ab47cfaaSmrgcompiler=$CC
2794ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
2795ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
2796ab47cfaaSmrg
2797ab47cfaaSmrg# We don't want -fno-exception wen compiling C++ code, so set the
2798ab47cfaaSmrg# no_builtin_flag separately
2799ab47cfaaSmrgif test "$GXX" = yes; then
2800ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2801ab47cfaaSmrgelse
2802ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2803ab47cfaaSmrgfi
2804ab47cfaaSmrg
2805ab47cfaaSmrgif test "$GXX" = yes; then
2806ab47cfaaSmrg  # Set up default GNU C++ configuration
2807ab47cfaaSmrg
2808ab47cfaaSmrg  AC_PROG_LD
2809ab47cfaaSmrg
2810ab47cfaaSmrg  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2811ab47cfaaSmrg  # archiving commands below assume that GNU ld is being used.
2812ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
2813ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2814ab47cfaaSmrg    _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'
2815ab47cfaaSmrg
2816ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2817ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2818ab47cfaaSmrg
2819ab47cfaaSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
2820ab47cfaaSmrg    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2821ab47cfaaSmrg    #     investigate it a little bit more. (MM)
2822ab47cfaaSmrg    wlarc='${wl}'
2823ab47cfaaSmrg
2824ab47cfaaSmrg    # ancient GNU ld didn't support --whole-archive et. al.
2825ab47cfaaSmrg    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2826ab47cfaaSmrg	grep 'no-whole-archive' > /dev/null; then
2827ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2828ab47cfaaSmrg    else
2829ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2830ab47cfaaSmrg    fi
2831ab47cfaaSmrg  else
2832ab47cfaaSmrg    with_gnu_ld=no
2833ab47cfaaSmrg    wlarc=
2834ab47cfaaSmrg
2835ab47cfaaSmrg    # A generic and very simple default shared library creation
2836ab47cfaaSmrg    # command for GNU C++ for the case where it uses the native
2837ab47cfaaSmrg    # linker, instead of GNU ld.  If possible, this setting should
2838ab47cfaaSmrg    # overridden to take advantage of the native linker features on
2839ab47cfaaSmrg    # the platform it is being used on.
2840ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2841ab47cfaaSmrg  fi
2842ab47cfaaSmrg
2843ab47cfaaSmrg  # Commands to make compiler produce verbose output that lists
2844ab47cfaaSmrg  # what "hidden" libraries, object files and flags are used when
2845ab47cfaaSmrg  # linking a shared library.
2846ab47cfaaSmrg  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2847ab47cfaaSmrg
2848ab47cfaaSmrgelse
2849ab47cfaaSmrg  GXX=no
2850ab47cfaaSmrg  with_gnu_ld=no
2851ab47cfaaSmrg  wlarc=
2852ab47cfaaSmrgfi
2853ab47cfaaSmrg
2854ab47cfaaSmrg# PORTME: fill in a description of your system's C++ link characteristics
2855ab47cfaaSmrgAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2856ab47cfaaSmrg_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2857ab47cfaaSmrgcase $host_os in
2858ab47cfaaSmrg  aix3*)
2859ab47cfaaSmrg    # FIXME: insert proper C++ library support
2860ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2861ab47cfaaSmrg    ;;
2862ab47cfaaSmrg  aix4* | aix5*)
2863ab47cfaaSmrg    if test "$host_cpu" = ia64; then
2864ab47cfaaSmrg      # On IA64, the linker does run time linking by default, so we don't
2865ab47cfaaSmrg      # have to do anything special.
2866ab47cfaaSmrg      aix_use_runtimelinking=no
2867ab47cfaaSmrg      exp_sym_flag='-Bexport'
2868ab47cfaaSmrg      no_entry_flag=""
2869ab47cfaaSmrg    else
2870ab47cfaaSmrg      aix_use_runtimelinking=no
2871ab47cfaaSmrg
2872ab47cfaaSmrg      # Test if we are trying to use run time linking or normal
2873ab47cfaaSmrg      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2874ab47cfaaSmrg      # need to do runtime linking.
2875ab47cfaaSmrg      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2876ab47cfaaSmrg	for ld_flag in $LDFLAGS; do
2877ab47cfaaSmrg	  case $ld_flag in
2878ab47cfaaSmrg	  *-brtl*)
2879ab47cfaaSmrg	    aix_use_runtimelinking=yes
2880ab47cfaaSmrg	    break
2881ab47cfaaSmrg	    ;;
2882ab47cfaaSmrg	  esac
2883ab47cfaaSmrg	done
2884ab47cfaaSmrg	;;
2885ab47cfaaSmrg      esac
2886ab47cfaaSmrg
2887ab47cfaaSmrg      exp_sym_flag='-bexport'
2888ab47cfaaSmrg      no_entry_flag='-bnoentry'
2889ab47cfaaSmrg    fi
2890ab47cfaaSmrg
2891ab47cfaaSmrg    # When large executables or shared objects are built, AIX ld can
2892ab47cfaaSmrg    # have problems creating the table of contents.  If linking a library
2893ab47cfaaSmrg    # or program results in "error TOC overflow" add -mminimal-toc to
2894ab47cfaaSmrg    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2895ab47cfaaSmrg    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2896ab47cfaaSmrg
2897ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1)=''
2898ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2899ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2900ab47cfaaSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2901ab47cfaaSmrg
2902ab47cfaaSmrg    if test "$GXX" = yes; then
2903ab47cfaaSmrg      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2904ab47cfaaSmrg      # We only want to do this on AIX 4.2 and lower, the check
2905ab47cfaaSmrg      # below for broken collect2 doesn't work under 4.3+
2906ab47cfaaSmrg	collect2name=`${CC} -print-prog-name=collect2`
2907ab47cfaaSmrg	if test -f "$collect2name" && \
2908ab47cfaaSmrg	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2909ab47cfaaSmrg	then
2910ab47cfaaSmrg	  # We have reworked collect2
2911ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2912ab47cfaaSmrg	else
2913ab47cfaaSmrg	  # We have old collect2
2914ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2915ab47cfaaSmrg	  # It fails to find uninstalled libraries when the uninstalled
2916ab47cfaaSmrg	  # path is not listed in the libpath.  Setting hardcode_minus_L
2917ab47cfaaSmrg	  # to unsupported forces relinking
2918ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2919ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2920ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2921ab47cfaaSmrg	fi
2922ab47cfaaSmrg	;;
2923ab47cfaaSmrg      esac
2924ab47cfaaSmrg      shared_flag='-shared'
2925ab47cfaaSmrg      if test "$aix_use_runtimelinking" = yes; then
2926ab47cfaaSmrg	shared_flag="$shared_flag "'${wl}-G'
2927ab47cfaaSmrg      fi
2928ab47cfaaSmrg    else
2929ab47cfaaSmrg      # not using gcc
2930ab47cfaaSmrg      if test "$host_cpu" = ia64; then
2931ab47cfaaSmrg	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2932ab47cfaaSmrg	# chokes on -Wl,-G. The following line is correct:
2933ab47cfaaSmrg	shared_flag='-G'
2934ab47cfaaSmrg      else
2935ab47cfaaSmrg	if test "$aix_use_runtimelinking" = yes; then
2936ab47cfaaSmrg	  shared_flag='${wl}-G'
2937ab47cfaaSmrg	else
2938ab47cfaaSmrg	  shared_flag='${wl}-bM:SRE'
2939ab47cfaaSmrg	fi
2940ab47cfaaSmrg      fi
2941ab47cfaaSmrg    fi
2942ab47cfaaSmrg
2943ab47cfaaSmrg    # It seems that -bexpall does not export symbols beginning with
2944ab47cfaaSmrg    # underscore (_), so it is better to generate a list of symbols to export.
2945ab47cfaaSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2946ab47cfaaSmrg    if test "$aix_use_runtimelinking" = yes; then
2947ab47cfaaSmrg      # Warning - without using the other runtime loading flags (-brtl),
2948ab47cfaaSmrg      # -berok will link without error, but may produce a broken library.
2949ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2950ab47cfaaSmrg      # Determine the default libpath from the value encoded in an empty executable.
2951ab47cfaaSmrg      _LT_AC_SYS_LIBPATH_AIX
2952ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2953ab47cfaaSmrg
2954ab47cfaaSmrg      _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"
2955ab47cfaaSmrg     else
2956ab47cfaaSmrg      if test "$host_cpu" = ia64; then
2957ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2958ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2959ab47cfaaSmrg	_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"
2960ab47cfaaSmrg      else
2961ab47cfaaSmrg	# Determine the default libpath from the value encoded in an empty executable.
2962ab47cfaaSmrg	_LT_AC_SYS_LIBPATH_AIX
2963ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2964ab47cfaaSmrg	# Warning - without using the other run time loading flags,
2965ab47cfaaSmrg	# -berok will link without error, but may produce a broken library.
2966ab47cfaaSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2967ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2968ab47cfaaSmrg	# Exported symbols can be pulled into shared objects from archives
2969ab47cfaaSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2970ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2971ab47cfaaSmrg	# This is similar to how AIX traditionally builds its shared libraries.
2972ab47cfaaSmrg	_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'
2973ab47cfaaSmrg      fi
2974ab47cfaaSmrg    fi
2975ab47cfaaSmrg    ;;
2976ab47cfaaSmrg
2977ab47cfaaSmrg  beos*)
2978ab47cfaaSmrg    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
2979ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2980ab47cfaaSmrg      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2981ab47cfaaSmrg      # support --undefined.  This deserves some investigation.  FIXME
2982ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2983ab47cfaaSmrg    else
2984ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2985ab47cfaaSmrg    fi
2986ab47cfaaSmrg    ;;
2987ab47cfaaSmrg
2988ab47cfaaSmrg  chorus*)
2989ab47cfaaSmrg    case $cc_basename in
2990ab47cfaaSmrg      *)
2991ab47cfaaSmrg	# FIXME: insert proper C++ library support
2992ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
2993ab47cfaaSmrg	;;
2994ab47cfaaSmrg    esac
2995ab47cfaaSmrg    ;;
2996ab47cfaaSmrg
2997ab47cfaaSmrg  cygwin* | mingw* | pw32*)
2998ab47cfaaSmrg    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
2999ab47cfaaSmrg    # as there is no search path for DLLs.
3000ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3001ab47cfaaSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3002ab47cfaaSmrg    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3003ab47cfaaSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3004ab47cfaaSmrg
3005ab47cfaaSmrg    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3006ab47cfaaSmrg      _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'
3007ab47cfaaSmrg      # If the export-symbols file already is a .def file (1st line
3008ab47cfaaSmrg      # is EXPORTS), use it as is; otherwise, prepend...
3009ab47cfaaSmrg      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3010ab47cfaaSmrg	cp $export_symbols $output_objdir/$soname.def;
3011ab47cfaaSmrg      else
3012ab47cfaaSmrg	echo EXPORTS > $output_objdir/$soname.def;
3013ab47cfaaSmrg	cat $export_symbols >> $output_objdir/$soname.def;
3014ab47cfaaSmrg      fi~
3015ab47cfaaSmrg      $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'
3016ab47cfaaSmrg    else
3017ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3018ab47cfaaSmrg    fi
3019ab47cfaaSmrg  ;;
3020ab47cfaaSmrg      darwin* | rhapsody*)
3021ab47cfaaSmrg        case $host_os in
3022ab47cfaaSmrg        rhapsody* | darwin1.[[012]])
3023ab47cfaaSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3024ab47cfaaSmrg         ;;
3025ab47cfaaSmrg       *) # Darwin 1.3 on
3026ab47cfaaSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3027ab47cfaaSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3028ab47cfaaSmrg         else
3029ab47cfaaSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
3030ab47cfaaSmrg             10.[[012]])
3031ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3032ab47cfaaSmrg               ;;
3033ab47cfaaSmrg             10.*)
3034ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3035ab47cfaaSmrg               ;;
3036ab47cfaaSmrg           esac
3037ab47cfaaSmrg         fi
3038ab47cfaaSmrg         ;;
3039ab47cfaaSmrg        esac
3040ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3041ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3042ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3043ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3044ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3045ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3046ab47cfaaSmrg
3047ab47cfaaSmrg    if test "$GXX" = yes ; then
3048ab47cfaaSmrg      lt_int_apple_cc_single_mod=no
3049ab47cfaaSmrg      output_verbose_link_cmd='echo'
3050ab47cfaaSmrg      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3051ab47cfaaSmrg       lt_int_apple_cc_single_mod=yes
3052ab47cfaaSmrg      fi
3053ab47cfaaSmrg      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3054ab47cfaaSmrg       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3055ab47cfaaSmrg      else
3056ab47cfaaSmrg          _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'
3057ab47cfaaSmrg        fi
3058ab47cfaaSmrg        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3059ab47cfaaSmrg        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3060ab47cfaaSmrg          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3061ab47cfaaSmrg            _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}'
3062ab47cfaaSmrg          else
3063ab47cfaaSmrg            _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}'
3064ab47cfaaSmrg          fi
3065ab47cfaaSmrg            _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}'
3066ab47cfaaSmrg      else
3067ab47cfaaSmrg      case $cc_basename in
3068ab47cfaaSmrg        xlc*)
3069ab47cfaaSmrg         output_verbose_link_cmd='echo'
3070ab47cfaaSmrg          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
3071ab47cfaaSmrg          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3072ab47cfaaSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3073ab47cfaaSmrg          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3074ab47cfaaSmrg          _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}'
3075ab47cfaaSmrg          ;;
3076ab47cfaaSmrg       *)
3077ab47cfaaSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3078ab47cfaaSmrg          ;;
3079ab47cfaaSmrg      esac
3080ab47cfaaSmrg      fi
3081ab47cfaaSmrg        ;;
3082ab47cfaaSmrg
3083ab47cfaaSmrg  dgux*)
3084ab47cfaaSmrg    case $cc_basename in
3085ab47cfaaSmrg      ec++*)
3086ab47cfaaSmrg	# FIXME: insert proper C++ library support
3087ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3088ab47cfaaSmrg	;;
3089ab47cfaaSmrg      ghcx*)
3090ab47cfaaSmrg	# Green Hills C++ Compiler
3091ab47cfaaSmrg	# FIXME: insert proper C++ library support
3092ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3093ab47cfaaSmrg	;;
3094ab47cfaaSmrg      *)
3095ab47cfaaSmrg	# FIXME: insert proper C++ library support
3096ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3097ab47cfaaSmrg	;;
3098ab47cfaaSmrg    esac
3099ab47cfaaSmrg    ;;
3100ab47cfaaSmrg  freebsd[[12]]*)
3101ab47cfaaSmrg    # C++ shared libraries reported to be fairly broken before switch to ELF
3102ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3103ab47cfaaSmrg    ;;
3104ab47cfaaSmrg  freebsd-elf*)
3105ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3106ab47cfaaSmrg    ;;
3107ab47cfaaSmrg  freebsd* | dragonfly*)
3108ab47cfaaSmrg    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3109ab47cfaaSmrg    # conventions
3110ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3111ab47cfaaSmrg    ;;
3112ab47cfaaSmrg  gnu*)
3113ab47cfaaSmrg    ;;
3114ab47cfaaSmrg  hpux9*)
3115ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3116ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3117ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3118ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3119ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3120ab47cfaaSmrg				# but as the default
3121ab47cfaaSmrg				# location of the library.
3122ab47cfaaSmrg
3123ab47cfaaSmrg    case $cc_basename in
3124ab47cfaaSmrg    CC*)
3125ab47cfaaSmrg      # FIXME: insert proper C++ library support
3126ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3127ab47cfaaSmrg      ;;
3128ab47cfaaSmrg    aCC*)
3129ab47cfaaSmrg      _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'
3130ab47cfaaSmrg      # Commands to make compiler produce verbose output that lists
3131ab47cfaaSmrg      # what "hidden" libraries, object files and flags are used when
3132ab47cfaaSmrg      # linking a shared library.
3133ab47cfaaSmrg      #
3134ab47cfaaSmrg      # There doesn't appear to be a way to prevent this compiler from
3135ab47cfaaSmrg      # explicitly linking system object files so we need to strip them
3136ab47cfaaSmrg      # from the output so that they don't get included in the library
3137ab47cfaaSmrg      # dependencies.
3138ab47cfaaSmrg      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'
3139ab47cfaaSmrg      ;;
3140ab47cfaaSmrg    *)
3141ab47cfaaSmrg      if test "$GXX" = yes; then
3142ab47cfaaSmrg        _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'
3143ab47cfaaSmrg      else
3144ab47cfaaSmrg        # FIXME: insert proper C++ library support
3145ab47cfaaSmrg        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3146ab47cfaaSmrg      fi
3147ab47cfaaSmrg      ;;
3148ab47cfaaSmrg    esac
3149ab47cfaaSmrg    ;;
3150ab47cfaaSmrg  hpux10*|hpux11*)
3151ab47cfaaSmrg    if test $with_gnu_ld = no; then
3152ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3153ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3154ab47cfaaSmrg
3155ab47cfaaSmrg      case $host_cpu in
3156ab47cfaaSmrg      hppa*64*|ia64*)
3157ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3158ab47cfaaSmrg        ;;
3159ab47cfaaSmrg      *)
3160ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3161ab47cfaaSmrg        ;;
3162ab47cfaaSmrg      esac
3163ab47cfaaSmrg    fi
3164ab47cfaaSmrg    case $host_cpu in
3165ab47cfaaSmrg    hppa*64*|ia64*)
3166ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3167ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3168ab47cfaaSmrg      ;;
3169ab47cfaaSmrg    *)
3170ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3171ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3172ab47cfaaSmrg					      # but as the default
3173ab47cfaaSmrg					      # location of the library.
3174ab47cfaaSmrg      ;;
3175ab47cfaaSmrg    esac
3176ab47cfaaSmrg
3177ab47cfaaSmrg    case $cc_basename in
3178ab47cfaaSmrg      CC*)
3179ab47cfaaSmrg	# FIXME: insert proper C++ library support
3180ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3181ab47cfaaSmrg	;;
3182ab47cfaaSmrg      aCC*)
3183ab47cfaaSmrg	case $host_cpu in
3184ab47cfaaSmrg	hppa*64*)
3185ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3186ab47cfaaSmrg	  ;;
3187ab47cfaaSmrg	ia64*)
3188ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3189ab47cfaaSmrg	  ;;
3190ab47cfaaSmrg	*)
3191ab47cfaaSmrg	  _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'
3192ab47cfaaSmrg	  ;;
3193ab47cfaaSmrg	esac
3194ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3195ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3196ab47cfaaSmrg	# linking a shared library.
3197ab47cfaaSmrg	#
3198ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3199ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3200ab47cfaaSmrg	# from the output so that they don't get included in the library
3201ab47cfaaSmrg	# dependencies.
3202ab47cfaaSmrg	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'
3203ab47cfaaSmrg	;;
3204ab47cfaaSmrg      *)
3205ab47cfaaSmrg	if test "$GXX" = yes; then
3206ab47cfaaSmrg	  if test $with_gnu_ld = no; then
3207ab47cfaaSmrg	    case $host_cpu in
3208ab47cfaaSmrg	    hppa*64*)
3209ab47cfaaSmrg	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3210ab47cfaaSmrg	      ;;
3211ab47cfaaSmrg	    ia64*)
3212ab47cfaaSmrg	      _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'
3213ab47cfaaSmrg	      ;;
3214ab47cfaaSmrg	    *)
3215ab47cfaaSmrg	      _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'
3216ab47cfaaSmrg	      ;;
3217ab47cfaaSmrg	    esac
3218ab47cfaaSmrg	  fi
3219ab47cfaaSmrg	else
3220ab47cfaaSmrg	  # FIXME: insert proper C++ library support
3221ab47cfaaSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3222ab47cfaaSmrg	fi
3223ab47cfaaSmrg	;;
3224ab47cfaaSmrg    esac
3225ab47cfaaSmrg    ;;
3226ab47cfaaSmrg  interix3*)
3227ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3228ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3229ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3230ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3231ab47cfaaSmrg    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3232ab47cfaaSmrg    # Instead, shared libraries are loaded at an image base (0x10000000 by
3233ab47cfaaSmrg    # default) and relocated if they conflict, which is a slow very memory
3234ab47cfaaSmrg    # consuming and fragmenting process.  To avoid this, we pick a random,
3235ab47cfaaSmrg    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3236ab47cfaaSmrg    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3237ab47cfaaSmrg    _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'
3238ab47cfaaSmrg    _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'
3239ab47cfaaSmrg    ;;
3240ab47cfaaSmrg  irix5* | irix6*)
3241ab47cfaaSmrg    case $cc_basename in
3242ab47cfaaSmrg      CC*)
3243ab47cfaaSmrg	# SGI C++
3244ab47cfaaSmrg	_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'
3245ab47cfaaSmrg
3246ab47cfaaSmrg	# Archives containing C++ object files must be created using
3247ab47cfaaSmrg	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3248ab47cfaaSmrg	# necessary to make sure instantiated templates are included
3249ab47cfaaSmrg	# in the archive.
3250ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3251ab47cfaaSmrg	;;
3252ab47cfaaSmrg      *)
3253ab47cfaaSmrg	if test "$GXX" = yes; then
3254ab47cfaaSmrg	  if test "$with_gnu_ld" = no; then
3255ab47cfaaSmrg	    _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'
3256ab47cfaaSmrg	  else
3257ab47cfaaSmrg	    _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'
3258ab47cfaaSmrg	  fi
3259ab47cfaaSmrg	fi
3260ab47cfaaSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3261ab47cfaaSmrg	;;
3262ab47cfaaSmrg    esac
3263ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3264ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3265ab47cfaaSmrg    ;;
3266ab47cfaaSmrg  linux* | k*bsd*-gnu)
3267ab47cfaaSmrg    case $cc_basename in
3268ab47cfaaSmrg      KCC*)
3269ab47cfaaSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3270ab47cfaaSmrg
3271ab47cfaaSmrg	# KCC will only create a shared library if the output file
3272ab47cfaaSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3273ab47cfaaSmrg	# to its proper name (with version) after linking.
3274ab47cfaaSmrg	_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'
3275ab47cfaaSmrg	_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'
3276ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3277ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3278ab47cfaaSmrg	# linking a shared library.
3279ab47cfaaSmrg	#
3280ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3281ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3282ab47cfaaSmrg	# from the output so that they don't get included in the library
3283ab47cfaaSmrg	# dependencies.
3284ab47cfaaSmrg	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'
3285ab47cfaaSmrg
3286ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3287ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3288ab47cfaaSmrg
3289ab47cfaaSmrg	# Archives containing C++ object files must be created using
3290ab47cfaaSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3291ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3292ab47cfaaSmrg	;;
3293ab47cfaaSmrg      icpc*)
3294ab47cfaaSmrg	# Intel C++
3295ab47cfaaSmrg	with_gnu_ld=yes
3296ab47cfaaSmrg	# version 8.0 and above of icpc choke on multiply defined symbols
3297ab47cfaaSmrg	# if we add $predep_objects and $postdep_objects, however 7.1 and
3298ab47cfaaSmrg	# earlier do not add the objects themselves.
3299ab47cfaaSmrg	case `$CC -V 2>&1` in
3300ab47cfaaSmrg	*"Version 7."*)
3301ab47cfaaSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3302ab47cfaaSmrg  	  _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'
3303ab47cfaaSmrg	  ;;
3304ab47cfaaSmrg	*)  # Version 8.0 or newer
3305ab47cfaaSmrg	  tmp_idyn=
3306ab47cfaaSmrg	  case $host_cpu in
3307ab47cfaaSmrg	    ia64*) tmp_idyn=' -i_dynamic';;
3308ab47cfaaSmrg	  esac
3309ab47cfaaSmrg  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3310ab47cfaaSmrg	  _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'
3311ab47cfaaSmrg	  ;;
3312ab47cfaaSmrg	esac
3313ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3314ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3315ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3316ab47cfaaSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3317ab47cfaaSmrg	;;
3318ab47cfaaSmrg      pgCC*)
3319ab47cfaaSmrg        # Portland Group C++ compiler
3320ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3321ab47cfaaSmrg  	_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'
3322ab47cfaaSmrg
3323ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3324ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3325ab47cfaaSmrg	_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'
3326ab47cfaaSmrg        ;;
3327ab47cfaaSmrg      cxx*)
3328ab47cfaaSmrg	# Compaq C++
3329ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3330ab47cfaaSmrg	_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'
3331ab47cfaaSmrg
3332ab47cfaaSmrg	runpath_var=LD_RUN_PATH
3333ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3334ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3335ab47cfaaSmrg
3336ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3337ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3338ab47cfaaSmrg	# linking a shared library.
3339ab47cfaaSmrg	#
3340ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3341ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3342ab47cfaaSmrg	# from the output so that they don't get included in the library
3343ab47cfaaSmrg	# dependencies.
3344ab47cfaaSmrg	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'
3345ab47cfaaSmrg	;;
3346ab47cfaaSmrg    esac
3347ab47cfaaSmrg    ;;
3348ab47cfaaSmrg  lynxos*)
3349ab47cfaaSmrg    # FIXME: insert proper C++ library support
3350ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3351ab47cfaaSmrg    ;;
3352ab47cfaaSmrg  m88k*)
3353ab47cfaaSmrg    # FIXME: insert proper C++ library support
3354ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3355ab47cfaaSmrg    ;;
3356ab47cfaaSmrg  mvs*)
3357ab47cfaaSmrg    case $cc_basename in
3358ab47cfaaSmrg      cxx*)
3359ab47cfaaSmrg	# FIXME: insert proper C++ library support
3360ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3361ab47cfaaSmrg	;;
3362ab47cfaaSmrg      *)
3363ab47cfaaSmrg	# FIXME: insert proper C++ library support
3364ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3365ab47cfaaSmrg	;;
3366ab47cfaaSmrg    esac
3367ab47cfaaSmrg    ;;
3368ab47cfaaSmrg  netbsd* | netbsdelf*-gnu)
3369ab47cfaaSmrg    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3370ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3371ab47cfaaSmrg      wlarc=
3372ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3373ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3374ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3375ab47cfaaSmrg    fi
3376ab47cfaaSmrg    # Workaround some broken pre-1.5 toolchains
3377ab47cfaaSmrg    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3378ab47cfaaSmrg    ;;
3379ab47cfaaSmrg  openbsd2*)
3380ab47cfaaSmrg    # C++ shared libraries are fairly broken
3381ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3382ab47cfaaSmrg    ;;
3383ab47cfaaSmrg  openbsd*)
3384ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3385ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3386ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3387ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3388ab47cfaaSmrg    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3389ab47cfaaSmrg      _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'
3390ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3391ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3392ab47cfaaSmrg    fi
3393ab47cfaaSmrg    output_verbose_link_cmd='echo'
3394ab47cfaaSmrg    ;;
3395ab47cfaaSmrg  osf3*)
3396ab47cfaaSmrg    case $cc_basename in
3397ab47cfaaSmrg      KCC*)
3398ab47cfaaSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3399ab47cfaaSmrg
3400ab47cfaaSmrg	# KCC will only create a shared library if the output file
3401ab47cfaaSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3402ab47cfaaSmrg	# to its proper name (with version) after linking.
3403ab47cfaaSmrg	_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'
3404ab47cfaaSmrg
3405ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3406ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3407ab47cfaaSmrg
3408ab47cfaaSmrg	# Archives containing C++ object files must be created using
3409ab47cfaaSmrg	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3410ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3411ab47cfaaSmrg
3412ab47cfaaSmrg	;;
3413ab47cfaaSmrg      RCC*)
3414ab47cfaaSmrg	# Rational C++ 2.4.1
3415ab47cfaaSmrg	# FIXME: insert proper C++ library support
3416ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3417ab47cfaaSmrg	;;
3418ab47cfaaSmrg      cxx*)
3419ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3420ab47cfaaSmrg	_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'
3421ab47cfaaSmrg
3422ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3423ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3424ab47cfaaSmrg
3425ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3426ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3427ab47cfaaSmrg	# linking a shared library.
3428ab47cfaaSmrg	#
3429ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3430ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3431ab47cfaaSmrg	# from the output so that they don't get included in the library
3432ab47cfaaSmrg	# dependencies.
3433ab47cfaaSmrg	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'
3434ab47cfaaSmrg	;;
3435ab47cfaaSmrg      *)
3436ab47cfaaSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3437ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3438ab47cfaaSmrg	  _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'
3439ab47cfaaSmrg
3440ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3441ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3442ab47cfaaSmrg
3443ab47cfaaSmrg	  # Commands to make compiler produce verbose output that lists
3444ab47cfaaSmrg	  # what "hidden" libraries, object files and flags are used when
3445ab47cfaaSmrg	  # linking a shared library.
3446ab47cfaaSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3447ab47cfaaSmrg
3448ab47cfaaSmrg	else
3449ab47cfaaSmrg	  # FIXME: insert proper C++ library support
3450ab47cfaaSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3451ab47cfaaSmrg	fi
3452ab47cfaaSmrg	;;
3453ab47cfaaSmrg    esac
3454ab47cfaaSmrg    ;;
3455ab47cfaaSmrg  osf4* | osf5*)
3456ab47cfaaSmrg    case $cc_basename in
3457ab47cfaaSmrg      KCC*)
3458ab47cfaaSmrg	# Kuck and Associates, Inc. (KAI) C++ Compiler
3459ab47cfaaSmrg
3460ab47cfaaSmrg	# KCC will only create a shared library if the output file
3461ab47cfaaSmrg	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3462ab47cfaaSmrg	# to its proper name (with version) after linking.
3463ab47cfaaSmrg	_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'
3464ab47cfaaSmrg
3465ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3466ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3467ab47cfaaSmrg
3468ab47cfaaSmrg	# Archives containing C++ object files must be created using
3469ab47cfaaSmrg	# the KAI C++ compiler.
3470ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3471ab47cfaaSmrg	;;
3472ab47cfaaSmrg      RCC*)
3473ab47cfaaSmrg	# Rational C++ 2.4.1
3474ab47cfaaSmrg	# FIXME: insert proper C++ library support
3475ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3476ab47cfaaSmrg	;;
3477ab47cfaaSmrg      cxx*)
3478ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3479ab47cfaaSmrg	_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'
3480ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3481ab47cfaaSmrg	  echo "-hidden">> $lib.exp~
3482ab47cfaaSmrg	  $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~
3483ab47cfaaSmrg	  $rm $lib.exp'
3484ab47cfaaSmrg
3485ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3486ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3487ab47cfaaSmrg
3488ab47cfaaSmrg	# Commands to make compiler produce verbose output that lists
3489ab47cfaaSmrg	# what "hidden" libraries, object files and flags are used when
3490ab47cfaaSmrg	# linking a shared library.
3491ab47cfaaSmrg	#
3492ab47cfaaSmrg	# There doesn't appear to be a way to prevent this compiler from
3493ab47cfaaSmrg	# explicitly linking system object files so we need to strip them
3494ab47cfaaSmrg	# from the output so that they don't get included in the library
3495ab47cfaaSmrg	# dependencies.
3496ab47cfaaSmrg	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'
3497ab47cfaaSmrg	;;
3498ab47cfaaSmrg      *)
3499ab47cfaaSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3500ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3501ab47cfaaSmrg	 _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'
3502ab47cfaaSmrg
3503ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3504ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3505ab47cfaaSmrg
3506ab47cfaaSmrg	  # Commands to make compiler produce verbose output that lists
3507ab47cfaaSmrg	  # what "hidden" libraries, object files and flags are used when
3508ab47cfaaSmrg	  # linking a shared library.
3509ab47cfaaSmrg	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3510ab47cfaaSmrg
3511ab47cfaaSmrg	else
3512ab47cfaaSmrg	  # FIXME: insert proper C++ library support
3513ab47cfaaSmrg	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3514ab47cfaaSmrg	fi
3515ab47cfaaSmrg	;;
3516ab47cfaaSmrg    esac
3517ab47cfaaSmrg    ;;
3518ab47cfaaSmrg  psos*)
3519ab47cfaaSmrg    # FIXME: insert proper C++ library support
3520ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3521ab47cfaaSmrg    ;;
3522ab47cfaaSmrg  sunos4*)
3523ab47cfaaSmrg    case $cc_basename in
3524ab47cfaaSmrg      CC*)
3525ab47cfaaSmrg	# Sun C++ 4.x
3526ab47cfaaSmrg	# FIXME: insert proper C++ library support
3527ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3528ab47cfaaSmrg	;;
3529ab47cfaaSmrg      lcc*)
3530ab47cfaaSmrg	# Lucid
3531ab47cfaaSmrg	# FIXME: insert proper C++ library support
3532ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3533ab47cfaaSmrg	;;
3534ab47cfaaSmrg      *)
3535ab47cfaaSmrg	# FIXME: insert proper C++ library support
3536ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3537ab47cfaaSmrg	;;
3538ab47cfaaSmrg    esac
3539ab47cfaaSmrg    ;;
3540ab47cfaaSmrg  solaris*)
3541ab47cfaaSmrg    case $cc_basename in
3542ab47cfaaSmrg      CC*)
3543ab47cfaaSmrg	# Sun C++ 4.2, 5.x and Centerline C++
3544ab47cfaaSmrg        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3545ab47cfaaSmrg	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3546ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3547ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3548ab47cfaaSmrg	$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'
3549ab47cfaaSmrg
3550ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3551ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3552ab47cfaaSmrg	case $host_os in
3553ab47cfaaSmrg	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3554ab47cfaaSmrg	  *)
3555ab47cfaaSmrg	    # The C++ compiler is used as linker so we must use $wl
3556ab47cfaaSmrg	    # flag to pass the commands to the underlying system
3557ab47cfaaSmrg	    # linker. We must also pass each convience library through
3558ab47cfaaSmrg	    # to the system linker between allextract/defaultextract.
3559ab47cfaaSmrg	    # The C++ compiler will combine linker options so we
3560ab47cfaaSmrg	    # cannot just pass the convience library names through
3561ab47cfaaSmrg	    # without $wl.
3562ab47cfaaSmrg	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3563ab47cfaaSmrg	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract'
3564ab47cfaaSmrg	    ;;
3565ab47cfaaSmrg	esac
3566ab47cfaaSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3567ab47cfaaSmrg
3568ab47cfaaSmrg	output_verbose_link_cmd='echo'
3569ab47cfaaSmrg
3570ab47cfaaSmrg	# Archives containing C++ object files must be created using
3571ab47cfaaSmrg	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3572ab47cfaaSmrg	# necessary to make sure instantiated templates are included
3573ab47cfaaSmrg	# in the archive.
3574ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3575ab47cfaaSmrg	;;
3576ab47cfaaSmrg      gcx*)
3577ab47cfaaSmrg	# Green Hills C++ Compiler
3578ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3579ab47cfaaSmrg
3580ab47cfaaSmrg	# The C++ compiler must be used to create the archive.
3581ab47cfaaSmrg	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3582ab47cfaaSmrg	;;
3583ab47cfaaSmrg      *)
3584ab47cfaaSmrg	# GNU C++ compiler with Solaris linker
3585ab47cfaaSmrg	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3586ab47cfaaSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3587ab47cfaaSmrg	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3588ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3589ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3590ab47cfaaSmrg		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3591ab47cfaaSmrg
3592ab47cfaaSmrg	    # Commands to make compiler produce verbose output that lists
3593ab47cfaaSmrg	    # what "hidden" libraries, object files and flags are used when
3594ab47cfaaSmrg	    # linking a shared library.
3595ab47cfaaSmrg	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3596ab47cfaaSmrg	  else
3597ab47cfaaSmrg	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3598ab47cfaaSmrg	    # platform.
3599ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3600ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3601ab47cfaaSmrg		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
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 -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3607ab47cfaaSmrg	  fi
3608ab47cfaaSmrg
3609ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3610ab47cfaaSmrg	fi
3611ab47cfaaSmrg	;;
3612ab47cfaaSmrg    esac
3613ab47cfaaSmrg    ;;
3614ab47cfaaSmrg  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3615ab47cfaaSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3616ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3617ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3618ab47cfaaSmrg    runpath_var='LD_RUN_PATH'
3619ab47cfaaSmrg
3620ab47cfaaSmrg    case $cc_basename in
3621ab47cfaaSmrg      CC*)
3622ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3623ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3624ab47cfaaSmrg	;;
3625ab47cfaaSmrg      *)
3626ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3627ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3628ab47cfaaSmrg	;;
3629ab47cfaaSmrg    esac
3630ab47cfaaSmrg    ;;
3631ab47cfaaSmrg  sysv5* | sco3.2v5* | sco5v6*)
3632ab47cfaaSmrg    # Note: We can NOT use -z defs as we might desire, because we do not
3633ab47cfaaSmrg    # link with -lc, and that would cause any symbols used from libc to
3634ab47cfaaSmrg    # always be unresolved, which means just about no library would
3635ab47cfaaSmrg    # ever link correctly.  If we're not using GNU ld we use -z text
3636ab47cfaaSmrg    # though, which does catch some bad symbols but isn't as heavy-handed
3637ab47cfaaSmrg    # as -z defs.
3638ab47cfaaSmrg    # For security reasons, it is highly recommended that you always
3639ab47cfaaSmrg    # use absolute paths for naming shared libraries, and exclude the
3640ab47cfaaSmrg    # DT_RUNPATH tag from executables and libraries.  But doing so
3641ab47cfaaSmrg    # requires that you compile everything twice, which is a pain.
3642ab47cfaaSmrg    # So that behaviour is only enabled if SCOABSPATH is set to a
3643ab47cfaaSmrg    # non-empty value in the environment.  Most likely only useful for
3644ab47cfaaSmrg    # creating official distributions of packages.
3645ab47cfaaSmrg    # This is a hack until libtool officially supports absolute path
3646ab47cfaaSmrg    # names for shared libraries.
3647ab47cfaaSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3648ab47cfaaSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3649ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3650ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3651ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3652ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3653ab47cfaaSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3654ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3655ab47cfaaSmrg    runpath_var='LD_RUN_PATH'
3656ab47cfaaSmrg
3657ab47cfaaSmrg    case $cc_basename in
3658ab47cfaaSmrg      CC*)
3659ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3660ab47cfaaSmrg	_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'
3661ab47cfaaSmrg	;;
3662ab47cfaaSmrg      *)
3663ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3664ab47cfaaSmrg	_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'
3665ab47cfaaSmrg	;;
3666ab47cfaaSmrg    esac
3667ab47cfaaSmrg    ;;
3668ab47cfaaSmrg  tandem*)
3669ab47cfaaSmrg    case $cc_basename in
3670ab47cfaaSmrg      NCC*)
3671ab47cfaaSmrg	# NonStop-UX NCC 3.20
3672ab47cfaaSmrg	# FIXME: insert proper C++ library support
3673ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3674ab47cfaaSmrg	;;
3675ab47cfaaSmrg      *)
3676ab47cfaaSmrg	# FIXME: insert proper C++ library support
3677ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3678ab47cfaaSmrg	;;
3679ab47cfaaSmrg    esac
3680ab47cfaaSmrg    ;;
3681ab47cfaaSmrg  vxworks*)
3682ab47cfaaSmrg    # FIXME: insert proper C++ library support
3683ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3684ab47cfaaSmrg    ;;
3685ab47cfaaSmrg  *)
3686ab47cfaaSmrg    # FIXME: insert proper C++ library support
3687ab47cfaaSmrg    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3688ab47cfaaSmrg    ;;
3689ab47cfaaSmrgesac
3690ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3691ab47cfaaSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3692ab47cfaaSmrg
3693ab47cfaaSmrg_LT_AC_TAGVAR(GCC, $1)="$GXX"
3694ab47cfaaSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
3695ab47cfaaSmrg
3696ab47cfaaSmrgAC_LIBTOOL_POSTDEP_PREDEP($1)
3697ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3698ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
3699ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3700ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3701ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3702ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3703ab47cfaaSmrg
3704ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
3705ab47cfaaSmrg
3706ab47cfaaSmrgAC_LANG_POP
3707ab47cfaaSmrgCC=$lt_save_CC
3708ab47cfaaSmrgLDCXX=$LD
3709ab47cfaaSmrgLD=$lt_save_LD
3710ab47cfaaSmrgGCC=$lt_save_GCC
3711ab47cfaaSmrgwith_gnu_ldcxx=$with_gnu_ld
3712ab47cfaaSmrgwith_gnu_ld=$lt_save_with_gnu_ld
3713ab47cfaaSmrglt_cv_path_LDCXX=$lt_cv_path_LD
3714ab47cfaaSmrglt_cv_path_LD=$lt_save_path_LD
3715ab47cfaaSmrglt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3716ab47cfaaSmrglt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3717ab47cfaaSmrg])# AC_LIBTOOL_LANG_CXX_CONFIG
3718ab47cfaaSmrg
3719ab47cfaaSmrg# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3720ab47cfaaSmrg# ------------------------------------
3721ab47cfaaSmrg# Figure out "hidden" library dependencies from verbose
3722ab47cfaaSmrg# compiler output when linking a shared library.
3723ab47cfaaSmrg# Parse the compiler output and extract the necessary
3724ab47cfaaSmrg# objects, libraries and library flags.
3725ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3726ab47cfaaSmrgdnl we can't use the lt_simple_compile_test_code here,
3727ab47cfaaSmrgdnl because it contains code intended for an executable,
3728ab47cfaaSmrgdnl not a library.  It's possible we should let each
3729ab47cfaaSmrgdnl tag define a new lt_????_link_test_code variable,
3730ab47cfaaSmrgdnl but it's only used here...
3731ab47cfaaSmrgifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3732ab47cfaaSmrgint a;
3733ab47cfaaSmrgvoid foo (void) { a = 0; }
3734ab47cfaaSmrgEOF
3735ab47cfaaSmrg],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3736ab47cfaaSmrgclass Foo
3737ab47cfaaSmrg{
3738ab47cfaaSmrgpublic:
3739ab47cfaaSmrg  Foo (void) { a = 0; }
3740ab47cfaaSmrgprivate:
3741ab47cfaaSmrg  int a;
3742ab47cfaaSmrg};
3743ab47cfaaSmrgEOF
3744ab47cfaaSmrg],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3745ab47cfaaSmrg      subroutine foo
3746ab47cfaaSmrg      implicit none
3747ab47cfaaSmrg      integer*4 a
3748ab47cfaaSmrg      a=0
3749ab47cfaaSmrg      return
3750ab47cfaaSmrg      end
3751ab47cfaaSmrgEOF
3752ab47cfaaSmrg],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3753ab47cfaaSmrgpublic class foo {
3754ab47cfaaSmrg  private int a;
3755ab47cfaaSmrg  public void bar (void) {
3756ab47cfaaSmrg    a = 0;
3757ab47cfaaSmrg  }
3758ab47cfaaSmrg};
3759ab47cfaaSmrgEOF
3760ab47cfaaSmrg])
3761ab47cfaaSmrgdnl Parse the compiler output and extract the necessary
3762ab47cfaaSmrgdnl objects, libraries and library flags.
3763ab47cfaaSmrgif AC_TRY_EVAL(ac_compile); then
3764ab47cfaaSmrg  # Parse the compiler output and extract the necessary
3765ab47cfaaSmrg  # objects, libraries and library flags.
3766ab47cfaaSmrg
3767ab47cfaaSmrg  # Sentinel used to keep track of whether or not we are before
3768ab47cfaaSmrg  # the conftest object file.
3769ab47cfaaSmrg  pre_test_object_deps_done=no
3770ab47cfaaSmrg
3771ab47cfaaSmrg  # The `*' in the case matches for architectures that use `case' in
3772ab47cfaaSmrg  # $output_verbose_cmd can trigger glob expansion during the loop
3773ab47cfaaSmrg  # eval without this substitution.
3774ab47cfaaSmrg  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3775ab47cfaaSmrg
3776ab47cfaaSmrg  for p in `eval $output_verbose_link_cmd`; do
3777ab47cfaaSmrg    case $p in
3778ab47cfaaSmrg
3779ab47cfaaSmrg    -L* | -R* | -l*)
3780ab47cfaaSmrg       # Some compilers place space between "-{L,R}" and the path.
3781ab47cfaaSmrg       # Remove the space.
3782ab47cfaaSmrg       if test $p = "-L" \
3783ab47cfaaSmrg	  || test $p = "-R"; then
3784ab47cfaaSmrg	 prev=$p
3785ab47cfaaSmrg	 continue
3786ab47cfaaSmrg       else
3787ab47cfaaSmrg	 prev=
3788ab47cfaaSmrg       fi
3789ab47cfaaSmrg
3790ab47cfaaSmrg       if test "$pre_test_object_deps_done" = no; then
3791ab47cfaaSmrg	 case $p in
3792ab47cfaaSmrg	 -L* | -R*)
3793ab47cfaaSmrg	   # Internal compiler library paths should come after those
3794ab47cfaaSmrg	   # provided the user.  The postdeps already come after the
3795ab47cfaaSmrg	   # user supplied libs so there is no need to process them.
3796ab47cfaaSmrg	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3797ab47cfaaSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3798ab47cfaaSmrg	   else
3799ab47cfaaSmrg	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3800ab47cfaaSmrg	   fi
3801ab47cfaaSmrg	   ;;
3802ab47cfaaSmrg	 # The "-l" case would never come before the object being
3803ab47cfaaSmrg	 # linked, so don't bother handling this case.
3804ab47cfaaSmrg	 esac
3805ab47cfaaSmrg       else
3806ab47cfaaSmrg	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3807ab47cfaaSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3808ab47cfaaSmrg	 else
3809ab47cfaaSmrg	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3810ab47cfaaSmrg	 fi
3811ab47cfaaSmrg       fi
3812ab47cfaaSmrg       ;;
3813ab47cfaaSmrg
3814ab47cfaaSmrg    *.$objext)
3815ab47cfaaSmrg       # This assumes that the test object file only shows up
3816ab47cfaaSmrg       # once in the compiler output.
3817ab47cfaaSmrg       if test "$p" = "conftest.$objext"; then
3818ab47cfaaSmrg	 pre_test_object_deps_done=yes
3819ab47cfaaSmrg	 continue
3820ab47cfaaSmrg       fi
3821ab47cfaaSmrg
3822ab47cfaaSmrg       if test "$pre_test_object_deps_done" = no; then
3823ab47cfaaSmrg	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3824ab47cfaaSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3825ab47cfaaSmrg	 else
3826ab47cfaaSmrg	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3827ab47cfaaSmrg	 fi
3828ab47cfaaSmrg       else
3829ab47cfaaSmrg	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3830ab47cfaaSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3831ab47cfaaSmrg	 else
3832ab47cfaaSmrg	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3833ab47cfaaSmrg	 fi
3834ab47cfaaSmrg       fi
3835ab47cfaaSmrg       ;;
3836ab47cfaaSmrg
3837ab47cfaaSmrg    *) ;; # Ignore the rest.
3838ab47cfaaSmrg
3839ab47cfaaSmrg    esac
3840ab47cfaaSmrg  done
3841ab47cfaaSmrg
3842ab47cfaaSmrg  # Clean up.
3843ab47cfaaSmrg  rm -f a.out a.exe
3844ab47cfaaSmrgelse
3845ab47cfaaSmrg  echo "libtool.m4: error: problem compiling $1 test program"
3846ab47cfaaSmrgfi
3847ab47cfaaSmrg
3848ab47cfaaSmrg$rm -f confest.$objext
3849ab47cfaaSmrg
3850ab47cfaaSmrg# PORTME: override above test on systems where it is broken
3851ab47cfaaSmrgifelse([$1],[CXX],
3852ab47cfaaSmrg[case $host_os in
3853ab47cfaaSmrginterix3*)
3854ab47cfaaSmrg  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3855ab47cfaaSmrg  # hack all around it, let's just trust "g++" to DTRT.
3856ab47cfaaSmrg  _LT_AC_TAGVAR(predep_objects,$1)=
3857ab47cfaaSmrg  _LT_AC_TAGVAR(postdep_objects,$1)=
3858ab47cfaaSmrg  _LT_AC_TAGVAR(postdeps,$1)=
3859ab47cfaaSmrg  ;;
3860ab47cfaaSmrg
3861ab47cfaaSmrgsolaris*)
3862ab47cfaaSmrg  case $cc_basename in
3863ab47cfaaSmrg  CC*)
3864ab47cfaaSmrg    # Adding this requires a known-good setup of shared libraries for
3865ab47cfaaSmrg    # Sun compiler versions before 5.6, else PIC objects from an old
3866ab47cfaaSmrg    # archive will be linked into the output, leading to subtle bugs.
3867ab47cfaaSmrg    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3868ab47cfaaSmrg    ;;
3869ab47cfaaSmrg  esac
3870ab47cfaaSmrg  ;;
3871ab47cfaaSmrgesac
3872ab47cfaaSmrg])
3873ab47cfaaSmrg
3874ab47cfaaSmrgcase " $_LT_AC_TAGVAR(postdeps, $1) " in
3875ab47cfaaSmrg*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3876ab47cfaaSmrgesac
3877ab47cfaaSmrg])# AC_LIBTOOL_POSTDEP_PREDEP
3878ab47cfaaSmrg
3879ab47cfaaSmrg# AC_LIBTOOL_LANG_F77_CONFIG
3880ab47cfaaSmrg# --------------------------
3881ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
3882ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
3883ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3884ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3885ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3886ab47cfaaSmrg[AC_REQUIRE([AC_PROG_F77])
3887ab47cfaaSmrgAC_LANG_PUSH(Fortran 77)
3888ab47cfaaSmrg
3889ab47cfaaSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3890ab47cfaaSmrg_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3891ab47cfaaSmrg_LT_AC_TAGVAR(always_export_symbols, $1)=no
3892ab47cfaaSmrg_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3893ab47cfaaSmrg_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3894ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_direct, $1)=no
3895ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3896ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3897ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3898ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3899ab47cfaaSmrg_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3900ab47cfaaSmrg_LT_AC_TAGVAR(module_cmds, $1)=
3901ab47cfaaSmrg_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3902ab47cfaaSmrg_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3903ab47cfaaSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3904ab47cfaaSmrg_LT_AC_TAGVAR(no_undefined_flag, $1)=
3905ab47cfaaSmrg_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3906ab47cfaaSmrg_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3907ab47cfaaSmrg
3908ab47cfaaSmrg# Source file extension for f77 test sources.
3909ab47cfaaSmrgac_ext=f
3910ab47cfaaSmrg
3911ab47cfaaSmrg# Object file extension for compiled f77 test sources.
3912ab47cfaaSmrgobjext=o
3913ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
3914ab47cfaaSmrg
3915ab47cfaaSmrg# Code to be used in simple compile tests
3916ab47cfaaSmrglt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
3917ab47cfaaSmrg
3918ab47cfaaSmrg# Code to be used in simple link tests
3919ab47cfaaSmrglt_simple_link_test_code="      program t\n      end\n"
3920ab47cfaaSmrg
3921ab47cfaaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3922ab47cfaaSmrg_LT_AC_SYS_COMPILER
3923ab47cfaaSmrg
3924ab47cfaaSmrg# save warnings/boilerplate of simple test code
3925ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
3926ab47cfaaSmrg_LT_LINKER_BOILERPLATE
3927ab47cfaaSmrg
3928ab47cfaaSmrg# Allow CC to be a program name with arguments.
3929ab47cfaaSmrglt_save_CC="$CC"
3930ab47cfaaSmrgCC=${F77-"f77"}
3931ab47cfaaSmrgcompiler=$CC
3932ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
3933ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
3934ab47cfaaSmrg
3935ab47cfaaSmrgAC_MSG_CHECKING([if libtool supports shared libraries])
3936ab47cfaaSmrgAC_MSG_RESULT([$can_build_shared])
3937ab47cfaaSmrg
3938ab47cfaaSmrgAC_MSG_CHECKING([whether to build shared libraries])
3939ab47cfaaSmrgtest "$can_build_shared" = "no" && enable_shared=no
3940ab47cfaaSmrg
3941ab47cfaaSmrg# On AIX, shared libraries and static libraries use the same namespace, and
3942ab47cfaaSmrg# are all built from PIC.
3943ab47cfaaSmrgcase $host_os in
3944ab47cfaaSmrgaix3*)
3945ab47cfaaSmrg  test "$enable_shared" = yes && enable_static=no
3946ab47cfaaSmrg  if test -n "$RANLIB"; then
3947ab47cfaaSmrg    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3948ab47cfaaSmrg    postinstall_cmds='$RANLIB $lib'
3949ab47cfaaSmrg  fi
3950ab47cfaaSmrg  ;;
3951ab47cfaaSmrgaix4* | aix5*)
3952ab47cfaaSmrg  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3953ab47cfaaSmrg    test "$enable_shared" = yes && enable_static=no
3954ab47cfaaSmrg  fi
3955ab47cfaaSmrg  ;;
3956ab47cfaaSmrgesac
3957ab47cfaaSmrgAC_MSG_RESULT([$enable_shared])
3958ab47cfaaSmrg
3959ab47cfaaSmrgAC_MSG_CHECKING([whether to build static libraries])
3960ab47cfaaSmrg# Make sure either enable_shared or enable_static is yes.
3961ab47cfaaSmrgtest "$enable_shared" = yes || enable_static=yes
3962ab47cfaaSmrgAC_MSG_RESULT([$enable_static])
3963ab47cfaaSmrg
3964ab47cfaaSmrg_LT_AC_TAGVAR(GCC, $1)="$G77"
3965ab47cfaaSmrg_LT_AC_TAGVAR(LD, $1)="$LD"
3966ab47cfaaSmrg
3967ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
3968ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
3969ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3970ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
3971ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3972ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3973ab47cfaaSmrg
3974ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
3975ab47cfaaSmrg
3976ab47cfaaSmrgAC_LANG_POP
3977ab47cfaaSmrgCC="$lt_save_CC"
3978ab47cfaaSmrg])# AC_LIBTOOL_LANG_F77_CONFIG
3979ab47cfaaSmrg
3980ab47cfaaSmrg
3981ab47cfaaSmrg# AC_LIBTOOL_LANG_GCJ_CONFIG
3982ab47cfaaSmrg# --------------------------
3983ab47cfaaSmrg# Ensure that the configuration vars for the C compiler are
3984ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
3985ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3986ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3987ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
3988ab47cfaaSmrg[AC_LANG_SAVE
3989ab47cfaaSmrg
3990ab47cfaaSmrg# Source file extension for Java test sources.
3991ab47cfaaSmrgac_ext=java
3992ab47cfaaSmrg
3993ab47cfaaSmrg# Object file extension for compiled Java test sources.
3994ab47cfaaSmrgobjext=o
3995ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
3996ab47cfaaSmrg
3997ab47cfaaSmrg# Code to be used in simple compile tests
3998ab47cfaaSmrglt_simple_compile_test_code="class foo {}\n"
3999ab47cfaaSmrg
4000ab47cfaaSmrg# Code to be used in simple link tests
4001ab47cfaaSmrglt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4002ab47cfaaSmrg
4003ab47cfaaSmrg# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4004ab47cfaaSmrg_LT_AC_SYS_COMPILER
4005ab47cfaaSmrg
4006ab47cfaaSmrg# save warnings/boilerplate of simple test code
4007ab47cfaaSmrg_LT_COMPILER_BOILERPLATE
4008ab47cfaaSmrg_LT_LINKER_BOILERPLATE
4009ab47cfaaSmrg
4010ab47cfaaSmrg# Allow CC to be a program name with arguments.
4011ab47cfaaSmrglt_save_CC="$CC"
4012ab47cfaaSmrgCC=${GCJ-"gcj"}
4013ab47cfaaSmrgcompiler=$CC
4014ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4015ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
4016ab47cfaaSmrg
4017ab47cfaaSmrg# GCJ did not exist at the time GCC didn't implicitly link libc in.
4018ab47cfaaSmrg_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4019ab47cfaaSmrg
4020ab47cfaaSmrg_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4021ab47cfaaSmrg
4022ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4023ab47cfaaSmrgAC_LIBTOOL_PROG_COMPILER_PIC($1)
4024ab47cfaaSmrgAC_LIBTOOL_PROG_CC_C_O($1)
4025ab47cfaaSmrgAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4026ab47cfaaSmrgAC_LIBTOOL_PROG_LD_SHLIBS($1)
4027ab47cfaaSmrgAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4028ab47cfaaSmrgAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4029ab47cfaaSmrg
4030ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
4031ab47cfaaSmrg
4032ab47cfaaSmrgAC_LANG_RESTORE
4033ab47cfaaSmrgCC="$lt_save_CC"
4034ab47cfaaSmrg])# AC_LIBTOOL_LANG_GCJ_CONFIG
4035ab47cfaaSmrg
4036ab47cfaaSmrg
4037ab47cfaaSmrg# AC_LIBTOOL_LANG_RC_CONFIG
4038ab47cfaaSmrg# -------------------------
4039ab47cfaaSmrg# Ensure that the configuration vars for the Windows resource compiler are
4040ab47cfaaSmrg# suitably defined.  Those variables are subsequently used by
4041ab47cfaaSmrg# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4042ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4043ab47cfaaSmrgAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4044ab47cfaaSmrg[AC_LANG_SAVE
4045ab47cfaaSmrg
4046ab47cfaaSmrg# Source file extension for RC test sources.
4047ab47cfaaSmrgac_ext=rc
4048ab47cfaaSmrg
4049ab47cfaaSmrg# Object file extension for compiled RC test sources.
4050ab47cfaaSmrgobjext=o
4051ab47cfaaSmrg_LT_AC_TAGVAR(objext, $1)=$objext
4052ab47cfaaSmrg
4053ab47cfaaSmrg# Code to be used in simple compile tests
4054ab47cfaaSmrglt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4055ab47cfaaSmrg
4056ab47cfaaSmrg# Code to be used in simple link tests
4057ab47cfaaSmrglt_simple_link_test_code="$lt_simple_compile_test_code"
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=${RC-"windres"}
4069ab47cfaaSmrgcompiler=$CC
4070ab47cfaaSmrg_LT_AC_TAGVAR(compiler, $1)=$CC
4071ab47cfaaSmrg_LT_CC_BASENAME([$compiler])
4072ab47cfaaSmrg_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4073ab47cfaaSmrg
4074ab47cfaaSmrgAC_LIBTOOL_CONFIG($1)
4075ab47cfaaSmrg
4076ab47cfaaSmrgAC_LANG_RESTORE
4077ab47cfaaSmrgCC="$lt_save_CC"
4078ab47cfaaSmrg])# AC_LIBTOOL_LANG_RC_CONFIG
4079ab47cfaaSmrg
4080ab47cfaaSmrg
4081ab47cfaaSmrg# AC_LIBTOOL_CONFIG([TAGNAME])
4082ab47cfaaSmrg# ----------------------------
4083ab47cfaaSmrg# If TAGNAME is not passed, then create an initial libtool script
4084ab47cfaaSmrg# with a default configuration from the untagged config vars.  Otherwise
4085ab47cfaaSmrg# add code to config.status for appending the configuration named by
4086ab47cfaaSmrg# TAGNAME from the matching tagged config vars.
4087ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_CONFIG],
4088ab47cfaaSmrg[# The else clause should only fire when bootstrapping the
4089ab47cfaaSmrg# libtool distribution, otherwise you forgot to ship ltmain.sh
4090ab47cfaaSmrg# with your package, and you will get complaints that there are
4091ab47cfaaSmrg# no rules to generate ltmain.sh.
4092ab47cfaaSmrgif test -f "$ltmain"; then
4093ab47cfaaSmrg  # See if we are running on zsh, and set the options which allow our commands through
4094ab47cfaaSmrg  # without removal of \ escapes.
4095ab47cfaaSmrg  if test -n "${ZSH_VERSION+set}" ; then
4096ab47cfaaSmrg    setopt NO_GLOB_SUBST
4097ab47cfaaSmrg  fi
4098ab47cfaaSmrg  # Now quote all the things that may contain metacharacters while being
4099ab47cfaaSmrg  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4100ab47cfaaSmrg  # variables and quote the copies for generation of the libtool script.
4101ab47cfaaSmrg  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4102ab47cfaaSmrg    SED SHELL STRIP \
4103ab47cfaaSmrg    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4104ab47cfaaSmrg    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4105ab47cfaaSmrg    deplibs_check_method reload_flag reload_cmds need_locks \
4106ab47cfaaSmrg    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4107ab47cfaaSmrg    lt_cv_sys_global_symbol_to_c_name_address \
4108ab47cfaaSmrg    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4109ab47cfaaSmrg    old_postinstall_cmds old_postuninstall_cmds \
4110ab47cfaaSmrg    _LT_AC_TAGVAR(compiler, $1) \
4111ab47cfaaSmrg    _LT_AC_TAGVAR(CC, $1) \
4112ab47cfaaSmrg    _LT_AC_TAGVAR(LD, $1) \
4113ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4114ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4115ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4116ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4117ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4118ab47cfaaSmrg    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4119ab47cfaaSmrg    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4120ab47cfaaSmrg    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4121ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4122ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4123ab47cfaaSmrg    _LT_AC_TAGVAR(predep_objects, $1) \
4124ab47cfaaSmrg    _LT_AC_TAGVAR(postdep_objects, $1) \
4125ab47cfaaSmrg    _LT_AC_TAGVAR(predeps, $1) \
4126ab47cfaaSmrg    _LT_AC_TAGVAR(postdeps, $1) \
4127ab47cfaaSmrg    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4128ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1) \
4129ab47cfaaSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4130ab47cfaaSmrg    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4131ab47cfaaSmrg    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4132ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4133ab47cfaaSmrg    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4134ab47cfaaSmrg    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4135ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4136ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4137ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4138ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4139ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4140ab47cfaaSmrg    _LT_AC_TAGVAR(module_cmds, $1) \
4141ab47cfaaSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4142ab47cfaaSmrg    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4143ab47cfaaSmrg    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4144ab47cfaaSmrg    _LT_AC_TAGVAR(include_expsyms, $1); do
4145ab47cfaaSmrg
4146ab47cfaaSmrg    case $var in
4147ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4148ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4149ab47cfaaSmrg    _LT_AC_TAGVAR(archive_cmds, $1) | \
4150ab47cfaaSmrg    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4151ab47cfaaSmrg    _LT_AC_TAGVAR(module_cmds, $1) | \
4152ab47cfaaSmrg    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4153ab47cfaaSmrg    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4154ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4155ab47cfaaSmrg    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4156ab47cfaaSmrg    postinstall_cmds | postuninstall_cmds | \
4157ab47cfaaSmrg    old_postinstall_cmds | old_postuninstall_cmds | \
4158ab47cfaaSmrg    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4159ab47cfaaSmrg      # Double-quote double-evaled strings.
4160ab47cfaaSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4161ab47cfaaSmrg      ;;
4162ab47cfaaSmrg    *)
4163ab47cfaaSmrg      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4164ab47cfaaSmrg      ;;
4165ab47cfaaSmrg    esac
4166ab47cfaaSmrg  done
4167ab47cfaaSmrg
4168ab47cfaaSmrg  case $lt_echo in
4169ab47cfaaSmrg  *'\[$]0 --fallback-echo"')
4170ab47cfaaSmrg    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4171ab47cfaaSmrg    ;;
4172ab47cfaaSmrg  esac
4173ab47cfaaSmrg
4174ab47cfaaSmrgifelse([$1], [],
4175ab47cfaaSmrg  [cfgfile="${ofile}T"
4176ab47cfaaSmrg  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4177ab47cfaaSmrg  $rm -f "$cfgfile"
4178ab47cfaaSmrg  AC_MSG_NOTICE([creating $ofile])],
4179ab47cfaaSmrg  [cfgfile="$ofile"])
4180ab47cfaaSmrg
4181ab47cfaaSmrg  cat <<__EOF__ >> "$cfgfile"
4182ab47cfaaSmrgifelse([$1], [],
4183ab47cfaaSmrg[#! $SHELL
4184ab47cfaaSmrg
4185ab47cfaaSmrg# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4186ab47cfaaSmrg# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4187ab47cfaaSmrg# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4188ab47cfaaSmrg#
4189ab47cfaaSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4190ab47cfaaSmrg# Free Software Foundation, Inc.
4191ab47cfaaSmrg#
4192ab47cfaaSmrg# This file is part of GNU Libtool:
4193ab47cfaaSmrg# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4194ab47cfaaSmrg#
4195ab47cfaaSmrg# This program is free software; you can redistribute it and/or modify
4196ab47cfaaSmrg# it under the terms of the GNU General Public License as published by
4197ab47cfaaSmrg# the Free Software Foundation; either version 2 of the License, or
4198ab47cfaaSmrg# (at your option) any later version.
4199ab47cfaaSmrg#
4200ab47cfaaSmrg# This program is distributed in the hope that it will be useful, but
4201ab47cfaaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
4202ab47cfaaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4203ab47cfaaSmrg# General Public License for more details.
4204ab47cfaaSmrg#
4205ab47cfaaSmrg# You should have received a copy of the GNU General Public License
4206ab47cfaaSmrg# along with this program; if not, write to the Free Software
4207ab47cfaaSmrg# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4208ab47cfaaSmrg#
4209ab47cfaaSmrg# As a special exception to the GNU General Public License, if you
4210ab47cfaaSmrg# distribute this file as part of a program that contains a
4211ab47cfaaSmrg# configuration script generated by Autoconf, you may include it under
4212ab47cfaaSmrg# the same distribution terms that you use for the rest of that program.
4213ab47cfaaSmrg
4214ab47cfaaSmrg# A sed program that does not truncate output.
4215ab47cfaaSmrgSED=$lt_SED
4216ab47cfaaSmrg
4217ab47cfaaSmrg# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4218ab47cfaaSmrgXsed="$SED -e 1s/^X//"
4219ab47cfaaSmrg
4220ab47cfaaSmrg# The HP-UX ksh and POSIX shell print the target directory to stdout
4221ab47cfaaSmrg# if CDPATH is set.
4222ab47cfaaSmrg(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4223ab47cfaaSmrg
4224ab47cfaaSmrg# The names of the tagged configurations supported by this script.
4225ab47cfaaSmrgavailable_tags=
4226ab47cfaaSmrg
4227ab47cfaaSmrg# ### BEGIN LIBTOOL CONFIG],
4228ab47cfaaSmrg[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4229ab47cfaaSmrg
4230ab47cfaaSmrg# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4231ab47cfaaSmrg
4232ab47cfaaSmrg# Shell to use when invoking shell scripts.
4233ab47cfaaSmrgSHELL=$lt_SHELL
4234ab47cfaaSmrg
4235ab47cfaaSmrg# Whether or not to build shared libraries.
4236ab47cfaaSmrgbuild_libtool_libs=$enable_shared
4237ab47cfaaSmrg
4238ab47cfaaSmrg# Whether or not to build static libraries.
4239ab47cfaaSmrgbuild_old_libs=$enable_static
4240ab47cfaaSmrg
4241ab47cfaaSmrg# Whether or not to add -lc for building shared libraries.
4242ab47cfaaSmrgbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4243ab47cfaaSmrg
4244ab47cfaaSmrg# Whether or not to disallow shared libs when runtime libs are static
4245ab47cfaaSmrgallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4246ab47cfaaSmrg
4247ab47cfaaSmrg# Whether or not to optimize for fast installation.
4248ab47cfaaSmrgfast_install=$enable_fast_install
4249ab47cfaaSmrg
4250ab47cfaaSmrg# The host system.
4251ab47cfaaSmrghost_alias=$host_alias
4252ab47cfaaSmrghost=$host
4253ab47cfaaSmrghost_os=$host_os
4254ab47cfaaSmrg
4255ab47cfaaSmrg# The build system.
4256ab47cfaaSmrgbuild_alias=$build_alias
4257ab47cfaaSmrgbuild=$build
4258ab47cfaaSmrgbuild_os=$build_os
4259ab47cfaaSmrg
4260ab47cfaaSmrg# An echo program that does not interpret backslashes.
4261ab47cfaaSmrgecho=$lt_echo
4262ab47cfaaSmrg
4263ab47cfaaSmrg# The archiver.
4264ab47cfaaSmrgAR=$lt_AR
4265ab47cfaaSmrgAR_FLAGS=$lt_AR_FLAGS
4266ab47cfaaSmrg
4267ab47cfaaSmrg# A C compiler.
4268ab47cfaaSmrgLTCC=$lt_LTCC
4269ab47cfaaSmrg
4270ab47cfaaSmrg# LTCC compiler flags.
4271ab47cfaaSmrgLTCFLAGS=$lt_LTCFLAGS
4272ab47cfaaSmrg
4273ab47cfaaSmrg# A language-specific compiler.
4274ab47cfaaSmrgCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4275ab47cfaaSmrg
4276ab47cfaaSmrg# Is the compiler the GNU C compiler?
4277ab47cfaaSmrgwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4278ab47cfaaSmrg
4279ab47cfaaSmrg# An ERE matcher.
4280ab47cfaaSmrgEGREP=$lt_EGREP
4281ab47cfaaSmrg
4282ab47cfaaSmrg# The linker used to build libraries.
4283ab47cfaaSmrgLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4284ab47cfaaSmrg
4285ab47cfaaSmrg# Whether we need hard or soft links.
4286ab47cfaaSmrgLN_S=$lt_LN_S
4287ab47cfaaSmrg
4288ab47cfaaSmrg# A BSD-compatible nm program.
4289ab47cfaaSmrgNM=$lt_NM
4290ab47cfaaSmrg
4291ab47cfaaSmrg# A symbol stripping program
4292ab47cfaaSmrgSTRIP=$lt_STRIP
4293ab47cfaaSmrg
4294ab47cfaaSmrg# Used to examine libraries when file_magic_cmd begins "file"
4295ab47cfaaSmrgMAGIC_CMD=$MAGIC_CMD
4296ab47cfaaSmrg
4297ab47cfaaSmrg# Used on cygwin: DLL creation program.
4298ab47cfaaSmrgDLLTOOL="$DLLTOOL"
4299ab47cfaaSmrg
4300ab47cfaaSmrg# Used on cygwin: object dumper.
4301ab47cfaaSmrgOBJDUMP="$OBJDUMP"
4302ab47cfaaSmrg
4303ab47cfaaSmrg# Used on cygwin: assembler.
4304ab47cfaaSmrgAS="$AS"
4305ab47cfaaSmrg
4306ab47cfaaSmrg# The name of the directory that contains temporary libtool files.
4307ab47cfaaSmrgobjdir=$objdir
4308ab47cfaaSmrg
4309ab47cfaaSmrg# How to create reloadable object files.
4310ab47cfaaSmrgreload_flag=$lt_reload_flag
4311ab47cfaaSmrgreload_cmds=$lt_reload_cmds
4312ab47cfaaSmrg
4313ab47cfaaSmrg# How to pass a linker flag through the compiler.
4314ab47cfaaSmrgwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4315ab47cfaaSmrg
4316ab47cfaaSmrg# Object file suffix (normally "o").
4317ab47cfaaSmrgobjext="$ac_objext"
4318ab47cfaaSmrg
4319ab47cfaaSmrg# Old archive suffix (normally "a").
4320ab47cfaaSmrglibext="$libext"
4321ab47cfaaSmrg
4322ab47cfaaSmrg# Shared library suffix (normally ".so").
4323ab47cfaaSmrgshrext_cmds='$shrext_cmds'
4324ab47cfaaSmrg
4325ab47cfaaSmrg# Executable file suffix (normally "").
4326ab47cfaaSmrgexeext="$exeext"
4327ab47cfaaSmrg
4328ab47cfaaSmrg# Additional compiler flags for building library objects.
4329ab47cfaaSmrgpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4330ab47cfaaSmrgpic_mode=$pic_mode
4331ab47cfaaSmrg
4332ab47cfaaSmrg# What is the maximum length of a command?
4333ab47cfaaSmrgmax_cmd_len=$lt_cv_sys_max_cmd_len
4334ab47cfaaSmrg
4335ab47cfaaSmrg# Does compiler simultaneously support -c and -o options?
4336ab47cfaaSmrgcompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4337ab47cfaaSmrg
4338ab47cfaaSmrg# Must we lock files when doing compilation?
4339ab47cfaaSmrgneed_locks=$lt_need_locks
4340ab47cfaaSmrg
4341ab47cfaaSmrg# Do we need the lib prefix for modules?
4342ab47cfaaSmrgneed_lib_prefix=$need_lib_prefix
4343ab47cfaaSmrg
4344ab47cfaaSmrg# Do we need a version for libraries?
4345ab47cfaaSmrgneed_version=$need_version
4346ab47cfaaSmrg
4347ab47cfaaSmrg# Whether dlopen is supported.
4348ab47cfaaSmrgdlopen_support=$enable_dlopen
4349ab47cfaaSmrg
4350ab47cfaaSmrg# Whether dlopen of programs is supported.
4351ab47cfaaSmrgdlopen_self=$enable_dlopen_self
4352ab47cfaaSmrg
4353ab47cfaaSmrg# Whether dlopen of statically linked programs is supported.
4354ab47cfaaSmrgdlopen_self_static=$enable_dlopen_self_static
4355ab47cfaaSmrg
4356ab47cfaaSmrg# Compiler flag to prevent dynamic linking.
4357ab47cfaaSmrglink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4358ab47cfaaSmrg
4359ab47cfaaSmrg# Compiler flag to turn off builtin functions.
4360ab47cfaaSmrgno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4361ab47cfaaSmrg
4362ab47cfaaSmrg# Compiler flag to allow reflexive dlopens.
4363ab47cfaaSmrgexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4364ab47cfaaSmrg
4365ab47cfaaSmrg# Compiler flag to generate shared objects directly from archives.
4366ab47cfaaSmrgwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4367ab47cfaaSmrg
4368ab47cfaaSmrg# Compiler flag to generate thread-safe objects.
4369ab47cfaaSmrgthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4370ab47cfaaSmrg
4371ab47cfaaSmrg# Library versioning type.
4372ab47cfaaSmrgversion_type=$version_type
4373ab47cfaaSmrg
4374ab47cfaaSmrg# Format of library name prefix.
4375ab47cfaaSmrglibname_spec=$lt_libname_spec
4376ab47cfaaSmrg
4377ab47cfaaSmrg# List of archive names.  First name is the real one, the rest are links.
4378ab47cfaaSmrg# The last name is the one that the linker finds with -lNAME.
4379ab47cfaaSmrglibrary_names_spec=$lt_library_names_spec
4380ab47cfaaSmrg
4381ab47cfaaSmrg# The coded name of the library, if different from the real name.
4382ab47cfaaSmrgsoname_spec=$lt_soname_spec
4383ab47cfaaSmrg
4384ab47cfaaSmrg# Commands used to build and install an old-style archive.
4385ab47cfaaSmrgRANLIB=$lt_RANLIB
4386ab47cfaaSmrgold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4387ab47cfaaSmrgold_postinstall_cmds=$lt_old_postinstall_cmds
4388ab47cfaaSmrgold_postuninstall_cmds=$lt_old_postuninstall_cmds
4389ab47cfaaSmrg
4390ab47cfaaSmrg# Create an old-style archive from a shared archive.
4391ab47cfaaSmrgold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4392ab47cfaaSmrg
4393ab47cfaaSmrg# Create a temporary old-style archive to link instead of a shared archive.
4394ab47cfaaSmrgold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4395ab47cfaaSmrg
4396ab47cfaaSmrg# Commands used to build and install a shared archive.
4397ab47cfaaSmrgarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4398ab47cfaaSmrgarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4399ab47cfaaSmrgpostinstall_cmds=$lt_postinstall_cmds
4400ab47cfaaSmrgpostuninstall_cmds=$lt_postuninstall_cmds
4401ab47cfaaSmrg
4402ab47cfaaSmrg# Commands used to build a loadable module (assumed same as above if empty)
4403ab47cfaaSmrgmodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4404ab47cfaaSmrgmodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4405ab47cfaaSmrg
4406ab47cfaaSmrg# Commands to strip libraries.
4407ab47cfaaSmrgold_striplib=$lt_old_striplib
4408ab47cfaaSmrgstriplib=$lt_striplib
4409ab47cfaaSmrg
4410ab47cfaaSmrg# Dependencies to place before the objects being linked to create a
4411ab47cfaaSmrg# shared library.
4412ab47cfaaSmrgpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4413ab47cfaaSmrg
4414ab47cfaaSmrg# Dependencies to place after the objects being linked to create a
4415ab47cfaaSmrg# shared library.
4416ab47cfaaSmrgpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4417ab47cfaaSmrg
4418ab47cfaaSmrg# Dependencies to place before the objects being linked to create a
4419ab47cfaaSmrg# shared library.
4420ab47cfaaSmrgpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4421ab47cfaaSmrg
4422ab47cfaaSmrg# Dependencies to place after the objects being linked to create a
4423ab47cfaaSmrg# shared library.
4424ab47cfaaSmrgpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4425ab47cfaaSmrg
4426ab47cfaaSmrg# The library search path used internally by the compiler when linking
4427ab47cfaaSmrg# a shared library.
4428ab47cfaaSmrgcompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4429ab47cfaaSmrg
4430ab47cfaaSmrg# Method to check whether dependent libraries are shared objects.
4431ab47cfaaSmrgdeplibs_check_method=$lt_deplibs_check_method
4432ab47cfaaSmrg
4433ab47cfaaSmrg# Command to use when deplibs_check_method == file_magic.
4434ab47cfaaSmrgfile_magic_cmd=$lt_file_magic_cmd
4435ab47cfaaSmrg
4436ab47cfaaSmrg# Flag that allows shared libraries with undefined symbols to be built.
4437ab47cfaaSmrgallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4438ab47cfaaSmrg
4439ab47cfaaSmrg# Flag that forces no undefined symbols.
4440ab47cfaaSmrgno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4441ab47cfaaSmrg
4442ab47cfaaSmrg# Commands used to finish a libtool library installation in a directory.
4443ab47cfaaSmrgfinish_cmds=$lt_finish_cmds
4444ab47cfaaSmrg
4445ab47cfaaSmrg# Same as above, but a single script fragment to be evaled but not shown.
4446ab47cfaaSmrgfinish_eval=$lt_finish_eval
4447ab47cfaaSmrg
4448ab47cfaaSmrg# Take the output of nm and produce a listing of raw symbols and C names.
4449ab47cfaaSmrgglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4450ab47cfaaSmrg
4451ab47cfaaSmrg# Transform the output of nm in a proper C declaration
4452ab47cfaaSmrgglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4453ab47cfaaSmrg
4454ab47cfaaSmrg# Transform the output of nm in a C name address pair
4455ab47cfaaSmrgglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4456ab47cfaaSmrg
4457ab47cfaaSmrg# This is the shared library runtime path variable.
4458ab47cfaaSmrgrunpath_var=$runpath_var
4459ab47cfaaSmrg
4460ab47cfaaSmrg# This is the shared library path variable.
4461ab47cfaaSmrgshlibpath_var=$shlibpath_var
4462ab47cfaaSmrg
4463ab47cfaaSmrg# Is shlibpath searched before the hard-coded library search path?
4464ab47cfaaSmrgshlibpath_overrides_runpath=$shlibpath_overrides_runpath
4465ab47cfaaSmrg
4466ab47cfaaSmrg# How to hardcode a shared library path into an executable.
4467ab47cfaaSmrghardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4468ab47cfaaSmrg
4469ab47cfaaSmrg# Whether we should hardcode library paths into libraries.
4470ab47cfaaSmrghardcode_into_libs=$hardcode_into_libs
4471ab47cfaaSmrg
4472ab47cfaaSmrg# Flag to hardcode \$libdir into a binary during linking.
4473ab47cfaaSmrg# This must work even if \$libdir does not exist.
4474ab47cfaaSmrghardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4475ab47cfaaSmrg
4476ab47cfaaSmrg# If ld is used when linking, flag to hardcode \$libdir into
4477ab47cfaaSmrg# a binary during linking. This must work even if \$libdir does
4478ab47cfaaSmrg# not exist.
4479ab47cfaaSmrghardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4480ab47cfaaSmrg
4481ab47cfaaSmrg# Whether we need a single -rpath flag with a separated argument.
4482ab47cfaaSmrghardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4483ab47cfaaSmrg
4484ab47cfaaSmrg# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4485ab47cfaaSmrg# resulting binary.
4486ab47cfaaSmrghardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4487ab47cfaaSmrg
4488ab47cfaaSmrg# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4489ab47cfaaSmrg# resulting binary.
4490ab47cfaaSmrghardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4491ab47cfaaSmrg
4492ab47cfaaSmrg# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4493ab47cfaaSmrg# the resulting binary.
4494ab47cfaaSmrghardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4495ab47cfaaSmrg
4496ab47cfaaSmrg# Set to yes if building a shared library automatically hardcodes DIR into the library
4497ab47cfaaSmrg# and all subsequent libraries and executables linked against it.
4498ab47cfaaSmrghardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4499ab47cfaaSmrg
4500ab47cfaaSmrg# Variables whose values should be saved in libtool wrapper scripts and
4501ab47cfaaSmrg# restored at relink time.
4502ab47cfaaSmrgvariables_saved_for_relink="$variables_saved_for_relink"
4503ab47cfaaSmrg
4504ab47cfaaSmrg# Whether libtool must link a program against all its dependency libraries.
4505ab47cfaaSmrglink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4506ab47cfaaSmrg
4507ab47cfaaSmrg# Compile-time system search path for libraries
4508ab47cfaaSmrgsys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4509ab47cfaaSmrg
4510ab47cfaaSmrg# Run-time system search path for libraries
4511ab47cfaaSmrgsys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4512ab47cfaaSmrg
4513ab47cfaaSmrg# Fix the shell variable \$srcfile for the compiler.
4514ab47cfaaSmrgfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4515ab47cfaaSmrg
4516ab47cfaaSmrg# Set to yes if exported symbols are required.
4517ab47cfaaSmrgalways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4518ab47cfaaSmrg
4519ab47cfaaSmrg# The commands to list exported symbols.
4520ab47cfaaSmrgexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4521ab47cfaaSmrg
4522ab47cfaaSmrg# The commands to extract the exported symbol list from a shared archive.
4523ab47cfaaSmrgextract_expsyms_cmds=$lt_extract_expsyms_cmds
4524ab47cfaaSmrg
4525ab47cfaaSmrg# Symbols that should not be listed in the preloaded symbols.
4526ab47cfaaSmrgexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4527ab47cfaaSmrg
4528ab47cfaaSmrg# Symbols that must always be exported.
4529ab47cfaaSmrginclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4530ab47cfaaSmrg
4531ab47cfaaSmrgifelse([$1],[],
4532ab47cfaaSmrg[# ### END LIBTOOL CONFIG],
4533ab47cfaaSmrg[# ### END LIBTOOL TAG CONFIG: $tagname])
4534ab47cfaaSmrg
4535ab47cfaaSmrg__EOF__
4536ab47cfaaSmrg
4537ab47cfaaSmrgifelse([$1],[], [
4538ab47cfaaSmrg  case $host_os in
4539ab47cfaaSmrg  aix3*)
4540ab47cfaaSmrg    cat <<\EOF >> "$cfgfile"
4541ab47cfaaSmrg
4542ab47cfaaSmrg# AIX sometimes has problems with the GCC collect2 program.  For some
4543ab47cfaaSmrg# reason, if we set the COLLECT_NAMES environment variable, the problems
4544ab47cfaaSmrg# vanish in a puff of smoke.
4545ab47cfaaSmrgif test "X${COLLECT_NAMES+set}" != Xset; then
4546ab47cfaaSmrg  COLLECT_NAMES=
4547ab47cfaaSmrg  export COLLECT_NAMES
4548ab47cfaaSmrgfi
4549ab47cfaaSmrgEOF
4550ab47cfaaSmrg    ;;
4551ab47cfaaSmrg  esac
4552ab47cfaaSmrg
4553ab47cfaaSmrg  # We use sed instead of cat because bash on DJGPP gets confused if
4554ab47cfaaSmrg  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4555ab47cfaaSmrg  # text mode, it properly converts lines to CR/LF.  This bash problem
4556ab47cfaaSmrg  # is reportedly fixed, but why not run on old versions too?
4557ab47cfaaSmrg  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4558ab47cfaaSmrg
4559ab47cfaaSmrg  mv -f "$cfgfile" "$ofile" || \
4560ab47cfaaSmrg    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4561ab47cfaaSmrg  chmod +x "$ofile"
4562ab47cfaaSmrg])
4563ab47cfaaSmrgelse
4564ab47cfaaSmrg  # If there is no Makefile yet, we rely on a make rule to execute
4565ab47cfaaSmrg  # `config.status --recheck' to rerun these tests and create the
4566ab47cfaaSmrg  # libtool script then.
4567ab47cfaaSmrg  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4568ab47cfaaSmrg  if test -f "$ltmain_in"; then
4569ab47cfaaSmrg    test -f Makefile && make "$ltmain"
4570ab47cfaaSmrg  fi
4571ab47cfaaSmrgfi
4572ab47cfaaSmrg])# AC_LIBTOOL_CONFIG
4573ab47cfaaSmrg
4574ab47cfaaSmrg
4575ab47cfaaSmrg# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4576ab47cfaaSmrg# -------------------------------------------
4577ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4578ab47cfaaSmrg[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4579ab47cfaaSmrg
4580ab47cfaaSmrg_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4581ab47cfaaSmrg
4582ab47cfaaSmrgif test "$GCC" = yes; then
4583ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4584ab47cfaaSmrg
4585ab47cfaaSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4586ab47cfaaSmrg    lt_cv_prog_compiler_rtti_exceptions,
4587ab47cfaaSmrg    [-fno-rtti -fno-exceptions], [],
4588ab47cfaaSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4589ab47cfaaSmrgfi
4590ab47cfaaSmrg])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4591ab47cfaaSmrg
4592ab47cfaaSmrg
4593ab47cfaaSmrg# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4594ab47cfaaSmrg# ---------------------------------
4595ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4596ab47cfaaSmrg[AC_REQUIRE([AC_CANONICAL_HOST])
4597ab47cfaaSmrgAC_REQUIRE([AC_PROG_NM])
4598ab47cfaaSmrgAC_REQUIRE([AC_OBJEXT])
4599ab47cfaaSmrg# Check for command to grab the raw symbol name followed by C symbol from nm.
4600ab47cfaaSmrgAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4601ab47cfaaSmrgAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4602ab47cfaaSmrg[
4603ab47cfaaSmrg# These are sane defaults that work on at least a few old systems.
4604ab47cfaaSmrg# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4605ab47cfaaSmrg
4606ab47cfaaSmrg# Character class describing NM global symbol codes.
4607ab47cfaaSmrgsymcode='[[BCDEGRST]]'
4608ab47cfaaSmrg
4609ab47cfaaSmrg# Regexp to match symbols that can be accessed directly from C.
4610ab47cfaaSmrgsympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4611ab47cfaaSmrg
4612ab47cfaaSmrg# Transform an extracted symbol line into a proper C declaration
4613ab47cfaaSmrglt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4614ab47cfaaSmrg
4615ab47cfaaSmrg# Transform an extracted symbol line into symbol name and symbol address
4616ab47cfaaSmrglt_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'"
4617ab47cfaaSmrg
4618ab47cfaaSmrg# Define system-specific variables.
4619ab47cfaaSmrgcase $host_os in
4620ab47cfaaSmrgaix*)
4621ab47cfaaSmrg  symcode='[[BCDT]]'
4622ab47cfaaSmrg  ;;
4623ab47cfaaSmrgcygwin* | mingw* | pw32*)
4624ab47cfaaSmrg  symcode='[[ABCDGISTW]]'
4625ab47cfaaSmrg  ;;
4626ab47cfaaSmrghpux*) # Its linker distinguishes data from code symbols
4627ab47cfaaSmrg  if test "$host_cpu" = ia64; then
4628ab47cfaaSmrg    symcode='[[ABCDEGRST]]'
4629ab47cfaaSmrg  fi
4630ab47cfaaSmrg  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4631ab47cfaaSmrg  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'"
4632ab47cfaaSmrg  ;;
4633ab47cfaaSmrglinux* | k*bsd*-gnu)
4634ab47cfaaSmrg  if test "$host_cpu" = ia64; then
4635ab47cfaaSmrg    symcode='[[ABCDGIRSTW]]'
4636ab47cfaaSmrg    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4637ab47cfaaSmrg    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'"
4638ab47cfaaSmrg  fi
4639ab47cfaaSmrg  ;;
4640ab47cfaaSmrgirix* | nonstopux*)
4641ab47cfaaSmrg  symcode='[[BCDEGRST]]'
4642ab47cfaaSmrg  ;;
4643ab47cfaaSmrgosf*)
4644ab47cfaaSmrg  symcode='[[BCDEGQRST]]'
4645ab47cfaaSmrg  ;;
4646ab47cfaaSmrgsolaris*)
4647ab47cfaaSmrg  symcode='[[BDRT]]'
4648ab47cfaaSmrg  ;;
4649ab47cfaaSmrgsco3.2v5*)
4650ab47cfaaSmrg  symcode='[[DT]]'
4651ab47cfaaSmrg  ;;
4652ab47cfaaSmrgsysv4.2uw2*)
4653ab47cfaaSmrg  symcode='[[DT]]'
4654ab47cfaaSmrg  ;;
4655ab47cfaaSmrgsysv5* | sco5v6* | unixware* | OpenUNIX*)
4656ab47cfaaSmrg  symcode='[[ABDT]]'
4657ab47cfaaSmrg  ;;
4658ab47cfaaSmrgsysv4)
4659ab47cfaaSmrg  symcode='[[DFNSTU]]'
4660ab47cfaaSmrg  ;;
4661ab47cfaaSmrgesac
4662ab47cfaaSmrg
4663ab47cfaaSmrg# Handle CRLF in mingw tool chain
4664ab47cfaaSmrgopt_cr=
4665ab47cfaaSmrgcase $build_os in
4666ab47cfaaSmrgmingw*)
4667ab47cfaaSmrg  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4668ab47cfaaSmrg  ;;
4669ab47cfaaSmrgesac
4670ab47cfaaSmrg
4671ab47cfaaSmrg# If we're using GNU nm, then use its standard symbol codes.
4672ab47cfaaSmrgcase `$NM -V 2>&1` in
4673ab47cfaaSmrg*GNU* | *'with BFD'*)
4674ab47cfaaSmrg  symcode='[[ABCDGIRSTW]]' ;;
4675ab47cfaaSmrgesac
4676ab47cfaaSmrg
4677ab47cfaaSmrg# Try without a prefix undercore, then with it.
4678ab47cfaaSmrgfor ac_symprfx in "" "_"; do
4679ab47cfaaSmrg
4680ab47cfaaSmrg  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4681ab47cfaaSmrg  symxfrm="\\1 $ac_symprfx\\2 \\2"
4682ab47cfaaSmrg
4683ab47cfaaSmrg  # Write the raw and C identifiers.
4684ab47cfaaSmrg  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4685ab47cfaaSmrg
4686ab47cfaaSmrg  # Check to see that the pipe works correctly.
4687ab47cfaaSmrg  pipe_works=no
4688ab47cfaaSmrg
4689ab47cfaaSmrg  rm -f conftest*
4690ab47cfaaSmrg  cat > conftest.$ac_ext <<EOF
4691ab47cfaaSmrg#ifdef __cplusplus
4692ab47cfaaSmrgextern "C" {
4693ab47cfaaSmrg#endif
4694ab47cfaaSmrgchar nm_test_var;
4695ab47cfaaSmrgvoid nm_test_func(){}
4696ab47cfaaSmrg#ifdef __cplusplus
4697ab47cfaaSmrg}
4698ab47cfaaSmrg#endif
4699ab47cfaaSmrgint main(){nm_test_var='a';nm_test_func();return(0);}
4700ab47cfaaSmrgEOF
4701ab47cfaaSmrg
4702ab47cfaaSmrg  if AC_TRY_EVAL(ac_compile); then
4703ab47cfaaSmrg    # Now try to grab the symbols.
4704ab47cfaaSmrg    nlist=conftest.nm
4705ab47cfaaSmrg    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4706ab47cfaaSmrg      # Try sorting and uniquifying the output.
4707ab47cfaaSmrg      if sort "$nlist" | uniq > "$nlist"T; then
4708ab47cfaaSmrg	mv -f "$nlist"T "$nlist"
4709ab47cfaaSmrg      else
4710ab47cfaaSmrg	rm -f "$nlist"T
4711ab47cfaaSmrg      fi
4712ab47cfaaSmrg
4713ab47cfaaSmrg      # Make sure that we snagged all the symbols we need.
4714ab47cfaaSmrg      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4715ab47cfaaSmrg	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4716ab47cfaaSmrg	  cat <<EOF > conftest.$ac_ext
4717ab47cfaaSmrg#ifdef __cplusplus
4718ab47cfaaSmrgextern "C" {
4719ab47cfaaSmrg#endif
4720ab47cfaaSmrg
4721ab47cfaaSmrgEOF
4722ab47cfaaSmrg	  # Now generate the symbol file.
4723ab47cfaaSmrg	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4724ab47cfaaSmrg
4725ab47cfaaSmrg	  cat <<EOF >> conftest.$ac_ext
4726ab47cfaaSmrg#if defined (__STDC__) && __STDC__
4727ab47cfaaSmrg# define lt_ptr_t void *
4728ab47cfaaSmrg#else
4729ab47cfaaSmrg# define lt_ptr_t char *
4730ab47cfaaSmrg# define const
4731ab47cfaaSmrg#endif
4732ab47cfaaSmrg
4733ab47cfaaSmrg/* The mapping between symbol names and symbols. */
4734ab47cfaaSmrgconst struct {
4735ab47cfaaSmrg  const char *name;
4736ab47cfaaSmrg  lt_ptr_t address;
4737ab47cfaaSmrg}
4738ab47cfaaSmrglt_preloaded_symbols[[]] =
4739ab47cfaaSmrg{
4740ab47cfaaSmrgEOF
4741ab47cfaaSmrg	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4742ab47cfaaSmrg	  cat <<\EOF >> conftest.$ac_ext
4743ab47cfaaSmrg  {0, (lt_ptr_t) 0}
4744ab47cfaaSmrg};
4745ab47cfaaSmrg
4746ab47cfaaSmrg#ifdef __cplusplus
4747ab47cfaaSmrg}
4748ab47cfaaSmrg#endif
4749ab47cfaaSmrgEOF
4750ab47cfaaSmrg	  # Now try linking the two files.
4751ab47cfaaSmrg	  mv conftest.$ac_objext conftstm.$ac_objext
4752ab47cfaaSmrg	  lt_save_LIBS="$LIBS"
4753ab47cfaaSmrg	  lt_save_CFLAGS="$CFLAGS"
4754ab47cfaaSmrg	  LIBS="conftstm.$ac_objext"
4755ab47cfaaSmrg	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4756ab47cfaaSmrg	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4757ab47cfaaSmrg	    pipe_works=yes
4758ab47cfaaSmrg	  fi
4759ab47cfaaSmrg	  LIBS="$lt_save_LIBS"
4760ab47cfaaSmrg	  CFLAGS="$lt_save_CFLAGS"
4761ab47cfaaSmrg	else
4762ab47cfaaSmrg	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4763ab47cfaaSmrg	fi
4764ab47cfaaSmrg      else
4765ab47cfaaSmrg	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4766ab47cfaaSmrg      fi
4767ab47cfaaSmrg    else
4768ab47cfaaSmrg      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4769ab47cfaaSmrg    fi
4770ab47cfaaSmrg  else
4771ab47cfaaSmrg    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4772ab47cfaaSmrg    cat conftest.$ac_ext >&5
4773ab47cfaaSmrg  fi
4774ab47cfaaSmrg  rm -f conftest* conftst*
4775ab47cfaaSmrg
4776ab47cfaaSmrg  # Do not use the global_symbol_pipe unless it works.
4777ab47cfaaSmrg  if test "$pipe_works" = yes; then
4778ab47cfaaSmrg    break
4779ab47cfaaSmrg  else
4780ab47cfaaSmrg    lt_cv_sys_global_symbol_pipe=
4781ab47cfaaSmrg  fi
4782ab47cfaaSmrgdone
4783ab47cfaaSmrg])
4784ab47cfaaSmrgif test -z "$lt_cv_sys_global_symbol_pipe"; then
4785ab47cfaaSmrg  lt_cv_sys_global_symbol_to_cdecl=
4786ab47cfaaSmrgfi
4787ab47cfaaSmrgif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4788ab47cfaaSmrg  AC_MSG_RESULT(failed)
4789ab47cfaaSmrgelse
4790ab47cfaaSmrg  AC_MSG_RESULT(ok)
4791ab47cfaaSmrgfi
4792ab47cfaaSmrg]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4793ab47cfaaSmrg
4794ab47cfaaSmrg
4795ab47cfaaSmrg# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4796ab47cfaaSmrg# ---------------------------------------
4797ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4798ab47cfaaSmrg[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4799ab47cfaaSmrg_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4800ab47cfaaSmrg_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4801ab47cfaaSmrg
4802ab47cfaaSmrgAC_MSG_CHECKING([for $compiler option to produce PIC])
4803ab47cfaaSmrg ifelse([$1],[CXX],[
4804ab47cfaaSmrg  # C++ specific cases for pic, static, wl, etc.
4805ab47cfaaSmrg  if test "$GXX" = yes; then
4806ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4807ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4808ab47cfaaSmrg
4809ab47cfaaSmrg    case $host_os in
4810ab47cfaaSmrg    aix*)
4811ab47cfaaSmrg      # All AIX code is PIC.
4812ab47cfaaSmrg      if test "$host_cpu" = ia64; then
4813ab47cfaaSmrg	# AIX 5 now supports IA64 processor
4814ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4815ab47cfaaSmrg      fi
4816ab47cfaaSmrg      ;;
4817ab47cfaaSmrg    amigaos*)
4818ab47cfaaSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
4819ab47cfaaSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
4820ab47cfaaSmrg      # like `-m68040'.
4821ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4822ab47cfaaSmrg      ;;
4823ab47cfaaSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4824ab47cfaaSmrg      # PIC is the default for these OSes.
4825ab47cfaaSmrg      ;;
4826ab47cfaaSmrg    mingw* | os2* | pw32*)
4827ab47cfaaSmrg      # This hack is so that the source file can tell whether it is being
4828ab47cfaaSmrg      # built for inclusion in a dll (and should export symbols for example).
4829ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4830ab47cfaaSmrg      ;;
4831ab47cfaaSmrg    darwin* | rhapsody*)
4832ab47cfaaSmrg      # PIC is the default on this platform
4833ab47cfaaSmrg      # Common symbols not allowed in MH_DYLIB files
4834ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4835ab47cfaaSmrg      ;;
4836ab47cfaaSmrg    *djgpp*)
4837ab47cfaaSmrg      # DJGPP does not support shared libraries at all
4838ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4839ab47cfaaSmrg      ;;
4840ab47cfaaSmrg    interix3*)
4841ab47cfaaSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4842ab47cfaaSmrg      # Instead, we relocate shared libraries at runtime.
4843ab47cfaaSmrg      ;;
4844ab47cfaaSmrg    sysv4*MP*)
4845ab47cfaaSmrg      if test -d /usr/nec; then
4846ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4847ab47cfaaSmrg      fi
4848ab47cfaaSmrg      ;;
4849ab47cfaaSmrg    hpux*)
4850ab47cfaaSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4851ab47cfaaSmrg      # not for PA HP-UX.
4852ab47cfaaSmrg      case $host_cpu in
4853ab47cfaaSmrg      hppa*64*|ia64*)
4854ab47cfaaSmrg	;;
4855ab47cfaaSmrg      *)
4856ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4857ab47cfaaSmrg	;;
4858ab47cfaaSmrg      esac
4859ab47cfaaSmrg      ;;
4860ab47cfaaSmrg    *)
4861ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4862ab47cfaaSmrg      ;;
4863ab47cfaaSmrg    esac
4864ab47cfaaSmrg  else
4865ab47cfaaSmrg    case $host_os in
4866ab47cfaaSmrg      aix4* | aix5*)
4867ab47cfaaSmrg	# All AIX code is PIC.
4868ab47cfaaSmrg	if test "$host_cpu" = ia64; then
4869ab47cfaaSmrg	  # AIX 5 now supports IA64 processor
4870ab47cfaaSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4871ab47cfaaSmrg	else
4872ab47cfaaSmrg	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4873ab47cfaaSmrg	fi
4874ab47cfaaSmrg	;;
4875ab47cfaaSmrg      chorus*)
4876ab47cfaaSmrg	case $cc_basename in
4877ab47cfaaSmrg	cxch68*)
4878ab47cfaaSmrg	  # Green Hills C++ Compiler
4879ab47cfaaSmrg	  # _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"
4880ab47cfaaSmrg	  ;;
4881ab47cfaaSmrg	esac
4882ab47cfaaSmrg	;;
4883ab47cfaaSmrg       darwin*)
4884ab47cfaaSmrg         # PIC is the default on this platform
4885ab47cfaaSmrg         # Common symbols not allowed in MH_DYLIB files
4886ab47cfaaSmrg         case $cc_basename in
4887ab47cfaaSmrg           xlc*)
4888ab47cfaaSmrg           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4889ab47cfaaSmrg           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4890ab47cfaaSmrg           ;;
4891ab47cfaaSmrg         esac
4892ab47cfaaSmrg       ;;
4893ab47cfaaSmrg      dgux*)
4894ab47cfaaSmrg	case $cc_basename in
4895ab47cfaaSmrg	  ec++*)
4896ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4897ab47cfaaSmrg	    ;;
4898ab47cfaaSmrg	  ghcx*)
4899ab47cfaaSmrg	    # Green Hills C++ Compiler
4900ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4901ab47cfaaSmrg	    ;;
4902ab47cfaaSmrg	  *)
4903ab47cfaaSmrg	    ;;
4904ab47cfaaSmrg	esac
4905ab47cfaaSmrg	;;
4906ab47cfaaSmrg      freebsd* | dragonfly*)
4907ab47cfaaSmrg	# FreeBSD uses GNU C++
4908ab47cfaaSmrg	;;
4909ab47cfaaSmrg      hpux9* | hpux10* | hpux11*)
4910ab47cfaaSmrg	case $cc_basename in
4911ab47cfaaSmrg	  CC*)
4912ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4913ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4914ab47cfaaSmrg	    if test "$host_cpu" != ia64; then
4915ab47cfaaSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4916ab47cfaaSmrg	    fi
4917ab47cfaaSmrg	    ;;
4918ab47cfaaSmrg	  aCC*)
4919ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4920ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4921ab47cfaaSmrg	    case $host_cpu in
4922ab47cfaaSmrg	    hppa*64*|ia64*)
4923ab47cfaaSmrg	      # +Z the default
4924ab47cfaaSmrg	      ;;
4925ab47cfaaSmrg	    *)
4926ab47cfaaSmrg	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4927ab47cfaaSmrg	      ;;
4928ab47cfaaSmrg	    esac
4929ab47cfaaSmrg	    ;;
4930ab47cfaaSmrg	  *)
4931ab47cfaaSmrg	    ;;
4932ab47cfaaSmrg	esac
4933ab47cfaaSmrg	;;
4934ab47cfaaSmrg      interix*)
4935ab47cfaaSmrg	# This is c89, which is MS Visual C++ (no shared libs)
4936ab47cfaaSmrg	# Anyone wants to do a port?
4937ab47cfaaSmrg	;;
4938ab47cfaaSmrg      irix5* | irix6* | nonstopux*)
4939ab47cfaaSmrg	case $cc_basename in
4940ab47cfaaSmrg	  CC*)
4941ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4942ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4943ab47cfaaSmrg	    # CC pic flag -KPIC is the default.
4944ab47cfaaSmrg	    ;;
4945ab47cfaaSmrg	  *)
4946ab47cfaaSmrg	    ;;
4947ab47cfaaSmrg	esac
4948ab47cfaaSmrg	;;
4949ab47cfaaSmrg      linux* | k*bsd*-gnu)
4950ab47cfaaSmrg	case $cc_basename in
4951ab47cfaaSmrg	  KCC*)
4952ab47cfaaSmrg	    # KAI C++ Compiler
4953ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4954ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4955ab47cfaaSmrg	    ;;
4956ab47cfaaSmrg	  icpc* | ecpc*)
4957ab47cfaaSmrg	    # Intel C++
4958ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4959ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4960ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4961ab47cfaaSmrg	    ;;
4962ab47cfaaSmrg	  pgCC*)
4963ab47cfaaSmrg	    # Portland Group C++ compiler.
4964ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4965ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4966ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4967ab47cfaaSmrg	    ;;
4968ab47cfaaSmrg	  cxx*)
4969ab47cfaaSmrg	    # Compaq C++
4970ab47cfaaSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
4971ab47cfaaSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
4972ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4973ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4974ab47cfaaSmrg	    ;;
4975ab47cfaaSmrg	  *)
4976ab47cfaaSmrg	    ;;
4977ab47cfaaSmrg	esac
4978ab47cfaaSmrg	;;
4979ab47cfaaSmrg      lynxos*)
4980ab47cfaaSmrg	;;
4981ab47cfaaSmrg      m88k*)
4982ab47cfaaSmrg	;;
4983ab47cfaaSmrg      mvs*)
4984ab47cfaaSmrg	case $cc_basename in
4985ab47cfaaSmrg	  cxx*)
4986ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4987ab47cfaaSmrg	    ;;
4988ab47cfaaSmrg	  *)
4989ab47cfaaSmrg	    ;;
4990ab47cfaaSmrg	esac
4991ab47cfaaSmrg	;;
4992ab47cfaaSmrg      netbsd* | netbsdelf*-gnu)
4993ab47cfaaSmrg	;;
4994ab47cfaaSmrg      osf3* | osf4* | osf5*)
4995ab47cfaaSmrg	case $cc_basename in
4996ab47cfaaSmrg	  KCC*)
4997ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4998ab47cfaaSmrg	    ;;
4999ab47cfaaSmrg	  RCC*)
5000ab47cfaaSmrg	    # Rational C++ 2.4.1
5001ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5002ab47cfaaSmrg	    ;;
5003ab47cfaaSmrg	  cxx*)
5004ab47cfaaSmrg	    # Digital/Compaq C++
5005ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5006ab47cfaaSmrg	    # Make sure the PIC flag is empty.  It appears that all Alpha
5007ab47cfaaSmrg	    # Linux and Compaq Tru64 Unix objects are PIC.
5008ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5009ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5010ab47cfaaSmrg	    ;;
5011ab47cfaaSmrg	  *)
5012ab47cfaaSmrg	    ;;
5013ab47cfaaSmrg	esac
5014ab47cfaaSmrg	;;
5015ab47cfaaSmrg      psos*)
5016ab47cfaaSmrg	;;
5017ab47cfaaSmrg      solaris*)
5018ab47cfaaSmrg	case $cc_basename in
5019ab47cfaaSmrg	  CC*)
5020ab47cfaaSmrg	    # Sun C++ 4.2, 5.x and Centerline C++
5021ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5022ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5023ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5024ab47cfaaSmrg	    ;;
5025ab47cfaaSmrg	  gcx*)
5026ab47cfaaSmrg	    # Green Hills C++ Compiler
5027ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5028ab47cfaaSmrg	    ;;
5029ab47cfaaSmrg	  *)
5030ab47cfaaSmrg	    ;;
5031ab47cfaaSmrg	esac
5032ab47cfaaSmrg	;;
5033ab47cfaaSmrg      sunos4*)
5034ab47cfaaSmrg	case $cc_basename in
5035ab47cfaaSmrg	  CC*)
5036ab47cfaaSmrg	    # Sun C++ 4.x
5037ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5038ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5039ab47cfaaSmrg	    ;;
5040ab47cfaaSmrg	  lcc*)
5041ab47cfaaSmrg	    # Lucid
5042ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5043ab47cfaaSmrg	    ;;
5044ab47cfaaSmrg	  *)
5045ab47cfaaSmrg	    ;;
5046ab47cfaaSmrg	esac
5047ab47cfaaSmrg	;;
5048ab47cfaaSmrg      tandem*)
5049ab47cfaaSmrg	case $cc_basename in
5050ab47cfaaSmrg	  NCC*)
5051ab47cfaaSmrg	    # NonStop-UX NCC 3.20
5052ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5053ab47cfaaSmrg	    ;;
5054ab47cfaaSmrg	  *)
5055ab47cfaaSmrg	    ;;
5056ab47cfaaSmrg	esac
5057ab47cfaaSmrg	;;
5058ab47cfaaSmrg      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5059ab47cfaaSmrg	case $cc_basename in
5060ab47cfaaSmrg	  CC*)
5061ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5062ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5063ab47cfaaSmrg	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5064ab47cfaaSmrg	    ;;
5065ab47cfaaSmrg	esac
5066ab47cfaaSmrg	;;
5067ab47cfaaSmrg      vxworks*)
5068ab47cfaaSmrg	;;
5069ab47cfaaSmrg      *)
5070ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5071ab47cfaaSmrg	;;
5072ab47cfaaSmrg    esac
5073ab47cfaaSmrg  fi
5074ab47cfaaSmrg],
5075ab47cfaaSmrg[
5076ab47cfaaSmrg  if test "$GCC" = yes; then
5077ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5078ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5079ab47cfaaSmrg
5080ab47cfaaSmrg    case $host_os in
5081ab47cfaaSmrg      aix*)
5082ab47cfaaSmrg      # All AIX code is PIC.
5083ab47cfaaSmrg      if test "$host_cpu" = ia64; then
5084ab47cfaaSmrg	# AIX 5 now supports IA64 processor
5085ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5086ab47cfaaSmrg      fi
5087ab47cfaaSmrg      ;;
5088ab47cfaaSmrg
5089ab47cfaaSmrg    amigaos*)
5090ab47cfaaSmrg      # FIXME: we need at least 68020 code to build shared libraries, but
5091ab47cfaaSmrg      # adding the `-m68020' flag to GCC prevents building anything better,
5092ab47cfaaSmrg      # like `-m68040'.
5093ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5094ab47cfaaSmrg      ;;
5095ab47cfaaSmrg
5096ab47cfaaSmrg    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5097ab47cfaaSmrg      # PIC is the default for these OSes.
5098ab47cfaaSmrg      ;;
5099ab47cfaaSmrg
5100ab47cfaaSmrg    mingw* | pw32* | os2*)
5101ab47cfaaSmrg      # This hack is so that the source file can tell whether it is being
5102ab47cfaaSmrg      # built for inclusion in a dll (and should export symbols for example).
5103ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5104ab47cfaaSmrg      ;;
5105ab47cfaaSmrg
5106ab47cfaaSmrg    darwin* | rhapsody*)
5107ab47cfaaSmrg      # PIC is the default on this platform
5108ab47cfaaSmrg      # Common symbols not allowed in MH_DYLIB files
5109ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5110ab47cfaaSmrg      ;;
5111ab47cfaaSmrg
5112ab47cfaaSmrg    interix3*)
5113ab47cfaaSmrg      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5114ab47cfaaSmrg      # Instead, we relocate shared libraries at runtime.
5115ab47cfaaSmrg      ;;
5116ab47cfaaSmrg
5117ab47cfaaSmrg    msdosdjgpp*)
5118ab47cfaaSmrg      # Just because we use GCC doesn't mean we suddenly get shared libraries
5119ab47cfaaSmrg      # on systems that don't support them.
5120ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5121ab47cfaaSmrg      enable_shared=no
5122ab47cfaaSmrg      ;;
5123ab47cfaaSmrg
5124ab47cfaaSmrg    sysv4*MP*)
5125ab47cfaaSmrg      if test -d /usr/nec; then
5126ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5127ab47cfaaSmrg      fi
5128ab47cfaaSmrg      ;;
5129ab47cfaaSmrg
5130ab47cfaaSmrg    hpux*)
5131ab47cfaaSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5132ab47cfaaSmrg      # not for PA HP-UX.
5133ab47cfaaSmrg      case $host_cpu in
5134ab47cfaaSmrg      hppa*64*|ia64*)
5135ab47cfaaSmrg	# +Z the default
5136ab47cfaaSmrg	;;
5137ab47cfaaSmrg      *)
5138ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5139ab47cfaaSmrg	;;
5140ab47cfaaSmrg      esac
5141ab47cfaaSmrg      ;;
5142ab47cfaaSmrg
5143ab47cfaaSmrg    *)
5144ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5145ab47cfaaSmrg      ;;
5146ab47cfaaSmrg    esac
5147ab47cfaaSmrg  else
5148ab47cfaaSmrg    # PORTME Check for flag to pass linker flags through the system compiler.
5149ab47cfaaSmrg    case $host_os in
5150ab47cfaaSmrg    aix*)
5151ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5152ab47cfaaSmrg      if test "$host_cpu" = ia64; then
5153ab47cfaaSmrg	# AIX 5 now supports IA64 processor
5154ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5155ab47cfaaSmrg      else
5156ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5157ab47cfaaSmrg      fi
5158ab47cfaaSmrg      ;;
5159ab47cfaaSmrg      darwin*)
5160ab47cfaaSmrg        # PIC is the default on this platform
5161ab47cfaaSmrg        # Common symbols not allowed in MH_DYLIB files
5162ab47cfaaSmrg       case $cc_basename in
5163ab47cfaaSmrg         xlc*)
5164ab47cfaaSmrg         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5165ab47cfaaSmrg         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5166ab47cfaaSmrg         ;;
5167ab47cfaaSmrg       esac
5168ab47cfaaSmrg       ;;
5169ab47cfaaSmrg
5170ab47cfaaSmrg    mingw* | pw32* | os2*)
5171ab47cfaaSmrg      # This hack is so that the source file can tell whether it is being
5172ab47cfaaSmrg      # built for inclusion in a dll (and should export symbols for example).
5173ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5174ab47cfaaSmrg      ;;
5175ab47cfaaSmrg
5176ab47cfaaSmrg    hpux9* | hpux10* | hpux11*)
5177ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5178ab47cfaaSmrg      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5179ab47cfaaSmrg      # not for PA HP-UX.
5180ab47cfaaSmrg      case $host_cpu in
5181ab47cfaaSmrg      hppa*64*|ia64*)
5182ab47cfaaSmrg	# +Z the default
5183ab47cfaaSmrg	;;
5184ab47cfaaSmrg      *)
5185ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5186ab47cfaaSmrg	;;
5187ab47cfaaSmrg      esac
5188ab47cfaaSmrg      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5189ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5190ab47cfaaSmrg      ;;
5191ab47cfaaSmrg
5192ab47cfaaSmrg    irix5* | irix6* | nonstopux*)
5193ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5194ab47cfaaSmrg      # PIC (with -KPIC) is the default.
5195ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5196ab47cfaaSmrg      ;;
5197ab47cfaaSmrg
5198ab47cfaaSmrg    newsos6)
5199ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5200ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5201ab47cfaaSmrg      ;;
5202ab47cfaaSmrg
5203ab47cfaaSmrg    linux* | k*bsd*-gnu)
5204ab47cfaaSmrg      case $cc_basename in
5205ab47cfaaSmrg      icc* | ecc*)
5206ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5207ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5208ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5209ab47cfaaSmrg        ;;
5210ab47cfaaSmrg      pgcc* | pgf77* | pgf90* | pgf95*)
5211ab47cfaaSmrg        # Portland Group compilers (*not* the Pentium gcc compiler,
5212ab47cfaaSmrg	# which looks to be a dead project)
5213ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5214ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5215ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5216ab47cfaaSmrg        ;;
5217ab47cfaaSmrg      ccc*)
5218ab47cfaaSmrg        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5219ab47cfaaSmrg        # All Alpha code is PIC.
5220ab47cfaaSmrg        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5221ab47cfaaSmrg        ;;
5222ab47cfaaSmrg      esac
5223ab47cfaaSmrg      ;;
5224ab47cfaaSmrg
5225ab47cfaaSmrg    osf3* | osf4* | osf5*)
5226ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5227ab47cfaaSmrg      # All OSF/1 code is PIC.
5228ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5229ab47cfaaSmrg      ;;
5230ab47cfaaSmrg
5231ab47cfaaSmrg    solaris*)
5232ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5233ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5234ab47cfaaSmrg      case $cc_basename in
5235ab47cfaaSmrg      f77* | f90* | f95*)
5236ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5237ab47cfaaSmrg      *)
5238ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5239ab47cfaaSmrg      esac
5240ab47cfaaSmrg      ;;
5241ab47cfaaSmrg
5242ab47cfaaSmrg    sunos4*)
5243ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5244ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5245ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5246ab47cfaaSmrg      ;;
5247ab47cfaaSmrg
5248ab47cfaaSmrg    sysv4 | sysv4.2uw2* | sysv4.3*)
5249ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5250ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5251ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5252ab47cfaaSmrg      ;;
5253ab47cfaaSmrg
5254ab47cfaaSmrg    sysv4*MP*)
5255ab47cfaaSmrg      if test -d /usr/nec ;then
5256ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5257ab47cfaaSmrg	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5258ab47cfaaSmrg      fi
5259ab47cfaaSmrg      ;;
5260ab47cfaaSmrg
5261ab47cfaaSmrg    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5262ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5263ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5264ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5265ab47cfaaSmrg      ;;
5266ab47cfaaSmrg
5267ab47cfaaSmrg    unicos*)
5268ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5269ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5270ab47cfaaSmrg      ;;
5271ab47cfaaSmrg
5272ab47cfaaSmrg    uts4*)
5273ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5274ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5275ab47cfaaSmrg      ;;
5276ab47cfaaSmrg
5277ab47cfaaSmrg    *)
5278ab47cfaaSmrg      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5279ab47cfaaSmrg      ;;
5280ab47cfaaSmrg    esac
5281ab47cfaaSmrg  fi
5282ab47cfaaSmrg])
5283ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5284ab47cfaaSmrg
5285ab47cfaaSmrg#
5286ab47cfaaSmrg# Check to make sure the PIC flag actually works.
5287ab47cfaaSmrg#
5288ab47cfaaSmrgif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5289ab47cfaaSmrg  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5290ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5291ab47cfaaSmrg    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5292ab47cfaaSmrg    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5293ab47cfaaSmrg     "" | " "*) ;;
5294ab47cfaaSmrg     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5295ab47cfaaSmrg     esac],
5296ab47cfaaSmrg    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5297ab47cfaaSmrg     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5298ab47cfaaSmrgfi
5299ab47cfaaSmrgcase $host_os in
5300ab47cfaaSmrg  # For platforms which do not support PIC, -DPIC is meaningless:
5301ab47cfaaSmrg  *djgpp*)
5302ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5303ab47cfaaSmrg    ;;
5304ab47cfaaSmrg  *)
5305ab47cfaaSmrg    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5306ab47cfaaSmrg    ;;
5307ab47cfaaSmrgesac
5308ab47cfaaSmrg
5309ab47cfaaSmrg#
5310ab47cfaaSmrg# Check to make sure the static flag actually works.
5311ab47cfaaSmrg#
5312ab47cfaaSmrgwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5313ab47cfaaSmrgAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5314ab47cfaaSmrg  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5315ab47cfaaSmrg  $lt_tmp_static_flag,
5316ab47cfaaSmrg  [],
5317ab47cfaaSmrg  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5318ab47cfaaSmrg])
5319ab47cfaaSmrg
5320ab47cfaaSmrg
5321ab47cfaaSmrg# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5322ab47cfaaSmrg# ------------------------------------
5323ab47cfaaSmrg# See if the linker supports building shared libraries.
5324ab47cfaaSmrgAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5325ab47cfaaSmrg[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5326ab47cfaaSmrgifelse([$1],[CXX],[
5327ab47cfaaSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5328ab47cfaaSmrg  case $host_os in
5329ab47cfaaSmrg  aix4* | aix5*)
5330ab47cfaaSmrg    # If we're using GNU nm, then we don't want the "-C" option.
5331ab47cfaaSmrg    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5332ab47cfaaSmrg    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5333ab47cfaaSmrg      _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'
5334ab47cfaaSmrg    else
5335ab47cfaaSmrg      _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'
5336ab47cfaaSmrg    fi
5337ab47cfaaSmrg    ;;
5338ab47cfaaSmrg  pw32*)
5339ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5340ab47cfaaSmrg  ;;
5341ab47cfaaSmrg  cygwin* | mingw*)
5342ab47cfaaSmrg    _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'
5343ab47cfaaSmrg  ;;
5344ab47cfaaSmrg  linux* | k*bsd*-gnu)
5345ab47cfaaSmrg    _LT_AC_TAGVAR(link_all_deplibs, $1)=no
5346ab47cfaaSmrg  ;;
5347ab47cfaaSmrg  *)
5348ab47cfaaSmrg    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5349ab47cfaaSmrg  ;;
5350ab47cfaaSmrg  esac
5351ab47cfaaSmrg],[
5352ab47cfaaSmrg  runpath_var=
5353ab47cfaaSmrg  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5354ab47cfaaSmrg  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5355ab47cfaaSmrg  _LT_AC_TAGVAR(archive_cmds, $1)=
5356ab47cfaaSmrg  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5357ab47cfaaSmrg  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5358ab47cfaaSmrg  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5359ab47cfaaSmrg  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5360ab47cfaaSmrg  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5361ab47cfaaSmrg  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5362ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5363ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5364ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5365ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5366ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5367ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5368ab47cfaaSmrg  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5369ab47cfaaSmrg  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5370ab47cfaaSmrg  _LT_AC_TAGVAR(module_cmds, $1)=
5371ab47cfaaSmrg  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5372ab47cfaaSmrg  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5373ab47cfaaSmrg  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5374ab47cfaaSmrg  # include_expsyms should be a list of space-separated symbols to be *always*
5375ab47cfaaSmrg  # included in the symbol list
5376ab47cfaaSmrg  _LT_AC_TAGVAR(include_expsyms, $1)=
5377ab47cfaaSmrg  # exclude_expsyms can be an extended regexp of symbols to exclude
5378ab47cfaaSmrg  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5379ab47cfaaSmrg  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5380ab47cfaaSmrg  # as well as any symbol that contains `d'.
5381ab47cfaaSmrg  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5382ab47cfaaSmrg  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5383ab47cfaaSmrg  # platforms (ab)use it in PIC code, but their linkers get confused if
5384ab47cfaaSmrg  # the symbol is explicitly referenced.  Since portable code cannot
5385ab47cfaaSmrg  # rely on this symbol name, it's probably fine to never include it in
5386ab47cfaaSmrg  # preloaded symbol tables.
5387ab47cfaaSmrg  extract_expsyms_cmds=
5388ab47cfaaSmrg  # Just being paranoid about ensuring that cc_basename is set.
5389ab47cfaaSmrg  _LT_CC_BASENAME([$compiler])
5390ab47cfaaSmrg  case $host_os in
5391ab47cfaaSmrg  cygwin* | mingw* | pw32*)
5392ab47cfaaSmrg    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5393ab47cfaaSmrg    # When not using gcc, we currently assume that we are using
5394ab47cfaaSmrg    # Microsoft Visual C++.
5395ab47cfaaSmrg    if test "$GCC" != yes; then
5396ab47cfaaSmrg      with_gnu_ld=no
5397ab47cfaaSmrg    fi
5398ab47cfaaSmrg    ;;
5399ab47cfaaSmrg  interix*)
5400ab47cfaaSmrg    # we just hope/assume this is gcc and not c89 (= MSVC++)
5401ab47cfaaSmrg    with_gnu_ld=yes
5402ab47cfaaSmrg    ;;
5403ab47cfaaSmrg  openbsd*)
5404ab47cfaaSmrg    with_gnu_ld=no
5405ab47cfaaSmrg    ;;
5406ab47cfaaSmrg  esac
5407ab47cfaaSmrg
5408ab47cfaaSmrg  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5409ab47cfaaSmrg  if test "$with_gnu_ld" = yes; then
5410ab47cfaaSmrg    # If archive_cmds runs LD, not CC, wlarc should be empty
5411ab47cfaaSmrg    wlarc='${wl}'
5412ab47cfaaSmrg
5413ab47cfaaSmrg    # Set some defaults for GNU ld with shared library support. These
5414ab47cfaaSmrg    # are reset later if shared libraries are not supported. Putting them
5415ab47cfaaSmrg    # here allows them to be overridden if necessary.
5416ab47cfaaSmrg    runpath_var=LD_RUN_PATH
5417ab47cfaaSmrg    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5418ab47cfaaSmrg    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5419ab47cfaaSmrg    # ancient GNU ld didn't support --whole-archive et. al.
5420ab47cfaaSmrg    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5421ab47cfaaSmrg	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5422ab47cfaaSmrg      else
5423ab47cfaaSmrg  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5424ab47cfaaSmrg    fi
5425ab47cfaaSmrg    supports_anon_versioning=no
5426ab47cfaaSmrg    case `$LD -v 2>/dev/null` in
5427ab47cfaaSmrg      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5428ab47cfaaSmrg      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5429ab47cfaaSmrg      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5430ab47cfaaSmrg      *\ 2.11.*) ;; # other 2.11 versions
5431ab47cfaaSmrg      *) supports_anon_versioning=yes ;;
5432ab47cfaaSmrg    esac
5433ab47cfaaSmrg
5434ab47cfaaSmrg    # See if GNU ld supports shared libraries.
5435ab47cfaaSmrg    case $host_os in
5436ab47cfaaSmrg    aix3* | aix4* | aix5*)
5437ab47cfaaSmrg      # On AIX/PPC, the GNU linker is very broken
5438ab47cfaaSmrg      if test "$host_cpu" != ia64; then
5439ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5440ab47cfaaSmrg	cat <<EOF 1>&2
5441ab47cfaaSmrg
5442ab47cfaaSmrg*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5443ab47cfaaSmrg*** to be unable to reliably create shared libraries on AIX.
5444ab47cfaaSmrg*** Therefore, libtool is disabling shared libraries support.  If you
5445ab47cfaaSmrg*** really care for shared libraries, you may want to modify your PATH
5446ab47cfaaSmrg*** so that a non-GNU linker is found, and then restart.
5447ab47cfaaSmrg
5448ab47cfaaSmrgEOF
5449ab47cfaaSmrg      fi
5450ab47cfaaSmrg      ;;
5451ab47cfaaSmrg
5452ab47cfaaSmrg    amigaos*)
5453ab47cfaaSmrg      _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)'
5454ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5455ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5456ab47cfaaSmrg
5457ab47cfaaSmrg      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5458ab47cfaaSmrg      # that the semantics of dynamic libraries on AmigaOS, at least up
5459ab47cfaaSmrg      # to version 4, is to share data among multiple programs linked
5460ab47cfaaSmrg      # with the same dynamic library.  Since this doesn't match the
5461ab47cfaaSmrg      # behavior of shared libraries on other platforms, we can't use
5462ab47cfaaSmrg      # them.
5463ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5464ab47cfaaSmrg      ;;
5465ab47cfaaSmrg
5466ab47cfaaSmrg    beos*)
5467ab47cfaaSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5468ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5469ab47cfaaSmrg	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5470ab47cfaaSmrg	# support --undefined.  This deserves some investigation.  FIXME
5471ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5472ab47cfaaSmrg      else
5473ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5474ab47cfaaSmrg      fi
5475ab47cfaaSmrg      ;;
5476ab47cfaaSmrg
5477ab47cfaaSmrg    cygwin* | mingw* | pw32*)
5478ab47cfaaSmrg      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5479ab47cfaaSmrg      # as there is no search path for DLLs.
5480ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5481ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5482ab47cfaaSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5483ab47cfaaSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5484ab47cfaaSmrg      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols'
5485ab47cfaaSmrg
5486ab47cfaaSmrg      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5487ab47cfaaSmrg        _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'
5488ab47cfaaSmrg	# If the export-symbols file already is a .def file (1st line
5489ab47cfaaSmrg	# is EXPORTS), use it as is; otherwise, prepend...
5490ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5491ab47cfaaSmrg	  cp $export_symbols $output_objdir/$soname.def;
5492ab47cfaaSmrg	else
5493ab47cfaaSmrg	  echo EXPORTS > $output_objdir/$soname.def;
5494ab47cfaaSmrg	  cat $export_symbols >> $output_objdir/$soname.def;
5495ab47cfaaSmrg	fi~
5496ab47cfaaSmrg	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5497ab47cfaaSmrg      else
5498ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5499ab47cfaaSmrg      fi
5500ab47cfaaSmrg      ;;
5501ab47cfaaSmrg
5502ab47cfaaSmrg    interix3*)
5503ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5504ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5505ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5506ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5507ab47cfaaSmrg      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5508ab47cfaaSmrg      # Instead, shared libraries are loaded at an image base (0x10000000 by
5509ab47cfaaSmrg      # default) and relocated if they conflict, which is a slow very memory
5510ab47cfaaSmrg      # consuming and fragmenting process.  To avoid this, we pick a random,
5511ab47cfaaSmrg      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5512ab47cfaaSmrg      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5513ab47cfaaSmrg      _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'
5514ab47cfaaSmrg      _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'
5515ab47cfaaSmrg      ;;
5516ab47cfaaSmrg
5517ab47cfaaSmrg    linux* | k*bsd*-gnu)
5518ab47cfaaSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5519ab47cfaaSmrg	tmp_addflag=
5520ab47cfaaSmrg	case $cc_basename,$host_cpu in
5521ab47cfaaSmrg	pgcc*)				# Portland Group C compiler
5522ab47cfaaSmrg	  _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'
5523ab47cfaaSmrg	  tmp_addflag=' $pic_flag'
5524ab47cfaaSmrg	  ;;
5525ab47cfaaSmrg	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5526ab47cfaaSmrg	  _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'
5527ab47cfaaSmrg	  tmp_addflag=' $pic_flag -Mnomain' ;;
5528ab47cfaaSmrg	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5529ab47cfaaSmrg	  tmp_addflag=' -i_dynamic' ;;
5530ab47cfaaSmrg	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5531ab47cfaaSmrg	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5532ab47cfaaSmrg	ifc* | ifort*)			# Intel Fortran compiler
5533ab47cfaaSmrg	  tmp_addflag=' -nofor_main' ;;
5534ab47cfaaSmrg	esac
5535ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5536ab47cfaaSmrg
5537ab47cfaaSmrg	if test $supports_anon_versioning = yes; then
5538ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5539ab47cfaaSmrg  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5540ab47cfaaSmrg  $echo "local: *; };" >> $output_objdir/$libname.ver~
5541ab47cfaaSmrg	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5542ab47cfaaSmrg	fi
5543ab47cfaaSmrg	_LT_AC_TAGVAR(link_all_deplibs, $1)=no
5544ab47cfaaSmrg      else
5545ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5546ab47cfaaSmrg      fi
5547ab47cfaaSmrg      ;;
5548ab47cfaaSmrg
5549ab47cfaaSmrg    netbsd* | netbsdelf*-gnu)
5550ab47cfaaSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5551ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5552ab47cfaaSmrg	wlarc=
5553ab47cfaaSmrg      else
5554ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5555ab47cfaaSmrg	_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'
5556ab47cfaaSmrg      fi
5557ab47cfaaSmrg      ;;
5558ab47cfaaSmrg
5559ab47cfaaSmrg    solaris*)
5560ab47cfaaSmrg      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5561ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5562ab47cfaaSmrg	cat <<EOF 1>&2
5563ab47cfaaSmrg
5564ab47cfaaSmrg*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5565ab47cfaaSmrg*** create shared libraries on Solaris systems.  Therefore, libtool
5566ab47cfaaSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5567ab47cfaaSmrg*** binutils to release 2.9.1 or newer.  Another option is to modify
5568ab47cfaaSmrg*** your PATH or compiler configuration so that the native linker is
5569ab47cfaaSmrg*** used, and then restart.
5570ab47cfaaSmrg
5571ab47cfaaSmrgEOF
5572ab47cfaaSmrg      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5573ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5574ab47cfaaSmrg	_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'
5575ab47cfaaSmrg      else
5576ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5577ab47cfaaSmrg      fi
5578ab47cfaaSmrg      ;;
5579ab47cfaaSmrg
5580ab47cfaaSmrg    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5581ab47cfaaSmrg      case `$LD -v 2>&1` in
5582ab47cfaaSmrg        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
5583ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5584ab47cfaaSmrg	cat <<_LT_EOF 1>&2
5585ab47cfaaSmrg
5586ab47cfaaSmrg*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5587ab47cfaaSmrg*** reliably create shared libraries on SCO systems.  Therefore, libtool
5588ab47cfaaSmrg*** is disabling shared libraries support.  We urge you to upgrade GNU
5589ab47cfaaSmrg*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5590ab47cfaaSmrg*** your PATH or compiler configuration so that the native linker is
5591ab47cfaaSmrg*** used, and then restart.
5592ab47cfaaSmrg
5593ab47cfaaSmrg_LT_EOF
5594ab47cfaaSmrg	;;
5595ab47cfaaSmrg	*)
5596ab47cfaaSmrg	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5597ab47cfaaSmrg	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5598ab47cfaaSmrg	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5599ab47cfaaSmrg	    _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'
5600ab47cfaaSmrg	  else
5601ab47cfaaSmrg	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5602ab47cfaaSmrg	  fi
5603ab47cfaaSmrg	;;
5604ab47cfaaSmrg      esac
5605ab47cfaaSmrg      ;;
5606ab47cfaaSmrg
5607ab47cfaaSmrg    sunos4*)
5608ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5609ab47cfaaSmrg      wlarc=
5610ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5611ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5612ab47cfaaSmrg      ;;
5613ab47cfaaSmrg
5614ab47cfaaSmrg    *)
5615ab47cfaaSmrg      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5616ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5617ab47cfaaSmrg	_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'
5618ab47cfaaSmrg      else
5619ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5620ab47cfaaSmrg      fi
5621ab47cfaaSmrg      ;;
5622ab47cfaaSmrg    esac
5623ab47cfaaSmrg
5624ab47cfaaSmrg    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5625ab47cfaaSmrg      runpath_var=
5626ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5627ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5628ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5629ab47cfaaSmrg    fi
5630ab47cfaaSmrg  else
5631ab47cfaaSmrg    # PORTME fill in a description of your system's linker (not GNU ld)
5632ab47cfaaSmrg    case $host_os in
5633ab47cfaaSmrg    aix3*)
5634ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5635ab47cfaaSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5636ab47cfaaSmrg      _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'
5637ab47cfaaSmrg      # Note: this linker hardcodes the directories in LIBPATH if there
5638ab47cfaaSmrg      # are no directories specified by -L.
5639ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5640ab47cfaaSmrg      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5641ab47cfaaSmrg	# Neither direct hardcoding nor static linking is supported with a
5642ab47cfaaSmrg	# broken collect2.
5643ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5644ab47cfaaSmrg      fi
5645ab47cfaaSmrg      ;;
5646ab47cfaaSmrg
5647ab47cfaaSmrg    aix4* | aix5*)
5648ab47cfaaSmrg      if test "$host_cpu" = ia64; then
5649ab47cfaaSmrg	# On IA64, the linker does run time linking by default, so we don't
5650ab47cfaaSmrg	# have to do anything special.
5651ab47cfaaSmrg	aix_use_runtimelinking=no
5652ab47cfaaSmrg	exp_sym_flag='-Bexport'
5653ab47cfaaSmrg	no_entry_flag=""
5654ab47cfaaSmrg      else
5655ab47cfaaSmrg	# If we're using GNU nm, then we don't want the "-C" option.
5656ab47cfaaSmrg	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5657ab47cfaaSmrg	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5658ab47cfaaSmrg	  _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'
5659ab47cfaaSmrg	else
5660ab47cfaaSmrg	  _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'
5661ab47cfaaSmrg	fi
5662ab47cfaaSmrg	aix_use_runtimelinking=no
5663ab47cfaaSmrg
5664ab47cfaaSmrg	# Test if we are trying to use run time linking or normal
5665ab47cfaaSmrg	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5666ab47cfaaSmrg	# need to do runtime linking.
5667ab47cfaaSmrg	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5668ab47cfaaSmrg	  for ld_flag in $LDFLAGS; do
5669ab47cfaaSmrg  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5670ab47cfaaSmrg  	    aix_use_runtimelinking=yes
5671ab47cfaaSmrg  	    break
5672ab47cfaaSmrg  	  fi
5673ab47cfaaSmrg	  done
5674ab47cfaaSmrg	  ;;
5675ab47cfaaSmrg	esac
5676ab47cfaaSmrg
5677ab47cfaaSmrg	exp_sym_flag='-bexport'
5678ab47cfaaSmrg	no_entry_flag='-bnoentry'
5679ab47cfaaSmrg      fi
5680ab47cfaaSmrg
5681ab47cfaaSmrg      # When large executables or shared objects are built, AIX ld can
5682ab47cfaaSmrg      # have problems creating the table of contents.  If linking a library
5683ab47cfaaSmrg      # or program results in "error TOC overflow" add -mminimal-toc to
5684ab47cfaaSmrg      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5685ab47cfaaSmrg      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5686ab47cfaaSmrg
5687ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)=''
5688ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5689ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5690ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5691ab47cfaaSmrg
5692ab47cfaaSmrg      if test "$GCC" = yes; then
5693ab47cfaaSmrg	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5694ab47cfaaSmrg	# We only want to do this on AIX 4.2 and lower, the check
5695ab47cfaaSmrg	# below for broken collect2 doesn't work under 4.3+
5696ab47cfaaSmrg	  collect2name=`${CC} -print-prog-name=collect2`
5697ab47cfaaSmrg	  if test -f "$collect2name" && \
5698ab47cfaaSmrg  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5699ab47cfaaSmrg	  then
5700ab47cfaaSmrg  	  # We have reworked collect2
5701ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5702ab47cfaaSmrg	  else
5703ab47cfaaSmrg  	  # We have old collect2
5704ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5705ab47cfaaSmrg  	  # It fails to find uninstalled libraries when the uninstalled
5706ab47cfaaSmrg  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5707ab47cfaaSmrg  	  # to unsupported forces relinking
5708ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5709ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5710ab47cfaaSmrg  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5711ab47cfaaSmrg	  fi
5712ab47cfaaSmrg	  ;;
5713ab47cfaaSmrg	esac
5714ab47cfaaSmrg	shared_flag='-shared'
5715ab47cfaaSmrg	if test "$aix_use_runtimelinking" = yes; then
5716ab47cfaaSmrg	  shared_flag="$shared_flag "'${wl}-G'
5717ab47cfaaSmrg	fi
5718ab47cfaaSmrg      else
5719ab47cfaaSmrg	# not using gcc
5720ab47cfaaSmrg	if test "$host_cpu" = ia64; then
5721ab47cfaaSmrg  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5722ab47cfaaSmrg  	# chokes on -Wl,-G. The following line is correct:
5723ab47cfaaSmrg	  shared_flag='-G'
5724ab47cfaaSmrg	else
5725ab47cfaaSmrg	  if test "$aix_use_runtimelinking" = yes; then
5726ab47cfaaSmrg	    shared_flag='${wl}-G'
5727ab47cfaaSmrg	  else
5728ab47cfaaSmrg	    shared_flag='${wl}-bM:SRE'
5729ab47cfaaSmrg	  fi
5730ab47cfaaSmrg	fi
5731ab47cfaaSmrg      fi
5732ab47cfaaSmrg
5733ab47cfaaSmrg      # It seems that -bexpall does not export symbols beginning with
5734ab47cfaaSmrg      # underscore (_), so it is better to generate a list of symbols to export.
5735ab47cfaaSmrg      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5736ab47cfaaSmrg      if test "$aix_use_runtimelinking" = yes; then
5737ab47cfaaSmrg	# Warning - without using the other runtime loading flags (-brtl),
5738ab47cfaaSmrg	# -berok will link without error, but may produce a broken library.
5739ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5740ab47cfaaSmrg       # Determine the default libpath from the value encoded in an empty executable.
5741ab47cfaaSmrg       _LT_AC_SYS_LIBPATH_AIX
5742ab47cfaaSmrg       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5743ab47cfaaSmrg	_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"
5744ab47cfaaSmrg       else
5745ab47cfaaSmrg	if test "$host_cpu" = ia64; then
5746ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5747ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5748ab47cfaaSmrg	  _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"
5749ab47cfaaSmrg	else
5750ab47cfaaSmrg	 # Determine the default libpath from the value encoded in an empty executable.
5751ab47cfaaSmrg	 _LT_AC_SYS_LIBPATH_AIX
5752ab47cfaaSmrg	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5753ab47cfaaSmrg	  # Warning - without using the other run time loading flags,
5754ab47cfaaSmrg	  # -berok will link without error, but may produce a broken library.
5755ab47cfaaSmrg	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5756ab47cfaaSmrg	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5757ab47cfaaSmrg	  # Exported symbols can be pulled into shared objects from archives
5758ab47cfaaSmrg	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5759ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5760ab47cfaaSmrg	  # This is similar to how AIX traditionally builds its shared libraries.
5761ab47cfaaSmrg	  _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'
5762ab47cfaaSmrg	fi
5763ab47cfaaSmrg      fi
5764ab47cfaaSmrg      ;;
5765ab47cfaaSmrg
5766ab47cfaaSmrg    amigaos*)
5767ab47cfaaSmrg      _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)'
5768ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5769ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5770ab47cfaaSmrg      # see comment about different semantics on the GNU ld section
5771ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5772ab47cfaaSmrg      ;;
5773ab47cfaaSmrg
5774ab47cfaaSmrg    bsdi[[45]]*)
5775ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5776ab47cfaaSmrg      ;;
5777ab47cfaaSmrg
5778ab47cfaaSmrg    cygwin* | mingw* | pw32*)
5779ab47cfaaSmrg      # When not using gcc, we currently assume that we are using
5780ab47cfaaSmrg      # Microsoft Visual C++.
5781ab47cfaaSmrg      # hardcode_libdir_flag_spec is actually meaningless, as there is
5782ab47cfaaSmrg      # no search path for DLLs.
5783ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5784ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5785ab47cfaaSmrg      # Tell ltmain to make .lib files, not .a files.
5786ab47cfaaSmrg      libext=lib
5787ab47cfaaSmrg      # Tell ltmain to make .dll files, not .so files.
5788ab47cfaaSmrg      shrext_cmds=".dll"
5789ab47cfaaSmrg      # FIXME: Setting linknames here is a bad hack.
5790ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5791ab47cfaaSmrg      # The linker will automatically build a .lib file if we build a DLL.
5792ab47cfaaSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5793ab47cfaaSmrg      # FIXME: Should let the user specify the lib program.
5794ab47cfaaSmrg      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5795ab47cfaaSmrg      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5796ab47cfaaSmrg      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5797ab47cfaaSmrg      ;;
5798ab47cfaaSmrg
5799ab47cfaaSmrg    darwin* | rhapsody*)
5800ab47cfaaSmrg      case $host_os in
5801ab47cfaaSmrg        rhapsody* | darwin1.[[012]])
5802ab47cfaaSmrg         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5803ab47cfaaSmrg         ;;
5804ab47cfaaSmrg       *) # Darwin 1.3 on
5805ab47cfaaSmrg         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5806ab47cfaaSmrg           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5807ab47cfaaSmrg         else
5808ab47cfaaSmrg           case ${MACOSX_DEPLOYMENT_TARGET} in
5809ab47cfaaSmrg             10.[[012]])
5810ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5811ab47cfaaSmrg               ;;
5812ab47cfaaSmrg             10.*)
5813ab47cfaaSmrg               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5814ab47cfaaSmrg               ;;
5815ab47cfaaSmrg           esac
5816ab47cfaaSmrg         fi
5817ab47cfaaSmrg         ;;
5818ab47cfaaSmrg      esac
5819ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5820ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5821ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5822ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5823ab47cfaaSmrg      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5824ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5825ab47cfaaSmrg    if test "$GCC" = yes ; then
5826ab47cfaaSmrg    	output_verbose_link_cmd='echo'
5827ab47cfaaSmrg        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5828ab47cfaaSmrg      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5829ab47cfaaSmrg      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5830ab47cfaaSmrg      _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}'
5831ab47cfaaSmrg      _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}'
5832ab47cfaaSmrg    else
5833ab47cfaaSmrg      case $cc_basename in
5834ab47cfaaSmrg        xlc*)
5835ab47cfaaSmrg         output_verbose_link_cmd='echo'
5836ab47cfaaSmrg         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring'
5837ab47cfaaSmrg         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5838ab47cfaaSmrg          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5839ab47cfaaSmrg         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5840ab47cfaaSmrg          _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}'
5841ab47cfaaSmrg          ;;
5842ab47cfaaSmrg       *)
5843ab47cfaaSmrg         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5844ab47cfaaSmrg          ;;
5845ab47cfaaSmrg      esac
5846ab47cfaaSmrg    fi
5847ab47cfaaSmrg      ;;
5848ab47cfaaSmrg
5849ab47cfaaSmrg    dgux*)
5850ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5851ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5852ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5853ab47cfaaSmrg      ;;
5854ab47cfaaSmrg
5855ab47cfaaSmrg    freebsd1*)
5856ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5857ab47cfaaSmrg      ;;
5858ab47cfaaSmrg
5859ab47cfaaSmrg    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5860ab47cfaaSmrg    # support.  Future versions do this automatically, but an explicit c++rt0.o
5861ab47cfaaSmrg    # does not break anything, and helps significantly (at the cost of a little
5862ab47cfaaSmrg    # extra space).
5863ab47cfaaSmrg    freebsd2.2*)
5864ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5865ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5866ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5867ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5868ab47cfaaSmrg      ;;
5869ab47cfaaSmrg
5870ab47cfaaSmrg    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5871ab47cfaaSmrg    freebsd2*)
5872ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5873ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5874ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5875ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5876ab47cfaaSmrg      ;;
5877ab47cfaaSmrg
5878ab47cfaaSmrg    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5879ab47cfaaSmrg    freebsd* | dragonfly*)
5880ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5881ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5882ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5883ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5884ab47cfaaSmrg      ;;
5885ab47cfaaSmrg
5886ab47cfaaSmrg    hpux9*)
5887ab47cfaaSmrg      if test "$GCC" = yes; then
5888ab47cfaaSmrg	_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'
5889ab47cfaaSmrg      else
5890ab47cfaaSmrg	_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'
5891ab47cfaaSmrg      fi
5892ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5893ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5894ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5895ab47cfaaSmrg
5896ab47cfaaSmrg      # hardcode_minus_L: Not really in the search PATH,
5897ab47cfaaSmrg      # but as the default location of the library.
5898ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5899ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5900ab47cfaaSmrg      ;;
5901ab47cfaaSmrg
5902ab47cfaaSmrg    hpux10*)
5903ab47cfaaSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5904ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5905ab47cfaaSmrg      else
5906ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5907ab47cfaaSmrg      fi
5908ab47cfaaSmrg      if test "$with_gnu_ld" = no; then
5909ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5910ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5911ab47cfaaSmrg
5912ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5913ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5914ab47cfaaSmrg
5915ab47cfaaSmrg	# hardcode_minus_L: Not really in the search PATH,
5916ab47cfaaSmrg	# but as the default location of the library.
5917ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5918ab47cfaaSmrg      fi
5919ab47cfaaSmrg      ;;
5920ab47cfaaSmrg
5921ab47cfaaSmrg    hpux11*)
5922ab47cfaaSmrg      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5923ab47cfaaSmrg	case $host_cpu in
5924ab47cfaaSmrg	hppa*64*)
5925ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5926ab47cfaaSmrg	  ;;
5927ab47cfaaSmrg	ia64*)
5928ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5929ab47cfaaSmrg	  ;;
5930ab47cfaaSmrg	*)
5931ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5932ab47cfaaSmrg	  ;;
5933ab47cfaaSmrg	esac
5934ab47cfaaSmrg      else
5935ab47cfaaSmrg	case $host_cpu in
5936ab47cfaaSmrg	hppa*64*)
5937ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5938ab47cfaaSmrg	  ;;
5939ab47cfaaSmrg	ia64*)
5940ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5941ab47cfaaSmrg	  ;;
5942ab47cfaaSmrg	*)
5943ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5944ab47cfaaSmrg	  ;;
5945ab47cfaaSmrg	esac
5946ab47cfaaSmrg      fi
5947ab47cfaaSmrg      if test "$with_gnu_ld" = no; then
5948ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5949ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5950ab47cfaaSmrg
5951ab47cfaaSmrg	case $host_cpu in
5952ab47cfaaSmrg	hppa*64*|ia64*)
5953ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5954ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5955ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5956ab47cfaaSmrg	  ;;
5957ab47cfaaSmrg	*)
5958ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5959ab47cfaaSmrg	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5960ab47cfaaSmrg
5961ab47cfaaSmrg	  # hardcode_minus_L: Not really in the search PATH,
5962ab47cfaaSmrg	  # but as the default location of the library.
5963ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5964ab47cfaaSmrg	  ;;
5965ab47cfaaSmrg	esac
5966ab47cfaaSmrg      fi
5967ab47cfaaSmrg      ;;
5968ab47cfaaSmrg
5969ab47cfaaSmrg    irix5* | irix6* | nonstopux*)
5970ab47cfaaSmrg      if test "$GCC" = yes; then
5971ab47cfaaSmrg	_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'
5972ab47cfaaSmrg      else
5973ab47cfaaSmrg	_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'
5974ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5975ab47cfaaSmrg      fi
5976ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5977ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5978ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5979ab47cfaaSmrg      ;;
5980ab47cfaaSmrg
5981ab47cfaaSmrg    netbsd* | netbsdelf*-gnu)
5982ab47cfaaSmrg      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5983ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5984ab47cfaaSmrg      else
5985ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5986ab47cfaaSmrg      fi
5987ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5988ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5989ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5990ab47cfaaSmrg      ;;
5991ab47cfaaSmrg
5992ab47cfaaSmrg    newsos6)
5993ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5994ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5995ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5996ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5997ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5998ab47cfaaSmrg      ;;
5999ab47cfaaSmrg
6000ab47cfaaSmrg    openbsd*)
6001ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6002ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6003ab47cfaaSmrg      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6004ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6005ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6006ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6007ab47cfaaSmrg	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6008ab47cfaaSmrg      else
6009ab47cfaaSmrg       case $host_os in
6010ab47cfaaSmrg	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6011ab47cfaaSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6012ab47cfaaSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6013ab47cfaaSmrg	   ;;
6014ab47cfaaSmrg	 *)
6015ab47cfaaSmrg	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6016ab47cfaaSmrg	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6017ab47cfaaSmrg	   ;;
6018ab47cfaaSmrg       esac
6019ab47cfaaSmrg      fi
6020ab47cfaaSmrg      ;;
6021ab47cfaaSmrg
6022ab47cfaaSmrg    os2*)
6023ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6024ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6025ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6026ab47cfaaSmrg      _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'
6027ab47cfaaSmrg      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6028ab47cfaaSmrg      ;;
6029ab47cfaaSmrg
6030ab47cfaaSmrg    osf3*)
6031ab47cfaaSmrg      if test "$GCC" = yes; then
6032ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6033ab47cfaaSmrg	_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'
6034ab47cfaaSmrg      else
6035ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6036ab47cfaaSmrg	_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'
6037ab47cfaaSmrg      fi
6038ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6039ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6040ab47cfaaSmrg      ;;
6041ab47cfaaSmrg
6042ab47cfaaSmrg    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6043ab47cfaaSmrg      if test "$GCC" = yes; then
6044ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6045ab47cfaaSmrg	_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'
6046ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6047ab47cfaaSmrg      else
6048ab47cfaaSmrg	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6049ab47cfaaSmrg	_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'
6050ab47cfaaSmrg	_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~
6051ab47cfaaSmrg	$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'
6052ab47cfaaSmrg
6053ab47cfaaSmrg	# Both c and cxx compiler support -rpath directly
6054ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6055ab47cfaaSmrg      fi
6056ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6057ab47cfaaSmrg      ;;
6058ab47cfaaSmrg
6059ab47cfaaSmrg    solaris*)
6060ab47cfaaSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6061ab47cfaaSmrg      if test "$GCC" = yes; then
6062ab47cfaaSmrg	wlarc='${wl}'
6063ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6064ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6065ab47cfaaSmrg	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6066ab47cfaaSmrg      else
6067ab47cfaaSmrg	wlarc=''
6068ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6069ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6070ab47cfaaSmrg  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6071ab47cfaaSmrg      fi
6072ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6073ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6074ab47cfaaSmrg      case $host_os in
6075ab47cfaaSmrg      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6076ab47cfaaSmrg      *)
6077ab47cfaaSmrg 	# The compiler driver will combine linker options so we
6078ab47cfaaSmrg 	# cannot just pass the convience library names through
6079ab47cfaaSmrg 	# without $wl, iff we do not link with $LD.
6080ab47cfaaSmrg 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6081ab47cfaaSmrg 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6082ab47cfaaSmrg 	case $wlarc in
6083ab47cfaaSmrg 	'')
6084ab47cfaaSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6085ab47cfaaSmrg 	*)
6086ab47cfaaSmrg 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;;
6087ab47cfaaSmrg 	esac ;;
6088ab47cfaaSmrg      esac
6089ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6090ab47cfaaSmrg      ;;
6091ab47cfaaSmrg
6092ab47cfaaSmrg    sunos4*)
6093ab47cfaaSmrg      if test "x$host_vendor" = xsequent; then
6094ab47cfaaSmrg	# Use $CC to link under sequent, because it throws in some extra .o
6095ab47cfaaSmrg	# files that make .init and .fini sections work.
6096ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6097ab47cfaaSmrg      else
6098ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6099ab47cfaaSmrg      fi
6100ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6101ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6102ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6103ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6104ab47cfaaSmrg      ;;
6105ab47cfaaSmrg
6106ab47cfaaSmrg    sysv4)
6107ab47cfaaSmrg      case $host_vendor in
6108ab47cfaaSmrg	sni)
6109ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6110ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6111ab47cfaaSmrg	;;
6112ab47cfaaSmrg	siemens)
6113ab47cfaaSmrg	  ## LD is ld it makes a PLAMLIB
6114ab47cfaaSmrg	  ## CC just makes a GrossModule.
6115ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6116ab47cfaaSmrg	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6117ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6118ab47cfaaSmrg        ;;
6119ab47cfaaSmrg	motorola)
6120ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6121ab47cfaaSmrg	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6122ab47cfaaSmrg	;;
6123ab47cfaaSmrg      esac
6124ab47cfaaSmrg      runpath_var='LD_RUN_PATH'
6125ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6126ab47cfaaSmrg      ;;
6127ab47cfaaSmrg
6128ab47cfaaSmrg    sysv4.3*)
6129ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6130ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6131ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6132ab47cfaaSmrg      ;;
6133ab47cfaaSmrg
6134ab47cfaaSmrg    sysv4*MP*)
6135ab47cfaaSmrg      if test -d /usr/nec; then
6136ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6137ab47cfaaSmrg	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6138ab47cfaaSmrg	runpath_var=LD_RUN_PATH
6139ab47cfaaSmrg	hardcode_runpath_var=yes
6140ab47cfaaSmrg	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6141ab47cfaaSmrg      fi
6142ab47cfaaSmrg      ;;
6143ab47cfaaSmrg
6144ab47cfaaSmrg    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6145ab47cfaaSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6146ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6147ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6148ab47cfaaSmrg      runpath_var='LD_RUN_PATH'
6149ab47cfaaSmrg
6150ab47cfaaSmrg      if test "$GCC" = yes; then
6151ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6152ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6153ab47cfaaSmrg      else
6154ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6155ab47cfaaSmrg	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6156ab47cfaaSmrg      fi
6157ab47cfaaSmrg      ;;
6158ab47cfaaSmrg
6159ab47cfaaSmrg    sysv5* | sco3.2v5* | sco5v6*)
6160ab47cfaaSmrg      # Note: We can NOT use -z defs as we might desire, because we do not
6161ab47cfaaSmrg      # link with -lc, and that would cause any symbols used from libc to
6162ab47cfaaSmrg      # always be unresolved, which means just about no library would
6163ab47cfaaSmrg      # ever link correctly.  If we're not using GNU ld we use -z text
6164ab47cfaaSmrg      # though, which does catch some bad symbols but isn't as heavy-handed
6165ab47cfaaSmrg      # as -z defs.
6166ab47cfaaSmrg      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6167ab47cfaaSmrg      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6168ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6169ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6170ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6171ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6172ab47cfaaSmrg      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6173ab47cfaaSmrg      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6174ab47cfaaSmrg      runpath_var='LD_RUN_PATH'
6175ab47cfaaSmrg
6176ab47cfaaSmrg      if test "$GCC" = yes; then
6177ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6178ab47cfaaSmrg	_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'
6179ab47cfaaSmrg      else
6180ab47cfaaSmrg	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6181ab47cfaaSmrg	_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'
6182ab47cfaaSmrg      fi
6183ab47cfaaSmrg      ;;
6184ab47cfaaSmrg
6185ab47cfaaSmrg    uts4*)
6186ab47cfaaSmrg      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6187ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6188ab47cfaaSmrg      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6189ab47cfaaSmrg      ;;
6190ab47cfaaSmrg
6191ab47cfaaSmrg    *)
6192ab47cfaaSmrg      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6193ab47cfaaSmrg      ;;
6194ab47cfaaSmrg    esac
6195ab47cfaaSmrg  fi
6196ab47cfaaSmrg])
6197ab47cfaaSmrgAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6198ab47cfaaSmrgtest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6199ab47cfaaSmrg
6200ab47cfaaSmrg#
6201ab47cfaaSmrg# Do we need to explicitly link libc?
6202ab47cfaaSmrg#
6203ab47cfaaSmrgcase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6204ab47cfaaSmrgx|xyes)
6205ab47cfaaSmrg  # Assume -lc should be added
6206ab47cfaaSmrg  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6207ab47cfaaSmrg
6208ab47cfaaSmrg  if test "$enable_shared" = yes && test "$GCC" = yes; then
6209ab47cfaaSmrg    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6210ab47cfaaSmrg    *'~'*)
6211ab47cfaaSmrg      # FIXME: we may have to deal with multi-command sequences.
6212ab47cfaaSmrg      ;;
6213ab47cfaaSmrg    '$CC '*)
6214ab47cfaaSmrg      # Test whether the compiler implicitly links with -lc since on some
6215ab47cfaaSmrg      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6216ab47cfaaSmrg      # to ld, don't add -lc before -lgcc.
6217ab47cfaaSmrg      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6218ab47cfaaSmrg      $rm conftest*
6219ab47cfaaSmrg      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6220ab47cfaaSmrg
6221ab47cfaaSmrg      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6222ab47cfaaSmrg        soname=conftest
6223ab47cfaaSmrg        lib=conftest
6224ab47cfaaSmrg        libobjs=conftest.$ac_objext
6225ab47cfaaSmrg        deplibs=
6226ab47cfaaSmrg        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6227ab47cfaaSmrg	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6228ab47cfaaSmrg        compiler_flags=-v
6229ab47cfaaSmrg        linker_flags=-v
6230ab47cfaaSmrg        verstring=
6231ab47cfaaSmrg        output_objdir=.
6232ab47cfaaSmrg        libname=conftest
6233ab47cfaaSmrg        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6234ab47cfaaSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6235ab47cfaaSmrg        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6236ab47cfaaSmrg        then
6237ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6238ab47cfaaSmrg        else
6239ab47cfaaSmrg	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6240ab47cfaaSmrg        fi
6241ab47cfaaSmrg        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6242ab47cfaaSmrg      else
6243ab47cfaaSmrg        cat conftest.err 1>&5
6244ab47cfaaSmrg      fi
6245ab47cfaaSmrg      $rm conftest*
6246ab47cfaaSmrg      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6247ab47cfaaSmrg      ;;
6248ab47cfaaSmrg    esac
6249ab47cfaaSmrg  fi
6250ab47cfaaSmrg  ;;
6251ab47cfaaSmrgesac
6252ab47cfaaSmrg])# AC_LIBTOOL_PROG_LD_SHLIBS
6253ab47cfaaSmrg
6254ab47cfaaSmrg
6255ab47cfaaSmrg# _LT_AC_FILE_LTDLL_C
6256ab47cfaaSmrg# -------------------
6257ab47cfaaSmrg# Be careful that the start marker always follows a newline.
6258ab47cfaaSmrgAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6259ab47cfaaSmrg# /* ltdll.c starts here */
6260ab47cfaaSmrg# #define WIN32_LEAN_AND_MEAN
6261ab47cfaaSmrg# #include <windows.h>
6262ab47cfaaSmrg# #undef WIN32_LEAN_AND_MEAN
6263ab47cfaaSmrg# #include <stdio.h>
6264ab47cfaaSmrg#
6265ab47cfaaSmrg# #ifndef __CYGWIN__
6266ab47cfaaSmrg# #  ifdef __CYGWIN32__
6267ab47cfaaSmrg# #    define __CYGWIN__ __CYGWIN32__
6268ab47cfaaSmrg# #  endif
6269ab47cfaaSmrg# #endif
6270ab47cfaaSmrg#
6271ab47cfaaSmrg# #ifdef __cplusplus
6272ab47cfaaSmrg# extern "C" {
6273ab47cfaaSmrg# #endif
6274ab47cfaaSmrg# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6275ab47cfaaSmrg# #ifdef __cplusplus
6276ab47cfaaSmrg# }
6277ab47cfaaSmrg# #endif
6278ab47cfaaSmrg#
6279ab47cfaaSmrg# #ifdef __CYGWIN__
6280ab47cfaaSmrg# #include <cygwin/cygwin_dll.h>
6281ab47cfaaSmrg# DECLARE_CYGWIN_DLL( DllMain );
6282ab47cfaaSmrg# #endif
6283ab47cfaaSmrg# HINSTANCE __hDllInstance_base;
6284ab47cfaaSmrg#
6285ab47cfaaSmrg# BOOL APIENTRY
6286ab47cfaaSmrg# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6287ab47cfaaSmrg# {
6288ab47cfaaSmrg#   __hDllInstance_base = hInst;
6289ab47cfaaSmrg#   return TRUE;
6290ab47cfaaSmrg# }
6291ab47cfaaSmrg# /* ltdll.c ends here */
6292ab47cfaaSmrg])# _LT_AC_FILE_LTDLL_C
6293ab47cfaaSmrg
6294ab47cfaaSmrg
6295ab47cfaaSmrg# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6296ab47cfaaSmrg# ---------------------------------
6297ab47cfaaSmrgAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6298ab47cfaaSmrg
6299ab47cfaaSmrg
6300ab47cfaaSmrg# old names
6301ab47cfaaSmrgAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6302ab47cfaaSmrgAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6303ab47cfaaSmrgAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6304ab47cfaaSmrgAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6305ab47cfaaSmrgAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6306ab47cfaaSmrgAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6307ab47cfaaSmrgAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6308ab47cfaaSmrg
6309ab47cfaaSmrg# This is just to silence aclocal about the macro not being used
6310ab47cfaaSmrgifelse([AC_DISABLE_FAST_INSTALL])
6311ab47cfaaSmrg
6312ab47cfaaSmrgAC_DEFUN([LT_AC_PROG_GCJ],
6313ab47cfaaSmrg[AC_CHECK_TOOL(GCJ, gcj, no)
6314ab47cfaaSmrg  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6315ab47cfaaSmrg  AC_SUBST(GCJFLAGS)
6316ab47cfaaSmrg])
6317ab47cfaaSmrg
6318ab47cfaaSmrgAC_DEFUN([LT_AC_PROG_RC],
6319ab47cfaaSmrg[AC_CHECK_TOOL(RC, windres, no)
6320ab47cfaaSmrg])
6321ab47cfaaSmrg
6322ab47cfaaSmrg# NOTE: This macro has been submitted for inclusion into   #
6323ab47cfaaSmrg#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6324ab47cfaaSmrg#  a released version of Autoconf we should remove this    #
6325ab47cfaaSmrg#  macro and use it instead.                               #
6326ab47cfaaSmrg# LT_AC_PROG_SED
6327ab47cfaaSmrg# --------------
6328ab47cfaaSmrg# Check for a fully-functional sed program, that truncates
6329ab47cfaaSmrg# as few characters as possible.  Prefer GNU sed if found.
6330ab47cfaaSmrgAC_DEFUN([LT_AC_PROG_SED],
6331ab47cfaaSmrg[AC_MSG_CHECKING([for a sed that does not truncate output])
6332ab47cfaaSmrgAC_CACHE_VAL(lt_cv_path_SED,
6333ab47cfaaSmrg[# Loop through the user's path and test for sed and gsed.
6334ab47cfaaSmrg# Then use that list of sed's as ones to test for truncation.
6335ab47cfaaSmrgas_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6336ab47cfaaSmrgfor as_dir in $PATH
6337ab47cfaaSmrgdo
6338ab47cfaaSmrg  IFS=$as_save_IFS
6339ab47cfaaSmrg  test -z "$as_dir" && as_dir=.
6340ab47cfaaSmrg  for lt_ac_prog in sed gsed; do
6341ab47cfaaSmrg    for ac_exec_ext in '' $ac_executable_extensions; do
6342ab47cfaaSmrg      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6343ab47cfaaSmrg        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6344ab47cfaaSmrg      fi
6345ab47cfaaSmrg    done
6346ab47cfaaSmrg  done
6347ab47cfaaSmrgdone
6348ab47cfaaSmrglt_ac_max=0
6349ab47cfaaSmrglt_ac_count=0
6350ab47cfaaSmrg# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6351ab47cfaaSmrg# along with /bin/sed that truncates output.
6352ab47cfaaSmrgfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6353ab47cfaaSmrg  test ! -f $lt_ac_sed && continue
6354ab47cfaaSmrg  cat /dev/null > conftest.in
6355ab47cfaaSmrg  lt_ac_count=0
6356ab47cfaaSmrg  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6357ab47cfaaSmrg  # Check for GNU sed and select it if it is found.
6358ab47cfaaSmrg  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6359ab47cfaaSmrg    lt_cv_path_SED=$lt_ac_sed
6360ab47cfaaSmrg    break
6361ab47cfaaSmrg  fi
6362ab47cfaaSmrg  while true; do
6363ab47cfaaSmrg    cat conftest.in conftest.in >conftest.tmp
6364ab47cfaaSmrg    mv conftest.tmp conftest.in
6365ab47cfaaSmrg    cp conftest.in conftest.nl
6366ab47cfaaSmrg    echo >>conftest.nl
6367ab47cfaaSmrg    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6368ab47cfaaSmrg    cmp -s conftest.out conftest.nl || break
6369ab47cfaaSmrg    # 10000 chars as input seems more than enough
6370ab47cfaaSmrg    test $lt_ac_count -gt 10 && break
6371ab47cfaaSmrg    lt_ac_count=`expr $lt_ac_count + 1`
6372ab47cfaaSmrg    if test $lt_ac_count -gt $lt_ac_max; then
6373ab47cfaaSmrg      lt_ac_max=$lt_ac_count
6374ab47cfaaSmrg      lt_cv_path_SED=$lt_ac_sed
6375ab47cfaaSmrg    fi
6376ab47cfaaSmrg  done
6377ab47cfaaSmrgdone
6378ab47cfaaSmrg])
6379ab47cfaaSmrgSED=$lt_cv_path_SED
6380ab47cfaaSmrgAC_MSG_RESULT([$SED])
6381ab47cfaaSmrg])
6382ab47cfaaSmrg
6383ab47cfaaSmrg# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
6384ab47cfaaSmrg# 
6385ab47cfaaSmrg# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
6386ab47cfaaSmrg#
6387ab47cfaaSmrg# This program is free software; you can redistribute it and/or modify
6388ab47cfaaSmrg# it under the terms of the GNU General Public License as published by
6389ab47cfaaSmrg# the Free Software Foundation; either version 2 of the License, or
6390ab47cfaaSmrg# (at your option) any later version.
6391ab47cfaaSmrg#
6392ab47cfaaSmrg# This program is distributed in the hope that it will be useful, but
6393ab47cfaaSmrg# WITHOUT ANY WARRANTY; without even the implied warranty of
6394ab47cfaaSmrg# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6395ab47cfaaSmrg# General Public License for more details.
6396ab47cfaaSmrg#
6397ab47cfaaSmrg# You should have received a copy of the GNU General Public License
6398ab47cfaaSmrg# along with this program; if not, write to the Free Software
6399ab47cfaaSmrg# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6400ab47cfaaSmrg#
6401ab47cfaaSmrg# As a special exception to the GNU General Public License, if you
6402ab47cfaaSmrg# distribute this file as part of a program that contains a
6403ab47cfaaSmrg# configuration script generated by Autoconf, you may include it under
6404ab47cfaaSmrg# the same distribution terms that you use for the rest of that program.
6405ab47cfaaSmrg
6406ab47cfaaSmrg# PKG_PROG_PKG_CONFIG([MIN-VERSION])
6407ab47cfaaSmrg# ----------------------------------
6408ab47cfaaSmrgAC_DEFUN([PKG_PROG_PKG_CONFIG],
6409ab47cfaaSmrg[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
6410ab47cfaaSmrgm4_pattern_allow([^PKG_CONFIG(_PATH)?$])
6411ab47cfaaSmrgAC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
6412ab47cfaaSmrgif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
6413ab47cfaaSmrg	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
6414ab47cfaaSmrgfi
6415ab47cfaaSmrgif test -n "$PKG_CONFIG"; then
6416ab47cfaaSmrg	_pkg_min_version=m4_default([$1], [0.9.0])
6417ab47cfaaSmrg	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
6418ab47cfaaSmrg	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
6419ab47cfaaSmrg		AC_MSG_RESULT([yes])
6420ab47cfaaSmrg	else
6421ab47cfaaSmrg		AC_MSG_RESULT([no])
6422ab47cfaaSmrg		PKG_CONFIG=""
6423ab47cfaaSmrg	fi
6424ab47cfaaSmrg		
6425ab47cfaaSmrgfi[]dnl
6426ab47cfaaSmrg])# PKG_PROG_PKG_CONFIG
6427ab47cfaaSmrg
6428ab47cfaaSmrg# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
6429ab47cfaaSmrg#
6430ab47cfaaSmrg# Check to see whether a particular set of modules exists.  Similar
6431ab47cfaaSmrg# to PKG_CHECK_MODULES(), but does not set variables or print errors.
6432ab47cfaaSmrg#
6433ab47cfaaSmrg#
6434ab47cfaaSmrg# Similar to PKG_CHECK_MODULES, make sure that the first instance of
6435ab47cfaaSmrg# this or PKG_CHECK_MODULES is called, or make sure to call
6436ab47cfaaSmrg# PKG_CHECK_EXISTS manually
6437ab47cfaaSmrg# --------------------------------------------------------------
6438ab47cfaaSmrgAC_DEFUN([PKG_CHECK_EXISTS],
6439ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6440ab47cfaaSmrgif test -n "$PKG_CONFIG" && \
6441ab47cfaaSmrg    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
6442ab47cfaaSmrg  m4_ifval([$2], [$2], [:])
6443ab47cfaaSmrgm4_ifvaln([$3], [else
6444ab47cfaaSmrg  $3])dnl
6445ab47cfaaSmrgfi])
6446ab47cfaaSmrg
6447ab47cfaaSmrg
6448ab47cfaaSmrg# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
6449ab47cfaaSmrg# ---------------------------------------------
6450ab47cfaaSmrgm4_define([_PKG_CONFIG],
6451ab47cfaaSmrg[if test -n "$PKG_CONFIG"; then
6452ab47cfaaSmrg    if test -n "$$1"; then
6453ab47cfaaSmrg        pkg_cv_[]$1="$$1"
6454ab47cfaaSmrg    else
6455ab47cfaaSmrg        PKG_CHECK_EXISTS([$3],
6456ab47cfaaSmrg                         [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
6457ab47cfaaSmrg			 [pkg_failed=yes])
6458ab47cfaaSmrg    fi
6459ab47cfaaSmrgelse
6460ab47cfaaSmrg	pkg_failed=untried
6461ab47cfaaSmrgfi[]dnl
6462ab47cfaaSmrg])# _PKG_CONFIG
6463ab47cfaaSmrg
6464ab47cfaaSmrg# _PKG_SHORT_ERRORS_SUPPORTED
6465ab47cfaaSmrg# -----------------------------
6466ab47cfaaSmrgAC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
6467ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
6468ab47cfaaSmrgif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
6469ab47cfaaSmrg        _pkg_short_errors_supported=yes
6470ab47cfaaSmrgelse
6471ab47cfaaSmrg        _pkg_short_errors_supported=no
6472ab47cfaaSmrgfi[]dnl
6473ab47cfaaSmrg])# _PKG_SHORT_ERRORS_SUPPORTED
6474ab47cfaaSmrg
6475ab47cfaaSmrg
6476ab47cfaaSmrg# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
6477ab47cfaaSmrg# [ACTION-IF-NOT-FOUND])
6478ab47cfaaSmrg#
6479ab47cfaaSmrg#
6480ab47cfaaSmrg# Note that if there is a possibility the first call to
6481ab47cfaaSmrg# PKG_CHECK_MODULES might not happen, you should be sure to include an
6482ab47cfaaSmrg# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
6483ab47cfaaSmrg#
6484ab47cfaaSmrg#
6485ab47cfaaSmrg# --------------------------------------------------------------
6486ab47cfaaSmrgAC_DEFUN([PKG_CHECK_MODULES],
6487ab47cfaaSmrg[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
6488ab47cfaaSmrgAC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
6489ab47cfaaSmrgAC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
6490ab47cfaaSmrg
6491ab47cfaaSmrgpkg_failed=no
6492ab47cfaaSmrgAC_MSG_CHECKING([for $1])
6493ab47cfaaSmrg
6494ab47cfaaSmrg_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
6495ab47cfaaSmrg_PKG_CONFIG([$1][_LIBS], [libs], [$2])
6496ab47cfaaSmrg
6497ab47cfaaSmrgm4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
6498ab47cfaaSmrgand $1[]_LIBS to avoid the need to call pkg-config.
6499ab47cfaaSmrgSee the pkg-config man page for more details.])
6500ab47cfaaSmrg
6501ab47cfaaSmrgif test $pkg_failed = yes; then
6502ab47cfaaSmrg        _PKG_SHORT_ERRORS_SUPPORTED
6503ab47cfaaSmrg        if test $_pkg_short_errors_supported = yes; then
6504ab47cfaaSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
6505ab47cfaaSmrg        else 
6506ab47cfaaSmrg	        $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
6507ab47cfaaSmrg        fi
6508ab47cfaaSmrg	# Put the nasty error message in config.log where it belongs
6509ab47cfaaSmrg	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
6510ab47cfaaSmrg
6511ab47cfaaSmrg	ifelse([$4], , [AC_MSG_ERROR(dnl
6512ab47cfaaSmrg[Package requirements ($2) were not met:
6513ab47cfaaSmrg
6514ab47cfaaSmrg$$1_PKG_ERRORS
6515ab47cfaaSmrg
6516ab47cfaaSmrgConsider adjusting the PKG_CONFIG_PATH environment variable if you
6517ab47cfaaSmrginstalled software in a non-standard prefix.
6518ab47cfaaSmrg
6519ab47cfaaSmrg_PKG_TEXT
6520ab47cfaaSmrg])],
6521ab47cfaaSmrg		[AC_MSG_RESULT([no])
6522ab47cfaaSmrg                $4])
6523ab47cfaaSmrgelif test $pkg_failed = untried; then
6524ab47cfaaSmrg	ifelse([$4], , [AC_MSG_FAILURE(dnl
6525ab47cfaaSmrg[The pkg-config script could not be found or is too old.  Make sure it
6526ab47cfaaSmrgis in your PATH or set the PKG_CONFIG environment variable to the full
6527ab47cfaaSmrgpath to pkg-config.
6528ab47cfaaSmrg
6529ab47cfaaSmrg_PKG_TEXT
6530ab47cfaaSmrg
6531ab47cfaaSmrgTo get pkg-config, see <http://www.freedesktop.org/software/pkgconfig>.])],
6532ab47cfaaSmrg		[$4])
6533ab47cfaaSmrgelse
6534ab47cfaaSmrg	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
6535ab47cfaaSmrg	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
6536ab47cfaaSmrg        AC_MSG_RESULT([yes])
6537ab47cfaaSmrg	ifelse([$3], , :, [$3])
6538ab47cfaaSmrgfi[]dnl
6539ab47cfaaSmrg])# PKG_CHECK_MODULES
6540ab47cfaaSmrg
6541ab47cfaaSmrg# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
6542ab47cfaaSmrg#
6543ab47cfaaSmrg# This file is free software; the Free Software Foundation
6544ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
6545ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
6546ab47cfaaSmrg
6547ab47cfaaSmrg# AM_AUTOMAKE_VERSION(VERSION)
6548ab47cfaaSmrg# ----------------------------
6549ab47cfaaSmrg# Automake X.Y traces this macro to ensure aclocal.m4 has been
6550ab47cfaaSmrg# generated from the m4 files accompanying Automake X.Y.
6551ab47cfaaSmrgAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6552ab47cfaaSmrg
6553ab47cfaaSmrg# AM_SET_CURRENT_AUTOMAKE_VERSION
6554ab47cfaaSmrg# -------------------------------
6555ab47cfaaSmrg# Call AM_AUTOMAKE_VERSION so it can be traced.
6556ab47cfaaSmrg# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6557ab47cfaaSmrgAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6558ab47cfaaSmrg	 [AM_AUTOMAKE_VERSION([1.9.6])])
6559ab47cfaaSmrg
6560ab47cfaaSmrg# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6561ab47cfaaSmrg
6562ab47cfaaSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6563ab47cfaaSmrg#
6564ab47cfaaSmrg# This file is free software; the Free Software Foundation
6565ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
6566ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
6567ab47cfaaSmrg
6568ab47cfaaSmrg# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6569ab47cfaaSmrg# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6570ab47cfaaSmrg# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6571ab47cfaaSmrg#
6572ab47cfaaSmrg# Of course, Automake must honor this variable whenever it calls a
6573ab47cfaaSmrg# tool from the auxiliary directory.  The problem is that $srcdir (and
6574ab47cfaaSmrg# therefore $ac_aux_dir as well) can be either absolute or relative,
6575ab47cfaaSmrg# depending on how configure is run.  This is pretty annoying, since
6576ab47cfaaSmrg# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6577ab47cfaaSmrg# source directory, any form will work fine, but in subdirectories a
6578ab47cfaaSmrg# relative path needs to be adjusted first.
6579ab47cfaaSmrg#
6580ab47cfaaSmrg# $ac_aux_dir/missing
6581ab47cfaaSmrg#    fails when called from a subdirectory if $ac_aux_dir is relative
6582ab47cfaaSmrg# $top_srcdir/$ac_aux_dir/missing
6583ab47cfaaSmrg#    fails if $ac_aux_dir is absolute,
6584ab47cfaaSmrg#    fails when called from a subdirectory in a VPATH build with
6585ab47cfaaSmrg#          a relative $ac_aux_dir
6586ab47cfaaSmrg#
6587ab47cfaaSmrg# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6588ab47cfaaSmrg# are both prefixed by $srcdir.  In an in-source build this is usually
6589ab47cfaaSmrg# harmless because $srcdir is `.', but things will broke when you
6590ab47cfaaSmrg# start a VPATH build or use an absolute $srcdir.
6591ab47cfaaSmrg#
6592ab47cfaaSmrg# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6593ab47cfaaSmrg# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6594ab47cfaaSmrg#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6595ab47cfaaSmrg# and then we would define $MISSING as
6596ab47cfaaSmrg#   MISSING="\${SHELL} $am_aux_dir/missing"
6597ab47cfaaSmrg# This will work as long as MISSING is not called from configure, because
6598ab47cfaaSmrg# unfortunately $(top_srcdir) has no meaning in configure.
6599ab47cfaaSmrg# However there are other variables, like CC, which are often used in
6600ab47cfaaSmrg# configure, and could therefore not use this "fixed" $ac_aux_dir.
6601ab47cfaaSmrg#
6602ab47cfaaSmrg# Another solution, used here, is to always expand $ac_aux_dir to an
6603ab47cfaaSmrg# absolute PATH.  The drawback is that using absolute paths prevent a
6604ab47cfaaSmrg# configured tree to be moved without reconfiguration.
6605ab47cfaaSmrg
6606ab47cfaaSmrgAC_DEFUN([AM_AUX_DIR_EXPAND],
6607ab47cfaaSmrg[dnl Rely on autoconf to set up CDPATH properly.
6608ab47cfaaSmrgAC_PREREQ([2.50])dnl
6609ab47cfaaSmrg# expand $ac_aux_dir to an absolute path
6610ab47cfaaSmrgam_aux_dir=`cd $ac_aux_dir && pwd`
6611ab47cfaaSmrg])
6612ab47cfaaSmrg
6613ab47cfaaSmrg# AM_CONDITIONAL                                            -*- Autoconf -*-
6614ab47cfaaSmrg
6615ab47cfaaSmrg# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6616ab47cfaaSmrg# Free Software Foundation, Inc.
6617ab47cfaaSmrg#
6618ab47cfaaSmrg# This file is free software; the Free Software Foundation
6619ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
6620ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
6621ab47cfaaSmrg
6622ab47cfaaSmrg# serial 7
6623ab47cfaaSmrg
6624ab47cfaaSmrg# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6625ab47cfaaSmrg# -------------------------------------
6626ab47cfaaSmrg# Define a conditional.
6627ab47cfaaSmrgAC_DEFUN([AM_CONDITIONAL],
6628ab47cfaaSmrg[AC_PREREQ(2.52)dnl
6629ab47cfaaSmrg ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6630ab47cfaaSmrg	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6631ab47cfaaSmrgAC_SUBST([$1_TRUE])
6632ab47cfaaSmrgAC_SUBST([$1_FALSE])
6633ab47cfaaSmrgif $2; then
6634ab47cfaaSmrg  $1_TRUE=
6635ab47cfaaSmrg  $1_FALSE='#'
6636ab47cfaaSmrgelse
6637ab47cfaaSmrg  $1_TRUE='#'
6638ab47cfaaSmrg  $1_FALSE=
6639ab47cfaaSmrgfi
6640ab47cfaaSmrgAC_CONFIG_COMMANDS_PRE(
6641ab47cfaaSmrg[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6642ab47cfaaSmrg  AC_MSG_ERROR([[conditional "$1" was never defined.
6643ab47cfaaSmrgUsually this means the macro was only invoked conditionally.]])
6644ab47cfaaSmrgfi])])
6645ab47cfaaSmrg
6646ab47cfaaSmrg
6647ab47cfaaSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6648ab47cfaaSmrg# Free Software Foundation, Inc.
6649ab47cfaaSmrg#
6650ab47cfaaSmrg# This file is free software; the Free Software Foundation
6651ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
6652ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
6653ab47cfaaSmrg
6654ab47cfaaSmrg# serial 8
6655ab47cfaaSmrg
6656ab47cfaaSmrg# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6657ab47cfaaSmrg# written in clear, in which case automake, when reading aclocal.m4,
6658ab47cfaaSmrg# will think it sees a *use*, and therefore will trigger all it's
6659ab47cfaaSmrg# C support machinery.  Also note that it means that autoscan, seeing
6660ab47cfaaSmrg# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6661ab47cfaaSmrg
6662ab47cfaaSmrg
6663ab47cfaaSmrg# _AM_DEPENDENCIES(NAME)
6664ab47cfaaSmrg# ----------------------
6665ab47cfaaSmrg# See how the compiler implements dependency checking.
6666ab47cfaaSmrg# NAME is "CC", "CXX", "GCJ", or "OBJC".
6667ab47cfaaSmrg# We try a few techniques and use that to set a single cache variable.
6668ab47cfaaSmrg#
6669ab47cfaaSmrg# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6670ab47cfaaSmrg# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6671ab47cfaaSmrg# dependency, and given that the user is not expected to run this macro,
6672ab47cfaaSmrg# just rely on AC_PROG_CC.
6673ab47cfaaSmrgAC_DEFUN([_AM_DEPENDENCIES],
6674ab47cfaaSmrg[AC_REQUIRE([AM_SET_DEPDIR])dnl
6675ab47cfaaSmrgAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6676ab47cfaaSmrgAC_REQUIRE([AM_MAKE_INCLUDE])dnl
6677ab47cfaaSmrgAC_REQUIRE([AM_DEP_TRACK])dnl
6678ab47cfaaSmrg
6679ab47cfaaSmrgifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6680ab47cfaaSmrg       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6681ab47cfaaSmrg       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6682ab47cfaaSmrg       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6683ab47cfaaSmrg                   [depcc="$$1"   am_compiler_list=])
6684ab47cfaaSmrg
6685ab47cfaaSmrgAC_CACHE_CHECK([dependency style of $depcc],
6686ab47cfaaSmrg               [am_cv_$1_dependencies_compiler_type],
6687ab47cfaaSmrg[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6688ab47cfaaSmrg  # We make a subdir and do the tests there.  Otherwise we can end up
6689ab47cfaaSmrg  # making bogus files that we don't know about and never remove.  For
6690ab47cfaaSmrg  # instance it was reported that on HP-UX the gcc test will end up
6691ab47cfaaSmrg  # making a dummy file named `D' -- because `-MD' means `put the output
6692ab47cfaaSmrg  # in D'.
6693ab47cfaaSmrg  mkdir conftest.dir
6694ab47cfaaSmrg  # Copy depcomp to subdir because otherwise we won't find it if we're
6695ab47cfaaSmrg  # using a relative directory.
6696ab47cfaaSmrg  cp "$am_depcomp" conftest.dir
6697ab47cfaaSmrg  cd conftest.dir
6698ab47cfaaSmrg  # We will build objects and dependencies in a subdirectory because
6699ab47cfaaSmrg  # it helps to detect inapplicable dependency modes.  For instance
6700ab47cfaaSmrg  # both Tru64's cc and ICC support -MD to output dependencies as a
6701ab47cfaaSmrg  # side effect of compilation, but ICC will put the dependencies in
6702ab47cfaaSmrg  # the current directory while Tru64 will put them in the object
6703ab47cfaaSmrg  # directory.
6704ab47cfaaSmrg  mkdir sub
6705ab47cfaaSmrg
6706ab47cfaaSmrg  am_cv_$1_dependencies_compiler_type=none
6707ab47cfaaSmrg  if test "$am_compiler_list" = ""; then
6708ab47cfaaSmrg     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6709ab47cfaaSmrg  fi
6710ab47cfaaSmrg  for depmode in $am_compiler_list; do
6711ab47cfaaSmrg    # Setup a source with many dependencies, because some compilers
6712ab47cfaaSmrg    # like to wrap large dependency lists on column 80 (with \), and
6713ab47cfaaSmrg    # we should not choose a depcomp mode which is confused by this.
6714ab47cfaaSmrg    #
6715ab47cfaaSmrg    # We need to recreate these files for each test, as the compiler may
6716ab47cfaaSmrg    # overwrite some of them when testing with obscure command lines.
6717ab47cfaaSmrg    # This happens at least with the AIX C compiler.
6718ab47cfaaSmrg    : > sub/conftest.c
6719ab47cfaaSmrg    for i in 1 2 3 4 5 6; do
6720ab47cfaaSmrg      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6721ab47cfaaSmrg      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6722ab47cfaaSmrg      # Solaris 8's {/usr,}/bin/sh.
6723ab47cfaaSmrg      touch sub/conftst$i.h
6724ab47cfaaSmrg    done
6725ab47cfaaSmrg    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6726ab47cfaaSmrg
6727ab47cfaaSmrg    case $depmode in
6728ab47cfaaSmrg    nosideeffect)
6729ab47cfaaSmrg      # after this tag, mechanisms are not by side-effect, so they'll
6730ab47cfaaSmrg      # only be used when explicitly requested
6731ab47cfaaSmrg      if test "x$enable_dependency_tracking" = xyes; then
6732ab47cfaaSmrg	continue
6733ab47cfaaSmrg      else
6734ab47cfaaSmrg	break
6735ab47cfaaSmrg      fi
6736ab47cfaaSmrg      ;;
6737ab47cfaaSmrg    none) break ;;
6738ab47cfaaSmrg    esac
6739ab47cfaaSmrg    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6740ab47cfaaSmrg    # mode.  It turns out that the SunPro C++ compiler does not properly
6741ab47cfaaSmrg    # handle `-M -o', and we need to detect this.
6742ab47cfaaSmrg    if depmode=$depmode \
6743ab47cfaaSmrg       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6744ab47cfaaSmrg       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6745ab47cfaaSmrg       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6746ab47cfaaSmrg         >/dev/null 2>conftest.err &&
6747ab47cfaaSmrg       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6748ab47cfaaSmrg       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6749ab47cfaaSmrg       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6750ab47cfaaSmrg      # icc doesn't choke on unknown options, it will just issue warnings
6751ab47cfaaSmrg      # or remarks (even with -Werror).  So we grep stderr for any message
6752ab47cfaaSmrg      # that says an option was ignored or not supported.
6753ab47cfaaSmrg      # When given -MP, icc 7.0 and 7.1 complain thusly:
6754ab47cfaaSmrg      #   icc: Command line warning: ignoring option '-M'; no argument required
6755ab47cfaaSmrg      # The diagnosis changed in icc 8.0:
6756ab47cfaaSmrg      #   icc: Command line remark: option '-MP' not supported
6757ab47cfaaSmrg      if (grep 'ignoring option' conftest.err ||
6758ab47cfaaSmrg          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6759ab47cfaaSmrg        am_cv_$1_dependencies_compiler_type=$depmode
6760ab47cfaaSmrg        break
6761ab47cfaaSmrg      fi
6762ab47cfaaSmrg    fi
6763ab47cfaaSmrg  done
6764ab47cfaaSmrg
6765ab47cfaaSmrg  cd ..
6766ab47cfaaSmrg  rm -rf conftest.dir
6767ab47cfaaSmrgelse
6768ab47cfaaSmrg  am_cv_$1_dependencies_compiler_type=none
6769ab47cfaaSmrgfi
6770ab47cfaaSmrg])
6771ab47cfaaSmrgAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6772ab47cfaaSmrgAM_CONDITIONAL([am__fastdep$1], [
6773ab47cfaaSmrg  test "x$enable_dependency_tracking" != xno \
6774ab47cfaaSmrg  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6775ab47cfaaSmrg])
6776ab47cfaaSmrg
6777ab47cfaaSmrg
6778ab47cfaaSmrg# AM_SET_DEPDIR
6779ab47cfaaSmrg# -------------
6780ab47cfaaSmrg# Choose a directory name for dependency files.
6781ab47cfaaSmrg# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6782ab47cfaaSmrgAC_DEFUN([AM_SET_DEPDIR],
6783ab47cfaaSmrg[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6784ab47cfaaSmrgAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6785ab47cfaaSmrg])
6786ab47cfaaSmrg
6787ab47cfaaSmrg
6788ab47cfaaSmrg# AM_DEP_TRACK
6789ab47cfaaSmrg# ------------
6790ab47cfaaSmrgAC_DEFUN([AM_DEP_TRACK],
6791ab47cfaaSmrg[AC_ARG_ENABLE(dependency-tracking,
6792ab47cfaaSmrg[  --disable-dependency-tracking  speeds up one-time build
6793ab47cfaaSmrg  --enable-dependency-tracking   do not reject slow dependency extractors])
6794ab47cfaaSmrgif test "x$enable_dependency_tracking" != xno; then
6795ab47cfaaSmrg  am_depcomp="$ac_aux_dir/depcomp"
6796ab47cfaaSmrg  AMDEPBACKSLASH='\'
6797ab47cfaaSmrgfi
6798ab47cfaaSmrgAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6799ab47cfaaSmrgAC_SUBST([AMDEPBACKSLASH])
6800ab47cfaaSmrg])
6801ab47cfaaSmrg
6802ab47cfaaSmrg# Generate code to set up dependency tracking.              -*- Autoconf -*-
6803ab47cfaaSmrg
6804ab47cfaaSmrg# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6805ab47cfaaSmrg# Free Software Foundation, Inc.
6806ab47cfaaSmrg#
6807ab47cfaaSmrg# This file is free software; the Free Software Foundation
6808ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
6809ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
6810ab47cfaaSmrg
6811ab47cfaaSmrg#serial 3
6812ab47cfaaSmrg
6813ab47cfaaSmrg# _AM_OUTPUT_DEPENDENCY_COMMANDS
6814ab47cfaaSmrg# ------------------------------
6815ab47cfaaSmrgAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6816ab47cfaaSmrg[for mf in $CONFIG_FILES; do
6817ab47cfaaSmrg  # Strip MF so we end up with the name of the file.
6818ab47cfaaSmrg  mf=`echo "$mf" | sed -e 's/:.*$//'`
6819ab47cfaaSmrg  # Check whether this is an Automake generated Makefile or not.
6820ab47cfaaSmrg  # We used to match only the files named `Makefile.in', but
6821ab47cfaaSmrg  # some people rename them; so instead we look at the file content.
6822ab47cfaaSmrg  # Grep'ing the first line is not enough: some people post-process
6823ab47cfaaSmrg  # each Makefile.in and add a new line on top of each file to say so.
6824ab47cfaaSmrg  # So let's grep whole file.
6825ab47cfaaSmrg  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6826ab47cfaaSmrg    dirpart=`AS_DIRNAME("$mf")`
6827ab47cfaaSmrg  else
6828ab47cfaaSmrg    continue
6829ab47cfaaSmrg  fi
6830ab47cfaaSmrg  # Extract the definition of DEPDIR, am__include, and am__quote
6831ab47cfaaSmrg  # from the Makefile without running `make'.
6832ab47cfaaSmrg  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6833ab47cfaaSmrg  test -z "$DEPDIR" && continue
6834ab47cfaaSmrg  am__include=`sed -n 's/^am__include = //p' < "$mf"`
6835ab47cfaaSmrg  test -z "am__include" && continue
6836ab47cfaaSmrg  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6837ab47cfaaSmrg  # When using ansi2knr, U may be empty or an underscore; expand it
6838ab47cfaaSmrg  U=`sed -n 's/^U = //p' < "$mf"`
6839ab47cfaaSmrg  # Find all dependency output files, they are included files with
6840ab47cfaaSmrg  # $(DEPDIR) in their names.  We invoke sed twice because it is the
6841ab47cfaaSmrg  # simplest approach to changing $(DEPDIR) to its actual value in the
6842ab47cfaaSmrg  # expansion.
6843ab47cfaaSmrg  for file in `sed -n "
6844ab47cfaaSmrg    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6845ab47cfaaSmrg       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6846ab47cfaaSmrg    # Make sure the directory exists.
6847ab47cfaaSmrg    test -f "$dirpart/$file" && continue
6848ab47cfaaSmrg    fdir=`AS_DIRNAME(["$file"])`
6849ab47cfaaSmrg    AS_MKDIR_P([$dirpart/$fdir])
6850ab47cfaaSmrg    # echo "creating $dirpart/$file"
6851ab47cfaaSmrg    echo '# dummy' > "$dirpart/$file"
6852ab47cfaaSmrg  done
6853ab47cfaaSmrgdone
6854ab47cfaaSmrg])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6855ab47cfaaSmrg
6856ab47cfaaSmrg
6857ab47cfaaSmrg# AM_OUTPUT_DEPENDENCY_COMMANDS
6858ab47cfaaSmrg# -----------------------------
6859ab47cfaaSmrg# This macro should only be invoked once -- use via AC_REQUIRE.
6860ab47cfaaSmrg#
6861ab47cfaaSmrg# This code is only required when automatic dependency tracking
6862ab47cfaaSmrg# is enabled.  FIXME.  This creates each `.P' file that we will
6863ab47cfaaSmrg# need in order to bootstrap the dependency handling code.
6864ab47cfaaSmrgAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6865ab47cfaaSmrg[AC_CONFIG_COMMANDS([depfiles],
6866ab47cfaaSmrg     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6867ab47cfaaSmrg     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6868ab47cfaaSmrg])
6869ab47cfaaSmrg
6870ab47cfaaSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
6871ab47cfaaSmrg# Free Software Foundation, Inc.
6872ab47cfaaSmrg#
6873ab47cfaaSmrg# This file is free software; the Free Software Foundation
6874ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
6875ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
6876ab47cfaaSmrg
6877ab47cfaaSmrg# serial 8
6878ab47cfaaSmrg
6879ab47cfaaSmrg# AM_CONFIG_HEADER is obsolete.  It has been replaced by AC_CONFIG_HEADERS.
6880ab47cfaaSmrgAU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
6881ab47cfaaSmrg
6882ab47cfaaSmrg# Do all the work for Automake.                             -*- Autoconf -*-
6883ab47cfaaSmrg
6884ab47cfaaSmrg# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6885ab47cfaaSmrg# Free Software Foundation, Inc.
6886ab47cfaaSmrg#
6887ab47cfaaSmrg# This file is free software; the Free Software Foundation
6888ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
6889ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
6890ab47cfaaSmrg
6891ab47cfaaSmrg# serial 12
6892ab47cfaaSmrg
6893ab47cfaaSmrg# This macro actually does too much.  Some checks are only needed if
6894ab47cfaaSmrg# your package does certain things.  But this isn't really a big deal.
6895ab47cfaaSmrg
6896ab47cfaaSmrg# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6897ab47cfaaSmrg# AM_INIT_AUTOMAKE([OPTIONS])
6898ab47cfaaSmrg# -----------------------------------------------
6899ab47cfaaSmrg# The call with PACKAGE and VERSION arguments is the old style
6900ab47cfaaSmrg# call (pre autoconf-2.50), which is being phased out.  PACKAGE
6901ab47cfaaSmrg# and VERSION should now be passed to AC_INIT and removed from
6902ab47cfaaSmrg# the call to AM_INIT_AUTOMAKE.
6903ab47cfaaSmrg# We support both call styles for the transition.  After
6904ab47cfaaSmrg# the next Automake release, Autoconf can make the AC_INIT
6905ab47cfaaSmrg# arguments mandatory, and then we can depend on a new Autoconf
6906ab47cfaaSmrg# release and drop the old call support.
6907ab47cfaaSmrgAC_DEFUN([AM_INIT_AUTOMAKE],
6908ab47cfaaSmrg[AC_PREREQ([2.58])dnl
6909ab47cfaaSmrgdnl Autoconf wants to disallow AM_ names.  We explicitly allow
6910ab47cfaaSmrgdnl the ones we care about.
6911ab47cfaaSmrgm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6912ab47cfaaSmrgAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6913ab47cfaaSmrgAC_REQUIRE([AC_PROG_INSTALL])dnl
6914ab47cfaaSmrg# test to see if srcdir already configured
6915ab47cfaaSmrgif test "`cd $srcdir && pwd`" != "`pwd`" &&
6916ab47cfaaSmrg   test -f $srcdir/config.status; then
6917ab47cfaaSmrg  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6918ab47cfaaSmrgfi
6919ab47cfaaSmrg
6920ab47cfaaSmrg# test whether we have cygpath
6921ab47cfaaSmrgif test -z "$CYGPATH_W"; then
6922ab47cfaaSmrg  if (cygpath --version) >/dev/null 2>/dev/null; then
6923ab47cfaaSmrg    CYGPATH_W='cygpath -w'
6924ab47cfaaSmrg  else
6925ab47cfaaSmrg    CYGPATH_W=echo
6926ab47cfaaSmrg  fi
6927ab47cfaaSmrgfi
6928ab47cfaaSmrgAC_SUBST([CYGPATH_W])
6929ab47cfaaSmrg
6930ab47cfaaSmrg# Define the identity of the package.
6931ab47cfaaSmrgdnl Distinguish between old-style and new-style calls.
6932ab47cfaaSmrgm4_ifval([$2],
6933ab47cfaaSmrg[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6934ab47cfaaSmrg AC_SUBST([PACKAGE], [$1])dnl
6935ab47cfaaSmrg AC_SUBST([VERSION], [$2])],
6936ab47cfaaSmrg[_AM_SET_OPTIONS([$1])dnl
6937ab47cfaaSmrg AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6938ab47cfaaSmrg AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6939ab47cfaaSmrg
6940ab47cfaaSmrg_AM_IF_OPTION([no-define],,
6941ab47cfaaSmrg[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6942ab47cfaaSmrg AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6943ab47cfaaSmrg
6944ab47cfaaSmrg# Some tools Automake needs.
6945ab47cfaaSmrgAC_REQUIRE([AM_SANITY_CHECK])dnl
6946ab47cfaaSmrgAC_REQUIRE([AC_ARG_PROGRAM])dnl
6947ab47cfaaSmrgAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6948ab47cfaaSmrgAM_MISSING_PROG(AUTOCONF, autoconf)
6949ab47cfaaSmrgAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6950ab47cfaaSmrgAM_MISSING_PROG(AUTOHEADER, autoheader)
6951ab47cfaaSmrgAM_MISSING_PROG(MAKEINFO, makeinfo)
6952ab47cfaaSmrgAM_PROG_INSTALL_SH
6953ab47cfaaSmrgAM_PROG_INSTALL_STRIP
6954ab47cfaaSmrgAC_REQUIRE([AM_PROG_MKDIR_P])dnl
6955ab47cfaaSmrg# We need awk for the "check" target.  The system "awk" is bad on
6956ab47cfaaSmrg# some platforms.
6957ab47cfaaSmrgAC_REQUIRE([AC_PROG_AWK])dnl
6958ab47cfaaSmrgAC_REQUIRE([AC_PROG_MAKE_SET])dnl
6959ab47cfaaSmrgAC_REQUIRE([AM_SET_LEADING_DOT])dnl
6960ab47cfaaSmrg_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6961ab47cfaaSmrg              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6962ab47cfaaSmrg	      		     [_AM_PROG_TAR([v7])])])
6963ab47cfaaSmrg_AM_IF_OPTION([no-dependencies],,
6964ab47cfaaSmrg[AC_PROVIDE_IFELSE([AC_PROG_CC],
6965ab47cfaaSmrg                  [_AM_DEPENDENCIES(CC)],
6966ab47cfaaSmrg                  [define([AC_PROG_CC],
6967ab47cfaaSmrg                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6968ab47cfaaSmrgAC_PROVIDE_IFELSE([AC_PROG_CXX],
6969ab47cfaaSmrg                  [_AM_DEPENDENCIES(CXX)],
6970ab47cfaaSmrg                  [define([AC_PROG_CXX],
6971ab47cfaaSmrg                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6972ab47cfaaSmrg])
6973ab47cfaaSmrg])
6974ab47cfaaSmrg
6975ab47cfaaSmrg
6976ab47cfaaSmrg# When config.status generates a header, we must update the stamp-h file.
6977ab47cfaaSmrg# This file resides in the same directory as the config header
6978ab47cfaaSmrg# that is generated.  The stamp files are numbered to have different names.
6979ab47cfaaSmrg
6980ab47cfaaSmrg# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6981ab47cfaaSmrg# loop where config.status creates the headers, so we can generate
6982ab47cfaaSmrg# our stamp files there.
6983ab47cfaaSmrgAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6984ab47cfaaSmrg[# Compute $1's index in $config_headers.
6985ab47cfaaSmrg_am_stamp_count=1
6986ab47cfaaSmrgfor _am_header in $config_headers :; do
6987ab47cfaaSmrg  case $_am_header in
6988ab47cfaaSmrg    $1 | $1:* )
6989ab47cfaaSmrg      break ;;
6990ab47cfaaSmrg    * )
6991ab47cfaaSmrg      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6992ab47cfaaSmrg  esac
6993ab47cfaaSmrgdone
6994ab47cfaaSmrgecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6995ab47cfaaSmrg
6996ab47cfaaSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6997ab47cfaaSmrg#
6998ab47cfaaSmrg# This file is free software; the Free Software Foundation
6999ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7000ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7001ab47cfaaSmrg
7002ab47cfaaSmrg# AM_PROG_INSTALL_SH
7003ab47cfaaSmrg# ------------------
7004ab47cfaaSmrg# Define $install_sh.
7005ab47cfaaSmrgAC_DEFUN([AM_PROG_INSTALL_SH],
7006ab47cfaaSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7007ab47cfaaSmrginstall_sh=${install_sh-"$am_aux_dir/install-sh"}
7008ab47cfaaSmrgAC_SUBST(install_sh)])
7009ab47cfaaSmrg
7010ab47cfaaSmrg# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
7011ab47cfaaSmrg#
7012ab47cfaaSmrg# This file is free software; the Free Software Foundation
7013ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7014ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7015ab47cfaaSmrg
7016ab47cfaaSmrg# serial 2
7017ab47cfaaSmrg
7018ab47cfaaSmrg# Check whether the underlying file-system supports filenames
7019ab47cfaaSmrg# with a leading dot.  For instance MS-DOS doesn't.
7020ab47cfaaSmrgAC_DEFUN([AM_SET_LEADING_DOT],
7021ab47cfaaSmrg[rm -rf .tst 2>/dev/null
7022ab47cfaaSmrgmkdir .tst 2>/dev/null
7023ab47cfaaSmrgif test -d .tst; then
7024ab47cfaaSmrg  am__leading_dot=.
7025ab47cfaaSmrgelse
7026ab47cfaaSmrg  am__leading_dot=_
7027ab47cfaaSmrgfi
7028ab47cfaaSmrgrmdir .tst 2>/dev/null
7029ab47cfaaSmrgAC_SUBST([am__leading_dot])])
7030ab47cfaaSmrg
7031ab47cfaaSmrg# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
7032ab47cfaaSmrg# From Jim Meyering
7033ab47cfaaSmrg
7034ab47cfaaSmrg# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005
7035ab47cfaaSmrg# Free Software Foundation, Inc.
7036ab47cfaaSmrg#
7037ab47cfaaSmrg# This file is free software; the Free Software Foundation
7038ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7039ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7040ab47cfaaSmrg
7041ab47cfaaSmrg# serial 4
7042ab47cfaaSmrg
7043ab47cfaaSmrgAC_DEFUN([AM_MAINTAINER_MODE],
7044ab47cfaaSmrg[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
7045ab47cfaaSmrg  dnl maintainer-mode is disabled by default
7046ab47cfaaSmrg  AC_ARG_ENABLE(maintainer-mode,
7047ab47cfaaSmrg[  --enable-maintainer-mode  enable make rules and dependencies not useful
7048ab47cfaaSmrg			  (and sometimes confusing) to the casual installer],
7049ab47cfaaSmrg      USE_MAINTAINER_MODE=$enableval,
7050ab47cfaaSmrg      USE_MAINTAINER_MODE=no)
7051ab47cfaaSmrg  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
7052ab47cfaaSmrg  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
7053ab47cfaaSmrg  MAINT=$MAINTAINER_MODE_TRUE
7054ab47cfaaSmrg  AC_SUBST(MAINT)dnl
7055ab47cfaaSmrg]
7056ab47cfaaSmrg)
7057ab47cfaaSmrg
7058ab47cfaaSmrgAU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
7059ab47cfaaSmrg
7060ab47cfaaSmrg# Check to see how 'make' treats includes.	            -*- Autoconf -*-
7061ab47cfaaSmrg
7062ab47cfaaSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7063ab47cfaaSmrg#
7064ab47cfaaSmrg# This file is free software; the Free Software Foundation
7065ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7066ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7067ab47cfaaSmrg
7068ab47cfaaSmrg# serial 3
7069ab47cfaaSmrg
7070ab47cfaaSmrg# AM_MAKE_INCLUDE()
7071ab47cfaaSmrg# -----------------
7072ab47cfaaSmrg# Check to see how make treats includes.
7073ab47cfaaSmrgAC_DEFUN([AM_MAKE_INCLUDE],
7074ab47cfaaSmrg[am_make=${MAKE-make}
7075ab47cfaaSmrgcat > confinc << 'END'
7076ab47cfaaSmrgam__doit:
7077ab47cfaaSmrg	@echo done
7078ab47cfaaSmrg.PHONY: am__doit
7079ab47cfaaSmrgEND
7080ab47cfaaSmrg# If we don't find an include directive, just comment out the code.
7081ab47cfaaSmrgAC_MSG_CHECKING([for style of include used by $am_make])
7082ab47cfaaSmrgam__include="#"
7083ab47cfaaSmrgam__quote=
7084ab47cfaaSmrg_am_result=none
7085ab47cfaaSmrg# First try GNU make style include.
7086ab47cfaaSmrgecho "include confinc" > confmf
7087ab47cfaaSmrg# We grep out `Entering directory' and `Leaving directory'
7088ab47cfaaSmrg# messages which can occur if `w' ends up in MAKEFLAGS.
7089ab47cfaaSmrg# In particular we don't look at `^make:' because GNU make might
7090ab47cfaaSmrg# be invoked under some other name (usually "gmake"), in which
7091ab47cfaaSmrg# case it prints its new name instead of `make'.
7092ab47cfaaSmrgif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
7093ab47cfaaSmrg   am__include=include
7094ab47cfaaSmrg   am__quote=
7095ab47cfaaSmrg   _am_result=GNU
7096ab47cfaaSmrgfi
7097ab47cfaaSmrg# Now try BSD make style include.
7098ab47cfaaSmrgif test "$am__include" = "#"; then
7099ab47cfaaSmrg   echo '.include "confinc"' > confmf
7100ab47cfaaSmrg   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
7101ab47cfaaSmrg      am__include=.include
7102ab47cfaaSmrg      am__quote="\""
7103ab47cfaaSmrg      _am_result=BSD
7104ab47cfaaSmrg   fi
7105ab47cfaaSmrgfi
7106ab47cfaaSmrgAC_SUBST([am__include])
7107ab47cfaaSmrgAC_SUBST([am__quote])
7108ab47cfaaSmrgAC_MSG_RESULT([$_am_result])
7109ab47cfaaSmrgrm -f confinc confmf
7110ab47cfaaSmrg])
7111ab47cfaaSmrg
7112ab47cfaaSmrg# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
7113ab47cfaaSmrg
7114ab47cfaaSmrg# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
7115ab47cfaaSmrg# Free Software Foundation, Inc.
7116ab47cfaaSmrg#
7117ab47cfaaSmrg# This file is free software; the Free Software Foundation
7118ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7119ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7120ab47cfaaSmrg
7121ab47cfaaSmrg# serial 4
7122ab47cfaaSmrg
7123ab47cfaaSmrg# AM_MISSING_PROG(NAME, PROGRAM)
7124ab47cfaaSmrg# ------------------------------
7125ab47cfaaSmrgAC_DEFUN([AM_MISSING_PROG],
7126ab47cfaaSmrg[AC_REQUIRE([AM_MISSING_HAS_RUN])
7127ab47cfaaSmrg$1=${$1-"${am_missing_run}$2"}
7128ab47cfaaSmrgAC_SUBST($1)])
7129ab47cfaaSmrg
7130ab47cfaaSmrg
7131ab47cfaaSmrg# AM_MISSING_HAS_RUN
7132ab47cfaaSmrg# ------------------
7133ab47cfaaSmrg# Define MISSING if not defined so far and test if it supports --run.
7134ab47cfaaSmrg# If it does, set am_missing_run to use it, otherwise, to nothing.
7135ab47cfaaSmrgAC_DEFUN([AM_MISSING_HAS_RUN],
7136ab47cfaaSmrg[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
7137ab47cfaaSmrgtest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
7138ab47cfaaSmrg# Use eval to expand $SHELL
7139ab47cfaaSmrgif eval "$MISSING --run true"; then
7140ab47cfaaSmrg  am_missing_run="$MISSING --run "
7141ab47cfaaSmrgelse
7142ab47cfaaSmrg  am_missing_run=
7143ab47cfaaSmrg  AC_MSG_WARN([`missing' script is too old or missing])
7144ab47cfaaSmrgfi
7145ab47cfaaSmrg])
7146ab47cfaaSmrg
7147ab47cfaaSmrg# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
7148ab47cfaaSmrg#
7149ab47cfaaSmrg# This file is free software; the Free Software Foundation
7150ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7151ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7152ab47cfaaSmrg
7153ab47cfaaSmrg# AM_PROG_MKDIR_P
7154ab47cfaaSmrg# ---------------
7155ab47cfaaSmrg# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
7156ab47cfaaSmrg#
7157ab47cfaaSmrg# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
7158ab47cfaaSmrg# created by `make install' are always world readable, even if the
7159ab47cfaaSmrg# installer happens to have an overly restrictive umask (e.g. 077).
7160ab47cfaaSmrg# This was a mistake.  There are at least two reasons why we must not
7161ab47cfaaSmrg# use `-m 0755':
7162ab47cfaaSmrg#   - it causes special bits like SGID to be ignored,
7163ab47cfaaSmrg#   - it may be too restrictive (some setups expect 775 directories).
7164ab47cfaaSmrg#
7165ab47cfaaSmrg# Do not use -m 0755 and let people choose whatever they expect by
7166ab47cfaaSmrg# setting umask.
7167ab47cfaaSmrg#
7168ab47cfaaSmrg# We cannot accept any implementation of `mkdir' that recognizes `-p'.
7169ab47cfaaSmrg# Some implementations (such as Solaris 8's) are not thread-safe: if a
7170ab47cfaaSmrg# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
7171ab47cfaaSmrg# concurrently, both version can detect that a/ is missing, but only
7172ab47cfaaSmrg# one can create it and the other will error out.  Consequently we
7173ab47cfaaSmrg# restrict ourselves to GNU make (using the --version option ensures
7174ab47cfaaSmrg# this.)
7175ab47cfaaSmrgAC_DEFUN([AM_PROG_MKDIR_P],
7176ab47cfaaSmrg[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
7177ab47cfaaSmrg  # We used to keeping the `.' as first argument, in order to
7178ab47cfaaSmrg  # allow $(mkdir_p) to be used without argument.  As in
7179ab47cfaaSmrg  #   $(mkdir_p) $(somedir)
7180ab47cfaaSmrg  # where $(somedir) is conditionally defined.  However this is wrong
7181ab47cfaaSmrg  # for two reasons:
7182ab47cfaaSmrg  #  1. if the package is installed by a user who cannot write `.'
7183ab47cfaaSmrg  #     make install will fail,
7184ab47cfaaSmrg  #  2. the above comment should most certainly read
7185ab47cfaaSmrg  #     $(mkdir_p) $(DESTDIR)$(somedir)
7186ab47cfaaSmrg  #     so it does not work when $(somedir) is undefined and
7187ab47cfaaSmrg  #     $(DESTDIR) is not.
7188ab47cfaaSmrg  #  To support the latter case, we have to write
7189ab47cfaaSmrg  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
7190ab47cfaaSmrg  #  so the `.' trick is pointless.
7191ab47cfaaSmrg  mkdir_p='mkdir -p --'
7192ab47cfaaSmrgelse
7193ab47cfaaSmrg  # On NextStep and OpenStep, the `mkdir' command does not
7194ab47cfaaSmrg  # recognize any option.  It will interpret all options as
7195ab47cfaaSmrg  # directories to create, and then abort because `.' already
7196ab47cfaaSmrg  # exists.
7197ab47cfaaSmrg  for d in ./-p ./--version;
7198ab47cfaaSmrg  do
7199ab47cfaaSmrg    test -d $d && rmdir $d
7200ab47cfaaSmrg  done
7201ab47cfaaSmrg  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7202ab47cfaaSmrg  if test -f "$ac_aux_dir/mkinstalldirs"; then
7203ab47cfaaSmrg    mkdir_p='$(mkinstalldirs)'
7204ab47cfaaSmrg  else
7205ab47cfaaSmrg    mkdir_p='$(install_sh) -d'
7206ab47cfaaSmrg  fi
7207ab47cfaaSmrgfi
7208ab47cfaaSmrgAC_SUBST([mkdir_p])])
7209ab47cfaaSmrg
7210ab47cfaaSmrg# Helper functions for option handling.                     -*- Autoconf -*-
7211ab47cfaaSmrg
7212ab47cfaaSmrg# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7213ab47cfaaSmrg#
7214ab47cfaaSmrg# This file is free software; the Free Software Foundation
7215ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7216ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7217ab47cfaaSmrg
7218ab47cfaaSmrg# serial 3
7219ab47cfaaSmrg
7220ab47cfaaSmrg# _AM_MANGLE_OPTION(NAME)
7221ab47cfaaSmrg# -----------------------
7222ab47cfaaSmrgAC_DEFUN([_AM_MANGLE_OPTION],
7223ab47cfaaSmrg[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7224ab47cfaaSmrg
7225ab47cfaaSmrg# _AM_SET_OPTION(NAME)
7226ab47cfaaSmrg# ------------------------------
7227ab47cfaaSmrg# Set option NAME.  Presently that only means defining a flag for this option.
7228ab47cfaaSmrgAC_DEFUN([_AM_SET_OPTION],
7229ab47cfaaSmrg[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7230ab47cfaaSmrg
7231ab47cfaaSmrg# _AM_SET_OPTIONS(OPTIONS)
7232ab47cfaaSmrg# ----------------------------------
7233ab47cfaaSmrg# OPTIONS is a space-separated list of Automake options.
7234ab47cfaaSmrgAC_DEFUN([_AM_SET_OPTIONS],
7235ab47cfaaSmrg[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7236ab47cfaaSmrg
7237ab47cfaaSmrg# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7238ab47cfaaSmrg# -------------------------------------------
7239ab47cfaaSmrg# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7240ab47cfaaSmrgAC_DEFUN([_AM_IF_OPTION],
7241ab47cfaaSmrg[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7242ab47cfaaSmrg
7243ab47cfaaSmrg# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7244ab47cfaaSmrg
7245ab47cfaaSmrg# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7246ab47cfaaSmrg# Free Software Foundation, Inc.
7247ab47cfaaSmrg#
7248ab47cfaaSmrg# This file is free software; the Free Software Foundation
7249ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7250ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7251ab47cfaaSmrg
7252ab47cfaaSmrg# serial 4
7253ab47cfaaSmrg
7254ab47cfaaSmrg# AM_SANITY_CHECK
7255ab47cfaaSmrg# ---------------
7256ab47cfaaSmrgAC_DEFUN([AM_SANITY_CHECK],
7257ab47cfaaSmrg[AC_MSG_CHECKING([whether build environment is sane])
7258ab47cfaaSmrg# Just in case
7259ab47cfaaSmrgsleep 1
7260ab47cfaaSmrgecho timestamp > conftest.file
7261ab47cfaaSmrg# Do `set' in a subshell so we don't clobber the current shell's
7262ab47cfaaSmrg# arguments.  Must try -L first in case configure is actually a
7263ab47cfaaSmrg# symlink; some systems play weird games with the mod time of symlinks
7264ab47cfaaSmrg# (eg FreeBSD returns the mod time of the symlink's containing
7265ab47cfaaSmrg# directory).
7266ab47cfaaSmrgif (
7267ab47cfaaSmrg   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7268ab47cfaaSmrg   if test "$[*]" = "X"; then
7269ab47cfaaSmrg      # -L didn't work.
7270ab47cfaaSmrg      set X `ls -t $srcdir/configure conftest.file`
7271ab47cfaaSmrg   fi
7272ab47cfaaSmrg   rm -f conftest.file
7273ab47cfaaSmrg   if test "$[*]" != "X $srcdir/configure conftest.file" \
7274ab47cfaaSmrg      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7275ab47cfaaSmrg
7276ab47cfaaSmrg      # If neither matched, then we have a broken ls.  This can happen
7277ab47cfaaSmrg      # if, for instance, CONFIG_SHELL is bash and it inherits a
7278ab47cfaaSmrg      # broken ls alias from the environment.  This has actually
7279ab47cfaaSmrg      # happened.  Such a system could not be considered "sane".
7280ab47cfaaSmrg      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7281ab47cfaaSmrgalias in your environment])
7282ab47cfaaSmrg   fi
7283ab47cfaaSmrg
7284ab47cfaaSmrg   test "$[2]" = conftest.file
7285ab47cfaaSmrg   )
7286ab47cfaaSmrgthen
7287ab47cfaaSmrg   # Ok.
7288ab47cfaaSmrg   :
7289ab47cfaaSmrgelse
7290ab47cfaaSmrg   AC_MSG_ERROR([newly created file is older than distributed files!
7291ab47cfaaSmrgCheck your system clock])
7292ab47cfaaSmrgfi
7293ab47cfaaSmrgAC_MSG_RESULT(yes)])
7294ab47cfaaSmrg
7295ab47cfaaSmrg# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7296ab47cfaaSmrg#
7297ab47cfaaSmrg# This file is free software; the Free Software Foundation
7298ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7299ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7300ab47cfaaSmrg
7301ab47cfaaSmrg# AM_PROG_INSTALL_STRIP
7302ab47cfaaSmrg# ---------------------
7303ab47cfaaSmrg# One issue with vendor `install' (even GNU) is that you can't
7304ab47cfaaSmrg# specify the program used to strip binaries.  This is especially
7305ab47cfaaSmrg# annoying in cross-compiling environments, where the build's strip
7306ab47cfaaSmrg# is unlikely to handle the host's binaries.
7307ab47cfaaSmrg# Fortunately install-sh will honor a STRIPPROG variable, so we
7308ab47cfaaSmrg# always use install-sh in `make install-strip', and initialize
7309ab47cfaaSmrg# STRIPPROG with the value of the STRIP variable (set by the user).
7310ab47cfaaSmrgAC_DEFUN([AM_PROG_INSTALL_STRIP],
7311ab47cfaaSmrg[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7312ab47cfaaSmrg# Installed binaries are usually stripped using `strip' when the user
7313ab47cfaaSmrg# run `make install-strip'.  However `strip' might not be the right
7314ab47cfaaSmrg# tool to use in cross-compilation environments, therefore Automake
7315ab47cfaaSmrg# will honor the `STRIP' environment variable to overrule this program.
7316ab47cfaaSmrgdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7317ab47cfaaSmrgif test "$cross_compiling" != no; then
7318ab47cfaaSmrg  AC_CHECK_TOOL([STRIP], [strip], :)
7319ab47cfaaSmrgfi
7320ab47cfaaSmrgINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7321ab47cfaaSmrgAC_SUBST([INSTALL_STRIP_PROGRAM])])
7322ab47cfaaSmrg
7323ab47cfaaSmrg# Check how to create a tarball.                            -*- Autoconf -*-
7324ab47cfaaSmrg
7325ab47cfaaSmrg# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7326ab47cfaaSmrg#
7327ab47cfaaSmrg# This file is free software; the Free Software Foundation
7328ab47cfaaSmrg# gives unlimited permission to copy and/or distribute it,
7329ab47cfaaSmrg# with or without modifications, as long as this notice is preserved.
7330ab47cfaaSmrg
7331ab47cfaaSmrg# serial 2
7332ab47cfaaSmrg
7333ab47cfaaSmrg# _AM_PROG_TAR(FORMAT)
7334ab47cfaaSmrg# --------------------
7335ab47cfaaSmrg# Check how to create a tarball in format FORMAT.
7336ab47cfaaSmrg# FORMAT should be one of `v7', `ustar', or `pax'.
7337ab47cfaaSmrg#
7338ab47cfaaSmrg# Substitute a variable $(am__tar) that is a command
7339ab47cfaaSmrg# writing to stdout a FORMAT-tarball containing the directory
7340ab47cfaaSmrg# $tardir.
7341ab47cfaaSmrg#     tardir=directory && $(am__tar) > result.tar
7342ab47cfaaSmrg#
7343ab47cfaaSmrg# Substitute a variable $(am__untar) that extract such
7344ab47cfaaSmrg# a tarball read from stdin.
7345ab47cfaaSmrg#     $(am__untar) < result.tar
7346ab47cfaaSmrgAC_DEFUN([_AM_PROG_TAR],
7347ab47cfaaSmrg[# Always define AMTAR for backward compatibility.
7348ab47cfaaSmrgAM_MISSING_PROG([AMTAR], [tar])
7349ab47cfaaSmrgm4_if([$1], [v7],
7350ab47cfaaSmrg     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7351ab47cfaaSmrg     [m4_case([$1], [ustar],, [pax],,
7352ab47cfaaSmrg              [m4_fatal([Unknown tar format])])
7353ab47cfaaSmrgAC_MSG_CHECKING([how to create a $1 tar archive])
7354ab47cfaaSmrg# Loop over all known methods to create a tar archive until one works.
7355ab47cfaaSmrg_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7356ab47cfaaSmrg_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7357ab47cfaaSmrg# Do not fold the above two line into one, because Tru64 sh and
7358ab47cfaaSmrg# Solaris sh will not grok spaces in the rhs of `-'.
7359ab47cfaaSmrgfor _am_tool in $_am_tools
7360ab47cfaaSmrgdo
7361ab47cfaaSmrg  case $_am_tool in
7362ab47cfaaSmrg  gnutar)
7363ab47cfaaSmrg    for _am_tar in tar gnutar gtar;
7364ab47cfaaSmrg    do
7365ab47cfaaSmrg      AM_RUN_LOG([$_am_tar --version]) && break
7366ab47cfaaSmrg    done
7367ab47cfaaSmrg    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7368ab47cfaaSmrg    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7369ab47cfaaSmrg    am__untar="$_am_tar -xf -"
7370ab47cfaaSmrg    ;;
7371ab47cfaaSmrg  plaintar)
7372ab47cfaaSmrg    # Must skip GNU tar: if it does not support --format= it doesn't create
7373ab47cfaaSmrg    # ustar tarball either.
7374ab47cfaaSmrg    (tar --version) >/dev/null 2>&1 && continue
7375ab47cfaaSmrg    am__tar='tar chf - "$$tardir"'
7376ab47cfaaSmrg    am__tar_='tar chf - "$tardir"'
7377ab47cfaaSmrg    am__untar='tar xf -'
7378ab47cfaaSmrg    ;;
7379ab47cfaaSmrg  pax)
7380ab47cfaaSmrg    am__tar='pax -L -x $1 -w "$$tardir"'
7381ab47cfaaSmrg    am__tar_='pax -L -x $1 -w "$tardir"'
7382ab47cfaaSmrg    am__untar='pax -r'
7383ab47cfaaSmrg    ;;
7384ab47cfaaSmrg  cpio)
7385ab47cfaaSmrg    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7386ab47cfaaSmrg    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7387ab47cfaaSmrg    am__untar='cpio -i -H $1 -d'
7388ab47cfaaSmrg    ;;
7389ab47cfaaSmrg  none)
7390ab47cfaaSmrg    am__tar=false
7391ab47cfaaSmrg    am__tar_=false
7392ab47cfaaSmrg    am__untar=false
7393ab47cfaaSmrg    ;;
7394ab47cfaaSmrg  esac
7395ab47cfaaSmrg
7396ab47cfaaSmrg  # If the value was cached, stop now.  We just wanted to have am__tar
7397ab47cfaaSmrg  # and am__untar set.
7398ab47cfaaSmrg  test -n "${am_cv_prog_tar_$1}" && break
7399ab47cfaaSmrg
7400ab47cfaaSmrg  # tar/untar a dummy directory, and stop if the command works
7401ab47cfaaSmrg  rm -rf conftest.dir
7402ab47cfaaSmrg  mkdir conftest.dir
7403ab47cfaaSmrg  echo GrepMe > conftest.dir/file
7404ab47cfaaSmrg  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7405ab47cfaaSmrg  rm -rf conftest.dir
7406ab47cfaaSmrg  if test -s conftest.tar; then
7407ab47cfaaSmrg    AM_RUN_LOG([$am__untar <conftest.tar])
7408ab47cfaaSmrg    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7409ab47cfaaSmrg  fi
7410ab47cfaaSmrgdone
7411ab47cfaaSmrgrm -rf conftest.dir
7412ab47cfaaSmrg
7413ab47cfaaSmrgAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7414ab47cfaaSmrgAC_MSG_RESULT([$am_cv_prog_tar_$1])])
7415ab47cfaaSmrgAC_SUBST([am__tar])
7416ab47cfaaSmrgAC_SUBST([am__untar])
7417ab47cfaaSmrg]) # _AM_PROG_TAR
7418ab47cfaaSmrg
7419ab47cfaaSmrgdnl
7420ab47cfaaSmrgdnl Copyright 2005-2006 Sun Microsystems, Inc.  All rights reserved.
7421ab47cfaaSmrgdnl 
7422ab47cfaaSmrgdnl Permission is hereby granted, free of charge, to any person obtaining a
7423ab47cfaaSmrgdnl copy of this software and associated documentation files (the
7424ab47cfaaSmrgdnl "Software"), to deal in the Software without restriction, including
7425ab47cfaaSmrgdnl without limitation the rights to use, copy, modify, merge, publish,
7426ab47cfaaSmrgdnl distribute, and/or sell copies of the Software, and to permit persons
7427ab47cfaaSmrgdnl to whom the Software is furnished to do so, provided that the above
7428ab47cfaaSmrgdnl copyright notice(s) and this permission notice appear in all copies of
7429ab47cfaaSmrgdnl the Software and that both the above copyright notice(s) and this
7430ab47cfaaSmrgdnl permission notice appear in supporting documentation.
7431ab47cfaaSmrgdnl
7432ab47cfaaSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7433ab47cfaaSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7434ab47cfaaSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
7435ab47cfaaSmrgdnl OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
7436ab47cfaaSmrgdnl HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
7437ab47cfaaSmrgdnl INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
7438ab47cfaaSmrgdnl FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
7439ab47cfaaSmrgdnl NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
7440ab47cfaaSmrgdnl WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
7441ab47cfaaSmrgdnl
7442ab47cfaaSmrgdnl Except as contained in this notice, the name of a copyright holder
7443ab47cfaaSmrgdnl shall not be used in advertising or otherwise to promote the sale, use
7444ab47cfaaSmrgdnl or other dealings in this Software without prior written authorization
7445ab47cfaaSmrgdnl of the copyright holder.
7446ab47cfaaSmrg
7447ab47cfaaSmrg# XORG_MACROS_VERSION(required-version)
7448ab47cfaaSmrg# -------------------------------------
7449ab47cfaaSmrg# Minimum version: 1.1.0
7450ab47cfaaSmrg#
7451ab47cfaaSmrg# If you're using a macro added in Version 1.1 or newer, include this in
7452ab47cfaaSmrg# your configure.ac with the minimum required version, such as:
7453ab47cfaaSmrg# XORG_MACROS_VERSION(1.1)
7454ab47cfaaSmrg#
7455ab47cfaaSmrg# To force at least a version with this macro defined, also add:
7456ab47cfaaSmrg# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
7457ab47cfaaSmrg#
7458ab47cfaaSmrg#
7459ab47cfaaSmrg# See the "minimum version" comment for each macro you use to see what 
7460ab47cfaaSmrg# version you require.
7461ab47cfaaSmrgAC_DEFUN([XORG_MACROS_VERSION],[
7462ab47cfaaSmrg	[XORG_MACROS_needed_version=$1
7463ab47cfaaSmrg	XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
7464ab47cfaaSmrg	XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
7465ab47cfaaSmrg	AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
7466ab47cfaaSmrg	[XORG_MACROS_version=1.1.5
7467ab47cfaaSmrg	XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
7468ab47cfaaSmrg	XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
7469ab47cfaaSmrg	if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
7470ab47cfaaSmrg		AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
7471ab47cfaaSmrg	fi
7472ab47cfaaSmrg	if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
7473ab47cfaaSmrg		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])
7474ab47cfaaSmrg	fi
7475ab47cfaaSmrg	AC_MSG_RESULT([yes, $XORG_MACROS_version])
7476ab47cfaaSmrg]) # XORG_MACROS_VERSION
7477ab47cfaaSmrg
7478ab47cfaaSmrg# XORG_PROG_RAWCPP()
7479ab47cfaaSmrg# ------------------
7480ab47cfaaSmrg# Minimum version: 1.0.0
7481ab47cfaaSmrg#
7482ab47cfaaSmrg# Find cpp program and necessary flags for use in pre-processing text files
7483ab47cfaaSmrg# such as man pages and config files
7484ab47cfaaSmrgAC_DEFUN([XORG_PROG_RAWCPP],[
7485ab47cfaaSmrgAC_REQUIRE([AC_PROG_CPP])
7486ab47cfaaSmrgAC_PATH_PROGS(RAWCPP, [cpp], [${CPP}], 
7487ab47cfaaSmrg   [$PATH:/bin:/usr/bin:/usr/lib:/usr/libexec:/usr/ccs/lib:/usr/ccs/lbin:/lib])
7488ab47cfaaSmrg
7489ab47cfaaSmrg# Check for flag to avoid builtin definitions - assumes unix is predefined,
7490ab47cfaaSmrg# which is not the best choice for supporting other OS'es, but covers most
7491ab47cfaaSmrg# of the ones we need for now.
7492ab47cfaaSmrgAC_MSG_CHECKING([if $RAWCPP requires -undef])
7493ab47cfaaSmrgAC_LANG_CONFTEST([Does cpp redefine unix ?])
7494ab47cfaaSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
7495ab47cfaaSmrg	AC_MSG_RESULT([no])
7496ab47cfaaSmrgelse
7497ab47cfaaSmrg	if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
7498ab47cfaaSmrg		RAWCPPFLAGS=-undef
7499ab47cfaaSmrg		AC_MSG_RESULT([yes])
7500ab47cfaaSmrg	else
7501ab47cfaaSmrg		AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef.  I don't know what to do.])
7502ab47cfaaSmrg	fi
7503ab47cfaaSmrgfi
7504ab47cfaaSmrgrm -f conftest.$ac_ext
7505ab47cfaaSmrg
7506ab47cfaaSmrgAC_MSG_CHECKING([if $RAWCPP requires -traditional])
7507ab47cfaaSmrgAC_LANG_CONFTEST([Does cpp preserve   "whitespace"?])
7508ab47cfaaSmrgif test `${RAWCPP} < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
7509ab47cfaaSmrg	AC_MSG_RESULT([no])
7510ab47cfaaSmrgelse
7511ab47cfaaSmrg	if test `${RAWCPP} -traditional < conftest.$ac_ext | grep -c 'preserve   \"'` -eq 1 ; then
7512ab47cfaaSmrg		RAWCPPFLAGS="${RAWCPPFLAGS} -traditional"
7513ab47cfaaSmrg		AC_MSG_RESULT([yes])
7514ab47cfaaSmrg	else
7515ab47cfaaSmrg		AC_MSG_ERROR([${RAWCPP} does not preserve whitespace with or without -traditional.  I don't know what to do.])
7516ab47cfaaSmrg	fi
7517ab47cfaaSmrgfi
7518ab47cfaaSmrgrm -f conftest.$ac_ext
7519ab47cfaaSmrgAC_SUBST(RAWCPPFLAGS)
7520ab47cfaaSmrg]) # XORG_PROG_RAWCPP
7521ab47cfaaSmrg
7522ab47cfaaSmrg# XORG_MANPAGE_SECTIONS()
7523ab47cfaaSmrg# -----------------------
7524ab47cfaaSmrg# Minimum version: 1.0.0
7525ab47cfaaSmrg#
7526ab47cfaaSmrg# Determine which sections man pages go in for the different man page types
7527ab47cfaaSmrg# on this OS - replaces *ManSuffix settings in old Imake *.cf per-os files.
7528ab47cfaaSmrg# Not sure if there's any better way than just hardcoding by OS name.
7529ab47cfaaSmrg# Override default settings by setting environment variables
7530ab47cfaaSmrg
7531ab47cfaaSmrgAC_DEFUN([XORG_MANPAGE_SECTIONS],[
7532ab47cfaaSmrgAC_REQUIRE([AC_CANONICAL_HOST])
7533ab47cfaaSmrg
7534ab47cfaaSmrgif test x$APP_MAN_SUFFIX = x    ; then
7535ab47cfaaSmrg    APP_MAN_SUFFIX=1
7536ab47cfaaSmrgfi
7537ab47cfaaSmrgif test x$APP_MAN_DIR = x    ; then
7538ab47cfaaSmrg    APP_MAN_DIR='$(mandir)/man$(APP_MAN_SUFFIX)'
7539ab47cfaaSmrgfi
7540ab47cfaaSmrg
7541ab47cfaaSmrgif test x$LIB_MAN_SUFFIX = x    ; then
7542ab47cfaaSmrg    LIB_MAN_SUFFIX=3
7543ab47cfaaSmrgfi
7544ab47cfaaSmrgif test x$LIB_MAN_DIR = x    ; then
7545ab47cfaaSmrg    LIB_MAN_DIR='$(mandir)/man$(LIB_MAN_SUFFIX)'
7546ab47cfaaSmrgfi
7547ab47cfaaSmrg
7548ab47cfaaSmrgif test x$FILE_MAN_SUFFIX = x    ; then
7549ab47cfaaSmrg    case $host_os in
7550ab47cfaaSmrg	solaris*)	FILE_MAN_SUFFIX=4  ;;
7551ab47cfaaSmrg	*)		FILE_MAN_SUFFIX=5  ;;
7552ab47cfaaSmrg    esac
7553ab47cfaaSmrgfi
7554ab47cfaaSmrgif test x$FILE_MAN_DIR = x    ; then
7555ab47cfaaSmrg    FILE_MAN_DIR='$(mandir)/man$(FILE_MAN_SUFFIX)'
7556ab47cfaaSmrgfi
7557ab47cfaaSmrg
7558ab47cfaaSmrgif test x$MISC_MAN_SUFFIX = x    ; then
7559ab47cfaaSmrg    case $host_os in
7560ab47cfaaSmrg	solaris*)	MISC_MAN_SUFFIX=5  ;;
7561ab47cfaaSmrg	*)		MISC_MAN_SUFFIX=7  ;;
7562ab47cfaaSmrg    esac
7563ab47cfaaSmrgfi
7564ab47cfaaSmrgif test x$MISC_MAN_DIR = x    ; then
7565ab47cfaaSmrg    MISC_MAN_DIR='$(mandir)/man$(MISC_MAN_SUFFIX)'
7566ab47cfaaSmrgfi
7567ab47cfaaSmrg
7568ab47cfaaSmrgif test x$DRIVER_MAN_SUFFIX = x    ; then
7569ab47cfaaSmrg    case $host_os in
7570ab47cfaaSmrg	solaris*)	DRIVER_MAN_SUFFIX=7  ;;
7571ab47cfaaSmrg	*)		DRIVER_MAN_SUFFIX=4  ;;
7572ab47cfaaSmrg    esac
7573ab47cfaaSmrgfi
7574ab47cfaaSmrgif test x$DRIVER_MAN_DIR = x    ; then
7575ab47cfaaSmrg    DRIVER_MAN_DIR='$(mandir)/man$(DRIVER_MAN_SUFFIX)'
7576ab47cfaaSmrgfi
7577ab47cfaaSmrg
7578ab47cfaaSmrgif test x$ADMIN_MAN_SUFFIX = x    ; then
7579ab47cfaaSmrg    case $host_os in
7580ab47cfaaSmrg	solaris*)	ADMIN_MAN_SUFFIX=1m ;;
7581ab47cfaaSmrg	*)		ADMIN_MAN_SUFFIX=8  ;;
7582ab47cfaaSmrg    esac
7583ab47cfaaSmrgfi
7584ab47cfaaSmrgif test x$ADMIN_MAN_DIR = x    ; then
7585ab47cfaaSmrg    ADMIN_MAN_DIR='$(mandir)/man$(ADMIN_MAN_SUFFIX)'
7586ab47cfaaSmrgfi
7587ab47cfaaSmrg
7588ab47cfaaSmrg
7589ab47cfaaSmrgAC_SUBST([APP_MAN_SUFFIX])
7590ab47cfaaSmrgAC_SUBST([LIB_MAN_SUFFIX])
7591ab47cfaaSmrgAC_SUBST([FILE_MAN_SUFFIX])
7592ab47cfaaSmrgAC_SUBST([MISC_MAN_SUFFIX])
7593ab47cfaaSmrgAC_SUBST([DRIVER_MAN_SUFFIX])
7594ab47cfaaSmrgAC_SUBST([ADMIN_MAN_SUFFIX])
7595ab47cfaaSmrgAC_SUBST([APP_MAN_DIR])
7596ab47cfaaSmrgAC_SUBST([LIB_MAN_DIR])
7597ab47cfaaSmrgAC_SUBST([FILE_MAN_DIR])
7598ab47cfaaSmrgAC_SUBST([MISC_MAN_DIR])
7599ab47cfaaSmrgAC_SUBST([DRIVER_MAN_DIR])
7600ab47cfaaSmrgAC_SUBST([ADMIN_MAN_DIR])
7601ab47cfaaSmrg]) # XORG_MANPAGE_SECTIONS
7602ab47cfaaSmrg
7603ab47cfaaSmrg# XORG_CHECK_LINUXDOC
7604ab47cfaaSmrg# -------------------
7605ab47cfaaSmrg# Minimum version: 1.0.0
7606ab47cfaaSmrg#
7607ab47cfaaSmrg# Defines the variable MAKE_TEXT if the necessary tools and
7608ab47cfaaSmrg# files are found. $(MAKE_TEXT) blah.sgml will then produce blah.txt.
7609ab47cfaaSmrg# Whether or not the necessary tools and files are found can be checked
7610ab47cfaaSmrg# with the AM_CONDITIONAL "BUILD_LINUXDOC"
7611ab47cfaaSmrgAC_DEFUN([XORG_CHECK_LINUXDOC],[
7612ab47cfaaSmrgXORG_SGML_PATH=$prefix/share/sgml
7613ab47cfaaSmrgHAVE_DEFS_ENT=
7614ab47cfaaSmrg
7615ab47cfaaSmrgif test x"$cross_compiling" = x"yes" ; then
7616ab47cfaaSmrg  HAVE_DEFS_ENT=no
7617ab47cfaaSmrgelse
7618ab47cfaaSmrg  AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7619ab47cfaaSmrgfi
7620ab47cfaaSmrg
7621ab47cfaaSmrgAC_PATH_PROG(LINUXDOC, linuxdoc)
7622ab47cfaaSmrgAC_PATH_PROG(PS2PDF, ps2pdf)
7623ab47cfaaSmrg
7624ab47cfaaSmrgAC_MSG_CHECKING([Whether to build documentation])
7625ab47cfaaSmrg
7626ab47cfaaSmrgif test x$HAVE_DEFS_ENT != x && test x$LINUXDOC != x ; then
7627ab47cfaaSmrg   BUILDDOC=yes
7628ab47cfaaSmrgelse
7629ab47cfaaSmrg   BUILDDOC=no
7630ab47cfaaSmrgfi
7631ab47cfaaSmrg
7632ab47cfaaSmrgAM_CONDITIONAL(BUILD_LINUXDOC, [test x$BUILDDOC = xyes])
7633ab47cfaaSmrg
7634ab47cfaaSmrgAC_MSG_RESULT([$BUILDDOC])
7635ab47cfaaSmrg
7636ab47cfaaSmrgAC_MSG_CHECKING([Whether to build pdf documentation])
7637ab47cfaaSmrg
7638ab47cfaaSmrgif test x$PS2PDF != x && test x$BUILD_PDFDOC != xno; then
7639ab47cfaaSmrg   BUILDPDFDOC=yes
7640ab47cfaaSmrgelse
7641ab47cfaaSmrg   BUILDPDFDOC=no
7642ab47cfaaSmrgfi
7643ab47cfaaSmrg
7644ab47cfaaSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7645ab47cfaaSmrg
7646ab47cfaaSmrgAC_MSG_RESULT([$BUILDPDFDOC])
7647ab47cfaaSmrg
7648ab47cfaaSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH GROFF_NO_SGR=y $LINUXDOC -B txt"
7649ab47cfaaSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC -B latex --papersize=letter --output=ps"
7650ab47cfaaSmrgMAKE_PDF="$PS2PDF"
7651ab47cfaaSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $LINUXDOC  -B html --split=0"
7652ab47cfaaSmrg
7653ab47cfaaSmrgAC_SUBST(MAKE_TEXT)
7654ab47cfaaSmrgAC_SUBST(MAKE_PS)
7655ab47cfaaSmrgAC_SUBST(MAKE_PDF)
7656ab47cfaaSmrgAC_SUBST(MAKE_HTML)
7657ab47cfaaSmrg]) # XORG_CHECK_LINUXDOC
7658ab47cfaaSmrg
7659ab47cfaaSmrg# XORG_CHECK_DOCBOOK
7660ab47cfaaSmrg# -------------------
7661ab47cfaaSmrg# Minimum version: 1.0.0
7662ab47cfaaSmrg#
7663ab47cfaaSmrg# Checks for the ability to build output formats from SGML DocBook source.
7664ab47cfaaSmrg# For XXX in {TXT, PDF, PS, HTML}, the AM_CONDITIONAL "BUILD_XXXDOC"
7665ab47cfaaSmrg# indicates whether the necessary tools and files are found and, if set,
7666ab47cfaaSmrg# $(MAKE_XXX) blah.sgml will produce blah.xxx.
7667ab47cfaaSmrgAC_DEFUN([XORG_CHECK_DOCBOOK],[
7668ab47cfaaSmrgXORG_SGML_PATH=$prefix/share/sgml
7669ab47cfaaSmrgHAVE_DEFS_ENT=
7670ab47cfaaSmrgBUILDTXTDOC=no
7671ab47cfaaSmrgBUILDPDFDOC=no
7672ab47cfaaSmrgBUILDPSDOC=no
7673ab47cfaaSmrgBUILDHTMLDOC=no
7674ab47cfaaSmrg
7675ab47cfaaSmrgAC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
7676ab47cfaaSmrg
7677ab47cfaaSmrgAC_PATH_PROG(DOCBOOKPS, docbook2ps)
7678ab47cfaaSmrgAC_PATH_PROG(DOCBOOKPDF, docbook2pdf)
7679ab47cfaaSmrgAC_PATH_PROG(DOCBOOKHTML, docbook2html)
7680ab47cfaaSmrgAC_PATH_PROG(DOCBOOKTXT, docbook2txt)
7681ab47cfaaSmrg
7682ab47cfaaSmrgAC_MSG_CHECKING([Whether to build text documentation])
7683ab47cfaaSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKTXT != x &&
7684ab47cfaaSmrg   test x$BUILD_TXTDOC != xno; then
7685ab47cfaaSmrg	BUILDTXTDOC=yes
7686ab47cfaaSmrgfi
7687ab47cfaaSmrgAM_CONDITIONAL(BUILD_TXTDOC, [test x$BUILDTXTDOC = xyes])
7688ab47cfaaSmrgAC_MSG_RESULT([$BUILDTXTDOC])
7689ab47cfaaSmrg
7690ab47cfaaSmrgAC_MSG_CHECKING([Whether to build PDF documentation])
7691ab47cfaaSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPDF != x &&
7692ab47cfaaSmrg   test x$BUILD_PDFDOC != xno; then
7693ab47cfaaSmrg	BUILDPDFDOC=yes
7694ab47cfaaSmrgfi
7695ab47cfaaSmrgAM_CONDITIONAL(BUILD_PDFDOC, [test x$BUILDPDFDOC = xyes])
7696ab47cfaaSmrgAC_MSG_RESULT([$BUILDPDFDOC])
7697ab47cfaaSmrg
7698ab47cfaaSmrgAC_MSG_CHECKING([Whether to build PostScript documentation])
7699ab47cfaaSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKPS != x &&
7700ab47cfaaSmrg   test x$BUILD_PSDOC != xno; then
7701ab47cfaaSmrg	BUILDPSDOC=yes
7702ab47cfaaSmrgfi
7703ab47cfaaSmrgAM_CONDITIONAL(BUILD_PSDOC, [test x$BUILDPSDOC = xyes])
7704ab47cfaaSmrgAC_MSG_RESULT([$BUILDPSDOC])
7705ab47cfaaSmrg
7706ab47cfaaSmrgAC_MSG_CHECKING([Whether to build HTML documentation])
7707ab47cfaaSmrgif test x$HAVE_DEFS_ENT != x && test x$DOCBOOKHTML != x &&
7708ab47cfaaSmrg   test x$BUILD_HTMLDOC != xno; then
7709ab47cfaaSmrg	BUILDHTMLDOC=yes
7710ab47cfaaSmrgfi
7711ab47cfaaSmrgAM_CONDITIONAL(BUILD_HTMLDOC, [test x$BUILDHTMLDOC = xyes])
7712ab47cfaaSmrgAC_MSG_RESULT([$BUILDHTMLDOC])
7713ab47cfaaSmrg
7714ab47cfaaSmrgMAKE_TEXT="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKTXT"
7715ab47cfaaSmrgMAKE_PS="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPS"
7716ab47cfaaSmrgMAKE_PDF="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKPDF"
7717ab47cfaaSmrgMAKE_HTML="SGML_SEARCH_PATH=$XORG_SGML_PATH $DOCBOOKHTML"
7718ab47cfaaSmrg
7719ab47cfaaSmrgAC_SUBST(MAKE_TEXT)
7720ab47cfaaSmrgAC_SUBST(MAKE_PS)
7721ab47cfaaSmrgAC_SUBST(MAKE_PDF)
7722ab47cfaaSmrgAC_SUBST(MAKE_HTML)
7723ab47cfaaSmrg]) # XORG_CHECK_DOCBOOK
7724ab47cfaaSmrg
7725ab47cfaaSmrg# XORG_CHECK_MALLOC_ZERO
7726ab47cfaaSmrg# ----------------------
7727ab47cfaaSmrg# Minimum version: 1.0.0
7728ab47cfaaSmrg#
7729ab47cfaaSmrg# Defines {MALLOC,XMALLOC,XTMALLOC}_ZERO_CFLAGS appropriately if
7730ab47cfaaSmrg# malloc(0) returns NULL.  Packages should add one of these cflags to
7731ab47cfaaSmrg# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
7732ab47cfaaSmrgAC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
7733ab47cfaaSmrgAC_ARG_ENABLE(malloc0returnsnull,
7734ab47cfaaSmrg	AC_HELP_STRING([--enable-malloc0returnsnull],
7735ab47cfaaSmrg		       [malloc(0) returns NULL (default: auto)]),
7736ab47cfaaSmrg	[MALLOC_ZERO_RETURNS_NULL=$enableval],
7737ab47cfaaSmrg	[MALLOC_ZERO_RETURNS_NULL=auto])
7738ab47cfaaSmrg
7739ab47cfaaSmrgAC_MSG_CHECKING([whether malloc(0) returns NULL])
7740ab47cfaaSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xauto; then
7741ab47cfaaSmrg	AC_RUN_IFELSE([
7742ab47cfaaSmrgchar *malloc();
7743ab47cfaaSmrgchar *realloc();
7744ab47cfaaSmrgchar *calloc();
7745ab47cfaaSmrgmain() {
7746ab47cfaaSmrg    char *m0, *r0, *c0, *p;
7747ab47cfaaSmrg    m0 = malloc(0);
7748ab47cfaaSmrg    p = malloc(10);
7749ab47cfaaSmrg    r0 = realloc(p,0);
7750ab47cfaaSmrg    c0 = calloc(0);
7751ab47cfaaSmrg    exit(m0 == 0 || r0 == 0 || c0 == 0 ? 0 : 1);
7752ab47cfaaSmrg}],
7753ab47cfaaSmrg		[MALLOC_ZERO_RETURNS_NULL=yes],
7754ab47cfaaSmrg		[MALLOC_ZERO_RETURNS_NULL=no])
7755ab47cfaaSmrgfi
7756ab47cfaaSmrgAC_MSG_RESULT([$MALLOC_ZERO_RETURNS_NULL])
7757ab47cfaaSmrg
7758ab47cfaaSmrgif test "x$MALLOC_ZERO_RETURNS_NULL" = xyes; then
7759ab47cfaaSmrg	MALLOC_ZERO_CFLAGS="-DMALLOC_0_RETURNS_NULL"
7760ab47cfaaSmrg	XMALLOC_ZERO_CFLAGS=$MALLOC_ZERO_CFLAGS
7761ab47cfaaSmrg	XTMALLOC_ZERO_CFLAGS="$MALLOC_ZERO_CFLAGS -DXTMALLOC_BC"
7762ab47cfaaSmrgelse
7763ab47cfaaSmrg	MALLOC_ZERO_CFLAGS=""
7764ab47cfaaSmrg	XMALLOC_ZERO_CFLAGS=""
7765ab47cfaaSmrg	XTMALLOC_ZERO_CFLAGS=""
7766ab47cfaaSmrgfi
7767ab47cfaaSmrg
7768ab47cfaaSmrgAC_SUBST([MALLOC_ZERO_CFLAGS])
7769ab47cfaaSmrgAC_SUBST([XMALLOC_ZERO_CFLAGS])
7770ab47cfaaSmrgAC_SUBST([XTMALLOC_ZERO_CFLAGS])
7771ab47cfaaSmrg]) # XORG_CHECK_MALLOC_ZERO
7772ab47cfaaSmrg
7773ab47cfaaSmrg# XORG_WITH_LINT()
7774ab47cfaaSmrg# ----------------
7775ab47cfaaSmrg# Minimum version: 1.1.0
7776ab47cfaaSmrg#
7777ab47cfaaSmrg# Sets up flags for source checkers such as lint and sparse if --with-lint
7778ab47cfaaSmrg# is specified.   (Use --with-lint=sparse for sparse.)
7779ab47cfaaSmrg# Sets $LINT to name of source checker passed with --with-lint (default: lint)
7780ab47cfaaSmrg# Sets $LINT_FLAGS to flags to pass to source checker
7781ab47cfaaSmrg# Sets LINT automake conditional if enabled (default: disabled)
7782ab47cfaaSmrg#
7783ab47cfaaSmrgAC_DEFUN([XORG_WITH_LINT],[
7784ab47cfaaSmrg
7785ab47cfaaSmrg# Allow checking code with lint, sparse, etc.
7786ab47cfaaSmrgAC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
7787ab47cfaaSmrg		[Use a lint-style source code checker (default: disabled)])],
7788ab47cfaaSmrg		[use_lint=$withval], [use_lint=no])
7789ab47cfaaSmrgif test "x$use_lint" = "xyes" ; then
7790ab47cfaaSmrg	LINT="lint"
7791ab47cfaaSmrgelse
7792ab47cfaaSmrg	LINT="$use_lint"
7793ab47cfaaSmrgfi
7794ab47cfaaSmrgif test "x$LINT_FLAGS" = "x" -a "x$LINT" != "xno" ; then
7795ab47cfaaSmrg    case $LINT in
7796ab47cfaaSmrg	lint|*/lint)
7797ab47cfaaSmrg	    case $host_os in
7798ab47cfaaSmrg		solaris*)
7799ab47cfaaSmrg			LINT_FLAGS="-u -b -h -erroff=E_INDISTING_FROM_TRUNC2"
7800ab47cfaaSmrg			;;
7801ab47cfaaSmrg	    esac
7802ab47cfaaSmrg	    ;;
7803ab47cfaaSmrg    esac
7804ab47cfaaSmrgfi
7805ab47cfaaSmrg
7806ab47cfaaSmrgAC_SUBST(LINT)
7807ab47cfaaSmrgAC_SUBST(LINT_FLAGS)
7808ab47cfaaSmrgAM_CONDITIONAL(LINT, [test x$LINT != xno])
7809ab47cfaaSmrg
7810ab47cfaaSmrg]) # XORG_WITH_LINT
7811ab47cfaaSmrg
7812ab47cfaaSmrg# XORG_LINT_LIBRARY(LIBNAME)
7813ab47cfaaSmrg# --------------------------
7814ab47cfaaSmrg# Minimum version: 1.1.0
7815ab47cfaaSmrg#
7816ab47cfaaSmrg# Sets up flags for building lint libraries for checking programs that call
7817ab47cfaaSmrg# functions in the library.
7818ab47cfaaSmrg# Disabled by default, enable with --enable-lint-library
7819ab47cfaaSmrg# Sets: 
7820ab47cfaaSmrg#	@LINTLIB@		- name of lint library file to make
7821ab47cfaaSmrg#	MAKE_LINT_LIB		- automake conditional
7822ab47cfaaSmrg#
7823ab47cfaaSmrg
7824ab47cfaaSmrgAC_DEFUN([XORG_LINT_LIBRARY],[
7825ab47cfaaSmrgAC_REQUIRE([XORG_WITH_LINT])
7826ab47cfaaSmrg# Build lint "library" for more indepth checks of programs calling this library
7827ab47cfaaSmrgAC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
7828ab47cfaaSmrg	[Create lint library (default: disabled)])],
7829ab47cfaaSmrg	[make_lint_lib=$enableval], [make_lint_lib=no])
7830ab47cfaaSmrgif test "x$make_lint_lib" != "xno" ; then
7831ab47cfaaSmrg	if test "x$LINT" = "xno" ; then
7832ab47cfaaSmrg		AC_MSG_ERROR([Cannot make lint library without --with-lint])
7833ab47cfaaSmrg	fi
7834ab47cfaaSmrg	if test "x$make_lint_lib" = "xyes" ; then
7835ab47cfaaSmrg		LINTLIB=llib-l$1.ln
7836ab47cfaaSmrg	else
7837ab47cfaaSmrg		LINTLIB=$make_lint_lib
7838ab47cfaaSmrg	fi
7839ab47cfaaSmrgfi
7840ab47cfaaSmrgAC_SUBST(LINTLIB)
7841ab47cfaaSmrgAM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
7842ab47cfaaSmrg
7843ab47cfaaSmrg]) # XORG_LINT_LIBRARY
7844ab47cfaaSmrg
7845ab47cfaaSmrgdnl Copyright 2005 Red Hat, Inc
7846ab47cfaaSmrgdnl 
7847ab47cfaaSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
7848ab47cfaaSmrgdnl documentation for any purpose is hereby granted without fee, provided that
7849ab47cfaaSmrgdnl the above copyright notice appear in all copies and that both that
7850ab47cfaaSmrgdnl copyright notice and this permission notice appear in supporting
7851ab47cfaaSmrgdnl documentation.
7852ab47cfaaSmrgdnl 
7853ab47cfaaSmrgdnl The above copyright notice and this permission notice shall be included
7854ab47cfaaSmrgdnl in all copies or substantial portions of the Software.
7855ab47cfaaSmrgdnl 
7856ab47cfaaSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7857ab47cfaaSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7858ab47cfaaSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
7859ab47cfaaSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
7860ab47cfaaSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
7861ab47cfaaSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7862ab47cfaaSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
7863ab47cfaaSmrgdnl 
7864ab47cfaaSmrgdnl Except as contained in this notice, the name of the copyright holders shall
7865ab47cfaaSmrgdnl not be used in advertising or otherwise to promote the sale, use or
7866ab47cfaaSmrgdnl other dealings in this Software without prior written authorization
7867ab47cfaaSmrgdnl from the copyright holders.
7868ab47cfaaSmrgdnl 
7869ab47cfaaSmrg
7870ab47cfaaSmrg# XORG_DRIVER_CHECK_EXT()
7871ab47cfaaSmrg# --------------------------
7872ab47cfaaSmrg# Checks for the $1 define in xorg-server.h (from the sdk).  If it
7873ab47cfaaSmrg# is defined, then add $1 to $REQUIRED_MODULES.
7874ab47cfaaSmrg
7875ab47cfaaSmrgAC_DEFUN([XORG_DRIVER_CHECK_EXT],[
7876ab47cfaaSmrg	SAVE_CFLAGS="$CFLAGS"
7877ab47cfaaSmrg	CFLAGS="$CFLAGS -I`pkg-config --variable=sdkdir xorg-server`"
7878ab47cfaaSmrg	AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
7879ab47cfaaSmrg#include "xorg-server.h"
7880ab47cfaaSmrg#if !defined $1
7881ab47cfaaSmrg#error $1 not defined
7882ab47cfaaSmrg#endif
7883ab47cfaaSmrg		]])],
7884ab47cfaaSmrg		[_EXT_CHECK=yes],
7885ab47cfaaSmrg		[_EXT_CHECK=no])
7886ab47cfaaSmrg	CFLAGS="$SAVE_CFLAGS"
7887ab47cfaaSmrg	AC_MSG_CHECKING([if $1 is defined])
7888ab47cfaaSmrg	AC_MSG_RESULT([$_EXT_CHECK])
7889ab47cfaaSmrg	if test "$_EXT_CHECK" != no; then
7890ab47cfaaSmrg		REQUIRED_MODULES="$REQUIRED_MODULES $2"
7891ab47cfaaSmrg	fi
7892ab47cfaaSmrg])
7893ab47cfaaSmrg
7894ab47cfaaSmrgdnl Copyright 2005 Red Hat, Inc
7895ab47cfaaSmrgdnl
7896ab47cfaaSmrgdnl Permission to use, copy, modify, distribute, and sell this software and its
7897ab47cfaaSmrgdnl documentation for any purpose is hereby granted without fee, provided that
7898ab47cfaaSmrgdnl the above copyright notice appear in all copies and that both that
7899ab47cfaaSmrgdnl copyright notice and this permission notice appear in supporting
7900ab47cfaaSmrgdnl documentation.
7901ab47cfaaSmrgdnl
7902ab47cfaaSmrgdnl The above copyright notice and this permission notice shall be included
7903ab47cfaaSmrgdnl in all copies or substantial portions of the Software.
7904ab47cfaaSmrgdnl
7905ab47cfaaSmrgdnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
7906ab47cfaaSmrgdnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
7907ab47cfaaSmrgdnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
7908ab47cfaaSmrgdnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
7909ab47cfaaSmrgdnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
7910ab47cfaaSmrgdnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
7911ab47cfaaSmrgdnl OTHER DEALINGS IN THE SOFTWARE.
7912ab47cfaaSmrgdnl
7913ab47cfaaSmrgdnl Except as contained in this notice, the name of the copyright holders shall
7914ab47cfaaSmrgdnl not be used in advertising or otherwise to promote the sale, use or
7915ab47cfaaSmrgdnl other dealings in this Software without prior written authorization
7916ab47cfaaSmrgdnl from the copyright holders.
7917ab47cfaaSmrgdnl
7918ab47cfaaSmrg
7919ab47cfaaSmrg# XORG_RELEASE_VERSION
7920ab47cfaaSmrg# --------------------
7921ab47cfaaSmrg# Adds --with/without-release-string and changes the PACKAGE and
7922ab47cfaaSmrg# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION".  If
7923ab47cfaaSmrg# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged.  Also
7924ab47cfaaSmrg# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
7925ab47cfaaSmrg 
7926ab47cfaaSmrgAC_DEFUN([XORG_RELEASE_VERSION],[
7927ab47cfaaSmrg	AC_ARG_WITH(release-version,
7928ab47cfaaSmrg			AC_HELP_STRING([--with-release-version=STRING],
7929ab47cfaaSmrg				[Use release version string in package name]),
7930ab47cfaaSmrg			[RELEASE_VERSION="$withval"],
7931ab47cfaaSmrg			[RELEASE_VERSION=""])
7932ab47cfaaSmrg	if test "x$RELEASE_VERSION" != "x"; then
7933ab47cfaaSmrg		PACKAGE="$PACKAGE-$RELEASE_VERSION"
7934ab47cfaaSmrg		PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
7935ab47cfaaSmrg		AC_MSG_NOTICE([Building with package name set to $PACKAGE])
7936ab47cfaaSmrg	fi
7937ab47cfaaSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
7938ab47cfaaSmrg		[`echo $PACKAGE_VERSION | cut -d . -f 1`],
7939ab47cfaaSmrg		[Major version of this package])
7940ab47cfaaSmrg	PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
7941ab47cfaaSmrg	if test "x$PVM" = "x"; then
7942ab47cfaaSmrg		PVM="0"
7943ab47cfaaSmrg	fi
7944ab47cfaaSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
7945ab47cfaaSmrg		[$PVM],
7946ab47cfaaSmrg		[Minor version of this package])
7947ab47cfaaSmrg	PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
7948ab47cfaaSmrg	if test "x$PVP" = "x"; then
7949ab47cfaaSmrg		PVP="0"
7950ab47cfaaSmrg	fi
7951ab47cfaaSmrg	AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
7952ab47cfaaSmrg		[$PVP],
7953ab47cfaaSmrg		[Patch version of this package])
7954ab47cfaaSmrg])
7955ab47cfaaSmrg
7956