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