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