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