1251883Speter# generated automatically by aclocal 1.9.6 -*- Autoconf -*-
2251883Speter
3251883Speter# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
4251883Speter# 2005  Free Software Foundation, Inc.
5251883Speter# This file is free software; the Free Software Foundation
6251883Speter# gives unlimited permission to copy and/or distribute it,
7251883Speter# with or without modifications, as long as this notice is preserved.
8251883Speter
9251883Speter# This program is distributed in the hope that it will be useful,
10251883Speter# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
11251883Speter# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12251883Speter# PARTICULAR PURPOSE.
13251883Speter
14251883Speter# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
15251883Speter
16251883Speter# serial 48 AC_PROG_LIBTOOL
17251883Speter
18251883Speter
19251883Speter# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
20251883Speter# -----------------------------------------------------------
21251883Speter# If this macro is not defined by Autoconf, define it here.
22251883Speterm4_ifdef([AC_PROVIDE_IFELSE],
23251883Speter         [],
24251883Speter         [m4_define([AC_PROVIDE_IFELSE],
25251883Speter	         [m4_ifdef([AC_PROVIDE_$1],
26251883Speter		           [$2], [$3])])])
27251883Speter
28251883Speter
29251883Speter# AC_PROG_LIBTOOL
30251883Speter# ---------------
31251883SpeterAC_DEFUN([AC_PROG_LIBTOOL],
32251883Speter[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
33251883Speterdnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
34251883Speterdnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
35251883Speter  AC_PROVIDE_IFELSE([AC_PROG_CXX],
36251883Speter    [AC_LIBTOOL_CXX],
37251883Speter    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
38251883Speter  ])])
39251883Speterdnl And a similar setup for Fortran 77 support
40251883Speter  AC_PROVIDE_IFELSE([AC_PROG_F77],
41251883Speter    [AC_LIBTOOL_F77],
42251883Speter    [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77
43251883Speter])])
44251883Speter
45251883Speterdnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly.
46251883Speterdnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run
47251883Speterdnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both.
48251883Speter  AC_PROVIDE_IFELSE([AC_PROG_GCJ],
49251883Speter    [AC_LIBTOOL_GCJ],
50251883Speter    [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
51251883Speter      [AC_LIBTOOL_GCJ],
52251883Speter      [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],
53251883Speter	[AC_LIBTOOL_GCJ],
54251883Speter      [ifdef([AC_PROG_GCJ],
55251883Speter	     [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])
56251883Speter       ifdef([A][M_PROG_GCJ],
57251883Speter	     [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])])
58251883Speter       ifdef([LT_AC_PROG_GCJ],
59251883Speter	     [define([LT_AC_PROG_GCJ],
60251883Speter		defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])])
61251883Speter])])# AC_PROG_LIBTOOL
62251883Speter
63251883Speter
64251883Speter# _AC_PROG_LIBTOOL
65251883Speter# ----------------
66251883SpeterAC_DEFUN([_AC_PROG_LIBTOOL],
67251883Speter[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
68251883SpeterAC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
69251883SpeterAC_BEFORE([$0],[AC_LIBTOOL_F77])dnl
70251883SpeterAC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl
71251883Speter
72251883Speter# This can be used to rebuild libtool when needed
73251883SpeterLIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
74251883Speter
75251883Speter# Always use our own libtool.
76251883SpeterLIBTOOL='$(SHELL) $(top_builddir)/libtool'
77251883SpeterAC_SUBST(LIBTOOL)dnl
78251883Speter
79251883Speter# Prevent multiple expansion
80251883Speterdefine([AC_PROG_LIBTOOL], [])
81251883Speter])# _AC_PROG_LIBTOOL
82251883Speter
83251883Speter
84251883Speter# AC_LIBTOOL_SETUP
85251883Speter# ----------------
86251883SpeterAC_DEFUN([AC_LIBTOOL_SETUP],
87251883Speter[AC_PREREQ(2.50)dnl
88251883SpeterAC_REQUIRE([AC_ENABLE_SHARED])dnl
89251883SpeterAC_REQUIRE([AC_ENABLE_STATIC])dnl
90251883SpeterAC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
91251883SpeterAC_REQUIRE([AC_CANONICAL_HOST])dnl
92251883SpeterAC_REQUIRE([AC_CANONICAL_BUILD])dnl
93251883SpeterAC_REQUIRE([AC_PROG_CC])dnl
94251883SpeterAC_REQUIRE([AC_PROG_LD])dnl
95251883SpeterAC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
96251883SpeterAC_REQUIRE([AC_PROG_NM])dnl
97251883Speter
98251883SpeterAC_REQUIRE([AC_PROG_LN_S])dnl
99251883SpeterAC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
100251883Speter# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
101251883SpeterAC_REQUIRE([AC_OBJEXT])dnl
102251883SpeterAC_REQUIRE([AC_EXEEXT])dnl
103251883Speterdnl
104251883Speter
105251883SpeterAC_LIBTOOL_SYS_MAX_CMD_LEN
106251883SpeterAC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
107251883SpeterAC_LIBTOOL_OBJDIR
108251883Speter
109251883SpeterAC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
110251883Speter_LT_AC_PROG_ECHO_BACKSLASH
111251883Speter
112251883Spetercase $host_os in
113251883Speteraix3*)
114251883Speter  # AIX sometimes has problems with the GCC collect2 program.  For some
115251883Speter  # reason, if we set the COLLECT_NAMES environment variable, the problems
116251883Speter  # vanish in a puff of smoke.
117251883Speter  if test "X${COLLECT_NAMES+set}" != Xset; then
118251883Speter    COLLECT_NAMES=
119251883Speter    export COLLECT_NAMES
120251883Speter  fi
121251883Speter  ;;
122251883Speteresac
123251883Speter
124251883Speter# Sed substitution that helps us do robust quoting.  It backslashifies
125251883Speter# metacharacters that are still active within double-quoted strings.
126251883SpeterXsed='sed -e 1s/^X//'
127251883Speter[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
128251883Speter
129251883Speter# Same as above, but do not quote variable references.
130251883Speter[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
131251883Speter
132251883Speter# Sed substitution to delay expansion of an escaped shell variable in a
133251883Speter# double_quote_subst'ed string.
134251883Speterdelay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
135251883Speter
136251883Speter# Sed substitution to avoid accidental globbing in evaled expressions
137251883Speterno_glob_subst='s/\*/\\\*/g'
138251883Speter
139251883Speter# Constants:
140251883Speterrm="rm -f"
141251883Speter
142251883Speter# Global variables:
143251883Speterdefault_ofile=libtool
144251883Spetercan_build_shared=yes
145251883Speter
146251883Speter# All known linkers require a `.a' archive for static linking (except MSVC,
147251883Speter# which needs '.lib').
148251883Speterlibext=a
149251883Speterltmain="$ac_aux_dir/ltmain.sh"
150251883Speterofile="$default_ofile"
151251883Speterwith_gnu_ld="$lt_cv_prog_gnu_ld"
152251883Speter
153251883SpeterAC_CHECK_TOOL(AR, ar, false)
154251883SpeterAC_CHECK_TOOL(RANLIB, ranlib, :)
155251883SpeterAC_CHECK_TOOL(STRIP, strip, :)
156251883Speter
157251883Speterold_CC="$CC"
158251883Speterold_CFLAGS="$CFLAGS"
159251883Speter
160251883Speter# Set sane defaults for various variables
161251883Spetertest -z "$AR" && AR=ar
162251883Spetertest -z "$AR_FLAGS" && AR_FLAGS=cru
163251883Spetertest -z "$AS" && AS=as
164251883Spetertest -z "$CC" && CC=cc
165251883Spetertest -z "$LTCC" && LTCC=$CC
166251883Spetertest -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
167251883Spetertest -z "$DLLTOOL" && DLLTOOL=dlltool
168251883Spetertest -z "$LD" && LD=ld
169251883Spetertest -z "$LN_S" && LN_S="ln -s"
170251883Spetertest -z "$MAGIC_CMD" && MAGIC_CMD=file
171251883Spetertest -z "$NM" && NM=nm
172251883Spetertest -z "$SED" && SED=sed
173251883Spetertest -z "$OBJDUMP" && OBJDUMP=objdump
174251883Spetertest -z "$RANLIB" && RANLIB=:
175251883Spetertest -z "$STRIP" && STRIP=:
176251883Spetertest -z "$ac_objext" && ac_objext=o
177251883Speter
178251883Speter# Determine commands to create old-style static archives.
179251883Speterold_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
180251883Speterold_postinstall_cmds='chmod 644 $oldlib'
181251883Speterold_postuninstall_cmds=
182251883Speter
183251883Speterif test -n "$RANLIB"; then
184251883Speter  case $host_os in
185251883Speter  openbsd*)
186251883Speter    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
187251883Speter    ;;
188251883Speter  *)
189251883Speter    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
190251883Speter    ;;
191251883Speter  esac
192251883Speter  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
193251883Speterfi
194251883Speter
195251883Speter_LT_CC_BASENAME([$compiler])
196251883Speter
197251883Speter# Only perform the check for file, if the check method requires it
198251883Spetercase $deplibs_check_method in
199251883Speterfile_magic*)
200251883Speter  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
201251883Speter    AC_PATH_MAGIC
202251883Speter  fi
203251883Speter  ;;
204251883Speteresac
205251883Speter
206251883SpeterAC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
207251883SpeterAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
208251883Speterenable_win32_dll=yes, enable_win32_dll=no)
209251883Speter
210251883SpeterAC_ARG_ENABLE([libtool-lock],
211251883Speter    [AC_HELP_STRING([--disable-libtool-lock],
212251883Speter	[avoid locking (might break parallel builds)])])
213251883Spetertest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
214251883Speter
215251883SpeterAC_ARG_WITH([pic],
216251883Speter    [AC_HELP_STRING([--with-pic],
217251883Speter	[try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
218251883Speter    [pic_mode="$withval"],
219251883Speter    [pic_mode=default])
220251883Spetertest -z "$pic_mode" && pic_mode=default
221251883Speter
222251883Speter# Use C for the default configuration in the libtool script
223251883Spetertagname=
224251883SpeterAC_LIBTOOL_LANG_C_CONFIG
225251883Speter_LT_AC_TAGCONFIG
226251883Speter])# AC_LIBTOOL_SETUP
227251883Speter
228251883Speter
229251883Speter# _LT_AC_SYS_COMPILER
230251883Speter# -------------------
231251883SpeterAC_DEFUN([_LT_AC_SYS_COMPILER],
232251883Speter[AC_REQUIRE([AC_PROG_CC])dnl
233251883Speter
234251883Speter# If no C compiler was specified, use CC.
235251883SpeterLTCC=${LTCC-"$CC"}
236251883Speter
237251883Speter# If no C compiler flags were specified, use CFLAGS.
238251883SpeterLTCFLAGS=${LTCFLAGS-"$CFLAGS"}
239251883Speter
240251883Speter# Allow CC to be a program name with arguments.
241251883Spetercompiler=$CC
242251883Speter])# _LT_AC_SYS_COMPILER
243251883Speter
244251883Speter
245251883Speter# _LT_CC_BASENAME(CC)
246251883Speter# -------------------
247251883Speter# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
248251883SpeterAC_DEFUN([_LT_CC_BASENAME],
249251883Speter[for cc_temp in $1""; do
250251883Speter  case $cc_temp in
251251883Speter    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
252251883Speter    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
253251883Speter    \-*) ;;
254251883Speter    *) break;;
255251883Speter  esac
256251883Speterdone
257251883Spetercc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
258251883Speter])
259251883Speter
260251883Speter
261251883Speter# _LT_COMPILER_BOILERPLATE
262251883Speter# ------------------------
263251883Speter# Check for compiler boilerplate output or warnings with
264251883Speter# the simple compiler test code.
265251883SpeterAC_DEFUN([_LT_COMPILER_BOILERPLATE],
266251883Speter[ac_outfile=conftest.$ac_objext
267251883Speterprintf "$lt_simple_compile_test_code" >conftest.$ac_ext
268251883Spetereval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
269251883Speter_lt_compiler_boilerplate=`cat conftest.err`
270251883Speter$rm conftest*
271251883Speter])# _LT_COMPILER_BOILERPLATE
272251883Speter
273251883Speter
274251883Speter# _LT_LINKER_BOILERPLATE
275251883Speter# ----------------------
276251883Speter# Check for linker boilerplate output or warnings with
277251883Speter# the simple link test code.
278251883SpeterAC_DEFUN([_LT_LINKER_BOILERPLATE],
279251883Speter[ac_outfile=conftest.$ac_objext
280251883Speterprintf "$lt_simple_link_test_code" >conftest.$ac_ext
281251883Spetereval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
282251883Speter_lt_linker_boilerplate=`cat conftest.err`
283251883Speter$rm conftest*
284251883Speter])# _LT_LINKER_BOILERPLATE
285251883Speter
286251883Speter
287251883Speter# _LT_AC_SYS_LIBPATH_AIX
288251883Speter# ----------------------
289251883Speter# Links a minimal program and checks the executable
290251883Speter# for the system default hardcoded library path. In most cases,
291251883Speter# this is /usr/lib:/lib, but when the MPI compilers are used
292251883Speter# the location of the communication and MPI libs are included too.
293251883Speter# If we don't find anything, use the default library path according
294251883Speter# to the aix ld manual.
295251883SpeterAC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
296251883Speter[AC_LINK_IFELSE(AC_LANG_PROGRAM,[
297251883Speteraix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0  *\(.*\)$/\1/; p; }
298251883Speter}'`
299251883Speter# Check for a 64-bit object if we didn't find anything.
300251883Speterif 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; }
301251883Speter}'`; fi],[])
302251883Speterif test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
303251883Speter])# _LT_AC_SYS_LIBPATH_AIX
304251883Speter
305251883Speter
306251883Speter# _LT_AC_SHELL_INIT(ARG)
307251883Speter# ----------------------
308251883SpeterAC_DEFUN([_LT_AC_SHELL_INIT],
309251883Speter[ifdef([AC_DIVERSION_NOTICE],
310251883Speter	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
311251883Speter	 [AC_DIVERT_PUSH(NOTICE)])
312251883Speter$1
313251883SpeterAC_DIVERT_POP
314251883Speter])# _LT_AC_SHELL_INIT
315251883Speter
316251883Speter
317251883Speter# _LT_AC_PROG_ECHO_BACKSLASH
318251883Speter# --------------------------
319251883Speter# Add some code to the start of the generated configure script which
320251883Speter# will find an echo command which doesn't interpret backslashes.
321251883SpeterAC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
322251883Speter[_LT_AC_SHELL_INIT([
323251883Speter# Check that we are running under the correct shell.
324251883SpeterSHELL=${CONFIG_SHELL-/bin/sh}
325251883Speter
326251883Spetercase X$ECHO in
327251883SpeterX*--fallback-echo)
328251883Speter  # Remove one level of quotation (which was required for Make).
329251883Speter  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
330251883Speter  ;;
331251883Speteresac
332251883Speter
333251883Speterecho=${ECHO-echo}
334251883Speterif test "X[$]1" = X--no-reexec; then
335251883Speter  # Discard the --no-reexec flag, and continue.
336251883Speter  shift
337251883Speterelif test "X[$]1" = X--fallback-echo; then
338251883Speter  # Avoid inline document here, it may be left over
339251883Speter  :
340251883Speterelif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
341251883Speter  # Yippee, $echo works!
342251883Speter  :
343251883Speterelse
344251883Speter  # Restart under the correct shell.
345251883Speter  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
346251883Speterfi
347251883Speter
348251883Speterif test "X[$]1" = X--fallback-echo; then
349251883Speter  # used as fallback echo
350251883Speter  shift
351251883Speter  cat <<EOF
352251883Speter[$]*
353251883SpeterEOF
354251883Speter  exit 0
355251883Speterfi
356251883Speter
357251883Speter# The HP-UX ksh and POSIX shell print the target directory to stdout
358251883Speter# if CDPATH is set.
359251883Speter(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
360251883Speter
361251883Speterif test -z "$ECHO"; then
362251883Speterif test "X${echo_test_string+set}" != Xset; then
363251883Speter# find a string as large as possible, as long as the shell can cope with it
364251883Speter  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
365251883Speter    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
366251883Speter    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
367251883Speter       echo_test_string=`eval $cmd` &&
368251883Speter       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
369251883Speter    then
370251883Speter      break
371251883Speter    fi
372251883Speter  done
373251883Speterfi
374251883Speter
375251883Speterif test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
376251883Speter   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
377251883Speter   test "X$echo_testing_string" = "X$echo_test_string"; then
378251883Speter  :
379251883Speterelse
380251883Speter  # The Solaris, AIX, and Digital Unix default echo programs unquote
381251883Speter  # backslashes.  This makes it impossible to quote backslashes using
382251883Speter  #   echo "$something" | sed 's/\\/\\\\/g'
383251883Speter  #
384251883Speter  # So, first we look for a working echo in the user's PATH.
385251883Speter
386251883Speter  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
387251883Speter  for dir in $PATH /usr/ucb; do
388251883Speter    IFS="$lt_save_ifs"
389251883Speter    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
390251883Speter       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
391251883Speter       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
392251883Speter       test "X$echo_testing_string" = "X$echo_test_string"; then
393251883Speter      echo="$dir/echo"
394251883Speter      break
395251883Speter    fi
396251883Speter  done
397251883Speter  IFS="$lt_save_ifs"
398251883Speter
399251883Speter  if test "X$echo" = Xecho; then
400251883Speter    # We didn't find a better echo, so look for alternatives.
401251883Speter    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
402251883Speter       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
403251883Speter       test "X$echo_testing_string" = "X$echo_test_string"; then
404251883Speter      # This shell has a builtin print -r that does the trick.
405251883Speter      echo='print -r'
406251883Speter    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
407251883Speter	 test "X$CONFIG_SHELL" != X/bin/ksh; then
408251883Speter      # If we have ksh, try running configure again with it.
409251883Speter      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
410251883Speter      export ORIGINAL_CONFIG_SHELL
411251883Speter      CONFIG_SHELL=/bin/ksh
412251883Speter      export CONFIG_SHELL
413251883Speter      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
414251883Speter    else
415251883Speter      # Try using printf.
416251883Speter      echo='printf %s\n'
417251883Speter      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
418251883Speter	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
419251883Speter	 test "X$echo_testing_string" = "X$echo_test_string"; then
420251883Speter	# Cool, printf works
421251883Speter	:
422251883Speter      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
423251883Speter	   test "X$echo_testing_string" = 'X\t' &&
424251883Speter	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
425251883Speter	   test "X$echo_testing_string" = "X$echo_test_string"; then
426251883Speter	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
427251883Speter	export CONFIG_SHELL
428251883Speter	SHELL="$CONFIG_SHELL"
429251883Speter	export SHELL
430251883Speter	echo="$CONFIG_SHELL [$]0 --fallback-echo"
431251883Speter      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
432251883Speter	   test "X$echo_testing_string" = 'X\t' &&
433251883Speter	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
434251883Speter	   test "X$echo_testing_string" = "X$echo_test_string"; then
435251883Speter	echo="$CONFIG_SHELL [$]0 --fallback-echo"
436251883Speter      else
437251883Speter	# maybe with a smaller string...
438251883Speter	prev=:
439251883Speter
440251883Speter	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
441251883Speter	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
442251883Speter	  then
443251883Speter	    break
444251883Speter	  fi
445251883Speter	  prev="$cmd"
446251883Speter	done
447251883Speter
448251883Speter	if test "$prev" != 'sed 50q "[$]0"'; then
449251883Speter	  echo_test_string=`eval $prev`
450251883Speter	  export echo_test_string
451251883Speter	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
452251883Speter	else
453251883Speter	  # Oops.  We lost completely, so just stick with echo.
454251883Speter	  echo=echo
455251883Speter	fi
456251883Speter      fi
457251883Speter    fi
458251883Speter  fi
459251883Speterfi
460251883Speterfi
461251883Speter
462251883Speter# Copy echo and quote the copy suitably for passing to libtool from
463251883Speter# the Makefile, instead of quoting the original, which is used later.
464251883SpeterECHO=$echo
465251883Speterif test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
466251883Speter   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
467251883Speterfi
468251883Speter
469251883SpeterAC_SUBST(ECHO)
470251883Speter])])# _LT_AC_PROG_ECHO_BACKSLASH
471251883Speter
472251883Speter
473251883Speter# _LT_AC_LOCK
474251883Speter# -----------
475251883SpeterAC_DEFUN([_LT_AC_LOCK],
476251883Speter[AC_ARG_ENABLE([libtool-lock],
477251883Speter    [AC_HELP_STRING([--disable-libtool-lock],
478251883Speter	[avoid locking (might break parallel builds)])])
479251883Spetertest "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
480251883Speter
481251883Speter# Some flags need to be propagated to the compiler or linker for good
482251883Speter# libtool support.
483251883Spetercase $host in
484251883Speteria64-*-hpux*)
485251883Speter  # Find out which ABI we are using.
486251883Speter  echo 'int i;' > conftest.$ac_ext
487251883Speter  if AC_TRY_EVAL(ac_compile); then
488251883Speter    case `/usr/bin/file conftest.$ac_objext` in
489251883Speter    *ELF-32*)
490251883Speter      HPUX_IA64_MODE="32"
491251883Speter      ;;
492251883Speter    *ELF-64*)
493251883Speter      HPUX_IA64_MODE="64"
494251883Speter      ;;
495251883Speter    esac
496251883Speter  fi
497251883Speter  rm -rf conftest*
498251883Speter  ;;
499251883Speter*-*-irix6*)
500251883Speter  # Find out which ABI we are using.
501251883Speter  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
502251883Speter  if AC_TRY_EVAL(ac_compile); then
503251883Speter   if test "$lt_cv_prog_gnu_ld" = yes; then
504251883Speter    case `/usr/bin/file conftest.$ac_objext` in
505251883Speter    *32-bit*)
506251883Speter      LD="${LD-ld} -melf32bsmip"
507251883Speter      ;;
508251883Speter    *N32*)
509251883Speter      LD="${LD-ld} -melf32bmipn32"
510251883Speter      ;;
511251883Speter    *64-bit*)
512251883Speter      LD="${LD-ld} -melf64bmip"
513251883Speter      ;;
514251883Speter    esac
515251883Speter   else
516251883Speter    case `/usr/bin/file conftest.$ac_objext` in
517251883Speter    *32-bit*)
518251883Speter      LD="${LD-ld} -32"
519251883Speter      ;;
520251883Speter    *N32*)
521251883Speter      LD="${LD-ld} -n32"
522251883Speter      ;;
523251883Speter    *64-bit*)
524251883Speter      LD="${LD-ld} -64"
525251883Speter      ;;
526251883Speter    esac
527251883Speter   fi
528251883Speter  fi
529251883Speter  rm -rf conftest*
530251883Speter  ;;
531251883Speter
532251883Speterx86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*)
533251883Speter  # Find out which ABI we are using.
534251883Speter  echo 'int i;' > conftest.$ac_ext
535251883Speter  if AC_TRY_EVAL(ac_compile); then
536251883Speter    case `/usr/bin/file conftest.o` in
537251883Speter    *32-bit*)
538251883Speter      case $host in
539251883Speter        x86_64-*linux*)
540251883Speter          LD="${LD-ld} -m elf_i386"
541251883Speter          ;;
542251883Speter        ppc64-*linux*|powerpc64-*linux*)
543251883Speter          LD="${LD-ld} -m elf32ppclinux"
544251883Speter          ;;
545251883Speter        s390x-*linux*)
546251883Speter          LD="${LD-ld} -m elf_s390"
547251883Speter          ;;
548251883Speter        sparc64-*linux*)
549251883Speter          LD="${LD-ld} -m elf32_sparc"
550251883Speter          ;;
551251883Speter      esac
552251883Speter      ;;
553251883Speter    *64-bit*)
554251883Speter      case $host in
555251883Speter        x86_64-*linux*)
556251883Speter          LD="${LD-ld} -m elf_x86_64"
557251883Speter          ;;
558251883Speter        ppc*-*linux*|powerpc*-*linux*)
559251883Speter          LD="${LD-ld} -m elf64ppc"
560251883Speter          ;;
561251883Speter        s390*-*linux*)
562251883Speter          LD="${LD-ld} -m elf64_s390"
563251883Speter          ;;
564251883Speter        sparc*-*linux*)
565251883Speter          LD="${LD-ld} -m elf64_sparc"
566251883Speter          ;;
567251883Speter      esac
568251883Speter      ;;
569251883Speter    esac
570251883Speter  fi
571251883Speter  rm -rf conftest*
572251883Speter  ;;
573251883Speter
574251883Speter*-*-sco3.2v5*)
575251883Speter  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
576251883Speter  SAVE_CFLAGS="$CFLAGS"
577251883Speter  CFLAGS="$CFLAGS -belf"
578251883Speter  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
579251883Speter    [AC_LANG_PUSH(C)
580251883Speter     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
581251883Speter     AC_LANG_POP])
582251883Speter  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
583251883Speter    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
584251883Speter    CFLAGS="$SAVE_CFLAGS"
585251883Speter  fi
586251883Speter  ;;
587251883Spetersparc*-*solaris*)
588251883Speter  # Find out which ABI we are using.
589251883Speter  echo 'int i;' > conftest.$ac_ext
590251883Speter  if AC_TRY_EVAL(ac_compile); then
591251883Speter    case `/usr/bin/file conftest.o` in
592251883Speter    *64-bit*)
593251883Speter      case $lt_cv_prog_gnu_ld in
594251883Speter      yes*) LD="${LD-ld} -m elf64_sparc" ;;
595251883Speter      *)    LD="${LD-ld} -64" ;;
596251883Speter      esac
597251883Speter      ;;
598251883Speter    esac
599251883Speter  fi
600251883Speter  rm -rf conftest*
601251883Speter  ;;
602251883Speter
603251883SpeterAC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
604251883Speter[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
605251883Speter  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
606251883Speter  AC_CHECK_TOOL(AS, as, false)
607251883Speter  AC_CHECK_TOOL(OBJDUMP, objdump, false)
608251883Speter  ;;
609251883Speter  ])
610251883Speteresac
611251883Speter
612251883Speterneed_locks="$enable_libtool_lock"
613251883Speter
614251883Speter])# _LT_AC_LOCK
615251883Speter
616251883Speter
617251883Speter# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
618251883Speter#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
619251883Speter# ----------------------------------------------------------------
620251883Speter# Check whether the given compiler option works
621251883SpeterAC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
622251883Speter[AC_REQUIRE([LT_AC_PROG_SED])
623251883SpeterAC_CACHE_CHECK([$1], [$2],
624251883Speter  [$2=no
625251883Speter  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
626251883Speter   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
627251883Speter   lt_compiler_flag="$3"
628251883Speter   # Insert the option either (1) after the last *FLAGS variable, or
629251883Speter   # (2) before a word containing "conftest.", or (3) at the end.
630251883Speter   # Note that $ac_compile itself does not contain backslashes and begins
631251883Speter   # with a dollar sign (not a hyphen), so the echo should work correctly.
632251883Speter   # The option is referenced via a variable to avoid confusing sed.
633251883Speter   lt_compile=`echo "$ac_compile" | $SED \
634251883Speter   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
635251883Speter   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
636251883Speter   -e 's:$: $lt_compiler_flag:'`
637251883Speter   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
638251883Speter   (eval "$lt_compile" 2>conftest.err)
639251883Speter   ac_status=$?
640251883Speter   cat conftest.err >&AS_MESSAGE_LOG_FD
641251883Speter   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
642251883Speter   if (exit $ac_status) && test -s "$ac_outfile"; then
643251883Speter     # The compiler can only warn and ignore the option if not recognized
644251883Speter     # So say no if there are warnings other than the usual output.
645251883Speter     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
646251883Speter     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
647251883Speter     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
648251883Speter       $2=yes
649251883Speter     fi
650251883Speter   fi
651251883Speter   $rm conftest*
652251883Speter])
653251883Speter
654251883Speterif test x"[$]$2" = xyes; then
655251883Speter    ifelse([$5], , :, [$5])
656251883Speterelse
657251883Speter    ifelse([$6], , :, [$6])
658251883Speterfi
659251883Speter])# AC_LIBTOOL_COMPILER_OPTION
660251883Speter
661251883Speter
662251883Speter# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
663251883Speter#                          [ACTION-SUCCESS], [ACTION-FAILURE])
664251883Speter# ------------------------------------------------------------
665251883Speter# Check whether the given compiler option works
666251883SpeterAC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
667251883Speter[AC_CACHE_CHECK([$1], [$2],
668251883Speter  [$2=no
669251883Speter   save_LDFLAGS="$LDFLAGS"
670251883Speter   LDFLAGS="$LDFLAGS $3"
671251883Speter   printf "$lt_simple_link_test_code" > conftest.$ac_ext
672251883Speter   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
673251883Speter     # The linker can only warn and ignore the option if not recognized
674251883Speter     # So say no if there are warnings
675251883Speter     if test -s conftest.err; then
676251883Speter       # Append any errors to the config.log.
677251883Speter       cat conftest.err 1>&AS_MESSAGE_LOG_FD
678251883Speter       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
679251883Speter       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
680251883Speter       if diff conftest.exp conftest.er2 >/dev/null; then
681251883Speter         $2=yes
682251883Speter       fi
683251883Speter     else
684251883Speter       $2=yes
685251883Speter     fi
686251883Speter   fi
687251883Speter   $rm conftest*
688251883Speter   LDFLAGS="$save_LDFLAGS"
689251883Speter])
690251883Speter
691251883Speterif test x"[$]$2" = xyes; then
692251883Speter    ifelse([$4], , :, [$4])
693251883Speterelse
694251883Speter    ifelse([$5], , :, [$5])
695251883Speterfi
696251883Speter])# AC_LIBTOOL_LINKER_OPTION
697251883Speter
698251883Speter
699251883Speter# AC_LIBTOOL_SYS_MAX_CMD_LEN
700251883Speter# --------------------------
701251883SpeterAC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
702251883Speter[# find the maximum length of command line arguments
703251883SpeterAC_MSG_CHECKING([the maximum length of command line arguments])
704251883SpeterAC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
705251883Speter  i=0
706251883Speter  teststring="ABCD"
707251883Speter
708251883Speter  case $build_os in
709251883Speter  msdosdjgpp*)
710251883Speter    # On DJGPP, this test can blow up pretty badly due to problems in libc
711251883Speter    # (any single argument exceeding 2000 bytes causes a buffer overrun
712251883Speter    # during glob expansion).  Even if it were fixed, the result of this
713251883Speter    # check would be larger than it should be.
714251883Speter    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
715251883Speter    ;;
716251883Speter
717251883Speter  gnu*)
718251883Speter    # Under GNU Hurd, this test is not required because there is
719251883Speter    # no limit to the length of command line arguments.
720251883Speter    # Libtool will interpret -1 as no limit whatsoever
721251883Speter    lt_cv_sys_max_cmd_len=-1;
722251883Speter    ;;
723251883Speter
724251883Speter  cygwin* | mingw*)
725251883Speter    # On Win9x/ME, this test blows up -- it succeeds, but takes
726251883Speter    # about 5 minutes as the teststring grows exponentially.
727251883Speter    # Worse, since 9x/ME are not pre-emptively multitasking,
728251883Speter    # you end up with a "frozen" computer, even though with patience
729251883Speter    # the test eventually succeeds (with a max line length of 256k).
730251883Speter    # Instead, let's just punt: use the minimum linelength reported by
731251883Speter    # all of the supported platforms: 8192 (on NT/2K/XP).
732251883Speter    lt_cv_sys_max_cmd_len=8192;
733251883Speter    ;;
734251883Speter
735251883Speter  amigaos*)
736251883Speter    # On AmigaOS with pdksh, this test takes hours, literally.
737251883Speter    # So we just punt and use a minimum line length of 8192.
738251883Speter    lt_cv_sys_max_cmd_len=8192;
739251883Speter    ;;
740251883Speter
741251883Speter  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
742251883Speter    # This has been around since 386BSD, at least.  Likely further.
743251883Speter    if test -x /sbin/sysctl; then
744251883Speter      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
745251883Speter    elif test -x /usr/sbin/sysctl; then
746251883Speter      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
747251883Speter    else
748251883Speter      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
749251883Speter    fi
750251883Speter    # And add a safety zone
751251883Speter    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
752251883Speter    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
753251883Speter    ;;
754251883Speter
755251883Speter  interix*)
756251883Speter    # We know the value 262144 and hardcode it with a safety zone (like BSD)
757251883Speter    lt_cv_sys_max_cmd_len=196608
758251883Speter    ;;
759251883Speter
760251883Speter  osf*)
761251883Speter    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
762251883Speter    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
763251883Speter    # nice to cause kernel panics so lets avoid the loop below.
764251883Speter    # First set a reasonable default.
765251883Speter    lt_cv_sys_max_cmd_len=16384
766251883Speter    #
767251883Speter    if test -x /sbin/sysconfig; then
768251883Speter      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
769251883Speter        *1*) lt_cv_sys_max_cmd_len=-1 ;;
770251883Speter      esac
771251883Speter    fi
772251883Speter    ;;
773251883Speter  sco3.2v5*)
774251883Speter    lt_cv_sys_max_cmd_len=102400
775251883Speter    ;;
776251883Speter  sysv5* | sco5v6* | sysv4.2uw2*)
777251883Speter    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
778251883Speter    if test -n "$kargmax"; then
779251883Speter      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
780251883Speter    else
781251883Speter      lt_cv_sys_max_cmd_len=32768
782251883Speter    fi
783251883Speter    ;;
784251883Speter  *)
785251883Speter    # If test is not a shell built-in, we'll probably end up computing a
786251883Speter    # maximum length that is only half of the actual maximum length, but
787251883Speter    # we can't tell.
788251883Speter    SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
789251883Speter    while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
790251883Speter	       = "XX$teststring") >/dev/null 2>&1 &&
791251883Speter	    new_result=`expr "X$teststring" : ".*" 2>&1` &&
792251883Speter	    lt_cv_sys_max_cmd_len=$new_result &&
793251883Speter	    test $i != 17 # 1/2 MB should be enough
794251883Speter    do
795251883Speter      i=`expr $i + 1`
796251883Speter      teststring=$teststring$teststring
797251883Speter    done
798251883Speter    teststring=
799251883Speter    # Add a significant safety factor because C++ compilers can tack on massive
800251883Speter    # amounts of additional arguments before passing them to the linker.
801251883Speter    # It appears as though 1/2 is a usable value.
802251883Speter    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
803251883Speter    ;;
804251883Speter  esac
805251883Speter])
806251883Speterif test -n $lt_cv_sys_max_cmd_len ; then
807251883Speter  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
808251883Speterelse
809251883Speter  AC_MSG_RESULT(none)
810251883Speterfi
811251883Speter])# AC_LIBTOOL_SYS_MAX_CMD_LEN
812251883Speter
813251883Speter
814251883Speter# _LT_AC_CHECK_DLFCN
815251883Speter# ------------------
816251883SpeterAC_DEFUN([_LT_AC_CHECK_DLFCN],
817251883Speter[AC_CHECK_HEADERS(dlfcn.h)dnl
818251883Speter])# _LT_AC_CHECK_DLFCN
819251883Speter
820251883Speter
821251883Speter# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
822251883Speter#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
823251883Speter# ---------------------------------------------------------------------
824251883SpeterAC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
825251883Speter[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
826251883Speterif test "$cross_compiling" = yes; then :
827251883Speter  [$4]
828251883Speterelse
829251883Speter  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
830251883Speter  lt_status=$lt_dlunknown
831251883Speter  cat > conftest.$ac_ext <<EOF
832251883Speter[#line __oline__ "configure"
833251883Speter#include "confdefs.h"
834251883Speter
835251883Speter#if HAVE_DLFCN_H
836251883Speter#include <dlfcn.h>
837251883Speter#endif
838251883Speter
839251883Speter#include <stdio.h>
840251883Speter
841251883Speter#ifdef RTLD_GLOBAL
842251883Speter#  define LT_DLGLOBAL		RTLD_GLOBAL
843251883Speter#else
844251883Speter#  ifdef DL_GLOBAL
845251883Speter#    define LT_DLGLOBAL		DL_GLOBAL
846251883Speter#  else
847251883Speter#    define LT_DLGLOBAL		0
848251883Speter#  endif
849251883Speter#endif
850251883Speter
851251883Speter/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
852251883Speter   find out it does not work in some platform. */
853251883Speter#ifndef LT_DLLAZY_OR_NOW
854251883Speter#  ifdef RTLD_LAZY
855251883Speter#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
856251883Speter#  else
857251883Speter#    ifdef DL_LAZY
858251883Speter#      define LT_DLLAZY_OR_NOW		DL_LAZY
859251883Speter#    else
860251883Speter#      ifdef RTLD_NOW
861251883Speter#        define LT_DLLAZY_OR_NOW	RTLD_NOW
862251883Speter#      else
863251883Speter#        ifdef DL_NOW
864251883Speter#          define LT_DLLAZY_OR_NOW	DL_NOW
865251883Speter#        else
866251883Speter#          define LT_DLLAZY_OR_NOW	0
867251883Speter#        endif
868251883Speter#      endif
869251883Speter#    endif
870251883Speter#  endif
871251883Speter#endif
872251883Speter
873251883Speter#ifdef __cplusplus
874251883Speterextern "C" void exit (int);
875251883Speter#endif
876251883Speter
877251883Spetervoid fnord() { int i=42;}
878251883Speterint main ()
879251883Speter{
880251883Speter  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
881251883Speter  int status = $lt_dlunknown;
882251883Speter
883251883Speter  if (self)
884251883Speter    {
885251883Speter      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
886251883Speter      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
887251883Speter      /* dlclose (self); */
888251883Speter    }
889251883Speter  else
890251883Speter    puts (dlerror ());
891251883Speter
892251883Speter    exit (status);
893251883Speter}]
894251883SpeterEOF
895251883Speter  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
896251883Speter    (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
897251883Speter    lt_status=$?
898251883Speter    case x$lt_status in
899251883Speter      x$lt_dlno_uscore) $1 ;;
900251883Speter      x$lt_dlneed_uscore) $2 ;;
901251883Speter      x$lt_dlunknown|x*) $3 ;;
902251883Speter    esac
903251883Speter  else :
904251883Speter    # compilation failed
905251883Speter    $3
906251883Speter  fi
907251883Speterfi
908251883Speterrm -fr conftest*
909251883Speter])# _LT_AC_TRY_DLOPEN_SELF
910251883Speter
911251883Speter
912251883Speter# AC_LIBTOOL_DLOPEN_SELF
913251883Speter# ----------------------
914251883SpeterAC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
915251883Speter[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
916251883Speterif test "x$enable_dlopen" != xyes; then
917251883Speter  enable_dlopen=unknown
918251883Speter  enable_dlopen_self=unknown
919251883Speter  enable_dlopen_self_static=unknown
920251883Speterelse
921251883Speter  lt_cv_dlopen=no
922251883Speter  lt_cv_dlopen_libs=
923251883Speter
924251883Speter  case $host_os in
925251883Speter  beos*)
926251883Speter    lt_cv_dlopen="load_add_on"
927251883Speter    lt_cv_dlopen_libs=
928251883Speter    lt_cv_dlopen_self=yes
929251883Speter    ;;
930251883Speter
931251883Speter  mingw* | pw32*)
932251883Speter    lt_cv_dlopen="LoadLibrary"
933251883Speter    lt_cv_dlopen_libs=
934251883Speter   ;;
935251883Speter
936251883Speter  cygwin*)
937251883Speter    lt_cv_dlopen="dlopen"
938251883Speter    lt_cv_dlopen_libs=
939251883Speter   ;;
940251883Speter
941251883Speter  darwin*)
942251883Speter  # if libdl is installed we need to link against it
943251883Speter    AC_CHECK_LIB([dl], [dlopen],
944251883Speter		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
945251883Speter    lt_cv_dlopen="dyld"
946251883Speter    lt_cv_dlopen_libs=
947251883Speter    lt_cv_dlopen_self=yes
948251883Speter    ])
949251883Speter   ;;
950251883Speter
951251883Speter  *)
952251883Speter    AC_CHECK_FUNC([shl_load],
953251883Speter	  [lt_cv_dlopen="shl_load"],
954251883Speter      [AC_CHECK_LIB([dld], [shl_load],
955251883Speter	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"],
956251883Speter	[AC_CHECK_FUNC([dlopen],
957251883Speter	      [lt_cv_dlopen="dlopen"],
958251883Speter	  [AC_CHECK_LIB([dl], [dlopen],
959251883Speter		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
960251883Speter	    [AC_CHECK_LIB([svld], [dlopen],
961251883Speter		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
962251883Speter	      [AC_CHECK_LIB([dld], [dld_link],
963251883Speter		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"])
964251883Speter	      ])
965251883Speter	    ])
966251883Speter	  ])
967251883Speter	])
968251883Speter      ])
969251883Speter    ;;
970251883Speter  esac
971251883Speter
972251883Speter  if test "x$lt_cv_dlopen" != xno; then
973251883Speter    enable_dlopen=yes
974251883Speter  else
975251883Speter    enable_dlopen=no
976251883Speter  fi
977251883Speter
978251883Speter  case $lt_cv_dlopen in
979251883Speter  dlopen)
980251883Speter    save_CPPFLAGS="$CPPFLAGS"
981251883Speter    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
982251883Speter
983251883Speter    save_LDFLAGS="$LDFLAGS"
984251883Speter    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
985251883Speter
986251883Speter    save_LIBS="$LIBS"
987251883Speter    LIBS="$lt_cv_dlopen_libs $LIBS"
988251883Speter
989251883Speter    AC_CACHE_CHECK([whether a program can dlopen itself],
990251883Speter	  lt_cv_dlopen_self, [dnl
991251883Speter	  _LT_AC_TRY_DLOPEN_SELF(
992251883Speter	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
993251883Speter	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
994251883Speter    ])
995251883Speter
996251883Speter    if test "x$lt_cv_dlopen_self" = xyes; then
997251883Speter      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
998251883Speter      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
999251883Speter    	  lt_cv_dlopen_self_static, [dnl
1000251883Speter	  _LT_AC_TRY_DLOPEN_SELF(
1001251883Speter	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1002251883Speter	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1003251883Speter      ])
1004251883Speter    fi
1005251883Speter
1006251883Speter    CPPFLAGS="$save_CPPFLAGS"
1007251883Speter    LDFLAGS="$save_LDFLAGS"
1008251883Speter    LIBS="$save_LIBS"
1009251883Speter    ;;
1010251883Speter  esac
1011251883Speter
1012251883Speter  case $lt_cv_dlopen_self in
1013251883Speter  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1014251883Speter  *) enable_dlopen_self=unknown ;;
1015251883Speter  esac
1016251883Speter
1017251883Speter  case $lt_cv_dlopen_self_static in
1018251883Speter  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1019251883Speter  *) enable_dlopen_self_static=unknown ;;
1020251883Speter  esac
1021251883Speterfi
1022251883Speter])# AC_LIBTOOL_DLOPEN_SELF
1023251883Speter
1024251883Speter
1025251883Speter# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1026251883Speter# ---------------------------------
1027251883Speter# Check to see if options -c and -o are simultaneously supported by compiler
1028251883SpeterAC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1029251883Speter[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1030251883SpeterAC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1031251883Speter  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1032251883Speter  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1033251883Speter   $rm -r conftest 2>/dev/null
1034251883Speter   mkdir conftest
1035251883Speter   cd conftest
1036251883Speter   mkdir out
1037251883Speter   printf "$lt_simple_compile_test_code" > conftest.$ac_ext
1038251883Speter
1039251883Speter   lt_compiler_flag="-o out/conftest2.$ac_objext"
1040251883Speter   # Insert the option either (1) after the last *FLAGS variable, or
1041251883Speter   # (2) before a word containing "conftest.", or (3) at the end.
1042251883Speter   # Note that $ac_compile itself does not contain backslashes and begins
1043251883Speter   # with a dollar sign (not a hyphen), so the echo should work correctly.
1044251883Speter   lt_compile=`echo "$ac_compile" | $SED \
1045251883Speter   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1046251883Speter   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1047251883Speter   -e 's:$: $lt_compiler_flag:'`
1048251883Speter   (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
1049251883Speter   (eval "$lt_compile" 2>out/conftest.err)
1050251883Speter   ac_status=$?
1051251883Speter   cat out/conftest.err >&AS_MESSAGE_LOG_FD
1052251883Speter   echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
1053251883Speter   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1054251883Speter   then
1055251883Speter     # The compiler can only warn and ignore the option if not recognized
1056251883Speter     # So say no if there are warnings
1057251883Speter     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1058251883Speter     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1059251883Speter     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1060251883Speter       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1061251883Speter     fi
1062251883Speter   fi
1063251883Speter   chmod u+w . 2>&AS_MESSAGE_LOG_FD
1064251883Speter   $rm conftest*
1065251883Speter   # SGI C++ compiler will create directory out/ii_files/ for
1066251883Speter   # template instantiation
1067251883Speter   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1068251883Speter   $rm out/* && rmdir out
1069251883Speter   cd ..
1070251883Speter   rmdir conftest
1071251883Speter   $rm conftest*
1072251883Speter])
1073251883Speter])# AC_LIBTOOL_PROG_CC_C_O
1074251883Speter
1075251883Speter
1076251883Speter# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1077251883Speter# -----------------------------------------
1078251883Speter# Check to see if we can do hard links to lock some files if needed
1079251883SpeterAC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1080251883Speter[AC_REQUIRE([_LT_AC_LOCK])dnl
1081251883Speter
1082251883Speterhard_links="nottested"
1083251883Speterif test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1084251883Speter  # do not overwrite the value of need_locks provided by the user
1085251883Speter  AC_MSG_CHECKING([if we can lock with hard links])
1086251883Speter  hard_links=yes
1087251883Speter  $rm conftest*
1088251883Speter  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1089251883Speter  touch conftest.a
1090251883Speter  ln conftest.a conftest.b 2>&5 || hard_links=no
1091251883Speter  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1092251883Speter  AC_MSG_RESULT([$hard_links])
1093251883Speter  if test "$hard_links" = no; then
1094251883Speter    AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
1095251883Speter    need_locks=warn
1096251883Speter  fi
1097251883Speterelse
1098251883Speter  need_locks=no
1099251883Speterfi
1100251883Speter])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1101251883Speter
1102251883Speter
1103251883Speter# AC_LIBTOOL_OBJDIR
1104251883Speter# -----------------
1105251883SpeterAC_DEFUN([AC_LIBTOOL_OBJDIR],
1106251883Speter[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1107251883Speter[rm -f .libs 2>/dev/null
1108251883Spetermkdir .libs 2>/dev/null
1109251883Speterif test -d .libs; then
1110251883Speter  lt_cv_objdir=.libs
1111251883Speterelse
1112251883Speter  # MS-DOS does not allow filenames that begin with a dot.
1113251883Speter  lt_cv_objdir=_libs
1114251883Speterfi
1115251883Speterrmdir .libs 2>/dev/null])
1116251883Speterobjdir=$lt_cv_objdir
1117251883Speter])# AC_LIBTOOL_OBJDIR
1118251883Speter
1119251883Speter
1120251883Speter# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1121251883Speter# ----------------------------------------------
1122251883Speter# Check hardcoding attributes.
1123251883SpeterAC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1124251883Speter[AC_MSG_CHECKING([how to hardcode library paths into programs])
1125251883Speter_LT_AC_TAGVAR(hardcode_action, $1)=
1126251883Speterif test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1127251883Speter   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1128251883Speter   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1129251883Speter
1130251883Speter  # We can hardcode non-existant directories.
1131251883Speter  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1132251883Speter     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1133251883Speter     # have to relink, otherwise we might link with an installed library
1134251883Speter     # when we should be linking with a yet-to-be-installed one
1135251883Speter     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1136251883Speter     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1137251883Speter    # Linking always hardcodes the temporary library directory.
1138251883Speter    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1139251883Speter  else
1140251883Speter    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1141251883Speter    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1142251883Speter  fi
1143251883Speterelse
1144251883Speter  # We cannot hardcode anything, or else we can only hardcode existing
1145251883Speter  # directories.
1146251883Speter  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1147251883Speterfi
1148251883SpeterAC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1149251883Speter
1150251883Speterif test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1151251883Speter  # Fast installation is not supported
1152251883Speter  enable_fast_install=no
1153251883Speterelif test "$shlibpath_overrides_runpath" = yes ||
1154251883Speter     test "$enable_shared" = no; then
1155251883Speter  # Fast installation is not necessary
1156251883Speter  enable_fast_install=needless
1157251883Speterfi
1158251883Speter])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1159251883Speter
1160251883Speter
1161251883Speter# AC_LIBTOOL_SYS_LIB_STRIP
1162251883Speter# ------------------------
1163251883SpeterAC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1164251883Speter[striplib=
1165251883Speterold_striplib=
1166251883SpeterAC_MSG_CHECKING([whether stripping libraries is possible])
1167251883Speterif test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1168251883Speter  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1169251883Speter  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1170251883Speter  AC_MSG_RESULT([yes])
1171251883Speterelse
1172251883Speter# FIXME - insert some real tests, host_os isn't really good enough
1173251883Speter  case $host_os in
1174251883Speter   darwin*)
1175251883Speter       if test -n "$STRIP" ; then
1176251883Speter         striplib="$STRIP -x"
1177251883Speter         AC_MSG_RESULT([yes])
1178251883Speter       else
1179251883Speter  AC_MSG_RESULT([no])
1180251883Speterfi
1181251883Speter       ;;
1182251883Speter   *)
1183251883Speter  AC_MSG_RESULT([no])
1184251883Speter    ;;
1185251883Speter  esac
1186251883Speterfi
1187251883Speter])# AC_LIBTOOL_SYS_LIB_STRIP
1188251883Speter
1189251883Speter
1190251883Speter# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1191251883Speter# -----------------------------
1192251883Speter# PORTME Fill in your ld.so characteristics
1193251883SpeterAC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1194251883Speter[AC_MSG_CHECKING([dynamic linker characteristics])
1195251883Speterlibrary_names_spec=
1196251883Speterlibname_spec='lib$name'
1197251883Spetersoname_spec=
1198251883Spetershrext_cmds=".so"
1199251883Speterpostinstall_cmds=
1200251883Speterpostuninstall_cmds=
1201251883Speterfinish_cmds=
1202251883Speterfinish_eval=
1203251883Spetershlibpath_var=
1204251883Spetershlibpath_overrides_runpath=unknown
1205251883Speterversion_type=none
1206251883Speterdynamic_linker="$host_os ld.so"
1207251883Spetersys_lib_dlsearch_path_spec="/lib /usr/lib"
1208251883Speterif test "$GCC" = yes; then
1209251883Speter  sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1210251883Speter  if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then
1211251883Speter    # if the path contains ";" then we assume it to be the separator
1212251883Speter    # otherwise default to the standard path separator (i.e. ":") - it is
1213251883Speter    # assumed that no part of a normal pathname contains ";" but that should
1214251883Speter    # okay in the real world where ";" in dirpaths is itself problematic.
1215251883Speter    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1216251883Speter  else
1217251883Speter    sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1218251883Speter  fi
1219251883Speterelse
1220251883Speter  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1221251883Speterfi
1222251883Speterneed_lib_prefix=unknown
1223251883Speterhardcode_into_libs=no
1224251883Speter
1225251883Speter# when you set need_version to no, make sure it does not cause -set_version
1226251883Speter# flags to be left without arguments
1227251883Speterneed_version=unknown
1228251883Speter
1229251883Spetercase $host_os in
1230251883Speteraix3*)
1231251883Speter  version_type=linux
1232251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1233251883Speter  shlibpath_var=LIBPATH
1234251883Speter
1235251883Speter  # AIX 3 has no versioning support, so we append a major version to the name.
1236251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1237251883Speter  ;;
1238251883Speter
1239251883Speteraix4* | aix5*)
1240251883Speter  version_type=linux
1241251883Speter  need_lib_prefix=no
1242251883Speter  need_version=no
1243251883Speter  hardcode_into_libs=yes
1244251883Speter  if test "$host_cpu" = ia64; then
1245251883Speter    # AIX 5 supports IA64
1246251883Speter    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1247251883Speter    shlibpath_var=LD_LIBRARY_PATH
1248251883Speter  else
1249251883Speter    # With GCC up to 2.95.x, collect2 would create an import file
1250251883Speter    # for dependence libraries.  The import file would start with
1251251883Speter    # the line `#! .'.  This would cause the generated library to
1252251883Speter    # depend on `.', always an invalid library.  This was fixed in
1253251883Speter    # development snapshots of GCC prior to 3.0.
1254251883Speter    case $host_os in
1255251883Speter      aix4 | aix4.[[01]] | aix4.[[01]].*)
1256251883Speter      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1257251883Speter	   echo ' yes '
1258251883Speter	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1259251883Speter	:
1260251883Speter      else
1261251883Speter	can_build_shared=no
1262251883Speter      fi
1263251883Speter      ;;
1264251883Speter    esac
1265251883Speter    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1266251883Speter    # soname into executable. Probably we can add versioning support to
1267251883Speter    # collect2, so additional links can be useful in future.
1268251883Speter    if test "$aix_use_runtimelinking" = yes; then
1269251883Speter      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1270251883Speter      # instead of lib<name>.a to let people know that these are not
1271251883Speter      # typical AIX shared libraries.
1272251883Speter      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1273251883Speter    else
1274251883Speter      # We preserve .a as extension for shared libraries through AIX4.2
1275251883Speter      # and later when we are not doing run time linking.
1276251883Speter      library_names_spec='${libname}${release}.a $libname.a'
1277251883Speter      soname_spec='${libname}${release}${shared_ext}$major'
1278251883Speter    fi
1279251883Speter    shlibpath_var=LIBPATH
1280251883Speter  fi
1281251883Speter  ;;
1282251883Speter
1283251883Speteramigaos*)
1284251883Speter  library_names_spec='$libname.ixlibrary $libname.a'
1285251883Speter  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1286251883Speter  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'
1287251883Speter  ;;
1288251883Speter
1289251883Speterbeos*)
1290251883Speter  library_names_spec='${libname}${shared_ext}'
1291251883Speter  dynamic_linker="$host_os ld.so"
1292251883Speter  shlibpath_var=LIBRARY_PATH
1293251883Speter  ;;
1294251883Speter
1295251883Speterbsdi[[45]]*)
1296251883Speter  version_type=linux
1297251883Speter  need_version=no
1298251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1299251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1300251883Speter  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1301251883Speter  shlibpath_var=LD_LIBRARY_PATH
1302251883Speter  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1303251883Speter  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1304251883Speter  # the default ld.so.conf also contains /usr/contrib/lib and
1305251883Speter  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1306251883Speter  # libtool to hard-code these into programs
1307251883Speter  ;;
1308251883Speter
1309251883Spetercygwin* | mingw* | pw32*)
1310251883Speter  version_type=windows
1311251883Speter  shrext_cmds=".dll"
1312251883Speter  need_version=no
1313251883Speter  need_lib_prefix=no
1314251883Speter
1315251883Speter  case $GCC,$host_os in
1316251883Speter  yes,cygwin* | yes,mingw* | yes,pw32*)
1317251883Speter    library_names_spec='$libname.dll.a'
1318251883Speter    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1319251883Speter    postinstall_cmds='base_file=`basename \${file}`~
1320251883Speter      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1321251883Speter      dldir=$destdir/`dirname \$dlpath`~
1322251883Speter      test -d \$dldir || mkdir -p \$dldir~
1323251883Speter      $install_prog $dir/$dlname \$dldir/$dlname~
1324251883Speter      chmod a+x \$dldir/$dlname'
1325251883Speter    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1326251883Speter      dlpath=$dir/\$dldll~
1327251883Speter       $rm \$dlpath'
1328251883Speter    shlibpath_overrides_runpath=yes
1329251883Speter
1330251883Speter    case $host_os in
1331251883Speter    cygwin*)
1332251883Speter      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1333251883Speter      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1334251883Speter      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1335251883Speter      ;;
1336251883Speter    mingw*)
1337251883Speter      # MinGW DLLs use traditional 'lib' prefix
1338251883Speter      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1339251883Speter      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1340251883Speter      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1341251883Speter        # It is most probably a Windows format PATH printed by
1342251883Speter        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1343251883Speter        # path with ; separators, and with drive letters. We can handle the
1344251883Speter        # drive letters (cygwin fileutils understands them), so leave them,
1345251883Speter        # especially as we might pass files found there to a mingw objdump,
1346251883Speter        # which wouldn't understand a cygwinified path. Ahh.
1347251883Speter        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1348251883Speter      else
1349251883Speter        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1350251883Speter      fi
1351251883Speter      ;;
1352251883Speter    pw32*)
1353251883Speter      # pw32 DLLs use 'pw' prefix rather than 'lib'
1354251883Speter      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1355251883Speter      ;;
1356251883Speter    esac
1357251883Speter    ;;
1358251883Speter
1359251883Speter  *)
1360251883Speter    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1361251883Speter    ;;
1362251883Speter  esac
1363251883Speter  dynamic_linker='Win32 ld.exe'
1364251883Speter  # FIXME: first we should search . and the directory the executable is in
1365251883Speter  shlibpath_var=PATH
1366251883Speter  ;;
1367251883Speter
1368251883Speterdarwin* | rhapsody*)
1369251883Speter  dynamic_linker="$host_os dyld"
1370251883Speter  version_type=darwin
1371251883Speter  need_lib_prefix=no
1372251883Speter  need_version=no
1373251883Speter  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1374251883Speter  soname_spec='${libname}${release}${major}$shared_ext'
1375251883Speter  shlibpath_overrides_runpath=yes
1376251883Speter  shlibpath_var=DYLD_LIBRARY_PATH
1377251883Speter  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1378251883Speter  # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same.
1379251883Speter  if test "$GCC" = yes; then
1380251883Speter    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"`
1381251883Speter  else
1382251883Speter    sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib'
1383251883Speter  fi
1384251883Speter  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1385251883Speter  ;;
1386251883Speter
1387251883Speterdgux*)
1388251883Speter  version_type=linux
1389251883Speter  need_lib_prefix=no
1390251883Speter  need_version=no
1391251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1392251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1393251883Speter  shlibpath_var=LD_LIBRARY_PATH
1394251883Speter  ;;
1395251883Speter
1396251883Speterfreebsd1*)
1397251883Speter  dynamic_linker=no
1398251883Speter  ;;
1399251883Speter
1400251883Speterkfreebsd*-gnu)
1401251883Speter  version_type=linux
1402251883Speter  need_lib_prefix=no
1403251883Speter  need_version=no
1404251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1405251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1406251883Speter  shlibpath_var=LD_LIBRARY_PATH
1407251883Speter  shlibpath_overrides_runpath=no
1408251883Speter  hardcode_into_libs=yes
1409251883Speter  dynamic_linker='GNU ld.so'
1410251883Speter  ;;
1411251883Speter
1412251883Speterfreebsd* | dragonfly*)
1413251883Speter  # DragonFly does not have aout.  When/if they implement a new
1414251883Speter  # versioning mechanism, adjust this.
1415251883Speter  if test -x /usr/bin/objformat; then
1416251883Speter    objformat=`/usr/bin/objformat`
1417251883Speter  else
1418251883Speter    case $host_os in
1419251883Speter    freebsd[[123]]*) objformat=aout ;;
1420251883Speter    *) objformat=elf ;;
1421251883Speter    esac
1422251883Speter  fi
1423251883Speter  version_type=freebsd-$objformat
1424251883Speter  case $version_type in
1425251883Speter    freebsd-elf*)
1426251883Speter      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1427251883Speter      need_version=no
1428251883Speter      need_lib_prefix=no
1429251883Speter      ;;
1430251883Speter    freebsd-*)
1431251883Speter      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1432251883Speter      need_version=yes
1433251883Speter      ;;
1434251883Speter  esac
1435251883Speter  shlibpath_var=LD_LIBRARY_PATH
1436251883Speter  case $host_os in
1437251883Speter  freebsd2*)
1438251883Speter    shlibpath_overrides_runpath=yes
1439251883Speter    ;;
1440251883Speter  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1441251883Speter    shlibpath_overrides_runpath=yes
1442251883Speter    hardcode_into_libs=yes
1443251883Speter    ;;
1444251883Speter  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1445251883Speter  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1446251883Speter    shlibpath_overrides_runpath=no
1447251883Speter    hardcode_into_libs=yes
1448251883Speter    ;;
1449251883Speter  freebsd*) # from 4.6 on
1450251883Speter    shlibpath_overrides_runpath=yes
1451251883Speter    hardcode_into_libs=yes
1452251883Speter    ;;
1453251883Speter  esac
1454251883Speter  ;;
1455251883Speter
1456251883Spetergnu*)
1457251883Speter  version_type=linux
1458251883Speter  need_lib_prefix=no
1459251883Speter  need_version=no
1460251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1461251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1462251883Speter  shlibpath_var=LD_LIBRARY_PATH
1463251883Speter  hardcode_into_libs=yes
1464251883Speter  ;;
1465251883Speter
1466251883Speterhpux9* | hpux10* | hpux11*)
1467251883Speter  # Give a soname corresponding to the major version so that dld.sl refuses to
1468251883Speter  # link against other versions.
1469251883Speter  version_type=sunos
1470251883Speter  need_lib_prefix=no
1471251883Speter  need_version=no
1472251883Speter  case $host_cpu in
1473251883Speter  ia64*)
1474251883Speter    shrext_cmds='.so'
1475251883Speter    hardcode_into_libs=yes
1476251883Speter    dynamic_linker="$host_os dld.so"
1477251883Speter    shlibpath_var=LD_LIBRARY_PATH
1478251883Speter    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1479251883Speter    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1480251883Speter    soname_spec='${libname}${release}${shared_ext}$major'
1481251883Speter    if test "X$HPUX_IA64_MODE" = X32; then
1482251883Speter      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1483251883Speter    else
1484251883Speter      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1485251883Speter    fi
1486251883Speter    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1487251883Speter    ;;
1488251883Speter   hppa*64*)
1489251883Speter     shrext_cmds='.sl'
1490251883Speter     hardcode_into_libs=yes
1491251883Speter     dynamic_linker="$host_os dld.sl"
1492251883Speter     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1493251883Speter     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1494251883Speter     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1495251883Speter     soname_spec='${libname}${release}${shared_ext}$major'
1496251883Speter     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1497251883Speter     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1498251883Speter     ;;
1499251883Speter   *)
1500251883Speter    shrext_cmds='.sl'
1501251883Speter    dynamic_linker="$host_os dld.sl"
1502251883Speter    shlibpath_var=SHLIB_PATH
1503251883Speter    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1504251883Speter    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1505251883Speter    soname_spec='${libname}${release}${shared_ext}$major'
1506251883Speter    ;;
1507251883Speter  esac
1508251883Speter  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1509251883Speter  postinstall_cmds='chmod 555 $lib'
1510251883Speter  ;;
1511251883Speter
1512251883Speterinterix3*)
1513251883Speter  version_type=linux
1514251883Speter  need_lib_prefix=no
1515251883Speter  need_version=no
1516251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1517251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1518251883Speter  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1519251883Speter  shlibpath_var=LD_LIBRARY_PATH
1520251883Speter  shlibpath_overrides_runpath=no
1521251883Speter  hardcode_into_libs=yes
1522251883Speter  ;;
1523251883Speter
1524251883Speteririx5* | irix6* | nonstopux*)
1525251883Speter  case $host_os in
1526251883Speter    nonstopux*) version_type=nonstopux ;;
1527251883Speter    *)
1528251883Speter	if test "$lt_cv_prog_gnu_ld" = yes; then
1529251883Speter		version_type=linux
1530251883Speter	else
1531251883Speter		version_type=irix
1532251883Speter	fi ;;
1533251883Speter  esac
1534251883Speter  need_lib_prefix=no
1535251883Speter  need_version=no
1536251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1537251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1538251883Speter  case $host_os in
1539251883Speter  irix5* | nonstopux*)
1540251883Speter    libsuff= shlibsuff=
1541251883Speter    ;;
1542251883Speter  *)
1543251883Speter    case $LD in # libtool.m4 will add one of these switches to LD
1544251883Speter    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1545251883Speter      libsuff= shlibsuff= libmagic=32-bit;;
1546251883Speter    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1547251883Speter      libsuff=32 shlibsuff=N32 libmagic=N32;;
1548251883Speter    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1549251883Speter      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1550251883Speter    *) libsuff= shlibsuff= libmagic=never-match;;
1551251883Speter    esac
1552251883Speter    ;;
1553251883Speter  esac
1554251883Speter  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1555251883Speter  shlibpath_overrides_runpath=no
1556251883Speter  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1557251883Speter  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1558251883Speter  hardcode_into_libs=yes
1559251883Speter  ;;
1560251883Speter
1561251883Speter# No shared lib support for Linux oldld, aout, or coff.
1562251883Speterlinux*oldld* | linux*aout* | linux*coff*)
1563251883Speter  dynamic_linker=no
1564251883Speter  ;;
1565251883Speter
1566251883Speter# This must be Linux ELF.
1567251883Speterlinux*)
1568251883Speter  version_type=linux
1569251883Speter  need_lib_prefix=no
1570251883Speter  need_version=no
1571251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1572251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1573251883Speter  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1574251883Speter  shlibpath_var=LD_LIBRARY_PATH
1575251883Speter  shlibpath_overrides_runpath=no
1576251883Speter  # This implies no fast_install, which is unacceptable.
1577251883Speter  # Some rework will be needed to allow for fast_install
1578251883Speter  # before this can be enabled.
1579251883Speter  hardcode_into_libs=yes
1580251883Speter
1581251883Speter  # Append ld.so.conf contents to the search path
1582251883Speter  if test -f /etc/ld.so.conf; then
1583251883Speter    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' ' '`
1584251883Speter    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1585251883Speter  fi
1586251883Speter
1587251883Speter  # We used to test for /lib/ld.so.1 and disable shared libraries on
1588251883Speter  # powerpc, because MkLinux only supported shared libraries with the
1589251883Speter  # GNU dynamic linker.  Since this was broken with cross compilers,
1590251883Speter  # most powerpc-linux boxes support dynamic linking these days and
1591251883Speter  # people can always --disable-shared, the test was removed, and we
1592251883Speter  # assume the GNU/Linux dynamic linker is in use.
1593251883Speter  dynamic_linker='GNU/Linux ld.so'
1594251883Speter  ;;
1595251883Speter
1596251883Speterknetbsd*-gnu)
1597251883Speter  version_type=linux
1598251883Speter  need_lib_prefix=no
1599251883Speter  need_version=no
1600251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1601251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1602251883Speter  shlibpath_var=LD_LIBRARY_PATH
1603251883Speter  shlibpath_overrides_runpath=no
1604251883Speter  hardcode_into_libs=yes
1605251883Speter  dynamic_linker='GNU ld.so'
1606251883Speter  ;;
1607251883Speter
1608251883Speternetbsd*)
1609251883Speter  version_type=sunos
1610251883Speter  need_lib_prefix=no
1611251883Speter  need_version=no
1612251883Speter  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1613251883Speter    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1614251883Speter    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1615251883Speter    dynamic_linker='NetBSD (a.out) ld.so'
1616251883Speter  else
1617251883Speter    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1618251883Speter    soname_spec='${libname}${release}${shared_ext}$major'
1619251883Speter    dynamic_linker='NetBSD ld.elf_so'
1620251883Speter  fi
1621251883Speter  shlibpath_var=LD_LIBRARY_PATH
1622251883Speter  shlibpath_overrides_runpath=yes
1623251883Speter  hardcode_into_libs=yes
1624251883Speter  ;;
1625251883Speter
1626251883Speternewsos6)
1627251883Speter  version_type=linux
1628251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1629251883Speter  shlibpath_var=LD_LIBRARY_PATH
1630251883Speter  shlibpath_overrides_runpath=yes
1631251883Speter  ;;
1632251883Speter
1633251883Speternto-qnx*)
1634251883Speter  version_type=linux
1635251883Speter  need_lib_prefix=no
1636251883Speter  need_version=no
1637251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1638251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1639251883Speter  shlibpath_var=LD_LIBRARY_PATH
1640251883Speter  shlibpath_overrides_runpath=yes
1641251883Speter  ;;
1642251883Speter
1643251883Speteropenbsd*)
1644251883Speter  version_type=sunos
1645251883Speter  sys_lib_dlsearch_path_spec="/usr/lib"
1646251883Speter  need_lib_prefix=no
1647251883Speter  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1648251883Speter  case $host_os in
1649251883Speter    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1650251883Speter    *)                         need_version=no  ;;
1651251883Speter  esac
1652251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1653251883Speter  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1654251883Speter  shlibpath_var=LD_LIBRARY_PATH
1655251883Speter  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1656251883Speter    case $host_os in
1657251883Speter      openbsd2.[[89]] | openbsd2.[[89]].*)
1658251883Speter	shlibpath_overrides_runpath=no
1659251883Speter	;;
1660251883Speter      *)
1661251883Speter	shlibpath_overrides_runpath=yes
1662251883Speter	;;
1663251883Speter      esac
1664251883Speter  else
1665251883Speter    shlibpath_overrides_runpath=yes
1666251883Speter  fi
1667251883Speter  ;;
1668251883Speter
1669251883Speteros2*)
1670251883Speter  libname_spec='$name'
1671251883Speter  shrext_cmds=".dll"
1672251883Speter  need_lib_prefix=no
1673251883Speter  library_names_spec='$libname${shared_ext} $libname.a'
1674251883Speter  dynamic_linker='OS/2 ld.exe'
1675251883Speter  shlibpath_var=LIBPATH
1676251883Speter  ;;
1677251883Speter
1678251883Speterosf3* | osf4* | osf5*)
1679251883Speter  version_type=osf
1680251883Speter  need_lib_prefix=no
1681251883Speter  need_version=no
1682251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1683251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1684251883Speter  shlibpath_var=LD_LIBRARY_PATH
1685251883Speter  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1686251883Speter  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1687251883Speter  ;;
1688251883Speter
1689251883Spetersolaris*)
1690251883Speter  version_type=linux
1691251883Speter  need_lib_prefix=no
1692251883Speter  need_version=no
1693251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1694251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1695251883Speter  shlibpath_var=LD_LIBRARY_PATH
1696251883Speter  shlibpath_overrides_runpath=yes
1697251883Speter  hardcode_into_libs=yes
1698251883Speter  # ldd complains unless libraries are executable
1699251883Speter  postinstall_cmds='chmod +x $lib'
1700251883Speter  ;;
1701251883Speter
1702251883Spetersunos4*)
1703251883Speter  version_type=sunos
1704251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1705251883Speter  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1706251883Speter  shlibpath_var=LD_LIBRARY_PATH
1707251883Speter  shlibpath_overrides_runpath=yes
1708251883Speter  if test "$with_gnu_ld" = yes; then
1709251883Speter    need_lib_prefix=no
1710251883Speter  fi
1711251883Speter  need_version=yes
1712251883Speter  ;;
1713251883Speter
1714251883Spetersysv4 | sysv4.3*)
1715251883Speter  version_type=linux
1716251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1717251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1718251883Speter  shlibpath_var=LD_LIBRARY_PATH
1719251883Speter  case $host_vendor in
1720251883Speter    sni)
1721251883Speter      shlibpath_overrides_runpath=no
1722251883Speter      need_lib_prefix=no
1723251883Speter      export_dynamic_flag_spec='${wl}-Blargedynsym'
1724251883Speter      runpath_var=LD_RUN_PATH
1725251883Speter      ;;
1726251883Speter    siemens)
1727251883Speter      need_lib_prefix=no
1728251883Speter      ;;
1729251883Speter    motorola)
1730251883Speter      need_lib_prefix=no
1731251883Speter      need_version=no
1732251883Speter      shlibpath_overrides_runpath=no
1733251883Speter      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1734251883Speter      ;;
1735251883Speter  esac
1736251883Speter  ;;
1737251883Speter
1738251883Spetersysv4*MP*)
1739251883Speter  if test -d /usr/nec ;then
1740251883Speter    version_type=linux
1741251883Speter    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1742251883Speter    soname_spec='$libname${shared_ext}.$major'
1743251883Speter    shlibpath_var=LD_LIBRARY_PATH
1744251883Speter  fi
1745251883Speter  ;;
1746251883Speter
1747251883Spetersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1748251883Speter  version_type=freebsd-elf
1749251883Speter  need_lib_prefix=no
1750251883Speter  need_version=no
1751251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1752251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1753251883Speter  shlibpath_var=LD_LIBRARY_PATH
1754251883Speter  hardcode_into_libs=yes
1755251883Speter  if test "$with_gnu_ld" = yes; then
1756251883Speter    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1757251883Speter    shlibpath_overrides_runpath=no
1758251883Speter  else
1759251883Speter    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1760251883Speter    shlibpath_overrides_runpath=yes
1761251883Speter    case $host_os in
1762251883Speter      sco3.2v5*)
1763251883Speter        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1764251883Speter	;;
1765251883Speter    esac
1766251883Speter  fi
1767251883Speter  sys_lib_dlsearch_path_spec='/usr/lib'
1768251883Speter  ;;
1769251883Speter
1770251883Speteruts4*)
1771251883Speter  version_type=linux
1772251883Speter  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1773251883Speter  soname_spec='${libname}${release}${shared_ext}$major'
1774251883Speter  shlibpath_var=LD_LIBRARY_PATH
1775251883Speter  ;;
1776251883Speter
1777251883Speter*)
1778251883Speter  dynamic_linker=no
1779251883Speter  ;;
1780251883Speteresac
1781251883SpeterAC_MSG_RESULT([$dynamic_linker])
1782251883Spetertest "$dynamic_linker" = no && can_build_shared=no
1783251883Speter
1784251883Spetervariables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1785251883Speterif test "$GCC" = yes; then
1786251883Speter  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1787251883Speterfi
1788251883Speter])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1789251883Speter
1790251883Speter
1791251883Speter# _LT_AC_TAGCONFIG
1792251883Speter# ----------------
1793251883SpeterAC_DEFUN([_LT_AC_TAGCONFIG],
1794251883Speter[AC_ARG_WITH([tags],
1795251883Speter    [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@],
1796251883Speter        [include additional configurations @<:@automatic@:>@])],
1797251883Speter    [tagnames="$withval"])
1798251883Speter
1799251883Speterif test -f "$ltmain" && test -n "$tagnames"; then
1800251883Speter  if test ! -f "${ofile}"; then
1801251883Speter    AC_MSG_WARN([output file `$ofile' does not exist])
1802251883Speter  fi
1803251883Speter
1804251883Speter  if test -z "$LTCC"; then
1805251883Speter    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1806251883Speter    if test -z "$LTCC"; then
1807251883Speter      AC_MSG_WARN([output file `$ofile' does not look like a libtool script])
1808251883Speter    else
1809251883Speter      AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile'])
1810251883Speter    fi
1811251883Speter  fi
1812251883Speter  if test -z "$LTCFLAGS"; then
1813251883Speter    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1814251883Speter  fi
1815251883Speter
1816251883Speter  # Extract list of available tagged configurations in $ofile.
1817251883Speter  # Note that this assumes the entire list is on one line.
1818251883Speter  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1819251883Speter
1820251883Speter  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1821251883Speter  for tagname in $tagnames; do
1822251883Speter    IFS="$lt_save_ifs"
1823251883Speter    # Check whether tagname contains only valid characters
1824251883Speter    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1825251883Speter    "") ;;
1826251883Speter    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1827251883Speter	;;
1828251883Speter    esac
1829251883Speter
1830251883Speter    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1831251883Speter    then
1832251883Speter      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1833251883Speter    fi
1834251883Speter
1835251883Speter    # Update the list of available tags.
1836251883Speter    if test -n "$tagname"; then
1837251883Speter      echo appending configuration tag \"$tagname\" to $ofile
1838251883Speter
1839251883Speter      case $tagname in
1840251883Speter      CXX)
1841251883Speter	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1842251883Speter	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1843251883Speter	    (test "X$CXX" != "Xg++"))) ; then
1844251883Speter	  AC_LIBTOOL_LANG_CXX_CONFIG
1845251883Speter	else
1846251883Speter	  tagname=""
1847251883Speter	fi
1848251883Speter	;;
1849251883Speter
1850251883Speter      F77)
1851251883Speter	if test -n "$F77" && test "X$F77" != "Xno"; then
1852251883Speter	  AC_LIBTOOL_LANG_F77_CONFIG
1853251883Speter	else
1854251883Speter	  tagname=""
1855251883Speter	fi
1856251883Speter	;;
1857251883Speter
1858251883Speter      GCJ)
1859251883Speter	if test -n "$GCJ" && test "X$GCJ" != "Xno"; then
1860251883Speter	  AC_LIBTOOL_LANG_GCJ_CONFIG
1861251883Speter	else
1862251883Speter	  tagname=""
1863251883Speter	fi
1864251883Speter	;;
1865251883Speter
1866251883Speter      RC)
1867251883Speter	AC_LIBTOOL_LANG_RC_CONFIG
1868251883Speter	;;
1869251883Speter
1870251883Speter      *)
1871251883Speter	AC_MSG_ERROR([Unsupported tag name: $tagname])
1872251883Speter	;;
1873251883Speter      esac
1874251883Speter
1875251883Speter      # Append the new tag name to the list of available tags.
1876251883Speter      if test -n "$tagname" ; then
1877251883Speter      available_tags="$available_tags $tagname"
1878251883Speter    fi
1879251883Speter    fi
1880251883Speter  done
1881251883Speter  IFS="$lt_save_ifs"
1882251883Speter
1883251883Speter  # Now substitute the updated list of available tags.
1884251883Speter  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1885251883Speter    mv "${ofile}T" "$ofile"
1886251883Speter    chmod +x "$ofile"
1887251883Speter  else
1888251883Speter    rm -f "${ofile}T"
1889251883Speter    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1890251883Speter  fi
1891251883Speterfi
1892251883Speter])# _LT_AC_TAGCONFIG
1893251883Speter
1894251883Speter
1895251883Speter# AC_LIBTOOL_DLOPEN
1896251883Speter# -----------------
1897251883Speter# enable checks for dlopen support
1898251883SpeterAC_DEFUN([AC_LIBTOOL_DLOPEN],
1899251883Speter [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
1900251883Speter])# AC_LIBTOOL_DLOPEN
1901251883Speter
1902251883Speter
1903251883Speter# AC_LIBTOOL_WIN32_DLL
1904251883Speter# --------------------
1905251883Speter# declare package support for building win32 DLLs
1906251883SpeterAC_DEFUN([AC_LIBTOOL_WIN32_DLL],
1907251883Speter[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
1908251883Speter])# AC_LIBTOOL_WIN32_DLL
1909251883Speter
1910251883Speter
1911251883Speter# AC_ENABLE_SHARED([DEFAULT])
1912251883Speter# ---------------------------
1913251883Speter# implement the --enable-shared flag
1914251883Speter# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1915251883SpeterAC_DEFUN([AC_ENABLE_SHARED],
1916251883Speter[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
1917251883SpeterAC_ARG_ENABLE([shared],
1918251883Speter    [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
1919251883Speter	[build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])],
1920251883Speter    [p=${PACKAGE-default}
1921251883Speter    case $enableval in
1922251883Speter    yes) enable_shared=yes ;;
1923251883Speter    no) enable_shared=no ;;
1924251883Speter    *)
1925251883Speter      enable_shared=no
1926251883Speter      # Look at the argument we got.  We use all the common list separators.
1927251883Speter      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1928251883Speter      for pkg in $enableval; do
1929251883Speter	IFS="$lt_save_ifs"
1930251883Speter	if test "X$pkg" = "X$p"; then
1931251883Speter	  enable_shared=yes
1932251883Speter	fi
1933251883Speter      done
1934251883Speter      IFS="$lt_save_ifs"
1935251883Speter      ;;
1936251883Speter    esac],
1937251883Speter    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
1938251883Speter])# AC_ENABLE_SHARED
1939251883Speter
1940251883Speter
1941251883Speter# AC_DISABLE_SHARED
1942251883Speter# -----------------
1943251883Speter# set the default shared flag to --disable-shared
1944251883SpeterAC_DEFUN([AC_DISABLE_SHARED],
1945251883Speter[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1946251883SpeterAC_ENABLE_SHARED(no)
1947251883Speter])# AC_DISABLE_SHARED
1948251883Speter
1949251883Speter
1950251883Speter# AC_ENABLE_STATIC([DEFAULT])
1951251883Speter# ---------------------------
1952251883Speter# implement the --enable-static flag
1953251883Speter# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1954251883SpeterAC_DEFUN([AC_ENABLE_STATIC],
1955251883Speter[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
1956251883SpeterAC_ARG_ENABLE([static],
1957251883Speter    [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@],
1958251883Speter	[build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])],
1959251883Speter    [p=${PACKAGE-default}
1960251883Speter    case $enableval in
1961251883Speter    yes) enable_static=yes ;;
1962251883Speter    no) enable_static=no ;;
1963251883Speter    *)
1964251883Speter     enable_static=no
1965251883Speter      # Look at the argument we got.  We use all the common list separators.
1966251883Speter      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1967251883Speter      for pkg in $enableval; do
1968251883Speter	IFS="$lt_save_ifs"
1969251883Speter	if test "X$pkg" = "X$p"; then
1970251883Speter	  enable_static=yes
1971251883Speter	fi
1972251883Speter      done
1973251883Speter      IFS="$lt_save_ifs"
1974251883Speter      ;;
1975251883Speter    esac],
1976251883Speter    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
1977251883Speter])# AC_ENABLE_STATIC
1978251883Speter
1979251883Speter
1980251883Speter# AC_DISABLE_STATIC
1981251883Speter# -----------------
1982251883Speter# set the default static flag to --disable-static
1983251883SpeterAC_DEFUN([AC_DISABLE_STATIC],
1984251883Speter[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
1985251883SpeterAC_ENABLE_STATIC(no)
1986251883Speter])# AC_DISABLE_STATIC
1987251883Speter
1988251883Speter
1989251883Speter# AC_ENABLE_FAST_INSTALL([DEFAULT])
1990251883Speter# ---------------------------------
1991251883Speter# implement the --enable-fast-install flag
1992251883Speter# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
1993251883SpeterAC_DEFUN([AC_ENABLE_FAST_INSTALL],
1994251883Speter[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
1995251883SpeterAC_ARG_ENABLE([fast-install],
1996251883Speter    [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
1997251883Speter    [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
1998251883Speter    [p=${PACKAGE-default}
1999251883Speter    case $enableval in
2000251883Speter    yes) enable_fast_install=yes ;;
2001251883Speter    no) enable_fast_install=no ;;
2002251883Speter    *)
2003251883Speter      enable_fast_install=no
2004251883Speter      # Look at the argument we got.  We use all the common list separators.
2005251883Speter      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2006251883Speter      for pkg in $enableval; do
2007251883Speter	IFS="$lt_save_ifs"
2008251883Speter	if test "X$pkg" = "X$p"; then
2009251883Speter	  enable_fast_install=yes
2010251883Speter	fi
2011251883Speter      done
2012251883Speter      IFS="$lt_save_ifs"
2013251883Speter      ;;
2014251883Speter    esac],
2015251883Speter    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2016251883Speter])# AC_ENABLE_FAST_INSTALL
2017251883Speter
2018251883Speter
2019251883Speter# AC_DISABLE_FAST_INSTALL
2020251883Speter# -----------------------
2021251883Speter# set the default to --disable-fast-install
2022251883SpeterAC_DEFUN([AC_DISABLE_FAST_INSTALL],
2023251883Speter[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2024251883SpeterAC_ENABLE_FAST_INSTALL(no)
2025251883Speter])# AC_DISABLE_FAST_INSTALL
2026251883Speter
2027251883Speter
2028251883Speter# AC_LIBTOOL_PICMODE([MODE])
2029251883Speter# --------------------------
2030251883Speter# implement the --with-pic flag
2031251883Speter# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2032251883SpeterAC_DEFUN([AC_LIBTOOL_PICMODE],
2033251883Speter[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2034251883Speterpic_mode=ifelse($#,1,$1,default)
2035251883Speter])# AC_LIBTOOL_PICMODE
2036251883Speter
2037251883Speter
2038251883Speter# AC_PROG_EGREP
2039251883Speter# -------------
2040251883Speter# This is predefined starting with Autoconf 2.54, so this conditional
2041251883Speter# definition can be removed once we require Autoconf 2.54 or later.
2042251883Speterm4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP],
2043251883Speter[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2044251883Speter   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2045251883Speter    then ac_cv_prog_egrep='grep -E'
2046251883Speter    else ac_cv_prog_egrep='egrep'
2047251883Speter    fi])
2048251883Speter EGREP=$ac_cv_prog_egrep
2049251883Speter AC_SUBST([EGREP])
2050251883Speter])])
2051251883Speter
2052251883Speter
2053251883Speter# AC_PATH_TOOL_PREFIX
2054251883Speter# -------------------
2055251883Speter# find a file program which can recognise shared library
2056251883SpeterAC_DEFUN([AC_PATH_TOOL_PREFIX],
2057251883Speter[AC_REQUIRE([AC_PROG_EGREP])dnl
2058251883SpeterAC_MSG_CHECKING([for $1])
2059251883SpeterAC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2060251883Speter[case $MAGIC_CMD in
2061251883Speter[[\\/*] |  ?:[\\/]*])
2062251883Speter  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2063251883Speter  ;;
2064251883Speter*)
2065251883Speter  lt_save_MAGIC_CMD="$MAGIC_CMD"
2066251883Speter  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2067251883Speterdnl $ac_dummy forces splitting on constant user-supplied paths.
2068251883Speterdnl POSIX.2 word splitting is done only on the output of word expansions,
2069251883Speterdnl not every word.  This closes a longstanding sh security hole.
2070251883Speter  ac_dummy="ifelse([$2], , $PATH, [$2])"
2071251883Speter  for ac_dir in $ac_dummy; do
2072251883Speter    IFS="$lt_save_ifs"
2073251883Speter    test -z "$ac_dir" && ac_dir=.
2074251883Speter    if test -f $ac_dir/$1; then
2075251883Speter      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2076251883Speter      if test -n "$file_magic_test_file"; then
2077251883Speter	case $deplibs_check_method in
2078251883Speter	"file_magic "*)
2079251883Speter	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2080251883Speter	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2081251883Speter	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2082251883Speter	    $EGREP "$file_magic_regex" > /dev/null; then
2083251883Speter	    :
2084251883Speter	  else
2085251883Speter	    cat <<EOF 1>&2
2086251883Speter
2087251883Speter*** Warning: the command libtool uses to detect shared libraries,
2088251883Speter*** $file_magic_cmd, produces output that libtool cannot recognize.
2089251883Speter*** The result is that libtool may fail to recognize shared libraries
2090251883Speter*** as such.  This will affect the creation of libtool libraries that
2091251883Speter*** depend on shared libraries, but programs linked with such libtool
2092251883Speter*** libraries will work regardless of this problem.  Nevertheless, you
2093251883Speter*** may want to report the problem to your system manager and/or to
2094251883Speter*** bug-libtool@gnu.org
2095251883Speter
2096251883SpeterEOF
2097251883Speter	  fi ;;
2098251883Speter	esac
2099251883Speter      fi
2100251883Speter      break
2101251883Speter    fi
2102251883Speter  done
2103251883Speter  IFS="$lt_save_ifs"
2104251883Speter  MAGIC_CMD="$lt_save_MAGIC_CMD"
2105251883Speter  ;;
2106251883Speteresac])
2107251883SpeterMAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2108251883Speterif test -n "$MAGIC_CMD"; then
2109251883Speter  AC_MSG_RESULT($MAGIC_CMD)
2110251883Speterelse
2111251883Speter  AC_MSG_RESULT(no)
2112251883Speterfi
2113251883Speter])# AC_PATH_TOOL_PREFIX
2114251883Speter
2115251883Speter
2116251883Speter# AC_PATH_MAGIC
2117251883Speter# -------------
2118251883Speter# find a file program which can recognise a shared library
2119251883SpeterAC_DEFUN([AC_PATH_MAGIC],
2120251883Speter[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2121251883Speterif test -z "$lt_cv_path_MAGIC_CMD"; then
2122251883Speter  if test -n "$ac_tool_prefix"; then
2123251883Speter    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2124251883Speter  else
2125251883Speter    MAGIC_CMD=:
2126251883Speter  fi
2127251883Speterfi
2128251883Speter])# AC_PATH_MAGIC
2129251883Speter
2130251883Speter
2131251883Speter# AC_PROG_LD
2132251883Speter# ----------
2133251883Speter# find the pathname to the GNU or non-GNU linker
2134251883SpeterAC_DEFUN([AC_PROG_LD],
2135251883Speter[AC_ARG_WITH([gnu-ld],
2136251883Speter    [AC_HELP_STRING([--with-gnu-ld],
2137251883Speter	[assume the C compiler uses GNU ld @<:@default=no@:>@])],
2138251883Speter    [test "$withval" = no || with_gnu_ld=yes],
2139251883Speter    [with_gnu_ld=no])
2140251883SpeterAC_REQUIRE([LT_AC_PROG_SED])dnl
2141251883SpeterAC_REQUIRE([AC_PROG_CC])dnl
2142251883SpeterAC_REQUIRE([AC_CANONICAL_HOST])dnl
2143251883SpeterAC_REQUIRE([AC_CANONICAL_BUILD])dnl
2144251883Speterac_prog=ld
2145251883Speterif test "$GCC" = yes; then
2146251883Speter  # Check if gcc -print-prog-name=ld gives a path.
2147251883Speter  AC_MSG_CHECKING([for ld used by $CC])
2148251883Speter  case $host in
2149251883Speter  *-*-mingw*)
2150251883Speter    # gcc leaves a trailing carriage return which upsets mingw
2151251883Speter    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2152251883Speter  *)
2153251883Speter    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2154251883Speter  esac
2155251883Speter  case $ac_prog in
2156251883Speter    # Accept absolute paths.
2157251883Speter    [[\\/]]* | ?:[[\\/]]*)
2158251883Speter      re_direlt='/[[^/]][[^/]]*/\.\./'
2159251883Speter      # Canonicalize the pathname of ld
2160251883Speter      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2161251883Speter      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2162251883Speter	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2163251883Speter      done
2164251883Speter      test -z "$LD" && LD="$ac_prog"
2165251883Speter      ;;
2166251883Speter  "")
2167251883Speter    # If it fails, then pretend we aren't using GCC.
2168251883Speter    ac_prog=ld
2169251883Speter    ;;
2170251883Speter  *)
2171251883Speter    # If it is relative, then search for the first ld in PATH.
2172251883Speter    with_gnu_ld=unknown
2173251883Speter    ;;
2174251883Speter  esac
2175251883Speterelif test "$with_gnu_ld" = yes; then
2176251883Speter  AC_MSG_CHECKING([for GNU ld])
2177251883Speterelse
2178251883Speter  AC_MSG_CHECKING([for non-GNU ld])
2179251883Speterfi
2180251883SpeterAC_CACHE_VAL(lt_cv_path_LD,
2181251883Speter[if test -z "$LD"; then
2182251883Speter  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2183251883Speter  for ac_dir in $PATH; do
2184251883Speter    IFS="$lt_save_ifs"
2185251883Speter    test -z "$ac_dir" && ac_dir=.
2186251883Speter    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2187251883Speter      lt_cv_path_LD="$ac_dir/$ac_prog"
2188251883Speter      # Check to see if the program is GNU ld.  I'd rather use --version,
2189251883Speter      # but apparently some variants of GNU ld only accept -v.
2190251883Speter      # Break only if it was the GNU/non-GNU ld that we prefer.
2191251883Speter      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2192251883Speter      *GNU* | *'with BFD'*)
2193251883Speter	test "$with_gnu_ld" != no && break
2194251883Speter	;;
2195251883Speter      *)
2196251883Speter	test "$with_gnu_ld" != yes && break
2197251883Speter	;;
2198251883Speter      esac
2199251883Speter    fi
2200251883Speter  done
2201251883Speter  IFS="$lt_save_ifs"
2202251883Speterelse
2203251883Speter  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2204251883Speterfi])
2205251883SpeterLD="$lt_cv_path_LD"
2206251883Speterif test -n "$LD"; then
2207251883Speter  AC_MSG_RESULT($LD)
2208251883Speterelse
2209251883Speter  AC_MSG_RESULT(no)
2210251883Speterfi
2211251883Spetertest -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2212251883SpeterAC_PROG_LD_GNU
2213251883Speter])# AC_PROG_LD
2214251883Speter
2215251883Speter
2216251883Speter# AC_PROG_LD_GNU
2217251883Speter# --------------
2218251883SpeterAC_DEFUN([AC_PROG_LD_GNU],
2219251883Speter[AC_REQUIRE([AC_PROG_EGREP])dnl
2220251883SpeterAC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2221251883Speter[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2222251883Spetercase `$LD -v 2>&1 </dev/null` in
2223251883Speter*GNU* | *'with BFD'*)
2224251883Speter  lt_cv_prog_gnu_ld=yes
2225251883Speter  ;;
2226251883Speter*)
2227251883Speter  lt_cv_prog_gnu_ld=no
2228251883Speter  ;;
2229251883Speteresac])
2230251883Speterwith_gnu_ld=$lt_cv_prog_gnu_ld
2231251883Speter])# AC_PROG_LD_GNU
2232251883Speter
2233251883Speter
2234251883Speter# AC_PROG_LD_RELOAD_FLAG
2235251883Speter# ----------------------
2236251883Speter# find reload flag for linker
2237251883Speter#   -- PORTME Some linkers may need a different reload flag.
2238251883SpeterAC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2239251883Speter[AC_CACHE_CHECK([for $LD option to reload object files],
2240251883Speter  lt_cv_ld_reload_flag,
2241251883Speter  [lt_cv_ld_reload_flag='-r'])
2242251883Speterreload_flag=$lt_cv_ld_reload_flag
2243251883Spetercase $reload_flag in
2244251883Speter"" | " "*) ;;
2245251883Speter*) reload_flag=" $reload_flag" ;;
2246251883Speteresac
2247251883Speterreload_cmds='$LD$reload_flag -o $output$reload_objs'
2248251883Spetercase $host_os in
2249251883Speter  darwin*)
2250251883Speter    if test "$GCC" = yes; then
2251251883Speter      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2252251883Speter    else
2253251883Speter      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2254251883Speter    fi
2255251883Speter    ;;
2256251883Speteresac
2257251883Speter])# AC_PROG_LD_RELOAD_FLAG
2258251883Speter
2259251883Speter
2260251883Speter# AC_DEPLIBS_CHECK_METHOD
2261251883Speter# -----------------------
2262251883Speter# how to check for library dependencies
2263251883Speter#  -- PORTME fill in with the dynamic library characteristics
2264251883SpeterAC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2265251883Speter[AC_CACHE_CHECK([how to recognise dependent libraries],
2266251883Speterlt_cv_deplibs_check_method,
2267251883Speter[lt_cv_file_magic_cmd='$MAGIC_CMD'
2268251883Speterlt_cv_file_magic_test_file=
2269251883Speterlt_cv_deplibs_check_method='unknown'
2270251883Speter# Need to set the preceding variable on all platforms that support
2271251883Speter# interlibrary dependencies.
2272251883Speter# 'none' -- dependencies not supported.
2273251883Speter# `unknown' -- same as none, but documents that we really don't know.
2274251883Speter# 'pass_all' -- all dependencies passed with no checks.
2275251883Speter# 'test_compile' -- check by making test program.
2276251883Speter# 'file_magic [[regex]]' -- check by looking for files in library path
2277251883Speter# which responds to the $file_magic_cmd with a given extended regex.
2278251883Speter# If you have `file' or equivalent on your system and you're not sure
2279251883Speter# whether `pass_all' will *always* work, you probably want this one.
2280251883Speter
2281251883Spetercase $host_os in
2282251883Speteraix4* | aix5*)
2283251883Speter  lt_cv_deplibs_check_method=pass_all
2284251883Speter  ;;
2285251883Speter
2286251883Speterbeos*)
2287251883Speter  lt_cv_deplibs_check_method=pass_all
2288251883Speter  ;;
2289251883Speter
2290251883Speterbsdi[[45]]*)
2291251883Speter  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2292251883Speter  lt_cv_file_magic_cmd='/usr/bin/file -L'
2293251883Speter  lt_cv_file_magic_test_file=/shlib/libc.so
2294251883Speter  ;;
2295251883Speter
2296251883Spetercygwin*)
2297251883Speter  # func_win32_libid is a shell function defined in ltmain.sh
2298251883Speter  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2299251883Speter  lt_cv_file_magic_cmd='func_win32_libid'
2300251883Speter  ;;
2301251883Speter
2302251883Spetermingw* | pw32*)
2303251883Speter  # Base MSYS/MinGW do not provide the 'file' command needed by
2304251883Speter  # func_win32_libid shell function, so use a weaker test based on 'objdump'.
2305251883Speter  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2306251883Speter  lt_cv_file_magic_cmd='$OBJDUMP -f'
2307251883Speter  ;;
2308251883Speter
2309251883Speterdarwin* | rhapsody*)
2310251883Speter  lt_cv_deplibs_check_method=pass_all
2311251883Speter  ;;
2312251883Speter
2313251883Speterfreebsd* | kfreebsd*-gnu | dragonfly*)
2314251883Speter  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2315251883Speter    case $host_cpu in
2316251883Speter    i*86 )
2317251883Speter      # Not sure whether the presence of OpenBSD here was a mistake.
2318251883Speter      # Let's accept both of them until this is cleared up.
2319251883Speter      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2320251883Speter      lt_cv_file_magic_cmd=/usr/bin/file
2321251883Speter      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2322251883Speter      ;;
2323251883Speter    esac
2324251883Speter  else
2325251883Speter    lt_cv_deplibs_check_method=pass_all
2326251883Speter  fi
2327251883Speter  ;;
2328251883Speter
2329251883Spetergnu*)
2330251883Speter  lt_cv_deplibs_check_method=pass_all
2331251883Speter  ;;
2332251883Speter
2333251883Speterhpux10.20* | hpux11*)
2334251883Speter  lt_cv_file_magic_cmd=/usr/bin/file
2335251883Speter  case $host_cpu in
2336251883Speter  ia64*)
2337251883Speter    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2338251883Speter    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2339251883Speter    ;;
2340251883Speter  hppa*64*)
2341251883Speter    [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]']
2342251883Speter    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2343251883Speter    ;;
2344251883Speter  *)
2345251883Speter    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2346251883Speter    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2347251883Speter    ;;
2348251883Speter  esac
2349251883Speter  ;;
2350251883Speter
2351251883Speterinterix3*)
2352251883Speter  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2353251883Speter  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2354251883Speter  ;;
2355251883Speter
2356251883Speteririx5* | irix6* | nonstopux*)
2357251883Speter  case $LD in
2358251883Speter  *-32|*"-32 ") libmagic=32-bit;;
2359251883Speter  *-n32|*"-n32 ") libmagic=N32;;
2360251883Speter  *-64|*"-64 ") libmagic=64-bit;;
2361251883Speter  *) libmagic=never-match;;
2362251883Speter  esac
2363251883Speter  lt_cv_deplibs_check_method=pass_all
2364251883Speter  ;;
2365251883Speter
2366251883Speter# This must be Linux ELF.
2367251883Speterlinux*)
2368251883Speter  lt_cv_deplibs_check_method=pass_all
2369251883Speter  ;;
2370251883Speter
2371251883Speternetbsd*)
2372251883Speter  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2373251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2374251883Speter  else
2375251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2376251883Speter  fi
2377251883Speter  ;;
2378251883Speter
2379251883Speternewos6*)
2380251883Speter  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2381251883Speter  lt_cv_file_magic_cmd=/usr/bin/file
2382251883Speter  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2383251883Speter  ;;
2384251883Speter
2385251883Speternto-qnx*)
2386251883Speter  lt_cv_deplibs_check_method=unknown
2387251883Speter  ;;
2388251883Speter
2389251883Speteropenbsd*)
2390251883Speter  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2391251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2392251883Speter  else
2393251883Speter    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2394251883Speter  fi
2395251883Speter  ;;
2396251883Speter
2397251883Speterosf3* | osf4* | osf5*)
2398251883Speter  lt_cv_deplibs_check_method=pass_all
2399251883Speter  ;;
2400251883Speter
2401251883Spetersolaris*)
2402251883Speter  lt_cv_deplibs_check_method=pass_all
2403251883Speter  ;;
2404251883Speter
2405251883Spetersysv4 | sysv4.3*)
2406251883Speter  case $host_vendor in
2407251883Speter  motorola)
2408251883Speter    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]]'
2409251883Speter    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2410251883Speter    ;;
2411251883Speter  ncr)
2412251883Speter    lt_cv_deplibs_check_method=pass_all
2413251883Speter    ;;
2414251883Speter  sequent)
2415251883Speter    lt_cv_file_magic_cmd='/bin/file'
2416251883Speter    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2417251883Speter    ;;
2418251883Speter  sni)
2419251883Speter    lt_cv_file_magic_cmd='/bin/file'
2420251883Speter    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2421251883Speter    lt_cv_file_magic_test_file=/lib/libc.so
2422251883Speter    ;;
2423251883Speter  siemens)
2424251883Speter    lt_cv_deplibs_check_method=pass_all
2425251883Speter    ;;
2426251883Speter  pc)
2427251883Speter    lt_cv_deplibs_check_method=pass_all
2428251883Speter    ;;
2429251883Speter  esac
2430251883Speter  ;;
2431251883Speter
2432251883Spetersysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2433251883Speter  lt_cv_deplibs_check_method=pass_all
2434251883Speter  ;;
2435251883Speteresac
2436251883Speter])
2437251883Speterfile_magic_cmd=$lt_cv_file_magic_cmd
2438251883Speterdeplibs_check_method=$lt_cv_deplibs_check_method
2439251883Spetertest -z "$deplibs_check_method" && deplibs_check_method=unknown
2440251883Speter])# AC_DEPLIBS_CHECK_METHOD
2441251883Speter
2442251883Speter
2443251883Speter# AC_PROG_NM
2444251883Speter# ----------
2445251883Speter# find the pathname to a BSD-compatible name lister
2446251883SpeterAC_DEFUN([AC_PROG_NM],
2447251883Speter[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2448251883Speter[if test -n "$NM"; then
2449251883Speter  # Let the user override the test.
2450251883Speter  lt_cv_path_NM="$NM"
2451251883Speterelse
2452251883Speter  lt_nm_to_check="${ac_tool_prefix}nm"
2453251883Speter  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then 
2454251883Speter    lt_nm_to_check="$lt_nm_to_check nm"
2455251883Speter  fi
2456251883Speter  for lt_tmp_nm in $lt_nm_to_check; do
2457251883Speter    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2458251883Speter    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2459251883Speter      IFS="$lt_save_ifs"
2460251883Speter      test -z "$ac_dir" && ac_dir=.
2461251883Speter      tmp_nm="$ac_dir/$lt_tmp_nm"
2462251883Speter      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2463251883Speter	# Check to see if the nm accepts a BSD-compat flag.
2464251883Speter	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2465251883Speter	#   nm: unknown option "B" ignored
2466251883Speter	# Tru64's nm complains that /dev/null is an invalid object file
2467251883Speter	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2468251883Speter	*/dev/null* | *'Invalid file or object type'*)
2469251883Speter	  lt_cv_path_NM="$tmp_nm -B"
2470251883Speter	  break
2471251883Speter	  ;;
2472251883Speter	*)
2473251883Speter	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2474251883Speter	  */dev/null*)
2475251883Speter	    lt_cv_path_NM="$tmp_nm -p"
2476251883Speter	    break
2477251883Speter	    ;;
2478251883Speter	  *)
2479251883Speter	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2480251883Speter	    continue # so that we can try to find one that supports BSD flags
2481251883Speter	    ;;
2482251883Speter	  esac
2483251883Speter	  ;;
2484251883Speter	esac
2485251883Speter      fi
2486251883Speter    done
2487251883Speter    IFS="$lt_save_ifs"
2488251883Speter  done
2489251883Speter  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2490251883Speterfi])
2491251883SpeterNM="$lt_cv_path_NM"
2492251883Speter])# AC_PROG_NM
2493251883Speter
2494251883Speter
2495251883Speter# AC_CHECK_LIBM
2496251883Speter# -------------
2497251883Speter# check for math library
2498251883SpeterAC_DEFUN([AC_CHECK_LIBM],
2499251883Speter[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2500251883SpeterLIBM=
2501251883Spetercase $host in
2502251883Speter*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2503251883Speter  # These system don't have libm, or don't need it
2504251883Speter  ;;
2505251883Speter*-ncr-sysv4.3*)
2506251883Speter  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2507251883Speter  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2508251883Speter  ;;
2509251883Speter*)
2510251883Speter  AC_CHECK_LIB(m, cos, LIBM="-lm")
2511251883Speter  ;;
2512251883Speteresac
2513251883Speter])# AC_CHECK_LIBM
2514251883Speter
2515251883Speter
2516251883Speter# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2517251883Speter# -----------------------------------
2518251883Speter# sets LIBLTDL to the link flags for the libltdl convenience library and
2519251883Speter# LTDLINCL to the include flags for the libltdl header and adds
2520251883Speter# --enable-ltdl-convenience to the configure arguments.  Note that
2521251883Speter# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2522251883Speter# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2523251883Speter# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2524251883Speter# (note the single quotes!).  If your package is not flat and you're not
2525251883Speter# using automake, define top_builddir and top_srcdir appropriately in
2526251883Speter# the Makefiles.
2527251883SpeterAC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2528251883Speter[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2529251883Speter  case $enable_ltdl_convenience in
2530251883Speter  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2531251883Speter  "") enable_ltdl_convenience=yes
2532251883Speter      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2533251883Speter  esac
2534251883Speter  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2535251883Speter  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2536251883Speter  # For backwards non-gettext consistent compatibility...
2537251883Speter  INCLTDL="$LTDLINCL"
2538251883Speter])# AC_LIBLTDL_CONVENIENCE
2539251883Speter
2540251883Speter
2541251883Speter# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2542251883Speter# -----------------------------------
2543251883Speter# sets LIBLTDL to the link flags for the libltdl installable library and
2544251883Speter# LTDLINCL to the include flags for the libltdl header and adds
2545251883Speter# --enable-ltdl-install to the configure arguments.  Note that
2546251883Speter# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2547251883Speter# and an installed libltdl is not found, it is assumed to be `libltdl'.
2548251883Speter# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2549251883Speter# '${top_srcdir}/' (note the single quotes!).  If your package is not
2550251883Speter# flat and you're not using automake, define top_builddir and top_srcdir
2551251883Speter# appropriately in the Makefiles.
2552251883Speter# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2553251883SpeterAC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2554251883Speter[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2555251883Speter  AC_CHECK_LIB(ltdl, lt_dlinit,
2556251883Speter  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2557251883Speter  [if test x"$enable_ltdl_install" = xno; then
2558251883Speter     AC_MSG_WARN([libltdl not installed, but installation disabled])
2559251883Speter   else
2560251883Speter     enable_ltdl_install=yes
2561251883Speter   fi
2562251883Speter  ])
2563251883Speter  if test x"$enable_ltdl_install" = x"yes"; then
2564251883Speter    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2565251883Speter    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2566251883Speter    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2567251883Speter  else
2568251883Speter    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2569251883Speter    LIBLTDL="-lltdl"
2570251883Speter    LTDLINCL=
2571251883Speter  fi
2572251883Speter  # For backwards non-gettext consistent compatibility...
2573251883Speter  INCLTDL="$LTDLINCL"
2574251883Speter])# AC_LIBLTDL_INSTALLABLE
2575251883Speter
2576251883Speter
2577251883Speter# AC_LIBTOOL_CXX
2578251883Speter# --------------
2579251883Speter# enable support for C++ libraries
2580251883SpeterAC_DEFUN([AC_LIBTOOL_CXX],
2581251883Speter[AC_REQUIRE([_LT_AC_LANG_CXX])
2582251883Speter])# AC_LIBTOOL_CXX
2583251883Speter
2584251883Speter
2585251883Speter# _LT_AC_LANG_CXX
2586251883Speter# ---------------
2587251883SpeterAC_DEFUN([_LT_AC_LANG_CXX],
2588251883Speter[AC_REQUIRE([AC_PROG_CXX])
2589251883SpeterAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2590251883Speter_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2591251883Speter])# _LT_AC_LANG_CXX
2592251883Speter
2593251883Speter# _LT_AC_PROG_CXXCPP
2594251883Speter# ------------------
2595251883SpeterAC_DEFUN([_LT_AC_PROG_CXXCPP],
2596251883Speter[
2597251883SpeterAC_REQUIRE([AC_PROG_CXX])
2598251883Speterif test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2599251883Speter    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2600251883Speter    (test "X$CXX" != "Xg++"))) ; then
2601251883Speter  AC_PROG_CXXCPP
2602251883Speterfi
2603251883Speter])# _LT_AC_PROG_CXXCPP
2604251883Speter
2605251883Speter# AC_LIBTOOL_F77
2606251883Speter# --------------
2607251883Speter# enable support for Fortran 77 libraries
2608251883SpeterAC_DEFUN([AC_LIBTOOL_F77],
2609251883Speter[AC_REQUIRE([_LT_AC_LANG_F77])
2610251883Speter])# AC_LIBTOOL_F77
2611251883Speter
2612251883Speter
2613251883Speter# _LT_AC_LANG_F77
2614251883Speter# ---------------
2615251883SpeterAC_DEFUN([_LT_AC_LANG_F77],
2616251883Speter[AC_REQUIRE([AC_PROG_F77])
2617251883Speter_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77])
2618251883Speter])# _LT_AC_LANG_F77
2619251883Speter
2620251883Speter
2621251883Speter# AC_LIBTOOL_GCJ
2622251883Speter# --------------
2623251883Speter# enable support for GCJ libraries
2624251883SpeterAC_DEFUN([AC_LIBTOOL_GCJ],
2625251883Speter[AC_REQUIRE([_LT_AC_LANG_GCJ])
2626251883Speter])# AC_LIBTOOL_GCJ
2627251883Speter
2628251883Speter
2629251883Speter# _LT_AC_LANG_GCJ
2630251883Speter# ---------------
2631251883SpeterAC_DEFUN([_LT_AC_LANG_GCJ],
2632251883Speter[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[],
2633251883Speter  [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[],
2634251883Speter    [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[],
2635251883Speter      [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])],
2636251883Speter	 [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])],
2637251883Speter	   [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])])
2638251883Speter_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ])
2639251883Speter])# _LT_AC_LANG_GCJ
2640251883Speter
2641251883Speter
2642251883Speter# AC_LIBTOOL_RC
2643251883Speter# -------------
2644251883Speter# enable support for Windows resource files
2645251883SpeterAC_DEFUN([AC_LIBTOOL_RC],
2646251883Speter[AC_REQUIRE([LT_AC_PROG_RC])
2647251883Speter_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC])
2648251883Speter])# AC_LIBTOOL_RC
2649251883Speter
2650251883Speter
2651251883Speter# AC_LIBTOOL_LANG_C_CONFIG
2652251883Speter# ------------------------
2653251883Speter# Ensure that the configuration vars for the C compiler are
2654251883Speter# suitably defined.  Those variables are subsequently used by
2655251883Speter# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2656251883SpeterAC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2657251883SpeterAC_DEFUN([_LT_AC_LANG_C_CONFIG],
2658251883Speter[lt_save_CC="$CC"
2659251883SpeterAC_LANG_PUSH(C)
2660251883Speter
2661251883Speter# Source file extension for C test sources.
2662251883Speterac_ext=c
2663251883Speter
2664251883Speter# Object file extension for compiled C test sources.
2665251883Speterobjext=o
2666251883Speter_LT_AC_TAGVAR(objext, $1)=$objext
2667251883Speter
2668251883Speter# Code to be used in simple compile tests
2669251883Speterlt_simple_compile_test_code="int some_variable = 0;\n"
2670251883Speter
2671251883Speter# Code to be used in simple link tests
2672251883Speterlt_simple_link_test_code='int main(){return(0);}\n'
2673251883Speter
2674251883Speter_LT_AC_SYS_COMPILER
2675251883Speter
2676251883Speter# save warnings/boilerplate of simple test code
2677251883Speter_LT_COMPILER_BOILERPLATE
2678251883Speter_LT_LINKER_BOILERPLATE
2679251883Speter
2680251883SpeterAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2681251883SpeterAC_LIBTOOL_PROG_COMPILER_PIC($1)
2682251883SpeterAC_LIBTOOL_PROG_CC_C_O($1)
2683251883SpeterAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2684251883SpeterAC_LIBTOOL_PROG_LD_SHLIBS($1)
2685251883SpeterAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2686251883SpeterAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2687251883SpeterAC_LIBTOOL_SYS_LIB_STRIP
2688251883SpeterAC_LIBTOOL_DLOPEN_SELF
2689251883Speter
2690251883Speter# Report which library types will actually be built
2691251883SpeterAC_MSG_CHECKING([if libtool supports shared libraries])
2692251883SpeterAC_MSG_RESULT([$can_build_shared])
2693251883Speter
2694251883SpeterAC_MSG_CHECKING([whether to build shared libraries])
2695251883Spetertest "$can_build_shared" = "no" && enable_shared=no
2696251883Speter
2697251883Speter# On AIX, shared libraries and static libraries use the same namespace, and
2698251883Speter# are all built from PIC.
2699251883Spetercase $host_os in
2700251883Speteraix3*)
2701251883Speter  test "$enable_shared" = yes && enable_static=no
2702251883Speter  if test -n "$RANLIB"; then
2703251883Speter    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2704251883Speter    postinstall_cmds='$RANLIB $lib'
2705251883Speter  fi
2706251883Speter  ;;
2707251883Speter
2708251883Speteraix4* | aix5*)
2709251883Speter  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2710251883Speter    test "$enable_shared" = yes && enable_static=no
2711251883Speter  fi
2712251883Speter    ;;
2713251883Speteresac
2714251883SpeterAC_MSG_RESULT([$enable_shared])
2715251883Speter
2716251883SpeterAC_MSG_CHECKING([whether to build static libraries])
2717251883Speter# Make sure either enable_shared or enable_static is yes.
2718251883Spetertest "$enable_shared" = yes || enable_static=yes
2719251883SpeterAC_MSG_RESULT([$enable_static])
2720251883Speter
2721251883SpeterAC_LIBTOOL_CONFIG($1)
2722251883Speter
2723251883SpeterAC_LANG_POP
2724251883SpeterCC="$lt_save_CC"
2725251883Speter])# AC_LIBTOOL_LANG_C_CONFIG
2726251883Speter
2727251883Speter
2728251883Speter# AC_LIBTOOL_LANG_CXX_CONFIG
2729251883Speter# --------------------------
2730251883Speter# Ensure that the configuration vars for the C compiler are
2731251883Speter# suitably defined.  Those variables are subsequently used by
2732251883Speter# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2733251883SpeterAC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2734251883SpeterAC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2735251883Speter[AC_LANG_PUSH(C++)
2736251883SpeterAC_REQUIRE([AC_PROG_CXX])
2737251883SpeterAC_REQUIRE([_LT_AC_PROG_CXXCPP])
2738251883Speter
2739251883Speter_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2740251883Speter_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2741251883Speter_LT_AC_TAGVAR(always_export_symbols, $1)=no
2742251883Speter_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2743251883Speter_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2744251883Speter_LT_AC_TAGVAR(hardcode_direct, $1)=no
2745251883Speter_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2746251883Speter_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2747251883Speter_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2748251883Speter_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2749251883Speter_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2750251883Speter_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2751251883Speter_LT_AC_TAGVAR(module_cmds, $1)=
2752251883Speter_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2753251883Speter_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2754251883Speter_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2755251883Speter_LT_AC_TAGVAR(no_undefined_flag, $1)=
2756251883Speter_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2757251883Speter_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2758251883Speter
2759251883Speter# Dependencies to place before and after the object being linked:
2760251883Speter_LT_AC_TAGVAR(predep_objects, $1)=
2761251883Speter_LT_AC_TAGVAR(postdep_objects, $1)=
2762251883Speter_LT_AC_TAGVAR(predeps, $1)=
2763251883Speter_LT_AC_TAGVAR(postdeps, $1)=
2764251883Speter_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2765251883Speter
2766251883Speter# Source file extension for C++ test sources.
2767251883Speterac_ext=cpp
2768251883Speter
2769251883Speter# Object file extension for compiled C++ test sources.
2770251883Speterobjext=o
2771251883Speter_LT_AC_TAGVAR(objext, $1)=$objext
2772251883Speter
2773251883Speter# Code to be used in simple compile tests
2774251883Speterlt_simple_compile_test_code="int some_variable = 0;\n"
2775251883Speter
2776251883Speter# Code to be used in simple link tests
2777251883Speterlt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n'
2778251883Speter
2779251883Speter# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2780251883Speter_LT_AC_SYS_COMPILER
2781251883Speter
2782251883Speter# save warnings/boilerplate of simple test code
2783251883Speter_LT_COMPILER_BOILERPLATE
2784251883Speter_LT_LINKER_BOILERPLATE
2785251883Speter
2786251883Speter# Allow CC to be a program name with arguments.
2787251883Speterlt_save_CC=$CC
2788251883Speterlt_save_LD=$LD
2789251883Speterlt_save_GCC=$GCC
2790251883SpeterGCC=$GXX
2791251883Speterlt_save_with_gnu_ld=$with_gnu_ld
2792251883Speterlt_save_path_LD=$lt_cv_path_LD
2793251883Speterif test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2794251883Speter  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2795251883Speterelse
2796251883Speter  $as_unset lt_cv_prog_gnu_ld
2797251883Speterfi
2798251883Speterif test -n "${lt_cv_path_LDCXX+set}"; then
2799251883Speter  lt_cv_path_LD=$lt_cv_path_LDCXX
2800251883Speterelse
2801251883Speter  $as_unset lt_cv_path_LD
2802251883Speterfi
2803251883Spetertest -z "${LDCXX+set}" || LD=$LDCXX
2804251883SpeterCC=${CXX-"c++"}
2805251883Spetercompiler=$CC
2806251883Speter_LT_AC_TAGVAR(compiler, $1)=$CC
2807251883Speter_LT_CC_BASENAME([$compiler])
2808251883Speter
2809251883Speter# We don't want -fno-exception wen compiling C++ code, so set the
2810251883Speter# no_builtin_flag separately
2811251883Speterif test "$GXX" = yes; then
2812251883Speter  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2813251883Speterelse
2814251883Speter  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2815251883Speterfi
2816251883Speter
2817251883Speterif test "$GXX" = yes; then
2818251883Speter  # Set up default GNU C++ configuration
2819251883Speter
2820251883Speter  AC_PROG_LD
2821251883Speter
2822251883Speter  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2823251883Speter  # archiving commands below assume that GNU ld is being used.
2824251883Speter  if test "$with_gnu_ld" = yes; then
2825251883Speter    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2826251883Speter    _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'
2827251883Speter
2828251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2829251883Speter    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2830251883Speter
2831251883Speter    # If archive_cmds runs LD, not CC, wlarc should be empty
2832251883Speter    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2833251883Speter    #     investigate it a little bit more. (MM)
2834251883Speter    wlarc='${wl}'
2835251883Speter
2836251883Speter    # ancient GNU ld didn't support --whole-archive et. al.
2837251883Speter    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2838251883Speter	grep 'no-whole-archive' > /dev/null; then
2839251883Speter      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2840251883Speter    else
2841251883Speter      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2842251883Speter    fi
2843251883Speter  else
2844251883Speter    with_gnu_ld=no
2845251883Speter    wlarc=
2846251883Speter
2847251883Speter    # A generic and very simple default shared library creation
2848251883Speter    # command for GNU C++ for the case where it uses the native
2849251883Speter    # linker, instead of GNU ld.  If possible, this setting should
2850251883Speter    # overridden to take advantage of the native linker features on
2851251883Speter    # the platform it is being used on.
2852251883Speter    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2853251883Speter  fi
2854251883Speter
2855251883Speter  # Commands to make compiler produce verbose output that lists
2856251883Speter  # what "hidden" libraries, object files and flags are used when
2857251883Speter  # linking a shared library.
2858251883Speter  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2859251883Speter
2860251883Speterelse
2861251883Speter  GXX=no
2862251883Speter  with_gnu_ld=no
2863251883Speter  wlarc=
2864251883Speterfi
2865251883Speter
2866251883Speter# PORTME: fill in a description of your system's C++ link characteristics
2867251883SpeterAC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2868251883Speter_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2869251883Spetercase $host_os in
2870251883Speter  aix3*)
2871251883Speter    # FIXME: insert proper C++ library support
2872251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2873251883Speter    ;;
2874251883Speter  aix4* | aix5*)
2875251883Speter    if test "$host_cpu" = ia64; then
2876251883Speter      # On IA64, the linker does run time linking by default, so we don't
2877251883Speter      # have to do anything special.
2878251883Speter      aix_use_runtimelinking=no
2879251883Speter      exp_sym_flag='-Bexport'
2880251883Speter      no_entry_flag=""
2881251883Speter    else
2882251883Speter      aix_use_runtimelinking=no
2883251883Speter
2884251883Speter      # Test if we are trying to use run time linking or normal
2885251883Speter      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2886251883Speter      # need to do runtime linking.
2887251883Speter      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
2888251883Speter	for ld_flag in $LDFLAGS; do
2889251883Speter	  case $ld_flag in
2890251883Speter	  *-brtl*)
2891251883Speter	    aix_use_runtimelinking=yes
2892251883Speter	    break
2893251883Speter	    ;;
2894251883Speter	  esac
2895251883Speter	done
2896251883Speter	;;
2897251883Speter      esac
2898251883Speter
2899251883Speter      exp_sym_flag='-bexport'
2900251883Speter      no_entry_flag='-bnoentry'
2901251883Speter    fi
2902251883Speter
2903251883Speter    # When large executables or shared objects are built, AIX ld can
2904251883Speter    # have problems creating the table of contents.  If linking a library
2905251883Speter    # or program results in "error TOC overflow" add -mminimal-toc to
2906251883Speter    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2907251883Speter    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2908251883Speter
2909251883Speter    _LT_AC_TAGVAR(archive_cmds, $1)=''
2910251883Speter    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2911251883Speter    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2912251883Speter    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2913251883Speter
2914251883Speter    if test "$GXX" = yes; then
2915251883Speter      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2916251883Speter      # We only want to do this on AIX 4.2 and lower, the check
2917251883Speter      # below for broken collect2 doesn't work under 4.3+
2918251883Speter	collect2name=`${CC} -print-prog-name=collect2`
2919251883Speter	if test -f "$collect2name" && \
2920251883Speter	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2921251883Speter	then
2922251883Speter	  # We have reworked collect2
2923251883Speter	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2924251883Speter	else
2925251883Speter	  # We have old collect2
2926251883Speter	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
2927251883Speter	  # It fails to find uninstalled libraries when the uninstalled
2928251883Speter	  # path is not listed in the libpath.  Setting hardcode_minus_L
2929251883Speter	  # to unsupported forces relinking
2930251883Speter	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
2931251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
2932251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2933251883Speter	fi
2934251883Speter	;;
2935251883Speter      esac
2936251883Speter      shared_flag='-shared'
2937251883Speter      if test "$aix_use_runtimelinking" = yes; then
2938251883Speter	shared_flag="$shared_flag "'${wl}-G'
2939251883Speter      fi
2940251883Speter    else
2941251883Speter      # not using gcc
2942251883Speter      if test "$host_cpu" = ia64; then
2943251883Speter	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
2944251883Speter	# chokes on -Wl,-G. The following line is correct:
2945251883Speter	shared_flag='-G'
2946251883Speter      else
2947251883Speter	if test "$aix_use_runtimelinking" = yes; then
2948251883Speter	  shared_flag='${wl}-G'
2949251883Speter	else
2950251883Speter	  shared_flag='${wl}-bM:SRE'
2951251883Speter	fi
2952251883Speter      fi
2953251883Speter    fi
2954251883Speter
2955251883Speter    # It seems that -bexpall does not export symbols beginning with
2956251883Speter    # underscore (_), so it is better to generate a list of symbols to export.
2957251883Speter    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
2958251883Speter    if test "$aix_use_runtimelinking" = yes; then
2959251883Speter      # Warning - without using the other runtime loading flags (-brtl),
2960251883Speter      # -berok will link without error, but may produce a broken library.
2961251883Speter      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
2962251883Speter      # Determine the default libpath from the value encoded in an empty executable.
2963251883Speter      _LT_AC_SYS_LIBPATH_AIX
2964251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2965251883Speter
2966251883Speter      _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"
2967251883Speter     else
2968251883Speter      if test "$host_cpu" = ia64; then
2969251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
2970251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
2971251883Speter	_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"
2972251883Speter      else
2973251883Speter	# Determine the default libpath from the value encoded in an empty executable.
2974251883Speter	_LT_AC_SYS_LIBPATH_AIX
2975251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
2976251883Speter	# Warning - without using the other run time loading flags,
2977251883Speter	# -berok will link without error, but may produce a broken library.
2978251883Speter	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
2979251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
2980251883Speter	# Exported symbols can be pulled into shared objects from archives
2981251883Speter	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
2982251883Speter	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
2983251883Speter	# This is similar to how AIX traditionally builds its shared libraries.
2984251883Speter	_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'
2985251883Speter      fi
2986251883Speter    fi
2987251883Speter    ;;
2988251883Speter
2989251883Speter  beos*)
2990251883Speter    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
2991251883Speter      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
2992251883Speter      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
2993251883Speter      # support --undefined.  This deserves some investigation.  FIXME
2994251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
2995251883Speter    else
2996251883Speter      _LT_AC_TAGVAR(ld_shlibs, $1)=no
2997251883Speter    fi
2998251883Speter    ;;
2999251883Speter
3000251883Speter  chorus*)
3001251883Speter    case $cc_basename in
3002251883Speter      *)
3003251883Speter	# FIXME: insert proper C++ library support
3004251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3005251883Speter	;;
3006251883Speter    esac
3007251883Speter    ;;
3008251883Speter
3009251883Speter  cygwin* | mingw* | pw32*)
3010251883Speter    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3011251883Speter    # as there is no search path for DLLs.
3012251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3013251883Speter    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3014251883Speter    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3015251883Speter    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3016251883Speter
3017251883Speter    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3018251883Speter      _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'
3019251883Speter      # If the export-symbols file already is a .def file (1st line
3020251883Speter      # is EXPORTS), use it as is; otherwise, prepend...
3021251883Speter      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3022251883Speter	cp $export_symbols $output_objdir/$soname.def;
3023251883Speter      else
3024251883Speter	echo EXPORTS > $output_objdir/$soname.def;
3025251883Speter	cat $export_symbols >> $output_objdir/$soname.def;
3026251883Speter      fi~
3027251883Speter      $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'
3028251883Speter    else
3029251883Speter      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3030251883Speter    fi
3031251883Speter  ;;
3032251883Speter      darwin* | rhapsody*)
3033251883Speter        case $host_os in
3034251883Speter        rhapsody* | darwin1.[[012]])
3035251883Speter         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
3036251883Speter         ;;
3037251883Speter       *) # Darwin 1.3 on
3038251883Speter         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
3039251883Speter           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3040251883Speter         else
3041251883Speter           case ${MACOSX_DEPLOYMENT_TARGET} in
3042251883Speter             10.[[012]])
3043251883Speter               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
3044251883Speter               ;;
3045251883Speter             10.*)
3046251883Speter               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
3047251883Speter               ;;
3048251883Speter           esac
3049251883Speter         fi
3050251883Speter         ;;
3051251883Speter        esac
3052251883Speter      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3053251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3054251883Speter      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3055251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3056251883Speter      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3057251883Speter      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3058251883Speter
3059251883Speter    if test "$GXX" = yes ; then
3060251883Speter      lt_int_apple_cc_single_mod=no
3061251883Speter      output_verbose_link_cmd='echo'
3062251883Speter      if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then
3063251883Speter       lt_int_apple_cc_single_mod=yes
3064251883Speter      fi
3065251883Speter      if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3066251883Speter       _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
3067251883Speter      else
3068251883Speter          _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'
3069251883Speter        fi
3070251883Speter        _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3071251883Speter        # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3072251883Speter          if test "X$lt_int_apple_cc_single_mod" = Xyes ; then
3073251883Speter            _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}'
3074251883Speter          else
3075251883Speter            _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}'
3076251883Speter          fi
3077251883Speter            _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}'
3078251883Speter      else
3079251883Speter      case $cc_basename in
3080251883Speter        xlc*)
3081251883Speter         output_verbose_link_cmd='echo'
3082251883Speter          _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'
3083251883Speter          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3084251883Speter          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3085251883Speter          _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}'
3086251883Speter          _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}'
3087251883Speter          ;;
3088251883Speter       *)
3089251883Speter         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3090251883Speter          ;;
3091251883Speter      esac
3092251883Speter      fi
3093251883Speter        ;;
3094251883Speter
3095251883Speter  dgux*)
3096251883Speter    case $cc_basename in
3097251883Speter      ec++*)
3098251883Speter	# FIXME: insert proper C++ library support
3099251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3100251883Speter	;;
3101251883Speter      ghcx*)
3102251883Speter	# Green Hills C++ Compiler
3103251883Speter	# FIXME: insert proper C++ library support
3104251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3105251883Speter	;;
3106251883Speter      *)
3107251883Speter	# FIXME: insert proper C++ library support
3108251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3109251883Speter	;;
3110251883Speter    esac
3111251883Speter    ;;
3112251883Speter  freebsd[[12]]*)
3113251883Speter    # C++ shared libraries reported to be fairly broken before switch to ELF
3114251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3115251883Speter    ;;
3116251883Speter  freebsd-elf*)
3117251883Speter    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3118251883Speter    ;;
3119251883Speter  freebsd* | kfreebsd*-gnu | dragonfly*)
3120251883Speter    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3121251883Speter    # conventions
3122251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3123251883Speter    ;;
3124251883Speter  gnu*)
3125251883Speter    ;;
3126251883Speter  hpux9*)
3127251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3128251883Speter    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3129251883Speter    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3130251883Speter    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3131251883Speter    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3132251883Speter				# but as the default
3133251883Speter				# location of the library.
3134251883Speter
3135251883Speter    case $cc_basename in
3136251883Speter    CC*)
3137251883Speter      # FIXME: insert proper C++ library support
3138251883Speter      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3139251883Speter      ;;
3140251883Speter    aCC*)
3141251883Speter      _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'
3142251883Speter      # Commands to make compiler produce verbose output that lists
3143251883Speter      # what "hidden" libraries, object files and flags are used when
3144251883Speter      # linking a shared library.
3145251883Speter      #
3146251883Speter      # There doesn't appear to be a way to prevent this compiler from
3147251883Speter      # explicitly linking system object files so we need to strip them
3148251883Speter      # from the output so that they don't get included in the library
3149251883Speter      # dependencies.
3150251883Speter      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'
3151251883Speter      ;;
3152251883Speter    *)
3153251883Speter      if test "$GXX" = yes; then
3154251883Speter        _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'
3155251883Speter      else
3156251883Speter        # FIXME: insert proper C++ library support
3157251883Speter        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3158251883Speter      fi
3159251883Speter      ;;
3160251883Speter    esac
3161251883Speter    ;;
3162251883Speter  hpux10*|hpux11*)
3163251883Speter    if test $with_gnu_ld = no; then
3164251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3165251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3166251883Speter
3167251883Speter      case $host_cpu in
3168251883Speter      hppa*64*|ia64*)
3169251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
3170251883Speter        ;;
3171251883Speter      *)
3172251883Speter	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3173251883Speter        ;;
3174251883Speter      esac
3175251883Speter    fi
3176251883Speter    case $host_cpu in
3177251883Speter    hppa*64*|ia64*)
3178251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3179251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3180251883Speter      ;;
3181251883Speter    *)
3182251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3183251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3184251883Speter					      # but as the default
3185251883Speter					      # location of the library.
3186251883Speter      ;;
3187251883Speter    esac
3188251883Speter
3189251883Speter    case $cc_basename in
3190251883Speter      CC*)
3191251883Speter	# FIXME: insert proper C++ library support
3192251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3193251883Speter	;;
3194251883Speter      aCC*)
3195251883Speter	case $host_cpu in
3196251883Speter	hppa*64*)
3197251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3198251883Speter	  ;;
3199251883Speter	ia64*)
3200251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3201251883Speter	  ;;
3202251883Speter	*)
3203251883Speter	  _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'
3204251883Speter	  ;;
3205251883Speter	esac
3206251883Speter	# Commands to make compiler produce verbose output that lists
3207251883Speter	# what "hidden" libraries, object files and flags are used when
3208251883Speter	# linking a shared library.
3209251883Speter	#
3210251883Speter	# There doesn't appear to be a way to prevent this compiler from
3211251883Speter	# explicitly linking system object files so we need to strip them
3212251883Speter	# from the output so that they don't get included in the library
3213251883Speter	# dependencies.
3214251883Speter	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'
3215251883Speter	;;
3216251883Speter      *)
3217251883Speter	if test "$GXX" = yes; then
3218251883Speter	  if test $with_gnu_ld = no; then
3219251883Speter	    case $host_cpu in
3220251883Speter	    hppa*64*)
3221251883Speter	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3222251883Speter	      ;;
3223251883Speter	    ia64*)
3224251883Speter	      _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'
3225251883Speter	      ;;
3226251883Speter	    *)
3227251883Speter	      _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'
3228251883Speter	      ;;
3229251883Speter	    esac
3230251883Speter	  fi
3231251883Speter	else
3232251883Speter	  # FIXME: insert proper C++ library support
3233251883Speter	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3234251883Speter	fi
3235251883Speter	;;
3236251883Speter    esac
3237251883Speter    ;;
3238251883Speter  interix3*)
3239251883Speter    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3240251883Speter    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3241251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3242251883Speter    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3243251883Speter    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3244251883Speter    # Instead, shared libraries are loaded at an image base (0x10000000 by
3245251883Speter    # default) and relocated if they conflict, which is a slow very memory
3246251883Speter    # consuming and fragmenting process.  To avoid this, we pick a random,
3247251883Speter    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3248251883Speter    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3249251883Speter    _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'
3250251883Speter    _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'
3251251883Speter    ;;
3252251883Speter  irix5* | irix6*)
3253251883Speter    case $cc_basename in
3254251883Speter      CC*)
3255251883Speter	# SGI C++
3256251883Speter	_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'
3257251883Speter
3258251883Speter	# Archives containing C++ object files must be created using
3259251883Speter	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3260251883Speter	# necessary to make sure instantiated templates are included
3261251883Speter	# in the archive.
3262251883Speter	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3263251883Speter	;;
3264251883Speter      *)
3265251883Speter	if test "$GXX" = yes; then
3266251883Speter	  if test "$with_gnu_ld" = no; then
3267251883Speter	    _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'
3268251883Speter	  else
3269251883Speter	    _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'
3270251883Speter	  fi
3271251883Speter	fi
3272251883Speter	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3273251883Speter	;;
3274251883Speter    esac
3275251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3276251883Speter    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3277251883Speter    ;;
3278251883Speter  linux*)
3279251883Speter    case $cc_basename in
3280251883Speter      KCC*)
3281251883Speter	# Kuck and Associates, Inc. (KAI) C++ Compiler
3282251883Speter
3283251883Speter	# KCC will only create a shared library if the output file
3284251883Speter	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3285251883Speter	# to its proper name (with version) after linking.
3286251883Speter	_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'
3287251883Speter	_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'
3288251883Speter	# Commands to make compiler produce verbose output that lists
3289251883Speter	# what "hidden" libraries, object files and flags are used when
3290251883Speter	# linking a shared library.
3291251883Speter	#
3292251883Speter	# There doesn't appear to be a way to prevent this compiler from
3293251883Speter	# explicitly linking system object files so we need to strip them
3294251883Speter	# from the output so that they don't get included in the library
3295251883Speter	# dependencies.
3296251883Speter	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'
3297251883Speter
3298251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3299251883Speter	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3300251883Speter
3301251883Speter	# Archives containing C++ object files must be created using
3302251883Speter	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3303251883Speter	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3304251883Speter	;;
3305251883Speter      icpc*)
3306251883Speter	# Intel C++
3307251883Speter	with_gnu_ld=yes
3308251883Speter	# version 8.0 and above of icpc choke on multiply defined symbols
3309251883Speter	# if we add $predep_objects and $postdep_objects, however 7.1 and
3310251883Speter	# earlier do not add the objects themselves.
3311251883Speter	case `$CC -V 2>&1` in
3312251883Speter	*"Version 7."*)
3313251883Speter  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3314251883Speter  	  _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'
3315251883Speter	  ;;
3316251883Speter	*)  # Version 8.0 or newer
3317251883Speter	  tmp_idyn=
3318251883Speter	  case $host_cpu in
3319251883Speter	    ia64*) tmp_idyn=' -i_dynamic';;
3320251883Speter	  esac
3321251883Speter  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3322251883Speter	  _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'
3323251883Speter	  ;;
3324251883Speter	esac
3325251883Speter	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3326251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3327251883Speter	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3328251883Speter	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3329251883Speter	;;
3330251883Speter      pgCC*)
3331251883Speter        # Portland Group C++ compiler
3332251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3333251883Speter  	_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'
3334251883Speter
3335251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3336251883Speter	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3337251883Speter	_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'
3338251883Speter        ;;
3339251883Speter      cxx*)
3340251883Speter	# Compaq C++
3341251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3342251883Speter	_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'
3343251883Speter
3344251883Speter	runpath_var=LD_RUN_PATH
3345251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3346251883Speter	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3347251883Speter
3348251883Speter	# Commands to make compiler produce verbose output that lists
3349251883Speter	# what "hidden" libraries, object files and flags are used when
3350251883Speter	# linking a shared library.
3351251883Speter	#
3352251883Speter	# There doesn't appear to be a way to prevent this compiler from
3353251883Speter	# explicitly linking system object files so we need to strip them
3354251883Speter	# from the output so that they don't get included in the library
3355251883Speter	# dependencies.
3356251883Speter	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'
3357251883Speter	;;
3358251883Speter    esac
3359251883Speter    ;;
3360251883Speter  lynxos*)
3361251883Speter    # FIXME: insert proper C++ library support
3362251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3363251883Speter    ;;
3364251883Speter  m88k*)
3365251883Speter    # FIXME: insert proper C++ library support
3366251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3367251883Speter    ;;
3368251883Speter  mvs*)
3369251883Speter    case $cc_basename in
3370251883Speter      cxx*)
3371251883Speter	# FIXME: insert proper C++ library support
3372251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3373251883Speter	;;
3374251883Speter      *)
3375251883Speter	# FIXME: insert proper C++ library support
3376251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3377251883Speter	;;
3378251883Speter    esac
3379251883Speter    ;;
3380251883Speter  netbsd*)
3381251883Speter    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3382251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3383251883Speter      wlarc=
3384251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3385251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3386251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3387251883Speter    fi
3388251883Speter    # Workaround some broken pre-1.5 toolchains
3389251883Speter    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3390251883Speter    ;;
3391251883Speter  openbsd2*)
3392251883Speter    # C++ shared libraries are fairly broken
3393251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3394251883Speter    ;;
3395251883Speter  openbsd*)
3396251883Speter    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3397251883Speter    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3398251883Speter    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3399251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3400251883Speter    if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3401251883Speter      _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'
3402251883Speter      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3403251883Speter      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3404251883Speter    fi
3405251883Speter    output_verbose_link_cmd='echo'
3406251883Speter    ;;
3407251883Speter  osf3*)
3408251883Speter    case $cc_basename in
3409251883Speter      KCC*)
3410251883Speter	# Kuck and Associates, Inc. (KAI) C++ Compiler
3411251883Speter
3412251883Speter	# KCC will only create a shared library if the output file
3413251883Speter	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3414251883Speter	# to its proper name (with version) after linking.
3415251883Speter	_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'
3416251883Speter
3417251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3418251883Speter	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3419251883Speter
3420251883Speter	# Archives containing C++ object files must be created using
3421251883Speter	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3422251883Speter	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3423251883Speter
3424251883Speter	;;
3425251883Speter      RCC*)
3426251883Speter	# Rational C++ 2.4.1
3427251883Speter	# FIXME: insert proper C++ library support
3428251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3429251883Speter	;;
3430251883Speter      cxx*)
3431251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3432251883Speter	_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'
3433251883Speter
3434251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3435251883Speter	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3436251883Speter
3437251883Speter	# Commands to make compiler produce verbose output that lists
3438251883Speter	# what "hidden" libraries, object files and flags are used when
3439251883Speter	# linking a shared library.
3440251883Speter	#
3441251883Speter	# There doesn't appear to be a way to prevent this compiler from
3442251883Speter	# explicitly linking system object files so we need to strip them
3443251883Speter	# from the output so that they don't get included in the library
3444251883Speter	# dependencies.
3445251883Speter	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'
3446251883Speter	;;
3447251883Speter      *)
3448251883Speter	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3449251883Speter	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3450251883Speter	  _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'
3451251883Speter
3452251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3453251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3454251883Speter
3455251883Speter	  # Commands to make compiler produce verbose output that lists
3456251883Speter	  # what "hidden" libraries, object files and flags are used when
3457251883Speter	  # linking a shared library.
3458251883Speter	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3459251883Speter
3460251883Speter	else
3461251883Speter	  # FIXME: insert proper C++ library support
3462251883Speter	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3463251883Speter	fi
3464251883Speter	;;
3465251883Speter    esac
3466251883Speter    ;;
3467251883Speter  osf4* | osf5*)
3468251883Speter    case $cc_basename in
3469251883Speter      KCC*)
3470251883Speter	# Kuck and Associates, Inc. (KAI) C++ Compiler
3471251883Speter
3472251883Speter	# KCC will only create a shared library if the output file
3473251883Speter	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3474251883Speter	# to its proper name (with version) after linking.
3475251883Speter	_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'
3476251883Speter
3477251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3478251883Speter	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3479251883Speter
3480251883Speter	# Archives containing C++ object files must be created using
3481251883Speter	# the KAI C++ compiler.
3482251883Speter	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3483251883Speter	;;
3484251883Speter      RCC*)
3485251883Speter	# Rational C++ 2.4.1
3486251883Speter	# FIXME: insert proper C++ library support
3487251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3488251883Speter	;;
3489251883Speter      cxx*)
3490251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3491251883Speter	_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'
3492251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3493251883Speter	  echo "-hidden">> $lib.exp~
3494251883Speter	  $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~
3495251883Speter	  $rm $lib.exp'
3496251883Speter
3497251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3498251883Speter	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3499251883Speter
3500251883Speter	# Commands to make compiler produce verbose output that lists
3501251883Speter	# what "hidden" libraries, object files and flags are used when
3502251883Speter	# linking a shared library.
3503251883Speter	#
3504251883Speter	# There doesn't appear to be a way to prevent this compiler from
3505251883Speter	# explicitly linking system object files so we need to strip them
3506251883Speter	# from the output so that they don't get included in the library
3507251883Speter	# dependencies.
3508251883Speter	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'
3509251883Speter	;;
3510251883Speter      *)
3511251883Speter	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3512251883Speter	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3513251883Speter	 _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'
3514251883Speter
3515251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3516251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3517251883Speter
3518251883Speter	  # Commands to make compiler produce verbose output that lists
3519251883Speter	  # what "hidden" libraries, object files and flags are used when
3520251883Speter	  # linking a shared library.
3521251883Speter	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3522251883Speter
3523251883Speter	else
3524251883Speter	  # FIXME: insert proper C++ library support
3525251883Speter	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3526251883Speter	fi
3527251883Speter	;;
3528251883Speter    esac
3529251883Speter    ;;
3530251883Speter  psos*)
3531251883Speter    # FIXME: insert proper C++ library support
3532251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3533251883Speter    ;;
3534251883Speter  sunos4*)
3535251883Speter    case $cc_basename in
3536251883Speter      CC*)
3537251883Speter	# Sun C++ 4.x
3538251883Speter	# FIXME: insert proper C++ library support
3539251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3540251883Speter	;;
3541251883Speter      lcc*)
3542251883Speter	# Lucid
3543251883Speter	# FIXME: insert proper C++ library support
3544251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3545251883Speter	;;
3546251883Speter      *)
3547251883Speter	# FIXME: insert proper C++ library support
3548251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3549251883Speter	;;
3550251883Speter    esac
3551251883Speter    ;;
3552251883Speter  solaris*)
3553251883Speter    case $cc_basename in
3554251883Speter      CC*)
3555251883Speter	# Sun C++ 4.2, 5.x and Centerline C++
3556251883Speter        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3557251883Speter	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3558251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3559251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3560251883Speter	$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'
3561251883Speter
3562251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3563251883Speter	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3564251883Speter	case $host_os in
3565251883Speter	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3566251883Speter	  *)
3567251883Speter	    # The C++ compiler is used as linker so we must use $wl
3568251883Speter	    # flag to pass the commands to the underlying system
3569251883Speter	    # linker. We must also pass each convience library through
3570251883Speter	    # to the system linker between allextract/defaultextract.
3571251883Speter	    # The C++ compiler will combine linker options so we
3572251883Speter	    # cannot just pass the convience library names through
3573251883Speter	    # without $wl.
3574251883Speter	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3575251883Speter	    _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'
3576251883Speter	    ;;
3577251883Speter	esac
3578251883Speter	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3579251883Speter
3580251883Speter	output_verbose_link_cmd='echo'
3581251883Speter
3582251883Speter	# Archives containing C++ object files must be created using
3583251883Speter	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3584251883Speter	# necessary to make sure instantiated templates are included
3585251883Speter	# in the archive.
3586251883Speter	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3587251883Speter	;;
3588251883Speter      gcx*)
3589251883Speter	# Green Hills C++ Compiler
3590251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3591251883Speter
3592251883Speter	# The C++ compiler must be used to create the archive.
3593251883Speter	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3594251883Speter	;;
3595251883Speter      *)
3596251883Speter	# GNU C++ compiler with Solaris linker
3597251883Speter	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3598251883Speter	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3599251883Speter	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3600251883Speter	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3601251883Speter	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3602251883Speter		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3603251883Speter
3604251883Speter	    # Commands to make compiler produce verbose output that lists
3605251883Speter	    # what "hidden" libraries, object files and flags are used when
3606251883Speter	    # linking a shared library.
3607251883Speter	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3608251883Speter	  else
3609251883Speter	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3610251883Speter	    # platform.
3611251883Speter	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3612251883Speter	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3613251883Speter		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3614251883Speter
3615251883Speter	    # Commands to make compiler produce verbose output that lists
3616251883Speter	    # what "hidden" libraries, object files and flags are used when
3617251883Speter	    # linking a shared library.
3618251883Speter	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3619251883Speter	  fi
3620251883Speter
3621251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3622251883Speter	fi
3623251883Speter	;;
3624251883Speter    esac
3625251883Speter    ;;
3626251883Speter  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3627251883Speter    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3628251883Speter    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3629251883Speter    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3630251883Speter    runpath_var='LD_RUN_PATH'
3631251883Speter
3632251883Speter    case $cc_basename in
3633251883Speter      CC*)
3634251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3635251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3636251883Speter	;;
3637251883Speter      *)
3638251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3639251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3640251883Speter	;;
3641251883Speter    esac
3642251883Speter    ;;
3643251883Speter  sysv5* | sco3.2v5* | sco5v6*)
3644251883Speter    # Note: We can NOT use -z defs as we might desire, because we do not
3645251883Speter    # link with -lc, and that would cause any symbols used from libc to
3646251883Speter    # always be unresolved, which means just about no library would
3647251883Speter    # ever link correctly.  If we're not using GNU ld we use -z text
3648251883Speter    # though, which does catch some bad symbols but isn't as heavy-handed
3649251883Speter    # as -z defs.
3650251883Speter    # For security reasons, it is highly recommended that you always
3651251883Speter    # use absolute paths for naming shared libraries, and exclude the
3652251883Speter    # DT_RUNPATH tag from executables and libraries.  But doing so
3653251883Speter    # requires that you compile everything twice, which is a pain.
3654251883Speter    # So that behaviour is only enabled if SCOABSPATH is set to a
3655251883Speter    # non-empty value in the environment.  Most likely only useful for
3656251883Speter    # creating official distributions of packages.
3657251883Speter    # This is a hack until libtool officially supports absolute path
3658251883Speter    # names for shared libraries.
3659251883Speter    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3660251883Speter    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3661251883Speter    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3662251883Speter    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3663251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3664251883Speter    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3665251883Speter    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3666251883Speter    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3667251883Speter    runpath_var='LD_RUN_PATH'
3668251883Speter
3669251883Speter    case $cc_basename in
3670251883Speter      CC*)
3671251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3672251883Speter	_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'
3673251883Speter	;;
3674251883Speter      *)
3675251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3676251883Speter	_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'
3677251883Speter	;;
3678251883Speter    esac
3679251883Speter    ;;
3680251883Speter  tandem*)
3681251883Speter    case $cc_basename in
3682251883Speter      NCC*)
3683251883Speter	# NonStop-UX NCC 3.20
3684251883Speter	# FIXME: insert proper C++ library support
3685251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3686251883Speter	;;
3687251883Speter      *)
3688251883Speter	# FIXME: insert proper C++ library support
3689251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3690251883Speter	;;
3691251883Speter    esac
3692251883Speter    ;;
3693251883Speter  vxworks*)
3694251883Speter    # FIXME: insert proper C++ library support
3695251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3696251883Speter    ;;
3697251883Speter  *)
3698251883Speter    # FIXME: insert proper C++ library support
3699251883Speter    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3700251883Speter    ;;
3701251883Speteresac
3702251883SpeterAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3703251883Spetertest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3704251883Speter
3705251883Speter_LT_AC_TAGVAR(GCC, $1)="$GXX"
3706251883Speter_LT_AC_TAGVAR(LD, $1)="$LD"
3707251883Speter
3708251883SpeterAC_LIBTOOL_POSTDEP_PREDEP($1)
3709251883SpeterAC_LIBTOOL_PROG_COMPILER_PIC($1)
3710251883SpeterAC_LIBTOOL_PROG_CC_C_O($1)
3711251883SpeterAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3712251883SpeterAC_LIBTOOL_PROG_LD_SHLIBS($1)
3713251883SpeterAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3714251883SpeterAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3715251883Speter
3716251883SpeterAC_LIBTOOL_CONFIG($1)
3717251883Speter
3718251883SpeterAC_LANG_POP
3719251883SpeterCC=$lt_save_CC
3720251883SpeterLDCXX=$LD
3721251883SpeterLD=$lt_save_LD
3722251883SpeterGCC=$lt_save_GCC
3723251883Speterwith_gnu_ldcxx=$with_gnu_ld
3724251883Speterwith_gnu_ld=$lt_save_with_gnu_ld
3725251883Speterlt_cv_path_LDCXX=$lt_cv_path_LD
3726251883Speterlt_cv_path_LD=$lt_save_path_LD
3727251883Speterlt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3728251883Speterlt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3729251883Speter])# AC_LIBTOOL_LANG_CXX_CONFIG
3730251883Speter
3731251883Speter# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3732251883Speter# ------------------------------------
3733251883Speter# Figure out "hidden" library dependencies from verbose
3734251883Speter# compiler output when linking a shared library.
3735251883Speter# Parse the compiler output and extract the necessary
3736251883Speter# objects, libraries and library flags.
3737251883SpeterAC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[
3738251883Speterdnl we can't use the lt_simple_compile_test_code here,
3739251883Speterdnl because it contains code intended for an executable,
3740251883Speterdnl not a library.  It's possible we should let each
3741251883Speterdnl tag define a new lt_????_link_test_code variable,
3742251883Speterdnl but it's only used here...
3743251883Speterifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3744251883Speterint a;
3745251883Spetervoid foo (void) { a = 0; }
3746251883SpeterEOF
3747251883Speter],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3748251883Speterclass Foo
3749251883Speter{
3750251883Speterpublic:
3751251883Speter  Foo (void) { a = 0; }
3752251883Speterprivate:
3753251883Speter  int a;
3754251883Speter};
3755251883SpeterEOF
3756251883Speter],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3757251883Speter      subroutine foo
3758251883Speter      implicit none
3759251883Speter      integer*4 a
3760251883Speter      a=0
3761251883Speter      return
3762251883Speter      end
3763251883SpeterEOF
3764251883Speter],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3765251883Speterpublic class foo {
3766251883Speter  private int a;
3767251883Speter  public void bar (void) {
3768251883Speter    a = 0;
3769251883Speter  }
3770251883Speter};
3771251883SpeterEOF
3772251883Speter])
3773251883Speterdnl Parse the compiler output and extract the necessary
3774251883Speterdnl objects, libraries and library flags.
3775251883Speterif AC_TRY_EVAL(ac_compile); then
3776251883Speter  # Parse the compiler output and extract the necessary
3777251883Speter  # objects, libraries and library flags.
3778251883Speter
3779251883Speter  # Sentinel used to keep track of whether or not we are before
3780251883Speter  # the conftest object file.
3781251883Speter  pre_test_object_deps_done=no
3782251883Speter
3783251883Speter  # The `*' in the case matches for architectures that use `case' in
3784251883Speter  # $output_verbose_cmd can trigger glob expansion during the loop
3785251883Speter  # eval without this substitution.
3786251883Speter  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3787251883Speter
3788251883Speter  for p in `eval $output_verbose_link_cmd`; do
3789251883Speter    case $p in
3790251883Speter
3791251883Speter    -L* | -R* | -l*)
3792251883Speter       # Some compilers place space between "-{L,R}" and the path.
3793251883Speter       # Remove the space.
3794251883Speter       if test $p = "-L" \
3795251883Speter	  || test $p = "-R"; then
3796251883Speter	 prev=$p
3797251883Speter	 continue
3798251883Speter       else
3799251883Speter	 prev=
3800251883Speter       fi
3801251883Speter
3802251883Speter       if test "$pre_test_object_deps_done" = no; then
3803251883Speter	 case $p in
3804251883Speter	 -L* | -R*)
3805251883Speter	   # Internal compiler library paths should come after those
3806251883Speter	   # provided the user.  The postdeps already come after the
3807251883Speter	   # user supplied libs so there is no need to process them.
3808251883Speter	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3809251883Speter	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3810251883Speter	   else
3811251883Speter	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3812251883Speter	   fi
3813251883Speter	   ;;
3814251883Speter	 # The "-l" case would never come before the object being
3815251883Speter	 # linked, so don't bother handling this case.
3816251883Speter	 esac
3817251883Speter       else
3818251883Speter	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3819251883Speter	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3820251883Speter	 else
3821251883Speter	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3822251883Speter	 fi
3823251883Speter       fi
3824251883Speter       ;;
3825251883Speter
3826251883Speter    *.$objext)
3827251883Speter       # This assumes that the test object file only shows up
3828251883Speter       # once in the compiler output.
3829251883Speter       if test "$p" = "conftest.$objext"; then
3830251883Speter	 pre_test_object_deps_done=yes
3831251883Speter	 continue
3832251883Speter       fi
3833251883Speter
3834251883Speter       if test "$pre_test_object_deps_done" = no; then
3835251883Speter	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3836251883Speter	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3837251883Speter	 else
3838251883Speter	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3839251883Speter	 fi
3840251883Speter       else
3841251883Speter	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3842251883Speter	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3843251883Speter	 else
3844251883Speter	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3845251883Speter	 fi
3846251883Speter       fi
3847251883Speter       ;;
3848251883Speter
3849251883Speter    *) ;; # Ignore the rest.
3850251883Speter
3851251883Speter    esac
3852251883Speter  done
3853251883Speter
3854251883Speter  # Clean up.
3855251883Speter  rm -f a.out a.exe
3856251883Speterelse
3857251883Speter  echo "libtool.m4: error: problem compiling $1 test program"
3858251883Speterfi
3859251883Speter
3860251883Speter$rm -f confest.$objext
3861251883Speter
3862251883Speter# PORTME: override above test on systems where it is broken
3863251883Speterifelse([$1],[CXX],
3864251883Speter[case $host_os in
3865251883Speterinterix3*)
3866251883Speter  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3867251883Speter  # hack all around it, let's just trust "g++" to DTRT.
3868251883Speter  _LT_AC_TAGVAR(predep_objects,$1)=
3869251883Speter  _LT_AC_TAGVAR(postdep_objects,$1)=
3870251883Speter  _LT_AC_TAGVAR(postdeps,$1)=
3871251883Speter  ;;
3872251883Speter
3873251883Spetersolaris*)
3874251883Speter  case $cc_basename in
3875251883Speter  CC*)
3876251883Speter    # Adding this requires a known-good setup of shared libraries for
3877251883Speter    # Sun compiler versions before 5.6, else PIC objects from an old
3878251883Speter    # archive will be linked into the output, leading to subtle bugs.
3879251883Speter    _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
3880251883Speter    ;;
3881251883Speter  esac
3882251883Speter  ;;
3883251883Speteresac
3884251883Speter])
3885251883Speter
3886251883Spetercase " $_LT_AC_TAGVAR(postdeps, $1) " in
3887251883Speter*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
3888251883Speteresac
3889251883Speter])# AC_LIBTOOL_POSTDEP_PREDEP
3890251883Speter
3891251883Speter# AC_LIBTOOL_LANG_F77_CONFIG
3892251883Speter# --------------------------
3893251883Speter# Ensure that the configuration vars for the C compiler are
3894251883Speter# suitably defined.  Those variables are subsequently used by
3895251883Speter# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3896251883SpeterAC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG], [_LT_AC_LANG_F77_CONFIG(F77)])
3897251883SpeterAC_DEFUN([_LT_AC_LANG_F77_CONFIG],
3898251883Speter[AC_REQUIRE([AC_PROG_F77])
3899251883SpeterAC_LANG_PUSH(Fortran 77)
3900251883Speter
3901251883Speter_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3902251883Speter_LT_AC_TAGVAR(allow_undefined_flag, $1)=
3903251883Speter_LT_AC_TAGVAR(always_export_symbols, $1)=no
3904251883Speter_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
3905251883Speter_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
3906251883Speter_LT_AC_TAGVAR(hardcode_direct, $1)=no
3907251883Speter_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
3908251883Speter_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
3909251883Speter_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3910251883Speter_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
3911251883Speter_LT_AC_TAGVAR(hardcode_automatic, $1)=no
3912251883Speter_LT_AC_TAGVAR(module_cmds, $1)=
3913251883Speter_LT_AC_TAGVAR(module_expsym_cmds, $1)=
3914251883Speter_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
3915251883Speter_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
3916251883Speter_LT_AC_TAGVAR(no_undefined_flag, $1)=
3917251883Speter_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
3918251883Speter_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
3919251883Speter
3920251883Speter# Source file extension for f77 test sources.
3921251883Speterac_ext=f
3922251883Speter
3923251883Speter# Object file extension for compiled f77 test sources.
3924251883Speterobjext=o
3925251883Speter_LT_AC_TAGVAR(objext, $1)=$objext
3926251883Speter
3927251883Speter# Code to be used in simple compile tests
3928251883Speterlt_simple_compile_test_code="      subroutine t\n      return\n      end\n"
3929251883Speter
3930251883Speter# Code to be used in simple link tests
3931251883Speterlt_simple_link_test_code="      program t\n      end\n"
3932251883Speter
3933251883Speter# ltmain only uses $CC for tagged configurations so make sure $CC is set.
3934251883Speter_LT_AC_SYS_COMPILER
3935251883Speter
3936251883Speter# save warnings/boilerplate of simple test code
3937251883Speter_LT_COMPILER_BOILERPLATE
3938251883Speter_LT_LINKER_BOILERPLATE
3939251883Speter
3940251883Speter# Allow CC to be a program name with arguments.
3941251883Speterlt_save_CC="$CC"
3942251883SpeterCC=${F77-"f77"}
3943251883Spetercompiler=$CC
3944251883Speter_LT_AC_TAGVAR(compiler, $1)=$CC
3945251883Speter_LT_CC_BASENAME([$compiler])
3946251883Speter
3947251883SpeterAC_MSG_CHECKING([if libtool supports shared libraries])
3948251883SpeterAC_MSG_RESULT([$can_build_shared])
3949251883Speter
3950251883SpeterAC_MSG_CHECKING([whether to build shared libraries])
3951251883Spetertest "$can_build_shared" = "no" && enable_shared=no
3952251883Speter
3953251883Speter# On AIX, shared libraries and static libraries use the same namespace, and
3954251883Speter# are all built from PIC.
3955251883Spetercase $host_os in
3956251883Speteraix3*)
3957251883Speter  test "$enable_shared" = yes && enable_static=no
3958251883Speter  if test -n "$RANLIB"; then
3959251883Speter    archive_cmds="$archive_cmds~\$RANLIB \$lib"
3960251883Speter    postinstall_cmds='$RANLIB $lib'
3961251883Speter  fi
3962251883Speter  ;;
3963251883Speteraix4* | aix5*)
3964251883Speter  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
3965251883Speter    test "$enable_shared" = yes && enable_static=no
3966251883Speter  fi
3967251883Speter  ;;
3968251883Speteresac
3969251883SpeterAC_MSG_RESULT([$enable_shared])
3970251883Speter
3971251883SpeterAC_MSG_CHECKING([whether to build static libraries])
3972251883Speter# Make sure either enable_shared or enable_static is yes.
3973251883Spetertest "$enable_shared" = yes || enable_static=yes
3974251883SpeterAC_MSG_RESULT([$enable_static])
3975251883Speter
3976251883Speter_LT_AC_TAGVAR(GCC, $1)="$G77"
3977251883Speter_LT_AC_TAGVAR(LD, $1)="$LD"
3978251883Speter
3979251883SpeterAC_LIBTOOL_PROG_COMPILER_PIC($1)
3980251883SpeterAC_LIBTOOL_PROG_CC_C_O($1)
3981251883SpeterAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3982251883SpeterAC_LIBTOOL_PROG_LD_SHLIBS($1)
3983251883SpeterAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3984251883SpeterAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3985251883Speter
3986251883SpeterAC_LIBTOOL_CONFIG($1)
3987251883Speter
3988251883SpeterAC_LANG_POP
3989251883SpeterCC="$lt_save_CC"
3990251883Speter])# AC_LIBTOOL_LANG_F77_CONFIG
3991251883Speter
3992251883Speter
3993251883Speter# AC_LIBTOOL_LANG_GCJ_CONFIG
3994251883Speter# --------------------------
3995251883Speter# Ensure that the configuration vars for the C compiler are
3996251883Speter# suitably defined.  Those variables are subsequently used by
3997251883Speter# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
3998251883SpeterAC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG], [_LT_AC_LANG_GCJ_CONFIG(GCJ)])
3999251883SpeterAC_DEFUN([_LT_AC_LANG_GCJ_CONFIG],
4000251883Speter[AC_LANG_SAVE
4001251883Speter
4002251883Speter# Source file extension for Java test sources.
4003251883Speterac_ext=java
4004251883Speter
4005251883Speter# Object file extension for compiled Java test sources.
4006251883Speterobjext=o
4007251883Speter_LT_AC_TAGVAR(objext, $1)=$objext
4008251883Speter
4009251883Speter# Code to be used in simple compile tests
4010251883Speterlt_simple_compile_test_code="class foo {}\n"
4011251883Speter
4012251883Speter# Code to be used in simple link tests
4013251883Speterlt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }\n'
4014251883Speter
4015251883Speter# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4016251883Speter_LT_AC_SYS_COMPILER
4017251883Speter
4018251883Speter# save warnings/boilerplate of simple test code
4019251883Speter_LT_COMPILER_BOILERPLATE
4020251883Speter_LT_LINKER_BOILERPLATE
4021251883Speter
4022251883Speter# Allow CC to be a program name with arguments.
4023251883Speterlt_save_CC="$CC"
4024251883SpeterCC=${GCJ-"gcj"}
4025251883Spetercompiler=$CC
4026251883Speter_LT_AC_TAGVAR(compiler, $1)=$CC
4027251883Speter_LT_CC_BASENAME([$compiler])
4028251883Speter
4029251883Speter# GCJ did not exist at the time GCC didn't implicitly link libc in.
4030251883Speter_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
4031251883Speter
4032251883Speter_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
4033251883Speter
4034251883SpeterAC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
4035251883SpeterAC_LIBTOOL_PROG_COMPILER_PIC($1)
4036251883SpeterAC_LIBTOOL_PROG_CC_C_O($1)
4037251883SpeterAC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
4038251883SpeterAC_LIBTOOL_PROG_LD_SHLIBS($1)
4039251883SpeterAC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
4040251883SpeterAC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
4041251883Speter
4042251883SpeterAC_LIBTOOL_CONFIG($1)
4043251883Speter
4044251883SpeterAC_LANG_RESTORE
4045251883SpeterCC="$lt_save_CC"
4046251883Speter])# AC_LIBTOOL_LANG_GCJ_CONFIG
4047251883Speter
4048251883Speter
4049251883Speter# AC_LIBTOOL_LANG_RC_CONFIG
4050251883Speter# -------------------------
4051251883Speter# Ensure that the configuration vars for the Windows resource compiler are
4052251883Speter# suitably defined.  Those variables are subsequently used by
4053251883Speter# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
4054251883SpeterAC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG], [_LT_AC_LANG_RC_CONFIG(RC)])
4055251883SpeterAC_DEFUN([_LT_AC_LANG_RC_CONFIG],
4056251883Speter[AC_LANG_SAVE
4057251883Speter
4058251883Speter# Source file extension for RC test sources.
4059251883Speterac_ext=rc
4060251883Speter
4061251883Speter# Object file extension for compiled RC test sources.
4062251883Speterobjext=o
4063251883Speter_LT_AC_TAGVAR(objext, $1)=$objext
4064251883Speter
4065251883Speter# Code to be used in simple compile tests
4066251883Speterlt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n'
4067251883Speter
4068251883Speter# Code to be used in simple link tests
4069251883Speterlt_simple_link_test_code="$lt_simple_compile_test_code"
4070251883Speter
4071251883Speter# ltmain only uses $CC for tagged configurations so make sure $CC is set.
4072251883Speter_LT_AC_SYS_COMPILER
4073251883Speter
4074251883Speter# save warnings/boilerplate of simple test code
4075251883Speter_LT_COMPILER_BOILERPLATE
4076251883Speter_LT_LINKER_BOILERPLATE
4077251883Speter
4078251883Speter# Allow CC to be a program name with arguments.
4079251883Speterlt_save_CC="$CC"
4080251883SpeterCC=${RC-"windres"}
4081251883Spetercompiler=$CC
4082251883Speter_LT_AC_TAGVAR(compiler, $1)=$CC
4083251883Speter_LT_CC_BASENAME([$compiler])
4084251883Speter_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
4085251883Speter
4086251883SpeterAC_LIBTOOL_CONFIG($1)
4087251883Speter
4088251883SpeterAC_LANG_RESTORE
4089251883SpeterCC="$lt_save_CC"
4090251883Speter])# AC_LIBTOOL_LANG_RC_CONFIG
4091251883Speter
4092251883Speter
4093251883Speter# AC_LIBTOOL_CONFIG([TAGNAME])
4094251883Speter# ----------------------------
4095251883Speter# If TAGNAME is not passed, then create an initial libtool script
4096251883Speter# with a default configuration from the untagged config vars.  Otherwise
4097251883Speter# add code to config.status for appending the configuration named by
4098251883Speter# TAGNAME from the matching tagged config vars.
4099251883SpeterAC_DEFUN([AC_LIBTOOL_CONFIG],
4100251883Speter[# The else clause should only fire when bootstrapping the
4101251883Speter# libtool distribution, otherwise you forgot to ship ltmain.sh
4102251883Speter# with your package, and you will get complaints that there are
4103251883Speter# no rules to generate ltmain.sh.
4104251883Speterif test -f "$ltmain"; then
4105251883Speter  # See if we are running on zsh, and set the options which allow our commands through
4106251883Speter  # without removal of \ escapes.
4107251883Speter  if test -n "${ZSH_VERSION+set}" ; then
4108251883Speter    setopt NO_GLOB_SUBST
4109251883Speter  fi
4110251883Speter  # Now quote all the things that may contain metacharacters while being
4111251883Speter  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4112251883Speter  # variables and quote the copies for generation of the libtool script.
4113251883Speter  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4114251883Speter    SED SHELL STRIP \
4115251883Speter    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4116251883Speter    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4117251883Speter    deplibs_check_method reload_flag reload_cmds need_locks \
4118251883Speter    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4119251883Speter    lt_cv_sys_global_symbol_to_c_name_address \
4120251883Speter    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4121251883Speter    old_postinstall_cmds old_postuninstall_cmds \
4122251883Speter    _LT_AC_TAGVAR(compiler, $1) \
4123251883Speter    _LT_AC_TAGVAR(CC, $1) \
4124251883Speter    _LT_AC_TAGVAR(LD, $1) \
4125251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4126251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4127251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4128251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4129251883Speter    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4130251883Speter    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4131251883Speter    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4132251883Speter    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4133251883Speter    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4134251883Speter    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4135251883Speter    _LT_AC_TAGVAR(predep_objects, $1) \
4136251883Speter    _LT_AC_TAGVAR(postdep_objects, $1) \
4137251883Speter    _LT_AC_TAGVAR(predeps, $1) \
4138251883Speter    _LT_AC_TAGVAR(postdeps, $1) \
4139251883Speter    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4140251883Speter    _LT_AC_TAGVAR(archive_cmds, $1) \
4141251883Speter    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4142251883Speter    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4143251883Speter    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4144251883Speter    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4145251883Speter    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4146251883Speter    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4147251883Speter    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4148251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4149251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4150251883Speter    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4151251883Speter    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4152251883Speter    _LT_AC_TAGVAR(module_cmds, $1) \
4153251883Speter    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4154251883Speter    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4155251883Speter    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4156251883Speter    _LT_AC_TAGVAR(include_expsyms, $1); do
4157251883Speter
4158251883Speter    case $var in
4159251883Speter    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4160251883Speter    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4161251883Speter    _LT_AC_TAGVAR(archive_cmds, $1) | \
4162251883Speter    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4163251883Speter    _LT_AC_TAGVAR(module_cmds, $1) | \
4164251883Speter    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4165251883Speter    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4166251883Speter    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4167251883Speter    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4168251883Speter    postinstall_cmds | postuninstall_cmds | \
4169251883Speter    old_postinstall_cmds | old_postuninstall_cmds | \
4170251883Speter    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4171251883Speter      # Double-quote double-evaled strings.
4172251883Speter      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4173251883Speter      ;;
4174251883Speter    *)
4175251883Speter      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4176251883Speter      ;;
4177251883Speter    esac
4178251883Speter  done
4179251883Speter
4180251883Speter  case $lt_echo in
4181251883Speter  *'\[$]0 --fallback-echo"')
4182251883Speter    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4183251883Speter    ;;
4184251883Speter  esac
4185251883Speter
4186251883Speterifelse([$1], [],
4187251883Speter  [cfgfile="${ofile}T"
4188251883Speter  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4189251883Speter  $rm -f "$cfgfile"
4190251883Speter  AC_MSG_NOTICE([creating $ofile])],
4191251883Speter  [cfgfile="$ofile"])
4192251883Speter
4193251883Speter  cat <<__EOF__ >> "$cfgfile"
4194251883Speterifelse([$1], [],
4195251883Speter[#! $SHELL
4196251883Speter
4197251883Speter# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4198251883Speter# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4199251883Speter# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4200251883Speter#
4201251883Speter# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
4202251883Speter# Free Software Foundation, Inc.
4203251883Speter#
4204251883Speter# This file is part of GNU Libtool:
4205251883Speter# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4206251883Speter#
4207251883Speter# This program is free software; you can redistribute it and/or modify
4208251883Speter# it under the terms of the GNU General Public License as published by
4209251883Speter# the Free Software Foundation; either version 2 of the License, or
4210251883Speter# (at your option) any later version.
4211251883Speter#
4212251883Speter# This program is distributed in the hope that it will be useful, but
4213251883Speter# WITHOUT ANY WARRANTY; without even the implied warranty of
4214251883Speter# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4215251883Speter# General Public License for more details.
4216251883Speter#
4217251883Speter# You should have received a copy of the GNU General Public License
4218251883Speter# along with this program; if not, write to the Free Software
4219251883Speter# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4220251883Speter#
4221251883Speter# As a special exception to the GNU General Public License, if you
4222251883Speter# distribute this file as part of a program that contains a
4223251883Speter# configuration script generated by Autoconf, you may include it under
4224251883Speter# the same distribution terms that you use for the rest of that program.
4225251883Speter
4226251883Speter# A sed program that does not truncate output.
4227251883SpeterSED=$lt_SED
4228251883Speter
4229251883Speter# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4230251883SpeterXsed="$SED -e 1s/^X//"
4231251883Speter
4232251883Speter# The HP-UX ksh and POSIX shell print the target directory to stdout
4233251883Speter# if CDPATH is set.
4234251883Speter(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4235251883Speter
4236251883Speter# The names of the tagged configurations supported by this script.
4237251883Speteravailable_tags=
4238251883Speter
4239251883Speter# ### BEGIN LIBTOOL CONFIG],
4240251883Speter[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4241251883Speter
4242251883Speter# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4243251883Speter
4244251883Speter# Shell to use when invoking shell scripts.
4245251883SpeterSHELL=$lt_SHELL
4246251883Speter
4247251883Speter# Whether or not to build shared libraries.
4248251883Speterbuild_libtool_libs=$enable_shared
4249251883Speter
4250251883Speter# Whether or not to build static libraries.
4251251883Speterbuild_old_libs=$enable_static
4252251883Speter
4253251883Speter# Whether or not to add -lc for building shared libraries.
4254251883Speterbuild_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4255251883Speter
4256251883Speter# Whether or not to disallow shared libs when runtime libs are static
4257251883Speterallow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4258251883Speter
4259251883Speter# Whether or not to optimize for fast installation.
4260251883Speterfast_install=$enable_fast_install
4261251883Speter
4262251883Speter# The host system.
4263251883Speterhost_alias=$host_alias
4264251883Speterhost=$host
4265251883Speterhost_os=$host_os
4266251883Speter
4267251883Speter# The build system.
4268251883Speterbuild_alias=$build_alias
4269251883Speterbuild=$build
4270251883Speterbuild_os=$build_os
4271251883Speter
4272251883Speter# An echo program that does not interpret backslashes.
4273251883Speterecho=$lt_echo
4274251883Speter
4275251883Speter# The archiver.
4276251883SpeterAR=$lt_AR
4277251883SpeterAR_FLAGS=$lt_AR_FLAGS
4278251883Speter
4279251883Speter# A C compiler.
4280251883SpeterLTCC=$lt_LTCC
4281251883Speter
4282251883Speter# LTCC compiler flags.
4283251883SpeterLTCFLAGS=$lt_LTCFLAGS
4284251883Speter
4285251883Speter# A language-specific compiler.
4286251883SpeterCC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4287251883Speter
4288251883Speter# Is the compiler the GNU C compiler?
4289251883Speterwith_gcc=$_LT_AC_TAGVAR(GCC, $1)
4290251883Speter
4291251883Speter# An ERE matcher.
4292251883SpeterEGREP=$lt_EGREP
4293251883Speter
4294251883Speter# The linker used to build libraries.
4295251883SpeterLD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4296251883Speter
4297251883Speter# Whether we need hard or soft links.
4298251883SpeterLN_S=$lt_LN_S
4299251883Speter
4300251883Speter# A BSD-compatible nm program.
4301251883SpeterNM=$lt_NM
4302251883Speter
4303251883Speter# A symbol stripping program
4304251883SpeterSTRIP=$lt_STRIP
4305251883Speter
4306251883Speter# Used to examine libraries when file_magic_cmd begins "file"
4307251883SpeterMAGIC_CMD=$MAGIC_CMD
4308251883Speter
4309251883Speter# Used on cygwin: DLL creation program.
4310251883SpeterDLLTOOL="$DLLTOOL"
4311251883Speter
4312251883Speter# Used on cygwin: object dumper.
4313251883SpeterOBJDUMP="$OBJDUMP"
4314251883Speter
4315251883Speter# Used on cygwin: assembler.
4316251883SpeterAS="$AS"
4317251883Speter
4318251883Speter# The name of the directory that contains temporary libtool files.
4319251883Speterobjdir=$objdir
4320251883Speter
4321251883Speter# How to create reloadable object files.
4322251883Speterreload_flag=$lt_reload_flag
4323251883Speterreload_cmds=$lt_reload_cmds
4324251883Speter
4325251883Speter# How to pass a linker flag through the compiler.
4326251883Speterwl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4327251883Speter
4328251883Speter# Object file suffix (normally "o").
4329251883Speterobjext="$ac_objext"
4330251883Speter
4331251883Speter# Old archive suffix (normally "a").
4332251883Speterlibext="$libext"
4333251883Speter
4334251883Speter# Shared library suffix (normally ".so").
4335251883Spetershrext_cmds='$shrext_cmds'
4336251883Speter
4337251883Speter# Executable file suffix (normally "").
4338251883Speterexeext="$exeext"
4339251883Speter
4340251883Speter# Additional compiler flags for building library objects.
4341251883Speterpic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4342251883Speterpic_mode=$pic_mode
4343251883Speter
4344251883Speter# What is the maximum length of a command?
4345251883Spetermax_cmd_len=$lt_cv_sys_max_cmd_len
4346251883Speter
4347251883Speter# Does compiler simultaneously support -c and -o options?
4348251883Spetercompiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4349251883Speter
4350251883Speter# Must we lock files when doing compilation?
4351251883Speterneed_locks=$lt_need_locks
4352251883Speter
4353251883Speter# Do we need the lib prefix for modules?
4354251883Speterneed_lib_prefix=$need_lib_prefix
4355251883Speter
4356251883Speter# Do we need a version for libraries?
4357251883Speterneed_version=$need_version
4358251883Speter
4359251883Speter# Whether dlopen is supported.
4360251883Speterdlopen_support=$enable_dlopen
4361251883Speter
4362251883Speter# Whether dlopen of programs is supported.
4363251883Speterdlopen_self=$enable_dlopen_self
4364251883Speter
4365251883Speter# Whether dlopen of statically linked programs is supported.
4366251883Speterdlopen_self_static=$enable_dlopen_self_static
4367251883Speter
4368251883Speter# Compiler flag to prevent dynamic linking.
4369251883Speterlink_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4370251883Speter
4371251883Speter# Compiler flag to turn off builtin functions.
4372251883Speterno_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4373251883Speter
4374251883Speter# Compiler flag to allow reflexive dlopens.
4375251883Speterexport_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4376251883Speter
4377251883Speter# Compiler flag to generate shared objects directly from archives.
4378251883Speterwhole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4379251883Speter
4380251883Speter# Compiler flag to generate thread-safe objects.
4381251883Speterthread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4382251883Speter
4383251883Speter# Library versioning type.
4384251883Speterversion_type=$version_type
4385251883Speter
4386251883Speter# Format of library name prefix.
4387251883Speterlibname_spec=$lt_libname_spec
4388251883Speter
4389251883Speter# List of archive names.  First name is the real one, the rest are links.
4390251883Speter# The last name is the one that the linker finds with -lNAME.
4391251883Speterlibrary_names_spec=$lt_library_names_spec
4392251883Speter
4393251883Speter# The coded name of the library, if different from the real name.
4394251883Spetersoname_spec=$lt_soname_spec
4395251883Speter
4396251883Speter# Commands used to build and install an old-style archive.
4397251883SpeterRANLIB=$lt_RANLIB
4398251883Speterold_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4399251883Speterold_postinstall_cmds=$lt_old_postinstall_cmds
4400251883Speterold_postuninstall_cmds=$lt_old_postuninstall_cmds
4401251883Speter
4402251883Speter# Create an old-style archive from a shared archive.
4403251883Speterold_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4404251883Speter
4405251883Speter# Create a temporary old-style archive to link instead of a shared archive.
4406251883Speterold_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4407251883Speter
4408251883Speter# Commands used to build and install a shared archive.
4409251883Speterarchive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4410251883Speterarchive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4411251883Speterpostinstall_cmds=$lt_postinstall_cmds
4412251883Speterpostuninstall_cmds=$lt_postuninstall_cmds
4413251883Speter
4414251883Speter# Commands used to build a loadable module (assumed same as above if empty)
4415251883Spetermodule_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4416251883Spetermodule_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4417251883Speter
4418251883Speter# Commands to strip libraries.
4419251883Speterold_striplib=$lt_old_striplib
4420251883Speterstriplib=$lt_striplib
4421251883Speter
4422251883Speter# Dependencies to place before the objects being linked to create a
4423251883Speter# shared library.
4424251883Speterpredep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4425251883Speter
4426251883Speter# Dependencies to place after the objects being linked to create a
4427251883Speter# shared library.
4428251883Speterpostdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4429251883Speter
4430251883Speter# Dependencies to place before the objects being linked to create a
4431251883Speter# shared library.
4432251883Speterpredeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4433251883Speter
4434251883Speter# Dependencies to place after the objects being linked to create a
4435251883Speter# shared library.
4436251883Speterpostdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4437251883Speter
4438251883Speter# The library search path used internally by the compiler when linking
4439251883Speter# a shared library.
4440251883Spetercompiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4441251883Speter
4442251883Speter# Method to check whether dependent libraries are shared objects.
4443251883Speterdeplibs_check_method=$lt_deplibs_check_method
4444251883Speter
4445251883Speter# Command to use when deplibs_check_method == file_magic.
4446251883Speterfile_magic_cmd=$lt_file_magic_cmd
4447251883Speter
4448251883Speter# Flag that allows shared libraries with undefined symbols to be built.
4449251883Speterallow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4450251883Speter
4451251883Speter# Flag that forces no undefined symbols.
4452251883Speterno_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4453251883Speter
4454251883Speter# Commands used to finish a libtool library installation in a directory.
4455251883Speterfinish_cmds=$lt_finish_cmds
4456251883Speter
4457251883Speter# Same as above, but a single script fragment to be evaled but not shown.
4458251883Speterfinish_eval=$lt_finish_eval
4459251883Speter
4460251883Speter# Take the output of nm and produce a listing of raw symbols and C names.
4461251883Speterglobal_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4462251883Speter
4463251883Speter# Transform the output of nm in a proper C declaration
4464251883Speterglobal_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4465251883Speter
4466251883Speter# Transform the output of nm in a C name address pair
4467251883Speterglobal_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4468251883Speter
4469251883Speter# This is the shared library runtime path variable.
4470251883Speterrunpath_var=$runpath_var
4471251883Speter
4472251883Speter# This is the shared library path variable.
4473251883Spetershlibpath_var=$shlibpath_var
4474251883Speter
4475251883Speter# Is shlibpath searched before the hard-coded library search path?
4476251883Spetershlibpath_overrides_runpath=$shlibpath_overrides_runpath
4477251883Speter
4478251883Speter# How to hardcode a shared library path into an executable.
4479251883Speterhardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4480251883Speter
4481251883Speter# Whether we should hardcode library paths into libraries.
4482251883Speterhardcode_into_libs=$hardcode_into_libs
4483251883Speter
4484251883Speter# Flag to hardcode \$libdir into a binary during linking.
4485251883Speter# This must work even if \$libdir does not exist.
4486251883Speterhardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4487251883Speter
4488251883Speter# If ld is used when linking, flag to hardcode \$libdir into
4489251883Speter# a binary during linking. This must work even if \$libdir does
4490251883Speter# not exist.
4491251883Speterhardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4492251883Speter
4493251883Speter# Whether we need a single -rpath flag with a separated argument.
4494251883Speterhardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4495251883Speter
4496251883Speter# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4497251883Speter# resulting binary.
4498251883Speterhardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4499251883Speter
4500251883Speter# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4501251883Speter# resulting binary.
4502251883Speterhardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4503251883Speter
4504251883Speter# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4505251883Speter# the resulting binary.
4506251883Speterhardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4507251883Speter
4508251883Speter# Set to yes if building a shared library automatically hardcodes DIR into the library
4509251883Speter# and all subsequent libraries and executables linked against it.
4510251883Speterhardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4511251883Speter
4512251883Speter# Variables whose values should be saved in libtool wrapper scripts and
4513251883Speter# restored at relink time.
4514251883Spetervariables_saved_for_relink="$variables_saved_for_relink"
4515251883Speter
4516251883Speter# Whether libtool must link a program against all its dependency libraries.
4517251883Speterlink_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4518251883Speter
4519251883Speter# Compile-time system search path for libraries
4520251883Spetersys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4521251883Speter
4522251883Speter# Run-time system search path for libraries
4523251883Spetersys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4524251883Speter
4525251883Speter# Fix the shell variable \$srcfile for the compiler.
4526251883Speterfix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)"
4527251883Speter
4528251883Speter# Set to yes if exported symbols are required.
4529251883Speteralways_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4530251883Speter
4531251883Speter# The commands to list exported symbols.
4532251883Speterexport_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4533251883Speter
4534251883Speter# The commands to extract the exported symbol list from a shared archive.
4535251883Speterextract_expsyms_cmds=$lt_extract_expsyms_cmds
4536251883Speter
4537251883Speter# Symbols that should not be listed in the preloaded symbols.
4538251883Speterexclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4539251883Speter
4540251883Speter# Symbols that must always be exported.
4541251883Speterinclude_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4542251883Speter
4543251883Speterifelse([$1],[],
4544251883Speter[# ### END LIBTOOL CONFIG],
4545251883Speter[# ### END LIBTOOL TAG CONFIG: $tagname])
4546251883Speter
4547251883Speter__EOF__
4548251883Speter
4549251883Speterifelse([$1],[], [
4550251883Speter  case $host_os in
4551251883Speter  aix3*)
4552251883Speter    cat <<\EOF >> "$cfgfile"
4553251883Speter
4554251883Speter# AIX sometimes has problems with the GCC collect2 program.  For some
4555251883Speter# reason, if we set the COLLECT_NAMES environment variable, the problems
4556251883Speter# vanish in a puff of smoke.
4557251883Speterif test "X${COLLECT_NAMES+set}" != Xset; then
4558251883Speter  COLLECT_NAMES=
4559251883Speter  export COLLECT_NAMES
4560251883Speterfi
4561251883SpeterEOF
4562251883Speter    ;;
4563251883Speter  esac
4564251883Speter
4565251883Speter  # We use sed instead of cat because bash on DJGPP gets confused if
4566251883Speter  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4567251883Speter  # text mode, it properly converts lines to CR/LF.  This bash problem
4568251883Speter  # is reportedly fixed, but why not run on old versions too?
4569251883Speter  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4570251883Speter
4571251883Speter  mv -f "$cfgfile" "$ofile" || \
4572251883Speter    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4573251883Speter  chmod +x "$ofile"
4574251883Speter])
4575251883Speterelse
4576251883Speter  # If there is no Makefile yet, we rely on a make rule to execute
4577251883Speter  # `config.status --recheck' to rerun these tests and create the
4578251883Speter  # libtool script then.
4579251883Speter  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4580251883Speter  if test -f "$ltmain_in"; then
4581251883Speter    test -f Makefile && make "$ltmain"
4582251883Speter  fi
4583251883Speterfi
4584251883Speter])# AC_LIBTOOL_CONFIG
4585251883Speter
4586251883Speter
4587251883Speter# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4588251883Speter# -------------------------------------------
4589251883SpeterAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4590251883Speter[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4591251883Speter
4592251883Speter_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4593251883Speter
4594251883Speterif test "$GCC" = yes; then
4595251883Speter  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4596251883Speter
4597251883Speter  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4598251883Speter    lt_cv_prog_compiler_rtti_exceptions,
4599251883Speter    [-fno-rtti -fno-exceptions], [],
4600251883Speter    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4601251883Speterfi
4602251883Speter])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4603251883Speter
4604251883Speter
4605251883Speter# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4606251883Speter# ---------------------------------
4607251883SpeterAC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4608251883Speter[AC_REQUIRE([AC_CANONICAL_HOST])
4609251883SpeterAC_REQUIRE([AC_PROG_NM])
4610251883SpeterAC_REQUIRE([AC_OBJEXT])
4611251883Speter# Check for command to grab the raw symbol name followed by C symbol from nm.
4612251883SpeterAC_MSG_CHECKING([command to parse $NM output from $compiler object])
4613251883SpeterAC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4614251883Speter[
4615251883Speter# These are sane defaults that work on at least a few old systems.
4616251883Speter# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4617251883Speter
4618251883Speter# Character class describing NM global symbol codes.
4619251883Spetersymcode='[[BCDEGRST]]'
4620251883Speter
4621251883Speter# Regexp to match symbols that can be accessed directly from C.
4622251883Spetersympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4623251883Speter
4624251883Speter# Transform an extracted symbol line into a proper C declaration
4625251883Speterlt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4626251883Speter
4627251883Speter# Transform an extracted symbol line into symbol name and symbol address
4628251883Speterlt_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'"
4629251883Speter
4630251883Speter# Define system-specific variables.
4631251883Spetercase $host_os in
4632251883Speteraix*)
4633251883Speter  symcode='[[BCDT]]'
4634251883Speter  ;;
4635251883Spetercygwin* | mingw* | pw32*)
4636251883Speter  symcode='[[ABCDGISTW]]'
4637251883Speter  ;;
4638251883Speterhpux*) # Its linker distinguishes data from code symbols
4639251883Speter  if test "$host_cpu" = ia64; then
4640251883Speter    symcode='[[ABCDEGRST]]'
4641251883Speter  fi
4642251883Speter  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4643251883Speter  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'"
4644251883Speter  ;;
4645251883Speterlinux*)
4646251883Speter  if test "$host_cpu" = ia64; then
4647251883Speter    symcode='[[ABCDGIRSTW]]'
4648251883Speter    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4649251883Speter    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'"
4650251883Speter  fi
4651251883Speter  ;;
4652251883Speteririx* | nonstopux*)
4653251883Speter  symcode='[[BCDEGRST]]'
4654251883Speter  ;;
4655251883Speterosf*)
4656251883Speter  symcode='[[BCDEGQRST]]'
4657251883Speter  ;;
4658251883Spetersolaris*)
4659251883Speter  symcode='[[BDRT]]'
4660251883Speter  ;;
4661251883Spetersco3.2v5*)
4662251883Speter  symcode='[[DT]]'
4663251883Speter  ;;
4664251883Spetersysv4.2uw2*)
4665251883Speter  symcode='[[DT]]'
4666251883Speter  ;;
4667251883Spetersysv5* | sco5v6* | unixware* | OpenUNIX*)
4668251883Speter  symcode='[[ABDT]]'
4669251883Speter  ;;
4670251883Spetersysv4)
4671251883Speter  symcode='[[DFNSTU]]'
4672251883Speter  ;;
4673251883Speteresac
4674251883Speter
4675251883Speter# Handle CRLF in mingw tool chain
4676251883Speteropt_cr=
4677251883Spetercase $build_os in
4678251883Spetermingw*)
4679251883Speter  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4680251883Speter  ;;
4681251883Speteresac
4682251883Speter
4683251883Speter# If we're using GNU nm, then use its standard symbol codes.
4684251883Spetercase `$NM -V 2>&1` in
4685251883Speter*GNU* | *'with BFD'*)
4686251883Speter  symcode='[[ABCDGIRSTW]]' ;;
4687251883Speteresac
4688251883Speter
4689251883Speter# Try without a prefix undercore, then with it.
4690251883Speterfor ac_symprfx in "" "_"; do
4691251883Speter
4692251883Speter  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4693251883Speter  symxfrm="\\1 $ac_symprfx\\2 \\2"
4694251883Speter
4695251883Speter  # Write the raw and C identifiers.
4696251883Speter  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4697251883Speter
4698251883Speter  # Check to see that the pipe works correctly.
4699251883Speter  pipe_works=no
4700251883Speter
4701251883Speter  rm -f conftest*
4702251883Speter  cat > conftest.$ac_ext <<EOF
4703251883Speter#ifdef __cplusplus
4704251883Speterextern "C" {
4705251883Speter#endif
4706251883Speterchar nm_test_var;
4707251883Spetervoid nm_test_func(){}
4708251883Speter#ifdef __cplusplus
4709251883Speter}
4710251883Speter#endif
4711251883Speterint main(){nm_test_var='a';nm_test_func();return(0);}
4712251883SpeterEOF
4713251883Speter
4714251883Speter  if AC_TRY_EVAL(ac_compile); then
4715251883Speter    # Now try to grab the symbols.
4716251883Speter    nlist=conftest.nm
4717251883Speter    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4718251883Speter      # Try sorting and uniquifying the output.
4719251883Speter      if sort "$nlist" | uniq > "$nlist"T; then
4720251883Speter	mv -f "$nlist"T "$nlist"
4721251883Speter      else
4722251883Speter	rm -f "$nlist"T
4723251883Speter      fi
4724251883Speter
4725251883Speter      # Make sure that we snagged all the symbols we need.
4726251883Speter      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4727251883Speter	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4728251883Speter	  cat <<EOF > conftest.$ac_ext
4729251883Speter#ifdef __cplusplus
4730251883Speterextern "C" {
4731251883Speter#endif
4732251883Speter
4733251883SpeterEOF
4734251883Speter	  # Now generate the symbol file.
4735251883Speter	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4736251883Speter
4737251883Speter	  cat <<EOF >> conftest.$ac_ext
4738251883Speter#if defined (__STDC__) && __STDC__
4739251883Speter# define lt_ptr_t void *
4740251883Speter#else
4741251883Speter# define lt_ptr_t char *
4742251883Speter# define const
4743251883Speter#endif
4744251883Speter
4745251883Speter/* The mapping between symbol names and symbols. */
4746251883Speterconst struct {
4747251883Speter  const char *name;
4748251883Speter  lt_ptr_t address;
4749251883Speter}
4750251883Speterlt_preloaded_symbols[[]] =
4751251883Speter{
4752251883SpeterEOF
4753251883Speter	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4754251883Speter	  cat <<\EOF >> conftest.$ac_ext
4755251883Speter  {0, (lt_ptr_t) 0}
4756251883Speter};
4757251883Speter
4758251883Speter#ifdef __cplusplus
4759251883Speter}
4760251883Speter#endif
4761251883SpeterEOF
4762251883Speter	  # Now try linking the two files.
4763251883Speter	  mv conftest.$ac_objext conftstm.$ac_objext
4764251883Speter	  lt_save_LIBS="$LIBS"
4765251883Speter	  lt_save_CFLAGS="$CFLAGS"
4766251883Speter	  LIBS="conftstm.$ac_objext"
4767251883Speter	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4768251883Speter	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4769251883Speter	    pipe_works=yes
4770251883Speter	  fi
4771251883Speter	  LIBS="$lt_save_LIBS"
4772251883Speter	  CFLAGS="$lt_save_CFLAGS"
4773251883Speter	else
4774251883Speter	  echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
4775251883Speter	fi
4776251883Speter      else
4777251883Speter	echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
4778251883Speter      fi
4779251883Speter    else
4780251883Speter      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
4781251883Speter    fi
4782251883Speter  else
4783251883Speter    echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
4784251883Speter    cat conftest.$ac_ext >&5
4785251883Speter  fi
4786251883Speter  rm -f conftest* conftst*
4787251883Speter
4788251883Speter  # Do not use the global_symbol_pipe unless it works.
4789251883Speter  if test "$pipe_works" = yes; then
4790251883Speter    break
4791251883Speter  else
4792251883Speter    lt_cv_sys_global_symbol_pipe=
4793251883Speter  fi
4794251883Speterdone
4795251883Speter])
4796251883Speterif test -z "$lt_cv_sys_global_symbol_pipe"; then
4797251883Speter  lt_cv_sys_global_symbol_to_cdecl=
4798251883Speterfi
4799251883Speterif test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4800251883Speter  AC_MSG_RESULT(failed)
4801251883Speterelse
4802251883Speter  AC_MSG_RESULT(ok)
4803251883Speterfi
4804251883Speter]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4805251883Speter
4806251883Speter
4807251883Speter# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4808251883Speter# ---------------------------------------
4809251883SpeterAC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4810251883Speter[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4811251883Speter_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4812251883Speter_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4813251883Speter
4814251883SpeterAC_MSG_CHECKING([for $compiler option to produce PIC])
4815251883Speter ifelse([$1],[CXX],[
4816251883Speter  # C++ specific cases for pic, static, wl, etc.
4817251883Speter  if test "$GXX" = yes; then
4818251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4819251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4820251883Speter
4821251883Speter    case $host_os in
4822251883Speter    aix*)
4823251883Speter      # All AIX code is PIC.
4824251883Speter      if test "$host_cpu" = ia64; then
4825251883Speter	# AIX 5 now supports IA64 processor
4826251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4827251883Speter      fi
4828251883Speter      ;;
4829251883Speter    amigaos*)
4830251883Speter      # FIXME: we need at least 68020 code to build shared libraries, but
4831251883Speter      # adding the `-m68020' flag to GCC prevents building anything better,
4832251883Speter      # like `-m68040'.
4833251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4834251883Speter      ;;
4835251883Speter    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4836251883Speter      # PIC is the default for these OSes.
4837251883Speter      ;;
4838251883Speter    mingw* | os2* | pw32*)
4839251883Speter      # This hack is so that the source file can tell whether it is being
4840251883Speter      # built for inclusion in a dll (and should export symbols for example).
4841251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4842251883Speter      ;;
4843251883Speter    darwin* | rhapsody*)
4844251883Speter      # PIC is the default on this platform
4845251883Speter      # Common symbols not allowed in MH_DYLIB files
4846251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4847251883Speter      ;;
4848251883Speter    *djgpp*)
4849251883Speter      # DJGPP does not support shared libraries at all
4850251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4851251883Speter      ;;
4852251883Speter    interix3*)
4853251883Speter      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4854251883Speter      # Instead, we relocate shared libraries at runtime.
4855251883Speter      ;;
4856251883Speter    sysv4*MP*)
4857251883Speter      if test -d /usr/nec; then
4858251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4859251883Speter      fi
4860251883Speter      ;;
4861251883Speter    hpux*)
4862251883Speter      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4863251883Speter      # not for PA HP-UX.
4864251883Speter      case $host_cpu in
4865251883Speter      hppa*64*|ia64*)
4866251883Speter	;;
4867251883Speter      *)
4868251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4869251883Speter	;;
4870251883Speter      esac
4871251883Speter      ;;
4872251883Speter    *)
4873251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4874251883Speter      ;;
4875251883Speter    esac
4876251883Speter  else
4877251883Speter    case $host_os in
4878251883Speter      aix4* | aix5*)
4879251883Speter	# All AIX code is PIC.
4880251883Speter	if test "$host_cpu" = ia64; then
4881251883Speter	  # AIX 5 now supports IA64 processor
4882251883Speter	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4883251883Speter	else
4884251883Speter	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4885251883Speter	fi
4886251883Speter	;;
4887251883Speter      chorus*)
4888251883Speter	case $cc_basename in
4889251883Speter	cxch68*)
4890251883Speter	  # Green Hills C++ Compiler
4891251883Speter	  # _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"
4892251883Speter	  ;;
4893251883Speter	esac
4894251883Speter	;;
4895251883Speter       darwin*)
4896251883Speter         # PIC is the default on this platform
4897251883Speter         # Common symbols not allowed in MH_DYLIB files
4898251883Speter         case $cc_basename in
4899251883Speter           xlc*)
4900251883Speter           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4901251883Speter           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4902251883Speter           ;;
4903251883Speter         esac
4904251883Speter       ;;
4905251883Speter      dgux*)
4906251883Speter	case $cc_basename in
4907251883Speter	  ec++*)
4908251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4909251883Speter	    ;;
4910251883Speter	  ghcx*)
4911251883Speter	    # Green Hills C++ Compiler
4912251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4913251883Speter	    ;;
4914251883Speter	  *)
4915251883Speter	    ;;
4916251883Speter	esac
4917251883Speter	;;
4918251883Speter      freebsd* | kfreebsd*-gnu | dragonfly*)
4919251883Speter	# FreeBSD uses GNU C++
4920251883Speter	;;
4921251883Speter      hpux9* | hpux10* | hpux11*)
4922251883Speter	case $cc_basename in
4923251883Speter	  CC*)
4924251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4925251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4926251883Speter	    if test "$host_cpu" != ia64; then
4927251883Speter	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4928251883Speter	    fi
4929251883Speter	    ;;
4930251883Speter	  aCC*)
4931251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4932251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4933251883Speter	    case $host_cpu in
4934251883Speter	    hppa*64*|ia64*)
4935251883Speter	      # +Z the default
4936251883Speter	      ;;
4937251883Speter	    *)
4938251883Speter	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4939251883Speter	      ;;
4940251883Speter	    esac
4941251883Speter	    ;;
4942251883Speter	  *)
4943251883Speter	    ;;
4944251883Speter	esac
4945251883Speter	;;
4946251883Speter      interix*)
4947251883Speter	# This is c89, which is MS Visual C++ (no shared libs)
4948251883Speter	# Anyone wants to do a port?
4949251883Speter	;;
4950251883Speter      irix5* | irix6* | nonstopux*)
4951251883Speter	case $cc_basename in
4952251883Speter	  CC*)
4953251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4954251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4955251883Speter	    # CC pic flag -KPIC is the default.
4956251883Speter	    ;;
4957251883Speter	  *)
4958251883Speter	    ;;
4959251883Speter	esac
4960251883Speter	;;
4961251883Speter      linux*)
4962251883Speter	case $cc_basename in
4963251883Speter	  KCC*)
4964251883Speter	    # KAI C++ Compiler
4965251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4966251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4967251883Speter	    ;;
4968251883Speter	  icpc* | ecpc*)
4969251883Speter	    # Intel C++
4970251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4971251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4972251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4973251883Speter	    ;;
4974251883Speter	  pgCC*)
4975251883Speter	    # Portland Group C++ compiler.
4976251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4977251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4978251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4979251883Speter	    ;;
4980251883Speter	  cxx*)
4981251883Speter	    # Compaq C++
4982251883Speter	    # Make sure the PIC flag is empty.  It appears that all Alpha
4983251883Speter	    # Linux and Compaq Tru64 Unix objects are PIC.
4984251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4985251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4986251883Speter	    ;;
4987251883Speter	  *)
4988251883Speter	    ;;
4989251883Speter	esac
4990251883Speter	;;
4991251883Speter      lynxos*)
4992251883Speter	;;
4993251883Speter      m88k*)
4994251883Speter	;;
4995251883Speter      mvs*)
4996251883Speter	case $cc_basename in
4997251883Speter	  cxx*)
4998251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4999251883Speter	    ;;
5000251883Speter	  *)
5001251883Speter	    ;;
5002251883Speter	esac
5003251883Speter	;;
5004251883Speter      netbsd*)
5005251883Speter	;;
5006251883Speter      osf3* | osf4* | osf5*)
5007251883Speter	case $cc_basename in
5008251883Speter	  KCC*)
5009251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
5010251883Speter	    ;;
5011251883Speter	  RCC*)
5012251883Speter	    # Rational C++ 2.4.1
5013251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5014251883Speter	    ;;
5015251883Speter	  cxx*)
5016251883Speter	    # Digital/Compaq C++
5017251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5018251883Speter	    # Make sure the PIC flag is empty.  It appears that all Alpha
5019251883Speter	    # Linux and Compaq Tru64 Unix objects are PIC.
5020251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5021251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5022251883Speter	    ;;
5023251883Speter	  *)
5024251883Speter	    ;;
5025251883Speter	esac
5026251883Speter	;;
5027251883Speter      psos*)
5028251883Speter	;;
5029251883Speter      solaris*)
5030251883Speter	case $cc_basename in
5031251883Speter	  CC*)
5032251883Speter	    # Sun C++ 4.2, 5.x and Centerline C++
5033251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5034251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5035251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5036251883Speter	    ;;
5037251883Speter	  gcx*)
5038251883Speter	    # Green Hills C++ Compiler
5039251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5040251883Speter	    ;;
5041251883Speter	  *)
5042251883Speter	    ;;
5043251883Speter	esac
5044251883Speter	;;
5045251883Speter      sunos4*)
5046251883Speter	case $cc_basename in
5047251883Speter	  CC*)
5048251883Speter	    # Sun C++ 4.x
5049251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5050251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5051251883Speter	    ;;
5052251883Speter	  lcc*)
5053251883Speter	    # Lucid
5054251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5055251883Speter	    ;;
5056251883Speter	  *)
5057251883Speter	    ;;
5058251883Speter	esac
5059251883Speter	;;
5060251883Speter      tandem*)
5061251883Speter	case $cc_basename in
5062251883Speter	  NCC*)
5063251883Speter	    # NonStop-UX NCC 3.20
5064251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5065251883Speter	    ;;
5066251883Speter	  *)
5067251883Speter	    ;;
5068251883Speter	esac
5069251883Speter	;;
5070251883Speter      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5071251883Speter	case $cc_basename in
5072251883Speter	  CC*)
5073251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5074251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5075251883Speter	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5076251883Speter	    ;;
5077251883Speter	esac
5078251883Speter	;;
5079251883Speter      vxworks*)
5080251883Speter	;;
5081251883Speter      *)
5082251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5083251883Speter	;;
5084251883Speter    esac
5085251883Speter  fi
5086251883Speter],
5087251883Speter[
5088251883Speter  if test "$GCC" = yes; then
5089251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5090251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5091251883Speter
5092251883Speter    case $host_os in
5093251883Speter      aix*)
5094251883Speter      # All AIX code is PIC.
5095251883Speter      if test "$host_cpu" = ia64; then
5096251883Speter	# AIX 5 now supports IA64 processor
5097251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5098251883Speter      fi
5099251883Speter      ;;
5100251883Speter
5101251883Speter    amigaos*)
5102251883Speter      # FIXME: we need at least 68020 code to build shared libraries, but
5103251883Speter      # adding the `-m68020' flag to GCC prevents building anything better,
5104251883Speter      # like `-m68040'.
5105251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5106251883Speter      ;;
5107251883Speter
5108251883Speter    beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5109251883Speter      # PIC is the default for these OSes.
5110251883Speter      ;;
5111251883Speter
5112251883Speter    mingw* | pw32* | os2*)
5113251883Speter      # This hack is so that the source file can tell whether it is being
5114251883Speter      # built for inclusion in a dll (and should export symbols for example).
5115251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5116251883Speter      ;;
5117251883Speter
5118251883Speter    darwin* | rhapsody*)
5119251883Speter      # PIC is the default on this platform
5120251883Speter      # Common symbols not allowed in MH_DYLIB files
5121251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5122251883Speter      ;;
5123251883Speter
5124251883Speter    interix3*)
5125251883Speter      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5126251883Speter      # Instead, we relocate shared libraries at runtime.
5127251883Speter      ;;
5128251883Speter
5129251883Speter    msdosdjgpp*)
5130251883Speter      # Just because we use GCC doesn't mean we suddenly get shared libraries
5131251883Speter      # on systems that don't support them.
5132251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5133251883Speter      enable_shared=no
5134251883Speter      ;;
5135251883Speter
5136251883Speter    sysv4*MP*)
5137251883Speter      if test -d /usr/nec; then
5138251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5139251883Speter      fi
5140251883Speter      ;;
5141251883Speter
5142251883Speter    hpux*)
5143251883Speter      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5144251883Speter      # not for PA HP-UX.
5145251883Speter      case $host_cpu in
5146251883Speter      hppa*64*|ia64*)
5147251883Speter	# +Z the default
5148251883Speter	;;
5149251883Speter      *)
5150251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5151251883Speter	;;
5152251883Speter      esac
5153251883Speter      ;;
5154251883Speter
5155251883Speter    *)
5156251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5157251883Speter      ;;
5158251883Speter    esac
5159251883Speter  else
5160251883Speter    # PORTME Check for flag to pass linker flags through the system compiler.
5161251883Speter    case $host_os in
5162251883Speter    aix*)
5163251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5164251883Speter      if test "$host_cpu" = ia64; then
5165251883Speter	# AIX 5 now supports IA64 processor
5166251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5167251883Speter      else
5168251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5169251883Speter      fi
5170251883Speter      ;;
5171251883Speter      darwin*)
5172251883Speter        # PIC is the default on this platform
5173251883Speter        # Common symbols not allowed in MH_DYLIB files
5174251883Speter       case $cc_basename in
5175251883Speter         xlc*)
5176251883Speter         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5177251883Speter         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5178251883Speter         ;;
5179251883Speter       esac
5180251883Speter       ;;
5181251883Speter
5182251883Speter    mingw* | pw32* | os2*)
5183251883Speter      # This hack is so that the source file can tell whether it is being
5184251883Speter      # built for inclusion in a dll (and should export symbols for example).
5185251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5186251883Speter      ;;
5187251883Speter
5188251883Speter    hpux9* | hpux10* | hpux11*)
5189251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5190251883Speter      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5191251883Speter      # not for PA HP-UX.
5192251883Speter      case $host_cpu in
5193251883Speter      hppa*64*|ia64*)
5194251883Speter	# +Z the default
5195251883Speter	;;
5196251883Speter      *)
5197251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5198251883Speter	;;
5199251883Speter      esac
5200251883Speter      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5201251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5202251883Speter      ;;
5203251883Speter
5204251883Speter    irix5* | irix6* | nonstopux*)
5205251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5206251883Speter      # PIC (with -KPIC) is the default.
5207251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5208251883Speter      ;;
5209251883Speter
5210251883Speter    newsos6)
5211251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5212251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5213251883Speter      ;;
5214251883Speter
5215251883Speter    linux*)
5216251883Speter      case $cc_basename in
5217251883Speter      icc* | ecc*)
5218251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5219251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5220251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5221251883Speter        ;;
5222251883Speter      pgcc* | pgf77* | pgf90* | pgf95*)
5223251883Speter        # Portland Group compilers (*not* the Pentium gcc compiler,
5224251883Speter	# which looks to be a dead project)
5225251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5226251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5227251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5228251883Speter        ;;
5229251883Speter      ccc*)
5230251883Speter        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231251883Speter        # All Alpha code is PIC.
5232251883Speter        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5233251883Speter        ;;
5234251883Speter      esac
5235251883Speter      ;;
5236251883Speter
5237251883Speter    osf3* | osf4* | osf5*)
5238251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5239251883Speter      # All OSF/1 code is PIC.
5240251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5241251883Speter      ;;
5242251883Speter
5243251883Speter    solaris*)
5244251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5245251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5246251883Speter      case $cc_basename in
5247251883Speter      f77* | f90* | f95*)
5248251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5249251883Speter      *)
5250251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5251251883Speter      esac
5252251883Speter      ;;
5253251883Speter
5254251883Speter    sunos4*)
5255251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5256251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5257251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5258251883Speter      ;;
5259251883Speter
5260251883Speter    sysv4 | sysv4.2uw2* | sysv4.3*)
5261251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5262251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5263251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5264251883Speter      ;;
5265251883Speter
5266251883Speter    sysv4*MP*)
5267251883Speter      if test -d /usr/nec ;then
5268251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5269251883Speter	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5270251883Speter      fi
5271251883Speter      ;;
5272251883Speter
5273251883Speter    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5274251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5275251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5276251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5277251883Speter      ;;
5278251883Speter
5279251883Speter    unicos*)
5280251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5281251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5282251883Speter      ;;
5283251883Speter
5284251883Speter    uts4*)
5285251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5286251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5287251883Speter      ;;
5288251883Speter
5289251883Speter    *)
5290251883Speter      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5291251883Speter      ;;
5292251883Speter    esac
5293251883Speter  fi
5294251883Speter])
5295251883SpeterAC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5296251883Speter
5297251883Speter#
5298251883Speter# Check to make sure the PIC flag actually works.
5299251883Speter#
5300251883Speterif test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5301251883Speter  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5302251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1),
5303251883Speter    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5304251883Speter    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5305251883Speter     "" | " "*) ;;
5306251883Speter     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5307251883Speter     esac],
5308251883Speter    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5309251883Speter     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5310251883Speterfi
5311251883Spetercase $host_os in
5312251883Speter  # For platforms which do not support PIC, -DPIC is meaningless:
5313251883Speter  *djgpp*)
5314251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5315251883Speter    ;;
5316251883Speter  *)
5317251883Speter    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5318251883Speter    ;;
5319251883Speteresac
5320251883Speter
5321251883Speter#
5322251883Speter# Check to make sure the static flag actually works.
5323251883Speter#
5324251883Speterwl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5325251883SpeterAC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5326251883Speter  _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1),
5327251883Speter  $lt_tmp_static_flag,
5328251883Speter  [],
5329251883Speter  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5330251883Speter])
5331251883Speter
5332251883Speter
5333251883Speter# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5334251883Speter# ------------------------------------
5335251883Speter# See if the linker supports building shared libraries.
5336251883SpeterAC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5337251883Speter[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5338251883Speterifelse([$1],[CXX],[
5339251883Speter  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5340251883Speter  case $host_os in
5341251883Speter  aix4* | aix5*)
5342251883Speter    # If we're using GNU nm, then we don't want the "-C" option.
5343251883Speter    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5344251883Speter    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5345251883Speter      _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'
5346251883Speter    else
5347251883Speter      _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'
5348251883Speter    fi
5349251883Speter    ;;
5350251883Speter  pw32*)
5351251883Speter    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5352251883Speter  ;;
5353251883Speter  cygwin* | mingw*)
5354251883Speter    _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'
5355251883Speter  ;;
5356251883Speter  *)
5357251883Speter    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5358251883Speter  ;;
5359251883Speter  esac
5360251883Speter],[
5361251883Speter  runpath_var=
5362251883Speter  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5363251883Speter  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5364251883Speter  _LT_AC_TAGVAR(archive_cmds, $1)=
5365251883Speter  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5366251883Speter  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5367251883Speter  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5368251883Speter  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5369251883Speter  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5370251883Speter  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5371251883Speter  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5372251883Speter  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5373251883Speter  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5374251883Speter  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5375251883Speter  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5376251883Speter  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5377251883Speter  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5378251883Speter  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5379251883Speter  _LT_AC_TAGVAR(module_cmds, $1)=
5380251883Speter  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5381251883Speter  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5382251883Speter  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5383251883Speter  # include_expsyms should be a list of space-separated symbols to be *always*
5384251883Speter  # included in the symbol list
5385251883Speter  _LT_AC_TAGVAR(include_expsyms, $1)=
5386251883Speter  # exclude_expsyms can be an extended regexp of symbols to exclude
5387251883Speter  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5388251883Speter  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5389251883Speter  # as well as any symbol that contains `d'.
5390251883Speter  _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_"
5391251883Speter  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5392251883Speter  # platforms (ab)use it in PIC code, but their linkers get confused if
5393251883Speter  # the symbol is explicitly referenced.  Since portable code cannot
5394251883Speter  # rely on this symbol name, it's probably fine to never include it in
5395251883Speter  # preloaded symbol tables.
5396251883Speter  extract_expsyms_cmds=
5397251883Speter  # Just being paranoid about ensuring that cc_basename is set.
5398251883Speter  _LT_CC_BASENAME([$compiler])
5399251883Speter  case $host_os in
5400251883Speter  cygwin* | mingw* | pw32*)
5401251883Speter    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5402251883Speter    # When not using gcc, we currently assume that we are using
5403251883Speter    # Microsoft Visual C++.
5404251883Speter    if test "$GCC" != yes; then
5405251883Speter      with_gnu_ld=no
5406251883Speter    fi
5407251883Speter    ;;
5408251883Speter  interix*)
5409251883Speter    # we just hope/assume this is gcc and not c89 (= MSVC++)
5410251883Speter    with_gnu_ld=yes
5411251883Speter    ;;
5412251883Speter  openbsd*)
5413251883Speter    with_gnu_ld=no
5414251883Speter    ;;
5415251883Speter  esac
5416251883Speter
5417251883Speter  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5418251883Speter  if test "$with_gnu_ld" = yes; then
5419251883Speter    # If archive_cmds runs LD, not CC, wlarc should be empty
5420251883Speter    wlarc='${wl}'
5421251883Speter
5422251883Speter    # Set some defaults for GNU ld with shared library support. These
5423251883Speter    # are reset later if shared libraries are not supported. Putting them
5424251883Speter    # here allows them to be overridden if necessary.
5425251883Speter    runpath_var=LD_RUN_PATH
5426251883Speter    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5427251883Speter    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5428251883Speter    # ancient GNU ld didn't support --whole-archive et. al.
5429251883Speter    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5430251883Speter	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5431251883Speter      else
5432251883Speter  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5433251883Speter    fi
5434251883Speter    supports_anon_versioning=no
5435251883Speter    case `$LD -v 2>/dev/null` in
5436251883Speter      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5437251883Speter      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5438251883Speter      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5439251883Speter      *\ 2.11.*) ;; # other 2.11 versions
5440251883Speter      *) supports_anon_versioning=yes ;;
5441251883Speter    esac
5442251883Speter
5443251883Speter    # See if GNU ld supports shared libraries.
5444251883Speter    case $host_os in
5445251883Speter    aix3* | aix4* | aix5*)
5446251883Speter      # On AIX/PPC, the GNU linker is very broken
5447251883Speter      if test "$host_cpu" != ia64; then
5448251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5449251883Speter	cat <<EOF 1>&2
5450251883Speter
5451251883Speter*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5452251883Speter*** to be unable to reliably create shared libraries on AIX.
5453251883Speter*** Therefore, libtool is disabling shared libraries support.  If you
5454251883Speter*** really care for shared libraries, you may want to modify your PATH
5455251883Speter*** so that a non-GNU linker is found, and then restart.
5456251883Speter
5457251883SpeterEOF
5458251883Speter      fi
5459251883Speter      ;;
5460251883Speter
5461251883Speter    amigaos*)
5462251883Speter      _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)'
5463251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5464251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5465251883Speter
5466251883Speter      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5467251883Speter      # that the semantics of dynamic libraries on AmigaOS, at least up
5468251883Speter      # to version 4, is to share data among multiple programs linked
5469251883Speter      # with the same dynamic library.  Since this doesn't match the
5470251883Speter      # behavior of shared libraries on other platforms, we can't use
5471251883Speter      # them.
5472251883Speter      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5473251883Speter      ;;
5474251883Speter
5475251883Speter    beos*)
5476251883Speter      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5477251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5478251883Speter	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5479251883Speter	# support --undefined.  This deserves some investigation.  FIXME
5480251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5481251883Speter      else
5482251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5483251883Speter      fi
5484251883Speter      ;;
5485251883Speter
5486251883Speter    cygwin* | mingw* | pw32*)
5487251883Speter      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5488251883Speter      # as there is no search path for DLLs.
5489251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5490251883Speter      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5491251883Speter      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5492251883Speter      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5493251883Speter      _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'
5494251883Speter
5495251883Speter      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5496251883Speter        _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'
5497251883Speter	# If the export-symbols file already is a .def file (1st line
5498251883Speter	# is EXPORTS), use it as is; otherwise, prepend...
5499251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5500251883Speter	  cp $export_symbols $output_objdir/$soname.def;
5501251883Speter	else
5502251883Speter	  echo EXPORTS > $output_objdir/$soname.def;
5503251883Speter	  cat $export_symbols >> $output_objdir/$soname.def;
5504251883Speter	fi~
5505251883Speter	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5506251883Speter      else
5507251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5508251883Speter      fi
5509251883Speter      ;;
5510251883Speter
5511251883Speter    interix3*)
5512251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5513251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5514251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5515251883Speter      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5516251883Speter      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5517251883Speter      # Instead, shared libraries are loaded at an image base (0x10000000 by
5518251883Speter      # default) and relocated if they conflict, which is a slow very memory
5519251883Speter      # consuming and fragmenting process.  To avoid this, we pick a random,
5520251883Speter      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5521251883Speter      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5522251883Speter      _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'
5523251883Speter      _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'
5524251883Speter      ;;
5525251883Speter
5526251883Speter    linux*)
5527251883Speter      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5528251883Speter	tmp_addflag=
5529251883Speter	case $cc_basename,$host_cpu in
5530251883Speter	pgcc*)				# Portland Group C compiler
5531251883Speter	  _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'
5532251883Speter	  tmp_addflag=' $pic_flag'
5533251883Speter	  ;;
5534251883Speter	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5535251883Speter	  _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'
5536251883Speter	  tmp_addflag=' $pic_flag -Mnomain' ;;
5537251883Speter	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5538251883Speter	  tmp_addflag=' -i_dynamic' ;;
5539251883Speter	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5540251883Speter	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5541251883Speter	ifc* | ifort*)			# Intel Fortran compiler
5542251883Speter	  tmp_addflag=' -nofor_main' ;;
5543251883Speter	esac
5544251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5545251883Speter
5546251883Speter	if test $supports_anon_versioning = yes; then
5547251883Speter	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5548251883Speter  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5549251883Speter  $echo "local: *; };" >> $output_objdir/$libname.ver~
5550251883Speter	  $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5551251883Speter	fi
5552251883Speter      else
5553251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5554251883Speter      fi
5555251883Speter      ;;
5556251883Speter
5557251883Speter    netbsd*)
5558251883Speter      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5559251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5560251883Speter	wlarc=
5561251883Speter      else
5562251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5563251883Speter	_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'
5564251883Speter      fi
5565251883Speter      ;;
5566251883Speter
5567251883Speter    solaris*)
5568251883Speter      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5569251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5570251883Speter	cat <<EOF 1>&2
5571251883Speter
5572251883Speter*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5573251883Speter*** create shared libraries on Solaris systems.  Therefore, libtool
5574251883Speter*** is disabling shared libraries support.  We urge you to upgrade GNU
5575251883Speter*** binutils to release 2.9.1 or newer.  Another option is to modify
5576251883Speter*** your PATH or compiler configuration so that the native linker is
5577251883Speter*** used, and then restart.
5578251883Speter
5579251883SpeterEOF
5580251883Speter      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5581251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5582251883Speter	_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'
5583251883Speter      else
5584251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5585251883Speter      fi
5586251883Speter      ;;
5587251883Speter
5588251883Speter    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5589251883Speter      case `$LD -v 2>&1` in
5590251883Speter        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) 
5591251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5592251883Speter	cat <<_LT_EOF 1>&2
5593251883Speter
5594251883Speter*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5595251883Speter*** reliably create shared libraries on SCO systems.  Therefore, libtool
5596251883Speter*** is disabling shared libraries support.  We urge you to upgrade GNU
5597251883Speter*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5598251883Speter*** your PATH or compiler configuration so that the native linker is
5599251883Speter*** used, and then restart.
5600251883Speter
5601251883Speter_LT_EOF
5602251883Speter	;;
5603251883Speter	*)
5604251883Speter	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5605251883Speter	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5606251883Speter	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5607251883Speter	    _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'
5608251883Speter	  else
5609251883Speter	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5610251883Speter	  fi
5611251883Speter	;;
5612251883Speter      esac
5613251883Speter      ;;
5614251883Speter
5615251883Speter    sunos4*)
5616251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5617251883Speter      wlarc=
5618251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5619251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5620251883Speter      ;;
5621251883Speter
5622251883Speter    *)
5623251883Speter      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5624251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5625251883Speter	_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'
5626251883Speter      else
5627251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5628251883Speter      fi
5629251883Speter      ;;
5630251883Speter    esac
5631251883Speter
5632251883Speter    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5633251883Speter      runpath_var=
5634251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5635251883Speter      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5636251883Speter      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5637251883Speter    fi
5638251883Speter  else
5639251883Speter    # PORTME fill in a description of your system's linker (not GNU ld)
5640251883Speter    case $host_os in
5641251883Speter    aix3*)
5642251883Speter      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5643251883Speter      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5644251883Speter      _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'
5645251883Speter      # Note: this linker hardcodes the directories in LIBPATH if there
5646251883Speter      # are no directories specified by -L.
5647251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5648251883Speter      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5649251883Speter	# Neither direct hardcoding nor static linking is supported with a
5650251883Speter	# broken collect2.
5651251883Speter	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5652251883Speter      fi
5653251883Speter      ;;
5654251883Speter
5655251883Speter    aix4* | aix5*)
5656251883Speter      if test "$host_cpu" = ia64; then
5657251883Speter	# On IA64, the linker does run time linking by default, so we don't
5658251883Speter	# have to do anything special.
5659251883Speter	aix_use_runtimelinking=no
5660251883Speter	exp_sym_flag='-Bexport'
5661251883Speter	no_entry_flag=""
5662251883Speter      else
5663251883Speter	# If we're using GNU nm, then we don't want the "-C" option.
5664251883Speter	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5665251883Speter	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5666251883Speter	  _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'
5667251883Speter	else
5668251883Speter	  _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'
5669251883Speter	fi
5670251883Speter	aix_use_runtimelinking=no
5671251883Speter
5672251883Speter	# Test if we are trying to use run time linking or normal
5673251883Speter	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5674251883Speter	# need to do runtime linking.
5675251883Speter	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*)
5676251883Speter	  for ld_flag in $LDFLAGS; do
5677251883Speter  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5678251883Speter  	    aix_use_runtimelinking=yes
5679251883Speter  	    break
5680251883Speter  	  fi
5681251883Speter	  done
5682251883Speter	  ;;
5683251883Speter	esac
5684251883Speter
5685251883Speter	exp_sym_flag='-bexport'
5686251883Speter	no_entry_flag='-bnoentry'
5687251883Speter      fi
5688251883Speter
5689251883Speter      # When large executables or shared objects are built, AIX ld can
5690251883Speter      # have problems creating the table of contents.  If linking a library
5691251883Speter      # or program results in "error TOC overflow" add -mminimal-toc to
5692251883Speter      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5693251883Speter      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5694251883Speter
5695251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)=''
5696251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5697251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5698251883Speter      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5699251883Speter
5700251883Speter      if test "$GCC" = yes; then
5701251883Speter	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5702251883Speter	# We only want to do this on AIX 4.2 and lower, the check
5703251883Speter	# below for broken collect2 doesn't work under 4.3+
5704251883Speter	  collect2name=`${CC} -print-prog-name=collect2`
5705251883Speter	  if test -f "$collect2name" && \
5706251883Speter  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5707251883Speter	  then
5708251883Speter  	  # We have reworked collect2
5709251883Speter  	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5710251883Speter	  else
5711251883Speter  	  # We have old collect2
5712251883Speter  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5713251883Speter  	  # It fails to find uninstalled libraries when the uninstalled
5714251883Speter  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5715251883Speter  	  # to unsupported forces relinking
5716251883Speter  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5717251883Speter  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5718251883Speter  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5719251883Speter	  fi
5720251883Speter	  ;;
5721251883Speter	esac
5722251883Speter	shared_flag='-shared'
5723251883Speter	if test "$aix_use_runtimelinking" = yes; then
5724251883Speter	  shared_flag="$shared_flag "'${wl}-G'
5725251883Speter	fi
5726251883Speter      else
5727251883Speter	# not using gcc
5728251883Speter	if test "$host_cpu" = ia64; then
5729251883Speter  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5730251883Speter  	# chokes on -Wl,-G. The following line is correct:
5731251883Speter	  shared_flag='-G'
5732251883Speter	else
5733251883Speter	  if test "$aix_use_runtimelinking" = yes; then
5734251883Speter	    shared_flag='${wl}-G'
5735251883Speter	  else
5736251883Speter	    shared_flag='${wl}-bM:SRE'
5737251883Speter	  fi
5738251883Speter	fi
5739251883Speter      fi
5740251883Speter
5741251883Speter      # It seems that -bexpall does not export symbols beginning with
5742251883Speter      # underscore (_), so it is better to generate a list of symbols to export.
5743251883Speter      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5744251883Speter      if test "$aix_use_runtimelinking" = yes; then
5745251883Speter	# Warning - without using the other runtime loading flags (-brtl),
5746251883Speter	# -berok will link without error, but may produce a broken library.
5747251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5748251883Speter       # Determine the default libpath from the value encoded in an empty executable.
5749251883Speter       _LT_AC_SYS_LIBPATH_AIX
5750251883Speter       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5751251883Speter	_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"
5752251883Speter       else
5753251883Speter	if test "$host_cpu" = ia64; then
5754251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5755251883Speter	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5756251883Speter	  _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"
5757251883Speter	else
5758251883Speter	 # Determine the default libpath from the value encoded in an empty executable.
5759251883Speter	 _LT_AC_SYS_LIBPATH_AIX
5760251883Speter	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5761251883Speter	  # Warning - without using the other run time loading flags,
5762251883Speter	  # -berok will link without error, but may produce a broken library.
5763251883Speter	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5764251883Speter	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5765251883Speter	  # Exported symbols can be pulled into shared objects from archives
5766251883Speter	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5767251883Speter	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5768251883Speter	  # This is similar to how AIX traditionally builds its shared libraries.
5769251883Speter	  _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'
5770251883Speter	fi
5771251883Speter      fi
5772251883Speter      ;;
5773251883Speter
5774251883Speter    amigaos*)
5775251883Speter      _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)'
5776251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5777251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5778251883Speter      # see comment about different semantics on the GNU ld section
5779251883Speter      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5780251883Speter      ;;
5781251883Speter
5782251883Speter    bsdi[[45]]*)
5783251883Speter      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5784251883Speter      ;;
5785251883Speter
5786251883Speter    cygwin* | mingw* | pw32*)
5787251883Speter      # When not using gcc, we currently assume that we are using
5788251883Speter      # Microsoft Visual C++.
5789251883Speter      # hardcode_libdir_flag_spec is actually meaningless, as there is
5790251883Speter      # no search path for DLLs.
5791251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5792251883Speter      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5793251883Speter      # Tell ltmain to make .lib files, not .a files.
5794251883Speter      libext=lib
5795251883Speter      # Tell ltmain to make .dll files, not .so files.
5796251883Speter      shrext_cmds=".dll"
5797251883Speter      # FIXME: Setting linknames here is a bad hack.
5798251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5799251883Speter      # The linker will automatically build a .lib file if we build a DLL.
5800251883Speter      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5801251883Speter      # FIXME: Should let the user specify the lib program.
5802251883Speter      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs'
5803251883Speter      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5804251883Speter      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5805251883Speter      ;;
5806251883Speter
5807251883Speter    darwin* | rhapsody*)
5808251883Speter      case $host_os in
5809251883Speter        rhapsody* | darwin1.[[012]])
5810251883Speter         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5811251883Speter         ;;
5812251883Speter       *) # Darwin 1.3 on
5813251883Speter         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5814251883Speter           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5815251883Speter         else
5816251883Speter           case ${MACOSX_DEPLOYMENT_TARGET} in
5817251883Speter             10.[[012]])
5818251883Speter               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5819251883Speter               ;;
5820251883Speter             10.*)
5821251883Speter               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5822251883Speter               ;;
5823251883Speter           esac
5824251883Speter         fi
5825251883Speter         ;;
5826251883Speter      esac
5827251883Speter      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5828251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5829251883Speter      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5830251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5831251883Speter      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5832251883Speter      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5833251883Speter    if test "$GCC" = yes ; then
5834251883Speter    	output_verbose_link_cmd='echo'
5835251883Speter        _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring'
5836251883Speter      _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5837251883Speter      # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5838251883Speter      _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}'
5839251883Speter      _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}'
5840251883Speter    else
5841251883Speter      case $cc_basename in
5842251883Speter        xlc*)
5843251883Speter         output_verbose_link_cmd='echo'
5844251883Speter         _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'
5845251883Speter         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5846251883Speter          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5847251883Speter         _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}'
5848251883Speter          _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}'
5849251883Speter          ;;
5850251883Speter       *)
5851251883Speter         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5852251883Speter          ;;
5853251883Speter      esac
5854251883Speter    fi
5855251883Speter      ;;
5856251883Speter
5857251883Speter    dgux*)
5858251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5859251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5860251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5861251883Speter      ;;
5862251883Speter
5863251883Speter    freebsd1*)
5864251883Speter      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5865251883Speter      ;;
5866251883Speter
5867251883Speter    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5868251883Speter    # support.  Future versions do this automatically, but an explicit c++rt0.o
5869251883Speter    # does not break anything, and helps significantly (at the cost of a little
5870251883Speter    # extra space).
5871251883Speter    freebsd2.2*)
5872251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5873251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5874251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5875251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5876251883Speter      ;;
5877251883Speter
5878251883Speter    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5879251883Speter    freebsd2*)
5880251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5881251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5882251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5883251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5884251883Speter      ;;
5885251883Speter
5886251883Speter    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5887251883Speter    freebsd* | kfreebsd*-gnu | dragonfly*)
5888251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5889251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5890251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5891251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5892251883Speter      ;;
5893251883Speter
5894251883Speter    hpux9*)
5895251883Speter      if test "$GCC" = yes; then
5896251883Speter	_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'
5897251883Speter      else
5898251883Speter	_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'
5899251883Speter      fi
5900251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5901251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5902251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5903251883Speter
5904251883Speter      # hardcode_minus_L: Not really in the search PATH,
5905251883Speter      # but as the default location of the library.
5906251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5907251883Speter      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5908251883Speter      ;;
5909251883Speter
5910251883Speter    hpux10*)
5911251883Speter      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5912251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5913251883Speter      else
5914251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5915251883Speter      fi
5916251883Speter      if test "$with_gnu_ld" = no; then
5917251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5918251883Speter	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5919251883Speter
5920251883Speter	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5921251883Speter	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5922251883Speter
5923251883Speter	# hardcode_minus_L: Not really in the search PATH,
5924251883Speter	# but as the default location of the library.
5925251883Speter	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5926251883Speter      fi
5927251883Speter      ;;
5928251883Speter
5929251883Speter    hpux11*)
5930251883Speter      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5931251883Speter	case $host_cpu in
5932251883Speter	hppa*64*)
5933251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5934251883Speter	  ;;
5935251883Speter	ia64*)
5936251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5937251883Speter	  ;;
5938251883Speter	*)
5939251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5940251883Speter	  ;;
5941251883Speter	esac
5942251883Speter      else
5943251883Speter	case $host_cpu in
5944251883Speter	hppa*64*)
5945251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5946251883Speter	  ;;
5947251883Speter	ia64*)
5948251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5949251883Speter	  ;;
5950251883Speter	*)
5951251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5952251883Speter	  ;;
5953251883Speter	esac
5954251883Speter      fi
5955251883Speter      if test "$with_gnu_ld" = no; then
5956251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5957251883Speter	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5958251883Speter
5959251883Speter	case $host_cpu in
5960251883Speter	hppa*64*|ia64*)
5961251883Speter	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5962251883Speter	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5963251883Speter	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5964251883Speter	  ;;
5965251883Speter	*)
5966251883Speter	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5967251883Speter	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5968251883Speter
5969251883Speter	  # hardcode_minus_L: Not really in the search PATH,
5970251883Speter	  # but as the default location of the library.
5971251883Speter	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5972251883Speter	  ;;
5973251883Speter	esac
5974251883Speter      fi
5975251883Speter      ;;
5976251883Speter
5977251883Speter    irix5* | irix6* | nonstopux*)
5978251883Speter      if test "$GCC" = yes; then
5979251883Speter	_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'
5980251883Speter      else
5981251883Speter	_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'
5982251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5983251883Speter      fi
5984251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5985251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5986251883Speter      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5987251883Speter      ;;
5988251883Speter
5989251883Speter    netbsd*)
5990251883Speter      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5991251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5992251883Speter      else
5993251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5994251883Speter      fi
5995251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5996251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5997251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5998251883Speter      ;;
5999251883Speter
6000251883Speter    newsos6)
6001251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6002251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6003251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6004251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6005251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6006251883Speter      ;;
6007251883Speter
6008251883Speter    openbsd*)
6009251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6010251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6011251883Speter      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6012251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6013251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
6014251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6015251883Speter	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
6016251883Speter      else
6017251883Speter       case $host_os in
6018251883Speter	 openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
6019251883Speter	   _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
6020251883Speter	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6021251883Speter	   ;;
6022251883Speter	 *)
6023251883Speter	   _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6024251883Speter	   _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6025251883Speter	   ;;
6026251883Speter       esac
6027251883Speter      fi
6028251883Speter      ;;
6029251883Speter
6030251883Speter    os2*)
6031251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6032251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6033251883Speter      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6034251883Speter      _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'
6035251883Speter      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6036251883Speter      ;;
6037251883Speter
6038251883Speter    osf3*)
6039251883Speter      if test "$GCC" = yes; then
6040251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6041251883Speter	_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'
6042251883Speter      else
6043251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6044251883Speter	_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'
6045251883Speter      fi
6046251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6047251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6048251883Speter      ;;
6049251883Speter
6050251883Speter    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6051251883Speter      if test "$GCC" = yes; then
6052251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6053251883Speter	_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'
6054251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6055251883Speter      else
6056251883Speter	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6057251883Speter	_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'
6058251883Speter	_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~
6059251883Speter	$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'
6060251883Speter
6061251883Speter	# Both c and cxx compiler support -rpath directly
6062251883Speter	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6063251883Speter      fi
6064251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6065251883Speter      ;;
6066251883Speter
6067251883Speter    solaris*)
6068251883Speter      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6069251883Speter      if test "$GCC" = yes; then
6070251883Speter	wlarc='${wl}'
6071251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6072251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6073251883Speter	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6074251883Speter      else
6075251883Speter	wlarc=''
6076251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6077251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6078251883Speter  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6079251883Speter      fi
6080251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6081251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6082251883Speter      case $host_os in
6083251883Speter      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6084251883Speter      *)
6085251883Speter 	# The compiler driver will combine linker options so we
6086251883Speter 	# cannot just pass the convience library names through
6087251883Speter 	# without $wl, iff we do not link with $LD.
6088251883Speter 	# Luckily, gcc supports the same syntax we need for Sun Studio.
6089251883Speter 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6090251883Speter 	case $wlarc in
6091251883Speter 	'')
6092251883Speter 	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;;
6093251883Speter 	*)
6094251883Speter 	  _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' ;;
6095251883Speter 	esac ;;
6096251883Speter      esac
6097251883Speter      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6098251883Speter      ;;
6099251883Speter
6100251883Speter    sunos4*)
6101251883Speter      if test "x$host_vendor" = xsequent; then
6102251883Speter	# Use $CC to link under sequent, because it throws in some extra .o
6103251883Speter	# files that make .init and .fini sections work.
6104251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6105251883Speter      else
6106251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6107251883Speter      fi
6108251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6109251883Speter      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6110251883Speter      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6111251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6112251883Speter      ;;
6113251883Speter
6114251883Speter    sysv4)
6115251883Speter      case $host_vendor in
6116251883Speter	sni)
6117251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6118251883Speter	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6119251883Speter	;;
6120251883Speter	siemens)
6121251883Speter	  ## LD is ld it makes a PLAMLIB
6122251883Speter	  ## CC just makes a GrossModule.
6123251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6124251883Speter	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6125251883Speter	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6126251883Speter        ;;
6127251883Speter	motorola)
6128251883Speter	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6129251883Speter	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6130251883Speter	;;
6131251883Speter      esac
6132251883Speter      runpath_var='LD_RUN_PATH'
6133251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6134251883Speter      ;;
6135251883Speter
6136251883Speter    sysv4.3*)
6137251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6138251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6139251883Speter      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6140251883Speter      ;;
6141251883Speter
6142251883Speter    sysv4*MP*)
6143251883Speter      if test -d /usr/nec; then
6144251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6145251883Speter	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6146251883Speter	runpath_var=LD_RUN_PATH
6147251883Speter	hardcode_runpath_var=yes
6148251883Speter	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6149251883Speter      fi
6150251883Speter      ;;
6151251883Speter
6152251883Speter    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*)
6153251883Speter      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6154251883Speter      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6155251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6156251883Speter      runpath_var='LD_RUN_PATH'
6157251883Speter
6158251883Speter      if test "$GCC" = yes; then
6159251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6160251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6161251883Speter      else
6162251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6163251883Speter	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6164251883Speter      fi
6165251883Speter      ;;
6166251883Speter
6167251883Speter    sysv5* | sco3.2v5* | sco5v6*)
6168251883Speter      # Note: We can NOT use -z defs as we might desire, because we do not
6169251883Speter      # link with -lc, and that would cause any symbols used from libc to
6170251883Speter      # always be unresolved, which means just about no library would
6171251883Speter      # ever link correctly.  If we're not using GNU ld we use -z text
6172251883Speter      # though, which does catch some bad symbols but isn't as heavy-handed
6173251883Speter      # as -z defs.
6174251883Speter      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6175251883Speter      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6176251883Speter      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6177251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6178251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6179251883Speter      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6180251883Speter      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6181251883Speter      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6182251883Speter      runpath_var='LD_RUN_PATH'
6183251883Speter
6184251883Speter      if test "$GCC" = yes; then
6185251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6186251883Speter	_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'
6187251883Speter      else
6188251883Speter	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6189251883Speter	_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'
6190251883Speter      fi
6191251883Speter      ;;
6192251883Speter
6193251883Speter    uts4*)
6194251883Speter      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6195251883Speter      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6196251883Speter      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6197251883Speter      ;;
6198251883Speter
6199251883Speter    *)
6200251883Speter      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6201251883Speter      ;;
6202251883Speter    esac
6203251883Speter  fi
6204251883Speter])
6205251883SpeterAC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6206251883Spetertest "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6207251883Speter
6208251883Speter#
6209251883Speter# Do we need to explicitly link libc?
6210251883Speter#
6211251883Spetercase "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6212251883Speterx|xyes)
6213251883Speter  # Assume -lc should be added
6214251883Speter  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6215251883Speter
6216251883Speter  if test "$enable_shared" = yes && test "$GCC" = yes; then
6217251883Speter    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6218251883Speter    *'~'*)
6219251883Speter      # FIXME: we may have to deal with multi-command sequences.
6220251883Speter      ;;
6221251883Speter    '$CC '*)
6222251883Speter      # Test whether the compiler implicitly links with -lc since on some
6223251883Speter      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6224251883Speter      # to ld, don't add -lc before -lgcc.
6225251883Speter      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6226251883Speter      $rm conftest*
6227251883Speter      printf "$lt_simple_compile_test_code" > conftest.$ac_ext
6228251883Speter
6229251883Speter      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6230251883Speter        soname=conftest
6231251883Speter        lib=conftest
6232251883Speter        libobjs=conftest.$ac_objext
6233251883Speter        deplibs=
6234251883Speter        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6235251883Speter	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6236251883Speter        compiler_flags=-v
6237251883Speter        linker_flags=-v
6238251883Speter        verstring=
6239251883Speter        output_objdir=.
6240251883Speter        libname=conftest
6241251883Speter        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6242251883Speter        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6243251883Speter        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6244251883Speter        then
6245251883Speter	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6246251883Speter        else
6247251883Speter	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6248251883Speter        fi
6249251883Speter        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6250251883Speter      else
6251251883Speter        cat conftest.err 1>&5
6252251883Speter      fi
6253251883Speter      $rm conftest*
6254251883Speter      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6255251883Speter      ;;
6256251883Speter    esac
6257251883Speter  fi
6258251883Speter  ;;
6259251883Speteresac
6260251883Speter])# AC_LIBTOOL_PROG_LD_SHLIBS
6261251883Speter
6262251883Speter
6263251883Speter# _LT_AC_FILE_LTDLL_C
6264251883Speter# -------------------
6265251883Speter# Be careful that the start marker always follows a newline.
6266251883SpeterAC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6267251883Speter# /* ltdll.c starts here */
6268251883Speter# #define WIN32_LEAN_AND_MEAN
6269251883Speter# #include <windows.h>
6270251883Speter# #undef WIN32_LEAN_AND_MEAN
6271251883Speter# #include <stdio.h>
6272251883Speter#
6273251883Speter# #ifndef __CYGWIN__
6274251883Speter# #  ifdef __CYGWIN32__
6275251883Speter# #    define __CYGWIN__ __CYGWIN32__
6276251883Speter# #  endif
6277251883Speter# #endif
6278251883Speter#
6279251883Speter# #ifdef __cplusplus
6280251883Speter# extern "C" {
6281251883Speter# #endif
6282251883Speter# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6283251883Speter# #ifdef __cplusplus
6284251883Speter# }
6285251883Speter# #endif
6286251883Speter#
6287251883Speter# #ifdef __CYGWIN__
6288251883Speter# #include <cygwin/cygwin_dll.h>
6289251883Speter# DECLARE_CYGWIN_DLL( DllMain );
6290251883Speter# #endif
6291251883Speter# HINSTANCE __hDllInstance_base;
6292251883Speter#
6293251883Speter# BOOL APIENTRY
6294251883Speter# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6295251883Speter# {
6296251883Speter#   __hDllInstance_base = hInst;
6297251883Speter#   return TRUE;
6298251883Speter# }
6299251883Speter# /* ltdll.c ends here */
6300251883Speter])# _LT_AC_FILE_LTDLL_C
6301251883Speter
6302251883Speter
6303251883Speter# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6304251883Speter# ---------------------------------
6305251883SpeterAC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6306251883Speter
6307251883Speter
6308251883Speter# old names
6309251883SpeterAC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6310251883SpeterAC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6311251883SpeterAC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6312251883SpeterAC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6313251883SpeterAC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6314251883SpeterAC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6315251883SpeterAC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6316251883Speter
6317251883Speter# This is just to silence aclocal about the macro not being used
6318251883Speterifelse([AC_DISABLE_FAST_INSTALL])
6319251883Speter
6320251883SpeterAC_DEFUN([LT_AC_PROG_GCJ],
6321251883Speter[AC_CHECK_TOOL(GCJ, gcj, no)
6322251883Speter  test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
6323251883Speter  AC_SUBST(GCJFLAGS)
6324251883Speter])
6325251883Speter
6326251883SpeterAC_DEFUN([LT_AC_PROG_RC],
6327251883Speter[AC_CHECK_TOOL(RC, windres, no)
6328251883Speter])
6329251883Speter
6330251883Speter# NOTE: This macro has been submitted for inclusion into   #
6331251883Speter#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6332251883Speter#  a released version of Autoconf we should remove this    #
6333251883Speter#  macro and use it instead.                               #
6334251883Speter# LT_AC_PROG_SED
6335251883Speter# --------------
6336251883Speter# Check for a fully-functional sed program, that truncates
6337251883Speter# as few characters as possible.  Prefer GNU sed if found.
6338251883SpeterAC_DEFUN([LT_AC_PROG_SED],
6339251883Speter[AC_MSG_CHECKING([for a sed that does not truncate output])
6340251883SpeterAC_CACHE_VAL(lt_cv_path_SED,
6341251883Speter[# Loop through the user's path and test for sed and gsed.
6342251883Speter# Then use that list of sed's as ones to test for truncation.
6343251883Speteras_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6344251883Speterfor as_dir in $PATH
6345251883Speterdo
6346251883Speter  IFS=$as_save_IFS
6347251883Speter  test -z "$as_dir" && as_dir=.
6348251883Speter  for lt_ac_prog in sed gsed; do
6349251883Speter    for ac_exec_ext in '' $ac_executable_extensions; do
6350251883Speter      if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6351251883Speter        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6352251883Speter      fi
6353251883Speter    done
6354251883Speter  done
6355251883Speterdone
6356251883Speterlt_ac_max=0
6357251883Speterlt_ac_count=0
6358251883Speter# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6359251883Speter# along with /bin/sed that truncates output.
6360251883Speterfor lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6361251883Speter  test ! -f $lt_ac_sed && continue
6362251883Speter  cat /dev/null > conftest.in
6363251883Speter  lt_ac_count=0
6364251883Speter  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6365251883Speter  # Check for GNU sed and select it if it is found.
6366251883Speter  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6367251883Speter    lt_cv_path_SED=$lt_ac_sed
6368251883Speter    break
6369251883Speter  fi
6370251883Speter  while true; do
6371251883Speter    cat conftest.in conftest.in >conftest.tmp
6372251883Speter    mv conftest.tmp conftest.in
6373251883Speter    cp conftest.in conftest.nl
6374251883Speter    echo >>conftest.nl
6375251883Speter    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6376251883Speter    cmp -s conftest.out conftest.nl || break
6377251883Speter    # 10000 chars as input seems more than enough
6378251883Speter    test $lt_ac_count -gt 10 && break
6379251883Speter    lt_ac_count=`expr $lt_ac_count + 1`
6380251883Speter    if test $lt_ac_count -gt $lt_ac_max; then
6381251883Speter      lt_ac_max=$lt_ac_count
6382251883Speter      lt_cv_path_SED=$lt_ac_sed
6383251883Speter    fi
6384251883Speter  done
6385251883Speterdone
6386251883Speter])
6387251883SpeterSED=$lt_cv_path_SED
6388251883SpeterAC_MSG_RESULT([$SED])
6389251883Speter])
6390251883Speter
6391251883Speter# Copyright (C) 2002, 2003, 2005  Free Software Foundation, Inc.
6392251883Speter#
6393251883Speter# This file is free software; the Free Software Foundation
6394251883Speter# gives unlimited permission to copy and/or distribute it,
6395251883Speter# with or without modifications, as long as this notice is preserved.
6396251883Speter
6397251883Speter# AM_AUTOMAKE_VERSION(VERSION)
6398251883Speter# ----------------------------
6399251883Speter# Automake X.Y traces this macro to ensure aclocal.m4 has been
6400251883Speter# generated from the m4 files accompanying Automake X.Y.
6401251883SpeterAC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
6402251883Speter
6403251883Speter# AM_SET_CURRENT_AUTOMAKE_VERSION
6404251883Speter# -------------------------------
6405251883Speter# Call AM_AUTOMAKE_VERSION so it can be traced.
6406251883Speter# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
6407251883SpeterAC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
6408251883Speter	 [AM_AUTOMAKE_VERSION([1.9.6])])
6409251883Speter
6410251883Speter# AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
6411251883Speter
6412251883Speter# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6413251883Speter#
6414251883Speter# This file is free software; the Free Software Foundation
6415251883Speter# gives unlimited permission to copy and/or distribute it,
6416251883Speter# with or without modifications, as long as this notice is preserved.
6417251883Speter
6418251883Speter# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
6419251883Speter# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
6420251883Speter# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
6421251883Speter#
6422251883Speter# Of course, Automake must honor this variable whenever it calls a
6423251883Speter# tool from the auxiliary directory.  The problem is that $srcdir (and
6424251883Speter# therefore $ac_aux_dir as well) can be either absolute or relative,
6425251883Speter# depending on how configure is run.  This is pretty annoying, since
6426251883Speter# it makes $ac_aux_dir quite unusable in subdirectories: in the top
6427251883Speter# source directory, any form will work fine, but in subdirectories a
6428251883Speter# relative path needs to be adjusted first.
6429251883Speter#
6430251883Speter# $ac_aux_dir/missing
6431251883Speter#    fails when called from a subdirectory if $ac_aux_dir is relative
6432251883Speter# $top_srcdir/$ac_aux_dir/missing
6433251883Speter#    fails if $ac_aux_dir is absolute,
6434251883Speter#    fails when called from a subdirectory in a VPATH build with
6435251883Speter#          a relative $ac_aux_dir
6436251883Speter#
6437251883Speter# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
6438251883Speter# are both prefixed by $srcdir.  In an in-source build this is usually
6439251883Speter# harmless because $srcdir is `.', but things will broke when you
6440251883Speter# start a VPATH build or use an absolute $srcdir.
6441251883Speter#
6442251883Speter# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
6443251883Speter# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
6444251883Speter#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
6445251883Speter# and then we would define $MISSING as
6446251883Speter#   MISSING="\${SHELL} $am_aux_dir/missing"
6447251883Speter# This will work as long as MISSING is not called from configure, because
6448251883Speter# unfortunately $(top_srcdir) has no meaning in configure.
6449251883Speter# However there are other variables, like CC, which are often used in
6450251883Speter# configure, and could therefore not use this "fixed" $ac_aux_dir.
6451251883Speter#
6452251883Speter# Another solution, used here, is to always expand $ac_aux_dir to an
6453251883Speter# absolute PATH.  The drawback is that using absolute paths prevent a
6454251883Speter# configured tree to be moved without reconfiguration.
6455251883Speter
6456251883SpeterAC_DEFUN([AM_AUX_DIR_EXPAND],
6457251883Speter[dnl Rely on autoconf to set up CDPATH properly.
6458251883SpeterAC_PREREQ([2.50])dnl
6459251883Speter# expand $ac_aux_dir to an absolute path
6460251883Speteram_aux_dir=`cd $ac_aux_dir && pwd`
6461251883Speter])
6462251883Speter
6463251883Speter# AM_CONDITIONAL                                            -*- Autoconf -*-
6464251883Speter
6465251883Speter# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005
6466251883Speter# Free Software Foundation, Inc.
6467251883Speter#
6468251883Speter# This file is free software; the Free Software Foundation
6469251883Speter# gives unlimited permission to copy and/or distribute it,
6470251883Speter# with or without modifications, as long as this notice is preserved.
6471251883Speter
6472251883Speter# serial 7
6473251883Speter
6474251883Speter# AM_CONDITIONAL(NAME, SHELL-CONDITION)
6475251883Speter# -------------------------------------
6476251883Speter# Define a conditional.
6477251883SpeterAC_DEFUN([AM_CONDITIONAL],
6478251883Speter[AC_PREREQ(2.52)dnl
6479251883Speter ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
6480251883Speter	[$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
6481251883SpeterAC_SUBST([$1_TRUE])
6482251883SpeterAC_SUBST([$1_FALSE])
6483251883Speterif $2; then
6484251883Speter  $1_TRUE=
6485251883Speter  $1_FALSE='#'
6486251883Speterelse
6487251883Speter  $1_TRUE='#'
6488251883Speter  $1_FALSE=
6489251883Speterfi
6490251883SpeterAC_CONFIG_COMMANDS_PRE(
6491251883Speter[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
6492251883Speter  AC_MSG_ERROR([[conditional "$1" was never defined.
6493251883SpeterUsually this means the macro was only invoked conditionally.]])
6494251883Speterfi])])
6495251883Speter
6496251883Speter
6497251883Speter# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6498251883Speter# Free Software Foundation, Inc.
6499251883Speter#
6500251883Speter# This file is free software; the Free Software Foundation
6501251883Speter# gives unlimited permission to copy and/or distribute it,
6502251883Speter# with or without modifications, as long as this notice is preserved.
6503251883Speter
6504251883Speter# serial 8
6505251883Speter
6506251883Speter# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
6507251883Speter# written in clear, in which case automake, when reading aclocal.m4,
6508251883Speter# will think it sees a *use*, and therefore will trigger all it's
6509251883Speter# C support machinery.  Also note that it means that autoscan, seeing
6510251883Speter# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
6511251883Speter
6512251883Speter
6513251883Speter# _AM_DEPENDENCIES(NAME)
6514251883Speter# ----------------------
6515251883Speter# See how the compiler implements dependency checking.
6516251883Speter# NAME is "CC", "CXX", "GCJ", or "OBJC".
6517251883Speter# We try a few techniques and use that to set a single cache variable.
6518251883Speter#
6519251883Speter# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
6520251883Speter# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
6521251883Speter# dependency, and given that the user is not expected to run this macro,
6522251883Speter# just rely on AC_PROG_CC.
6523251883SpeterAC_DEFUN([_AM_DEPENDENCIES],
6524251883Speter[AC_REQUIRE([AM_SET_DEPDIR])dnl
6525251883SpeterAC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
6526251883SpeterAC_REQUIRE([AM_MAKE_INCLUDE])dnl
6527251883SpeterAC_REQUIRE([AM_DEP_TRACK])dnl
6528251883Speter
6529251883Speterifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
6530251883Speter       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
6531251883Speter       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
6532251883Speter       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
6533251883Speter                   [depcc="$$1"   am_compiler_list=])
6534251883Speter
6535251883SpeterAC_CACHE_CHECK([dependency style of $depcc],
6536251883Speter               [am_cv_$1_dependencies_compiler_type],
6537251883Speter[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
6538251883Speter  # We make a subdir and do the tests there.  Otherwise we can end up
6539251883Speter  # making bogus files that we don't know about and never remove.  For
6540251883Speter  # instance it was reported that on HP-UX the gcc test will end up
6541251883Speter  # making a dummy file named `D' -- because `-MD' means `put the output
6542251883Speter  # in D'.
6543251883Speter  mkdir conftest.dir
6544251883Speter  # Copy depcomp to subdir because otherwise we won't find it if we're
6545251883Speter  # using a relative directory.
6546251883Speter  cp "$am_depcomp" conftest.dir
6547251883Speter  cd conftest.dir
6548251883Speter  # We will build objects and dependencies in a subdirectory because
6549251883Speter  # it helps to detect inapplicable dependency modes.  For instance
6550251883Speter  # both Tru64's cc and ICC support -MD to output dependencies as a
6551251883Speter  # side effect of compilation, but ICC will put the dependencies in
6552251883Speter  # the current directory while Tru64 will put them in the object
6553251883Speter  # directory.
6554251883Speter  mkdir sub
6555251883Speter
6556251883Speter  am_cv_$1_dependencies_compiler_type=none
6557251883Speter  if test "$am_compiler_list" = ""; then
6558251883Speter     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
6559251883Speter  fi
6560251883Speter  for depmode in $am_compiler_list; do
6561251883Speter    # Setup a source with many dependencies, because some compilers
6562251883Speter    # like to wrap large dependency lists on column 80 (with \), and
6563251883Speter    # we should not choose a depcomp mode which is confused by this.
6564251883Speter    #
6565251883Speter    # We need to recreate these files for each test, as the compiler may
6566251883Speter    # overwrite some of them when testing with obscure command lines.
6567251883Speter    # This happens at least with the AIX C compiler.
6568251883Speter    : > sub/conftest.c
6569251883Speter    for i in 1 2 3 4 5 6; do
6570251883Speter      echo '#include "conftst'$i'.h"' >> sub/conftest.c
6571251883Speter      # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6572251883Speter      # Solaris 8's {/usr,}/bin/sh.
6573251883Speter      touch sub/conftst$i.h
6574251883Speter    done
6575251883Speter    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
6576251883Speter
6577251883Speter    case $depmode in
6578251883Speter    nosideeffect)
6579251883Speter      # after this tag, mechanisms are not by side-effect, so they'll
6580251883Speter      # only be used when explicitly requested
6581251883Speter      if test "x$enable_dependency_tracking" = xyes; then
6582251883Speter	continue
6583251883Speter      else
6584251883Speter	break
6585251883Speter      fi
6586251883Speter      ;;
6587251883Speter    none) break ;;
6588251883Speter    esac
6589251883Speter    # We check with `-c' and `-o' for the sake of the "dashmstdout"
6590251883Speter    # mode.  It turns out that the SunPro C++ compiler does not properly
6591251883Speter    # handle `-M -o', and we need to detect this.
6592251883Speter    if depmode=$depmode \
6593251883Speter       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6594251883Speter       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6595251883Speter       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
6596251883Speter         >/dev/null 2>conftest.err &&
6597251883Speter       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
6598251883Speter       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
6599251883Speter       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
6600251883Speter      # icc doesn't choke on unknown options, it will just issue warnings
6601251883Speter      # or remarks (even with -Werror).  So we grep stderr for any message
6602251883Speter      # that says an option was ignored or not supported.
6603251883Speter      # When given -MP, icc 7.0 and 7.1 complain thusly:
6604251883Speter      #   icc: Command line warning: ignoring option '-M'; no argument required
6605251883Speter      # The diagnosis changed in icc 8.0:
6606251883Speter      #   icc: Command line remark: option '-MP' not supported
6607251883Speter      if (grep 'ignoring option' conftest.err ||
6608251883Speter          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6609251883Speter        am_cv_$1_dependencies_compiler_type=$depmode
6610251883Speter        break
6611251883Speter      fi
6612251883Speter    fi
6613251883Speter  done
6614251883Speter
6615251883Speter  cd ..
6616251883Speter  rm -rf conftest.dir
6617251883Speterelse
6618251883Speter  am_cv_$1_dependencies_compiler_type=none
6619251883Speterfi
6620251883Speter])
6621251883SpeterAC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
6622251883SpeterAM_CONDITIONAL([am__fastdep$1], [
6623251883Speter  test "x$enable_dependency_tracking" != xno \
6624251883Speter  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
6625251883Speter])
6626251883Speter
6627251883Speter
6628251883Speter# AM_SET_DEPDIR
6629251883Speter# -------------
6630251883Speter# Choose a directory name for dependency files.
6631251883Speter# This macro is AC_REQUIREd in _AM_DEPENDENCIES
6632251883SpeterAC_DEFUN([AM_SET_DEPDIR],
6633251883Speter[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
6634251883SpeterAC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
6635251883Speter])
6636251883Speter
6637251883Speter
6638251883Speter# AM_DEP_TRACK
6639251883Speter# ------------
6640251883SpeterAC_DEFUN([AM_DEP_TRACK],
6641251883Speter[AC_ARG_ENABLE(dependency-tracking,
6642251883Speter[  --disable-dependency-tracking  speeds up one-time build
6643251883Speter  --enable-dependency-tracking   do not reject slow dependency extractors])
6644251883Speterif test "x$enable_dependency_tracking" != xno; then
6645251883Speter  am_depcomp="$ac_aux_dir/depcomp"
6646251883Speter  AMDEPBACKSLASH='\'
6647251883Speterfi
6648251883SpeterAM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
6649251883SpeterAC_SUBST([AMDEPBACKSLASH])
6650251883Speter])
6651251883Speter
6652251883Speter# Generate code to set up dependency tracking.              -*- Autoconf -*-
6653251883Speter
6654251883Speter# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
6655251883Speter# Free Software Foundation, Inc.
6656251883Speter#
6657251883Speter# This file is free software; the Free Software Foundation
6658251883Speter# gives unlimited permission to copy and/or distribute it,
6659251883Speter# with or without modifications, as long as this notice is preserved.
6660251883Speter
6661251883Speter#serial 3
6662251883Speter
6663251883Speter# _AM_OUTPUT_DEPENDENCY_COMMANDS
6664251883Speter# ------------------------------
6665251883SpeterAC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
6666251883Speter[for mf in $CONFIG_FILES; do
6667251883Speter  # Strip MF so we end up with the name of the file.
6668251883Speter  mf=`echo "$mf" | sed -e 's/:.*$//'`
6669251883Speter  # Check whether this is an Automake generated Makefile or not.
6670251883Speter  # We used to match only the files named `Makefile.in', but
6671251883Speter  # some people rename them; so instead we look at the file content.
6672251883Speter  # Grep'ing the first line is not enough: some people post-process
6673251883Speter  # each Makefile.in and add a new line on top of each file to say so.
6674251883Speter  # So let's grep whole file.
6675251883Speter  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
6676251883Speter    dirpart=`AS_DIRNAME("$mf")`
6677251883Speter  else
6678251883Speter    continue
6679251883Speter  fi
6680251883Speter  # Extract the definition of DEPDIR, am__include, and am__quote
6681251883Speter  # from the Makefile without running `make'.
6682251883Speter  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
6683251883Speter  test -z "$DEPDIR" && continue
6684251883Speter  am__include=`sed -n 's/^am__include = //p' < "$mf"`
6685251883Speter  test -z "am__include" && continue
6686251883Speter  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
6687251883Speter  # When using ansi2knr, U may be empty or an underscore; expand it
6688251883Speter  U=`sed -n 's/^U = //p' < "$mf"`
6689251883Speter  # Find all dependency output files, they are included files with
6690251883Speter  # $(DEPDIR) in their names.  We invoke sed twice because it is the
6691251883Speter  # simplest approach to changing $(DEPDIR) to its actual value in the
6692251883Speter  # expansion.
6693251883Speter  for file in `sed -n "
6694251883Speter    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
6695251883Speter       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
6696251883Speter    # Make sure the directory exists.
6697251883Speter    test -f "$dirpart/$file" && continue
6698251883Speter    fdir=`AS_DIRNAME(["$file"])`
6699251883Speter    AS_MKDIR_P([$dirpart/$fdir])
6700251883Speter    # echo "creating $dirpart/$file"
6701251883Speter    echo '# dummy' > "$dirpart/$file"
6702251883Speter  done
6703251883Speterdone
6704251883Speter])# _AM_OUTPUT_DEPENDENCY_COMMANDS
6705251883Speter
6706251883Speter
6707251883Speter# AM_OUTPUT_DEPENDENCY_COMMANDS
6708251883Speter# -----------------------------
6709251883Speter# This macro should only be invoked once -- use via AC_REQUIRE.
6710251883Speter#
6711251883Speter# This code is only required when automatic dependency tracking
6712251883Speter# is enabled.  FIXME.  This creates each `.P' file that we will
6713251883Speter# need in order to bootstrap the dependency handling code.
6714251883SpeterAC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
6715251883Speter[AC_CONFIG_COMMANDS([depfiles],
6716251883Speter     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
6717251883Speter     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
6718251883Speter])
6719251883Speter
6720251883Speter# Do all the work for Automake.                             -*- Autoconf -*-
6721251883Speter
6722251883Speter# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
6723251883Speter# Free Software Foundation, Inc.
6724251883Speter#
6725251883Speter# This file is free software; the Free Software Foundation
6726251883Speter# gives unlimited permission to copy and/or distribute it,
6727251883Speter# with or without modifications, as long as this notice is preserved.
6728251883Speter
6729251883Speter# serial 12
6730251883Speter
6731251883Speter# This macro actually does too much.  Some checks are only needed if
6732251883Speter# your package does certain things.  But this isn't really a big deal.
6733251883Speter
6734251883Speter# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
6735251883Speter# AM_INIT_AUTOMAKE([OPTIONS])
6736251883Speter# -----------------------------------------------
6737251883Speter# The call with PACKAGE and VERSION arguments is the old style
6738251883Speter# call (pre autoconf-2.50), which is being phased out.  PACKAGE
6739251883Speter# and VERSION should now be passed to AC_INIT and removed from
6740251883Speter# the call to AM_INIT_AUTOMAKE.
6741251883Speter# We support both call styles for the transition.  After
6742251883Speter# the next Automake release, Autoconf can make the AC_INIT
6743251883Speter# arguments mandatory, and then we can depend on a new Autoconf
6744251883Speter# release and drop the old call support.
6745251883SpeterAC_DEFUN([AM_INIT_AUTOMAKE],
6746251883Speter[AC_PREREQ([2.58])dnl
6747251883Speterdnl Autoconf wants to disallow AM_ names.  We explicitly allow
6748251883Speterdnl the ones we care about.
6749251883Speterm4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
6750251883SpeterAC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
6751251883SpeterAC_REQUIRE([AC_PROG_INSTALL])dnl
6752251883Speter# test to see if srcdir already configured
6753251883Speterif test "`cd $srcdir && pwd`" != "`pwd`" &&
6754251883Speter   test -f $srcdir/config.status; then
6755251883Speter  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
6756251883Speterfi
6757251883Speter
6758251883Speter# test whether we have cygpath
6759251883Speterif test -z "$CYGPATH_W"; then
6760251883Speter  if (cygpath --version) >/dev/null 2>/dev/null; then
6761251883Speter    CYGPATH_W='cygpath -w'
6762251883Speter  else
6763251883Speter    CYGPATH_W=echo
6764251883Speter  fi
6765251883Speterfi
6766251883SpeterAC_SUBST([CYGPATH_W])
6767251883Speter
6768251883Speter# Define the identity of the package.
6769251883Speterdnl Distinguish between old-style and new-style calls.
6770251883Speterm4_ifval([$2],
6771251883Speter[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
6772251883Speter AC_SUBST([PACKAGE], [$1])dnl
6773251883Speter AC_SUBST([VERSION], [$2])],
6774251883Speter[_AM_SET_OPTIONS([$1])dnl
6775251883Speter AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
6776251883Speter AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
6777251883Speter
6778251883Speter_AM_IF_OPTION([no-define],,
6779251883Speter[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
6780251883Speter AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
6781251883Speter
6782251883Speter# Some tools Automake needs.
6783251883SpeterAC_REQUIRE([AM_SANITY_CHECK])dnl
6784251883SpeterAC_REQUIRE([AC_ARG_PROGRAM])dnl
6785251883SpeterAM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
6786251883SpeterAM_MISSING_PROG(AUTOCONF, autoconf)
6787251883SpeterAM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
6788251883SpeterAM_MISSING_PROG(AUTOHEADER, autoheader)
6789251883SpeterAM_MISSING_PROG(MAKEINFO, makeinfo)
6790251883SpeterAM_PROG_INSTALL_SH
6791251883SpeterAM_PROG_INSTALL_STRIP
6792251883SpeterAC_REQUIRE([AM_PROG_MKDIR_P])dnl
6793251883Speter# We need awk for the "check" target.  The system "awk" is bad on
6794251883Speter# some platforms.
6795251883SpeterAC_REQUIRE([AC_PROG_AWK])dnl
6796251883SpeterAC_REQUIRE([AC_PROG_MAKE_SET])dnl
6797251883SpeterAC_REQUIRE([AM_SET_LEADING_DOT])dnl
6798251883Speter_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
6799251883Speter              [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
6800251883Speter	      		     [_AM_PROG_TAR([v7])])])
6801251883Speter_AM_IF_OPTION([no-dependencies],,
6802251883Speter[AC_PROVIDE_IFELSE([AC_PROG_CC],
6803251883Speter                  [_AM_DEPENDENCIES(CC)],
6804251883Speter                  [define([AC_PROG_CC],
6805251883Speter                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
6806251883SpeterAC_PROVIDE_IFELSE([AC_PROG_CXX],
6807251883Speter                  [_AM_DEPENDENCIES(CXX)],
6808251883Speter                  [define([AC_PROG_CXX],
6809251883Speter                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
6810251883Speter])
6811251883Speter])
6812251883Speter
6813251883Speter
6814251883Speter# When config.status generates a header, we must update the stamp-h file.
6815251883Speter# This file resides in the same directory as the config header
6816251883Speter# that is generated.  The stamp files are numbered to have different names.
6817251883Speter
6818251883Speter# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
6819251883Speter# loop where config.status creates the headers, so we can generate
6820251883Speter# our stamp files there.
6821251883SpeterAC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
6822251883Speter[# Compute $1's index in $config_headers.
6823251883Speter_am_stamp_count=1
6824251883Speterfor _am_header in $config_headers :; do
6825251883Speter  case $_am_header in
6826251883Speter    $1 | $1:* )
6827251883Speter      break ;;
6828251883Speter    * )
6829251883Speter      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
6830251883Speter  esac
6831251883Speterdone
6832251883Speterecho "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
6833251883Speter
6834251883Speter# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
6835251883Speter#
6836251883Speter# This file is free software; the Free Software Foundation
6837251883Speter# gives unlimited permission to copy and/or distribute it,
6838251883Speter# with or without modifications, as long as this notice is preserved.
6839251883Speter
6840251883Speter# AM_PROG_INSTALL_SH
6841251883Speter# ------------------
6842251883Speter# Define $install_sh.
6843251883SpeterAC_DEFUN([AM_PROG_INSTALL_SH],
6844251883Speter[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6845251883Speterinstall_sh=${install_sh-"$am_aux_dir/install-sh"}
6846251883SpeterAC_SUBST(install_sh)])
6847251883Speter
6848251883Speter# Copyright (C) 2003, 2005  Free Software Foundation, Inc.
6849251883Speter#
6850251883Speter# This file is free software; the Free Software Foundation
6851251883Speter# gives unlimited permission to copy and/or distribute it,
6852251883Speter# with or without modifications, as long as this notice is preserved.
6853251883Speter
6854251883Speter# serial 2
6855251883Speter
6856251883Speter# Check whether the underlying file-system supports filenames
6857251883Speter# with a leading dot.  For instance MS-DOS doesn't.
6858251883SpeterAC_DEFUN([AM_SET_LEADING_DOT],
6859251883Speter[rm -rf .tst 2>/dev/null
6860251883Spetermkdir .tst 2>/dev/null
6861251883Speterif test -d .tst; then
6862251883Speter  am__leading_dot=.
6863251883Speterelse
6864251883Speter  am__leading_dot=_
6865251883Speterfi
6866251883Speterrmdir .tst 2>/dev/null
6867251883SpeterAC_SUBST([am__leading_dot])])
6868251883Speter
6869251883Speter# Check to see how 'make' treats includes.	            -*- Autoconf -*-
6870251883Speter
6871251883Speter# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
6872251883Speter#
6873251883Speter# This file is free software; the Free Software Foundation
6874251883Speter# gives unlimited permission to copy and/or distribute it,
6875251883Speter# with or without modifications, as long as this notice is preserved.
6876251883Speter
6877251883Speter# serial 3
6878251883Speter
6879251883Speter# AM_MAKE_INCLUDE()
6880251883Speter# -----------------
6881251883Speter# Check to see how make treats includes.
6882251883SpeterAC_DEFUN([AM_MAKE_INCLUDE],
6883251883Speter[am_make=${MAKE-make}
6884251883Spetercat > confinc << 'END'
6885251883Speteram__doit:
6886251883Speter	@echo done
6887251883Speter.PHONY: am__doit
6888251883SpeterEND
6889251883Speter# If we don't find an include directive, just comment out the code.
6890251883SpeterAC_MSG_CHECKING([for style of include used by $am_make])
6891251883Speteram__include="#"
6892251883Speteram__quote=
6893251883Speter_am_result=none
6894251883Speter# First try GNU make style include.
6895251883Speterecho "include confinc" > confmf
6896251883Speter# We grep out `Entering directory' and `Leaving directory'
6897251883Speter# messages which can occur if `w' ends up in MAKEFLAGS.
6898251883Speter# In particular we don't look at `^make:' because GNU make might
6899251883Speter# be invoked under some other name (usually "gmake"), in which
6900251883Speter# case it prints its new name instead of `make'.
6901251883Speterif test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
6902251883Speter   am__include=include
6903251883Speter   am__quote=
6904251883Speter   _am_result=GNU
6905251883Speterfi
6906251883Speter# Now try BSD make style include.
6907251883Speterif test "$am__include" = "#"; then
6908251883Speter   echo '.include "confinc"' > confmf
6909251883Speter   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
6910251883Speter      am__include=.include
6911251883Speter      am__quote="\""
6912251883Speter      _am_result=BSD
6913251883Speter   fi
6914251883Speterfi
6915251883SpeterAC_SUBST([am__include])
6916251883SpeterAC_SUBST([am__quote])
6917251883SpeterAC_MSG_RESULT([$_am_result])
6918251883Speterrm -f confinc confmf
6919251883Speter])
6920251883Speter
6921251883Speter# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
6922251883Speter
6923251883Speter# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2005
6924251883Speter# Free Software Foundation, Inc.
6925251883Speter#
6926251883Speter# This file is free software; the Free Software Foundation
6927251883Speter# gives unlimited permission to copy and/or distribute it,
6928251883Speter# with or without modifications, as long as this notice is preserved.
6929251883Speter
6930251883Speter# serial 4
6931251883Speter
6932251883Speter# AM_MISSING_PROG(NAME, PROGRAM)
6933251883Speter# ------------------------------
6934251883SpeterAC_DEFUN([AM_MISSING_PROG],
6935251883Speter[AC_REQUIRE([AM_MISSING_HAS_RUN])
6936251883Speter$1=${$1-"${am_missing_run}$2"}
6937251883SpeterAC_SUBST($1)])
6938251883Speter
6939251883Speter
6940251883Speter# AM_MISSING_HAS_RUN
6941251883Speter# ------------------
6942251883Speter# Define MISSING if not defined so far and test if it supports --run.
6943251883Speter# If it does, set am_missing_run to use it, otherwise, to nothing.
6944251883SpeterAC_DEFUN([AM_MISSING_HAS_RUN],
6945251883Speter[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
6946251883Spetertest x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
6947251883Speter# Use eval to expand $SHELL
6948251883Speterif eval "$MISSING --run true"; then
6949251883Speter  am_missing_run="$MISSING --run "
6950251883Speterelse
6951251883Speter  am_missing_run=
6952251883Speter  AC_MSG_WARN([`missing' script is too old or missing])
6953251883Speterfi
6954251883Speter])
6955251883Speter
6956251883Speter# Copyright (C) 2003, 2004, 2005  Free Software Foundation, Inc.
6957251883Speter#
6958251883Speter# This file is free software; the Free Software Foundation
6959251883Speter# gives unlimited permission to copy and/or distribute it,
6960251883Speter# with or without modifications, as long as this notice is preserved.
6961251883Speter
6962251883Speter# AM_PROG_MKDIR_P
6963251883Speter# ---------------
6964251883Speter# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
6965251883Speter#
6966251883Speter# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
6967251883Speter# created by `make install' are always world readable, even if the
6968251883Speter# installer happens to have an overly restrictive umask (e.g. 077).
6969251883Speter# This was a mistake.  There are at least two reasons why we must not
6970251883Speter# use `-m 0755':
6971251883Speter#   - it causes special bits like SGID to be ignored,
6972251883Speter#   - it may be too restrictive (some setups expect 775 directories).
6973251883Speter#
6974251883Speter# Do not use -m 0755 and let people choose whatever they expect by
6975251883Speter# setting umask.
6976251883Speter#
6977251883Speter# We cannot accept any implementation of `mkdir' that recognizes `-p'.
6978251883Speter# Some implementations (such as Solaris 8's) are not thread-safe: if a
6979251883Speter# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
6980251883Speter# concurrently, both version can detect that a/ is missing, but only
6981251883Speter# one can create it and the other will error out.  Consequently we
6982251883Speter# restrict ourselves to GNU make (using the --version option ensures
6983251883Speter# this.)
6984251883SpeterAC_DEFUN([AM_PROG_MKDIR_P],
6985251883Speter[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
6986251883Speter  # We used to keeping the `.' as first argument, in order to
6987251883Speter  # allow $(mkdir_p) to be used without argument.  As in
6988251883Speter  #   $(mkdir_p) $(somedir)
6989251883Speter  # where $(somedir) is conditionally defined.  However this is wrong
6990251883Speter  # for two reasons:
6991251883Speter  #  1. if the package is installed by a user who cannot write `.'
6992251883Speter  #     make install will fail,
6993251883Speter  #  2. the above comment should most certainly read
6994251883Speter  #     $(mkdir_p) $(DESTDIR)$(somedir)
6995251883Speter  #     so it does not work when $(somedir) is undefined and
6996251883Speter  #     $(DESTDIR) is not.
6997251883Speter  #  To support the latter case, we have to write
6998251883Speter  #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
6999251883Speter  #  so the `.' trick is pointless.
7000251883Speter  mkdir_p='mkdir -p --'
7001251883Speterelse
7002251883Speter  # On NextStep and OpenStep, the `mkdir' command does not
7003251883Speter  # recognize any option.  It will interpret all options as
7004251883Speter  # directories to create, and then abort because `.' already
7005251883Speter  # exists.
7006251883Speter  for d in ./-p ./--version;
7007251883Speter  do
7008251883Speter    test -d $d && rmdir $d
7009251883Speter  done
7010251883Speter  # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
7011251883Speter  if test -f "$ac_aux_dir/mkinstalldirs"; then
7012251883Speter    mkdir_p='$(mkinstalldirs)'
7013251883Speter  else
7014251883Speter    mkdir_p='$(install_sh) -d'
7015251883Speter  fi
7016251883Speterfi
7017251883SpeterAC_SUBST([mkdir_p])])
7018251883Speter
7019251883Speter# Helper functions for option handling.                     -*- Autoconf -*-
7020251883Speter
7021251883Speter# Copyright (C) 2001, 2002, 2003, 2005  Free Software Foundation, Inc.
7022251883Speter#
7023251883Speter# This file is free software; the Free Software Foundation
7024251883Speter# gives unlimited permission to copy and/or distribute it,
7025251883Speter# with or without modifications, as long as this notice is preserved.
7026251883Speter
7027251883Speter# serial 3
7028251883Speter
7029251883Speter# _AM_MANGLE_OPTION(NAME)
7030251883Speter# -----------------------
7031251883SpeterAC_DEFUN([_AM_MANGLE_OPTION],
7032251883Speter[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
7033251883Speter
7034251883Speter# _AM_SET_OPTION(NAME)
7035251883Speter# ------------------------------
7036251883Speter# Set option NAME.  Presently that only means defining a flag for this option.
7037251883SpeterAC_DEFUN([_AM_SET_OPTION],
7038251883Speter[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
7039251883Speter
7040251883Speter# _AM_SET_OPTIONS(OPTIONS)
7041251883Speter# ----------------------------------
7042251883Speter# OPTIONS is a space-separated list of Automake options.
7043251883SpeterAC_DEFUN([_AM_SET_OPTIONS],
7044251883Speter[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
7045251883Speter
7046251883Speter# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
7047251883Speter# -------------------------------------------
7048251883Speter# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
7049251883SpeterAC_DEFUN([_AM_IF_OPTION],
7050251883Speter[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
7051251883Speter
7052251883Speter# Check to make sure that the build environment is sane.    -*- Autoconf -*-
7053251883Speter
7054251883Speter# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
7055251883Speter# Free Software Foundation, Inc.
7056251883Speter#
7057251883Speter# This file is free software; the Free Software Foundation
7058251883Speter# gives unlimited permission to copy and/or distribute it,
7059251883Speter# with or without modifications, as long as this notice is preserved.
7060251883Speter
7061251883Speter# serial 4
7062251883Speter
7063251883Speter# AM_SANITY_CHECK
7064251883Speter# ---------------
7065251883SpeterAC_DEFUN([AM_SANITY_CHECK],
7066251883Speter[AC_MSG_CHECKING([whether build environment is sane])
7067251883Speter# Just in case
7068251883Spetersleep 1
7069251883Speterecho timestamp > conftest.file
7070251883Speter# Do `set' in a subshell so we don't clobber the current shell's
7071251883Speter# arguments.  Must try -L first in case configure is actually a
7072251883Speter# symlink; some systems play weird games with the mod time of symlinks
7073251883Speter# (eg FreeBSD returns the mod time of the symlink's containing
7074251883Speter# directory).
7075251883Speterif (
7076251883Speter   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
7077251883Speter   if test "$[*]" = "X"; then
7078251883Speter      # -L didn't work.
7079251883Speter      set X `ls -t $srcdir/configure conftest.file`
7080251883Speter   fi
7081251883Speter   rm -f conftest.file
7082251883Speter   if test "$[*]" != "X $srcdir/configure conftest.file" \
7083251883Speter      && test "$[*]" != "X conftest.file $srcdir/configure"; then
7084251883Speter
7085251883Speter      # If neither matched, then we have a broken ls.  This can happen
7086251883Speter      # if, for instance, CONFIG_SHELL is bash and it inherits a
7087251883Speter      # broken ls alias from the environment.  This has actually
7088251883Speter      # happened.  Such a system could not be considered "sane".
7089251883Speter      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
7090251883Speteralias in your environment])
7091251883Speter   fi
7092251883Speter
7093251883Speter   test "$[2]" = conftest.file
7094251883Speter   )
7095251883Speterthen
7096251883Speter   # Ok.
7097251883Speter   :
7098251883Speterelse
7099251883Speter   AC_MSG_ERROR([newly created file is older than distributed files!
7100251883SpeterCheck your system clock])
7101251883Speterfi
7102251883SpeterAC_MSG_RESULT(yes)])
7103251883Speter
7104251883Speter# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
7105251883Speter#
7106251883Speter# This file is free software; the Free Software Foundation
7107251883Speter# gives unlimited permission to copy and/or distribute it,
7108251883Speter# with or without modifications, as long as this notice is preserved.
7109251883Speter
7110251883Speter# AM_PROG_INSTALL_STRIP
7111251883Speter# ---------------------
7112251883Speter# One issue with vendor `install' (even GNU) is that you can't
7113251883Speter# specify the program used to strip binaries.  This is especially
7114251883Speter# annoying in cross-compiling environments, where the build's strip
7115251883Speter# is unlikely to handle the host's binaries.
7116251883Speter# Fortunately install-sh will honor a STRIPPROG variable, so we
7117251883Speter# always use install-sh in `make install-strip', and initialize
7118251883Speter# STRIPPROG with the value of the STRIP variable (set by the user).
7119251883SpeterAC_DEFUN([AM_PROG_INSTALL_STRIP],
7120251883Speter[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
7121251883Speter# Installed binaries are usually stripped using `strip' when the user
7122251883Speter# run `make install-strip'.  However `strip' might not be the right
7123251883Speter# tool to use in cross-compilation environments, therefore Automake
7124251883Speter# will honor the `STRIP' environment variable to overrule this program.
7125251883Speterdnl Don't test for $cross_compiling = yes, because it might be `maybe'.
7126251883Speterif test "$cross_compiling" != no; then
7127251883Speter  AC_CHECK_TOOL([STRIP], [strip], :)
7128251883Speterfi
7129251883SpeterINSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
7130251883SpeterAC_SUBST([INSTALL_STRIP_PROGRAM])])
7131251883Speter
7132251883Speter# Check how to create a tarball.                            -*- Autoconf -*-
7133251883Speter
7134251883Speter# Copyright (C) 2004, 2005  Free Software Foundation, Inc.
7135251883Speter#
7136251883Speter# This file is free software; the Free Software Foundation
7137251883Speter# gives unlimited permission to copy and/or distribute it,
7138251883Speter# with or without modifications, as long as this notice is preserved.
7139251883Speter
7140251883Speter# serial 2
7141251883Speter
7142251883Speter# _AM_PROG_TAR(FORMAT)
7143251883Speter# --------------------
7144251883Speter# Check how to create a tarball in format FORMAT.
7145251883Speter# FORMAT should be one of `v7', `ustar', or `pax'.
7146251883Speter#
7147251883Speter# Substitute a variable $(am__tar) that is a command
7148251883Speter# writing to stdout a FORMAT-tarball containing the directory
7149251883Speter# $tardir.
7150251883Speter#     tardir=directory && $(am__tar) > result.tar
7151251883Speter#
7152251883Speter# Substitute a variable $(am__untar) that extract such
7153251883Speter# a tarball read from stdin.
7154251883Speter#     $(am__untar) < result.tar
7155251883SpeterAC_DEFUN([_AM_PROG_TAR],
7156251883Speter[# Always define AMTAR for backward compatibility.
7157251883SpeterAM_MISSING_PROG([AMTAR], [tar])
7158251883Speterm4_if([$1], [v7],
7159251883Speter     [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
7160251883Speter     [m4_case([$1], [ustar],, [pax],,
7161251883Speter              [m4_fatal([Unknown tar format])])
7162251883SpeterAC_MSG_CHECKING([how to create a $1 tar archive])
7163251883Speter# Loop over all known methods to create a tar archive until one works.
7164251883Speter_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
7165251883Speter_am_tools=${am_cv_prog_tar_$1-$_am_tools}
7166251883Speter# Do not fold the above two line into one, because Tru64 sh and
7167251883Speter# Solaris sh will not grok spaces in the rhs of `-'.
7168251883Speterfor _am_tool in $_am_tools
7169251883Speterdo
7170251883Speter  case $_am_tool in
7171251883Speter  gnutar)
7172251883Speter    for _am_tar in tar gnutar gtar;
7173251883Speter    do
7174251883Speter      AM_RUN_LOG([$_am_tar --version]) && break
7175251883Speter    done
7176251883Speter    am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
7177251883Speter    am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
7178251883Speter    am__untar="$_am_tar -xf -"
7179251883Speter    ;;
7180251883Speter  plaintar)
7181251883Speter    # Must skip GNU tar: if it does not support --format= it doesn't create
7182251883Speter    # ustar tarball either.
7183251883Speter    (tar --version) >/dev/null 2>&1 && continue
7184251883Speter    am__tar='tar chf - "$$tardir"'
7185251883Speter    am__tar_='tar chf - "$tardir"'
7186251883Speter    am__untar='tar xf -'
7187251883Speter    ;;
7188251883Speter  pax)
7189251883Speter    am__tar='pax -L -x $1 -w "$$tardir"'
7190251883Speter    am__tar_='pax -L -x $1 -w "$tardir"'
7191251883Speter    am__untar='pax -r'
7192251883Speter    ;;
7193251883Speter  cpio)
7194251883Speter    am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
7195251883Speter    am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
7196251883Speter    am__untar='cpio -i -H $1 -d'
7197251883Speter    ;;
7198251883Speter  none)
7199251883Speter    am__tar=false
7200251883Speter    am__tar_=false
7201251883Speter    am__untar=false
7202251883Speter    ;;
7203251883Speter  esac
7204251883Speter
7205251883Speter  # If the value was cached, stop now.  We just wanted to have am__tar
7206251883Speter  # and am__untar set.
7207251883Speter  test -n "${am_cv_prog_tar_$1}" && break
7208251883Speter
7209251883Speter  # tar/untar a dummy directory, and stop if the command works
7210251883Speter  rm -rf conftest.dir
7211251883Speter  mkdir conftest.dir
7212251883Speter  echo GrepMe > conftest.dir/file
7213251883Speter  AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
7214251883Speter  rm -rf conftest.dir
7215251883Speter  if test -s conftest.tar; then
7216251883Speter    AM_RUN_LOG([$am__untar <conftest.tar])
7217251883Speter    grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
7218251883Speter  fi
7219251883Speterdone
7220251883Speterrm -rf conftest.dir
7221251883Speter
7222251883SpeterAC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
7223251883SpeterAC_MSG_RESULT([$am_cv_prog_tar_$1])])
7224251883SpeterAC_SUBST([am__tar])
7225251883SpeterAC_SUBST([am__untar])
7226251883Speter]) # _AM_PROG_TAR
7227251883Speter
7228