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