xref: /PHP-7.3/build/libtool.m4 (revision 00ba784a)
1# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
2## Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
3## 2008  Free Software Foundation, Inc.
4## Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
5##
6## This file is free software; the Free Software Foundation gives
7## unlimited permission to copy and/or distribute it, with or without
8## modifications, as long as this notice is preserved.
9
10# serial 52 AC_PROG_LIBTOOL
11
12ifdef([AC_ACVERSION],[
13# autoconf 2.13 compatibility
14# Set PATH_SEPARATOR variable
15# ---------------------------------
16# Find the correct PATH separator.  Usually this is :', but
17# DJGPP uses ;' like DOS.
18if test "X${PATH_SEPARATOR+set}" != Xset; then
19  UNAME=${UNAME-`uname 2>/dev/null`}
20  case X$UNAME in
21    *-DOS) lt_cv_sys_path_separator=';' ;;
22    *)     lt_cv_sys_path_separator=':' ;;
23  esac
24  PATH_SEPARATOR=$lt_cv_sys_path_separator
25fi
26])
27
28# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED)
29# -----------------------------------------------------------
30# If this macro is not defined by Autoconf, define it here.
31ifdef([AC_PROVIDE_IFELSE],
32         [],
33         [define([AC_PROVIDE_IFELSE],
34	         [ifdef([AC_PROVIDE_$1],
35		           [$2], [$3])])])
36
37# AC_PROG_LIBTOOL
38# ---------------
39AC_DEFUN([AC_PROG_LIBTOOL],
40[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl
41dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX
42dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX.
43  AC_PROVIDE_IFELSE([AC_PROG_CXX],
44    [AC_LIBTOOL_CXX],
45    [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX
46  ])])
47])# AC_PROG_LIBTOOL
48
49
50# _AC_PROG_LIBTOOL
51# ----------------
52AC_DEFUN([_AC_PROG_LIBTOOL],
53[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl
54AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl
55
56# This can be used to rebuild libtool when needed
57LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
58
59# Always use our own libtool.
60LIBTOOL='$(SHELL) $(top_builddir)/libtool'
61AC_SUBST(LIBTOOL)dnl
62
63# Prevent multiple expansion
64define([AC_PROG_LIBTOOL], [])
65])# _AC_PROG_LIBTOOL
66
67
68# AC_LIBTOOL_SETUP
69# ----------------
70AC_DEFUN([AC_LIBTOOL_SETUP],
71[AC_PREREQ(2.13)dnl
72AC_REQUIRE([AC_ENABLE_SHARED])dnl
73AC_REQUIRE([AC_ENABLE_STATIC])dnl
74AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl
75AC_REQUIRE([AC_CANONICAL_HOST])dnl
76AC_REQUIRE([AC_CANONICAL_BUILD])dnl
77AC_REQUIRE([AC_PROG_CC])dnl
78AC_REQUIRE([AC_PROG_LD])dnl
79AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl
80AC_REQUIRE([AC_PROG_NM])dnl
81
82AC_REQUIRE([AC_PROG_LN_S])dnl
83AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl
84# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
85AC_REQUIRE([AC_OBJEXT])dnl
86AC_REQUIRE([AC_EXEEXT])dnl
87dnl
88AC_LIBTOOL_SYS_MAX_CMD_LEN
89AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
90AC_LIBTOOL_OBJDIR
91
92AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
93_LT_AC_PROG_ECHO_BACKSLASH
94
95case $host_os in
96aix3*)
97  # AIX sometimes has problems with the GCC collect2 program.  For some
98  # reason, if we set the COLLECT_NAMES environment variable, the problems
99  # vanish in a puff of smoke.
100  if test "X${COLLECT_NAMES+set}" != Xset; then
101    COLLECT_NAMES=
102    export COLLECT_NAMES
103  fi
104  ;;
105esac
106
107# Sed substitution that helps us do robust quoting.  It backslashifies
108# metacharacters that are still active within double-quoted strings.
109Xsed='sed -e 1s/^X//'
110[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g']
111
112# Same as above, but do not quote variable references.
113[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g']
114
115# Sed substitution to delay expansion of an escaped shell variable in a
116# double_quote_subst'ed string.
117delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
118
119# Sed substitution to avoid accidental globbing in evaled expressions
120no_glob_subst='s/\*/\\\*/g'
121
122# Constants:
123rm="rm -f"
124
125# Global variables:
126default_ofile=libtool
127can_build_shared=yes
128
129# All known linkers require a `.a' archive for static linking (except MSVC,
130# which needs '.lib').
131libext=a
132ltmain="$ac_aux_dir/ltmain.sh"
133ofile="$default_ofile"
134with_gnu_ld="$lt_cv_prog_gnu_ld"
135
136AC_CHECK_TOOL(AR, ar, false)
137AC_CHECK_TOOL(RANLIB, ranlib, :)
138AC_CHECK_TOOL(STRIP, strip, :)
139
140old_CC="$CC"
141old_CFLAGS="$CFLAGS"
142
143# Set sane defaults for various variables
144test -z "$AR" && AR=ar
145test -z "$AR_FLAGS" && AR_FLAGS=cru
146test -z "$AS" && AS=as
147test -z "$CC" && CC=cc
148test -z "$LTCC" && LTCC=$CC
149test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
150test -z "$DLLTOOL" && DLLTOOL=dlltool
151test -z "$LD" && LD=ld
152test -z "$LN_S" && LN_S="ln -s"
153test -z "$MAGIC_CMD" && MAGIC_CMD=file
154test -z "$NM" && NM=nm
155test -z "$SED" && SED=sed
156test -z "$OBJDUMP" && OBJDUMP=objdump
157test -z "$RANLIB" && RANLIB=:
158test -z "$STRIP" && STRIP=:
159test -z "$ac_objext" && ac_objext=o
160
161# Determine commands to create old-style static archives.
162old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
163old_postinstall_cmds='chmod 644 $oldlib'
164old_postuninstall_cmds=
165
166if test -n "$RANLIB"; then
167  case $host_os in
168  openbsd*)
169    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
170    ;;
171  *)
172    old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
173    ;;
174  esac
175  old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
176fi
177
178_LT_CC_BASENAME([$compiler])
179
180# Only perform the check for file, if the check method requires it
181case $deplibs_check_method in
182file_magic*)
183  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
184    AC_PATH_MAGIC
185  fi
186  ;;
187esac
188
189_LT_REQUIRED_DARWIN_CHECKS
190
191AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no)
192AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
193enable_win32_dll=yes, enable_win32_dll=no)
194
195AC_ARG_ENABLE([libtool-lock],
196[  --disable-libtool-lock  Avoid locking (might break parallel builds)])
197test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
198
199AC_ARG_WITH([pic],
200[  --with-pic              Try to use only PIC/non-PIC objects [default=use both]],
201    [pic_mode="$withval"],
202    [pic_mode=default])
203test -z "$pic_mode" && pic_mode=default
204
205# Use C for the default configuration in the libtool script
206tagname=
207AC_LIBTOOL_LANG_C_CONFIG
208_LT_AC_TAGCONFIG
209])# AC_LIBTOOL_SETUP
210
211
212# _LT_AC_SYS_COMPILER
213# -------------------
214AC_DEFUN([_LT_AC_SYS_COMPILER],
215[AC_REQUIRE([AC_PROG_CC])dnl
216
217# If no C compiler was specified, use CC.
218LTCC=${LTCC-"$CC"}
219
220# If no C compiler flags were specified, use CFLAGS.
221LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
222
223# Allow CC to be a program name with arguments.
224compiler=$CC
225])# _LT_AC_SYS_COMPILER
226
227
228# _LT_CC_BASENAME(CC)
229# -------------------
230# Calculate cc_basename.  Skip known compiler wrappers and cross-prefix.
231AC_DEFUN([_LT_CC_BASENAME],
232[for cc_temp in $1""; do
233  case $cc_temp in
234    compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
235    distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
236    \-*) ;;
237    *) break;;
238  esac
239done
240cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
241])
242
243
244# _LT_COMPILER_BOILERPLATE
245# ------------------------
246# Check for compiler boilerplate output or warnings with
247# the simple compiler test code.
248AC_DEFUN([_LT_COMPILER_BOILERPLATE],
249[AC_REQUIRE([LT_AC_PROG_SED])dnl
250ac_outfile=conftest.$ac_objext
251echo "$lt_simple_compile_test_code" >conftest.$ac_ext
252eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
253_lt_compiler_boilerplate=`cat conftest.err`
254$rm conftest*
255])# _LT_COMPILER_BOILERPLATE
256
257
258# _LT_LINKER_BOILERPLATE
259# ----------------------
260# Check for linker boilerplate output or warnings with
261# the simple link test code.
262AC_DEFUN([_LT_LINKER_BOILERPLATE],
263[AC_REQUIRE([LT_AC_PROG_SED])dnl
264ac_outfile=conftest.$ac_objext
265echo "$lt_simple_link_test_code" >conftest.$ac_ext
266eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
267_lt_linker_boilerplate=`cat conftest.err`
268$rm -r conftest*
269])# _LT_LINKER_BOILERPLATE
270
271
272dnl autoconf 2.13 compatibility
273dnl _LT_AC_TRY_LINK()
274AC_DEFUN(_LT_AC_TRY_LINK, [
275cat > conftest.$ac_ext <<EOF
276dnl This sometimes fails to find confdefs.h, for some reason.
277dnl [#]line __oline__ "[$]0"
278[#]line __oline__ "configure"
279#include "confdefs.h"
280int main() {
281; return 0; }
282EOF
283if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
284 ifelse([$1], , :, [$1
285  rm -rf conftest*])
286else
287  echo "configure: failed program was:" >&5
288  cat conftest.$ac_ext >&6
289ifelse([$2], , , [$2
290  rm -rf conftest*
291])dnl
292fi
293rm -f conftest*])
294
295# _LT_REQUIRED_DARWIN_CHECKS
296# --------------------------
297# Check for some things on darwin
298AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS],[
299  case $host_os in
300    rhapsody* | darwin*)
301    AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
302    AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
303
304    AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
305      [lt_cv_apple_cc_single_mod=no
306      if test -z "${LT_MULTI_MODULE}"; then
307   # By default we will add the -single_module flag. You can override
308   # by either setting the environment variable LT_MULTI_MODULE
309   # non-empty at configure time, or by adding -multi_module to the
310   # link flags.
311   echo "int foo(void){return 1;}" > conftest.c
312   $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
313     -dynamiclib ${wl}-single_module conftest.c
314   if test -f libconftest.dylib; then
315     lt_cv_apple_cc_single_mod=yes
316     rm -rf libconftest.dylib*
317   fi
318   rm conftest.c
319      fi])
320    AC_CACHE_CHECK([for -exported_symbols_list linker flag],
321      [lt_cv_ld_exported_symbols_list],
322      [lt_cv_ld_exported_symbols_list=no
323      save_LDFLAGS=$LDFLAGS
324      echo "_main" > conftest.sym
325      LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
326      _LT_AC_TRY_LINK([lt_cv_ld_exported_symbols_list=yes],[lt_cv_ld_exported_symbols_list=no])
327   LDFLAGS="$save_LDFLAGS"
328    ])
329    case $host_os in
330    rhapsody* | darwin1.[[0123]])
331      _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
332    darwin1.*)
333     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
334    darwin*)
335      # if running on 10.5 or later, the deployment target defaults
336      # to the OS version, if on x86, and 10.4, the deployment
337      # target defaults to 10.4. Don't you love it?
338      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
339   10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
340     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
341   10.[[012]]*)
342     _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
343   10.*)
344     _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
345      esac
346    ;;
347  esac
348    if test "$lt_cv_apple_cc_single_mod" = "yes"; then
349      _lt_dar_single_mod='$single_module'
350    fi
351    if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
352      _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
353    else
354      _lt_dar_export_syms="~$NMEDIT -s \$output_objdir/\${libname}-symbols.expsym \${lib}"
355    fi
356    if test "$DSYMUTIL" != ":"; then
357      _lt_dsymutil="~$DSYMUTIL \$lib || :"
358    else
359      _lt_dsymutil=
360    fi
361    ;;
362  esac
363])
364
365# _LT_AC_SYS_LIBPATH_AIX
366# ----------------------
367# Links a minimal program and checks the executable
368# for the system default hardcoded library path. In most cases,
369# this is /usr/lib:/lib, but when the MPI compilers are used
370# the location of the communication and MPI libs are included too.
371# If we don't find anything, use the default library path according
372# to the aix ld manual.
373AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX],
374[AC_REQUIRE([LT_AC_PROG_SED])dnl
375_LT_AC_TRY_LINK([
376lt_aix_libpath_sed='
377    /Import File Strings/,/^$/ {
378	/^0/ {
379	    s/^0  *\(.*\)$/\1/
380	    p
381	}
382    }'
383aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
384# Check for a 64-bit object if we didn't find anything.
385if test -z "$aix_libpath"; then
386  aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
387fi],[])
388if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
389])# _LT_AC_SYS_LIBPATH_AIX
390
391
392# _LT_AC_SHELL_INIT(ARG)
393# ----------------------
394AC_DEFUN([_LT_AC_SHELL_INIT],
395[ifdef([AC_DIVERSION_NOTICE],
396	     [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
397	 [AC_DIVERT_PUSH(NOTICE)])
398$1
399AC_DIVERT_POP
400])# _LT_AC_SHELL_INIT
401
402
403# _LT_AC_PROG_ECHO_BACKSLASH
404# --------------------------
405# Add some code to the start of the generated configure script which
406# will find an echo command which doesn't interpret backslashes.
407AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH],
408[_LT_AC_SHELL_INIT([
409# Check that we are running under the correct shell.
410SHELL=${CONFIG_SHELL-/bin/sh}
411
412case X$ECHO in
413X*--fallback-echo)
414  # Remove one level of quotation (which was required for Make).
415  ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
416  ;;
417esac
418
419echo=${ECHO-echo}
420if test "X[$]1" = X--no-reexec; then
421  # Discard the --no-reexec flag, and continue.
422  shift
423elif test "X[$]1" = X--fallback-echo; then
424  # Avoid inline document here, it may be left over
425  :
426elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then
427  # Yippee, $echo works!
428  :
429else
430  # Restart under the correct shell.
431  exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
432fi
433
434if test "X[$]1" = X--fallback-echo; then
435  # used as fallback echo
436  shift
437  cat <<EOF
438[$]*
439EOF
440  exit 0
441fi
442
443# The HP-UX ksh and POSIX shell print the target directory to stdout
444# if CDPATH is set.
445(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
446
447if test -z "$ECHO"; then
448if test "X${echo_test_string+set}" != Xset; then
449# find a string as large as possible, as long as the shell can cope with it
450  for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
451    # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
452    if (echo_test_string=`eval $cmd`) 2>/dev/null &&
453       echo_test_string=`eval $cmd` &&
454       (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
455    then
456      break
457    fi
458  done
459fi
460
461if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
462   echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
463   test "X$echo_testing_string" = "X$echo_test_string"; then
464  :
465else
466  # The Solaris, AIX, and Digital Unix default echo programs unquote
467  # backslashes.  This makes it impossible to quote backslashes using
468  #   echo "$something" | sed 's/\\/\\\\/g'
469  #
470  # So, first we look for a working echo in the user's PATH.
471
472  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
473  for dir in $PATH /usr/ucb; do
474    IFS="$lt_save_ifs"
475    if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
476       test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
477       echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
478       test "X$echo_testing_string" = "X$echo_test_string"; then
479      echo="$dir/echo"
480      break
481    fi
482  done
483  IFS="$lt_save_ifs"
484
485  if test "X$echo" = Xecho; then
486    # We didn't find a better echo, so look for alternatives.
487    if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
488       echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
489       test "X$echo_testing_string" = "X$echo_test_string"; then
490      # This shell has a builtin print -r that does the trick.
491      echo='print -r'
492    elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
493	 test "X$CONFIG_SHELL" != X/bin/ksh; then
494      # If we have ksh, try running configure again with it.
495      ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
496      export ORIGINAL_CONFIG_SHELL
497      CONFIG_SHELL=/bin/ksh
498      export CONFIG_SHELL
499      exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
500    else
501      # Try using printf.
502      echo='printf %s\n'
503      if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
504	 echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
505	 test "X$echo_testing_string" = "X$echo_test_string"; then
506	# Cool, printf works
507	:
508      elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
509	   test "X$echo_testing_string" = 'X\t' &&
510	   echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
511	   test "X$echo_testing_string" = "X$echo_test_string"; then
512	CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
513	export CONFIG_SHELL
514	SHELL="$CONFIG_SHELL"
515	export SHELL
516	echo="$CONFIG_SHELL [$]0 --fallback-echo"
517      elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
518	   test "X$echo_testing_string" = 'X\t' &&
519	   echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
520	   test "X$echo_testing_string" = "X$echo_test_string"; then
521	echo="$CONFIG_SHELL [$]0 --fallback-echo"
522      else
523	# maybe with a smaller string...
524	prev=:
525
526	for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
527	  if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
528	  then
529	    break
530	  fi
531	  prev="$cmd"
532	done
533
534	if test "$prev" != 'sed 50q "[$]0"'; then
535	  echo_test_string=`eval $prev`
536	  export echo_test_string
537	  exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
538	else
539	  # Oops.  We lost completely, so just stick with echo.
540	  echo=echo
541	fi
542      fi
543    fi
544  fi
545fi
546fi
547
548# Copy echo and quote the copy suitably for passing to libtool from
549# the Makefile, instead of quoting the original, which is used later.
550ECHO=$echo
551if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
552   ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
553fi
554
555AC_SUBST(ECHO)
556])])# _LT_AC_PROG_ECHO_BACKSLASH
557
558
559# _LT_AC_LOCK
560# -----------
561AC_DEFUN([_LT_AC_LOCK],
562[dnl
563#AC_ARG_ENABLE([libtool-lock],
564#[  --disable-libtool-lock  avoid locking (might break parallel builds)])
565#test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
566
567# Some flags need to be propagated to the compiler or linker for good
568# libtool support.
569case $host in
570ia64-*-hpux*)
571  # Find out which ABI we are using.
572  echo 'int i;' > conftest.$ac_ext
573  if AC_TRY_EVAL(ac_compile); then
574    case `/usr/bin/file conftest.$ac_objext` in
575    *ELF-32*)
576      HPUX_IA64_MODE="32"
577      ;;
578    *ELF-64*)
579      HPUX_IA64_MODE="64"
580      ;;
581    esac
582  fi
583  rm -rf conftest*
584  ;;
585*-*-irix6*)
586  # Find out which ABI we are using.
587  echo '[#]line __oline__ "configure"' > conftest.$ac_ext
588  if AC_TRY_EVAL(ac_compile); then
589   if test "$lt_cv_prog_gnu_ld" = yes; then
590    case `/usr/bin/file conftest.$ac_objext` in
591    *32-bit*)
592      LD="${LD-ld} -melf32bsmip"
593      ;;
594    *N32*)
595      LD="${LD-ld} -melf32bmipn32"
596      ;;
597    *64-bit*)
598      LD="${LD-ld} -melf64bmip"
599      ;;
600    esac
601   else
602    case `/usr/bin/file conftest.$ac_objext` in
603    *32-bit*)
604      LD="${LD-ld} -32"
605      ;;
606    *N32*)
607      LD="${LD-ld} -n32"
608      ;;
609    *64-bit*)
610      LD="${LD-ld} -64"
611      ;;
612    esac
613   fi
614  fi
615  rm -rf conftest*
616  ;;
617
618x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
619s390*-*linux*|sparc*-*linux*)
620  # Find out which ABI we are using.
621  echo 'int i;' > conftest.$ac_ext
622  if AC_TRY_EVAL(ac_compile); then
623    case `/usr/bin/file conftest.o` in
624    *32-bit*)
625      case $host in
626        x86_64-*kfreebsd*-gnu)
627          LD="${LD-ld} -m elf_i386_fbsd"
628          ;;
629        x86_64-*linux*)
630          LD="${LD-ld} -m elf_i386"
631          ;;
632        powerpc64le-*linux*)
633          LD="${LD-ld} -m elf32lppclinux"
634          ;;
635        powerpc64-*linux*)
636          LD="${LD-ld} -m elf32ppclinux"
637          ;;
638        s390x-*linux*)
639          LD="${LD-ld} -m elf_s390"
640          ;;
641        sparc64-*linux*)
642          LD="${LD-ld} -m elf32_sparc"
643          ;;
644      esac
645      ;;
646    *64-bit*)
647      case $host in
648        x86_64-*kfreebsd*-gnu)
649          LD="${LD-ld} -m elf_x86_64_fbsd"
650          ;;
651        x86_64-*linux*)
652          LD="${LD-ld} -m elf_x86_64"
653          ;;
654        powerpcle-*linux*)
655          LD="${LD-ld} -m elf64lppc"
656          ;;
657        powerpc-*linux*)
658          LD="${LD-ld} -m elf64ppc"
659          ;;
660        s390*-*linux*)
661          LD="${LD-ld} -m elf64_s390"
662          ;;
663        sparc*-*linux*)
664          LD="${LD-ld} -m elf64_sparc"
665          ;;
666      esac
667      ;;
668    esac
669  fi
670  rm -rf conftest*
671  ;;
672
673*-*-sco3.2v5*)
674  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
675  SAVE_CFLAGS="$CFLAGS"
676  CFLAGS="$CFLAGS -belf"
677  AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
678    [AC_LANG_SAVE
679     AC_LANG_C
680     AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
681     AC_LANG_RESTORE])
682  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
683    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
684    CFLAGS="$SAVE_CFLAGS"
685  fi
686  ;;
687sparc*-*solaris*)
688  # Find out which ABI we are using.
689  echo 'int i;' > conftest.$ac_ext
690  if AC_TRY_EVAL(ac_compile); then
691    case `/usr/bin/file conftest.o` in
692    *64-bit*)
693      case $lt_cv_prog_gnu_ld in
694      yes*) LD="${LD-ld} -m elf64_sparc" ;;
695      *)
696        if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
697	  LD="${LD-ld} -64"
698	fi
699	;;
700      esac
701      ;;
702    esac
703  fi
704  rm -rf conftest*
705  ;;
706
707AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL],
708[*-*-cygwin* | *-*-mingw* | *-*-pw32*)
709  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
710  AC_CHECK_TOOL(AS, as, false)
711  AC_CHECK_TOOL(OBJDUMP, objdump, false)
712  ;;
713  ])
714esac
715
716need_locks="$enable_libtool_lock"
717
718])# _LT_AC_LOCK
719
720
721# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
722#		[OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
723# ----------------------------------------------------------------
724# Check whether the given compiler option works
725AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION],
726[AC_REQUIRE([LT_AC_PROG_SED])
727AC_CACHE_CHECK([$1], [$2],
728  [$2=no
729  ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
730   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
731   lt_compiler_flag="$3"
732   # Insert the option either (1) after the last *FLAGS variable, or
733   # (2) before a word containing "conftest.", or (3) at the end.
734   # Note that $ac_compile itself does not contain backslashes and begins
735   # with a dollar sign (not a hyphen), so the echo should work correctly.
736   # The option is referenced via a variable to avoid confusing sed.
737   lt_compile=`echo "$ac_compile" | $SED \
738   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
739   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
740   -e 's:$: $lt_compiler_flag:'`
741   (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
742   (eval "$lt_compile" 2>conftest.err)
743   ac_status=$?
744   cat conftest.err >&5
745   echo "configure:__oline__: \$? = $ac_status" >&5
746   if (exit $ac_status) && test -s "$ac_outfile"; then
747     # The compiler can only warn and ignore the option if not recognized
748     # So say no if there are warnings other than the usual output.
749     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
750     $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
751     if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
752       $2=yes
753     fi
754   fi
755   $rm conftest*
756])
757
758if test x"[$]$2" = xyes; then
759    ifelse([$5], , :, [$5])
760else
761    ifelse([$6], , :, [$6])
762fi
763])# AC_LIBTOOL_COMPILER_OPTION
764
765
766# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
767#                          [ACTION-SUCCESS], [ACTION-FAILURE])
768# ------------------------------------------------------------
769# Check whether the given compiler option works
770AC_DEFUN([AC_LIBTOOL_LINKER_OPTION],
771[AC_REQUIRE([LT_AC_PROG_SED])dnl
772AC_CACHE_CHECK([$1], [$2],
773  [$2=no
774   save_LDFLAGS="$LDFLAGS"
775   LDFLAGS="$LDFLAGS $3"
776   echo "$lt_simple_link_test_code" > conftest.$ac_ext
777   if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
778     # The linker can only warn and ignore the option if not recognized
779     # So say no if there are warnings
780     if test -s conftest.err; then
781       # Append any errors to the config.log.
782       cat conftest.err 1>&5
783       $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
784       $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
785       if diff conftest.exp conftest.er2 >/dev/null; then
786         $2=yes
787       fi
788     else
789       $2=yes
790     fi
791   fi
792   $rm -r conftest*
793   LDFLAGS="$save_LDFLAGS"
794])
795
796if test x"[$]$2" = xyes; then
797    ifelse([$4], , :, [$4])
798else
799    ifelse([$5], , :, [$5])
800fi
801])# AC_LIBTOOL_LINKER_OPTION
802
803
804# AC_LIBTOOL_SYS_MAX_CMD_LEN
805# --------------------------
806AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN],
807[# find the maximum length of command line arguments
808AC_MSG_CHECKING([the maximum length of command line arguments])
809AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
810  i=0
811  teststring="ABCD"
812
813  case $build_os in
814  msdosdjgpp*)
815    # On DJGPP, this test can blow up pretty badly due to problems in libc
816    # (any single argument exceeding 2000 bytes causes a buffer overrun
817    # during glob expansion).  Even if it were fixed, the result of this
818    # check would be larger than it should be.
819    lt_cv_sys_max_cmd_len=12288;    # 12K is about right
820    ;;
821
822  gnu*)
823    # Under GNU Hurd, this test is not required because there is
824    # no limit to the length of command line arguments.
825    # Libtool will interpret -1 as no limit whatsoever
826    lt_cv_sys_max_cmd_len=-1;
827    ;;
828
829  cygwin* | mingw*)
830    # On Win9x/ME, this test blows up -- it succeeds, but takes
831    # about 5 minutes as the teststring grows exponentially.
832    # Worse, since 9x/ME are not pre-emptively multitasking,
833    # you end up with a "frozen" computer, even though with patience
834    # the test eventually succeeds (with a max line length of 256k).
835    # Instead, let's just punt: use the minimum linelength reported by
836    # all of the supported platforms: 8192 (on NT/2K/XP).
837    lt_cv_sys_max_cmd_len=8192;
838    ;;
839
840  amigaos*)
841    # On AmigaOS with pdksh, this test takes hours, literally.
842    # So we just punt and use a minimum line length of 8192.
843    lt_cv_sys_max_cmd_len=8192;
844    ;;
845
846  netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
847    # This has been around since 386BSD, at least.  Likely further.
848    if test -x /sbin/sysctl; then
849      lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
850    elif test -x /usr/sbin/sysctl; then
851      lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
852    else
853      lt_cv_sys_max_cmd_len=65536	# usable default for all BSDs
854    fi
855    # And add a safety zone
856    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
857    lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
858    ;;
859
860  interix*)
861    # We know the value 262144 and hardcode it with a safety zone (like BSD)
862    lt_cv_sys_max_cmd_len=196608
863    ;;
864
865  osf*)
866    # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
867    # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
868    # nice to cause kernel panics so lets avoid the loop below.
869    # First set a reasonable default.
870    lt_cv_sys_max_cmd_len=16384
871    #
872    if test -x /sbin/sysconfig; then
873      case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
874        *1*) lt_cv_sys_max_cmd_len=-1 ;;
875      esac
876    fi
877    ;;
878  sco3.2v5*)
879    lt_cv_sys_max_cmd_len=102400
880    ;;
881  sysv5* | sco5v6* | sysv4.2uw2*)
882    kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
883    if test -n "$kargmax"; then
884      lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ 	]]//'`
885    else
886      lt_cv_sys_max_cmd_len=32768
887    fi
888    ;;
889  *)
890    lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
891    if test -n "$lt_cv_sys_max_cmd_len"; then
892      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
893      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
894    else
895      SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
896      while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \
897	       = "XX$teststring") >/dev/null 2>&1 &&
898	      new_result=`expr "X$teststring" : ".*" 2>&1` &&
899	      lt_cv_sys_max_cmd_len=$new_result &&
900	      test $i != 17 # 1/2 MB should be enough
901      do
902        i=`expr $i + 1`
903        teststring=$teststring$teststring
904      done
905      teststring=
906      # Add a significant safety factor because C++ compilers can tack on massive
907      # amounts of additional arguments before passing them to the linker.
908      # It appears as though 1/2 is a usable value.
909      lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
910    fi
911    ;;
912  esac
913])
914if test -n $lt_cv_sys_max_cmd_len ; then
915  AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
916else
917  AC_MSG_RESULT(none)
918fi
919])# AC_LIBTOOL_SYS_MAX_CMD_LEN
920
921
922# _LT_AC_CHECK_DLFCN
923# ------------------
924AC_DEFUN([_LT_AC_CHECK_DLFCN],
925[AC_CHECK_HEADERS(dlfcn.h)dnl
926])# _LT_AC_CHECK_DLFCN
927
928
929# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
930#                           ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
931# ---------------------------------------------------------------------
932AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF],
933[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
934if test "$cross_compiling" = yes; then :
935  [$4]
936else
937  lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
938  lt_status=$lt_dlunknown
939  cat > conftest.$ac_ext <<EOF
940[#line __oline__ "configure"
941#include "confdefs.h"
942
943#if HAVE_DLFCN_H
944#include <dlfcn.h>
945#endif
946
947#include <stdio.h>
948
949#ifdef RTLD_GLOBAL
950#  define LT_DLGLOBAL		RTLD_GLOBAL
951#else
952#  ifdef DL_GLOBAL
953#    define LT_DLGLOBAL		DL_GLOBAL
954#  else
955#    define LT_DLGLOBAL		0
956#  endif
957#endif
958
959/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
960   find out it does not work in some platform. */
961#ifndef LT_DLLAZY_OR_NOW
962#  ifdef RTLD_LAZY
963#    define LT_DLLAZY_OR_NOW		RTLD_LAZY
964#  else
965#    ifdef DL_LAZY
966#      define LT_DLLAZY_OR_NOW		DL_LAZY
967#    else
968#      ifdef RTLD_NOW
969#        define LT_DLLAZY_OR_NOW	RTLD_NOW
970#      else
971#        ifdef DL_NOW
972#          define LT_DLLAZY_OR_NOW	DL_NOW
973#        else
974#          define LT_DLLAZY_OR_NOW	0
975#        endif
976#      endif
977#    endif
978#  endif
979#endif
980
981void fnord() { int i=42;}
982int main ()
983{
984  void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
985  int status = $lt_dlunknown;
986
987  if (self)
988    {
989      if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
990      else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
991      /* dlclose (self); */
992    }
993  else
994    puts (dlerror ());
995
996    return (status);
997}]
998EOF
999  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
1000    (./conftest; exit; ) >&5 2>/dev/null
1001    lt_status=$?
1002    case x$lt_status in
1003      x$lt_dlno_uscore) $1 ;;
1004      x$lt_dlneed_uscore) $2 ;;
1005      x$lt_dlunknown|x*) $3 ;;
1006    esac
1007  else :
1008    # compilation failed
1009    $3
1010  fi
1011fi
1012rm -fr conftest*
1013])# _LT_AC_TRY_DLOPEN_SELF
1014
1015
1016# AC_LIBTOOL_DLOPEN_SELF
1017# ----------------------
1018AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF],
1019[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl
1020if test "x$enable_dlopen" != xyes; then
1021  enable_dlopen=unknown
1022  enable_dlopen_self=unknown
1023  enable_dlopen_self_static=unknown
1024else
1025  lt_cv_dlopen=no
1026  lt_cv_dlopen_libs=
1027
1028  case $host_os in
1029  beos*)
1030    lt_cv_dlopen="load_add_on"
1031    lt_cv_dlopen_libs=
1032    lt_cv_dlopen_self=yes
1033    ;;
1034
1035  mingw* | pw32*)
1036    lt_cv_dlopen="LoadLibrary"
1037    lt_cv_dlopen_libs=
1038   ;;
1039
1040  cygwin*)
1041    lt_cv_dlopen="dlopen"
1042    lt_cv_dlopen_libs=
1043   ;;
1044
1045  darwin*)
1046  # if libdl is installed we need to link against it
1047    AC_CHECK_LIB([dl], [dlopen],
1048		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
1049    lt_cv_dlopen="dyld"
1050    lt_cv_dlopen_libs=
1051    lt_cv_dlopen_self=yes
1052    ])
1053   ;;
1054
1055  *)
1056    AC_CHECK_FUNC([shl_load],
1057	  [lt_cv_dlopen="shl_load"],
1058      [AC_CHECK_LIB([dld], [shl_load],
1059	    [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
1060	[AC_CHECK_FUNC([dlopen],
1061	      [lt_cv_dlopen="dlopen"],
1062	  [AC_CHECK_LIB([dl], [dlopen],
1063		[lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
1064	    [AC_CHECK_LIB([svld], [dlopen],
1065		  [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
1066	      [AC_CHECK_LIB([dld], [dld_link],
1067		    [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
1068	      ])
1069	    ])
1070	  ])
1071	])
1072      ])
1073    ;;
1074  esac
1075
1076  if test "x$lt_cv_dlopen" != xno; then
1077    enable_dlopen=yes
1078  else
1079    enable_dlopen=no
1080  fi
1081
1082  case $lt_cv_dlopen in
1083  dlopen)
1084    save_CPPFLAGS="$CPPFLAGS"
1085    test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
1086
1087    save_LDFLAGS="$LDFLAGS"
1088    wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
1089
1090    save_LIBS="$LIBS"
1091    LIBS="$lt_cv_dlopen_libs $LIBS"
1092
1093    AC_CACHE_CHECK([whether a program can dlopen itself],
1094	  lt_cv_dlopen_self, [dnl
1095	  _LT_AC_TRY_DLOPEN_SELF(
1096	    lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
1097	    lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
1098    ])
1099
1100    if test "x$lt_cv_dlopen_self" = xyes; then
1101      wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
1102      AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
1103    	  lt_cv_dlopen_self_static, [dnl
1104	  _LT_AC_TRY_DLOPEN_SELF(
1105	    lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
1106	    lt_cv_dlopen_self_static=no,  lt_cv_dlopen_self_static=cross)
1107      ])
1108    fi
1109
1110    CPPFLAGS="$save_CPPFLAGS"
1111    LDFLAGS="$save_LDFLAGS"
1112    LIBS="$save_LIBS"
1113    ;;
1114  esac
1115
1116  case $lt_cv_dlopen_self in
1117  yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
1118  *) enable_dlopen_self=unknown ;;
1119  esac
1120
1121  case $lt_cv_dlopen_self_static in
1122  yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
1123  *) enable_dlopen_self_static=unknown ;;
1124  esac
1125fi
1126])# AC_LIBTOOL_DLOPEN_SELF
1127
1128
1129# AC_LIBTOOL_PROG_CC_C_O([TAGNAME])
1130# ---------------------------------
1131# Check to see if options -c and -o are simultaneously supported by compiler
1132AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O],
1133[AC_REQUIRE([LT_AC_PROG_SED])dnl
1134AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
1135AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
1136  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
1137  [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
1138   $rm -r conftest 2>/dev/null
1139   mkdir conftest
1140   cd conftest
1141   mkdir out
1142   echo "$lt_simple_compile_test_code" > conftest.$ac_ext
1143
1144   lt_compiler_flag="-o out/conftest2.$ac_objext"
1145   # Insert the option either (1) after the last *FLAGS variable, or
1146   # (2) before a word containing "conftest.", or (3) at the end.
1147   # Note that $ac_compile itself does not contain backslashes and begins
1148   # with a dollar sign (not a hyphen), so the echo should work correctly.
1149   lt_compile=`echo "$ac_compile" | $SED \
1150   -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
1151   -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
1152   -e 's:$: $lt_compiler_flag:'`
1153   (eval echo "\"configure:__oline__: $lt_compile\"" >&5)
1154   (eval "$lt_compile" 2>out/conftest.err)
1155   ac_status=$?
1156   cat out/conftest.err >&5
1157   echo "configure:__oline__: \$? = $ac_status" >&5
1158   if (exit $ac_status) && test -s out/conftest2.$ac_objext
1159   then
1160     # The compiler can only warn and ignore the option if not recognized
1161     # So say no if there are warnings
1162     $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
1163     $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
1164     if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
1165       _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
1166     fi
1167   fi
1168   chmod u+w . 2>&5
1169   $rm conftest*
1170   # SGI C++ compiler will create directory out/ii_files/ for
1171   # template instantiation
1172   test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files
1173   $rm out/* && rmdir out
1174   cd ..
1175   rmdir conftest
1176   $rm conftest*
1177])
1178])# AC_LIBTOOL_PROG_CC_C_O
1179
1180
1181# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME])
1182# -----------------------------------------
1183# Check to see if we can do hard links to lock some files if needed
1184AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS],
1185[AC_REQUIRE([_LT_AC_LOCK])dnl
1186
1187hard_links="nottested"
1188if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
1189  # do not overwrite the value of need_locks provided by the user
1190  AC_MSG_CHECKING([if we can lock with hard links])
1191  hard_links=yes
1192  $rm conftest*
1193  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1194  touch conftest.a
1195  ln conftest.a conftest.b 2>&5 || hard_links=no
1196  ln conftest.a conftest.b 2>/dev/null && hard_links=no
1197  AC_MSG_RESULT([$hard_links])
1198  if test "$hard_links" = no; then
1199    AC_MSG_WARN([\`$CC' does not support \`-c -o', so \`make -j' may be unsafe])
1200    need_locks=warn
1201  fi
1202else
1203  need_locks=no
1204fi
1205])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS
1206
1207
1208# AC_LIBTOOL_OBJDIR
1209# -----------------
1210AC_DEFUN([AC_LIBTOOL_OBJDIR],
1211[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
1212[rm -f .libs 2>/dev/null
1213mkdir .libs 2>/dev/null
1214if test -d .libs; then
1215  lt_cv_objdir=.libs
1216else
1217  # MS-DOS does not allow filenames that begin with a dot.
1218  lt_cv_objdir=_libs
1219fi
1220rmdir .libs 2>/dev/null])
1221objdir=$lt_cv_objdir
1222])# AC_LIBTOOL_OBJDIR
1223
1224
1225# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME])
1226# ----------------------------------------------
1227# Check hardcoding attributes.
1228AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH],
1229[AC_MSG_CHECKING([how to hardcode library paths into programs])
1230_LT_AC_TAGVAR(hardcode_action, $1)=
1231if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \
1232   test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \
1233   test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
1234
1235  # We can hardcode non-existent directories.
1236  if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no &&
1237     # If the only mechanism to avoid hardcoding is shlibpath_var, we
1238     # have to relink, otherwise we might link with an installed library
1239     # when we should be linking with a yet-to-be-installed one
1240     ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
1241     test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then
1242    # Linking always hardcodes the temporary library directory.
1243    _LT_AC_TAGVAR(hardcode_action, $1)=relink
1244  else
1245    # We can link without hardcoding, and we can hardcode nonexisting dirs.
1246    _LT_AC_TAGVAR(hardcode_action, $1)=immediate
1247  fi
1248else
1249  # We cannot hardcode anything, or else we can only hardcode existing
1250  # directories.
1251  _LT_AC_TAGVAR(hardcode_action, $1)=unsupported
1252fi
1253AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)])
1254
1255if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then
1256  # Fast installation is not supported
1257  enable_fast_install=no
1258elif test "$shlibpath_overrides_runpath" = yes ||
1259     test "$enable_shared" = no; then
1260  # Fast installation is not necessary
1261  enable_fast_install=needless
1262fi
1263])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH
1264
1265
1266# AC_LIBTOOL_SYS_LIB_STRIP
1267# ------------------------
1268AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP],
1269[striplib=
1270old_striplib=
1271AC_MSG_CHECKING([whether stripping libraries is possible])
1272if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
1273  test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
1274  test -z "$striplib" && striplib="$STRIP --strip-unneeded"
1275  AC_MSG_RESULT([yes])
1276else
1277# FIXME - insert some real tests, host_os isn't really good enough
1278  case $host_os in
1279   darwin*)
1280       if test -n "$STRIP" ; then
1281         striplib="$STRIP -x"
1282         old_striplib="$STRIP -S"
1283         AC_MSG_RESULT([yes])
1284       else
1285  AC_MSG_RESULT([no])
1286fi
1287       ;;
1288   *)
1289  AC_MSG_RESULT([no])
1290    ;;
1291  esac
1292fi
1293])# AC_LIBTOOL_SYS_LIB_STRIP
1294
1295
1296# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1297# -----------------------------
1298# PORTME Fill in your ld.so characteristics
1299AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER],
1300[AC_REQUIRE([LT_AC_PROG_SED])dnl
1301AC_MSG_CHECKING([dynamic linker characteristics])
1302library_names_spec=
1303libname_spec='lib$name'
1304soname_spec=
1305shrext_cmds=".so"
1306postinstall_cmds=
1307postuninstall_cmds=
1308finish_cmds=
1309finish_eval=
1310shlibpath_var=
1311shlibpath_overrides_runpath=unknown
1312version_type=none
1313dynamic_linker="$host_os ld.so"
1314sys_lib_dlsearch_path_spec="/lib /usr/lib"
1315ifelse($1,[],[
1316if test "$GCC" = yes; then
1317  case $host_os in
1318    darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
1319    *) lt_awk_arg="/^libraries:/" ;;
1320  esac
1321  lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1322  if echo "$lt_search_path_spec" | grep ';' >/dev/null ; then
1323    # if the path contains ";" then we assume it to be the separator
1324    # otherwise default to the standard path separator (i.e. ":") - it is
1325    # assumed that no part of a normal pathname contains ";" but that should
1326    # okay in the real world where ";" in dirpaths is itself problematic.
1327    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED -e 's/;/ /g'`
1328  else
1329    lt_search_path_spec=`echo "$lt_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1330  fi
1331  # Ok, now we have the path, separated by spaces, we can step through it
1332  # and add multilib dir if necessary.
1333  lt_tmp_lt_search_path_spec=
1334  lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
1335  for lt_sys_path in $lt_search_path_spec; do
1336    if test -d "$lt_sys_path/$lt_multi_os_dir"; then
1337      lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
1338    else
1339      test -d "$lt_sys_path" && \
1340	lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
1341    fi
1342  done
1343  lt_search_path_spec=`echo $lt_tmp_lt_search_path_spec | awk '
1344BEGIN {RS=" "; FS="/|\n";} {
1345  lt_foo="";
1346  lt_count=0;
1347  for (lt_i = NF; lt_i > 0; lt_i--) {
1348    if ($lt_i != "" && $lt_i != ".") {
1349      if ($lt_i == "..") {
1350        lt_count++;
1351      } else {
1352        if (lt_count == 0) {
1353          lt_foo="/" $lt_i lt_foo;
1354        } else {
1355          lt_count--;
1356        }
1357      }
1358    }
1359  }
1360  if (lt_foo != "") { lt_freq[[lt_foo]]++; }
1361  if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
1362}'`
1363  sys_lib_search_path_spec=`echo $lt_search_path_spec`
1364else
1365  sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
1366fi])
1367need_lib_prefix=unknown
1368hardcode_into_libs=no
1369
1370# when you set need_version to no, make sure it does not cause -set_version
1371# flags to be left without arguments
1372need_version=unknown
1373
1374case $host_os in
1375aix3*)
1376  version_type=linux
1377  library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
1378  shlibpath_var=LIBPATH
1379
1380  # AIX 3 has no versioning support, so we append a major version to the name.
1381  soname_spec='${libname}${release}${shared_ext}$major'
1382  ;;
1383
1384aix[[4-9]]*)
1385  version_type=linux
1386  need_lib_prefix=no
1387  need_version=no
1388  hardcode_into_libs=yes
1389  if test "$host_cpu" = ia64; then
1390    # AIX 5 supports IA64
1391    library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
1392    shlibpath_var=LD_LIBRARY_PATH
1393  else
1394    # With GCC up to 2.95.x, collect2 would create an import file
1395    # for dependence libraries.  The import file would start with
1396    # the line `#! .'.  This would cause the generated library to
1397    # depend on `.', always an invalid library.  This was fixed in
1398    # development snapshots of GCC prior to 3.0.
1399    case $host_os in
1400      aix4 | aix4.[[01]] | aix4.[[01]].*)
1401      if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
1402	   echo ' yes '
1403	   echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
1404	:
1405      else
1406	can_build_shared=no
1407      fi
1408      ;;
1409    esac
1410    # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
1411    # soname into executable. Probably we can add versioning support to
1412    # collect2, so additional links can be useful in future.
1413    if test "$aix_use_runtimelinking" = yes; then
1414      # If using run time linking (on AIX 4.2 or later) use lib<name>.so
1415      # instead of lib<name>.a to let people know that these are not
1416      # typical AIX shared libraries.
1417      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1418    else
1419      # We preserve .a as extension for shared libraries through AIX4.2
1420      # and later when we are not doing run time linking.
1421      library_names_spec='${libname}${release}.a $libname.a'
1422      soname_spec='${libname}${release}${shared_ext}$major'
1423    fi
1424    shlibpath_var=LIBPATH
1425  fi
1426  ;;
1427
1428amigaos*)
1429  library_names_spec='$libname.ixlibrary $libname.a'
1430  # Create ${libname}_ixlibrary.a entries in /sys/libs.
1431  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'
1432  ;;
1433
1434beos*)
1435  library_names_spec='${libname}${shared_ext}'
1436  dynamic_linker="$host_os ld.so"
1437  shlibpath_var=LIBRARY_PATH
1438  ;;
1439
1440bsdi[[45]]*)
1441  version_type=linux
1442  need_version=no
1443  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1444  soname_spec='${libname}${release}${shared_ext}$major'
1445  finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
1446  shlibpath_var=LD_LIBRARY_PATH
1447  sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
1448  sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
1449  # the default ld.so.conf also contains /usr/contrib/lib and
1450  # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
1451  # libtool to hard-code these into programs
1452  ;;
1453
1454cygwin* | mingw* | pw32*)
1455  version_type=windows
1456  shrext_cmds=".dll"
1457  need_version=no
1458  need_lib_prefix=no
1459
1460  case $GCC,$host_os in
1461  yes,cygwin* | yes,mingw* | yes,pw32*)
1462    library_names_spec='$libname.dll.a'
1463    # DLL is installed to $(libdir)/../bin by postinstall_cmds
1464    postinstall_cmds='base_file=`basename \${file}`~
1465      dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~
1466      dldir=$destdir/`dirname \$dlpath`~
1467      test -d \$dldir || mkdir -p \$dldir~
1468      $install_prog $dir/$dlname \$dldir/$dlname~
1469      chmod a+x \$dldir/$dlname'
1470    postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
1471      dlpath=$dir/\$dldll~
1472       $rm \$dlpath'
1473    shlibpath_overrides_runpath=yes
1474
1475    case $host_os in
1476    cygwin*)
1477      # Cygwin DLLs use 'cyg' prefix rather than 'lib'
1478      soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1479      sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
1480      ;;
1481    mingw*)
1482      # MinGW DLLs use traditional 'lib' prefix
1483      soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1484      sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
1485      if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then
1486        # It is most probably a Windows format PATH printed by
1487        # mingw gcc, but we are running on Cygwin. Gcc prints its search
1488        # path with ; separators, and with drive letters. We can handle the
1489        # drive letters (cygwin fileutils understands them), so leave them,
1490        # especially as we might pass files found there to a mingw objdump,
1491        # which wouldn't understand a cygwinified path. Ahh.
1492        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
1493      else
1494        sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED  -e "s/$PATH_SEPARATOR/ /g"`
1495      fi
1496      ;;
1497    pw32*)
1498      # pw32 DLLs use 'pw' prefix rather than 'lib'
1499      library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
1500      ;;
1501    esac
1502    ;;
1503
1504  *)
1505    library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
1506    ;;
1507  esac
1508  dynamic_linker='Win32 ld.exe'
1509  # FIXME: first we should search . and the directory the executable is in
1510  shlibpath_var=PATH
1511  ;;
1512
1513darwin* | rhapsody*)
1514  dynamic_linker="$host_os dyld"
1515  version_type=darwin
1516  need_lib_prefix=no
1517  need_version=no
1518  library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext'
1519  soname_spec='${libname}${release}${major}$shared_ext'
1520  shlibpath_overrides_runpath=yes
1521  shlibpath_var=DYLD_LIBRARY_PATH
1522  shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
1523  ifelse([$1], [],[
1524  sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
1525  sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
1526  ;;
1527
1528dgux*)
1529  version_type=linux
1530  need_lib_prefix=no
1531  need_version=no
1532  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
1533  soname_spec='${libname}${release}${shared_ext}$major'
1534  shlibpath_var=LD_LIBRARY_PATH
1535  ;;
1536
1537freebsd* | dragonfly*)
1538  # DragonFly does not have aout.  When/if they implement a new
1539  # versioning mechanism, adjust this.
1540  if test -x /usr/bin/objformat; then
1541    objformat=`/usr/bin/objformat`
1542  else
1543    case $host_os in
1544    freebsd[[123]].*) objformat=aout ;;
1545    *) objformat=elf ;;
1546    esac
1547  fi
1548  version_type=freebsd-$objformat
1549  case $version_type in
1550    freebsd-elf*)
1551      library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1552      need_version=no
1553      need_lib_prefix=no
1554      ;;
1555    freebsd-*)
1556      library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
1557      need_version=yes
1558      ;;
1559  esac
1560  shlibpath_var=LD_LIBRARY_PATH
1561  case $host_os in
1562  freebsd2*)
1563    shlibpath_overrides_runpath=yes
1564    ;;
1565  freebsd3.[[01]]* | freebsdelf3.[[01]]*)
1566    shlibpath_overrides_runpath=yes
1567    hardcode_into_libs=yes
1568    ;;
1569  freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
1570  freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
1571    shlibpath_overrides_runpath=no
1572    hardcode_into_libs=yes
1573    ;;
1574  *) # from 4.6 on, and DragonFly
1575    shlibpath_overrides_runpath=yes
1576    hardcode_into_libs=yes
1577    ;;
1578  esac
1579  ;;
1580
1581gnu*)
1582  version_type=linux
1583  need_lib_prefix=no
1584  need_version=no
1585  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
1586  soname_spec='${libname}${release}${shared_ext}$major'
1587  shlibpath_var=LD_LIBRARY_PATH
1588  hardcode_into_libs=yes
1589  ;;
1590
1591hpux9* | hpux10* | hpux11*)
1592  # Give a soname corresponding to the major version so that dld.sl refuses to
1593  # link against other versions.
1594  version_type=sunos
1595  need_lib_prefix=no
1596  need_version=no
1597  case $host_cpu in
1598  ia64*)
1599    shrext_cmds='.so'
1600    hardcode_into_libs=yes
1601    dynamic_linker="$host_os dld.so"
1602    shlibpath_var=LD_LIBRARY_PATH
1603    shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1604    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1605    soname_spec='${libname}${release}${shared_ext}$major'
1606    if test "X$HPUX_IA64_MODE" = X32; then
1607      sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
1608    else
1609      sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
1610    fi
1611    sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1612    ;;
1613   hppa*64*)
1614     shrext_cmds='.sl'
1615     hardcode_into_libs=yes
1616     dynamic_linker="$host_os dld.sl"
1617     shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
1618     shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
1619     library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1620     soname_spec='${libname}${release}${shared_ext}$major'
1621     sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
1622     sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
1623     ;;
1624   *)
1625    shrext_cmds='.sl'
1626    dynamic_linker="$host_os dld.sl"
1627    shlibpath_var=SHLIB_PATH
1628    shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
1629    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1630    soname_spec='${libname}${release}${shared_ext}$major'
1631    ;;
1632  esac
1633  # HP-UX runs *really* slowly unless shared libraries are mode 555.
1634  postinstall_cmds='chmod 555 $lib'
1635  ;;
1636
1637interix[[3-9]]*)
1638  version_type=linux
1639  need_lib_prefix=no
1640  need_version=no
1641  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1642  soname_spec='${libname}${release}${shared_ext}$major'
1643  dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
1644  shlibpath_var=LD_LIBRARY_PATH
1645  shlibpath_overrides_runpath=no
1646  hardcode_into_libs=yes
1647  ;;
1648
1649irix5* | irix6* | nonstopux*)
1650  case $host_os in
1651    nonstopux*) version_type=nonstopux ;;
1652    *)
1653	if test "$lt_cv_prog_gnu_ld" = yes; then
1654		version_type=linux
1655	else
1656		version_type=irix
1657	fi ;;
1658  esac
1659  need_lib_prefix=no
1660  need_version=no
1661  soname_spec='${libname}${release}${shared_ext}$major'
1662  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
1663  case $host_os in
1664  irix5* | nonstopux*)
1665    libsuff= shlibsuff=
1666    ;;
1667  *)
1668    case $LD in # libtool.m4 will add one of these switches to LD
1669    *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
1670      libsuff= shlibsuff= libmagic=32-bit;;
1671    *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
1672      libsuff=32 shlibsuff=N32 libmagic=N32;;
1673    *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
1674      libsuff=64 shlibsuff=64 libmagic=64-bit;;
1675    *) libsuff= shlibsuff= libmagic=never-match;;
1676    esac
1677    ;;
1678  esac
1679  shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
1680  shlibpath_overrides_runpath=no
1681  sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
1682  sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
1683  hardcode_into_libs=yes
1684  ;;
1685
1686# No shared lib support for Linux oldld, aout, or coff.
1687linux*oldld* | linux*aout* | linux*coff*)
1688  dynamic_linker=no
1689  ;;
1690
1691# This must be Linux ELF.
1692linux* | k*bsd*-gnu)
1693  version_type=linux
1694  need_lib_prefix=no
1695  need_version=no
1696  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1697  soname_spec='${libname}${release}${shared_ext}$major'
1698  finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
1699  shlibpath_var=LD_LIBRARY_PATH
1700  shlibpath_overrides_runpath=no
1701  # This implies no fast_install, which is unacceptable.
1702  # Some rework will be needed to allow for fast_install
1703  # before this can be enabled.
1704  hardcode_into_libs=yes
1705
1706  # Append ld.so.conf contents to the search path
1707  if test -f /etc/ld.so.conf; then
1708    lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ 	]*hwcap[ 	]/d;s/[:,	]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
1709    sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
1710  fi
1711
1712  # We used to test for /lib/ld.so.1 and disable shared libraries on
1713  # powerpc, because MkLinux only supported shared libraries with the
1714  # GNU dynamic linker.  Since this was broken with cross compilers,
1715  # most powerpc-linux boxes support dynamic linking these days and
1716  # people can always --disable-shared, the test was removed, and we
1717  # assume the GNU/Linux dynamic linker is in use.
1718  dynamic_linker='GNU/Linux ld.so'
1719  ;;
1720
1721netbsd*)
1722  version_type=sunos
1723  need_lib_prefix=no
1724  need_version=no
1725  if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
1726    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1727    finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1728    dynamic_linker='NetBSD (a.out) ld.so'
1729  else
1730    library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
1731    soname_spec='${libname}${release}${shared_ext}$major'
1732    dynamic_linker='NetBSD ld.elf_so'
1733  fi
1734  shlibpath_var=LD_LIBRARY_PATH
1735  shlibpath_overrides_runpath=yes
1736  hardcode_into_libs=yes
1737  ;;
1738
1739newsos6)
1740  version_type=linux
1741  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1742  shlibpath_var=LD_LIBRARY_PATH
1743  shlibpath_overrides_runpath=yes
1744  ;;
1745
1746nto-qnx*)
1747  version_type=linux
1748  need_lib_prefix=no
1749  need_version=no
1750  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1751  soname_spec='${libname}${release}${shared_ext}$major'
1752  shlibpath_var=LD_LIBRARY_PATH
1753  shlibpath_overrides_runpath=yes
1754  ;;
1755
1756openbsd*)
1757  version_type=sunos
1758  sys_lib_dlsearch_path_spec="/usr/lib"
1759  need_lib_prefix=no
1760  # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
1761  case $host_os in
1762    openbsd3.3 | openbsd3.3.*) need_version=yes ;;
1763    *)                         need_version=no  ;;
1764  esac
1765  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1766  finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
1767  shlibpath_var=LD_LIBRARY_PATH
1768  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1769    case $host_os in
1770      openbsd2.[[89]] | openbsd2.[[89]].*)
1771	shlibpath_overrides_runpath=no
1772	;;
1773      *)
1774	shlibpath_overrides_runpath=yes
1775	;;
1776      esac
1777  else
1778    shlibpath_overrides_runpath=yes
1779  fi
1780  ;;
1781
1782os2*)
1783  libname_spec='$name'
1784  shrext_cmds=".dll"
1785  need_lib_prefix=no
1786  library_names_spec='$libname${shared_ext} $libname.a'
1787  dynamic_linker='OS/2 ld.exe'
1788  shlibpath_var=LIBPATH
1789  ;;
1790
1791osf3* | osf4* | osf5*)
1792  version_type=osf
1793  need_lib_prefix=no
1794  need_version=no
1795  soname_spec='${libname}${release}${shared_ext}$major'
1796  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1797  shlibpath_var=LD_LIBRARY_PATH
1798  sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
1799  sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
1800  ;;
1801
1802rdos*)
1803  dynamic_linker=no
1804  ;;
1805
1806solaris*)
1807  version_type=linux
1808  need_lib_prefix=no
1809  need_version=no
1810  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1811  soname_spec='${libname}${release}${shared_ext}$major'
1812  shlibpath_var=LD_LIBRARY_PATH
1813  shlibpath_overrides_runpath=yes
1814  hardcode_into_libs=yes
1815  # ldd complains unless libraries are executable
1816  postinstall_cmds='chmod +x $lib'
1817  ;;
1818
1819sunos4*)
1820  version_type=sunos
1821  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
1822  finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
1823  shlibpath_var=LD_LIBRARY_PATH
1824  shlibpath_overrides_runpath=yes
1825  if test "$with_gnu_ld" = yes; then
1826    need_lib_prefix=no
1827  fi
1828  need_version=yes
1829  ;;
1830
1831sysv4 | sysv4.3*)
1832  version_type=linux
1833  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1834  soname_spec='${libname}${release}${shared_ext}$major'
1835  shlibpath_var=LD_LIBRARY_PATH
1836  case $host_vendor in
1837    sni)
1838      shlibpath_overrides_runpath=no
1839      need_lib_prefix=no
1840      export_dynamic_flag_spec='${wl}-Blargedynsym'
1841      runpath_var=LD_RUN_PATH
1842      ;;
1843    siemens)
1844      need_lib_prefix=no
1845      ;;
1846    motorola)
1847      need_lib_prefix=no
1848      need_version=no
1849      shlibpath_overrides_runpath=no
1850      sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
1851      ;;
1852  esac
1853  ;;
1854
1855sysv4*MP*)
1856  if test -d /usr/nec ;then
1857    version_type=linux
1858    library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
1859    soname_spec='$libname${shared_ext}.$major'
1860    shlibpath_var=LD_LIBRARY_PATH
1861  fi
1862  ;;
1863
1864sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
1865  version_type=freebsd-elf
1866  need_lib_prefix=no
1867  need_version=no
1868  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
1869  soname_spec='${libname}${release}${shared_ext}$major'
1870  shlibpath_var=LD_LIBRARY_PATH
1871  hardcode_into_libs=yes
1872  if test "$with_gnu_ld" = yes; then
1873    sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
1874    shlibpath_overrides_runpath=no
1875  else
1876    sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
1877    shlibpath_overrides_runpath=yes
1878    case $host_os in
1879      sco3.2v5*)
1880        sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
1881	;;
1882    esac
1883  fi
1884  sys_lib_dlsearch_path_spec='/usr/lib'
1885  ;;
1886
1887uts4*)
1888  version_type=linux
1889  library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
1890  soname_spec='${libname}${release}${shared_ext}$major'
1891  shlibpath_var=LD_LIBRARY_PATH
1892  ;;
1893
1894*)
1895  dynamic_linker=no
1896  ;;
1897esac
1898AC_MSG_RESULT([$dynamic_linker])
1899test "$dynamic_linker" = no && can_build_shared=no
1900
1901AC_CACHE_VAL([lt_cv_sys_lib_search_path_spec],
1902[lt_cv_sys_lib_search_path_spec="$sys_lib_search_path_spec"])
1903sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
1904AC_CACHE_VAL([lt_cv_sys_lib_dlsearch_path_spec],
1905[lt_cv_sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec"])
1906sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
1907
1908variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
1909if test "$GCC" = yes; then
1910  variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
1911fi
1912])# AC_LIBTOOL_SYS_DYNAMIC_LINKER
1913
1914
1915# _LT_AC_TAGCONFIG
1916# ----------------
1917AC_DEFUN([_LT_AC_TAGCONFIG],
1918[AC_REQUIRE([LT_AC_PROG_SED])dnl
1919AC_ARG_WITH([tags],
1920[  --with-tags[=TAGS]        Include additional configurations [automatic]
1921],
1922[tagnames="$withval"])
1923
1924if test -f "$ltmain" && test -n "$tagnames"; then
1925  if test ! -f "${ofile}"; then
1926    AC_MSG_WARN([output file \`$ofile' does not exist])
1927  fi
1928
1929  if test -z "$LTCC"; then
1930    eval "`$SHELL ${ofile} --config | grep '^LTCC='`"
1931    if test -z "$LTCC"; then
1932      AC_MSG_WARN([output file \`$ofile' does not look like a libtool script])
1933    else
1934      AC_MSG_WARN([using \`LTCC=$LTCC', extracted from \`$ofile'])
1935    fi
1936  fi
1937  if test -z "$LTCFLAGS"; then
1938    eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`"
1939  fi
1940
1941  # Extract list of available tagged configurations in $ofile.
1942  # Note that this assumes the entire list is on one line.
1943  available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'`
1944
1945  lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
1946  for tagname in $tagnames; do
1947    IFS="$lt_save_ifs"
1948    # Check whether tagname contains only valid characters
1949    case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in
1950    "") ;;
1951    *)  AC_MSG_ERROR([invalid tag name: $tagname])
1952	;;
1953    esac
1954
1955    if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null
1956    then
1957      AC_MSG_ERROR([tag name \"$tagname\" already exists])
1958    fi
1959
1960    # Update the list of available tags.
1961    if test -n "$tagname"; then
1962      echo appending configuration tag \"$tagname\" to $ofile
1963
1964      case $tagname in
1965      CXX)
1966	if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
1967	    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
1968	    (test "X$CXX" != "Xg++"))) ; then
1969	  AC_LIBTOOL_LANG_CXX_CONFIG
1970	else
1971	  tagname=""
1972	fi
1973	;;
1974
1975      *)
1976	AC_MSG_ERROR([Unsupported tag name: $tagname])
1977	;;
1978      esac
1979
1980      # Append the new tag name to the list of available tags.
1981      if test -n "$tagname" ; then
1982      available_tags="$available_tags $tagname"
1983    fi
1984    fi
1985  done
1986  IFS="$lt_save_ifs"
1987
1988  # Now substitute the updated list of available tags.
1989  if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then
1990    mv "${ofile}T" "$ofile"
1991    chmod +x "$ofile"
1992  else
1993    rm -f "${ofile}T"
1994    AC_MSG_ERROR([unable to update list of available tagged configurations.])
1995  fi
1996fi
1997])# _LT_AC_TAGCONFIG
1998
1999
2000# AC_LIBTOOL_DLOPEN
2001# -----------------
2002# enable checks for dlopen support
2003AC_DEFUN([AC_LIBTOOL_DLOPEN],
2004 [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])
2005])# AC_LIBTOOL_DLOPEN
2006
2007
2008# AC_LIBTOOL_WIN32_DLL
2009# --------------------
2010# declare package support for building win32 DLLs
2011AC_DEFUN([AC_LIBTOOL_WIN32_DLL],
2012[AC_BEFORE([$0], [AC_LIBTOOL_SETUP])
2013])# AC_LIBTOOL_WIN32_DLL
2014
2015
2016# AC_ENABLE_SHARED([DEFAULT])
2017# ---------------------------
2018# implement the --enable-shared flag
2019# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2020AC_DEFUN([AC_ENABLE_SHARED],
2021[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl
2022AC_ARG_ENABLE([shared],
2023changequote(<<, >>)dnl
2024<<  --enable-shared[=PKGS]    Build shared libraries [default=>>AC_ENABLE_SHARED_DEFAULT],
2025changequote([, ])dnl
2026    [p=${PACKAGE-default}
2027    case $enableval in
2028    yes) enable_shared=yes ;;
2029    no) enable_shared=no ;;
2030    *)
2031      enable_shared=no
2032      # Look at the argument we got.  We use all the common list separators.
2033      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2034      for pkg in $enableval; do
2035	IFS="$lt_save_ifs"
2036	if test "X$pkg" = "X$p"; then
2037	  enable_shared=yes
2038	fi
2039      done
2040      IFS="$lt_save_ifs"
2041      ;;
2042    esac],
2043    [enable_shared=]AC_ENABLE_SHARED_DEFAULT)
2044])# AC_ENABLE_SHARED
2045
2046
2047# AC_DISABLE_SHARED
2048# -----------------
2049# set the default shared flag to --disable-shared
2050AC_DEFUN([AC_DISABLE_SHARED],
2051[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2052AC_ENABLE_SHARED(no)
2053])# AC_DISABLE_SHARED
2054
2055
2056# AC_ENABLE_STATIC([DEFAULT])
2057# ---------------------------
2058# implement the --enable-static flag
2059# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2060AC_DEFUN([AC_ENABLE_STATIC],
2061[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl
2062AC_ARG_ENABLE([static],
2063changequote(<<, >>)dnl
2064<<  --enable-static[=PKGS]    Build static libraries [default=>>AC_ENABLE_STATIC_DEFAULT],
2065changequote([, ])dnl
2066    [p=${PACKAGE-default}
2067    case $enableval in
2068    yes) enable_static=yes ;;
2069    no) enable_static=no ;;
2070    *)
2071     enable_static=no
2072      # Look at the argument we got.  We use all the common list separators.
2073      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2074      for pkg in $enableval; do
2075	IFS="$lt_save_ifs"
2076	if test "X$pkg" = "X$p"; then
2077	  enable_static=yes
2078	fi
2079      done
2080      IFS="$lt_save_ifs"
2081      ;;
2082    esac],
2083    [enable_static=]AC_ENABLE_STATIC_DEFAULT)
2084])# AC_ENABLE_STATIC
2085
2086
2087# AC_DISABLE_STATIC
2088# -----------------
2089# set the default static flag to --disable-static
2090AC_DEFUN([AC_DISABLE_STATIC],
2091[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2092AC_ENABLE_STATIC(no)
2093])# AC_DISABLE_STATIC
2094
2095
2096# AC_ENABLE_FAST_INSTALL([DEFAULT])
2097# ---------------------------------
2098# implement the --enable-fast-install flag
2099# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
2100AC_DEFUN([AC_ENABLE_FAST_INSTALL],
2101[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl
2102AC_ARG_ENABLE([fast-install],
2103changequote(<<, >>)dnl
2104<<  --enable-fast-install[=PKGS]
2105                          Optimize for fast installation [default=>>AC_ENABLE_FAST_INSTALL_DEFAULT],
2106changequote([, ])dnl
2107    [p=${PACKAGE-default}
2108    case $enableval in
2109    yes) enable_fast_install=yes ;;
2110    no) enable_fast_install=no ;;
2111    *)
2112      enable_fast_install=no
2113      # Look at the argument we got.  We use all the common list separators.
2114      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
2115      for pkg in $enableval; do
2116	IFS="$lt_save_ifs"
2117	if test "X$pkg" = "X$p"; then
2118	  enable_fast_install=yes
2119	fi
2120      done
2121      IFS="$lt_save_ifs"
2122      ;;
2123    esac],
2124    [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT)
2125])# AC_ENABLE_FAST_INSTALL
2126
2127
2128# AC_DISABLE_FAST_INSTALL
2129# -----------------------
2130# set the default to --disable-fast-install
2131AC_DEFUN([AC_DISABLE_FAST_INSTALL],
2132[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2133AC_ENABLE_FAST_INSTALL(no)
2134])# AC_DISABLE_FAST_INSTALL
2135
2136
2137# AC_LIBTOOL_PICMODE([MODE])
2138# --------------------------
2139# implement the --with-pic flag
2140# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
2141AC_DEFUN([AC_LIBTOOL_PICMODE],
2142[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2143pic_mode=ifelse($#,1,$1,default)
2144])# AC_LIBTOOL_PICMODE
2145
2146
2147# AC_PROG_EGREP
2148# -------------
2149ifdef([AC_PROG_EGREP], [], [AC_DEFUN([AC_PROG_EGREP],
2150[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep],
2151   [if echo a | (grep -E '(a|b)') >/dev/null 2>&1
2152    then ac_cv_prog_egrep='grep -E'
2153    else ac_cv_prog_egrep='egrep'
2154    fi])
2155 EGREP=$ac_cv_prog_egrep
2156 AC_SUBST([EGREP])
2157])])
2158
2159
2160# AC_PATH_TOOL_PREFIX
2161# -------------------
2162# find a file program which can recognize shared library
2163AC_DEFUN([AC_PATH_TOOL_PREFIX],
2164[AC_REQUIRE([AC_PROG_EGREP])dnl
2165AC_MSG_CHECKING([for $1])
2166AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
2167[case $MAGIC_CMD in
2168[[\\/*] |  ?:[\\/]*])
2169  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
2170  ;;
2171*)
2172  lt_save_MAGIC_CMD="$MAGIC_CMD"
2173  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2174dnl $ac_dummy forces splitting on constant user-supplied paths.
2175dnl POSIX.2 word splitting is done only on the output of word expansions,
2176dnl not every word.  This closes a longstanding sh security hole.
2177  ac_dummy="ifelse([$2], , $PATH, [$2])"
2178  for ac_dir in $ac_dummy; do
2179    IFS="$lt_save_ifs"
2180    test -z "$ac_dir" && ac_dir=.
2181    if test -f $ac_dir/$1; then
2182      lt_cv_path_MAGIC_CMD="$ac_dir/$1"
2183      if test -n "$file_magic_test_file"; then
2184	case $deplibs_check_method in
2185	"file_magic "*)
2186	  file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
2187	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2188	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
2189	    $EGREP "$file_magic_regex" > /dev/null; then
2190	    :
2191	  else
2192	    cat <<EOF 1>&2
2193
2194*** Warning: the command libtool uses to detect shared libraries,
2195*** $file_magic_cmd, produces output that libtool cannot recognize.
2196*** The result is that libtool may fail to recognize shared libraries
2197*** as such.  This will affect the creation of libtool libraries that
2198*** depend on shared libraries, but programs linked with such libtool
2199*** libraries will work regardless of this problem.  Nevertheless, you
2200*** may want to report the problem to your system manager and/or to
2201*** bug-libtool@gnu.org
2202
2203EOF
2204	  fi ;;
2205	esac
2206      fi
2207      break
2208    fi
2209  done
2210  IFS="$lt_save_ifs"
2211  MAGIC_CMD="$lt_save_MAGIC_CMD"
2212  ;;
2213esac])
2214MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
2215if test -n "$MAGIC_CMD"; then
2216  AC_MSG_RESULT($MAGIC_CMD)
2217else
2218  AC_MSG_RESULT(no)
2219fi
2220])# AC_PATH_TOOL_PREFIX
2221
2222
2223# AC_PATH_MAGIC
2224# -------------
2225# find a file program which can recognize a shared library
2226AC_DEFUN([AC_PATH_MAGIC],
2227[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
2228if test -z "$lt_cv_path_MAGIC_CMD"; then
2229  if test -n "$ac_tool_prefix"; then
2230    AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
2231  else
2232    MAGIC_CMD=:
2233  fi
2234fi
2235])# AC_PATH_MAGIC
2236
2237
2238# AC_PROG_LD
2239# ----------
2240# find the pathname to the GNU or non-GNU linker
2241AC_DEFUN([AC_PROG_LD],
2242[AC_ARG_WITH([gnu-ld],
2243[  --with-gnu-ld           Assume the C compiler uses GNU ld [default=no]],
2244    [test "$withval" = no || with_gnu_ld=yes],
2245    [with_gnu_ld=no])
2246AC_REQUIRE([LT_AC_PROG_SED])dnl
2247AC_REQUIRE([AC_PROG_CC])dnl
2248AC_REQUIRE([AC_CANONICAL_HOST])dnl
2249AC_REQUIRE([AC_CANONICAL_BUILD])dnl
2250ac_prog=ld
2251if test "$GCC" = yes; then
2252  # Check if gcc -print-prog-name=ld gives a path.
2253  AC_MSG_CHECKING([for ld used by $CC])
2254  case $host in
2255  *-*-mingw*)
2256    # gcc leaves a trailing carriage return which upsets mingw
2257    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
2258  *)
2259    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
2260  esac
2261  case $ac_prog in
2262    # Accept absolute paths.
2263    [[\\/]]* | ?:[[\\/]]*)
2264      re_direlt='/[[^/]][[^/]]*/\.\./'
2265      # Canonicalize the pathname of ld
2266      ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'`
2267      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
2268	ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"`
2269      done
2270      test -z "$LD" && LD="$ac_prog"
2271      ;;
2272  "")
2273    # If it fails, then pretend we aren't using GCC.
2274    ac_prog=ld
2275    ;;
2276  *)
2277    # If it is relative, then search for the first ld in PATH.
2278    with_gnu_ld=unknown
2279    ;;
2280  esac
2281elif test "$with_gnu_ld" = yes; then
2282  AC_MSG_CHECKING([for GNU ld])
2283else
2284  AC_MSG_CHECKING([for non-GNU ld])
2285fi
2286AC_CACHE_VAL(lt_cv_path_LD,
2287[if test -z "$LD"; then
2288  lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2289  for ac_dir in $PATH; do
2290    IFS="$lt_save_ifs"
2291    test -z "$ac_dir" && ac_dir=.
2292    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
2293      lt_cv_path_LD="$ac_dir/$ac_prog"
2294      # Check to see if the program is GNU ld.  I'd rather use --version,
2295      # but apparently some variants of GNU ld only accept -v.
2296      # Break only if it was the GNU/non-GNU ld that we prefer.
2297      case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
2298      *GNU* | *'with BFD'*)
2299	test "$with_gnu_ld" != no && break
2300	;;
2301      *)
2302	test "$with_gnu_ld" != yes && break
2303	;;
2304      esac
2305    fi
2306  done
2307  IFS="$lt_save_ifs"
2308else
2309  lt_cv_path_LD="$LD" # Let the user override the test with a path.
2310fi])
2311LD="$lt_cv_path_LD"
2312if test -n "$LD"; then
2313  AC_MSG_RESULT($LD)
2314else
2315  AC_MSG_RESULT(no)
2316fi
2317test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
2318AC_PROG_LD_GNU
2319])# AC_PROG_LD
2320
2321
2322# AC_PROG_LD_GNU
2323# --------------
2324AC_DEFUN([AC_PROG_LD_GNU],
2325[AC_REQUIRE([AC_PROG_EGREP])dnl
2326AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
2327[# I'd rather use --version here, but apparently some GNU lds only accept -v.
2328case `$LD -v 2>&1 </dev/null` in
2329*GNU* | *'with BFD'*)
2330  lt_cv_prog_gnu_ld=yes
2331  ;;
2332*)
2333  lt_cv_prog_gnu_ld=no
2334  ;;
2335esac])
2336with_gnu_ld=$lt_cv_prog_gnu_ld
2337])# AC_PROG_LD_GNU
2338
2339
2340# AC_PROG_LD_RELOAD_FLAG
2341# ----------------------
2342# find reload flag for linker
2343#   -- PORTME Some linkers may need a different reload flag.
2344AC_DEFUN([AC_PROG_LD_RELOAD_FLAG],
2345[AC_CACHE_CHECK([for $LD option to reload object files],
2346  lt_cv_ld_reload_flag,
2347  [lt_cv_ld_reload_flag='-r'])
2348reload_flag=$lt_cv_ld_reload_flag
2349case $reload_flag in
2350"" | " "*) ;;
2351*) reload_flag=" $reload_flag" ;;
2352esac
2353reload_cmds='$LD$reload_flag -o $output$reload_objs'
2354case $host_os in
2355  darwin*)
2356    if test "$GCC" = yes; then
2357      reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
2358    else
2359      reload_cmds='$LD$reload_flag -o $output$reload_objs'
2360    fi
2361    ;;
2362esac
2363])# AC_PROG_LD_RELOAD_FLAG
2364
2365
2366# AC_DEPLIBS_CHECK_METHOD
2367# -----------------------
2368# how to check for library dependencies
2369#  -- PORTME fill in with the dynamic library characteristics
2370AC_DEFUN([AC_DEPLIBS_CHECK_METHOD],
2371[AC_CACHE_CHECK([how to recognize dependent libraries],
2372lt_cv_deplibs_check_method,
2373[lt_cv_file_magic_cmd='$MAGIC_CMD'
2374lt_cv_file_magic_test_file=
2375lt_cv_deplibs_check_method='unknown'
2376# Need to set the preceding variable on all platforms that support
2377# interlibrary dependencies.
2378# 'none' -- dependencies not supported.
2379# `unknown' -- same as none, but documents that we really don't know.
2380# 'pass_all' -- all dependencies passed with no checks.
2381# 'test_compile' -- check by making test program.
2382# 'file_magic [[regex]]' -- check by looking for files in library path
2383# which responds to the $file_magic_cmd with a given extended regex.
2384# If you have `file' or equivalent on your system and you're not sure
2385# whether `pass_all' will *always* work, you probably want this one.
2386
2387case $host_os in
2388aix[[4-9]]*)
2389  lt_cv_deplibs_check_method=pass_all
2390  ;;
2391
2392beos*)
2393  lt_cv_deplibs_check_method=pass_all
2394  ;;
2395
2396bsdi[[45]]*)
2397  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
2398  lt_cv_file_magic_cmd='/usr/bin/file -L'
2399  lt_cv_file_magic_test_file=/shlib/libc.so
2400  ;;
2401
2402cygwin*)
2403  # func_win32_libid is a shell function defined in ltmain.sh
2404  lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2405  lt_cv_file_magic_cmd='func_win32_libid'
2406  ;;
2407
2408mingw* | pw32*)
2409  # Base MSYS/MinGW do not provide the 'file' command needed by
2410  # func_win32_libid shell function, so use a weaker test based on 'objdump',
2411  # unless we find 'file', for example because we are cross-compiling.
2412  if ( file / ) >/dev/null 2>&1; then
2413    lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
2414    lt_cv_file_magic_cmd='func_win32_libid'
2415  else
2416    lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
2417    lt_cv_file_magic_cmd='$OBJDUMP -f'
2418  fi
2419  ;;
2420
2421darwin* | rhapsody*)
2422  lt_cv_deplibs_check_method=pass_all
2423  ;;
2424
2425freebsd* | dragonfly*)
2426  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2427    case $host_cpu in
2428    i*86 )
2429      # Not sure whether the presence of OpenBSD here was a mistake.
2430      # Let's accept both of them until this is cleared up.
2431      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
2432      lt_cv_file_magic_cmd=/usr/bin/file
2433      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
2434      ;;
2435    esac
2436  else
2437    lt_cv_deplibs_check_method=pass_all
2438  fi
2439  ;;
2440
2441gnu*)
2442  lt_cv_deplibs_check_method=pass_all
2443  ;;
2444
2445hpux10.20* | hpux11*)
2446  lt_cv_file_magic_cmd=/usr/bin/file
2447  case $host_cpu in
2448  ia64*)
2449    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
2450    lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
2451    ;;
2452  hppa*64*)
2453    [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]']
2454    lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
2455    ;;
2456  *)
2457    lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
2458    lt_cv_file_magic_test_file=/usr/lib/libc.sl
2459    ;;
2460  esac
2461  ;;
2462
2463interix[[3-9]]*)
2464  # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
2465  lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
2466  ;;
2467
2468irix5* | irix6* | nonstopux*)
2469  case $LD in
2470  *-32|*"-32 ") libmagic=32-bit;;
2471  *-n32|*"-n32 ") libmagic=N32;;
2472  *-64|*"-64 ") libmagic=64-bit;;
2473  *) libmagic=never-match;;
2474  esac
2475  lt_cv_deplibs_check_method=pass_all
2476  ;;
2477
2478# This must be Linux ELF.
2479linux* | k*bsd*-gnu)
2480  lt_cv_deplibs_check_method=pass_all
2481  ;;
2482
2483netbsd*)
2484  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
2485    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2486  else
2487    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
2488  fi
2489  ;;
2490
2491newos6*)
2492  lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
2493  lt_cv_file_magic_cmd=/usr/bin/file
2494  lt_cv_file_magic_test_file=/usr/lib/libnls.so
2495  ;;
2496
2497nto-qnx*)
2498  lt_cv_deplibs_check_method=unknown
2499  ;;
2500
2501openbsd*)
2502  if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
2503    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
2504  else
2505    lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
2506  fi
2507  ;;
2508
2509osf3* | osf4* | osf5*)
2510  lt_cv_deplibs_check_method=pass_all
2511  ;;
2512
2513rdos*)
2514  lt_cv_deplibs_check_method=pass_all
2515  ;;
2516
2517solaris*)
2518  lt_cv_deplibs_check_method=pass_all
2519  ;;
2520
2521sysv4 | sysv4.3*)
2522  case $host_vendor in
2523  motorola)
2524    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]]'
2525    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
2526    ;;
2527  ncr)
2528    lt_cv_deplibs_check_method=pass_all
2529    ;;
2530  sequent)
2531    lt_cv_file_magic_cmd='/bin/file'
2532    lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
2533    ;;
2534  sni)
2535    lt_cv_file_magic_cmd='/bin/file'
2536    lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
2537    lt_cv_file_magic_test_file=/lib/libc.so
2538    ;;
2539  siemens)
2540    lt_cv_deplibs_check_method=pass_all
2541    ;;
2542  pc)
2543    lt_cv_deplibs_check_method=pass_all
2544    ;;
2545  esac
2546  ;;
2547
2548sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
2549  lt_cv_deplibs_check_method=pass_all
2550  ;;
2551esac
2552])
2553file_magic_cmd=$lt_cv_file_magic_cmd
2554deplibs_check_method=$lt_cv_deplibs_check_method
2555test -z "$deplibs_check_method" && deplibs_check_method=unknown
2556])# AC_DEPLIBS_CHECK_METHOD
2557
2558
2559# AC_PROG_NM
2560# ----------
2561# find the pathname to a BSD-compatible name lister
2562AC_DEFUN([AC_PROG_NM],
2563[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM,
2564[if test -n "$NM"; then
2565  # Let the user override the test.
2566  lt_cv_path_NM="$NM"
2567else
2568  lt_nm_to_check="${ac_tool_prefix}nm"
2569  if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
2570    lt_nm_to_check="$lt_nm_to_check nm"
2571  fi
2572  for lt_tmp_nm in $lt_nm_to_check; do
2573    lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
2574    for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
2575      IFS="$lt_save_ifs"
2576      test -z "$ac_dir" && ac_dir=.
2577      tmp_nm="$ac_dir/$lt_tmp_nm"
2578      if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
2579	# Check to see if the nm accepts a BSD-compat flag.
2580	# Adding the `sed 1q' prevents false positives on HP-UX, which says:
2581	#   nm: unknown option "B" ignored
2582	# Tru64's nm complains that /dev/null is an invalid object file
2583	case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
2584	*/dev/null* | *'Invalid file or object type'*)
2585	  lt_cv_path_NM="$tmp_nm -B"
2586	  break
2587	  ;;
2588	*)
2589	  case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
2590	  */dev/null*)
2591	    lt_cv_path_NM="$tmp_nm -p"
2592	    break
2593	    ;;
2594	  *)
2595	    lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
2596	    continue # so that we can try to find one that supports BSD flags
2597	    ;;
2598	  esac
2599	  ;;
2600	esac
2601      fi
2602    done
2603    IFS="$lt_save_ifs"
2604  done
2605  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
2606fi])
2607NM="$lt_cv_path_NM"
2608])# AC_PROG_NM
2609
2610
2611# AC_CHECK_LIBM
2612# -------------
2613# check for math library
2614AC_DEFUN([AC_CHECK_LIBM],
2615[AC_REQUIRE([AC_CANONICAL_HOST])dnl
2616LIBM=
2617case $host in
2618*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
2619  # These system don't have libm, or don't need it
2620  ;;
2621*-ncr-sysv4.3*)
2622  AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
2623  AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
2624  ;;
2625*)
2626  AC_CHECK_LIB(m, cos, LIBM="-lm")
2627  ;;
2628esac
2629])# AC_CHECK_LIBM
2630
2631
2632# AC_LIBLTDL_CONVENIENCE([DIRECTORY])
2633# -----------------------------------
2634# sets LIBLTDL to the link flags for the libltdl convenience library and
2635# LTDLINCL to the include flags for the libltdl header and adds
2636# --enable-ltdl-convenience to the configure arguments.  Note that
2637# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2638# it is assumed to be `libltdl'.  LIBLTDL will be prefixed with
2639# '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/'
2640# (note the single quotes!).  If your package is not flat and you're not
2641# using automake, define top_builddir and top_srcdir appropriately in
2642# the Makefiles.
2643AC_DEFUN([AC_LIBLTDL_CONVENIENCE],
2644[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2645  case $enable_ltdl_convenience in
2646  no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
2647  "") enable_ltdl_convenience=yes
2648      ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
2649  esac
2650  LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la
2651  LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2652  # For backwards non-gettext consistent compatibility...
2653  INCLTDL="$LTDLINCL"
2654])# AC_LIBLTDL_CONVENIENCE
2655
2656
2657# AC_LIBLTDL_INSTALLABLE([DIRECTORY])
2658# -----------------------------------
2659# sets LIBLTDL to the link flags for the libltdl installable library and
2660# LTDLINCL to the include flags for the libltdl header and adds
2661# --enable-ltdl-install to the configure arguments.  Note that
2662# AC_CONFIG_SUBDIRS is not called here.  If DIRECTORY is not provided,
2663# and an installed libltdl is not found, it is assumed to be `libltdl'.
2664# LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with
2665# '${top_srcdir}/' (note the single quotes!).  If your package is not
2666# flat and you're not using automake, define top_builddir and top_srcdir
2667# appropriately in the Makefiles.
2668# In the future, this macro may have to be called after AC_PROG_LIBTOOL.
2669AC_DEFUN([AC_LIBLTDL_INSTALLABLE],
2670[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl
2671  AC_CHECK_LIB(ltdl, lt_dlinit,
2672  [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no],
2673  [if test x"$enable_ltdl_install" = xno; then
2674     AC_MSG_WARN([libltdl not installed, but installation disabled])
2675   else
2676     enable_ltdl_install=yes
2677   fi
2678  ])
2679  if test x"$enable_ltdl_install" = x"yes"; then
2680    ac_configure_args="$ac_configure_args --enable-ltdl-install"
2681    LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la
2682    LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
2683  else
2684    ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
2685    LIBLTDL="-lltdl"
2686    LTDLINCL=
2687  fi
2688  # For backwards non-gettext consistent compatibility...
2689  INCLTDL="$LTDLINCL"
2690])# AC_LIBLTDL_INSTALLABLE
2691
2692
2693# AC_LIBTOOL_CXX
2694# --------------
2695# enable support for C++ libraries
2696AC_DEFUN([AC_LIBTOOL_CXX],
2697[AC_REQUIRE([_LT_AC_LANG_CXX])
2698])# AC_LIBTOOL_CXX
2699
2700
2701# _LT_AC_LANG_CXX
2702# ---------------
2703AC_DEFUN([_LT_AC_LANG_CXX],
2704[AC_REQUIRE([AC_PROG_CXX])
2705AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2706_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX])
2707])# _LT_AC_LANG_CXX
2708
2709# _LT_AC_PROG_CXXCPP
2710# ------------------
2711AC_DEFUN([_LT_AC_PROG_CXXCPP],
2712[
2713AC_REQUIRE([AC_PROG_CXX])
2714if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
2715    ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
2716    (test "X$CXX" != "Xg++"))) ; then
2717  AC_PROG_CXXCPP
2718fi
2719])# _LT_AC_PROG_CXXCPP
2720
2721# AC_LIBTOOL_LANG_C_CONFIG
2722# ------------------------
2723# Ensure that the configuration vars for the C compiler are
2724# suitably defined.  Those variables are subsequently used by
2725# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2726AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG])
2727AC_DEFUN([_LT_AC_LANG_C_CONFIG],
2728[lt_save_CC="$CC"
2729AC_LANG_SAVE
2730AC_LANG_C
2731
2732# Source file extension for C test sources.
2733ac_ext=c
2734
2735# Object file extension for compiled C test sources.
2736objext=o
2737_LT_AC_TAGVAR(objext, $1)=$objext
2738
2739# Code to be used in simple compile tests
2740lt_simple_compile_test_code="int some_variable = 0;"
2741
2742# Code to be used in simple link tests
2743lt_simple_link_test_code='int main(){return(0);}'
2744
2745_LT_AC_SYS_COMPILER
2746
2747# save warnings/boilerplate of simple test code
2748_LT_COMPILER_BOILERPLATE
2749_LT_LINKER_BOILERPLATE
2750
2751## CAVEAT EMPTOR:
2752## There is no encapsulation within the following macros, do not change
2753## the running order or otherwise move them around unless you know exactly
2754## what you are doing...
2755AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1)
2756AC_LIBTOOL_PROG_COMPILER_PIC($1)
2757AC_LIBTOOL_PROG_CC_C_O($1)
2758AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
2759AC_LIBTOOL_PROG_LD_SHLIBS($1)
2760AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
2761AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
2762AC_LIBTOOL_SYS_LIB_STRIP
2763AC_LIBTOOL_DLOPEN_SELF
2764
2765# Report which library types will actually be built
2766AC_MSG_CHECKING([if libtool supports shared libraries])
2767AC_MSG_RESULT([$can_build_shared])
2768
2769AC_MSG_CHECKING([whether to build shared libraries])
2770test "$can_build_shared" = "no" && enable_shared=no
2771
2772# On AIX, shared libraries and static libraries use the same namespace, and
2773# are all built from PIC.
2774case $host_os in
2775aix3*)
2776  test "$enable_shared" = yes && enable_static=no
2777  if test -n "$RANLIB"; then
2778    archive_cmds="$archive_cmds~\$RANLIB \$lib"
2779    postinstall_cmds='$RANLIB $lib'
2780  fi
2781  ;;
2782
2783aix[[4-9]]*)
2784  if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
2785    test "$enable_shared" = yes && enable_static=no
2786  fi
2787    ;;
2788esac
2789AC_MSG_RESULT([$enable_shared])
2790
2791AC_MSG_CHECKING([whether to build static libraries])
2792# Make sure either enable_shared or enable_static is yes.
2793test "$enable_shared" = yes || enable_static=yes
2794AC_MSG_RESULT([$enable_static])
2795
2796AC_LIBTOOL_CONFIG($1)
2797
2798AC_LANG_RESTORE
2799CC="$lt_save_CC"
2800])# AC_LIBTOOL_LANG_C_CONFIG
2801
2802
2803# AC_LIBTOOL_LANG_CXX_CONFIG
2804# --------------------------
2805# Ensure that the configuration vars for the C compiler are
2806# suitably defined.  Those variables are subsequently used by
2807# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'.
2808AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)])
2809AC_DEFUN([_LT_AC_LANG_CXX_CONFIG],
2810[AC_LANG_SAVE
2811AC_LANG_CPLUSPLUS
2812AC_REQUIRE([AC_PROG_CXX])
2813AC_REQUIRE([_LT_AC_PROG_CXXCPP])
2814
2815_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
2816_LT_AC_TAGVAR(allow_undefined_flag, $1)=
2817_LT_AC_TAGVAR(always_export_symbols, $1)=no
2818_LT_AC_TAGVAR(archive_expsym_cmds, $1)=
2819_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
2820_LT_AC_TAGVAR(hardcode_direct, $1)=no
2821_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
2822_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
2823_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
2824_LT_AC_TAGVAR(hardcode_minus_L, $1)=no
2825_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
2826_LT_AC_TAGVAR(hardcode_automatic, $1)=no
2827_LT_AC_TAGVAR(module_cmds, $1)=
2828_LT_AC_TAGVAR(module_expsym_cmds, $1)=
2829_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
2830_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
2831_LT_AC_TAGVAR(no_undefined_flag, $1)=
2832_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2833_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
2834
2835# Dependencies to place before and after the object being linked:
2836_LT_AC_TAGVAR(predep_objects, $1)=
2837_LT_AC_TAGVAR(postdep_objects, $1)=
2838_LT_AC_TAGVAR(predeps, $1)=
2839_LT_AC_TAGVAR(postdeps, $1)=
2840_LT_AC_TAGVAR(compiler_lib_search_path, $1)=
2841_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
2842
2843# Source file extension for C++ test sources.
2844ac_ext=cpp
2845
2846# Object file extension for compiled C++ test sources.
2847objext=o
2848_LT_AC_TAGVAR(objext, $1)=$objext
2849
2850# Code to be used in simple compile tests
2851lt_simple_compile_test_code="int some_variable = 0;"
2852
2853# Code to be used in simple link tests
2854lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
2855
2856# ltmain only uses $CC for tagged configurations so make sure $CC is set.
2857_LT_AC_SYS_COMPILER
2858
2859# save warnings/boilerplate of simple test code
2860_LT_COMPILER_BOILERPLATE
2861_LT_LINKER_BOILERPLATE
2862
2863# Allow CC to be a program name with arguments.
2864lt_save_CC=$CC
2865lt_save_LD=$LD
2866lt_save_GCC=$GCC
2867GCC=$GXX
2868lt_save_with_gnu_ld=$with_gnu_ld
2869lt_save_path_LD=$lt_cv_path_LD
2870if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
2871  lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
2872else
2873  unset lt_cv_prog_gnu_ld
2874fi
2875if test -n "${lt_cv_path_LDCXX+set}"; then
2876  lt_cv_path_LD=$lt_cv_path_LDCXX
2877else
2878  unset lt_cv_path_LD
2879fi
2880test -z "${LDCXX+set}" || LD=$LDCXX
2881CC=${CXX-"c++"}
2882compiler=$CC
2883_LT_AC_TAGVAR(compiler, $1)=$CC
2884_LT_CC_BASENAME([$compiler])
2885
2886# We don't want -fno-exception wen compiling C++ code, so set the
2887# no_builtin_flag separately
2888if test "$GXX" = yes; then
2889  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
2890else
2891  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
2892fi
2893
2894if test "$GXX" = yes; then
2895  # Set up default GNU C++ configuration
2896
2897  AC_PROG_LD
2898
2899  # Check if GNU C++ uses GNU ld as the underlying linker, since the
2900  # archiving commands below assume that GNU ld is being used.
2901  if test "$with_gnu_ld" = yes; then
2902    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
2903    _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'
2904
2905    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
2906    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
2907
2908    # If archive_cmds runs LD, not CC, wlarc should be empty
2909    # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
2910    #     investigate it a little bit more. (MM)
2911    wlarc='${wl}'
2912
2913    # ancient GNU ld didn't support --whole-archive et. al.
2914    if eval "`$CC -print-prog-name=ld` --help 2>&1" | \
2915	grep 'no-whole-archive' > /dev/null; then
2916      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
2917    else
2918      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
2919    fi
2920  else
2921    with_gnu_ld=no
2922    wlarc=
2923
2924    # A generic and very simple default shared library creation
2925    # command for GNU C++ for the case where it uses the native
2926    # linker, instead of GNU ld.  If possible, this setting should
2927    # overridden to take advantage of the native linker features on
2928    # the platform it is being used on.
2929    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
2930  fi
2931
2932  # Commands to make compiler produce verbose output that lists
2933  # what "hidden" libraries, object files and flags are used when
2934  # linking a shared library.
2935  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
2936
2937else
2938  GXX=no
2939  with_gnu_ld=no
2940  wlarc=
2941fi
2942
2943# PORTME: fill in a description of your system's C++ link characteristics
2944AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
2945_LT_AC_TAGVAR(ld_shlibs, $1)=yes
2946case $host_os in
2947  aix3*)
2948    # FIXME: insert proper C++ library support
2949    _LT_AC_TAGVAR(ld_shlibs, $1)=no
2950    ;;
2951  aix[[4-9]]*)
2952    if test "$host_cpu" = ia64; then
2953      # On IA64, the linker does run time linking by default, so we don't
2954      # have to do anything special.
2955      aix_use_runtimelinking=no
2956      exp_sym_flag='-Bexport'
2957      no_entry_flag=""
2958    else
2959      aix_use_runtimelinking=no
2960
2961      # Test if we are trying to use run time linking or normal
2962      # AIX style linking. If -brtl is somewhere in LDFLAGS, we
2963      # need to do runtime linking.
2964      case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
2965	for ld_flag in $LDFLAGS; do
2966	  case $ld_flag in
2967	  *-brtl*)
2968	    aix_use_runtimelinking=yes
2969	    break
2970	    ;;
2971	  esac
2972	done
2973	;;
2974      esac
2975
2976      exp_sym_flag='-bexport'
2977      no_entry_flag='-bnoentry'
2978    fi
2979
2980    # When large executables or shared objects are built, AIX ld can
2981    # have problems creating the table of contents.  If linking a library
2982    # or program results in "error TOC overflow" add -mminimal-toc to
2983    # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
2984    # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
2985
2986    _LT_AC_TAGVAR(archive_cmds, $1)=''
2987    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
2988    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
2989    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
2990
2991    if test "$GXX" = yes; then
2992      case $host_os in aix4.[[012]]|aix4.[[012]].*)
2993      # We only want to do this on AIX 4.2 and lower, the check
2994      # below for broken collect2 doesn't work under 4.3+
2995	collect2name=`${CC} -print-prog-name=collect2`
2996	if test -f "$collect2name" && \
2997	   strings "$collect2name" | grep resolve_lib_name >/dev/null
2998	then
2999	  # We have reworked collect2
3000	  :
3001	else
3002	  # We have old collect2
3003	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
3004	  # It fails to find uninstalled libraries when the uninstalled
3005	  # path is not listed in the libpath.  Setting hardcode_minus_L
3006	  # to unsupported forces relinking
3007	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
3008	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3009	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
3010	fi
3011	;;
3012      esac
3013      shared_flag='-shared'
3014      if test "$aix_use_runtimelinking" = yes; then
3015	shared_flag="$shared_flag "'${wl}-G'
3016      fi
3017    else
3018      # not using gcc
3019      if test "$host_cpu" = ia64; then
3020	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
3021	# chokes on -Wl,-G. The following line is correct:
3022	shared_flag='-G'
3023      else
3024	if test "$aix_use_runtimelinking" = yes; then
3025	  shared_flag='${wl}-G'
3026	else
3027	  shared_flag='${wl}-bM:SRE'
3028	fi
3029      fi
3030    fi
3031
3032    # It seems that -bexpall does not export symbols beginning with
3033    # underscore (_), so it is better to generate a list of symbols to export.
3034    _LT_AC_TAGVAR(always_export_symbols, $1)=yes
3035    if test "$aix_use_runtimelinking" = yes; then
3036      # Warning - without using the other runtime loading flags (-brtl),
3037      # -berok will link without error, but may produce a broken library.
3038      _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
3039      # Determine the default libpath from the value encoded in an empty executable.
3040      _LT_AC_SYS_LIBPATH_AIX
3041      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3042
3043      _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"
3044     else
3045      if test "$host_cpu" = ia64; then
3046	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
3047	_LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
3048	_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"
3049      else
3050	# Determine the default libpath from the value encoded in an empty executable.
3051	_LT_AC_SYS_LIBPATH_AIX
3052	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
3053	# Warning - without using the other run time loading flags,
3054	# -berok will link without error, but may produce a broken library.
3055	_LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
3056	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
3057	# Exported symbols can be pulled into shared objects from archives
3058	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
3059	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
3060	# This is similar to how AIX traditionally builds its shared libraries.
3061	_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'
3062      fi
3063    fi
3064    ;;
3065
3066  beos*)
3067    if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
3068      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3069      # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
3070      # support --undefined.  This deserves some investigation.  FIXME
3071      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3072    else
3073      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3074    fi
3075    ;;
3076
3077  chorus*)
3078    case $cc_basename in
3079      *)
3080	# FIXME: insert proper C++ library support
3081	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3082	;;
3083    esac
3084    ;;
3085
3086  cygwin* | mingw* | pw32*)
3087    # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
3088    # as there is no search path for DLLs.
3089    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
3090    _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
3091    _LT_AC_TAGVAR(always_export_symbols, $1)=no
3092    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
3093
3094    if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
3095      _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'
3096      # If the export-symbols file already is a .def file (1st line
3097      # is EXPORTS), use it as is; otherwise, prepend...
3098      _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
3099	cp $export_symbols $output_objdir/$soname.def;
3100      else
3101	echo EXPORTS > $output_objdir/$soname.def;
3102	cat $export_symbols >> $output_objdir/$soname.def;
3103      fi~
3104      $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'
3105    else
3106      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3107    fi
3108  ;;
3109      darwin* | rhapsody*)
3110      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3111      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3112      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
3113      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
3114      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
3115      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3116      _LT_AC_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
3117      if test "$GXX" = yes ; then
3118      output_verbose_link_cmd='echo'
3119      _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
3120      _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
3121      _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
3122      _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
3123      if test "$lt_cv_apple_cc_single_mod" != "yes"; then
3124        _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${_lt_dsymutil}"
3125        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed '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${_lt_dar_export_syms}${_lt_dsymutil}"
3126      fi
3127      else
3128      case $cc_basename in
3129        xlc*)
3130         output_verbose_link_cmd='echo'
3131          _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
3132          _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
3133          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
3134          _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
3135          _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}'
3136          ;;
3137       *)
3138         _LT_AC_TAGVAR(ld_shlibs, $1)=no
3139          ;;
3140      esac
3141      fi
3142        ;;
3143
3144  dgux*)
3145    case $cc_basename in
3146      ec++*)
3147	# FIXME: insert proper C++ library support
3148	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3149	;;
3150      ghcx*)
3151	# Green Hills C++ Compiler
3152	# FIXME: insert proper C++ library support
3153	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3154	;;
3155      *)
3156	# FIXME: insert proper C++ library support
3157	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3158	;;
3159    esac
3160    ;;
3161  freebsd[[12]].*)
3162    # C++ shared libraries reported to be fairly broken before switch to ELF
3163    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3164    ;;
3165  freebsd-elf*)
3166    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3167    ;;
3168  freebsd* | dragonfly*)
3169    # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
3170    # conventions
3171    _LT_AC_TAGVAR(ld_shlibs, $1)=yes
3172    ;;
3173  gnu*)
3174    ;;
3175  hpux9*)
3176    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3177    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3178    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3179    _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3180    _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3181				# but as the default
3182				# location of the library.
3183
3184    case $cc_basename in
3185    CC*)
3186      # FIXME: insert proper C++ library support
3187      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3188      ;;
3189    aCC*)
3190      _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'
3191      # Commands to make compiler produce verbose output that lists
3192      # what "hidden" libraries, object files and flags are used when
3193      # linking a shared library.
3194      #
3195      # There doesn't appear to be a way to prevent this compiler from
3196      # explicitly linking system object files so we need to strip them
3197      # from the output so that they don't get included in the library
3198      # dependencies.
3199      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'
3200      ;;
3201    *)
3202      if test "$GXX" = yes; then
3203        _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'
3204      else
3205        # FIXME: insert proper C++ library support
3206        _LT_AC_TAGVAR(ld_shlibs, $1)=no
3207      fi
3208      ;;
3209    esac
3210    ;;
3211  hpux10*|hpux11*)
3212    if test $with_gnu_ld = no; then
3213      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
3214      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3215
3216      case $host_cpu in
3217      hppa*64*|ia64*) ;;
3218      *)
3219	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3220        ;;
3221      esac
3222    fi
3223    case $host_cpu in
3224    hppa*64*|ia64*)
3225      _LT_AC_TAGVAR(hardcode_direct, $1)=no
3226      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3227      ;;
3228    *)
3229      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3230      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
3231					      # but as the default
3232					      # location of the library.
3233      ;;
3234    esac
3235
3236    case $cc_basename in
3237      CC*)
3238	# FIXME: insert proper C++ library support
3239	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3240	;;
3241      aCC*)
3242	case $host_cpu in
3243	hppa*64*)
3244	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3245	  ;;
3246	ia64*)
3247	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3248	  ;;
3249	*)
3250	  _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'
3251	  ;;
3252	esac
3253	# Commands to make compiler produce verbose output that lists
3254	# what "hidden" libraries, object files and flags are used when
3255	# linking a shared library.
3256	#
3257	# There doesn't appear to be a way to prevent this compiler from
3258	# explicitly linking system object files so we need to strip them
3259	# from the output so that they don't get included in the library
3260	# dependencies.
3261	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'
3262	;;
3263      *)
3264	if test "$GXX" = yes; then
3265	  if test $with_gnu_ld = no; then
3266	    case $host_cpu in
3267	    hppa*64*)
3268	      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3269	      ;;
3270	    ia64*)
3271	      _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'
3272	      ;;
3273	    *)
3274	      _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'
3275	      ;;
3276	    esac
3277	  fi
3278	else
3279	  # FIXME: insert proper C++ library support
3280	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3281	fi
3282	;;
3283    esac
3284    ;;
3285  interix[[3-9]]*)
3286    _LT_AC_TAGVAR(hardcode_direct, $1)=no
3287    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3288    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3289    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3290    # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
3291    # Instead, shared libraries are loaded at an image base (0x10000000 by
3292    # default) and relocated if they conflict, which is a slow very memory
3293    # consuming and fragmenting process.  To avoid this, we pick a random,
3294    # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
3295    # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
3296    _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'
3297    _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'
3298    ;;
3299  irix5* | irix6*)
3300    case $cc_basename in
3301      CC*)
3302	# SGI C++
3303	_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'
3304
3305	# Archives containing C++ object files must be created using
3306	# "CC -ar", where "CC" is the IRIX C++ compiler.  This is
3307	# necessary to make sure instantiated templates are included
3308	# in the archive.
3309	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
3310	;;
3311      *)
3312	if test "$GXX" = yes; then
3313	  if test "$with_gnu_ld" = no; then
3314	    _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'
3315	  else
3316	    _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'
3317	  fi
3318	fi
3319	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3320	;;
3321    esac
3322    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3323    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3324    ;;
3325  linux* | k*bsd*-gnu)
3326    case $cc_basename in
3327      KCC*)
3328	# Kuck and Associates, Inc. (KAI) C++ Compiler
3329
3330	# KCC will only create a shared library if the output file
3331	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3332	# to its proper name (with version) after linking.
3333	_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'
3334	_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'
3335	# Commands to make compiler produce verbose output that lists
3336	# what "hidden" libraries, object files and flags are used when
3337	# linking a shared library.
3338	#
3339	# There doesn't appear to be a way to prevent this compiler from
3340	# explicitly linking system object files so we need to strip them
3341	# from the output so that they don't get included in the library
3342	# dependencies.
3343	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'
3344
3345	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir'
3346	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3347
3348	# Archives containing C++ object files must be created using
3349	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3350	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3351	;;
3352      icpc*)
3353	# Intel C++
3354	with_gnu_ld=yes
3355	# version 8.0 and above of icpc choke on multiply defined symbols
3356	# if we add $predep_objects and $postdep_objects, however 7.1 and
3357	# earlier do not add the objects themselves.
3358	case `$CC -V 2>&1` in
3359	*"Version 7."*)
3360  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3361  	  _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'
3362	  ;;
3363	*)  # Version 8.0 or newer
3364	  tmp_idyn=
3365	  case $host_cpu in
3366	    ia64*) tmp_idyn=' -i_dynamic';;
3367	  esac
3368  	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
3369	  _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'
3370	  ;;
3371	esac
3372	_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3373	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3374	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3375	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
3376	;;
3377      pgCC* | pgcpp*)
3378        # Portland Group C++ compiler
3379	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
3380  	_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'
3381
3382	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
3383	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
3384	_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'
3385        ;;
3386      cxx*)
3387	# Compaq C++
3388	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
3389	_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'
3390
3391	runpath_var=LD_RUN_PATH
3392	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3393	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3394
3395	# Commands to make compiler produce verbose output that lists
3396	# what "hidden" libraries, object files and flags are used when
3397	# linking a shared library.
3398	#
3399	# There doesn't appear to be a way to prevent this compiler from
3400	# explicitly linking system object files so we need to strip them
3401	# from the output so that they don't get included in the library
3402	# dependencies.
3403	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'
3404	;;
3405      *)
3406	case `$CC -V 2>&1 | sed 5q` in
3407	*Sun\ C*)
3408	  # Sun C++ 5.9
3409	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3410	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3411	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
3412	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3413	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
3414
3415	  # Not sure whether something based on
3416	  # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
3417	  # would be better.
3418	  output_verbose_link_cmd='echo'
3419
3420	  # Archives containing C++ object files must be created using
3421	  # "CC -xar", where "CC" is the Sun C++ compiler.  This is
3422	  # necessary to make sure instantiated templates are included
3423	  # in the archive.
3424	  _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3425	  ;;
3426	esac
3427	;;
3428    esac
3429    ;;
3430  lynxos*)
3431    # FIXME: insert proper C++ library support
3432    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3433    ;;
3434  m88k*)
3435    # FIXME: insert proper C++ library support
3436    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3437    ;;
3438  mvs*)
3439    case $cc_basename in
3440      cxx*)
3441	# FIXME: insert proper C++ library support
3442	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3443	;;
3444      *)
3445	# FIXME: insert proper C++ library support
3446	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3447	;;
3448    esac
3449    ;;
3450  netbsd*)
3451    if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
3452      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable  -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
3453      wlarc=
3454      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3455      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3456      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3457    fi
3458    # Workaround some broken pre-1.5 toolchains
3459    output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
3460    ;;
3461  openbsd2*)
3462    # C++ shared libraries are fairly broken
3463    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3464    ;;
3465  openbsd*)
3466    if test -f /usr/libexec/ld.so; then
3467      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
3468      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3469      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
3470      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3471      if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3472	_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'
3473	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
3474	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
3475      fi
3476      output_verbose_link_cmd='echo'
3477    else
3478      _LT_AC_TAGVAR(ld_shlibs, $1)=no
3479    fi
3480    ;;
3481  osf3*)
3482    case $cc_basename in
3483      KCC*)
3484	# Kuck and Associates, Inc. (KAI) C++ Compiler
3485
3486	# KCC will only create a shared library if the output file
3487	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3488	# to its proper name (with version) after linking.
3489	_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'
3490
3491	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3492	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3493
3494	# Archives containing C++ object files must be created using
3495	# "CC -Bstatic", where "CC" is the KAI C++ compiler.
3496	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
3497
3498	;;
3499      RCC*)
3500	# Rational C++ 2.4.1
3501	# FIXME: insert proper C++ library support
3502	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3503	;;
3504      cxx*)
3505	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3506	_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'
3507
3508	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3509	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3510
3511	# Commands to make compiler produce verbose output that lists
3512	# what "hidden" libraries, object files and flags are used when
3513	# linking a shared library.
3514	#
3515	# There doesn't appear to be a way to prevent this compiler from
3516	# explicitly linking system object files so we need to strip them
3517	# from the output so that they don't get included in the library
3518	# dependencies.
3519	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'
3520	;;
3521      *)
3522	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3523	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3524	  _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'
3525
3526	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3527	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3528
3529	  # Commands to make compiler produce verbose output that lists
3530	  # what "hidden" libraries, object files and flags are used when
3531	  # linking a shared library.
3532	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3533
3534	else
3535	  # FIXME: insert proper C++ library support
3536	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3537	fi
3538	;;
3539    esac
3540    ;;
3541  osf4* | osf5*)
3542    case $cc_basename in
3543      KCC*)
3544	# Kuck and Associates, Inc. (KAI) C++ Compiler
3545
3546	# KCC will only create a shared library if the output file
3547	# ends with ".so" (or ".sl" for HP-UX), so rename the library
3548	# to its proper name (with version) after linking.
3549	_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'
3550
3551	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
3552	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3553
3554	# Archives containing C++ object files must be created using
3555	# the KAI C++ compiler.
3556	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs'
3557	;;
3558      RCC*)
3559	# Rational C++ 2.4.1
3560	# FIXME: insert proper C++ library support
3561	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3562	;;
3563      cxx*)
3564	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
3565	_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'
3566	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
3567	  echo "-hidden">> $lib.exp~
3568	  $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~
3569	  $rm $lib.exp'
3570
3571	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
3572	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3573
3574	# Commands to make compiler produce verbose output that lists
3575	# what "hidden" libraries, object files and flags are used when
3576	# linking a shared library.
3577	#
3578	# There doesn't appear to be a way to prevent this compiler from
3579	# explicitly linking system object files so we need to strip them
3580	# from the output so that they don't get included in the library
3581	# dependencies.
3582	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'
3583	;;
3584      *)
3585	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3586	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
3587	 _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'
3588
3589	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
3590	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
3591
3592	  # Commands to make compiler produce verbose output that lists
3593	  # what "hidden" libraries, object files and flags are used when
3594	  # linking a shared library.
3595	  output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"'
3596
3597	else
3598	  # FIXME: insert proper C++ library support
3599	  _LT_AC_TAGVAR(ld_shlibs, $1)=no
3600	fi
3601	;;
3602    esac
3603    ;;
3604  psos*)
3605    # FIXME: insert proper C++ library support
3606    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3607    ;;
3608  sunos4*)
3609    case $cc_basename in
3610      CC*)
3611	# Sun C++ 4.x
3612	# FIXME: insert proper C++ library support
3613	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3614	;;
3615      lcc*)
3616	# Lucid
3617	# FIXME: insert proper C++ library support
3618	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3619	;;
3620      *)
3621	# FIXME: insert proper C++ library support
3622	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3623	;;
3624    esac
3625    ;;
3626  solaris*)
3627    case $cc_basename in
3628      CC*)
3629	# Sun C++ 4.2, 5.x and Centerline C++
3630        _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
3631	_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
3632	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}  -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
3633	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3634	$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'
3635
3636	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
3637	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3638	case $host_os in
3639	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3640	  *)
3641	    # The compiler driver will combine and reorder linker options,
3642	    # but understands `-z linker_flag'.
3643	    # Supported since Solaris 2.6 (maybe 2.5.1?)
3644	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
3645	    ;;
3646	esac
3647	_LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3648
3649	output_verbose_link_cmd='echo'
3650
3651	# Archives containing C++ object files must be created using
3652	# "CC -xar", where "CC" is the Sun C++ compiler.  This is
3653	# necessary to make sure instantiated templates are included
3654	# in the archive.
3655	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
3656	;;
3657      gcx*)
3658	# Green Hills C++ Compiler
3659	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3660
3661	# The C++ compiler must be used to create the archive.
3662	_LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
3663	;;
3664      *)
3665	# GNU C++ compiler with Solaris linker
3666	if test "$GXX" = yes && test "$with_gnu_ld" = no; then
3667	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
3668	  if $CC --version | grep -v '^2\.7' > /dev/null; then
3669	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3670	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3671		$CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3672
3673	    # Commands to make compiler produce verbose output that lists
3674	    # what "hidden" libraries, object files and flags are used when
3675	    # linking a shared library.
3676	    output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3677	  else
3678	    # g++ 2.7 appears to require `-G' NOT `-shared' on this
3679	    # platform.
3680	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
3681	    _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
3682		$CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp'
3683
3684	    # Commands to make compiler produce verbose output that lists
3685	    # what "hidden" libraries, object files and flags are used when
3686	    # linking a shared library.
3687	    output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\""
3688	  fi
3689
3690	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
3691	  case $host_os in
3692	  solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
3693	  *)
3694	    _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
3695	    ;;
3696	  esac
3697	fi
3698	;;
3699    esac
3700    ;;
3701  sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
3702    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3703    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3704    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3705    runpath_var='LD_RUN_PATH'
3706
3707    case $cc_basename in
3708      CC*)
3709	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3710	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3711	;;
3712      *)
3713	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3714	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
3715	;;
3716    esac
3717    ;;
3718  sysv5* | sco3.2v5* | sco5v6*)
3719    # Note: We can NOT use -z defs as we might desire, because we do not
3720    # link with -lc, and that would cause any symbols used from libc to
3721    # always be unresolved, which means just about no library would
3722    # ever link correctly.  If we're not using GNU ld we use -z text
3723    # though, which does catch some bad symbols but isn't as heavy-handed
3724    # as -z defs.
3725    # For security reasons, it is highly recommended that you always
3726    # use absolute paths for naming shared libraries, and exclude the
3727    # DT_RUNPATH tag from executables and libraries.  But doing so
3728    # requires that you compile everything twice, which is a pain.
3729    # So that behaviour is only enabled if SCOABSPATH is set to a
3730    # non-empty value in the environment.  Most likely only useful for
3731    # creating official distributions of packages.
3732    # This is a hack until libtool officially supports absolute path
3733    # names for shared libraries.
3734    _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
3735    _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
3736    _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
3737    _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
3738    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
3739    _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
3740    _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
3741    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
3742    runpath_var='LD_RUN_PATH'
3743
3744    case $cc_basename in
3745      CC*)
3746	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3747	_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'
3748	;;
3749      *)
3750	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
3751	_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'
3752	;;
3753    esac
3754    ;;
3755  tandem*)
3756    case $cc_basename in
3757      NCC*)
3758	# NonStop-UX NCC 3.20
3759	# FIXME: insert proper C++ library support
3760	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3761	;;
3762      *)
3763	# FIXME: insert proper C++ library support
3764	_LT_AC_TAGVAR(ld_shlibs, $1)=no
3765	;;
3766    esac
3767    ;;
3768  vxworks*)
3769    # FIXME: insert proper C++ library support
3770    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3771    ;;
3772  *)
3773    # FIXME: insert proper C++ library support
3774    _LT_AC_TAGVAR(ld_shlibs, $1)=no
3775    ;;
3776esac
3777AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
3778test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
3779
3780_LT_AC_TAGVAR(GCC, $1)="$GXX"
3781_LT_AC_TAGVAR(LD, $1)="$LD"
3782
3783## CAVEAT EMPTOR:
3784## There is no encapsulation within the following macros, do not change
3785## the running order or otherwise move them around unless you know exactly
3786## what you are doing...
3787AC_LIBTOOL_POSTDEP_PREDEP($1)
3788AC_LIBTOOL_PROG_COMPILER_PIC($1)
3789AC_LIBTOOL_PROG_CC_C_O($1)
3790AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1)
3791AC_LIBTOOL_PROG_LD_SHLIBS($1)
3792AC_LIBTOOL_SYS_DYNAMIC_LINKER($1)
3793AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1)
3794
3795AC_LIBTOOL_CONFIG($1)
3796
3797AC_LANG_RESTORE
3798CC=$lt_save_CC
3799LDCXX=$LD
3800LD=$lt_save_LD
3801GCC=$lt_save_GCC
3802with_gnu_ldcxx=$with_gnu_ld
3803with_gnu_ld=$lt_save_with_gnu_ld
3804lt_cv_path_LDCXX=$lt_cv_path_LD
3805lt_cv_path_LD=$lt_save_path_LD
3806lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
3807lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
3808])# AC_LIBTOOL_LANG_CXX_CONFIG
3809
3810# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME])
3811# ------------------------------------
3812# Figure out "hidden" library dependencies from verbose
3813# compiler output when linking a shared library.
3814# Parse the compiler output and extract the necessary
3815# objects, libraries and library flags.
3816AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],
3817[AC_REQUIRE([LT_AC_PROG_SED])dnl
3818dnl we can't use the lt_simple_compile_test_code here,
3819dnl because it contains code intended for an executable,
3820dnl not a library.  It's possible we should let each
3821dnl tag define a new lt_????_link_test_code variable,
3822dnl but it's only used here...
3823ifelse([$1],[],[cat > conftest.$ac_ext <<EOF
3824int a;
3825void foo (void) { a = 0; }
3826EOF
3827],[$1],[CXX],[cat > conftest.$ac_ext <<EOF
3828class Foo
3829{
3830public:
3831  Foo (void) { a = 0; }
3832private:
3833  int a;
3834};
3835EOF
3836],[$1],[F77],[cat > conftest.$ac_ext <<EOF
3837      subroutine foo
3838      implicit none
3839      integer*4 a
3840      a=0
3841      return
3842      end
3843EOF
3844],[$1],[GCJ],[cat > conftest.$ac_ext <<EOF
3845public class foo {
3846  private int a;
3847  public void bar (void) {
3848    a = 0;
3849  }
3850};
3851EOF
3852])
3853dnl Parse the compiler output and extract the necessary
3854dnl objects, libraries and library flags.
3855if AC_TRY_EVAL(ac_compile); then
3856  # Parse the compiler output and extract the necessary
3857  # objects, libraries and library flags.
3858
3859  # Sentinel used to keep track of whether or not we are before
3860  # the conftest object file.
3861  pre_test_object_deps_done=no
3862
3863  # The `*' in the case matches for architectures that use `case' in
3864  # $output_verbose_cmd can trigger glob expansion during the loop
3865  # eval without this substitution.
3866  output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"`
3867
3868  for p in `eval $output_verbose_link_cmd`; do
3869    case $p in
3870
3871    -L* | -R* | -l*)
3872       # Some compilers place space between "-{L,R}" and the path.
3873       # Remove the space.
3874       if test $p = "-L" \
3875	  || test $p = "-R"; then
3876	 prev=$p
3877	 continue
3878       else
3879	 prev=
3880       fi
3881
3882       if test "$pre_test_object_deps_done" = no; then
3883	 case $p in
3884	 -L* | -R*)
3885	   # Internal compiler library paths should come after those
3886	   # provided the user.  The postdeps already come after the
3887	   # user supplied libs so there is no need to process them.
3888	   if test -z "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3889	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
3890	   else
3891	     _LT_AC_TAGVAR(compiler_lib_search_path, $1)="${_LT_AC_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
3892	   fi
3893	   ;;
3894	 # The "-l" case would never come before the object being
3895	 # linked, so don't bother handling this case.
3896	 esac
3897       else
3898	 if test -z "$_LT_AC_TAGVAR(postdeps, $1)"; then
3899	   _LT_AC_TAGVAR(postdeps, $1)="${prev}${p}"
3900	 else
3901	   _LT_AC_TAGVAR(postdeps, $1)="${_LT_AC_TAGVAR(postdeps, $1)} ${prev}${p}"
3902	 fi
3903       fi
3904       ;;
3905
3906    *.$objext)
3907       # This assumes that the test object file only shows up
3908       # once in the compiler output.
3909       if test "$p" = "conftest.$objext"; then
3910	 pre_test_object_deps_done=yes
3911	 continue
3912       fi
3913
3914       if test "$pre_test_object_deps_done" = no; then
3915	 if test -z "$_LT_AC_TAGVAR(predep_objects, $1)"; then
3916	   _LT_AC_TAGVAR(predep_objects, $1)="$p"
3917	 else
3918	   _LT_AC_TAGVAR(predep_objects, $1)="$_LT_AC_TAGVAR(predep_objects, $1) $p"
3919	 fi
3920       else
3921	 if test -z "$_LT_AC_TAGVAR(postdep_objects, $1)"; then
3922	   _LT_AC_TAGVAR(postdep_objects, $1)="$p"
3923	 else
3924	   _LT_AC_TAGVAR(postdep_objects, $1)="$_LT_AC_TAGVAR(postdep_objects, $1) $p"
3925	 fi
3926       fi
3927       ;;
3928
3929    *) ;; # Ignore the rest.
3930
3931    esac
3932  done
3933
3934  # Clean up.
3935  rm -f a.out a.exe
3936else
3937  echo "libtool.m4: error: problem compiling $1 test program"
3938fi
3939
3940$rm -f confest.$objext
3941
3942_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=
3943if test -n "$_LT_AC_TAGVAR(compiler_lib_search_path, $1)"; then
3944  _LT_AC_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_AC_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
3945fi
3946
3947# PORTME: override above test on systems where it is broken
3948ifelse([$1],[CXX],
3949[case $host_os in
3950interix[[3-9]]*)
3951  # Interix 3.5 installs completely hosed .la files for C++, so rather than
3952  # hack all around it, let's just trust "g++" to DTRT.
3953  _LT_AC_TAGVAR(predep_objects,$1)=
3954  _LT_AC_TAGVAR(postdep_objects,$1)=
3955  _LT_AC_TAGVAR(postdeps,$1)=
3956  ;;
3957
3958linux*)
3959  case `$CC -V 2>&1 | sed 5q` in
3960  *Sun\ C*)
3961    # Sun C++ 5.9
3962    #
3963    # The more standards-conforming stlport4 library is
3964    # incompatible with the Cstd library. Avoid specifying
3965    # it if it's in CXXFLAGS. Ignore libCrun as
3966    # -library=stlport4 depends on it.
3967    case " $CXX $CXXFLAGS " in
3968    *" -library=stlport4 "*)
3969      solaris_use_stlport4=yes
3970      ;;
3971    esac
3972    if test "$solaris_use_stlport4" != yes; then
3973      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3974    fi
3975    ;;
3976  esac
3977  ;;
3978
3979solaris*)
3980  case $cc_basename in
3981  CC*)
3982    # The more standards-conforming stlport4 library is
3983    # incompatible with the Cstd library. Avoid specifying
3984    # it if it's in CXXFLAGS. Ignore libCrun as
3985    # -library=stlport4 depends on it.
3986    case " $CXX $CXXFLAGS " in
3987    *" -library=stlport4 "*)
3988      solaris_use_stlport4=yes
3989      ;;
3990    esac
3991
3992    # Adding this requires a known-good setup of shared libraries for
3993    # Sun compiler versions before 5.6, else PIC objects from an old
3994    # archive will be linked into the output, leading to subtle bugs.
3995    if test "$solaris_use_stlport4" != yes; then
3996      _LT_AC_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
3997    fi
3998    ;;
3999  esac
4000  ;;
4001esac
4002])
4003case " $_LT_AC_TAGVAR(postdeps, $1) " in
4004*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;
4005esac
4006])# AC_LIBTOOL_POSTDEP_PREDEP
4007
4008# AC_LIBTOOL_CONFIG([TAGNAME])
4009# ----------------------------
4010# If TAGNAME is not passed, then create an initial libtool script
4011# with a default configuration from the untagged config vars.  Otherwise
4012# add code to config.status for appending the configuration named by
4013# TAGNAME from the matching tagged config vars.
4014AC_DEFUN([AC_LIBTOOL_CONFIG],
4015[# The else clause should only fire when bootstrapping the
4016# libtool distribution, otherwise you forgot to ship ltmain.sh
4017# with your package, and you will get complaints that there are
4018# no rules to generate ltmain.sh.
4019if test -f "$ltmain"; then
4020  # See if we are running on zsh, and set the options which allow our commands through
4021  # without removal of \ escapes.
4022  if test -n "${ZSH_VERSION+set}" ; then
4023    setopt NO_GLOB_SUBST
4024  fi
4025  # Now quote all the things that may contain metacharacters while being
4026  # careful not to overquote the AC_SUBSTed values.  We take copies of the
4027  # variables and quote the copies for generation of the libtool script.
4028  for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \
4029    SED SHELL STRIP \
4030    libname_spec library_names_spec soname_spec extract_expsyms_cmds \
4031    old_striplib striplib file_magic_cmd finish_cmds finish_eval \
4032    deplibs_check_method reload_flag reload_cmds need_locks \
4033    lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \
4034    lt_cv_sys_global_symbol_to_c_name_address \
4035    sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
4036    old_postinstall_cmds old_postuninstall_cmds \
4037    _LT_AC_TAGVAR(compiler, $1) \
4038    _LT_AC_TAGVAR(CC, $1) \
4039    _LT_AC_TAGVAR(LD, $1) \
4040    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1) \
4041    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1) \
4042    _LT_AC_TAGVAR(lt_prog_compiler_static, $1) \
4043    _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) \
4044    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1) \
4045    _LT_AC_TAGVAR(thread_safe_flag_spec, $1) \
4046    _LT_AC_TAGVAR(whole_archive_flag_spec, $1) \
4047    _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) \
4048    _LT_AC_TAGVAR(old_archive_cmds, $1) \
4049    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) \
4050    _LT_AC_TAGVAR(predep_objects, $1) \
4051    _LT_AC_TAGVAR(postdep_objects, $1) \
4052    _LT_AC_TAGVAR(predeps, $1) \
4053    _LT_AC_TAGVAR(postdeps, $1) \
4054    _LT_AC_TAGVAR(compiler_lib_search_path, $1) \
4055    _LT_AC_TAGVAR(compiler_lib_search_dirs, $1) \
4056    _LT_AC_TAGVAR(archive_cmds, $1) \
4057    _LT_AC_TAGVAR(archive_expsym_cmds, $1) \
4058    _LT_AC_TAGVAR(postinstall_cmds, $1) \
4059    _LT_AC_TAGVAR(postuninstall_cmds, $1) \
4060    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) \
4061    _LT_AC_TAGVAR(allow_undefined_flag, $1) \
4062    _LT_AC_TAGVAR(no_undefined_flag, $1) \
4063    _LT_AC_TAGVAR(export_symbols_cmds, $1) \
4064    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) \
4065    _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) \
4066    _LT_AC_TAGVAR(hardcode_libdir_separator, $1) \
4067    _LT_AC_TAGVAR(hardcode_automatic, $1) \
4068    _LT_AC_TAGVAR(module_cmds, $1) \
4069    _LT_AC_TAGVAR(module_expsym_cmds, $1) \
4070    _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) \
4071    _LT_AC_TAGVAR(fix_srcfile_path, $1) \
4072    _LT_AC_TAGVAR(exclude_expsyms, $1) \
4073    _LT_AC_TAGVAR(include_expsyms, $1); do
4074
4075    case $var in
4076    _LT_AC_TAGVAR(old_archive_cmds, $1) | \
4077    _LT_AC_TAGVAR(old_archive_from_new_cmds, $1) | \
4078    _LT_AC_TAGVAR(archive_cmds, $1) | \
4079    _LT_AC_TAGVAR(archive_expsym_cmds, $1) | \
4080    _LT_AC_TAGVAR(module_cmds, $1) | \
4081    _LT_AC_TAGVAR(module_expsym_cmds, $1) | \
4082    _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) | \
4083    _LT_AC_TAGVAR(export_symbols_cmds, $1) | \
4084    extract_expsyms_cmds | reload_cmds | finish_cmds | \
4085    postinstall_cmds | postuninstall_cmds | \
4086    old_postinstall_cmds | old_postuninstall_cmds | \
4087    sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
4088      # Double-quote double-evaled strings.
4089      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
4090      ;;
4091    *)
4092      eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
4093      ;;
4094    esac
4095  done
4096
4097  case $lt_echo in
4098  *'\[$]0 --fallback-echo"')
4099    lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\[$]0 --fallback-echo"[$]/[$]0 --fallback-echo"/'`
4100    ;;
4101  esac
4102
4103ifelse([$1], [],
4104  [cfgfile="${ofile}T"
4105  trap "$rm \"$cfgfile\"; exit 1" 1 2 15
4106  $rm -f "$cfgfile"
4107  AC_MSG_RESULT([
4108creating $ofile])],
4109  [cfgfile="$ofile"])
4110
4111  cat <<__EOF__ >> "$cfgfile"
4112ifelse([$1], [],
4113[#! $SHELL
4114
4115# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
4116# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
4117# NOTE: Changes made to this file will be lost: look at ltmain.sh.
4118#
4119# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
4120# Free Software Foundation, Inc.
4121#
4122# This file is part of GNU Libtool:
4123# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
4124#
4125# This program is free software; you can redistribute it and/or modify
4126# it under the terms of the GNU General Public License as published by
4127# the Free Software Foundation; either version 2 of the License, or
4128# (at your option) any later version.
4129#
4130# This program is distributed in the hope that it will be useful, but
4131# WITHOUT ANY WARRANTY; without even the implied warranty of
4132# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
4133# General Public License for more details.
4134#
4135# You should have received a copy of the GNU General Public License
4136# along with this program; if not, write to the Free Software
4137# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
4138#
4139# As a special exception to the GNU General Public License, if you
4140# distribute this file as part of a program that contains a
4141# configuration script generated by Autoconf, you may include it under
4142# the same distribution terms that you use for the rest of that program.
4143
4144# A sed program that does not truncate output.
4145SED=$lt_SED
4146
4147# Sed that helps us avoid accidentally triggering echo(1) options like -n.
4148Xsed="$SED -e 1s/^X//"
4149
4150# The HP-UX ksh and POSIX shell print the target directory to stdout
4151# if CDPATH is set.
4152(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
4153
4154# The names of the tagged configurations supported by this script.
4155available_tags=
4156
4157# ### BEGIN LIBTOOL CONFIG],
4158[# ### BEGIN LIBTOOL TAG CONFIG: $tagname])
4159
4160# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
4161
4162# Shell to use when invoking shell scripts.
4163SHELL=$lt_SHELL
4164
4165# Whether or not to build shared libraries.
4166build_libtool_libs=$enable_shared
4167
4168# Whether or not to build static libraries.
4169build_old_libs=$enable_static
4170
4171# Whether or not to add -lc for building shared libraries.
4172build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)
4173
4174# Whether or not to disallow shared libs when runtime libs are static
4175allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)
4176
4177# Whether or not to optimize for fast installation.
4178fast_install=$enable_fast_install
4179
4180# The host system.
4181host_alias=$host_alias
4182host=$host
4183host_os=$host_os
4184
4185# The build system.
4186build_alias=$build_alias
4187build=$build
4188build_os=$build_os
4189
4190# An echo program that does not interpret backslashes.
4191echo=$lt_echo
4192
4193# The archiver.
4194AR=$lt_AR
4195AR_FLAGS=$lt_AR_FLAGS
4196
4197# A C compiler.
4198LTCC=$lt_LTCC
4199
4200# LTCC compiler flags.
4201LTCFLAGS=$lt_LTCFLAGS
4202
4203# A language-specific compiler.
4204CC=$lt_[]_LT_AC_TAGVAR(compiler, $1)
4205
4206# Is the compiler the GNU C compiler?
4207with_gcc=$_LT_AC_TAGVAR(GCC, $1)
4208
4209# An ERE matcher.
4210EGREP=$lt_EGREP
4211
4212# The linker used to build libraries.
4213LD=$lt_[]_LT_AC_TAGVAR(LD, $1)
4214
4215# Whether we need hard or soft links.
4216LN_S=$lt_LN_S
4217
4218# A BSD-compatible nm program.
4219NM=$lt_NM
4220
4221# A symbol stripping program
4222STRIP=$lt_STRIP
4223
4224# Used to examine libraries when file_magic_cmd begins "file"
4225MAGIC_CMD=$MAGIC_CMD
4226
4227# Used on cygwin: DLL creation program.
4228DLLTOOL="$DLLTOOL"
4229
4230# Used on cygwin: object dumper.
4231OBJDUMP="$OBJDUMP"
4232
4233# Used on cygwin: assembler.
4234AS="$AS"
4235
4236# The name of the directory that contains temporary libtool files.
4237objdir=$objdir
4238
4239# How to create reloadable object files.
4240reload_flag=$lt_reload_flag
4241reload_cmds=$lt_reload_cmds
4242
4243# How to pass a linker flag through the compiler.
4244wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
4245
4246# Object file suffix (normally "o").
4247objext="$ac_objext"
4248
4249# Old archive suffix (normally "a").
4250libext="$libext"
4251
4252# Shared library suffix (normally ".so").
4253shrext_cmds='$shrext_cmds'
4254
4255# Executable file suffix (normally "").
4256exeext="$exeext"
4257
4258# Additional compiler flags for building library objects.
4259pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
4260pic_mode=$pic_mode
4261
4262# What is the maximum length of a command?
4263max_cmd_len=$lt_cv_sys_max_cmd_len
4264
4265# Does compiler simultaneously support -c and -o options?
4266compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)
4267
4268# Must we lock files when doing compilation?
4269need_locks=$lt_need_locks
4270
4271# Do we need the lib prefix for modules?
4272need_lib_prefix=$need_lib_prefix
4273
4274# Do we need a version for libraries?
4275need_version=$need_version
4276
4277# Whether dlopen is supported.
4278dlopen_support=$enable_dlopen
4279
4280# Whether dlopen of programs is supported.
4281dlopen_self=$enable_dlopen_self
4282
4283# Whether dlopen of statically linked programs is supported.
4284dlopen_self_static=$enable_dlopen_self_static
4285
4286# Compiler flag to prevent dynamic linking.
4287link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1)
4288
4289# Compiler flag to turn off builtin functions.
4290no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)
4291
4292# Compiler flag to allow reflexive dlopens.
4293export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)
4294
4295# Compiler flag to generate shared objects directly from archives.
4296whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1)
4297
4298# Compiler flag to generate thread-safe objects.
4299thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1)
4300
4301# Library versioning type.
4302version_type=$version_type
4303
4304# Format of library name prefix.
4305libname_spec=$lt_libname_spec
4306
4307# List of archive names.  First name is the real one, the rest are links.
4308# The last name is the one that the linker finds with -lNAME.
4309library_names_spec=$lt_library_names_spec
4310
4311# The coded name of the library, if different from the real name.
4312soname_spec=$lt_soname_spec
4313
4314# Commands used to build and install an old-style archive.
4315RANLIB=$lt_RANLIB
4316old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1)
4317old_postinstall_cmds=$lt_old_postinstall_cmds
4318old_postuninstall_cmds=$lt_old_postuninstall_cmds
4319
4320# Create an old-style archive from a shared archive.
4321old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1)
4322
4323# Create a temporary old-style archive to link instead of a shared archive.
4324old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)
4325
4326# Commands used to build and install a shared archive.
4327archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1)
4328archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1)
4329postinstall_cmds=$lt_postinstall_cmds
4330postuninstall_cmds=$lt_postuninstall_cmds
4331
4332# Commands used to build a loadable module (assumed same as above if empty)
4333module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1)
4334module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1)
4335
4336# Commands to strip libraries.
4337old_striplib=$lt_old_striplib
4338striplib=$lt_striplib
4339
4340# Dependencies to place before the objects being linked to create a
4341# shared library.
4342predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4343
4344# Dependencies to place after the objects being linked to create a
4345# shared library.
4346postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4347
4348# Dependencies to place before the objects being linked to create a
4349# shared library.
4350predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4351
4352# Dependencies to place after the objects being linked to create a
4353# shared library.
4354postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4355
4356# The directories searched by this compiler when creating a shared
4357# library
4358compiler_lib_search_dirs=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_dirs, $1)
4359
4360# The library search path used internally by the compiler when linking
4361# a shared library.
4362compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4363
4364# Method to check whether dependent libraries are shared objects.
4365deplibs_check_method=$lt_deplibs_check_method
4366
4367# Command to use when deplibs_check_method == file_magic.
4368file_magic_cmd=$lt_file_magic_cmd
4369
4370# Flag that allows shared libraries with undefined symbols to be built.
4371allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1)
4372
4373# Flag that forces no undefined symbols.
4374no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1)
4375
4376# Commands used to finish a libtool library installation in a directory.
4377finish_cmds=$lt_finish_cmds
4378
4379# Same as above, but a single script fragment to be evaled but not shown.
4380finish_eval=$lt_finish_eval
4381
4382# Take the output of nm and produce a listing of raw symbols and C names.
4383global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
4384
4385# Transform the output of nm in a proper C declaration
4386global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
4387
4388# Transform the output of nm in a C name address pair
4389global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
4390
4391# This is the shared library runtime path variable.
4392runpath_var=$runpath_var
4393
4394# This is the shared library path variable.
4395shlibpath_var=$shlibpath_var
4396
4397# Is shlibpath searched before the hard-coded library search path?
4398shlibpath_overrides_runpath=$shlibpath_overrides_runpath
4399
4400# How to hardcode a shared library path into an executable.
4401hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1)
4402
4403# Whether we should hardcode library paths into libraries.
4404hardcode_into_libs=$hardcode_into_libs
4405
4406# Flag to hardcode \$libdir into a binary during linking.
4407# This must work even if \$libdir does not exist.
4408hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)
4409
4410# If ld is used when linking, flag to hardcode \$libdir into
4411# a binary during linking. This must work even if \$libdir does
4412# not exist.
4413hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)
4414
4415# Whether we need a single -rpath flag with a separated argument.
4416hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1)
4417
4418# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the
4419# resulting binary.
4420hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1)
4421
4422# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
4423# resulting binary.
4424hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1)
4425
4426# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
4427# the resulting binary.
4428hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)
4429
4430# Set to yes if building a shared library automatically hardcodes DIR into the library
4431# and all subsequent libraries and executables linked against it.
4432hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1)
4433
4434# Variables whose values should be saved in libtool wrapper scripts and
4435# restored at relink time.
4436variables_saved_for_relink="$variables_saved_for_relink"
4437
4438# Whether libtool must link a program against all its dependency libraries.
4439link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1)
4440
4441# Compile-time system search path for libraries
4442sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
4443
4444# Run-time system search path for libraries
4445sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
4446
4447# Fix the shell variable \$srcfile for the compiler.
4448fix_srcfile_path=$lt_fix_srcfile_path
4449
4450# Set to yes if exported symbols are required.
4451always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1)
4452
4453# The commands to list exported symbols.
4454export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1)
4455
4456# The commands to extract the exported symbol list from a shared archive.
4457extract_expsyms_cmds=$lt_extract_expsyms_cmds
4458
4459# Symbols that should not be listed in the preloaded symbols.
4460exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1)
4461
4462# Symbols that must always be exported.
4463include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1)
4464
4465ifelse([$1],[],
4466[# ### END LIBTOOL CONFIG],
4467[# ### END LIBTOOL TAG CONFIG: $tagname])
4468
4469__EOF__
4470
4471ifelse([$1],[], [
4472  case $host_os in
4473  aix3*)
4474    cat <<\EOF >> "$cfgfile"
4475
4476# AIX sometimes has problems with the GCC collect2 program.  For some
4477# reason, if we set the COLLECT_NAMES environment variable, the problems
4478# vanish in a puff of smoke.
4479if test "X${COLLECT_NAMES+set}" != Xset; then
4480  COLLECT_NAMES=
4481  export COLLECT_NAMES
4482fi
4483EOF
4484    ;;
4485  esac
4486
4487  # We use sed instead of cat because bash on DJGPP gets confused if
4488  # if finds mixed CR/LF and LF-only lines.  Since sed operates in
4489  # text mode, it properly converts lines to CR/LF.  This bash problem
4490  # is reportedly fixed, but why not run on old versions too?
4491  sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1)
4492
4493  mv -f "$cfgfile" "$ofile" || \
4494    (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
4495  chmod +x "$ofile"
4496])
4497else
4498  # If there is no Makefile yet, we rely on a make rule to execute
4499  # `config.status --recheck' to rerun these tests and create the
4500  # libtool script then.
4501  ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'`
4502  if test -f "$ltmain_in"; then
4503    test -f Makefile && make "$ltmain"
4504  fi
4505fi
4506])# AC_LIBTOOL_CONFIG
4507
4508
4509# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME])
4510# -------------------------------------------
4511AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI],
4512[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl
4513
4514_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
4515
4516if test "$GCC" = yes; then
4517  _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
4518
4519  AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
4520    lt_cv_prog_compiler_rtti_exceptions,
4521    [-fno-rtti -fno-exceptions], [],
4522    [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
4523fi
4524])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI
4525
4526
4527# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4528# ---------------------------------
4529AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE],
4530[AC_REQUIRE([AC_CANONICAL_HOST])
4531AC_REQUIRE([LT_AC_PROG_SED])
4532AC_REQUIRE([AC_PROG_NM])
4533AC_REQUIRE([AC_OBJEXT])
4534# Check for command to grab the raw symbol name followed by C symbol from nm.
4535AC_MSG_CHECKING([command to parse $NM output from $compiler object])
4536AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
4537[
4538# These are sane defaults that work on at least a few old systems.
4539# [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4540
4541# Character class describing NM global symbol codes.
4542symcode='[[BCDEGRST]]'
4543
4544# Regexp to match symbols that can be accessed directly from C.
4545sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
4546
4547# Transform an extracted symbol line into a proper C declaration
4548lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'"
4549
4550# Transform an extracted symbol line into symbol name and symbol address
4551lt_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'"
4552
4553# Define system-specific variables.
4554case $host_os in
4555aix*)
4556  symcode='[[BCDT]]'
4557  ;;
4558cygwin* | mingw* | pw32*)
4559  symcode='[[ABCDGISTW]]'
4560  ;;
4561hpux*) # Its linker distinguishes data from code symbols
4562  if test "$host_cpu" = ia64; then
4563    symcode='[[ABCDEGRST]]'
4564  fi
4565  lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4566  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'"
4567  ;;
4568linux* | k*bsd*-gnu)
4569  if test "$host_cpu" = ia64; then
4570    symcode='[[ABCDGIRSTW]]'
4571    lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4572    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'"
4573  fi
4574  ;;
4575irix* | nonstopux*)
4576  symcode='[[BCDEGRST]]'
4577  ;;
4578osf*)
4579  symcode='[[BCDEGQRST]]'
4580  ;;
4581solaris*)
4582  symcode='[[BDRT]]'
4583  ;;
4584sco3.2v5*)
4585  symcode='[[DT]]'
4586  ;;
4587sysv4.2uw2*)
4588  symcode='[[DT]]'
4589  ;;
4590sysv5* | sco5v6* | unixware* | OpenUNIX*)
4591  symcode='[[ABDT]]'
4592  ;;
4593sysv4)
4594  symcode='[[DFNSTU]]'
4595  ;;
4596esac
4597
4598# Handle CRLF in mingw tool chain
4599opt_cr=
4600case $build_os in
4601mingw*)
4602  opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4603  ;;
4604esac
4605
4606# If we're using GNU nm, then use its standard symbol codes.
4607case `$NM -V 2>&1` in
4608*GNU* | *'with BFD'*)
4609  symcode='[[ABCDGIRSTW]]' ;;
4610esac
4611
4612# Try without a prefix undercore, then with it.
4613for ac_symprfx in "" "_"; do
4614
4615  # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
4616  symxfrm="\\1 $ac_symprfx\\2 \\2"
4617
4618  # Write the raw and C identifiers.
4619  lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ 	]]\($symcode$symcode*\)[[ 	]][[ 	]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
4620
4621  # Check to see that the pipe works correctly.
4622  pipe_works=no
4623
4624  rm -f conftest*
4625  cat > conftest.$ac_ext <<EOF
4626#ifdef __cplusplus
4627extern "C" {
4628#endif
4629char nm_test_var;
4630void nm_test_func(){}
4631#ifdef __cplusplus
4632}
4633#endif
4634int main(){nm_test_var='a';nm_test_func();return(0);}
4635EOF
4636
4637  if AC_TRY_EVAL(ac_compile); then
4638    # Now try to grab the symbols.
4639    nlist=conftest.nm
4640    if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
4641      # Try sorting and uniquifying the output.
4642      if sort "$nlist" | uniq > "$nlist"T; then
4643	mv -f "$nlist"T "$nlist"
4644      else
4645	rm -f "$nlist"T
4646      fi
4647
4648      # Make sure that we snagged all the symbols we need.
4649      if grep ' nm_test_var$' "$nlist" >/dev/null; then
4650	if grep ' nm_test_func$' "$nlist" >/dev/null; then
4651	  cat <<EOF > conftest.$ac_ext
4652#ifdef __cplusplus
4653extern "C" {
4654#endif
4655
4656EOF
4657	  # Now generate the symbol file.
4658	  eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext'
4659
4660	  cat <<EOF >> conftest.$ac_ext
4661#if defined (__STDC__) && __STDC__
4662# define lt_ptr_t void *
4663#else
4664# define lt_ptr_t char *
4665# define const
4666#endif
4667
4668/* The mapping between symbol names and symbols. */
4669const struct {
4670  const char *name;
4671  lt_ptr_t address;
4672}
4673lt_preloaded_symbols[[]] =
4674{
4675EOF
4676	  $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext
4677	  cat <<\EOF >> conftest.$ac_ext
4678  {0, (lt_ptr_t) 0}
4679};
4680
4681#ifdef __cplusplus
4682}
4683#endif
4684EOF
4685	  # Now try linking the two files.
4686	  mv conftest.$ac_objext conftstm.$ac_objext
4687	  lt_save_LIBS="$LIBS"
4688	  lt_save_CFLAGS="$CFLAGS"
4689	  LIBS="conftstm.$ac_objext"
4690	  CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
4691	  if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
4692	    pipe_works=yes
4693	  fi
4694	  LIBS="$lt_save_LIBS"
4695	  CFLAGS="$lt_save_CFLAGS"
4696	else
4697	  echo "cannot find nm_test_func in $nlist" >&5
4698	fi
4699      else
4700	echo "cannot find nm_test_var in $nlist" >&5
4701      fi
4702    else
4703      echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4704    fi
4705  else
4706    echo "$progname: failed program was:" >&5
4707    cat conftest.$ac_ext >&5
4708  fi
4709  rm -rf conftest* conftst*
4710
4711  # Do not use the global_symbol_pipe unless it works.
4712  if test "$pipe_works" = yes; then
4713    break
4714  else
4715    lt_cv_sys_global_symbol_pipe=
4716  fi
4717done
4718])
4719if test -z "$lt_cv_sys_global_symbol_pipe"; then
4720  lt_cv_sys_global_symbol_to_cdecl=
4721fi
4722if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
4723  AC_MSG_RESULT(failed)
4724else
4725  AC_MSG_RESULT(ok)
4726fi
4727]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE
4728
4729
4730# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME])
4731# ---------------------------------------
4732AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC],
4733[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=
4734_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4735_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=
4736
4737AC_MSG_CHECKING([for $compiler option to produce PIC])
4738 ifelse([$1],[CXX],[
4739  # C++ specific cases for pic, static, wl, etc.
4740  if test "$GXX" = yes; then
4741    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4742    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4743
4744    case $host_os in
4745    aix*)
4746      # All AIX code is PIC.
4747      if test "$host_cpu" = ia64; then
4748	# AIX 5 now supports IA64 processor
4749	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4750      fi
4751      ;;
4752    amigaos*)
4753      # FIXME: we need at least 68020 code to build shared libraries, but
4754      # adding the `-m68020' flag to GCC prevents building anything better,
4755      # like `-m68040'.
4756      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
4757      ;;
4758    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4759      # PIC is the default for these OSes.
4760      ;;
4761    mingw* | cygwin* | os2* | pw32*)
4762      # This hack is so that the source file can tell whether it is being
4763      # built for inclusion in a dll (and should export symbols for example).
4764      # Although the cygwin gcc ignores -fPIC, still need this for old-style
4765      # (--disable-auto-import) libraries
4766	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
4767      ;;
4768    darwin* | rhapsody*)
4769      # PIC is the default on this platform
4770      # Common symbols not allowed in MH_DYLIB files
4771      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
4772      ;;
4773    *djgpp*)
4774      # DJGPP does not support shared libraries at all
4775      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4776      ;;
4777    interix[[3-9]]*)
4778      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
4779      # Instead, we relocate shared libraries at runtime.
4780      ;;
4781    sysv4*MP*)
4782      if test -d /usr/nec; then
4783	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
4784      fi
4785      ;;
4786    hpux*)
4787      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
4788      # not for PA HP-UX.
4789      case $host_cpu in
4790      hppa*64*|ia64*)
4791	;;
4792      *)
4793	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4794	;;
4795      esac
4796      ;;
4797    *)
4798      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4799      ;;
4800    esac
4801  else
4802    case $host_os in
4803      aix[[4-9]]*)
4804	# All AIX code is PIC.
4805	if test "$host_cpu" = ia64; then
4806	  # AIX 5 now supports IA64 processor
4807	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4808	else
4809	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
4810	fi
4811	;;
4812      chorus*)
4813	case $cc_basename in
4814	cxch68*)
4815	  # Green Hills C++ Compiler
4816	  # _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"
4817	  ;;
4818	esac
4819	;;
4820       darwin*)
4821         # PIC is the default on this platform
4822         # Common symbols not allowed in MH_DYLIB files
4823         case $cc_basename in
4824           xlc*)
4825           _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
4826           _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4827           ;;
4828         esac
4829       ;;
4830      dgux*)
4831	case $cc_basename in
4832	  ec++*)
4833	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4834	    ;;
4835	  ghcx*)
4836	    # Green Hills C++ Compiler
4837	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4838	    ;;
4839	  *)
4840	    ;;
4841	esac
4842	;;
4843      freebsd* | dragonfly*)
4844	# FreeBSD uses GNU C++
4845	;;
4846      hpux9* | hpux10* | hpux11*)
4847	case $cc_basename in
4848	  CC*)
4849	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4850	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4851	    if test "$host_cpu" != ia64; then
4852	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4853	    fi
4854	    ;;
4855	  aCC*)
4856	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4857	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
4858	    case $host_cpu in
4859	    hppa*64*|ia64*)
4860	      # +Z the default
4861	      ;;
4862	    *)
4863	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
4864	      ;;
4865	    esac
4866	    ;;
4867	  *)
4868	    ;;
4869	esac
4870	;;
4871      interix*)
4872	# This is c89, which is MS Visual C++ (no shared libs)
4873	# Anyone wants to do a port?
4874	;;
4875      irix5* | irix6* | nonstopux*)
4876	case $cc_basename in
4877	  CC*)
4878	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4879	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4880	    # CC pic flag -KPIC is the default.
4881	    ;;
4882	  *)
4883	    ;;
4884	esac
4885	;;
4886      linux* | k*bsd*-gnu)
4887	case $cc_basename in
4888	  KCC*)
4889	    # KAI C++ Compiler
4890	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4891	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4892	    ;;
4893      ecpc*)
4894        # old Intel C++ for x86_64 which still supported -KPIC.
4895        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4896        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4897        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4898        ;;
4899      icpc*)
4900        # Intel C++, used to be incompatible with GCC.
4901        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4902        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
4903        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
4904        ;;
4905	  pgCC* | pgcpp*)
4906	    # Portland Group C++ compiler.
4907	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4908	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
4909	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4910	    ;;
4911	  cxx*)
4912	    # Compaq C++
4913	    # Make sure the PIC flag is empty.  It appears that all Alpha
4914	    # Linux and Compaq Tru64 Unix objects are PIC.
4915	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4916	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4917	    ;;
4918	  *)
4919	    case `$CC -V 2>&1 | sed 5q` in
4920	    *Sun\ C*)
4921	      # Sun C++ 5.9
4922	      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4923	      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4924	      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4925	      ;;
4926	    esac
4927	    ;;
4928	esac
4929	;;
4930      lynxos*)
4931	;;
4932      m88k*)
4933	;;
4934      mvs*)
4935	case $cc_basename in
4936	  cxx*)
4937	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
4938	    ;;
4939	  *)
4940	    ;;
4941	esac
4942	;;
4943      netbsd*)
4944	;;
4945      osf3* | osf4* | osf5*)
4946	case $cc_basename in
4947	  KCC*)
4948	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
4949	    ;;
4950	  RCC*)
4951	    # Rational C++ 2.4.1
4952	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4953	    ;;
4954	  cxx*)
4955	    # Digital/Compaq C++
4956	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
4957	    # Make sure the PIC flag is empty.  It appears that all Alpha
4958	    # Linux and Compaq Tru64 Unix objects are PIC.
4959	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
4960	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
4961	    ;;
4962	  *)
4963	    ;;
4964	esac
4965	;;
4966      psos*)
4967	;;
4968      solaris*)
4969	case $cc_basename in
4970	  CC*)
4971	    # Sun C++ 4.2, 5.x and Centerline C++
4972	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
4973	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4974	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
4975	    ;;
4976	  gcx*)
4977	    # Green Hills C++ Compiler
4978	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
4979	    ;;
4980	  *)
4981	    ;;
4982	esac
4983	;;
4984      sunos4*)
4985	case $cc_basename in
4986	  CC*)
4987	    # Sun C++ 4.x
4988	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4989	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
4990	    ;;
4991	  lcc*)
4992	    # Lucid
4993	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
4994	    ;;
4995	  *)
4996	    ;;
4997	esac
4998	;;
4999      tandem*)
5000	case $cc_basename in
5001	  NCC*)
5002	    # NonStop-UX NCC 3.20
5003	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5004	    ;;
5005	  *)
5006	    ;;
5007	esac
5008	;;
5009      sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5010	case $cc_basename in
5011	  CC*)
5012	    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5013	    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5014	    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5015	    ;;
5016	esac
5017	;;
5018      vxworks*)
5019	;;
5020      *)
5021	_LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5022	;;
5023    esac
5024  fi
5025],
5026[
5027  if test "$GCC" = yes; then
5028    _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5029    _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5030
5031    case $host_os in
5032      aix*)
5033      # All AIX code is PIC.
5034      if test "$host_cpu" = ia64; then
5035	# AIX 5 now supports IA64 processor
5036	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5037      fi
5038      ;;
5039
5040    amigaos*)
5041      # FIXME: we need at least 68020 code to build shared libraries, but
5042      # adding the `-m68020' flag to GCC prevents building anything better,
5043      # like `-m68040'.
5044      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
5045      ;;
5046
5047    beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5048      # PIC is the default for these OSes.
5049      ;;
5050
5051    mingw* | cygwin* | pw32* | os2*)
5052      # This hack is so that the source file can tell whether it is being
5053      # built for inclusion in a dll (and should export symbols for example).
5054      # Although the cygwin gcc ignores -fPIC, still need this for old-style
5055      # (--disable-auto-import) libraries
5056	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5057      ;;
5058
5059    darwin* | rhapsody*)
5060      # PIC is the default on this platform
5061      # Common symbols not allowed in MH_DYLIB files
5062      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
5063      ;;
5064
5065    interix[[3-9]]*)
5066      # Interix 3.x gcc -fpic/-fPIC options generate broken code.
5067      # Instead, we relocate shared libraries at runtime.
5068      ;;
5069
5070    msdosdjgpp*)
5071      # Just because we use GCC doesn't mean we suddenly get shared libraries
5072      # on systems that don't support them.
5073      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5074      enable_shared=no
5075      ;;
5076
5077    sysv4*MP*)
5078      if test -d /usr/nec; then
5079	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
5080      fi
5081      ;;
5082
5083    hpux*)
5084      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5085      # not for PA HP-UX.
5086      case $host_cpu in
5087      hppa*64*|ia64*)
5088	# +Z the default
5089	;;
5090      *)
5091	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5092	;;
5093      esac
5094      ;;
5095
5096    *)
5097      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5098      ;;
5099    esac
5100  else
5101    # PORTME Check for flag to pass linker flags through the system compiler.
5102    case $host_os in
5103    aix*)
5104      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5105      if test "$host_cpu" = ia64; then
5106	# AIX 5 now supports IA64 processor
5107	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5108      else
5109	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
5110      fi
5111      ;;
5112      darwin*)
5113        # PIC is the default on this platform
5114        # Common symbols not allowed in MH_DYLIB files
5115       case $cc_basename in
5116         xlc*)
5117         _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon'
5118         _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5119         ;;
5120       esac
5121       ;;
5122
5123    mingw* | cygwin* | pw32* | os2*)
5124      # This hack is so that the source file can tell whether it is being
5125      # built for inclusion in a dll (and should export symbols for example).
5126	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'
5127      ;;
5128
5129    hpux9* | hpux10* | hpux11*)
5130      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5131      # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
5132      # not for PA HP-UX.
5133      case $host_cpu in
5134      hppa*64*|ia64*)
5135	# +Z the default
5136	;;
5137      *)
5138	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
5139	;;
5140      esac
5141      # Is there a better lt_prog_compiler_static that works with the bundled CC?
5142      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
5143      ;;
5144
5145    irix5* | irix6* | nonstopux*)
5146      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5147      # PIC (with -KPIC) is the default.
5148      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5149      ;;
5150
5151    newsos6)
5152      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5153      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5154      ;;
5155
5156    linux* | k*bsd*-gnu)
5157      case $cc_basename in
5158      # old Intel for x86_64 which still supported -KPIC.
5159      ecc*)
5160        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5161        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5162        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5163        ;;
5164      # icc used to be incompatible with GCC.
5165      # ICC 10 doesn't accept -KPIC any more.
5166      icc*)
5167        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5168        _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
5169        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static'
5170        ;;
5171      pgcc* | pgf77* | pgf90* | pgf95*)
5172        # Portland Group compilers (*not* the Pentium gcc compiler,
5173	# which looks to be a dead project)
5174	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5175	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
5176	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5177        ;;
5178      ccc*)
5179        _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5180        # All Alpha code is PIC.
5181        _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5182        ;;
5183      *)
5184        case `$CC -V 2>&1 | sed 5q` in
5185	*Sun\ C*)
5186	  # Sun C 5.9
5187	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5188	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5189	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5190	  ;;
5191	*Sun\ F*)
5192	  # Sun Fortran 8.3 passes all unrecognized flags to the linker
5193	  _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5194	  _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5195	  _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)=''
5196	  ;;
5197	esac
5198	;;
5199      esac
5200      ;;
5201
5202    osf3* | osf4* | osf5*)
5203      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5204      # All OSF/1 code is PIC.
5205      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5206      ;;
5207
5208    rdos*)
5209      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
5210      ;;
5211
5212    solaris*)
5213      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5214      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5215      case $cc_basename in
5216      f77* | f90* | f95*)
5217	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
5218      *)
5219	_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
5220      esac
5221      ;;
5222
5223    sunos4*)
5224      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
5225      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
5226      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5227      ;;
5228
5229    sysv4 | sysv4.2uw2* | sysv4.3*)
5230      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5231      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5232      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5233      ;;
5234
5235    sysv4*MP*)
5236      if test -d /usr/nec ;then
5237	_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
5238	_LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5239      fi
5240      ;;
5241
5242    sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
5243      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5244      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
5245      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5246      ;;
5247
5248    unicos*)
5249      _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
5250      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5251      ;;
5252
5253    uts4*)
5254      _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
5255      _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
5256      ;;
5257
5258    *)
5259      _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
5260      ;;
5261    esac
5262  fi
5263])
5264AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)])
5265
5266#
5267# Check to make sure the PIC flag actually works.
5268#
5269if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then
5270  AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works],
5271    _LT_AC_TAGVAR(lt_cv_prog_compiler_pic_works, $1),
5272    [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [],
5273    [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in
5274     "" | " "*) ;;
5275     *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;;
5276     esac],
5277    [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5278     _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
5279fi
5280case $host_os in
5281  # For platforms which do not support PIC, -DPIC is meaningless:
5282  *djgpp*)
5283    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=
5284    ;;
5285  *)
5286    _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])"
5287    ;;
5288esac
5289
5290#
5291# Check to make sure the static flag actually works.
5292#
5293wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\"
5294AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
5295  _LT_AC_TAGVAR(lt_cv_prog_compiler_static_works, $1),
5296  $lt_tmp_static_flag,
5297  [],
5298  [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=])
5299])
5300
5301
5302# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME])
5303# ------------------------------------
5304# See if the linker supports building shared libraries.
5305AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS],
5306[AC_REQUIRE([LT_AC_PROG_SED])dnl
5307AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
5308ifelse([$1],[CXX],[
5309  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5310  case $host_os in
5311  aix[[4-9]]*)
5312    # If we're using GNU nm, then we don't want the "-C" option.
5313    # -C means demangle to AIX nm, but means don't demangle with GNU nm
5314    if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5315      _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'
5316    else
5317      _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'
5318    fi
5319    ;;
5320  pw32*)
5321    _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
5322  ;;
5323  cygwin* | mingw*)
5324    _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'
5325  ;;
5326  *)
5327    _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5328  ;;
5329  esac
5330  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5331],[
5332  runpath_var=
5333  _LT_AC_TAGVAR(allow_undefined_flag, $1)=
5334  _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no
5335  _LT_AC_TAGVAR(archive_cmds, $1)=
5336  _LT_AC_TAGVAR(archive_expsym_cmds, $1)=
5337  _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)=
5338  _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)=
5339  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5340  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5341  _LT_AC_TAGVAR(thread_safe_flag_spec, $1)=
5342  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5343  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
5344  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5345  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5346  _LT_AC_TAGVAR(hardcode_minus_L, $1)=no
5347  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5348  _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown
5349  _LT_AC_TAGVAR(hardcode_automatic, $1)=no
5350  _LT_AC_TAGVAR(module_cmds, $1)=
5351  _LT_AC_TAGVAR(module_expsym_cmds, $1)=
5352  _LT_AC_TAGVAR(always_export_symbols, $1)=no
5353  _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
5354  # include_expsyms should be a list of space-separated symbols to be *always*
5355  # included in the symbol list
5356  _LT_AC_TAGVAR(include_expsyms, $1)=
5357  # exclude_expsyms can be an extended regexp of symbols to exclude
5358  # it will be wrapped by ` (' and `)$', so one must not match beginning or
5359  # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5360  # as well as any symbol that contains `d'.
5361  _LT_AC_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
5362  # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5363  # platforms (ab)use it in PIC code, but their linkers get confused if
5364  # the symbol is explicitly referenced.  Since portable code cannot
5365  # rely on this symbol name, it's probably fine to never include it in
5366  # preloaded symbol tables.
5367  # Exclude shared library initialization/finalization symbols.
5368dnl Note also adjust exclude_expsyms for C++ above.
5369  extract_expsyms_cmds=
5370  # Just being paranoid about ensuring that cc_basename is set.
5371  _LT_CC_BASENAME([$compiler])
5372  case $host_os in
5373  cygwin* | mingw* | pw32*)
5374    # FIXME: the MSVC++ port hasn't been tested in a loooong time
5375    # When not using gcc, we currently assume that we are using
5376    # Microsoft Visual C++.
5377    if test "$GCC" != yes; then
5378      with_gnu_ld=no
5379    fi
5380    ;;
5381  interix*)
5382    # we just hope/assume this is gcc and not c89 (= MSVC++)
5383    with_gnu_ld=yes
5384    ;;
5385  openbsd*)
5386    with_gnu_ld=no
5387    ;;
5388  esac
5389
5390  _LT_AC_TAGVAR(ld_shlibs, $1)=yes
5391  if test "$with_gnu_ld" = yes; then
5392    # If archive_cmds runs LD, not CC, wlarc should be empty
5393    wlarc='${wl}'
5394
5395    # Set some defaults for GNU ld with shared library support. These
5396    # are reset later if shared libraries are not supported. Putting them
5397    # here allows them to be overridden if necessary.
5398    runpath_var=LD_RUN_PATH
5399    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
5400    _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
5401    # ancient GNU ld didn't support --whole-archive et. al.
5402    if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then
5403	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5404      else
5405  	_LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5406    fi
5407    supports_anon_versioning=no
5408    case `$LD -v 2>/dev/null` in
5409      *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
5410      *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
5411      *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
5412      *\ 2.11.*) ;; # other 2.11 versions
5413      *) supports_anon_versioning=yes ;;
5414    esac
5415
5416    # See if GNU ld supports shared libraries.
5417    case $host_os in
5418    aix[[3-9]]*)
5419      # On AIX/PPC, the GNU linker is very broken
5420      if test "$host_cpu" != ia64; then
5421	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5422	cat <<EOF 1>&2
5423
5424*** Warning: the GNU linker, at least up to release 2.9.1, is reported
5425*** to be unable to reliably create shared libraries on AIX.
5426*** Therefore, libtool is disabling shared libraries support.  If you
5427*** really care for shared libraries, you may want to modify your PATH
5428*** so that a non-GNU linker is found, and then restart.
5429
5430EOF
5431      fi
5432      ;;
5433
5434    amigaos*)
5435      _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)'
5436      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5437      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5438
5439      # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5440      # that the semantics of dynamic libraries on AmigaOS, at least up
5441      # to version 4, is to share data among multiple programs linked
5442      # with the same dynamic library.  Since this doesn't match the
5443      # behavior of shared libraries on other platforms, we can't use
5444      # them.
5445      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5446      ;;
5447
5448    beos*)
5449      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5450	_LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5451	# Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5452	# support --undefined.  This deserves some investigation.  FIXME
5453	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5454      else
5455	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5456      fi
5457      ;;
5458
5459    cygwin* | mingw* | pw32*)
5460      # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
5461      # as there is no search path for DLLs.
5462      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5463      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5464      _LT_AC_TAGVAR(always_export_symbols, $1)=no
5465      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5466      _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
5467
5468      if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
5469        _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'
5470	# If the export-symbols file already is a .def file (1st line
5471	# is EXPORTS), use it as is; otherwise, prepend...
5472	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
5473	  cp $export_symbols $output_objdir/$soname.def;
5474	else
5475	  echo EXPORTS > $output_objdir/$soname.def;
5476	  cat $export_symbols >> $output_objdir/$soname.def;
5477	fi~
5478	$CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
5479      else
5480	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5481      fi
5482      ;;
5483
5484    interix[[3-9]]*)
5485      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5486      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5487      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5488      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5489      # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
5490      # Instead, shared libraries are loaded at an image base (0x10000000 by
5491      # default) and relocated if they conflict, which is a slow very memory
5492      # consuming and fragmenting process.  To avoid this, we pick a random,
5493      # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
5494      # time.  Moving up from 0x10000000 also allows more sbrk(2) space.
5495      _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'
5496      _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'
5497      ;;
5498
5499    gnu* | linux* | k*bsd*-gnu)
5500      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5501	tmp_addflag=
5502	case $cc_basename,$host_cpu in
5503	pgcc*)				# Portland Group C compiler
5504	  _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'
5505	  tmp_addflag=' $pic_flag'
5506	  ;;
5507	pgf77* | pgf90* | pgf95*)	# Portland Group f77 and f90 compilers
5508	  _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'
5509	  tmp_addflag=' $pic_flag -Mnomain' ;;
5510	ecc*,ia64* | icc*,ia64*)		# Intel C compiler on ia64
5511	  tmp_addflag=' -i_dynamic' ;;
5512	efc*,ia64* | ifort*,ia64*)	# Intel Fortran compiler on ia64
5513	  tmp_addflag=' -i_dynamic -nofor_main' ;;
5514	ifc* | ifort*)			# Intel Fortran compiler
5515	  tmp_addflag=' -nofor_main' ;;
5516	esac
5517	case `$CC -V 2>&1 | sed 5q` in
5518	*Sun\ C*)			# Sun C 5.9
5519	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive'
5520	  tmp_sharedflag='-G' ;;
5521	*Sun\ F*)			# Sun Fortran 8.3
5522	  tmp_sharedflag='-G' ;;
5523	*)
5524	  tmp_sharedflag='-shared' ;;
5525	esac
5526	_LT_AC_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5527
5528	if test $supports_anon_versioning = yes; then
5529	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~
5530  cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
5531  $echo "local: *; };" >> $output_objdir/$libname.ver~
5532	  $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
5533	fi
5534      else
5535	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5536      fi
5537      ;;
5538
5539    netbsd*)
5540      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5541	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5542	wlarc=
5543      else
5544	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5545	_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'
5546      fi
5547      ;;
5548
5549    solaris*)
5550      if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
5551	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5552	cat <<EOF 1>&2
5553
5554*** Warning: The releases 2.8.* of the GNU linker cannot reliably
5555*** create shared libraries on Solaris systems.  Therefore, libtool
5556*** is disabling shared libraries support.  We urge you to upgrade GNU
5557*** binutils to release 2.9.1 or newer.  Another option is to modify
5558*** your PATH or compiler configuration so that the native linker is
5559*** used, and then restart.
5560
5561EOF
5562      elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5563	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5564	_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'
5565      else
5566	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5567      fi
5568      ;;
5569
5570    sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
5571      case `$LD -v 2>&1` in
5572        *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
5573	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5574	cat <<_LT_EOF 1>&2
5575
5576*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
5577*** reliably create shared libraries on SCO systems.  Therefore, libtool
5578*** is disabling shared libraries support.  We urge you to upgrade GNU
5579*** binutils to release 2.16.91.0.3 or newer.  Another option is to modify
5580*** your PATH or compiler configuration so that the native linker is
5581*** used, and then restart.
5582
5583_LT_EOF
5584	;;
5585	*)
5586	  if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5587	    _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
5588	    _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib'
5589	    _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'
5590	  else
5591	    _LT_AC_TAGVAR(ld_shlibs, $1)=no
5592	  fi
5593	;;
5594      esac
5595      ;;
5596
5597    sunos4*)
5598      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5599      wlarc=
5600      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5601      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5602      ;;
5603
5604    *)
5605      if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
5606	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5607	_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'
5608      else
5609	_LT_AC_TAGVAR(ld_shlibs, $1)=no
5610      fi
5611      ;;
5612    esac
5613
5614    if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then
5615      runpath_var=
5616      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=
5617      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=
5618      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=
5619    fi
5620  else
5621    # PORTME fill in a description of your system's linker (not GNU ld)
5622    case $host_os in
5623    aix3*)
5624      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5625      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5626      _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'
5627      # Note: this linker hardcodes the directories in LIBPATH if there
5628      # are no directories specified by -L.
5629      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5630      if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
5631	# Neither direct hardcoding nor static linking is supported with a
5632	# broken collect2.
5633	_LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5634      fi
5635      ;;
5636
5637    aix[[4-9]]*)
5638      if test "$host_cpu" = ia64; then
5639	# On IA64, the linker does run time linking by default, so we don't
5640	# have to do anything special.
5641	aix_use_runtimelinking=no
5642	exp_sym_flag='-Bexport'
5643	no_entry_flag=""
5644      else
5645	# If we're using GNU nm, then we don't want the "-C" option.
5646	# -C means demangle to AIX nm, but means don't demangle with GNU nm
5647	if $NM -V 2>&1 | grep 'GNU' > /dev/null; then
5648	  _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'
5649	else
5650	  _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'
5651	fi
5652	aix_use_runtimelinking=no
5653
5654	# Test if we are trying to use run time linking or normal
5655	# AIX style linking. If -brtl is somewhere in LDFLAGS, we
5656	# need to do runtime linking.
5657	case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
5658	  for ld_flag in $LDFLAGS; do
5659  	  if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5660  	    aix_use_runtimelinking=yes
5661  	    break
5662  	  fi
5663	  done
5664	  ;;
5665	esac
5666
5667	exp_sym_flag='-bexport'
5668	no_entry_flag='-bnoentry'
5669      fi
5670
5671      # When large executables or shared objects are built, AIX ld can
5672      # have problems creating the table of contents.  If linking a library
5673      # or program results in "error TOC overflow" add -mminimal-toc to
5674      # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5675      # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5676
5677      _LT_AC_TAGVAR(archive_cmds, $1)=''
5678      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5679      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
5680      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5681
5682      if test "$GCC" = yes; then
5683	case $host_os in aix4.[[012]]|aix4.[[012]].*)
5684	# We only want to do this on AIX 4.2 and lower, the check
5685	# below for broken collect2 doesn't work under 4.3+
5686	  collect2name=`${CC} -print-prog-name=collect2`
5687	  if test -f "$collect2name" && \
5688  	   strings "$collect2name" | grep resolve_lib_name >/dev/null
5689	  then
5690  	  # We have reworked collect2
5691  	  :
5692	  else
5693  	  # We have old collect2
5694  	  _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported
5695  	  # It fails to find uninstalled libraries when the uninstalled
5696  	  # path is not listed in the libpath.  Setting hardcode_minus_L
5697  	  # to unsupported forces relinking
5698  	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5699  	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5700  	  _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=
5701	  fi
5702	  ;;
5703	esac
5704	shared_flag='-shared'
5705	if test "$aix_use_runtimelinking" = yes; then
5706	  shared_flag="$shared_flag "'${wl}-G'
5707	fi
5708      else
5709	# not using gcc
5710	if test "$host_cpu" = ia64; then
5711  	# VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
5712  	# chokes on -Wl,-G. The following line is correct:
5713	  shared_flag='-G'
5714	else
5715	  if test "$aix_use_runtimelinking" = yes; then
5716	    shared_flag='${wl}-G'
5717	  else
5718	    shared_flag='${wl}-bM:SRE'
5719	  fi
5720	fi
5721      fi
5722
5723      # It seems that -bexpall does not export symbols beginning with
5724      # underscore (_), so it is better to generate a list of symbols to export.
5725      _LT_AC_TAGVAR(always_export_symbols, $1)=yes
5726      if test "$aix_use_runtimelinking" = yes; then
5727	# Warning - without using the other runtime loading flags (-brtl),
5728	# -berok will link without error, but may produce a broken library.
5729	_LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok'
5730       # Determine the default libpath from the value encoded in an empty executable.
5731       _LT_AC_SYS_LIBPATH_AIX
5732       _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5733	_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"
5734       else
5735	if test "$host_cpu" = ia64; then
5736	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
5737	  _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
5738	  _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"
5739	else
5740	 # Determine the default libpath from the value encoded in an empty executable.
5741	 _LT_AC_SYS_LIBPATH_AIX
5742	 _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
5743	  # Warning - without using the other run time loading flags,
5744	  # -berok will link without error, but may produce a broken library.
5745	  _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
5746	  _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
5747	  # Exported symbols can be pulled into shared objects from archives
5748	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
5749	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
5750	  # This is similar to how AIX traditionally builds its shared libraries.
5751	  _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'
5752	fi
5753      fi
5754      ;;
5755
5756    amigaos*)
5757      _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)'
5758      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5759      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5760      # see comment about different semantics on the GNU ld section
5761      _LT_AC_TAGVAR(ld_shlibs, $1)=no
5762      ;;
5763
5764    bsdi[[45]]*)
5765      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
5766      ;;
5767
5768    cygwin* | mingw* | pw32*)
5769      # When not using gcc, we currently assume that we are using
5770      # Microsoft Visual C++.
5771      # hardcode_libdir_flag_spec is actually meaningless, as there is
5772      # no search path for DLLs.
5773      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
5774      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
5775      # Tell ltmain to make .lib files, not .a files.
5776      libext=lib
5777      # Tell ltmain to make .dll files, not .so files.
5778      shrext_cmds=".dll"
5779      # FIXME: Setting linknames here is a bad hack.
5780      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames='
5781      # The linker will automatically build a .lib file if we build a DLL.
5782      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true'
5783      # FIXME: Should let the user specify the lib program.
5784      _LT_AC_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
5785      _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
5786      _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
5787      ;;
5788
5789    darwin* | rhapsody*)
5790      case $host_os in
5791        rhapsody* | darwin1.[[012]])
5792         _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress'
5793         ;;
5794       *) # Darwin 1.3 on
5795         if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then
5796           _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5797         else
5798           case ${MACOSX_DEPLOYMENT_TARGET} in
5799             10.[[012]])
5800               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
5801               ;;
5802             10.*)
5803               _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup'
5804               ;;
5805           esac
5806         fi
5807         ;;
5808      esac
5809      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
5810      _LT_AC_TAGVAR(hardcode_direct, $1)=no
5811      _LT_AC_TAGVAR(hardcode_automatic, $1)=yes
5812      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
5813      _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=''
5814      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5815    if test "$GCC" = yes ; then
5816    	output_verbose_link_cmd='echo'
5817        _LT_AC_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
5818        _LT_AC_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
5819        _LT_AC_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
5820        _LT_AC_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
5821    else
5822      case $cc_basename in
5823        xlc*)
5824         output_verbose_link_cmd='echo'
5825         _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $xlcverstring'
5826         _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags'
5827          # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds
5828         _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[    ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $xlcverstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}'
5829          _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}'
5830          ;;
5831       *)
5832         _LT_AC_TAGVAR(ld_shlibs, $1)=no
5833          ;;
5834      esac
5835    fi
5836      ;;
5837
5838    dgux*)
5839      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5840      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
5841      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5842      ;;
5843
5844    # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5845    # support.  Future versions do this automatically, but an explicit c++rt0.o
5846    # does not break anything, and helps significantly (at the cost of a little
5847    # extra space).
5848    freebsd2.2*)
5849      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5850      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5851      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5852      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5853      ;;
5854
5855    # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5856    freebsd2*)
5857      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5858      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5859      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5860      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5861      ;;
5862
5863    # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5864    freebsd* | dragonfly*)
5865      _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5866      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5867      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5868      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5869      ;;
5870
5871    hpux9*)
5872      if test "$GCC" = yes; then
5873	_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'
5874      else
5875	_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'
5876      fi
5877      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5878      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5879      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5880
5881      # hardcode_minus_L: Not really in the search PATH,
5882      # but as the default location of the library.
5883      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5884      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5885      ;;
5886
5887    hpux10*)
5888      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5889	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5890      else
5891	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
5892      fi
5893      if test "$with_gnu_ld" = no; then
5894	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5895	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5896
5897	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5898	_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5899
5900	# hardcode_minus_L: Not really in the search PATH,
5901	# but as the default location of the library.
5902	_LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5903      fi
5904      ;;
5905
5906    hpux11*)
5907      if test "$GCC" = yes -a "$with_gnu_ld" = no; then
5908	case $host_cpu in
5909	hppa*64*)
5910	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5911	  ;;
5912	ia64*)
5913	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5914	  ;;
5915	*)
5916	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5917	  ;;
5918	esac
5919      else
5920	case $host_cpu in
5921	hppa*64*)
5922	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5923	  ;;
5924	ia64*)
5925	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
5926	  ;;
5927	*)
5928	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
5929	  ;;
5930	esac
5931      fi
5932      if test "$with_gnu_ld" = no; then
5933	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
5934	_LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5935
5936	case $host_cpu in
5937	hppa*64*|ia64*)
5938	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
5939	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
5940	  _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5941	  ;;
5942	*)
5943	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5944	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5945
5946	  # hardcode_minus_L: Not really in the search PATH,
5947	  # but as the default location of the library.
5948	  _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
5949	  ;;
5950	esac
5951      fi
5952      ;;
5953
5954    irix5* | irix6* | nonstopux*)
5955      if test "$GCC" = yes; then
5956	_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'
5957      else
5958	_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'
5959	_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
5960      fi
5961      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5962      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5963      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
5964      ;;
5965
5966    netbsd*)
5967      if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5968	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5969      else
5970	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5971      fi
5972      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5973      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5974      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5975      ;;
5976
5977    newsos6)
5978      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
5980      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
5981      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
5982      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5983      ;;
5984
5985    openbsd*)
5986      if test -f /usr/libexec/ld.so; then
5987	_LT_AC_TAGVAR(hardcode_direct, $1)=yes
5988	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
5989	if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5990	  _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5991	  _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
5992	  _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
5993	  _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
5994	else
5995	  case $host_os in
5996	   openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
5997	     _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5998	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
5999	     ;;
6000	   *)
6001	     _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
6002	     _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
6003	     ;;
6004	  esac
6005        fi
6006      else
6007	_LT_AC_TAGVAR(ld_shlibs, $1)=no
6008      fi
6009      ;;
6010
6011    os2*)
6012      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6013      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6014      _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported
6015      _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'
6016      _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
6017      ;;
6018
6019    osf3*)
6020      if test "$GCC" = yes; then
6021	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6022	_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'
6023      else
6024	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6025	_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'
6026      fi
6027      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6028      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6029      ;;
6030
6031    osf4* | osf5*)	# as osf3* with the addition of -msym flag
6032      if test "$GCC" = yes; then
6033	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
6034	_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'
6035	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
6036      else
6037	_LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
6038	_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'
6039	_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~
6040	$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'
6041
6042	# Both c and cxx compiler support -rpath directly
6043	_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
6044      fi
6045      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=:
6046      ;;
6047
6048    solaris*)
6049      _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text'
6050      if test "$GCC" = yes; then
6051	wlarc='${wl}'
6052	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6053	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6054	  $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp'
6055      else
6056	wlarc=''
6057	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6058	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6059  	$LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6060      fi
6061      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
6062      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6063      case $host_os in
6064      solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
6065      *)
6066	# The compiler driver will combine and reorder linker options,
6067	# but understands `-z linker_flag'.  GCC discards it without `$wl',
6068	# but is careful enough not to reorder.
6069 	# Supported since Solaris 2.6 (maybe 2.5.1?)
6070	if test "$GCC" = yes; then
6071	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
6072	else
6073	  _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
6074	fi
6075	;;
6076      esac
6077      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6078      ;;
6079
6080    sunos4*)
6081      if test "x$host_vendor" = xsequent; then
6082	# Use $CC to link under sequent, because it throws in some extra .o
6083	# files that make .init and .fini sections work.
6084	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6085      else
6086	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6087      fi
6088      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6089      _LT_AC_TAGVAR(hardcode_direct, $1)=yes
6090      _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes
6091      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6092      ;;
6093
6094    sysv4)
6095      case $host_vendor in
6096	sni)
6097	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6098	  _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true???
6099	;;
6100	siemens)
6101	  ## LD is ld it makes a PLAMLIB
6102	  ## CC just makes a GrossModule.
6103	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6104	  _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
6105	  _LT_AC_TAGVAR(hardcode_direct, $1)=no
6106        ;;
6107	motorola)
6108	  _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6109	  _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
6110	;;
6111      esac
6112      runpath_var='LD_RUN_PATH'
6113      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6114      ;;
6115
6116    sysv4.3*)
6117      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6118      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6119      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
6120      ;;
6121
6122    sysv4*MP*)
6123      if test -d /usr/nec; then
6124	_LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6125	_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6126	runpath_var=LD_RUN_PATH
6127	hardcode_runpath_var=yes
6128	_LT_AC_TAGVAR(ld_shlibs, $1)=yes
6129      fi
6130      ;;
6131
6132    sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
6133      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6134      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6135      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6136      runpath_var='LD_RUN_PATH'
6137
6138      if test "$GCC" = yes; then
6139	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6140	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6141      else
6142	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6143	_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
6144      fi
6145      ;;
6146
6147    sysv5* | sco3.2v5* | sco5v6*)
6148      # Note: We can NOT use -z defs as we might desire, because we do not
6149      # link with -lc, and that would cause any symbols used from libc to
6150      # always be unresolved, which means just about no library would
6151      # ever link correctly.  If we're not using GNU ld we use -z text
6152      # though, which does catch some bad symbols but isn't as heavy-handed
6153      # as -z defs.
6154      _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
6155      _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
6156      _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6157      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6158      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
6159      _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':'
6160      _LT_AC_TAGVAR(link_all_deplibs, $1)=yes
6161      _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
6162      runpath_var='LD_RUN_PATH'
6163
6164      if test "$GCC" = yes; then
6165	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6166	_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'
6167      else
6168	_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags'
6169	_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'
6170      fi
6171      ;;
6172
6173    uts4*)
6174      _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6175      _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
6176      _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no
6177      ;;
6178
6179    *)
6180      _LT_AC_TAGVAR(ld_shlibs, $1)=no
6181      ;;
6182    esac
6183  fi
6184])
6185AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)])
6186test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
6187
6188#
6189# Do we need to explicitly link libc?
6190#
6191case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in
6192x|xyes)
6193  # Assume -lc should be added
6194  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6195
6196  if test "$enable_shared" = yes && test "$GCC" = yes; then
6197    case $_LT_AC_TAGVAR(archive_cmds, $1) in
6198    *'~'*)
6199      # FIXME: we may have to deal with multi-command sequences.
6200      ;;
6201    '$CC '*)
6202      # Test whether the compiler implicitly links with -lc since on some
6203      # systems, -lgcc has to come before -lc. If gcc already passes -lc
6204      # to ld, don't add -lc before -lgcc.
6205      AC_MSG_CHECKING([whether -lc should be explicitly linked in])
6206      $rm conftest*
6207      echo "$lt_simple_compile_test_code" > conftest.$ac_ext
6208
6209      if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
6210        soname=conftest
6211        lib=conftest
6212        libobjs=conftest.$ac_objext
6213        deplibs=
6214        wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)
6215	pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)
6216        compiler_flags=-v
6217        linker_flags=-v
6218        verstring=
6219        output_objdir=.
6220        libname=conftest
6221        lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1)
6222        _LT_AC_TAGVAR(allow_undefined_flag, $1)=
6223        if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1)
6224        then
6225	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no
6226        else
6227	  _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes
6228        fi
6229        _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
6230      else
6231        cat conftest.err 1>&5
6232      fi
6233      $rm conftest*
6234      AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)])
6235      ;;
6236    esac
6237  fi
6238  ;;
6239esac
6240])# AC_LIBTOOL_PROG_LD_SHLIBS
6241
6242
6243# _LT_AC_FILE_LTDLL_C
6244# -------------------
6245# Be careful that the start marker always follows a newline.
6246AC_DEFUN([_LT_AC_FILE_LTDLL_C], [
6247# /* ltdll.c starts here */
6248# #define WIN32_LEAN_AND_MEAN
6249# #include <windows.h>
6250# #undef WIN32_LEAN_AND_MEAN
6251# #include <stdio.h>
6252#
6253# #ifndef __CYGWIN__
6254# #  ifdef __CYGWIN32__
6255# #    define __CYGWIN__ __CYGWIN32__
6256# #  endif
6257# #endif
6258#
6259# #ifdef __cplusplus
6260# extern "C" {
6261# #endif
6262# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
6263# #ifdef __cplusplus
6264# }
6265# #endif
6266#
6267# #ifdef __CYGWIN__
6268# #include <cygwin/cygwin_dll.h>
6269# DECLARE_CYGWIN_DLL( DllMain );
6270# #endif
6271# HINSTANCE __hDllInstance_base;
6272#
6273# BOOL APIENTRY
6274# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
6275# {
6276#   __hDllInstance_base = hInst;
6277#   return TRUE;
6278# }
6279# /* ltdll.c ends here */
6280])# _LT_AC_FILE_LTDLL_C
6281
6282
6283# _LT_AC_TAGVAR(VARNAME, [TAGNAME])
6284# ---------------------------------
6285AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])])
6286
6287
6288# old names
6289AC_DEFUN([AM_PROG_LIBTOOL],   [AC_PROG_LIBTOOL])
6290AC_DEFUN([AM_ENABLE_SHARED],  [AC_ENABLE_SHARED($@)])
6291AC_DEFUN([AM_ENABLE_STATIC],  [AC_ENABLE_STATIC($@)])
6292AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
6293AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
6294AC_DEFUN([AM_PROG_LD],        [AC_PROG_LD])
6295AC_DEFUN([AM_PROG_NM],        [AC_PROG_NM])
6296
6297# This is just to silence aclocal about the macro not being used
6298ifelse([AC_DISABLE_FAST_INSTALL])
6299
6300############################################################
6301# NOTE: This macro has been submitted for inclusion into   #
6302#  GNU Autoconf as AC_PROG_SED.  When it is available in   #
6303#  a released version of Autoconf we should remove this    #
6304#  macro and use it instead.                               #
6305############################################################
6306# LT_AC_PROG_SED
6307# --------------
6308# Check for a fully-functional sed program, that truncates
6309# as few characters as possible.  Prefer GNU sed if found.
6310AC_DEFUN([LT_AC_PROG_SED],
6311[AC_MSG_CHECKING([for a sed that does not truncate output])
6312AC_CACHE_VAL(lt_cv_path_SED,
6313[# Loop through the user's path and test for sed and gsed.
6314# Then use that list of sed's as ones to test for truncation.
6315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6316for as_dir in $PATH
6317do
6318  IFS=$as_save_IFS
6319  test -z "$as_dir" && as_dir=.
6320  for lt_ac_prog in sed gsed; do
6321    for ac_exec_ext in '' $ac_executable_extensions; do
6322      if test -f "$as_dir/$lt_ac_prog$ac_exec_ext"; then
6323        lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
6324      fi
6325    done
6326  done
6327done
6328lt_ac_max=0
6329lt_ac_count=0
6330# Add /usr/xpg4/bin/sed as it is typically found on Solaris
6331# along with /bin/sed that truncates output.
6332for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
6333  test ! -f $lt_ac_sed && continue
6334  cat /dev/null > conftest.in
6335  lt_ac_count=0
6336  echo $ECHO_N "0123456789$ECHO_C" >conftest.in
6337  # Check for GNU sed and select it if it is found.
6338  if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
6339    lt_cv_path_SED=$lt_ac_sed
6340    break
6341  fi
6342  while true; do
6343    cat conftest.in conftest.in >conftest.tmp
6344    mv conftest.tmp conftest.in
6345    cp conftest.in conftest.nl
6346    echo >>conftest.nl
6347    $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
6348    cmp -s conftest.out conftest.nl || break
6349    # 10000 chars as input seems more than enough
6350    test $lt_ac_count -gt 10 && break
6351    lt_ac_count=`expr $lt_ac_count + 1`
6352    if test $lt_ac_count -gt $lt_ac_max; then
6353      lt_ac_max=$lt_ac_count
6354      lt_cv_path_SED=$lt_ac_sed
6355    fi
6356  done
6357done
6358])
6359SED=$lt_cv_path_SED
6360AC_MSG_RESULT([$SED])
6361])
6362